|
|
@@ -47,7 +47,7 @@
|
|
|
import useCameraDetailStore from '../../store/useCameraDetailStore';
|
|
|
import usePresetListStore from '../../store/usePresetListStore';
|
|
|
// import AddAlgoDialog from './AddAlgoDialog.vue';
|
|
|
- import { createAlgoSubmitParams, algoDetailToJSON, cameraAlgoToJSON } from '@/modules/algo/algo-params-edit/utils';
|
|
|
+ import { createAlgoSubmitParams, cameraAlgoToJSON } from '@/modules/algo/algo-params-edit/utils';
|
|
|
|
|
|
import { ALGO_ENABLED_STATUS } from '@/api/camera/camera-preview';
|
|
|
import { ref, watchEffect } from 'vue';
|
|
|
@@ -128,7 +128,14 @@
|
|
|
|
|
|
const toggleFenceTool = () => {
|
|
|
const nextShowFenceTool = !fenceStore.showFenceTool;
|
|
|
- fenceStore.showFenceTool = nextShowFenceTool;
|
|
|
+ if (!nextShowFenceTool) {
|
|
|
+ fenceStore.confirmExitFence().then(() => {
|
|
|
+ fenceStore.showFenceTool = false;
|
|
|
+ fenceStore.reset();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ fenceStore.showFenceTool = true;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const confirmToggleAlgoOpen = (detail: CameraAlgoItem, algoStatus: boolean) => {
|