ruoyi-nbcio-plus基于vue3的flowable修正加签与跳转的前端问题

news/2024/9/22 18:39:42/

更多ruoyi-nbcio功能请看演示系统

gitee源代码地址

前后端代码: https://gitee.com/nbacheng/ruoyi-nbcio

演示地址:RuoYi-Nbcio后台管理系统 http://122.227.135.243:9666/

更多nbcio-boot功能请看演示系统 

gitee源代码地址

后端代码: https://gitee.com/nbacheng/nbcio-boot

前端代码:https://gitee.com/nbacheng/nbcio-vue.git

在线演示(包括H5) : http://122.227.135.243:9888

1、后端增加一个接口

java"> /*** 查询用户列表,用于用户选择场景*/@SaCheckLogin@GetMapping("/selectUser")public TableDataInfo<SysUserVo> selectUser(SysUserBo user, PageQuery pageQuery) {return userService.selectPageUserList(user, pageQuery);}

2、WfIdentityMapper.xml最后增加一个d,否则多租户情况下会报错

java"><?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nbcio.workflow.mapper.WfIdentityMapper"><select id="selectPageUserList" resultType="java.util.Map">select user_id as userId, user_name as userName, nick_name as nickName, phonenumber as phonenumberfrom sys_user<where><if test="deptId != null">and dept_id = #{deptId}</if></where></select><select id="selectDeptList" resultType="java.util.Map">select dept_id as deptId, parent_id as parentId, dept_name as deptName, order_num as orderNumfrom sys_dept d</select>
</mapper>

3、跳转前端对话框代码修改如下

javascript"><!--跳转流程--><el-dialog :z-index="100" :title="jumpTitle" @cancel="jumpOpen = false"v-model="jumpOpen" :width="'40%'" append-to-body><template #header><span>跳转节点</span></template><el-form ref="jumpForm" :model="jumpForm" label-width="160px"><el-form-item label="跳转节点" prop="jumpType" :rules="[{ required: true, message: '请选择跳转节点', trigger: 'blur' }]"><a-tablesize="middle":columns="jumpNodeColumns":loading="jumpNodeLoading":pagination="false":dataSource="jumpNodeData":rowKey="(record) => record.id":rowSelection="rowSelection"/></el-form-item></el-form><template #footer><span class="dialog-footer"><a-button type="primary" @click="jumpOpen = false">取 消</a-button><a-button type="primary" @click="jumpComplete(true)">确 定</a-button></span></template></el-dialog>

实际上就是变量重新命名了,其它也没什么变selectedJumpRows,同时//selectedRowKeys: selectedRowKeys,这个部分注释掉

javascript">const jumpComplete = () => {if ( selectedJumpRows.value.length < 1 ) {proxy?.$modal.msgWarning('请选择跳转节点')return}// 流程信息jumpForm.taskId = route.query && route.query.taskId as string;;jumpForm.procInsId = route.params && route.params.procInsId as string;;//对formdesigner后续加签审批的时候需要用到jumpForm.comment = taskForm.comment;//目标选择的节点信息jumpForm.targetActId = selectedJumpRows.value[0].id;jumpForm.targetActName = selectedJumpRows.value[0].name;console.log("jumpForm=",jumpForm);jumpTask(jumpForm).then(res => {console.log(" jumpTask",res);if (res.code == 200) {proxy?.$modal.msgSuccess('跳转成功')jumpOpen.value = false;goBack();} else {proxy?.$modal.msgError('跳转失败:' + res.msg)}});

4、加签前端对话框

javascript"><!--加签流程--><el-dialog :z-index="100" title="addSignTitle" @cancel="addSignOpen = false"v-model="addSignOpen" :width="'40%'" append-to-body><template #header><span>{{ addSignTitle }}</span></template><el-form ref="addSignForm" :model="addSignForm" label-width="160px"><el-form-item label="加签类型" prop="addSignType" :rules="[{ required: true, message: '请选择加签类型', trigger: 'blur' }]"><el-radio-group v-model="addSignType" @change="changeAddSignType"><el-radio :value = "0" >前加签</el-radio><el-radio :value = "1" >后加签</el-radio><el-radio :value = "2" >多实例加签</el-radio></el-radio-group></el-form-item><el-form-item label="用户选择" prop="copyUserIds" :rules="[{ required: true, message: '请选择用户', trigger: 'blur' }]"><el-tag:key="index"v-for="(item, index) in addSignUser"closable:disable-transitions="false"@close="handleClose('next', item)">{{ item.nickName }}</el-tag><el-button class="button-new-tag" type="primary" icon="el-icon-plus" size="small" circle @click="onSelectAddSignUsers" /></el-form-item></el-form><template #footer><span class="dialog-footer"><el-button type="primary" @click="addSignOpen = false">取 消</el-button><el-button type="primary" @click="addSignComplete(true)">确 定</el-button></span></template></el-dialog>

主要问题也是  const addSignType = ref(0) //加签类型 不单独出来好像vue3操作有问题(vue2版本是放在addSignForm里),其它逻辑也没多大变化

javascript">/** 加签 */const handleAddSign = () => {taskFormRef.value.validate(valid => {if (valid) {addSignType.value = 0;addSignTitle.value = "前加签流程";addSignOpen.value = true;console.log("handleAddSign addSignForm",addSignForm)}});}const changeAddSignType = (val) => {addSignType.value = val;if(addSignType.value === 0) {addSignTitle.value = "前加签流程";}if(addSignType.value === 1) {addSignTitle.value = "后加签流程";}if(addSignType.value === 2) {addSignTitle.value = "多实例加签流程";}}/** 加签任务 */const addSignComplete = () => {addSignForm.value.addSignUsers = taskForm.addSignUsers;addSignForm.value.addSignType = addSignType.valueif (!addSignForm.value.addSignUsers ) {proxy?.$modal.msgError("请选择用户");return;}// 流程信息addSignForm.value.taskId = route.query && route.query.taskId as string;;addSignForm.value.procInsId = route.params && route.params.procInsId as string;;//对VForm3后续加签审批的时候需要用到addSignForm.value.comment = taskForm.comment;console.log("addSignForm=",addSignForm);if(addSignForm.value.addSignType === 2) {multiInstanceAddSignTask(addSignForm).then(response => {proxy?.$modal.msgSuccess(response.msg);addSignOpen.value = false;goBack();});}else {addSignTask(addSignForm.value).then(response => {proxy?.$modal.msgSuccess(response.msg);addSignOpen.value = false;goBack();});}}

5、效果图如下:


http://www.ppmy.cn/news/1437814.html

相关文章

无人机飞行特点

你知道吗&#xff1f;无人机飞行竟然有这么多的神奇特点&#xff01; &#x1f929;想象一下&#xff0c;它们如同天空中的自由精灵&#xff0c;不受束缚地穿梭在云端。 &#x1f681; 首先&#xff0c;无人机的飞行高度和角度都可以随心所欲地调整&#xff0c;无论是俯瞰美景…

Ansible相关

Ansible 环境准备 主机名ip分组crontol192.168.88.1node1192.168.88.11testnode2192.168.88.12proxynode3192.168.88.13webserversnode4192.168.88.14webserversnode5192.168.88.15database 所有操作只需在crontol上操作即可 安装ansible # 依赖一般也会跟着一起装好 yum …

# 从浅入深 学习 SpringCloud 微服务架构(六)Feign(2)

从浅入深 学习 SpringCloud 微服务架构&#xff08;六&#xff09;Feign&#xff08;2&#xff09; 一、feign 的配置&#xff1a; 1、从 Spring Cloud Edgware 开始&#xff0c;Feign 支持使用属性自定义 Feign。 对于一个指定名称的 FeignClient&#xff08;例如该 Feign …

MyBatis处理SQL中的特殊字符

方式一&#xff1a;转义字符 如下案例&#xff1a; < 表示小于的转义字符 <!-- 在Mapper XML文件中定义SQL语句 --> <select id"selectById" resultMap"BaseResultMap">select *from userwhere id < #{id}; </select>方式二&am…

激活IDM下载器并配置百度网盘

前言&#xff1a; 最近想下载一些软件&#xff0c;奈何不充钱的百度网盘的速度实在太慢了&#xff0c;不到一个G的文件夹奈何下了一晚上&#xff0c;只能重新找一下idm的下载了。 但是idm的正版是需要收费的&#xff0c;所以有白嫖党的破解版就横空出世了。 正文&#xff1a…

UE5 GAS开发P34 游戏效果理论

GameplayEffects Attributes&#xff08;属性&#xff09;和Gameplay Tags&#xff08;游戏标签&#xff09;分别代表游戏中实体的特性和标识。 Attributes&#xff08;属性&#xff09;&#xff1a;Attributes是用来表示游戏中实体的特性或属性的值&#xff0c;例如生命值、…

maven报orace,jdbc错误,并出现大量红色波浪线Unresolved dependency

由于oracle的限制&#xff0c;一般我们是无法通过maven直接下载oracle的驱动包的&#xff0c;这就可能导致其余的包出现红色波浪线&#xff0c;解决方法如下 1.新建一个文件夹&#xff0c;并将oracle驱动包放在这个新建的文件夹下&#xff0c;注意不要讲这个oracle包放在maven本…

【算法刷题day37】Leetcode:738. 单调递增的数字、968. 监控二叉树

文章目录 Leetcode 738. 单调递增的数字解题思路代码总结 Leetcode 968. 监控二叉树解题思路代码总结 草稿图网站 java的Deque Leetcode 738. 单调递增的数字 题目&#xff1a;738. 单调递增的数字 解析&#xff1a;代码随想录解析 解题思路 这贪心有点巧&#xff0c;自己没想…