From edf97cb2bfe110123a6dacc1cd8c52ce400ff1db Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期三, 19 七月 2023 00:46:03 +0800 Subject: [PATCH] 新增个人记事本展示和详情页 --- ruoyi-ui/src/views/device/index.vue | 67 +++++++++++++++++++++------------ 1 files changed, 43 insertions(+), 24 deletions(-) diff --git a/ruoyi-ui/src/views/device/index.vue b/ruoyi-ui/src/views/device/index.vue index 2b64e80..279416f 100644 --- a/ruoyi-ui/src/views/device/index.vue +++ b/ruoyi-ui/src/views/device/index.vue @@ -99,7 +99,7 @@ plain icon="el-icon-download" size="mini" - @click="handleExport" + @click="handleExportTemplate" v-hasPermi="['family:note:export']" >瀵煎叆妯℃澘涓嬭浇</el-button> </el-col> @@ -123,9 +123,9 @@ </el-row> <!-- 搴忓彿銆佽澶囧悕绉般�佹椂闂淬�佽喘涔颁汉銆佷簨椤瑰唴瀹广�佸瓨鏀惧湴鐐广�佺數瀛愭枃浠躲�佸娉� 鎿嶄綔--> <!-- 杩欓噷鏈変釜familyList鏁扮粍 鏄湪data()涓畾涔夌殑 --> - <el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> + <el-table v-loading="loading" :data="equipmentList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> + <el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> + <el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> <el-table-column label="璁惧鍚嶇О" prop="name" sortable width="120" /> <el-table-column label="鏃堕棿" align="center" sortable prop="happenTime" width="180"> @@ -137,7 +137,7 @@ </template> </el-table-column> <el-table-column label="璐拱浜�" prop="buyer" sortable width="100" /> - <el-table-column label="鏍囬" prop="content" sortable :show-overflow-tooltip="true" width="150" /> + <el-table-column label="浜嬮」鍐呭" prop="content" sortable :show-overflow-tooltip="true" width="150" /> <el-table-column label="瀛樻斁鍦扮偣" prop="location" sortable width="100" /> <el-table-column label="澶囨敞" prop="remark" sortable width="100" > @@ -145,24 +145,26 @@ </el-table-column> - <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" > + <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="180" align="center"> + <template slot-scope="scope" > - <img - class="el-upload-list__item-thumbnail" - src="../../assets/images/deviceLis.png" - alt="" - style="width: 35px; height: 35px;" - fit="cover" - v-if="scope.row.url !== ','" - > - <img - class="el-upload-list__item-thumbnail" - src="../../assets/images/deviceA.png" - alt="" - style="width: 35px; height: 35px;" - fit="cover" - v-if="scope.row.url === ','" - > + <div @click="handleCheck(scope.row)"> + <img + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceLis.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + v-if="scope.row.url !== ',' " + > + <img + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceA.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + v-if="scope.row.url === ','" + ></div> </template> </el-table-column> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> @@ -221,7 +223,7 @@ <el-input v-model="formDat.buyer" placeholder="璇疯緭鍏ヨ喘涔颁汉" clearable :style="{width: '100%'}" > </el-input> </el-form-item> - <el-form-item label="鏍囬" prop="content"> + <el-form-item label="浜嬮」鍐呭" prop="content"> <el-input v-model="formDat.content" placeholder="璇疯緭鍏ヤ簨椤瑰唴瀹�" clearable :style="{width: '100%'}" ></el-input> </el-form-item> <el-form-item label="瀛樻斁鍦扮偣" prop="location"> @@ -569,7 +571,10 @@ } }); }, - +getRowId(row) + { + return row.id + }, handlePictureCardPreview(file) { this.dialogImageUrl = file.url; @@ -631,9 +636,23 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { + const Ids = this.ids; + + if(Ids.length==0) + { this.download('/zfEquipment/export', { ...this.queryParams }, `zfEquiment_${new Date().getTime()}.xlsx`) + } + else{ + this.download('/zfEquipment/export1/'+Ids, { + }, `zfEquiment_${new Date().getTime()}.xlsx`) + } + }, + handleExportTemplate(){ + this.download('/zfEquipment/model', { + + }, `zfEquiment_${new Date().getTime()}.xlsx`) }, /** 瀵煎叆鎿嶄綔*/ handleEnport(params){ -- Gitblit v1.9.1