zhaowei
2025-02-08 0e9500211e1a10a94dbca72e754cc5cf7eb16e3d
产品结构树:
1、调整权限配置分配部门树组件逻辑
已修改3个文件
24 ■■■■■ 文件已修改
src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/Permission/DepartPermissionTransfer.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/Permission/UserPermissionTransfer.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue
@@ -122,7 +122,7 @@
      },
      triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) {
        if (this[methodName] && tableRowInfo.attributionType === 5) this[methodName](tableRowInfo, modalTitle)
        if (this[methodName]) this[methodName](tableRowInfo, modalTitle)
      }
    }
  }
src/views/dnc/base/modules/ProductStructure/Permission/DepartPermissionTransfer.vue
@@ -75,7 +75,7 @@
        searchValue: '',
        expandedKeys: [],
        autoExpandParent: true,
        dataSource: transferDataSource
        dataSource: []
      }
    },
    watch: {
@@ -96,9 +96,11 @@
      getHasPermissionDepartByApi() {
        const that = this
        that.spinning = true
        dncApi.getHasPermissionDepartApi(this.currentTreeNodeInfo)
        that.targetKeys = []
        that.dataSource = []
        dncApi.getHasPermissionDepartApi(that.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)
          })
          .finally(() => {
            that.spinning = false
@@ -113,7 +115,7 @@
      handleSearch(direction, value) {
        if (direction === 'left') {
          let search = value
          let expandedKeys = transferDataSource
          let expandedKeys = this.dataSource
            .map(item => {
              if (item.title != null) {
                if (item.title.indexOf(search) > -1) {
@@ -222,9 +224,14 @@
      flatten(list = []) {
        list.forEach(item => {
          transferDataSource.push(item)
          if (item.children) {
            this.flatten(item.children)
          const transformedItem = {
            key: item.key,
            title: item.title,
            children: item.children
          }
          this.dataSource.push(transformedItem)
          if (transformedItem.children) {
            this.flatten(transformedItem.children)
          }
        })
      }
src/views/dnc/base/modules/ProductStructure/Permission/UserPermissionTransfer.vue
@@ -44,6 +44,7 @@
      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)