|
@@ -78,16 +78,6 @@ export default {
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
- // if (this.info.scenes.length <= 0 && this.isShow) {
|
|
|
- // this.$alert({
|
|
|
- // content: "至少添加一个场景才保存/预览,请前往“场景导航”添加",
|
|
|
- // forceOK: true,
|
|
|
- // ok: () => {
|
|
|
- // this.$router.push({ path: "/navigation" });
|
|
|
- // },
|
|
|
- // });
|
|
|
- // return false;
|
|
|
- // }
|
|
|
return true;
|
|
|
},
|
|
|
onView() {
|
|
@@ -111,23 +101,28 @@ export default {
|
|
|
() => {
|
|
|
this.$msg.success(this.$i18n.t('gather.save_done'));
|
|
|
document.title = this.info.name;
|
|
|
- this.getInfo().then((res) => {
|
|
|
- // getInfo里调用了后端接口,底层用了jquery的网络请求方法,为啥会导致promise嵌套没有展平,res拿到的不是promise 对象的resolve值而是promise对象本身????
|
|
|
- res.then(() => {
|
|
|
- this.$store.commit("UpdateIsShowState", true);
|
|
|
- $waiting.hide()
|
|
|
- setTimeout(() => {
|
|
|
- if (this.info.scenes.length <= 0 && this.isShow) {
|
|
|
- return this.$alert({
|
|
|
- content: this.$i18n.t('gather.at_least_one_scene'),
|
|
|
- });
|
|
|
- }
|
|
|
- this.showPreview = true;
|
|
|
- }, 500);
|
|
|
- })
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
+ // this.getInfo().then((res) => {
|
|
|
+ // // getInfo里调用了后端接口,底层用了jquery的网络请求方法,为啥会导致promise嵌套没有展平,res拿到的不是promise 对象的resolve值而是promise对象本身????
|
|
|
+ // res.then(() => {
|
|
|
+ // this.$store.commit("UpdateIsShowState", true);
|
|
|
+ // $waiting.hide()
|
|
|
+ // setTimeout(() => {
|
|
|
+ // if (this.info.scenes.length <= 0 && this.isShow) {
|
|
|
+ // return this.$alert({
|
|
|
+ // content: this.$i18n.t('gather.at_least_one_scene'),
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // this.showPreview = true;
|
|
|
+ // }, 500);
|
|
|
+ // })
|
|
|
+ // });
|
|
|
+ $waiting.hide()
|
|
|
+ if (this.info.scenes.length <= 0 && this.isShow) {
|
|
|
+ return this.$alert({
|
|
|
+ content: this.$i18n.t('gather.at_least_one_scene'),
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.showPreview = true;
|
|
|
}
|
|
|
);
|
|
|
},
|
|
@@ -165,8 +160,9 @@ export default {
|
|
|
() => {
|
|
|
this.$msg.success(this.$i18n.t('gather.save_done'));
|
|
|
document.title = this.info.name;
|
|
|
- this.getInfo();
|
|
|
- this.$store.commit("UpdateIsShowState", true);
|
|
|
+ $waiting.hide()
|
|
|
+ // this.getInfo();
|
|
|
+ // this.$store.commit("UpdateIsShowState", true);
|
|
|
this.$store.commit("TakeInfoSnapShotAtSave")
|
|
|
},
|
|
|
() => { }
|