forked from github/dataease
perf(用户管理): 编辑页面保存时增加页面遮罩
This commit is contained in:
parent
ad645717e5
commit
d9b664f86d
@ -35,6 +35,7 @@ export const addUser = (data) => {
|
||||
return request({
|
||||
url: pathMap.createPath,
|
||||
method: 'post',
|
||||
loading: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading="loading"
|
||||
:title="formType == 'add' ? $t('user.create') : $t('user.modify')"
|
||||
:visible.sync="dialogVisible"
|
||||
class="user-editer-form"
|
||||
@ -229,6 +230,7 @@ import { pluginLoaded, defaultPwd, wecomStatus, dingtalkStatus, larkStatus } fro
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label',
|
||||
@ -553,12 +555,13 @@ export default {
|
||||
save() {
|
||||
this.$refs.createUserForm.validate((valid) => {
|
||||
if (valid) {
|
||||
// !this.form.deptId && (this.form.deptId = 0)
|
||||
this.loading = true
|
||||
const method = this.formType === 'add' ? addUser : editUser
|
||||
method(this.form).then((res) => {
|
||||
this.$success(this.$t('commons.save_success'))
|
||||
this.reset()
|
||||
this.$emit('saved')
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user