!29 新增选择用户查询和选择流程分类查询接口、解决选择抄送人后审批通过却没有保存抄送记录的bug

Merge pull request !29 from luckyxz/develop
This commit is contained in:
KonBAI
2022-06-29 02:41:00 +00:00
committed by Gitee
9 changed files with 63 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.system;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.secure.BCrypt;
import cn.hutool.core.bean.BeanUtil;
@@ -64,6 +65,18 @@ public class SysUserController extends BaseController {
return userService.selectPageUserList(user, pageQuery);
}
/**
* 查询用户列表,用于用户选择场景
*/
@ApiOperation("查询用户列表")
@SaCheckLogin
@GetMapping("/selectUser")
public TableDataInfo<SysUser> selectUser(SysUser user, PageQuery pageQuery) {
return userService.selectPageUserList(user, pageQuery);
}
@ApiOperation("导出用户列表")
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@SaCheckPermission("system:user:export")

View File

@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.workflow;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit;
@@ -53,6 +54,16 @@ public class WfCategoryController extends BaseController {
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));
}
/**
* 导出流程分类列表
*/

View File

@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.workflow;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.PageQuery;
@@ -79,7 +80,7 @@ public class WfDefinitionController extends BaseController {
@ApiOperation(value = "读取xml文件")
@SaCheckPermission("workflow:definition:view")
@SaCheckLogin
@GetMapping("/readXml/{definitionId}")
public R<String> readXml(@ApiParam(value = "流程定义ID") @PathVariable(value = "definitionId") String definitionId) {
try {

View File

@@ -76,6 +76,7 @@ public class WfCopyServiceImpl implements IWfCopyService {
private LambdaQueryWrapper<WfCopy> buildQueryWrapper(WfCopyBo bo) {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<WfCopy> lqw = Wrappers.lambdaQuery();
lqw.eq(bo.getUserId() != null, WfCopy::getUserId, bo.getUserId());
lqw.like(StringUtils.isNotBlank(bo.getProcessName()), WfCopy::getProcessName, bo.getProcessName());
lqw.like(StringUtils.isNotBlank(bo.getOriginatorName()), WfCopy::getOriginatorName, bo.getOriginatorName());
return lqw;

View File

@@ -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) {
return request({

View File

@@ -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) {
return request({

View File

@@ -189,7 +189,7 @@ import { treeselect } from '@/api/system/dept'
import ProcessViewer from '@/components/ProcessViewer'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import Treeselect from '@riophae/vue-treeselect'
import { listUser } from '@/api/system/user'
import { selectUser } from '@/api/system/user'
export default {
name: "Detail",
@@ -330,7 +330,7 @@ export default {
/** 查询用户列表 */
getList() {
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.total = response.total;
this.toggleSelection(this.userMultipleSelection);
@@ -398,7 +398,9 @@ export default {
})
})
} else {
this.$refs.userTable.clearSelection();
this.$nextTick(() => {
this.$refs.userTable.clearSelection();
});
}
},
// 关闭标签
@@ -449,7 +451,9 @@ export default {
this.getTreeSelect();
this.getList()
this.userData.open = true;
this.$refs.userTable.clearSelection();
this.$nextTick(() => {
this.$refs.userTable.clearSelection();
});
},
/** 通过任务 */
handleComplete() {
@@ -553,6 +557,13 @@ export default {
this.userData.copyUser = this.userMultipleSelection.map(k => {
return { id: k.userId, label: k.nickName }
})
// 设置抄送人ID
if (this.userData.copyUser && this.userData.copyUser.length > 0) {
const val = this.userData.copyUser.map(item => item.id);
this.taskForm.copyUserIds = val instanceof Array ? val.join(',') : val;
} else {
this.taskForm.copyUserIds = '';
}
this.userData.open = false;
} else {
if (!this.taskForm.comment) {

View File

@@ -56,7 +56,7 @@
size="mini"
icon="el-icon-video-play"
@click="handleStart(scope.row)"
v-hasPermi="['workflow:definition:designer']"
v-hasPermi="['workflow:process:start']"
>发起</el-button>
</template>
</el-table-column>

View File

@@ -107,7 +107,7 @@
<script>
import { listOwnProcess, stopProcess, delProcess } from '@/api/workflow/process';
import { listCategory } from '@/api/workflow/category';
import { listAllCategory } from '@/api/workflow/category';
export default {
name: "Own",
components: {
@@ -165,7 +165,7 @@ export default {
methods: {
/** 查询流程分类列表 */
getCategoryList() {
listCategory().then(response => this.categoryOptions = response.rows)
listAllCategory().then(response => this.categoryOptions = response.rows)
},
/** 查询流程定义列表 */
getList() {