|
@@ -25,6 +25,7 @@ const funExcelCheckChange = ({ checkArr, data }) => { //bug
|
|
|
}
|
|
|
/**tree 开始 */
|
|
|
const treeData = ref([])
|
|
|
+const actTreeNode = ref(null)
|
|
|
const funRepeatMap = (arr) => {
|
|
|
return arr.map(o => {
|
|
|
if (o.children) {
|
|
@@ -32,6 +33,9 @@ const funRepeatMap = (arr) => {
|
|
|
if (findIndex !== -1) {
|
|
|
o.childs = o.children
|
|
|
o.children = []
|
|
|
+ if(!actTreeNode.value){ //判断当且仅有process获取tree时 赋值
|
|
|
+ actTreeNode.value = o
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
@@ -41,9 +45,14 @@ const funRepeatMap = (arr) => {
|
|
|
})
|
|
|
}
|
|
|
const funGetTree = async () => {
|
|
|
+ actTreeNode.value = null
|
|
|
+ excelCheckIds.value = []
|
|
|
const res = await request.get("/allfilelist")
|
|
|
treeData.value = funRepeatMap(res.data)
|
|
|
excelList.value = []
|
|
|
+ if(actTreeNode.value){
|
|
|
+ funCurrentChange({current: actTreeNode.value, currentNode: null})
|
|
|
+ }
|
|
|
}
|
|
|
const funCurrentChange = ({ current, currentNode }) => {
|
|
|
if (current.childs) {
|