### 功能说明 - 1.我发起的单据,可以对已签收的任务进行催办操作,催办方式:网页通知(系统消息),邮件通知 - 2.催办后,办理人可以看到任务的催办提醒 **功能对接前提条件** 代码混入 JeecgBpmListMixin ``` import {JeecgBpmListMixin} from '@/mixins/JeecgBpmListMixin' mixins: [JeecgBpmListMixin], ``` #### 一、催办对接 **效果图:** ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/100221_fb697c74_443268.png "1.png") ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/100547_dc6f46f9_443268.png "2.png") **对接方法:** (1)引入催办组件: ``` import BizTaskNotifyModal from "@/views/modules/bpmbiz/common/BizTaskNotifyModal.vue"; components: { BizTaskNotifyModal }, <biz-task-notify-modal ref="taskNotifyModal"></biz-task-notify-modal> ``` (2)在我发起的流程单据列表中增加催办按钮: ``` <a-menu-item @click="taskNotify(flowCode,record.id)">催办</a-menu-item> 说明:taskNotify(flowCode,record.id) 第一个参数:flowCode为流程业务关联唯一编码 第二个参数:业务单据ID ``` #### 二、催办提醒对接 **效果图:** ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/101356_f962affa_443268.png "1.png") ![输入图片说明](https://images.gitee.com/uploads/images/2019/0614/101408_06eb7e67_443268.png "2.png") 对接方法: (1)引入催办提醒组件 ``` import BizTaskNotifyMeModal from "@/views/modules/bpmbiz/common/BizTaskNotifyMeModal.vue"; components: { BizTaskNotifyMeModal }, ``` (2)待审批任务列中字段增加提醒图标 ``` // columns中再需要的列中增加插槽 columns: [ { title: '请假人', align:"center", dataIndex: 'name', scopedSlots: { customRender: 'notify' } }, ] ``` <a-table>中增加插槽代码 ``` <span slot="notify" slot-scope="text, record"> <a-icon title="催办提醒" v-if="record.taskUrge" theme="twoTone" twoToneColor="#eb2f96" @click="taskNotifyMe(flowCode,record.id)" type="notification"/> {{ text }} </span> 说明:taskNotifyMe(flowCode,record.id) 第一个参数:flowCode为流程业务关联唯一编码 第二个参数:业务单据ID ``` (3)重写列表数据加载方法,判断带审批任务是否有催办提醒 ``` async loadData(arg) { if(!this.url.list){ this.$message.error("请设置url.list属性!") return } //加载数据 若传入参数1则加载第一页的内容 if (arg === 1) { this.ipagination.current = 1; } var params = this.getQueryParams();//查询条件 this.loading = true; let res = await getAction(this.url.list, params) if (res.success) { var data = res.result.records; if(this.queryParam.bizTaskType=='1'){ for (var i=0;i<data.length;i++){ //item.taskUrge = false; var item = data[i]; var params = {flowCode:this.flowCode,dataId:item.id};//查询条件 let res2 = await getAction(this.url.checkNotify,params); if(res2.result){ item.taskUrge = true; } } } this.dataSource = data; this.ipagination.total = res.result.total; this.loading = false; } }, ```