|
@@ -87,6 +87,7 @@ watch(() => [
|
|
|
props.menuType,
|
|
|
props.templateId,
|
|
|
], ([Ids, Type, Tem]) => {
|
|
|
+ console.log(Type, 'Type')
|
|
|
ids.value = Ids
|
|
|
menuType.value = Type
|
|
|
templateId.value = Tem
|
|
@@ -124,6 +125,7 @@ const treeListClick = (item) => {
|
|
|
endStake: '',
|
|
|
contractPicture: '',
|
|
|
isAddChildNode: 1,
|
|
|
+ leftNodeId:item.id,
|
|
|
})
|
|
|
}
|
|
|
const getTreeDataList = async ()=>{
|
|
@@ -155,12 +157,12 @@ const delRowClick = (index) => {
|
|
|
const addNodeLoading = ref(false)
|
|
|
const modalSave = async () => {
|
|
|
|
|
|
- if (menuType.value === 'add') {
|
|
|
+
|
|
|
const { error, code, msg } = await unitApi.addNode({
|
|
|
contractId:contractId.value,
|
|
|
projectId:projectId.value,
|
|
|
contractNodeId:ids.value,
|
|
|
- requestType:1, //请求类型 1=节点新增 2=增补单元新增
|
|
|
+ requestType:menuType.value === 'add' ? 1 : 2, //请求类型 1=节点新增 2=增补单元新增
|
|
|
templateId: templateId.value,
|
|
|
dataList:tableData.value,
|
|
|
|
|
@@ -172,7 +174,7 @@ const modalSave = async () => {
|
|
|
|
|
|
}
|
|
|
emit('finish')
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|