无人机管理后台前端(已迁走)
罗广辉
2025-12-06 245ee910ed6a6911154fcb1027e698713cb5fbd5
Merge branch 'feature/v8.0/8.0.4' into feature/v9.0/9.0.1
1 files modified
94 ■■■■ changed files
src/views/device/airport.vue 94 ●●●● patch | view | raw | blame | history
src/views/device/airport.vue
@@ -411,46 +411,6 @@
            ],
          },
          {
            label: '设备状态',
            prop: 'mode_code',
            addDisplay: false,
            editDisplay: false,
            viewDisplay: false,
            labelWidth: 145,
            searchSpan: 4,
            search: true,
            type: 'select',
            dicData: [
              { label: '在线', value: 0 },
              { label: '离线', value: -1 },
              { label: '远程调试', value: 2 },
              { label: '现场调试', value: 1 },
              { label: '固件升级中', value: 3 }
            ],
            slot: true,
            width: 110,
            rules: [
              {
                required: true,
                message: '请输入机场状态',
                trigger: 'blur',
              },
            ],
          },
          {
            label: '固件升级',
            prop: 'firmware_status',
            labelWidth: 145,
            width: 100,
            // hide: true,
            viewDisabled: true,
            addDisabled: true,
            editDisplay: false, //编辑显示
            addDisplay: false,
            viewDisplay: false,
          },
          {
            label: '4G增强',
            prop: 'link_workmode',
            labelWidth: 145,
@@ -544,7 +504,46 @@
            labelWidth: 145,
            width: 110,
          },
          {
            label: '设备状态',
            prop: 'mode_code',
            addDisplay: false,
            editDisplay: false,
            viewDisplay: false,
            labelWidth: 145,
            searchSpan: 4,
            search: true,
            type: 'select',
            dicData: [
              { label: '在线', value: 0 },
              { label: '离线', value: -1 },
              { label: '远程调试', value: 2 },
              { label: '现场调试', value: 1 },
              { label: '固件升级中', value: 3 }
            ],
            slot: true,
            width: 110,
            rules: [
              {
                required: true,
                message: '请输入机场状态',
                trigger: 'blur',
              },
            ],
          },
          {
            label: '固件升级',
            prop: 'firmware_status',
            labelWidth: 145,
            width: 100,
            // hide: true,
            viewDisabled: true,
            addDisabled: true,
            editDisplay: false, //编辑显示
            addDisplay: false,
            viewDisplay: false,
          },
          {
            label: '设备SN',
            prop: 'device_sn',
@@ -877,22 +876,20 @@
      if (loadData.biz_code != 'ota_progress') {
        return
      }
      console.log(loadData.data.output.progress.percent, '6666')
      // if(loadData.data.output.progress.percent < 10) {
      //   this.onLoad(this.page)
      // }
      console.log(loadData.data.output.progress.percent, '升级进度')
      this.data.forEach((e, index) => {
        if ((e.device_sn == loadData.data.sn || e.child_sn == loadData.data.sn) && loadData.data.output.status == 'in_progress') {
          e.firmware_progress = loadData.data.output.progress.percent
          if (e.children[0]) {
            e.children[0].firmware_progress = loadData.data.output.progress.percent;
          }
          console.log('是否更新中2',e.children[0])
          // console.log('是否更新中2',e.children[0])
        }
        if ((e.device_sn == loadData.data.sn || e.child_sn == loadData.data.sn) && loadData.data.output.status == 'ok') {
          // 升级完成修改状态
          e.firmware_status = 1
          e.mode_code = 0
          if (e.children[0]) {
            e.children[0].firmware_status = 1
          }
@@ -1149,11 +1146,10 @@
          message: '操作成功!',
        })
        // 此处需分是无人机升级还是机巢升级版本
        console.log('看看是无人机更新还是机场更新',that.isUpdateDrone)
        // console.log('看看是无人机更新还是机场更新',that.isUpdateDrone)
        if(that.isUpdateDrone.domain == 3) {
          this.onLoad(this.page)
        } else {
          console.log(111)
          this.data.map(item => {
            if(item.workspace_id === that.isUpdateDrone.workspace_id) {
              item.firmware_status = 2
@@ -1486,7 +1482,7 @@
          ...item,
          firmware_progress: 0
        }));
        console.log('2222',this.data)
        // console.log('2222',this.data)
        this.loading = false
        this.selectionClear()
      })