Commit 2e877113 authored by jingnan's avatar jingnan 👀

批量签审功能开发

parent 5d322fb7
......@@ -181,7 +181,19 @@ export function getInstTaskHisTory(instId, page, size) {
export function getParticipantPlugin(params) {
return get('/workflow/template/participant/plugins', params)
}
// 查询当前节点/已完成节点的处理人信息
export function getHistoryParticipantInfo(instId, taskDefinitionKey) {
return get(`/workflow/task/hisTaskList`, {
instId: instId,
activityId: taskDefinitionKey,
page: 1,
size: 9999
})
}
// 查询待处理人信息
export function getCurrentParticipantInfo(instId, taskDefinitionKey) {
return get(`/workflow/activity/teamUserList/${instId}/${taskDefinitionKey} `)
}
// export default {
// // 获取流程模板
// getTemplateList(params) {
......
......@@ -30,11 +30,7 @@ export default {
name: 'ProcessTracking',
components: { },
props: {
// processInstanceId: {
// type: String,
// default: null
// },
parentTableData: {
basicData: {
type: Object,
default: null
}
......@@ -74,7 +70,7 @@ export default {
},
computed: {
processInstanceId() {
return this.parentTableData ? this.parentTableData.processInstanceId : ''
return this.basicData ? this.basicData.processInstanceId : ''
}
},
watch: {
......@@ -120,6 +116,7 @@ export default {
customRender
]
})
this.tableData = []
panZoom(this.bpmnViewer)
this.bpmnViewer.importXML(bpmnXmlStr, (err) => {
if (err) { console.error(err) }
......@@ -136,7 +133,11 @@ export default {
bpmnCanvas.addMarker(item.taskKey, 'highlight')
})
getHistoryParticipantInfo(this.processInstanceId, arr[0].taskKey).then(res => {
this.tableData = res.items.content
this.tableData = res.items.content || []
}).catch(err => {
console.log('🚀 file: index.vue:137 err:', err)
return {
}
})
}
if (historyArr && historyArr.length) {
......@@ -151,6 +152,7 @@ export default {
addModelerListener(arr, historyArr) {
const eventBus = this.bpmnViewer.get('eventBus')
const eventTypes = ['element.click', 'element.changed']
this.tableData = []
eventTypes.forEach((eventType) => {
eventBus.on(eventType, (e) => {
if (!e || !e.element) {
......@@ -161,7 +163,7 @@ export default {
const historyNodeItem = historyArr.find(r => r.taskKey === e.element.id)
const fun = curNodeItem || historyNodeItem ? getHistoryParticipantInfo : getCurrentParticipantInfo
fun(this.processInstanceId, e.element.id).then(res => {
this.tableData = res.items.content
this.tableData = res.items.content || []
})
}
})
......
......@@ -50,7 +50,7 @@ export default {
name: 'TaskDetailProcess',
components: {},
props: {
parentTableData: {
basicData: {
type: Object,
default: null
}
......@@ -60,19 +60,17 @@ export default {
loading: true,
item: {},
historyInfo: [],
businessObject: null,
basicData: {}
businessObject: {}
}
},
computed: {
processInstanceId() {
return this.parentTableData ? this.parentTableData.processInstanceId : ''
return this.basicData ? this.basicData.processInstanceId : ''
}
},
watch: {
basicData: {
businessObject: {
handler: function(val) {
// this.businessObject = val.businessObject
this.historyInfo = val.historyInfo || []
},
immediate: true
......@@ -98,7 +96,7 @@ export default {
this.loading = true
// 获取流程历史记录
getInstanceHistory(instanceId).then(res => {
this.$set(this.basicData, 'historyInfo', res.items.content || [])
this.$set(this.businessObject, 'historyInfo', res.items.content || [])
}).catch(err => console.log(err)).finally(() => {
this.loading = false
})
......
<!--
* @Author: gjn
* @Date: 2023-08-03 16:29:39
* @Description:批量签审_三期出库申请
-->
<template>
<div class="outStorageExpireApply">
<dee-as-com
ref="applyTable"
class="list-table"
:basic-data=" { selectData: selectData }"
:lay-config="{ typeName: 'OutStorageExpire', layKey: 'batchSign_outStorageExpireApply'}"
/>
</div>
</template>
<script>
export default {
name: 'OutStorageExpireApply',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {}
},
computed: {},
watch: {},
created() {},
mounted() {},
// 组件方法
methods: {}
}
</script>
<style lang='scss'>
.outStorageExpireApply{
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
}
</style>
......@@ -9,7 +9,8 @@
<script>
export default {
components: {
WarehouseApply: () => import('./warehouseApply')
WarehouseApply: () => import('./warehouseApply'),
OutStorageExpireApply: () => import('./outStorageExpireApply')
},
props: {
selectData: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment