From 5bcdfa9397ef06f89fe8aef56bff2740079751f0 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 16 Aug 2025 16:41:57 +0800
Subject: [PATCH] feat: 隐藏设置
---
src/views/dataCenter/dataCenter.vue | 44 +++++++++++++++++++++++---------------------
1 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/src/views/dataCenter/dataCenter.vue b/src/views/dataCenter/dataCenter.vue
index c0bc109..bb99bc0 100644
--- a/src/views/dataCenter/dataCenter.vue
+++ b/src/views/dataCenter/dataCenter.vue
@@ -10,10 +10,11 @@
@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 +35,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 +446,8 @@
startTime: jobListParams.searchParams.startTime?.slice(0, 10),
endTime: jobListParams.searchParams.endTime?.slice(0, 10),
waylineName:'',
-
+ dockSn:'',
+ areaCode:''
});
const tableData = ref([]);
// 获取列表数据
@@ -486,25 +488,12 @@
const getFolderList=()=>{
loadings.value = true;
const apiParams = {
- ...FolderListParams,
+ ...FolderListParams,
};
+ console.log('apiParams',apiParams);
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 +501,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,7 +519,7 @@
}
};
// 切换文件夹
- const handleswitchFolders = (val) => {
+ const handleswitchFolders = () => {
searchjobId.value = ''
switchFolders.value = !switchFolders.value;
jobListParams.current = 1;
@@ -536,6 +527,15 @@
fetchData();
};
+ const handleBack =()=>{
+ searchjobId.value = ''
+ switchFolders.value = true
+ viewDetails.value = false
+ jobListParams.current = 1;
+ FolderListParams.page = 1;
+ fetchData();
+
+ }
// 查询
const searchClick = params => {
if(switchFolders.value){
@@ -544,6 +544,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