|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="cover-panel">
|
|
|
- <template v-if="currentScene?.type !== '4dkk'">
|
|
|
+ <template v-if="currentScene?.type !== '4dkk' && currentMask">
|
|
|
<div class="title">
|
|
|
{{ $i18n.t("edit_settings.mask_setting") }}
|
|
|
<i class="iconfont icon-help_i tool-tip-for-editor" v-tooltip="$i18n.t('mask.cover_tips')" />
|
|
@@ -109,7 +109,8 @@ export default {
|
|
|
}),
|
|
|
|
|
|
currentMask() {
|
|
|
- return this.workCustomMaskList.find((item) => item.navigationId == this.currentScene.id || item.navigationId == this.currentScene.sid);
|
|
|
+ let item = this.workCustomMaskList.find((item) => item.navigationId == this.currentScene.id || item.navigationId == this.currentScene.sid);
|
|
|
+ return item;
|
|
|
},
|
|
|
},
|
|
|
data() {
|
|
@@ -140,7 +141,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- baseInfo: {
|
|
|
+ currentMask: {
|
|
|
handler(newVal, oldVal) {
|
|
|
if (newVal && this.$route.name == "mask") {
|
|
|
console.error("mask change");
|
|
@@ -149,12 +150,12 @@ export default {
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
|
- sky: {
|
|
|
+ "currentMask.data.sky": {
|
|
|
handler: function (val) {
|
|
|
if (this.currentScene.type === "pano" && val) {
|
|
|
// this.currentScene.customMask.sky = val;
|
|
|
// this.updateCurrentScene();
|
|
|
- console.error(this.currentMask);
|
|
|
+ console.error(val);
|
|
|
this.handlePeakStatus(val.isShow);
|
|
|
this.handlePeakScale(val.scale);
|
|
|
this.handlePeakURL(val.icon);
|
|
@@ -163,7 +164,7 @@ export default {
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
|
- earth: {
|
|
|
+ "currentMask.data.earth": {
|
|
|
handler: function (val) {
|
|
|
if (this.currentScene.type === "pano" && val) {
|
|
|
// this.currentScene.customMask.earth = val;
|
|
@@ -182,7 +183,7 @@ export default {
|
|
|
this.$confirm({
|
|
|
content: this.$i18n.t("mask.is_apply_to_all_pano"),
|
|
|
ok: () => {
|
|
|
- this.$store.dispatch("scene/applycustomMaskToAll", "sky");
|
|
|
+ this.$store.commit("mask/applycustomMaskToAll", { type: "sky", currentMask: this.currentMask });
|
|
|
this.$msg.success(this.$i18n.t("gather.edit_success"));
|
|
|
setTimeout(() => (this.isApplySkyToAll = false), 1000);
|
|
|
},
|
|
@@ -200,7 +201,7 @@ export default {
|
|
|
this.$confirm({
|
|
|
content: this.$i18n.t("mask.is_apply_to_all_pano"),
|
|
|
ok: () => {
|
|
|
- this.$store.dispatch("scene/applycustomMaskToAll", "earth");
|
|
|
+ this.$store.commit("mask/applycustomMaskToAll", { type: "earth", currentMask: this.currentMask });
|
|
|
this.$msg.success(this.$i18n.t("gather.edit_success"));
|
|
|
setTimeout(() => (this.isApplyEarthToAll = false), 1000);
|
|
|
},
|
|
@@ -215,14 +216,12 @@ export default {
|
|
|
currentScene: {
|
|
|
handler: function (newVal, oldVal) {
|
|
|
if (newVal && newVal !== oldVal) {
|
|
|
- let item = this.workCustomMaskList.find((item) => item.navigationId == this.currentScene.id || item.navigationId == this.currentScene.sid);
|
|
|
-
|
|
|
- const { sky, earth } = item.data;
|
|
|
-
|
|
|
+ // let item = this.workCustomMaskList.find((item) => item.navigationId == this.currentScene.id || item.navigationId == this.currentScene.sid);
|
|
|
+ // const { sky, earth } = item.data;
|
|
|
// this.isApplyEarthToAll = false;
|
|
|
// this.isApplySkyToAll = false;
|
|
|
- this.sky = { ...sky };
|
|
|
- this.earth = { ...earth };
|
|
|
+ // this.sky = { ...sky };
|
|
|
+ // this.earth = { ...earth };
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
@@ -249,13 +248,13 @@ export default {
|
|
|
},
|
|
|
onClickCancelSkyLogo() {
|
|
|
this.handlePeakURL("static/template/skin/masking.png");
|
|
|
- this.sky.fodderId = "";
|
|
|
- this.sky.icon = "";
|
|
|
+ this.currentMask.data.sky.fodderId = "";
|
|
|
+ this.currentMask.data.sky.icon = "";
|
|
|
},
|
|
|
onClickCancelEarthLogo() {
|
|
|
this.handleNadirURL("static/template/skin/masking.png");
|
|
|
- this.earth.fodderId = "";
|
|
|
- this.earth.icon = "";
|
|
|
+ this.currentMask.data.earth.fodderId = "";
|
|
|
+ this.currentMask.data.earth.icon = "";
|
|
|
},
|
|
|
onSelectPic(type) {
|
|
|
this.isSelect = type;
|
|
@@ -292,7 +291,7 @@ export default {
|
|
|
if (kr) {
|
|
|
kr.set("hotspot[peaklogo].distorted", anti);
|
|
|
if (!anti) {
|
|
|
- kr.set("hotspot[peaklogo].scale", this.sky.scale * 0.5);
|
|
|
+ kr.set("hotspot[peaklogo].scale", this.currentMask.data.sky.scale * 0.5);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -320,7 +319,7 @@ export default {
|
|
|
if (kr) {
|
|
|
kr.set("hotspot[nadirlogo].distorted", anti);
|
|
|
if (!anti) {
|
|
|
- kr.set("hotspot[nadirlogo].scale", this.earth.scale * 0.5);
|
|
|
+ kr.set("hotspot[nadirlogo].scale", this.currentMask.data.earth.scale * 0.5);
|
|
|
}
|
|
|
}
|
|
|
},
|