无人机管理后台前端(已迁走)
shuishen
2025-07-10 6b623488365797df35dd3c53db3b22fad4be5885
Merge branch 'test' into prod
9 files modified
428 ■■■■■ changed files
src/option/job/jobinfo.js 7 ●●●●● patch | view | raw | blame | history
src/styles/element-ui.scss 77 ●●●●● patch | view | raw | blame | history
src/views/algorithmRepository/algorithmRepository.vue 20 ●●●● patch | view | raw | blame | history
src/views/device/airport.vue 16 ●●●● patch | view | raw | blame | history
src/views/device/components/devicePerShare.vue 210 ●●●● patch | view | raw | blame | history
src/views/tickets/orderLog.vue 68 ●●●● patch | view | raw | blame | history
src/views/tickets/ticket.vue 26 ●●●●● patch | view | raw | blame | history
src/views/wel/components/statistics.vue 2 ●●● patch | view | raw | blame | history
src/views/wel/index.vue 2 ●●● patch | view | raw | blame | history
src/option/job/jobinfo.js
@@ -145,6 +145,7 @@
      },
      search: true,
      display: false,
      showOverflowTooltip: true,
    },
    {
      label: '任务ID',
@@ -153,6 +154,7 @@
      search: true,
      width: 80,
      display: false,
      showOverflowTooltip: true,
    },
    {
      label: '任务名称',
@@ -161,6 +163,7 @@
      search: true,
      width: 200,
      display: false,
      showOverflowTooltip: true,
    },
    {
      label: '定时信息',
@@ -177,6 +180,7 @@
      ],
      width: 120,
      display: false,
      showOverflowTooltip: true,
    },
    {
      label: '执行类型',
@@ -193,6 +197,7 @@
      ],
      width: 110,
      display: false,
      showOverflowTooltip: true,
    },
    {
      label: '处理器类型',
@@ -209,6 +214,7 @@
      ],
      width: 180,
      display: false,
      showOverflowTooltip: true,
    },
    {
      label: '任务状态',
@@ -219,6 +225,7 @@
      slot: true,
      width: 100,
      display: false,
      showOverflowTooltip: true,
    },
  ],
  group: [
src/styles/element-ui.scss
@@ -31,12 +31,20 @@
  padding: 0 !important;
}
.el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-sub-menu .el-sub-menu__title:hover {
.el-dropdown-menu__item--divided:before,
.el-menu,
.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal>.el-sub-menu .el-sub-menu__title:hover {
  background-color: transparent;
}
.el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-sub-menu .el-sub-menu__title:hover {
.el-dropdown-menu__item--divided:before,
.el-menu,
.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal>.el-sub-menu .el-sub-menu__title:hover {
  background-color: transparent !important;
}
@@ -49,11 +57,13 @@
  background-color: transparent;
}
.el-button.is-text:not(.is-disabled):focus, .el-button.is-text:not(.is-disabled):hover {
.el-button.is-text:not(.is-disabled):focus,
.el-button.is-text:not(.is-disabled):hover {
  background-color: transparent;
}
.avue-icon i, .avue-icon svg {
.avue-icon i,
.avue-icon svg {
  line-height: 20px;
}
@@ -66,36 +76,43 @@
  justify-content: space-between;
  .el-dialog {
      position: relative;
      padding: 0;
    position: relative;
    padding: 0;
    overflow: hidden;
    .el-dialog__body {
      width: 100%;
      height: 100%;
      iframe {
        width: 100%;
        height: 100%;
      }
    }
    .el-dialog__header {
      height: 0;
      overflow: hidden;
      padding: 0;
      .el-dialog__body {
          width: 100%;
          height: 100%;
      .el-dialog__headerbtn {
        position: absolute;
        left: 0;
        top: 14px;
          iframe {
              width: 100%;
              height: 100%;
          }
        .el-dialog__close {
          color: #fff;
          font-size: 35px;
          z-index: 99;
        }
      }
    }
  }
}
      .el-dialog__header {
          height: 0;
          overflow: hidden;
          padding: 0;
          .el-dialog__headerbtn {
              position: absolute;
              left: 0;
              top: 14px;
              .el-dialog__close {
                  color: #fff;
                  font-size: 35px;
                  z-index: 99;
              }
          }
      }
.ztzf-drawer-body-basic-container {
  .el-drawer__body {
    display: flex;
    flex-direction: column;
  }
}
src/views/algorithmRepository/algorithmRepository.vue
@@ -42,7 +42,10 @@
                v-model="taskData"
                placeholder="请选择日期"
                @change="changeselect"
                  clearable
              />
                <!-- @clear="handleDateClear" -->
            </div>
            <div class="item">
              <div class="itemchild">机巢查询:</div>
@@ -70,7 +73,7 @@
              ref="imageRef"
              :src="getSmallImg(item.url)"
              show-progress
              :preview-src-list="detailData.map(i => i.url)"
              :preview-src-list="[getShowImg(item.url)]"
              fit="cover"
            />
@@ -107,7 +110,7 @@
import { getDictionaryByCode } from '@/api/system/dictbiz';
import { getalgorithmList, selectDeviceList } from '@/api/algorithm';
import { getSmallImg } from '@/utils/util';
import { getSmallImg,getShowImg } from '@/utils/util';
import { useRouter } from 'vue-router';
const router = useRouter();
const baseUrl = import.meta.env.VITE_APP_PICTURE_URL;
@@ -181,15 +184,25 @@
  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;
};
const handleSearch = () => {
// 处理日期清空
const handleDateClear = () => {
  taskData.value = ''; // 清空绑定的日期数据
  params.value.start_date = null; // 重置开始日期参数
  params.value.end_date = null; // 重置结束日期参数
  getList();
};
const handleSearch = () => {
  getList();
};
const handleReset = () => {
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;
@@ -246,6 +259,7 @@
    &: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;
src/views/device/airport.vue
@@ -115,7 +115,8 @@
      </template>
    </el-dialog>
    <el-drawer title="机场授权管理" size="60%" append-to-body v-model="devicePerShareVisible" :direction="'rtl'">
    <el-drawer class="ztzf-drawer-body-basic-container" title="机场授权管理" size="60%" append-to-body
      v-model="devicePerShareVisible" :direction="'rtl'">
      <DevicePerShare ref="devicePerShare" />
    </el-drawer>
@@ -352,10 +353,20 @@
          },
          {
            label: '行政区划',
            prop: 'area_name',
            hide: true,
            editDisplay: false, //编辑显示
            viewDisplay: true, //查看显示
            labelWidth: 130,
          },
          {
            label: '行政区划',
            prop: 'area_code',
            type: 'cascader',
            labelWidth: 130,
            hide: true,
            editDisplay: true,
            viewDisplay: false,
            props: {
              label: 'title',
              value: 'value',
@@ -1010,12 +1021,13 @@
      if (['edit', 'view'].includes(type)) {
        getDetail(this.form.id).then(res => {
          const data = res.data.data
          this.form = {
            ...data,
            area_code: this.getFullAreaCode(data.area_code),
            area_name: this.form.area_name,
            duration_of_insurance: [data?.insure_start_time || '', data?.insure_expired_time || '']
          }
          console.log('this.form', this.form)
          done()
        })
src/views/device/components/devicePerShare.vue
@@ -1,35 +1,20 @@
<template>
  <basic-container>
    <avue-crud
      :option="option"
      :table-loading="loading"
      :data="data"
      v-model:page="page"
      ref="crud"
      @row-del="rowDel"
      v-model="form"
      :permission="permissionList"
      @row-save="rowSave"
      @row-update="rowUpdate"
      :before-open="beforeOpen"
      @search-change="searchChange"
      @search-reset="searchReset"
      @selection-change="selectionChange"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
    >
    <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-save="rowSave" @row-update="rowUpdate" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange">
    </avue-crud>
  </basic-container>
</template>
<script>
import { getList, remove, add, update } from '@/api/device/devicePerShare';
import { getDeptTreeByNotItself } from '@/api/system/dept';
import { mapGetters } from 'vuex';
import { getList, remove, add, update } from '@/api/device/devicePerShare'
import { getDeptTreeByNotItself } from '@/api/system/dept'
import { mapGetters } from 'vuex'
export default {
  data() {
  data () {
    return {
      deptId: '',
      deviceSn: '',
@@ -58,6 +43,10 @@
        excelBtn: false,
        dialogClickModal: false,
        grid: false,
        height: 'auto',
        calcHeight: 20,
        column: [
          {
            label: '授权单位',
@@ -136,118 +125,118 @@
        ],
      },
      data: [],
    };
    }
  },
  computed: {
    ...mapGetters(['permission']),
    permissionList() {
    permissionList () {
      return {
        addBtn: this.validData(this.permission.airport_add, true),
        viewBtn: this.validData(this.permission.airport_view, true),
        delBtn: this.validData(this.permission.airport_delete, true),
        editBtn: this.validData(this.permission.airport_edit, true),
      };
      }
    },
    ids() {
      let ids = [];
    ids () {
      let ids = []
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(',');
        ids.push(ele.id)
      })
      return ids.join(',')
    },
  },
  methods: {
    init(data) {
      this.deptId = data.dept_id;
      this.deviceSn = data.device_sn;
      this.getDeptTreeInfo();
      this.getLoadPage(this.page);
    init (data) {
      this.deptId = data.dept_id
      this.deviceSn = data.device_sn
      this.getDeptTreeInfo()
      this.getLoadPage(this.page)
    },
    getDeptTreeInfo() {
    getDeptTreeInfo () {
      getDeptTreeByNotItself(this.deptId, this.deviceSn).then(res => {
        const column = this.findObject(this.option.column, 'deptId');
        this.deptTreeData = res.data.data;
        column.dicData = res.data.data;
      });
        const column = this.findObject(this.option.column, 'deptId')
        this.deptTreeData = res.data.data
        column.dicData = res.data.data
      })
    },
    rowSave(row, done, loading) {
    rowSave (row, done, loading) {
      // 添加毫秒级时间戳
      row['createTime'] = Date.now();
      row['deviceSn'] = this.deviceSn;
      row['createTime'] = Date.now()
      row['deviceSn'] = this.deviceSn
      add(row).then(
        () => {
          this.initFlag = false;
          this.getLoadPage(this.page);
          this.getDeptTreeInfo();
          this.initFlag = false
          this.getLoadPage(this.page)
          this.getDeptTreeInfo()
          this.$message({
            type: 'success',
            message: '操作成功!',
          });
          done();
          })
          done()
        },
        error => {
          window.console.log(error);
          loading();
          window.console.log(error)
          loading()
        }
      );
      )
    },
    rowUpdate(row, index, done, loading) {
      row['device_sn'] = this.deviceSn;
    rowUpdate (row, index, done, loading) {
      row['device_sn'] = this.deviceSn
      update(row).then(
        () => {
          this.getLoadPage(this.page);
          this.getLoadPage(this.page)
          this.$message({
            type: 'success',
            message: '操作成功!',
          });
          done();
          })
          done()
        },
        error => {
          window.console.log(error);
          loading();
          window.console.log(error)
          loading()
        }
      );
      )
    },
    rowDel(row) {
    rowDel (row) {
      this.$confirm('确定将选择数据删除?', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
        .then(() => {
          return remove(row.id);
          return remove(row.id)
        })
        .then(() => {
          this.getDeptTreeInfo();
          this.getLoadPage(this.page);
          this.getDeptTreeInfo()
          this.getLoadPage(this.page)
          this.$message({
            type: 'success',
            message: '操作成功!',
          });
        });
          })
        })
    },
    searchReset() {
      this.query = {};
      this.getLoadPage(this.page);
    searchReset () {
      this.query = {}
      this.getLoadPage(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.getLoadPage(this.page, params);
      done();
    searchChange (params, done) {
      this.query = params
      this.page.currentPage = 1
      this.getLoadPage(this.page, params)
      done()
    },
    selectionChange(list) {
      this.selectionList = list;
    selectionChange (list) {
      this.selectionList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    selectionClear () {
      this.selectionList = []
      this.$refs.crud.toggleSelection()
    },
    handleDelete() {
    handleDelete () {
      if (this.selectionList.length === 0) {
        this.$message.warning('请选择至少一条数据');
        return;
        this.$message.warning('请选择至少一条数据')
        return
      }
      this.$confirm('确定将选择数据删除?', {
        confirmButtonText: '确定',
@@ -255,48 +244,48 @@
        type: 'warning',
      })
        .then(() => {
          return remove(this.ids);
          return remove(this.ids)
        })
        .then(() => {
          this.getLoadPage(this.page);
          this.getLoadPage(this.page)
          this.$message({
            type: 'success',
            message: '操作成功!',
          });
          this.$refs.crud.toggleSelection();
        });
          })
          this.$refs.crud.toggleSelection()
        })
    },
    beforeOpen(done, type) {
      done();
    beforeOpen (done, type) {
      done()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
      this.getLoadPage(this.page, this.query); // 添加数据刷新
    currentChange (currentPage) {
      this.page.currentPage = currentPage
      this.getLoadPage(this.page, this.query) // 添加数据刷新
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
      this.page.currentPage = 1; // 每页条数改变时,重置到第一页
      this.getLoadPage(this.page, this.query); // 添加数据刷新
    sizeChange (pageSize) {
      this.page.pageSize = pageSize
      this.page.currentPage = 1 // 每页条数改变时,重置到第一页
      this.getLoadPage(this.page, this.query) // 添加数据刷新
    },
    refreshChange() {
      this.getLoadPage(this.page, this.query);
    refreshChange () {
      this.getLoadPage(this.page, this.query)
    },
    getLoadPage(page, params = {}) {
      params['deviceSn'] = this.deviceSn;
      this.loading = true;
    getLoadPage (page, params = {}) {
      params['deviceSn'] = this.deviceSn
      this.loading = true
      getList(page.currentPage, page.pageSize, params).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
        const data = res.data.data
        this.page.total = data.total
        this.data = data.records
        this.loading = false
        this.selectionClear()
      }).catch(err => {
        console.error('加载数据失败:', err);
        this.loading = false;
      });
        console.error('加载数据失败:', err)
        this.loading = false
      })
    },
  },
};
}
</script>
<style>
@@ -304,6 +293,7 @@
  background-color: aqua;
  border-radius: 4px;
}
.firmware_status:hover {
  cursor: pointer;
}
src/views/tickets/orderLog.vue
@@ -573,19 +573,55 @@
        calcHeight: 196,
        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: 'job_info_num', width: 100, ellipsis: true, overHidden: true,
            showOverflowTooltip: true,
          },
          {
            label: '工单名称', prop: 'name', width: 100, ellipsis: true, overHidden: true,
            showOverflowTooltip: true,
          },
          {
            label: '工单状态', prop: 'status', width: 88,
            showOverflowTooltip: true,
          },
          {
            label: '所属单位', prop: 'dept_name', width: 100, ellipsis: true,
            showOverflowTooltip: true,
          },
          {
            label: '发起时间', prop: 'create_time', width: 144, ellipsis: true,
            showOverflowTooltip: true,
          },
          {
            label: '已执行次数', prop: 'job_num', width: 96, ellipsis: true,
            showOverflowTooltip: true,
          },
          {
            label: '工单内容', prop: 'content', ellipsis: true, overHidden: true,
            showOverflowTooltip: true,
          },
          {
            label: '关联航线', prop: 'wayline_name', width: 100, 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 },
          { label: '关联机巢', prop: 'device_names', width: 112, ellipsis: true, overHidden: 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: '',
@@ -593,6 +629,7 @@
            formatter: row => this.formatCycleTime(row),
            html: true,
            ellipsis: true,
            showOverflowTooltip: true,
            // overHidden: true
          },
        ],
@@ -1089,7 +1126,7 @@
        //按照航线来
        const params = {
          type: currentLine.wayline_type,
          type: [2, 4, 5].includes(currentLine.wayline_type) ? 2 : 0,
          wayline_id: waylineId,
          polygon
        }
@@ -1336,12 +1373,9 @@
    &> ::v-deep(.el-button) {
      flex: 1;
      max-width: 44px;
      margin-left: 0;
      margin-right: 10px;
      &:nth-child(4n) {
        margin-left: 0;
      }
    }
  }
}
src/views/tickets/ticket.vue
@@ -173,7 +173,8 @@
    <!-- 工单详情对话框 -->
    <el-dialog v-model="detailVisible" title="工单详情" width="80%" append-to-body>
      <div class="detail-container">
        <div class="event-title-center">{{ currentDetail.orderName || '事件名称' }}</div>
        <div class="detail-top-title">  <div class="event-title-center event-orderNumber">{{ currentDetail.orderNumber || '工单编号' }}</div>
        <div class="event-title-center">{{ currentDetail.orderName || '事件名称' }}</div></div>
        <div v-if="totalTime" class="event-total-time">
          总耗时:{{ totalTime }}
        </div>
@@ -496,7 +497,7 @@
      @close="reCheckDialog = false">
      <div class="dialog-footer">
        <el-button type="primary" @click="reCheckConfirm(1)">人工复核</el-button>
        <el-button type="primary" @click="reCheckConfirm(2)">AI复核</el-button>
        <el-button type="primary" @click="reCheckConfirm(2)">无人机复核</el-button>
      </div>
    </el-dialog>
  </basic-container>
@@ -1349,6 +1350,17 @@
        if (response.data.code === 0) {
          this.$message.success('草稿保存成功')
          this.dialogVisible = false
          this.form={
        name: '',
        type: '',
        department: '',
        handler: '',
        algorithm: [], // 关联算法改为数组
        location: [], // 将存储为[经度, 纬度, 地址]格式
        address: '',
        photos: [],
        content: '', // 新增字段,用于存储后端返回的 content
      },
          this.fetchTableData()
        } else {
          throw new Error(response.data.msg || '保存失败')
@@ -1557,6 +1569,8 @@
          })
        }
        this.currentDetail.status = row.status
      } catch (error) {
        if (this.activeTab === 'myTickets') {
          const statusArr = this.workType === 1 ? ['3', '4'] : this.fixedStatuses
@@ -1571,6 +1585,7 @@
      }
      this.currentDetail = detailData
       console.log('this.currentDetail',this.currentDetail);
      this.detailVisible = true
      this.$nextTick(() => {
        if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) {
@@ -2756,6 +2771,13 @@
.detail-container {
  padding: 20px;
  .detail-top-title {
  display: flex;
  justify-content: center;
  align-items: center;
  .event-orderNumber{
  margin-right: 10px;}
  }
}
.status-flow {
src/views/wel/components/statistics.vue
@@ -198,7 +198,7 @@
// 样式配置对象
const statusStyles = {
  机巢保险: {
    0: { class: 'expired', color: 'rgba(186, 186, 186, 1)', background: 'rgba(186, 186, 186, 1)' },
    0: { class: 'expired', color: '#FFA600', background: '#FFA600' },
    1: { class: 'normal', color: 'rgba(27, 148, 255, 1)', background: 'rgba(27, 148, 255, 1)' },
  },
src/views/wel/index.vue
@@ -378,7 +378,7 @@
    yAxis: [
      {
        type: 'log',
        name: '单位:万套',
        name: '单位:万',
        nameTextStyle: {
          color: '#383838',
          fontSize: '1.2rem'