|
|
@@ -1,6 +1,8 @@
|
|
|
<template>
|
|
|
<div class="device-setting-wrapper">
|
|
|
- <div class="device-setting-header">Device Property Set</div>
|
|
|
+ <div class="device-setting-header">
|
|
|
+ 设备属性设置
|
|
|
+ </div>
|
|
|
<div class="device-setting-box">
|
|
|
<!-- 飞行器夜航灯 -->
|
|
|
<div class="control-setting-item">
|
|
|
@@ -9,19 +11,18 @@
|
|
|
<div class="item-status">{{ deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].value }}</div>
|
|
|
</div>
|
|
|
<div class="control-setting-item-right">
|
|
|
- <DeviceSettingPopover
|
|
|
- :visible="deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].popConfirm.visible"
|
|
|
+ <DeviceSettingPopover :visible="deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].popConfirm.visible"
|
|
|
:loading="deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].popConfirm.loading"
|
|
|
@confirm="onConfirm(deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].settingKey)"
|
|
|
- @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].settingKey)"
|
|
|
- >
|
|
|
+ @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].settingKey)">
|
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
|
<span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].label }}:</span>
|
|
|
- <a-switch checked-children="开" un-checked-children="关" v-model:checked="deviceSettingFormModel.nightLightsState" />
|
|
|
+ <a-switch checked-children="开" un-checked-children="关"
|
|
|
+ v-model:checked="deviceSettingFormModel.nightLightsState" />
|
|
|
</div>
|
|
|
</template>
|
|
|
- <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].settingKey)">Edit</a>
|
|
|
+ <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.NIGHT_LIGHTS_MODE_SET].settingKey)">编辑</a>
|
|
|
</DeviceSettingPopover>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -32,12 +33,10 @@
|
|
|
<div class="item-status">{{ deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].value }}</div>
|
|
|
</div>
|
|
|
<div class="control-setting-item-right">
|
|
|
- <DeviceSettingPopover
|
|
|
- :visible="deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].popConfirm.visible"
|
|
|
+ <DeviceSettingPopover :visible="deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].popConfirm.visible"
|
|
|
:loading="deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].popConfirm.loading"
|
|
|
@confirm="onConfirm(deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].settingKey)"
|
|
|
- @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].settingKey)"
|
|
|
- >
|
|
|
+ @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].settingKey)">
|
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
|
<span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].label }}:</span>
|
|
|
@@ -45,7 +44,7 @@
|
|
|
m
|
|
|
</div>
|
|
|
</template>
|
|
|
- <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].settingKey)">Edit</a>
|
|
|
+ <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.HEIGHT_LIMIT_SET].settingKey)">编辑</a>
|
|
|
</DeviceSettingPopover>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -56,21 +55,21 @@
|
|
|
<div class="item-status">{{ deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].value }}</div>
|
|
|
</div>
|
|
|
<div class="control-setting-item-right">
|
|
|
- <DeviceSettingPopover
|
|
|
- :visible="deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].popConfirm.visible"
|
|
|
+ <DeviceSettingPopover :visible="deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].popConfirm.visible"
|
|
|
:loading="deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].popConfirm.loading"
|
|
|
@confirm="onConfirm(deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].settingKey)"
|
|
|
- @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].settingKey)"
|
|
|
- >
|
|
|
+ @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].settingKey)">
|
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
|
<span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].label }}:</span>
|
|
|
- <a-switch style="margin-right: 10px;" checked-children="开" un-checked-children="关" v-model:checked="deviceSettingFormModel.distanceLimitStatus.state" />
|
|
|
- <a-input-number v-model:value="deviceSettingFormModel.distanceLimitStatus.distanceLimit" :min="15" :max="8000" />
|
|
|
+ <a-switch style="margin-right: 10px;" checked-children="开" un-checked-children="关"
|
|
|
+ v-model:checked="deviceSettingFormModel.distanceLimitStatus.state" />
|
|
|
+ <a-input-number v-model:value="deviceSettingFormModel.distanceLimitStatus.distanceLimit" :min="15"
|
|
|
+ :max="8000" />
|
|
|
m
|
|
|
</div>
|
|
|
</template>
|
|
|
- <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].settingKey)">Edit</a>
|
|
|
+ <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.DISTANCE_LIMIT_SET].settingKey)">编辑</a>
|
|
|
</DeviceSettingPopover>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -85,15 +84,17 @@
|
|
|
:visible="deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].popConfirm.visible"
|
|
|
:loading="deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].popConfirm.loading"
|
|
|
@confirm="onConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].settingKey)"
|
|
|
- @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].settingKey)"
|
|
|
- >
|
|
|
+ @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].settingKey)">
|
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
|
- <span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].label }}:</span>
|
|
|
- <a-switch checked-children="开" un-checked-children="关" v-model:checked="deviceSettingFormModel.obstacleAvoidanceHorizon" />
|
|
|
+ <span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].label
|
|
|
+ }}:</span>
|
|
|
+ <a-switch checked-children="开" un-checked-children="关"
|
|
|
+ v-model:checked="deviceSettingFormModel.obstacleAvoidanceHorizon" />
|
|
|
</div>
|
|
|
</template>
|
|
|
- <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].settingKey)">Edit</a>
|
|
|
+ <a
|
|
|
+ @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_HORIZON].settingKey)">编辑</a>
|
|
|
</DeviceSettingPopover>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -108,15 +109,17 @@
|
|
|
:visible="deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].popConfirm.visible"
|
|
|
:loading="deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].popConfirm.loading"
|
|
|
@confirm="onConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].settingKey)"
|
|
|
- @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].settingKey)"
|
|
|
- >
|
|
|
+ @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].settingKey)">
|
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
|
- <span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].label }}:</span>
|
|
|
- <a-switch checked-children="开" un-checked-children="关" v-model:checked="deviceSettingFormModel.obstacleAvoidanceUpside" />
|
|
|
+ <span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].label
|
|
|
+ }}:</span>
|
|
|
+ <a-switch checked-children="开" un-checked-children="关"
|
|
|
+ v-model:checked="deviceSettingFormModel.obstacleAvoidanceUpside" />
|
|
|
</div>
|
|
|
</template>
|
|
|
- <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].settingKey)">Edit</a>
|
|
|
+ <a
|
|
|
+ @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_UPSIDE].settingKey)">编辑</a>
|
|
|
</DeviceSettingPopover>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -131,15 +134,17 @@
|
|
|
:visible="deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].popConfirm.visible"
|
|
|
:loading="deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].popConfirm.loading"
|
|
|
@confirm="onConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].settingKey)"
|
|
|
- @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].settingKey)"
|
|
|
- >
|
|
|
+ @cancel="onCancel(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].settingKey)">
|
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
|
- <span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].label }}:</span>
|
|
|
- <a-switch checked-children="开" un-checked-children="关" v-model:checked="deviceSettingFormModel.obstacleAvoidanceDownside" />
|
|
|
+ <span class="form-label">{{ deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].label
|
|
|
+ }}:</span>
|
|
|
+ <a-switch checked-children="开" un-checked-children="关"
|
|
|
+ v-model:checked="deviceSettingFormModel.obstacleAvoidanceDownside" />
|
|
|
</div>
|
|
|
</template>
|
|
|
- <a @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].settingKey)">Edit</a>
|
|
|
+ <a
|
|
|
+ @click="onShowPopConfirm(deviceSetting[DeviceSettingKeyEnum.OBSTACLE_AVOIDANCE_DOWNSIDE].settingKey)">编辑</a>
|
|
|
</DeviceSettingPopover>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -176,16 +181,16 @@ watch(() => props.deviceInfo, (value) => {
|
|
|
deep: true
|
|
|
})
|
|
|
|
|
|
-function onShowPopConfirm (settingKey: DeviceSettingKeyEnum) {
|
|
|
+function onShowPopConfirm(settingKey: DeviceSettingKeyEnum) {
|
|
|
deviceSetting.value[settingKey].popConfirm.visible = true
|
|
|
deviceSettingFormModel.value = cloneDeep(deviceSettingFormModelFromOsd.value)
|
|
|
}
|
|
|
|
|
|
-function onCancel (settingKey: DeviceSettingKeyEnum) {
|
|
|
+function onCancel(settingKey: DeviceSettingKeyEnum) {
|
|
|
deviceSetting.value[settingKey].popConfirm.visible = false
|
|
|
}
|
|
|
|
|
|
-async function onConfirm (settingKey: DeviceSettingKeyEnum) {
|
|
|
+async function onConfirm(settingKey: DeviceSettingKeyEnum) {
|
|
|
deviceSetting.value[settingKey].popConfirm.loading = true
|
|
|
const body = genDevicePropsBySettingKey(settingKey, deviceSettingFormModel.value)
|
|
|
await setDeviceProps(props.sn, body)
|
|
|
@@ -202,22 +207,22 @@ const {
|
|
|
</script>
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
|
-.device-setting-wrapper{
|
|
|
+.device-setting-wrapper {
|
|
|
border-bottom: 1px solid #515151;
|
|
|
|
|
|
- .device-setting-header{
|
|
|
+ .device-setting-header {
|
|
|
font-size: 14px;
|
|
|
font-weight: 600;
|
|
|
padding: 10px 10px 0px;
|
|
|
}
|
|
|
|
|
|
- .device-setting-box{
|
|
|
+ .device-setting-box {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
justify-content: space-between;
|
|
|
padding: 4px 10px;
|
|
|
|
|
|
- .control-setting-item{
|
|
|
+ .control-setting-item {
|
|
|
width: 220px;
|
|
|
height: 58px;
|
|
|
display: flex;
|
|
|
@@ -227,11 +232,11 @@ const {
|
|
|
margin: 4px 0;
|
|
|
padding: 0 8px;
|
|
|
|
|
|
- .control-setting-item-left{
|
|
|
+ .control-setting-item-left {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
|
|
|
- .item-label{
|
|
|
+ .item-label {
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
}
|