fix
This commit is contained in:
@@ -268,20 +268,20 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
},
|
||||
'workspaceItem.id_':{
|
||||
'workspace.id':{
|
||||
handler(newVal:any,oldVal:any){
|
||||
this.workspace.workspaceList.forEach((v:any)=>{
|
||||
if(v.id == this.workspaceItem.id_){
|
||||
this.workspaceItem = v
|
||||
this.workspaceItem.id_ = v.id
|
||||
}
|
||||
if(v.id == oldVal){
|
||||
delete v.isLastIndex
|
||||
this.putWorkspace(v,newVal)
|
||||
this.getDetail(newVal)
|
||||
}
|
||||
})
|
||||
this.getMannequins()
|
||||
// this.workspace.workspaceList.forEach((v:any)=>{
|
||||
// if(v.id == this.workspaceItem.id_){
|
||||
// this.workspaceItem = v
|
||||
// this.workspaceItem.id_ = v.id
|
||||
// }
|
||||
// if(v.id == oldVal){
|
||||
// delete v.isLastIndex
|
||||
// this.putWorkspace(v,newVal)
|
||||
// this.getDetail(newVal)
|
||||
// }
|
||||
// })
|
||||
this.getDetail(newVal)
|
||||
}
|
||||
},
|
||||
'openType.workspace':{
|
||||
@@ -341,7 +341,7 @@ export default defineComponent({
|
||||
// new Promise((resolve) => {
|
||||
// this.getPosition(resolve)
|
||||
// })
|
||||
await this.getPosition()
|
||||
await this.getPosition()//获取衣服类型
|
||||
this.getworkspace()
|
||||
this.getSex()
|
||||
},
|
||||
@@ -469,27 +469,17 @@ export default defineComponent({
|
||||
|
||||
Https.axiosPost(Https.httpUrls.workspaceList,data).then((rv: any) => {
|
||||
if (rv) {
|
||||
rv.page.content.forEach((v:any) => {
|
||||
v.id_ = v.id
|
||||
if(v.position == "Overall"){
|
||||
v.overallSingle = false
|
||||
}else{
|
||||
v.overallSingle = true
|
||||
}
|
||||
v.putName = false
|
||||
if(v.id == (this.workspaceItem.id == -1 ?rv.id:this.workspaceItem.id)){
|
||||
this.workspaceItem = v
|
||||
this.setMannequinsSex()
|
||||
this.setPosition('')
|
||||
}
|
||||
});
|
||||
this.total = rv.page.total
|
||||
// rv.page.content.forEach((v:any) => {
|
||||
// v.id_ = v.id
|
||||
// if(v.position == "Overall"){
|
||||
// v.overallSingle = false
|
||||
// }else{
|
||||
// v.overallSingle = true
|
||||
// }
|
||||
// v.putName = false
|
||||
// });
|
||||
this.workspace.id = rv.id
|
||||
// if(this.workspace.workspaceList){
|
||||
// this.workspace.workspaceList.push(...rv.page.content)
|
||||
// }else{
|
||||
// this.workspace.workspaceList = rv.page.content
|
||||
// }
|
||||
this.total = rv.page.total
|
||||
this.workspace.workspaceList = rv.page.content
|
||||
}
|
||||
})
|
||||
@@ -497,6 +487,15 @@ export default defineComponent({
|
||||
getDetail(id:any){//
|
||||
Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:id}}).then((rv: any) => {
|
||||
if (rv) {
|
||||
if(rv.position == "Overall"){
|
||||
rv.overallSingle = false
|
||||
}else{
|
||||
rv.overallSingle = true
|
||||
}
|
||||
rv.putName = false
|
||||
this.workspaceItem = rv
|
||||
this.setMannequinsSex()
|
||||
this.setPosition('')
|
||||
// this.getworkspace()
|
||||
}
|
||||
})
|
||||
@@ -524,12 +523,16 @@ export default defineComponent({
|
||||
if(this.workspaceItem.id == -1){
|
||||
return
|
||||
}
|
||||
this.openType.model = false
|
||||
Https.axiosPost(Https.httpUrls.workspacesaveOrUpdate,data).then((rv: any) => {
|
||||
if (rv) {
|
||||
if(index){
|
||||
// this.getDetail(index)
|
||||
}else{
|
||||
this.getworkspace()
|
||||
}
|
||||
this.getworkspace()
|
||||
if(index){
|
||||
this.getDetail(index)
|
||||
}
|
||||
this.workspace.workspaceList[index].workSpaceName = this.workspaceItemName
|
||||
this.workspace.workspaceList[index].putName = false
|
||||
@@ -597,6 +600,7 @@ export default defineComponent({
|
||||
message.info(this.t('Habit.jsContent2'));
|
||||
}else{
|
||||
if(index == -1){
|
||||
|
||||
let data = {
|
||||
workSpaceName:this.workspaceItemName,
|
||||
}
|
||||
@@ -610,7 +614,7 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
data.workSpaceName = this.workspaceItemName
|
||||
this.putWorkspace(data,'')
|
||||
this.putWorkspace(data,this.workspaceItem.id)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -632,8 +636,9 @@ export default defineComponent({
|
||||
this.workspace.workspaceList.forEach((v:any) => {
|
||||
v.putName = false
|
||||
});
|
||||
|
||||
this.workspaceItem.id_ = num
|
||||
this.putWorkspace(this.workspaceItem,'')
|
||||
this.workspace.id = num
|
||||
// this.workspaceItem.id_ = num
|
||||
this.openType.workspace = false
|
||||
},
|
||||
//新建参数
|
||||
|
||||
Reference in New Issue
Block a user