lambo-design-bi 0.0.185 → 0.0.187
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/bi/widget/num/index.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<LamboNumberInfoBi :title="title" :sub-title="subTitle" :num="num" :sub-num1="subNum1" :trend1="trend1"
|
|
3
3
|
:widget="widget" :is-drill="isDrill" @on-drill="onDrill" :sub-num2="subNum2" :trend2="trend2" :polar1="polar1"
|
|
4
|
-
:polar2="polar2" :eva-level="evaLevel" :tab-clickable="tabClickable" @on-tab-click="onTabClick">
|
|
4
|
+
:polar2="polar2" :eva-level="evaLevel" :tab-clickable="tabClickable" :default-tab-active="defaultTabActive" @on-tab-click="onTabClick">
|
|
5
5
|
</LamboNumberInfoBi>
|
|
6
6
|
</template>
|
|
7
7
|
<script>
|
|
@@ -62,6 +62,7 @@ export default {
|
|
|
62
62
|
this.tabClickable = true
|
|
63
63
|
}
|
|
64
64
|
if (this.widget.options["defaultTabActive"] === '1') {
|
|
65
|
+
console.log("num-info initConfig 卡片初始设置为激活状态触发点击,START 当前实例:", this.widget.id + "_" + this.widget.name + ",defaultTabActive:" + this.widget.options["defaultTabActive"])
|
|
65
66
|
this.defaultTabActive = true
|
|
66
67
|
}
|
|
67
68
|
},
|
package/package.json
CHANGED
|
@@ -363,7 +363,7 @@ export function getECharts(type, dataX, dataY, dataDim) {
|
|
|
363
363
|
},
|
|
364
364
|
color: dynamicColors,
|
|
365
365
|
grid: {
|
|
366
|
-
top: '
|
|
366
|
+
top: '40px', left: '0px', right: '50px', bottom: '0px', containLabel: true
|
|
367
367
|
},
|
|
368
368
|
calculable: true,
|
|
369
369
|
xAxis: {
|
|
@@ -462,13 +462,44 @@ export function getECharts(type, dataX, dataY, dataDim) {
|
|
|
462
462
|
},
|
|
463
463
|
data: dataY[0],
|
|
464
464
|
markPoint: {
|
|
465
|
+
symbol: 'pin',
|
|
466
|
+
symbolSize: 50,
|
|
467
|
+
itemStyle: {
|
|
468
|
+
color: colors[0],
|
|
469
|
+
borderWidth: 2,
|
|
470
|
+
shadowColor: 'rgba(0, 0, 0, 0.3)',
|
|
471
|
+
shadowBlur: 4
|
|
472
|
+
},
|
|
465
473
|
data: [
|
|
466
|
-
{
|
|
467
|
-
{
|
|
474
|
+
{type: 'max', name: '最大值'},
|
|
475
|
+
{type: 'min', name: '最小值',}
|
|
468
476
|
]
|
|
469
477
|
},
|
|
470
478
|
markLine: {
|
|
471
|
-
|
|
479
|
+
symbol: ['circle', 'arrow'],
|
|
480
|
+
symbolSize: [8, 16],
|
|
481
|
+
lineStyle: {
|
|
482
|
+
type: 'dashed',
|
|
483
|
+
width: 3,
|
|
484
|
+
color: colors[0]
|
|
485
|
+
},
|
|
486
|
+
label: {
|
|
487
|
+
show: true,
|
|
488
|
+
position: 'end',
|
|
489
|
+
color: '#fff',
|
|
490
|
+
backgroundColor: colors[0],
|
|
491
|
+
padding: [4, 6],
|
|
492
|
+
borderRadius: 4,
|
|
493
|
+
fontSize: 12,
|
|
494
|
+
fontWeight: 'bold',
|
|
495
|
+
formatter: '{c}'
|
|
496
|
+
},
|
|
497
|
+
data: [
|
|
498
|
+
{
|
|
499
|
+
type: 'average',
|
|
500
|
+
name: 'Avg',
|
|
501
|
+
}
|
|
502
|
+
]
|
|
472
503
|
}
|
|
473
504
|
},
|
|
474
505
|
]
|
|
@@ -2325,51 +2356,53 @@ export function getECharts(type, dataX, dataY, dataDim) {
|
|
|
2325
2356
|
}
|
|
2326
2357
|
else if (type ==='2A'){
|
|
2327
2358
|
let series = [];
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2359
|
+
const transData = transpose(dataY)
|
|
2360
|
+
for (let i = 0; i < transData.length; i++) {
|
|
2361
|
+
if (i===0){
|
|
2362
|
+
series.push({
|
|
2363
|
+
name: dataDim[i],
|
|
2364
|
+
type: 'bar',
|
|
2365
|
+
barWidth: '30px',
|
|
2366
|
+
itemStyle: {
|
|
2367
|
+
normal: {
|
|
2368
|
+
color: function (params) {
|
|
2369
|
+
const baseColor = colors[0];
|
|
2370
|
+
const lightColor = hexToRgba(baseColor, 0.6);
|
|
2371
|
+
const colorArr = params.value > 0 ? [baseColor, lightColor] : [lightColor, baseColor];
|
|
2372
|
+
return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
2373
|
+
{ offset: 0, color: colorArr[0] },
|
|
2374
|
+
{ offset: 1, color: colorArr[1] }
|
|
2375
|
+
]);
|
|
2376
|
+
},
|
|
2377
|
+
barBorderRadius: [i]
|
|
2378
|
+
}
|
|
2379
|
+
},
|
|
2380
|
+
tooltip: { valueFormatter: value => value },
|
|
2381
|
+
data: transData[i]
|
|
2382
|
+
});
|
|
2383
|
+
}else {
|
|
2384
|
+
series.push({
|
|
2385
|
+
name: dataDim[i],
|
|
2386
|
+
type: 'line',
|
|
2387
|
+
smooth: true,
|
|
2388
|
+
showAllSymbol: true,
|
|
2389
|
+
symbol: 'circle',
|
|
2390
|
+
showSymbol: true,
|
|
2391
|
+
symbolSize: 5,
|
|
2392
|
+
lineStyle: {
|
|
2393
|
+
color: colors[i % colors.length],
|
|
2394
|
+
width: 3
|
|
2395
|
+
},
|
|
2396
|
+
label: { show: false },
|
|
2397
|
+
itemStyle: {
|
|
2398
|
+
color: colors[i % colors.length],
|
|
2399
|
+
borderColor: hexToRgba(colors[i % colors.length], 0.6),
|
|
2400
|
+
borderWidth: 3
|
|
2401
|
+
},
|
|
2402
|
+
tooltip: { valueFormatter: value => value },
|
|
2403
|
+
data: transData[i]
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2373
2406
|
}
|
|
2374
2407
|
const dynamicColors = dataDim.map((_, index) => colors[index % colors.length]);
|
|
2375
2408
|
opt = {
|
|
@@ -2395,7 +2428,7 @@ export function getECharts(type, dataX, dataY, dataDim) {
|
|
|
2395
2428
|
},
|
|
2396
2429
|
color: dynamicColors,
|
|
2397
2430
|
grid: {
|
|
2398
|
-
top: '
|
|
2431
|
+
top: '35px', left: '0px', right: '10px', bottom: '0px', containLabel: true
|
|
2399
2432
|
},
|
|
2400
2433
|
xAxis: [
|
|
2401
2434
|
{
|
|
@@ -2435,71 +2468,49 @@ export function getECharts(type, dataX, dataY, dataDim) {
|
|
|
2435
2468
|
}
|
|
2436
2469
|
else if (type ==='2B'){
|
|
2437
2470
|
let series = [];
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2471
|
+
const transData = transpose(dataY);
|
|
2472
|
+
for (let i = 0; i < transData.length; i++) {
|
|
2473
|
+
if (i === 0) {
|
|
2474
|
+
series.push({
|
|
2475
|
+
name: dataDim[i],
|
|
2476
|
+
type: 'pictorialBar',
|
|
2477
|
+
barWidth: '30px',
|
|
2478
|
+
symbol: 'rect',
|
|
2479
|
+
symbolSize: ['100%', 4],
|
|
2480
|
+
symbolRepeat: true,
|
|
2481
|
+
symbolMargin: 2,
|
|
2482
|
+
symbolBoundingData: Math.max(...transData[i]),
|
|
2483
|
+
itemStyle: {
|
|
2484
|
+
color: colors[i]
|
|
2485
|
+
},
|
|
2486
|
+
tooltip: {valueFormatter: value => value},
|
|
2487
|
+
data: transData[i]
|
|
2488
|
+
});
|
|
2489
|
+
} else {
|
|
2490
|
+
series.push({
|
|
2491
|
+
name: dataDim[i],
|
|
2492
|
+
type: 'line',
|
|
2493
|
+
yAxisIndex: 1,
|
|
2494
|
+
smooth: true,
|
|
2495
|
+
showAllSymbol: true,
|
|
2496
|
+
symbol: 'circle',
|
|
2497
|
+
showSymbol: true,
|
|
2498
|
+
symbolSize: 5,
|
|
2499
|
+
lineStyle: {
|
|
2500
|
+
color: colors[i % colors.length],
|
|
2501
|
+
width: 3
|
|
2502
|
+
},
|
|
2503
|
+
label: {show: false},
|
|
2504
|
+
itemStyle: {
|
|
2505
|
+
color: colors[i % colors.length],
|
|
2506
|
+
borderColor: hexToRgba(colors[i % colors.length], 0.6),
|
|
2507
|
+
borderWidth: 3
|
|
2508
|
+
},
|
|
2509
|
+
tooltip: {valueFormatter: value => value},
|
|
2510
|
+
data: transData[i]
|
|
2511
|
+
});
|
|
2479
2512
|
|
|
2480
|
-
|
|
2481
|
-
series.push({
|
|
2482
|
-
name: dataDim[i],
|
|
2483
|
-
type: 'line',
|
|
2484
|
-
yAxisIndex: 0,
|
|
2485
|
-
smooth: true,
|
|
2486
|
-
showAllSymbol: true,
|
|
2487
|
-
symbol: 'circle',
|
|
2488
|
-
showSymbol: true,
|
|
2489
|
-
symbolSize: 5,
|
|
2490
|
-
lineStyle: {
|
|
2491
|
-
color: colors[i % colors.length],
|
|
2492
|
-
width: 3
|
|
2493
|
-
},
|
|
2494
|
-
label: { show: false },
|
|
2495
|
-
itemStyle: {
|
|
2496
|
-
color: colors[i % colors.length],
|
|
2497
|
-
borderColor: hexToRgba(colors[i % colors.length], 0.6),
|
|
2498
|
-
borderWidth: 3
|
|
2499
|
-
},
|
|
2500
|
-
tooltip: { valueFormatter: value => value },
|
|
2501
|
-
data: dataY.map(item => item[2])
|
|
2502
|
-
});
|
|
2513
|
+
}
|
|
2503
2514
|
}
|
|
2504
2515
|
const dynamicColors = dataDim.map((_, index) => colors[index % colors.length]);
|
|
2505
2516
|
|
|
@@ -2526,7 +2537,7 @@ export function getECharts(type, dataX, dataY, dataDim) {
|
|
|
2526
2537
|
},
|
|
2527
2538
|
color: dynamicColors,
|
|
2528
2539
|
grid: {
|
|
2529
|
-
top: '
|
|
2540
|
+
top: '35px', left: '0px', right: '10px', bottom: '0px', containLabel: true
|
|
2530
2541
|
},
|
|
2531
2542
|
xAxis: [
|
|
2532
2543
|
{
|
|
@@ -181,17 +181,20 @@ export default {
|
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
183
|
initDefTabClickActiveStatus() {
|
|
184
|
-
|
|
184
|
+
console.log("num-info handleCardClick 卡片初始设置为激活状态触发点击,START 当前实例:", this.widget.id + "_" + this.widget.name + ",this.defaultTabActive:" + this.defaultTabActive)
|
|
185
|
+
if (this.tabClickable === true && this.defaultTabActive === true) {
|
|
185
186
|
if (!this.isActive) {
|
|
186
187
|
this.isActive = true
|
|
187
188
|
this.$emit('on-tab-click', {})
|
|
188
189
|
}
|
|
189
|
-
console.log("num-info handleCardClick
|
|
190
|
+
console.log("num-info handleCardClick 卡片初始设置为激活状态触发点击,END 当前实例:", this.widget.id + "_" + this.widget.name)
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
},
|
|
193
194
|
created() {
|
|
194
195
|
this.eventBusOn()
|
|
196
|
+
},
|
|
197
|
+
mounted() {
|
|
195
198
|
this.initDefTabClickActiveStatus()
|
|
196
199
|
},
|
|
197
200
|
beforeDestroy() {
|