吉安感知网项目-前端
shuishen
2026-02-03 89380e6260a75d1d3b94de687ebcc2f50d50659d
uniapps/work-wx/src/store/modules/app/index.js
@@ -10,6 +10,14 @@
    theme: storage.get(THEME_KEY) || 'light',
    deviceUpdateKey: 0, //设备刷新key
    jobUpdateKey: 0, //任务刷新key
    // 字典
    taskType: [], // 任务类型
    flightMode: [], // 飞行模式
    flightRules: [], // 飞行规则
    flightPlan: [], // 飞行计划
    flyActivityStatus: [], // 飞行活动状态
    flyActivityTakeoffStatus: [], // 无人机起飞状态
    proType: [], // 飞行器类型
  }),
  getters: {
    getSystemInfo (state) {
@@ -17,14 +25,59 @@
    },
    getTheme (state) {
      return state.theme
    }
    },
    // 字典
    getTaskType (state) {
      return state.taskType
    },
    getFlightMode (state) {
      return state.flightMode
    },
    getFlightRules (state) {
      return state.flightRules
    },
    getFlightPlan (state) {
      return state.flightPlan
    },
    getFlyActivityStatus (state) {
      return state.flyActivityStatus
    },
    getFlyActivityTakeoffStatus (state) {
      return state.flyActivityTakeoffStatus
    },
    getProType (state) {
      return state.proType
    },
  },
  actions: {
    // 设置字典
    setTaskType (data) {
      this.taskType = data
    },
    setFlightMode (data) {
      this.flightMode = data
    },
    setFlightRules (data) {
      this.flightRules = data
    },
    setFlightPlan (data) {
      this.flightPlan = data
    },
    setFlyActivityStatus (data) {
      this.flyActivityStatus = data
    },
    setFlyActivityTakeoffStatus (data) {
      this.flyActivityTakeoffStatus = data
    },
    setProType (data) {
      this.proType = data
    },
    setSystemInfo (info) {
      this.systemInfo = info
    },
    setDeviceUpdateKeyAdd () {
      console.log(111, this.deviceUpdateKey + 1)
      this.deviceUpdateKey = this.deviceUpdateKey + 1
    },
    setJobUpdateKeyAdd (state, data) {
@@ -75,6 +128,7 @@
        })
      })
    }
  }
})