|
@@ -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>
|
|
|
|