From fa66a91747f1dcdf4d64f4f7c60275927dce8fea Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 24 Oct 2025 17:18:05 +0800
Subject: [PATCH] feat:更新返航高度

---
 src/views/tickets/orderLog.vue |   43 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 46e87d8..e9ebe1f 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>
@@ -711,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
@@ -721,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>
@@ -1310,11 +1330,15 @@
           const maxItem = this.device_sns.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'
@@ -1947,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