1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
| <template>
| <div class="header-content">
| <div class="steps">
| <el-steps
| v-loading="loading"
| :active="currentIndex"
| finish-status="wait"
| process-status="finish"
| align-center
| >
| <el-step v-for="(item, index) in list" :key="index" :title="item.phasename"></el-step>
| </el-steps>
| </div>
| <div class="steps-detail">
| <el-popover placement="bottom" width="280" class trigger="click" v-model="isShowDetail">
| <div class="steps-content">
| <FlowNodeList :serialNo="serialNo" :objectType="objectType"></FlowNodeList>
| </div>
| <Fold :isShowDetail="isShowDetail" slot="reference"></Fold>
| </el-popover>
| </div>
| </div>
| </template>
| <script>
| // 顶部步骤条
| import { queryCurrFlowNode } from '@comprehensive/serve/public'
| import Fold from './Fold'
| import FlowNodeList from './FlowNodeList'
|
| export default {
| components: {
| Fold,
| FlowNodeList
| },
| props: {
| // 申请编号
| serialNo: {
| type: String,
| required: true
| },
| objectType: {
| type: String,
| default: ''
| }
| },
| data() {
| return {
| list: [],
| currentIndex: 0,
| isShowDetail: false,
| loading: false
| }
| },
| created() {
| this.init()
| },
| methods: {
| init() {
| this.queryCurrFlowNode()
| },
|
| // 查询顶部流程节点状态
| async queryCurrFlowNode() {
| const { serialNo, objectType } = this
| this.loading = true
| const res = await queryCurrFlowNode({
| objectno: serialNo,
| objecttype: objectType
| })
| this.loading = false
| const { result } = res
| this.list = result
| const currentIndex = result.findIndex(
| ({ currentnode }) => currentnode === 'Y'
| )
| this.currentIndex = currentIndex > -1 ? currentIndex : 0
| }
| },
| watch: {
| serialNo() {
| this.init()
| }
| }
| }
| </script>
| <style lang="postcss" scoped>
| .header-content {
| display: flex;
| & .steps {
| flex: 1;
| overflow: hidden;
| & >>> .el-step__icon-inner {
| opacity: 0;
| }
| & >>> .el-step__icon {
| width: 12px;
| height: 12px;
| }
| & >>> .el-step__line {
| top: 11px;
| }
| & >>> .el-step__title {
| font-size: 14px;
| }
| }
| }
|
| .steps-content {
| max-height: 680px;
| overflow: auto;
| &::-webkit-scrollbar {
| width: 10px;
| height: 10px;
| }
| &::-webkit-scrollbar-track {
| border-radius: 1em;
| background-color: rgba(50, 50, 50, 0.1);
| }
| &::-webkit-scrollbar-thumb {
| border-radius: 1em;
| background-color: rgba(50, 50, 50, 0.3);
| }
| }
| </style>
|
|