|
|
@@ -16,7 +16,7 @@
|
|
|
<FenceEditor ref="fenceEditorRef" />
|
|
|
|
|
|
<div class="cameraVideo"><CameraLiveVideo /></div>
|
|
|
- <div class="presetAddWrapper" :class="{ hidePresetControlCls: hidePresetControl }">
|
|
|
+ <div class="presetAddWrapper" :class="{ hidePresetControlCls: isEdit }">
|
|
|
<CameraDirectionControl />
|
|
|
<ElButton
|
|
|
type="primary"
|
|
|
@@ -40,7 +40,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
- import { computed, ref, watch, watchEffect } from 'vue';
|
|
|
+ import { computed, ref, watchEffect } from 'vue';
|
|
|
import FenceToolbar from '../FenceToolbar/FenceToolbar.vue';
|
|
|
import FenceEditor from '../FenceEditor/FenceEditor.vue';
|
|
|
import CameraLiveVideo from '../CameraLiveVideo/CameraLiveVideo.vue';
|
|
|
@@ -69,7 +69,6 @@
|
|
|
const viewType = ref<ViewType>(ViewType.window1);
|
|
|
|
|
|
const addPresetModalVisible = ref(false);
|
|
|
- const hidePresetControl = ref(false);
|
|
|
|
|
|
const cameraParamsDetail = ref({});
|
|
|
|
|
|
@@ -83,7 +82,6 @@
|
|
|
};
|
|
|
|
|
|
const handleRemove = () => {
|
|
|
- console.log('handleRemove');
|
|
|
fenceEditorRef.value?.remove();
|
|
|
};
|
|
|
|
|
|
@@ -94,11 +92,8 @@
|
|
|
isEdit.value = val;
|
|
|
if (val) {
|
|
|
fenceEditorRef.value?.setEditMode();
|
|
|
- // 将预置位的设置按钮隐藏
|
|
|
- hidePresetControl.value = true;
|
|
|
} else {
|
|
|
fenceEditorRef.value?.exitEditMode();
|
|
|
- hidePresetControl.value = false;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -128,7 +123,7 @@
|
|
|
presetToken,
|
|
|
electronicFencePolygon: JSON.stringify(json),
|
|
|
})
|
|
|
- ?.then((res) => {
|
|
|
+ ?.then(() => {
|
|
|
ElMessage.success('更新成功');
|
|
|
});
|
|
|
};
|
|
|
@@ -166,7 +161,8 @@
|
|
|
/** 先清空原有的 */
|
|
|
fenceEditorRef.value?.clear();
|
|
|
fenceEditorRef.value?.createLines(rawLinePoints);
|
|
|
- fenceEditorRef.value?.exitEditMode();
|
|
|
+ fenceEditorRef.value?.setEditMode();
|
|
|
+ isEdit.value = true;
|
|
|
return;
|
|
|
}
|
|
|
fenceEditorRef.value?.clear();
|