From 4278b5f15702bc8e05d090bf8852fafe20608fc8 Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期六, 15 七月 2023 17:05:37 +0800 Subject: [PATCH] 新增功能点击保存后清空窗口内数据(以实现的模块:收藏和荣誉、家庭小医生、通讯录、成长经历阅历除自传部分、百年心愿) --- ruoyi-ui/src/views/bignote/index.vue | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 37 insertions(+), 14 deletions(-) diff --git a/ruoyi-ui/src/views/bignote/index.vue b/ruoyi-ui/src/views/bignote/index.vue index 1069a64..7f99517 100644 --- a/ruoyi-ui/src/views/bignote/index.vue +++ b/ruoyi-ui/src/views/bignote/index.vue @@ -72,14 +72,14 @@ </el-form> - <div style="width: 72px; -height: 24px; -font-size: 18px; -font-family: Microsoft YaHei-Regular, Microsoft YaHei; -font-weight: 400; -color: #000000; -line-height: 21px; -">瀹跺ぇ浜嬭</div> +<!-- <div style="width: 72px;--> +<!--height: 24px;--> +<!--font-size: 18px;--> +<!--font-family: Microsoft YaHei-Regular, Microsoft YaHei;--> +<!--font-weight: 400;--> +<!--color: #000000;--> +<!--line-height: 21px;--> +<!--">瀹跺ぇ浜嬭</div>--> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button @@ -120,7 +120,7 @@ plain icon="el-icon-download" size="mini" - @click="handleExport" + @click="handleExportTemplate" v-hasPermi="['family:note:export']" >瀵煎叆妯℃澘涓嬭浇</el-button> </el-col> @@ -144,8 +144,8 @@ </el-row> <!-- 搴忓彿銆佹椂闂淬�佷汉鐗┿�佸湴鐐广�佸ぇ浜嬫爣棰樸�佺數瀛愭枃浠躲�佸娉� --> <!-- 杩欓噷鏈変釜familyList鏁扮粍 鏄湪data()涓畾涔夌殑 --> - <el-table v-loading="loading" :data="familyList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> - <el-table-column type="selection" width="55" align="center" /> + <el-table v-loading="loading" :data="familyList" :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 label="鍙戠敓鏃堕棿" prop="happenTime" sortable width="100" align="center"> @@ -162,6 +162,7 @@ <!-- <el-table-column label="瀹跺涵鍙�" prop="familyId" sortable width="100" /> --> <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" @@ -177,7 +178,7 @@ style="width: 35px; height: 35px;" fit="cover" v-if="scope.row.url === null" - > + ></div> </template> </el-table-column> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> @@ -443,7 +444,10 @@ this.open = false; this.reset(); }, - + getRowId(row) + { + return row.id + }, //闅旇鍙樿壊 tableRowClassName({ row, rowIndex }) { if (rowIndex % 2 == 0) { @@ -523,7 +527,7 @@ // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) - console.log(this.ids) + // alert(this.ids) this.single = selection.length!=1 this.multiple = !selection.length }, @@ -606,17 +610,35 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const Ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫変腑鏁版嵁椤癸紵').then(function() { return delFamilyevent(Ids); }).then(() => { this.getList(); + this.ids = [] this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); }).catch(() => {}); }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { + const Ids = this.ids; + + if(Ids.length==0) + { this.download('/family/zfEvent/export', { ...this.queryParams + }, `zfEvent_${new Date().getTime()}.xlsx`) + } + else{ + this.download('/family/zfEvent/export1/'+Ids, { + }, `zfEvent_${new Date().getTime()}.xlsx`) + } + }, + /** 瀵煎叆妯℃澘涓嬭浇鎿嶄綔*/ + handleExportTemplate() + { + this.download('/family/zfEvent/model', { + }, `zfEvent_${new Date().getTime()}.xlsx`) }, /** 瀵煎叆鎿嶄綔*/ @@ -635,6 +657,7 @@ } } + } }; </script> -- Gitblit v1.9.1