|
@@ -1,10 +1,9 @@
|
|
|
<template>
|
|
|
<div class="historyModal main">
|
|
|
- <!-- 序号需要否 -->
|
|
|
- <!-- <p>序号:{{ index + 1 }}</p> -->
|
|
|
- <div class="cardTask" v-for="item in hisInfo" :key="item.index">
|
|
|
- <p class="infoTitle">流程审批进度历史</p>
|
|
|
+ <p class="hisProgress">流程审批进度历史</p>
|
|
|
+ <div class="cardTask" v-for="(item, index) in hisInfo" :key="item.index">
|
|
|
<div class="cardInfo">
|
|
|
+ <p class="progressNum">进度 {{ index + 1 }}</p>
|
|
|
<p class="taskName">
|
|
|
任务名称:
|
|
|
<span style="color:black;">
|
|
@@ -14,7 +13,7 @@
|
|
|
|
|
|
<p>
|
|
|
处理人:
|
|
|
- <span v-if="item.assignees" style="color:#fc600a">
|
|
|
+ <span v-if="item.assignees" style="color:#00DB00">
|
|
|
{{ item.assignees[0].username }}
|
|
|
</span>
|
|
|
<span v-else style="color:#ccc">
|
|
@@ -60,13 +59,14 @@
|
|
|
</p>
|
|
|
<p>
|
|
|
状态:
|
|
|
- <span v-if="item.endTime" style="color:#505f66;">已办理 </span>
|
|
|
- <span v-else style="color:#fc600a;fontWeight:700;">待处理 </span>
|
|
|
+ <span v-if="item.endTime" style="color:blue;">已办理 </span>
|
|
|
+ <span v-else style="color:#999999;fontWeight:700;">待处理 </span>
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="cardTask" v-for="item in hisInfo" :key="item.index">
|
|
|
+ <!-- 流程图 -->
|
|
|
+ <div class="cardTask">
|
|
|
<p class="infoTitle">实时流程图</p>
|
|
|
<img :src="imgUrl" />
|
|
|
<a-spin size="large" fix v-if="loadingImg"></a-spin>
|
|
@@ -78,71 +78,71 @@
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
|
|
|
export default {
|
|
|
- name: 'HistoryModal',
|
|
|
- mixins: [activitiMixin, JeecgListMixin],
|
|
|
- props: {
|
|
|
- procInstId: {
|
|
|
- type: String,
|
|
|
- default: '',
|
|
|
- required: true
|
|
|
- }
|
|
|
+ name: 'HistoryModal',
|
|
|
+ mixins: [activitiMixin, JeecgListMixin],
|
|
|
+ props: {
|
|
|
+ procInstId: {
|
|
|
+ type: String,
|
|
|
+ default: '',
|
|
|
+ required: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ url: {
|
|
|
+ // 历史
|
|
|
+ historicFlow: '/actTask/historicFlow/',
|
|
|
+ getHighlightImg: `${this.doMian}/activiti/models/getHighlightImg/`
|
|
|
+ },
|
|
|
+ type: 0,
|
|
|
+ loading: false, // 表单加载状态
|
|
|
+ loadingImg: false,
|
|
|
+ hisInfo: [],
|
|
|
+ id: '',
|
|
|
+ imgUrl: '',
|
|
|
+ backRoute: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.init()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ loadData() {},
|
|
|
+ init() {
|
|
|
+ this.id = this.procInstId
|
|
|
+ this.imgUrl = this.url.getHighlightImg + this.id + '?time=' + new Date()
|
|
|
+ this.getDataList()
|
|
|
},
|
|
|
- data () {
|
|
|
- return {
|
|
|
- url: {
|
|
|
- // 历史
|
|
|
- historicFlow: '/actTask/historicFlow/',
|
|
|
- getHighlightImg: `${this.doMian}/activiti/models/getHighlightImg/`
|
|
|
- },
|
|
|
- type: 0,
|
|
|
- loading: false, // 表单加载状态
|
|
|
- loadingImg: false,
|
|
|
- hisInfo: [],
|
|
|
- id: '',
|
|
|
- imgUrl: '',
|
|
|
- backRoute: ''
|
|
|
+
|
|
|
+ //
|
|
|
+ getDataList() {
|
|
|
+ this.loading = true
|
|
|
+ this.getAction(this.url.historicFlow + this.id).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ if (res.success) {
|
|
|
+ console.log('res.success', res)
|
|
|
+ this.hisInfo = res.result
|
|
|
+ console.log('加油', this.hisInfo)
|
|
|
+ if (!res.result || res.result.length == 0) {
|
|
|
+ this.$message.info('未找到该记录审批历史数据,历史数据可能已被删除')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
}
|
|
|
+ })
|
|
|
},
|
|
|
- created () {
|
|
|
- this.init()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- loadData () {},
|
|
|
- init () {
|
|
|
- this.id = this.procInstId
|
|
|
- this.imgUrl = this.url.getHighlightImg + this.id + '?time=' + new Date()
|
|
|
- this.getDataList()
|
|
|
- },
|
|
|
-
|
|
|
- //
|
|
|
- getDataList () {
|
|
|
- this.loading = true
|
|
|
- this.getAction(this.url.historicFlow + this.id).then(res => {
|
|
|
- this.loading = false
|
|
|
- if (res.success) {
|
|
|
- console.log('res.success', res)
|
|
|
- this.hisInfo = res.result
|
|
|
- console.log('加油', this.hisInfo)
|
|
|
- if (!res.result || res.result.length == 0) {
|
|
|
- this.$message.info('未找到该记录审批历史数据,历史数据可能已被删除')
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
|
|
|
- // 分页、排序、筛选变化时触发
|
|
|
- handleTableChange (pagination, filters, sorter) {
|
|
|
- // TODO 筛选
|
|
|
- if (Object.keys(sorter).length > 0) {
|
|
|
- this.isorter.column = sorter.field
|
|
|
- this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
|
|
|
- }
|
|
|
- this.ipagination = pagination
|
|
|
- this.loadData()
|
|
|
- }
|
|
|
+ // 分页、排序、筛选变化时触发
|
|
|
+ handleTableChange(pagination, filters, sorter) {
|
|
|
+ // TODO 筛选
|
|
|
+ if (Object.keys(sorter).length > 0) {
|
|
|
+ this.isorter.column = sorter.field
|
|
|
+ this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
|
|
|
+ }
|
|
|
+ this.ipagination = pagination
|
|
|
+ this.loadData()
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -151,25 +151,38 @@ export default {
|
|
|
@import '~@assets/less/common.less';
|
|
|
</style>
|
|
|
<style lang="less" scoped>
|
|
|
+.hisProgress {
|
|
|
+ background-color: rgba(26, 133, 229, 0.5);
|
|
|
+ color: black;
|
|
|
+ padding: 10px 0 10px 10px;
|
|
|
+ font-weight: 700;
|
|
|
+ font-size: 16px;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
.cardTask {
|
|
|
width: 100%;
|
|
|
- border-radius: 10px;
|
|
|
text-align: left;
|
|
|
- margin-bottom: 20px;
|
|
|
- background-color: #e7e9eb;
|
|
|
-
|
|
|
+ margin-bottom: 10px;
|
|
|
+ background-color: white;
|
|
|
+ border: 1px solid #e8e8e8;
|
|
|
+ .progressNum {
|
|
|
+ background-color: rgba(26, 133, 229, 0.1);
|
|
|
+ font-weight: 700;
|
|
|
+ color: black;
|
|
|
+ }
|
|
|
+ //流程图标题
|
|
|
.infoTitle {
|
|
|
- background-color: rgba(70, 130, 180, 0.7);
|
|
|
+ background-color: rgba(26, 133, 229, 0.5);
|
|
|
padding: 10px 0 10px 10px;
|
|
|
- border-top-right-radius: 10px;
|
|
|
- border-top-left-radius: 10px;
|
|
|
font-weight: 700;
|
|
|
- color: white;
|
|
|
+ color: black;
|
|
|
font-size: 16px;
|
|
|
letter-spacing: 1px;
|
|
|
}
|
|
|
+
|
|
|
.cardInfo {
|
|
|
- padding: 0 0 10px 20px;
|
|
|
+ padding: 10px;
|
|
|
.taskName {
|
|
|
font-weight: 700;
|
|
|
}
|
|
@@ -181,4 +194,9 @@ export default {
|
|
|
margin-bottom: 30px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+p {
|
|
|
+ margin-bottom: 2px;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|