This commit is contained in:
2025-12-27 12:52:38 +08:00
parent b674b78621
commit 2529c5fa6f
44 changed files with 942 additions and 1196 deletions

View File

@@ -57,11 +57,11 @@
min-width="180" />
<el-table-column prop="status" :label="t('workbenchPage.pending.table.status')" min-width="140">
<template #default="scope">
<el-tag v-if="scope.row.status == 1" type="primary">待审批</el-tag>
<el-tag v-if="scope.row.status == 1" type="primary">进行中</el-tag>
<el-tag v-else type="success">已结束</el-tag>
</template>
</el-table-column>
<el-table-column :label="t('workbenchPage.pending.table.actions')" width="120" fixed="right">
<el-table-column label="查看" width="120" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="handleView(row)">
{{ t('workbenchPage.pending.actions.view') }}
@@ -75,6 +75,27 @@
<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"></pagination>
</el-card>
</div>
<!-- <el-dialog v-model="visible" width="80%" title="流程节点">-->
<!-- <flow-node-format :selectUserNodeId="flowUserData.root.map(item => item.id)" :flow-id="flowIdCon" ref="flowNodeFormatRef"></flow-node-format>-->
<!-- </el-dialog>-->
<!-- v-if="visible" 确保关闭时销毁组件 -->
<el-drawer v-model="visible" v-if="visible" direction="rtl" size="600px">
<template #header>
<h3>{{ currentData?.name }}</h3>
</template>
<template #default>
<el-card class="box-card">
<FormCreate :rule="rule" v-model="formData" v-model:api="fApi" />
</el-card>
<flow-node-format
:disableSelect="true"
:processInstanceId="currentData.processInstanceId"
:flow-id="currentData.flowId"
ref="flowNodeFormatRef"
:disabled="true"
></flow-node-format>
</template>
</el-drawer>
</div>
</template>
@@ -86,13 +107,15 @@ import { queryMineStarted } from '/@/api/flow/task';
import { BasicTableProps, useTable } from '/@/hooks/table';
import { useUserInfo } from '/@/stores/userInfo';
import { flowNameOptions } from '/@/hooks/enums';
import { getProcessInfoByIdAPI } from '/@/api/workbench/miOwLibr/ownershipCreate';
import FlowNodeFormat from "/@/views/flow/form/tools/FlowNodeFormatData.vue";
import FormCreate from "/@/views/flow/workflow/components/FormCreate.vue";
const { t } = useI18n();
const message = useMessage();
const loading = ref(false);
const stores = useUserInfo();
const { userInfos } = storeToRefs(stores);
const state: BasicTableProps = reactive<BasicTableProps>({
pageList: queryMineStarted,
queryForm: {
@@ -117,9 +140,18 @@ const handleSearch = () => {
state.queryForm.title = keyword.value
getDataList(true)
};
const currentData = ref<any>(null);
const visible = ref(false);
/**查看流程*/
const handleView = (row: any) => {
message.info(`${row.title} ${t('workbenchPage.pending.messages.viewPlaceholder')}`);
getProcessInfoByIdAPI(row.id).then(res =>{
currentData.value = {
name: res.data.name,
processInstanceId: res.data.processInstanceId,
flowId: res.data.flowId
}
visible.value = true
})
};
const handleReview = (row: any) => {