mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-11-02 13:31:50 +08:00
fix 修复 定时事件任务 表单无法查看流程监控问题
This commit is contained in:
parent
b1dd2aabc8
commit
4cf2fe456c
@ -32,10 +32,11 @@ export const pageByFinish = (query: FlowInstanceQuery): AxiosPromise<PageResult<
|
|||||||
/**
|
/**
|
||||||
* 通过业务id获取历史流程图
|
* 通过业务id获取历史流程图
|
||||||
*/
|
*/
|
||||||
export const flowHisTaskList = (businessId: string | number) => {
|
export const flowHisTaskList = (ids: { businessId?: string | number; instanceId?: string | number }) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/instance/flowHisTaskList/${businessId}?t=${Math.random()}`,
|
url: '/workflow/instance/flowHisTaskList',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: ids
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ export default {
|
|||||||
path: routerJumpVo.formPath,
|
path: routerJumpVo.formPath,
|
||||||
query: {
|
query: {
|
||||||
id: routerJumpVo.businessId,
|
id: routerJumpVo.businessId,
|
||||||
|
instanceId: routerJumpVo.instanceId,
|
||||||
type: routerJumpVo.type,
|
type: routerJumpVo.type,
|
||||||
taskId: routerJumpVo.taskId
|
taskId: routerJumpVo.taskId
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
export interface RouterJumpVo {
|
export interface RouterJumpVo {
|
||||||
businessId: string;
|
businessId: string;
|
||||||
|
instanceId?: string | number;
|
||||||
taskId: string | number;
|
taskId: string | number;
|
||||||
type: string;
|
type: string;
|
||||||
formCustom: string;
|
formCustom: string;
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<el-button v-if="approvalButtonShow" :loading="props.buttonLoading" type="primary" @click="approvalVerifyOpen">
|
<el-button v-if="approvalButtonShow" :loading="props.buttonLoading" type="primary" @click="approvalVerifyOpen">
|
||||||
审批
|
审批
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="props.id && props.status !== 'draft'" type="primary" @click="handleApprovalRecord">
|
<el-button v-if="(props.id || props.businessId || props.instanceId) && props.status !== 'draft'" type="primary" @click="handleApprovalRecord">
|
||||||
流程进度
|
流程进度
|
||||||
</el-button>
|
</el-button>
|
||||||
<slot />
|
<slot />
|
||||||
@ -37,6 +37,8 @@ const props = defineProps({
|
|||||||
pageType: propTypes.string.def(''),
|
pageType: propTypes.string.def(''),
|
||||||
buttonLoading: propTypes.bool.def(false),
|
buttonLoading: propTypes.bool.def(false),
|
||||||
id: propTypes.string.def('') || propTypes.number.def(),
|
id: propTypes.string.def('') || propTypes.number.def(),
|
||||||
|
businessId: propTypes.string.def(''),
|
||||||
|
instanceId: propTypes.string.def(''),
|
||||||
mode: propTypes.bool.def(false)
|
mode: propTypes.bool.def(false)
|
||||||
});
|
});
|
||||||
const emits = defineEmits(['submitForm', 'approvalVerifyOpen', 'handleApprovalRecord']);
|
const emits = defineEmits(['submitForm', 'approvalVerifyOpen', 'handleApprovalRecord']);
|
||||||
|
|||||||
@ -113,12 +113,12 @@ const tabActiveName = ref('image');
|
|||||||
const insId = ref(null);
|
const insId = ref(null);
|
||||||
|
|
||||||
//初始化查询审批记录
|
//初始化查询审批记录
|
||||||
const init = async (businessId: string | number) => {
|
const init = async (ids: { businessId?: string | number; instanceId?: string | number }) => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
tabActiveName.value = 'image';
|
tabActiveName.value = 'image';
|
||||||
historyList.value = [];
|
historyList.value = [];
|
||||||
flowHisTaskList(businessId).then(resp => {
|
flowHisTaskList(ids).then(resp => {
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
historyList.value = resp.data.list;
|
historyList.value = resp.data.list;
|
||||||
insId.value = resp.data.instanceId;
|
insId.value = resp.data.instanceId;
|
||||||
|
|||||||
@ -9,6 +9,8 @@
|
|||||||
@handleApprovalRecord="handleApprovalRecord"
|
@handleApprovalRecord="handleApprovalRecord"
|
||||||
:buttonLoading="buttonLoading"
|
:buttonLoading="buttonLoading"
|
||||||
:id="form.id"
|
:id="form.id"
|
||||||
|
:business-id="routeParams.id"
|
||||||
|
:instance-id="routeParams.instanceId"
|
||||||
:status="form.status"
|
:status="form.status"
|
||||||
:pageType="routeParams.type"
|
:pageType="routeParams.type"
|
||||||
:mode="false"
|
:mode="false"
|
||||||
@ -271,7 +273,7 @@ const handleStartWorkFlow = async (data: LeaveForm) => {
|
|||||||
};
|
};
|
||||||
//审批记录
|
//审批记录
|
||||||
const handleApprovalRecord = () => {
|
const handleApprovalRecord = () => {
|
||||||
approvalRecordRef.value.init(form.value.id);
|
approvalRecordRef.value?.init({ businessId: routeParams.value.id || form.value.id, instanceId: routeParams.value.instanceId });
|
||||||
};
|
};
|
||||||
//提交回调
|
//提交回调
|
||||||
const submitCallback = async () => {
|
const submitCallback = async () => {
|
||||||
|
|||||||
@ -491,6 +491,7 @@ const cancelPopover = async (index: number) => {
|
|||||||
const handleView = row => {
|
const handleView = row => {
|
||||||
const routerJumpVo = reactive<RouterJumpVo>({
|
const routerJumpVo = reactive<RouterJumpVo>({
|
||||||
businessId: row.businessId,
|
businessId: row.businessId,
|
||||||
|
instanceId: row.id,
|
||||||
taskId: row.id,
|
taskId: row.id,
|
||||||
type: 'view',
|
type: 'view',
|
||||||
formCustom: row.formCustom,
|
formCustom: row.formCustom,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user