This commit is contained in:
X1627315083
2024-05-22 14:08:50 +08:00
parent 9c58713020
commit 48210a11f3
3 changed files with 65 additions and 39 deletions

View File

@@ -5,4 +5,5 @@ VUE_APP_BASE_URL = 'https://api.aida.com.hk'
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
# VUE_APP_BASE_URL = 'http://192.168.1.9:17088'
VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
# VUE_APP_BASE_URL = 'http://192.168.1.7:5567'

View File

@@ -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
},
//新建参数

View File

@@ -864,7 +864,27 @@ export default defineComponent({
centered:true,
onOk() {
data.deleteModelConfirm = 1
let id = _this.store.state.Workspace.workspace.id
Https.axiosGet(Https.httpUrls.workspaceDetail,{params:{id:id}}).then((rv: any) => {
if (rv) {
if(rv.position == "Overall"){
rv.overallSingle = false
}else{
rv.overallSingle = true
}
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);
}
})
_this.confirmDeletePic(data,index)
},
onCancel(){