Browse Source

Merge remote-tracking branch 'origin/master'

ZaiZai 1 year ago
parent
commit
554e5f6be0
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/views/project/debit/contract/components/unit/row-data.vue

+ 9 - 1
src/views/project/debit/contract/components/unit/row-data.vue

@@ -215,7 +215,8 @@ watch(() => props.curTreeData, (cur) => {
     curTreeData.value = cur
     formModel.value = cur
     formModel.value .isSupplementNmae = cur.isSupplement === 1 ? '是' : '否'
-    tableData.value = cur.decompositionList
+    
+    // tableData.value = cur.decompositionList
     if (cur.id) {
         getNodeType(cur.id)
     }
@@ -223,6 +224,12 @@ watch(() => props.curTreeData, (cur) => {
     immediate: true,
     deep: true,
 })
+watch(() => props.ids, (id) => {
+    tableData.value = props.curTreeData.decompositionList
+}, {
+    immediate: true,
+    deep: true,
+})
 
 /*watch(tableData, (val) => {
     if (val) {
@@ -314,6 +321,7 @@ const modalSave = async () => {
         return
     }
     addNodeLoading.value = true
+    formModel.value.decompositionList = tableData.value
     const { error, code, msg } = await unitApi.updateForm({
         ...formModel.value,
     })