diff --git a/src/views/Answer/questions/components/AnswerViewer.vue b/src/views/Answer/questions/components/AnswerViewer.vue index cf61aa78..8e7fd571 100644 --- a/src/views/Answer/questions/components/AnswerViewer.vue +++ b/src/views/Answer/questions/components/AnswerViewer.vue @@ -16,7 +16,8 @@ @onPageCompletion="onPageCompletion" :elCart="elCart" :surveyId="surveyId" - :lockedWare="lockedWare" + :defaultWare="defaultWare" + :isLocked="!!config.is_initialize" @onBehaviorFlush="onBehaviorFlush" />
@@ -119,8 +120,7 @@ export default defineComponent({ if(!this.question.list[0]) return []; return this.question.list[0].options; }, - lockedWare() { - if(!this.config.is_initialize) return null; + defaultWare() { return this.ware; }, }, diff --git a/src/views/Answer/questions/components/AnswerViewerMatrix.vue b/src/views/Answer/questions/components/AnswerViewerMatrix.vue index eeadf270..202ad1b2 100644 --- a/src/views/Answer/questions/components/AnswerViewerMatrix.vue +++ b/src/views/Answer/questions/components/AnswerViewerMatrix.vue @@ -5,7 +5,8 @@ :page="page" :sceneAction="sceneAction" :surveyId="surveyId" - :lockedWare="lockedWare" + :defaultWare="defaultWare" + :isLocked="!!config.is_initialize" @onLoadingCompletion="onLoadingCompletion" @onFromSceneHoldToShelf="onFromSceneHoldToShelf" @onBehaviorFlush="onBehaviorFlush" @@ -96,8 +97,7 @@ export default defineComponent({ (x) => x.planetid == this.config.ware ); }, - lockedWare() { - if(!this.config.is_initialize) return null; + defaultWare() { return this.ware; }, }, diff --git a/src/views/planetDesign/Design/components/config/Viewer3D/SceneSurveyViewer.vue b/src/views/planetDesign/Design/components/config/Viewer3D/SceneSurveyViewer.vue index b5fad00d..33c2a482 100644 --- a/src/views/planetDesign/Design/components/config/Viewer3D/SceneSurveyViewer.vue +++ b/src/views/planetDesign/Design/components/config/Viewer3D/SceneSurveyViewer.vue @@ -6,7 +6,7 @@ import { SurveyViewer } from "./shelves.module"; export default { - props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "lockedWare"], + props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "defaultWare", "isLocked"], mounted() { this.$nextTick(() => this.tryInitView()); @@ -52,12 +52,12 @@ export default { this.viewer_.arrange(newVal).then(() => { this.$emit("onPageCompletion"); - if(!this.lockedWare) return; + if(!this.defaultWare) return; // #20221018 this.viewer_.hold({ - wareId: this.lockedWare?.planetid, - keepHold: true, + wareId: this.defaultWare?.planetid, + keepHold: this.isLocked, }) }); }