ZaiZai 1 年之前
父节点
当前提交
f5bc32ac42

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20240827155010"
+  "value": "20240903144457"
 }

+ 8 - 0
src/api/modules/tentative/detect/test.js

@@ -9,6 +9,14 @@ export default {
             data: form,
         })
     },
+    //自检记录详情接口
+    async trialSelfInById(id) {
+        return HcApi({
+            url: '/api/blade-business/detection/self/trialSelfInById',
+            method: 'post',
+            params: { id },
+        })
+    },
     //自检记录附件列表
     async ancillaryDocumentsList(form) {
         return HcApi({

+ 2 - 2
src/config/index.json

@@ -1,8 +1,8 @@
 {
     "version": "20230607160059",
     "target1": "http://127.0.0.1:8090",
-    "target2": "http://39.108.216.210:8090",
-    "target": "http://192.168.0.125:8090",
+    "target": "http://39.108.216.210:8090",
+    "target3": "http://192.168.0.125:8090",
     "target4": "http://183.247.216.148:28090",
     "socket1": "wss://measure.hczcxx.cn/websocket",
     "socket": "ws://192.168.0.125:9527/websocket",

+ 2 - 1
src/views/tentative/detect/components/ListItem.vue

@@ -309,7 +309,7 @@ const props = defineProps({
     },
 })
 //事件
-const emit = defineEmits(['renew', 'offsetTop', 'updeviceUseIds', 'upcheckTableId', 'changesdate', 'chageorinData', 'changeIscanclick', 'changesingSaveId', 'getList'])
+const emit = defineEmits(['renew', 'newId', 'offsetTop', 'updeviceUseIds', 'upcheckTableId', 'changesdate', 'chageorinData', 'changeIscanclick', 'changesingSaveId', 'getList'])
 const useRoutes = useRoute()
 //路由参数
 const routerQuery = useRoutes?.query
@@ -812,6 +812,7 @@ const saveExcelBussData = async (item, index, showTip = true) => {
         if (!error && code === 200) {
             if (showTip) window?.$message?.success('保存成功')
             newaddId.value = data
+            emit('newId', data)
             return true
         } else {
             window.$message.error(msg)

+ 31 - 3
src/views/tentative/detect/test-form.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="hc-page-box">
+    <div v-loading="isPageLoading" class="hc-page-box">
         <HcTabCard
             :tabs="authBtnTabdata" :tab-key="authBtnTabKey"
             :disabled="router.currentRoute.value.query?.id && router.currentRoute.value.query?.id.length > 0 || newId?.length > 0"
@@ -101,6 +101,7 @@
                     @upcheck-table-id="upcheckTableId"
                     @updevice-use-ids="updeviceUseIds"
                     @get-list="searchNodeAllTable1"
+                    @new-id="listItemNewId"
                 />
             </el-scrollbar>
             <hc-empty v-else v-loading="isLoadList" title="暂无表单" />
@@ -1246,7 +1247,6 @@ const tableFormSaveClick = async () => {
                         await getSearchNodeTablesall(1)
                         await getSearchNodeTablesall(2)
                         await queryNodeStatus(data)
-
                     } else {
                         listItemBaseData.value.id = data
 
@@ -1255,7 +1255,7 @@ const tableFormSaveClick = async () => {
                         await getSearchNodeTablesall(1)
                         await getSearchNodeTablesall(2)
                         await queryNodeStatus(data)
-
+                        await listItemNewId(data)
                         afterAdd.value = true
                         isaddType = false
                     }
@@ -1289,6 +1289,34 @@ const tableFormSaveClick = async () => {
     }
 }
 
+//新的id
+const isPageLoading = ref(false)
+const listItemNewId = async (id) => {
+    if (!isaddType || isNullES(id)) return
+    isPageLoading.value = true
+    const { code, data, msg } = await dataApi.trialSelfInById(id)
+    if (code !== 200) {
+        window.$message?.error(msg || '操作失败')
+        isPageLoading.value = false
+        toBackClick()
+        return
+    }
+    setStoreValue('test-form', getObjValue(data))
+    setTimeout(() => {
+        isPageLoading.value = false
+        router.push({
+            path: '/tentative/detect/test-form',
+            query: {
+                id: id,
+                nodeId: nodeId,
+                dataType: dataType,
+                tabTypeKey: '1',
+                cid: currentCid,
+            },
+        })
+    }, 2000)
+}
+
 const setAllListData = (curform) => {
     if (curform) {
         curform.forEach((item) => {

+ 1 - 0
src/views/tentative/detect/test.vue

@@ -546,6 +546,7 @@ const tableSelection = (rows) => {
 //新增
 const addFormModalClick = () => {
     delStoreValue('test-form')
+    setStoreValue('prenodeDataInfo', nodeDataInfo.value)
     router.push({
         path: '/tentative/detect/test-form',
         query: {