|
@@ -196,7 +196,6 @@ const addTreeClick = () => {
|
|
const keys = right.getCheckedKeys().concat(halfKeys)
|
|
const keys = right.getCheckedKeys().concat(halfKeys)
|
|
getRightTree(allTree, keys)
|
|
getRightTree(allTree, keys)
|
|
rightTreeData.value = allTree
|
|
rightTreeData.value = allTree
|
|
- setCheckTreeChange(rightTreeData.value)
|
|
|
|
} else {
|
|
} else {
|
|
//只增加右侧树没有的节点,不会覆盖右侧树多余的节点
|
|
//只增加右侧树没有的节点,不会覆盖右侧树多余的节点
|
|
let checkNodes = right.getCheckedNodes(false, true)
|
|
let checkNodes = right.getCheckedNodes(false, true)
|
|
@@ -280,7 +279,6 @@ const delTreeClick = () => {
|
|
})
|
|
})
|
|
checkLeftTreeChange()
|
|
checkLeftTreeChange()
|
|
checkRightTreeChange()
|
|
checkRightTreeChange()
|
|
- setCheckTreeChange(delNodes)
|
|
|
|
}
|
|
}
|
|
|
|
|
|
const setRightTree = () => {
|
|
const setRightTree = () => {
|
|
@@ -332,60 +330,19 @@ const getIds = async (ids, data) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-//格式化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 rightObj = ref({})
|
|
|
|
const setCheckTreeChange = () => {
|
|
const setCheckTreeChange = () => {
|
|
- /*let recordId = formatWbsId(wbsId.value)
|
|
|
|
- rightObj.value = {
|
|
|
|
- wbsId: recordId,
|
|
|
|
- data: rightTreeData.value,
|
|
|
|
- }*/
|
|
|
|
|
|
+ console.log('默认全部启用')
|
|
}
|
|
}
|
|
|
|
|
|
const getTreeObj = async () => {
|
|
const getTreeObj = async () => {
|
|
- /*const form = getObjValue(formModel.value)
|
|
|
|
|
|
+ const form = getObjValue(formModel.value)
|
|
const ids = await getTreeAllId('right')
|
|
const ids = await getTreeAllId('right')
|
|
- const wbs_id = wbsId.value
|
|
|
|
- let obj = {
|
|
|
|
- wbsId: wbs_id,
|
|
|
|
|
|
+ return {
|
|
|
|
+ wbsId: wbsId.value,
|
|
projectId: form.id,
|
|
projectId: form.id,
|
|
- //wbsType: templateType.value,
|
|
|
|
|
|
+ wbsType: '4',
|
|
wbsTreeIds: ids,
|
|
wbsTreeIds: ids,
|
|
}
|
|
}
|
|
- if (wbs_id.toString().indexOf(',') >= 0) {
|
|
|
|
- //私有库
|
|
|
|
- obj.referenceType = 'private'
|
|
|
|
- let ids = wbs_id.toString().split(',')
|
|
|
|
- obj.wbsId = ids[0]
|
|
|
|
- obj.referencePrivateWbsProjectId = ids[1]
|
|
|
|
- obj.primaryKeyId = leftTreeData.value[0].primaryKeyId
|
|
|
|
- } else {
|
|
|
|
- //公有库
|
|
|
|
- obj.referenceType = 'public'
|
|
|
|
- obj.wbsId = wbs_id
|
|
|
|
- }*/
|
|
|
|
- //return obj
|
|
|
|
}
|
|
}
|
|
|
|
|
|
defineExpose({
|
|
defineExpose({
|