12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /*** mjs 之 瑞思 ***/
- import { KEY_NO_LOADING, KEY_SHOW_MESSAGE } from "../service/request";
- export default {
- // 公共配置
- init () {
- mjs.conf.api = "https://mc.cloudpure.cn/proxy/ruisi";
- return this; // this 指向当前项目本身
- },
- // 获取审批节点
- approvalRecord (compId) {
- const procInsId = mjs.$this.utils.router.getQuery("procInsId");
- // 兼容矩阵更新延迟情况
- if (procInsId && mjs.$this.$(compId).getValue().length < 3) {
- setTimeout(async () => {
- const rsp = await mjs.request.xhr.doPost(`${mjs.conf.api}/approval/record`, { processInstanceId: procInsId }, {
- isUpdate: false,
- compId
- }, { [KEY_NO_LOADING]: true })
- mjs.$this.$(compId).setValue(rsp.data.users); // 传递人员组件, 多选
- }, 2000);
- }
- },
- // 流程分享权限
- async shareRecord (userIds = [], compId, isNotice, atUserId, content) {
- userIds = userIds.map(item => item.value);
- atUserId = atUserId.map(item => item.value).join(",")
- const procInsId = mjs.$this.utils.router.getQuery("procInsId");
- await mjs.request.xhr.doPost(`${mjs.conf.api}/share/record`, { processInstanceId: procInsId }, {
- userIds, compId, isNotice, atUserId, content, userId: loginUser.userId
- }, { [KEY_SHOW_MESSAGE]: true })
- if (isNotice) {
- setTimeout(() => location.reload(), 750);
- }
- }
- };
|