!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; 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")

View File

@@ -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));
}
/** /**
* 导出流程分类列表 * 导出流程分类列表
*/ */

View File

@@ -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 {

View File

@@ -76,6 +76,7 @@ public class WfCopyServiceImpl implements IWfCopyService {
private LambdaQueryWrapper<WfCopy> buildQueryWrapper(WfCopyBo bo) { private LambdaQueryWrapper<WfCopy> buildQueryWrapper(WfCopyBo bo) {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<WfCopy> lqw = Wrappers.lambdaQuery(); 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.getProcessName()), WfCopy::getProcessName, bo.getProcessName());
lqw.like(StringUtils.isNotBlank(bo.getOriginatorName()), WfCopy::getOriginatorName, bo.getOriginatorName()); lqw.like(StringUtils.isNotBlank(bo.getOriginatorName()), WfCopy::getOriginatorName, bo.getOriginatorName());
return lqw; 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) { export function getUser(userId) {
return request({ 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) { export function getCategory(categoryId) {
return request({ return request({

View File

@@ -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);
@@ -398,7 +398,9 @@ export default {
}) })
}) })
} else { } else {
this.$refs.userTable.clearSelection(); this.$nextTick(() => {
this.$refs.userTable.clearSelection();
});
} }
}, },
// 关闭标签 // 关闭标签
@@ -449,7 +451,9 @@ export default {
this.getTreeSelect(); this.getTreeSelect();
this.getList() this.getList()
this.userData.open = true; this.userData.open = true;
this.$refs.userTable.clearSelection(); this.$nextTick(() => {
this.$refs.userTable.clearSelection();
});
}, },
/** 通过任务 */ /** 通过任务 */
handleComplete() { handleComplete() {
@@ -553,6 +557,13 @@ export default {
this.userData.copyUser = this.userMultipleSelection.map(k => { this.userData.copyUser = this.userMultipleSelection.map(k => {
return { id: k.userId, label: k.nickName } 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; this.userData.open = false;
} else { } else {
if (!this.taskForm.comment) { if (!this.taskForm.comment) {

View File

@@ -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>

View File

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