This commit is contained in:
X1627315083
2024-10-18 13:28:21 +08:00
parent aaa5c7c9a5
commit 73d1069469

View File

@@ -69,7 +69,7 @@
</a-select>
<a-select
ref="select"
v-show="designTypeList[selectCode]?.[0]?.value && selectCode == 'Sketchboard'"
v-show="designTypeList[selectCode]?.[0]?.value && selectCode == 'Sketchboard' && uploadGenerate != 'Generate'"
v-model:value="designType"
:options="designTypeList[selectCode]"
@change="handleChange"
@@ -81,6 +81,21 @@
style="color: #343579"
></span
></template>
</a-select>
<a-select
ref="select"
v-show="SketchGenerateTypeList?.[0]?.value && selectCode == 'Sketchboard' && uploadGenerate == 'Generate'"
v-model:value="SketchGenerateType"
:options="SketchGenerateTypeList"
@change="setSketchGenerateType"
:fieldNames="{ label: 'name', value: 'value' }"
>
<template #suffixIcon
><span
class="icon iconfont icon-xiala"
style="color: #343579"
></span
></template>
</a-select>
</div>
</div>
@@ -485,6 +500,10 @@ export default defineComponent({
Models:[],
DesignElements:designElementsType,
})
let SketchGenerateTypeList = computed(()=>{
return store.state.UserHabit.SketchGenerateType
})
let SketchGenerateType = ref({})
let imgList = ref([])
let currentPage:any = ref(1)
let pageSize:any = ref(18)
@@ -672,6 +691,8 @@ export default defineComponent({
sexList,
sex,
positionType,
SketchGenerateType,
SketchGenerateTypeList,
designTypeList,
designType,
imgList,
@@ -887,7 +908,10 @@ export default defineComponent({
this.currentPage = 1
this.getLibraryList('')
},
setSketchGenerateType (){
this.selectGenerateList = []
this.scene = this.SketchGenerateTypeList.filter((item:any)=>item.value == this.SketchGenerateType)[0]
},
fileUploadChange(data:any){
let file = data.file
// let Cropper:any = this.$refs.Cropper
@@ -956,19 +980,23 @@ export default defineComponent({
// this.scene = this.designTypeList[this.selectCode][0]
// }
// }
if(this.selectCode == 'Sketchboard' && str == 'Generate'){
this.designTypeList.Sketchboard = computed(()=>{
return this.store.state.UserHabit.SketchGenerateType
})
}else if(this.selectCode == 'Sketchboard'){
this.designTypeList.Sketchboard = computed(() => {
return this.store.state.UserHabit.Position;
});
}
// if(this.selectCode == 'Sketchboard' && str == 'Generate'){
// this.designTypeList.Sketchboard = computed(()=>{
// return this.store.state.UserHabit.SketchGenerateType
// })
// }else if(this.selectCode == 'Sketchboard'){
// this.designTypeList.Sketchboard = computed(() => {
// return this.store.state.UserHabit.Position;
// });
// }
if(this.designTypeList[this.selectCode][0]){
this.scene = this.designTypeList[this.selectCode][0]
this.designType = this.designTypeList[this.selectCode][0].value
}
if(str == 'Generate' && this.selectCode == 'Sketchboard'){
this.scene = this.SketchGenerateTypeList[0]
this.SketchGenerateType = this.SketchGenerateTypeList[0].value
}
if(str != 'Generate'){
this.getLibraryList('')
}