From f31d6505363fa191fb715976826369484c26cf16 Mon Sep 17 00:00:00 2001 From: dangsn <dangsn@chicecm.com> Date: 星期二, 03 十二月 2024 12:05:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue b/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue index b0427c1..5b51340 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue @@ -2,7 +2,7 @@ <!--鏂囦粨绠$悊椤甸潰--> <basic-container> <avue-crud - ref="logCrud" + ref="crud" v-model="form" :data="tableData" :option="option" @@ -11,6 +11,8 @@ @row-save="rowSaveHandler" @row-update="rowUpdateHandler" @row-del="rowDeleteHandler" + @row-click="rowClickHandler" + @selection-change="selectionChange" > <template slot="menuLeft" slot-scope="scope"> <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button> @@ -109,6 +111,16 @@ leftRoleData: [], // 鍒嗛厤鎴愬憳绌挎妗嗗乏渚у垵濮嬫暟鎹� rightRoleData: [], // 鍒嗛厤鎴愬憳绌挎妗嗗彸渚у垵濮嬫暟鎹� transferTitle: ['鏂囦欢鏌滃鎴愬憳', '鏂囦欢鏌滃唴鎴愬憳'], + selectionList: [], + } + }, + computed: { + ids() { + let ids = []; + this.selectionList.forEach(ele => { + ids.push(ele.id); + }); + return ids.join(","); } }, methods: { @@ -173,8 +185,15 @@ }, // 瀵煎嚭 exportClickHandler() { + if(this.ids == null || this.ids == ""){ + this.$message({ + type: 'warning', + message: '璇峰嬀閫夎瀵煎嚭鐨勬暟鎹�!' + }); + return; + } const loading = this.$loading({}); - exportPvolumes().then(res => { + exportPvolumes({"pvolumeIds": this.ids}).then(res => { func.downloadFileByBlobHandler(res); this.createdLoading = false this.$message.success('瀵煎嚭鎴愬姛'); @@ -214,6 +233,21 @@ this.getTableList(); }) }, + //閫夋嫨鐨勮 + selectionChange(list) { + this.selectionList = list; + }, + + // 琛屽崟閫� + rowClickHandler(row) { + func.rowClickHandler( + row, + this.$refs.crud, + this.lastIndex, + (newIndex) => { this.lastIndex = newIndex; }, + () => { this.selectionList = []; } + ); + }, } } </script> -- Gitblit v1.9.3