From 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 01 Sep 2025 11:20:24 +0800
Subject: [PATCH] Merge branch 'refs/heads/feature/v5.0/5.0.5' into patch_management

---
 src/views/dataCenter/dataCenter.vue |   60 +++++++++++++++++++++++++++++++++---------------------------
 1 files changed, 33 insertions(+), 27 deletions(-)

diff --git a/src/views/dataCenter/dataCenter.vue b/src/views/dataCenter/dataCenter.vue
index c0bc109..df187a9 100644
--- a/src/views/dataCenter/dataCenter.vue
+++ b/src/views/dataCenter/dataCenter.vue
@@ -4,16 +4,19 @@
   >
     <div class="dataCenter-table">
       <searchData
+      ref="searchBoxRef"
       :searchjobId="searchjobId"
       :switchFolders="switchFolders"
         @search="searchClick"
         @downFun="downloadFile"
         @allDownFun="aLLDownloadFile"
         @handleswitchFolders="handleswitchFolders"
-       
+        @handleBack ="handleBack"
+       :viewDetails ="viewDetails"
+    
       ></searchData>
       <!-- 文件夹 -->
-      <div v-if="switchFolders" >
+      <div v-if="switchFolders" class="dataTable">
             <el-table
          class="custom-header custom-body"
           v-loading="loadings"
@@ -34,7 +37,7 @@
           <el-table-column property="name" label="任务名称" show-overflow-tooltip />    
            <el-table-column property="regionName" label="所属区域">
              <template #default="scope">
-              <span>{{scope.row.regionName ? scope.row.regionName :'--'}}</span>
+              <span>{{scope.row.city_name ? scope.row.city_name :'--'}},{{scope.row.area_name ? scope.row.area_name :'--'}}</span>
             </template>
             </el-table-column>   
           <el-table-column property="nickname" label="所属机巢" >
@@ -445,7 +448,8 @@
     startTime: jobListParams.searchParams.startTime?.slice(0, 10),
     endTime: jobListParams.searchParams.endTime?.slice(0, 10),
      waylineName:'',
-   
+    dockSn:'',
+    areaCode:''
 });
 const tableData = ref([]);
 // 获取列表数据
@@ -484,27 +488,13 @@
 const folderList = ref([])
 // 获取文件夹数据
 const getFolderList=()=>{
- loadings.value = true;
- const apiParams = {
-    ...FolderListParams, 
-  };
-  getJobIdsBySnApi(apiParams)
+    loadings.value = true;
+    const apiParams = {
+      ...FolderListParams,
+      };
+    getJobIdsBySnApi(apiParams)
 		.then(res => {
-     folderList.value = res.data.data.records?.map(i=>{
-       let nickname = '';
-      // nestDataList?.forEach(nestItem=>{
-      // if(i.device_sn === nestItem.device_sn){
-      //   nickname = nestItem.nickname
-      // }    
-      // })
-       return {
-          ...i,
-          nickname: nickname,
-          checked: false
-        };
-      
-     }) 
-     
+    folderList.value = res.data.data.records.map(i => ({ ...i, checked: false }))
     total.value = res.data.data.total  
 		})
 		.finally(() => {
@@ -512,12 +502,14 @@
 		})
 }
 const searchjobId = ref('')
+const viewDetails = ref('')
 // 文件夹查看
 const foldersOpen = (val)=>{
     loadings.value = true;
     tableData.value=[]
     searchjobId.value = val.job_id
     switchFolders.value = false
+    viewDetails.value = true
 }
 // 获取数据时使用各自的分页参数
 const fetchData = () => {
@@ -528,14 +520,26 @@
   }
 };
 // 切换文件夹
- const handleswitchFolders = (val) => {
+ const handleswitchFolders = () => {
  searchjobId.value = ''
      switchFolders.value = !switchFolders.value;
      jobListParams.current = 1;
      FolderListParams.page = 1;
-     fetchData();  
-     
+    
+     searchBoxRef.value?.handleReset();
+      fetchData();  
    };
+   const handleBack =()=>{
+    searchjobId.value = ''
+    switchFolders.value = true
+    viewDetails.value = false
+    jobListParams.current = 1;
+    FolderListParams.page = 1;
+     fetchData();  
+ 
+   }
+   const searchBoxRef = ref(null);
+  
 // 查询
 const searchClick = params => {
   if(switchFolders.value){
@@ -544,6 +548,8 @@
     FolderListParams.startTime = params?.startTime?.slice(0, 10); 
     FolderListParams.endTime = params?.endTime?.slice(0, 10);
     FolderListParams.waylineName=params?.jobName,
+   FolderListParams.dockSn = params?.deviceSn
+   FolderListParams.areaCode = params?.areaCode
     getFolderList()
   }else{
      jobListParams.current = 1;

--
Gitblit v1.9.3