diff --git a/src/component/Detail/habit.vue b/src/component/Detail/habit.vue index 50dda54a..70978f8c 100644 --- a/src/component/Detail/habit.vue +++ b/src/component/Detail/habit.vue @@ -173,7 +173,7 @@ export default defineComponent({ setup(){ const store = useStore(); let workspaceItem:any = ref({ - id:'', + id:-1, id_:1, workSpaceName:"工作台1", putName:false, @@ -457,7 +457,7 @@ export default defineComponent({ v.overallSingle = true } v.putName = false - if(v.id == (this.workspaceItem.id?this.workspaceItem.id:rv.id)){ + if(v.id == (this.workspaceItem.id == -1 ?rv.id:this.workspaceItem.id)){ this.workspaceItem = v this.setMannequinsSex() this.setPosition('') @@ -501,6 +501,9 @@ export default defineComponent({ }, putWorkspace(data:any,index:any){//修改workspace + if(this.workspaceItem.id == -1){ + return + } Https.axiosPost(Https.httpUrls.workspacesaveOrUpdate,data).then((rv: any) => { if (rv) { if(index){