无人机管理后台前端(已迁走)
chenyao
2025-09-06 22966d51a10e8e8039ef9f405ccbe6b44180c52c
feat: 远程调试编辑信息
4 files modified
14 ■■■■ changed files
src/api/device-setting/index.js 4 ●●●● patch | view | raw | blame | history
src/store/modules/device.js 2 ●●● patch | view | raw | blame | history
src/views/device/components/DeviceSettingBox.vue 4 ●●●● patch | view | raw | blame | history
src/views/device/components/use-device-setting.js 4 ●●●● patch | view | raw | blame | history
src/api/device-setting/index.js
@@ -14,8 +14,8 @@
const workspaceId = localStorage.getItem(ELocalStorageKey.WorkspaceId) || ''
export const putDeviceProps = (deviceSn, body) => {
  console.log(deviceSn, body, workspaceId, '8888')
export const putDeviceProps = (deviceSn, workspaceId, body) => {
  console.log(deviceSn, workspaceId, body, '8888')
  return request({
    url: `/drone-device-core/manage/api/v1/devices/${workspaceId}/devices/${deviceSn}/property`,
    method: 'put',
src/store/modules/device.js
@@ -80,7 +80,7 @@
const mutations = {
  // 获取视频相关信息
  SAVE_VIDEO_SURVEILLANCE_INFO (state, info) {
    console.log('videoSurveillanceInfo', info)
    // console.log('videoSurveillanceInfo', info)
    state.videoSurveillance = info
  },
  SET_LAYER_INFO (state, info) {
src/views/device/components/DeviceSettingBox.vue
@@ -356,11 +356,11 @@
  deviceSetting.value[settingKey].popConfirm.visible = false;
}
async function onConfirm(settingKey) {
async function onConfirm(settingKey,) {
  deviceSetting.value[settingKey].popConfirm.loading = true;
  const body = genDevicePropsBySettingKey(settingKey, deviceSettingFormModel.value);
  localStorage.setItem(ELocalStorageKey.WorkspaceId, props.deviceInfo.workspace_id)
  await setDeviceProps(props.sn, body);
  await setDeviceProps(props.sn, props.deviceInfo.workspace_id, body);
  deviceSetting.value[settingKey].popConfirm.loading = false;
  deviceSetting.value[settingKey].popConfirm.visible = false;
}
src/views/device/components/use-device-setting.js
@@ -50,9 +50,9 @@
  }
  // 设置设备属性
  async function setDeviceProps(sn, body) {
  async function setDeviceProps(sn, workspaceId, body) {
    try {
       await putDeviceProps(sn, body).then(res => {
       await putDeviceProps(sn, workspaceId, body).then(res => {
         if (res.data.code === 0) {
           ElMessage({
             message: '设备属性设置成功!',