diff --git a/admin/src/api/role.js b/admin/src/api/role.js index b1df07a9..34bba793 100644 --- a/admin/src/api/role.js +++ b/admin/src/api/role.js @@ -27,7 +27,7 @@ export function delRole(pram) { export function getInfo(pram) { const data = { - id: pram.id + ids: pram.id } return request({ url: '/admin/system/role/info', diff --git a/admin/src/api/roleApi.js b/admin/src/api/roleApi.js index 7449b9b0..a04f7cdd 100644 --- a/admin/src/api/roleApi.js +++ b/admin/src/api/roleApi.js @@ -1,7 +1,7 @@ import request from '@/utils/request' export function getRoleById(pram) { - const data = { id: pram.id } + const data = { ids: pram.roles } return request({ url: '/admin/system/role/info', method: 'GET', diff --git a/admin/src/components/echarts/index.vue b/admin/src/components/echarts/index.vue index 1beefefc..f080758c 100644 --- a/admin/src/components/echarts/index.vue +++ b/admin/src/components/echarts/index.vue @@ -66,7 +66,6 @@ handleSetVisitChart() { this.myChart = echarts.init(document.getElementById(this.echarts)) let option = null - console.log(this.echartsTitle) if (this.echartsTitle === 'circle') { option = { tooltip: { diff --git a/admin/src/store/modules/user.js b/admin/src/store/modules/user.js index cb515fc2..cad98b7a 100644 --- a/admin/src/store/modules/user.js +++ b/admin/src/store/modules/user.js @@ -79,13 +79,12 @@ const actions = { reject('getInfo: roles must be a non-null array!') } - // commit('SET_ROLES', roles) - commit('SET_ROLES', ['admin']) + commit('SET_ROLES', roles) + // commit('SET_ROLES', ['admin']) commit('SET_NAME', account) // commit('SET_AVATAR', avatar) commit('SET_AVATAR', 'http://kaifa.crmeb.net/system/images/admin_logo.png') commit('SET_INTRODUCTION', 'CRMEB admin') - data.roles = 'admin' resolve(data) }).catch(error => { reject(error) diff --git a/admin/src/views/systemSetting/administratorAuthority/adminList/index.vue b/admin/src/views/systemSetting/administratorAuthority/adminList/index.vue index d4e3d088..4c8a7716 100644 --- a/admin/src/views/systemSetting/administratorAuthority/adminList/index.vue +++ b/admin/src/views/systemSetting/administratorAuthority/adminList/index.vue @@ -12,16 +12,6 @@ /> - - - - - @@ -129,7 +119,6 @@ export default { listPram: { account: null, addTime: null, - isDel: null, // false=正常,true=已删除,数据库逻辑删除 lastIp: null, lastTime: null, level: null, diff --git a/crmeb/src/main/java/com/zbkj/crmeb/system/controller/SystemRoleController.java b/crmeb/src/main/java/com/zbkj/crmeb/system/controller/SystemRoleController.java index 4287e9c9..bf518cbf 100644 --- a/crmeb/src/main/java/com/zbkj/crmeb/system/controller/SystemRoleController.java +++ b/crmeb/src/main/java/com/zbkj/crmeb/system/controller/SystemRoleController.java @@ -3,6 +3,7 @@ package com.zbkj.crmeb.system.controller; import com.common.CommonPage; import com.common.CommonResult; import com.common.PageParamRequest; +import com.utils.CrmebUtil; import com.zbkj.crmeb.category.vo.CategoryTreeVo; import com.zbkj.crmeb.system.model.SystemRole; import com.zbkj.crmeb.system.request.SystemRoleRequest; @@ -112,14 +113,15 @@ public class SystemRoleController { /** * 查询身份管理表信息 - * @param id Integer + * @param ids String * @author Mr.Zhang * @since 2020-04-18 */ @ApiOperation(value = "详情") @RequestMapping(value = "/info", method = RequestMethod.GET) - public CommonResult info(@RequestParam(value = "id") Integer id){ - SystemRole systemRole = systemRoleService.getById(id); + public CommonResult> info(@RequestParam(value = "ids") String ids){ +// SystemRole systemRole = systemRoleService.getById(CrmebUtil.stringToArray(ids)); + List systemRole = systemRoleService.getListInIds(CrmebUtil.stringToArray(ids)); return CommonResult.success(systemRole); } diff --git a/crmeb/src/main/java/com/zbkj/crmeb/system/response/SystemAdminResponse.java b/crmeb/src/main/java/com/zbkj/crmeb/system/response/SystemAdminResponse.java index b6b3d96c..d9b18eaf 100644 --- a/crmeb/src/main/java/com/zbkj/crmeb/system/response/SystemAdminResponse.java +++ b/crmeb/src/main/java/com/zbkj/crmeb/system/response/SystemAdminResponse.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.util.Date; /** * @author stivepeim @@ -30,7 +31,7 @@ public class SystemAdminResponse implements Serializable { private String lastIp; - private Integer lastTime; + private Date lastTime; private Integer addTime; diff --git a/crmeb/src/main/java/com/zbkj/crmeb/system/service/SystemRoleService.java b/crmeb/src/main/java/com/zbkj/crmeb/system/service/SystemRoleService.java index 45bec963..c100f438 100644 --- a/crmeb/src/main/java/com/zbkj/crmeb/system/service/SystemRoleService.java +++ b/crmeb/src/main/java/com/zbkj/crmeb/system/service/SystemRoleService.java @@ -17,6 +17,13 @@ public interface SystemRoleService extends IService { List getList(SystemRoleSearchRequest request, PageParamRequest pageParamRequest); + /** + * 根据id集合获取对应权限列表 + * @param ids id集合 + * @return 对应的权限列表 + */ + List getListInIds(List ids); + Boolean checkAuth(String uri); List menu(); diff --git a/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemAdminServiceImpl.java b/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemAdminServiceImpl.java index 07985ffa..b53f77c7 100644 --- a/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemAdminServiceImpl.java +++ b/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemAdminServiceImpl.java @@ -93,6 +93,7 @@ public class SystemAdminServiceImpl extends ServiceImpl roleIds = CrmebUtil.stringToArrayInt(admin.getRoles()); List roleNames = new ArrayList<>(); diff --git a/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemRoleServiceImpl.java b/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemRoleServiceImpl.java index 83810311..58374be4 100644 --- a/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemRoleServiceImpl.java +++ b/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemRoleServiceImpl.java @@ -63,6 +63,18 @@ public class SystemRoleServiceImpl extends ServiceImpl getListInIds(List ids) { +// LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); +// lqw.in(SystemRole::getId, ids); + return dao.selectBatchIds(ids); + } + /** * 检测是否有访问菜单接口取的权限 * @param uri String 请求参数