Commit 6f0c2943c7c68b55cf08df24abfce04024f99a62

Authored by YunaiV
1 parent e6142b53

完善 bpm 的权限~

yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/definition/BpmProcessDefinitionController.java
... ... @@ -32,11 +32,9 @@ public class BpmProcessDefinitionController {
32 32 @Resource
33 33 private BpmProcessDefinitionService bpmDefinitionService;
34 34  
35   - // TODO 芋艿:权限相关
36   -
37 35 @GetMapping ("/page")
38 36 @ApiOperation(value = "获得流程定义分页")
39   - @PreAuthorize("@ss.hasPermission('bpm:model:query')") // 暂时使用 model 的权限标识
  37 + @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
40 38 public CommonResult<PageResult<BpmProcessDefinitionPageItemRespVO>> getProcessDefinitionPage(
41 39 BpmProcessDefinitionPageReqVO pageReqVO) {
42 40 return success(bpmDefinitionService.getProcessDefinitionPage(pageReqVO));
... ... @@ -44,6 +42,7 @@ public class BpmProcessDefinitionController {
44 42  
45 43 @GetMapping ("/list")
46 44 @ApiOperation(value = "获得流程定义列表")
  45 + @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
47 46 public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList(
48 47 BpmProcessDefinitionListReqVO listReqVO) {
49 48 return success(bpmDefinitionService.getProcessDefinitionList(listReqVO));
... ... @@ -52,7 +51,7 @@ public class BpmProcessDefinitionController {
52 51 @GetMapping ("/get-bpmn-xml")
53 52 @ApiOperation(value = "获得流程定义的 BPMN XML")
54 53 @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class)
55   - @PreAuthorize("@ss.hasPermission('bpm:model:query')") // 暂时使用 model 的权限标识
  54 + @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
56 55 public CommonResult<String> getProcessDefinitionBpmnXML(@RequestParam("id") String id) {
57 56 String bpmnXML = bpmDefinitionService.getProcessDefinitionBpmnXML(id);
58 57 return success(bpmnXML);
... ...
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/definition/BpmTaskAssignRuleController.java
... ... @@ -6,6 +6,10 @@ import cn.iocoder.yudao.adminserver.modules.bpm.controller.definition.vo.rule.Bp
6 6 import cn.iocoder.yudao.adminserver.modules.bpm.service.definition.BpmTaskAssignRuleService;
7 7 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
8 8 import io.swagger.annotations.Api;
  9 +import io.swagger.annotations.ApiImplicitParam;
  10 +import io.swagger.annotations.ApiImplicitParams;
  11 +import io.swagger.annotations.ApiOperation;
  12 +import org.springframework.security.access.prepost.PreAuthorize;
9 13 import org.springframework.validation.annotation.Validated;
10 14 import org.springframework.web.bind.annotation.*;
11 15  
... ... @@ -25,6 +29,12 @@ public class BpmTaskAssignRuleController {
25 29 private BpmTaskAssignRuleService taskAssignRuleService;
26 30  
27 31 @GetMapping("/list")
  32 + @ApiOperation(value = "获得任务分配规则列表")
  33 + @ApiImplicitParams({
  34 + @ApiImplicitParam(name = "modelId", value = "模型编号", example = "1024", dataTypeClass = String.class),
  35 + @ApiImplicitParam(name = "processDefinitionId", value = "刘晨定义的编号", example = "2048", dataTypeClass = String.class)
  36 + })
  37 + @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:query')")
28 38 public CommonResult<List<BpmTaskAssignRuleRespVO>> getTaskAssignRuleList(
29 39 @RequestParam(value = "modelId", required = false) String modelId,
30 40 @RequestParam(value = "processDefinitionId", required = false) String processDefinitionId) {
... ... @@ -32,11 +42,15 @@ public class BpmTaskAssignRuleController {
32 42 }
33 43  
34 44 @PostMapping("/create")
  45 + @ApiOperation(value = "创建任务分配规则")
  46 + @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:create')")
35 47 public CommonResult<Long> createTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleCreateReqVO reqVO) {
36 48 return success(taskAssignRuleService.createTaskAssignRule(reqVO));
37 49 }
38 50  
39 51 @PutMapping("/update")
  52 + @ApiOperation(value = "更新任务分配规则")
  53 + @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:update')")
40 54 public CommonResult<Boolean> updateTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleUpdateReqVO reqVO) {
41 55 taskAssignRuleService.updateTaskAssignRule(reqVO);
42 56 return success(true);
... ...
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/BpmOALeaveController.java
... ... @@ -11,6 +11,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
11 11 import io.swagger.annotations.Api;
12 12 import io.swagger.annotations.ApiImplicitParam;
13 13 import io.swagger.annotations.ApiOperation;
  14 +import org.springframework.security.access.prepost.PreAuthorize;
14 15 import org.springframework.validation.annotation.Validated;
15 16 import org.springframework.web.bind.annotation.*;
16 17  
... ... @@ -35,15 +36,15 @@ public class BpmOALeaveController {
35 36 @Resource
36 37 private BpmOALeaveService leaveService;
37 38  
38   - // TODO @芋艿:权限
39   -
40 39 @PostMapping("/create")
  40 + @PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')")
41 41 @ApiOperation("创建请求申请")
42 42 public CommonResult<Long> createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) {
43 43 return success(leaveService.createLeave(getLoginUserId(), createReqVO));
44 44 }
45 45  
46 46 @GetMapping("/get")
  47 + @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')")
47 48 @ApiOperation("获得请假申请")
48 49 @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
49 50 public CommonResult<BpmOALeaveRespVO> getLeave(@RequestParam("id") Long id) {
... ... @@ -52,6 +53,7 @@ public class BpmOALeaveController {
52 53 }
53 54  
54 55 @GetMapping("/page")
  56 + @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')")
55 57 @ApiOperation("获得请假申请分页")
56 58 public CommonResult<PageResult<BpmOALeaveRespVO>> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) {
57 59 PageResult<BpmOALeaveDO> pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO);
... ...
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/task/BpmActivityController.java
... ... @@ -8,6 +8,7 @@ import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
8 8 import io.swagger.annotations.Api;
9 9 import io.swagger.annotations.ApiImplicitParam;
10 10 import io.swagger.annotations.ApiOperation;
  11 +import org.springframework.security.access.prepost.PreAuthorize;
11 12 import org.springframework.validation.annotation.Validated;
12 13 import org.springframework.web.bind.annotation.GetMapping;
13 14 import org.springframework.web.bind.annotation.RequestMapping;
... ... @@ -30,12 +31,11 @@ public class BpmActivityController {
30 31 @Resource
31 32 private BpmActivityService activityService;
32 33  
33   - // TODO 芋艿:权限
34   -
35 34 @GetMapping("/list")
36 35 @ApiOperation(value = "生成指定流程实例的高亮流程图",
37 36 notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成")
38 37 @ApiImplicitParam(name = "id", value = "流程实例的编号", required = true, dataTypeClass = String.class)
  38 + @PreAuthorize("@ss.hasPermission('bpm:task:query')")
39 39 public CommonResult<List<BpmActivityRespVO>> getActivityList(
40 40 @RequestParam("processInstanceId") String processInstanceId) {
41 41 return success(activityService.getActivityListByProcessInstanceId(processInstanceId));
... ... @@ -45,6 +45,7 @@ public class BpmActivityController {
45 45 @ApiOperation(value = "生成指定流程实例的高亮流程图",
46 46 notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成")
47 47 @ApiImplicitParam(name = "id", value = "流程实例的编号", required = true, dataTypeClass = String.class)
  48 + @PreAuthorize("@ss.hasPermission('bpm:task:query')")
48 49 public void generateHighlightDiagram(@RequestParam("processInstanceId") String processInstanceId,
49 50 HttpServletResponse response) throws IOException {
50 51 byte[] bytes = activityService.generateHighlightDiagram(processInstanceId);
... ...
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/task/BpmProcessInstanceController.java
... ... @@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
7 7 import io.swagger.annotations.Api;
8 8 import io.swagger.annotations.ApiImplicitParam;
9 9 import io.swagger.annotations.ApiOperation;
  10 +import org.springframework.security.access.prepost.PreAuthorize;
10 11 import org.springframework.validation.annotation.Validated;
11 12 import org.springframework.web.bind.annotation.*;
12 13  
... ... @@ -24,17 +25,17 @@ public class BpmProcessInstanceController {
24 25  
25 26 @Resource
26 27 private BpmProcessInstanceService processInstanceService;
27   -
28   - // TODO 芋艿:权限
29   -
  28 +
30 29 @PostMapping("/create")
31 30 @ApiOperation("新建流程实例")
  31 + @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
32 32 public CommonResult<String> createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) {
33 33 return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO));
34 34 }
35 35  
36 36 @DeleteMapping("/cancel")
37 37 @ApiOperation(value = "取消流程实例", notes = "撤回发起的流程")
  38 + @PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')")
38 39 public CommonResult<Boolean> cancelProcessInstance(@Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) {
39 40 processInstanceService.cancelProcessInstance(getLoginUserId(), cancelReqVO);
40 41 return success(true);
... ... @@ -42,6 +43,7 @@ public class BpmProcessInstanceController {
42 43  
43 44 @GetMapping("/my-page")
44 45 @ApiOperation(value = "获得我的实例分页列表", notes = "在【我的流程】菜单中,进行调用")
  46 + @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
45 47 public CommonResult<PageResult<BpmProcessInstancePageItemRespVO>> getMyProcessInstancePage(
46 48 @Valid BpmProcessInstanceMyPageReqVO pageReqVO) {
47 49 return success(processInstanceService.getMyProcessInstancePage(getLoginUserId(), pageReqVO));
... ... @@ -50,6 +52,7 @@ public class BpmProcessInstanceController {
50 52 @GetMapping("/get")
51 53 @ApiOperation(value = "获得指定流程实例", notes = "在【流程详细】界面中,进行调用")
52 54 @ApiImplicitParam(name = "id", value = "流程实例的编号", required = true, dataTypeClass = String.class)
  55 + @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
53 56 public CommonResult<BpmProcessInstanceRespVO> getProcessInstance(@RequestParam("id") String id) {
54 57 return success(processInstanceService.getProcessInstanceVO(id));
55 58 }
... ...
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/task/BpmTaskController.java
... ... @@ -8,6 +8,7 @@ import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
8 8 import io.swagger.annotations.Api;
9 9 import io.swagger.annotations.ApiImplicitParam;
10 10 import io.swagger.annotations.ApiOperation;
  11 +import org.springframework.security.access.prepost.PreAuthorize;
11 12 import org.springframework.validation.annotation.Validated;
12 13 import org.springframework.web.bind.annotation.*;
13 14  
... ... @@ -29,22 +30,23 @@ public class BpmTaskController {
29 30 @Resource
30 31 private BpmTaskService taskService;
31 32  
32   - // TODO 芋艿:权限、validation;
33   -
34 33 @GetMapping("todo-page")
35 34 @ApiOperation("获取 Todo 待办任务分页")
  35 + @PreAuthorize("@ss.hasPermission('bpm:task:query')")
36 36 public CommonResult<PageResult<BpmTaskTodoPageItemRespVO>> getTodoTaskPage(@Valid BpmTaskTodoPageReqVO pageVO) {
37 37 return success(taskService.getTodoTaskPage(getLoginUserId(), pageVO));
38 38 }
39 39  
40 40 @GetMapping("done-page")
41 41 @ApiOperation("获取 Done 已办任务分页")
  42 + @PreAuthorize("@ss.hasPermission('bpm:task:query')")
42 43 public CommonResult<PageResult<BpmTaskDonePageItemRespVO>> getTodoTaskPage(@Valid BpmTaskDonePageReqVO pageVO) {
43 44 return success(taskService.getDoneTaskPage(getLoginUserId(), pageVO));
44 45 }
45 46  
46 47 @PutMapping("/approve")
47 48 @ApiOperation("通过任务")
  49 + @PreAuthorize("@ss.hasPermission('bpm:task:update')")
48 50 public CommonResult<Boolean> approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
49 51 taskService.approveTask(getLoginUserId(), reqVO);
50 52 return success(true);
... ... @@ -52,6 +54,7 @@ public class BpmTaskController {
52 54  
53 55 @PutMapping("/reject")
54 56 @ApiOperation("不通过任务")
  57 + @PreAuthorize("@ss.hasPermission('bpm:task:update')")
55 58 public CommonResult<Boolean> rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) {
56 59 taskService.rejectTask(getLoginUserId(), reqVO);
57 60 return success(true);
... ... @@ -59,6 +62,7 @@ public class BpmTaskController {
59 62  
60 63 @PutMapping("/update-assignee")
61 64 @ApiOperation(value = "更新任务的负责人", notes = "用于【流程详情】的【转派】按钮")
  65 + @PreAuthorize("@ss.hasPermission('bpm:task:update')")
62 66 public CommonResult<Boolean> updateTaskAssignee(@Valid @RequestBody BpmTaskUpdateAssigneeReqVO reqVO) {
63 67 taskService.updateTaskAssignee(getLoginUserId(), reqVO);
64 68 return success(true);
... ... @@ -67,6 +71,7 @@ public class BpmTaskController {
67 71 @GetMapping("/list-by-process-instance-id")
68 72 @ApiOperation(value = "获得指定流程实例的任务列表", notes = "包括完成的、未完成的")
69 73 @ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class)
  74 + @PreAuthorize("@ss.hasPermission('bpm:task:query')")
70 75 public CommonResult<List<BpmTaskRespVO>> getTaskListByProcessInstanceId(
71 76 @RequestParam("processInstanceId") String processInstanceId) {
72 77 return success(taskService.getTaskListByProcessInstanceId(processInstanceId));
... ...
yudao-admin-ui/src/router/index.js
... ... @@ -60,149 +60,112 @@ export const constantRoutes = [
60 60 path: '',
61 61 component: Layout,
62 62 redirect: 'index',
63   - children: [
64   - {
  63 + children: [{
65 64 path: 'index',
66 65 component: (resolve) => require(['@/views/index'], resolve),
67 66 name: '首页',
68   - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
  67 + meta: {title: '首页', icon: 'dashboard', noCache: true, affix: true}
69 68 }
70 69 ]
71   - },
72   - {
  70 + }, {
73 71 path: '/user',
74 72 component: Layout,
75 73 hidden: true,
76 74 redirect: 'noredirect',
77   - children: [
78   - {
  75 + children: [{
79 76 path: 'profile',
80 77 component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
81 78 name: 'Profile',
82   - meta: { title: '个人中心', icon: 'user' }
  79 + meta: {title: '个人中心', icon: 'user'}
83 80 }
84 81 ]
85   - },
86   - {
  82 + }, {
87 83 path: '/dict',
88 84 component: Layout,
89 85 hidden: true,
90   - children: [
91   - {
  86 + children: [{
92 87 path: 'type/data/:dictId(\\d+)',
93 88 component: (resolve) => require(['@/views/system/dict/data'], resolve),
94 89 name: 'Data',
95   - meta: { title: '字典数据', icon: '' }
  90 + meta: {title: '字典数据', icon: ''}
96 91 }
97 92 ]
98   - },
99   - {
  93 + }, {
100 94 path: '/job',
101 95 component: Layout,
102 96 hidden: true,
103   - children: [
104   - {
  97 + children: [{
105 98 path: 'log',
106 99 component: (resolve) => require(['@/views/infra/job/log'], resolve),
107 100 name: 'JobLog',
108   - meta: { title: '调度日志' }
  101 + meta: {title: '调度日志'}
109 102 }
110 103 ]
111   - },
112   - {
  104 + }, {
113 105 path: '/codegen',
114 106 component: Layout,
115 107 hidden: true,
116   - children: [
117   - {
  108 + children: [{
118 109 path: 'edit/:tableId(\\d+)',
119 110 component: (resolve) => require(['@/views/tool/codegen/editTable'], resolve),
120 111 name: 'GenEdit',
121   - meta: { title: '修改生成配置' }
  112 + meta: {title: '修改生成配置'}
122 113 }
123 114 ]
124   - },
125   - {
  115 + }, {
126 116 path: '/bpm',
127 117 component: Layout,
128 118 hidden: true,
129 119 redirect: 'noredirect',
130   - children: [
131   - {
  120 + children: [{
132 121 path: 'oa/leave/create',
133 122 component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve),
134 123 name: '发起 OA 请假',
135   - meta: { title: '发起 OA 请假', icon: 'form' }
  124 + meta: {title: '发起 OA 请假', icon: 'form'}
136 125 }, {
137 126 path: 'oa/leave/detail',
138 127 component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve),
139 128 name: '查看 OA 请假',
140   - meta: { title: '查看 OA 请假', icon: 'view' }
  129 + meta: {title: '查看 OA 请假', icon: 'view'}
141 130 }
142 131 ]
143   - },
144   - {
  132 + }, {
145 133 path: '/bpm',
146 134 component: Layout,
147 135 hidden: true,
148   - children: [
149   - {
  136 + children: [{
150 137 path: 'manager/form/edit',
151 138 component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve),
152 139 name: '流程表单-编辑',
153   - meta: { title: '流程表单-编辑' }
154   - }
155   - ]
156   - },
157   - {
158   - path: '/bpm',
159   - component: Layout,
160   - hidden: true,
161   - children: [
162   - {
163   - path: 'manager/model/design',
164   - component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
165   - name: '设计流程',
166   - meta: { title: '设计流程' }
167   - }
168   - ]
169   - },
170   - {
171   - path: '/bpm',
172   - component: Layout,
173   - hidden: true,
174   - children: [
175   - {
  140 + meta: {title: '流程表单-编辑'}
  141 + }, {
176 142 path: 'manager/definition',
177 143 component: (resolve) => require(['@/views/bpm/definition/index'], resolve),
178 144 name: '流程定义',
179   - meta: { title: '流程定义' }
180   - }
181   - ]
182   - }, {
183   - path: '/bpm',
184   - component: Layout,
185   - hidden: true,
186   - children: [
187   - {
  145 + meta: {title: '流程定义'}
  146 + }, {
  147 + path: 'manager/model/design',
  148 + component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
  149 + name: '设计流程',
  150 + meta: {title: '设计流程'}
  151 + }, {
188 152 path: 'process-instance/create',
189 153 component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve),
190 154 name: '发起流程',
191   - meta: { title: '发起流程' }
192   - },
193   - {
  155 + meta: {title: '发起流程'}
  156 + }, {
194 157 path: 'process-instance/detail',
195 158 component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve),
196 159 name: '流程详情',
197   - meta: { title: '流程详情' }
  160 + meta: {title: '流程详情'}
198 161 }
199 162 ]
200   - },
  163 + }
201 164 ]
202 165  
203 166 export default new Router({
204 167 base: process.env.VUE_APP_APP_NAME ? process.env.VUE_APP_APP_NAME : "/",
205 168 mode: 'history', // 去掉url中的#
206   - scrollBehavior: () => ({ y: 0 }),
  169 + scrollBehavior: () => ({y: 0}),
207 170 routes: constantRoutes
208 171 })
... ...
yudao-admin-ui/src/views/bpm/definition/index.vue
... ... @@ -46,9 +46,8 @@
46 46 <el-table-column label="定义描述" align="center" prop="description" width="300" show-overflow-tooltip />
47 47 <el-table-column label="操作" align="center" width="150" fixed="right">
48 48 <template slot-scope="scope">
49   - <!-- TODO 权限 -->
50 49 <el-button size="mini" type="text" icon="el-icon-s-custom" @click="handleAssignRule(scope.row)"
51   - v-hasPermi="['bpm:model:update']">分配规则</el-button>
  50 + v-hasPermi="['bpm:task-assign-rule:update']">分配规则</el-button>
52 51 </template>
53 52 </el-table-column>
54 53 </el-table>
... ...
yudao-admin-ui/src/views/bpm/model/index.vue
... ... @@ -91,13 +91,12 @@
91 91 v-hasPermi="['bpm:model:update']">修改流程</el-button>
92 92 <el-button size="mini" type="text" icon="el-icon-setting" @click="handleDesign(scope.row)"
93 93 v-hasPermi="['bpm:model:update']">设计流程</el-button>
94   - <!-- TODO 权限 -->
95 94 <el-button size="mini" type="text" icon="el-icon-s-custom" @click="handleAssignRule(scope.row)"
96   - v-hasPermi="['bpm:model:update']">分配规则</el-button>
  95 + v-hasPermi="['bpm:task-assign-rule:query']">分配规则</el-button>
97 96 <el-button size="mini" type="text" icon="el-icon-thumb" @click="handleDeploy(scope.row)"
98 97 v-hasPermi="['bpm:model:deploy']">发布流程</el-button>
99 98 <el-button size="mini" type="text" icon="el-icon-ice-cream-round" @click="handleDefinitionList(scope.row)"
100   - v-hasPermi="['bpm:model:query']">流程定义</el-button>
  99 + v-hasPermi="['bpm:process-definition:query']">流程定义</el-button>
101 100 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
102 101 v-hasPermi="['bpm:model:delete']">删除</el-button>
103 102 </template>
... ...
yudao-admin-ui/src/views/bpm/oa/leave/index.vue
... ... @@ -30,7 +30,7 @@
30 30 <!-- 操作工具栏 -->
31 31 <el-row :gutter="10" class="mb8">
32 32 <el-col :span="1.5">
33   - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">发起请假</el-button>
  33 + <el-button type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['bpm:oa-leave:create']" @click="handleAdd">发起请假</el-button>
34 34 </el-col>
35 35 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
36 36 </el-row>
... ... @@ -59,8 +59,9 @@
59 59 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
60 60 <template slot-scope="scope">
61 61 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleCancel(scope.row)"
62   - v-if="scope.row.result === 1">取消请假</el-button>
63   - <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)">详情</el-button>
  62 + v-hasPermi="['bpm:oa-leave:create']" v-if="scope.row.result === 1">取消请假</el-button>
  63 + <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)"
  64 + v-hasPermi="['bpm:oa-leave:query']">详情</el-button>
64 65 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleProcessDetail(scope.row)">审批进度</el-button>
65 66 </template>
66 67 </el-table-column>
... ...
yudao-admin-ui/src/views/bpm/processInstance/index.vue
... ... @@ -40,7 +40,8 @@
40 40 <!-- 操作工具栏 -->
41 41 <el-row :gutter="10" class="mb8">
42 42 <el-col :span="1.5">
43   - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">发起流程</el-button>
  43 + <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
  44 + v-hasPermi="['bpm:process-instance:query']">发起流程</el-button>
44 45 </el-col>
45 46 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
46 47 </el-row>
... ... @@ -103,10 +104,10 @@
103 104 </el-table-column>
104 105 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
105 106 <template slot-scope="scope">
106   - <!-- TODO 芋艿:权限 -->
107 107 <el-button type="text" size="small" icon="el-icon-delete" v-if="scope.row.result === 1"
108   - @click="handleCancel(scope.row)">取消</el-button>
109   - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)">详情</el-button>
  108 + v-hasPermi="['bpm:process-instance:cancel']" @click="handleCancel(scope.row)">取消</el-button>
  109 + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)"
  110 + v-hasPermi="['bpm:process-instance:query']">详情</el-button>
110 111 </template>
111 112 </el-table-column>
112 113 </el-table>
... ...
yudao-admin-ui/src/views/bpm/task/done.vue
... ... @@ -56,11 +56,10 @@
56 56 <span>{{ getDateStar(scope.row.durationInMillis) }}</span>
57 57 </template>
58 58 </el-table-column>
59   - <!-- TODO 耗时 -->
60 59 <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
61 60 <template slot-scope="scope">
62   - <!-- TODO 权限、颜色 -->
63   - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleAudit(scope.row)">详情</el-button>
  61 + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleAudit(scope.row)"
  62 + v-hasPermi="['bpm:task:query']">详情</el-button>
64 63 </template>
65 64 </el-table-column>
66 65 </el-table>
... ...
yudao-admin-ui/src/views/bpm/task/todo.vue
... ... @@ -38,10 +38,12 @@
38 38 </el-table-column>
39 39 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
40 40 <template slot-scope="scope">
41   - <!-- TODO 权限、颜色 -->
42   - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleAudit(scope.row)">审批</el-button>
43   - <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.suspensionState === 2">激活</el-button>
44   - <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.suspensionState === 1">挂起</el-button>
  41 + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleAudit(scope.row)"
  42 + v-hasPermi="['bpm:task:update']">审批</el-button>
  43 + <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.suspensionState === 2"
  44 + v-hasPermi="['bpm:task:update']">激活</el-button>
  45 + <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.suspensionState === 1"
  46 + v-hasPermi="['bpm:task:update']">挂起</el-button>
45 47 </template>
46 48 </el-table-column>
47 49 </el-table>
... ...
yudao-admin-ui/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue
... ... @@ -19,9 +19,8 @@
19 19 </el-table-column>
20 20 <el-table-column v-if="modelId" label="操作" align="center" width="80" fixed="right">
21 21 <template slot-scope="scope">
22   - <!-- TODO 权限 -->
23 22 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateTaskAssignRule(scope.row)"
24   - v-hasPermi="['bpm:model:update']">修改</el-button>
  23 + v-hasPermi="['bpm:task-assign-rule:update']">修改</el-button>
25 24 </template>
26 25 </el-table-column>
27 26 </el-table>
... ...
yudao-admin-ui/src/views/system/menu/index.vue
... ... @@ -25,7 +25,7 @@
25 25  
26 26 <el-table v-loading="loading" :data="menuList" row-key="id"
27 27 :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
28   - <el-table-column prop="name" label="菜单名称" :show-overflow-tooltip="true" width="200"></el-table-column>
  28 + <el-table-column prop="name" label="菜单名称" :show-overflow-tooltip="true" width="250"></el-table-column>
29 29 <el-table-column prop="icon" label="图标" align="center" width="100">
30 30 <template slot-scope="scope">
31 31 <svg-icon :icon-class="scope.row.icon" />
... ...