This commit is contained in:
chenlin
2025-12-12 09:09:45 +08:00
3 changed files with 73 additions and 58 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

@@ -16,7 +16,7 @@ const config: {
/**
* 接口请求超时时间
*/
request_timeout: 30000,
request_timeout: 300000,
/**
* 默认接口请求类型

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') {