fix
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
<!-- <div class="text">Style:</div>
|
||||
<div class="text" style="margin: 0 9rem 0 4rem;">{{ selectObject?.styleName }}</div>
|
||||
<div class="gallery_btn" style="line-height: 5rem;" @click="setStyle">{{ $t('Habit.Select') }}</div> -->
|
||||
<div class="text">Style:</div>
|
||||
<div class="generalModel_state" style="width: 20rem;">
|
||||
<div class="text" v-show="systemUser">Style:</div>
|
||||
<div class="generalModel_state" style="width: 20rem;" v-show="systemUser">
|
||||
<div class="generalModel_state_item" style="margin: 0; width: 100%;">
|
||||
<a-select
|
||||
v-model:value="selectObject.style"
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="text" :class="{active:systemUser}">{{ $t('Habit.System') }}</div>
|
||||
<a-switch class="switch" :disabled="libraryList?.[0]==null?true:false" :checked="!systemUser" @click="setSystemUser" />
|
||||
<a-switch class="switch" :checked="!systemUser" @click="setSystemUser" />
|
||||
<div class="text" :class="{active:!systemUser}">{{ $t('Habit.User') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,7 +37,7 @@
|
||||
<img :src="item.presignedUrl" alt="">
|
||||
<span v-show="!systemUser" class="icon iconfont icon-tianxie" @click.stop="setEdit(item,!systemUser?'Library':'System','edit')"></span>
|
||||
<span v-show="!systemUser" class="icon iconfont icon-shanchu" @click.stop="deleteSinglePic(item,index)"></span>
|
||||
<span class="icon add" v-if="systemUser" :title="'Add to your library'">+</span>
|
||||
<span class="icon add" v-if="systemUser" :title="'Add to your library'" @click.stop="addSystemToUser(item)">+</span>
|
||||
</div>
|
||||
<div class="uploadBox">
|
||||
<div class="upload" v-if="!systemUser">
|
||||
@@ -69,6 +69,7 @@ import { useI18n } from 'vue-i18n'
|
||||
import habitSetStyle from "@/component/Detail/habitSetStyle.vue";
|
||||
import edit from './edit.vue';
|
||||
import { Modal,message,Upload,CascaderProps } from 'ant-design-vue';
|
||||
import { Item } from 'ant-design-vue/lib/menu';
|
||||
export default defineComponent({
|
||||
components:{
|
||||
habitSetStyle,edit
|
||||
@@ -84,14 +85,14 @@ export default defineComponent({
|
||||
modelList:[],
|
||||
systemUser:true,
|
||||
selectObject:computed(()=>store.state.Workspace.probjects),//选择的项目
|
||||
mannequinStyleList:[],
|
||||
mannequinStyleList:[] as any,
|
||||
mannequinStyle:computed(()=>store.state.UserHabit.mannequinStyle),//女性衣服位置
|
||||
})
|
||||
watch(()=>data.mannequinStyle,(newValue,oldValue)=>{
|
||||
if(newValue != oldValue){
|
||||
data.mannequinStyleList = JSON.parse(JSON.stringify(newValue))
|
||||
data.mannequinStyleList.unshift({
|
||||
name:'No style',
|
||||
name:'All',
|
||||
value:'',
|
||||
id:'',
|
||||
})
|
||||
@@ -210,42 +211,30 @@ export default defineComponent({
|
||||
Https.axiosPost(Https.httpUrls.batchDeleteLibrary, newData).then(
|
||||
(rv: any) => {
|
||||
getModel()
|
||||
// let id = this.store.state.Workspace.workspace.id
|
||||
// Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:id}}).then((rv: any) => {
|
||||
// if (rv) {
|
||||
// if(rv.sexEnum.name == 'Female'){
|
||||
// rv.mannequinUrl = rv.femalePresignedUrl
|
||||
// rv.mannequinType = rv.mannequinFemaleType
|
||||
// rv.mannequinId = rv.mannequinFemaleId
|
||||
// }else if(rv.sexEnum.name == 'Male'){
|
||||
// rv.mannequinUrl = rv.malePresignedUrl
|
||||
// rv.mannequinType = rv.mannequinMaleType
|
||||
// rv.mannequinId = rv.mannequinMaleId
|
||||
// }
|
||||
// this.store.commit("setWorkspace", rv);
|
||||
// }
|
||||
// })
|
||||
}
|
||||
).catch((res)=>{
|
||||
// if(res.errCode === 2){
|
||||
// Modal.confirm({
|
||||
// title: res.errMsg,
|
||||
// icon: createVNode(ExclamationCircleOutlined),
|
||||
// okText: 'Yes',
|
||||
// cancelText: 'No',
|
||||
// mask:false,
|
||||
// zIndex:99999,
|
||||
// centered:true,
|
||||
// onOk () {
|
||||
// newData.deleteModelConfirm = 1
|
||||
// confirmDeletePic('',index,newData)
|
||||
// },
|
||||
// onCancel(){
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
});
|
||||
}
|
||||
const addSystemToUser = (item:any)=>{
|
||||
let newData = {
|
||||
sysModelId:item.id,
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.addSysModelToLib, {params:newData}).then(
|
||||
(rv: any) => {
|
||||
getModel()
|
||||
let value = {
|
||||
id:rv.id,
|
||||
url:rv.url,
|
||||
type:'Library',
|
||||
}
|
||||
setSelectKey(value)
|
||||
data.systemUser = false
|
||||
}
|
||||
).catch((res)=>{
|
||||
|
||||
});
|
||||
}
|
||||
onMounted(()=>{
|
||||
getModel()
|
||||
})
|
||||
@@ -262,7 +251,8 @@ export default defineComponent({
|
||||
beforeUpload,
|
||||
fileUploadChange,
|
||||
getModel,
|
||||
deleteSinglePic
|
||||
deleteSinglePic,
|
||||
addSystemToUser
|
||||
}
|
||||
},
|
||||
directives:{
|
||||
@@ -334,6 +324,7 @@ export default defineComponent({
|
||||
> .item{
|
||||
width: 25rem;
|
||||
height: 55rem;
|
||||
max-height: 100%;
|
||||
margin: auto 0;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
@@ -390,8 +381,8 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
> .uploadBox{
|
||||
padding-left: 2rem;
|
||||
right: .5rem;
|
||||
padding: 0 2rem;
|
||||
right: 0;
|
||||
position: sticky;
|
||||
flex-shrink: 0;
|
||||
background: #fff;
|
||||
|
||||
Reference in New Issue
Block a user