From 28fcbc85bcb8be593f57cbf232968c30d31e8e86 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期二, 18 三月 2025 10:36:48 +0800 Subject: [PATCH] 1、DNC结构树页面解决因keep-alive标签缓存组件后切换路由无法正常销毁组件从而使组件内事件通过$bus重复调用的问题 2、DNC产品结构树页面工艺规程版本层级下可以导入和挂载其它文档并且展示相关属性信息 3、DNC设备结构树设备的层级由2调整到7并且调整层级影响的相关功能 --- src/views/dnc/base/modules/ProductStructure/Permission/UserPermissionTransfer.vue | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/Permission/UserPermissionTransfer.vue b/src/views/dnc/base/modules/ProductStructure/Permission/UserPermissionTransfer.vue index 4521965..8cde6f1 100644 --- a/src/views/dnc/base/modules/ProductStructure/Permission/UserPermissionTransfer.vue +++ b/src/views/dnc/base/modules/ProductStructure/Permission/UserPermissionTransfer.vue @@ -42,9 +42,18 @@ }, methods: { getHasPermissionUserByApi() { + const that = this + that.spinning = true + that.targetKeys = [] dncApi.getHasPermissionUserApi(this.currentTreeNodeInfo) .then(res => { - if (res.success) this.targetKeys = res.list.map(item => item.id) + if (res.success) { + that.targetKeys = res.list.map(item => item.id) + if (that.targetKeys.includes(that.dataSource.find(item => item.username === 'admin').id)) that.$emit('setAdminDisabled') + } + }) + .finally(() => { + that.spinning = false }) }, @@ -58,20 +67,10 @@ isAssignSonNode: isAssignSonNode ? 1 : 2, userIdArray: moveKeys } - console.log('params--------------------------', params) - console.log(targetKeys, direction, moveKeys) if (direction === 'right') { method = dncApi.assignPermissionToUser } else { method = dncApi.removePermissionFromUser - const adminId = dataSource.find(item => item.username === 'admin').id - if (moveKeys.includes(adminId)) { - $notification.warning({ - message: '娑堟伅', - description: '涓嶈兘绉婚櫎绠$悊鍛樻潈闄�' - }) - return - } } that.spinning = true method(params) @@ -81,7 +80,8 @@ message: '娑堟伅', description: res.message }) - this.targetKeys = targetKeys + that.targetKeys = targetKeys + if (targetKeys.includes(that.dataSource.find(item => item.username === 'admin').id)) that.$emit('setAdminDisabled') } else { $notification.error({ message: '娑堟伅', -- Gitblit v1.9.3