update 优化 工作流代码与接口命名
This commit is contained in:
@ -194,13 +194,13 @@
|
||||
<script lang="ts" setup name="processDefinition">
|
||||
import {
|
||||
listProcessDefinition,
|
||||
processDefinitionImage,
|
||||
processDefinitionXml,
|
||||
definitionImage,
|
||||
definitionXml,
|
||||
deleteProcessDefinition,
|
||||
updateProcessDefState,
|
||||
updateDefinitionState,
|
||||
convertToModel,
|
||||
deployProcessFile,
|
||||
getProcessDefinitionListByKey
|
||||
getListByKey
|
||||
} from '@/api/workflow/processDefinition';
|
||||
import ProcessPreview from './components/processPreview.vue';
|
||||
import { listCategory } from '@/api/workflow/category';
|
||||
@ -320,7 +320,7 @@ const getList = async () => {
|
||||
const getProcessDefinitionHitoryList = async (id: string, key: string) => {
|
||||
processDefinitionDialog.visible = true;
|
||||
loading.value = true;
|
||||
const resp = await getProcessDefinitionListByKey(key);
|
||||
const resp = await getListByKey(key);
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
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) => {
|
||||
loading.value = true;
|
||||
const resp = await processDefinitionImage(id);
|
||||
const resp = await definitionImage(id);
|
||||
if (previewRef.value) {
|
||||
url.value = [];
|
||||
url.value.push('data:image/png;base64,' + resp.data);
|
||||
@ -341,7 +341,7 @@ const clickPreviewImg = async (id: string) => {
|
||||
//预览xml
|
||||
const clickPreviewXML = async (id: string) => {
|
||||
loading.value = true;
|
||||
const resp = await processDefinitionXml(id);
|
||||
const resp = await definitionXml(id);
|
||||
if (previewRef.value) {
|
||||
url.value = [];
|
||||
url.value = resp.data.xml;
|
||||
@ -367,7 +367,7 @@ const handleProcessDefState = async (row: ProcessDefinitionVO) => {
|
||||
}
|
||||
await proxy?.$modal.confirm(msg);
|
||||
loading.value = true;
|
||||
await updateProcessDefState(row.id).finally(() => (loading.value = false));
|
||||
await updateDefinitionState(row.id).finally(() => (loading.value = false));
|
||||
await getList();
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
};
|
||||
|
@ -154,13 +154,13 @@
|
||||
|
||||
<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';
|
||||
@ -282,7 +282,7 @@ const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
||||
//分页
|
||||
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;
|
||||
@ -291,7 +291,7 @@ const getProcessInstanceRunningList = () => {
|
||||
//分页
|
||||
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;
|
||||
@ -304,10 +304,10 @@ const handleDelete = async (row: any) => {
|
||||
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('删除成功');
|
||||
@ -329,7 +329,7 @@ const handleInvalid = async (row: ProcessInstanceVO) => {
|
||||
processInstanceId: row.id,
|
||||
deleteReason: deleteReason.value
|
||||
};
|
||||
await deleteRuntimeProcessInst(param).finally(() => (loading.value = false));
|
||||
await deleteRunInstance(param).finally(() => (loading.value = false));
|
||||
getProcessInstanceRunningList();
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
@ -342,7 +342,7 @@ const getProcessDefinitionHitoryList = (id: string, key: string) => {
|
||||
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);
|
||||
}
|
||||
@ -353,7 +353,7 @@ const getProcessDefinitionHitoryList = (id: string, key: string) => {
|
||||
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;
|
||||
|
@ -101,17 +101,17 @@
|
||||
<submitVerify ref="submitVerifyRef" :task-id="taskId" @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>
|
||||
</template>
|
||||
|
||||
<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 SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||
import MultiInstanceUser from '@/components/Process/multiInstance-user.vue';
|
||||
import SysUser from '@/components/Process/sys-user.vue';
|
||||
import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue';
|
||||
import SelectSysUser from '@/components/Process/selectSysUser.vue';
|
||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||
//提交组件
|
||||
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
||||
@ -120,7 +120,7 @@ const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
|
||||
//加签组件
|
||||
const multiInstanceUserRef = ref<InstanceType<typeof MultiInstanceUser>>();
|
||||
//选人组件
|
||||
const sysUserRef = ref<InstanceType<typeof SysUser>>();
|
||||
const selectSysUserRef = ref<InstanceType<typeof SelectSysUser>>();
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
@ -205,7 +205,7 @@ const changeTab = async (data: string) => {
|
||||
//分页
|
||||
const getWaitingList = () => {
|
||||
loading.value = true;
|
||||
getAllTaskWaitByPage(queryParams.value).then((resp) => {
|
||||
getPageByAllTaskWait(queryParams.value).then((resp) => {
|
||||
taskList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
@ -213,22 +213,22 @@ const getWaitingList = () => {
|
||||
};
|
||||
const getFinishList = () => {
|
||||
loading.value = true;
|
||||
getAllTaskFinishByPage(queryParams.value).then((resp) => {
|
||||
getPageByAllTaskFinish(queryParams.value).then((resp) => {
|
||||
taskList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
const handleUpdate = () => {
|
||||
if (sysUserRef.value) {
|
||||
sysUserRef.value.getUserList([]);
|
||||
if (selectSysUserRef.value) {
|
||||
selectSysUserRef.value.getUserList([]);
|
||||
}
|
||||
};
|
||||
//修改办理人
|
||||
const submitCallback = (data) => {
|
||||
if (data && data.value.length > 0) {
|
||||
updateAssignee(ids.value, data.value[0].userId).then((resp) => {
|
||||
sysUserRef.value.close();
|
||||
selectSysUserRef.value.close();
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
handleQuery();
|
||||
});
|
||||
|
@ -107,7 +107,7 @@
|
||||
</template>
|
||||
|
||||
<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 SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||
import { listCategory } from '@/api/workflow/category';
|
||||
@ -218,7 +218,7 @@ const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
||||
//分页
|
||||
const getList = () => {
|
||||
loading.value = true;
|
||||
getCurrentSubmitByPage(queryParams.value).then((resp) => {
|
||||
getPageByCurrent(queryParams.value).then((resp) => {
|
||||
processInstanceList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
@ -231,7 +231,7 @@ const handleDelete = async (row: ProcessInstanceVO) => {
|
||||
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));
|
||||
getList();
|
||||
}
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
|
@ -73,7 +73,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getTaskCopyByPage} from '@/api/workflow/task';
|
||||
import { getPageByTaskCopy} from '@/api/workflow/task';
|
||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||
//审批记录组件
|
||||
@ -131,7 +131,7 @@ const handleSelectionChange = (selection: any) => {
|
||||
//分页
|
||||
const getTaskCopyList = () => {
|
||||
loading.value = true;
|
||||
getTaskCopyByPage(queryParams.value).then((resp) => {
|
||||
getPageByTaskCopy(queryParams.value).then((resp) => {
|
||||
taskList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
|
@ -62,7 +62,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getTaskFinishByPage } from '@/api/workflow/task';
|
||||
import { getPageByTaskFinish } from '@/api/workflow/task';
|
||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||
//审批记录组件
|
||||
@ -119,7 +119,7 @@ const handleSelectionChange = (selection: any) => {
|
||||
};
|
||||
const getFinishList = () => {
|
||||
loading.value = true;
|
||||
getTaskFinishByPage(queryParams.value).then((resp) => {
|
||||
getPageByTaskFinish(queryParams.value).then((resp) => {
|
||||
taskList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
|
@ -89,7 +89,7 @@
|
||||
</template>
|
||||
|
||||
<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 SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||
@ -150,7 +150,7 @@ const handleSelectionChange = (selection: any) => {
|
||||
//分页
|
||||
const getWaitingList = () => {
|
||||
loading.value = true;
|
||||
getTaskWaitByPage(queryParams.value).then((resp) => {
|
||||
getPageByTaskWait(queryParams.value).then((resp) => {
|
||||
taskList.value = resp.rows;
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
|
Reference in New Issue
Block a user