From 4b9755ecf52a4f52af892d54a2561c205d0004c1 Mon Sep 17 00:00:00 2001 From: "SERVERM-0FVHDNN\\Administrator" <942005050@qq.com> Date: Tue, 21 Mar 2023 19:02:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=AE=BE=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=87=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WZC2/fe/PC/src/components/rowDrop/index.vue | 64 +++++++++++---------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/WZC2/fe/PC/src/components/rowDrop/index.vue b/WZC2/fe/PC/src/components/rowDrop/index.vue index faaf60e78..2b8989453 100644 --- a/WZC2/fe/PC/src/components/rowDrop/index.vue +++ b/WZC2/fe/PC/src/components/rowDrop/index.vue @@ -60,7 +60,6 @@ newData: null, // checked: false, dataList: [], - dataListReset: [] } }, props: { @@ -81,39 +80,42 @@ this.formatData(this.tableColumns) }, methods: { - reset() { - this.$confirm('重置后,字段设置将恢复初始设置,是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - cancelButtonClass:'rowDropNotHideItem' - }).then(() => { - localStorage.removeItem(this.$store.getters.name.userName + '_' + this.$route.name) - this.formatData(this.$isTableColumns[this.$route.name]) - this.$emit('radio',this.$isTableColumns[this.$route.name]) - this.close() - }).catch(() => { + reset() { + this.$confirm('重置后,字段设置将恢复初始设置,是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + cancelButtonClass:'rowDropNotHideItem' + }).then(() => { + localStorage.removeItem(this.$store.getters.name.userName + '_' + this.$route.name) + let _resetCol = this.$isTableColumns[this.$route.name] + _resetCol.forEach(item => { + item.isture = true + }) + this.dataList = _resetCol + this.$emit('radio',_resetCol) + this.close() + }).catch(() => { - }); - }, - close() { - this.$emit('closeRowDrop') - }, - // save () { - // this.$emit('closeRowDrop') - // this.$emit('radio',this.dataList) - // // 本地缓存 当前用户名 + 路由名称 - // localStorage.setItem(this.$store.getters.name.userName + '_' + this.$route.name, JSON.stringify(this.dataList)) - // }, + }); + }, + close() { + this.$emit('closeRowDrop') + }, + // save () { + // this.$emit('closeRowDrop') + // this.$emit('radio',this.dataList) + // // 本地缓存 当前用户名 + 路由名称 + // localStorage.setItem(this.$store.getters.name.userName + '_' + this.$route.name, JSON.stringify(this.dataList)) + // }, // 格式化表头数据 formatData (val) { - this.dataList = JSON.parse(JSON.stringify(val)) - this.dataList.forEach(item => { - if (item.isture == undefined) { - item.isture = true - } - }) - this.dataListReset = JSON.parse(JSON.stringify(this.dataList)) + this.dataList = JSON.parse(JSON.stringify(val)) + this.dataList.forEach(item => { + if (item.isture == undefined) { + item.isture = true + } + }) }, // 拖拽事件 handleEdit(index, row) {