|
@@ -12,7 +12,7 @@ import { SFloorParser } from "@saga-web/big";
|
|
|
import { FloorView } from "./../lib/FloorView";
|
|
|
import { EditScence } from "./mapClass/EditScence";
|
|
|
import bus from "@/bus";
|
|
|
-import { saveGroup, readGroup, queryTypeGraph } from "@/api/editer.js";
|
|
|
+import { saveGroup, readGroup, queryTypeGraph,publishGraph } from "@/api/editer.js";
|
|
|
import { STopologyParser } from "./../lib/parsers/STopologyParser";
|
|
|
import { uuid } from "@/components/mapClass/until";
|
|
|
import { SImageItem } from "@saga-web/graph/lib";
|
|
@@ -48,7 +48,8 @@ export default {
|
|
|
floorList: {},
|
|
|
urlMsg: {},
|
|
|
chiceItemList: [], //选中itemlist
|
|
|
- hasTypeList: [] // 当前类型下包含的typeid(提取)
|
|
|
+ hasTypeList: [], // 当前类型下包含的typeid(提取)
|
|
|
+ graphId:''
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -93,6 +94,7 @@ export default {
|
|
|
});
|
|
|
// 获取主题数据
|
|
|
this.readGroup().then(data => {
|
|
|
+ this.graphId = data.Data[0].ID;
|
|
|
if (data.Data) {
|
|
|
const parserData = new STopologyParser(null);
|
|
|
parserData.parseData(data.Data[0].Elements);
|
|
@@ -350,21 +352,13 @@ 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";
|
|
|
+ }),
|
|
|
+ //发布图
|
|
|
+ bus.$on("publishMap", () => {
|
|
|
+ this.publishMap()
|
|
|
})
|
|
|
},
|
|
|
// 读取数据
|
|
@@ -378,6 +372,26 @@ export default {
|
|
|
};
|
|
|
return readGroup(data);
|
|
|
},
|
|
|
+ //发布
|
|
|
+ publishBtn() {
|
|
|
+ this.spinning = true;
|
|
|
+ const data = {
|
|
|
+ BuildingID: this.urlMsg.BuildingID,
|
|
|
+ CategoryID: this.urlMsg.categoryId,
|
|
|
+ FloorID: this.urlMsg.FloorID,
|
|
|
+ GraphId: this.graphId,
|
|
|
+ ProjectID: this.urlMsg.projectId,
|
|
|
+ PubUser: ""
|
|
|
+ };
|
|
|
+ publishGraph(data).then(res => {
|
|
|
+ this.spinning = false;
|
|
|
+ if (res.Result == "success") {
|
|
|
+ this.$message.success(res.Message);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.Message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 获取typeid
|
|
|
getTypeId() {
|
|
|
const data = {
|