社区管理

This commit is contained in:
liuye
2022-09-28 10:34:16 +08:00
parent 9d3117fa4d
commit 37b7e1b78a

View File

@@ -149,11 +149,6 @@ export default {
}, },
methods: { methods: {
submit(status) { submit(status) {
this.$confirm(status == 2 ? '确认解除管理该记录' : '确认保存该记录').then(() => {
this.confirmSubmit(status)
})
},
confirmSubmit(status) {
if(this.form.homeStatus === '') { if(this.form.homeStatus === '') {
return this.$u.toast('请选择居家状态') return this.$u.toast('请选择居家状态')
} }
@@ -175,6 +170,12 @@ export default {
if( !this.form.fileList.length) { if( !this.form.fileList.length) {
return this.$u.toast('请上传图片') return this.$u.toast('请上传图片')
} }
this.$confirm(status == 2 ? '确认解除管理该记录' : '确认保存该记录').then(() => {
this.confirmSubmit(status)
})
},
confirmSubmit(status) {
this.form.status = status this.form.status = status
this.form.id = this.id this.form.id = this.id
@@ -192,20 +193,16 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.form = {...res.data} this.form = {...res.data}
this.form.controllerList = [] this.form.controllerList = []
var info = {} if(!this.form.controllerUserName) {
if(this.form.controllerUserName) { this.form.controllerUserName = this.user.name
info = { this.form.controllerUserId = this.user.id
this.form.controllerUserPhone = this.user.phone
}
var info = {
name: this.form.controllerUserName, name: this.form.controllerUserName,
id: this.form.controllerUserId, id: this.form.controllerUserId,
mobile: this.form.controllerUserPhone mobile: this.form.controllerUserPhone
} }
}else {
info = {
name: this.user.name,
id: this.user.id,
mobile: this.user.phone
}
}
this.form.controllerList.push(info) this.form.controllerList.push(info)
if(this.form.homeStatus === null) { if(this.form.homeStatus === null) {
this.form.homeStatus = '' this.form.homeStatus = ''