update 优化 工作流代码与接口命名
This commit is contained in:
parent
0108df1334
commit
e7ff829502
@ -1,7 +1,6 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import { ProcessDefinitionQuery, ProcessDefinitionVO, ProcessDefinitionXmlVO } from '@/api/workflow/processDefinition/types';
|
import { ProcessDefinitionQuery, ProcessDefinitionVO, definitionXmlVO } from '@/api/workflow/processDefinition/types';
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取流程定义列表
|
* 获取流程定义列表
|
||||||
@ -20,9 +19,9 @@ export const listProcessDefinition = (query: ProcessDefinitionQuery): AxiosPromi
|
|||||||
* @param processInstanceId 流程实例id
|
* @param processInstanceId 流程实例id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const getProcessDefinitionListByKey = (key: string) => {
|
export const getListByKey = (key: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processDefinition/getProcessDefinitionListByKey/${key}`,
|
url: `/workflow/processDefinition/getListByKey/${key}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -30,9 +29,9 @@ export const getProcessDefinitionListByKey = (key: string) => {
|
|||||||
/**
|
/**
|
||||||
* 通过流程定义id获取流程图
|
* 通过流程定义id获取流程图
|
||||||
*/
|
*/
|
||||||
export const processDefinitionImage = (processDefinitionId: string): AxiosPromise<any> => {
|
export const definitionImage = (processDefinitionId: string): AxiosPromise<any> => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processDefinition/processDefinitionImage/${processDefinitionId}` + '?t' + Math.random(),
|
url: `/workflow/processDefinition/definitionImage/${processDefinitionId}` + '?t' + Math.random(),
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -42,9 +41,9 @@ export const processDefinitionImage = (processDefinitionId: string): AxiosPromis
|
|||||||
* @param processDefinitionId 流程定义id
|
* @param processDefinitionId 流程定义id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const processDefinitionXml = (processDefinitionId: string): AxiosPromise<ProcessDefinitionXmlVO> => {
|
export const definitionXml = (processDefinitionId: string): AxiosPromise<definitionXmlVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processDefinition/processDefinitionXml/${processDefinitionId}`,
|
url: `/workflow/processDefinition/definitionXml/${processDefinitionId}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -67,9 +66,9 @@ export const deleteProcessDefinition = (deploymentId: string, processDefinitionI
|
|||||||
* @param processDefinitionId 流程定义id
|
* @param processDefinitionId 流程定义id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const updateProcessDefState = (processDefinitionId: string) => {
|
export const updateDefinitionState = (processDefinitionId: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processDefinition/updateProcessDefState/${processDefinitionId}`,
|
url: `/workflow/processDefinition/updateDefinitionState/${processDefinitionId}`,
|
||||||
method: 'put'
|
method: 'put'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -104,20 +103,10 @@ export function deployProcessFile(data: any) {
|
|||||||
* @param fromProcessDefinitionId
|
* @param fromProcessDefinitionId
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const migrationProcessDefinition = (currentProcessDefinitionId: string, fromProcessDefinitionId: string) => {
|
export const migrationDefinition = (currentProcessDefinitionId: string, fromProcessDefinitionId: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processDefinition/migrationProcessDefinition/${currentProcessDefinitionId}/${fromProcessDefinitionId}`,
|
url: `/workflow/processDefinition/migrationDefinition/${currentProcessDefinitionId}/${fromProcessDefinitionId}`,
|
||||||
method: 'put'
|
method: 'put'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询流程定义列表
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const getProcessDefinitionList = () => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/getProcessDefinitionList`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
@ -16,7 +16,7 @@ export interface ProcessDefinitionVO extends BaseEntity {
|
|||||||
deploymentTime: string;
|
deploymentTime: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProcessDefinitionXmlVO {
|
export interface definitionXmlVO {
|
||||||
xml: string[];
|
xml: string[];
|
||||||
xmlStr: string;
|
xmlStr: string;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
import { string } from 'vue-types';
|
|
||||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询运行中实例列表
|
* 查询运行中实例列表
|
||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getProcessInstanceRunningByPage = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
export const getPageByRunning = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/processInstance/getProcessInstanceRunningByPage',
|
url: '/workflow/processInstance/getPageByRunning',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -22,9 +20,9 @@ export const getProcessInstanceRunningByPage = (query: ProcessInstanceQuery): Ax
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getProcessInstanceFinishByPage = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
export const getPageByFinish = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/processInstance/getProcessInstanceFinishByPage',
|
url: '/workflow/processInstance/getPageByFinish',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -33,9 +31,19 @@ export const getProcessInstanceFinishByPage = (query: ProcessInstanceQuery): Axi
|
|||||||
/**
|
/**
|
||||||
* 通过流程实例id获取历史流程图
|
* 通过流程实例id获取历史流程图
|
||||||
*/
|
*/
|
||||||
export const getHistoryProcessImage = (processInstanceId: string) => {
|
export const getHistoryImage = (processInstanceId: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/getHistoryProcessImage/${processInstanceId}` + '?t' + Math.random(),
|
url: `/workflow/processInstance/getHistoryImage/${processInstanceId}` + '?t' + Math.random(),
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过流程实例id获取历史流程图运行中,历史等节点
|
||||||
|
*/
|
||||||
|
export const getHistoryList = (processInstanceId: string) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/processInstance/getHistoryList/${processInstanceId}` + '?t' + Math.random(),
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -57,9 +65,9 @@ export const getHistoryRecord = (processInstanceId: string) => {
|
|||||||
* @param data 参数
|
* @param data 参数
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const deleteRuntimeProcessInst = (data: object) => {
|
export const deleteRunInstance = (data: object) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/deleteRuntimeProcessInst`,
|
url: `/workflow/processInstance/deleteRunInstance`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -70,9 +78,9 @@ export const deleteRuntimeProcessInst = (data: object) => {
|
|||||||
* @param processInstanceId 流程实例id
|
* @param processInstanceId 流程实例id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const deleteRuntimeProcessAndHisInst = (processInstanceId: string | string[]) => {
|
export const deleteRunAndHisInstance = (processInstanceId: string | string[]) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/deleteRuntimeProcessAndHisInst/${processInstanceId}`,
|
url: `/workflow/processInstance/deleteRunAndHisInstance/${processInstanceId}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -82,9 +90,9 @@ export const deleteRuntimeProcessAndHisInst = (processInstanceId: string | strin
|
|||||||
* @param processInstanceId 流程实例id
|
* @param processInstanceId 流程实例id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const deleteFinishProcessAndHisInst = (processInstanceId: string | string[]) => {
|
export const deleteFinishAndHisInstance = (processInstanceId: string | string[]) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/deleteFinishProcessAndHisInst/${processInstanceId}`,
|
url: `/workflow/processInstance/deleteFinishAndHisInstance/${processInstanceId}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -94,9 +102,9 @@ export const deleteFinishProcessAndHisInst = (processInstanceId: string | string
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getCurrentSubmitByPage = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
export const getPageByCurrent = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/processInstance/getCurrentSubmitByPage',
|
url: '/workflow/processInstance/getPageByCurrent',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
|
@ -6,9 +6,9 @@ import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getTaskWaitByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
export const getPageByTaskWait = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/task/getTaskWaitByPage',
|
url: '/workflow/task/getPageByTaskWait',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -19,9 +19,9 @@ export const getTaskWaitByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getTaskFinishByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
export const getPageByTaskFinish = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/task/getTaskFinishByPage',
|
url: '/workflow/task/getPageByTaskFinish',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -32,9 +32,9 @@ export const getTaskFinishByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> =>
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getTaskCopyByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
export const getPageByTaskCopy = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/task/getTaskCopyByPage',
|
url: '/workflow/task/getPageByTaskCopy',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -45,9 +45,9 @@ export const getTaskCopyByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getAllTaskWaitByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
export const getPageByAllTaskWait = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/task/getAllTaskWaitByPage',
|
url: '/workflow/task/getPageByAllTaskWait',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -58,9 +58,9 @@ export const getAllTaskWaitByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> =
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getAllTaskFinishByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
export const getPageByAllTaskFinish = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/task/getAllTaskFinishByPage',
|
url: '/workflow/task/getPageByAllTaskFinish',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -169,9 +169,9 @@ export const deleteMultiInstanceExecution = (data: object) => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改任务办理人
|
* 修改任务办理人
|
||||||
* @param taskIds
|
* @param taskIds
|
||||||
* @param userId
|
* @param userId
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const updateAssignee = (taskIds: Array<string>,userId: string) => {
|
export const updateAssignee = (taskIds: Array<string>,userId: string) => {
|
||||||
return request({
|
return request({
|
||||||
|
@ -7,9 +7,9 @@ import { UserVO } from '@/api/system/user/types';
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getWorkflowAddMultiListByPage = (query: object) => {
|
export const getPageByAddMultiInstance = (query: object) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/user/getWorkflowAddMultiListByPage',
|
url: '/workflow/user/getPageByAddMultiInstance',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -20,9 +20,9 @@ export const getWorkflowAddMultiListByPage = (query: object) => {
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getWorkflowDeleteMultiInstanceList = (taskId: string) => {
|
export const getListByDeleteMultiInstance = (taskId: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/user/getWorkflowDeleteMultiInstanceList/' + taskId,
|
url: '/workflow/user/getListByDeleteMultiInstance/' + taskId,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -44,9 +44,9 @@ export const getUserListByIds = (userIdList: any[]): AxiosPromise<UserVO[]> => {
|
|||||||
* @param query
|
* @param query
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getUserListByPage = (query: object) => {
|
export const getPageByUserList = (query: object) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/user/getUserListByPage',
|
url: '/workflow/user/getPageByUserList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getHistoryProcessImage, getHistoryRecord } from '@/api/workflow/processInstance';
|
import { getHistoryImage, getHistoryRecord } from '@/api/workflow/processInstance';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -99,7 +99,7 @@ const init = async (processInstanceId: string) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
historyList.value = [];
|
historyList.value = [];
|
||||||
graphicInfoVos.value = [];
|
graphicInfoVos.value = [];
|
||||||
getHistoryProcessImage(processInstanceId).then((res) => {
|
getHistoryImage(processInstanceId).then((res) => {
|
||||||
src.value = 'data:image/png;base64,' + res.data
|
src.value = 'data:image/png;base64,' + res.data
|
||||||
});
|
});
|
||||||
getHistoryRecord(processInstanceId).then((response) => {
|
getHistoryRecord(processInstanceId).then((response) => {
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
|
|
||||||
<script setup name="User" lang="ts">
|
<script setup name="User" lang="ts">
|
||||||
import { deptTreeSelect } from '@/api/system/user';
|
import { deptTreeSelect } from '@/api/system/user';
|
||||||
import { getWorkflowAddMultiListByPage, getWorkflowDeleteMultiInstanceList, getUserListByIds } from '@/api/workflow/workflowUser';
|
import { getPageByAddMultiInstance, getListByDeleteMultiInstance, getUserListByIds } from '@/api/workflow/workflowUser';
|
||||||
import { addMultiInstanceExecution, deleteMultiInstanceExecution } from '@/api/workflow/task';
|
import { addMultiInstanceExecution, deleteMultiInstanceExecution } from '@/api/workflow/task';
|
||||||
import { UserVO } from '@/api/system/user/types';
|
import { UserVO } from '@/api/system/user/types';
|
||||||
import { DeptVO } from '@/api/system/dept/types';
|
import { DeptVO } from '@/api/system/dept/types';
|
||||||
@ -151,7 +151,7 @@ const getAddMultiInstanceList = async (taskId: string, userIdList: Array<number
|
|||||||
visible.value = true;
|
visible.value = true;
|
||||||
queryParams.value.taskId = taskId;
|
queryParams.value.taskId = taskId;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await getWorkflowAddMultiListByPage(queryParams.value);
|
const res = await getPageByAddMultiInstance(queryParams.value);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
userList.value = res.rows;
|
userList.value = res.rows;
|
||||||
total.value = res.total;
|
total.value = res.total;
|
||||||
@ -173,7 +173,7 @@ const getAddMultiInstanceList = async (taskId: string, userIdList: Array<number
|
|||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await getWorkflowAddMultiListByPage(queryParams.value);
|
const res = await getPageByAddMultiInstance(queryParams.value);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
userList.value = res.rows;
|
userList.value = res.rows;
|
||||||
total.value = res.total;
|
total.value = res.total;
|
||||||
@ -199,7 +199,7 @@ const getDeleteMultiInstanceList = async (taskId: string) => {
|
|||||||
queryParams.value.taskId = taskId;
|
queryParams.value.taskId = taskId;
|
||||||
multiInstance.value = 'delete';
|
multiInstance.value = 'delete';
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
const res = await getWorkflowDeleteMultiInstanceList(taskId);
|
const res = await getListByDeleteMultiInstance(taskId);
|
||||||
taskList.value = res.data;
|
taskList.value = res.data;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
@ -359,4 +359,4 @@ defineExpose({
|
|||||||
getAddMultiInstanceList,
|
getAddMultiInstanceList,
|
||||||
getDeleteMultiInstanceList
|
getDeleteMultiInstanceList
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
<script setup name="User" lang="ts">
|
<script setup name="User" lang="ts">
|
||||||
import { deptTreeSelect } from '@/api/system/user';
|
import { deptTreeSelect } from '@/api/system/user';
|
||||||
import { getUserListByPage, getUserListByIds } from '@/api/workflow/workflowUser';
|
import { getPageByUserList, getUserListByIds } from '@/api/workflow/workflowUser';
|
||||||
import { UserVO } from '@/api/system/user/types';
|
import { UserVO } from '@/api/system/user/types';
|
||||||
import { DeptVO } from '@/api/system/dept/types';
|
import { DeptVO } from '@/api/system/dept/types';
|
||||||
import { ComponentInternalInstance } from 'vue';
|
import { ComponentInternalInstance } from 'vue';
|
||||||
@ -145,7 +145,7 @@ const getUserList = async (userIdList: Array<number | string>) => {
|
|||||||
userIds.value = userIdList;
|
userIds.value = userIdList;
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await getUserListByPage(queryParams.value);
|
const res = await getPageByUserList(queryParams.value);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
userList.value = res.rows;
|
userList.value = res.rows;
|
||||||
total.value = res.total;
|
total.value = res.total;
|
||||||
@ -167,7 +167,7 @@ const getUserList = async (userIdList: Array<number | string>) => {
|
|||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await getUserListByPage(queryParams.value);
|
const res = await getPageByUserList(queryParams.value);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
userList.value = res.rows;
|
userList.value = res.rows;
|
||||||
total.value = res.total;
|
total.value = res.total;
|
@ -194,13 +194,13 @@
|
|||||||
<script lang="ts" setup name="processDefinition">
|
<script lang="ts" setup name="processDefinition">
|
||||||
import {
|
import {
|
||||||
listProcessDefinition,
|
listProcessDefinition,
|
||||||
processDefinitionImage,
|
definitionImage,
|
||||||
processDefinitionXml,
|
definitionXml,
|
||||||
deleteProcessDefinition,
|
deleteProcessDefinition,
|
||||||
updateProcessDefState,
|
updateDefinitionState,
|
||||||
convertToModel,
|
convertToModel,
|
||||||
deployProcessFile,
|
deployProcessFile,
|
||||||
getProcessDefinitionListByKey
|
getListByKey
|
||||||
} from '@/api/workflow/processDefinition';
|
} from '@/api/workflow/processDefinition';
|
||||||
import ProcessPreview from './components/processPreview.vue';
|
import ProcessPreview from './components/processPreview.vue';
|
||||||
import { listCategory } from '@/api/workflow/category';
|
import { listCategory } from '@/api/workflow/category';
|
||||||
@ -320,7 +320,7 @@ const getList = async () => {
|
|||||||
const getProcessDefinitionHitoryList = async (id: string, key: string) => {
|
const getProcessDefinitionHitoryList = async (id: string, key: string) => {
|
||||||
processDefinitionDialog.visible = true;
|
processDefinitionDialog.visible = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const resp = await getProcessDefinitionListByKey(key);
|
const resp = await getListByKey(key);
|
||||||
if (resp.data && resp.data.length > 0) {
|
if (resp.data && resp.data.length > 0) {
|
||||||
processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id);
|
processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id);
|
||||||
}
|
}
|
||||||
@ -330,7 +330,7 @@ const getProcessDefinitionHitoryList = async (id: string, key: string) => {
|
|||||||
//预览图片
|
//预览图片
|
||||||
const clickPreviewImg = async (id: string) => {
|
const clickPreviewImg = async (id: string) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const resp = await processDefinitionImage(id);
|
const resp = await definitionImage(id);
|
||||||
if (previewRef.value) {
|
if (previewRef.value) {
|
||||||
url.value = [];
|
url.value = [];
|
||||||
url.value.push('data:image/png;base64,' + resp.data);
|
url.value.push('data:image/png;base64,' + resp.data);
|
||||||
@ -341,7 +341,7 @@ const clickPreviewImg = async (id: string) => {
|
|||||||
//预览xml
|
//预览xml
|
||||||
const clickPreviewXML = async (id: string) => {
|
const clickPreviewXML = async (id: string) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const resp = await processDefinitionXml(id);
|
const resp = await definitionXml(id);
|
||||||
if (previewRef.value) {
|
if (previewRef.value) {
|
||||||
url.value = [];
|
url.value = [];
|
||||||
url.value = resp.data.xml;
|
url.value = resp.data.xml;
|
||||||
@ -367,7 +367,7 @@ const handleProcessDefState = async (row: ProcessDefinitionVO) => {
|
|||||||
}
|
}
|
||||||
await proxy?.$modal.confirm(msg);
|
await proxy?.$modal.confirm(msg);
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await updateProcessDefState(row.id).finally(() => (loading.value = false));
|
await updateDefinitionState(row.id).finally(() => (loading.value = false));
|
||||||
await getList();
|
await getList();
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
};
|
};
|
||||||
|
@ -154,13 +154,13 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import {
|
||||||
getProcessInstanceRunningByPage,
|
getPageByRunning,
|
||||||
getProcessInstanceFinishByPage,
|
getPageByFinish,
|
||||||
deleteRuntimeProcessAndHisInst,
|
deleteRunAndHisInstance,
|
||||||
deleteFinishProcessAndHisInst,
|
deleteFinishAndHisInstance,
|
||||||
deleteRuntimeProcessInst
|
deleteRunInstance
|
||||||
} from '@/api/workflow/processInstance';
|
} from '@/api/workflow/processInstance';
|
||||||
import { getProcessDefinitionListByKey, migrationProcessDefinition } from '@/api/workflow/processDefinition';
|
import { getListByKey, migrationDefinition } from '@/api/workflow/processDefinition';
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||||
import { listCategory } from '@/api/workflow/category';
|
import { listCategory } from '@/api/workflow/category';
|
||||||
import { CategoryVO } from '@/api/workflow/category/types';
|
import { CategoryVO } from '@/api/workflow/category/types';
|
||||||
@ -282,7 +282,7 @@ const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
|||||||
//分页
|
//分页
|
||||||
const getProcessInstanceRunningList = () => {
|
const getProcessInstanceRunningList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getProcessInstanceRunningByPage(queryParams.value).then((resp) => {
|
getPageByRunning(queryParams.value).then((resp) => {
|
||||||
processInstanceList.value = resp.rows;
|
processInstanceList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -291,7 +291,7 @@ const getProcessInstanceRunningList = () => {
|
|||||||
//分页
|
//分页
|
||||||
const getProcessInstanceFinishList = () => {
|
const getProcessInstanceFinishList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getProcessInstanceFinishByPage(queryParams.value).then((resp) => {
|
getPageByFinish(queryParams.value).then((resp) => {
|
||||||
processInstanceList.value = resp.rows;
|
processInstanceList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -304,10 +304,10 @@ const handleDelete = async (row: any) => {
|
|||||||
await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?');
|
await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if ('running' === tab.value) {
|
if ('running' === tab.value) {
|
||||||
await deleteRuntimeProcessAndHisInst(id).finally(() => (loading.value = false));
|
await deleteRunAndHisInstance(id).finally(() => (loading.value = false));
|
||||||
getProcessInstanceRunningList();
|
getProcessInstanceRunningList();
|
||||||
} else {
|
} else {
|
||||||
await deleteFinishProcessAndHisInst(id).finally(() => (loading.value = false));
|
await deleteFinishAndHisInstance(id).finally(() => (loading.value = false));
|
||||||
getProcessInstanceFinishList();
|
getProcessInstanceFinishList();
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
@ -329,7 +329,7 @@ const handleInvalid = async (row: ProcessInstanceVO) => {
|
|||||||
processInstanceId: row.id,
|
processInstanceId: row.id,
|
||||||
deleteReason: deleteReason.value
|
deleteReason: deleteReason.value
|
||||||
};
|
};
|
||||||
await deleteRuntimeProcessInst(param).finally(() => (loading.value = false));
|
await deleteRunInstance(param).finally(() => (loading.value = false));
|
||||||
getProcessInstanceRunningList();
|
getProcessInstanceRunningList();
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ const getProcessDefinitionHitoryList = (id: string, key: string) => {
|
|||||||
processDefinitionDialog.visible = true;
|
processDefinitionDialog.visible = true;
|
||||||
processDefinitionId.value = id;
|
processDefinitionId.value = id;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getProcessDefinitionListByKey(key).then((resp) => {
|
getListByKey(key).then((resp) => {
|
||||||
if (resp.data && resp.data.length > 0) {
|
if (resp.data && resp.data.length > 0) {
|
||||||
processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id);
|
processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id);
|
||||||
}
|
}
|
||||||
@ -353,7 +353,7 @@ const getProcessDefinitionHitoryList = (id: string, key: string) => {
|
|||||||
const handleChange = async (id: string) => {
|
const handleChange = async (id: string) => {
|
||||||
await proxy?.$modal.confirm('是否确认切换?');
|
await proxy?.$modal.confirm('是否确认切换?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
migrationProcessDefinition(processDefinitionId.value, id).then((resp) => {
|
migrationDefinition(processDefinitionId.value, id).then((resp) => {
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
getProcessInstanceRunningList();
|
getProcessInstanceRunningList();
|
||||||
processDefinitionDialog.visible = false;
|
processDefinitionDialog.visible = false;
|
||||||
|
@ -101,17 +101,17 @@
|
|||||||
<submitVerify ref="submitVerifyRef" :task-id="taskId" @submit-callback="handleQuery" />
|
<submitVerify ref="submitVerifyRef" :task-id="taskId" @submit-callback="handleQuery" />
|
||||||
<!-- 加签组件 -->
|
<!-- 加签组件 -->
|
||||||
<multiInstanceUser ref="multiInstanceUserRef" :title="title" @submit-callback="handleQuery" />
|
<multiInstanceUser ref="multiInstanceUserRef" :title="title" @submit-callback="handleQuery" />
|
||||||
<!-- 加签组件 -->
|
<!-- 选人组件 -->
|
||||||
<SysUser ref="sysUserRef" :multiple="true" @submit-callback="submitCallback" />
|
<selectSysUser ref="selectSysUserRef" :multiple="true" @submit-callback="submitCallback" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getAllTaskWaitByPage, getAllTaskFinishByPage, updateAssignee } from '@/api/workflow/task';
|
import { getPageByAllTaskWait, getPageByAllTaskFinish, updateAssignee } from '@/api/workflow/task';
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||||
import MultiInstanceUser from '@/components/Process/multiInstance-user.vue';
|
import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue';
|
||||||
import SysUser from '@/components/Process/sys-user.vue';
|
import SelectSysUser from '@/components/Process/selectSysUser.vue';
|
||||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||||
//提交组件
|
//提交组件
|
||||||
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
||||||
@ -120,7 +120,7 @@ const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
|
|||||||
//加签组件
|
//加签组件
|
||||||
const multiInstanceUserRef = ref<InstanceType<typeof MultiInstanceUser>>();
|
const multiInstanceUserRef = ref<InstanceType<typeof MultiInstanceUser>>();
|
||||||
//选人组件
|
//选人组件
|
||||||
const sysUserRef = ref<InstanceType<typeof SysUser>>();
|
const selectSysUserRef = ref<InstanceType<typeof SelectSysUser>>();
|
||||||
|
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@ -205,7 +205,7 @@ const changeTab = async (data: string) => {
|
|||||||
//分页
|
//分页
|
||||||
const getWaitingList = () => {
|
const getWaitingList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getAllTaskWaitByPage(queryParams.value).then((resp) => {
|
getPageByAllTaskWait(queryParams.value).then((resp) => {
|
||||||
taskList.value = resp.rows;
|
taskList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -213,22 +213,22 @@ const getWaitingList = () => {
|
|||||||
};
|
};
|
||||||
const getFinishList = () => {
|
const getFinishList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getAllTaskFinishByPage(queryParams.value).then((resp) => {
|
getPageByAllTaskFinish(queryParams.value).then((resp) => {
|
||||||
taskList.value = resp.rows;
|
taskList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleUpdate = () => {
|
const handleUpdate = () => {
|
||||||
if (sysUserRef.value) {
|
if (selectSysUserRef.value) {
|
||||||
sysUserRef.value.getUserList([]);
|
selectSysUserRef.value.getUserList([]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//修改办理人
|
//修改办理人
|
||||||
const submitCallback = (data) => {
|
const submitCallback = (data) => {
|
||||||
if (data && data.value.length > 0) {
|
if (data && data.value.length > 0) {
|
||||||
updateAssignee(ids.value, data.value[0].userId).then((resp) => {
|
updateAssignee(ids.value, data.value[0].userId).then((resp) => {
|
||||||
sysUserRef.value.close();
|
selectSysUserRef.value.close();
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
handleQuery();
|
handleQuery();
|
||||||
});
|
});
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getCurrentSubmitByPage, deleteRuntimeProcessAndHisInst, cancelProcessApply } from '@/api/workflow/processInstance';
|
import { getPageByCurrent, deleteRunAndHisInstance, cancelProcessApply } from '@/api/workflow/processInstance';
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||||
import { listCategory } from '@/api/workflow/category';
|
import { listCategory } from '@/api/workflow/category';
|
||||||
@ -218,7 +218,7 @@ const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
|||||||
//分页
|
//分页
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getCurrentSubmitByPage(queryParams.value).then((resp) => {
|
getPageByCurrent(queryParams.value).then((resp) => {
|
||||||
processInstanceList.value = resp.rows;
|
processInstanceList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -231,7 +231,7 @@ const handleDelete = async (row: ProcessInstanceVO) => {
|
|||||||
await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?');
|
await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if ('running' === tab.value) {
|
if ('running' === tab.value) {
|
||||||
await deleteRuntimeProcessAndHisInst(id).finally(() => (loading.value = false));
|
await deleteRunAndHisInstance(id).finally(() => (loading.value = false));
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getTaskCopyByPage} from '@/api/workflow/task';
|
import { getPageByTaskCopy} from '@/api/workflow/task';
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||||
//审批记录组件
|
//审批记录组件
|
||||||
@ -131,7 +131,7 @@ const handleSelectionChange = (selection: any) => {
|
|||||||
//分页
|
//分页
|
||||||
const getTaskCopyList = () => {
|
const getTaskCopyList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getTaskCopyByPage(queryParams.value).then((resp) => {
|
getPageByTaskCopy(queryParams.value).then((resp) => {
|
||||||
taskList.value = resp.rows;
|
taskList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getTaskFinishByPage } from '@/api/workflow/task';
|
import { getPageByTaskFinish } from '@/api/workflow/task';
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||||
//审批记录组件
|
//审批记录组件
|
||||||
@ -119,7 +119,7 @@ const handleSelectionChange = (selection: any) => {
|
|||||||
};
|
};
|
||||||
const getFinishList = () => {
|
const getFinishList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getTaskFinishByPage(queryParams.value).then((resp) => {
|
getPageByTaskFinish(queryParams.value).then((resp) => {
|
||||||
taskList.value = resp.rows;
|
taskList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getTaskWaitByPage, claim, returnTask } from '@/api/workflow/task';
|
import { getPageByTaskWait, claim, returnTask } from '@/api/workflow/task';
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||||
@ -150,7 +150,7 @@ const handleSelectionChange = (selection: any) => {
|
|||||||
//分页
|
//分页
|
||||||
const getWaitingList = () => {
|
const getWaitingList = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getTaskWaitByPage(queryParams.value).then((resp) => {
|
getPageByTaskWait(queryParams.value).then((resp) => {
|
||||||
taskList.value = resp.rows;
|
taskList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user