wl-design-mobile 0.8.13 → 0.8.15
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/README.md +6 -6
- package/api/doc.js +25 -25
- package/api/x1.js +56 -56
- package/btn/components/lambo-info-btn.vue +123 -123
- package/btn/components/lambo-primary-btn.vue +117 -117
- package/btn/components/lambo-text-btn.vue +116 -116
- package/btn/lambo-btn-divide.vue +35 -35
- package/btn/lambo-btn-group.vue +46 -46
- package/btn/lambo-btn-split-line.vue +41 -41
- package/btn/lambo-btn.vue +68 -68
- package/btn/lambo-extend-btn.vue +121 -121
- package/btn/lambo-icon-btn.vue +82 -82
- package/card-item/card-row-icon.vue +71 -71
- package/card-item/filtrate-row.vue +73 -73
- package/card-item/lambo-card-footer.vue +40 -40
- package/card-item/lambo-card-head.vue +66 -66
- package/card-item/lambo-card-row.vue +59 -59
- package/collapse/lambo-collapse.vue +93 -93
- package/config/config.js +14 -14
- package/detail/lambo-detail-grid.vue +58 -58
- package/detail/lambo-detail-row.vue +59 -59
- package/doc/file/compoents/lambo-file-list.vue +42 -42
- package/doc/file/compoents/lambo-file-row.vue +77 -77
- package/doc/file/lambo-file-upload-collapse.vue +107 -107
- package/doc/file-type/file-type.js +286 -286
- package/doc/img/comonents/lambo-img-grid.vue +109 -109
- package/doc/img/lambo-img-upload-collapse.vue +107 -109
- package/doc/img/styles/css/index.css +3 -3
- package/edit/list/Lambo-edit-list.vue +87 -87
- package/edit/list/lambo-edit-card-group.vue +100 -100
- package/edit/list/styles/css/index.css +39 -39
- package/edit/select/lambo-edit-date-range.vue +147 -147
- package/edit/select/lambo-edit-date-time.vue +122 -122
- package/edit/select/lambo-edit-date.vue +120 -120
- package/edit/select/lambo-edit-input-textarea.vue +91 -91
- package/edit/select/lambo-edit-input.vue +91 -91
- package/edit/select/lambo-edit-multi-select.vue +168 -168
- package/edit/select/lambo-edit-search-single-select.vue +186 -186
- package/edit/select/lambo-edit-single-select.vue +162 -162
- package/edit/select/styles/css/index.css +133 -133
- package/flow/approval/flow-approval.vue +552 -552
- package/flow/comps/flow-attachment-list.vue +230 -230
- package/flow/comps/flow-attachment-modal.vue +194 -194
- package/flow/comps/flow-copy-users.vue +358 -358
- package/flow/comps/flow-node-card.vue +150 -150
- package/flow/comps/flow-node-header.vue +172 -172
- package/flow/comps/flow-util.js +156 -156
- package/flow/comps/icons/approved.svg +11 -11
- package/flow/comps/icons/canceled.svg +11 -11
- package/flow/comps/icons/rejected.svg +11 -11
- package/flow/comps/icons/underway.svg +11 -11
- package/flow/detail/flow-detail.vue +467 -467
- package/flow/index.js +51 -51
- package/flow/lambo-flow-detail.vue +912 -912
- package/flow/lambo-flow-edit.vue +15 -15
- package/flow/submit/flow-submit.vue +383 -383
- package/icon/lambo-required-red-star.vue +47 -47
- package/icon/lambo-vector-icon.vue +71 -71
- package/list/lambo-list.vue +412 -294
- package/nav/lambo-top-nav.vue +81 -81
- package/order/comps/icons/approved.svg +10 -10
- package/order/comps/icons/underway.svg +10 -10
- package/order/comps/order-attachment-list.vue +228 -228
- package/order/comps/order-attachment-modal.vue +194 -194
- package/order/comps/order-node-card.vue +126 -126
- package/order/comps/order-node-header.vue +133 -133
- package/order/comps/order-util.js +132 -132
- package/order/detail/order-detail.vue +432 -432
- package/order/handle/order-handle.vue +517 -517
- package/order/index.js +33 -33
- package/package.json +1 -1
- package/search/lambo-date-range-page.vue +196 -196
- package/search/lambo-date-range.vue +111 -111
- package/search/lambo-date.vue +105 -105
- package/search/lambo-input.vue +74 -74
- package/search/lambo-multi-select.vue +129 -129
- package/search/lambo-org-select-page.vue +109 -109
- package/search/lambo-search-box.vue +61 -61
- package/search/lambo-search-single-select.vue +152 -152
- package/search/lambo-single-select.vue +123 -123
- package/search/lambo-week-date-select.vue +521 -521
- package/search/styles/css/index.css +138 -138
- package/styles/base.less +77 -77
- package/styles/components/btn.less +7 -7
- package/styles/components/search.less +33 -33
- package/styles/components/tag.less +181 -181
- package/styles/index.less +4 -4
- package/table/lambo-ag-table.vue +228 -227
- package/tag/lambo-tag.vue +23 -23
- package/title/lambo-title1.vue +151 -151
- package/title/lambo-title2.vue +37 -37
- package/title/lambo-title3.vue +77 -77
- package/util/assist.js +43 -43
- package/util/axios/cacheconf.js +19 -19
- package/util/axios/index.js +11 -11
- package/util/axios/interceptors.js +101 -101
- package/util/bus.js +4 -4
- package/util/jssdk-sczy.js +104 -104
- package/util/jssdk.js +565 -565
- package/util/math.js +76 -76
- package/util/token.js +36 -36
|
@@ -1,150 +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>
|
|
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>
|
|
@@ -1,172 +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>
|
|
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>
|