无人机管理后台前端(已迁走)
shuishen
2025-10-24 0f784bf4ab59a0c7ad423f28be22565d098087be
Merge branch 'feature/v7.0/7.0.2' into prod
6 files modified
1633 ■■■■■ changed files
src/hooks/common.js 52 ●●●●● patch | view | raw | blame | history
src/hooks/useRouteLine/useRouteLine.js 1 ●●●● patch | view | raw | blame | history
src/views/algorithmRepository/algorithmRepository.vue 300 ●●●● patch | view | raw | blame | history
src/views/device/airport.vue 4 ●●●● patch | view | raw | blame | history
src/views/tickets/orderLog.vue 1274 ●●●●● patch | view | raw | blame | history
src/views/wel/components/statistics.vue 2 ●●● patch | view | raw | blame | history
src/hooks/common.js
@@ -26,14 +26,17 @@
    if (!placemark?.length) return []
    const isWGS84 = execute_height_mode === 'WGS84'
    const list = placemark.map(item => {
        const [longitude, latitude] = item.point.coordinates.trim().split(',')
        const [longitude, latitude] = item.point.coordinates.trim().split(',').map(i => _.round(i, 6))
        const [latitude1, longitude1] = (item?.waypoint_heading_param?.waypoint_poi_point?.trim()?.split(',') || [])
            .map(i => _.round(i, 6))
        let action_modes = item?.action_group?.action || []
        action_modes = Array.isArray(action_modes) ? action_modes : [action_modes]
        return {
            longitude: _.round(longitude, 8),
            latitude: _.round(latitude, 8),
            height: isWGS84 ? item.execute_height : item.execute_height + startPoint.height,
            longitude,
            latitude,
            height: _.round(item.execute_height,2),
            waypoint_speed: item.waypoint_speed,
            waypoint_poi_point: longitude1 ? { longitude: longitude1, latitude: latitude1 } : undefined,//兴趣点
            action_modes,
        }
    })
@@ -42,9 +45,6 @@
        flyRotateYaw: 0,
        pointType: 'start',
        waypoint_speed: auto_flight_speed,
        heading: 0, // 椎体 heading
        arrowHeading: 0, // 飞行器 heading
        pitch: 0, //椎体俯仰角
        fov: 19.5, // 这个是椎体的展示截面大小
    }
    list.forEach(item => {
@@ -56,7 +56,6 @@
                item1.action_actuator_func_param.focal_length = Number(focal_length) / 24
            }
        })
        item.arrowHeading = 0
    })
    return [pointStart, ...list]
}
@@ -69,6 +68,7 @@
    const waylinesXMLJSON = XMLToJSON(waylinesXML)?.['Document']
    const templateXMLObj = camelToSnake(removeTextKey(templateXMLJSON))
    const waylinesXMLObj = camelToSnake(removeTextKey(waylinesXMLJSON))
    const {
        mission_config: {
            take_off_ref_point,
@@ -77,12 +77,16 @@
        folder: {
            payload_param: { image_format } = {},
            placemark: {
                polygon
                polygon,
                margin: buffer_distance_meters = 0
            },
            wayline_coordinate_sys_param:{height_mode} = {},
            global_height, auto_flight_speed,
            template_type: templateType
        } = {},
    } = templateXMLObj
    const [latitude, longitude, height] = take_off_ref_point.split(',').map(item => _.round(item, 6))
    let startPoint = { latitude, longitude, height: Number.isNaN(height) ? 0 : height }
    const {
        mission_config: { take_off_security_height } = {},
@@ -98,14 +102,9 @@
        execute_height_mode = polygonPointFolder.execute_height_mode
        pointPlacemark = polygonPointFolder.placemark
    }
    const [latitude, longitude, height] = take_off_ref_point.split(',').map(item => _.round(item, 6))
    let startPoint = { latitude, longitude, height }
    // 取出点位
    const coordinates = polygon?.outer_boundary_is.linear_ring
        .coordinates?.split('\n') || []
    // 数组转换
    let polygonList = coordinates.map((coordinate) =>
        coordinate
@@ -113,9 +112,21 @@
            .split(',')
            .map((v) => Number(v)),
    )
    polygonList.pop()
    const templatePlacemark = templateXMLObj.folder.placemark
    // 点航线list
    let pointList = handlePointListForKmz({
        placemark: polygonPointFolder.placemark,
        startPoint,
        execute_height_mode,
        auto_flight_speed
    }).map((i,index)=> {
        // 注入是否使用全局高度参数
        return {
            ...i,
            use_global_height: index > 0 ? templatePlacemark[index-1]?.use_global_height : 0
        }
    })
    return {
        image_format,
        startPoint,
@@ -124,11 +135,14 @@
        take_off_ref_point,
        drone_enum_value,
        drone_sub_enum_value,
        take_off_security_height,
        execute_height_mode,
        take_off_security_height,//起飞安全高度
        execute_height_mode,//执行高度模式
        height_mode,//高度模式
        pointList,//航点航线 点list
        templateType,
        pointPlacemark,
        polygonList
        polygonList,
        buffer_distance_meters
    }
}
src/hooks/useRouteLine/useRouteLine.js
@@ -195,6 +195,7 @@
            },
        })
        // 获取最后一点高度
        console.log(pointList, '查看数组最后一点高度')
        store.commit('setLastHeight', Number(pointList[pointList.length - 1].height))
        flyVisual({
            positionsData:pointList.map(i => [Number(i.longitude), Number(i.latitude), Number(i.height)]),
src/views/algorithmRepository/algorithmRepository.vue
@@ -2,19 +2,12 @@
  <basic-container>
    <div class="algorithContainer">
      <div class="algorithItem" v-if="!showDetail">
        <div
          class="item"
          v-for="(item, index) in AlgorithmData"
          :key="index"
          :class="{ 'active-bg': activeItem === item.dictValue }"
          @click="jumpDatail(item)"
        >
        <div class="item" v-for="(item, index) in AlgorithmData" :key="index"
          :class="{ 'active-bg': activeItem === item.dictValue }" @click="jumpDatail(item)">
          <img class="imgicon" :src="`${baseUrl}/后台-算法仓库/${item.dictValue}.png`" alt="" />
          <div class="item-title">{{ item.dictValue }}</div>
          <div
            :class="!statusSign && item.dictValue === nameSign ? 'stopStatus' : 'normalStatus'"
            @click.stop="changeStatus(item)"
          >
          <div :class="!statusSign && item.dictValue === nameSign ? 'stopStatus' : 'normalStatus'"
            @click.stop="changeStatus(item)">
            {{ !statusSign && item.dictValue === nameSign ? '停用状态' : '正常状态' }}
          </div>
        </div>
@@ -25,27 +18,12 @@
          <div class="searchBox">
            <div class="item">
              <div class="itemchild">模糊查询:</div>
              <el-input
                v-model="params.name"
                class="filter-item"
                placeholder="请输入事件名称"
                clearable
              ></el-input>
              <el-input v-model="params.name" class="filter-item" placeholder="请输入事件名称" clearable></el-input>
            </div>
            <div class="item">
              <el-date-picker
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                value-format="YYYY-MM-DD"
                v-model="taskData"
                placeholder="请选择日期"
                @change="changeselect"
                  clearable
              />
                <!-- @clear="handleDateClear" -->
              <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                value-format="YYYY-MM-DD" v-model="taskData" placeholder="请选择日期" @change="changeselect" clearable />
              <!-- @clear="handleDateClear" -->
            </div>
            <div class="item">
              <div class="itemchild">机巢查询:</div>
@@ -61,67 +39,49 @@
          </div>
        </div>
       <div  v-if="detailData.length > 0" class="pictureBox">
         <div
          class="pictureitem"
          v-loading="loading"
          element-loading-text="加载中"
        >
          <div class="imgitem" v-for="(item, index) in detailData" :key="index">
            <el-image
              ref="imageRef"
              :src="getSmallImg(item.url)"
              show-progress
              :preview-src-list="[getShowImg(item.url)]"
              fit="cover"
            />
        <div v-if="detailData.length > 0" class="pictureBox">
          <div class="pictureitem" v-loading="loading" element-loading-text="加载中">
            <div class="imgitem" v-for="(item, index) in detailData" :key="index">
              <el-image ref="imageRef" :src="getSmallImg(item.url)" show-progress
                :preview-src-list="[getShowImg(item.url)]" fit="cover" />
            <div class="info">
              <div class="name">{{ item.name }}</div>
              <div class="time">{{ item.create_time.slice(5, 16).replace('-', '/', 1) }}</div>
              <div class="info">
                <div class="name">{{ item.name }}</div>
                <div class="time">{{ item.create_time.slice(5, 16).replace('-', '/', 1) }}</div>
              </div>
            </div>
          </div>
        </div>
       </div>
        <el-empty class="custom-empty" v-else>
          <template #description>
            <span class="custom-text">暂无数据</span>
          </template>
        </el-empty>
        <!-- 分页 -->
        <el-pagination
          class="pageStyle"
          background
          :page-sizes="[15, 20, 30, 50]"
          v-model:current-page="params.current"
          v-model:page-size="params.size"
          layout="total, prev, pager, next,sizes, jumper"
          :total="total"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
        />
        <el-pagination class="pageStyle" background :page-sizes="[15, 20, 30, 50]" v-model:current-page="params.current"
          v-model:page-size="params.size" layout="total, prev, pager, next,sizes, jumper" :total="total"
          @size-change="handleSizeChange" @current-change="handleCurrentChange" />
      </div>
    </div>
  </basic-container>
</template>
<script setup>
import { useStore } from 'vuex';
import { getDictionaryByCode } from '@/api/system/dictbiz';
import { getalgorithmList, selectDeviceList } from '@/api/algorithm';
import { getSmallImg,getShowImg } from '@/utils/util';
import { useRouter } from 'vue-router';
const store = useStore();
const router = useRouter();
const baseUrl = import.meta.env.VITE_APP_PICTURE_URL;
const showDetail = ref(false);
const taskData = ref('');
const jcvalue = ref('');
const jcoptions = ref([]);
const total = ref(0);
const loading = ref(true);
const userAreaCode = computed(() => store.getters.userInfo.detail.areaCode);
import { useStore } from 'vuex'
import { getDictionaryByCode } from '@/api/system/dictbiz'
import { getalgorithmList, selectDeviceList } from '@/api/algorithm'
import { getSmallImg, getShowImg } from '@/utils/util'
import { useRouter } from 'vue-router'
const store = useStore()
const router = useRouter()
const baseUrl = import.meta.env.VITE_APP_PICTURE_URL
const showDetail = ref(false)
const taskData = ref('')
const jcvalue = ref('')
const jcoptions = ref([])
const total = ref(0)
const loading = ref(true)
const userAreaCode = computed(() => store.getters.userInfo.detail.areaCode)
const params = ref({
  ai_type_key: '',
  start_date: null,
@@ -130,129 +90,132 @@
  name: '',
  current: 1,
  size: 15,
});
})
// 请求字典字段
let AlgorithmData = ref([]);
const detailData = ref([]);
let AlgorithmData = ref([])
const detailData = ref([])
const requestDictionary = () => {
  getDictionaryByCode('SF').then(res => {
    if (res.code !== 0) {
      // 处理数据
      AlgorithmData.value = res.data.data['SF'];
      AlgorithmData.value = res.data.data['SF']
    }
  });
};
const activeItem = ref(null);
  })
}
const activeItem = ref(null)
const jumpDatail = val => {
  showDetail.value = true;
  activeItem.value = val.dictValue;
  params.value.ai_type_key = val.dictKey;
  getList();
};
const statusSign = ref(true);
const nameSign = ref('');
  showDetail.value = true
  activeItem.value = val.dictValue
  params.value.ai_type_key = val.dictKey
  getList()
}
const statusSign = ref(true)
const nameSign = ref('')
const changeStatus = val => {
  nameSign.value = val.dictValue;
  statusSign.value = !statusSign.value;
};
  nameSign.value = val.dictValue
  statusSign.value = !statusSign.value
}
// 详情
const getList = () => {
const detailParams={
   ai_type_key: params.value.ai_type_key,
  start_date:params.value.start_date,
  end_date: params.value.end_date,
  device_name: params.value.device_name,
  name:params.value.name,
}
  getalgorithmList(detailParams,{  current: params.value.current,
    size: params.value.size,}).then(res => {
    loading.value = true;
    detailData.value = res.data.data.records;
    total.value = res.data.data.total;
  const detailParams = {
    ai_type_key: params.value.ai_type_key,
    start_date: params.value.start_date,
    end_date: params.value.end_date,
    device_name: params.value.device_name,
    name: params.value.name,
  }
  getalgorithmList(detailParams, {
    current: params.value.current,
    size: params.value.size,
  }).then(res => {
    loading.value = true
    detailData.value = res.data.data.records
    total.value = res.data.data.total
    setTimeout(() => {
      loading.value = false;
    }, 1000);
  });
};
      loading.value = false
    }, 1000)
  })
}
// 机巢查询
const getDeviceList = () => {
console.log('userAreaCode',userAreaCode.value);
// { areaCode: userAreaCode.value }
  console.log('userAreaCode', userAreaCode.value)
  // { areaCode: userAreaCode.value }
  selectDeviceList().then(res => {
    jcoptions.value = res.data.data;
    jcoptions.value = res.data.data
  });
};
  })
}
// 日期选择
const changeselect = () => {
  params.value.start_date = taskData.value?.length ? `${taskData.value[0]} 00:00:00` : null;
  params.value.end_date = taskData.value?.length ? `${taskData.value[1]} 23:59:59` : null;
  params.value.start_date = taskData.value?.length ? `${taskData.value[0]} 00:00:00` : null
  params.value.end_date = taskData.value?.length ? `${taskData.value[1]} 23:59:59` : null
  handleSearch()
};
}
// 处理日期清空
const handleDateClear = () => {
  taskData.value = ''; // 清空绑定的日期数据
  params.value.start_date = null; // 重置开始日期参数
  params.value.end_date = null; // 重置结束日期参数
  getList();
};
  taskData.value = '' // 清空绑定的日期数据
  params.value.start_date = null // 重置开始日期参数
  params.value.end_date = null // 重置结束日期参数
  getList()
}
const handleSearch = () => {
if(taskData.value === null){
    params.value.start_date = null; // 重置开始日期参数
  params.value.end_date = null; // 重置结束日期参数
}
  if (taskData.value === null) {
    params.value.start_date = null // 重置开始日期参数
    params.value.end_date = null // 重置结束日期参数
  }
  getList();
};
  getList()
}
const handleReset = () => {
taskData.value =''
  params.value.start_date = null;
  params.value.end_date = null;
  params.value.device_name = '';
  params.value.name = '';
  getList();
};
  taskData.value = ''
  params.value.start_date = null
  params.value.end_date = null
  params.value.device_name = ''
  params.value.name = ''
  getList()
}
const goback = () => {
  showDetail.value = false;
  activeItem.value = null;
  params.value.current =1
  params.value.size=15
  params.value.name=''
};
  showDetail.value = false
  activeItem.value = null
  params.value.current = 1
  params.value.size = 15
  params.value.name = ''
}
// 分页大小改变
const handleSizeChange = val => {
  params.size = val;
  getList();
};
  params.size = val
  getList()
}
// 页码改变
const handleCurrentChange = val => {
  params.current = val;
  getList();
};
  params.current = val
  getList()
}
onMounted(() => {
  requestDictionary();
  getDeviceList();
});
  requestDictionary()
  getDeviceList()
})
</script>
<style scoped lang="scss">
.algorithContainer {
height: calc(100vh - 130px);
  height: calc(100vh - 130px);
}
.algorithItem {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  vertical-align: middle;
  .item {
    height: 267px;
    display: flex;
@@ -261,21 +224,25 @@
    align-items: center;
    background: url('/src/assets/images/ht-sfbg.png') no-repeat center;
    background-size: 100% 100%;
    .item-title {
      font-weight: bold;
      font-size: 18px;
      color: #656565;
    }
    .imgicon {
      width: 100px;
      height: 100px;
      margin-bottom: 17px;
    }
    &:hover {
      background: url('/src/assets/images/ht-sfbg-hover.png') no-repeat center;
      background-size: 100% 100%;
      cursor: pointer;
    }
    &.active-bg {
      background: url('/src/assets/images/ht-sfbg-click.png') no-repeat center;
      background-size: 100% 100%;
@@ -294,6 +261,7 @@
      margin-top: 23px;
      cursor: pointer;
    }
    .stopStatus {
      width: 116px;
      height: 43px;
@@ -307,19 +275,22 @@
      margin-top: 23px;
      cursor: pointer;
    }
    .normalStatus:hover {
      background: rgba(6, 217, 87, 0.2);
    }
  }
}
.algorithItemDetail {
  padding: 20px;
    .pictureBox {
  .pictureBox {
    // height: 625px;
       height: pxToVh(760);
    height: pxToVh(760);
    overflow: auto;
    }
  }
  .pictureitem {
    display: grid;
@@ -329,6 +300,7 @@
    .imgitem {
      border-radius: 12px 12px 0 0;
      overflow: hidden;
      .el-image {
        width: 100%;
        height: 170px;
@@ -336,6 +308,7 @@
        margin: 0;
        padding: 0;
      }
      .info {
        display: flex;
        justify-content: space-between;
@@ -353,6 +326,7 @@
          font-size: 16px;
          color: #363636;
        }
        .time {
          margin-right: 12px;
          font-weight: 500;
@@ -362,13 +336,17 @@
      }
    }
  }
  .search {
    display: flex;
    //justify-content: space-between;
  }
  .searchBox {
    display: flex;
    align-items: center;
    margin-bottom: 27px;
    .itemchild {
      white-space: nowrap;
      margin-right: 5px;
@@ -376,19 +354,23 @@
      font-size: 14px;
      color: #363636;
    }
    .item {
      display: flex;
      align-items: center;
      margin-right: 40px;
    }
  }
  .search-btn {
    display: flex;
  }
  .filter-item {
    width: 218px;
  }
}
.pageStyle {
  margin-top: 32px;
  display: flex;
src/views/device/airport.vue
@@ -511,10 +511,10 @@
          //   ],
          // },
          {
            label: '流量剩余',
            label: '流量剩余(GB)',
            prop: 'traffic_remaining',
            labelWidth: 145,
            width: 100,
            width: 120,
            // editDisabled: true,
            editDisplay: false, //编辑显示
            // rules: [
src/views/tickets/orderLog.vue
@@ -1,12 +1,7 @@
<template>
  <basic-container>
    <el-tabs v-model="activeTab" @tab-click="handleTabChange">
      <el-tab-pane
        v-for="tab in filteredTabs"
        :key="tab.name"
        :label="`${tab.label} (${tab.count})`"
        :name="tab.name"
      >
      <el-tab-pane v-for="tab in filteredTabs" :key="tab.name" :label="`${tab.label} (${tab.count})`" :name="tab.name">
        <basic-main-content>
          <!-- 查询条件筛选栏 -->
          <div class="ztzf-form-search">
@@ -14,12 +9,8 @@
              <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-input v-model="filters.key_word" placeholder="编号/名称/内容/姓名" clearable
                      @keyup.enter="handleSearch" />
                  </el-form-item>
                  <!--              <div class="search-bar-box-item">-->
@@ -31,49 +22,25 @@
                </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-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 @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 @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>
@@ -87,89 +54,49 @@
                </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 @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',
                  }"
                      />
                    </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-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',
                      }" />
                  </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"
            ref="crud"
            :table-loading="loading"
            @current-change="currentChange"
            @refresh-change="refreshChange"
            @on-load="onLoad"
            @search-change="searchChange"
            @size-change="sizeChange"
            v-if="activeTab === tab.name"
          >
          <avue-crud class="ztzf-public-general-avue-crud" :data="tableData" :option="option" v-model:page="page"
            ref="crud" :table-loading="loading" @current-change="currentChange" @refresh-change="refreshChange"
            @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 }}
@@ -183,31 +110,19 @@
            </template>
            <template #menu-left>
              <el-button
                v-if="hasAddBtnPermission() && activeTab != 'WAIT_AUDIT'"
                type="primary"
                icon="el-icon-plus"
                @click="handleAdd"
              >新建工单
              </el-button
              >
              <el-button type="success" plain icon="el-icon-download" @click="exportData"
              >导出
              </el-button
              >
              <el-button v-if="hasAddBtnPermission() && activeTab != 'WAIT_AUDIT'" type="primary" icon="el-icon-plus"
                @click="handleAdd">新建工单
              </el-button>
              <el-button type="success" plain icon="el-icon-download" @click="exportData">导出
              </el-button>
            </template>
            <template #menu="{ row }">
              <div class="menu-custom-box">
                <template v-if="row.status == 1">
                  <el-button
                    v-if="hasPaddingBtnPermission()"
                    type="text"
                    icon="el-icon-view"
                    @click="handleCheckDetail(row)"
                  >审核
                  </el-button
                  >
                  <el-button v-if="hasPaddingBtnPermission()" type="text" icon="el-icon-view"
                    @click="handleCheckDetail(row)">审核
                  </el-button>
                </template>
                <!-- v-if="
                    (userInfo.user_id == row.create_user || hasRecallPaddingBtnPermission()) &&
@@ -215,56 +130,34 @@
                  " -->
                <template v-if="row.status == 1">
                  <!--待审核状态-->
                  <el-button
                    type="text"
                    icon="el-icon-warning"
                    v-if="hasRecallPaddingBtnPermission()"
                    @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
                    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
                  >
                  <el-button type="text" icon="el-icon-warning" @click="rejectDetail(row.id)">驳回原因
                  </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
                  >
                  <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">详情
                  </el-button>
                </template>
                <!--草稿-->
                <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
                  >
                  <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>
            </template>
@@ -282,80 +175,42 @@
    </el-tabs>
    <!-- 新建工单对话框 -->
    <el-dialog
      class="ztzf-dialog-mange"
      v-model="dialogVisible"
      title="新建工单"
      width="70%"
      :close-on-click-modal="false"
      @close="resetForm"
    >
    <el-dialog class="ztzf-dialog-mange" v-model="dialogVisible" title="新建工单" width="70%" :close-on-click-modal="false"
      @close="resetForm">
      <el-form :model="form" :rules="rules" ref="testform" label-width="100px">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="工单名称" prop="name">
              <el-input
                v-model="form.name"
                placeholder="请输入工单名称"
                maxlength="100"
                show-word-limit
              ></el-input>
              <el-input v-model="form.name" placeholder="请输入工单名称" maxlength="100" show-word-limit></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="关联航线" prop="file_id">
              <el-select
                v-model="form.file_id"
                placeholder="请选择航线"
                filterable
                @change="getFlyingNestBy"
              >
                <el-option
                  v-for="item in wayLineList"
                  :key="item.wayline_id"
                  :label="item.name"
                  :value="item.wayline_id"
                />
              <el-select v-model="form.file_id" placeholder="请选择航线" filterable @change="getFlyingNestBy">
                <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="6">
            <el-form-item label="安全返航真高" prop="rth_altitude">
              <el-input-number
                v-model="form.rth_altitude"
                :min="50"
                :max="300"
              ></el-input-number>
            <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
                :disabled="!device_sns.length"
              >
                <el-option
                  v-for="item in device_sns"
                  :key="item.device_sn"
                  :label="item.nickname"
                  :value="item.device_sn"
                />
              <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" :label="item.nickname"
                  :value="item.device_sn" />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="关联算法" prop="ai_types">
              <el-select v-model="form.ai_types" placeholder="请选择关联算法" multiple>
                <el-option
                  v-for="item in ai_types"
                  :key="item.dictKey"
                  :label="item.dictValue"
                  :value="item.dictKey"
                />
                <el-option v-for="item in ai_types" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
              </el-select>
            </el-form-item>
          </el-col>
@@ -364,27 +219,15 @@
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="工单内容" prop="content">
              <el-input
                type="textarea"
                v-model="form.content"
                rows="4"
                placeholder="请输入工单内容"
                maxlength="255"
                show-word-limit
              ></el-input>
              <el-input type="textarea" v-model="form.content" rows="4" placeholder="请输入工单内容" maxlength="255"
                show-word-limit></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="周期频次" prop="date_range">
              <el-date-picker
                v-model="form.date_range"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                :disabled-date="disabledDate"
              />
              <el-date-picker v-model="form.date_range" type="daterange" range-separator="至" start-placeholder="开始日期"
                end-placeholder="结束日期" :disabled-date="disabledDate" />
            </el-form-item>
          </el-col>
          <el-col :span="4">
@@ -395,15 +238,10 @@
                </el-select>
              </div>
              <div class="flex-1">
                <el-time-picker
                  style="width: 100px"
                  v-model="form.deal_time"
                  prop="deal_time"
                  value-format="HH:mm"
                <el-time-picker style="width: 100px" v-model="form.deal_time" prop="deal_time" value-format="HH:mm"
                  :picker-options="{
                    selectableRange: '00:00 - 23:59',
                  }"
                />
                  }" />
              </div>
            </div>
          </el-col>
@@ -433,37 +271,21 @@
    </el-dialog>
    <!-- 工单详情对话框 -->
    <el-dialog
      class="ztzf-dialog-mange"
      align-center
      v-model="detailVisible"
      :title="detailTitle"
      width="70%"
      :close-on-click-modal="false"
      @close="resetForm"
    >
    <el-dialog class="ztzf-dialog-mange" align-center v-model="detailVisible" :title="detailTitle" width="70%"
      :close-on-click-modal="false" @close="resetForm">
      <div class="event-title-center">{{ form.name }}</div>
      <el-form :model="form" :rules="rules" ref="testform" label-width="100px">
        <div class="custom-steps-container">
          <!-- 标题行 -->
          <div class="steps-titles" v-if="filters.status !== '0'">
            <div
              v-for="(record, index) in form.record_list"
              :class="{ active: record.user_id >= 0 }"
              :key="index"
              class="step-title"
            >
            <div v-for="(record, index) in form.record_list" :class="{ active: record.user_id >= 0 }" :key="index"
              class="step-title">
              {{ record.status_str }}
            </div>
          </div>
          <!-- Element Steps 组件 -->
          <el-steps
            :active="form.active"
            align-center
            class="custom-steps"
            v-if="filters.status !== '0'"
          >
          <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">
@@ -483,64 +305,38 @@
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="工单名称" prop="name">
              <el-input
                v-model="form.name"
                placeholder="请输入工单名称"
                :disabled="detailTitle === '工单详情'"
              ></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"
                filterable
                :disabled="detailTitle === '工单详情'"
              >
                <el-option
                  v-for="item in wayLineList"
                  :key="item.wayline_id"
                  :label="item.name"
                  :value="item.wayline_id"
                />
              <el-select v-model="form.file_id" placeholder="请选择航线" @change="getFlyingNestBy" filterable
                :disabled="detailTitle === '工单详情'">
                <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="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
                :disabled="detailTitle === '工单详情'"
              >
                <el-option
                  v-for="item in device_sns"
                  :key="item.device_sn"
                  :label="item.nickname"
                  :value="item.device_sn"
                />
              <el-select v-model="form.device_sns" placeholder="请选择机巢" multiple :disabled="detailTitle === '工单详情'">
                <el-option v-for="item in device_sns" :key="item.device_sn" :label="item.nickname"
                  :value="item.device_sn" />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="关联算法" prop="ai_types">
              <el-select
                v-model="form.ai_types"
                placeholder="请选择关联算法"
                multiple
                :disabled="detailTitle === '工单详情'"
              >
                <el-option
                  v-for="item in ai_types"
                  :key="item.dictKey"
                  :label="item.dictValue"
                  :value="item.dictKey"
                />
              <el-select v-model="form.ai_types" placeholder="请选择关联算法" multiple :disabled="detailTitle === '工单详情'">
                <el-option v-for="item in ai_types" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
              </el-select>
            </el-form-item>
          </el-col>
@@ -555,55 +351,30 @@
          <el-col :span="6">
            <el-form-item label="周期频次" prop="date_range">
              <el-date-picker
                v-model="form.date_range"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                :disabled-date="disabledDate"
                :disabled="detailTitle === '工单详情'"
              />
              <el-date-picker v-model="form.date_range" type="daterange" 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="请选择频次"
              :disabled="detailTitle === '工单详情'"
            >
            <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
            class="timeStyle"
        :style="{width:pxToRem(140)}"
              v-model="form.deal_time"
              prop="deal_time"
              value-format="HH:mm"
              :picker-options="{
            <el-time-picker 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 === '工单详情'"
            />
              }" :disabled="detailTitle === '工单详情'" />
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="工单内容" prop="content">
              <el-input
                type="textarea"
                v-model="form.content"
                rows="4"
                placeholder="请输入工单内容"
                maxlength="255"
                show-word-limit
                :disabled="detailTitle === '工单详情'"
              ></el-input>
              <el-input type="textarea" v-model="form.content" rows="4" placeholder="请输入工单内容" maxlength="255"
                show-word-limit :disabled="detailTitle === '工单详情'"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
@@ -616,75 +387,42 @@
      </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="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
          >
          <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%"
      :close-on-click-modal="false"
      @close="resetForm"
    >
    <el-dialog class="ztzf-dialog-mange" align-center v-model="detailVisibleCopy" title="工单详情" width="70%"
      :close-on-click-modal="false" @close="resetForm">
      <div class="event-title-center">{{ form.name }}</div>
      <el-form :model="form" ref="testform" label-width="100px">
        <div class="custom-steps-container">
          <!-- 标题行 -->
          <div class="steps-titles" v-if="filters.status !== '0'">
            <div
              v-for="(record, index) in form.record_list"
              :class="{ active: record.user_id >= 0 }"
              :key="index"
              class="step-title"
            >
            <div v-for="(record, index) in form.record_list" :class="{ active: record.user_id >= 0 }" :key="index"
              class="step-title">
              {{ record.status_str }}
            </div>
          </div>
          <!-- Element Steps 组件 -->
          <el-steps
            :active="form.active"
            align-center
            class="custom-steps"
            v-if="filters.status !== '0'"
          >
          <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">
@@ -704,23 +442,20 @@
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="工单名称" prop="name">
              <el-input
                v-model="form.name"
                placeholder="请输入工单名称"
                :disabled="true"
              ></el-input>
              <el-input v-model="form.name" placeholder="请输入工单名称" :disabled="true"></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
                  v-for="item in wayLineList"
                  :key="item.wayline_id"
                  :label="item.name"
                  :value="item.wayline_id"
                />
                <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="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>
@@ -728,35 +463,16 @@
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="关联机巢" prop="device_sns">
              <el-select
                v-model="form.device_sns"
                placeholder="请选择机巢"
                multiple
                :disabled="true"
              >
                <el-option
                  v-for="item in device_sns"
                  :key="item.device_sn"
                  :label="item.nickname"
                  :value="item.device_sn"
                />
              <el-select v-model="form.device_sns" placeholder="请选择机巢" multiple :disabled="true">
                <el-option v-for="item in device_sns" :key="item.device_sn" :label="item.nickname"
                  :value="item.device_sn" />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="关联算法" prop="ai_types">
              <el-select
                v-model="form.ai_types"
                placeholder="请选择关联算法"
                multiple
                :disabled="true"
              >
                <el-option
                  v-for="item in ai_types"
                  :key="item.dictKey"
                  :label="item.dictValue"
                  :value="item.dictKey"
                />
              <el-select v-model="form.ai_types" placeholder="请选择关联算法" multiple :disabled="true">
                <el-option v-for="item in ai_types" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
              </el-select>
            </el-form-item>
          </el-col>
@@ -771,14 +487,8 @@
          <el-col :span="6">
            <el-form-item label="周期频次" prop="date_range">
              <el-date-picker
                v-model="form.date_range"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                :disabled="true"
              />
              <el-date-picker v-model="form.date_range" type="daterange" range-separator="至" start-placeholder="开始日期"
                end-placeholder="结束日期" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="3">
@@ -788,32 +498,18 @@
          </el-col>
          <el-col :span="3">
            <el-time-picker
              style="width: 100px"
              v-model="form.deal_time"
              prop="deal_time"
              :disabled="true"
              value-format="HH:mm"
              :picker-options="{
            <el-time-picker style="width: 100px" v-model="form.deal_time" prop="deal_time" :disabled="true"
              value-format="HH:mm" :picker-options="{
                selectableRange: '00:00 - 23:59',
              }"
            />
              }" />
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="工单内容" prop="content">
              <el-input
                type="textarea"
                v-model="form.content"
                rows="2"
                placeholder="请输入工单内容"
                maxlength="255"
                show-word-limit
                :readonly="true"
                :disabled="true"
              ></el-input>
              <el-input type="textarea" v-model="form.content" rows="2" placeholder="请输入工单内容" maxlength="255"
                show-word-limit :readonly="true" :disabled="true"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
@@ -827,33 +523,18 @@
      </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="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 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>
@@ -863,7 +544,7 @@
<script>
import { pxToRem, pxToRemNum } from '@/utils/rem'
import { calculateDefaultRange } from '@/utils/util';
import { calculateDefaultRange } from '@/utils/util'
import {
  getList,
  saveUpdateOrderLog,
@@ -875,34 +556,34 @@
  jobStatusNum,
  userPublish,
  deleteOrderLog
} from '@/api/tickets/orderLog';
import { getTicketInfo } from '@/api/tickets/ticket';
import { getDictionaryByCode } from '@/api/system/dictbiz';
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';
import NProgress from 'nprogress';
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';
} from '@/api/tickets/orderLog'
import { getTicketInfo } from '@/api/tickets/ticket'
import { getDictionaryByCode } from '@/api/system/dictbiz'
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'
import NProgress from 'nprogress'
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');
dayjs.extend(weekday)
dayjs.locale('zh-cn')
// const lastHeight = computed(() => store.state.common.lastHeight)
export default {
  components: { elTooltipCopy },
  name: 'TicketPage',
  data() {
  data () {
    return {
      activeTab: 'all',
      getlastHeight: 0,
@@ -1094,160 +775,160 @@
      // 配置时间选择器默认配置
      datePickerDefaultVal: calculateDefaultRange()
    };
    }
  },
  async created() {
    var response = await getDictionaryByCode('SF');
    var word_order_typeResponse = await getDictionaryByCode('WORK_ORDER_TYPE');
    this.ai_types = response.data.data['SF'];
    this.types = word_order_typeResponse.data.data['WORK_ORDER_TYPE'];
  async created () {
    var response = await getDictionaryByCode('SF')
    var word_order_typeResponse = await getDictionaryByCode('WORK_ORDER_TYPE')
    this.ai_types = response.data.data['SF']
    this.types = word_order_typeResponse.data.data['WORK_ORDER_TYPE']
    //获取航线
    this.asyncgetWaylineFileListByArea();
    const response2 = await getTicketInfo();
    const { dept_data, event_type, ai_type } = response2.data.data;
    this.asyncgetWaylineFileListByArea()
    const response2 = await getTicketInfo()
    const { dept_data, event_type, ai_type } = response2.data.data
    this.departments = dept_data.map(item => ({
      label: item.dept_name,
      value: item.id
    }));
    }))
  },
  mounted() {
    this.fetchTableData();
    const id = this.$route.query.id;
    console.log('idddddd', id);
  mounted () {
    this.fetchTableData()
    const id = this.$route.query.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 = {});
      this.handleViewDetail({ id })
      const find = this.$store.state.tags.bsTagList.find(i => i.path === '/tickets/orderLog')
      find && (find.query = {})
    } else {
      console.error('工单ID不存在!');
      console.error('工单ID不存在!')
    }
  },
  computed: {
    CircleClose() {
      return CircleClose;
    CircleClose () {
      return CircleClose
    },
    ...mapGetters(['userInfo', 'permission']),
    lastHeight() {
      const height = this.$store.state.common.lastHeight;
      return Number(height) || 0; // 确保是数字类型
    lastHeight () {
      const height = this.$store.state.common.lastHeight
      return Number(height) || 0 // 确保是数字类型
    },
    filteredTabs() {
    filteredTabs () {
      // rejection_and_draft 权限控制“已驳回”和“草稿”tab
      // console.log(this.permission, '权限信息')
      // console.log(this.userInfo, '权限信息22')
      const canShowRejectAndDraft = this.permission?.rejection_and_draft === true;
      const canShowRejectAndDraft = this.permission?.rejection_and_draft === true
      return this.tabs
        .map(tab => {
          if (tab.name === 'DRAFT') {
            return { ...tab, isShow: canShowRejectAndDraft };
            return { ...tab, isShow: canShowRejectAndDraft }
          }
          if (tab.name === 'REJECTED') {
            return { ...tab, isShow: canShowRejectAndDraft };
            return { ...tab, isShow: canShowRejectAndDraft }
          }
          return { ...tab, isShow: true };
          return { ...tab, isShow: true }
        })
        .filter(tab => tab.isShow);
        .filter(tab => tab.isShow)
    }
  },
  methods: {
    handleCellClick(row, column) {
    handleCellClick (row, column) {
      if (column.no === 1) {
        navigator.clipboard.writeText(row.job_info_num).then(() => {
          this.$message.success('复制工单编号成功');
        });
          this.$message.success('复制工单编号成功')
        })
      } else if (column.no === 2) {
        navigator.clipboard.writeText(row.name).then(() => {
          this.$message.success('复制工单名称成功');
        });
          this.$message.success('复制工单名称成功')
        })
      } else if (column.no === 4) {
        navigator.clipboard.writeText(row.dept_name).then(() => {
          this.$message.success('复制所属单位成功');
        });
          this.$message.success('复制所属单位成功')
        })
      } else if (column.no === 8) {
        navigator.clipboard.writeText(row.wayline_name).then(() => {
          this.$message.success('复制关联航线成功');
        });
          this.$message.success('复制关联航线成功')
        })
      } else if (column.no === 9) {
        navigator.clipboard.writeText(row.ai_type_str).then(() => {
          this.$message.success('复制关联算法成功');
        });
          this.$message.success('复制关联算法成功')
        })
      }
    },
    disabledDate(time) {
      return time.getTime() < Date.now() - 8.64e7; // 86400000 = 24 * 60 * 60 * 1000
    disabledDate (time) {
      return time.getTime() < Date.now() - 8.64e7 // 86400000 = 24 * 60 * 60 * 1000
    },
    searchChange(params, done) {
    searchChange (params, done) {
      // console.log('searchChange')
      this.query = params;
      this.parentId = '';
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
      this.query = params
      this.parentId = ''
      this.page.currentPage = 1
      this.onLoad(this.page, params)
      done()
    },
    async onLoad(page, params = {}) {
      this.loading = true;
    async onLoad (page, params = {}) {
      this.loading = true
      getList(
        null,
        this.page.currentPage,
        this.page.pageSize,
        Object.assign(params, this.query)
      ).then(res => {
        this.tableData = res.data.data;
        this.loading = false;
        this.selectionClear();
      });
        this.tableData = res.data.data
        this.loading = false
        this.selectionClear()
      })
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    selectionClear () {
      this.selectionList = []
      this.$refs.crud.toggleSelection()
    },
    async loadAMapScripts() {
    async loadAMapScripts () {
      try {
        // await loadAMap();
        // await loadAMapUI();
        this.mapLoaded = true;
        this.mapLoaded = true
      } catch (error) {
        console.error('Failed to load AMap scripts:', error);
        this.$message.error('地图加载失败,请检查网络或API Key配置');
        console.error('Failed to load AMap scripts:', error)
        this.$message.error('地图加载失败,请检查网络或API Key配置')
      }
    },
    formatCycleTime(row) {
      return `${row.cycle_time_value}`;
    formatCycleTime (row) {
      return `${row.cycle_time_value}`
    },
    async fetchTableData() {
      this.loading = true;
    async fetchTableData () {
      this.loading = true
      try {
        let params = this.getQueryParam();
        let params = this.getQueryParam()
        // console.log('发送的参数:', params)
        const response = await getList(params, this.page.currentPage, this.page.pageSize);
        const response = await getList(params, this.page.currentPage, this.page.pageSize)
        if (!response?.data?.data?.records) {
          throw new Error('接口返回数据格式不正确');
          throw new Error('接口返回数据格式不正确')
        }
        const { total, records } = response.data.data;
        const { total, records } = response.data.data
        this.tableData = records.map(item => {
          return item;
        });
          return item
        })
        // console.log('权限检查:', this.permission)
        this.page.total = total || 0;
        this.updateGlobalCounts();
        this.page.total = total || 0
        this.updateGlobalCounts()
      } catch (error) {
        // console.error('获取数据失败:', error)
        this.$message.error(error.message || '获取数据失败');
        this.tableData = [];
        this.page.total = 0;
        this.$message.error(error.message || '获取数据失败')
        this.tableData = []
        this.page.total = 0
      } finally {
        this.loading = false;
        this.loading = false
      }
    },
    getQueryParam() {
      const currentTab = this.tabs.find(tab => tab.name === this.activeTab);
    getQueryParam () {
      const currentTab = this.tabs.find(tab => tab.name === this.activeTab)
      if (this.filters.dateRange) {
        // console.log(
        //   'this.formatDate(this.filters.dateRange[0])',
@@ -1282,39 +963,43 @@
        deal_time: this.filters.deal_time || undefined,
        current: this.page.currentPage,
        size: this.page.pageSize
      };
      return params;
      }
      return params
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    sizeChange (pageSize) {
      this.page.pageSize = pageSize
    },
    async submitForm(status) {
    async submitForm (status) {
      this.$refs.testform.validate(async valid => {
        if (valid) {
          let dateRange = this.form.date_range;
          let dateRange = this.form.date_range
          // console.log('dateRange' + dateRange)
          this.form.begin_time = this.formatDate(dateRange[0]);
          this.form.end_time = this.formatDate(dateRange[1]);
          this.form.begin_time = this.formatDate(dateRange[0])
          this.form.end_time = this.formatDate(dateRange[1])
          // 如果选中日期包含当前天,那么选中的时间点不能小于当前时间
          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();
            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()
            if (selectedDate === dayjs().format('YYYY-MM-DD') && selectedTime < now) {
              return this.$message.warning('任务时间不能小于当前时间');
              return this.$message.warning('任务时间不能小于当前时间')
            }
          }
          const maxItem = this.device_sns.reduce((max, item) => {
            return item.drone_height > max.drone_height ? item : max;
          });
          console.log(maxItem, '高度');
          let result = _.round((maxItem.drone_height + this.form.rth_altitude), 2);
            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(`安全返航高度${result}米低于航线返航点高度${this.lastHeight}米为确保返航路径安全,建议您进行调整后再发布`, '提示', {
            this.$confirm(`当前返航高度存在安全隐患,建议调整为${resultH}米以上后进行发布`, '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
@@ -1323,44 +1008,44 @@
                ...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;
              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();
              (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;
            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();
            (this.device_sns = []), (this.wayLineList = []), this.fetchTableData()
          }
        }
      });
      })
    },
    //驳回原因显示
    async rejectDetail(id) {
      const response = await orderLogDetails(id);
      let data = response.data.data;
    async rejectDetail (id) {
      const response = await orderLogDetails(id)
      let data = response.data.data
      this.$confirm(data.remark, '驳回原因', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
@@ -1368,111 +1053,111 @@
      }).then(() => {
        this.form = {
          ...response.data.data
        };
        }
        // this.detailVisible = true
        this.handleViewDetail(data);
      });
        this.handleViewDetail(data)
      })
    },
    formatDate(date) {
      if (!date) return undefined;
      const d = new Date(date);
    formatDate (date) {
      if (!date) return undefined
      const d = new Date(date)
      return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(
        d.getDate()
      ).padStart(2, '0')} 00:00:00`;
      ).padStart(2, '0')} 00:00:00`
    },
    mapStatus(status) {
    mapStatus (status) {
      const statusTextMap = {
        0: '草稿',
        1: '待审核',
        2: '已驳回',
        3: '已通过'
      };
      return statusTextMap[status] || '未知状态';
      }
      return statusTextMap[status] || '未知状态'
    },
    getStatusTagType(status) {
    getStatusTagType (status) {
      const statusMap = {
        1: 'warning',
        2: 'info',
        3: 'primary',
        4: 'success',
        5: 'danger'
      };
      return statusMap[status] || 'info';
    },
    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();
      return statusMap[status] || 'info'
    },
    handleSearch() {
      this.page.currentPage = 1;
      this.fetchTableData();
    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()
    },
    handleReset() {
    handleSearch () {
      this.page.currentPage = 1
      this.fetchTableData()
    },
    handleReset () {
      this.filters = {
        keyword: '',
        department: '',
        type: '',
        dateRange: [],
        status: ''
      };
      this.page.currentPage = 1;
      this.fetchTableData();
      }
      this.page.currentPage = 1
      this.fetchTableData()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    currentChange (currentPage) {
      this.page.currentPage = currentPage
    },
    async updateGlobalCounts() {
    async updateGlobalCounts () {
      const counts = {
        all: 0,
        DRAFT: 0,
        WAIT_AUDIT: 0,
        REJECTED: 0,
        PASS: 0
      };
      var reponse = await jobStatusNum();
      }
      var reponse = await jobStatusNum()
      // console.log('统计' + reponse.data.data)
      reponse.data.data.forEach(item => {
        const tab = this.tabs.find(t => t.name === item.dict_key);
        const tab = this.tabs.find(t => t.name === item.dict_key)
        if (tab) {
          tab.count = item.num;
          tab.count = item.num
        }
      });
      })
    },
    handleAdd() {
      this.form = {};
      this.form.rth_altitude = 120;
      this.dialogVisible = true;
    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.$refs.MapContainer.initAddEntity('initPosition')
        }
      });
      })
      //航线列表
      this.asyncgetWaylineFileListByArea();
      this.asyncgetWaylineFileListByArea()
    },
    resetForm() {
    resetForm () {
      this.form = {
        name: '',
        type: '',
@@ -1482,248 +1167,247 @@
        address: '',
        content: '',
        photos: []
      };
      }
      if (this.$refs.testform) {
        this.$refs.testform.resetFields();
        this.$refs.testform.resetFields()
      }
    },
    formatLocation(location) {
    formatLocation (location) {
      if (!Array.isArray(location)) {
        return '未知位置';
        return '未知位置'
      }
      return `${location[0].toFixed(6)}, ${location[1].toFixed(6)}`;
      return `${location[0].toFixed(6)}, ${location[1].toFixed(6)}`
    },
    async handleViewDetail(row) {
      const response = await orderLogDetails(row.id);
      const data = response.data.data;
    async handleViewDetail (row) {
      const response = await orderLogDetails(row.id)
      const data = response.data.data
      this.form = {
        ...data
      };
      }
      // 更新机巢列表
      this.device_sns = data.device_list;
      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 && this.userInfo.user_id !== this.form.create_user))
        (this.permission.order_log_review || this.permission.order_log_recall) &&
        (data.status == 1 ||
          data.status == 3 ||
          (data.status == 2 && this.userInfo.user_id !== this.form.create_user))
        ? (this.detailTitle = '工单详情')
        : (this.detailTitle = '编辑工单');
        : (this.detailTitle = '编辑工单')
      this.detailVisible = true;
      this.detailVisible = true
      // 更新航线列表,追加 wayline_file_region_vo 数据
      if (data.wayline_file_region_vo) {
        const newWayline = 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.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 = {});
      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;
    async handleCheckDetail (row) {
      const response = await orderLogDetails(row.id)
      const data = response.data.data
      this.form = {
        ...data
      };
      }
      // 更新航线列表,追加 wayline_file_region_vo 数据
      // 更新航线列表,追加 wayline_file_region_vo 数据
      if (data.wayline_file_region_vo) {
        const newWayline = 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.wayLineList.push(newWayline)
        }
      }
      // 更新机巢列表
      this.device_sns = data.device_list;
      this.detailVisibleCopy = true;
      this.initMapLine(data.device_map_infos);
      this.device_sns = data.device_list
      this.detailVisibleCopy = true
      this.initMapLine(data.device_map_infos)
    },
    //导出
    async exportData() {
    async exportData () {
      this.$confirm('是否智飞工单数据?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        NProgress.start();
        let params = this.getQueryParam();
        NProgress.start()
        let params = this.getQueryParam()
        orderLogExport(params).then(res => {
          downloadXls(res.data, `智飞工单${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
          NProgress.done();
        });
      });
          downloadXls(res.data, `智飞工单${this.$dayjs().format('YYYY-MM-DD')}.xlsx`)
          NProgress.done()
        })
      })
    },
    hasAddBtnPermission() {
    hasAddBtnPermission () {
      // undefined 或 false 都返回 false,只有 true 返回 true
      // console.log('this.permission.order_log_add :', this.permission.order_log_add)
      return this.permission && this.permission.order_log_add === true;
      return this.permission && this.permission.order_log_add === true
    },
    hasPaddingBtnPermission() {
    hasPaddingBtnPermission () {
      // undefined 或 false 都返回 false,只有 true 返回 true
      // console.log('权限检查:', this.permission)
      return this.permission && this.permission.order_log_review === true;
      return this.permission && this.permission.order_log_review === true
    },
    hasRecallPaddingBtnPermission() {
    hasRecallPaddingBtnPermission () {
      // undefined 或 false 都返回 false,只有 true 返回 true
      // console.log('权限检查:', this.permission)
      // 智飞工单撤回
      return this.permission && this.permission.order_log_recall === true;
      return this.permission && this.permission.order_log_recall === true
    },
    //驳回按钮权限
    hasRejectionBtnPermission() {
    hasRejectionBtnPermission () {
      // undefined 或 false 都返回 false,只有 true 返回 true
      // console.log('权限检查:', this.permission)
      return this.permission && this.permission.rejection_btn === true;
      return this.permission && this.permission.rejection_btn === true
    },
    //自己点发布
    userPublishPush(id) {
    userPublishPush (id) {
      this.$confirm('确定发布吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        let response = userPublish(id);
        this.$message.success('发布成功');
        this.fetchTableData();
      });
        let response = userPublish(id)
        this.$message.success('发布成功')
        this.fetchTableData()
      })
    },
    //删除
    deleteOrderLog(id) {
    deleteOrderLog (id) {
      this.$confirm('确定删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        let response = deleteOrderLog(id);
        this.$message.success('删除');
        this.fetchTableData();
      });
        let response = deleteOrderLog(id)
        this.$message.success('删除')
        this.fetchTableData()
      })
    },
    refreshChange() {
      this.fetchTableData();
    refreshChange () {
      this.fetchTableData()
    },
    //获取航线列表
    async asyncgetWaylineFileListByArea(name) {
    async asyncgetWaylineFileListByArea (name) {
      const formData = {
        name: '',
        waylineType: undefined,
        current: 1,
        size: 99999999,
        descs: 'update_time'
      };
      var wayLineListResponse = await newGetWorkspacesPage(formData);
      this.wayLineList = wayLineListResponse.data.data.records;
      }
      var wayLineListResponse = await newGetWorkspacesPage(formData)
      this.wayLineList = wayLineListResponse.data.data.records
      this.initMapLine();
      this.initMapLine()
    },
    initMapLine(infos = {}, cb = () => {
    initMapLine (infos = {}, cb = () => {
    }) {
      let currentLine = this.wayLineList.find(item => item.wayline_id == this.form.file_id);
      let currentLine = this.wayLineList.find(item => item.wayline_id == this.form.file_id)
      if (!currentLine) return;
      if (!currentLine) return
      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()}`,
            url: `${import.meta.env.VITE_APP_AIRLINE_URL + currentLine.object_key
              }?_t=${new Date().getTime()}`,
            type: currentLine.wayline_type,
            cb,
            infos
          });
          })
        }
      });
      })
    },
    //可飞行机巢列表
    async getFlyingNestBy(waylineId) {
      const that = this;
    async getFlyingNestBy (waylineId) {
      const that = this
      // 先清空
      that.form.device_sns = [];
      that.device_sns = [];
      that.form.device_sns = []
      that.device_sns = []
      this.initMapLine({}, async polygon => {
        const currentLine = that.wayLineList.find(item => item.wayline_id === waylineId);
        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);
        }
        var wayLineListResponse = await getFlyingNestBy(params)
        // 再赋值
        that.device_sns = wayLineListResponse.data.data;
      });
        that.device_sns = wayLineListResponse.data.data
      })
    },
    //撤回
    async orderLogRecall(id) {
    async orderLogRecall (id) {
      this.$confirm('确定撤回则到草稿箱。', '是否撤回?', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        let reposne = await orderLogRecall(id);
        this.handleSearch();
      });
        let reposne = await orderLogRecall(id)
        this.handleSearch()
      })
    },
    onLoad() {
      this.fetchTableData();
    onLoad () {
      this.fetchTableData()
    },
    /**
     * 通过
     */
    async orderLogPass(id) {
      let response = await orderLogPass(id);
      let data = response.data.data;
      this.$message.success('审核通过');
      this.detailVisibleCopy = false;
    async orderLogPass (id) {
      let response = await orderLogPass(id)
      let data = response.data.data
      this.$message.success('审核通过')
      this.detailVisibleCopy = false
      this.detailVisible = false;
      this.detailVisible = false
      this.page.currentPage = 1;
      this.onLoad(this.page, this.query);
      this.page.currentPage = 1
      this.onLoad(this.page, this.query)
      // this.handleViewDetail()
    },
    /**
     * 驳回
     */
    async orderLogReject(id) {
    async orderLogReject (id) {
      this.$prompt('', '驳回原因', {
        confirmButtonText: '确定',
        cancelButtonText: '取消'
      }).then(async ({ value }) => {
        let response = await orderLogReject(id, value);
        let data = response.data.data;
        this.$message.success('驳回成功');
        this.detailVisibleCopy = false;
        let response = await orderLogReject(id, value)
        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.page.currentPage = 1
        this.onLoad(this.page, this.query)
      })
    }
  },
  watch: {
@@ -1732,13 +1416,13 @@
    //   this.getlastHeight = newVal;
    // },
    tableData: {
      handler() {
      handler () {
        // this.updateTabCounts()
      },
      deep: true
    }
  }
};
}
</script>
<style lang="scss" scoped>
@@ -1790,7 +1474,7 @@
    &-item {
      flex: 1;
      & > ::v-deep(.el-date-editor) {
      &> ::v-deep(.el-date-editor) {
        width: 100%;
        box-sizing: border-box;
      }
@@ -1933,7 +1617,7 @@
    justify-content: center;
    flex-wrap: wrap;
    & > ::v-deep(.el-button) {
    &> ::v-deep(.el-button) {
      flex: 1;
      margin-left: 0;
      margin-right: 10px;
@@ -1947,6 +1631,16 @@
  justify-content: center;
}
.safe-height {
  :deep(.el-form-item__label) {
    width: 120px !important;
  }
  :deep(.el-input-number) {
    width: 180px !important;
  }
}
.flex {
  display: flex;
}
@@ -1954,7 +1648,7 @@
.flex-1 {
  flex: 1;
  & > ::v-deep(div) {
  &> ::v-deep(div) {
    width: 100% !important;
  }
}
src/views/wel/components/statistics.vue
@@ -201,7 +201,7 @@
};
const flowStatus = {
  0: '无忧',
  1: '到期',
  1: '临期',
  2: '不足',
};
const monitorStatus = {