瀏覽代碼

Merge remote-tracking branch 'origin/master'

ZaiZai 2 年之前
父節點
當前提交
154408886b
共有 3 個文件被更改,包括 99 次插入23 次删除
  1. 10 1
      src/api/modules/custody/testing.js
  2. 8 5
      src/layout/index.vue
  3. 81 17
      src/views/custody/testing.vue

+ 10 - 1
src/api/modules/custody/testing.js

@@ -1,7 +1,7 @@
 import {httpApi} from "../../request/httpApi";
 
 export default {
-  //分页
+  //获取历史报告
 async getReportList(form, msg = true) {
     return httpApi({
         url: '/api/blade-archive/archiveExaminingReport/getList',
@@ -10,5 +10,14 @@ async getReportList(form, msg = true) {
       
     }, msg);
   },
+  //一键检测
+  async getExamining(form, msg = true) {
+    return httpApi({
+        url: '/api/blade-archive/archiveExaminingReport/getExamining',
+        method: 'get',
+        params: form,
+      
+    }, msg);
+  },
  
 }

+ 8 - 5
src/layout/index.vue

@@ -11,7 +11,7 @@
             </div>
             <div class="hc-aside-menu-box">
                 <el-scrollbar>
-                    <MenuBar :datas="MenuBarData" :cur="MenuBarKey" :collapse="isCollapse" @change="MenuBarChange"/>
+                    <MenuBar :datas="MenuBarData" :cur="MenuBarKey" :collapse="isCollapse" @change="MenuBarChange" :msgCount="msgCount"/>
                 </el-scrollbar>
             </div>
             <div class="hc-aside-bar-box">
@@ -46,7 +46,7 @@
                 <router-view v-slot="{ Component }" v-if="reloadRouter">
                     <transition name="fade-transform">
                         <keep-alive include="ProductList">
-                            <component :is="Component" />
+                            <component :is="Component" :msgCount="msgCount"/>
                         </keep-alive>
                     </transition>
                 </router-view>
@@ -114,6 +114,7 @@ onMounted(() => {
     }
     setIsCollapse(RoutesName.value)
     useAppState.barMenuName = BarMenuTitle
+    setInitSocket()
 })
 
 //监听
@@ -255,7 +256,8 @@ const logoClick = () => {
 const userProjectClick = () => {
     router.push({path: '/user/project'});
 }
-
+const msgCount = ref({
+})
 //推送系统
 let socket;
 const setInitSocket = () => {
@@ -270,9 +272,10 @@ const setInitSocket = () => {
         };
         socket.onmessage = function ({data}) {
             if (data) {
-                msgCount.value = JSON.parse(data)
+                msgCount.value = data
+                console.log(data,'消息信息');
+
             }
-            console.log(data, '消息信息')
         };
         socket.onerror = function ({data}) {
             console.log('发生错误:', data)

+ 81 - 17
src/views/custody/testing.vue

@@ -50,8 +50,8 @@
                            
                          </el-row>
                       </div>
-                           <div class="circlebox" @click="detection">
-                               <span>一键检测</span>
+                           <div class="circlebox" @click="detection" >
+                               <span v-loading="detectionLoad"> 一键检测</span>
                             </div>  
                   </div>
                   
@@ -63,7 +63,27 @@
                                     [1]文书档案检测一般要求:DA/T 70-2018
                                 </div>
                             </el-col>
-                            <el-col :span="3" :offset="1"><div  style="text-align:right">历史报告</div></el-col>
+                            <el-col :span="3" :offset="1">
+                                <div  style="text-align:right">
+                                    <el-tooltip :visible="visible" effect="light"  >
+                                                <template #content >
+                                                    <div class="reportPop" v-if="historyRportlist.length>0" v-loading="reportLoading">
+                                                        <div class="history_box" v-for="item in historyRportlist">
+                                                            <el-link type="primary" @click="viewHpdf(item)">{{ item.reportName }}</el-link>
+                                                            <span class="m15">{{ item.examiningTime }}</span>
+                                                            
+                                                        </div>
+                                                    </div>
+                                                    <div v-else>暂无数据</div>
+                                                </template>
+                                                <el-button  type="primary"  @click="showReport">
+                                                    历史报告
+                                                </el-button>
+
+                                    </el-tooltip>
+                                </div>
+                          </el-col>
+                     
                          </el-row>
                         <el-row>
                             <el-col :span="24">
@@ -88,8 +108,9 @@
                                 effect="light"
                                 content="系统正在检测运行中,请勿终止操作"
                                 placement="right-start"
+                                :visible="activeIndex==2||activeIndex==3"
                             >
-                                <div class="circlebox circlebox2" v-if="activeIndex===3">
+                                <div class="circlebox circlebox2" v-if="activeIndex===4">
                                     <span>100%</span>
                                 </div>  
                                <div class="circlebox circlebox1" v-else>
@@ -210,12 +231,12 @@
 
                             <div class="hc-steps-view"  style="width:100%;display:flex">
                                 <el-steps :active="activeIndex" align-center  style="width:90%">
-                                    <el-step title="初始化" @click="stepClick(0)"/>
-                                    <el-step title="检测中" @click="stepClick(1)"/>
-                                    <el-step title="生成报告" @click="stepClick(2)"/>
-                                    <el-step title="完成" @click="stepClick(3)"/>
+                                    <el-step title="初始化" @click="stepClick(1)"/>
+                                    <el-step title="检测中" @click="stepClick(2)"/>
+                                    <el-step title="生成报告" @click="stepClick(3)"/>
+                                    <el-step title="完成" @click="stepClick(4)"/>
                                 </el-steps>
-                                <el-button type="success" v-if="activeIndex===3">查看报告</el-button>
+                                <el-button type="success" v-if="activeIndex===4">查看报告</el-button>
                             </div>
                              
                       </div>
@@ -244,7 +265,7 @@ import testBgsamll  from '~src/assets/view/testBgsamll.png';
 import HcCard1 from './components/hc-card1.vue'
 import HcTable1 from './components/hc-table1.vue'
 import reportApi from "~api/custody/testing.js";
-import {getArrValue, arrIndex, isArrIndex} from "js-fast-way"
+import {getArrValue, getObjValue, isArrIndex} from "js-fast-way"
 
 
 //变量
@@ -330,14 +351,52 @@ const tableData = ref([
 //获取数据
 const tableLoading = ref(false)
 //一键检测
-const detection=()=>{
+const reportId=ref(0)
+const detectionLoad=ref(false)
+const detection=async()=>{
     console.log('一键检测');
-    isStatus.value=false
+   
+    detectionLoad.value=true
+    const { error, code, data } = await reportApi.getExamining({
+        projectId: projectId.value,
+        reportId:reportId.value
+    })
+    detectionLoad.value=false
+    if (!error && code === 200) {
+        activeIndex.value=data['status']
+        isStatus.value=false
+      
+      
+    } else {
+      
+     
+    }
 }
 //渲染完成
 onMounted(() => {
     getReportData()
 })
+//消息数量
+const props = defineProps(
+    {
+        msgCount: {
+            // type: Object,
+            // default: () => ({ })
+        },
+    }
+)
+const menumsgCount = ref(props.msgCount)
+//监听
+//监听
+watch(() => [
+        props.msgCount,
+    ], ([val]) => {
+        console.log(val,'val');
+        menumsgCount.value = val
+        activeIndex.value=val.status
+    }
+)
+//渲
 const stepClick = (index) => {
     activeIndex.value = index;
     if (index==0) {
@@ -378,6 +437,7 @@ const viewHpdf=(item)=>{
     }
    
 }
+
 </script>
 
 <style lang="scss" scoped>
@@ -386,15 +446,18 @@ const viewHpdf=(item)=>{
     display: flex;
     justify-content: space-around;
     align-items:flex-end;
-    height: 28vh;
+    min-height: 280px;
+    // height: 28vh;
+    // height: 350px;
     width: 80%;
     text-align: center;
     // border: 1px solid red;
     margin: 0 auto;
     .statusboxitem{
         width: 15%;
-        // height: 400px;
-        height: 90%;
+        
+    
+        background-size: 100% 100%;
         border-radius: 5px;
         font-size: 14px;
         padding: 10px;
@@ -427,7 +490,7 @@ const viewHpdf=(item)=>{
             display: flex;
             justify-content: space-between;
             align-items: center;
-            line-height: 50px;
+            // line-height: 50px;
             color:black;
         }
     }
@@ -470,7 +533,7 @@ const viewHpdf=(item)=>{
         color: white;
         font-weight: bolder;
        
-        font-size: 1.85rem;
+        font-size: 30px;
         cursor: pointer;
         box-sizing: border-box;
    }
@@ -480,6 +543,7 @@ const viewHpdf=(item)=>{
          left:45.5%;
         //  width: 20vh;
         //  height: 20vh;
+        font-size: 2.55rem;
          width: 12%;
          height: 51.1%;
          background-color:   rgb(189, 49, 36);