[update] 53537
This commit is contained in:
@@ -172,10 +172,10 @@
|
|||||||
<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
|
<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
|
||||||
|
|
||||||
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
||||||
<a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"
|
<!-- <a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"-->
|
||||||
:cancelText="$t('cancel')">
|
<!-- :cancelText="$t('cancel')">-->
|
||||||
<a-button style="margin-right: .8rem">{{$t('cancel')}}</a-button>
|
<a-button style="margin-right: .8rem" @click="handleSubmit">{{$t('cancel')}}</a-button>
|
||||||
</a-popconfirm>
|
<!-- </a-popconfirm>-->
|
||||||
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
|
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
@@ -457,59 +457,60 @@
|
|||||||
},
|
},
|
||||||
moment,
|
moment,
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
|
this.close()
|
||||||
const that = this
|
// this.confirmLoading = false
|
||||||
// 触发表单验证
|
// const that = this
|
||||||
this.form.validateFields((err, values) => {
|
// // 触发表单验证
|
||||||
if (!err) {
|
// this.form.validateFields((err, values) => {
|
||||||
that.confirmLoading = true
|
// if (!err) {
|
||||||
if (!values.birthday) {
|
// that.confirmLoading = true
|
||||||
values.birthday = ''
|
// if (!values.birthday) {
|
||||||
} else {
|
// values.birthday = ''
|
||||||
values.birthday = values.birthday.format(this.dateFormat)
|
// } else {
|
||||||
}
|
// values.birthday = values.birthday.format(this.dateFormat)
|
||||||
let formData = Object.assign(this.model, values)
|
// }
|
||||||
if (that.fileList != '') {
|
// let formData = Object.assign(this.model, values)
|
||||||
formData.avatar = that.fileList
|
// if (that.fileList != '') {
|
||||||
} else {
|
// formData.avatar = that.fileList
|
||||||
formData.avatar = null
|
// } else {
|
||||||
}
|
// formData.avatar = null
|
||||||
//update-begin-author:taoyan date:2020710 for:多租户配置
|
// }
|
||||||
formData.relTenantIds = this.currentTenant.length > 0 ? this.currentTenant.join(',') : ''
|
// //update-begin-author:taoyan date:2020710 for:多租户配置
|
||||||
//update-end-author:taoyan date:2020710 for:多租户配置
|
// formData.relTenantIds = this.currentTenant.length > 0 ? this.currentTenant.join(',') : ''
|
||||||
formData.selectedroles = this.selectedRole.length > 0 ? this.selectedRole.join(',') : ''
|
// //update-end-author:taoyan date:2020710 for:多租户配置
|
||||||
formData.selecteddeparts = this.userDepartModel.departIdList.length > 0 ? this.userDepartModel.departIdList.join(',') : ''
|
// formData.selectedroles = this.selectedRole.length > 0 ? this.selectedRole.join(',') : ''
|
||||||
formData.userIdentity = this.identity
|
// formData.selecteddeparts = this.userDepartModel.departIdList.length > 0 ? this.userDepartModel.departIdList.join(',') : ''
|
||||||
//如果是上级择传入departIds,否则为空
|
// formData.userIdentity = this.identity
|
||||||
if (this.identity === '2') {
|
// //如果是上级择传入departIds,否则为空
|
||||||
formData.departIds = this.departIds.join(',')
|
// if (this.identity === '2') {
|
||||||
} else {
|
// formData.departIds = this.departIds.join(',')
|
||||||
formData.departIds = ''
|
// } else {
|
||||||
}
|
// formData.departIds = ''
|
||||||
// that.addDepartsToUser(that,formData); // 调用根据当前用户添加部门信息的方法
|
// }
|
||||||
let obj
|
// // that.addDepartsToUser(that,formData); // 调用根据当前用户添加部门信息的方法
|
||||||
if (!this.model.id) {
|
// let obj
|
||||||
formData.id = this.userId
|
// if (!this.model.id) {
|
||||||
obj = addUser(formData)
|
// formData.id = this.userId
|
||||||
} else {
|
// obj = addUser(formData)
|
||||||
obj = editUser(formData)
|
// } else {
|
||||||
}
|
// obj = editUser(formData)
|
||||||
obj.then((res) => {
|
// }
|
||||||
if (res.success) {
|
// obj.then((res) => {
|
||||||
that.$message.success(res.message)
|
// if (res.success) {
|
||||||
that.$emit('ok')
|
// that.$message.success(res.message)
|
||||||
} else {
|
// that.$emit('ok')
|
||||||
that.$message.warning(res.message)
|
// } else {
|
||||||
}
|
// that.$message.warning(res.message)
|
||||||
}).finally(() => {
|
// }
|
||||||
that.confirmLoading = false
|
// }).finally(() => {
|
||||||
that.checkedDepartNames = []
|
// that.confirmLoading = false
|
||||||
that.userDepartModel.departIdList = { userId: '', departIdList: [] }
|
// that.checkedDepartNames = []
|
||||||
that.close()
|
// that.userDepartModel.departIdList = { userId: '', departIdList: [] }
|
||||||
})
|
// that.close()
|
||||||
|
// })
|
||||||
}
|
//
|
||||||
})
|
// }
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.close()
|
this.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user