|
@@ -3,7 +3,7 @@
|
|
|
<el-container>
|
|
|
<el-aside width="200px" class="el-scrollbar">
|
|
|
<div title="查询">
|
|
|
- <el-button size="mini" @click="queryGraphy" icon="el-icon-notebook-2">查询</el-button>
|
|
|
+ <el-button size="mini" @click="queryGraphy" icon="el-icon-search">查询</el-button>
|
|
|
</div>
|
|
|
<div title="保存">
|
|
|
<el-button size="mini" @click="saveGraphy" icon="el-icon-notebook-2">保存</el-button>
|
|
@@ -75,14 +75,14 @@ export default {
|
|
|
{
|
|
|
Id: this.uuid(),
|
|
|
Size: {
|
|
|
- Width: 100,
|
|
|
- Height: 100
|
|
|
+ Width: 145,
|
|
|
+ Height: 89
|
|
|
},
|
|
|
Pos: {},
|
|
|
img: require('./2.jpg'),
|
|
|
ImgSource: this.img2,
|
|
|
Name: '测试2',
|
|
|
- AnchorList: [{ Pos: { X: 0, Y: -50 }, Id: this.uuid() }, { Pos: { X: -50, Y: 0 }, Id: this.uuid() }, { Pos: { X: 50, Y: 0 }, Id: this.uuid() }]
|
|
|
+ AnchorList: [{ Pos: { X: 0, Y: -44 }, Id: this.uuid() }, { Pos: { X: -72, Y: 0 }, Id: this.uuid() }, { Pos: { X: 72, Y: 0 }, Id: this.uuid() }]
|
|
|
},
|
|
|
{
|
|
|
Id: this.uuid(),
|
|
@@ -140,6 +140,7 @@ export default {
|
|
|
this.clearGraphy();
|
|
|
this.scene = new TopoScene()
|
|
|
this.view.scene = this.scene;
|
|
|
+ this.scene.callback = this.equipClick
|
|
|
},
|
|
|
// 清除canvas
|
|
|
clearGraphy() {
|
|
@@ -155,11 +156,10 @@ export default {
|
|
|
},
|
|
|
additem(i) {
|
|
|
let equipdata = this.equipList[i]
|
|
|
- let curEquip = this.scene.createItem(equipdata);
|
|
|
- this.scene.click(curEquip, this.equipClick)
|
|
|
+ this.scene.createItem(equipdata);
|
|
|
},
|
|
|
drawline() {
|
|
|
- this.scene.isLining = true;
|
|
|
+ this.scene.isLining = !this.scene.isLining;
|
|
|
},
|
|
|
// 清除默认左右键事件
|
|
|
disableRightButton() {
|
|
@@ -298,8 +298,14 @@ export default {
|
|
|
},
|
|
|
//查询
|
|
|
queryGraphy() {
|
|
|
+ console.log(this.scene)
|
|
|
topoQuery({ type: 'eq2sp_for' }, res => {
|
|
|
- console.log(res);
|
|
|
+ console.log(res.Content[0])
|
|
|
+ // this.scene.loadData({
|
|
|
+ // equipList: res.Content[0].NodeList,
|
|
|
+ // relationList: res.Content[0].RelationList,
|
|
|
+ // })
|
|
|
+ // this.view.fitSceneToView()
|
|
|
})
|
|
|
}
|
|
|
},
|