| | |
| | | </el-row> |
| | | </template> |
| | | |
| | | <el-table v-loading="loading" :data="processInstanceList" @selection-change="handleSelectionChange"> |
| | | <el-table v-loading="loading" border :data="processInstanceList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column fixed align="center" type="index" label="序号" width="50"></el-table-column> |
| | | <el-table-column v-if="false" fixed align="center" prop="id" label="id"></el-table-column> |
| | | <el-table-column fixed align="center" prop="processDefinitionName" label="流程定义名称"></el-table-column> |
| | | <el-table-column fixed align="center" prop="processDefinitionKey" label="流程定义KEY"></el-table-column> |
| | | <el-table-column align="center" type="index" label="序号" width="60"></el-table-column> |
| | | <el-table-column align="center" prop="processDefinitionName" label="流程定义名称"></el-table-column> |
| | | <el-table-column align="center" prop="processDefinitionKey" label="流程定义KEY"></el-table-column> |
| | | <el-table-column align="center" prop="processDefinitionVersion" label="版本号" width="90"> |
| | | <template #default="scope"> v{{ scope.row.processDefinitionVersion }}.0</template> |
| | | </el-table-column> |
| | |
| | | </el-row> |
| | | <el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible" :title="processDefinitionDialog.title" width="70%"> |
| | | <el-table v-loading="loading" :data="processDefinitionHistoryList"> |
| | | <el-table-column fixed align="center" type="index" label="序号" width="50"></el-table-column> |
| | | <el-table-column fixed align="center" type="index" label="序号" width="60"></el-table-column> |
| | | <el-table-column fixed align="center" prop="name" label="流程定义名称"></el-table-column> |
| | | <el-table-column align="center" prop="key" label="标识Key"></el-table-column> |
| | | <el-table-column align="center" prop="version" label="版本号" width="90"> |
| | |
| | | |
| | | <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; |