Pārlūkot izejas kodu

档案预警元数据信息修改

duy 2 gadi atpakaļ
vecāks
revīzija
50b6c19217

+ 1 - 1
src/styles/theme/transfer/inspect.scss

@@ -105,7 +105,7 @@ html.dark {
         }
         .hc-csc-action-box {
             position: relative;
-            background: white;
+            background: transparent;
             border-radius: 10px;
             padding: 12px;
             height: 240px;

+ 17 - 7
src/views/transfer/components/meta-table.vue

@@ -7,18 +7,20 @@
                         <td colspan="2" class="hc-csc-meta-table-td title" v-if="!iShowFile">案卷元数据信息</td>
                         <td colspan="2" class="hc-csc-meta-table-td title" v-else>文件元数据信息</td>
               </tr>
-                <template v-for="item in metaDataTable">
+                <template v-for="item in metaDataTableVal">
                   
-                    <tr class="hc-csc-meta-table-tr" v-if="item.type === 2">
-                        <td colspan="2" class="hc-csc-meta-table-td title">{{item.title}}</td>
+                    <tr class="hc-csc-meta-table-tr" v-if="item.isType === 1">
+                        <td colspan="2" class="hc-csc-meta-table-td title">{{item.containerName}}</td>
                     </tr>
                     <tr class="hc-csc-meta-table-tr" v-else>
-                        <td class="hc-csc-meta-table-td name">{{item.title}}</td>
-                        <td class="hc-csc-meta-table-td val">{{item.val}}</td>
+                        <td class="hc-csc-meta-table-td name">{{item.containerName}}</td>
+                        <td class="hc-csc-meta-table-td val">{{item.keyValue}}</td>
                     </tr>
                 </template>
             </table>
+            <HcNoData v-if="metaDataTableVal.length==0"/>
         </el-scrollbar>
+    
     </div>
 </template>
 
@@ -42,6 +44,10 @@ const props = defineProps({
     ishowFile:{
         type: Boolean,
         default: false
+    },
+    metaDataTable:{
+        type: [Array],
+        default: ''
     }
 })
 
@@ -50,15 +56,19 @@ const projectId = ref(props.projectId);
 const contractId = ref(props.contractId);
 const isLoading = ref(props.loading);
 const iShowFile = ref(props.ishowFile);
+const metaDataTableVal=ref(props.metaDataTable)
 
 //监听
 watch(() => [
     props.loading,
-    props.ishowFile
-], ([loading,ishowFile]) => {
+    props.ishowFile,
+    props.metaDataTable
+], ([loading,ishowFile,metaDataTable]) => {
+    console.log(metaDataTable,'metaDataTable');
     isLoading.value = loading;
     console.log(ishowFile,'ishowFile');
     iShowFile.value=ishowFile
+    metaDataTableVal.value=metaDataTable
 })
 
 //元数据

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

@@ -106,7 +106,8 @@
                         </template>
                     </HcTable>
 
-                    <MetaTable :loading="cscTableLoading" v-if="tabTypeKey === 'tab5'"/>
+                    <MetaTable :loading="cscmetaTableLoading" v-if="tabTypeKey === 'tab5'"  :metaDataTable="cscmetaDataTabledata"   :ishowFile="ishowFile"/>
+                 
 
                     <HcTable :column="cscTableColumn5" :datas="cscTableData5" :loading="cscTableLoading" v-if="tabTypeKey === 'tab6'"/>
 
@@ -154,7 +155,7 @@
 
         <!--使用弹窗查看数据-->
         <HcDialog :show="cscTableDataModal" :title="cscTableDataTitle" widths="1080px" isTable :footer="false" @close="cscTableDataModalClose">
-            <MetaTable :loading="cscTableLoading" v-if="tabTypeKey === 'tab5'"/>
+            <MetaTable :loading="cscmetaTableLoading" v-if="tabTypeKey === 'tab5'"  :metaDataTable="cscmetaDataTabledata"  :ishowFile="ishowFile"/>
             <HcTable :column="cscTableColumn51" :datas="cscTableData5" :loading="cscTableLoading" v-if="tabTypeKey === 'tab6'"/>
         </HcDialog>
 
@@ -297,14 +298,18 @@ const viewPdf = async (id) => {
 //行被点击
 const isCarrySpotChecksDrawer = ref(false)
 const fileInfo=ref('')
+const checkmetaFileId=ref('')
 const tableRowClick = async({row}) => {
     //console.log(row)
     fileInfo.value=row
-    fileInfo.value.pageNumber=row['approvalFileList'].length||0
     cscTableData1.value=getArrValue( row['approvalFileList'])
     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
         if(pdfUrl.value&&pdfUrl?.value.length>0&& isCarrySpotChecksDrawer.value){
@@ -324,10 +329,13 @@ const pdfUrl=ref('')
 const pdfLoading=ref(false)
 const changePdf=(row)=>{
     console.log(row,'row');
+    ishowFile.value=true
     pdfLoading.value=false
     pdfUrl.value=row['pdfFileUrl']||''
     checkId.value=row.id
+    checkmetaFileId.value=row.id
     ishowAllopinion.value=true
+
     getopiniondata()
     if(pdfUrl.value&&pdfUrl?.value.length>0&& isCarrySpotChecksDrawer.value){
             setTimeout(() => {
@@ -389,6 +397,9 @@ const tabTypeTab = ref([
 ]);
 const tabTypeChange = ({key}) => {
     tabTypeKey.value = key
+    if(key==='tab5'){
+        getmetaInfo()
+    }
 }
 
 const cscTableLoading = ref(false)
@@ -488,6 +499,7 @@ const cscTableDataModalShow = () => {
     const key = tabTypeKey.value;
     if (key === 'tab5') {
         cscTableDataTitle.value = '元数据'
+        getmetaInfo()
     } else if (key === 'tab6') {
         cscTableDataTitle.value = '验签包'
     }
@@ -505,6 +517,9 @@ const cscTableDataModalClose = () => {
 const onCarrySpotChecksDrawerClose = () => {
     isCarrySpotChecksDrawer.value = false
     pdfUrl.value=''
+    ishowFile.value=false
+    checkmetaFileId.value=''
+    tabTypeKey.value='tab1'
 }
 
 
@@ -523,6 +538,25 @@ const onmousedown = () => {
         document.onmouseup = null;
     }
 }
+//获取元数据
+const cscmetaTableLoading=ref(false)
+const cscmetaDataTabledata=ref([])
+const ishowFile=ref(false)
+//获取元数据信息
+
+const getmetaInfo=async(fileId)=>{
+ 
+    cscmetaTableLoading.value = true
+    const {error, code, data} = await tuningApi.getMetadataFileByid({
+        fileId: checkmetaFileId.value,
+    })
+    cscmetaTableLoading.value = false
+    if (!error && code === 200) {
+        cscmetaDataTabledata.value=getArrValue(data)
+    } else {
+        cscmetaDataTabledata.value=[]
+    }
+}
 </script>
 
 <style lang="scss" scoped>