mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	1. 完成 Role 简单的 CRUD 的迁移
This commit is contained in:
		| @@ -3,7 +3,7 @@ import request from '@/utils/request' | ||||
| // 查询角色列表 | ||||
| export function listRole(query) { | ||||
|   return request({ | ||||
|     url: '/system/role/list', | ||||
|     url: '/system/role/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| @@ -12,7 +12,7 @@ export function listRole(query) { | ||||
| // 查询角色详细 | ||||
| export function getRole(roleId) { | ||||
|   return request({ | ||||
|     url: '/system/role/' + roleId, | ||||
|     url: '/system/role/get?id=' + roleId, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -20,7 +20,7 @@ export function getRole(roleId) { | ||||
| // 新增角色 | ||||
| export function addRole(data) { | ||||
|   return request({ | ||||
|     url: '/system/role', | ||||
|     url: '/system/role/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| @@ -29,8 +29,8 @@ export function addRole(data) { | ||||
| // 修改角色 | ||||
| export function updateRole(data) { | ||||
|   return request({ | ||||
|     url: '/system/role', | ||||
|     method: 'put', | ||||
|     url: '/system/role/update', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| @@ -45,14 +45,14 @@ export function dataScope(data) { | ||||
| } | ||||
|  | ||||
| // 角色状态修改 | ||||
| export function changeRoleStatus(roleId, status) { | ||||
| export function changeRoleStatus(id, status) { | ||||
|   const data = { | ||||
|     roleId, | ||||
|     id, | ||||
|     status | ||||
|   } | ||||
|   return request({ | ||||
|     url: '/system/role/changeStatus', | ||||
|     method: 'put', | ||||
|     url: '/system/role/update-status', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| @@ -60,8 +60,8 @@ export function changeRoleStatus(roleId, status) { | ||||
| // 删除角色 | ||||
| export function delRole(roleId) { | ||||
|   return request({ | ||||
|     url: '/system/role/' + roleId, | ||||
|     method: 'delete' | ||||
|     url: '/system/role/delete?id=' + roleId, | ||||
|     method: 'post' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| @@ -72,4 +72,4 @@ export function exportRole(query) { | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV