lambo-design-bi 0.0.1

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 (39) hide show
  1. package/bi/widget/README.md +18 -0
  2. package/bi/widget/api/data.js +48 -0
  3. package/bi/widget/atom/index.vue +36 -0
  4. package/bi/widget/atom/test.vue +36 -0
  5. package/bi/widget/config/config.js +7 -0
  6. package/bi/widget/container/card/card-widget.vue +46 -0
  7. package/bi/widget/container/card/comps/indicator-card/index.js +7 -0
  8. package/bi/widget/container/card/comps/indicator-card/src/indicator-card-bi-search.vue +132 -0
  9. package/bi/widget/container/card/comps/indicator-card/src/indicator-card-bi.vue +129 -0
  10. package/bi/widget/container/card/comps/indicator-card/src/indicator-card-item-bi.vue +97 -0
  11. package/bi/widget/container/card/comps/indicator-card/src/styles/css/card-search.less +108 -0
  12. package/bi/widget/container/card/comps/indicator-card/src/styles/css/card.less +114 -0
  13. package/bi/widget/layout/col.vue +35 -0
  14. package/bi/widget/layout/row.vue +40 -0
  15. package/bi/widget/num/index.vue +101 -0
  16. package/bi/widget/page/index.vue +38 -0
  17. package/bi/widget/search/search-form.vue +85 -0
  18. package/bi/widget/search/search-item.vue +205 -0
  19. package/bi/widget/table/detail-table.vue +65 -0
  20. package/bi/widget/table/paging-table.vue +188 -0
  21. package/bi/widget/util/widget-map.js +41 -0
  22. package/package.json +39 -0
  23. package/pub/charts/echarts.vue +57 -0
  24. package/pub/charts/factory/charts-factory.vue +58 -0
  25. package/pub/charts/factory/options.js +2351 -0
  26. package/pub/empty/index.vue +33 -0
  27. package/pub/helpbox/README.md +6 -0
  28. package/pub/helpbox/index.vue +363 -0
  29. package/pub/num-index/num-index.vue +120 -0
  30. package/pub/table/detail-table/index.vue +41 -0
  31. package/pub/table/paging-table/README.md +4 -0
  32. package/pub/table/paging-table/comps/export-data.vue +390 -0
  33. package/pub/table/paging-table/comps/export-drawer.vue +429 -0
  34. package/pub/table/paging-table/index.js +3 -0
  35. package/pub/table/paging-table/index.vue +1577 -0
  36. package/pub/table/paging-table/styles/css/index.less +190 -0
  37. package/pub/theme/color.js +3 -0
  38. package/util/math-util.js +71 -0
  39. package/util/num-util.js +16 -0
@@ -0,0 +1,190 @@
1
+ @import '@lambo-design/core/src/styles/default.less';
2
+
3
+ /*color*/
4
+ @ivu-primary-color: var(--primary-color, @_primary-color);
5
+ @ivu-success-color: var(--success-color, @_success-color);
6
+ @ivu-info-color: var(--info-color, @_info-color);
7
+ @ivu-warning-color: var(--warning-color, @_warning-color);
8
+ @ivu-danger-color: var(--error-color, @_error-color);
9
+ @ivu-disabled-color: var(--input-disabled-bg, @_input-disabled-bg);
10
+ @ivu-primary-disabled-color: var(--input-disabled-bg, @_input-disabled-bg);
11
+
12
+ .lambo-grid-table {
13
+ /deep/ .ivu-form {
14
+ .ivu-form-item {
15
+ display: inline-block;
16
+ }
17
+ }
18
+
19
+ /deep/ .ivu-form.lambo-query-filter {
20
+ .ivu-form-item {
21
+ display: block;
22
+ }
23
+ }
24
+
25
+ .buttons {
26
+ .ivu-btn {
27
+ margin-right: 5px;
28
+ }
29
+ }
30
+
31
+ .ivu-form-item {
32
+ margin-bottom: 10px;
33
+ }
34
+
35
+ /deep/ .ivu-table-fixed-shadow {
36
+ height: auto;
37
+ }
38
+
39
+ .table-option-dropdown {
40
+ border-bottom-left-radius: 0;
41
+ border-top-left-radius: 0;
42
+ border-left: none;
43
+ }
44
+
45
+ .message-box {
46
+ display: flex;
47
+ background: var(--primary-color-tint-90, @_primary-color-tint-90);
48
+ border: 1px solid var(--primary-color, @_primary-color);
49
+ height: 50px;
50
+ margin-top: 10px;
51
+
52
+ &.info {
53
+ background: var(--primary-color-tint-90, @_primary-color-tint-90);
54
+ border: 1px solid var(--primary-color, @_primary-color);
55
+ }
56
+
57
+ &.success {
58
+ background: var(--success-color-tint-90, @_success-color-tint-90);
59
+ border: 1px solid var(--success-color, @_success-color);
60
+ }
61
+
62
+ &.warn {
63
+ background: var(--warning-color-tint-90, @_warning-color-tint-90);
64
+ border: 1px solid var(--warning-color, @_warning-color);
65
+ }
66
+
67
+ &.error {
68
+ background: var(--error-color-tint-90, @_error-color-tint-90);
69
+ border: 1px solid var(--error-color, @_error-color);
70
+ }
71
+
72
+ .message-text {
73
+ line-height: 47px;
74
+ margin-right: 30px;
75
+ font-size: 14px;
76
+ padding-left: 10px;
77
+ }
78
+ }
79
+ }
80
+
81
+ .drop-down-tabs {
82
+ /deep/.ivu-tabs-bar {
83
+ padding: 5px 0 0 10px;
84
+ }
85
+
86
+ .tab-filter {
87
+ padding: 0 0 0 10px !important;
88
+ margin: 0 !important;
89
+ }
90
+
91
+ /deep/.ivu-form-item {
92
+ margin-bottom: 16px;
93
+ }
94
+
95
+ .checkbox-group {
96
+ display: flex;
97
+ flex-wrap: wrap;
98
+ justify-content: flex-start !important;
99
+ overflow: auto;
100
+ max-height: 100px;
101
+ width: 96%;
102
+
103
+ .checkbox-single {
104
+ min-height: 30px;
105
+ white-space: nowrap;
106
+ /* 不换行 */
107
+ overflow: unset !important;
108
+ /* 溢出内容隐藏 */
109
+ text-overflow: ellipsis;
110
+ /* 使用省略号代替溢出的内容 */
111
+ margin-bottom: 7px;
112
+ width: 24%;
113
+ height: 22%;
114
+ margin-right: 1%;
115
+
116
+ /deep/.ivu-tooltip {
117
+ width: calc(100% - 20px);
118
+
119
+ .ivu-tooltip-rel {
120
+ width: 100%;
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ vertical-align: bottom;
125
+ }
126
+ }
127
+ }
128
+ }
129
+
130
+ .tab-button {
131
+ background-color: white;
132
+ display: flex;
133
+ align-items: center;
134
+ justify-content: space-between;
135
+ width: 100%;
136
+ margin-top: 10px;
137
+ position: relative !important;
138
+ bottom: unset !important;
139
+ }
140
+ }
141
+
142
+ .tab-filter {
143
+ position: relative;
144
+ margin-left: 10px;
145
+ margin-right: 10px
146
+ }
147
+
148
+ .tab-button {
149
+ position: absolute;
150
+ bottom: 2px;
151
+ }
152
+
153
+ .setting-bottom-button-group {
154
+ float: right;
155
+ position: absolute;
156
+ bottom: 5px;
157
+ right: 10px;
158
+ }
159
+
160
+ .setting-bottom-button {
161
+ margin: 0 2px;
162
+ }
163
+
164
+ .checkbox-group {
165
+ display: flex;
166
+ flex-wrap: wrap;
167
+ justify-content: space-between;
168
+ }
169
+
170
+
171
+ .ivu-table-wrapper .ivu-table-row-hover {
172
+ background-color: #0091FF !important;
173
+ }
174
+
175
+ .checkbox-single {
176
+ white-space: nowrap;
177
+ /* 不换行 */
178
+ overflow: hidden;
179
+ /* 溢出内容隐藏 */
180
+ text-overflow: ellipsis;
181
+ /* 使用省略号代替溢出的内容 */
182
+ margin-bottom: 7px;
183
+ width: 22%;
184
+ height: 22%;
185
+ min-height: 30px;
186
+ }
187
+
188
+ .ivu-form-item .ivu-form-item-label:before {
189
+ margin-right: auto !important;
190
+ }
@@ -0,0 +1,3 @@
1
+
2
+ // 这个color要根据lambo-design和ant-design去合并修改
3
+ export const biColorArr = ['#2D8CF0', '#45D5D0', '#FFBF37', '#FD7336', '#655EF3', '#47D791', '#F85968', '#33BFF3', '#C74EF4', '#F84CEE', '#F5D000', '#B7E518']
@@ -0,0 +1,71 @@
1
+ //js除法计算
2
+ export function accDiv(arg1, arg2) {
3
+ let t1 = 0, t2 = 0, r1, r2;
4
+ try {
5
+ t1 = arg1.toString().split(".")[1].length
6
+ } catch (e) {
7
+ console.error('accDiv:', e)
8
+ }
9
+ try {
10
+ t2 = arg2.toString().split(".")[1].length
11
+ } catch (e) {
12
+ console.error('accDiv:', e)
13
+ }
14
+ r1 = Number(arg1.toString().replace(".", ""))
15
+ r2 = Number(arg2.toString().replace(".", ""))
16
+ return (r1 / r2) * Math.pow(10, t2 - t1);
17
+ }
18
+
19
+ //js乘法计算
20
+ export function accMul(arg1, arg2) {
21
+ let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
22
+ try {
23
+ m += s1.split(".")[1].length
24
+ } catch (e) {
25
+ console.error('accMul:', e)
26
+ }
27
+ try {
28
+ m += s2.split(".")[1].length
29
+ } catch (e) {
30
+ console.error('accMul:', e)
31
+ }
32
+ return accDiv(Number(s1.replace(".", "")) * Number(s2.replace(".", "")), Math.pow(10, m));
33
+ }
34
+
35
+ //js加法计算
36
+ export function accAdd(arg1, arg2) {
37
+ let r1, r2, m;
38
+ try {
39
+ r1 = arg1.toString().split(".")[1].length
40
+ } catch (e) {
41
+ r1 = 0
42
+ console.error('accAdd:', e)
43
+ }
44
+ try {
45
+ r2 = arg2.toString().split(".")[1].length
46
+ } catch (e) {
47
+ r2 = 0
48
+ console.error('accAdd:', e)
49
+ }
50
+ m = Math.pow(10, Math.max(r1, r2));
51
+ return accDiv((accMul(arg1, m) + accMul(arg2, m)), m);
52
+ }
53
+
54
+ //js减法计算
55
+ export function accSub(arg1, arg2) {
56
+ let r1, r2, m;
57
+ try {
58
+ r1 = arg1.toString().split(".")[1].length
59
+ } catch (e) {
60
+ r1 = 0
61
+ console.error('accSub:', e)
62
+ }
63
+ try {
64
+ r2 = arg2.toString().split(".")[1].length
65
+ } catch (e) {
66
+ r2 = 0
67
+ console.error('accSub:', e)
68
+ }
69
+ m = Math.pow(10, Math.max(r1, r2));
70
+ return accDiv((accMul(arg1, m) - accMul(arg2, m)), m);
71
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * formatNumLocale("1234567.89")) = "1,234,567.89"
3
+ * 不是数字的值原样返回
4
+ *
5
+ * @param num
6
+ * @returns {*|string}
7
+ */
8
+ export function formatNumLocale(num) {
9
+ console.log("formatNumLocale num:", num)
10
+ if (!isNaN(parseFloat(num)) && isFinite(num)) {
11
+ const newNum = typeof num === 'string' ? parseFloat(num) : num;
12
+ console.log("formatNumLocale newNum:", newNum)
13
+ return new Intl.NumberFormat('en-US').format(newNum);
14
+ }
15
+ return num
16
+ }