|
@@ -18,7 +18,8 @@ import { uuid } from "@/components/mapClass/until";
|
|
|
import { SImageItem } from "@saga-web/graph/lib";
|
|
|
import { SPainter, SColor, SFont, SPoint } from "@saga-web/draw";
|
|
|
import store from "../store";
|
|
|
-
|
|
|
+import { Loading } from "element-ui";
|
|
|
+import { Message } from 'element-ui';
|
|
|
let fengmap = null;
|
|
|
|
|
|
export default {
|
|
@@ -47,7 +48,7 @@ export default {
|
|
|
floorList: {},
|
|
|
urlMsg: {},
|
|
|
chiceItemList: [], //选中itemlist
|
|
|
- hasTypeList: [], // 当前类型下包含的typeid(提取)
|
|
|
+ hasTypeList: [] // 当前类型下包含的typeid(提取)
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -60,7 +61,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- // const loadings = this.$loading({type: 'global'});
|
|
|
+ const loadings = Loading.service({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)"
|
|
|
+ });
|
|
|
document.getElementById(`canvas`).focus();
|
|
|
this.clearGraphy();
|
|
|
this.scene = new EditScence();
|
|
@@ -71,7 +77,6 @@ export default {
|
|
|
this.appName,
|
|
|
null
|
|
|
);
|
|
|
- console.log(this.urlMsg.fmapID);
|
|
|
const floorid = this.urlMsg.FloorID;
|
|
|
fengmap.loadMap(this.urlMsg.fmapID, resp => {
|
|
|
this.floorList = resp;
|
|
@@ -82,6 +87,7 @@ export default {
|
|
|
.then(response => {
|
|
|
console.log("获取rf成功", response);
|
|
|
this.parserData(floorid);
|
|
|
+ loadings.close();
|
|
|
});
|
|
|
this.view.fitSceneToView();
|
|
|
});
|
|
@@ -126,7 +132,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
// 获取typeid
|
|
|
- this.getTypeId()
|
|
|
+ this.getTypeId();
|
|
|
this.scene.emitChange = this.emitChange;
|
|
|
this.scene.scenceUpdate = this.scenceUpdate;
|
|
|
},
|
|
@@ -227,7 +233,7 @@ export default {
|
|
|
});
|
|
|
bus.$on("extractItem", () => {
|
|
|
const map = {};
|
|
|
- console.log(this.hasTypeList)
|
|
|
+ console.log(this.hasTypeList);
|
|
|
this.fParser.spaceList.forEach(t => {
|
|
|
if (this.hasTypeList.indexOf(t.data.Type) > -1) {
|
|
|
if (map[t.data.Type]) {
|
|
@@ -259,7 +265,12 @@ export default {
|
|
|
BuildingID: this.urlMsg.BuildingID, // 建筑ID
|
|
|
FloorID: this.urlMsg.FloorID // 楼层id
|
|
|
};
|
|
|
+ Message({
|
|
|
+ message: '上传中,切勿关闭窗口!',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
saveGroup(data).then(res => {
|
|
|
+ Message.close()
|
|
|
console.log("aaaaaaaaaaaaaa", res);
|
|
|
});
|
|
|
});
|
|
@@ -275,12 +286,12 @@ export default {
|
|
|
AttachObjectIds: [],
|
|
|
Pos: { x: t.x, y: t.y },
|
|
|
OutLine: t.pointArr[0],
|
|
|
- SubType: '',
|
|
|
+ SubType: "",
|
|
|
Properties: {
|
|
|
StrokeColor: "#3d73c0",
|
|
|
FillColor: "#72f5f980",
|
|
|
font: 0,
|
|
|
- color: '',
|
|
|
+ color: "",
|
|
|
TextPos: { X: 0, Y: 0 }
|
|
|
},
|
|
|
Num: 1
|
|
@@ -339,6 +350,18 @@ export default {
|
|
|
bus.$on("changeitemExplain", val => {
|
|
|
this.scene.upadatitemExplain(val);
|
|
|
});
|
|
|
+ //发布图
|
|
|
+ // bus.$on("publishGraph", val => {
|
|
|
+ // this.spinning = true;
|
|
|
+ // publishGraph({ graphId: this.graphId, pubUser: "" }).then(res => {
|
|
|
+ // this.spinning = false;
|
|
|
+ // if (res.Result == "success") {
|
|
|
+ // this.$message.success(res.Message);
|
|
|
+ // } else {
|
|
|
+ // this.$message.error(res.Message);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
//创建区域是否点选
|
|
|
bus.$on("changeDrawType", val => {
|
|
|
this.scene.isSelecting = val == "select";
|
|
@@ -351,8 +374,7 @@ export default {
|
|
|
projectId: this.urlMsg.projectId,
|
|
|
BuildingID: this.urlMsg.BuildingID, // 建筑ID
|
|
|
FloorID: this.urlMsg.FloorID, // 楼层id
|
|
|
- Pub:false //是否获取草稿 //获取草稿
|
|
|
-
|
|
|
+ Pub: false //是否获取草稿 //获取草稿
|
|
|
};
|
|
|
return readGroup(data);
|
|
|
},
|
|
@@ -363,7 +385,7 @@ export default {
|
|
|
};
|
|
|
queryTypeGraph(data).then(res => {
|
|
|
this.hasTypeList = res.Data.map(t => Number(t));
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
watch: {
|