diff --git a/src/api/menu.js b/src/api/menu.js index 9b64f2d3318aea037ee1c8f0ac8fa4e8abef9056..11aad8d336b387bd402254cac040a217db838ed9 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -1,4 +1,4 @@ -import { delReq, getReq, postReq } from '@/utils'; +import { delReq, getReq, postReq, putReq } from '@/utils'; export function delMenuApi(id) { return delReq(`/api/v1/menus/${id}`); @@ -15,3 +15,6 @@ export function addMenuApi(data) { export function addRoleApi(data) { return postReq('/api/v1/roles', data); } +export function updateRoleApi(data) { + return putReq('/api/v1/roles', data); +} diff --git a/src/components/FormMixin/index.js b/src/components/FormMixin/index.js index cb43e98877977485a7ee537778533d9b57e9bd19..ec20166fb3688043843852578f4033257b8bcec6 100644 --- a/src/components/FormMixin/index.js +++ b/src/components/FormMixin/index.js @@ -27,7 +27,7 @@ export default { } }, setData(data, type) { - this.form = data; + this.form = { ...data }; this.type = type; }, }, diff --git a/src/pages/system/view/role/RoleManagement.vue b/src/pages/system/view/role/RoleManagement.vue index 3c1ab42c8e636c4a1469db74634b30b1bf9254cc..012b63a8ae352baac8d5db29d1fe03876f1446e5 100644 --- a/src/pages/system/view/role/RoleManagement.vue +++ b/src/pages/system/view/role/RoleManagement.vue @@ -3,9 +3,9 @@ - - - + + +