|
@@ -199,13 +199,14 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
//添加相机
|
|
//添加相机
|
|
|
- const addCamera = (id: string) => {
|
|
|
|
|
|
|
+ const addCamera = (id: string, streamIp: string) => {
|
|
|
const existingCamera = cameras.value.find((camera) => camera.id === id);
|
|
const existingCamera = cameras.value.find((camera) => camera.id === id);
|
|
|
if (existingCamera) return;
|
|
if (existingCamera) return;
|
|
|
const config = {
|
|
const config = {
|
|
|
width: 52,
|
|
width: 52,
|
|
|
height: 37,
|
|
height: 37,
|
|
|
image: camImg,
|
|
image: camImg,
|
|
|
|
|
+ pushstreamIp: streamIp,
|
|
|
name: 'image',
|
|
name: 'image',
|
|
|
id: id,
|
|
id: id,
|
|
|
};
|
|
};
|
|
@@ -288,13 +289,15 @@
|
|
|
const stage = transformer.value.getNode().getStage();
|
|
const stage = transformer.value.getNode().getStage();
|
|
|
const groups = stage.find('.group');
|
|
const groups = stage.find('.group');
|
|
|
const tempList = cloneDeep(cameras.value);
|
|
const tempList = cloneDeep(cameras.value);
|
|
|
|
|
+ console.log('cameras.value', cameras.value);
|
|
|
|
|
+
|
|
|
const camerasLists = tempList.map((item, index) => {
|
|
const camerasLists = tempList.map((item, index) => {
|
|
|
item.groupConfig.x = groups[index].attrs.x;
|
|
item.groupConfig.x = groups[index].attrs.x;
|
|
|
item.groupConfig.y = groups[index].attrs.y;
|
|
item.groupConfig.y = groups[index].attrs.y;
|
|
|
item.groupConfig.rotation = groups[index].attrs.rotation || 0;
|
|
item.groupConfig.rotation = groups[index].attrs.rotation || 0;
|
|
|
item.groupConfig.scaleX = groups[index].attrs.scaleX || 1;
|
|
item.groupConfig.scaleX = groups[index].attrs.scaleX || 1;
|
|
|
item.groupConfig.scaleY = groups[index].attrs.scaleY || 1;
|
|
item.groupConfig.scaleY = groups[index].attrs.scaleY || 1;
|
|
|
- item.config.url = cameraImgSrc;
|
|
|
|
|
|
|
+ // item.config.url = cameraImgSrc;
|
|
|
return item;
|
|
return item;
|
|
|
});
|
|
});
|
|
|
const layout = {
|
|
const layout = {
|