wl-design-mobile 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/doc/file/compoents/lambo-file-row.vue +5 -92
- package/doc/file-type/file-type.js +286 -0
- package/doc/file-type/icons/icon-file-ai.svg +1 -0
- package/doc/file-type/icons/icon-file-avi.svg +1 -0
- package/doc/file-type/icons/icon-file-default.svg +1 -0
- package/doc/file-type/icons/icon-file-epub.svg +1 -0
- package/doc/file-type/icons/icon-file-excel.svg +1 -0
- package/doc/file-type/icons/icon-file-flv.svg +1 -0
- package/doc/file-type/icons/icon-file-gif.svg +1 -0
- package/doc/file-type/icons/icon-file-html.svg +1 -0
- package/doc/file-type/icons/icon-file-java.svg +1 -0
- package/doc/file-type/icons/icon-file-js.svg +1 -0
- package/doc/file-type/icons/icon-file-jsp.svg +1 -0
- package/doc/file-type/icons/icon-file-mp3.svg +1 -0
- package/doc/file-type/icons/icon-file-msi.svg +1 -0
- package/doc/file-type/icons/icon-file-pdf.svg +1 -0
- package/doc/file-type/icons/icon-file-png.svg +1 -0
- package/doc/file-type/icons/icon-file-ppt.svg +1 -0
- package/doc/file-type/icons/icon-file-psd.svg +1 -0
- package/doc/file-type/icons/icon-file-rar.svg +1 -0
- package/doc/file-type/icons/icon-file-raw.svg +1 -0
- package/doc/file-type/icons/icon-file-txt.svg +1 -0
- package/doc/file-type/icons/icon-file-word.svg +1 -0
- package/flow/approval/flow-approval.vue +550 -0
- package/flow/comps/flow-attachment-list.vue +230 -0
- package/flow/comps/flow-attachment-modal.vue +194 -0
- package/flow/comps/flow-copy-users.vue +358 -0
- package/flow/comps/flow-node-card.vue +150 -0
- package/flow/comps/flow-node-header.vue +172 -0
- package/flow/comps/flow-util.js +156 -0
- package/flow/comps/icons/approved.svg +11 -0
- package/flow/comps/icons/canceled.svg +11 -0
- package/flow/comps/icons/rejected.svg +11 -0
- package/flow/comps/icons/underway.svg +11 -0
- package/flow/detail/flow-detail.vue +466 -0
- package/flow/index.js +51 -0
- package/flow/lambo-flow-detail.vue +894 -12
- package/flow/lambo-flow-edit.vue +6 -21
- package/flow/submit/flow-submit.vue +381 -0
- package/package.json +1 -1
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="copy-users-wrapper">
|
|
3
|
+
<span v-if="showLabel" class="copy-label">抄送人:</span>
|
|
4
|
+
<div class="copy-content">
|
|
5
|
+
<div v-if="editable" class="copy-tags">
|
|
6
|
+
<van-tag v-for="(user, index) in internalCopyUsers" :key="getUserKey(user, index)" closeable @close="removeUser(index)">
|
|
7
|
+
{{ getUserName(user) }}
|
|
8
|
+
</van-tag>
|
|
9
|
+
<div class="add-btn" @click="handleAddClick">
|
|
10
|
+
<van-icon name="plus" size="14"></van-icon>
|
|
11
|
+
添加
|
|
12
|
+
</div>
|
|
13
|
+
<span v-if="internalCopyUsers.length === 0" class="empty-text">无</span>
|
|
14
|
+
</div>
|
|
15
|
+
<div v-else class="avatar-list">
|
|
16
|
+
<template v-for="(user, index) in displayUsers">
|
|
17
|
+
<van-popup
|
|
18
|
+
:key="'popup-' + index"
|
|
19
|
+
v-model="user.popupVisible"
|
|
20
|
+
position="top"
|
|
21
|
+
:style="{ padding: '12px 16px' }"
|
|
22
|
+
>
|
|
23
|
+
<div class="copy-popup-name">{{ getUserName(user) }}</div>
|
|
24
|
+
<div v-if="getUserDept(user)" class="copy-popup-dept">{{ getUserDept(user) }}</div>
|
|
25
|
+
</van-popup>
|
|
26
|
+
<div
|
|
27
|
+
:key="'avatar-' + index"
|
|
28
|
+
class="copy-avatar"
|
|
29
|
+
:style="getAvatarStyle(index)"
|
|
30
|
+
@click="user.popupVisible = true"
|
|
31
|
+
>
|
|
32
|
+
<img v-if="user.avatar" :src="user.avatar" alt="" />
|
|
33
|
+
<span v-else>{{ getUserName(user) ? getUserName(user).charAt(0) : '' }}</span>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<van-popup v-if="internalCopyUsers.length > maxDisplay" v-model="moreCopyPopupVisible" position="top" :style="{ padding: '12px 16px' }">
|
|
37
|
+
<div v-for="(user, index) in remainingUsers" :key="getUserKey(user, index)" class="copy-popup-name">
|
|
38
|
+
{{ getUserName(user) }}
|
|
39
|
+
</div>
|
|
40
|
+
</van-popup>
|
|
41
|
+
<div v-if="internalCopyUsers.length > maxDisplay" class="avatar-excess" @click="moreCopyPopupVisible = true">
|
|
42
|
+
+{{ internalCopyUsers.length - maxDisplay }}
|
|
43
|
+
</div>
|
|
44
|
+
<span v-if="internalCopyUsers.length === 0" class="empty-text">无</span>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<!-- 抄送人选择弹窗 -->
|
|
49
|
+
<van-popup v-model="showSelector" position="bottom" round>
|
|
50
|
+
<div class="user-selector">
|
|
51
|
+
<div class="selector-header">
|
|
52
|
+
<span class="selector-title">选择抄送人</span>
|
|
53
|
+
<van-icon name="cross" class="close-icon" @click="handleSelectorCancel"></van-icon>
|
|
54
|
+
</div>
|
|
55
|
+
<van-checkbox-group v-model="selectedUsers" class="checkbox-group">
|
|
56
|
+
<van-checkbox v-for="(user, index) in availableUsers" :key="getUserKey(user, index)" :name="getUserKey(user, index)" class="checkbox-item">
|
|
57
|
+
{{ getUserName(user) }}
|
|
58
|
+
</van-checkbox>
|
|
59
|
+
</van-checkbox-group>
|
|
60
|
+
<div class="selector-footer">
|
|
61
|
+
<van-button type="primary" block @click="confirmAddUsers">确定</van-button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</van-popup>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script>
|
|
69
|
+
export default {
|
|
70
|
+
name: 'FlowCopyUsers',
|
|
71
|
+
props: {
|
|
72
|
+
copyUsers: {
|
|
73
|
+
type: Array,
|
|
74
|
+
default: () => []
|
|
75
|
+
},
|
|
76
|
+
availableUsers: {
|
|
77
|
+
type: Array,
|
|
78
|
+
default: () => [
|
|
79
|
+
{ id: '1', name: '张三' },
|
|
80
|
+
{ id: '2', name: '李四' },
|
|
81
|
+
{ id: '3', name: '王五' },
|
|
82
|
+
{ id: '4', name: '赵六' },
|
|
83
|
+
{ id: '5', name: '钱七' },
|
|
84
|
+
{ id: '6', name: '孙八' }
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
maxDisplay: {
|
|
88
|
+
type: Number,
|
|
89
|
+
default: 3
|
|
90
|
+
},
|
|
91
|
+
avatarSize: {
|
|
92
|
+
type: Number,
|
|
93
|
+
default: 24
|
|
94
|
+
},
|
|
95
|
+
editable: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: false
|
|
98
|
+
},
|
|
99
|
+
showLabel: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: true
|
|
102
|
+
},
|
|
103
|
+
rowKey: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: 'id'
|
|
106
|
+
},
|
|
107
|
+
rowName: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: 'name'
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
data() {
|
|
113
|
+
return {
|
|
114
|
+
showSelector: false,
|
|
115
|
+
moreCopyPopupVisible: false,
|
|
116
|
+
selectedUsers: [],
|
|
117
|
+
internalCopyUsers: []
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
watch: {
|
|
121
|
+
copyUsers: {
|
|
122
|
+
immediate: true,
|
|
123
|
+
deep: true,
|
|
124
|
+
handler(val) {
|
|
125
|
+
this.internalCopyUsers = [...val].map(u => ({ ...u, popupVisible: false }))
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
showSelector(val) {
|
|
129
|
+
if (val) {
|
|
130
|
+
this.selectedUsers = this.internalCopyUsers.map((u, index) => this.getUserKey(u, index))
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
computed: {
|
|
135
|
+
displayUsers() {
|
|
136
|
+
return this.internalCopyUsers.slice(0, this.maxDisplay)
|
|
137
|
+
},
|
|
138
|
+
remainingUsers() {
|
|
139
|
+
return this.internalCopyUsers.slice(this.maxDisplay)
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
methods: {
|
|
143
|
+
getUserKey(user, index = 0) {
|
|
144
|
+
return user[this.rowKey] || user.id || user.loginName || String(index)
|
|
145
|
+
},
|
|
146
|
+
getUserName(user) {
|
|
147
|
+
return user[this.rowName] || user.name || user.displayName || ''
|
|
148
|
+
},
|
|
149
|
+
getUserDept(user) {
|
|
150
|
+
return user.dept || user.orgNodeName || ''
|
|
151
|
+
},
|
|
152
|
+
cleanUsers(users) {
|
|
153
|
+
return users.map(user => {
|
|
154
|
+
const item = { ...user }
|
|
155
|
+
delete item.popupVisible
|
|
156
|
+
return item
|
|
157
|
+
})
|
|
158
|
+
},
|
|
159
|
+
getAvatarStyle(index) {
|
|
160
|
+
if (index === 0) return {}
|
|
161
|
+
return {
|
|
162
|
+
marginLeft: '-10px'
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
emitChange() {
|
|
166
|
+
this.$emit('change', this.cleanUsers(this.internalCopyUsers))
|
|
167
|
+
},
|
|
168
|
+
removeUser(index) {
|
|
169
|
+
this.internalCopyUsers.splice(index, 1)
|
|
170
|
+
this.emitChange()
|
|
171
|
+
},
|
|
172
|
+
handleAddClick() {
|
|
173
|
+
this.$emit('add-copy-users')
|
|
174
|
+
this.showSelector = true
|
|
175
|
+
},
|
|
176
|
+
handleSelectorCancel() {
|
|
177
|
+
this.selectedUsers = []
|
|
178
|
+
this.showSelector = false
|
|
179
|
+
},
|
|
180
|
+
confirmAddUsers() {
|
|
181
|
+
this.internalCopyUsers = this.selectedUsers.map(id =>
|
|
182
|
+
this.availableUsers.find((user, index) => this.getUserKey(user, index) === id)
|
|
183
|
+
).filter(Boolean).map(u => ({ ...u, popupVisible: false }))
|
|
184
|
+
this.emitChange()
|
|
185
|
+
this.selectedUsers = []
|
|
186
|
+
this.showSelector = false
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
</script>
|
|
191
|
+
|
|
192
|
+
<style scoped>
|
|
193
|
+
.copy-users-wrapper {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.copy-label {
|
|
199
|
+
font-size: 13px;
|
|
200
|
+
color: #8c8c8c;
|
|
201
|
+
flex-shrink: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.copy-content {
|
|
205
|
+
flex: 1;
|
|
206
|
+
min-width: 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.copy-tags {
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
flex-wrap: wrap;
|
|
213
|
+
gap: 6px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.add-btn {
|
|
217
|
+
display: inline-flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
gap: 4px;
|
|
220
|
+
height: 26px;
|
|
221
|
+
padding: 0 10px;
|
|
222
|
+
border: 1px dashed #c8c9cc;
|
|
223
|
+
border-radius: 4px;
|
|
224
|
+
font-size: 12px;
|
|
225
|
+
color: #646566;
|
|
226
|
+
background: #fff;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
transition: all 0.2s;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.add-btn:hover {
|
|
232
|
+
border-color: #1989fa;
|
|
233
|
+
color: #1989fa;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.avatar-list {
|
|
237
|
+
display: flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.copy-avatar {
|
|
242
|
+
width: 24px;
|
|
243
|
+
height: 24px;
|
|
244
|
+
border-radius: 50%;
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
background: #1989fa;
|
|
249
|
+
color: #fff;
|
|
250
|
+
font-size: 12px;
|
|
251
|
+
border: 2px solid #fff;
|
|
252
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
transition: transform 0.2s, box-shadow 0.2s;
|
|
255
|
+
overflow: hidden;
|
|
256
|
+
flex-shrink: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.copy-avatar img {
|
|
260
|
+
width: 100%;
|
|
261
|
+
height: 100%;
|
|
262
|
+
object-fit: cover;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.copy-avatar:hover {
|
|
266
|
+
transform: scale(1.1);
|
|
267
|
+
box-shadow: 0 2px 8px rgba(25, 137, 250, 0.3);
|
|
268
|
+
z-index: 10;
|
|
269
|
+
position: relative;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.avatar-excess {
|
|
273
|
+
width: 24px;
|
|
274
|
+
height: 24px;
|
|
275
|
+
line-height: 20px;
|
|
276
|
+
text-align: center;
|
|
277
|
+
border-radius: 50%;
|
|
278
|
+
background: #1989fa;
|
|
279
|
+
color: #fff;
|
|
280
|
+
font-size: 11px;
|
|
281
|
+
margin-left: -10px;
|
|
282
|
+
border: 2px solid #fff;
|
|
283
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
transition: transform 0.2s, box-shadow 0.2s;
|
|
286
|
+
flex-shrink: 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.avatar-excess:hover {
|
|
290
|
+
transform: scale(1.1);
|
|
291
|
+
box-shadow: 0 2px 8px rgba(25, 137, 250, 0.3);
|
|
292
|
+
z-index: 10;
|
|
293
|
+
position: relative;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.empty-text {
|
|
297
|
+
font-size: 12px;
|
|
298
|
+
color: #bfbfbf;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.copy-popup-name {
|
|
302
|
+
font-size: 14px;
|
|
303
|
+
color: #323233;
|
|
304
|
+
line-height: 1.5;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.copy-popup-dept {
|
|
308
|
+
font-size: 12px;
|
|
309
|
+
color: #969799;
|
|
310
|
+
line-height: 1.5;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.user-selector {
|
|
314
|
+
max-height: 60vh;
|
|
315
|
+
display: flex;
|
|
316
|
+
flex-direction: column;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.selector-header {
|
|
320
|
+
display: flex;
|
|
321
|
+
align-items: center;
|
|
322
|
+
justify-content: space-between;
|
|
323
|
+
padding: 16px;
|
|
324
|
+
border-bottom: 1px solid #f0f0f0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.selector-title {
|
|
328
|
+
font-size: 16px;
|
|
329
|
+
font-weight: 600;
|
|
330
|
+
color: #323233;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.close-icon {
|
|
334
|
+
font-size: 20px;
|
|
335
|
+
color: #c8c9cc;
|
|
336
|
+
cursor: pointer;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.checkbox-group {
|
|
340
|
+
flex: 1;
|
|
341
|
+
overflow-y: auto;
|
|
342
|
+
padding: 12px 16px;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.checkbox-item {
|
|
346
|
+
padding: 12px 0;
|
|
347
|
+
border-bottom: 1px solid #f7f8fa;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.checkbox-item:last-child {
|
|
351
|
+
border-bottom: none;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.selector-footer {
|
|
355
|
+
padding: 12px 16px;
|
|
356
|
+
border-top: 1px solid #f0f0f0;
|
|
357
|
+
}
|
|
358
|
+
</style>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="node-detail-card">
|
|
3
|
+
<div class="audit-result-badge" :class="'badge-' + getAuditResultClass(nodeInfo.auditResult)" v-if="showResultBadge && !isApplyNode">
|
|
4
|
+
<van-icon :name="getAuditIcon(nodeInfo.auditResult)" size="12"></van-icon>
|
|
5
|
+
<span>{{ getAuditResultText(nodeInfo.auditResult) }}</span>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="detail-grid">
|
|
8
|
+
<div class="detail-item">
|
|
9
|
+
<span class="detail-label">{{ isApplyNode ? '发起时间:' : '审批时间:' }}</span>
|
|
10
|
+
<span class="detail-value">{{ (isApplyNode ? nodeInfo.applyTime : nodeInfo.auditTime) || '-' }}</span>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="detail-item">
|
|
13
|
+
<span class="detail-label">{{ isApplyNode ? '发起人:' : '审批人:' }}</span>
|
|
14
|
+
<span class="detail-value">{{ (isApplyNode ? nodeInfo.applyUserName : nodeInfo.auditUserName) || '-' }}</span>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="detail-grid" style="margin-top: 8px" v-if="!isApplyNode && (nodeInfo.startTime || nodeInfo.endTime)">
|
|
18
|
+
<div class="detail-item">
|
|
19
|
+
<span class="detail-label">开始时间:</span>
|
|
20
|
+
<span class="detail-value">{{ nodeInfo.startTime || '-' }}</span>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="detail-item">
|
|
23
|
+
<span class="detail-label">结束时间:</span>
|
|
24
|
+
<span class="detail-value">{{ nodeInfo.endTime || '-' }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="detail-item comment-item" v-if="isApplyNode ? nodeInfo.applyDescription : nodeInfo.auditComment">
|
|
28
|
+
<span class="detail-label">{{ isApplyNode ? '申请描述:' : '审批意见:' }}</span>
|
|
29
|
+
<span class="detail-value">{{ isApplyNode ? nodeInfo.applyDescription : nodeInfo.auditComment }}</span>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<!-- 附件列表插槽 -->
|
|
33
|
+
<slot name="attachments"></slot>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import { getAuditResultClass, getAuditResultText, getAuditIcon } from './flow-util.js'
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: 'FlowNodeCard',
|
|
42
|
+
props: {
|
|
43
|
+
nodeInfo: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: () => ({})
|
|
46
|
+
},
|
|
47
|
+
showResultBadge: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* 是否为发起节点
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
isApplyNode: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
getAuditResultClass,
|
|
62
|
+
getAuditResultText,
|
|
63
|
+
getAuditIcon
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style scoped>
|
|
69
|
+
.node-detail-card {
|
|
70
|
+
border-radius: 4px;
|
|
71
|
+
padding: 12px;
|
|
72
|
+
border: 1px solid #e8e8e8;
|
|
73
|
+
position: relative;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.audit-result-badge {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 0;
|
|
80
|
+
right: 0;
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 4px;
|
|
84
|
+
padding: 4px 10px;
|
|
85
|
+
border-radius: 0 0 0 4px;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
z-index: 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.audit-result-badge.badge-pass {
|
|
92
|
+
background: #07c160;
|
|
93
|
+
color: #fff;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.audit-result-badge.badge-reject {
|
|
97
|
+
background: #ee0a24;
|
|
98
|
+
color: #fff;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.audit-result-badge.badge-transfer {
|
|
102
|
+
background: #ff976a;
|
|
103
|
+
color: #fff;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.audit-result-badge.badge-return {
|
|
107
|
+
background: #8c8c8c;
|
|
108
|
+
color: #fff;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.audit-result-badge.badge-default {
|
|
112
|
+
background: #d9d9d9;
|
|
113
|
+
color: #fff;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.detail-grid {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-wrap: wrap;
|
|
119
|
+
gap: 8px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.detail-item {
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: flex-start;
|
|
125
|
+
font-size: 13px;
|
|
126
|
+
width: calc(50% - 4px);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media (max-width: 510px) {
|
|
130
|
+
.detail-item {
|
|
131
|
+
width: 100% !important;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.comment-item {
|
|
136
|
+
width: 100%;
|
|
137
|
+
margin-top: 8px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.detail-label {
|
|
141
|
+
color: #8c8c8c;
|
|
142
|
+
flex-shrink: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.detail-value {
|
|
146
|
+
color: #262626;
|
|
147
|
+
flex: 1;
|
|
148
|
+
word-break: break-all;
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="node-header">
|
|
3
|
+
<div class="avatar-wrapper">
|
|
4
|
+
<div class="node-avatar" :class="{ 'avatar-no-image': !nodeInfo.auditUserAvatar }">
|
|
5
|
+
<img v-if="nodeInfo.auditUserAvatar" :src="nodeInfo.auditUserAvatar" alt="" />
|
|
6
|
+
<span v-else>{{ nodeInfo.auditUserName ? nodeInfo.auditUserName.charAt(0) : (nodeIndex + 1) }}</span>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="status-badge" :class="'badge-' + getStatusClass(nodeInfo.status)">
|
|
9
|
+
<van-icon :name="getStatusIcon(nodeInfo.status)" :size="badgeIconSize"></van-icon>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="node-info">
|
|
13
|
+
<div class="node-title-row">
|
|
14
|
+
<span class="task-name">{{ nodeInfo.taskName }}</span>
|
|
15
|
+
<slot name="extra"></slot>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="node-user-row" v-if="nodeInfo.auditUserName">
|
|
18
|
+
<span class="user-name">{{ nodeInfo.auditUserName }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import { getStatusIcon, getStatusClass } from './flow-util.js'
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
name: 'FlowNodeHeader',
|
|
29
|
+
props: {
|
|
30
|
+
nodeInfo: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({})
|
|
33
|
+
},
|
|
34
|
+
nodeIndex: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: 0
|
|
37
|
+
},
|
|
38
|
+
avatarSize: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 40
|
|
41
|
+
},
|
|
42
|
+
badgeIconSize: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: '10'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
getStatusIcon,
|
|
49
|
+
getStatusClass
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style scoped>
|
|
55
|
+
.node-header {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
margin-bottom: 8px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.avatar-wrapper {
|
|
62
|
+
position: relative;
|
|
63
|
+
margin-right: 12px;
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.node-avatar {
|
|
68
|
+
width: 40px;
|
|
69
|
+
height: 40px;
|
|
70
|
+
border-radius: 50%;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
background: #1989fa;
|
|
75
|
+
color: #fff;
|
|
76
|
+
font-size: 16px;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.node-avatar img {
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: 100%;
|
|
83
|
+
object-fit: cover;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.node-avatar.avatar-no-image {
|
|
87
|
+
background: #1989fa;
|
|
88
|
+
color: #fff;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.status-badge {
|
|
92
|
+
position: absolute;
|
|
93
|
+
bottom: 0;
|
|
94
|
+
right: 0;
|
|
95
|
+
width: 16px;
|
|
96
|
+
height: 16px;
|
|
97
|
+
border-radius: 50%;
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
border: 2px solid #fff;
|
|
102
|
+
background: #f0f0f0;
|
|
103
|
+
color: #999;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.status-badge.badge-success {
|
|
107
|
+
background: #07c160;
|
|
108
|
+
color: #fff;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.status-badge.badge-process {
|
|
112
|
+
background: #1989fa;
|
|
113
|
+
color: #fff;
|
|
114
|
+
animation: pulse 2s infinite;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.status-badge.badge-error {
|
|
118
|
+
background: #ee0a24;
|
|
119
|
+
color: #fff;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.status-badge.badge-warning {
|
|
123
|
+
background: #ff976a;
|
|
124
|
+
color: #fff;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.status-badge.badge-wait {
|
|
128
|
+
background: #f0f0f0;
|
|
129
|
+
color: #999;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@keyframes pulse {
|
|
133
|
+
0%,
|
|
134
|
+
100% {
|
|
135
|
+
box-shadow: 0 0 0 0 rgba(25, 137, 250, 0.4);
|
|
136
|
+
}
|
|
137
|
+
50% {
|
|
138
|
+
box-shadow: 0 0 0 8px rgba(25, 137, 250, 0);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.node-info {
|
|
143
|
+
flex: 1;
|
|
144
|
+
padding-top: 2px;
|
|
145
|
+
min-width: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.node-title-row {
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
gap: 12px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.task-name {
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
color: #262626;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.node-user-row {
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
gap: 4px;
|
|
165
|
+
margin-top: 2px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.user-name {
|
|
169
|
+
font-size: 12px;
|
|
170
|
+
color: #262626;
|
|
171
|
+
}
|
|
172
|
+
</style>
|