Bläddra i källkod

试验记录新增修改

duy 2 år sedan
förälder
incheckning
00968a9800

+ 19 - 5
src/views/tentative/detect/components/ListItem.vue

@@ -193,6 +193,10 @@ const props = defineProps({
     tabTypeKey:{
         type: String,
         default: () => ('')
+    },
+    nodeIdvalue:{
+        type: String,
+        default: () => ('')
     }
 })
 
@@ -206,6 +210,7 @@ const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId);
 const contractId = ref(useAppState.getContractId);
 const tabTypeKeyInfo=ref(props.tabTypeKey)
+const nodeIdvaluedata=ref(props.nodeIdvalue)
 
 //监听
 watch(() => [
@@ -221,10 +226,12 @@ watch(() => [
 watch(() => [
     props.status,
     props.baseData,
-], ([val, base]) => {
+    props.nodeIdvalue
+], ([val, base,NodeIdvalue]) => {
     //1 未填报,2待上报,3已上报
     isStatus.value = val
     baseData.value = base
+    nodeIdvaluedata.value=NodeIdvalue
 })
 
 //渲染完成
@@ -268,28 +275,33 @@ const formKeyIds = ref('')
 const CollapseChange = async (name) => {
     ActiveKey.value = name
     const names = name ? name.split('-') : []
-    console.log(names[2]);
     formData.value.forEach((changeitem)=>{
         if(changeitem.pkeyId===names[2]){
             changeitem.isCollapseLoad=true
         }
     })
+
+
     if (names.length > 0) {
         getOffsetTop(name)
         const index = names[1]
         const item = listDatas.value[index]
           emit('upcheckTableId', item.id)
         formKeyIds.value = getValString(item.pKeyId)
+        console.log(nodeIdvaluedata.value,'nodeIdvaluedata.value');
         if (!item.isTableFormRender) {
             //获取已填写的数据
             if(!isaddType){
                 await getBussDataInfo(item, index)
             }
           
-            //渲染表单
-            await getExcelHtml(item,index)
+            // //渲染表单
+            // await getExcelHtml(item,index)
         }
+        //渲染表单
+            await getExcelHtml(item,index)
     } else {
+        // await getExcelHtml(item,index)
         getOffsetTop()
         formKeyIds.value = ''
     }
@@ -298,11 +310,13 @@ const CollapseChange = async (name) => {
 //获取模板标签数据
 const formRegExpJson = ref({})
 const getExcelHtml = async (item,index) => {
+    console.log('获取模板数据');
     const pkeyIds = getValString(item.pKeyId)
     if (pkeyIds) {
         const { id } = baseData.value
+        console.log(nodeIdvaluedata.value,'nodeIdvaluedata.value');
         const {error, code, data} = await dataApi.getExcelHtml({
-            id: id,
+            id: id||nodeIdvaluedata.value,
             primaryKeyId: pkeyIds
         }, false)
         const resData = isString(data) ? data || '' : ''

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

@@ -48,6 +48,7 @@
                 :tabTypeKey="tabTypeKey"
                  @updeviceUseIds="updeviceUseIds"
                  @upcheckTableId="upcheckTableId"
+                 :nodeIdvalue="nodeIdvalue"
                 />
             </el-scrollbar>
             <template #action>

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

@@ -101,6 +101,7 @@
                         <span class="text-link font-bold" @click="tableRowPdf(row)">{{row?.trialProjectName}}</span>
                     </template>
                     <template #taskStatus="{row}">
+                        <!-- <el-tag :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`" -->
                         <el-tag :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`"
                                 class="mx-1" effect="dark" v-if="row['taskStatus']">{{row['taskStatus']}}</el-tag>
                     </template>
@@ -319,6 +320,7 @@ const tableColumn = ref([
     {key:'reportNo', name: '报告编号', width: 220},
     {key:'samplingLocation', name: '取样地点', width: 220},
     {key:'trialProjectName', name: '试验项目名称', width: 220},
+    {key:'detectionResult', name: '检测结果', width: 160},
      {key:'taskStatus', name: '任务状态', width: 140},
     {key:'detectionCategory', name: '检测类别', width: 120},
     {key:'isUploadCertificate', name: '是否上传合格证', width: 130},
@@ -326,7 +328,7 @@ const tableColumn = ref([
     {key:'company', name: '单位', width: 160},
     {key:'specificationNumber', name: '样品编号', width: 220},
     {key:'specificationModel', name: '规格类型', width: 200},
-    {key:'detectionResult', name: '检测结果', width: 160},
+  
     //{key:'projectPosition', name: '工程部位及用途', width: 160},
     {key:'projectPositionName', name: '工程部位及用途', width: 160},
     {key:'reportDate', name: '报告日期', width: 170},