From 3c6bdb6f439ff7af04765259fd6a91b6d201d095 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期四, 19 六月 2025 17:12:25 +0800 Subject: [PATCH] 工单,数据中心用户查看数据的权限,合同考核每日,以及导出每日和按月 --- src/components/RightToolbar/index.vue | 40 ++++++++++++++++++++++------------------ 1 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue index 8a1b609..02213b4 100644 --- a/src/components/RightToolbar/index.vue +++ b/src/components/RightToolbar/index.vue @@ -7,14 +7,14 @@ <el-tooltip class="item" effect="dark" content="鍒锋柊" placement="top"> <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" /> </el-tooltip> - <el-tooltip class="item" effect="dark" content="鑷畾涔夊垪" placement="top"> + <el-tooltip v-show="$route.path.includes('point')" class="item" effect="dark" content="鑷畾涔夊垪" placement="top"> <el-button size="mini" circle icon="el-icon-collection-tag" @click="addDynamicColumn()" /> </el-tooltip> <el-tooltip class="item" effect="dark" content="鏄鹃殣鍒�" placement="top" v-if="columns"> <el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" v-if="showColumnsType == 'transfer'"/> <el-dropdown trigger="click" :hide-on-click="false" style="padding-left: 12px" v-if="showColumnsType == 'checkbox'"> <el-button size="mini" circle icon="el-icon-menu" /> - <el-dropdown-menu slot="dropdown"> + <el-dropdown-menu slot="dropdown" style="max-height: 650px;overflow-y: auto"> <template v-for="item in columns"> <el-dropdown-item :key="item.key"> <el-checkbox :checked="item.visible" @change="checkboxChange($event, item.label)" :label="item.label" /> @@ -77,6 +77,7 @@ title: "鏄剧ず/闅愯棌", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, + tableKey: 0, }; }, props: { @@ -115,7 +116,9 @@ } }, created() { - this.getDyColumn() + if (this.$route.path.includes("point")) { + this.getDyColumn() + } if (this.showColumnsType == 'transfer') { // 鏄鹃殣鍒楀垵濮嬮粯璁ら殣钘忓垪 for (let item in this.columns) { @@ -127,22 +130,22 @@ }, methods: { getDyColumn() { - if (this.$route.path.concat("equipment")) { - // 鏌ヨ鍔ㄦ�佸垪 - let params = { - tableName: 't_monitor' - } - getDynamicColumnList(params).then(res => { - this.dynamicColumnList = res.data - }) + // 鏌ヨ鍔ㄦ�佸垪 + let params = { + tableName: 't_yw_point' } + getDynamicColumnList(params).then(res => { + this.dynamicColumnList = res.data + }) }, addDynamicColumn() { + this.getDyColumn() this.showDynamicColumn = true }, saveColumns() { editDynamicColumn(this.dynamicColumnList).then(res => { this.$message.success("淇濆瓨鎴愬姛") + this.$emit('refreshHeader'); this.showDynamicColumn = false }) }, @@ -153,14 +156,15 @@ }) }, delColumn(id, index) { - if (! id) { - this.dynamicColumnList.splice(index, 1) - return + if(id) { + deleteDynamicColumnById(id).then(res => { + this.$message.success("鍒犻櫎鎴愬姛") + this.getDyColumn(); + this.$emit('refreshHeader'); + }) + }else { + this.dynamicColumnList.splice(index,1) } - deleteDynamicColumnById(id).then(res => { - this.$message.success("鍒犻櫎鎴愬姛") - this.getDyColumn(); - }) }, dynamicColumnClose() { this.showDynamicColumn = false -- Gitblit v1.8.0