Przeglądaj źródła

classfiytype动态获取

duy 2 lat temu
rodzic
commit
ac8fc5a062

+ 4 - 1
src/views/data-fill/division.vue

@@ -12,7 +12,7 @@
             </div>
             <div v-loading="treeLoading" class="hc-tree-box" element-loading-text="加载中...">
                 <el-scrollbar>
-                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :classifyType="1" :contractId="contractId"
+                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :classifyType="classifyType" :contractId="contractId"
                              :menus="ElTreeMenu"
                              :projectId="projectId"
                              :submitCounts="true" isColor ui="page-division-tree" @menuTap="ElTreeMenuClick"
@@ -380,6 +380,9 @@ const projectId = ref(useAppState.getProjectId);
 const contractId = ref(useAppState.getContractId);
 const projectInfo = ref(useAppState.getProjectInfo);
 const isCollapse = ref(useAppState.getCollapse)
+const contractInfo = ref(useAppState.getContractInfo);
+const { contractType } = contractInfo.value;
+const classifyType  = ref(contractType === 2 ? '2' : '1')
 
 //监听
 watch(() => [

+ 4 - 2
src/views/tentative/collect/test.vue

@@ -12,7 +12,7 @@
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :projectId="projectId" :contractId="contractId" isColor @nodeTap="wbsElTreeClick"/>
+                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :projectId="projectId" :contractId="contractId" isColor @nodeTap="wbsElTreeClick" :classifyType="classifyType"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
@@ -88,7 +88,9 @@ const projectId = ref(useAppState.getProjectId);
 const contractId = ref(useAppState.getContractId);
 const projectInfo = ref(useAppState.getProjectInfo);
 const isCollapse = ref(useAppState.getCollapse)
-
+const contractInfo = ref(useAppState.getContractInfo);
+const { contractType } = contractInfo.value;
+const classifyType  = ref(contractType === 2 ? '2' : '1')
 //监听
 watch(() => [
     useAppState.getCollapse