|
@@ -120,6 +120,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div ref="playerRef" class="player-box"></div>
|
|
|
</div>
|
|
|
<HandleModal :modal-is-show="modalIsShow" :modal-title="modalTitle" :modal-type="modalType" @handle-ok="handleOK" @handle-cancel="handleCancel" />
|
|
|
</template>
|
|
@@ -138,6 +139,7 @@
|
|
|
import lodash from 'lodash';
|
|
|
import { formatNum } from '/@/utils/ventutil';
|
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
|
+ import { useCamera } from '/@/hooks/system/useCamera';
|
|
|
|
|
|
const globalConfig = inject('globalConfig');
|
|
|
|
|
@@ -151,6 +153,8 @@
|
|
|
require: true,
|
|
|
},
|
|
|
});
|
|
|
+ const playerRef = ref();
|
|
|
+ const { getCamera, removeCamera } = useCamera();
|
|
|
const refresh = ref(false);
|
|
|
const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
|
|
|
const modalType = ref(''); // 模态框内容显示类型,设备操作类型
|
|
@@ -354,7 +358,15 @@
|
|
|
modalTitle.value = '';
|
|
|
modalType.value = '';
|
|
|
}
|
|
|
-
|
|
|
+ watch(
|
|
|
+ () => props.deviceId,
|
|
|
+ async (deviceId) => {
|
|
|
+ if (deviceId) {
|
|
|
+ await getCamera(deviceId, playerRef.value, 'nitrogen');
|
|
|
+ getDataSource(props.deviceId, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
watch([monitorDataGroupNum, loading], ([newMonitorDataGroupNum, newLoading]) => {
|
|
|
nextTick(() => {
|
|
|
if (newMonitorDataGroupNum && !newLoading) {
|