初代测试版本
This commit is contained in:
@@ -159,7 +159,8 @@ import { defineComponent, createVNode, ref,Ref} from "vue";
|
||||
import { UserOutlined, DownOutlined } from "@ant-design/icons-vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import type { MenuProps } from "ant-design-vue";
|
||||
import { message,Upload} from 'ant-design-vue';
|
||||
import { Modal,message,Upload} from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
export default defineComponent({
|
||||
components: {
|
||||
DownOutlined,
|
||||
@@ -220,7 +221,8 @@ export default defineComponent({
|
||||
this.workspaceItem.position = 'Overall'
|
||||
}
|
||||
let data = this.workspaceItem
|
||||
this.putWorkspace(data)
|
||||
delete data.isLastIndex
|
||||
this.putWorkspace(data,'')
|
||||
this.store.commit("setWorkspace", this.workspaceItem);
|
||||
}
|
||||
}
|
||||
@@ -237,11 +239,12 @@ export default defineComponent({
|
||||
this.workspaceItem.id_ = v.id
|
||||
}
|
||||
if(v.id == oldVal){
|
||||
this.getDetail(newVal)
|
||||
delete v.isLastIndex
|
||||
this.putWorkspace(v)
|
||||
this.putWorkspace(v,newVal)
|
||||
// this.getDetail(newVal)
|
||||
}
|
||||
})
|
||||
this.getMannequins()
|
||||
}
|
||||
},
|
||||
workspaceItem:{
|
||||
@@ -393,14 +396,27 @@ export default defineComponent({
|
||||
getMannequins(){//获取模特
|
||||
Https.axiosGet(Https.httpUrls.getMannequins,{params:{sex:this.workspaceItem.sex}}).then((rv: any) => {
|
||||
if (rv) {
|
||||
// rv.forEach((item:any)=>{
|
||||
// item.type ==
|
||||
// })
|
||||
if(rv[0].type == 'System'){
|
||||
let a = rv[0]
|
||||
rv[0] = rv[1]
|
||||
rv[1] = a
|
||||
}
|
||||
this.mannequins = rv
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
putWorkspace(data:any){//修改workspace
|
||||
putWorkspace(data:any,index:any){//修改workspace
|
||||
console.log(index);
|
||||
|
||||
Https.axiosPost(Https.httpUrls.workspacesaveOrUpdate,data).then((rv: any) => {
|
||||
if (rv) {
|
||||
if(index){
|
||||
this.getDetail(index)
|
||||
}
|
||||
this.getworkspace()
|
||||
}
|
||||
})
|
||||
@@ -417,8 +433,30 @@ export default defineComponent({
|
||||
if(this.workspaceItem.overallSingle){
|
||||
this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}else{
|
||||
this.workspaceItem.position = 'Overall'
|
||||
}
|
||||
},
|
||||
|
||||
cancelDsign(index:any){
|
||||
let _this = this
|
||||
Modal.confirm({
|
||||
title: 'Whether to delete the workspace?',
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
okText: 'Yes',
|
||||
cancelText: 'No',
|
||||
mask:false,
|
||||
wrapClassName:'habit',
|
||||
zIndex:999999999,
|
||||
// centered:true,
|
||||
onOk() {
|
||||
let data = [{
|
||||
id:_this.workspace.workspaceList[index].id,
|
||||
}]
|
||||
let id = _this.workspace.workspaceList[index].id
|
||||
_this.deleteWorkspace(data)
|
||||
}
|
||||
});
|
||||
},
|
||||
//修改名字
|
||||
putName(index:number,v:string){
|
||||
this.workspace.workspaceList.forEach((v:any )=> {
|
||||
@@ -428,12 +466,12 @@ export default defineComponent({
|
||||
this.workspaceItemName = this.workspace.workspaceList[index].workSpaceName
|
||||
this.workspace.workspaceList[index].putName = true
|
||||
}else if (v == 'delete'){
|
||||
let data = [{
|
||||
id:this.workspace.workspaceList[index].id,
|
||||
}]
|
||||
let id = this.workspace.workspaceList[index].id
|
||||
this.deleteWorkspace(data)
|
||||
|
||||
this.cancelDsign(index)
|
||||
// let data = [{
|
||||
// id:this.workspace.workspaceList[index].id,
|
||||
// }]
|
||||
// let id = this.workspace.workspaceList[index].id
|
||||
// this.deleteWorkspace(data)
|
||||
}else{
|
||||
if(this.workspaceItemName == ''){
|
||||
message.warning('Please enter a workbench name');
|
||||
@@ -442,7 +480,7 @@ export default defineComponent({
|
||||
let data = {
|
||||
workSpaceName:this.workspaceItemName,
|
||||
}
|
||||
this.putWorkspace(data)
|
||||
this.putWorkspace(data,'')
|
||||
this.openType.addWorkspace = false
|
||||
}else{
|
||||
let data:any
|
||||
@@ -452,7 +490,7 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
data.workSpaceName = this.workspaceItemName
|
||||
this.putWorkspace(data)
|
||||
this.putWorkspace(data,'')
|
||||
this.workspace.workspaceList[index].workSpaceName = this.workspaceItemName
|
||||
this.workspace.workspaceList[index].putName = false
|
||||
}
|
||||
@@ -499,6 +537,15 @@ export default defineComponent({
|
||||
// this.workspaceItem.mannequinId = item.id
|
||||
// this.workspaceItem.mannequinType = str
|
||||
// this.workspaceItem.mannequinUrl = item.presignedUrl
|
||||
if(this.workspaceItem.sex == 'Female'){
|
||||
this.workspaceItem.femalePresignedUrl = item.presignedUrl
|
||||
this.workspaceItem.mannequinFemaleType = str
|
||||
this.workspaceItem.mannequinFemaleId = item.id
|
||||
}else if(this.workspaceItem.sex == 'Male'){
|
||||
this.workspaceItem.malePresignedUrl = item.presignedUrl
|
||||
this.workspaceItem.mannequinMaleType = str
|
||||
this.workspaceItem.mannequinMaleId = item.id
|
||||
}
|
||||
this.workspaceItem.mannequinUrl = item.presignedUrl
|
||||
this.workspaceItem.mannequinType = str
|
||||
this.workspaceItem.mannequinId = item.id
|
||||
|
||||
Reference in New Issue
Block a user