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获取历史流程图
|
||||
*/
|
||||
export const flowHisTaskList = (businessId: string | number) => {
|
||||
export const flowHisTaskList = (ids: { businessId?: string | number; instanceId?: string | number }) => {
|
||||
return request({
|
||||
url: `/workflow/instance/flowHisTaskList/${businessId}?t=${Math.random()}`,
|
||||
method: 'get'
|
||||
url: '/workflow/instance/flowHisTaskList',
|
||||
method: 'get',
|
||||
params: ids
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ export default {
|
||||
path: routerJumpVo.formPath,
|
||||
query: {
|
||||
id: routerJumpVo.businessId,
|
||||
instanceId: routerJumpVo.instanceId,
|
||||
type: routerJumpVo.type,
|
||||
taskId: routerJumpVo.taskId
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
export interface RouterJumpVo {
|
||||
businessId: string;
|
||||
instanceId?: string | number;
|
||||
taskId: string | number;
|
||||
type: string;
|
||||
formCustom: string;
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<el-button v-if="approvalButtonShow" :loading="props.buttonLoading" type="primary" @click="approvalVerifyOpen">
|
||||
审批
|
||||
</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>
|
||||
<slot />
|
||||
@ -37,6 +37,8 @@ const props = defineProps({
|
||||
pageType: propTypes.string.def(''),
|
||||
buttonLoading: propTypes.bool.def(false),
|
||||
id: propTypes.string.def('') || propTypes.number.def(),
|
||||
businessId: propTypes.string.def(''),
|
||||
instanceId: propTypes.string.def(''),
|
||||
mode: propTypes.bool.def(false)
|
||||
});
|
||||
const emits = defineEmits(['submitForm', 'approvalVerifyOpen', 'handleApprovalRecord']);
|
||||
|
||||
@ -113,12 +113,12 @@ const tabActiveName = ref('image');
|
||||
const insId = ref(null);
|
||||
|
||||
//初始化查询审批记录
|
||||
const init = async (businessId: string | number) => {
|
||||
const init = async (ids: { businessId?: string | number; instanceId?: string | number }) => {
|
||||
visible.value = true;
|
||||
loading.value = true;
|
||||
tabActiveName.value = 'image';
|
||||
historyList.value = [];
|
||||
flowHisTaskList(businessId).then(resp => {
|
||||
flowHisTaskList(ids).then(resp => {
|
||||
if (resp.data) {
|
||||
historyList.value = resp.data.list;
|
||||
insId.value = resp.data.instanceId;
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
@handleApprovalRecord="handleApprovalRecord"
|
||||
:buttonLoading="buttonLoading"
|
||||
:id="form.id"
|
||||
:business-id="routeParams.id"
|
||||
:instance-id="routeParams.instanceId"
|
||||
:status="form.status"
|
||||
:pageType="routeParams.type"
|
||||
:mode="false"
|
||||
@ -271,7 +273,7 @@ const handleStartWorkFlow = async (data: LeaveForm) => {
|
||||
};
|
||||
//审批记录
|
||||
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 () => {
|
||||
|
||||
@ -491,6 +491,7 @@ const cancelPopover = async (index: number) => {
|
||||
const handleView = row => {
|
||||
const routerJumpVo = reactive<RouterJumpVo>({
|
||||
businessId: row.businessId,
|
||||
instanceId: row.id,
|
||||
taskId: row.id,
|
||||
type: 'view',
|
||||
formCustom: row.formCustom,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user