From d3bc497986278ec8c2f21d3ef272ecc392cbc93b Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期二, 18 七月 2023 17:00:19 +0800 Subject: [PATCH] 家大事记的电子文件 变正常了 --- ruoyi-ui/src/views/note/index.vue | 45 +++++++++++++++++++++++++++++++++++---------- 1 files changed, 35 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/views/note/index.vue b/ruoyi-ui/src/views/note/index.vue index 0697987..5c43141 100644 --- a/ruoyi-ui/src/views/note/index.vue +++ b/ruoyi-ui/src/views/note/index.vue @@ -106,7 +106,7 @@ plain icon="el-icon-download" size="mini" - @click="handleExport" + @click="handleExportTemplate" v-hasPermi="['family:note:export']" >瀵煎叆妯℃澘涓嬭浇</el-button> </el-col> @@ -127,10 +127,10 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" :data="propertyList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> - <el-table-column type="selection" width="55" align="center" /> + <el-table v-loading="loading" :data="propertyList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> + <el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> - <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> + <el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> <el-table-column label="绫诲瀷" prop="type" sortable :show-overflow-tooltip="true" width="150" /> <el-table-column label="鏍囬" prop="title" sortable :show-overflow-tooltip="true" width="150" /> @@ -146,13 +146,14 @@ </el-table-column> <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" > <template slot-scope="scope" > + <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 !== null" + v-if="scope.row.url !== ','" > <img class="el-upload-list__item-thumbnail" @@ -160,8 +161,8 @@ alt="" style="width: 35px; height: 35px;" fit="cover" - v-if="scope.row.url === null" - > + v-if="scope.row.url === ','" + ></div> </template> </el-table-column> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> @@ -210,6 +211,13 @@ <el-form-item label="瀛樺偍鍦板潃" prop="location"> <el-input v-model="formDat.location" placeholder="璇疯緭鍏ュ瓨鍌ㄥ湴鍧�" clearable :style="{width: '100%'}" > </el-input> + </el-form-item> + <el-form-item label="鍙戠敓鏃堕棿" prop="happenTime"> + <el-date-picker + v-model='formDat.happenTime' + type='date' + placeholder='閫夋嫨鏃ユ湡' + ></el-date-picker> </el-form-item> <el-form-item label="鎸佹湁浜�" prop="holder"> <el-input v-model="formDat.holder" placeholder="璇疯緭鍏ユ寔鏈変汉" clearable :style="{width: '100%'}" > @@ -432,7 +440,10 @@ this.open = false; this.reset(); }, - + getRowId(row) + { + return row.id + }, //闅旇鍙樿壊 tableRowClassName({ row, rowIndex }) { if (rowIndex % 2 == 0) { @@ -603,7 +614,7 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const Ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎璧勪骇缂栧彿涓�"' + Ids + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(function() { return delProperty(Ids); }).then(() => { this.getList(); @@ -612,8 +623,22 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { + const Ids = this.ids; + + if(Ids.length==0) + { this.download('family/property/export', { ...this.queryParams + }, `property_${new Date().getTime()}.xlsx`) + }else{ + this.download('family/property/export1/'+Ids, { + ...this.queryParams + }, `property_${new Date().getTime()}.xlsx`) + } + }, + handleExportTemplate(){ + this.download('family/property/model', { + }, `property_${new Date().getTime()}.xlsx`) }, /** 瀵煎叆鎿嶄綔*/ @@ -622,7 +647,7 @@ var formData = new FormData(); formData.append('excelImport', file); let _this = this - alert(file) + enload(formData).then(response => { _this.getList(); Message({ message: "瀵煎叆鎴愬姛", type: 'warning' }) -- Gitblit v1.9.1