fix: bug 【创作中心】热区题 设计页面进选择场景 被访者答题界面 未显示场景

This commit is contained in:
wanganmao
2022-10-27 11:18:25 +08:00
parent 71ed03f067
commit c593c559f0
2 changed files with 18 additions and 9 deletions

View File

@@ -114,6 +114,8 @@ export default defineComponent({
return this.scene.shelves;
},
shelf() {
// 无货架默认选择第一个,后续多货架版本可能会修改
if(!this.config.shelf) return this.shelves.find(x => true);
return this.shelves.find((x) => x.planetid == this.config.shelf);
},
wares() {

View File

@@ -280,15 +280,15 @@ export default {
immediate: true,
deep: true,
},
scene: {
handler(val) {
if (this.scene && !this.configTemp.scene_information) {
this.configTemp.scene_information = JSON.parse(
JSON.stringify(val)
);
}
}
},
// scene: {
// handler(val) {
// if (this.scene && !this.configTemp.scene_information) {
// this.configTemp.scene_information = JSON.parse(
// JSON.stringify(val)
// );
// }
// }
// },
},
computed: {
QUESTION_TYPE: () => QUESTION_TYPE,
@@ -353,6 +353,13 @@ export default {
},
onUpdate() {
if (this.scene) {
this.configTemp.scene_information = JSON.parse(
JSON.stringify(this.scene)
);
}
this.$emit("update:config", this.configTemp);
this.$emit("changeConfig", this.configTemp);
},