From 42acfee359aba7bdc0567634d479be7600885324 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Tue, 7 May 2024 11:14:03 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E7=BB=91=E5=AE=9A=E9=9B=B6=E9=83=A8?= =?UTF-8?q?=E4=BB=B6=E8=BF=9B=E5=85=A5=E6=94=B6=E8=B5=B7=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F=EF=BC=8Curl=E4=B8=AD=E5=A2=9E=E5=8A=A0=E4=BA=86type?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=A0=B9=E6=8D=AEtype=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=81=9A=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=98=BE=E7=A4=BA=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/bindingParts/BindingParts.vue | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/views/system/bindingParts/BindingParts.vue b/src/views/system/bindingParts/BindingParts.vue index 12e9e180..4f3d240a 100644 --- a/src/views/system/bindingParts/BindingParts.vue +++ b/src/views/system/bindingParts/BindingParts.vue @@ -61,7 +61,7 @@ -
+
{{ $t('newlyAdded') }} @@ -124,6 +124,8 @@ import BingingPartsModal from './modules/BingingPartsModal' import ClauseModal from './modules/ClauseModal' import { isHasPermission } from '../../../utils/hasPermission' import { isTreeNodeHaveBind, useBindingRelationship } from '../../../api/api' +import { mapActions } from 'vuex' +import { triggerWindowResizeEvent } from '@/utils/util' export default { name: 'BindingParts', @@ -197,7 +199,32 @@ export default { disableMixinCreated: true, isCanAdd: false, // 是否可以新增 isCanUseBind: false, // 是否有使用绑定关系按钮 - isHaveBindResult: {} // 是否有绑定结果 + isHaveBindResult: {}, // 是否有绑定结果 + type: '2' // 操作类型 1是操作 2是查看 + } + }, + watch: { + type: { + immediate: true, + handler (val) { + if (val && val + '' === '2') { + // 是查看,隐藏操作栏 + this.columns = this.columns.filter(item => item.title !== this.$t('operation')) + } else { + // 是操作,显示操作栏 + if (!this.columns.find(item => item.title === this.$t('operation'))) { + this.columns.push( + { // 操作 + title: this.$t('operation'), + scopedSlots: { customRender: 'action' }, + align: 'center', + fixed: 'right', + width: 170 + } + ) + } + } + } } }, created () { @@ -213,9 +240,15 @@ export default { this.queryParam.partNo = partNo } this.loadData() + // 收起侧边栏 + this.setSidebar(false) + triggerWindowResizeEvent() + // 设置操作类型 + this.type = this.$route.query.type || '2' }, methods: { isHasPermission, + ...mapActions(['setSidebar']), /** * 判断分类树下有没有绑定关系,传入零部件分类内部码 * @param partCategoryNum 分类内部码