| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- import request from '@/utils/request'
- import upload from '@/utils/upload'
- const preUrl = '/clientServices.do?iscrypt=1'
- // 获取流程 宫格 列表
- export function getProcessList(staffId, unitId) {
- return request({
- url: preUrl,
- method: 'post',
- data: {
- serviceId: 'bpm_20150319001GetFlowList',
- params: {
- staffId: staffId,
- unitid: unitId
- }
- }
- })
- }
- // 获取流程信息
- export function getProcessInfo({ modelId, control }) {
- return request({
- url: preUrl,
- method: 'post',
- data: {
- serviceId: 'bpm_20150319002GetStartFlowInfo',
- params: {
- modelId: modelId,
- control: control
- }
- }
- })
- }
- // 获取流程 表单
- export function getProcessForm(user, process) {
- return request({
- url: preUrl,
- method: 'post',
- data: {
- serviceId: 'bpm_20180525getflowform',
- params: {
- staffId: user.useId, // user.useId
- formId: process.formId,
- tmodelId: process.tmodelId,
- modelId: process.modelId, // 流程模板
- control: process.control, // 流程类型
- loginID: user.useId, // user.useId
- groupName: user.deptName, // user.deptName
- name: user.name, // user.name
- currentPosition: user.positionName, // user.positionName
- id: user.unitId, // user.unitId
- }
- }
- })
- }
- // 提交流程 表单
- export function submitProcessForm(user, process, fileIds) {
- return request({
- url: preUrl,
- method: 'post',
- data: {
- serviceId: 'bpm_20150325001FlowStart',
- params: {
- flow: {
- staffId: user.useId, // user.useId
- staffName: user.name, // user.name
- gxId: user.gxId, // user.gxId
- insName: user.name + process.modelName, // user.name + modelName
- groupId: user.groupid, // user.groupid
- usesNames: "[]",
- tmodelId: process.tmodelId, // process.tmodelId
- modelId: process.modelId, // process.modelId
- // 附件id 为空时设置值为''
- fileIds: fileIds.length==0?'':fileIds
- },
- form: {
- formId: process.formId, // process.formId
- formElements: process.form
- },
- control: '1'
- }
- }
- })
- }
- // 上传附件
- export function uploadFile(data) {
- return upload({
- url: '/MiniAppUploadFileAction.do',
- name: data.name,
- filePath: data.filePath
- })
- }
- // 获取班次信息
- export function getAttendanceSegment(unitId) {
- return request({
- url: preUrl,
- method: 'post',
- data: {
- serviceId: 'miniapp_getAttendanceSegment',
- params: {
- unitId
- }
- }
- })
- }
|