| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- import request from '@/utils/request'
- const { bpmRunTime, bpmModel } = window.context
- export function getTodos(data) {
- return request({
- url: `${bpmRunTime}/runtime/task/v1/getTodoList`,
- method: 'post',
- data,
- })
- }
- export function getFillData(data) {
- return request({
- url: '/flow/todo',
- method: 'post',
- data,
- })
- }
- export function getStartOften(data) {
- return request({
- url: '/flow/start/often',
- method: 'post',
- data,
- })
- }
- //获取审批按钮
- export function getApprovalButtons(query, cb) {
- const { taskId, leaderId } = query
- const url = `${bpmRunTime}/runtime/task/v1/getButtonsBytaskId?taskId=${taskId}&leaderId=${leaderId}&reqParams=`
- request.get(url).then((response) => {
- cb(response)
- })
- }
- //审批按钮挂起或者取消挂起
- export function hangUpOrCancelHangUp(query, cb) {
- const { instId, type } = query
- const url = `${bpmRunTime}/runtime/instance/v1/${type}?instId=${instId}`
- request.get(url).then((response) => {
- cb(response)
- })
- }
- //获取流程状态根据defId 实例id,任务id
- export function getFlowStatus(query, cb) {
- const { instId, taskId } = query
- const url = `${bpmRunTime}/runtime/instance/v1/getDefStatus?instId=${instId}&taskId=${taskId}`
- request.get(url).then((response) => {
- cb(response)
- })
- }
- //获取审批意见通过流程实例id和任务id
- export function getBpmSaveOpinionByTeam(instId, taskId, cb) {
- const url = `${bpmRunTime}/runtime/task/v1/getBpmSaveOpinionByTeam?instId=${instId}&taskId=${taskId}`
- request.get(url).then((response) => {
- cb(response)
- })
- }
- //验证当前用户是否有该任务处理权限
- export function checkTaskAuth(taskId, cb) {
- const url = `${bpmRunTime}/runtime/task/v1/checkTaskAuth?taskId=${taskId}`
- return request.get(url)
- }
- //新增,修改或暂存审批意见
- export function savaApprovalComments(data) {
- return request({
- url: `${bpmRunTime}/runtime/task/v1/createBpmSaveOpinion`,
- method: 'post',
- data,
- })
- }
- // 根据 taskId 获取任务明细
- export function getNotice(taskId) {
- const url = `${bpmRunTime}/runtime/task/v1/getNotice?id=${taskId}`
- return request.get(url)
- }
- // 获取流程图
- export function getBpmImage(instId, proInstId, defId, cb) {
- const url = `${bpmRunTime}/runtime/instance/v1/getBpmImage?taskId=&proInstId=${proInstId}&defId=${defId}&bpmnInstId=${instId}`
- request.get(url).then((res) => {
- cb(res)
- })
- }
- // 获取流程实例明细
- export function instanceFlowImage(data, cb) {
- const { instId, nodeId, type, defId } = data
- const url = `${bpmRunTime}/runtime/instance/v1/instanceFlowImage?proInstId=${instId}&nodeId=
- ${nodeId || ''}&type=${type || ''}&defId=${defId || ''}`
- request.get(url).then((res) => {
- cb(res)
- })
- }
- // 获取审批意见
- export function getNodeOpinions(data, cb) {
- const { instId, nodeIds, defId } = data
- const url = `${bpmRunTime}/runtime/task/v1/nodeOpinion?instId=${instId}&nodeId=${nodeIds}&defId=${defId}`
- request.get(url).then((res) => {
- cb(res)
- })
- }
- // 获取我的常用流程
- export function getMyOftenFlow() {
- const url = `${bpmRunTime}/runtime/instance/v1/getMyOftenFlow`
- return request.get(url)
- }
- // 获取所有流程
- export function getHasAuthFlowList(queryFilter = {}) {
- const url = `${bpmRunTime}/runtime/instance/v1/getHasAuthFlowList`
- return request.post(url, queryFilter)
- }
- // 保存常用流程
- export function saveMyOftenFlow(data) {
- const url = `${bpmModel}/bpmModel/BpmOftenFlow/v1/saveMyOftenFlow`
- return request.post(url, data)
- }
- // 当前账号是否有启动该流程的权限
- export function flowHasStartRights(defKey) {
- const url = `${bpmModel}/flow/def/v1/flowHasStartRights?defKey=${defKey}`
- return request.get(url)
- }
- // 根据当前任务查询是否在第一个节点
- export function isTaskFirstNode(taskId) {
- return request.get(
- `${bpmRunTime}/runtime/task/v1/taskIsFirstNode?taskId=${taskId}`
- )
- }
- // 获取流程全局打印模板
- export function getFlowGlobalTemplate(defId) {
- return request({
- url: `${bpmModel}/flow/wordPrint/v1/getGlobalPrintTemplate?defId=${defId}`,
- method: 'get',
- })
- }
- export function getBpmPrintRecordByInstId(instId, nodeId) {
- return request({
- url: `${bpmRunTime}/runtime/bpmPrintRecord/v1/getByProInstId?procInstId=${instId}&nodeId=${
- nodeId || ''
- }`,
- method: 'get',
- })
- }
- export function getBpmPrintRecord(data) {
- return request({
- url: `${bpmRunTime}/runtime/bpmPrintRecord/v1/query`,
- method: 'post',
- data,
- })
- }
- export function getWatermarkByInstId(id){
- return request({
- url: `${bpmModel}/bpmModel/bpmWatermark/v1/getByInstId?instId=${id}`,
- method: 'get',
- })
- }
- export function savePrintRecord(data) {
- return request({
- url: `${bpmRunTime}/runtime/bpmPrintRecord/v1/printLog`,
- data,
- method: 'post',
- })
- }
|