From 6b093b471607b1e31174f2157d824d7acf691646 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 14 Nov 2025 19:51:49 +0800
Subject: [PATCH] Merge branch 'feature/v8.0/8.0.2' into test
---
src/views/tickets/ticket.vue | 30 +++++++++++++-
src/api/tickets/ticket.js | 9 ++++
src/hooks/useRouteLine/useRouteLine.js | 11 +++--
src/views/tickets/orderLog.vue | 42 +++++++++++++-------
src/store/modules/common.js | 10 +++-
src/api/tickets/orderLog.js | 10 ++--
6 files changed, 82 insertions(+), 30 deletions(-)
diff --git a/src/api/tickets/orderLog.js b/src/api/tickets/orderLog.js
index 2179bc6..037bd05 100644
--- a/src/api/tickets/orderLog.js
+++ b/src/api/tickets/orderLog.js
@@ -88,11 +88,11 @@
// 获取返航最高 高度
export const getWaylineMaxTerrainHeight = data => {
- return request({
- url: `/drone-odm/odmTaskInfo/odmTaskInfo/getWaylineMaxTerrainHeight`,
- method: 'post',
- data,
- })
+ return request({
+ url: `/drone-odm/odmTaskInfo/odmTaskInfo/getWaylineMaxTerrainHeight`,
+ method: 'post',
+ data,
+ })
}
diff --git a/src/api/tickets/ticket.js b/src/api/tickets/ticket.js
index 9b1eeb8..a8cf0cb 100644
--- a/src/api/tickets/ticket.js
+++ b/src/api/tickets/ticket.js
@@ -103,4 +103,13 @@
url: `/drone-device-core/wayline/waylineJobInfo/createEventJob/${id}`,
method: 'post',
})
+}
+// 导出工单
+export const exportTheTicket = params => {
+ return request({
+ url: `/drone-device-core/jobEvent/downloadEvent`,
+ method: 'get',
+ responseType: 'blob',
+ params,
+ })
}
\ No newline at end of file
diff --git a/src/hooks/useRouteLine/useRouteLine.js b/src/hooks/useRouteLine/useRouteLine.js
index 6e4f50e..32c3d3a 100644
--- a/src/hooks/useRouteLine/useRouteLine.js
+++ b/src/hooks/useRouteLine/useRouteLine.js
@@ -51,7 +51,7 @@
resetCurRouteLineData()
- const { pointPlacemark, polygonList, templateType, startPoint, execute_height_mode, auto_flight_speed } =
+ const { pointPlacemark, polygonList, templateType, startPoint, execute_height_mode, auto_flight_speed, take_off_security_height } =
await analysisPointLineKmz(kmzUrl)
curRouteLineData.value = {
@@ -61,6 +61,7 @@
execute_height_mode,
auto_flight_speed,
wayline_type,
+ take_off_security_height,
infos: infos
}
@@ -194,9 +195,10 @@
height: 50,
},
})
- // 获取最后一点高度
- console.log(pointList, '查看数组最后一点高度')
- store.commit('setLastHeight', Number(pointList[pointList.length - 1].height))
+ // 获取航线拆分所有点
+ store.commit('setPositionsArr', pointList)
+ // 获取安全起飞高度
+ store.commit('setSafeHeight', curRouteLineData.value.take_off_security_height)
flyVisual({
positionsData:pointList.map(i => [Number(i.longitude), Number(i.latitude), Number(i.height)]),
viewer,
@@ -217,6 +219,7 @@
execute_height_mode: '',
auto_flight_speed: '',
wayline_type: '',
+ take_off_security_height: ''
}
}
diff --git a/src/store/modules/common.js b/src/store/modules/common.js
index c12ef73..ce4a88f 100644
--- a/src/store/modules/common.js
+++ b/src/store/modules/common.js
@@ -21,11 +21,15 @@
htsjzx: 100, //数据中心
htlsrwxq: 100, //历史任务详情
},
- lastHeight: 0, // 获取最后一点高度
+ safeHeight: 0, // 获取选择航线高度
+ positionsArr: [], // 获取选择航线点数据
},
mutations: {
- setLastHeight(state, data) {
- state.lastHeight = data
+ setSafeHeight (state, data) {
+ state.safeHeight = data
+ },
+ setPositionsArr(state, data) {
+ state.positionsArr = data
},
setDownloadProgress(state, data) {
state.downloadProgress = data
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 081072f..73cd26c 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -194,7 +194,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="安全返航真高" prop="rth_altitude" class="safe-height">
- <el-input-number v-model="form.rth_altitude" :min="50" :max="300"></el-input-number>
+ <el-input-number v-model="form.rth_altitude" :min="50" :max="500"></el-input-number>
</el-form-item>
</el-col>
</el-row>
@@ -325,7 +325,7 @@
<el-col :span="6">
<el-form-item label="安全返航真高" prop="rth_altitude" class="safe-height">
<el-input-number :disabled="detailTitle === '工单详情'" v-model="form.rth_altitude" :min="50"
- :max="300"></el-input-number>
+ :max="500"></el-input-number>
</el-form-item>
</el-col>
</el-row>
@@ -465,7 +465,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="安全返航真高" prop="rth_altitude" class="safe-height">
- <el-input-number :disabled="true" v-model="form.rth_altitude" :min="50" :max="300"></el-input-number>
+ <el-input-number :disabled="true" v-model="form.rth_altitude" :min="50" :max="500"></el-input-number>
</el-form-item>
</el-col>
</el-row>
@@ -570,7 +570,8 @@
orderLogExport,
jobStatusNum,
userPublish,
- deleteOrderLog
+ deleteOrderLog,
+ getWaylineMaxTerrainHeight
} from '@/api/tickets/orderLog'
import { getTicketInfo } from '@/api/tickets/ticket'
import { getDictionaryByCode } from '@/api/system/dictbiz'
@@ -825,9 +826,13 @@
return CircleClose
},
...mapGetters(['userInfo', 'permission']),
- lastHeight () {
- const height = this.$store.state.common.lastHeight
- return Number(height) || 0 // 确保是数字类型
+ safeHeight () {
+ const safeHeight = this.$store.state.common.safeHeight
+ return Number(safeHeight) || 0 // 确保是数字类型
+ },
+ positionsArr () {
+ const positionsArr = this.$store.state.common.positionsArr
+ return positionsArr || [] // 确保是数字类型
},
filteredTabs () {
// rejection_and_draft 权限控制“已驳回”和“草稿”tab
@@ -1007,15 +1012,22 @@
const maxItem = checkedList.reduce((max, item) => {
return item.drone_height > max.drone_height ? item : max;
});
- console.log(maxItem.drone_height, '高度');
- console.log(this.lastHeight, '最后一点高度');
- let result = _.round((maxItem.drone_height + this.form.rth_altitude), 2);
+ // 返航绝对高度
+ let backHeight = this.form.rth_altitude // + maxItem.drone_height
+ console.log(backHeight,'backHeight')
+ // 安全起飞高度
+ let positions = this.positionsArr
+ positions.unshift({latitude: maxItem.latitude, longitude: maxItem.longitude, height:maxItem.drone_height })
+ positions.push({latitude: maxItem.latitude, longitude: maxItem.longitude, height:maxItem.drone_height})
+ let resultHeight = 0
+ await getWaylineMaxTerrainHeight(positions).then(res => {
+ resultHeight = this.safeHeight > (res.data.data + 30) ? this.safeHeight : (res.data.data + 30)
+ })
+ let valueHeight = _.round(backHeight - resultHeight, 2)
+ console.log('打印比较值', valueHeight)
- let resultHeight = this.lastHeight - maxItem.drone_height
- let resultH = _.round(resultHeight, 2)
-
- if (this.lastHeight > result) {
- this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultH}米以上后进行发布`, '提示', {
+ if (valueHeight < 0) {
+ this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultHeight}米以上后进行发布`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 0c72aed..9909e85 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -206,6 +206,7 @@
@click="openReviewDialog"
>批量审核
</el-button>
+
<el-button
v-if="permissionList.exportBtn"
type="success"
@@ -232,7 +233,12 @@
>详情
</el-button>
</template>
-
+
+ <template v-if="row.status === 4 && activeTab === 'completed'">
+ <el-button type="text" icon="el-icon-download" @click="exportTheTick(row)"
+ >导出
+ </el-button>
+ </template>
<template v-if="permission.tickets_repeat_review">
<el-button
v-if="row.status === 4 && row.isReview !== 1"
@@ -1010,6 +1016,7 @@
getStepInfo,
getReviewById,
getCreateEventJob,
+ exportTheTicket
} from '@/api/tickets/ticket';
import { getSFDictionaryTree } from '@/api/job/task';
import { export_json_to_excel } from '@/utils/exportExcel';
@@ -1107,7 +1114,7 @@
{ label: '工单编号', prop: 'orderNumber', width: 170 },
{ label: '工单名称', prop: 'orderName', width: 150, overHidden: true, tooltip: true },
{ label: '所属部门', prop: 'department', overHidden: true, tooltip: true },
- { label: '发起时间', prop: 'startTime', width: 160, overHidden: true },
+ { label: '发起任务时间', prop: 'startTime', width: 160, overHidden: true },
{ label: '关联算法', prop: 'aiType', overHidden: true, tooltip: true },
{
label: '工单类型',
@@ -1838,7 +1845,7 @@
orderName: item.event_name,
department:
this.departments.find(d => d.value === item.dept_id)?.label || item.dept_name,
- startTime: item.create_time,
+ startTime: item.job_create_time || '/',
aiType: item.ai_types,
content: item.content, // 将后端返回的 content 映射为 content
type: item.work_order_type_dict_key,
@@ -3188,6 +3195,23 @@
});
}
},
+ // 导出工单报表
+ exportTheTick(row){
+ const params = {
+ num:row.orderNumber
+ }
+ exportTheTicket(params).then(res=>{
+ const elink = document.createElement('a')
+ elink.download = row.orderName + '.docx'
+ elink.style.display = 'none'
+ const blob = new Blob([res.data])
+ elink.href = URL.createObjectURL(blob)
+ document.body.appendChild(elink)
+ elink.click()
+ document.body.removeChild(elink)
+ })
+ this.$message.success('数据导出成功');
+ }
},
activated() {
this.handleReset();
--
Gitblit v1.9.3