ZaiZai há 1 ano atrás
pai
commit
5ac9260b21

+ 8 - 0
src/api/modules/tentative/material/testSample.js

@@ -25,4 +25,12 @@ export default {
             data: form,
         }, msg)
     },
+    //详情
+    async detail(id, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/detection/self/detail',
+            method: 'get',
+            params: { id },
+        }, msg)
+    },
 }

+ 2 - 2
src/views/tentative/detect/test-form.vue

@@ -201,14 +201,14 @@
 </template>
 
 <script setup>
-import { nextTick, onMounted, ref, watch } from 'vue'
+import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { useRoute, useRouter } from 'vue-router'
 import ListItem from './components/ListItem.vue'
 import dataApi from '~api/tentative/detect/test'
 import samplingApi from '~api/tentative/material/sampling'
 import divisionApi from '~api/data-fill/division'
-import { getStoreValue, setStoreValue } from '~src/utils/storage'
+import { delStoreValue, getStoreValue, setStoreValue } from '~src/utils/storage'
 import TestTree from '../material/components/TestTree.vue'
 import TestTreeMaterial from '../material/components/TestTreeMaterial.vue'
 import LinkAssociation from './components/linkAssociation.vue'

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

@@ -542,7 +542,6 @@ const addFormModalClick = () => {
 const tableRowEdit = (row, tabTypeKey) => {
     setStoreValue('test-form', row)
     setStoreValue('prenodeDataInfo', nodeDataInfo.value)
-    console.log(JSON.stringify(nodeDataInfo.value), 'JSON.stringify(nodeDataInfo.value)')
     router.push({
         path: '/tentative/detect/test-form',
         query: {

+ 17 - 7
src/views/tentative/material/modules/testSample/testUnder.vue

@@ -72,6 +72,7 @@ import { HcDelMsg } from 'hc-vue3-ui'
 import router from '~src/router/index'
 import { useAppStore } from '~src/store'
 import { getErtractInfo } from '~api/other'
+import { delStoreValue, setStoreValue } from '~uti/storage'
 import { arrToId, formValidate, getArrValue, getObjValue, isNullES } from 'js-fast-way'
 import mainApi from '~api/tentative/material/testSample'
 
@@ -91,6 +92,9 @@ const contractInfo = ref(store.getContractInfo)
 
 //渲染完成
 onMounted(() => {
+    delStoreValue('test-form')
+    delStoreValue('testTreeItem')
+    delStoreValue('prenodeDataInfo')
     getContractData()
 })
 
@@ -294,17 +298,23 @@ const sampleRemoveApi = async (ids) => {
 }
 
 //填写报告
-const fillReportClick = ({ id, testId }) => {
-    const { contractType } = contractInfo.value
-    const { primaryKeyId } = treeInfo.value
-    router.push({
+const fillReportClick = async ({ id, testId }) => {
+    //const { contractType } = contractInfo.value
+    //const { primaryKeyId } = treeInfo.value
+    await mainApi.detail(testId)
+
+    /*setStoreValue('test-form', row)
+    setStoreValue('testTreeItem', treeInfo.value)
+    setStoreValue('prenodeDataInfo', treeInfo.value)*/
+    /*router.push({
         path: '/tentative/detect/test-form',
         query: {
             id: testId,
-            nodeId: primaryKeyId || '',
-            dataType: contractType > 0 ? contractType + '' : '1',
+            nodeId: nodeId,
+            dataType: type,
             commissionId: id,
+            tabTypeKey: 1
         },
-    })
+    })*/
 }
 </script>