jinx hai 11 meses
pai
achega
ea2df0d157

+ 23 - 14
packages/qjkankan-editor/src/Store/modules/base.js

@@ -52,7 +52,7 @@ export default {
       //   }
       // });
       // setTimeout(() => {
-      console.error(state.sceneList);
+      // console.error(state.sceneList);
       this.commit("screen/setVisualAngleList", { sceneList: state.sceneList, workVisualAngleList: state.baseInfo.workVisualAngleList });
       this.commit("mask/setCustomMaskList", { sceneList: state.sceneList, workCustomMaskList: state.baseInfo.workCustomMaskList, workId: state.baseInfo.workId });
       this.commit("explanation/setExplanationList", { sceneList: state.sceneList, workExplanationList: state.baseInfo.workExplanationList });
@@ -197,6 +197,7 @@ export default {
       // console.error(state.baseInfo["workVisualAngleList"]);
     },
     initbaseInfo(state, payload) {
+      // console.error('initbaseInfo')
       let data = {
         firstScene: null,
         workVisualAngleList: [],
@@ -287,6 +288,7 @@ export default {
       };
       if (!state.baseInfo) {
         state.baseInfo = data;
+        // state.baseInfo = {};
       }
       for (let key in state.baseInfo) {
         if (state.baseInfo.hasOwnProperty(key)) {
@@ -317,19 +319,26 @@ export default {
   },
   actions: {
     save({ commit, state, rootState }) {
-      saveBaseWorkInfo(
-        state.baseInfo,
-        () => {
-          vue.$msg.success(i18n.t("gather.save_done"));
-          // document.title = this.info.name;
-          document.title = state.baseInfo.work.name || i18n.t("gather.no_title");
-          $waiting.hide();
-          // this.getInfo();
-          // this.$store.commit("UpdateIsShowState", true);
-          this.commit("TakeInfoSnapShotAtSave");
-        },
-        () => {}
-      );
+      // return new Promise((resolve,reject)=>{})
+
+      return new Promise((resolve, reject) => {
+        saveBaseWorkInfo(
+          state.baseInfo,
+          (res) => {
+            // vue.$msg.success(i18n.t("gather.save_done"));
+            // document.title = this.info.name;
+            document.title = state.baseInfo.work.name || i18n.t("gather.no_title");
+            $waiting.hide();
+            // this.getInfo();
+            // this.$store.commit("UpdateIsShowState", true);
+            this.commit("TakeInfoSnapShotAtSave");
+            resolve(res);
+          },
+          (rej) => {
+            reject(rej);
+          }
+        );
+      });
     },
   },
 };

+ 20 - 14
packages/qjkankan-editor/src/Store/modules/explanation.js

@@ -18,11 +18,11 @@ export default {
     setExplanationList(state, payload) {
       let { sceneList, workExplanationList } = payload;
       state.workExplanationList = workExplanationList;
-      console.error("setExplanationList", sceneList, state.workExplanationList);
+      // console.error("setExplanationList", sceneList, state.workExplanationList);
 
       sceneList.forEach((s_item, s_index) => {
         if (!state.workExplanationList.some((w_item) => s_item.id == w_item.navigationId || s_item.sid == w_item.navigationId)) {
-          console.error(s_index, "不存在");
+          // console.error(s_index, "不存在");
 
           state.workExplanationList.push({
             fodderId: null,
@@ -50,7 +50,7 @@ export default {
         }
       });
 
-      console.error(state.workExplanationList);
+      // console.error(state.workExplanationList);
     },
     setData(state, payload) {},
   },
@@ -66,17 +66,23 @@ export default {
       console.error(state.workExplanationList);
       // $waiting.hide();
       // return;
-      explanationSave(
-        {
-          list: state.workExplanationList,
-        },
-        () => {
-          vue.$msg.success(i18n.t("gather.save_done"));
-          $waiting.hide();
-          this.commit("base/updateBaseInfo", { workExplanationList: state.workExplanationList });
-        },
-        () => {}
-      );
+
+      return new Promise((resolve, reject) => {
+        explanationSave(
+          {
+            list: state.workExplanationList,
+          },
+          (res) => {
+            // vue.$msg.success(i18n.t("gather.save_done"));
+            $waiting.hide();
+            this.commit("base/updateBaseInfo", { workExplanationList: state.workExplanationList });
+            resolve(res);
+          },
+          (rej) => {
+            reject(rej);
+          }
+        );
+      });
     },
   },
 };

+ 21 - 9
packages/qjkankan-editor/src/Store/modules/hotspot.js

@@ -221,10 +221,13 @@ export default {
   },
   actions: {
     save({ commit, state, rootState }, payload) {
+      console.error("saveHotspot", 1);
       let list = deepClone(state.hotspotList);
 
       list.forEach((item) => {
+        console.error("saveHotspot", 2);
         let current = rootState.base.sceneList.find((s_item) => s_item.sid && s_item.sid == item.navigationId);
+        console.error("saveHotspot", 3);
         if (current) {
           item.navigationId = current.id;
         }
@@ -245,7 +248,7 @@ export default {
           }
           delete item[value];
         }
-
+        console.error("saveHotspot", 4);
         let hotSpotIconType = item.hotspotIconType;
         for (let key in state.hotspotIconTypeList) {
           let value = state.hotspotIconTypeList[key];
@@ -260,14 +263,23 @@ export default {
       console.error(state.hotspotList, list);
 
       let data = { list, workId: rootState.base.baseInfo.workId };
-      workHotSave(
-        data,
-        () => {
-          vue.$msg.success(i18n.t("gather.save_done"));
-          $waiting.hide();
-        },
-        () => {}
-      );
+
+      return new Promise((resolve, reject) => {
+        workHotSave(
+          data,
+          (res) => {
+            // vue.$msg.success(i18n.t("gather.save_done"));
+            $waiting.hide();
+            this.commit("base/updateBaseInfo", {
+              workHotList: state.hotspotList,
+            });
+            resolve(res);
+          },
+          (rej) => {
+            reject(rej);
+          }
+        );
+      });
     },
   },
 };

+ 41 - 18
packages/qjkankan-editor/src/Store/modules/mask.js

@@ -20,7 +20,7 @@ export default {
     setCustomMaskList(state, payload) {
       let { sceneList, workCustomMaskList, workId } = payload;
       state.workCustomMaskList = workCustomMaskList;
-      console.error("setCustomMaskList", sceneList, state.workCustomMaskList);
+      // console.error("setCustomMaskList", sceneList, state.workCustomMaskList);
 
       sceneList.forEach((s_item, s_index) => {
         if (!state.workCustomMaskList.some((w_item) => s_item.id == w_item.navigationId || s_item.sid == w_item.navigationId)) {
@@ -31,7 +31,6 @@ export default {
                 antidistorted: true,
                 fodderId: null,
                 icon: "",
-                isDelete: 0,
                 isShow: false,
                 navigationId: s_item.sid ? s_item.sid : s_item.id,
                 scale: 1,
@@ -42,7 +41,6 @@ export default {
                 antidistorted: true,
                 fodderId: null,
                 icon: "",
-                isDelete: 0,
                 isShow: true,
                 navigationId: s_item.sid ? s_item.sid : s_item.id,
                 scale: 1,
@@ -72,6 +70,27 @@ export default {
         }
       });
 
+      // console.error(state.workCustomMaskList);
+    },
+
+    applycustomMaskToAll(state, payload) {
+      const { type, currentMask } = payload;
+      state.workCustomMaskList.forEach((item, index) => {
+        if (type === "sky") {
+          for (let key in currentMask.data.sky) {
+            if (key != "id" && key != "navigationId") {
+              item.data.sky[key] = currentMask.data.sky[key];
+            }
+          }
+        } else if (type === "earth") {
+          // console.log("当前场景-earth", earth);
+          for (let key in currentMask.data.earth) {
+            if (key != "id" && key != "navigationId") {
+              item.data.earth[key] = currentMask.data.earth[key];
+            }
+          }
+        }
+      });
       console.error(state.workCustomMaskList);
     },
     setData(state, payload) {},
@@ -92,26 +111,30 @@ export default {
       state.workCustomMaskList.forEach((item) => {
         //组装服务端需要的数据
         for (let key in item.data) {
-          console.error(key);
           list.push(item.data[key]);
         }
       });
       console.error(list);
-      // $waiting.hide();
-      // return;
+
       // return
-      maskSave(
-        {
-          list,
-        },
-        (res) => {
-          vue.$msg.success(i18n.t("gather.save_done"));
-          $waiting.hide();
-          console.error(res);
-          this.commit("base/updateBaseInfo", { workCustomMaskList: state.workCustomMaskList });
-        },
-        () => {}
-      );
+
+      return new Promise((resolve, reject) => {
+        maskSave(
+          {
+            list,
+          },
+          (res) => {
+            // vue.$msg.success(i18n.t("gather.save_done"));
+            $waiting.hide();
+            // console.error(res);
+            this.commit("base/updateBaseInfo", { workCustomMaskList: state.workCustomMaskList });
+            resolve(res);
+          },
+          (rej) => {
+            reject(rej);
+          }
+        );
+      });
     },
   },
 };

+ 2 - 2
packages/qjkankan-editor/src/Store/modules/navigation.js

@@ -60,7 +60,7 @@ export default {
           });
         });
       });
-      console.error(rootState.base.baseInfo.navigationTrees, list);
+      // console.error(rootState.base.baseInfo.navigationTrees, list);
       // $waiting.hide();
       // return;
 
@@ -70,7 +70,7 @@ export default {
           (res) => {
             $waiting.hide();
             if (res.code == 0) {
-              vue.$msg.success(i18n.t("gather.save_done"));
+              // vue.$msg.success(i18n.t("gather.save_done"));
               // this.commit("TakeInfoSnapShotAtSave");
               this.commit("base/updateBaseInfo", { navigationTrees: res.data });
               if (rootState.scene.currentScene) {

+ 1 - 5
packages/qjkankan-editor/src/Store/modules/scene.js

@@ -91,16 +91,12 @@ export default {
       console.error("setSaveApiList", state.saveApiList);
     },
     removeSaveApi(state, payload) {
-      if (state.saveApiList.some((i) => i == payload)) {
-        let idx = state.saveApiList.findIndex((item) => item == payload);
-        state.saveApiList.splice(idx, 1);
-      }
+      state.saveApiList = [];
       console.error("removeSaveApi", state.saveApiList);
     },
 
     // 设置当前场景
     setCurrentScene(state, payload) {
-      console.error('setCurrentScene')
       state.currentScene = payload;
     },
     // 设置当前二级分组

+ 20 - 14
packages/qjkankan-editor/src/Store/modules/screen.js

@@ -26,7 +26,7 @@ export default {
     setVisualAngleList(state, payload) {
       let { sceneList, workVisualAngleList } = payload;
       state.workVisualAngleList = workVisualAngleList;
-      console.error("setVisualAngleList", sceneList, state.workVisualAngleList);
+      // console.error("setVisualAngleList", sceneList, state.workVisualAngleList);
 
       sceneList.forEach((s_item, s_index) => {
         if (!state.workVisualAngleList.some((w_item) => s_item.id == w_item.navigationId || s_item.sid == w_item.navigationId)) {
@@ -77,7 +77,7 @@ export default {
         }
       });
 
-      console.error(state.workVisualAngleList);
+      // console.error(state.workVisualAngleList);
     },
     setData(state, payload) {
       this.commit("base/initbaseInfo");
@@ -95,7 +95,7 @@ export default {
         item.vlookatmin = payload[0];
         item.vlookatmax = payload[1];
       });
-      console.error(state.workVisualAngleList);
+      // console.error(state.workVisualAngleList);
     },
     save({ commit, state, rootState }) {
       // console.error(rootState.base.baseInfo.workVisualAngleList);
@@ -109,18 +109,24 @@ export default {
       console.error("save", state.workVisualAngleList);
       $waiting.hide();
       // return
-      visualSave(
-        {
-          list: state.workVisualAngleList,
-        },
 
-        (res) => {
-          vue.$msg.success(i18n.t("gather.save_done"));
-          $waiting.hide();
-          this.commit("base/updateBaseInfo", { workVisualAngleList: res.data });
-        },
-        () => {}
-      );
+      return new Promise((resolve, reject) => {
+        visualSave(
+          {
+            list: state.workVisualAngleList,
+          },
+
+          (res) => {
+            // vue.$msg.success(i18n.t("gather.save_done"));
+            $waiting.hide();
+            this.commit("base/updateBaseInfo", { workVisualAngleList: res.data });
+            resolve(res);
+          },
+          (rej) => {
+            reject(rej);
+          }
+        );
+      });
     },
   },
 };

+ 1 - 1
packages/qjkankan-editor/src/components/dragTree/index.vue

@@ -195,7 +195,7 @@ export default {
       handler: function (newVal, oldVal) {
         if (!newVal) {
           console.error("设置空");
-          // this.$store.commit("scene/setCurrentScene", null);
+          this.$store.commit("scene/setCurrentScene", null);
         }
       },
       deep: true,

+ 48 - 8
packages/qjkankan-editor/src/framework/EditorHead.vue

@@ -57,10 +57,13 @@ export default {
     sceneList: {
       handler: function (newVal, oldVal) {
         if (newVal.length != oldVal.length) {
-          console.error("sceneList change");
-          this.$store.commit("base/ininDefaultData");
+          // console.error("sceneList change");
+          let currentScene = newVal.find((item) => item.id == this.currentScene.id);
+          if (!currentScene) {
+            this.$store.commit("scene/setCurrentScene", null);
+          }
+          // this.$store.commit("base/ininDefaultData");
           // this.$store.commit("screen/setVisualAngleList", state.sceneList);
-         
         }
       },
       deep: true,
@@ -108,8 +111,10 @@ export default {
 
         if (!this.currentScene) {
           let activeScene = null;
+
           this.baseInfo.navigationTrees.forEach((item, index) => {
             activeScene = item.children.find((pano) => pano.id == firstScene.id);
+
             if (activeScene) {
               this.$store.commit("scene/setCurrentScenesList", item.children);
               this.$store.commit("navigation/setData", { currentSecondId: null, currentRootId: item.id });
@@ -117,6 +122,7 @@ export default {
             }
             item = item.children.forEach((s_item, s_index) => {
               activeScene = s_item.children.find((pano) => pano.id == firstScene.id);
+
               if (activeScene) {
                 this.$store.commit("scene/setCurrentScenesList", s_item.children);
                 this.$store.commit("navigation/setData", { currentSecondId: s_item.id, currentRootId: item.id });
@@ -124,6 +130,7 @@ export default {
               }
               s_item = s_item.children.forEach((t_item, t_index) => {
                 activeScene = t_item.children.find((pano) => pano.id == firstScene.id);
+
                 if (activeScene) {
                   this.$store.commit("scene/setCurrentScenesList", s_item.children);
                   this.$store.commit("navigation/setData", { currentSecondId: s_item.id, currentRootId: item.id });
@@ -320,28 +327,61 @@ export default {
         $waiting.show();
 
         // console.error(this.$router.name)
-
+        let promises = [];
         if (this.saveApiList.length) {
           let idx = this.saveApiList.find((item) => item == "navigation");
           console.error(idx);
+          let length = 0;
           if (idx) {
             //优先保存导航树
             this.$store.dispatch(`navigation/save`).then((res) => {
               this.saveApiList.forEach((item) => {
                 if (item != "navigation") {
-                  this.$store.dispatch(`${item}/save`);
+                  promises.push(this.$store.dispatch(`${item}/save`));
+                  // this.$store.dispatch(`${item}/save`).then((res) => {});
                 }
               });
+              let currentRouter = this.saveApiList.find((item) => item == this.$route.name);
+              if (!currentRouter) {
+                promises.push(this.$store.dispatch(`${this.$route.name}/save`));
+              }
+              Promise.all(promises)
+                .then((res) => {
+                  console.log("Promise.all success", res);
+                  this.$store.commit(`scene/removeSaveApi`);
+                  this.$msg.success(i18n.t("gather.save_done"));
+                })
+                .catch((err) => {
+                  console.error("Promise.all failed", err);
+                });
             });
           } else {
             this.saveApiList.forEach((item) => {
-              this.$store.dispatch(`${item}/save`);
+              promises.push(this.$store.dispatch(`${item}/save`));
+              // this.$store.dispatch(`${item}/save`).then((res) => {});
             });
+            let currentRouter = this.saveApiList.find((item) => item == this.$route.name);
+            if (!currentRouter) {
+              promises.push(this.$store.dispatch(`${this.$route.name}/save`));
+            }
+            Promise.all(promises)
+              .then((res) => {
+                console.log("Promise.all success", res);
+                this.$store.commit(`scene/removeSaveApi`);
+                this.$msg.success(i18n.t("gather.save_done"));
+              })
+              .catch((err) => {
+                console.error("Promise.all failed", err);
+              });
           }
         } else {
-          this.$store.dispatch(`${this.$route.name}/save`).then((res) => {});
+          this.$store.dispatch(`${this.$route.name}/save`).then((res) => {
+            this.$store.commit(`scene/removeSaveApi`);
+            this.$msg.success(i18n.t("gather.save_done"));
+          });
         }
-
+        // this.$store.commit(`scene/removeSaveApi`);
+        // this.$msg.success(i18n.t("gather.save_done"));
         // saveWorks(
         //   {
         //     password: this.info.password,

+ 4 - 3
packages/qjkankan-editor/src/framework/play/pano/components/new-list.vue

@@ -24,7 +24,7 @@
               //   item.sceneTitle.length > spanlength &&
               //   currentScene.id == item.id,
             }"
-            v-for="(item, index) in info.navigationTrees[rootTabIndex]?.children[secondTabIndex]?.children"
+            v-for="(item, index) in currentScenesList"
           >
             <div @click="tabCurrentScene(item, index)" class="scene-content" :style="`background-image:url(${item.icon});`">
               <!-- <img :src="i.icon" alt="" /> -->
@@ -138,7 +138,7 @@ export default {
       handler: function (newVal, oldVal) {
         if (newVal) {
           this.$nextTick(() => {
-            this.changeSceneList();
+            // this.changeSceneList();
           });
         }
       },
@@ -176,7 +176,7 @@ export default {
       return this.info.navigationTrees[this.rootTabIndex].children.findIndex((item) => item.id == this.currentSecondId);
     },
     showSecondTab() {
-      return this.info.navigationTrees[this.rootTabIndex].children.some((item) => item.id != this.currentSecondId && item.children.length);
+      return this.info.navigationTrees[this.rootTabIndex].children.some((item) => item.id != this.currentSecondId );
     },
   },
   methods: {
@@ -199,6 +199,7 @@ export default {
       this.$store.commit("navigation/setData", { currentSecondId: item.id });
       let sceneList = this.info.navigationTrees[this.rootTabIndex].children[this.secondTabIndex].children;
       this.$store.commit("scene/setCurrentScenesList", sceneList);
+      // this.changeSceneList();
     },
     changeSceneList() {
       let currentList = null;

+ 17 - 3
packages/qjkankan-editor/src/views/base/index.vue

@@ -24,12 +24,26 @@ export default {
       // info: "info",
       info: "base/baseInfo",
     }),
+    newInfo() {
+      let info = {
+        work: this.info.work,
+        workBackgroundMusic: this.info.workBackgroundMusic,
+        workCoverType: this.info.workCoverType,
+        workCustomButton: this.info.workCustomButton,
+        workId: this.info.workId,
+        workLogo: this.info.workLogo,
+        workOpeningAnimation: this.info.workOpeningAnimation,
+        workOpeningTip: this.info.workOpeningTip,
+      };
+      return JSON.parse(JSON.stringify(info));
+      // return info;
+    },
   },
   watch: {
-    info: {
+    newInfo: {
       handler(newVal, oldVal) {
-        if (newVal && this.$route.name == "base") {
-          console.error("base change");
+        if (JSON.stringify(newVal).length != JSON.stringify(oldVal).length && this.$route.name == "base") {
+          console.error("base change", JSON.stringify(newVal).length, JSON.stringify(oldVal).length);
           this.$store.commit("scene/setSaveApiList", "base");
         }
       },

+ 1 - 1
packages/qjkankan-editor/src/views/explanation/explanationSettings.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="explanation-settings" app-border dir-left>
-    <template v-if="currentScene.type !== '4dkk'">
+    <template v-if="currentScene.type !== '4dkk' && currentExplanation">
       <div class="title">
         {{ $i18n.t("explanation.explanation_settings") }}
         <i class="iconfont icon-help_i tool-tip-for-editor" v-tooltip="$i18n.t('explanation.explanation_tips')" />

+ 10 - 8
packages/qjkankan-editor/src/views/hotspot/HotSpotList.vue

@@ -164,15 +164,17 @@ export default {
       // let hptarget = this.someData.hotspots.find((item) => item.name.toLowerCase() == data.hpname.toLowerCase());
 
       let hptarget = this.hotspotList.findIndex((item) => item.name.toLowerCase() == data.hpname.toLowerCase());
-      if (data.hpname.toLowerCase() == this.hotspot.name.toLowerCase()) {
-        //兼容新增
-        this.hotspot.ath = data.ath;
-        this.hotspot.atv = data.atv;
-      }
-      if (hptarget) {
+  
+      // if (data.hpname.toLowerCase() == this.hotspot.name.toLowerCase()) {
+      //   //兼容新增
+      //   this.hotspot.ath = data.ath;
+      //   this.hotspot.atv = data.atv;
+      // }
+      if (hptarget>=0) {
         this.hotspotList[hptarget].ath = data.ath;
         this.hotspotList[hptarget].atv = data.atv;
-        console.log("hptarget", this.hotspotList[hptarget]);
+        // console.log("hptarget", this.hotspotList[hptarget]);
+        this.$store.commit("scene/setSaveApiList", "hotspot");
       }
     });
 
@@ -182,7 +184,7 @@ export default {
       console.error(this.hotspotList[2].name.toLowerCase(), data.toLowerCase());
       let idx = this.hotspotList.findIndex((item) => item.name.toLowerCase() == data.toLowerCase());
       // console.log(data);
-      if (data == this.hotspot.name) {
+      if (data == this.hotspotList[idx].name) {
         // window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name);
         if (!this.showPanel) {
           this.open(this.hotspotList[idx]);

+ 19 - 20
packages/qjkankan-editor/src/views/mask/setting.vue

@@ -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);
         }
       }
     },

+ 2 - 3
packages/qjkankan-editor/src/views/navigation/initialSceneSettings.vue

@@ -46,11 +46,10 @@ export default {
     Selector,
   },
   watch: {
-    "info.firstScene": {
-      immediate: true,
+    "info.firstScene.id": {
+      // immediate: true,
       handler: function (newVal, oldVal) {
         if (JSON.stringify(newVal) != JSON.stringify(oldVal) && JSON.stringify(oldVal) != "undefined") {
-          console.error("firstScene change", JSON.stringify(newVal), "*****", JSON.stringify(oldVal));
           this.$store.commit("navigation/setData", { saveFristScene: true });
         }
       },

+ 4 - 9
packages/qjkankan-editor/src/views/screen/Setting.vue

@@ -94,15 +94,6 @@ export default {
     };
   },
   watch: {
-    baseInfo: {
-      handler(newVal, oldVal) {
-        if (newVal && this.$route.name == "screen") {
-          console.error("screen change");
-          this.$store.commit("scene/setSaveApiList", "screen");
-        }
-      },
-      deep: true,
-    },
     "$route.name": {
       handler() {
         this.handleHiddenAllMasks();
@@ -162,6 +153,10 @@ export default {
     vlookat: {
       handler: function (val) {
         this.handleVlootAt(val);
+        if (val && this.$route.name == "screen") {
+          console.error("screen change");
+          this.$store.commit("scene/setSaveApiList", "screen");
+        }
       },
     },
     applyToAll: {