duy 4 月之前
父節點
當前提交
f2f4177656
共有 1 個文件被更改,包括 23 次插入9 次删除
  1. 23 9
      src/views/data-fill/wbs.vue

+ 23 - 9
src/views/data-fill/wbs.vue

@@ -145,11 +145,11 @@
                     @change="authBtnTabClick"
                 >
                     <template #extra>
-                        <div v-if="ListItemDatas.length > 0" class="mr-1 flex items-center justify-center whitespace-nowrap">
+                        <!-- <div v-if="ListItemDatas.length > 0" class="mr-1 flex items-center justify-center whitespace-nowrap">
                             <div class="font-500">  文件题名</div>
                             <div class="title-input h-[30px] flex items-center leading-[30px]" :style="{ width: titleInput ? '' : '100px' }">{{ titleInput }}</div>
-                        </div>
-                        
+                        </div> -->
+<!--                         
                         <HcTooltip keys="node_base_data">
                             <el-button
                                 hc-btn
@@ -162,7 +162,7 @@
                             >
                                 节点基础数据
                             </el-button>
-                        </HcTooltip>
+                        </HcTooltip> -->
                         <HcTooltip keys="wbs_views_sort_btn">
                             <el-button
                                 v-if="nodeDataInfo?.nodeClass !== 2"
@@ -949,12 +949,12 @@
                     <div class="left flex items-center">
                         <div class="mr-4">选中方式:</div>
                         <el-radio-group v-model="addTreeNodeType">
-                            <el-radio value="3">当前及子节点</el-radio>
+                            <!-- <el-radio value="3">当前及子节点</el-radio> -->
                             <el-radio class="ml-4" value="2">
                                 仅当前节点
                             </el-radio>
-                            <el-radio value="1">当前及父节点</el-radio>
-                            <!-- <el-radio value="1">当前子节点</el-radio> -->
+                            <!-- <el-radio value="1">当前及父节点</el-radio> -->
+                            <el-radio value="1">当前子节点</el-radio>
                         </el-radio-group>
                     </div>
                     <div class="right">
@@ -3440,7 +3440,7 @@ const nodeBaseDataClick = async ()=>{
 const nodeBaseDataLoad = ref(false)
 const getnodeBaseData = async ()=>{
   
-    const { error, code, msg, data } = await nodeBaseApi.getOrSaveNodeBaseInfo(
+    const { error, code, msg, data } = await nodeBaseApi.getNodeData(
         {
             pKeyId: primaryKeyId.value,
         },
@@ -3452,6 +3452,20 @@ const getnodeBaseData = async ()=>{
          autoFormData.value = getObjValue(data)
     } 
 }
+const getOrSaveNodeBaseInfo = async ()=>{
+  
+  const { error, code, msg, data } = await nodeBaseApi.getOrSaveNodeBaseInfo(
+      {
+          pKeyId: primaryKeyId.value,
+      },
+  )
+
+
+  if (!error && code === 200) {
+      console.log(data, 'data')
+       autoFormData.value = getObjValue(data)
+  } 
+}
 const nodeBaseDataModalClose = ()=>{
     nodeBaseDataModalDialog.value = false
 }
@@ -3467,7 +3481,7 @@ const autoFormData = ref(
       },
 )
 const resetForm = ()=>{
-    getnodeBaseData()
+    getOrSaveNodeBaseInfo()
 }
 const nodeBaseDataModalSave = async ()=>{
     nodeBaseDataLoad.value = true