|
@@ -8,8 +8,14 @@
|
|
|
>
|
|
|
文件入口配置
|
|
|
</el-button>
|
|
|
- <hc-data-tree :h-props="rightprops" :datas="rightData" tree-key="id">
|
|
|
- </hc-data-tree>
|
|
|
+ <el-scrollbar v-loading="rightLoad" style="width: 80%">
|
|
|
+ <hc-data-tree
|
|
|
+ :h-props="rightprops"
|
|
|
+ :datas="rightData"
|
|
|
+ tree-key="id"
|
|
|
+ >
|
|
|
+ </hc-data-tree>
|
|
|
+ </el-scrollbar>
|
|
|
</div>
|
|
|
|
|
|
<!-- 上传文件入口配置 -->
|
|
@@ -20,7 +26,7 @@
|
|
|
v-model="pushfileTap"
|
|
|
@close="pushFileClose"
|
|
|
>
|
|
|
- <div style="width: 100%; overflow-x: auto">
|
|
|
+ <el-scrollbar v-loading="dialogLoad">
|
|
|
<hc-data-tree
|
|
|
:h-props="dialogProps"
|
|
|
show-checkbox
|
|
@@ -29,7 +35,7 @@
|
|
|
ref="entryTreeRef"
|
|
|
>
|
|
|
</hc-data-tree>
|
|
|
- </div>
|
|
|
+ </el-scrollbar>
|
|
|
<template #footer>
|
|
|
<el-button @click="pushfileTap = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="saveFile">确 定</el-button>
|
|
@@ -50,15 +56,37 @@ const props = defineProps({
|
|
|
type: String,
|
|
|
default: "",
|
|
|
},
|
|
|
+ projectId: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
+ tabKey: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
});
|
|
|
-const rightData = ref(props.rightData);
|
|
|
+const rightData = ref([]);
|
|
|
const wbsId = ref(props.wbsId);
|
|
|
-
|
|
|
+const projectId = ref(props.projectId);
|
|
|
+const tabKey = ref(props.tabKey);
|
|
|
+const rightLoad = ref(false);
|
|
|
+const getRightData = async () => {
|
|
|
+ rightLoad.value = true;
|
|
|
+ const { data } = await archiveApi.archiveTreetree({
|
|
|
+ projectId: projectId.value,
|
|
|
+ nodeType: 2,
|
|
|
+ disPlayTree: 1,
|
|
|
+ });
|
|
|
+ rightLoad.value = false;
|
|
|
+ rightData.value = getArrValue(data);
|
|
|
+};
|
|
|
watch(
|
|
|
- () => [props.rightData, props.wbsId],
|
|
|
- ([data, wid]) => {
|
|
|
- rightData.value = data;
|
|
|
+ () => [props.wbsId, props.projectId, props.tabKey],
|
|
|
+ ([wid, pid, key]) => {
|
|
|
wbsId.value = wid;
|
|
|
+ projectId.value = pid;
|
|
|
+ tabKey.value = key;
|
|
|
+ getRightData();
|
|
|
},
|
|
|
{ immediate: true, deep: true }
|
|
|
);
|
|
@@ -67,6 +95,7 @@ const pushfileTap = ref(false);
|
|
|
watch(pushfileTap, (val) => {
|
|
|
if (val) getDialogData();
|
|
|
});
|
|
|
+
|
|
|
//数据格式
|
|
|
const rightprops = ref({ label: "title" });
|
|
|
|
|
@@ -80,10 +109,14 @@ const pushFileClose = () => {};
|
|
|
const entryTreeRef = ref(null);
|
|
|
const dialogProps = ref({ label: "title" });
|
|
|
const dialogData = ref([]);
|
|
|
+const dialogLoad = ref(false);
|
|
|
const getDialogData = async () => {
|
|
|
+ dialogLoad.value = true;
|
|
|
const { data, code } = await archiveApi.archiveTreetree({
|
|
|
- type: 2,
|
|
|
+ nodeType: 2,
|
|
|
+ projectId: projectId.value,
|
|
|
});
|
|
|
+ dialogLoad.value = false;
|
|
|
if (code == 200) {
|
|
|
dialogData.value = getArrValue(data);
|
|
|
saixuan(dialogData.value);
|
|
@@ -135,6 +168,7 @@ const saveFile = async () => {
|
|
|
});
|
|
|
|
|
|
pushfileTap.value = false;
|
|
|
+ getRightData();
|
|
|
}
|
|
|
} else {
|
|
|
window.$message({
|