wl-design-mobile 0.8.19 → 0.8.21
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 -120
- 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 -107
- 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 -413
- 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 +38 -37
- 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 +227 -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 +608 -565
- package/util/math.js +76 -76
- package/util/token.js +36 -36
|
@@ -1,194 +1,194 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<van-popup :value="visible" position="center" round :style="{ width: modalWidth, maxWidth: '90%' }" @input="handleVisibleChange">
|
|
3
|
-
<div class="modal-header">
|
|
4
|
-
<span class="modal-title">{{ fileName }}</span>
|
|
5
|
-
<van-icon name="cross" class="close-icon" @click="handleClose"></van-icon>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="modal-content" v-show="visible">
|
|
8
|
-
<!-- 图片预览 -->
|
|
9
|
-
<div v-if="isImage" class="image-preview">
|
|
10
|
-
<img :src="fileUrl" alt="图片预览" />
|
|
11
|
-
</div>
|
|
12
|
-
<!-- TXT 文本预览 -->
|
|
13
|
-
<div v-else-if="fileType === 'txt'" class="text-preview">
|
|
14
|
-
<pre>{{ textContent }}</pre>
|
|
15
|
-
</div>
|
|
16
|
-
<!-- 其他文件-->
|
|
17
|
-
<div v-else class="preview-placeholder">
|
|
18
|
-
<van-icon name="description" size="64" color="#ccc"></van-icon>
|
|
19
|
-
<p>{{ fileName }}</p>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="modal-footer">
|
|
23
|
-
<van-button type="default" size="small" @click="handleDownload">下载</van-button>
|
|
24
|
-
<van-button type="primary" size="small" @click="handleClose">关闭</van-button>
|
|
25
|
-
</div>
|
|
26
|
-
</van-popup>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script>
|
|
30
|
-
export default {
|
|
31
|
-
name: 'OrderAttachmentModal',
|
|
32
|
-
props: {
|
|
33
|
-
visible: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: false
|
|
36
|
-
},
|
|
37
|
-
fileUrl: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: ''
|
|
40
|
-
},
|
|
41
|
-
fileName: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: ''
|
|
44
|
-
},
|
|
45
|
-
modalWidth: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: '320px'
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
data() {
|
|
51
|
-
return {
|
|
52
|
-
textContent: ''
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
computed: {
|
|
56
|
-
fileType() {
|
|
57
|
-
if (!this.fileName) return ''
|
|
58
|
-
return this.fileName.split('.').pop().toLowerCase()
|
|
59
|
-
},
|
|
60
|
-
isImage() {
|
|
61
|
-
const imgTypes = ['jpg', 'jpeg', 'png', 'gif', 'webp']
|
|
62
|
-
return imgTypes.includes(this.fileType)
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
watch: {
|
|
66
|
-
visible(val) {
|
|
67
|
-
if (val) {
|
|
68
|
-
this.loadPreview()
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
methods: {
|
|
73
|
-
handleVisibleChange(val) {
|
|
74
|
-
this.$emit('update:visible', val)
|
|
75
|
-
},
|
|
76
|
-
handleClose() {
|
|
77
|
-
this.$emit('update:visible', false)
|
|
78
|
-
},
|
|
79
|
-
handleDownload() {
|
|
80
|
-
if (!this.fileUrl) {
|
|
81
|
-
this.$toast({ message: '文件地址不存在', position: 'middle' })
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
let downloadFileName = this.fileName
|
|
85
|
-
if (!downloadFileName) {
|
|
86
|
-
downloadFileName = this.fileUrl.split('/').pop() || 'download'
|
|
87
|
-
}
|
|
88
|
-
const link = document.createElement('a')
|
|
89
|
-
link.href = this.fileUrl
|
|
90
|
-
link.download = downloadFileName
|
|
91
|
-
document.body.appendChild(link)
|
|
92
|
-
link.click()
|
|
93
|
-
document.body.removeChild(link)
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
async loadPreview() {
|
|
97
|
-
if (this.fileType === 'txt') {
|
|
98
|
-
try {
|
|
99
|
-
const res = await fetch(this.fileUrl)
|
|
100
|
-
this.textContent = await res.text()
|
|
101
|
-
} catch (e) {
|
|
102
|
-
this.textContent = '文本加载失败'
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
</script>
|
|
109
|
-
|
|
110
|
-
<style scoped>
|
|
111
|
-
.modal-header {
|
|
112
|
-
display: flex;
|
|
113
|
-
align-items: center;
|
|
114
|
-
justify-content: space-between;
|
|
115
|
-
padding: 16px;
|
|
116
|
-
border-bottom: 1px solid #f0f0f0;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.modal-title {
|
|
120
|
-
font-size: 16px;
|
|
121
|
-
font-weight: 600;
|
|
122
|
-
color: #323233;
|
|
123
|
-
flex: 1;
|
|
124
|
-
overflow: hidden;
|
|
125
|
-
text-overflow: ellipsis;
|
|
126
|
-
white-space: nowrap;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.close-icon {
|
|
130
|
-
font-size: 20px;
|
|
131
|
-
color: #c8c9cc;
|
|
132
|
-
cursor: pointer;
|
|
133
|
-
flex-shrink: 0;
|
|
134
|
-
margin-left: 12px;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.close-icon:hover {
|
|
138
|
-
color: #969799;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.modal-content {
|
|
142
|
-
padding: 40px 20px;
|
|
143
|
-
min-height: 200px;
|
|
144
|
-
max-height: 70vh;
|
|
145
|
-
overflow-y: auto;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.preview-placeholder {
|
|
149
|
-
display: flex;
|
|
150
|
-
flex-direction: column;
|
|
151
|
-
align-items: center;
|
|
152
|
-
justify-content: center;
|
|
153
|
-
min-height: 200px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.preview-placeholder p {
|
|
157
|
-
margin-top: 12px;
|
|
158
|
-
font-size: 14px;
|
|
159
|
-
color: #969799;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.image-preview {
|
|
163
|
-
display: flex;
|
|
164
|
-
justify-content: center;
|
|
165
|
-
align-items: center;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.image-preview img {
|
|
169
|
-
max-width: 100%;
|
|
170
|
-
max-height: 60vh;
|
|
171
|
-
object-fit: contain;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.text-preview {
|
|
175
|
-
max-height: 60vh;
|
|
176
|
-
overflow-y: auto;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.text-preview pre {
|
|
180
|
-
white-space: pre-wrap;
|
|
181
|
-
word-break: break-all;
|
|
182
|
-
font-size: 14px;
|
|
183
|
-
line-height: 1.6;
|
|
184
|
-
color: #323233;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.modal-footer {
|
|
188
|
-
display: flex;
|
|
189
|
-
justify-content: center;
|
|
190
|
-
gap: 12px;
|
|
191
|
-
padding: 16px;
|
|
192
|
-
border-top: 1px solid #f0f0f0;
|
|
193
|
-
}
|
|
194
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<van-popup :value="visible" position="center" round :style="{ width: modalWidth, maxWidth: '90%' }" @input="handleVisibleChange">
|
|
3
|
+
<div class="modal-header">
|
|
4
|
+
<span class="modal-title">{{ fileName }}</span>
|
|
5
|
+
<van-icon name="cross" class="close-icon" @click="handleClose"></van-icon>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="modal-content" v-show="visible">
|
|
8
|
+
<!-- 图片预览 -->
|
|
9
|
+
<div v-if="isImage" class="image-preview">
|
|
10
|
+
<img :src="fileUrl" alt="图片预览" />
|
|
11
|
+
</div>
|
|
12
|
+
<!-- TXT 文本预览 -->
|
|
13
|
+
<div v-else-if="fileType === 'txt'" class="text-preview">
|
|
14
|
+
<pre>{{ textContent }}</pre>
|
|
15
|
+
</div>
|
|
16
|
+
<!-- 其他文件-->
|
|
17
|
+
<div v-else class="preview-placeholder">
|
|
18
|
+
<van-icon name="description" size="64" color="#ccc"></van-icon>
|
|
19
|
+
<p>{{ fileName }}</p>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="modal-footer">
|
|
23
|
+
<van-button type="default" size="small" @click="handleDownload">下载</van-button>
|
|
24
|
+
<van-button type="primary" size="small" @click="handleClose">关闭</van-button>
|
|
25
|
+
</div>
|
|
26
|
+
</van-popup>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
export default {
|
|
31
|
+
name: 'OrderAttachmentModal',
|
|
32
|
+
props: {
|
|
33
|
+
visible: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
fileUrl: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ''
|
|
40
|
+
},
|
|
41
|
+
fileName: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ''
|
|
44
|
+
},
|
|
45
|
+
modalWidth: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: '320px'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
textContent: ''
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
fileType() {
|
|
57
|
+
if (!this.fileName) return ''
|
|
58
|
+
return this.fileName.split('.').pop().toLowerCase()
|
|
59
|
+
},
|
|
60
|
+
isImage() {
|
|
61
|
+
const imgTypes = ['jpg', 'jpeg', 'png', 'gif', 'webp']
|
|
62
|
+
return imgTypes.includes(this.fileType)
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
watch: {
|
|
66
|
+
visible(val) {
|
|
67
|
+
if (val) {
|
|
68
|
+
this.loadPreview()
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
handleVisibleChange(val) {
|
|
74
|
+
this.$emit('update:visible', val)
|
|
75
|
+
},
|
|
76
|
+
handleClose() {
|
|
77
|
+
this.$emit('update:visible', false)
|
|
78
|
+
},
|
|
79
|
+
handleDownload() {
|
|
80
|
+
if (!this.fileUrl) {
|
|
81
|
+
this.$toast({ message: '文件地址不存在', position: 'middle' })
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
let downloadFileName = this.fileName
|
|
85
|
+
if (!downloadFileName) {
|
|
86
|
+
downloadFileName = this.fileUrl.split('/').pop() || 'download'
|
|
87
|
+
}
|
|
88
|
+
const link = document.createElement('a')
|
|
89
|
+
link.href = this.fileUrl
|
|
90
|
+
link.download = downloadFileName
|
|
91
|
+
document.body.appendChild(link)
|
|
92
|
+
link.click()
|
|
93
|
+
document.body.removeChild(link)
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
async loadPreview() {
|
|
97
|
+
if (this.fileType === 'txt') {
|
|
98
|
+
try {
|
|
99
|
+
const res = await fetch(this.fileUrl)
|
|
100
|
+
this.textContent = await res.text()
|
|
101
|
+
} catch (e) {
|
|
102
|
+
this.textContent = '文本加载失败'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<style scoped>
|
|
111
|
+
.modal-header {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: space-between;
|
|
115
|
+
padding: 16px;
|
|
116
|
+
border-bottom: 1px solid #f0f0f0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.modal-title {
|
|
120
|
+
font-size: 16px;
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
color: #323233;
|
|
123
|
+
flex: 1;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
text-overflow: ellipsis;
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.close-icon {
|
|
130
|
+
font-size: 20px;
|
|
131
|
+
color: #c8c9cc;
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
margin-left: 12px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.close-icon:hover {
|
|
138
|
+
color: #969799;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.modal-content {
|
|
142
|
+
padding: 40px 20px;
|
|
143
|
+
min-height: 200px;
|
|
144
|
+
max-height: 70vh;
|
|
145
|
+
overflow-y: auto;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.preview-placeholder {
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
min-height: 200px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.preview-placeholder p {
|
|
157
|
+
margin-top: 12px;
|
|
158
|
+
font-size: 14px;
|
|
159
|
+
color: #969799;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.image-preview {
|
|
163
|
+
display: flex;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
align-items: center;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.image-preview img {
|
|
169
|
+
max-width: 100%;
|
|
170
|
+
max-height: 60vh;
|
|
171
|
+
object-fit: contain;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.text-preview {
|
|
175
|
+
max-height: 60vh;
|
|
176
|
+
overflow-y: auto;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.text-preview pre {
|
|
180
|
+
white-space: pre-wrap;
|
|
181
|
+
word-break: break-all;
|
|
182
|
+
font-size: 14px;
|
|
183
|
+
line-height: 1.6;
|
|
184
|
+
color: #323233;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.modal-footer {
|
|
188
|
+
display: flex;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
gap: 12px;
|
|
191
|
+
padding: 16px;
|
|
192
|
+
border-top: 1px solid #f0f0f0;
|
|
193
|
+
}
|
|
194
|
+
</style>
|
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="node-detail-card">
|
|
3
|
-
<div class="handle-result-badge" :class="'badge-' + getHandleResultClass(nodeInfo.handleResult)" v-if="showResultBadge && !isApplyNode">
|
|
4
|
-
<van-icon :name="getHandleIcon(nodeInfo.handleResult)" size="12"></van-icon>
|
|
5
|
-
<span>{{ getHandleResultText(nodeInfo.handleResult) }}</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.handleTime) || '-' }}</span>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="detail-item">
|
|
13
|
-
<span class="detail-label">{{ isApplyNode ? '发起人:' : '处理人:' }}</span>
|
|
14
|
-
<span class="detail-value">{{ (isApplyNode ? nodeInfo.applyUserName : nodeInfo.handleUserName) || '-' }}</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.handleComment">
|
|
28
|
-
<span class="detail-label">{{ isApplyNode ? '工单内容:' : '处理内容:' }}</span>
|
|
29
|
-
<span class="detail-value">{{ isApplyNode ? nodeInfo.applyDescription : nodeInfo.handleComment }}</span>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<!-- 附件列表插槽 -->
|
|
33
|
-
<slot name="attachments"></slot>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script>
|
|
38
|
-
import { getHandleResultClass, getHandleResultText, getHandleIcon } from './order-util.js'
|
|
39
|
-
|
|
40
|
-
export default {
|
|
41
|
-
name: 'OrderNodeCard',
|
|
42
|
-
props: {
|
|
43
|
-
nodeInfo: {
|
|
44
|
-
type: Object,
|
|
45
|
-
default: () => ({})
|
|
46
|
-
},
|
|
47
|
-
showResultBadge: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: true
|
|
50
|
-
},
|
|
51
|
-
isApplyNode: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: false
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
methods: {
|
|
57
|
-
getHandleResultClass,
|
|
58
|
-
getHandleResultText,
|
|
59
|
-
getHandleIcon
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<style scoped>
|
|
65
|
-
.node-detail-card {
|
|
66
|
-
border-radius: 4px;
|
|
67
|
-
padding: 12px;
|
|
68
|
-
border: 1px solid #e8e8e8;
|
|
69
|
-
position: relative;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.handle-result-badge {
|
|
74
|
-
position: absolute;
|
|
75
|
-
top: 0;
|
|
76
|
-
right: 0;
|
|
77
|
-
display: inline-flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
gap: 4px;
|
|
80
|
-
padding: 4px 10px;
|
|
81
|
-
border-radius: 0 0 0 4px;
|
|
82
|
-
font-size: 12px;
|
|
83
|
-
font-weight: 500;
|
|
84
|
-
z-index: 1;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.badge-pending { background: #fff7e6; color: #fa8c16; }
|
|
88
|
-
.badge-processing { background: #e6f7ff; color: #1890ff; }
|
|
89
|
-
.badge-completed { background: #f6ffed; color: #52c41a; }
|
|
90
|
-
.badge-default { background: #d9d9d9; color: #fff; }
|
|
91
|
-
|
|
92
|
-
.detail-grid {
|
|
93
|
-
display: flex;
|
|
94
|
-
flex-wrap: wrap;
|
|
95
|
-
gap: 8px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.detail-item {
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: flex-start;
|
|
101
|
-
font-size: 13px;
|
|
102
|
-
width: calc(50% - 4px);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@media (max-width: 510px) {
|
|
106
|
-
.detail-item {
|
|
107
|
-
width: 100% !important;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.comment-item {
|
|
112
|
-
width: 100%;
|
|
113
|
-
margin-top: 8px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.detail-label {
|
|
117
|
-
color: #8c8c8c;
|
|
118
|
-
flex-shrink: 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.detail-value {
|
|
122
|
-
color: #262626;
|
|
123
|
-
flex: 1;
|
|
124
|
-
word-break: break-all;
|
|
125
|
-
}
|
|
126
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="node-detail-card">
|
|
3
|
+
<div class="handle-result-badge" :class="'badge-' + getHandleResultClass(nodeInfo.handleResult)" v-if="showResultBadge && !isApplyNode">
|
|
4
|
+
<van-icon :name="getHandleIcon(nodeInfo.handleResult)" size="12"></van-icon>
|
|
5
|
+
<span>{{ getHandleResultText(nodeInfo.handleResult) }}</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.handleTime) || '-' }}</span>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="detail-item">
|
|
13
|
+
<span class="detail-label">{{ isApplyNode ? '发起人:' : '处理人:' }}</span>
|
|
14
|
+
<span class="detail-value">{{ (isApplyNode ? nodeInfo.applyUserName : nodeInfo.handleUserName) || '-' }}</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.handleComment">
|
|
28
|
+
<span class="detail-label">{{ isApplyNode ? '工单内容:' : '处理内容:' }}</span>
|
|
29
|
+
<span class="detail-value">{{ isApplyNode ? nodeInfo.applyDescription : nodeInfo.handleComment }}</span>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<!-- 附件列表插槽 -->
|
|
33
|
+
<slot name="attachments"></slot>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import { getHandleResultClass, getHandleResultText, getHandleIcon } from './order-util.js'
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: 'OrderNodeCard',
|
|
42
|
+
props: {
|
|
43
|
+
nodeInfo: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: () => ({})
|
|
46
|
+
},
|
|
47
|
+
showResultBadge: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true
|
|
50
|
+
},
|
|
51
|
+
isApplyNode: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
getHandleResultClass,
|
|
58
|
+
getHandleResultText,
|
|
59
|
+
getHandleIcon
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style scoped>
|
|
65
|
+
.node-detail-card {
|
|
66
|
+
border-radius: 4px;
|
|
67
|
+
padding: 12px;
|
|
68
|
+
border: 1px solid #e8e8e8;
|
|
69
|
+
position: relative;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.handle-result-badge {
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 0;
|
|
76
|
+
right: 0;
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 4px;
|
|
80
|
+
padding: 4px 10px;
|
|
81
|
+
border-radius: 0 0 0 4px;
|
|
82
|
+
font-size: 12px;
|
|
83
|
+
font-weight: 500;
|
|
84
|
+
z-index: 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.badge-pending { background: #fff7e6; color: #fa8c16; }
|
|
88
|
+
.badge-processing { background: #e6f7ff; color: #1890ff; }
|
|
89
|
+
.badge-completed { background: #f6ffed; color: #52c41a; }
|
|
90
|
+
.badge-default { background: #d9d9d9; color: #fff; }
|
|
91
|
+
|
|
92
|
+
.detail-grid {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-wrap: wrap;
|
|
95
|
+
gap: 8px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.detail-item {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: flex-start;
|
|
101
|
+
font-size: 13px;
|
|
102
|
+
width: calc(50% - 4px);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media (max-width: 510px) {
|
|
106
|
+
.detail-item {
|
|
107
|
+
width: 100% !important;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.comment-item {
|
|
112
|
+
width: 100%;
|
|
113
|
+
margin-top: 8px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.detail-label {
|
|
117
|
+
color: #8c8c8c;
|
|
118
|
+
flex-shrink: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.detail-value {
|
|
122
|
+
color: #262626;
|
|
123
|
+
flex: 1;
|
|
124
|
+
word-break: break-all;
|
|
125
|
+
}
|
|
126
|
+
</style>
|