RelevantInformation.vue
4.85 KB
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
//相关信息
<template>
<div>
<van-popup
v-model="show"
round
safe-area-inset-bottom
duration="0"
position="bottom"
style="max-height: 80%"
>
<van-nav-bar
title="相关信息"
left-text="关闭"
@click-left="show = false"
class="popup_header_fixed"
/>
<van-row class="information popup_header_margin">
<div class="colName tit">
{{ relatedInformation.subject }}
</div>
<van-col span="24">
<span>流程编号:{{ instId }}</span>
</van-col>
<van-col span="24">
<span>发起人:{{ relatedInformation.name }}</span>
</van-col>
<van-col span="24">
<span>所属组织:{{ relatedInformation.deptName }}</span>
</van-col>
<van-col span="24">
<span>审批模板:{{ relatedInformation.template }}</span>
</van-col>
</van-row>
<van-row class="vanRow">
<div class="colName tit">阅读记录</div>
<van-steps
direction="vertical"
active-color="#409EFF"
inactive-color="#409EFF"
>
<van-step v-for="(item, i) of dataList" :key="i">
<div slot="active-icon" class="icons"></div>
<div slot="inactive-icon" class="icons"></div>
<div>
<span class="colName">
{{ item.readerName }}({{ item.orgPath || '暂无组织' }})
</span>
</div>
<div class="content_botton">
<span class="taskName">
{{ item.taskName }}
</span>
<span class="times">
{{ item.readTime }}
</span>
</div>
</van-step>
</van-steps>
<van-empty
v-if="dataList.length === 0"
class="custom-image"
:image="noDataImage"
description="暂无内容"
/>
</van-row>
</van-popup>
</div>
</template>
<script>
import { getByRecordInstId, getRelatedInformationById } from '@/api/process'
export default {
name: 'RelevantInformation',
props: {
instId: {
type: String,
default: null,
},
},
data() {
return {
show: false,
relatedInformation: {},
dataList: [],
pagination: {},
noDataImage: require('@/assets/images/no_data_list.png'),
}
},
watch: {
show: function (newVal) {
if (newVal) {
this.getInfoById()
this.loadData()
}
},
},
methods: {
showDialog() {
this.show = true
},
getInfoById() {
if (!this.instId) {
return
}
getRelatedInformationById(this.instId).then((res) => {
this.relatedInformation = res
})
},
loadData(param) {
if (!this.instId) {
return
}
const pageBean = {
pageBean: {
page: 1,
pageSize: 99999999,
total: 0,
},
params: { distinct: '1' },
querys: [
{
operation: 'EQUAL',
property: 'procInstId',
relation: 'AND',
value: this.instId,
},
],
}
getByRecordInstId(pageBean).then((response) => {
this.pagination = {
page: response.page,
pageSize: response.pageSize,
total: response.total,
}
this.dataList = response.rows
})
},
},
}
</script>
<style lang="scss" scoped>
@import '@/styles/matterButton.scss';
.vanRow {
padding: 16px;
& > .van-col {
padding: 12px;
margin-bottom: 12px;
background: #f9f9f9;
}
}
.information {
padding: 12px 12px 2px;
border-bottom: 10px solid #f9f9f9;
.van-col {
padding-bottom: 12px;
}
}
.van-col {
font-size: 12px;
color: #a6a6a6;
word-wrap: break-word;
word-break: break-all;
font-weight: 400;
border-radius: 8px 8px 8px 8px;
}
.colName {
color: #262626;
font-size: 14px;
font-weight: bold;
margin-bottom: 8px;
}
.colPeople {
margin: 1px 0 8px;
}
.tit {
font-size: 16px;
}
.icons {
border: 2px solid #409eff;
width: 4px;
height: 4px;
border-radius: 50%;
}
::v-deep .van-step__line {
top: calc(0.42667rem + 9px);
height: calc(100% - 12px);
background-color: #acd5ff !important;
}
.content_botton {
display: flex;
justify-content: space-between;
margin-top: 8px;
.taskName {
font-weight: 400;
font-size: 12px;
color: #262626;
}
.times {
font-weight: 400;
color: #a6a6a6;
font-size: 12px;
}
}
.van-step--vertical {
padding-right: 0px;
}
.van-steps--vertical {
padding-left: 21px;
}
</style>