|
@@ -51,6 +51,10 @@ const props = defineProps({
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
+ wbsId:{
|
|
|
+ type: [String, Number],
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
//变量
|
|
@@ -58,6 +62,7 @@ const ElTreeRef = ref(null)
|
|
|
const projectId = ref(props.projectId)
|
|
|
const contractId = ref(props.contractId)
|
|
|
const isStrictly = ref(props.strictly)
|
|
|
+const wbsId=ref(props.wbsId)
|
|
|
const ElTreeProps = ref({label: 'title', children: 'children', isLeaf: 'notExsitChild'})
|
|
|
const isElTreeLoadNode=ref(false)
|
|
|
|
|
@@ -65,11 +70,14 @@ const isElTreeLoadNode=ref(false)
|
|
|
watch(() => [
|
|
|
props.projectId,
|
|
|
props.strictly,
|
|
|
- props.contractId
|
|
|
-], ([pid, strictly,cid]) => {
|
|
|
+ props.contractId,
|
|
|
+ props.wbsId
|
|
|
+], ([pid, strictly,cid,wid]) => {
|
|
|
projectId.value = pid
|
|
|
contractId.value = cid
|
|
|
isStrictly.value = strictly
|
|
|
+ wbsId.value=wid
|
|
|
+
|
|
|
})
|
|
|
|
|
|
//渲染完成
|
|
@@ -85,8 +93,8 @@ const ElTreeData = ref([])
|
|
|
const ElTreeLoadNode = async () => {
|
|
|
isElTreeLoadNode.value=true
|
|
|
let nodeId = props.oldId || props.nodeId || ''
|
|
|
- const {error, code, data} = await wbsApi.queryWbsTreePrivateByProjectIdAndId({
|
|
|
- id: nodeId,
|
|
|
+ const {error, code, data} = await wbsApi.queryWbsTreeContractByContractIdAndId({
|
|
|
+ wbsId: wbsId.value,
|
|
|
contractId: contractId.value,
|
|
|
projectId: projectId.value,
|
|
|
})
|