Commit 2e877113 authored by jingnan's avatar jingnan 👀

批量签审功能开发

parent 5d322fb7
...@@ -181,7 +181,19 @@ export function getInstTaskHisTory(instId, page, size) { ...@@ -181,7 +181,19 @@ export function getInstTaskHisTory(instId, page, size) {
export function getParticipantPlugin(params) { export function getParticipantPlugin(params) {
return get('/workflow/template/participant/plugins', 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 { // export default {
// // 获取流程模板 // // 获取流程模板
// getTemplateList(params) { // getTemplateList(params) {
......
...@@ -30,11 +30,7 @@ export default { ...@@ -30,11 +30,7 @@ export default {
name: 'ProcessTracking', name: 'ProcessTracking',
components: { }, components: { },
props: { props: {
// processInstanceId: { basicData: {
// type: String,
// default: null
// },
parentTableData: {
type: Object, type: Object,
default: null default: null
} }
...@@ -74,7 +70,7 @@ export default { ...@@ -74,7 +70,7 @@ export default {
}, },
computed: { computed: {
processInstanceId() { processInstanceId() {
return this.parentTableData ? this.parentTableData.processInstanceId : '' return this.basicData ? this.basicData.processInstanceId : ''
} }
}, },
watch: { watch: {
...@@ -120,6 +116,7 @@ export default { ...@@ -120,6 +116,7 @@ export default {
customRender customRender
] ]
}) })
this.tableData = []
panZoom(this.bpmnViewer) panZoom(this.bpmnViewer)
this.bpmnViewer.importXML(bpmnXmlStr, (err) => { this.bpmnViewer.importXML(bpmnXmlStr, (err) => {
if (err) { console.error(err) } if (err) { console.error(err) }
...@@ -136,7 +133,11 @@ export default { ...@@ -136,7 +133,11 @@ export default {
bpmnCanvas.addMarker(item.taskKey, 'highlight') bpmnCanvas.addMarker(item.taskKey, 'highlight')
}) })
getHistoryParticipantInfo(this.processInstanceId, arr[0].taskKey).then(res => { 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) { if (historyArr && historyArr.length) {
...@@ -151,6 +152,7 @@ export default { ...@@ -151,6 +152,7 @@ export default {
addModelerListener(arr, historyArr) { addModelerListener(arr, historyArr) {
const eventBus = this.bpmnViewer.get('eventBus') const eventBus = this.bpmnViewer.get('eventBus')
const eventTypes = ['element.click', 'element.changed'] const eventTypes = ['element.click', 'element.changed']
this.tableData = []
eventTypes.forEach((eventType) => { eventTypes.forEach((eventType) => {
eventBus.on(eventType, (e) => { eventBus.on(eventType, (e) => {
if (!e || !e.element) { if (!e || !e.element) {
...@@ -161,7 +163,7 @@ export default { ...@@ -161,7 +163,7 @@ export default {
const historyNodeItem = historyArr.find(r => r.taskKey === e.element.id) const historyNodeItem = historyArr.find(r => r.taskKey === e.element.id)
const fun = curNodeItem || historyNodeItem ? getHistoryParticipantInfo : getCurrentParticipantInfo const fun = curNodeItem || historyNodeItem ? getHistoryParticipantInfo : getCurrentParticipantInfo
fun(this.processInstanceId, e.element.id).then(res => { fun(this.processInstanceId, e.element.id).then(res => {
this.tableData = res.items.content this.tableData = res.items.content || []
}) })
} }
}) })
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
name: 'TaskDetailProcess', name: 'TaskDetailProcess',
components: {}, components: {},
props: { props: {
parentTableData: { basicData: {
type: Object, type: Object,
default: null default: null
} }
...@@ -60,19 +60,17 @@ export default { ...@@ -60,19 +60,17 @@ export default {
loading: true, loading: true,
item: {}, item: {},
historyInfo: [], historyInfo: [],
businessObject: null, businessObject: {}
basicData: {}
} }
}, },
computed: { computed: {
processInstanceId() { processInstanceId() {
return this.parentTableData ? this.parentTableData.processInstanceId : '' return this.basicData ? this.basicData.processInstanceId : ''
} }
}, },
watch: { watch: {
basicData: { businessObject: {
handler: function(val) { handler: function(val) {
// this.businessObject = val.businessObject
this.historyInfo = val.historyInfo || [] this.historyInfo = val.historyInfo || []
}, },
immediate: true immediate: true
...@@ -98,7 +96,7 @@ export default { ...@@ -98,7 +96,7 @@ export default {
this.loading = true this.loading = true
// 获取流程历史记录 // 获取流程历史记录
getInstanceHistory(instanceId).then(res => { 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(() => { }).catch(err => console.log(err)).finally(() => {
this.loading = false 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 @@ ...@@ -9,7 +9,8 @@
<script> <script>
export default { export default {
components: { components: {
WarehouseApply: () => import('./warehouseApply') WarehouseApply: () => import('./warehouseApply'),
OutStorageExpireApply: () => import('./outStorageExpireApply')
}, },
props: { props: {
selectData: { 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