Prechádzať zdrojové kódy

fix:调整文件分类添加逻辑

liujiayin 2 rokov pred
rodič
commit
bbd06613b1
1 zmenil súbory, kde vykonal 15 pridanie a 6 odobranie
  1. 15 6
      src/views/platform/cat/type/manage.vue

+ 15 - 6
src/views/platform/cat/type/manage.vue

@@ -87,8 +87,10 @@ export default {
     },
     },
     mixins: [FixHeight],
     mixins: [FixHeight],
     data () {
     data () {
+        const {first,second}  = this.$store.getters.level
         return {
         return {
             width: 200,
             width: 200,
+            diDian :second ? second : first,
             height: document.clientHeight,
             height: document.clientHeight,
             importFormVisible: false,
             importFormVisible: false,
             sortFormVisible: false,
             sortFormVisible: false,
@@ -175,9 +177,8 @@ export default {
             let whereParams = {
             let whereParams = {
                 'categoryKey': this.categoryKey
                 'categoryKey': this.categoryKey
             }
             }
-            const {first,second}  = this.$store.getters.level
             if(this.categoryKey=='FILE_TYPE'){
             if(this.categoryKey=='FILE_TYPE'){
-                whereParams.diDian = second?second:first
+                whereParams.diDian = this.diDian
             }
             }
             findTreeData(whereParams).then(response => {
             findTreeData(whereParams).then(response => {
                 const data = response.data
                 const data = response.data
@@ -199,6 +200,14 @@ export default {
                         return
                         return
                     }
                     }
                     this.editId = null
                     this.editId = null
+                    if(data.sn == 0 && data.name == "文件分类"){
+                        const object = {
+                            diDian:this.diDian,
+                            buMen:"",
+                            chaYue:"公用查阅"
+                        }
+                        data.authorityName = JSON.stringify(object)
+                    }
                     this.nodeData = data
                     this.nodeData = data
                     this.isPrivate = false
                     this.isPrivate = false
                     this.handTreeEdit()
                     this.handTreeEdit()
@@ -297,10 +306,10 @@ export default {
         },
         },
         isSpecial (name,type) {
         isSpecial (name,type) {
             const fileType = ['内部文件', '外部文件', '记录表单']
             const fileType = ['内部文件', '外部文件', '记录表单']
-            if (this.categoryKey === 'FILE_TYPE' && name=='文件分类' && type == '0') {
-                ActionUtils.warning('请不要操作文件分类!!如果需要更改,请联系管理员。')
-                return true
-            }
+            // if (this.categoryKey === 'FILE_TYPE' && name=='文件分类' && type == '0') {
+            //     ActionUtils.warning('请不要操作文件分类!!如果需要更改,请联系管理员。')
+            //     return true
+            // }
             if (this.categoryKey === 'FILE_TYPE' && fileType.includes(name) && type == '1') {
             if (this.categoryKey === 'FILE_TYPE' && fileType.includes(name) && type == '1') {
                 ActionUtils.warning('请不要操作内部文件、外部文件、记录表单分类!!如果需要更改,请联系管理员。')
                 ActionUtils.warning('请不要操作内部文件、外部文件、记录表单分类!!如果需要更改,请联系管理员。')
                 return true
                 return true