From 53332ecb2d4126c7dc871036cdaeea3896efd30f Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 22 七月 2024 16:11:48 +0800 Subject: [PATCH] 调整页面刷新重定向404问题 --- Source/plt-web/plt-web-ui/src/views/system/role/index.vue | 43 +++++++++++++++++++++++++++++-------------- 1 files changed, 29 insertions(+), 14 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/system/role/index.vue b/Source/plt-web/plt-web-ui/src/views/system/role/index.vue index 19ec3c8..06c3d4a 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/role/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/role/index.vue @@ -40,7 +40,6 @@ <el-dialog v-dialogDrag v-loading="statisticsLoading" - :destroy-on-close="true" :visible.sync="statisticsVisible" append-to-body="true" class="avue-dialog" @@ -61,7 +60,7 @@ </el-dialog> <!-- 瀵煎叆瑙掕壊 --> - <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" @updata="getTableList" title="瀵煎叆瑙掕壊"></upload-file> + <upload-file ref="upload" :tipList="tipList" :fileType="upFileType" :fileUrl="fileUrl" @updata="getTableList" title="瀵煎叆瑙掕壊"></upload-file> </basic-container> </template> @@ -132,11 +131,13 @@ label: '瑙掕壊', prop: 'pkPersonName', sortable: true, + overHidden: true, }, ] }, upFileType: ['xls', 'xlsx'], fileUrl: 'api/roleQueryController/importRole', + tipList:["瑙掕壊瀵煎叆鍙湁 鍚嶇О 鍜� 鎻忚堪 涓ゅ垪锛屼笖鍚嶇О涓哄繀杈撻」涓嶈兘涓虹┖"] } }, methods: { @@ -177,30 +178,34 @@ }, // 娣诲姞 - rowSaveHandler(row, done) { + rowSaveHandler(row, done,loading) { delete row.roleClassifyText; addRole(row).then(res => { console.log(res) if (res.data.code === 200) { this.$message.success(res.data.obj); this.getTableList(); + done(); } + }).catch(err =>{ + console.log(err); + loading(); }) - done(); }, // 缂栬緫 - rowUpdateHandler(row, index, done) { + rowUpdateHandler(row, index, done,loading) { delete row.roleClassifyText; updateRole(row).then(res => { if (res.data.code === 200) { this.$message.success(res.data.obj); this.getTableList(); + done(); } }).catch(err => { + loading(); console.log(err); }); - done() }, // 鍒犻櫎 @@ -208,14 +213,24 @@ let params = { ids: row.oid } - deleteRole(params).then(res => { - if (res.data.code === 200) { - this.$message.success(res.data.obj); - this.getTableList(); - } - }).catch(err => { - console.log(err); - }) + + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎褰撳墠瑙掕壊鍚楋紵', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + deleteRole(params).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + } + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); }, // 澶氶�夊垹闄� -- Gitblit v1.9.3