Explorar o código

档案巡检元数据信息

duy %!s(int64=2) %!d(string=hai) anos
pai
achega
bb8b478513
Modificáronse 1 ficheiros con 37 adicións e 12 borrados
  1. 37 12
      src/views/transfer/inspects.vue

+ 37 - 12
src/views/transfer/inspects.vue

@@ -69,7 +69,7 @@
                         </div>
                         <div class="hc-info-text-item">
                             <div class="title">起止日期:</div>
-                            <div class="content" v-if="fileInfo?.endDate!==''||fileInfo?.startDate!==''">{{ splitDate(fileInfo?.startDate)+"~"+  splitDate(fileInfo?.endDate)}}</div>
+                            <div class="content" v-if="fileInfo?.endDate!==''||fileInfo?.startDate!==null">{{ splitDate(fileInfo?.startDate)+"~"+  splitDate(fileInfo?.endDate)}}</div>
                             <div class="content" v-else></div>
                         </div>
                         <div class="hc-info-text-item">
@@ -170,6 +170,7 @@ import HcTree from "~src/components/tree/hc-tree.vue"
 import MetaTable from "./components/meta-table.vue"
 import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import tuningApi from "~api/archiveConfig/tuning.js";
+import archiveQueryApi from "~api/using/query.js";
 import inspectApi from "~api/transfer/inspects.js";
 
 //变量
@@ -209,7 +210,14 @@ const treeNodeLoading = () => {
 const searchForm = ref({
     current: 1, size: 20, total: 0
 })
-
+//截取日期
+const splitDate = (val)=>{
+    if (val) {
+        return val?.substring(0,10)
+    } else {
+        return ''
+    }
+}
 //树相关的变量
 const primaryKeyId = ref('')
 
@@ -274,11 +282,7 @@ const getTableData = async () => {
         searchForm.value.total = 0
     }
 }
-//截取日期
-const splitDate=(val)=>{
-    
-    return val.substring( 0,10)
-}
+
 //查阅案卷pdf
 const viewPdf = async (id) => {
     window.$message?.info('预览案卷需要合并pdf,需要一点时间')
@@ -302,13 +306,12 @@ const checkmetaFileId=ref('')
 const tableRowClick = async({row}) => {
     //console.log(row)
     fileInfo.value=row
-    cscTableData1.value=getArrValue( row['approvalFileList'])
+    // cscTableData1.value=getArrValue( row['approvalFileList'])
+    getArchiveFileListData()
     isCarrySpotChecksDrawer.value = true
     ishowAllopinion.value=true
     checkId.value=''
-    if(cscTableData1.value.length>0){
-        checkmetaFileId.value=cscTableData1.value[0].id
-    }
+  
    
     const url=await viewPdf(row.id)
         pdfUrl.value=url
@@ -318,6 +321,27 @@ const tableRowClick = async({row}) => {
             }, 20000);
         }
 }
+//获取卷内文件数据
+const getArchiveFileListData=async()=>{
+    const { error, code, msg,data } = await archiveQueryApi.getArchiveFileList({
+        id: fileInfo.value.id, //案卷id
+     
+    })
+    //处理返回数据
+    if (!error && code === 200) {
+        fileInfo.value.pageNumber=data.pageNumber 
+        
+        cscTableData1.value=getArrValue(data['approvalFileList']) 
+        if(cscTableData1.value.length>0){
+            checkmetaFileId.value=cscTableData1.value[0].id
+            getmetaInfo()
+        }
+
+    } else {
+       
+        cscTableData1.value=[]
+    }
+}
 //设置为已查阅
 const serReviewFile=async()=>{
             const {error, code, data, msg} = await inspectApi.setreview({
@@ -334,6 +358,7 @@ const changePdf=(row)=>{
     pdfUrl.value=row['pdfFileUrl']||''
     checkId.value=row.id
     checkmetaFileId.value=row.id
+    getmetaInfo()
     ishowAllopinion.value=true
 
     getopiniondata()
@@ -541,7 +566,7 @@ const onmousedown = () => {
 //获取元数据
 const cscmetaTableLoading=ref(false)
 const cscmetaDataTabledata=ref([])
-const ishowFile=ref(false)
+const ishowFile=ref(true)
 //获取元数据信息
 
 const getmetaInfo=async(fileId)=>{