123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- import request from '@/config/axios'
- export type InullyApplyFormType = {
- id: string
- nickname?: string
- nullyApplyUserId: string
- flowInstanceId: string
- voidFlowInstanceId: string
- iNullied: string
- voidFlowCode: string
- voidFlowDesc: string
- voidFlowName: string
- nullyApplyTime: string
- nullyReason: string
- }
- export type CallbackFormType = {
- flowInsId: string
- currentActInsId: string
- currentActTempId: string
- participantId: string
- position: string
- callbackRemark: string
- iBranchReturn?: string
- }
- const jsonToFormData = (json: Object) => {
- const formData = new FormData()
- const keys = Object.keys(json)
- keys.forEach((key) => {
- if (json[key] instanceof Object) {
- formData.append(key, JSON.stringify(json[key]))
- } else {
- formData.append(key, json[key])
- }
- })
- return formData
- }
- // 获取办件中心Tab列表
- export const officeCenterModule = async () => {
- return await request.postOriginal(
- {
- url: '/HandlerCaseCenter/officeCenterModule',
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- // 获取办件中心列表
- export const getHandlerCaseCenterList = async (data) => {
- return await request.postOriginal(
- {
- url: '/HandlerCaseCenter/list',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- // 获取办件中心模板列表
- export const getFlowTemplateTree = async () => {
- return await request.postOriginal(
- { url: '/TFlowTemplateApi/selectFlowTemplateTree' },
- '/workflow'
- )
- }
- // 发起流程
- export const addTProcessEngine = async (templateId: string) => {
- const formData = new FormData()
- formData.append('templateId', templateId)
- return await request.postOriginal(
- {
- url: '/TProcessEngine/add',
- data: formData,
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- // 获取办件中心汇总数据
- export const getHandlerCaseCenterCount = async (data) => {
- return await request.postOriginal(
- { url: '/HandlerCaseCenter/count', data: data, headersType: 'application/form-data' },
- '/workflow'
- )
- }
- // 获取流程模版列表
- export const GetFlowTemplateTreeData = async () => {
- return await request.postOriginal(
- {
- url: '/TFlowTemplate/GetFlowTemplateTreeData',
- data: null,
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- // 获取办件中心新建办件模板
- export const getFlowTemplateTreeDataByUser = async (data) => {
- return await request.postOriginal(
- {
- url: '/TFlowTemplate/GetFlowTemplateTreeDataByUser',
- data: data,
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //办件中心“追回”操作
- export const recoverActivity = async (data: {
- activityInstanceId: string
- participantId: string
- }) => {
- return await request.postOriginal(
- {
- url: '/HandlerCaseCenter/recoverActivity',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //办件中心“解挂”操作
- export const addIHangUp = async (data: { activityInstanceId: string; isRecover: number }) => {
- return await request.postOriginal(
- {
- url: '/IHangUp/add',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //办件中心“恢复作废”操作
- export const addINullyApply = async (data: {
- activityInstanceId: string
- voidFlowInstanceId: string
- isRecover: number
- }) => {
- return await request.postOriginal(
- {
- url: '/INullyApply/add',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //办件中心“彻底作废”操作
- export const completelyVoidINullyApply = async (data: { flowInstanceId: string }) => {
- return await request.postOriginal(
- {
- url: '/INullyApply/completelyVoid',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //办件中心“挂起”操作
- export const isHangUp = async (data: { activityInstanceId: string }) => {
- // {"activityInstanceId": rowObj.ACTIVITYINSID}
- return await request.postOriginal(
- {
- url: '/Transfer/isHangUp',
- data: data,
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //效验该流程是否已经作废
- export const isFlowVoid = async (data: { flowInstanceId: string }) => {
- return await request.postOriginal(
- {
- url: '/Transfer/isVoid',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //获取提交作废的参数
- export const getINullyApplyExample = async (data: {
- voidFlowInstanceId: string
- isRecover: number
- }) => {
- return await request.postOriginal(
- {
- url: '/INullyApply/getExample',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //办件中心“作废”操作
- export const saveINullyApply = async (data: { nullyApply: InullyApplyFormType }) => {
- return await request.postOriginal(
- {
- url: '/INullyApply/save',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //获取退回所在流程信息
- export const getCalBackActivityNew = async (data: {
- activityInstanceId: string
- flowInsId: string
- }) => {
- return await request.postOriginal(
- {
- url: '/HandlerCaseCenter/getCalBackActivityNew',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //检查退件
- export const checkReturnMethod = async (data: {
- paramMap: {
- flowInsId: string
- currentActInsId: string
- currentActTempId: string
- participantId: string
- position: string
- callbackRemark: string
- }
- backToActivitys: {
- callbackActTempId: string
- callbackActInsId: string
- }[]
- }) => {
- return await request.postOriginal(
- {
- url: '/HandlerCaseCenter/checkReturnMethod',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //发起退回操作
- export const callbackActivitySure = async (data: {
- paramMap: CallbackFormType
- backToActivitys: {
- callbackActTempId: string
- callbackActInsId: string
- }[]
- }) => {
- return await request.postOriginal(
- {
- url: '/HandlerCaseCenter/callbackActivity',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //公共待办件提示
- export const openOfficeTip = async (data: {
- activityInsId: string
- particiPantId: string
- isView: boolean
- }) => {
- return await request.postOriginal(
- {
- url: '/HandlerCaseCenter/openOfficeTip',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
- //转流程办理页面
- export const saveAndGetUrl = async (data: {
- activityInsId: string
- flowInsId: string
- participantId: string
- status: string
- userId: string | null
- isView: boolean
- }) => {
- return await request.postOriginal(
- {
- url: '/HandlerCaseCenter/saveAndGetUrl',
- data: jsonToFormData(data),
- headersType: 'application/form-data'
- },
- '/workflow'
- )
- }
|