|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <hc-body :loading="treeLoading" :project-nmae="projectInfo?.name" class="hc-file-collection-page" split>
|
|
|
|
|
|
+ <hc-body :loading="!isAppLoading" :project-nmae="projectInfo?.name" class="hc-file-collection-page" split>
|
|
<template #tree>
|
|
<template #tree>
|
|
<HcTree
|
|
<HcTree
|
|
ref="treeRef" :auto-expand-keys="treeAutoExpandKeys" :contract-id="contractId" :menus="ElTreeMenu"
|
|
ref="treeRef" :auto-expand-keys="treeAutoExpandKeys" :contract-id="contractId" :menus="ElTreeMenu"
|
|
@@ -409,7 +409,7 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
-import { nextTick, onMounted, ref, watch } from 'vue'
|
|
|
|
|
|
+import { computed, nextTick, onMounted, ref, watch } from 'vue'
|
|
import HcTree from '~src/components/tree/hc-tree.vue'
|
|
import HcTree from '~src/components/tree/hc-tree.vue'
|
|
import HcReport from './components/HcReport.vue'
|
|
import HcReport from './components/HcReport.vue'
|
|
import notableform from '~src/assets/view/notableform.svg'
|
|
import notableform from '~src/assets/view/notableform.svg'
|
|
@@ -442,10 +442,33 @@ watch(() => [
|
|
isCollapse.value = Collapse
|
|
isCollapse.value = Collapse
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+//监听
|
|
|
|
+watch(() => [useAppState.getProjectId, useAppState.getContractId, useAppState.getProjectInfo], ([pid, cid, info]) => {
|
|
|
|
+ projectId.value = pid
|
|
|
|
+ contractId.value = cid
|
|
|
|
+ projectInfo.value = info
|
|
|
|
+}, { deep: true })
|
|
|
|
+
|
|
|
|
+//加载中
|
|
|
|
+const isAppLoading = computed(() => {
|
|
|
|
+ return !isNullES(projectId.value) && !isNullES(contractId.value)
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//监听变化
|
|
|
|
+watch(() => isAppLoading.value, (val) => {
|
|
|
|
+ if (val) {
|
|
|
|
+ treeLoading.value = true
|
|
|
|
+ setTableColumns()
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+
|
|
//渲染完成
|
|
//渲染完成
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- treeLoading.value = true
|
|
|
|
- setTableColumns()
|
|
|
|
|
|
+ if (isAppLoading.value) {
|
|
|
|
+ treeLoading.value = true
|
|
|
|
+ setTableColumns()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|