ZaiZai hai 10 meses
pai
achega
23572f6adb
Modificáronse 1 ficheiros con 14 adicións e 13 borrados
  1. 14 13
      src/views/project/info/log.vue

+ 14 - 13
src/views/project/info/log.vue

@@ -51,7 +51,7 @@
 <script setup>
 import { nextTick, onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
-import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
+import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
 import mainApi from '~api/project/project'
 import treeApi from '~api/wbs/tree'
 
@@ -116,6 +116,7 @@ const getWbsTreeList = async () => {
     isLoading.value = false
     await getLeftTreeData()
     await getRightTreeApi()
+    setRightTree()
 }
 
 //左边树
@@ -136,7 +137,7 @@ const getLeftTreeData = async () => {
 
 //切换wbs树
 const isDisabled = ref(false)
-const wbsChange = (val) => {
+const wbsChange = () => {
     getLeftTreeData()
 }
 
@@ -187,7 +188,7 @@ const checkRightTreeChange = () => {
 
 //左边树新增到右边
 const addTreeClick = () => {
-    /*const left = leftTreeRef.value, right = rightTreeRef.value
+    const left = leftTreeRef.value, right = rightTreeRef.value
     if (rightTreeData.value.length < 1) {
         //直接把左边勾选的树复制到右侧
         let allTree = deepClone(leftTreeData.value)
@@ -231,7 +232,7 @@ const addTreeClick = () => {
         myright.forEach((data) => {
             right.append(data, data.parentId)
         })
-    }*/
+    }
 }
 
 //获取右边树
@@ -283,7 +284,7 @@ const delTreeClick = () => {
 }
 
 const setRightTree = () => {
-    /*let ids = []
+    let ids = []
     const data = rightTreeData.value
     for (let i = 0; i < data.length; i++) {
         getLeafIds(ids, data[i])
@@ -292,7 +293,7 @@ const setRightTree = () => {
     const e = leftTreeRef.value
     nextTick(() => {
         e.setCheckedKeys(ids, true)
-    })*/
+    })
 }
 
 const getLeafIds = (ids, data) => {
@@ -333,7 +334,7 @@ const getIds = async (ids, data) => {
 
 //格式化wbsid
 const formatWbsId = (rid) => {
-    let refId = rid
+    /*let refId = rid
     if (isNullES(refId)) {
         return refId
     }
@@ -350,16 +351,16 @@ const formatWbsId = (rid) => {
         }
     } else {
         return refId
-    }
+    }*/
 }
 
 const rightObj = ref({})
 const setCheckTreeChange = () => {
-    let recordId = formatWbsId(wbsId.value)
+    /*let recordId = formatWbsId(wbsId.value)
     rightObj.value = {
         wbsId: recordId,
         data: rightTreeData.value,
-    }
+    }*/
 }
 
 const getTreeObj = async () => {
@@ -369,7 +370,7 @@ const getTreeObj = async () => {
     let obj = {
         wbsId: wbs_id,
         projectId: form.id,
-        wbsType: templateType.value,
+        //wbsType: templateType.value,
         wbsTreeIds: ids,
     }
     if (wbs_id.toString().indexOf(',') >= 0) {
@@ -383,8 +384,8 @@ const getTreeObj = async () => {
         //公有库
         obj.referenceType = 'public'
         obj.wbsId = wbs_id
-    }
-    return obj*/
+    }*/
+    //return obj
 }
 
 defineExpose({