feat(api): 添加组件和流程相关接口
parent
41c9b60bbe
commit
8c397f848f
@ -0,0 +1,25 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import { apiResData } from '@/api/interface/index';
|
||||||
|
|
||||||
|
// 公共路径
|
||||||
|
const urlPrefix = '/api/v1/bpms-workbench';
|
||||||
|
|
||||||
|
// 我的组件
|
||||||
|
export function getMyComponents() {
|
||||||
|
return axios.get<apiResData>(`${urlPrefix}/components/mineList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 公开组件
|
||||||
|
export function getPubComponents() {
|
||||||
|
return axios.get<apiResData>(`${urlPrefix}/components/publicList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 协同组件
|
||||||
|
export function getTeamComponents() {
|
||||||
|
return axios.get<apiResData>(`${urlPrefix}/components/teamList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据组件id查看实例列表
|
||||||
|
export function queryInstance(compId: string) {
|
||||||
|
return axios.get(`${urlPrefix}/components/${compId}/instances`);
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import { publishType, appFlowModel, flowType, queryParams, apiResData } from '@/api/interface/index';
|
||||||
|
|
||||||
|
// 公共路径
|
||||||
|
const urlPrefix = '/api/v1/bpms-workbench';
|
||||||
|
|
||||||
|
// 发布流程
|
||||||
|
export function appPublish(data: publishType) {
|
||||||
|
return axios.post(`${urlPrefix}/flow/appPublish`, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 引用已发布流程到子流程
|
||||||
|
export function copyPublish(data: appFlowModel) {
|
||||||
|
return axios.post(`${urlPrefix}/flow/copyPublish`, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取已经发布的流程
|
||||||
|
export function getIsPublish() {
|
||||||
|
return axios.get(`${urlPrefix}/flow/getIsPublish`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页获取已经发布的 复合/公共流程
|
||||||
|
export function getPublishPage() {
|
||||||
|
return axios.post(`${urlPrefix}/flow/getPublishPage`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页获取已经发布的 我的流程
|
||||||
|
export function getMineSubs(data: flowType) {
|
||||||
|
return axios.post(`${urlPrefix}/flow/getMineSubs`, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 流程库个人分页
|
||||||
|
export function getMyFlowList(data: queryParams) {
|
||||||
|
return axios.post<apiResData>(`${urlPrefix}/flow/minePage`, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 流程库公共分页
|
||||||
|
export function getPubFlowList(data: queryParams) {
|
||||||
|
return axios.post<apiResData>(`${urlPrefix}/flow/publicList`, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除流程库
|
||||||
|
export function deleteFlow(id: string) {
|
||||||
|
return axios.delete(`${urlPrefix}/flow/${id}`);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue