| | |
| | | |
| | | <script lang="ts" setup> |
| | | import { |
| | | getProcessInstanceRunningByPage, |
| | | getProcessInstanceFinishByPage, |
| | | deleteRuntimeProcessAndHisInst, |
| | | deleteFinishProcessAndHisInst, |
| | | deleteRuntimeProcessInst |
| | | getPageByRunning, |
| | | getPageByFinish, |
| | | deleteRunAndHisInstance, |
| | | deleteFinishAndHisInstance, |
| | | deleteRunInstance |
| | | } 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 { listCategory } from '@/api/workflow/category'; |
| | | import { CategoryVO } from '@/api/workflow/category/types'; |
| | |
| | | //分页 |
| | | const getProcessInstanceRunningList = () => { |
| | | loading.value = true; |
| | | getProcessInstanceRunningByPage(queryParams.value).then((resp) => { |
| | | getPageByRunning(queryParams.value).then((resp) => { |
| | | processInstanceList.value = resp.rows; |
| | | total.value = resp.total; |
| | | loading.value = false; |
| | |
| | | //分页 |
| | | const getProcessInstanceFinishList = () => { |
| | | loading.value = true; |
| | | getProcessInstanceFinishByPage(queryParams.value).then((resp) => { |
| | | getPageByFinish(queryParams.value).then((resp) => { |
| | | processInstanceList.value = resp.rows; |
| | | total.value = resp.total; |
| | | loading.value = false; |
| | |
| | | await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?'); |
| | | loading.value = true; |
| | | if ('running' === tab.value) { |
| | | await deleteRuntimeProcessAndHisInst(id).finally(() => (loading.value = false)); |
| | | await deleteRunAndHisInstance(id).finally(() => (loading.value = false)); |
| | | getProcessInstanceRunningList(); |
| | | } else { |
| | | await deleteFinishProcessAndHisInst(id).finally(() => (loading.value = false)); |
| | | await deleteFinishAndHisInstance(id).finally(() => (loading.value = false)); |
| | | getProcessInstanceFinishList(); |
| | | } |
| | | proxy?.$modal.msgSuccess('删除成功'); |
| | |
| | | processInstanceId: row.id, |
| | | deleteReason: deleteReason.value |
| | | }; |
| | | await deleteRuntimeProcessInst(param).finally(() => (loading.value = false)); |
| | | await deleteRunInstance(param).finally(() => (loading.value = false)); |
| | | getProcessInstanceRunningList(); |
| | | proxy?.$modal.msgSuccess('操作成功'); |
| | | } |
| | |
| | | processDefinitionDialog.visible = true; |
| | | processDefinitionId.value = id; |
| | | loading.value = true; |
| | | getProcessDefinitionListByKey(key).then((resp) => { |
| | | getListByKey(key).then((resp) => { |
| | | if (resp.data && resp.data.length > 0) { |
| | | processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id); |
| | | } |
| | |
| | | const handleChange = async (id: string) => { |
| | | await proxy?.$modal.confirm('是否确认切换?'); |
| | | loading.value = true; |
| | | migrationProcessDefinition(processDefinitionId.value, id).then((resp) => { |
| | | migrationDefinition(processDefinitionId.value, id).then((resp) => { |
| | | proxy?.$modal.msgSuccess('操作成功'); |
| | | getProcessInstanceRunningList(); |
| | | processDefinitionDialog.visible = false; |