diff --git a/src/views/system/LogList.vue b/src/views/system/LogList.vue index 4e0a8dd..1f5c06d 100644 --- a/src/views/system/LogList.vue +++ b/src/views/system/LogList.vue @@ -14,16 +14,15 @@
- - + - - + - + - - + 查询 - 重置 @@ -56,7 +54,7 @@ size="middle" bordered rowKey="id" - :columns="columns" + :columns="newColumns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" @@ -67,7 +65,7 @@ - + @@ -171,9 +169,13 @@ export default { }, url: { list: '/sys/log/page' - } + }, + newColumns:[], } }, + created() { + this.newColumns = [...this.columns] + }, methods: { getQueryParams() { var param = Object.assign({}, this.lastQueryParam, this.isorter, { logType: this.tabKey }) @@ -199,16 +201,17 @@ export default { }, // 日志类型 callback(key) { - + this.newColumns = [...this.columns] + this.tabKey = key // 动态添加操作类型列 if (key == 2) { this.tabKey = '2' - this.columns.splice(7, 0, this.operateColumn) + this.newColumns.splice(7, 0, this.operateColumn) } else if (this.columns.length == 9) { this.tabKey = '1' - this.columns.splice(7, 1) + this.newColumns.splice(7, 1) } - + console.log(this.tabKey,'this.tabKey') let that = this that.queryParam = {} that.queryParam.logType = key @@ -226,6 +229,6 @@ export default { } } -