优化代码

This commit is contained in:
RuoYi
2026-01-28 13:08:39 +08:00
parent 5cb67df134
commit 837ecf26bf
23 changed files with 127 additions and 130 deletions

View File

@@ -95,7 +95,7 @@ function close() {
function submitForm() {
const userId = form.value.userId
const rIds = roleIds.value.join(",")
updateAuthRole({ userId: userId, roleIds: rIds }).then(response => {
updateAuthRole({ userId: userId, roleIds: rIds }).then(() => {
proxy.$modal.msgSuccess("授权成功")
close()
})

View File

@@ -199,7 +199,7 @@
<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
</div>
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link>
<el-link type="primary" underline="never" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link>
</div>
</template>
</el-upload>
@@ -415,7 +415,7 @@ function handleResetPwd(row) {
}
},
}).then(({ value }) => {
resetUserPwd(row.userId, value).then(response => {
resetUserPwd(row.userId, value).then(() => {
proxy.$modal.msgSuccess("修改成功,新密码是:" + value)
})
}).catch(() => {})
@@ -524,7 +524,7 @@ function handleUpdate(row) {
form.value.roleIds = response.roleIds
open.value = true
title.value = "修改用户"
form.password = ""
form.value.password = ""
})
}
@@ -533,13 +533,13 @@ function submitForm() {
proxy.$refs["userRef"].validate(valid => {
if (valid) {
if (form.value.userId != undefined) {
updateUser(form.value).then(response => {
updateUser(form.value).then(() => {
proxy.$modal.msgSuccess("修改成功")
open.value = false
getList()
})
} else {
addUser(form.value).then(response => {
addUser(form.value).then(() => {
proxy.$modal.msgSuccess("新增成功")
open.value = false
getList()

View File

@@ -45,7 +45,7 @@ const rules = ref({
function submit() {
proxy.$refs.pwdRef.validate(valid => {
if (valid) {
updateUserPwd(user.oldPassword, user.newPassword).then(response => {
updateUserPwd(user.oldPassword, user.newPassword).then(() => {
proxy.$modal.msgSuccess("修改成功")
})
}

View File

@@ -44,7 +44,7 @@ const rules = ref({
function submit() {
proxy.$refs.userRef.validate(valid => {
if (valid) {
updateUserProfile(form.value).then(response => {
updateUserProfile(form.value).then(() => {
proxy.$modal.msgSuccess("修改成功")
props.user.phonenumber = form.value.phonenumber
props.user.email = form.value.email