duy 1 anno fa
parent
commit
7aa704c9de
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      src/views/patrol/add.vue

+ 5 - 2
src/views/patrol/add.vue

@@ -274,6 +274,7 @@ const routerQuery = useRoutes?.query
 const type = ref(routerQuery?.type || 'add')
 const id = ref(routerQuery?.id || '')
 const projectId = ref(useAppState.getProjectId)
+const contractInfo = ref(useAppState.getContractInfo)
 const contractId = ref(useAppState.getContractId)
 const addFormRef = ref(null)
 const addForm = ref({})
@@ -640,6 +641,8 @@ const wbsElTreeClick = ({ node, data, keys })=>{
     console.log(keys, 'keys')
     TreeAutoExpandKeys.value = keys || []
 }
+const { contractType } = contractInfo.value
+const classType = ref(contractType === 2 ? '2' : '1')
 //懒加载的数据
 const treeLoadNode = async ({ node, item, level }, resolve) => {
     let contractIdRelation = '', parentId = '', primaryKeyId = ''
@@ -656,8 +659,8 @@ const treeLoadNode = async ({ node, item, level }, resolve) => {
         primaryKeyId,
         parentId,
         // classifyType: contractTypeTabKey.value,
-         classifyType:1,
-         tableOwner:1,
+         classifyType:classType.value,
+         tableOwner:classType.value,
 
     })
     resolve(getArrValue(data))