feat: 支持配置摄像机的告警阈值
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
// 设备参数配置在系统中的key前缀
|
// 设备参数配置在系统中的key前缀
|
||||||
const DEVICE_PARAM_PREFIXES = {
|
const DEVICE_PARAM_PREFIXES = {
|
||||||
|
Camera: 'CAMERA_',
|
||||||
Switch: 'SWITCH_',
|
Switch: 'SWITCH_',
|
||||||
Server: 'SERVER_',
|
Server: 'SERVER_',
|
||||||
Decoder: 'DECODER_',
|
Decoder: 'DECODER_',
|
||||||
@@ -67,6 +68,10 @@ const getItemSuffix = (name: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const tabPanes = [
|
const tabPanes = [
|
||||||
|
{
|
||||||
|
tab: '摄像机阈值',
|
||||||
|
name: DEVICE_PARAM_PREFIXES.Camera,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
tab: '交换机阈值',
|
tab: '交换机阈值',
|
||||||
name: DEVICE_PARAM_PREFIXES.Switch,
|
name: DEVICE_PARAM_PREFIXES.Switch,
|
||||||
@@ -109,7 +114,7 @@ const show = defineModel<boolean>('show', { required: true });
|
|||||||
|
|
||||||
const { station } = toRefs(props);
|
const { station } = toRefs(props);
|
||||||
|
|
||||||
const activeTabName = ref<DeviceParamPrefix>(DEVICE_PARAM_PREFIXES.Switch);
|
const activeTabName = ref<DeviceParamPrefix>(DEVICE_PARAM_PREFIXES.Camera);
|
||||||
|
|
||||||
const deviceParams = ref<DeviceParamItem[]>([]);
|
const deviceParams = ref<DeviceParamItem[]>([]);
|
||||||
|
|
||||||
@@ -211,7 +216,7 @@ const onAfterModalEnter = () => {
|
|||||||
|
|
||||||
const onBeforeModalLeave = () => {
|
const onBeforeModalLeave = () => {
|
||||||
saveDeviceParams({ tabName: activeTabName.value, items: deviceParams.value });
|
saveDeviceParams({ tabName: activeTabName.value, items: deviceParams.value });
|
||||||
activeTabName.value = DEVICE_PARAM_PREFIXES.Switch;
|
activeTabName.value = DEVICE_PARAM_PREFIXES.Camera;
|
||||||
deviceParams.value = [];
|
deviceParams.value = [];
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user