|
@@ -65,26 +65,28 @@ export class EditScence extends SGraphScene {
|
|
};
|
|
};
|
|
set setlegend(obj: any) {
|
|
set setlegend(obj: any) {
|
|
this._legend = obj;
|
|
this._legend = obj;
|
|
|
|
+ console.log('aaaaaa', obj)
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 监听变化
|
|
* 监听变化
|
|
* @param obj 变化后的对象
|
|
* @param obj 变化后的对象
|
|
*/
|
|
*/
|
|
listChange(obj: any) {
|
|
listChange(obj: any) {
|
|
- console.log('obj', obj)
|
|
|
|
- let itemType: string = 'equipment'
|
|
|
|
|
|
+ let itemType: string = 'equipment';
|
|
|
|
+
|
|
if (obj.itemList[0] instanceof STextMarkerItem) {
|
|
if (obj.itemList[0] instanceof STextMarkerItem) {
|
|
- itemType = 'text'
|
|
|
|
|
|
+ itemType = 'baseText'
|
|
|
|
+ console.log('obj.itemList[0]', itemType, obj.itemList[0])
|
|
} else if (obj.itemList[0] instanceof SImageMarkerItem) {
|
|
} else if (obj.itemList[0] instanceof SImageMarkerItem) {
|
|
- itemType = 'images'
|
|
|
|
|
|
+ itemType = 'baseImage'
|
|
} else if (obj.itemList[0] instanceof SLineMarkerItem) {
|
|
} else if (obj.itemList[0] instanceof SLineMarkerItem) {
|
|
- itemType = 'line'
|
|
|
|
- } else if (obj.itemList[0] instanceof SPolylineItem) {
|
|
|
|
- itemType = 'pipeline'
|
|
|
|
|
|
+ itemType = 'baseLine'
|
|
} else if (obj.itemList[0] instanceof SZoneLegendItem) {
|
|
} else if (obj.itemList[0] instanceof SZoneLegendItem) {
|
|
- itemType = 'position'
|
|
|
|
- } else if (obj.itemList[0] instanceof SImgTextItem) {
|
|
|
|
- itemType = 'equipment'
|
|
|
|
|
|
+ itemType = 'Zone'
|
|
|
|
+ } else if (obj.itemList[0] instanceof SImageLegendItem) {
|
|
|
|
+ itemType = 'Image'
|
|
|
|
+ } else if (obj.itemList[0] instanceof TipelineItem) {
|
|
|
|
+ itemType = 'Line'
|
|
} else {
|
|
} else {
|
|
itemType = ''
|
|
itemType = ''
|
|
};
|
|
};
|
|
@@ -120,7 +122,6 @@ export class EditScence extends SGraphScene {
|
|
Line: [{ x: event.x, y: event.y }]
|
|
Line: [{ x: event.x, y: event.y }]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
const item = new SLineMarkerItem(null, data);
|
|
const item = new SLineMarkerItem(null, data);
|
|
item.status = SItemStatus.Create;
|
|
item.status = SItemStatus.Create;
|
|
item.zOrder = ItemOrder.lineOrder;
|
|
item.zOrder = ItemOrder.lineOrder;
|
|
@@ -254,6 +255,7 @@ export class EditScence extends SGraphScene {
|
|
* 增加图标
|
|
* 增加图标
|
|
*/
|
|
*/
|
|
addIconItem(event: SMouseEvent): void {
|
|
addIconItem(event: SMouseEvent): void {
|
|
|
|
+ console.log('this._legend.url', this._legend)
|
|
const LegendData: Legend = {
|
|
const LegendData: Legend = {
|
|
ID: uuid(),
|
|
ID: uuid(),
|
|
Name: this._legend.Name,
|
|
Name: this._legend.Name,
|
|
@@ -266,7 +268,7 @@ export class EditScence extends SGraphScene {
|
|
Rolate: { X: 0, Y: 0, Z: 0 },
|
|
Rolate: { X: 0, Y: 0, Z: 0 },
|
|
Size: { Width: 0, Height: 0 }, // 大小
|
|
Size: { Width: 0, Height: 0 }, // 大小
|
|
Properties: {
|
|
Properties: {
|
|
- url: '/serve/topology-wanda/Picture/query/' + this._legend.url;
|
|
|
|
|
|
+ Url: '/serve/topology-wanda/Picture/query/' + this._legend.url
|
|
},
|
|
},
|
|
}
|
|
}
|
|
const item = new SImageLegendItem(null, LegendData);
|
|
const item = new SImageLegendItem(null, LegendData);
|
|
@@ -436,26 +438,29 @@ export class EditScence extends SGraphScene {
|
|
deleiteItem(): void {
|
|
deleiteItem(): void {
|
|
if (this.focusItem) {
|
|
if (this.focusItem) {
|
|
this.removeItem(this.focusItem);
|
|
this.removeItem(this.focusItem);
|
|
- let i = -1
|
|
|
|
|
|
+ let a = -1
|
|
this.Nodes.forEach((item: any, index: number) => {
|
|
this.Nodes.forEach((item: any, index: number) => {
|
|
if (item.id == this.focusItem.id) {
|
|
if (item.id == this.focusItem.id) {
|
|
- i = index
|
|
|
|
|
|
+ a = index
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- this.Nodes.splice(i, 1);
|
|
|
|
|
|
+ this.Nodes.splice(a, 1);
|
|
|
|
+ let b = -1;
|
|
this.Markers.forEach((item: any, index: number) => {
|
|
this.Markers.forEach((item: any, index: number) => {
|
|
if (item.id == this.focusItem.id) {
|
|
if (item.id == this.focusItem.id) {
|
|
- i = index
|
|
|
|
|
|
+ b = index
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- this.Markers.splice(i, 1);
|
|
|
|
|
|
+ this.Markers.splice(b, 1);
|
|
|
|
+ let c = -1;
|
|
this.Relations.forEach((item: any, index: number) => {
|
|
this.Relations.forEach((item: any, index: number) => {
|
|
if (item.id == this.focusItem.id) {
|
|
if (item.id == this.focusItem.id) {
|
|
- i = index
|
|
|
|
|
|
+ c = index
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- this.Relations.splice(i, 1);
|
|
|
|
|
|
+ this.Relations.splice(c, 1);
|
|
this.focusItem = null;
|
|
this.focusItem = null;
|
|
|
|
+ console.log('this.Nodes',this.Nodes)
|
|
}
|
|
}
|
|
if (this.view) {
|
|
if (this.view) {
|
|
this.view.update();
|
|
this.view.update();
|
|
@@ -467,7 +472,6 @@ export class EditScence extends SGraphScene {
|
|
* @param v
|
|
* @param v
|
|
*/
|
|
*/
|
|
changeAlignItem(v: any): void {
|
|
changeAlignItem(v: any): void {
|
|
- console.log(v);
|
|
|
|
this.selectContainer.layout(v);
|
|
this.selectContainer.layout(v);
|
|
}
|
|
}
|
|
|
|
|