ZaiZai преди 10 месеца
родител
ревизия
7df83fb24e
променени са 2 файла, в които са добавени 47 реда и са изтрити 7 реда
  1. 15 0
      src/api/other.js
  2. 32 7
      src/views/manager/projectinfo/archivetreeRule.vue

+ 15 - 0
src/api/other.js

@@ -5,3 +5,18 @@ export const getVersionJson = () => request({
     url: 'version.json?time=' + new Date().getTime(),
     method: 'get'
 });
+
+
+//获取类型
+export const getDictionary = (form) => request({
+  url: '/api/blade-system/dict/dictionary',
+  method: 'get',
+  params: form,
+})
+
+//业务字典
+export const getDictionaryBiz = (form) => request({
+  url: '/api/blade-system/dict-biz/dictionary',
+  method: 'get',
+  params: form,
+})

+ 32 - 7
src/views/manager/projectinfo/archivetreeRule.vue

@@ -511,6 +511,13 @@
                 </el-checkbox-group>
               </el-form-item>
             </template>
+            <template v-if="form.associationType==6">
+              <el-form-item label="业内资料类型" prop="contractLogTypes">
+                <el-checkbox-group v-model="form.contractLogTypes">
+                  <el-checkbox v-for="item in contractLogTypes" :label="item.dictKey">{{item.dictValue}}</el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+            </template>
           </template>
         </el-form>
       </div>
@@ -678,6 +685,7 @@ import { archiveTreeInit, lazyTree, dictionary, remove, archiveTreeSave, archive
 import {getWbsList} from "@/api/manager/wbsinfo";
 import { getToken } from '@/util/auth';
 import { roletree } from "@/api/system/role.js";
+import { getDictionaryBiz } from "@/api/other";
 // import logoVue from '../../page/index/logo.vue';
 import { getStore, setStore } from "@/util/store";
 export default {
@@ -730,6 +738,7 @@ export default {
         projectType:'',//工程类型
         storageType:'',//储存类型
         expDataType:[],//文件类型
+        contractLogTypes: []
       },
       rules: {
         nodeName: [{ required: true, message: '请输入节点名称', trigger: 'blur' }],
@@ -745,6 +754,7 @@ export default {
         projectType: [{ required: true, message: '请选择工程类型', trigger: 'change' }],
         storageType: [{ required: true, message: '请选择储存类型', trigger: 'change' }],
         expDataType: [{ required: true, message: '请选择文件类型', trigger: 'change' }],
+        contractLogType: [{ required: true, message: '请选择业内资料类型', trigger: 'change' }],
       },
       JobTypeList: [],//岗位类型枚举
       nodeTypeList: [
@@ -963,7 +973,8 @@ export default {
       defaultExpandedKeys1:[],
       expandName: this.$route.fullPath,
       curreenttid:'',
-      curreenttid1:''
+      curreenttid1:'',
+      contractLogTypes: [],
     }
   },
   computed:{
@@ -1376,6 +1387,7 @@ export default {
         projectType:'',//工程类型
         storageType:'',//储存类型
         expDataType:[],//文件类型
+        contractLogTypes: []
       }
       this.$refs.form.resetFields();
       this.form.id = ''
@@ -1426,6 +1438,7 @@ export default {
                     projectType:this.form.projectType, //工程类型
                     storageType:this.form.storageType, //储存类型
                     projectId:this.projectId,//项目id
+                    contractLogType: this.form.contractLogTypes.join(','),
                   })
                 } else {
                   this.baocun({
@@ -1441,6 +1454,7 @@ export default {
                     projectType:this.form.projectType, //工程类型
                     storageType:this.form.storageType, //储存类型
                     projectId:this.projectId,//项目id
+                    contractLogType: this.form.contractLogTypes.join(','),
                   })
                 }
               } else {
@@ -1454,6 +1468,7 @@ export default {
 
                   projectType:this.form.projectType, //工程类型
                   projectId:this.projectId,//项目id
+                  contractLogType: this.form.contractLogTypes.join(','),
                 })
               }
             } else if (this.form.nodeType == 1) {
@@ -1471,6 +1486,7 @@ export default {
                   projectType:this.form.projectType, //工程类型
                   storageType:this.form.storageType, //储存类型
                   projectId:this.projectId,//项目id
+                  contractLogType: this.form.contractLogTypes.join(','),
                 })
               } else if(this.form.associationType == 2){
                 //试验资料
@@ -1486,6 +1502,7 @@ export default {
                   projectType:this.form.projectType, //工程类型
                   storageType:this.form.storageType, //储存类型
                   projectId:this.projectId,//项目id
+                  contractLogType: this.form.contractLogTypes.join(','),
                 })
               }else {
                 this.baocun({
@@ -1499,6 +1516,7 @@ export default {
                   projectType:this.form.projectType, //工程类型
                   storageType:this.form.storageType, //储存类型
                   projectId:this.projectId,//项目id
+                  contractLogType: this.form.contractLogTypes.join(','),
                 })
               }
             }
@@ -1509,9 +1527,6 @@ export default {
           window.location.reload()
         }
       }
-
-
-
     },
     async baocun (da) {
       if (da.majorDataType) {
@@ -1846,9 +1861,17 @@ export default {
         this.synctree(data,node)
       }
     },
-
-
-
+    //获取日志类型
+    getContractLogType() {
+      getDictionaryBiz({code: 'contract_log_type'}).then(({data}) => {
+        if (data.code===200) {
+          this.contractLogTypes = data.data
+        } else {
+          this.contractLogTypes = []
+        }
+        console.log(data.data)
+      })
+    },
   },
   watch: {
     filterText (val) {
@@ -1875,6 +1898,8 @@ export default {
     this.archiveTreetree4()//全加载左侧树
 
     this.getWbsList();
+
+    this.getContractLogType()
   },
   mounted () {
     this.heights = this.$refs.container.$el.offsetHeight;