|
|
@@ -13,7 +13,7 @@
|
|
|
></div>
|
|
|
<div class="cameraSettingWrapper">
|
|
|
<div class="cameraView">
|
|
|
- <CameraViewSetting v-if="cameraDetailStore.cameraId" :cameraAllAlgoList="props.cameraAllAlgoList" />
|
|
|
+ <CameraViewSetting v-if="cameraDetailStore.cameraId" />
|
|
|
<div class="cameraPlaceholder" v-else>请选择左侧相机</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -21,11 +21,11 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script lang="ts" setup>
|
|
|
- import { onMounted, ref, watch } from 'vue';
|
|
|
+<script setup lang="ts">
|
|
|
+ import { computed } from 'vue';
|
|
|
+ import { onMounted, ref, watch, provide } from 'vue';
|
|
|
import { ElIcon } from 'element-plus';
|
|
|
import { DArrowLeft, DArrowRight } from '@element-plus/icons-vue';
|
|
|
- import CameraTreeCom from './components/CameraTree/CameraTree.vue';
|
|
|
import CameraViewSetting from './components/CameraViewSetting/CameraViewSetting.vue';
|
|
|
import useCameraDetailStore from './store/useCameraDetailStore';
|
|
|
import useCameraAlgoStore from './store/useCameraAlgoStore';
|
|
|
@@ -33,6 +33,8 @@
|
|
|
import useFenceStore from './store/useFenceStore';
|
|
|
import { IsPtz } from '@/types/camera/constant';
|
|
|
import { getCameraDeatilById } from '@/api/camera/camera-preview';
|
|
|
+ import { PROVIDE_CONSTANTS } from './constants';
|
|
|
+ import { AlgoDetail } from '@/api/algo/algo';
|
|
|
|
|
|
const cameraDetailStore = useCameraDetailStore();
|
|
|
const cameraAlgoStore = useCameraAlgoStore();
|
|
|
@@ -40,7 +42,21 @@
|
|
|
const presetListStore = usePresetListStore();
|
|
|
|
|
|
const cameraTreeVisible = ref(true);
|
|
|
- const props = defineProps<{ cameraAllAlgoList: AlgoDetail[] }>();
|
|
|
+
|
|
|
+ interface BaseProps {
|
|
|
+ /** 相机可分配的算法列表 */
|
|
|
+ cameraAllAlgoList: AlgoDetail[];
|
|
|
+ /** 是否是相机分组 */
|
|
|
+ isCameraGroup?: boolean;
|
|
|
+ }
|
|
|
+ const props = defineProps<BaseProps>();
|
|
|
+
|
|
|
+ const baseProps = computed(() => ({
|
|
|
+ cameraAllAlgoList: props.cameraAllAlgoList,
|
|
|
+ isCameraGroup: props.isCameraGroup,
|
|
|
+ }));
|
|
|
+
|
|
|
+ provide(PROVIDE_CONSTANTS.baseProps, baseProps);
|
|
|
|
|
|
watch(
|
|
|
() => cameraDetailStore.cameraId,
|