Merge branch 'dev' of http://120.46.213.136:9528/isoftstone/lc_frontend into dev
This commit is contained in:
@@ -27,16 +27,16 @@ export type ProcessInstanceCCVO = {
|
|||||||
processInstanceName: string,
|
processInstanceName: string,
|
||||||
processInstanceKey: string,
|
processInstanceKey: string,
|
||||||
startUserId: string,
|
startUserId: string,
|
||||||
options:string [],
|
options: string [],
|
||||||
reason: string
|
reason: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getMyProcessInstancePage = async (params) => {
|
export const getMyProcessInstancePage = async (params) => {
|
||||||
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
return await request.get({url: '/bpm/process-instance/my-page', params})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createProcessInstance = async (data) => {
|
export const createProcessInstance = async (data) => {
|
||||||
return await request.post({ url: '/bpm/process-instance/create', data: data })
|
return await request.post({url: '/bpm/process-instance/create', data: data})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const cancelProcessInstance = async (id: number, reason: string) => {
|
export const cancelProcessInstance = async (id: number, reason: string) => {
|
||||||
@@ -44,11 +44,11 @@ export const cancelProcessInstance = async (id: number, reason: string) => {
|
|||||||
id: id,
|
id: id,
|
||||||
reason: reason
|
reason: reason
|
||||||
}
|
}
|
||||||
return await request.delete({ url: '/bpm/process-instance/cancel', data: data })
|
return await request.delete({url: '/bpm/process-instance/cancel', data: data})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getProcessInstance = async (id: number) => {
|
export const getProcessInstance = async (id: number) => {
|
||||||
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
|
return await request.get({url: '/bpm/process-instance/get?id=' + id})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,7 +57,7 @@ export const getProcessInstance = async (id: number) => {
|
|||||||
* @returns 是否抄送成功
|
* @returns 是否抄送成功
|
||||||
*/
|
*/
|
||||||
export const createProcessInstanceCC = async (data) => {
|
export const createProcessInstanceCC = async (data) => {
|
||||||
return await request.post({ url: '/bpm/process-instance/cc/create', data: data })
|
return await request.post({url: '/bpm/process-instance/cc/create', data: data})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,5 +66,9 @@ export const createProcessInstanceCC = async (data) => {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const getProcessInstanceCCPage = async (params) => {
|
export const getProcessInstanceCCPage = async (params) => {
|
||||||
return await request.get({ url: '/bpm/process-instance/cc/my-page', 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})
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ const config: {
|
|||||||
/**
|
/**
|
||||||
* 接口请求超时时间
|
* 接口请求超时时间
|
||||||
*/
|
*/
|
||||||
request_timeout: 30000,
|
request_timeout: 300000,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认接口请求类型
|
* 默认接口请求类型
|
||||||
@@ -30,4 +30,4 @@ const specificApiTimeoutObj = {
|
|||||||
'/infra/file/jeelowcode/upload': 120000,//上传文件接口
|
'/infra/file/jeelowcode/upload': 120000,//上传文件接口
|
||||||
}
|
}
|
||||||
|
|
||||||
export { config, specificApiTimeoutObj }
|
export {config, specificApiTimeoutObj}
|
||||||
|
|||||||
@@ -34,16 +34,16 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; margin-left: 10%; font-size: 14px">
|
<div style="margin-bottom: 20px; margin-left: 10%; font-size: 14px">
|
||||||
<el-button type="success" @click="handleAudit(item, true)">
|
<el-button type="success" @click="handleAudit(item, true)">
|
||||||
<Icon icon="ep:select" />
|
<Icon icon="ep:select"/>
|
||||||
通过
|
通过
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" @click="handleAudit(item, false)">
|
<el-button type="danger" @click="handleAudit(item, false)">
|
||||||
<Icon icon="ep:close" />
|
<Icon icon="ep:close"/>
|
||||||
不通过
|
不通过
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button type="primary" @click="handleCC(item)">
|
<el-button type="primary" @click="handleCC(item)">
|
||||||
<Icon icon="ep:position" />
|
<Icon icon="ep:position"/>
|
||||||
抄送
|
抄送
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button type="primary" @click="handleDelegate(item)">
|
<!-- <el-button type="primary" @click="handleDelegate(item)">
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
</el-button> -->
|
</el-button> -->
|
||||||
|
|
||||||
<el-button type="warning" @click="handleBack(item)">
|
<el-button type="warning" @click="handleBack(item)">
|
||||||
<Icon icon="ep:back" />
|
<Icon icon="ep:back"/>
|
||||||
回退
|
回退
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<span class="el-icon-document">申请信息【{{ processInstance.name }}】</span>
|
<span class="el-icon-document">申请信息【{{ processInstance.name }}】</span>
|
||||||
<el-button type="success" @click="printPage()">
|
<el-button type="success" @click="printPage()">
|
||||||
<Icon icon="ep:printer" />
|
<Icon icon="ep:printer"/>
|
||||||
打印表单
|
打印表单
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -80,12 +80,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<!-- 情况二:业务表单 -->
|
<!-- 情况二:业务表单 -->
|
||||||
<div v-if="processInstance?.processDefinition?.formType === 20">
|
<div v-if="processInstance?.processDefinition?.formType === 20">
|
||||||
<BusinessFormComponent :id="processInstance.businessKey" />
|
<BusinessFormComponent :id="processInstance.businessKey"/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 审批记录 -->
|
<!-- 审批记录 -->
|
||||||
<ProcessInstanceTaskList :loading="tasksLoad" :tasks="tasks" />
|
<ProcessInstanceTaskList :loading="tasksLoad" :tasks="tasks"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 高亮流程图 -->
|
<!-- 高亮流程图 -->
|
||||||
<ProcessInstanceBpmnViewer
|
<ProcessInstanceBpmnViewer
|
||||||
@@ -97,18 +97,18 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 弹窗:转派审批人 -->
|
<!-- 弹窗:转派审批人 -->
|
||||||
<TaskUpdateAssigneeForm ref="taskUpdateAssigneeFormRef" @success="getDetail" />
|
<TaskUpdateAssigneeForm ref="taskUpdateAssigneeFormRef" @success="getDetail"/>
|
||||||
<!-- 弹窗,回退节点 -->
|
<!-- 弹窗,回退节点 -->
|
||||||
<TaskReturnDialog ref="taskReturnDialogRef" @success="getDetail" />
|
<TaskReturnDialog ref="taskReturnDialogRef" @success="getDetail"/>
|
||||||
<!-- 委派,将任务委派给别人处理,处理完成后,会重新回到原审批人手中-->
|
<!-- 委派,将任务委派给别人处理,处理完成后,会重新回到原审批人手中-->
|
||||||
<TaskDelegateForm ref="taskDelegateForm" @success="getDetail" />
|
<TaskDelegateForm ref="taskDelegateForm" @success="getDetail"/>
|
||||||
<!-- 加签,当前任务审批人为A,向前加签选了一个C,则需要C先审批,然后再是A审批,向后加签B,A审批完,需要B再审批完,才算完成这个任务节点 -->
|
<!-- 加签,当前任务审批人为A,向前加签选了一个C,则需要C先审批,然后再是A审批,向后加签B,A审批完,需要B再审批完,才算完成这个任务节点 -->
|
||||||
<TaskAddSignDialogForm ref="taskAddSignDialogForm" @success="getDetail" />
|
<TaskAddSignDialogForm ref="taskAddSignDialogForm" @success="getDetail"/>
|
||||||
<TaskCCDialogForm ref="taskCCDialogForm" />
|
<TaskCCDialogForm ref="taskCCDialogForm"/>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import {useUserStore} from '@/store/modules/user'
|
||||||
import * as DefinitionApi from '@/api/bpm/definition'
|
import * as DefinitionApi from '@/api/bpm/definition'
|
||||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
||||||
import * as TaskApi from '@/api/bpm/task'
|
import * as TaskApi from '@/api/bpm/task'
|
||||||
@@ -118,20 +118,21 @@ import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue'
|
|||||||
import TaskReturnDialog from './TaskReturnDialogForm.vue'
|
import TaskReturnDialog from './TaskReturnDialogForm.vue'
|
||||||
import TaskDelegateForm from './TaskDelegateForm.vue'
|
import TaskDelegateForm from './TaskDelegateForm.vue'
|
||||||
import TaskAddSignDialogForm from './TaskAddSignDialogForm.vue'
|
import TaskAddSignDialogForm from './TaskAddSignDialogForm.vue'
|
||||||
import { registerComponent } from '@/utils/routerHelper'
|
import {registerComponent} from '@/utils/routerHelper'
|
||||||
import { isEmpty } from '@/utils/is'
|
import {isEmpty} from '@/utils/is'
|
||||||
import router from '@/router/index'
|
import router from '@/router/index'
|
||||||
import { $Print } from '@smallwei/avue'
|
import {$Print} from '@smallwei/avue'
|
||||||
import TaskCCDialogForm from '../../processInstance/detail/TaskCCDialogForm.vue'
|
import TaskCCDialogForm from '../../processInstance/detail/TaskCCDialogForm.vue'
|
||||||
|
|
||||||
defineOptions({ name: 'BpmProcessInstanceDetail' })
|
defineOptions({name: 'BpmProcessInstanceDetail'})
|
||||||
|
|
||||||
const { query } = useRoute() // 查询参数
|
const {query} = useRoute() // 查询参数
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { proxy } = getCurrentInstance() as any
|
const {proxy} = getCurrentInstance() as any
|
||||||
|
|
||||||
const userId = useUserStore().getUser.id // 当前登录的编号
|
const userId = useUserStore().getUser.id // 当前登录的编号
|
||||||
const id = query.id as unknown as number // 流程实例的编号
|
const id = query.id as unknown as number // 流程实例的编号
|
||||||
|
const read = query.read as unknown as boolean // 是否是待阅的标记
|
||||||
const processInstanceLoading = ref(false) // 流程实例的加载中
|
const processInstanceLoading = ref(false) // 流程实例的加载中
|
||||||
const processInstance = ref<any>({}) // 流程实例
|
const processInstance = ref<any>({}) // 流程实例
|
||||||
const bpmnXML = ref('') // BPMN XML
|
const bpmnXML = ref('') // BPMN XML
|
||||||
@@ -141,7 +142,7 @@ const tasks = ref<any[]>([]) // 任务列表
|
|||||||
const runningTasks = ref<any[]>([]) // 运行中的任务
|
const runningTasks = ref<any[]>([]) // 运行中的任务
|
||||||
const auditForms = ref<any[]>([]) // 审批任务的表单
|
const auditForms = ref<any[]>([]) // 审批任务的表单
|
||||||
const auditRule = reactive({
|
const auditRule = reactive({
|
||||||
reason: [{ required: true, message: '审批建议不能为空', trigger: 'blur' }]
|
reason: [{required: true, message: '审批建议不能为空', trigger: 'blur'}]
|
||||||
})
|
})
|
||||||
// ========== 申请信息 ==========
|
// ========== 申请信息 ==========
|
||||||
const detailForm = ref({
|
const detailForm = ref({
|
||||||
@@ -184,11 +185,11 @@ const handleCC = (row) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const printPage = async () => {
|
const printPage = async () => {
|
||||||
|
|
||||||
const { href } = router.resolve({ name: 'BpmProcessInstanceInfo',
|
const {href} = router.resolve({
|
||||||
query: { id: String(id), isPrint: '1' }
|
name: 'BpmProcessInstanceInfo',
|
||||||
|
query: {id: String(id), isPrint: '1'}
|
||||||
})
|
})
|
||||||
window.open(href, '_blank', 'noopener,noreferrer')
|
window.open(href, '_blank', 'noopener,noreferrer')
|
||||||
}
|
}
|
||||||
@@ -218,6 +219,15 @@ const handleSign = async (task) => {
|
|||||||
taskAddSignDialogForm.value.open(task.id)
|
taskAddSignDialogForm.value.open(task.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理待阅的操作
|
||||||
|
const handleRead = async () => {
|
||||||
|
if (read) {
|
||||||
|
// 向后端发送接口,让后端发起已阅接口
|
||||||
|
const data = await ProcessInstanceApi.handleProcessInstanceCC(id + '')
|
||||||
|
console.log(JSON.stringify(data))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** 获得详情 */
|
/** 获得详情 */
|
||||||
const getDetail = () => {
|
const getDetail = () => {
|
||||||
// 1. 获得流程实例相关
|
// 1. 获得流程实例相关
|
||||||
@@ -244,7 +254,7 @@ const getProcessInstance = async () => {
|
|||||||
detailForm.value.formId = processDefinition.formId
|
detailForm.value.formId = processDefinition.formId
|
||||||
detailForm.value.optionsData = JSON.parse(processDefinition.formConf)
|
detailForm.value.optionsData = JSON.parse(processDefinition.formConf)
|
||||||
if (data.formVariables.jeelowcode_subtable_data) {
|
if (data.formVariables.jeelowcode_subtable_data) {
|
||||||
data.formVariables = { ...data.formVariables, ...data.formVariables.jeelowcode_subtable_data }
|
data.formVariables = {...data.formVariables, ...data.formVariables.jeelowcode_subtable_data}
|
||||||
delete data.formVariables.jeelowcode_subtable_data
|
delete data.formVariables.jeelowcode_subtable_data
|
||||||
}
|
}
|
||||||
detailForm.value.defaultData = data.formVariables
|
detailForm.value.defaultData = data.formVariables
|
||||||
@@ -324,7 +334,7 @@ const loadRunningTask = (tasks) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 2.3 添加到处理任务
|
// 2.3 添加到处理任务
|
||||||
runningTasks.value.push({ ...task })
|
runningTasks.value.push({...task})
|
||||||
auditForms.value.push({
|
auditForms.value.push({
|
||||||
reason: ''
|
reason: ''
|
||||||
})
|
})
|
||||||
@@ -332,7 +342,8 @@ const loadRunningTask = (tasks) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
onMounted(async() => {
|
onMounted(async () => {
|
||||||
|
await handleRead()
|
||||||
await getDetail()
|
await getDetail()
|
||||||
await nextTick()
|
await nextTick()
|
||||||
if (query.isPrint === '1') {
|
if (query.isPrint === '1') {
|
||||||
|
|||||||
Reference in New Issue
Block a user