From 39abebc6d54083556a393441e0628bc3d93b46c7 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Sat, 25 Oct 2025 13:54:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/feature/v7.0/7.0.2' into feature/v7.0/7.0.2

---
 src/views/tickets/orderLog.vue | 1218 ++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 813 insertions(+), 405 deletions(-)

diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 177f6ce..e9ebe1f 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -1,13 +1,3 @@
-<!--
- * @Author: shuishen 1109946754@qq.com
- * @Date: 2025-04-15 20:02:29
- * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2025-04-28 11:38:16
- * @FilePath: \drone-web-manage\src\views\tickets\orderLog.vue
- * @Description: 
- * 
- * Copyright (c) 2025 by shuishen, All Rights Reserved. 
--->
 <template>
   <basic-container>
     <el-tabs v-model="activeTab" @tab-click="handleTabChange">
@@ -17,135 +7,157 @@
         :label="`${tab.label} (${tab.count})`"
         :name="tab.name"
       >
-        <div class="tab-content">
+        <basic-main-content>
           <!-- 查询条件筛选栏 -->
-          <div class="filter-bar">
-            <div class="search-bar-box">
-              <div class="search-bar-box-item">
-                <el-input
-                  v-model="filters.key_word"
-                  placeholder="输入工单编号/名称/内容/姓名"
-                  clearable
-                  @keyup.enter="handleSearch"
-                />
-              </div>
+          <div class="ztzf-form-search">
+            <el-form :model="filters" inline>
+              <el-row :gutter="24">
+                <el-col :span="4">
+                  <el-form-item label="关键字:">
+                    <el-input
+                      v-model="filters.key_word"
+                      placeholder="编号/名称/内容/姓名"
+                      clearable
+                      @keyup.enter="handleSearch"
+                    />
+                  </el-form-item>
 
-              <div class="search-bar-box-item">
-                <el-select
-                  placeholder="请选择所属单位"
-                  v-model="filters.create_dept"
-                 
-                  clearable
-                >
-                  <el-option
-                    v-for="dept in departments"
-                    :key="dept.value"
-                    :label="dept.label"
-                    :value="dept.value"
-                  />
-                </el-select>
-              </div>
+                  <!--              <div class="search-bar-box-item">-->
+                  <!--                <el-select placeholder="请选择所属单位" v-model="filters.create_dept" clearable>-->
+                  <!--                  <el-option v-for="dept in departments" :key="dept.value" :label="dept.label" :value="dept.value" />-->
+                  <!--                </el-select>-->
+                  <!--              </div>-->
 
-              <div class="search-bar-box-item">
-                <el-date-picker
-                  v-model="filters.dateRange"
-                  type="daterange"
-                  range-separator="至"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                  :default-value="datePickerDefaultVal"
-                />
-              </div>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="选择日期:">
+                    <el-date-picker
+                      @change="handleSearch"
+                      v-model="filters.dateRange"
+                      type="daterange"
+                      range-separator="至"
+                      start-placeholder="开始日期"
+                      end-placeholder="结束日期"
+                      :default-value="datePickerDefaultVal"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="4">
+                  <el-form-item label="关联航线:">
+                    <el-select
+                      @change="handleSearch"
+                      v-model="filters.file_id"
+                      placeholder="请选择关联航线"
+                      filterable
+                      clearable
+                    >
+                      <el-option
+                        v-for="item in wayLineList"
+                        :key="item.wayline_id"
+                        :label="item.name"
+                        :value="item.wayline_id"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="4">
+                  <el-form-item label="关联算法:">
+                    <el-select
+                      @change="handleSearch"
+                      v-model="filters.ai_types"
+                      placeholder="关联算法"
+                      clearable
+                    >
+                      <el-option
+                        v-for="item in ai_types"
+                        :key="item.dictKey"
+                        :label="item.dictValue"
+                        :value="item.dictKey"
+                      />
+                    </el-select>
+                  </el-form-item>
 
-              <div class="search-bar-box-item">
-                <el-select v-model="filters.file_id" placeholder="请选择关联航线" clearable>
-                  <el-option
-                    v-for="item in wayLineList"
-                    :key="item.wayline_id"
-                    :label="item.name"
-                    :value="item.wayline_id"
-                  />
-                </el-select>
-              </div>
+                  <!-- <div class="search-bar-box-item">
+                    <el-select v-model="filters.type" placeholder="请选择工单类型" clearable>
+                      <el-option v-for="item in types" :key="item.dictValue" :label="item.dictValue"
+                        :value="item.dictKey" />
+                    </el-select>
+                  </div> -->
 
-              <div class="search-bar-box-item">
-                <el-select v-model="filters.ai_types" placeholder="关联算法" clearable>
-                  <el-option
-                    v-for="item in ai_types"
-                    :key="item.dictKey"
-                    :label="item.dictValue"
-                    :value="item.dictKey"
-                  />
-                </el-select>
-              </div>
-
-              <div class="search-bar-box-item">
-                <el-select v-model="filters.type" placeholder="请选择工单类型" clearable>
-                  <el-option
-                    v-for="item in types"
-                    :key="item.dictValue"
-                    :label="item.dictValue"
-                    :value="item.dictKey"
-                  />
-                </el-select>
-              </div>
-
-              <div class="search-bar-box-item">
-                <el-select v-model="filters.status" placeholder="请选择工单状态" clearable>
-                  <el-option
-                    v-for="item in statuses"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
-                </el-select>
-              </div>
-            </div>
-
-            <div class="search-bar-box">
-              <div class="search-bar-box-item flex-2">
-                <el-date-picker
-                  v-model="filters.cycleDateRange"
-                  type="daterange"
-                  range-separator="至"
-                  start-placeholder="工单周期开始日期"
-                  end-placeholder="工单周期结束日期"
-                  :default-value="datePickerDefaultVal"
-                />
-              </div>
-
-              <div class="search-bar-box-item">
-                <el-select v-model="filters.rep_fre_type" placeholder="请选择频次">
-                  <el-option v-for="item in cycles" :key="item" :label="item" :value="item" />
-                </el-select>
-              </div>
-
-              <div class="search-bar-box-item">
-                <el-time-picker
-                  v-model="filters.deal_time"
-                  placeholder="请选择执行时间"
-                  prop="deal_time"
-                  value-format="HH:mm"
-                  :picker-options="{
+                </el-col>
+                <el-col :span="4">
+                  <el-form-item label="工单状态:">
+                    <el-select
+                      @change="handleSearch"
+                      v-model="filters.status"
+                      placeholder="请选择工单状态"
+                      clearable
+                      :disabled="activeTab !== 'all'"
+                    >
+                      <el-option
+                        v-for="item in statuses"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                </el-row>
+                <el-row :gutter="24">
+                  <el-col :span="8">
+                    <el-form-item label="工单周期:">
+                      <el-date-picker
+                        @change="handleSearch"
+                        v-model="filters.cycleDateRange"
+                        type="daterange"
+                        range-separator="至"
+                        start-placeholder="工单周期开始日期"
+                        end-placeholder="工单周期结束日期"
+                        :default-value="datePickerDefaultVal"
+                      />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="4">
+                    <el-form-item label="选择频次:">
+                      <el-select
+                        @change="handleSearch"
+                        v-model="filters.rep_fre_type"
+                        placeholder="请选择频次"
+                        clearable
+                      >
+                        <el-option v-for="item in cycles" :key="item" :label="item" :value="item" />
+                      </el-select>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="4">
+                    <el-form-item label="执行时间:">
+                      <el-time-picker
+                        @change="handleSearch"
+                        v-model="filters.deal_time"
+                        placeholder="请选择执行时间"
+                        prop="deal_time"
+                        value-format="HH:mm"
+                        :picker-options="{
                     selectableRange: '00:00 - 23:59',
                   }"
-                />
-              </div>
-
-              <div class="search-bar-box-item"></div>
-              <div class="search-bar-box-item"></div>
-
-              <div class="search-bar-box-item search-btn">
-                <el-button type="primary" icon="el-icon-search" @click="handleSearch"
-                  >搜索</el-button
-                >
-                <el-button icon="el-icon-refresh" @click="handleReset">清空</el-button>
-              </div>
-            </div>
+                      />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="4">
+                    <el-button type="primary" icon="el-icon-search" @click="handleSearch"
+                    >搜索
+                    </el-button
+                    >
+                    <el-button icon="el-icon-refresh" @click="handleReset">清空</el-button>
+                  </el-col>
+                </el-row>
+            </el-form>
           </div>
 
           <!-- 表格部分 -->
           <avue-crud
+            class="ztzf-public-general-avue-crud"
             :data="tableData"
             :option="option"
             v-model:page="page"
@@ -156,17 +168,32 @@
             @on-load="onLoad"
             @search-change="searchChange"
             @size-change="sizeChange"
+            v-if="activeTab === tab.name"
           >
+            <template #job_info_num="{ row }">
+              <el-tooltip-copy :content="row.job_info_num" :showCopyText="true" textAlign="left">
+                {{ row.job_info_num }}
+              </el-tooltip-copy>
+            </template>
+
+            <template #name="{ row }">
+              <el-tooltip-copy :content="row.name" :showCopyText="true" textAlign="left">
+                {{ row.name }}
+              </el-tooltip-copy>
+            </template>
+
             <template #menu-left>
               <el-button
                 v-if="hasAddBtnPermission() && activeTab != 'WAIT_AUDIT'"
                 type="primary"
                 icon="el-icon-plus"
                 @click="handleAdd"
-                >新建工单</el-button
+              >新建工单
+              </el-button
               >
               <el-button type="success" plain icon="el-icon-download" @click="exportData"
-                >导出</el-button
+              >导出
+              </el-button
               >
             </template>
 
@@ -178,40 +205,65 @@
                     type="text"
                     icon="el-icon-view"
                     @click="handleCheckDetail(row)"
-                    >审核</el-button
+                  >审核
+                  </el-button
                   >
                 </template>
-
-                <template
-                  v-if="
+                <!-- v-if="
                     (userInfo.user_id == row.create_user || hasRecallPaddingBtnPermission()) &&
                     row.status == 1
-                  "
-                >
+                  " -->
+                <template v-if="row.status == 1">
                   <!--待审核状态-->
-                  <el-button type="text" icon="el-icon-warning" @click="orderLogRecall(row.id)"
-                    >撤回</el-button
+                  <el-button
+                    type="text"
+                    icon="el-icon-warning"
+                    v-if="hasRecallPaddingBtnPermission()"
+                    @click="orderLogRecall(row.id)"
+                  >撤回
+                  </el-button
                   >
+                  <!-- <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">详情</el-button> -->
                 </template>
                 <!--已驳回-->
                 <template v-if="row.status == 2">
                   <el-button type="text" icon="el-icon-warning" @click="rejectDetail(row.id)"
-                    >驳回原因</el-button
+                  >驳回原因
+                  </el-button
+                  >
+                  <el-button
+                    v-if="userInfo.user_id == row.create_user"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleViewDetail(row)"
+                  >编辑
+                  </el-button
+                  >
+                  <el-button v-else type="text" icon="el-icon-view" @click="handleViewDetail(row)"
+                  >详情
+                  </el-button
+                  >
+                </template>
+                <!-- 已通过 -->
+                <template v-if="row.status == 3">
+                  <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)"
+                  >详情
+                  </el-button
                   >
                 </template>
                 <!--草稿-->
-                <el-button type="text" icon="el-icon-edit" @click="handleViewDetail(row)"
-                  >编辑</el-button
-                >
-                <el-button type="text" icon="el-icon-position" @click="userPublishPush(row.id)"
-                  >发起</el-button
-                >
-                <el-button type="text" icon="el-icon-delete" @click="deleteOrderLog(row.id)"
-                  >删除</el-button
-                >
-                <template v-if="row.status == 3 || row.status == 1 || row.status == 2">
-                  <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)"
-                    >详情</el-button
+                <template v-if="row.status == 0">
+                  <el-button type="text" icon="el-icon-edit" @click="handleViewDetail(row)"
+                  >编辑
+                  </el-button
+                  >
+                  <el-button type="text" icon="el-icon-position" @click="userPublishPush(row.id)"
+                  >发布
+                  </el-button
+                  >
+                  <el-button type="text" icon="el-icon-delete" @click="deleteOrderLog(row.id)"
+                  >删除
+                  </el-button
                   >
                 </template>
               </div>
@@ -225,12 +277,13 @@
               </el-tooltip>
             </template>
           </avue-crud>
-        </div>
+        </basic-main-content>
       </el-tab-pane>
     </el-tabs>
 
     <!-- 新建工单对话框 -->
     <el-dialog
+      class="ztzf-dialog-mange"
       v-model="dialogVisible"
       title="新建工单"
       width="70%"
@@ -249,9 +302,14 @@
               ></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="请选择航线" @change="getFlyingNestBy">
+              <el-select
+                v-model="form.file_id"
+                placeholder="请选择航线"
+                filterable
+                @change="getFlyingNestBy"
+              >
                 <el-option
                   v-for="item in wayLineList"
                   :key="item.wayline_id"
@@ -261,11 +319,25 @@
               </el-select>
             </el-form-item>
           </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-form-item>
+          </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="关联机巢" prop="device_sns">
-              <el-select v-model="form.device_sns" placeholder="请选择机巢" multiple>
+              <el-select
+                v-model="form.device_sns"
+                placeholder="请选择机巢"
+                multiple
+                :disabled="!device_sns.length"
+              >
                 <el-option
                   v-for="item in device_sns"
                   :key="item.device_sn"
@@ -311,6 +383,7 @@
                 range-separator="至"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
+                :disabled-date="disabledDate"
               />
             </el-form-item>
           </el-col>
@@ -342,17 +415,27 @@
           </el-col>
         </el-row>
 
-        <el-row>
-          <div class="add-box-btns">
-            <el-button type="danger" @click="submitForm(1)">发起</el-button>
-            <el-button type="primary" @click="submitForm(0)">存草稿</el-button>
-          </div>
-        </el-row>
+        <!--        <el-row>-->
+        <!--          <div class="add-box-btns">-->
+        <!--            <el-button type="danger" @click="submitForm(1)">发起</el-button>-->
+        <!--            <el-button type="primary" @click="submitForm(0)">存草稿</el-button>-->
+        <!--            <el-button @click="dialogVisible = false">取消</el-button>-->
+        <!--          </div>-->
+        <!--        </el-row>-->
       </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="danger" @click="submitForm(1)" icon="el-icon-position">发起</el-button>
+          <el-button type="primary" @click="submitForm(0)" icon="el-icon-document-add">存草稿</el-button>
+          <el-button @click="dialogVisible = false" icon="el-icon-circle-close">取消</el-button>
+        </div>
+      </template>
     </el-dialog>
 
     <!-- 工单详情对话框 -->
     <el-dialog
+      class="ztzf-dialog-mange"
+      align-center
       v-model="detailVisible"
       :title="detailTitle"
       width="70%"
@@ -360,10 +443,10 @@
       @close="resetForm"
     >
       <div class="event-title-center">{{ form.name }}</div>
-      <el-form :model="form" ref="testform" label-width="100px">
+      <el-form :model="form" :rules="rules" ref="testform" label-width="100px">
         <div class="custom-steps-container">
           <!-- 标题行 -->
-          <div class="steps-titles">
+          <div class="steps-titles" v-if="filters.status !== '0'">
             <div
               v-for="(record, index) in form.record_list"
               :class="{ active: record.user_id >= 0 }"
@@ -375,24 +458,18 @@
           </div>
 
           <!-- Element Steps 组件 -->
-          <el-steps :active="form.active" align-center class="custom-steps">
+          <el-steps
+            :active="form.active"
+            align-center
+            class="custom-steps"
+            v-if="filters.status !== '0'"
+          >
             <el-step v-for="(record, index) in form.record_list" :key="index">
               <template #description>
                 <span class="step-description" style="position: relative; display: inline-block">
                   {{ record.user_name }}
                 </span>
-                <span
-                  style="
-                    position: absolute;
-                    left: 80%;
-                    top: 50%;
-                    transform: translateY(-50%);
-                    width: 100px;
-                    margin-left: 4px;
-                    color: #666;
-                    font-size: 12px;
-                  "
-                >
+                <span class="step-timer">
                   {{ record.interval_time_str }}
                 </span>
                 <div class="step-description">
@@ -406,12 +483,22 @@
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="工单名称" prop="name">
-              <el-input v-model="form.name" placeholder="请输入工单名称"></el-input>
+              <el-input
+                v-model="form.name"
+                placeholder="请输入工单名称"
+                :disabled="detailTitle === '工单详情'"
+              ></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="请选择航线" @change="getFlyingNestBy">
+              <el-select
+                v-model="form.file_id"
+                placeholder="请选择航线"
+                @change="getFlyingNestBy"
+                filterable
+                :disabled="detailTitle === '工单详情'"
+              >
                 <el-option
                   v-for="item in wayLineList"
                   :key="item.wayline_id"
@@ -421,11 +508,26 @@
               </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>
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="关联机巢" prop="device_sns">
-              <el-select v-model="form.device_sns" placeholder="请选择机巢" multiple>
+              <el-select
+                v-model="form.device_sns"
+                placeholder="请选择机巢"
+                multiple
+                :disabled="detailTitle === '工单详情'"
+              >
                 <el-option
                   v-for="item in device_sns"
                   :key="item.device_sn"
@@ -437,7 +539,12 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="关联算法" prop="ai_types">
-              <el-select v-model="form.ai_types" placeholder="请选择关联算法" multiple>
+              <el-select
+                v-model="form.ai_types"
+                placeholder="请选择关联算法"
+                multiple
+                :disabled="detailTitle === '工单详情'"
+              >
                 <el-option
                   v-for="item in ai_types"
                   :key="item.dictKey"
@@ -464,25 +571,33 @@
                 range-separator="至"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
+                :disabled-date="disabledDate"
+                :disabled="detailTitle === '工单详情'"
               />
             </el-form-item>
           </el-col>
 
           <el-col :span="3">
-            <el-select v-model="form.rep_fre_type" placeholder="请选择频次">
+            <el-select
+              v-model="form.rep_fre_type"
+              placeholder="请选择频次"
+              :disabled="detailTitle === '工单详情'"
+            >
               <el-option v-for="item in cycles" :key="item" :label="item" :value="item" />
             </el-select>
           </el-col>
 
           <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"
               :picker-options="{
                 selectableRange: '00:00 - 23:59',
               }"
+              :disabled="detailTitle === '工单详情'"
             />
           </el-col>
         </el-row>
@@ -497,6 +612,7 @@
                 placeholder="请输入工单内容"
                 maxlength="255"
                 show-word-limit
+                :disabled="detailTitle === '工单详情'"
               ></el-input>
             </el-form-item>
           </el-col>
@@ -507,37 +623,50 @@
             <map-container v-if="detailVisible" ref="MapContainer"></map-container>
           </el-col>
         </el-row>
-
-        <el-row>
-          <div class="add-box-btns">
-            <el-button
-              type="danger"
-              v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)"
-              @click="submitForm(1)"
-              >发布</el-button
-            >
-            <!-- <el-button type="primary" v-if="form.status == 0 || userInfo.user_id == form.create_user"
-                            @click="submitForm(0)">保存</el-button> -->
-
-            <el-button
-              type="primary"
-              v-if="form.status == 1 && this.permission.orderLogpass"
-              @click="orderLogPass(form.id)"
-              >通过</el-button
-            >
-            <el-button
-              type="danger"
-              v-if="form.status == 1 && hasRejectionBtnPermission()"
-              @click="orderLogReject(form.id)"
-              >驳回</el-button
-            >
-          </div>
-        </el-row>
       </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button
+            type="danger"
+            v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)"
+            @click="submitForm(1)"
+            icon="el-icon-position"
+          >发布
+          </el-button
+          >
+          <el-button
+            type="primary"
+            v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)"
+            @click="submitForm(0)"
+            icon="el-icon-plus"
+          >保存
+          </el-button
+          >
+          <!-- <el-button type="primary" v-if="form.status == 0 || userInfo.user_id == form.create_user"
+                          @click="submitForm(0)">保存</el-button> -->
+
+          <el-button
+            type="primary"
+            v-if="form.status == 1 && hasPaddingBtnPermission()"
+            @click="orderLogPass(form.id)"
+          >通过
+          </el-button
+          >
+          <el-button
+            type="danger"
+            v-if="form.status == 1 && hasRejectionBtnPermission()"
+            @click="orderLogReject(form.id)"
+          >驳回
+          </el-button
+          >
+        </div>
+      </template>
     </el-dialog>
 
     <!-- 工单详情 -->
     <el-dialog
+      class="ztzf-dialog-mange"
+      align-center
       v-model="detailVisibleCopy"
       title="工单详情"
       width="70%"
@@ -548,7 +677,7 @@
       <el-form :model="form" ref="testform" label-width="100px">
         <div class="custom-steps-container">
           <!-- 标题行 -->
-          <div class="steps-titles">
+          <div class="steps-titles" v-if="filters.status !== '0'">
             <div
               v-for="(record, index) in form.record_list"
               :class="{ active: record.user_id >= 0 }"
@@ -560,24 +689,18 @@
           </div>
 
           <!-- Element Steps 组件 -->
-          <el-steps :active="form.active" align-center class="custom-steps">
+          <el-steps
+            :active="form.active"
+            align-center
+            class="custom-steps"
+            v-if="filters.status !== '0'"
+          >
             <el-step v-for="(record, index) in form.record_list" :key="index">
               <template #description>
                 <span class="step-description" style="position: relative; display: inline-block">
                   {{ record.user_name }}
                 </span>
-                <span
-                  style="
-                    position: absolute;
-                    left: 80%;
-                    top: 50%;
-                    transform: translateY(-50%);
-                    width: 100px;
-                    margin-left: 4px;
-                    color: #666;
-                    font-size: 12px;
-                  "
-                >
+                <span class="step-timer">
                   {{ record.interval_time_str }}
                 </span>
                 <div class="step-description">
@@ -598,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
@@ -608,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>
@@ -711,38 +844,45 @@
           </el-col>
         </el-row>
 
-        <el-row>
-          <div class="add-box-btns">
-            <el-button
-              type="danger"
-              v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)"
-              @click="submitForm(1)"
-              >发布</el-button
-            >
-            <!-- <el-button type="primary" v-if="form.status == 0 || userInfo.user_id == form.create_user"
-                            @click="submitForm(0)">保存</el-button> -->
-
-            <el-button
-              type="primary"
-              v-if="form.status == 1 && this.permission.orderLogpass"
-              @click="orderLogPass(form.id)"
-              >通过</el-button
-            >
-            <el-button
-              type="danger"
-              v-if="form.status == 1 && hasRejectionBtnPermission()"
-              @click="orderLogReject(form.id)"
-              >驳回</el-button
-            >
-            <el-button @click="detailVisibleCopy = false">取消</el-button>
-          </div>
-        </el-row>
       </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button
+            type="danger"
+            v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)"
+            @click="submitForm(1)"
+            icon="el-icon-position"
+          >发布
+          </el-button
+          >
+          <!-- <el-button type="primary" v-if="form.status == 0 || userInfo.user_id == form.create_user"
+                          @click="submitForm(0)">保存</el-button> -->
+
+          <el-button
+            type="primary"
+            v-if="form.status == 1 && hasPaddingBtnPermission()"
+            @click="orderLogPass(form.id)"
+            icon="el-icon-check"
+          >通过
+          </el-button
+          >
+          <el-button
+            type="danger"
+            v-if="form.status == 1 && hasRejectionBtnPermission()"
+            @click="orderLogReject(form.id)"
+            icon="el-icon-close"
+          >驳回
+          </el-button
+          >
+          <el-button @click="detailVisibleCopy = false" icon="el-icon-circle-close">取消</el-button>
+        </div>
+      </template>
     </el-dialog>
   </basic-container>
 </template>
 
 <script>
+import { pxToRem, pxToRemNum } from '@/utils/rem'
 import { calculateDefaultRange } from '@/utils/util';
 import {
   getList,
@@ -754,11 +894,11 @@
   orderLogExport,
   jobStatusNum,
   userPublish,
-  deleteOrderLog,
+  deleteOrderLog
 } from '@/api/tickets/orderLog';
 import { getTicketInfo } from '@/api/tickets/ticket';
 import { getDictionaryByCode } from '@/api/system/dictbiz';
-import { getWaylineFileListByArea } from '@/api/resource/wayline';
+import { getWaylineFileListByArea, newGetWorkspacesPage } from '@/api/resource/wayline';
 import { export_json_to_excel } from '@/utils/exportExcel';
 import { getFlyingNestBy } from '@/api/device/device';
 import { mapGetters } from 'vuex';
@@ -766,19 +906,32 @@
 import { downloadXls } from '@/utils/util';
 import 'nprogress/nprogress.css';
 import { analyzeKmzFile, removeTextKey, XMLToJSON } from '@/utils/cesium/kmz';
+import dayjs from 'dayjs';
+import 'dayjs/locale/zh-cn'; // 导入中文语言包
+import weekday from 'dayjs/plugin/weekday';
+import elTooltipCopy from '@/components/ElTooltipCopy.vue';
+import { CircleClose, Promotion, Select } from '@element-plus/icons-vue';
+import { useStore } from 'vuex';
+import _ from 'lodash';
+// const store = useStore()
+dayjs.extend(weekday);
+dayjs.locale('zh-cn');
+
+// const lastHeight = computed(() => store.state.common.lastHeight)
 
 export default {
+  components: { elTooltipCopy },
   name: 'TicketPage',
   data() {
     return {
       activeTab: 'all',
-
+      getlastHeight: 0,
       tabs: [
         { label: '全部工单', name: 'all', value: null, count: 0 },
         { label: '待审核', name: 'WAIT_AUDIT', value: 1, count: 0 },
         { label: '已驳回', name: 'REJECTED', value: 2, count: 0 },
         { label: '已通过', name: 'PASS', value: 3, count: 0 },
-        { label: '草稿', name: 'DRAFT', value: 0, count: 0 },
+        { label: '草稿', name: 'DRAFT', value: 0, count: 0 }
       ],
       filters: {
         key_word: '',
@@ -788,7 +941,7 @@
         file_id: '',
         ai_types: [],
         status: '',
-        dateRange: [],
+        dateRange: []
       },
       departments: [],
       types: [],
@@ -802,10 +955,10 @@
         { label: '草稿', value: '0' },
         { label: '待审核', value: '1' },
         { label: '已驳回', value: '2' },
-        { label: '已通过', value: '3' },
+        { label: '已通过', value: '3' }
       ],
       //周期
-      cycles: ['周一', '周二', '周三', '周四', '周五', '周六', '周末', '周天', '工作日', '每天'],
+      cycles: ['每天', '周一', '周二', '周三', '周四', '周五', '周六', '周末', '周天', '工作日'],
 
       tableData: [],
       option: {
@@ -814,9 +967,9 @@
         indexLabel: '序号',
         indexFixed: true,
 
-        align: 'center',
+        align: 'left',
         border: true,
-        stripe: true,
+        stripe: false,
         searchShow: true,
         searchBtnText: '搜索',
         searchMenuSpan: 6,
@@ -831,20 +984,93 @@
         menu: true,
         menuWidth: 210,
         menuClassName: 'cur-menu',
-        column: [
-          { label: '工单编号', prop: 'job_info_num', width: 100, ellipsis: true, overHidden: true },
-          { label: '工单名称', prop: 'name', width: 100, ellipsis: true, overHidden: true },
-          { label: '工单状态', prop: 'status', width: 88 },
-          { label: '所属单位', prop: 'dept_name', width: 100, ellipsis: true },
-          { label: '发起时间', prop: 'create_time', width: 144, ellipsis: true },
-          { label: '已执行次数', prop: 'job_num', width: 96, ellipsis: true },
-          { label: '工单内容', prop: 'content', ellipsis: true, overHidden: true },
-          { label: '关联航线', prop: 'wayline_name', width: 100, ellipsis: true, overHidden: true },
-          { label: '关联算法', prop: 'ai_type_str', width: 100, ellipsis: true, overHidden: true },
-          { label: '关联机巢', prop: 'device_names', width: 100, ellipsis: true, overHidden: true },
 
-          { label: '创建人', prop: 'creator_name', width: 96, ellipsis: true, overHidden: true },
-          { label: '关联机巢', prop: 'device_names', width: 112, ellipsis: true, overHidden: true },
+        height: 'auto',
+        calcHeight: 196,
+
+        column: [
+          {
+            label: '工单编号',
+            prop: 'job_info_num',
+            width: 150
+          },
+          {
+            label: '工单名称',
+            prop: 'name',
+            width: 100,
+            ellipsis: true,
+            overHidden: true,
+            showOverflowTooltip: true
+          },
+          {
+            label: '工单状态',
+            prop: 'status',
+            width: 88,
+            showOverflowTooltip: true
+          },
+          {
+            label: '所属单位',
+            prop: 'dept_name',
+            ellipsis: true,
+            showOverflowTooltip: true
+          },
+          {
+            label: '创建时间',
+            prop: 'create_time',
+            width: 144,
+            ellipsis: true,
+            showOverflowTooltip: true
+          },
+          {
+            label: '已执行次数',
+            prop: 'job_num',
+            width: 70,
+            ellipsis: true,
+            showOverflowTooltip: true
+          },
+          {
+            label: '工单内容',
+            prop: 'content',
+            ellipsis: true,
+            overHidden: true,
+            showOverflowTooltip: true
+          },
+          {
+            label: '关联航线',
+            prop: 'wayline_name',
+            ellipsis: true,
+            overHidden: true,
+            showOverflowTooltip: true
+          },
+          {
+            label: '关联算法',
+            prop: 'ai_type_str',
+            width: 100,
+            ellipsis: true,
+            overHidden: true,
+            showOverflowTooltip: true
+          },
+          {
+            label: '关联机巢',
+            prop: 'device_names',
+            width: 100,
+            ellipsis: true,
+            overHidden: true,
+            showOverflowTooltip: true
+          },
+
+          {
+            label: '创建人',
+            prop: 'creator_name',
+            width: 96,
+            ellipsis: true,
+            overHidden: true,
+            showOverflowTooltip: true
+          },
+          // {
+          //   label: '关联机巢', prop: 'device_names', width: 112, ellipsis: true, overHidden: true,
+          //   showOverflowTooltip: true,
+          // },
           {
             label: '工单周期频次',
             prop: '',
@@ -852,15 +1078,16 @@
             formatter: row => this.formatCycleTime(row),
             html: true,
             ellipsis: true,
+            showOverflowTooltip: true
             // overHidden: true
-          },
-        ],
+          }
+        ]
       },
 
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0,
+        total: 0
       },
       dialogVisible: false,
       detailVisible: false,
@@ -869,25 +1096,24 @@
       rules: {
         name: [
           { required: true, message: '请输入工单名称', trigger: 'blur' },
-          { max: 100, message: '工单名称不能超过100个字', trigger: 'blur' },
+          { max: 100, message: '工单名称不能超过100个字', trigger: 'blur' }
         ],
         file_id: [{ required: true, message: '需要选择航线', trigger: 'change' }],
         device_sns: [{ required: true, message: '请选择机巢', trigger: 'change' }],
-        ai_types: [{ required: true, message: '请选择算法', trigger: 'change' }],
         content: [
           { required: true, message: '请输入工单内容', trigger: 'blur' },
-          { max: 255, message: '工单内容不能超过255个字', trigger: 'blur' },
+          { max: 255, message: '工单内容不能超过255个字', trigger: 'blur' }
         ],
         date_range: [{ required: true, message: '请选择时间不能为空', trigger: 'blur' }],
         rep_fre_type: [{ required: true, message: '请选择周期', trigger: 'blur' }],
-        deal_time: [{ required: true, message: '请选择执行时间', trigger: 'blur' }],
+        deal_time: [{ required: true, message: '请选择执行时间', trigger: 'blur' }]
       },
       loading: false,
       globalCounts: {},
       mapLoaded: false,
 
       // 配置时间选择器默认配置
-      datePickerDefaultVal: calculateDefaultRange(),
+      datePickerDefaultVal: calculateDefaultRange()
     };
   },
   async created() {
@@ -901,22 +1127,36 @@
     const { dept_data, event_type, ai_type } = response2.data.data;
     this.departments = dept_data.map(item => ({
       label: item.dept_name,
-      value: item.id,
+      value: item.id
     }));
   },
   mounted() {
     this.fetchTableData();
     const id = this.$route.query.id;
-   if (id) { // 确保 id 存在
-    this.handleViewDetail({ id });
-  } else {
-    console.error('工单ID不存在!');
-  }
+    console.log('idddddd', id);
+
+    if (id) {
+      // 确保 id 存在
+      this.handleViewDetail({ id });
+      const find = this.$store.state.tags.bsTagList.find(i => i.path === '/tickets/orderLog');
+      find && (find.query = {});
+    } else {
+      console.error('工单ID不存在!');
+    }
   },
   computed: {
+    CircleClose() {
+      return CircleClose;
+    },
     ...mapGetters(['userInfo', 'permission']),
+    lastHeight() {
+      const height = this.$store.state.common.lastHeight;
+      return Number(height) || 0; // 确保是数字类型
+    },
     filteredTabs() {
       // rejection_and_draft 权限控制“已驳回”和“草稿”tab
+      // console.log(this.permission, '权限信息')
+      // console.log(this.userInfo, '权限信息22')
       const canShowRejectAndDraft = this.permission?.rejection_and_draft === true;
       return this.tabs
         .map(tab => {
@@ -929,10 +1169,36 @@
           return { ...tab, isShow: true };
         })
         .filter(tab => tab.isShow);
-    },
+    }
   },
 
   methods: {
+    handleCellClick(row, column) {
+      if (column.no === 1) {
+        navigator.clipboard.writeText(row.job_info_num).then(() => {
+          this.$message.success('复制工单编号成功');
+        });
+      } else if (column.no === 2) {
+        navigator.clipboard.writeText(row.name).then(() => {
+          this.$message.success('复制工单名称成功');
+        });
+      } else if (column.no === 4) {
+        navigator.clipboard.writeText(row.dept_name).then(() => {
+          this.$message.success('复制所属单位成功');
+        });
+      } else if (column.no === 8) {
+        navigator.clipboard.writeText(row.wayline_name).then(() => {
+          this.$message.success('复制关联航线成功');
+        });
+      } else if (column.no === 9) {
+        navigator.clipboard.writeText(row.ai_type_str).then(() => {
+          this.$message.success('复制关联算法成功');
+        });
+      }
+    },
+    disabledDate(time) {
+      return time.getTime() < Date.now() - 8.64e7; // 86400000 = 24 * 60 * 60 * 1000
+    },
     searchChange(params, done) {
       // console.log('searchChange')
       this.query = params;
@@ -1035,7 +1301,7 @@
         rep_fre_type: this.filters.rep_fre_type || undefined,
         deal_time: this.filters.deal_time || undefined,
         current: this.page.currentPage,
-        size: this.page.pageSize,
+        size: this.page.pageSize
       };
       return params;
     },
@@ -1051,21 +1317,67 @@
           this.form.begin_time = this.formatDate(dateRange[0]);
           this.form.end_time = this.formatDate(dateRange[1]);
 
-          const submitData = {
-            ...this.form,
+          // 如果选中日期包含当前天,那么选中的时间点不能小于当前时间
+          if (this.form.deal_time) {
+            const selectedDate = dayjs(this.form.date_range[0]).format('YYYY-MM-DD');
+            const selectedTime = dayjs(selectedDate + ' ' + this.form.deal_time).toDate();
+            const now = new Date();
 
-            status: status,
-          };
-          await saveUpdateOrderLog(submitData);
-          let id = this.form.id;
-          if (id) {
-            this.$message.success('工单发布成功');
-          } else {
-            this.$message.success('工单创建成功');
+            if (selectedDate === dayjs().format('YYYY-MM-DD') && selectedTime < now) {
+              return this.$message.warning('任务时间不能小于当前时间');
+            }
           }
-          this.dialogVisible = false;
-          this.detailVisible = false;
-          (this.device_sns = []), (this.wayLineList = []), this.fetchTableData();
+          const maxItem = this.device_sns.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 resultHeight = this.lastHeight - maxItem.drone_height
+          let resultH = _.round(resultHeight, 2)
+
+          if (this.lastHeight > result) {
+            this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultH}米以上后进行发布`, '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            }).then(async () => {
+              const submitData = {
+                ...this.form,
+                status: status,
+                ai_types: this.form.ai_types?.length ? this.form.ai_types : []
+              };
+              await saveUpdateOrderLog(submitData);
+              let id = this.form.id;
+              if (id) {
+                this.$message.success('工单发布成功');
+              } else {
+                this.$message.success('工单创建成功');
+              }
+              this.dialogVisible = false;
+              this.detailVisible = false;
+              (this.device_sns = []), (this.wayLineList = []), this.fetchTableData();
+            }).catch(() => {
+
+            });
+          } else {
+            const submitData = {
+              ...this.form,
+              status: status,
+              ai_types: this.form.ai_types?.length ? this.form.ai_types : []
+            };
+            await saveUpdateOrderLog(submitData);
+            let id = this.form.id;
+            if (id) {
+              this.$message.success('工单发布成功');
+            } else {
+              this.$message.success('工单创建成功');
+            }
+            this.dialogVisible = false;
+            this.detailVisible = false;
+            (this.device_sns = []), (this.wayLineList = []), this.fetchTableData();
+          }
         }
       });
     },
@@ -1076,12 +1388,13 @@
       this.$confirm(data.remark, '驳回原因', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-        type: 'warning',
+        type: 'warning'
       }).then(() => {
         this.form = {
-          ...response.data.data,
+          ...response.data.data
         };
-        this.detailVisible = true;
+        // this.detailVisible = true
+        this.handleViewDetail(data);
       });
     },
     formatDate(date) {
@@ -1097,7 +1410,7 @@
         0: '草稿',
         1: '待审核',
         2: '已驳回',
-        3: '已通过',
+        3: '已通过'
       };
       return statusTextMap[status] || '未知状态';
     },
@@ -1108,7 +1421,7 @@
         2: 'info',
         3: 'primary',
         4: 'success',
-        5: 'danger',
+        5: 'danger'
       };
       return statusMap[status] || 'info';
     },
@@ -1116,6 +1429,15 @@
     handleTabChange(tab) {
       this.activeTab = tab.props?.name || tab.name;
       this.filters.status = '';
+      if (tab.props?.name === 'WAIT_AUDIT') {
+        this.filters.status = '1';
+      } else if (tab.props?.name === 'REJECTED') {
+        this.filters.status = '2';
+      } else if (tab.props?.name === 'PASS') {
+        this.filters.status = '3';
+      } else if (tab.props?.name === 'DRAFT') {
+        this.filters.status = '0';
+      }
       this.page.currentPage = 1;
       this.fetchTableData();
     },
@@ -1131,7 +1453,7 @@
         department: '',
         type: '',
         dateRange: [],
-        status: '',
+        status: ''
       };
       this.page.currentPage = 1;
       this.fetchTableData();
@@ -1147,7 +1469,7 @@
         DRAFT: 0,
         WAIT_AUDIT: 0,
         REJECTED: 0,
-        PASS: 0,
+        PASS: 0
       };
       var reponse = await jobStatusNum();
       // console.log('统计' + reponse.data.data)
@@ -1161,7 +1483,15 @@
 
     handleAdd() {
       this.form = {};
+      this.form.rth_altitude = 120;
       this.dialogVisible = true;
+
+      this.$nextTick(() => {
+        if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) {
+          this.$refs.MapContainer.initAddEntity('initPosition');
+        }
+      });
+
       //航线列表
       this.asyncgetWaylineFileListByArea();
     },
@@ -1175,7 +1505,7 @@
         location: '',
         address: '',
         content: '',
-        photos: [],
+        photos: []
       };
       if (this.$refs.testform) {
         this.$refs.testform.resetFields();
@@ -1192,28 +1522,58 @@
       const response = await orderLogDetails(row.id);
       const data = response.data.data;
       this.form = {
-        ...data,
+        ...data
       };
 
       // 更新机巢列表
       this.device_sns = data.device_list;
       this.permission &&
       (this.permission.order_log_review || this.permission.order_log_recall) &&
-      (data.status == 1 || data.status == 3 || data.status == 2)
+      (data.status == 1 ||
+        data.status == 3 ||
+        (data.status == 2 && this.userInfo.user_id !== this.form.create_user))
         ? (this.detailTitle = '工单详情')
         : (this.detailTitle = '编辑工单');
 
       this.detailVisible = true;
+      // 更新航线列表,追加 wayline_file_region_vo 数据
+      if (data.wayline_file_region_vo) {
+        const newWayline = data.wayline_file_region_vo;
+
+        // 检查是否已经存在于 this.wayLineList 中
+        const isDuplicate = this.wayLineList.some(
+          item => item.wayline_id === newWayline.wayline_id
+        );
+
+        if (!isDuplicate) {
+          this.wayLineList.push(newWayline);
+        }
+      }
 
       this.initMapLine(data.device_map_infos);
+      const find = this.$store.state.tags.bsTagList.find(i => i.path === '/tickets/orderLog');
+      find && (find.query = {});
     },
     async handleCheckDetail(row) {
       const response = await orderLogDetails(row.id);
       const data = response.data.data;
       this.form = {
-        ...data,
+        ...data
       };
+      // 更新航线列表,追加 wayline_file_region_vo 数据
+      // 更新航线列表,追加 wayline_file_region_vo 数据
+      if (data.wayline_file_region_vo) {
+        const newWayline = data.wayline_file_region_vo;
 
+        // 检查是否已经存在于 this.wayLineList 中
+        const isDuplicate = this.wayLineList.some(
+          item => item.wayline_id === newWayline.wayline_id
+        );
+
+        if (!isDuplicate) {
+          this.wayLineList.push(newWayline);
+        }
+      }
       // 更新机巢列表
       this.device_sns = data.device_list;
       this.detailVisibleCopy = true;
@@ -1224,7 +1584,7 @@
       this.$confirm('是否智飞工单数据?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-        type: 'warning',
+        type: 'warning'
       }).then(() => {
         NProgress.start();
         let params = this.getQueryParam();
@@ -1247,6 +1607,7 @@
     hasRecallPaddingBtnPermission() {
       // undefined 或 false 都返回 false,只有 true 返回 true
       // console.log('权限检查:', this.permission)
+      // 智飞工单撤回
       return this.permission && this.permission.order_log_recall === true;
     },
     //驳回按钮权限
@@ -1260,7 +1621,7 @@
       this.$confirm('确定发布吗?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-        type: 'warning',
+        type: 'warning'
       }).then(() => {
         let response = userPublish(id);
         this.$message.success('发布成功');
@@ -1273,7 +1634,7 @@
       this.$confirm('确定删除吗?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-        type: 'warning',
+        type: 'warning'
       }).then(() => {
         let response = deleteOrderLog(id);
         this.$message.success('删除');
@@ -1285,64 +1646,59 @@
     },
     //获取航线列表
     async asyncgetWaylineFileListByArea(name) {
-      var wayLineListResponse = await getWaylineFileListByArea(this.userInfo.detail.areaCode);
-      this.wayLineList = wayLineListResponse.data.data;
+      const formData = {
+        name: '',
+        waylineType: undefined,
+        current: 1,
+        size: 99999999,
+        descs: 'update_time'
+      };
+      var wayLineListResponse = await newGetWorkspacesPage(formData);
+      this.wayLineList = wayLineListResponse.data.data.records;
 
       this.initMapLine();
     },
 
-    initMapLine(infos = {}) {
+    initMapLine(infos = {}, cb = () => {
+    }) {
       let currentLine = this.wayLineList.find(item => item.wayline_id == this.form.file_id);
 
       if (!currentLine) return;
 
-      // 异步解析kmz文件
-      const analysis = async url => {
-        return new Promise(async resolve => {
-          const res = await analyzeKmzFile(`${url}?_t=${new Date().getTime()}`);
-          const templateXML = await res.fileInfoObj['wpmz/template.kml'];
-          const templateXMLJSON = XMLToJSON(templateXML)?.['Document'];
-          const templateXMLObj = removeTextKey(templateXMLJSON.Folder);
-          resolve(templateXMLObj);
-        });
-      };
-
-      const drawLine = async () => {
-        let prexUrl = ref(import.meta.env.VITE_APP_AIRLINE_URL + currentLine.object_key);
-        const res = await analysis(prexUrl.value);
-        if (!res.Placemark.length) return;
-        renderingLine(res);
-      };
-
-      const renderingLine = lineObj => {
-        const positions = lineObj.Placemark.map(item => {
-          return item.Point.coordinates.split(',');
-        });
-
-        if (JSON.stringify(infos) != '{}')
-          positions.unshift([infos[0].longitude, infos[0].latitude]);
-
-        this.$nextTick(() => {
-          if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) {
-            this.$refs.MapContainer.initAddEntity('polyline', positions);
-          }
-        });
-      };
-
-      drawLine();
+      this.$nextTick(() => {
+        if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) {
+          this.$refs.MapContainer.initAddEntity('polyline', {
+            url: `${
+              import.meta.env.VITE_APP_AIRLINE_URL + currentLine.object_key
+            }?_t=${new Date().getTime()}`,
+            type: currentLine.wayline_type,
+            cb,
+            infos
+          });
+        }
+      });
     },
 
     //可飞行机巢列表
     async getFlyingNestBy(waylineId) {
-      this.initMapLine();
+      const that = this;
 
-      //按照航线来
-      const params = {
-        type: 0,
-        waylineId: waylineId,
-      };
-      var wayLineListResponse = await getFlyingNestBy(params);
-      this.device_sns = wayLineListResponse.data.data;
+      // 先清空
+      that.form.device_sns = [];
+      that.device_sns = [];
+
+      this.initMapLine({}, async polygon => {
+        const currentLine = that.wayLineList.find(item => item.wayline_id === waylineId);
+        //按照航线来
+        const params = {
+          type: ['2', '4', '5'].includes(currentLine.wayline_type) ? 2 : 0,
+          wayline_id: waylineId,
+          polygon
+        };
+        var wayLineListResponse = await getFlyingNestBy(params);
+        // 再赋值
+        that.device_sns = wayLineListResponse.data.data;
+      });
     },
 
     //撤回
@@ -1350,7 +1706,7 @@
       this.$confirm('确定撤回则到草稿箱。', '是否撤回?', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-        type: 'warning',
+        type: 'warning'
       }).then(async () => {
         let reposne = await orderLogRecall(id);
         this.handleSearch();
@@ -1367,6 +1723,12 @@
       let data = response.data.data;
       this.$message.success('审核通过');
       this.detailVisibleCopy = false;
+
+      this.detailVisible = false;
+
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.query);
+      // this.handleViewDetail()
     },
     /**
      * 驳回
@@ -1374,40 +1736,70 @@
     async orderLogReject(id) {
       this.$prompt('', '驳回原因', {
         confirmButtonText: '确定',
-        cancelButtonText: '取消',
+        cancelButtonText: '取消'
       }).then(async ({ value }) => {
         let response = await orderLogReject(id, value);
         let data = response.data.data;
-        this.$message.success('驳回成果');
+        this.$message.success('驳回成功');
         this.detailVisibleCopy = false;
-      });
-    },
-  },
 
+        // this.detailVisible = false
+
+        this.page.currentPage = 1;
+        this.onLoad(this.page, this.query);
+      });
+    }
+  },
   watch: {
+    // lastHeight(newVal, oldVal) {
+    //   console.log('lastHeight', newVal, oldVal);
+    //   this.getlastHeight = newVal;
+    // },
     tableData: {
       handler() {
         // this.updateTabCounts()
       },
-      deep: true,
-    },
-  },
+      deep: true
+    }
+  }
 };
 </script>
-<style></style>
+
 <style lang="scss" scoped>
-:deep(.el-textarea__inner) {
-  padding: 8px 12px;
-}
+//:deep(.el-input-number) {
+//  width: 200px;
+//}
 
-:deep(.el-input__inner),
-:deep(.el-select),
-:deep(.el-select .el-input) {
-  width: 100%; // 确保所有输入框和选择框宽度一致
-}
+//:deep(.el-form-item__label) {
+//  width: 100px !important;
+//}
 
-.tab-content {
-  padding: 10px;
+::v-deep(.el-tabs) {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .el-tabs__header {
+    order: 1;
+  }
+
+  .el-tabs__content {
+    order: 2;
+  }
+
+  .el-tabs__content {
+    height: 0;
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+
+    .el-tab-pane {
+      height: 0;
+      flex: 1;
+      display: flex;
+      flex-direction: column;
+    }
+  }
 }
 
 .filter-bar {
@@ -1440,6 +1832,35 @@
   }
 }
 
+:deep(.el-pagination .el-select) {
+  width: 128px !important;
+}
+
+.step-timer {
+  position: absolute;
+  left: 80%;
+  top: 50%;
+  transform: translateY(-50%);
+  width: 100px;
+  margin-left: 4px;
+  color: #666;
+  font-size: 12px;
+}
+
+:deep(.el-textarea__inner) {
+  padding: 8px 12px;
+}
+
+:deep(.el-input__inner),
+:deep(.el-select),
+:deep(.el-select .el-input) {
+  width: 100%; // 确保所有输入框和选择框宽度一致
+}
+
+:deep(.el-textarea__inner) {
+  resize: none;
+}
+
 .action-bar {
   margin-bottom: 16px;
 }
@@ -1450,28 +1871,9 @@
   }
 }
 
-.tab-content {
-  min-height: 200px;
-}
-
-.detail-form {
-  :deep(.el-form-item) {
-    margin-bottom: 10px;
-  }
-
-  :deep(.el-form-item__label) {
-    color: #606266;
-    font-weight: normal;
-  }
-
-  :deep(.el-form-item__content) {
-    color: #303133;
-  }
-}
-
 .el-dialog {
   .el-form-item {
-    margin-bottom: 20px;
+    margin-bottom: 10px;
   }
 }
 
@@ -1557,11 +1959,8 @@
 
     & > ::v-deep(.el-button) {
       flex: 1;
-      max-width: 44px;
-
-      &:nth-child(4n) {
-        margin-left: 0;
-      }
+      margin-left: 0;
+      margin-right: 10px;
     }
   }
 }
@@ -1572,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