feat: 支持配置摄像机的告警阈值

This commit is contained in:
yangsy
2026-05-19 16:40:18 +08:00
parent 87962d188c
commit a014bbfd13
@@ -1,6 +1,7 @@
<script lang="ts">
// 设备参数配置在系统中的key前缀
const DEVICE_PARAM_PREFIXES = {
Camera: 'CAMERA_',
Switch: 'SWITCH_',
Server: 'SERVER_',
Decoder: 'DECODER_',
@@ -67,6 +68,10 @@ const getItemSuffix = (name: string) => {
};
const tabPanes = [
{
tab: '摄像机阈值',
name: DEVICE_PARAM_PREFIXES.Camera,
},
{
tab: '交换机阈值',
name: DEVICE_PARAM_PREFIXES.Switch,
@@ -109,7 +114,7 @@ const show = defineModel<boolean>('show', { required: true });
const { station } = toRefs(props);
const activeTabName = ref<DeviceParamPrefix>(DEVICE_PARAM_PREFIXES.Switch);
const activeTabName = ref<DeviceParamPrefix>(DEVICE_PARAM_PREFIXES.Camera);
const deviceParams = ref<DeviceParamItem[]>([]);
@@ -211,7 +216,7 @@ const onAfterModalEnter = () => {
const onBeforeModalLeave = () => {
saveDeviceParams({ tabName: activeTabName.value, items: deviceParams.value });
activeTabName.value = DEVICE_PARAM_PREFIXES.Switch;
activeTabName.value = DEVICE_PARAM_PREFIXES.Camera;
deviceParams.value = [];
};
</script>