From 8e46d6ba070c202e9e2b2f3936fe83791284addc Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Sat, 16 Aug 2025 16:43:57 +0800
Subject: [PATCH] feat:切换文件夹清空参数

---
 src/views/dataCenter/components/searchData.vue |    7 +++++--
 src/views/dataCenter/dataCenter.vue            |   22 +++++++++++++---------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/views/dataCenter/components/searchData.vue b/src/views/dataCenter/components/searchData.vue
index 4ed3fa5..1445f58 100644
--- a/src/views/dataCenter/components/searchData.vue
+++ b/src/views/dataCenter/components/searchData.vue
@@ -142,7 +142,7 @@
 const userAreaCode = computed(() => store.getters.userInfo.detail.areaCode);
 const selectedAreaCode = computed(() => store.state.user.selectedAreaCode);
 const htsjzx = computed(() => store.state.common.downloadProgress?.htsjzx || 100)
-const emit = defineEmits(['search', 'downFun', 'allDownFun','handleswitchFolders','handleBack']);
+const emit = defineEmits(['search', 'Reset','downFun', 'allDownFun','handleswitchFolders','handleBack']);
 const startTime = dayjs().subtract(6, 'day').startOf('day');
 const endTime = dayjs().endOf('day');
 const timeRange = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')];
@@ -333,6 +333,7 @@
   searchForm.wayLineJobId=''
   handleNodeClick({ id: userAreaCode.value });
   handleSearch();
+   emit('Reset', searchForm);
 };
 // 下载
 const downloadFun = () => {
@@ -365,7 +366,9 @@
   })
 });
 
-
+defineExpose({
+  handleReset,
+});
 </script>
 
 <style scoped lang="scss">
diff --git a/src/views/dataCenter/dataCenter.vue b/src/views/dataCenter/dataCenter.vue
index bb99bc0..df187a9 100644
--- a/src/views/dataCenter/dataCenter.vue
+++ b/src/views/dataCenter/dataCenter.vue
@@ -4,6 +4,7 @@
   >
     <div class="dataCenter-table">
       <searchData
+      ref="searchBoxRef"
       :searchjobId="searchjobId"
       :switchFolders="switchFolders"
         @search="searchClick"
@@ -12,6 +13,7 @@
         @handleswitchFolders="handleswitchFolders"
         @handleBack ="handleBack"
        :viewDetails ="viewDetails"
+    
       ></searchData>
       <!-- 文件夹 -->
       <div v-if="switchFolders" class="dataTable">
@@ -35,7 +37,7 @@
           <el-table-column property="name" label="任务名称" show-overflow-tooltip />    
            <el-table-column property="regionName" label="所属区域">
              <template #default="scope">
-              <span>{{scope.row.city_name ? scope.row.city_name :'--'}}{{scope.row.area_name ? scope.row.area_name :'--'}}</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="所属机巢" >
@@ -486,12 +488,11 @@
 const folderList = ref([])
 // 获取文件夹数据
 const getFolderList=()=>{
- loadings.value = true;
- const apiParams = {
-  ...FolderListParams,
-  };
-  console.log('apiParams',apiParams);
-  getJobIdsBySnApi(apiParams)
+    loadings.value = true;
+    const apiParams = {
+      ...FolderListParams,
+      };
+    getJobIdsBySnApi(apiParams)
 		.then(res => {
     folderList.value = res.data.data.records.map(i => ({ ...i, checked: false }))
     total.value = res.data.data.total  
@@ -524,8 +525,9 @@
      switchFolders.value = !switchFolders.value;
      jobListParams.current = 1;
      FolderListParams.page = 1;
-     fetchData();  
-     
+    
+     searchBoxRef.value?.handleReset();
+      fetchData();  
    };
    const handleBack =()=>{
     searchjobId.value = ''
@@ -536,6 +538,8 @@
      fetchData();  
  
    }
+   const searchBoxRef = ref(null);
+  
 // 查询
 const searchClick = params => {
   if(switchFolders.value){

--
Gitblit v1.9.3