vue2-client 1.12.16 → 1.12.18
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/package.json +1 -1
- package/src/base-client/components/common/XCollapse/XCollapse.vue +153 -145
- package/src/base-client/components/common/XConversation/XConversation.vue +12 -0
- package/src/base-client/components/common/XDataCard/XDataCard.vue +575 -575
- package/src/router/async/router.map.js +116 -118
- package/src/base-client/components/common/XCollapse/XCollapseDemo.vue +0 -15
|
@@ -1,575 +1,575 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div v-if="render" class="XCard">
|
|
4
|
-
<template v-for="(card, itemIndex) in data">
|
|
5
|
-
<a-card :key="'card' + itemIndex" class="data-card">
|
|
6
|
-
<!-- 绑带 -->
|
|
7
|
-
<!-- <div class="ribbon" v-for="column in tableColumns" v-if="column.dataIndex === item.key" :key="column.dataIndex">-->
|
|
8
|
-
<!-- <template v-if="column.slotType === 'badge'">-->
|
|
9
|
-
<!-- <x-badge-->
|
|
10
|
-
<!-- :service-name="serviceName"-->
|
|
11
|
-
<!-- :env="env"-->
|
|
12
|
-
<!-- :dataCard="true"-->
|
|
13
|
-
<!-- :badge-key="column.slotKeyMap"-->
|
|
14
|
-
<!-- :value="card[item.key]" />-->
|
|
15
|
-
<!-- </template>-->
|
|
16
|
-
<!-- <template v-else>-->
|
|
17
|
-
<!-- <slot :name="column.slots.customRender">{{ card[config.bandage] }}</slot>-->
|
|
18
|
-
<!-- </template>-->
|
|
19
|
-
<!-- </div>-->
|
|
20
|
-
<div
|
|
21
|
-
v-if="config && card[config.ribbon]"
|
|
22
|
-
class="ribbon"
|
|
23
|
-
:style="{ backgroundColor: getRibbonColor(card[config.ribbonColor]) }">
|
|
24
|
-
{{ card[config.ribbon] }}
|
|
25
|
-
</div>
|
|
26
|
-
<!-- 自定义标题 -->
|
|
27
|
-
<template #title>
|
|
28
|
-
<div class="custom-title">
|
|
29
|
-
<a-tooltip placement="top">
|
|
30
|
-
<template #title>{{ card[config.id] }}</template>
|
|
31
|
-
<div class="title-id" v-if="card[config.id]">{{ card[config.id] }}</div>
|
|
32
|
-
</a-tooltip>
|
|
33
|
-
<div class="title-basic">
|
|
34
|
-
<div class="title-main">
|
|
35
|
-
<span class="title-name">{{ card[config.title] }}</span>
|
|
36
|
-
<span class="title-info">{{ card[config.title2] }}</span>
|
|
37
|
-
<span class="title-title3">{{ card[config.title3] }}</span>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="additional-info" v-if="card[config.subtitle2] || card[config.subtitle3] || card[config.subtitle4]">
|
|
40
|
-
<a-tooltip placement="top" v-if="card[config.subtitle2]">
|
|
41
|
-
<template #title>{{ card[config.subtitle2] }}</template>
|
|
42
|
-
<span class="subtitle2">{{ card[config.subtitle2] }}</span>
|
|
43
|
-
</a-tooltip>
|
|
44
|
-
<a-tooltip placement="top" v-if="card[config.subtitle3]">
|
|
45
|
-
<template #title>{{ card[config.subtitle3] }}</template>
|
|
46
|
-
<span class="subtitle3">{{ card[config.subtitle3] }}</span>
|
|
47
|
-
</a-tooltip>
|
|
48
|
-
<span class="subtitle4" v-if="card[config.subtitle4]">{{ card[config.subtitle4] }}</span>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
<!-- 主体 -->
|
|
54
|
-
<div class="body">
|
|
55
|
-
<div class="body-text" v-if="card[config.text]">
|
|
56
|
-
<a-tooltip :title="card[config.text]">
|
|
57
|
-
<span class="text-ellipsis">{{ card[config.text] }}</span>
|
|
58
|
-
</a-tooltip>
|
|
59
|
-
</div>
|
|
60
|
-
<template v-for="(item, bodyIndex) in config.content" v-if="bodyIndex < 6">
|
|
61
|
-
<div :key="'body' + bodyIndex" class="body-item">
|
|
62
|
-
<span class="body-item-label">{{ item.label }}:</span>
|
|
63
|
-
<template v-if="item.type === 'progress'">
|
|
64
|
-
<div class="progress">
|
|
65
|
-
<div class="progress-bar">
|
|
66
|
-
<div class="progress-done" :style="'width:' + card[item.key] * 100 + '%;backgroundColor: ' + determineRatioColor(card[item.key] * 100)"></div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="progress-num">{{ card[item.key] * 100 }}%</div>
|
|
70
|
-
</template>
|
|
71
|
-
<template v-else-if="item.type === 'custom' && tableColumns">
|
|
72
|
-
<!-- 根据 tableColumns 显示自定义内容 -->
|
|
73
|
-
<span v-for="column in tableColumns" v-if="column.dataIndex === item.key" :key="column.dataIndex">
|
|
74
|
-
<template v-if="column.slotType === 'badge'">
|
|
75
|
-
<x-badge
|
|
76
|
-
:service-name="serviceName"
|
|
77
|
-
:env="env"
|
|
78
|
-
:dataCard="true"
|
|
79
|
-
:badge-key="column.slotKeyMap"
|
|
80
|
-
:value="card[item.key]" />
|
|
81
|
-
</template>
|
|
82
|
-
<template v-else>
|
|
83
|
-
<slot :name="column.slots.customRender">{{ card[item.key] }}</slot>
|
|
84
|
-
</template>
|
|
85
|
-
</span>
|
|
86
|
-
</template>
|
|
87
|
-
<template v-else>
|
|
88
|
-
<span class="body-item-value">{{ card[item.key] }}</span>
|
|
89
|
-
</template>
|
|
90
|
-
</div>
|
|
91
|
-
<a-divider
|
|
92
|
-
v-if="bodyIndex !== config.content.length - 1"
|
|
93
|
-
dashed
|
|
94
|
-
:key="'body' + bodyIndex + 'after'"
|
|
95
|
-
class="body-split" />
|
|
96
|
-
</template>
|
|
97
|
-
</div>
|
|
98
|
-
<!-- 下方按钮 -->
|
|
99
|
-
<template #actions>
|
|
100
|
-
<a-row align="middle" class="custom-actions" v-if="config && config.footer && config.footer.length > 0">
|
|
101
|
-
<template v-for="(item, footerIndex) in config.footer">
|
|
102
|
-
<a-col :key="'footer_' + footerIndex" class="footer-item" :span="11" @click="clickFooter(card, item.emit)">
|
|
103
|
-
<span>
|
|
104
|
-
<a-icon :type="item.icon" class="footer-icon" />
|
|
105
|
-
<span>{{ item.label }}</span>
|
|
106
|
-
</span>
|
|
107
|
-
</a-col>
|
|
108
|
-
<a-col
|
|
109
|
-
v-if="footerIndex !== config.footer.length - 1"
|
|
110
|
-
:span="1"
|
|
111
|
-
:key="'footer_' + footerIndex + 'after'"
|
|
112
|
-
class="footer-item-split">
|
|
113
|
-
|
|
|
114
|
-
</a-col>
|
|
115
|
-
</template>
|
|
116
|
-
</a-row>
|
|
117
|
-
</template>
|
|
118
|
-
</a-card>
|
|
119
|
-
</template>
|
|
120
|
-
</div>
|
|
121
|
-
<div v-else>
|
|
122
|
-
<a-skeleton />
|
|
123
|
-
</div>
|
|
124
|
-
<div v-if="this.showPagination">
|
|
125
|
-
<a-divider />
|
|
126
|
-
<a-pagination
|
|
127
|
-
v-model="pageNum"
|
|
128
|
-
style="float: right"
|
|
129
|
-
:total="total"
|
|
130
|
-
show-less-items
|
|
131
|
-
:page-size="pageSize"
|
|
132
|
-
:page-size-options="pageSizeOptions"
|
|
133
|
-
show-size-changer
|
|
134
|
-
@change="pageNumChange"
|
|
135
|
-
:showTotal="paginationShowTotal"
|
|
136
|
-
@showSizeChange="pageSizeChange">
|
|
137
|
-
</a-pagination>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</template>
|
|
141
|
-
|
|
142
|
-
<script>
|
|
143
|
-
import XBadge from '@vue2-client/base-client/components/common/XBadge'
|
|
144
|
-
|
|
145
|
-
export default {
|
|
146
|
-
name: 'XDataCard',
|
|
147
|
-
components: {
|
|
148
|
-
XBadge,
|
|
149
|
-
},
|
|
150
|
-
props: {
|
|
151
|
-
// 卡片数据更新方法
|
|
152
|
-
cardData: {
|
|
153
|
-
type: Function,
|
|
154
|
-
default: undefined
|
|
155
|
-
},
|
|
156
|
-
// 卡片的配置
|
|
157
|
-
cardConfig: {
|
|
158
|
-
type: Object,
|
|
159
|
-
default: undefined
|
|
160
|
-
},
|
|
161
|
-
showPagination: {
|
|
162
|
-
type: Boolean,
|
|
163
|
-
default: false
|
|
164
|
-
},
|
|
165
|
-
// 临时
|
|
166
|
-
testData: {
|
|
167
|
-
type: Array,
|
|
168
|
-
default: undefined
|
|
169
|
-
},
|
|
170
|
-
tableColumns: {
|
|
171
|
-
type: Array,
|
|
172
|
-
default: undefined
|
|
173
|
-
},
|
|
174
|
-
// 服务名称
|
|
175
|
-
serviceName: undefined,
|
|
176
|
-
// 当前环境
|
|
177
|
-
env: {
|
|
178
|
-
type: String,
|
|
179
|
-
default: 'prod'
|
|
180
|
-
},
|
|
181
|
-
// pageSize参数
|
|
182
|
-
prePageSize: {
|
|
183
|
-
type: Number,
|
|
184
|
-
default: undefined
|
|
185
|
-
},
|
|
186
|
-
// 初始是否加载数据
|
|
187
|
-
createdQuery: {
|
|
188
|
-
type: Boolean,
|
|
189
|
-
default: false
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
data () {
|
|
193
|
-
return {
|
|
194
|
-
// 配置
|
|
195
|
-
config: {},
|
|
196
|
-
// 数据
|
|
197
|
-
data: {},
|
|
198
|
-
// 当前页码
|
|
199
|
-
pageNum: 1,
|
|
200
|
-
// 控制渲染
|
|
201
|
-
render: true,
|
|
202
|
-
// 分页大小
|
|
203
|
-
pageSize: 10,
|
|
204
|
-
// 分页大小选项
|
|
205
|
-
pageSizeOptions: ['4', '6', '8', '10'],
|
|
206
|
-
// 数据总数
|
|
207
|
-
total: 0
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
created () {
|
|
211
|
-
// 根据参数初始化数据值
|
|
212
|
-
if (this.prePageSize) {
|
|
213
|
-
this.pageSize = this.prePageSize
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
mounted () {
|
|
217
|
-
// 配置初始化
|
|
218
|
-
if (this.cardConfig) {
|
|
219
|
-
this.config = this.cardConfig
|
|
220
|
-
} else {
|
|
221
|
-
this.config = {
|
|
222
|
-
id: '未获取到配置',
|
|
223
|
-
title: '未获取到配置',
|
|
224
|
-
title2: '未获取到配置',
|
|
225
|
-
title3: '未获取到配置',
|
|
226
|
-
subtitle2: '未获取到配置',
|
|
227
|
-
subtitle3: '未获取到配置',
|
|
228
|
-
subtitle4: '未获取到配置',
|
|
229
|
-
text: '未获取到配置',
|
|
230
|
-
ribbon: '未获取到配置',
|
|
231
|
-
ribbonColor: '未获取到配置',
|
|
232
|
-
content: [
|
|
233
|
-
{
|
|
234
|
-
label: '未获取到配置',
|
|
235
|
-
key: 'one'
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
label: '未获取到配置',
|
|
239
|
-
key: 'two'
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
label: '未获取到配置',
|
|
243
|
-
key: 'three'
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
label: '未获取到配置',
|
|
247
|
-
key: 'four'
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
label: '未获取到配置',
|
|
251
|
-
key: 'five'
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
label: '未获取到配置',
|
|
255
|
-
key: 'six',
|
|
256
|
-
type: 'progress'
|
|
257
|
-
}
|
|
258
|
-
],
|
|
259
|
-
footer: [
|
|
260
|
-
{
|
|
261
|
-
icon: 'edit',
|
|
262
|
-
label: '未获取到配置',
|
|
263
|
-
emit: 'planEdit'
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
icon: 'user',
|
|
267
|
-
label: '未获取到配置',
|
|
268
|
-
emit: 'user'
|
|
269
|
-
}
|
|
270
|
-
]
|
|
271
|
-
}
|
|
272
|
-
console.warn(this.config)
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// 数据初始化
|
|
276
|
-
if (this.cardData) {
|
|
277
|
-
// if (this.createdQuery) {
|
|
278
|
-
// this.loadData()
|
|
279
|
-
// }
|
|
280
|
-
} else {
|
|
281
|
-
this.data = {
|
|
282
|
-
one: '未获取到配置',
|
|
283
|
-
two: '未获取到配置',
|
|
284
|
-
three: '未获取到配置',
|
|
285
|
-
four: '未获取到配置',
|
|
286
|
-
five: '未获取到配置',
|
|
287
|
-
six: 70
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
// 测试数据初始化
|
|
291
|
-
if (this.testData) {
|
|
292
|
-
this.data = this.testData
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
methods: {
|
|
296
|
-
// 根据比例计算出颜色
|
|
297
|
-
determineRatioColor (ratio, isNum = false) {
|
|
298
|
-
let result
|
|
299
|
-
// 如果是数字,并且比例大于79,则将数字显示为黑色
|
|
300
|
-
if (isNum && ratio > 79) {
|
|
301
|
-
return 'rgb(0,0,0)'
|
|
302
|
-
}
|
|
303
|
-
if (ratio >= 90) {
|
|
304
|
-
result = 'rgb( 1,245, 38 )'
|
|
305
|
-
} else if (ratio >= 75) {
|
|
306
|
-
result = 'rgb( 139,245, 0)'
|
|
307
|
-
} else if (ratio >= 40) {
|
|
308
|
-
result = 'rgb(245,163, 0)'
|
|
309
|
-
} else if (ratio >= 20) {
|
|
310
|
-
result = 'rgb(244, 96, 0)'
|
|
311
|
-
} else {
|
|
312
|
-
result = 'rgb(255, 0, 0)'
|
|
313
|
-
}
|
|
314
|
-
return result
|
|
315
|
-
},
|
|
316
|
-
// 点击按钮
|
|
317
|
-
clickFooter (data, eventName) {
|
|
318
|
-
this.$emit('cardEmit', data, eventName)
|
|
319
|
-
},
|
|
320
|
-
// 获取数据
|
|
321
|
-
loadData () {
|
|
322
|
-
this.render = false
|
|
323
|
-
const parameter = Object.assign({
|
|
324
|
-
querySummary: false, // 分页查询的情况不重新获取汇总数据
|
|
325
|
-
pageNo: this.pageNum,
|
|
326
|
-
pageSize: this.pageSize
|
|
327
|
-
}
|
|
328
|
-
)
|
|
329
|
-
this.cardData(parameter).then(res => {
|
|
330
|
-
this.data = res.data
|
|
331
|
-
this.total = res.totalCount
|
|
332
|
-
this.render = true
|
|
333
|
-
})
|
|
334
|
-
},
|
|
335
|
-
// 页码改变
|
|
336
|
-
pageNumChange (page, pageSize) {
|
|
337
|
-
this.pageNum = page
|
|
338
|
-
this.pageSize = pageSize
|
|
339
|
-
this.loadData()
|
|
340
|
-
},
|
|
341
|
-
// 分页大小改变
|
|
342
|
-
pageSizeChange (current, pageSize) {
|
|
343
|
-
this.pageSize = pageSize
|
|
344
|
-
this.loadData()
|
|
345
|
-
},
|
|
346
|
-
// 刷新
|
|
347
|
-
refresh () {
|
|
348
|
-
this.loadData()
|
|
349
|
-
},
|
|
350
|
-
// 分页前展示当前项和总数
|
|
351
|
-
paginationShowTotal () {
|
|
352
|
-
return `${(this.pageNum - 1) * this.pageSize + 1 } - ${ this.pageNum * this.pageSize } | 共 ${ this.total } 项`
|
|
353
|
-
},
|
|
354
|
-
getRibbonColor (color) {
|
|
355
|
-
switch (color) {
|
|
356
|
-
case 'red':
|
|
357
|
-
return '#ff4d4f'
|
|
358
|
-
case 'blue':
|
|
359
|
-
return '#1890ff'
|
|
360
|
-
case 'yellow':
|
|
361
|
-
return '#fadb14'
|
|
362
|
-
default:
|
|
363
|
-
return '#ff4d4f' // 默认红色
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
</script>
|
|
369
|
-
|
|
370
|
-
<style lang="less" scoped>
|
|
371
|
-
.hide-page-numbers /deep/ .ant-pagination-item,
|
|
372
|
-
.hide-page-numbers /deep/ .ant-pagination-jump-next {
|
|
373
|
-
display: none !important; /* 隐藏数字页码和多页跳转 */
|
|
374
|
-
}
|
|
375
|
-
.hide-page-numbers /deep/ .ant-pagination-prev,
|
|
376
|
-
.hide-page-numbers /deep/ .ant-pagination-next {
|
|
377
|
-
display: inline-block !important; /* 保留左右跳转按钮 */
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.XCard {
|
|
381
|
-
display: flex;
|
|
382
|
-
flex-wrap: wrap;
|
|
383
|
-
justify-content: flex-start;
|
|
384
|
-
overflow-y: auto;
|
|
385
|
-
overflow-x: hidden;
|
|
386
|
-
max-height: 85vh;
|
|
387
|
-
.data-card {
|
|
388
|
-
width: 100%;
|
|
389
|
-
max-width: 300px;
|
|
390
|
-
border: 2px solid rgb(244,244,244);
|
|
391
|
-
border-radius: 5px;
|
|
392
|
-
margin: 2px;
|
|
393
|
-
overflow: hidden;
|
|
394
|
-
|
|
395
|
-
::v-deep .ant-card-body {
|
|
396
|
-
padding: 15px !important; // 使用 !important 确保样式覆盖
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.header {
|
|
400
|
-
width: 100%;
|
|
401
|
-
background-color: rgb(244,244,244);
|
|
402
|
-
padding: 5px 15px;
|
|
403
|
-
|
|
404
|
-
span {
|
|
405
|
-
font-weight: bold;
|
|
406
|
-
font-size: 1.1em;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
.body {
|
|
411
|
-
.body-text{
|
|
412
|
-
width: 500px;
|
|
413
|
-
font-weight: bold;
|
|
414
|
-
font-size: 1.1em;
|
|
415
|
-
.text-ellipsis{
|
|
416
|
-
display: inline-block;
|
|
417
|
-
max-width: 260px; /* 控制文本的最大宽度 */
|
|
418
|
-
white-space: nowrap;
|
|
419
|
-
overflow: hidden;
|
|
420
|
-
text-overflow: ellipsis;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
.body-item {
|
|
425
|
-
padding: 3px 5px;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
.body-split {
|
|
429
|
-
margin: 1px 0;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.body-item-label {
|
|
433
|
-
color: rgba(117, 117, 117, 0.8);
|
|
434
|
-
font-size: 0.95em;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.body-item-value {
|
|
438
|
-
color: black;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.progress {
|
|
442
|
-
display: inline-block;
|
|
443
|
-
width: 60%;
|
|
444
|
-
height: 60%;
|
|
445
|
-
float: right;
|
|
446
|
-
padding-right: 1.5%;
|
|
447
|
-
margin-top: 0.5%;
|
|
448
|
-
|
|
449
|
-
.progress-bar {
|
|
450
|
-
width: 100%;
|
|
451
|
-
height: 90%;
|
|
452
|
-
display: inline-block;
|
|
453
|
-
border-radius: 10%;
|
|
454
|
-
background-color: rgba(212,217,218, 0.6);
|
|
455
|
-
|
|
456
|
-
.progress-done {
|
|
457
|
-
float: left;
|
|
458
|
-
display: inline-block;
|
|
459
|
-
height: 100%;
|
|
460
|
-
border-radius: 10%;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
.progress-num {
|
|
465
|
-
position: relative;
|
|
466
|
-
top: -83%;
|
|
467
|
-
left: -3%;
|
|
468
|
-
text-align: end;
|
|
469
|
-
font-size: 0.9em;
|
|
470
|
-
color: black;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.custom-title {
|
|
476
|
-
display: flex;
|
|
477
|
-
align-items: center;
|
|
478
|
-
gap: 12px;
|
|
479
|
-
|
|
480
|
-
.title-id {
|
|
481
|
-
flex-shrink: 0;
|
|
482
|
-
width: 65px;
|
|
483
|
-
color: #1890ff;
|
|
484
|
-
font-size: 16px;
|
|
485
|
-
font-weight: bold;
|
|
486
|
-
padding: 4px 8px;
|
|
487
|
-
border: 1px solid #1890ff;
|
|
488
|
-
border-radius: 4px;
|
|
489
|
-
line-height: 1.4;
|
|
490
|
-
text-align: center;
|
|
491
|
-
white-space: nowrap;
|
|
492
|
-
overflow: hidden;
|
|
493
|
-
text-overflow: ellipsis;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.title-basic {
|
|
497
|
-
display: flex;
|
|
498
|
-
flex-direction: column;
|
|
499
|
-
flex-grow: 1;
|
|
500
|
-
|
|
501
|
-
.subtitle2, .subtitle3 {
|
|
502
|
-
display: inline-block;
|
|
503
|
-
max-width: 50px; /* 固定宽度 */
|
|
504
|
-
white-space: nowrap;
|
|
505
|
-
overflow: hidden;
|
|
506
|
-
text-overflow: ellipsis;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
.title-main {
|
|
510
|
-
display: flex;
|
|
511
|
-
align-items: center;
|
|
512
|
-
gap: 8px;
|
|
513
|
-
.title-info {
|
|
514
|
-
margin-left: 6px;
|
|
515
|
-
color: #808080;
|
|
516
|
-
}
|
|
517
|
-
.title-title3 {
|
|
518
|
-
color: #808080;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.additional-info {
|
|
523
|
-
display: flex;
|
|
524
|
-
gap: 8px;
|
|
525
|
-
font-size: 13px;
|
|
526
|
-
color: #808080;
|
|
527
|
-
.subtitle4 {
|
|
528
|
-
color: rgba(0, 0, 255, 0.8);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
.ribbon {
|
|
535
|
-
position: absolute;
|
|
536
|
-
top: 16px;
|
|
537
|
-
right: -6px;
|
|
538
|
-
background-color: #ff4d4f;
|
|
539
|
-
color: white;
|
|
540
|
-
padding: 5px 25px;
|
|
541
|
-
font-size: 12px;
|
|
542
|
-
transform: rotate(45deg) translateX(30%);
|
|
543
|
-
transform-origin: top right;
|
|
544
|
-
z-index: 1;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
.custom-actions {
|
|
548
|
-
.footer-icon {
|
|
549
|
-
margin-right: 5px;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.footer-item-split {
|
|
553
|
-
color: rgba(220, 220, 220, 0.59);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
.footer-item {
|
|
557
|
-
color: rgba(117, 117, 117, 0.8);
|
|
558
|
-
font-size: 1em;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
.footer-item:hover {
|
|
562
|
-
color: rgb( 24,144,255 );
|
|
563
|
-
cursor: pointer;
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
.ellipsis {
|
|
569
|
-
display: inline-block;
|
|
570
|
-
max-width: 60px;
|
|
571
|
-
white-space: nowrap;
|
|
572
|
-
overflow: hidden;
|
|
573
|
-
text-overflow: ellipsis;
|
|
574
|
-
}
|
|
575
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="render" class="XCard">
|
|
4
|
+
<template v-for="(card, itemIndex) in data">
|
|
5
|
+
<a-card :key="'card' + itemIndex" class="data-card">
|
|
6
|
+
<!-- 绑带 -->
|
|
7
|
+
<!-- <div class="ribbon" v-for="column in tableColumns" v-if="column.dataIndex === item.key" :key="column.dataIndex">-->
|
|
8
|
+
<!-- <template v-if="column.slotType === 'badge'">-->
|
|
9
|
+
<!-- <x-badge-->
|
|
10
|
+
<!-- :service-name="serviceName"-->
|
|
11
|
+
<!-- :env="env"-->
|
|
12
|
+
<!-- :dataCard="true"-->
|
|
13
|
+
<!-- :badge-key="column.slotKeyMap"-->
|
|
14
|
+
<!-- :value="card[item.key]" />-->
|
|
15
|
+
<!-- </template>-->
|
|
16
|
+
<!-- <template v-else>-->
|
|
17
|
+
<!-- <slot :name="column.slots.customRender">{{ card[config.bandage] }}</slot>-->
|
|
18
|
+
<!-- </template>-->
|
|
19
|
+
<!-- </div>-->
|
|
20
|
+
<div
|
|
21
|
+
v-if="config && card[config.ribbon]"
|
|
22
|
+
class="ribbon"
|
|
23
|
+
:style="{ backgroundColor: getRibbonColor(card[config.ribbonColor]) }">
|
|
24
|
+
{{ card[config.ribbon] }}
|
|
25
|
+
</div>
|
|
26
|
+
<!-- 自定义标题 -->
|
|
27
|
+
<template #title>
|
|
28
|
+
<div class="custom-title">
|
|
29
|
+
<a-tooltip placement="top">
|
|
30
|
+
<template #title>{{ card[config.id] }}</template>
|
|
31
|
+
<div class="title-id" v-if="card[config.id]">{{ card[config.id] }}</div>
|
|
32
|
+
</a-tooltip>
|
|
33
|
+
<div class="title-basic">
|
|
34
|
+
<div class="title-main">
|
|
35
|
+
<span class="title-name">{{ card[config.title] }}</span>
|
|
36
|
+
<span class="title-info">{{ card[config.title2] }}</span>
|
|
37
|
+
<span class="title-title3">{{ card[config.title3] }}</span>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="additional-info" v-if="card[config.subtitle2] || card[config.subtitle3] || card[config.subtitle4]">
|
|
40
|
+
<a-tooltip placement="top" v-if="card[config.subtitle2]">
|
|
41
|
+
<template #title>{{ card[config.subtitle2] }}</template>
|
|
42
|
+
<span class="subtitle2">{{ card[config.subtitle2] }}</span>
|
|
43
|
+
</a-tooltip>
|
|
44
|
+
<a-tooltip placement="top" v-if="card[config.subtitle3]">
|
|
45
|
+
<template #title>{{ card[config.subtitle3] }}</template>
|
|
46
|
+
<span class="subtitle3">{{ card[config.subtitle3] }}</span>
|
|
47
|
+
</a-tooltip>
|
|
48
|
+
<span class="subtitle4" v-if="card[config.subtitle4]">{{ card[config.subtitle4] }}</span>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
<!-- 主体 -->
|
|
54
|
+
<div class="body">
|
|
55
|
+
<div class="body-text" v-if="card[config.text]">
|
|
56
|
+
<a-tooltip :title="card[config.text]">
|
|
57
|
+
<span class="text-ellipsis">{{ card[config.text] }}</span>
|
|
58
|
+
</a-tooltip>
|
|
59
|
+
</div>
|
|
60
|
+
<template v-for="(item, bodyIndex) in config.content" v-if="bodyIndex < 6">
|
|
61
|
+
<div :key="'body' + bodyIndex" class="body-item">
|
|
62
|
+
<span class="body-item-label">{{ item.label }}:</span>
|
|
63
|
+
<template v-if="item.type === 'progress'">
|
|
64
|
+
<div class="progress">
|
|
65
|
+
<div class="progress-bar">
|
|
66
|
+
<div class="progress-done" :style="'width:' + card[item.key] * 100 + '%;backgroundColor: ' + determineRatioColor(card[item.key] * 100)"></div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="progress-num">{{ card[item.key] * 100 }}%</div>
|
|
70
|
+
</template>
|
|
71
|
+
<template v-else-if="item.type === 'custom' && tableColumns">
|
|
72
|
+
<!-- 根据 tableColumns 显示自定义内容 -->
|
|
73
|
+
<span v-for="column in tableColumns" v-if="column.dataIndex === item.key" :key="column.dataIndex">
|
|
74
|
+
<template v-if="column.slotType === 'badge'">
|
|
75
|
+
<x-badge
|
|
76
|
+
:service-name="serviceName"
|
|
77
|
+
:env="env"
|
|
78
|
+
:dataCard="true"
|
|
79
|
+
:badge-key="column.slotKeyMap"
|
|
80
|
+
:value="card[item.key]" />
|
|
81
|
+
</template>
|
|
82
|
+
<template v-else>
|
|
83
|
+
<slot :name="column.slots.customRender">{{ card[item.key] }}</slot>
|
|
84
|
+
</template>
|
|
85
|
+
</span>
|
|
86
|
+
</template>
|
|
87
|
+
<template v-else>
|
|
88
|
+
<span class="body-item-value">{{ card[item.key] }}</span>
|
|
89
|
+
</template>
|
|
90
|
+
</div>
|
|
91
|
+
<a-divider
|
|
92
|
+
v-if="bodyIndex !== config.content.length - 1"
|
|
93
|
+
dashed
|
|
94
|
+
:key="'body' + bodyIndex + 'after'"
|
|
95
|
+
class="body-split" />
|
|
96
|
+
</template>
|
|
97
|
+
</div>
|
|
98
|
+
<!-- 下方按钮 -->
|
|
99
|
+
<template #actions>
|
|
100
|
+
<a-row align="middle" class="custom-actions" v-if="config && config.footer && config.footer.length > 0">
|
|
101
|
+
<template v-for="(item, footerIndex) in config.footer">
|
|
102
|
+
<a-col :key="'footer_' + footerIndex" class="footer-item" :span="11" @click="clickFooter(card, item.emit)">
|
|
103
|
+
<span>
|
|
104
|
+
<a-icon :type="item.icon" class="footer-icon" />
|
|
105
|
+
<span>{{ item.label }}</span>
|
|
106
|
+
</span>
|
|
107
|
+
</a-col>
|
|
108
|
+
<a-col
|
|
109
|
+
v-if="footerIndex !== config.footer.length - 1"
|
|
110
|
+
:span="1"
|
|
111
|
+
:key="'footer_' + footerIndex + 'after'"
|
|
112
|
+
class="footer-item-split">
|
|
113
|
+
|
|
|
114
|
+
</a-col>
|
|
115
|
+
</template>
|
|
116
|
+
</a-row>
|
|
117
|
+
</template>
|
|
118
|
+
</a-card>
|
|
119
|
+
</template>
|
|
120
|
+
</div>
|
|
121
|
+
<div v-else>
|
|
122
|
+
<a-skeleton />
|
|
123
|
+
</div>
|
|
124
|
+
<div v-if="this.showPagination">
|
|
125
|
+
<a-divider />
|
|
126
|
+
<a-pagination
|
|
127
|
+
v-model="pageNum"
|
|
128
|
+
style="float: right"
|
|
129
|
+
:total="total"
|
|
130
|
+
show-less-items
|
|
131
|
+
:page-size="pageSize"
|
|
132
|
+
:page-size-options="pageSizeOptions"
|
|
133
|
+
show-size-changer
|
|
134
|
+
@change="pageNumChange"
|
|
135
|
+
:showTotal="paginationShowTotal"
|
|
136
|
+
@showSizeChange="pageSizeChange">
|
|
137
|
+
</a-pagination>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<script>
|
|
143
|
+
import XBadge from '@vue2-client/base-client/components/common/XBadge'
|
|
144
|
+
|
|
145
|
+
export default {
|
|
146
|
+
name: 'XDataCard',
|
|
147
|
+
components: {
|
|
148
|
+
XBadge,
|
|
149
|
+
},
|
|
150
|
+
props: {
|
|
151
|
+
// 卡片数据更新方法
|
|
152
|
+
cardData: {
|
|
153
|
+
type: Function,
|
|
154
|
+
default: undefined
|
|
155
|
+
},
|
|
156
|
+
// 卡片的配置
|
|
157
|
+
cardConfig: {
|
|
158
|
+
type: Object,
|
|
159
|
+
default: undefined
|
|
160
|
+
},
|
|
161
|
+
showPagination: {
|
|
162
|
+
type: Boolean,
|
|
163
|
+
default: false
|
|
164
|
+
},
|
|
165
|
+
// 临时
|
|
166
|
+
testData: {
|
|
167
|
+
type: Array,
|
|
168
|
+
default: undefined
|
|
169
|
+
},
|
|
170
|
+
tableColumns: {
|
|
171
|
+
type: Array,
|
|
172
|
+
default: undefined
|
|
173
|
+
},
|
|
174
|
+
// 服务名称
|
|
175
|
+
serviceName: undefined,
|
|
176
|
+
// 当前环境
|
|
177
|
+
env: {
|
|
178
|
+
type: String,
|
|
179
|
+
default: 'prod'
|
|
180
|
+
},
|
|
181
|
+
// pageSize参数
|
|
182
|
+
prePageSize: {
|
|
183
|
+
type: Number,
|
|
184
|
+
default: undefined
|
|
185
|
+
},
|
|
186
|
+
// 初始是否加载数据
|
|
187
|
+
createdQuery: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
default: false
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
data () {
|
|
193
|
+
return {
|
|
194
|
+
// 配置
|
|
195
|
+
config: {},
|
|
196
|
+
// 数据
|
|
197
|
+
data: {},
|
|
198
|
+
// 当前页码
|
|
199
|
+
pageNum: 1,
|
|
200
|
+
// 控制渲染
|
|
201
|
+
render: true,
|
|
202
|
+
// 分页大小
|
|
203
|
+
pageSize: 10,
|
|
204
|
+
// 分页大小选项
|
|
205
|
+
pageSizeOptions: ['4', '6', '8', '10'],
|
|
206
|
+
// 数据总数
|
|
207
|
+
total: 0
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
created () {
|
|
211
|
+
// 根据参数初始化数据值
|
|
212
|
+
if (this.prePageSize) {
|
|
213
|
+
this.pageSize = this.prePageSize
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
mounted () {
|
|
217
|
+
// 配置初始化
|
|
218
|
+
if (this.cardConfig) {
|
|
219
|
+
this.config = this.cardConfig
|
|
220
|
+
} else {
|
|
221
|
+
this.config = {
|
|
222
|
+
id: '未获取到配置',
|
|
223
|
+
title: '未获取到配置',
|
|
224
|
+
title2: '未获取到配置',
|
|
225
|
+
title3: '未获取到配置',
|
|
226
|
+
subtitle2: '未获取到配置',
|
|
227
|
+
subtitle3: '未获取到配置',
|
|
228
|
+
subtitle4: '未获取到配置',
|
|
229
|
+
text: '未获取到配置',
|
|
230
|
+
ribbon: '未获取到配置',
|
|
231
|
+
ribbonColor: '未获取到配置',
|
|
232
|
+
content: [
|
|
233
|
+
{
|
|
234
|
+
label: '未获取到配置',
|
|
235
|
+
key: 'one'
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
label: '未获取到配置',
|
|
239
|
+
key: 'two'
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
label: '未获取到配置',
|
|
243
|
+
key: 'three'
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
label: '未获取到配置',
|
|
247
|
+
key: 'four'
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
label: '未获取到配置',
|
|
251
|
+
key: 'five'
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
label: '未获取到配置',
|
|
255
|
+
key: 'six',
|
|
256
|
+
type: 'progress'
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
footer: [
|
|
260
|
+
{
|
|
261
|
+
icon: 'edit',
|
|
262
|
+
label: '未获取到配置',
|
|
263
|
+
emit: 'planEdit'
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
icon: 'user',
|
|
267
|
+
label: '未获取到配置',
|
|
268
|
+
emit: 'user'
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
console.warn(this.config)
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// 数据初始化
|
|
276
|
+
if (this.cardData) {
|
|
277
|
+
// if (this.createdQuery) {
|
|
278
|
+
// this.loadData()
|
|
279
|
+
// }
|
|
280
|
+
} else {
|
|
281
|
+
this.data = {
|
|
282
|
+
one: '未获取到配置',
|
|
283
|
+
two: '未获取到配置',
|
|
284
|
+
three: '未获取到配置',
|
|
285
|
+
four: '未获取到配置',
|
|
286
|
+
five: '未获取到配置',
|
|
287
|
+
six: 70
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
// 测试数据初始化
|
|
291
|
+
if (this.testData) {
|
|
292
|
+
this.data = this.testData
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
methods: {
|
|
296
|
+
// 根据比例计算出颜色
|
|
297
|
+
determineRatioColor (ratio, isNum = false) {
|
|
298
|
+
let result
|
|
299
|
+
// 如果是数字,并且比例大于79,则将数字显示为黑色
|
|
300
|
+
if (isNum && ratio > 79) {
|
|
301
|
+
return 'rgb(0,0,0)'
|
|
302
|
+
}
|
|
303
|
+
if (ratio >= 90) {
|
|
304
|
+
result = 'rgb( 1,245, 38 )'
|
|
305
|
+
} else if (ratio >= 75) {
|
|
306
|
+
result = 'rgb( 139,245, 0)'
|
|
307
|
+
} else if (ratio >= 40) {
|
|
308
|
+
result = 'rgb(245,163, 0)'
|
|
309
|
+
} else if (ratio >= 20) {
|
|
310
|
+
result = 'rgb(244, 96, 0)'
|
|
311
|
+
} else {
|
|
312
|
+
result = 'rgb(255, 0, 0)'
|
|
313
|
+
}
|
|
314
|
+
return result
|
|
315
|
+
},
|
|
316
|
+
// 点击按钮
|
|
317
|
+
clickFooter (data, eventName) {
|
|
318
|
+
this.$emit('cardEmit', data, eventName)
|
|
319
|
+
},
|
|
320
|
+
// 获取数据
|
|
321
|
+
loadData () {
|
|
322
|
+
this.render = false
|
|
323
|
+
const parameter = Object.assign({
|
|
324
|
+
querySummary: false, // 分页查询的情况不重新获取汇总数据
|
|
325
|
+
pageNo: this.pageNum,
|
|
326
|
+
pageSize: this.pageSize
|
|
327
|
+
}
|
|
328
|
+
)
|
|
329
|
+
this.cardData(parameter).then(res => {
|
|
330
|
+
this.data = res.data
|
|
331
|
+
this.total = res.totalCount
|
|
332
|
+
this.render = true
|
|
333
|
+
})
|
|
334
|
+
},
|
|
335
|
+
// 页码改变
|
|
336
|
+
pageNumChange (page, pageSize) {
|
|
337
|
+
this.pageNum = page
|
|
338
|
+
this.pageSize = pageSize
|
|
339
|
+
this.loadData()
|
|
340
|
+
},
|
|
341
|
+
// 分页大小改变
|
|
342
|
+
pageSizeChange (current, pageSize) {
|
|
343
|
+
this.pageSize = pageSize
|
|
344
|
+
this.loadData()
|
|
345
|
+
},
|
|
346
|
+
// 刷新
|
|
347
|
+
refresh () {
|
|
348
|
+
this.loadData()
|
|
349
|
+
},
|
|
350
|
+
// 分页前展示当前项和总数
|
|
351
|
+
paginationShowTotal () {
|
|
352
|
+
return `${(this.pageNum - 1) * this.pageSize + 1 } - ${ this.pageNum * this.pageSize } | 共 ${ this.total } 项`
|
|
353
|
+
},
|
|
354
|
+
getRibbonColor (color) {
|
|
355
|
+
switch (color) {
|
|
356
|
+
case 'red':
|
|
357
|
+
return '#ff4d4f'
|
|
358
|
+
case 'blue':
|
|
359
|
+
return '#1890ff'
|
|
360
|
+
case 'yellow':
|
|
361
|
+
return '#fadb14'
|
|
362
|
+
default:
|
|
363
|
+
return '#ff4d4f' // 默认红色
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
</script>
|
|
369
|
+
|
|
370
|
+
<style lang="less" scoped>
|
|
371
|
+
.hide-page-numbers /deep/ .ant-pagination-item,
|
|
372
|
+
.hide-page-numbers /deep/ .ant-pagination-jump-next {
|
|
373
|
+
display: none !important; /* 隐藏数字页码和多页跳转 */
|
|
374
|
+
}
|
|
375
|
+
.hide-page-numbers /deep/ .ant-pagination-prev,
|
|
376
|
+
.hide-page-numbers /deep/ .ant-pagination-next {
|
|
377
|
+
display: inline-block !important; /* 保留左右跳转按钮 */
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.XCard {
|
|
381
|
+
display: flex;
|
|
382
|
+
flex-wrap: wrap;
|
|
383
|
+
justify-content: flex-start;
|
|
384
|
+
overflow-y: auto;
|
|
385
|
+
overflow-x: hidden;
|
|
386
|
+
max-height: 85vh;
|
|
387
|
+
.data-card {
|
|
388
|
+
width: 100%;
|
|
389
|
+
max-width: 300px;
|
|
390
|
+
border: 2px solid rgb(244,244,244);
|
|
391
|
+
border-radius: 5px;
|
|
392
|
+
margin: 2px;
|
|
393
|
+
overflow: hidden;
|
|
394
|
+
|
|
395
|
+
::v-deep .ant-card-body {
|
|
396
|
+
padding: 15px !important; // 使用 !important 确保样式覆盖
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.header {
|
|
400
|
+
width: 100%;
|
|
401
|
+
background-color: rgb(244,244,244);
|
|
402
|
+
padding: 5px 15px;
|
|
403
|
+
|
|
404
|
+
span {
|
|
405
|
+
font-weight: bold;
|
|
406
|
+
font-size: 1.1em;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.body {
|
|
411
|
+
.body-text{
|
|
412
|
+
width: 500px;
|
|
413
|
+
font-weight: bold;
|
|
414
|
+
font-size: 1.1em;
|
|
415
|
+
.text-ellipsis{
|
|
416
|
+
display: inline-block;
|
|
417
|
+
max-width: 260px; /* 控制文本的最大宽度 */
|
|
418
|
+
white-space: nowrap;
|
|
419
|
+
overflow: hidden;
|
|
420
|
+
text-overflow: ellipsis;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.body-item {
|
|
425
|
+
padding: 3px 5px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.body-split {
|
|
429
|
+
margin: 1px 0;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.body-item-label {
|
|
433
|
+
color: rgba(117, 117, 117, 0.8);
|
|
434
|
+
font-size: 0.95em;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.body-item-value {
|
|
438
|
+
color: black;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.progress {
|
|
442
|
+
display: inline-block;
|
|
443
|
+
width: 60%;
|
|
444
|
+
height: 60%;
|
|
445
|
+
float: right;
|
|
446
|
+
padding-right: 1.5%;
|
|
447
|
+
margin-top: 0.5%;
|
|
448
|
+
|
|
449
|
+
.progress-bar {
|
|
450
|
+
width: 100%;
|
|
451
|
+
height: 90%;
|
|
452
|
+
display: inline-block;
|
|
453
|
+
border-radius: 10%;
|
|
454
|
+
background-color: rgba(212,217,218, 0.6);
|
|
455
|
+
|
|
456
|
+
.progress-done {
|
|
457
|
+
float: left;
|
|
458
|
+
display: inline-block;
|
|
459
|
+
height: 100%;
|
|
460
|
+
border-radius: 10%;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
.progress-num {
|
|
465
|
+
position: relative;
|
|
466
|
+
top: -83%;
|
|
467
|
+
left: -3%;
|
|
468
|
+
text-align: end;
|
|
469
|
+
font-size: 0.9em;
|
|
470
|
+
color: black;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.custom-title {
|
|
476
|
+
display: flex;
|
|
477
|
+
align-items: center;
|
|
478
|
+
gap: 12px;
|
|
479
|
+
|
|
480
|
+
.title-id {
|
|
481
|
+
flex-shrink: 0;
|
|
482
|
+
width: 65px;
|
|
483
|
+
color: #1890ff;
|
|
484
|
+
font-size: 16px;
|
|
485
|
+
font-weight: bold;
|
|
486
|
+
padding: 4px 8px;
|
|
487
|
+
border: 1px solid #1890ff;
|
|
488
|
+
border-radius: 4px;
|
|
489
|
+
line-height: 1.4;
|
|
490
|
+
text-align: center;
|
|
491
|
+
white-space: nowrap;
|
|
492
|
+
overflow: hidden;
|
|
493
|
+
text-overflow: ellipsis;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.title-basic {
|
|
497
|
+
display: flex;
|
|
498
|
+
flex-direction: column;
|
|
499
|
+
flex-grow: 1;
|
|
500
|
+
|
|
501
|
+
.subtitle2, .subtitle3 {
|
|
502
|
+
display: inline-block;
|
|
503
|
+
max-width: 50px; /* 固定宽度 */
|
|
504
|
+
white-space: nowrap;
|
|
505
|
+
overflow: hidden;
|
|
506
|
+
text-overflow: ellipsis;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.title-main {
|
|
510
|
+
display: flex;
|
|
511
|
+
align-items: center;
|
|
512
|
+
gap: 8px;
|
|
513
|
+
.title-info {
|
|
514
|
+
margin-left: 6px;
|
|
515
|
+
color: #808080;
|
|
516
|
+
}
|
|
517
|
+
.title-title3 {
|
|
518
|
+
color: #808080;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.additional-info {
|
|
523
|
+
display: flex;
|
|
524
|
+
gap: 8px;
|
|
525
|
+
font-size: 13px;
|
|
526
|
+
color: #808080;
|
|
527
|
+
.subtitle4 {
|
|
528
|
+
color: rgba(0, 0, 255, 0.8);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.ribbon {
|
|
535
|
+
position: absolute;
|
|
536
|
+
top: 16px;
|
|
537
|
+
right: -6px;
|
|
538
|
+
background-color: #ff4d4f;
|
|
539
|
+
color: white;
|
|
540
|
+
padding: 5px 25px;
|
|
541
|
+
font-size: 12px;
|
|
542
|
+
transform: rotate(45deg) translateX(30%);
|
|
543
|
+
transform-origin: top right;
|
|
544
|
+
z-index: 1;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.custom-actions {
|
|
548
|
+
.footer-icon {
|
|
549
|
+
margin-right: 5px;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.footer-item-split {
|
|
553
|
+
color: rgba(220, 220, 220, 0.59);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.footer-item {
|
|
557
|
+
color: rgba(117, 117, 117, 0.8);
|
|
558
|
+
font-size: 1em;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.footer-item:hover {
|
|
562
|
+
color: rgb( 24,144,255 );
|
|
563
|
+
cursor: pointer;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.ellipsis {
|
|
569
|
+
display: inline-block;
|
|
570
|
+
max-width: 60px;
|
|
571
|
+
white-space: nowrap;
|
|
572
|
+
overflow: hidden;
|
|
573
|
+
text-overflow: ellipsis;
|
|
574
|
+
}
|
|
575
|
+
</style>
|