解决非admin用户的一些操作权限问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.secure.BCrypt;
|
import cn.dev33.satoken.secure.BCrypt;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
@@ -64,6 +65,18 @@ public class SysUserController extends BaseController {
|
|||||||
return userService.selectPageUserList(user, pageQuery);
|
return userService.selectPageUserList(user, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户列表,用于用户选择场景
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询用户列表")
|
||||||
|
@SaCheckLogin
|
||||||
|
@GetMapping("/selectUser")
|
||||||
|
public TableDataInfo<SysUser> selectUser(SysUser user, PageQuery pageQuery) {
|
||||||
|
return userService.selectPageUserList(user, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("导出用户列表")
|
@ApiOperation("导出用户列表")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
||||||
@SaCheckPermission("system:user:export")
|
@SaCheckPermission("system:user:export")
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.workflow;
|
package com.ruoyi.web.controller.workflow;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
@@ -53,6 +54,16 @@ public class WfCategoryController extends BaseController {
|
|||||||
return flowCategoryService.queryPageList(bo, pageQuery);
|
return flowCategoryService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部的流程分类列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询全部流程分类列表")
|
||||||
|
@SaCheckLogin
|
||||||
|
@GetMapping("/listAll")
|
||||||
|
public R<List<WfCategoryVo>> listAll(@Validated(QueryGroup.class) WfCategoryBo bo) {
|
||||||
|
return R.ok(flowCategoryService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出流程分类列表
|
* 导出流程分类列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.workflow;
|
package com.ruoyi.web.controller.workflow;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
@@ -79,7 +80,7 @@ public class WfDefinitionController extends BaseController {
|
|||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "读取xml文件")
|
@ApiOperation(value = "读取xml文件")
|
||||||
@SaCheckPermission("workflow:definition:view")
|
@SaCheckLogin
|
||||||
@GetMapping("/readXml/{definitionId}")
|
@GetMapping("/readXml/{definitionId}")
|
||||||
public R<String> readXml(@ApiParam(value = "流程定义ID") @PathVariable(value = "definitionId") String definitionId) {
|
public R<String> readXml(@ApiParam(value = "流程定义ID") @PathVariable(value = "definitionId") String definitionId) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -10,6 +10,15 @@ export function listUser(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询用户列表,用于流程里的用户选择
|
||||||
|
export function selectUser(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/selectUser',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询用户详细
|
// 查询用户详细
|
||||||
export function getUser(userId) {
|
export function getUser(userId) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -9,6 +9,15 @@ export function listCategory(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询流程分类列表
|
||||||
|
export function listAllCategory(query) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/category/listAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询流程分类详细
|
// 查询流程分类详细
|
||||||
export function getCategory(categoryId) {
|
export function getCategory(categoryId) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ import { treeselect } from '@/api/system/dept'
|
|||||||
import ProcessViewer from '@/components/ProcessViewer'
|
import ProcessViewer from '@/components/ProcessViewer'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import { listUser } from '@/api/system/user'
|
import { selectUser } from '@/api/system/user'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Detail",
|
name: "Detail",
|
||||||
@@ -330,7 +330,7 @@ export default {
|
|||||||
/** 查询用户列表 */
|
/** 查询用户列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.userLoading = true;
|
this.userLoading = true;
|
||||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
selectUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
this.userList = response.rows;
|
this.userList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.toggleSelection(this.userMultipleSelection);
|
this.toggleSelection(this.userMultipleSelection);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-video-play"
|
icon="el-icon-video-play"
|
||||||
@click="handleStart(scope.row)"
|
@click="handleStart(scope.row)"
|
||||||
v-hasPermi="['workflow:definition:designer']"
|
v-hasPermi="['workflow:process:start']"
|
||||||
>发起</el-button>
|
>发起</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOwnProcess, stopProcess, delProcess } from '@/api/workflow/process';
|
import { listOwnProcess, stopProcess, delProcess } from '@/api/workflow/process';
|
||||||
import { listCategory } from '@/api/workflow/category';
|
import { listAllCategory } from '@/api/workflow/category';
|
||||||
export default {
|
export default {
|
||||||
name: "Own",
|
name: "Own",
|
||||||
components: {
|
components: {
|
||||||
@@ -165,7 +165,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 查询流程分类列表 */
|
/** 查询流程分类列表 */
|
||||||
getCategoryList() {
|
getCategoryList() {
|
||||||
listCategory().then(response => this.categoryOptions = response.rows)
|
listAllCategory().then(response => this.categoryOptions = response.rows)
|
||||||
},
|
},
|
||||||
/** 查询流程定义列表 */
|
/** 查询流程定义列表 */
|
||||||
getList() {
|
getList() {
|
||||||
|
|||||||
Reference in New Issue
Block a user