|
@@ -12,7 +12,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="hc-tree-box" v-loading="treeLoading" element-loading-text="加载中...">
|
|
<div class="hc-tree-box" v-loading="treeLoading" element-loading-text="加载中...">
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
- <HcTree :projectId="projectId" :contractId="contractId" @nodeTap="projectTreeClick" @nodeLoading="treeNodeLoading"/>
|
|
|
|
|
|
+ <HcTree :projectId="projectId" :contractId="contractId" :autoExpandKeys="treeAutoExpandKeys" @nodeTap="projectTreeClick" @nodeLoading="treeNodeLoading" @menuTap="ElTreeMenuClick"/>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
<!--左右拖动-->
|
|
<!--左右拖动-->
|
|
@@ -270,6 +270,7 @@ import {getArrValue, deepClone, downloadBlob, getObjVal} from "js-fast-way"
|
|
import tasksApi from '~api/tasks/data';
|
|
import tasksApi from '~api/tasks/data';
|
|
import ossApi from "~api/oss";
|
|
import ossApi from "~api/oss";
|
|
import archiveFileApi from "~api/archiveFile/archiveFileAuto.js";
|
|
import archiveFileApi from "~api/archiveFile/archiveFileAuto.js";
|
|
|
|
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
|
|
|
|
|
|
//变量
|
|
//变量
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
@@ -360,7 +361,10 @@ const primaryKeyId = ref('')
|
|
const isBuiltDrawing = ref(0)
|
|
const isBuiltDrawing = ref(0)
|
|
const isStorageNode = ref(0)
|
|
const isStorageNode = ref(0)
|
|
const nodeIds = ref('')
|
|
const nodeIds = ref('')
|
|
|
|
+const treeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
|
|
const projectTreeClick = ({node, data, keys, key}) => {
|
|
const projectTreeClick = ({node, data, keys, key}) => {
|
|
|
|
+ setStoreValue('wbsTreeExpandKeys', keys)
|
|
|
|
+ treeAutoExpandKeys.value = keys || []
|
|
nodeIds.value = data.id || '';
|
|
nodeIds.value = data.id || '';
|
|
isStorageNode.value = data['isStorageNode'] || 0;
|
|
isStorageNode.value = data['isStorageNode'] || 0;
|
|
|
|
|
|
@@ -372,7 +376,12 @@ const projectTreeClick = ({node, data, keys, key}) => {
|
|
|
|
|
|
getTableData()
|
|
getTableData()
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+//树菜单被点击
|
|
|
|
+const ElTreeMenuClick = async ({key, node, data, keys}) => {
|
|
|
|
+ setStoreValue('wbsTreeExpandKeys', keys)
|
|
|
|
+ treeAutoExpandKeys.value = keys || []
|
|
|
|
+
|
|
|
|
+}
|
|
//回车搜索
|
|
//回车搜索
|
|
const keyUpEvent = (e) => {
|
|
const keyUpEvent = (e) => {
|
|
if (e.key === "Enter") {
|
|
if (e.key === "Enter") {
|