Browse Source

节点基础数据修改

duy 5 months ago
parent
commit
0c5fcbca38

+ 2 - 2
package.json

@@ -25,7 +25,7 @@
         "dayjs": "^1.11.13",
         "echarts": "^5.5.1",
         "element-plus": "^2.8.7",
-        "hc-vue3-ui": "^4.5.1",
+        "hc-vue3-ui": "^4.5.2",
         "js-base64": "^3.7.7",
         "js-fast-way": "^0.5.6",
         "js-md5": "^0.8.3",
@@ -54,6 +54,6 @@
         "unocss": "^0.58.9",
         "unocss-preset-extra": "0.5.3",
         "vite": "^5.4.10",
-          "z-element-plus": "^0.0.0-dev.1"
+        "z-element-plus": "^0.0.0-dev.1"
     }
 }

+ 11 - 0
src/api/modules/data-fill/wbs.js

@@ -488,4 +488,15 @@ export default {
             false,
         )
     },
+    //获取文件题名
+    async getDICengNodeName(form) {
+        return HcApi(
+            {
+                url: '/api/blade-business/informationWriteQuery/getDICengNodeName',
+                method: 'get',
+                params: form,
+            },
+            false,
+        )
+    },
 }

+ 3 - 0
src/views/data-fill/components/divisionDialog.vue

@@ -213,8 +213,11 @@ const addTreeNodeCheckChange = (_, { checkedNodes, checkedKeys, halfCheckedNodes
 const sureLoading = ref(false)
 const sureClick = async (type) => {
     const keys = allSelectedList.value || []
+    
+    
     if (keys.length <= 0 || leftPid.value.length <= 0) {
         window?.$message?.warning('请先选择节点')
+        return
     } else {
         //发起请求
         sureLoading.value = true

+ 28 - 7
src/views/data-fill/wbs.vue

@@ -1550,6 +1550,10 @@ const setContractType = (contractType) => {
 const getTableDataAll = async (key) => {
     await searchNodeAllTable()
     await queryNodeStatus()
+    if (isTemplateType.value) {
+        await getFileName()
+        await getnodeBaseData()
+    }
     //保存后自动展开到当前表单
     if (!isNullES(key)) {
         console.log(key)
@@ -1772,6 +1776,7 @@ const wbsElTreeClick = ({ node, data, keys }) => {
     setStoreValue('wbsTreeExpandKeys', keys)
     TreeAutoExpandKeys.value = keys || []
     saveHistory(keys.join(','))
+  
     // getTableDataAll()
 }
 //树加载完成
@@ -2790,14 +2795,24 @@ const searchNodeAllTable = async () => {
         type: authBtnTabKey.value,
     })
     ListItemDatas.value = getArrValue(data)
-    if (ListItemDatas.value?.length > 0) {
-        titleInput.value = ListItemDatas.value[0]['fileName']
-    } else {
-        titleInput.value = ''
-    }
+ 
     ListItemLoading.value = false
 }
+//获取文件题名
 
+const getFileName = async () => {
+    const info = nodeDataInfo.value
+    const { error, code, data } = await wbsApi.getDICengNodeName({
+        pKeyId: info['primaryKeyId'],
+        type: authBtnTabKey.value,
+    })
+    //判断状态
+    if (!error && code === 200) {
+        titleInput.value = data
+    } else {
+        titleInput.value = data
+    }
+}
 const newlistdata = ref([])
 const searchNodeAllTable1 = async () => {
     console.log('重新获取表单列表')
@@ -2920,7 +2935,7 @@ const tableFormSaveClick = async () => {
         console.log('保存')
         tableFormSaveLoading.value = true
         console.log('FormData', FormData)
-        const { error, code, msg } = await wbsApi.saveExcelBussData({
+        const { error, code, msg, data } = await wbsApi.saveExcelBussData({
             dataInfo: { orderList: FormData },
         })
         tableFormSaveLoading.value = false
@@ -3499,7 +3514,13 @@ const nodeBaseDataModalSave = async ()=>{
     nodeBaseDataLoad.value = false
     if (!error && code === 200) {
         window?.$message?.success(msg || '操作成功')
-        getnodeBaseData()
+        nodeBaseDataModalDialog.value = false
+        //刷新页面
+    // setTimeout(() => {
+    //     window?.location?.reload()
+    // }, 1000)
+    const activeKey = ListItemRef.value?.getActiveKey()
+    getTableDataAll(activeKey)
   
     }
 }

+ 4 - 4
yarn.lock

@@ -2109,10 +2109,10 @@ has-flag@^4.0.0:
   resolved "http://219.151.185.227:9000/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
   integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
 
-hc-vue3-ui@^4.5.1:
-  version "4.5.1"
-  resolved "http://219.151.185.227:9000/hc-vue3-ui/-/hc-vue3-ui-4.5.1.tgz#d53acf6b44674aecf074eda1bf639211be046e88"
-  integrity sha512-GdI61nMl351wid/0fFbxOn3cz4yh/yQjD+NymeukPhwsfKMCWLVmyWa5B0/9GTKg6zSDQ473p8D00RHtyysitg==
+hc-vue3-ui@^4.5.2:
+  version "4.5.2"
+  resolved "http://219.151.185.227:9000/hc-vue3-ui/-/hc-vue3-ui-4.5.2.tgz#d93eeff84e810a31e8c1e522249df5107f432325"
+  integrity sha512-JW4FAWR1XCbxAkn7LJnfzhU9mQfAt5IezU39NlM/rYefoBVSCuW7WYzqsMLeE+D6Hs9nl3ZTNZogRmWeWyjnpQ==
   dependencies:
     axios "^1.7.7"
     dayjs "^1.11.13"