feat(bpm): 添加处理待阅功能并优化流程实例详情页

- 新增 handleProcessInstanceCC 接口用于处理待阅操作
- 在流程实例详情页初始化时调用待阅处理接口
- 优化页面按钮图标与文字的布局展示
- 调整打印表单相关逻辑及页面结构
- 统一接口请求参数格式并移除多余空格
- 修复表单变量合并逻辑并优化对象展开语法
- 更新组件引用路径及函数调用方式一致性
This commit is contained in:
2025-12-11 17:06:30 +08:00
parent e5110e624c
commit f139835ad4
2 changed files with 71 additions and 56 deletions

View File

@@ -68,3 +68,7 @@ export const createProcessInstanceCC = async (data) => {
export const getProcessInstanceCCPage = async (params) => {
return await request.get({url: '/bpm/process-instance/cc/my-page', params})
}
export const handleProcessInstanceCC = async (processInstanceId: string) => {
return await request.post({url: '/bpm/process-instance/cc/process-current-user-copy/' + processInstanceId})
}

View File

@@ -132,6 +132,7 @@ const { proxy } = getCurrentInstance() as any
const userId = useUserStore().getUser.id // 当前登录的编号
const id = query.id as unknown as number // 流程实例的编号
const read = query.read as unknown as boolean // 是否是待阅的标记
const processInstanceLoading = ref(false) // 流程实例的加载中
const processInstance = ref<any>({}) // 流程实例
const bpmnXML = ref('') // BPMN XML
@@ -184,10 +185,10 @@ const handleCC = (row) => {
}
const printPage = async () => {
const { href } = router.resolve({ name: 'BpmProcessInstanceInfo',
const {href} = router.resolve({
name: 'BpmProcessInstanceInfo',
query: {id: String(id), isPrint: '1'}
})
window.open(href, '_blank', 'noopener,noreferrer')
@@ -218,6 +219,15 @@ const handleSign = async (task) => {
taskAddSignDialogForm.value.open(task.id)
}
// 处理待阅的操作
const handleRead = async () => {
if (read) {
// 向后端发送接口,让后端发起已阅接口
const data = await ProcessInstanceApi.handleProcessInstanceCC(id + '')
console.log(JSON.stringify(data))
}
}
/** 获得详情 */
const getDetail = () => {
// 1. 获得流程实例相关
@@ -333,6 +343,7 @@ const loadRunningTask = (tasks) => {
/** 初始化 */
onMounted(async () => {
await handleRead()
await getDetail()
await nextTick()
if (query.isPrint === '1') {