Commit 0f55b6f8 authored by jingnan's avatar jingnan 👀

删除doc下多余的文件

parent 48744718
/**
* @Description: 流程历史记录
* @author wx
* @date 2020/12/28
*/
<template>
<div class="porcess-history-record-com">
<dee-table
:options="optionsTree"
:data="historyRecordData"
:columns="historyColumns"
/>
</div>
</template>
<script>
import { getWFInsts, instDetail } from '@/api/workflow'
export default {
name: 'DxDocumentProcessHistory',
// displayName: '流程历史记录',
// modelRelationObjs: ['DxDocument', 'DxPart', 'DxBaseline', 'DxAbstractChangeIssue',
// 'DxChangeItem', 'DxProcessExecutor', 'ExtECM', 'DxCADDocument'],
props: {
basicData: {
type: Object,
required: true,
defalut: () => {}
},
modelName: {
type: String,
default: () => ''
}
},
data() {
return {
historyRecordData: [],
historyColumns: [
{ title: '流程名称', key: 'name', minWidth: 150, align: 'center' },
{ title: '任务名称', key: 'taskName', minWidth: 100, align: 'center' },
{ title: '状态', key: 'status', width: 80, align: 'center' },
{ title: '工作责任人', key: 'assigneeName', width: 120, align: 'center' },
{ title: '角色', key: 'participantInfo.pluginShowContent', minWidth: 80, align: 'center', formatter: function(row, column) {
return row.participantInfo ? row.participantInfo.pluginName === 'authOrg' ? '授权部门' : row.participantInfo.pluginShowContent : '/'
} },
{ title: '开始时间', key: 'startTime', width: 150, align: 'center' },
{ title: '完成时间', key: 'endTime', width: 150, align: 'center' },
{ title: '处理结果', key: 'result', minWidth: 100, align: 'center' },
{ title: '备注', key: 'comments', align: 'center', minWidth: 100, formatter: function(row, column) {
return row.comments ? row.comments.join('\n') : ''
} }
],
optionsTree: {
fit: true,
defaultExpandAll: true,
highlightCurrentRow: true,
rowKey: 'id'
},
pagination: {
currentPage: 1,
pageSize: 10,
total: 0,
pageSizes: [10, 20, 50]
}
}
},
computed: {
},
watch: {
basicData: {
immediate: true,
deep: true,
handler: function(val) {
if (val && val.dxClassname) {
this.getWFInsts()
}
}
}
},
mounted() {
},
methods: {
translateStatus(status) {
let str = ''
switch (status) {
case 'COMPLETE':
str = '已完成'
break
case 'BE_RESOLVED':
str = '待处理'
break
case 'PENDING':
str = '被委托人待处理'
break
case 'RUNNING':
str = '进行中'
}
return str
},
getWFInsts() {
getWFInsts({ pboClass: this.basicData.dxClassname, pboId: this.basicData.versionId || this.basicData.id }).then(res => {
if (res.items.content && res.items.content.length) {
this.historyRecordData = []
res.items.content.forEach((item, index) => {
instDetail(item.id).then(data => {
const findItem = this.historyRecordData.find(r => r.id === item.id)
if (findItem) { return }
this.historyRecordData.push({
id: item.id,
name: item.name,
status: item.status
})
if (data.items && data.items.historyInfo && data.items.historyInfo.length) {
const historyInfo = data.items.historyInfo.map(x => {
const y = JSON.parse(JSON.stringify(x))
y.status = this.translateStatus(x.state)
y.taskName = x.aliasName || x.name
delete y.name
return y
})
this.$set(this.historyRecordData[index], 'children', historyInfo)
}
})
})
}
})
}
}
}
</script>
<style lang='scss'>
</style>
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