ZaiZai 2 years ago
parent
commit
9c0c05db7a
3 changed files with 28 additions and 2 deletions
  1. 2 2
      config/index.js
  2. 8 0
      httpApi/modules/data-fill/wbs.js
  3. 18 0
      pages/data-fill/editTable.vue

+ 2 - 2
config/index.js

@@ -13,13 +13,13 @@ export default {
     //测试环境
     testApi: {
         api: 'http://192.168.0.109:8090/',  //请求地址
-        form: 'http://192.168.0.109:5173/', //表单地址
+        form: 'http://192.168.0.131:5174/', //表单地址
         wss: 'wss://business.hcxxy.com/wss/websocket/', //长连接地址
     },
     //正式环境
     baseApi: {
         api: 'http://192.168.0.109:8090/',  //请求地址
-        form: 'http://192.168.0.109:5173/', //表单地址
+        form: 'http://192.168.0.131:5174/', //表单地址
         //api: 'http://47.110.251.215:8090/', //请求地址
         //form: 'https://user.hcxxy.com/',    //表单地址
         wss: 'wss://business.hcxxy.com/wss/websocket/', //长连接地址

+ 8 - 0
httpApi/modules/data-fill/wbs.js

@@ -113,4 +113,12 @@ export default {
             params: form,
         })
     },
+    //获取表单详情
+    async getWbsContractById(form) {
+        return httpApi({
+            url: '/api/blade-manager/wbsTreeContract/getWbsContractById',
+            method: 'post',
+            params: form,
+        })
+    },
 }

+ 18 - 0
pages/data-fill/editTable.vue

@@ -25,6 +25,7 @@ import {useAppStore} from "@/store";
 import wbsApi from '~api/data-fill/wbs';
 import {getFormApiUrl} from '@/config/envApi';
 import api from '~api/api';
+import {getObjValue} from "js-fast-way";
 
 const store = useAppStore()
 const instance = getCurrentInstance().proxy
@@ -143,7 +144,10 @@ const handleMessage = async (event) => {
         //保存成功
         if (msg.type === 'saveSuccess') {
             uni.hideLoading();
+            uni.showLoading({title: '更新数据中...', mask: true});
             await queryNodeStatus()
+            await getWbsContractById()
+            uni.hideLoading();
             await previewClick()
         }
         //消息提示
@@ -160,6 +164,20 @@ const handleMessage = async (event) => {
     }
 }
 
+//获取数据详情
+const getWbsContractById = async () => {
+    const { pKeyId } = pageNode.value
+    const { data } = await wbsApi.getWbsContractById({
+        pKeyId: pKeyId,
+    })
+    //处理数据
+    const { isBussShow, isTabPdf, pdfUrl, tabFileType } = getObjValue(data)
+    pageNode.value.isBussShow = isBussShow
+    pageNode.value.isTabPdf = isTabPdf
+    pageNode.value.pdfUrl = pdfUrl
+    pageNode.value.tabFileType = tabFileType
+}
+
 //当前节点状态, 1 未填报,2待上报,3已上报
 const queryNodeStatus = async () => {
     const {classify, treeId, status} = pageNode.value