|
@@ -180,16 +180,16 @@ export class EditScence extends SGraphScene {
|
|
|
addImgItem(event: SMouseEvent) {
|
|
|
const data = {
|
|
|
/** ID */
|
|
|
- ID:'123',
|
|
|
+ ID: '123',
|
|
|
/** 名称 */
|
|
|
Name: '嗡嗡嗡',
|
|
|
/** 图标(Image),线类型(Line) */
|
|
|
Type: "Image",
|
|
|
/** 位置 */
|
|
|
- Pos: {X: event.x, Y: event.y},
|
|
|
+ Pos: { X: event.x, Y: event.y },
|
|
|
/** 由应用自己定义 */
|
|
|
- Properties:{
|
|
|
- Url:require('./../../assets/logo.png'),
|
|
|
+ Properties: {
|
|
|
+ Url: '/serve/topology-wanda/Picture/query/' + '1bcff19d6f3547488673dcba7dd9507f',
|
|
|
Name: '嗡嗡嗡',
|
|
|
}
|
|
|
}
|
|
@@ -211,15 +211,15 @@ export class EditScence extends SGraphScene {
|
|
|
addTextItem(event: SMouseEvent): void {
|
|
|
const data = {
|
|
|
/** ID */
|
|
|
- ID:'456',
|
|
|
+ ID: '456',
|
|
|
/** 名称 */
|
|
|
Name: '文本',
|
|
|
/** 图标(Image),线类型(Line) */
|
|
|
Type: "Text",
|
|
|
/** 位置 */
|
|
|
- Pos: {X: event.x, Y: event.y},
|
|
|
+ Pos: { X: event.x, Y: event.y },
|
|
|
/** 由应用自己定义 */
|
|
|
- Properties:{
|
|
|
+ Properties: {
|
|
|
Text: '请在右侧属性栏输入文字!'
|
|
|
}
|
|
|
}
|
|
@@ -372,6 +372,16 @@ export class EditScence extends SGraphScene {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 更改item Url
|
|
|
+ * @param url string 图片key
|
|
|
+ */
|
|
|
+ upadataImageUrl(url: string): void {
|
|
|
+ if (this.focusItem) {
|
|
|
+ this.focusItem.url = '/serve/topology-wanda/Picture/query/' + url;
|
|
|
+ alert(url)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
* 删除指定item
|
|
|
*/
|
|
|
deleiteItem(): void {
|
|
@@ -404,12 +414,16 @@ export class EditScence extends SGraphScene {
|
|
|
* 保存数据
|
|
|
*/
|
|
|
saveMsgItem(): any {
|
|
|
- const Nodes: any = []
|
|
|
+ const Nodes: any = [];
|
|
|
+ const Markers: any = [];
|
|
|
this.Nodes.forEach(e => {
|
|
|
Nodes.push(e.toData())
|
|
|
});
|
|
|
+ this.Markers.forEach(e => {
|
|
|
+ Markers.push(e.toData())
|
|
|
+ });
|
|
|
let element = {
|
|
|
- Nodes
|
|
|
+ Nodes, Markers
|
|
|
}
|
|
|
return element
|
|
|
}
|