|
|
@@ -1,8 +1,21 @@
|
|
|
<template>
|
|
|
<div class="box">
|
|
|
<div style="margin-bottom: 10px; display: flex" v-if="hasDevModePermisson()">
|
|
|
- <div style="line-height: 33px">预审后生效模式:</div>
|
|
|
- <el-switch :model-value="devMode" @change="switchDevMode" />
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="line-height: 33px">预审后生效模式:</div>
|
|
|
+ <el-switch :model-value="devMode" @change="switchDevMode" />
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; margin-left: 30px">
|
|
|
+ <div style="line-height: 33px; text-wrap: nowrap">报警视频截取时长:</div>
|
|
|
+ <el-select
|
|
|
+ v-model="videoLength"
|
|
|
+ style="width: 80px; margin: 0 10px"
|
|
|
+ @change="updateNewVideoLength"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in videoLengthOptions" :key="item" :label="item" :value="item" />
|
|
|
+ </el-select>
|
|
|
+ <div style="line-height: 33px">s</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="search-form">
|
|
|
<QueryForm
|
|
|
@@ -107,7 +120,12 @@
|
|
|
updateDefaultPriority,
|
|
|
updateDefaultPriorityAll,
|
|
|
} from '@/api/datamanagement/alert-default';
|
|
|
- import { getDevMode, switchDevMode as SDM } from '@/api/datamanagement/getDevMode';
|
|
|
+ import {
|
|
|
+ getDevMode,
|
|
|
+ switchDevMode as SDM,
|
|
|
+ getVideoLength,
|
|
|
+ updateVideoLength,
|
|
|
+ } from '@/api/datamanagement/getDevMode';
|
|
|
|
|
|
import { useUserStore } from '@/store/modules/user';
|
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
|
@@ -494,10 +512,29 @@
|
|
|
getTableData();
|
|
|
});
|
|
|
|
|
|
+ const videoLength = ref(10);
|
|
|
+ const videoLengthOptions = [10, 20, 40, 60];
|
|
|
+
|
|
|
+ const getCurVideoLength = () => {
|
|
|
+ getVideoLength().then((res) => {
|
|
|
+ videoLength.value = res;
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ const updateNewVideoLength = () => {
|
|
|
+ updateVideoLength(videoLength.value).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: '报警视频截取长度设置成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
onBeforeMount(() => {
|
|
|
getLocationOptions();
|
|
|
getAIMainOptions();
|
|
|
getManualMainOptions();
|
|
|
+ getCurVideoLength();
|
|
|
});
|
|
|
</script>
|
|
|
|