2023-11-9-dist
This commit is contained in:
@@ -248,6 +248,21 @@ export default defineComponent({
|
||||
this.getMannequins()
|
||||
}
|
||||
},
|
||||
// 'workspaceItem.sex':{
|
||||
// handler(newVal:any,oldVal:any){
|
||||
// console.log(oldVal);
|
||||
|
||||
// if(oldVal){
|
||||
// console.log(oldVal);
|
||||
|
||||
// if(newVal != oldVal){
|
||||
// console.log(this.workspaceItem.position);
|
||||
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
workspaceItem:{
|
||||
handler(newVal:any,oldVal:any){
|
||||
this.store.commit("setWorkspace", this.workspaceItem);
|
||||
@@ -259,9 +274,8 @@ export default defineComponent({
|
||||
store: useStore(),
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
mounted() {
|
||||
this.getworkspace()
|
||||
this.getSex()
|
||||
},
|
||||
directives:{
|
||||
fade:{
|
||||
@@ -299,8 +313,8 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getSex(){
|
||||
Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:'Sex'}}).then((rv: any) => {
|
||||
async getSex(){
|
||||
await Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:'Sex'}}).then((rv: any) => {
|
||||
if (rv) {
|
||||
let arr:any = []
|
||||
rv.forEach((item:any) => {
|
||||
@@ -311,19 +325,18 @@ export default defineComponent({
|
||||
arr.push(obj)
|
||||
});
|
||||
this.sex = arr
|
||||
this.getPosition()
|
||||
}
|
||||
})
|
||||
|
||||
this.getPosition('')
|
||||
},
|
||||
getPosition(){
|
||||
async getPosition(str:any){
|
||||
let params
|
||||
if(this.workspaceItem.sex == 'Female'){
|
||||
params = 'FemalePosition'
|
||||
}else{
|
||||
params = 'MalePosition'
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:params}}).then((rv: any) => {
|
||||
await Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:params}}).then((rv: any) => {
|
||||
if (rv) {
|
||||
let arr:any = []
|
||||
rv.forEach((item:any) => {
|
||||
@@ -334,12 +347,15 @@ export default defineComponent({
|
||||
arr.push(obj)
|
||||
});
|
||||
this.singleTypeList = arr
|
||||
if(this.workspaceItem.overallSingle){
|
||||
if(str == 'sex'){
|
||||
this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
setPosition(){
|
||||
this.workspaceItem.position = this.singleTypeList[0].label
|
||||
},
|
||||
getworkspace(){
|
||||
// Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:3}}).then((rv: any) => {
|
||||
// if (rv) {
|
||||
@@ -367,7 +383,7 @@ export default defineComponent({
|
||||
});
|
||||
this.workspace.id = rv.id
|
||||
this.workspace.workspaceList = rv.page.content
|
||||
|
||||
this.getSex()
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -420,6 +436,7 @@ export default defineComponent({
|
||||
setOverallSingle(){
|
||||
if(this.workspaceItem.overallSingle){
|
||||
this.workspaceItem.position = this.singleTypeList[0].label
|
||||
|
||||
}else{
|
||||
this.workspaceItem.position = 'Overall'
|
||||
}
|
||||
@@ -514,7 +531,8 @@ export default defineComponent({
|
||||
this.workspaceItem.sex = v
|
||||
this.getMannequins()
|
||||
this.setMannequinsSex()
|
||||
this.getPosition()
|
||||
this.getPosition('sex')
|
||||
|
||||
},
|
||||
//设置single & overall
|
||||
setSingle(v:string){
|
||||
|
||||
Reference in New Issue
Block a user