From 0f16db42e4e331bfaf084c27ca602c275e87668d Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 28 Oct 2025 18:07:42 +0800
Subject: [PATCH] feat:渲染数据

---
 src/views/tickets/orderLog.vue |   49 ++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 0a6f5b5..312767f 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -320,7 +320,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="安全返航真高" prop="rth_altitude">
+            <el-form-item label="安全返航真高" prop="rth_altitude" class="safe-height">
               <el-input-number
                 v-model="form.rth_altitude"
                 :min="50"
@@ -490,7 +490,7 @@
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="6">
             <el-form-item label="关联航线" prop="file_id">
               <el-select
                 v-model="form.file_id"
@@ -506,6 +506,16 @@
                   :value="item.wayline_id"
                 />
               </el-select>
+            </el-form-item>
+          </el-col>
+          <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>
             </el-form-item>
           </el-col>
         </el-row>
@@ -579,7 +589,8 @@
 
           <el-col :span="3">
             <el-time-picker
-              style="width: 100px"
+            class="timeStyle"
+        :style="{width:pxToRem(140)}"
               v-model="form.deal_time"
               prop="deal_time"
               value-format="HH:mm"
@@ -710,7 +721,7 @@
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="6">
             <el-form-item label="关联航线" prop="file_id">
               <el-select v-model="form.file_id" placeholder="请选择航线" :disabled="true">
                 <el-option
@@ -720,6 +731,16 @@
                   :value="item.wayline_id"
                 />
               </el-select>
+            </el-form-item>
+          </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-form-item>
           </el-col>
         </el-row>
@@ -861,6 +882,7 @@
 </template>
 
 <script>
+import { pxToRem, pxToRemNum } from '@/utils/rem'
 import { calculateDefaultRange } from '@/utils/util';
 import {
   getList,
@@ -1305,14 +1327,18 @@
               return this.$message.warning('任务时间不能小于当前时间');
             }
           }
-          const maxItem = this.device_sns.reduce((max, item) => {
+          const maxItem = this.form.device_map_infos.reduce((max, item) => {
             return item.drone_height > max.drone_height ? item : max;
           });
-          console.log(maxItem, '高度');
+          console.log(maxItem.drone_height, '高度');
+          console.log(this.lastHeight, '最后一点高度');
           let result = _.round((maxItem.drone_height + this.form.rth_altitude), 2);
 
+          let resultHeight = this.lastHeight - maxItem.drone_height
+          let resultH = _.round(resultHeight, 2)
+
           if (this.lastHeight > result) {
-            this.$confirm(`安全返航真高${result}米低于航线返航点高度${this.lastHeight}米,为确保返航路径安全,建议您进行调整后再发布`, '提示', {
+            this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultH}米以上后进行发布`, '提示', {
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               type: 'warning'
@@ -1945,6 +1971,15 @@
   justify-content: center;
 }
 
+.safe-height {
+  :deep(.el-form-item__label) {
+    width: 120px !important;
+  }
+  :deep(.el-input-number) {
+    width: 180px !important;
+  }
+}
+
 .flex {
   display: flex;
 }

--
Gitblit v1.9.3