update 优化 工作流代码与接口命名

This commit is contained in:
疯狂的狮子Li
2024-03-07 14:23:24 +08:00
parent 0108df1334
commit e7ff829502
15 changed files with 107 additions and 110 deletions

View File

@ -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();
});

View File

@ -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('删除成功');

View File

@ -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;

View File

@ -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;

View File

@ -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;