From 0c9a9ed7e7393df99bcadcf083df9e35727d92bb Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Thu, 21 Aug 2025 14:46:16 +0800
Subject: [PATCH] Merge branch 'feature/v5.0/5.0.4' of http://139.196.74.78:10010/r/drone/drone-web-manage into feature/v5.0/5.0.4
---
src/views/job/components/SearchBox.vue | 4 +
src/views/dataCenter/components/searchData.vue | 46 ++++++++++-----
src/views/dataCenter/dataCenter.vue | 42 ++++++++++---
src/views/job/components/JobRelatedEvents.vue | 4
src/views/job/components/TaskTop/TaskTime.vue | 2
src/views/dataCenter/components/dataCenterMap.vue | 20 ++++++
src/api/dataCenter/dataCenter.js | 3
src/axios.js | 2
src/page/index/setting.vue | 4
9 files changed, 93 insertions(+), 34 deletions(-)
diff --git a/src/api/dataCenter/dataCenter.js b/src/api/dataCenter/dataCenter.js
index e4e5b32..c6ed8e1 100644
--- a/src/api/dataCenter/dataCenter.js
+++ b/src/api/dataCenter/dataCenter.js
@@ -87,6 +87,7 @@
url: `/drone-device-core/wayline/api/v1/workspaces/getJobIdsBySn`,
method: 'get',
params,
+ customize: params.areaCode
})
}
// 附件下载
@@ -104,4 +105,4 @@
method: 'post',
data: data,
})
-}
\ No newline at end of file
+}
diff --git a/src/axios.js b/src/axios.js
index d0039aa..4acc439 100644
--- a/src/axios.js
+++ b/src/axios.js
@@ -41,7 +41,7 @@
config.url = baseUrl + config.url;
}
//安全请求header
- config.headers['areaCode'] = store?.state?.user?.userInfo?.detail?.areaCode;
+ config.headers['areaCode'] = config?.params?.areaCode || store?.state?.user?.userInfo?.detail?.areaCode;
config.headers['Blade-Requested-With'] = 'BladeHttpRequest';
//headers判断是否需要
const authorization = config.authorization === false;
diff --git a/src/page/index/setting.vue b/src/page/index/setting.vue
index 6b2e42d..9aadd4c 100644
--- a/src/page/index/setting.vue
+++ b/src/page/index/setting.vue
@@ -1,11 +1,11 @@
<template>
- <el-button
+<!-- <el-button
@click="show = true"
class="setting-icon"
type="primary"
icon="el-icon-setting"
circle
- ></el-button>
+ ></el-button>-->
<el-drawer append-to-body :with-header="false" v-model="show" size="30%">
<div class="setting">
<!-- <h5>导航模式</h5>
diff --git a/src/views/dataCenter/components/dataCenterMap.vue b/src/views/dataCenter/components/dataCenterMap.vue
index 2715f26..417a42c 100644
--- a/src/views/dataCenter/components/dataCenterMap.vue
+++ b/src/views/dataCenter/components/dataCenterMap.vue
@@ -1,5 +1,10 @@
<template>
- <el-dialog modal-class="mapDialog" v-model="isShow" width="80%">
+ <el-dialog modal-class="mapDialog" v-model="isShow" width="80%">
+ <template #header="{ titleId, titleClass }">
+ <div class="my-header">
+ <h4 :id="titleId" :class="titleClass">定位</h4>
+ </div>
+ </template>
<div class="mapBox">
<div v-if="isShow" id="dataCenterMap" class="ztzf-cesium"></div>
</div>
@@ -318,4 +323,17 @@
height: 100%;
}
}
+.my-header :deep(.el-dialog__title) {
+ margin: 0 !important;
+ height: 19px;
+}
+
+.my-header {
+ display: flex;
+ align-items: center;
+
+ .el-button {
+ margin-left: 20px;
+ }
+}
</style>
diff --git a/src/views/dataCenter/components/searchData.vue b/src/views/dataCenter/components/searchData.vue
index 82f4f61..1445f58 100644
--- a/src/views/dataCenter/components/searchData.vue
+++ b/src/views/dataCenter/components/searchData.vue
@@ -3,8 +3,8 @@
<el-form :model="searchForm" inline>
<div class="search-first">
<el-form-item label="行政区划:" >
- <el-tree-select
- :disabled="foldersDisabled"
+ <el-tree-select
+ :disabled="viewDetailsDisabled"
popper-class="custom-tree-select"
v-model="searchForm.areaCode"
:data="deptTreeData"
@@ -17,7 +17,7 @@
</el-form-item>
<el-form-item label="所属机巢:">
<el-select
- :disabled="foldersDisabled"
+ :disabled="viewDetailsDisabled"
:teleported="false"
v-model="searchForm.deviceSn"
placeholder="请选择"
@@ -33,10 +33,11 @@
</el-select>
</el-form-item>
<el-form-item label="任务名称:">
- <el-input v-model="searchForm.jobName" placeholder="请输入" clearable />
+ <el-input :disabled="viewDetailsDisabled" v-model="searchForm.jobName" placeholder="请输入" clearable />
</el-form-item>
<el-form-item>
<el-date-picker
+ :disabled="viewDetailsDisabled"
popper-class="custom-date-picker"
v-model="dateRange"
type="daterange"
@@ -61,7 +62,7 @@
</el-form-item>
<el-form-item label="文件格式:">
<el-select
- :disabled="foldersDisabled"
+ :disabled="foldersDisabled || viewDetailsDisabled"
:teleported="false"
v-model="searchForm.resultType"
placeholder="请选择"
@@ -80,7 +81,7 @@
<el-form-item label="文件类别:">
<el-select
- :disabled="disabled || foldersDisabled"
+ :disabled="disabled || foldersDisabled || viewDetailsDisabled"
:teleported="false"
v-model="searchForm.photoType"
placeholder="请选择"
@@ -99,11 +100,11 @@
</div>
<div class="search-first">
<el-form-item label="文件名称:">
- <el-input :disabled="foldersDisabled" v-model="searchForm.name" placeholder="请输入" clearable />
+ <el-input :disabled="foldersDisabled || viewDetailsDisabled" v-model="searchForm.name" placeholder="请输入" clearable />
</el-form-item>
<div class="search-btn">
- <el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
- <el-button icon="el-icon-refresh" @click="handleReset">清空</el-button>
+ <el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
+ <el-button icon="el-icon-refresh" @click="handleReset">清空</el-button>
</div>
</div>
<div class="search-first">
@@ -111,7 +112,7 @@
<!-- <el-button type="primary" icon="el-icon-download" @click="allDownloadFun"-->
<!-- >全部下载</el-button-->
<!-- >-->
- <el-button type="primary" plain @click="handleswitchFolders" ><el-icon><FolderOpened /></el-icon></el-button>
+ <el-button v-if="!viewDetailsDisabled" type="primary" plain @click="handleswitchFolders" ><el-icon><FolderOpened /></el-icon></el-button>
<div class="downloadBtn" @click="htsjzx === 100 && downloadFun()">
<el-progress v-if="htsjzx !== 100" :percentage="htsjzx" :show-text="false" striped striped-flow :duration="1" />
<div class="downloadBtnText">
@@ -121,6 +122,7 @@
</template>
</div>
</div>
+ <el-button v-if="viewDetailsDisabled" type="primary" plain @click="handleBack" >返回</el-button>
</div>
</div>
</el-form>
@@ -140,13 +142,13 @@
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']);
+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')];
const dateRange = ref(timeRange);
const timeFormat = 'YYYY-MM-DD HH:mm:ss';
-const props = defineProps(['searchjobId','switchFolders'])
+const props = defineProps(['searchjobId','switchFolders','viewDetails'])
const searchForm = reactive({
jobName: '', //任务名称
name: '', //文件名称
@@ -223,6 +225,14 @@
foldersDisabled.value = true
}else{
foldersDisabled.value = false
+}
+});
+const viewDetailsDisabled = ref(false)
+watch(() => props.viewDetails, (newVal) => {
+if(newVal === true){
+ viewDetailsDisabled.value = true
+}else{
+ viewDetailsDisabled.value = false
}
});
const changePhotoType =(val)=>{
@@ -323,6 +333,7 @@
searchForm.wayLineJobId=''
handleNodeClick({ id: userAreaCode.value });
handleSearch();
+ emit('Reset', searchForm);
};
// 下载
const downloadFun = () => {
@@ -342,7 +353,10 @@
const handleswitchFolders =()=>{
emit('handleswitchFolders');
}
-
+// 返回按钮
+const handleBack = ()=>{
+ emit('handleBack');
+}
onMounted(() => {
requestDockInfo();
getDownloadStatusApi({type: 'htsjzx'}).then(res =>{
@@ -352,7 +366,9 @@
})
});
-
+defineExpose({
+ handleReset,
+});
</script>
<style scoped lang="scss">
@@ -373,7 +389,7 @@
margin-right: 32px;
.downloadBtn{
- margin-left: 10px;
+ margin:0 10px;
position: relative;
display: flex;
align-items: center;
diff --git a/src/views/dataCenter/dataCenter.vue b/src/views/dataCenter/dataCenter.vue
index 7364ae9..df187a9 100644
--- a/src/views/dataCenter/dataCenter.vue
+++ b/src/views/dataCenter/dataCenter.vue
@@ -4,13 +4,16 @@
>
<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" class="dataTable">
@@ -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,11 +488,11 @@
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 => ({ ...i, checked: false }))
total.value = res.data.data.total
@@ -498,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 = () => {
@@ -514,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){
@@ -530,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;
diff --git a/src/views/job/components/JobRelatedEvents.vue b/src/views/job/components/JobRelatedEvents.vue
index 632db4f..2dd0b4a 100644
--- a/src/views/job/components/JobRelatedEvents.vue
+++ b/src/views/job/components/JobRelatedEvents.vue
@@ -13,7 +13,7 @@
<div class="itemchild">模糊查询:</div>
<el-input v-model="params.event_name" placeholder="请输入事件名称" clearable></el-input>
</div>
- <div class="item">
+ <!-- <div class="item">
<div class="itemchild">任务执行日期:</div>
<el-date-picker
popper-class="custom-date-picker"
@@ -25,7 +25,7 @@
:disabled-date="disabledDate"
@change="changeselect"
/>
- </div>
+ </div> -->
<div class="item">
<div class="itemchild">关联算法:</div>
<TaskAlgorithmBusiness :setWidth="186" :showAlgorithm="true" @algorithmChange="algorithmChange" />
diff --git a/src/views/job/components/SearchBox.vue b/src/views/job/components/SearchBox.vue
index b5b3da1..45a8aa7 100644
--- a/src/views/job/components/SearchBox.vue
+++ b/src/views/job/components/SearchBox.vue
@@ -360,7 +360,9 @@
searchForm.area_code = userAreaCode.value;
checked.value = 'month';
signDevice_sn.value = ''
- algorithmRef.value?.clear()
+ // 清除算法
+ dictKey.value = '';
+ // algorithmRef.value?.clear()
handleNodeClick({ id: userAreaCode.value });
handleSearch();
};
diff --git a/src/views/job/components/TaskTop/TaskTime.vue b/src/views/job/components/TaskTop/TaskTime.vue
index 9cf0611..b90fc81 100644
--- a/src/views/job/components/TaskTop/TaskTime.vue
+++ b/src/views/job/components/TaskTop/TaskTime.vue
@@ -31,6 +31,8 @@
formatter: '{b}: {c} 件',
},
legend: {
+ itemWidth: 8,
+ itemHeight: 12,
top: '2%',
textStyle: {
color: '#6B90B5',
--
Gitblit v1.9.3