浏览代码

创建项目

ZaiZai 10 月之前
父节点
当前提交
07b42afed3
共有 1 个文件被更改,包括 24 次插入1 次删除
  1. 24 1
      src/views/project/info/template.vue

+ 24 - 1
src/views/project/info/template.vue

@@ -408,8 +408,31 @@ const getIds = (ids, data) => {
     }
 }
 
-const setCheckTreeChange = () => {
+//格式化wbsid
+const formatWbsId = (rid) => {
+    let refId = rid
+    if (isNullES(refId)) {
+        return refId
+    }
+    if (referenceWbsType.value === 'private' && refId.toString().length > 0) {
+        // 私有库右边树形数据是通过 pkeyId 查询的
+        let ids = refId.toString().split(',')
+        if (ids.length > 1) {
+            refId = ids[0]
+            let list = wbsTreeList.value[1].data
+            refId = list.filter(({ projectId }) => projectId === ids[1])[0].pkeyId
+            return refId
+        } else {
+            return ''
+        }
+    } else {
+        return refId
+    }
+}
 
+const setCheckTreeChange = () => {
+    let recordId = formatWbsId(wbsId.value)
+    console.log(recordId)
 }
 </script>