优化代码
This commit is contained in:
@@ -512,14 +512,14 @@ function submitForm() {
|
||||
if (valid) {
|
||||
if (form.value.roleId != undefined) {
|
||||
form.value.menuIds = getMenuAllCheckedKeys()
|
||||
updateRole(form.value).then(response => {
|
||||
updateRole(form.value).then(() => {
|
||||
proxy.$modal.msgSuccess("修改成功")
|
||||
open.value = false
|
||||
getList()
|
||||
})
|
||||
} else {
|
||||
form.value.menuIds = getMenuAllCheckedKeys()
|
||||
addRole(form.value).then(response => {
|
||||
addRole(form.value).then(() => {
|
||||
proxy.$modal.msgSuccess("新增成功")
|
||||
open.value = false
|
||||
getList()
|
||||
@@ -566,7 +566,7 @@ function handleDataScope(row) {
|
||||
function submitDataScope() {
|
||||
if (form.value.roleId != undefined) {
|
||||
form.value.deptIds = getDeptAllCheckedKeys()
|
||||
dataScope(form.value).then(response => {
|
||||
dataScope(form.value).then(() => {
|
||||
proxy.$modal.msgSuccess("修改成功")
|
||||
openDataScope.value = false
|
||||
getList()
|
||||
|
||||
Reference in New Issue
Block a user