Bläddra i källkod

处理档案柜查询问题

ZaiZai 2 år sedan
förälder
incheckning
125e9604e0
2 ändrade filer med 33 tillägg och 33 borttagningar
  1. 1 1
      src/styles/page/using/scoped/query.scss
  2. 32 32
      src/views/using/query.vue

+ 1 - 1
src/styles/page/using/scoped/query.scss

@@ -367,7 +367,7 @@
     .hc-gui-info-data {
         position: relative;
         height: 100%;
-        width: 400px;
+        //width: 400px;
         padding-left: 40px;
         .hc-gui-data-container {
             position: relative;

+ 32 - 32
src/views/using/query.vue

@@ -66,7 +66,7 @@
                                 <HcIcon name="node-tree"/>
                                 目录树
                             </el-button>
-                          
+
 
                         </div>
                         <div class="hc-search-screening-item">
@@ -93,7 +93,7 @@
                                 <div class="screening-key" :class="isArrIndex(security,'key', item.key) ? 'cut': ''" @click="securityClick(item)">{{item.name}}</div>
                             </template>
                         </div>
-                   
+
                     </el-collapse-item>
                 </el-collapse>
             </div>
@@ -999,13 +999,13 @@ const tableFileData = ref([
 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 
-        tableFileData.value=getArrValue(data['approvalFileList']) 
-        cscTableData1.value=getArrValue(data['approvalFileList']) 
+        fileInfo.value.pageNumber=data.pageNumber
+        tableFileData.value=getArrValue(data['approvalFileList'])
+        cscTableData1.value=getArrValue(data['approvalFileList'])
 
     } else {
         tableFileData.value=[]
@@ -1056,7 +1056,7 @@ const consultFileClick =async (row,type) => {
     isFile.value=type
     if(type===1){
         //查阅案卷
-       
+
         fileInfo.value=row
         getArchiveFileListData()
         const url=await viewPdf(row.id)
@@ -1065,13 +1065,13 @@ const consultFileClick =async (row,type) => {
         if(tableFileData.value.length>0){
             getmetaInfo(tableFileData.value[0].id)
         }
-        
+
     }else if(type==2){//查阅卷内文件
         checkId.value=row.id
         pdfUrl.value=row.pdfFileUrl
         getmetaInfo(checkId.value)
    }
-   
+
 
 }
 const isCarrySpotChecksDrawer = ref(false)
@@ -1195,12 +1195,12 @@ const cscTableDataModalShow = () => {
         }else{
             getmetaInfo(checkId.value)
         }
-        
+
     } else if (key === 'tab6') {
         cscTableDataTitle.value = '验签包'
     }
     cscTableDataModal.value = true
-    
+
 }
 
 //关闭弹窗
@@ -1375,26 +1375,27 @@ const searchGuiId = ref('')
 //柜子被点击
 const guiInfoLoading = ref(false)
 const isGuiInfoDrawer = ref(false)
-const guiItemClick = async (item) => {
-    const isPlayVideo  = await playVideo()
-    if (isPlayVideo) {
-        isGuiInfoDrawer.value = true
-        guiInfoLoading.value = true
-        searchGuiId.value = item.id
-        //处理参数
-        searchForm.value.queryValue = searchInput.value
-        for (let key in  searchForm.value) {
-            if(searchForm.value[key] === 'all'|| searchForm.value[key] === '所有') {
-                searchForm.value[key] = ''
-            }
+const guiItemClick = (item) => {
+    //同步转异步
+    playVideo().then(res => {
+        isGuiInfoDrawer.value = res
+    })
+    //处理参数
+    guiInfoLoading.value = true
+    searchGuiId.value = item.id
+    searchForm.value.queryValue = searchInput.value
+    for (let key in  searchForm.value) {
+        if(searchForm.value[key] === 'all'|| searchForm.value[key] === '所有') {
+            searchForm.value[key] = ''
         }
-        //发起请求
-        const { error, code, data } = await archiveQueryApi.getarchiveQueryPage({
-            ...searchForm.value,
-            cabinetNumber: item.id,
-            projectId: projectId.value,
-            contractId:contractId.value
-        })
+    }
+    //发起请求, 同步转异步
+    archiveQueryApi.getarchiveQueryPage({
+        ...searchForm.value,
+        cabinetNumber: item.id,
+        projectId: projectId.value,
+        contractId:contractId.value
+    }).then(({ error, code, data }) => {
         //处理返回数据
         if (!error && code === 200) {
             const arrData = getArrValue(data)
@@ -1411,11 +1412,10 @@ const guiItemClick = async (item) => {
             guiInfoCurKey.value = {}
             guiInfoData.value = []
         }
-    }
+    })
 }
 
 
-
 //播放视频
 const videoRef = ref(null)
 const isVideoShow = ref(false)