index.vue
25.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
<!-- 表格+分页 -->
<template>
<div class="d2-table">
<el-table :ref="`${tableParams.mutiSelectName}MutiTable` || 'mutiTable'"
v-loading="loading"
v-scroll="scroll"
:border="border"
:data="getListApi ? data : tableData"
:highlight-current-row="true"
:max-height="maxHeight"
:row-key="getRowKey"
:span-method="arraySpanMethod"
:tree-props="{ children: 'upgradeGoodsList' }"
v-bind="$attrs"
@select="handleSelectRow"
@select-all="handleSelectAll"
@selection-change="handleSelect"
@sort-change="sortChange">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
align="center"
type="selection"
width="55"
:selectable="selectableFn" />
<el-table-column v-if="tableParams.singleSelectUniqueKey"
align="center"
width="55">
<template #default="scope">
<slot name="single-button" :scope="scope.row" />
</template>
</el-table-column>
<el-table-column v-if="hasNum"
align="center"
label="序号"
type="index"
width="60px"
:index="
(index) =>
index
+ ((pagination.currentPage
? pagination.currentPage
: page.currentPage)
- 1)
* (pagination.pageSize ? pagination.pageSize : page.pageSize)
+ 1
" />
<template v-for="(item, index) in tableParams.tableColumns">
<el-table-column v-if="item.children && item.children.length"
:key="`group-${index}`"
:align="item.align || 'center'"
:label="item.label"
:render-header="item.renderHeader">
<template #header>
<span>{{ item.label }}</span>
<TableHeadSearch v-if="item.optionConfig"
:base-data="baseData"
:option-config="item.optionConfig"
:search-form="headSearchForm"
@handleTableHeadChange="handleTableHeadChange" />
<img v-if="item.headerImgObj"
style="
cursor: pointer;
margin-left: 5px;
width: 16px;
height: 16px;
vertical-align: middle;
"
:src="require('@/assets/icon-edit2.png')"
@click="handleHeaderBatch(item)" />
<el-tooltip v-if="item.isPopConfig"
effect="dark"
placement="top-start"
:content="item.isPopConfig.text"
:open-delay="200"
:popper-class="item.isPopConfig.popperClass || 'd2-table__header-tooltip'">
<img style="
cursor: pointer;
margin-left: 5px;
width: 13.33px;
height: 13.33px;
vertical-align: middle;
"
:src="require('@/assets/mark.png')" />
</el-tooltip>
</template>
<template v-for="(sub, sIndex) in item.children">
<el-table-column :key="`sub-${index}-${sIndex}`"
:align="sub.align || 'center'"
:label="sub.label"
:min-width="sub.minWidth"
:prop="sub.prop"
:render-header="sub.renderHeader"
:show-overflow-tooltip="sub.showOverFlow"
:sortable="sub.sortable"
:width="sub.width">
<template #header>
<span>{{ sub.label }}</span>
<TableHeadSearch v-if="sub.optionConfig"
:base-data="baseData"
:option-config="sub.optionConfig"
:search-form="headSearchForm"
@handleTableHeadChange="handleTableHeadChange" />
<img v-if="sub.headerImgObj"
style="
cursor: pointer;
margin-left: 5px;
width: 16px;
height: 16px;
vertical-align: middle;"
:src="require('@/assets/icon-edit2.png')"
@click="handleHeaderBatch(sub)" />
</template>
<template #default="scope">
<slot v-if="sub.addHtml"
:columns-obj="sub"
:index="scope.$index"
:name="sub.addHtml"
:prop="sub.prop"
:scope="scope.row"
:width="sub.width" />
<template v-else-if="sub.type == 'ownSerialNum'">
<span>
{{
scope.row[sub.prop] >= 0
? scope.row[sub.prop]
+ ((pagination.currentPage
? pagination.currentPage
: page.currentPage)
- 1)
* (pagination.pageSize
? pagination.pageSize
: page.pageSize)
+ 1
: ""
}}
</span>
</template>
<template v-else-if="sub.useTag">
<div>
<el-tag v-if="hasValue(sub, scope.row)" :type="getSchemaTagOptions(sub, scope.row).type">
{{ getSchemaTagOptions(sub, scope.row).label }}
</el-tag>
<span v-else>-</span>
</div>
</template>
<template v-else-if="sub.formatter">
<span v-if="sub.html" v-html="sub.formatter(scope.row)" />
<template v-if="!sub.html">
<span :class="sub.className ? sub.className(scope.row) : ''" />
<span :class="sub.valueClass ? sub.valueClass(scope.row) : ''" v-text="sub.formatter(scope.row)" />
</template>
</template>
<template v-else-if="getListApi">
<span v-if="sub.prefix">{{ sub.prefix }}</span>
<span v-if="sub.parentProp">
{{
scope.row[sub.parentProp]
? scope.row[sub.parentProp][sub.prop]
: ""
}}
</span>
<span v-else>
{{
scope.row[sub.prop] === 0 ? 0 : scope.row[sub.prop] || "-"
}}
</span>
</template>
<template v-else>
<span v-text="
tableData[scope.$index][sub.prop] != null
? tableData[scope.$index][sub.prop]
: '-'
" />
</template>
<template v-if="sub.addSymbol">
<span v-text="sub.addSymbol" />
</template>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column v-else
:key="index"
:align="item.align || 'center'"
:label="item.label"
:min-width="item.minWidth"
:prop="item.prop"
:render-header="item.renderHeader"
:show-overflow-tooltip="item.showOverFlow"
:sortable="item.sortable"
:width="item.width">
<template #header>
<span>{{ item.label }}</span>
<TableHeadSearch v-if="item.optionConfig"
:base-data="baseData"
:option-config="item.optionConfig"
:search-form="headSearchForm"
@handleTableHeadChange="handleTableHeadChange" />
<img v-if="item.headerImgObj"
style="
cursor: pointer;
margin-left: 5px;
width: 16px;
height: 16px;
vertical-align: middle;"
:src="require('@/assets/icon-edit2.png')"
@click="handleHeaderBatch(item)" />
<el-tooltip v-if="item.isPopConfig"
effect="dark"
placement="top-start"
:content="item.isPopConfig.text"
:open-delay="200"
:popper-class="item.isPopConfig.popperClass || 'd2-table__header-tooltip'">
<img style="
cursor: pointer;
margin-left: 5px;
width: 13.33px;
height: 13.33px;
vertical-align: middle;
"
:src="require('@/assets/mark.png')" />
</el-tooltip>
</template>
<template #default="scope">
<slot v-if="item.addHtml"
:columns-obj="item"
:index="scope.$index"
:name="item.addHtml"
:prop="item.prop"
:scope="scope.row"
:width="item.width" />
<template v-else-if="item.type === 'ownSerialNum'">
<span>
{{
scope.row[item.prop] >= 0
? scope.row[item.prop]
+ ((pagination.currentPage
? pagination.currentPage
: page.currentPage)
- 1)
* (pagination.pageSize
? pagination.pageSize
: page.pageSize)
+ 1
: ""
}}
</span>
</template>
<template v-else-if="item.useTag">
<div>
<el-tag v-if="hasValue(item, scope.row)" :type="getSchemaTagOptions(item, scope.row).type">
{{ getSchemaTagOptions(item, scope.row).label }}
</el-tag>
<span v-else>-</span>
</div>
</template>
<template v-else-if="item.formatter">
<span v-if="item.html" v-html="item.formatter(scope.row)" />
<template v-if="!item.html">
<span :class="item.className ? item.className(scope.row) : ''" />
<span :class="item.valueClass ? item.valueClass(scope.row) : ''" v-text="item.formatter(scope.row)" />
</template>
</template>
<template v-else-if="getListApi">
<span v-if="item.prefix">{{ item.prefix }}</span>
<span v-if="item.parentProp">
{{
scope.row[item.parentProp]
? scope.row[item.parentProp][item.prop]
: ""
}}
</span>
<span v-else>
{{
getSchemaProp(scope.row, item.prop)
}}
</span>
</template>
<template v-else>
<span v-text="
tableData[scope.$index][item.prop] != null
? tableData[scope.$index][item.prop]
: '-'
" />
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol" />
</template>
</template>
</el-table-column>
</template>
<el-table-column v-if="tableParams.tableOption"
label="操作"
:align="tableParams.tableOption.align || 'center'"
:fixed="tableParams.tableOption.fixed || 'right'"
:width="tableParams.tableOption.width || 'auto'">
<template #default="scope">
<slot name="auth-button"
:index="scope.$index"
:scope="scope.row" />
<slot name="auth-button-other"
:index="scope.$index"
:scope="scope.row" />
</template>
</el-table-column>
<template #empty>
<div class="emptyBg">
<img v-if="noDataImg"
class="noDataImg"
:src="noDataImg" />
{{ noDataText }}
</div>
</template>
</el-table>
<el-pagination v-if="hasPage"
background
:current-page="page.currentPage"
:layout="layout"
:page-size="page.pageSize"
:page-sizes="pageSizes"
:pager-count="pagerCount"
:total="getListApi ? total : tableTotal"
@current-change="handleCurrentChange"
@size-change="handleSizeChange" />
</div>
</template>
<script>
import { get } from "lodash-es";
import TableHeadSearch from "./TableHeadSearch";
export default {
name: "D2Table",
directives: {
scroll: {
bind(el, binding) {
const ele = el.querySelector(".el-table__body-wrapper");
ele.addEventListener("scroll", (e) => {
binding.value(e);
});
},
},
},
components: {
TableHeadSearch,
},
props: {
// 搜索条件
searchForm: {
type: Object,
default: () => {},
},
pageSizes: {
type: Array,
default: () => [5, 10, 20, 30, 40],
},
// 表格头部搜索条件 - start
headSearchForm: {
type: Object,
default: () => {},
},
// 选项列表Obj
baseData: {
type: Object,
default: () => {},
},
// 表格头部搜索条件 - end
// 表格数据-外部传入
tableData: {
type: Array,
default: () => [],
},
tableTotal: {
type: Number,
default: 0,
},
// 获取列表接口
getListApi: {
type: Function,
default: null,
},
// 是否需要表格loading,默认需要
noLoading: {
type: Boolean,
default: false,
},
// 搜索前操作
beforeSearchFn: {
type: Function,
default: () => {
return new Promise((resolve, reject) => {
resolve();
});
},
},
// 分页,默认有
hasPage: {
type: Boolean,
default: true,
},
// 分页组件配置
layout: {
type: String,
default: "sizes,total,->,prev,pager,next,jumper",
},
pageSize: {
// 分页码数
type: Number,
default: 10,
},
// 序号,默认有
hasNum: {
type: Boolean,
default: true,
},
// 排序列表对象
sortObj: {
type: Object,
default: () => {},
},
/**
* @typedef {Object} TagOption
* @description 标签配置项
* @property {string} type - Element Plus el-tag 的类型,可选值:'' | 'success' | 'warning' | 'danger' | 'info'
* @property {string} label - 标签显示的文本
*/
/**
* @typedef {Object.<string, TagOption>} TagOptions
* @description 标签选项映射表,key 为单元格值(通常为数字或字符串),value 为标签配置
*/
/**
* 使用说明:
*
* 1. 在 tableColumns 中为列设置 useTag: true
* 2. 配置 tagOptions 对象,key 为该列 prop 字段的实际值
* 3. getSchemaTagOptions 方法会根据 row[prop] 的值自动匹配 tagOptions 中对应的配置
* 4. 若匹配不到则返回空对象 {}
*
* 示例:
*
* ```js
* // 父组件中传入 tableParams
* tableParams: {
* tableColumns: [
* {
* label: '订单状态',
* prop: 'orderStatus',
* useTag: true,
* tagOptions: {
* [tag的值]: { type: 'info', label: '待支付' },
* 1: { type: 'warning', label: '已支付' },
* 2: { type: 'success', label: '已完成' },
* 3: { type: 'danger', label: '已取消' }
* }
* }
* ]
* }
* ```
*/
tableParams: {
type: Object,
default: () => {
return {
// { // 多级表头写法
// label: '基本信息',
// children: [
// { label: '商品名', prop: 'goodsInfo.goodsName', minWidth: 160, showOverFlow: true },
// { label: '类型', prop: 'goodsInfo.type', width: 100 },
// {
// label: '规格',
// prop: 'listShowSpecificationData',
// minWidth: 140,
// formatter: row => row.listShowSpecificationData || '-'
// }
// ]
// },
// 多选-判断来自哪个页面
// mutiSelectName: {
// type: String,
// default: ''
// },
// 多选-唯一标识
// mutiSelectUniqueKey: {
// type: String,
// default: ''
// },
// 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000)
// btnId: {
// type: String,
// default: ''
// },
// 后端返回列表参数名
listName: "",
// 标签-默认标签名为tag;若有多个,那么需要在表格栏的列中加“tagName”
// tag: {
// type: Array,
// default: () => []
// },
// 表格操作,默认没有
// tableOption: {
// type: Object,
// default: null
// },
// 表格栏
tableColumns: [],
// 树形表格等业务 id 可能重复时设为 true,并配合 mutiSelectUniqueKey 使用临时唯一字段
needUnique: false,
};
},
},
// 获取CheckBox是否可以勾选
selectableFn: {
type: Function,
default: null,
},
// 列表数据需特殊处理,传入函数则对列表数据进行转换,函数签名: (listData) => transformedListData
filterListDataFn: {
type: Function,
default: null,
},
// 合并单元格方法
arraySpanMethod: {
type: Function,
default: () => {},
},
// 边框
border: {
type: Boolean,
default: true,
},
maxHeight: {
type: [Number, String],
},
noDataImg: {
type: String,
default: "",
},
noDataText: {
type: String,
default: "暂无数据",
},
pagerCount: {
type: Number,
default: 7,
},
},
data() {
return {
orderByType: "",
loading: false,
data: [],
// 页码
page: {
pageSize: 10,
currentPage: 1,
},
total: 10,
// 排序
sortColum: "",
sort: "",
pagination: {},
// 多选数组
mutiSelectArr: {},
};
},
computed: {
tableRef() {
return this.$refs[this.tableParams.mutiSelectName + "MutiTable" || "mutiTable"];
},
},
watch: {
tableData: {
handler(val) {
if (this.getListApi) {
return;
}
this.assignUniqueRowKeys(val);
},
immediate: true,
},
},
mounted() {
const btn = document.getElementById(this.tableParams.btnId);
btn && btn.addEventListener("click", this.refreshEmit);
this.page.pageSize = this.pageSize;
this.getListApi && this.refreshTable();
},
methods: {
get,
hasValue(schema, row) {
const value = get(row, schema.prop);
return value !== null && value !== undefined && value !== "";
},
getSchemaTagOptions(schema, row) {
if (!schema.tagOptions) {
return {};
}
const value = this.getSchemaProp(row, schema.prop);
if (!schema.tagOptions[value]) {
return {};
}
return schema.tagOptions[value] || {};
},
getSchemaProp(row, prop) {
const value = get(row, prop);
return value === 0 ? 0 : value || "-";
},
/** needUnique:为父行与 upgradeGoodsList 子行写入连续唯一值,保证 row-key 不重复 */
assignUniqueRowKeys(listData) {
if (!this.tableParams.needUnique || !this.tableParams.mutiSelectUniqueKey) {
return;
}
if (!Array.isArray(listData) || listData.length === 0) {
return;
}
const keyProp = this.tableParams.mutiSelectUniqueKey;
let temp = 1;
listData.forEach((item) => {
item[keyProp] = temp;
temp += 1;
if (
Object.prototype.hasOwnProperty.call(item, "upgradeGoodsList")
&& Array.isArray(item.upgradeGoodsList)
) {
item.upgradeGoodsList.forEach((subItem) => {
subItem[keyProp] = temp;
temp += 1;
});
}
});
},
// 树形表格需 row-key 唯一标识,使用函数确保嵌套行也有有效 key
getRowKey(row) {
const k = this.tableParams.mutiSelectUniqueKey;
const key = (k && row[k]) ?? row.id ?? row.baseGoodsId ?? row.upgradeGoodsId ?? row.commodityCode;
if (key != null && key !== "") {
return String(key);
}
this._rowKeyFallback = (this._rowKeyFallback || 0) + 1;
return `row_${this._rowKeyFallback}`;
},
// 表头加图标
handleHeaderBatch(currentItem) {
if (currentItem.headerImgObj.fn) {
currentItem.headerImgObj.fn(currentItem);
}
},
// 排序
sortChange({ column, prop, order }) {
this.sortColum = order ? prop : "";
this.sort = order;
if (this.getListApi) {
this.refreshTable(true, true);
} else {
// this.$emit('sortChange', this.sortObj[this.sortColum][this.sort], this.sortColum)
this.$emit("sortChange", this.sortObj, this.sortColum, this.sort);
}
},
// 多选
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val;
// 多选
this.$emit("selectionTable", val, this.page.currentPage);
},
// 清空多选
clearMutiSelect() {
this.mutiSelectArr[this.tableParams.mutiSelectName] = [];
this.$refs[this.tableParams.mutiSelectName + "MutiTable"].clearSelection();
},
// 发布事件,以期查询条件改变后,页面图表需要刷新
refreshEmit() {
this.$emit("searchChange");
this.refreshTable(true, true);
},
refreshTable(clearMuti = false, resetCurrentPage = false) {
this.beforeSearchFn().then((res) => {
// console.log(res)
// 清空多选
clearMuti && this.clearMutiSelect();
if (!this.noLoading) {
this.loading = true;
}
resetCurrentPage && (this.page.currentPage = 1);
let params = {
...this.page,
...this.searchForm,
};
if (this.sort) {
console.log(this.sort, this.sortObj, this.sortColum, this.sort);
// params.sortColum = this.sortColum
// params.sort = this.sort === 'descending' ? 1 : 0
params.orderByType = this.sortObj[this.sortColum][this.sort];
this.orderByType = params.orderByType;
// params.orderByKey = this.sortColum
}
this.getListApi(params)
.then((res) => {
this.pagination = {
currentPage: res.pageNum,
pageSize: res.pageSize,
};
// this.tableParams.needUnique && (res[this.tableParams.listName].forEach((item) => {
// item[this.tableParams.mutiSelectUniqueKey]
// }))
//
let listData = res[this.tableParams.listName] || [];
listData.forEach((val, index) => {
if (!val.goodsInfo) {
val.goodsInfo = {};
}
val.ownSerialNum = index;
});
if (this.filterListDataFn && typeof this.filterListDataFn === "function") {
listData = this.filterListDataFn(listData);
}
this.data = listData;
this.assignUniqueRowKeys(this.data);
this.total = res.total;
this.loading = false;
this.$emit("setTableFinishFun", this.data, this.page.currentPage);
})
.catch(() => {
this.loading = false;
})
.finally(() => {
this.$emit("apiFinish", this.data);
});
});
},
// 表头搜索项-改变
handleTableHeadChange(obj) {
this.$emit("handleTableHeadChange", obj);
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value;
this.getListApi
? this.refreshTable(false)
: this.$emit("refreshTable", this.page);
this.$emit("pageChange", this.page);
},
// 页码
handleCurrentChange(value) {
this.page.currentPage = value;
this.getListApi
? this.refreshTable(false)
: this.$emit("refreshTable", this.page);
this.$emit("pageChange", this.page);
},
// 重置请求
resetRefreshTable() {
this.refreshTable_noApi();
this.refreshTable();
},
refreshTable_noApi() {
this.page = {
pageSize: 10,
currentPage: 1,
};
},
scroll(e) {
this.$emit("scroll", e);
},
// 当用户手动勾选数据行的 Checkbox 时触发的事件 selection, row
handleSelectRow(selection, row) {
this.$emit("selectRow", selection, row);
},
// 当用户手动勾选数据行的 Checkbox 时触发的事件 selection
handleSelectAll(selection) {
this.$emit("selectAll", selection);
},
},
};
</script>
<style lang="scss">
@import "~@/assets/style/defaultElementUI/el-tag.scss";
.a-click {
cursor: pointer;
}
.el-table {
.cell {
line-height: 18px;
}
p {
margin: 10px 0;
}
.head-search {
cursor: pointer;
}
}
@mixin spotBase {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 5px;
display: inline-block;
}
.ashSpot {
@include spotBase();
background: #c6c8cc;
}
.greenSpot {
@include spotBase();
background: #2cca74;
}
.yellowSpot {
@include spotBase();
background: #fdb757;
}
.redSpot {
@include spotBase();
background: #eb4e4e;
}
.color-red {
color: #eb4e4e;
}
.orgenSpot {
@include spotBase();
background: #f59619;
}
.blueSpot {
@include spotBase();
background: #5850ff;
}
.deepBlueSpot {
@include spotBase();
background: #185efe;
}
.emptyBg {
display: flex;
flex-direction: column;
align-items: center;
.noDataImg {
width: 270px;
height: 120px;
margin-bottom: 8px;
}
}
.d2-table__header-tooltip {
max-width: 320px;
line-height: 20px;
white-space: normal;
}
</style>