Ver código fonte

四性检测历史报告按钮接口对接

duy 2 anos atrás
pai
commit
f4c20397b6
2 arquivos alterados com 88 adições e 3 exclusões
  1. 14 0
      src/api/modules/custody/testing.js
  2. 74 3
      src/views/custody/testing.vue

+ 14 - 0
src/api/modules/custody/testing.js

@@ -0,0 +1,14 @@
+import {httpApi} from "../../request/httpApi";
+
+export default {
+  //分页
+async getReportList(form, msg = true) {
+    return httpApi({
+        url: '/api/blade-archive/archiveExaminingReport/getList',
+        method: 'get',
+        params: form,
+      
+    }, msg);
+  },
+ 
+}

+ 74 - 3
src/views/custody/testing.vue

@@ -11,7 +11,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">历史报告</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">
@@ -219,11 +239,12 @@
 import {ref, watch, onMounted} from "vue";
 import {useAppStore} from "~src/store";
 import bgColor  from '~src/assets/view/bgcolor.svg';
-
 import testBgbig  from '~src/assets/view/testBgbig.png';
 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"
 
 
 //变量
@@ -315,7 +336,7 @@ const detection=()=>{
 }
 //渲染完成
 onMounted(() => {
-
+    getReportData()
 })
 const stepClick = (index) => {
     activeIndex.value = index;
@@ -323,6 +344,40 @@ const stepClick = (index) => {
          isStatus.value=true
     }
 }
+//历史报告
+const visible = ref(false)
+const showReport=()=>{
+    visible.value=!visible.value
+}
+const historyRportlist=ref([])
+//获取历史报告列表
+const reportLoading = ref(false)
+const getReportData = async () => {
+    reportLoading.value = true
+    const { error, code, data } = await reportApi.getReportList({
+        projectId: projectId.value,
+
+    })
+    reportLoading.value = false
+    if (!error && code === 200) {
+        historyRportlist.value = getArrValue(data)
+        console.log(data,'data');
+      
+    } else {
+        historyRportlist.value = []
+     
+    }
+   
+}
+//查看历史报告
+const viewHpdf=(item)=>{
+    if(item.reportPdfUrl){
+        window.open(item.reportPdfUrl, '_blank')
+    }else{
+        window.$message.warning('暂无pdf')
+    }
+   
+}
 </script>
 
 <style lang="scss" scoped>
@@ -483,4 +538,20 @@ const stepClick = (index) => {
         color: #1ECC95;
     }
 }
+.history_box{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    border-bottom: 1px solid gray;
+    height: 30px;
+    line-height: 30px;
+   
+}
+.m15{
+    margin-left: 15px;
+}
+.reportPop{
+    max-height: 280px !important;
+    overflow-y: auto;
+}
 </style>