Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

ZaiZai 2 gadi atpakaļ
vecāks
revīzija
5c322ac5bb
1 mainītis faili ar 27 papildinājumiem un 76 dzēšanām
  1. 27 76
      src/views/custody/testing.vue

+ 27 - 76
src/views/custody/testing.vue

@@ -114,7 +114,7 @@
                                     <span>100%</span>
                                 </div>
                                <div class="circlebox circlebox1" v-else>
-                                    <span>26%</span>
+                                    <span>{{ statusPercent }}</span>
                                 </div>
 
                             </el-tooltip>
@@ -243,8 +243,8 @@
 
                       <div class="tablebox">
                             <HcTable1 ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading">
-                               <template #key3="{row}">
-                                    <i class="ri-checkbox-circle-fill" v-if="row.key3" style="color:green"> </i>
+                               <template #examiningResult="{row}">
+                                    <i class="ri-checkbox-circle-fill" v-if="row.examiningResult===0" style="color:green"> </i>
                                     <i class="ri-error-warning-fill" v-else style="color:rgb(189, 49, 36);"></i>
                                 </template>
                             </HcTable1>
@@ -293,73 +293,12 @@ const activeIndex = ref(0);
 //表头
 const tableRef = ref(null)
 const tableColumn = ref([
-    {key:'key1', name: '检测项目'},
-    {key:'key2', name: '不合格统计',width:150,align:'center'},
-    {key:'key3', name: '检测结果',width:150,align:'center'},
-
-])
-const tableData = ref([
-    {
-        id: 1,
-        key1: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key2:3,
-        key3: true,
-
-    },
-      {
-        id: 1,
-        key1: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key2:3,
-         key3: true,
-
-    },
-      {
-        id: 1,
-        key1: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key2:3,
-       key3: true,
-
-    },
-      {
-        id: 1,
-        key1: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key2:3,
-        key3: true,
-
-    },
-      {
-        id: 1,
-        key1: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key2:3,
-        key3: false,
-
-    },
-    ,
-      {
-        id: 1,
-        key1: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key2:3,
-        key3: false,
-
-    },
-    ,
-      {
-        id: 1,
-        key1: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key2:3,
-        key3: false,
-
-    },
-    ,
-      {
-        id: 1,
-        key1: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key2:3,
-        key3: false,
-
-    },
+    {key:'examiningItem', name: '检测项目'},
+    {key:'unqualifiedCount', name: '不合格统计',width:150,align:'center'},
+    {key:'examiningResult', name: '检测结果',width:150,align:'center'},
 
 ])
+const tableData = ref([])
 
 //获取数据
 const tableLoading = ref(false)
@@ -367,8 +306,6 @@ const tableLoading = ref(false)
 const reportId=ref(0)
 const detectionLoad=ref(false)
 const detection=async()=>{
-    console.log('一键检测');
-
     detectionLoad.value=true
     const { error, code, data } = await reportApi.getExamining({
         projectId: projectId.value,
@@ -415,17 +352,30 @@ const props = defineProps(
         },
     }
 )
-const menumsgCount = ref(props.msgCount)
-//监听
+//检测百分比
+const statusPercent=ref('25%')
 //监听
 watch(() => [
         props.msgCount,
-    ], ([val]) => {
+        activeIndex
+    ], ([val,index]) => {
         const res = toParse(val)
+        // console.log(val,'val消息信息');
         if(res) {
-            activeIndex.value = res.status
+            activeIndex.value = res.status;
+            tableData.value=res.detailList
+        }
+        console.log(index.value,'index');
+        if(index.value===1){
+            statusPercent.value='25%'
+        }else if(index.value===2){
+            statusPercent.value='50%'
+        }else if(index.value===3){
+            statusPercent.value='75%'
+        }else if(index.value===4){
+            statusPercent.value='100%'
         }
-        menumsgCount.value = val
+       
     }
 )
 //渲
@@ -462,6 +412,7 @@ const getReportData = async () => {
 }
 //查看历史报告
 const viewHpdf=(item)=>{
+    console.log(item,'item');
     if(item.reportPdfUrl){
         window.open(item.reportPdfUrl, '_blank')
     }else{
@@ -484,7 +435,7 @@ const viewDialogTrue=(type)=>{
     }else if(type===2){
         Imageurl.value=fullPng
         imageTitle.value='完整性检测范围'
-    }else if(type===2){
+    }else if(type===3){
         Imageurl.value=usePng
         imageTitle.value='可以性检测范围'
     }else{