feat:角色回显和角色修改,首页navbar下dropdown样式问题调整

This commit is contained in:
有来技术
2021-12-24 00:21:13 +08:00
parent 677feb8a4d
commit 5d6aa9a09d
4 changed files with 32 additions and 36 deletions

View File

@@ -290,13 +290,14 @@ function submitForm() {
const form = unref(dataForm)
form.validate((valid: any) => {
if (valid) {
// 接口权限和按钮权限必其一
// 接口权限和按钮权限必其一
console.log(state.urlPerm.requestPath, state.formData.btnPerm)
if (!(state.urlPerm.requestPath || state.formData.btnPerm)) {
ElMessage.warning('请至少填写一种权限')
return false
}
// 如果填写了URL权限完整性校验
if (!state.urlPerm.requestPath) {
if (!state.urlPerm.requestMethod) {
ElMessage.warning('URL权限的请求方式不能为空')
@@ -306,11 +307,10 @@ function submitForm() {
ElMessage.warning('URL权限的所属服务不能为空')
return false
}
state.formData.urlPerm = state.urlPerm.requestMethod + ':/' + state.urlPerm.serviceName + state.urlPerm.requestPath;
}
state.formData.urlPerm = state.urlPerm.requestMethod + ':/' + state.urlPerm.serviceName + state.urlPerm.requestPath;
state.formData.menuId = props.menuId
if (state.formData.id) {
updatePerm(state.formData.id, state.formData).then(response => {
ElMessage.success('修改成功')