### 功能说明 - 批量功能包括:批量发送、批量退回、批量委托、批量挂起、批量解挂 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/104127_c5a48e03_443268.png "1.png") #### 一、批量发送 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/104804_cc4ee8cb_443268.png "2.png") **对接方法:** (1)引入组件 ``` import BpmBizBatchCompleteDealModal from "@/views/modules/bpmbiz/common/BpmBizBatchCompleteDealModal.vue"; components: { BpmBizBatchCompleteDealModal }, <bpm-biz-batch-complete-deal-modal ref="batchCompleteDealModal" @ok="handleOk"></bpm-biz-batch-complete-deal-modal> ``` (2)增加按钮 ``` <a-button @click="batchComplete" type="primary" icon="caret-right">批量发送</a-button> ``` (3)增加method方法 ``` //批量发送 batchComplete(){ var that = this; var rows = that.selectionRows; if(rows.length<=0){ this.$message.warning('请选择一条记录!'); return; } var param = {data:[]}; for (var i = 0; i < rows.length; i++) { var data = {dataId:rows[i].id,flowCode:that.flowCode,bizTitle:rows[i].name}; param.data.push(data); } that.$refs.batchCompleteDealModal.deal(param); that.$refs.batchCompleteDealModal.title="批量发送"; }, ``` #### 二、批量退回 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/105351_aecc62d2_443268.png "1.png") **对接方法:** (1)引入组件 ``` import BpmBizBatchRejectDealModal from "@/views/modules/bpmbiz/common/BpmBizBatchRejectDealModal.vue"; components: { BpmBizBatchRejectDealModal }, //页面增加组件 <bpm-biz-batch-reject-deal-modal ref="batchRejectDealModal" @ok="handleOk"></bpm-biz-batch-reject-deal-modal> ``` (2)增加按钮 ``` <a-button @click="batchReject" type="primary" icon="rollback">批量退回</a-button> ``` (3)增加method方法 ``` //批量退回 batchReject(){ var that = this; var rows = that.selectionRows; if(rows.length<=0){ this.$message.warning('请选择一条记录!'); return; } var param = {data:[]}; for (var i = 0; i < rows.length; i++) { var data = {dataId:rows[i].id,flowCode:that.flowCode,bizTitle:rows[i].name}; param.data.push(data); } that.$refs.batchRejectDealModal.deal(param); that.$refs.batchRejectDealModal.title="批量退回"; }, ``` #### 三、批量委托 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/105938_acd60594_443268.png "1.png") **对接方法:** (1)引入组件 ``` import BpmBizBatchEntrusterDealModal from "@/views/modules/bpmbiz/common/BpmBizBatchEntrusterDealModal.vue"; components: { BpmBizBatchEntrusterDealModal }, //页面增加组件 <bpm-biz-batch-entruster-deal-modal ref="batchEntrusterDealModal" @ok="handleOk"></bpm-biz-batch-entruster-deal-modal> ``` (2)增加按钮 ``` <a-button @click="batchEntruster" type="primary" icon="user">批量委托</a-button> ``` (3)增加method方法 ``` //批量委托 batchEntruster(){ var that = this; var rows = that.selectionRows; if(rows.length<=0){ this.$message.warning('请选择一条记录!'); return; } var param = {data:[]}; for (var i = 0; i < rows.length; i++) { var data = {dataId:rows[i].id,flowCode:that.flowCode,bizTitle:rows[i].name}; param.data.push(data); } that.$refs.batchEntrusterDealModal.deal(param); that.$refs.batchEntrusterDealModal.title="批量委托"; }, ``` #### 四、批量挂起 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/110247_82a6ff8d_443268.png "1.png") **对接方法:** (1)引入组件 ``` import BpmBizBatchSuspendDealModal from "@/views/modules/bpmbiz/common/BpmBizBatchSuspendDealModal.vue"; components: { BpmBizBatchSuspendDealModal }, //页面增加组件 <bpm-biz-batch-suspend-deal-modal ref="batchSuspendDealModal" @ok="handleOk"></bpm-biz-batch-suspend-deal-modal> ``` (2)增加按钮 ``` <a-button @click="batchSuspend" type="primary" icon="lock">批量挂起</a-button> ``` (3)增加method方法 ``` //批量挂起 batchSuspend(){ var that = this; var rows = that.selectionRows; if(rows.length<=0){ this.$message.warning('请选择一条记录!'); return; } var param = {data:[]}; for (var i = 0; i < rows.length; i++) { var data = {dataId:rows[i].id,flowCode:that.flowCode,bizTitle:rows[i].name}; param.data.push(data); } that.$refs.batchSuspendDealModal.deal(param); that.$refs.batchSuspendDealModal.title="批量挂起"; }, ``` #### 五、批量解挂 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/110434_959010ad_443268.png "2.png") **对接方法:** (1)引入组件 ``` import BpmBizBatchRestartDealModal from "@/views/modules/bpmbiz/common/BpmBizBatchRestartDealModal.vue"; components: { BpmBizBatchRestartDealModal }, //页面增加组件 <bpm-biz-batch-restart-deal-modal ref="batchRestartDealModal" @ok="handleOk"></bpm-biz-batch-restart-deal-modal> ``` (2)增加按钮 ``` <a-button @click="batchRestart" type="primary" icon="unlock">批量解挂</a-button> ``` (3)增加method方法 ``` //批量解挂 batchRestart(){ var that = this; var rows = that.selectionRows; if(rows.length<=0){ this.$message.warning('请选择一条记录!'); return; } var param = {data:[]}; for (var i = 0; i < rows.length; i++) { var data = {dataId:rows[i].id,flowCode:that.flowCode,bizTitle:rows[i].name}; param.data.push(data); } that.$refs.batchRestartDealModal.deal(param); that.$refs.batchRestartDealModal.title="批量解挂"; }, ``` ### 通用说明: ``` var param = {data:[{ dataId:"", flowCode:"", bizTitle:""}]}; 参数说明: dataId:业务单据id flowCode:流程业务关联唯一编码 bizTitle:在批处理页面展示已选择列表的标题列,可根据当前单据内容拼接 ```