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.
Files changed (101) hide show
  1. package/README.md +6 -6
  2. package/api/doc.js +25 -25
  3. package/api/x1.js +56 -56
  4. package/btn/components/lambo-info-btn.vue +123 -123
  5. package/btn/components/lambo-primary-btn.vue +117 -117
  6. package/btn/components/lambo-text-btn.vue +116 -116
  7. package/btn/lambo-btn-divide.vue +35 -35
  8. package/btn/lambo-btn-group.vue +46 -46
  9. package/btn/lambo-btn-split-line.vue +41 -41
  10. package/btn/lambo-btn.vue +68 -68
  11. package/btn/lambo-extend-btn.vue +121 -121
  12. package/btn/lambo-icon-btn.vue +82 -82
  13. package/card-item/card-row-icon.vue +71 -71
  14. package/card-item/filtrate-row.vue +73 -73
  15. package/card-item/lambo-card-footer.vue +40 -40
  16. package/card-item/lambo-card-head.vue +66 -66
  17. package/card-item/lambo-card-row.vue +59 -59
  18. package/collapse/lambo-collapse.vue +93 -93
  19. package/config/config.js +14 -14
  20. package/detail/lambo-detail-grid.vue +58 -58
  21. package/detail/lambo-detail-row.vue +59 -59
  22. package/doc/file/compoents/lambo-file-list.vue +42 -42
  23. package/doc/file/compoents/lambo-file-row.vue +77 -77
  24. package/doc/file/lambo-file-upload-collapse.vue +107 -107
  25. package/doc/file-type/file-type.js +286 -286
  26. package/doc/img/comonents/lambo-img-grid.vue +109 -109
  27. package/doc/img/lambo-img-upload-collapse.vue +107 -109
  28. package/doc/img/styles/css/index.css +3 -3
  29. package/edit/list/Lambo-edit-list.vue +87 -87
  30. package/edit/list/lambo-edit-card-group.vue +100 -100
  31. package/edit/list/styles/css/index.css +39 -39
  32. package/edit/select/lambo-edit-date-range.vue +147 -147
  33. package/edit/select/lambo-edit-date-time.vue +122 -122
  34. package/edit/select/lambo-edit-date.vue +120 -120
  35. package/edit/select/lambo-edit-input-textarea.vue +91 -91
  36. package/edit/select/lambo-edit-input.vue +91 -91
  37. package/edit/select/lambo-edit-multi-select.vue +168 -168
  38. package/edit/select/lambo-edit-search-single-select.vue +186 -186
  39. package/edit/select/lambo-edit-single-select.vue +162 -162
  40. package/edit/select/styles/css/index.css +133 -133
  41. package/flow/approval/flow-approval.vue +552 -552
  42. package/flow/comps/flow-attachment-list.vue +230 -230
  43. package/flow/comps/flow-attachment-modal.vue +194 -194
  44. package/flow/comps/flow-copy-users.vue +358 -358
  45. package/flow/comps/flow-node-card.vue +150 -150
  46. package/flow/comps/flow-node-header.vue +172 -172
  47. package/flow/comps/flow-util.js +156 -156
  48. package/flow/comps/icons/approved.svg +11 -11
  49. package/flow/comps/icons/canceled.svg +11 -11
  50. package/flow/comps/icons/rejected.svg +11 -11
  51. package/flow/comps/icons/underway.svg +11 -11
  52. package/flow/detail/flow-detail.vue +467 -467
  53. package/flow/index.js +51 -51
  54. package/flow/lambo-flow-detail.vue +912 -912
  55. package/flow/lambo-flow-edit.vue +15 -15
  56. package/flow/submit/flow-submit.vue +383 -383
  57. package/icon/lambo-required-red-star.vue +47 -47
  58. package/icon/lambo-vector-icon.vue +71 -71
  59. package/list/lambo-list.vue +412 -294
  60. package/nav/lambo-top-nav.vue +81 -81
  61. package/order/comps/icons/approved.svg +10 -10
  62. package/order/comps/icons/underway.svg +10 -10
  63. package/order/comps/order-attachment-list.vue +228 -228
  64. package/order/comps/order-attachment-modal.vue +194 -194
  65. package/order/comps/order-node-card.vue +126 -126
  66. package/order/comps/order-node-header.vue +133 -133
  67. package/order/comps/order-util.js +132 -132
  68. package/order/detail/order-detail.vue +432 -432
  69. package/order/handle/order-handle.vue +517 -517
  70. package/order/index.js +33 -33
  71. package/package.json +1 -1
  72. package/search/lambo-date-range-page.vue +196 -196
  73. package/search/lambo-date-range.vue +111 -111
  74. package/search/lambo-date.vue +105 -105
  75. package/search/lambo-input.vue +74 -74
  76. package/search/lambo-multi-select.vue +129 -129
  77. package/search/lambo-org-select-page.vue +109 -109
  78. package/search/lambo-search-box.vue +61 -61
  79. package/search/lambo-search-single-select.vue +152 -152
  80. package/search/lambo-single-select.vue +123 -123
  81. package/search/lambo-week-date-select.vue +521 -521
  82. package/search/styles/css/index.css +138 -138
  83. package/styles/base.less +77 -77
  84. package/styles/components/btn.less +7 -7
  85. package/styles/components/search.less +33 -33
  86. package/styles/components/tag.less +181 -181
  87. package/styles/index.less +4 -4
  88. package/table/lambo-ag-table.vue +228 -227
  89. package/tag/lambo-tag.vue +23 -23
  90. package/title/lambo-title1.vue +151 -151
  91. package/title/lambo-title2.vue +37 -37
  92. package/title/lambo-title3.vue +77 -77
  93. package/util/assist.js +43 -43
  94. package/util/axios/cacheconf.js +19 -19
  95. package/util/axios/index.js +11 -11
  96. package/util/axios/interceptors.js +101 -101
  97. package/util/bus.js +4 -4
  98. package/util/jssdk-sczy.js +104 -104
  99. package/util/jssdk.js +565 -565
  100. package/util/math.js +76 -76
  101. package/util/token.js +36 -36
@@ -1,432 +1,432 @@
1
- <template>
2
- <div class="order-detail-container">
3
- <!-- 工单头部信息 -->
4
- <div class="order-header" v-if="showHeader">
5
- <div class="order-header-left">
6
- <div class="order-title">
7
- <span class="order-name">{{ orderInfo.orderName || '工单处理详情' }}</span>
8
- </div>
9
- <div class="order-meta" v-if="orderInfo.createTime || orderInfo.createUser">
10
- <div v-if="orderInfo.createUser" class="meta-item">
11
- <span class="meta-label">发起人:</span>
12
- <span class="meta-value">{{ orderInfo.createUser }}</span>
13
- </div>
14
- <div v-if="orderInfo.createTime" class="meta-item">
15
- <span class="meta-label">发起时间:</span>
16
- <span class="meta-value">{{ orderInfo.createTime }}</span>
17
- </div>
18
- </div>
19
- </div>
20
- <img :src="getOrderStatusImage()" class="order-status-image" />
21
- </div>
22
-
23
- <!-- 工单节点时间线 -->
24
- <div class="order-timeline">
25
- <template v-for="(item, index) in sortedOrderNodes">
26
- <!-- 折叠占位 -->
27
- <div v-if="!isNodesExpanded && shouldShowCollapseBtn() && index === 2" :key="'collapse-' + index"
28
- class="collapse-placeholder">
29
- <div class="timeline-col">
30
- <div class="timeline-dot dot-more">
31
- <van-icon name="more-o" size="14"></van-icon>
32
- </div>
33
- <div class="timeline-line"></div>
34
- </div>
35
- <div class="content-col">
36
- <div class="expand-btn" @click="isNodesExpanded = true">
37
- <van-icon name="down"></van-icon>
38
- 展开更多节点({{ sortedOrderNodes.length - 4 }}个)
39
- </div>
40
- </div>
41
- </div>
42
-
43
- <!-- 节点显示 -->
44
- <div v-if="isNodesExpanded || shouldShowNode(index)" :key="index" class="timeline-item">
45
- <!-- 左侧时间线 -->
46
- <div class="timeline-col">
47
- <div class="timeline-dot" :class="'dot-' + getStatusClass(item.status)">
48
- <van-icon :name="getStatusIcon(item.status)" size="14"></van-icon>
49
- </div>
50
- <div class="timeline-line" v-if="index !== sortedOrderNodes.length - 1"></div>
51
- </div>
52
-
53
- <!-- 右侧内容 -->
54
- <div class="content-col">
55
- <!-- 节点头部信息 -->
56
- <OrderNodeHeader
57
- :node-info="item"
58
- :node-index="index"
59
- />
60
-
61
- <!-- 处理详情卡片 -->
62
- <OrderNodeCard
63
- v-if="item.handleResult || item.handleComment || item.handleTime || item.applyDescription"
64
- :node-info="item"
65
- :is-apply-node="index === 0"
66
- >
67
- <template slot="attachments">
68
- <OrderAttachmentList
69
- v-if="item.attachments && item.attachments.length > 0"
70
- :attachments="item.attachments"
71
- @click="handleAttachmentClick"
72
- />
73
- </template>
74
- </OrderNodeCard>
75
-
76
- <!-- 待处理提示 -->
77
- <div class="pending-tip" v-else-if="item.status === 'pending'">
78
- <van-icon name="clock-o" size="14" color="#ff976a"></van-icon>
79
- <span>等待处理中...</span>
80
- </div>
81
- </div>
82
- </div>
83
- </template>
84
-
85
- <!-- 收起按钮 -->
86
- <div v-if="isNodesExpanded && shouldShowCollapseBtn()" class="collapse-btn-wrapper">
87
- <div class="collapse-btn" @click="isNodesExpanded = false">
88
- <van-icon name="up"></van-icon>
89
- 收起节点
90
- </div>
91
- </div>
92
-
93
- <!-- 空状态 -->
94
- <div v-if="sortedOrderNodes.length === 0" class="order-empty">
95
- <van-icon name="info-o" size="48" color="#ccc"></van-icon>
96
- <p>暂无工单节点信息</p>
97
- </div>
98
- </div>
99
-
100
- <!-- 附件预览弹窗 -->
101
- <OrderAttachmentModal
102
- :visible.sync="previewModalVisible"
103
- :file-url="previewFileUrl"
104
- :file-name="previewFileName"
105
- :modal-width="previewModalWidth"
106
- />
107
- </div>
108
- </template>
109
-
110
- <script>
111
- import OrderNodeHeader from '../comps/order-node-header.vue'
112
- import OrderNodeCard from '../comps/order-node-card.vue'
113
- import OrderAttachmentList from '../comps/order-attachment-list.vue'
114
- import OrderAttachmentModal from '../comps/order-attachment-modal.vue'
115
- import { fileGetUrl } from '../../api/doc'
116
- import {
117
- getStatusIcon,
118
- getStatusClass
119
- } from '../comps/order-util.js'
120
-
121
- export default {
122
- name: 'OrderDetail',
123
- components: {
124
- OrderNodeHeader,
125
- OrderNodeCard,
126
- OrderAttachmentList,
127
- OrderAttachmentModal
128
- },
129
- props: {
130
- /**
131
- * 工单基本信息
132
- * @property {string} orderName - 工单名称
133
- * @property {string} createUser - 发起人
134
- * @property {string} createTime - 发起时间
135
- */
136
- orderInfo: {
137
- type: Object,
138
- default: () => ({})
139
- },
140
- /**
141
- * 工单节点数组
142
- * @property {number} seq - 节点序号
143
- * @property {string} taskName - 节点任务名称
144
- * @property {string} handleUserName - 处理人姓名
145
- * @property {string} handleUserAvatar - 处理人头像
146
- * @property {string} status - 节点状态
147
- * @property {string} handleResult - 处理结果
148
- * @property {string} handleTime - 处理时间
149
- * @property {string} startTime - 开始时间
150
- * @property {string} endTime - 结束时间
151
- * @property {string} handleComment - 处理意见
152
- * @property {string} applyDescription - 申请描述
153
- * @property {Array} attachments - 附件列表
154
- */
155
- orderNodes: {
156
- type: Array,
157
- default: () => []
158
- },
159
- /**
160
- * 是否显示头部区域
161
- * @default true
162
- */
163
- showHeader: {
164
- type: Boolean,
165
- default: true
166
- },
167
- /**
168
- * 是否启用节点折叠功能
169
- * @default true
170
- */
171
- enableCollapse: {
172
- type: Boolean,
173
- default: true
174
- }
175
- },
176
- data() {
177
- return {
178
- isNodesExpanded: false,
179
- previewModalVisible: false,
180
- previewFileUrl: '',
181
- previewFileName: '',
182
- previewModalWidth: '320px'
183
- }
184
- },
185
- computed: {
186
- sortedOrderNodes() {
187
- return [...this.orderNodes].sort((a, b) => (a.seq || 0) - (b.seq || 0))
188
- },
189
- overallOrderStatus() {
190
- const nodes = this.sortedOrderNodes
191
- if (nodes.length === 0) return 'processing'
192
- if (nodes.every(n => n.status === 'completed')) return 'completed'
193
- if (nodes.some(n => n.status === 'processing')) return 'processing'
194
- return 'processing'
195
- }
196
- },
197
- methods: {
198
- getStatusIcon,
199
- getStatusClass,
200
- getOrderStatusImage() {
201
- const statusMap = {
202
- completed: require('../comps/icons/approved.svg'),
203
- processing: require('../comps/icons/underway.svg'),
204
- pending: require('../comps/icons/underway.svg')
205
- }
206
- return statusMap[this.overallOrderStatus] || statusMap.processing
207
- },
208
- handleAttachmentClick(file) {
209
- this.$emit('attachment-click', file)
210
- if (!file || !file.fileName) {
211
- this.$toast({ message: '文件信息无效,无法预览', position: 'middle' })
212
- return
213
- }
214
- const previewUrl = file.fileUrl || (file.fileId ? fileGetUrl + file.fileId : '')
215
- if (!previewUrl) {
216
- this.$toast({ message: '文件信息无效,无法预览', position: 'middle' })
217
- return
218
- }
219
- this.previewFileUrl = previewUrl
220
- this.previewFileName = file.fileName
221
- this.previewModalVisible = true
222
- },
223
- shouldShowCollapseBtn() {
224
- return this.enableCollapse && this.sortedOrderNodes.length > 4
225
- },
226
- shouldShowNode(index) {
227
- if (!this.enableCollapse) return true
228
- const total = this.sortedOrderNodes.length
229
- if (total <= 4) return true
230
- return index < 2 || index >= total - 2
231
- }
232
- }
233
- }
234
- </script>
235
-
236
- <style scoped>
237
- .order-detail-container {
238
- border-radius: 4px;
239
- padding: 16px;
240
- background: #fff;
241
- }
242
-
243
- .order-header {
244
- position: relative;
245
- border-bottom: 1px solid #f0f0f0;
246
- margin-bottom: 16px;
247
- padding-bottom: 16px;
248
- padding-right: 80px;
249
- }
250
-
251
- .order-header-left {
252
- flex: 1;
253
- }
254
-
255
- .order-title {
256
- margin-bottom: 8px;
257
- }
258
-
259
- .order-name {
260
- font-size: 16px;
261
- font-weight: 600;
262
- color: #262626;
263
- }
264
-
265
- .order-meta {
266
- display: flex;
267
- flex-wrap: wrap;
268
- gap: 12px;
269
- font-size: 13px;
270
- color: #8c8c8c;
271
- }
272
-
273
- .meta-item {
274
- display: flex;
275
- align-items: center;
276
- }
277
-
278
- .meta-label {
279
- color: #8c8c8c;
280
- }
281
-
282
- .meta-value {
283
- color: #595959;
284
- }
285
-
286
- .order-status-image {
287
- position: absolute;
288
- top: 2px;
289
- right: 0;
290
- height: 70px;
291
- width: auto;
292
- z-index: 10;
293
- image-rendering: -webkit-optimize-contrast;
294
- image-rendering: crisp-edges;
295
- transform: translateZ(0);
296
- backface-visibility: hidden;
297
- filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
298
- }
299
-
300
- .order-timeline {
301
- position: relative;
302
- }
303
-
304
- .timeline-item {
305
- display: flex;
306
- margin-bottom: 16px;
307
- }
308
-
309
- .timeline-col {
310
- display: flex;
311
- flex-direction: column;
312
- align-items: center;
313
- margin-right: 12px;
314
- flex-shrink: 0;
315
- }
316
-
317
- .timeline-dot {
318
- width: 28px;
319
- height: 28px;
320
- border-radius: 50%;
321
- display: flex;
322
- align-items: center;
323
- justify-content: center;
324
- background: #fff;
325
- border: 2px solid #fff;
326
- flex-shrink: 0;
327
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
328
- }
329
-
330
- .timeline-dot.dot-success {
331
- background: #07c160;
332
- color: #fff;
333
- }
334
-
335
- .timeline-dot.dot-process {
336
- background: #1989fa;
337
- color: #fff;
338
- }
339
-
340
- .timeline-dot.dot-warning {
341
- background: #ff976a;
342
- color: #fff;
343
- }
344
-
345
- .timeline-dot.dot-wait {
346
- background: #f0f0f0;
347
- color: #999;
348
- }
349
-
350
- .timeline-dot.dot-error {
351
- background: #ee0a24;
352
- color: #fff;
353
- }
354
-
355
- .timeline-dot.dot-more {
356
- background: #e8eaed;
357
- color: #8c8c8c;
358
- }
359
-
360
- .timeline-line {
361
- width: 2px;
362
- flex: 1;
363
- background: #e8e8e8;
364
- margin-top: 4px;
365
- min-height: 20px;
366
- }
367
-
368
- .content-col {
369
- flex: 1;
370
- padding-bottom: 8px;
371
- }
372
-
373
- .pending-tip {
374
- display: flex;
375
- align-items: center;
376
- gap: 6px;
377
- padding: 8px 12px;
378
- background: #fff7e6;
379
- border-radius: 4px;
380
- font-size: 13px;
381
- color: #fa8c16;
382
- }
383
-
384
- .collapse-placeholder {
385
- display: flex;
386
- margin-bottom: 16px;
387
- }
388
-
389
- .expand-btn {
390
- display: flex;
391
- align-items: center;
392
- gap: 4px;
393
- padding: 8px 12px;
394
- background: #f7f8fa;
395
- border-radius: 4px;
396
- font-size: 13px;
397
- color: #1989fa;
398
- cursor: pointer;
399
- }
400
-
401
- .collapse-btn-wrapper {
402
- display: flex;
403
- justify-content: center;
404
- margin-top: 8px;
405
- }
406
-
407
- .collapse-btn {
408
- display: flex;
409
- align-items: center;
410
- gap: 4px;
411
- padding: 8px 12px;
412
- background: #f7f8fa;
413
- border-radius: 4px;
414
- font-size: 13px;
415
- color: #8c8c8c;
416
- cursor: pointer;
417
- }
418
-
419
- .order-empty {
420
- display: flex;
421
- flex-direction: column;
422
- align-items: center;
423
- justify-content: center;
424
- padding: 40px 0;
425
- color: #ccc;
426
- }
427
-
428
- .order-empty p {
429
- margin-top: 12px;
430
- font-size: 14px;
431
- }
432
- </style>
1
+ <template>
2
+ <div class="order-detail-container">
3
+ <!-- 工单头部信息 -->
4
+ <div class="order-header" v-if="showHeader">
5
+ <div class="order-header-left">
6
+ <div class="order-title">
7
+ <span class="order-name">{{ orderInfo.orderName || '工单处理详情' }}</span>
8
+ </div>
9
+ <div class="order-meta" v-if="orderInfo.createTime || orderInfo.createUser">
10
+ <div v-if="orderInfo.createUser" class="meta-item">
11
+ <span class="meta-label">发起人:</span>
12
+ <span class="meta-value">{{ orderInfo.createUser }}</span>
13
+ </div>
14
+ <div v-if="orderInfo.createTime" class="meta-item">
15
+ <span class="meta-label">发起时间:</span>
16
+ <span class="meta-value">{{ orderInfo.createTime }}</span>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ <img :src="getOrderStatusImage()" class="order-status-image" />
21
+ </div>
22
+
23
+ <!-- 工单节点时间线 -->
24
+ <div class="order-timeline">
25
+ <template v-for="(item, index) in sortedOrderNodes">
26
+ <!-- 折叠占位 -->
27
+ <div v-if="!isNodesExpanded && shouldShowCollapseBtn() && index === 2" :key="'collapse-' + index"
28
+ class="collapse-placeholder">
29
+ <div class="timeline-col">
30
+ <div class="timeline-dot dot-more">
31
+ <van-icon name="more-o" size="14"></van-icon>
32
+ </div>
33
+ <div class="timeline-line"></div>
34
+ </div>
35
+ <div class="content-col">
36
+ <div class="expand-btn" @click="isNodesExpanded = true">
37
+ <van-icon name="down"></van-icon>
38
+ 展开更多节点({{ sortedOrderNodes.length - 4 }}个)
39
+ </div>
40
+ </div>
41
+ </div>
42
+
43
+ <!-- 节点显示 -->
44
+ <div v-if="isNodesExpanded || shouldShowNode(index)" :key="index" class="timeline-item">
45
+ <!-- 左侧时间线 -->
46
+ <div class="timeline-col">
47
+ <div class="timeline-dot" :class="'dot-' + getStatusClass(item.status)">
48
+ <van-icon :name="getStatusIcon(item.status)" size="14"></van-icon>
49
+ </div>
50
+ <div class="timeline-line" v-if="index !== sortedOrderNodes.length - 1"></div>
51
+ </div>
52
+
53
+ <!-- 右侧内容 -->
54
+ <div class="content-col">
55
+ <!-- 节点头部信息 -->
56
+ <OrderNodeHeader
57
+ :node-info="item"
58
+ :node-index="index"
59
+ />
60
+
61
+ <!-- 处理详情卡片 -->
62
+ <OrderNodeCard
63
+ v-if="item.handleResult || item.handleComment || item.handleTime || item.applyDescription"
64
+ :node-info="item"
65
+ :is-apply-node="index === 0"
66
+ >
67
+ <template slot="attachments">
68
+ <OrderAttachmentList
69
+ v-if="item.attachments && item.attachments.length > 0"
70
+ :attachments="item.attachments"
71
+ @click="handleAttachmentClick"
72
+ />
73
+ </template>
74
+ </OrderNodeCard>
75
+
76
+ <!-- 待处理提示 -->
77
+ <div class="pending-tip" v-else-if="item.status === 'pending'">
78
+ <van-icon name="clock-o" size="14" color="#ff976a"></van-icon>
79
+ <span>等待处理中...</span>
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </template>
84
+
85
+ <!-- 收起按钮 -->
86
+ <div v-if="isNodesExpanded && shouldShowCollapseBtn()" class="collapse-btn-wrapper">
87
+ <div class="collapse-btn" @click="isNodesExpanded = false">
88
+ <van-icon name="up"></van-icon>
89
+ 收起节点
90
+ </div>
91
+ </div>
92
+
93
+ <!-- 空状态 -->
94
+ <div v-if="sortedOrderNodes.length === 0" class="order-empty">
95
+ <van-icon name="info-o" size="48" color="#ccc"></van-icon>
96
+ <p>暂无工单节点信息</p>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- 附件预览弹窗 -->
101
+ <OrderAttachmentModal
102
+ :visible.sync="previewModalVisible"
103
+ :file-url="previewFileUrl"
104
+ :file-name="previewFileName"
105
+ :modal-width="previewModalWidth"
106
+ />
107
+ </div>
108
+ </template>
109
+
110
+ <script>
111
+ import OrderNodeHeader from '../comps/order-node-header.vue'
112
+ import OrderNodeCard from '../comps/order-node-card.vue'
113
+ import OrderAttachmentList from '../comps/order-attachment-list.vue'
114
+ import OrderAttachmentModal from '../comps/order-attachment-modal.vue'
115
+ import { fileGetUrl } from '../../api/doc'
116
+ import {
117
+ getStatusIcon,
118
+ getStatusClass
119
+ } from '../comps/order-util.js'
120
+
121
+ export default {
122
+ name: 'OrderDetail',
123
+ components: {
124
+ OrderNodeHeader,
125
+ OrderNodeCard,
126
+ OrderAttachmentList,
127
+ OrderAttachmentModal
128
+ },
129
+ props: {
130
+ /**
131
+ * 工单基本信息
132
+ * @property {string} orderName - 工单名称
133
+ * @property {string} createUser - 发起人
134
+ * @property {string} createTime - 发起时间
135
+ */
136
+ orderInfo: {
137
+ type: Object,
138
+ default: () => ({})
139
+ },
140
+ /**
141
+ * 工单节点数组
142
+ * @property {number} seq - 节点序号
143
+ * @property {string} taskName - 节点任务名称
144
+ * @property {string} handleUserName - 处理人姓名
145
+ * @property {string} handleUserAvatar - 处理人头像
146
+ * @property {string} status - 节点状态
147
+ * @property {string} handleResult - 处理结果
148
+ * @property {string} handleTime - 处理时间
149
+ * @property {string} startTime - 开始时间
150
+ * @property {string} endTime - 结束时间
151
+ * @property {string} handleComment - 处理意见
152
+ * @property {string} applyDescription - 申请描述
153
+ * @property {Array} attachments - 附件列表
154
+ */
155
+ orderNodes: {
156
+ type: Array,
157
+ default: () => []
158
+ },
159
+ /**
160
+ * 是否显示头部区域
161
+ * @default true
162
+ */
163
+ showHeader: {
164
+ type: Boolean,
165
+ default: true
166
+ },
167
+ /**
168
+ * 是否启用节点折叠功能
169
+ * @default true
170
+ */
171
+ enableCollapse: {
172
+ type: Boolean,
173
+ default: true
174
+ }
175
+ },
176
+ data() {
177
+ return {
178
+ isNodesExpanded: false,
179
+ previewModalVisible: false,
180
+ previewFileUrl: '',
181
+ previewFileName: '',
182
+ previewModalWidth: '320px'
183
+ }
184
+ },
185
+ computed: {
186
+ sortedOrderNodes() {
187
+ return [...this.orderNodes].sort((a, b) => (a.seq || 0) - (b.seq || 0))
188
+ },
189
+ overallOrderStatus() {
190
+ const nodes = this.sortedOrderNodes
191
+ if (nodes.length === 0) return 'processing'
192
+ if (nodes.every(n => n.status === 'completed')) return 'completed'
193
+ if (nodes.some(n => n.status === 'processing')) return 'processing'
194
+ return 'processing'
195
+ }
196
+ },
197
+ methods: {
198
+ getStatusIcon,
199
+ getStatusClass,
200
+ getOrderStatusImage() {
201
+ const statusMap = {
202
+ completed: require('../comps/icons/approved.svg'),
203
+ processing: require('../comps/icons/underway.svg'),
204
+ pending: require('../comps/icons/underway.svg')
205
+ }
206
+ return statusMap[this.overallOrderStatus] || statusMap.processing
207
+ },
208
+ handleAttachmentClick(file) {
209
+ this.$emit('attachment-click', file)
210
+ if (!file || !file.fileName) {
211
+ this.$toast({ message: '文件信息无效,无法预览', position: 'middle' })
212
+ return
213
+ }
214
+ const previewUrl = file.fileUrl || (file.fileId ? fileGetUrl + file.fileId : '')
215
+ if (!previewUrl) {
216
+ this.$toast({ message: '文件信息无效,无法预览', position: 'middle' })
217
+ return
218
+ }
219
+ this.previewFileUrl = previewUrl
220
+ this.previewFileName = file.fileName
221
+ this.previewModalVisible = true
222
+ },
223
+ shouldShowCollapseBtn() {
224
+ return this.enableCollapse && this.sortedOrderNodes.length > 4
225
+ },
226
+ shouldShowNode(index) {
227
+ if (!this.enableCollapse) return true
228
+ const total = this.sortedOrderNodes.length
229
+ if (total <= 4) return true
230
+ return index < 2 || index >= total - 2
231
+ }
232
+ }
233
+ }
234
+ </script>
235
+
236
+ <style scoped>
237
+ .order-detail-container {
238
+ border-radius: 4px;
239
+ padding: 16px;
240
+ background: #fff;
241
+ }
242
+
243
+ .order-header {
244
+ position: relative;
245
+ border-bottom: 1px solid #f0f0f0;
246
+ margin-bottom: 16px;
247
+ padding-bottom: 16px;
248
+ padding-right: 80px;
249
+ }
250
+
251
+ .order-header-left {
252
+ flex: 1;
253
+ }
254
+
255
+ .order-title {
256
+ margin-bottom: 8px;
257
+ }
258
+
259
+ .order-name {
260
+ font-size: 16px;
261
+ font-weight: 600;
262
+ color: #262626;
263
+ }
264
+
265
+ .order-meta {
266
+ display: flex;
267
+ flex-wrap: wrap;
268
+ gap: 12px;
269
+ font-size: 13px;
270
+ color: #8c8c8c;
271
+ }
272
+
273
+ .meta-item {
274
+ display: flex;
275
+ align-items: center;
276
+ }
277
+
278
+ .meta-label {
279
+ color: #8c8c8c;
280
+ }
281
+
282
+ .meta-value {
283
+ color: #595959;
284
+ }
285
+
286
+ .order-status-image {
287
+ position: absolute;
288
+ top: 2px;
289
+ right: 0;
290
+ height: 70px;
291
+ width: auto;
292
+ z-index: 10;
293
+ image-rendering: -webkit-optimize-contrast;
294
+ image-rendering: crisp-edges;
295
+ transform: translateZ(0);
296
+ backface-visibility: hidden;
297
+ filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
298
+ }
299
+
300
+ .order-timeline {
301
+ position: relative;
302
+ }
303
+
304
+ .timeline-item {
305
+ display: flex;
306
+ margin-bottom: 16px;
307
+ }
308
+
309
+ .timeline-col {
310
+ display: flex;
311
+ flex-direction: column;
312
+ align-items: center;
313
+ margin-right: 12px;
314
+ flex-shrink: 0;
315
+ }
316
+
317
+ .timeline-dot {
318
+ width: 28px;
319
+ height: 28px;
320
+ border-radius: 50%;
321
+ display: flex;
322
+ align-items: center;
323
+ justify-content: center;
324
+ background: #fff;
325
+ border: 2px solid #fff;
326
+ flex-shrink: 0;
327
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
328
+ }
329
+
330
+ .timeline-dot.dot-success {
331
+ background: #07c160;
332
+ color: #fff;
333
+ }
334
+
335
+ .timeline-dot.dot-process {
336
+ background: #1989fa;
337
+ color: #fff;
338
+ }
339
+
340
+ .timeline-dot.dot-warning {
341
+ background: #ff976a;
342
+ color: #fff;
343
+ }
344
+
345
+ .timeline-dot.dot-wait {
346
+ background: #f0f0f0;
347
+ color: #999;
348
+ }
349
+
350
+ .timeline-dot.dot-error {
351
+ background: #ee0a24;
352
+ color: #fff;
353
+ }
354
+
355
+ .timeline-dot.dot-more {
356
+ background: #e8eaed;
357
+ color: #8c8c8c;
358
+ }
359
+
360
+ .timeline-line {
361
+ width: 2px;
362
+ flex: 1;
363
+ background: #e8e8e8;
364
+ margin-top: 4px;
365
+ min-height: 20px;
366
+ }
367
+
368
+ .content-col {
369
+ flex: 1;
370
+ padding-bottom: 8px;
371
+ }
372
+
373
+ .pending-tip {
374
+ display: flex;
375
+ align-items: center;
376
+ gap: 6px;
377
+ padding: 8px 12px;
378
+ background: #fff7e6;
379
+ border-radius: 4px;
380
+ font-size: 13px;
381
+ color: #fa8c16;
382
+ }
383
+
384
+ .collapse-placeholder {
385
+ display: flex;
386
+ margin-bottom: 16px;
387
+ }
388
+
389
+ .expand-btn {
390
+ display: flex;
391
+ align-items: center;
392
+ gap: 4px;
393
+ padding: 8px 12px;
394
+ background: #f7f8fa;
395
+ border-radius: 4px;
396
+ font-size: 13px;
397
+ color: #1989fa;
398
+ cursor: pointer;
399
+ }
400
+
401
+ .collapse-btn-wrapper {
402
+ display: flex;
403
+ justify-content: center;
404
+ margin-top: 8px;
405
+ }
406
+
407
+ .collapse-btn {
408
+ display: flex;
409
+ align-items: center;
410
+ gap: 4px;
411
+ padding: 8px 12px;
412
+ background: #f7f8fa;
413
+ border-radius: 4px;
414
+ font-size: 13px;
415
+ color: #8c8c8c;
416
+ cursor: pointer;
417
+ }
418
+
419
+ .order-empty {
420
+ display: flex;
421
+ flex-direction: column;
422
+ align-items: center;
423
+ justify-content: center;
424
+ padding: 40px 0;
425
+ color: #ccc;
426
+ }
427
+
428
+ .order-empty p {
429
+ margin-top: 12px;
430
+ font-size: 14px;
431
+ }
432
+ </style>