|
@@ -283,6 +283,7 @@ export default {
|
|
|
saveGroup(data).then(res => {
|
|
|
Message.close()
|
|
|
console.log("aaaaaaaaaaaaaa", res);
|
|
|
+ this.graphId = res.Data;
|
|
|
});
|
|
|
});
|
|
|
bus.$on("exportByKey", val => {
|
|
@@ -377,6 +378,10 @@ export default {
|
|
|
}),
|
|
|
//发布图
|
|
|
bus.$on("publishMap", () => {
|
|
|
+ if(this.graphId==''){
|
|
|
+ this.$message.error('请先保存');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
this.publishBtn()
|
|
|
})
|
|
|
/**
|
|
@@ -425,13 +430,15 @@ export default {
|
|
|
publishGraph(data).then(res => {
|
|
|
loadings.close();
|
|
|
if (res.Result == "success") {
|
|
|
- this.$message.success(res.Message);
|
|
|
- const data = `categoryId=${this.urlMsg.categoryId}&projectId=${this.urlMsg.projectId}&BuildingID=${this.urlMsg.BuildingID}&FloorID=${this.urlMsg.FloorID}&fmapID=${this.urlMsg.fmapID}`;
|
|
|
- const url =
|
|
|
- window.location.origin +
|
|
|
- "/wandaEditer/drafts?" +
|
|
|
- encodeURIComponent(data);
|
|
|
- window.open(url, true);
|
|
|
+ this.$message.success('发布成功');
|
|
|
+ setTimeout(()=>{
|
|
|
+ const data = `categoryId=${this.urlMsg.categoryId}&projectId=${this.urlMsg.projectId}&BuildingID=${this.urlMsg.BuildingID}&FloorID=${this.urlMsg.FloorID}&fmapID=${this.urlMsg.fmapID}`;
|
|
|
+ const url =
|
|
|
+ window.location.origin +
|
|
|
+ "/wandaEditer/drafts?" +
|
|
|
+ encodeURIComponent(data);
|
|
|
+ window.open(url, true);
|
|
|
+ },1000);
|
|
|
} else {
|
|
|
this.$message.error(res.Message);
|
|
|
}
|