Commit 1e604e83ea4237f23a33c7f756404681750577d4
1 parent
fb43c8ce
perf: dashboard component on resize not fill container && set primary color
Showing
3 changed files
with
22 additions
and
13 deletions
@@ -18,7 +18,10 @@ const GLOBAL_TOKEN = (() => { | @@ -18,7 +18,10 @@ const GLOBAL_TOKEN = (() => { | ||
18 | } | 18 | } |
19 | })() | 19 | })() |
20 | 20 | ||
21 | -const CAN_WRITE = 'api:yt:admin:designConfiguration1' | 21 | +/** |
22 | + * @description 写权限 key | ||
23 | + */ | ||
24 | +const CAN_WRITE = 'api:yt:admin:designConfiguration' | ||
22 | 25 | ||
23 | const USER_PERMISSION = { | 26 | const USER_PERMISSION = { |
24 | permission: [] | 27 | permission: [] |
@@ -412,13 +412,15 @@ | @@ -412,13 +412,15 @@ | ||
412 | { | 412 | { |
413 | type: 'gauge', | 413 | type: 'gauge', |
414 | center: ['50%', '60%'], | 414 | center: ['50%', '60%'], |
415 | + radius: '100%', | ||
415 | startAngle: 200, | 416 | startAngle: 200, |
416 | endAngle: -20, | 417 | endAngle: -20, |
417 | min: 0, | 418 | min: 0, |
418 | max: 100, | 419 | max: 100, |
419 | splitNumber: 10, | 420 | splitNumber: 10, |
420 | itemStyle: { | 421 | itemStyle: { |
421 | - color: '#FFAB91' | 422 | + color: '#5479c6' |
423 | + // color: '#FFAB91' | ||
422 | }, | 424 | }, |
423 | progress: { | 425 | progress: { |
424 | show: true, | 426 | show: true, |
@@ -433,7 +435,7 @@ | @@ -433,7 +435,7 @@ | ||
433 | } | 435 | } |
434 | }, | 436 | }, |
435 | axisTick: { | 437 | axisTick: { |
436 | - distance: -45, | 438 | + distance: 0, |
437 | splitNumber: 5, | 439 | splitNumber: 5, |
438 | lineStyle: { | 440 | lineStyle: { |
439 | width: 2, | 441 | width: 2, |
@@ -441,7 +443,7 @@ | @@ -441,7 +443,7 @@ | ||
441 | } | 443 | } |
442 | }, | 444 | }, |
443 | splitLine: { | 445 | splitLine: { |
444 | - distance: -52, | 446 | + distance: 0, |
445 | length: 14, | 447 | length: 14, |
446 | lineStyle: { | 448 | lineStyle: { |
447 | width: 3, | 449 | width: 3, |
@@ -449,9 +451,9 @@ | @@ -449,9 +451,9 @@ | ||
449 | } | 451 | } |
450 | }, | 452 | }, |
451 | axisLabel: { | 453 | axisLabel: { |
452 | - distance: -20, | 454 | + distance: 35, |
453 | color: '#999', | 455 | color: '#999', |
454 | - fontSize: 20 | 456 | + fontSize: 20 |
455 | }, | 457 | }, |
456 | anchor: { | 458 | anchor: { |
457 | show: false | 459 | show: false |
@@ -13743,13 +13743,15 @@ class HandleDataSource { | @@ -13743,13 +13743,15 @@ class HandleDataSource { | ||
13743 | { | 13743 | { |
13744 | type: 'gauge', | 13744 | type: 'gauge', |
13745 | center: ['50%', '60%'], | 13745 | center: ['50%', '60%'], |
13746 | + radius: '100%', | ||
13746 | startAngle: 200, | 13747 | startAngle: 200, |
13747 | endAngle: -20, | 13748 | endAngle: -20, |
13748 | min: 0, | 13749 | min: 0, |
13749 | max: 100, | 13750 | max: 100, |
13750 | splitNumber: 10, | 13751 | splitNumber: 10, |
13751 | itemStyle: { | 13752 | itemStyle: { |
13752 | - color: '#FFAB91' | 13753 | + color: '#5479c6' |
13754 | + // color: '#FFAB91' | ||
13753 | }, | 13755 | }, |
13754 | progress: { | 13756 | progress: { |
13755 | show: true, | 13757 | show: true, |
@@ -13764,7 +13766,7 @@ class HandleDataSource { | @@ -13764,7 +13766,7 @@ class HandleDataSource { | ||
13764 | } | 13766 | } |
13765 | }, | 13767 | }, |
13766 | axisTick: { | 13768 | axisTick: { |
13767 | - distance: -45, | 13769 | + distance: 0, |
13768 | splitNumber: 5, | 13770 | splitNumber: 5, |
13769 | lineStyle: { | 13771 | lineStyle: { |
13770 | width: 2, | 13772 | width: 2, |
@@ -13772,7 +13774,7 @@ class HandleDataSource { | @@ -13772,7 +13774,7 @@ class HandleDataSource { | ||
13772 | } | 13774 | } |
13773 | }, | 13775 | }, |
13774 | splitLine: { | 13776 | splitLine: { |
13775 | - distance: -52, | 13777 | + distance: 0, |
13776 | length: 14, | 13778 | length: 14, |
13777 | lineStyle: { | 13779 | lineStyle: { |
13778 | width: 3, | 13780 | width: 3, |
@@ -13780,7 +13782,7 @@ class HandleDataSource { | @@ -13780,7 +13782,7 @@ class HandleDataSource { | ||
13780 | } | 13782 | } |
13781 | }, | 13783 | }, |
13782 | axisLabel: { | 13784 | axisLabel: { |
13783 | - distance: -20, | 13785 | + distance: 35, |
13784 | color: '#999', | 13786 | color: '#999', |
13785 | fontSize: 20 | 13787 | fontSize: 20 |
13786 | }, | 13788 | }, |
@@ -13803,10 +13805,10 @@ class HandleDataSource { | @@ -13803,10 +13805,10 @@ class HandleDataSource { | ||
13803 | }, | 13805 | }, |
13804 | data: [ | 13806 | data: [ |
13805 | { | 13807 | { |
13806 | - value | 13808 | + value: 20 |
13807 | } | 13809 | } |
13808 | ] | 13810 | ] |
13809 | - } | 13811 | + }, |
13810 | ] | 13812 | ] |
13811 | } | 13813 | } |
13812 | } | 13814 | } |
@@ -13815,8 +13817,10 @@ class HandleDataSource { | @@ -13815,8 +13817,10 @@ class HandleDataSource { | ||
13815 | * @description 获取仪表盘配置 | 13817 | * @description 获取仪表盘配置 |
13816 | */ | 13818 | */ |
13817 | getRealTimeUpdateDashboardChartOption(params = { dataList: [] }) { | 13819 | getRealTimeUpdateDashboardChartOption(params = { dataList: [] }) { |
13818 | - const { dataList = [] } = params | 13820 | + const { dataList = [], oldOptions } = params |
13821 | + console.log({oldOptions}) | ||
13819 | const [timespan, value] = dataList[0] || [] | 13822 | const [timespan, value] = dataList[0] || [] |
13823 | + console.log(value) | ||
13820 | return { | 13824 | return { |
13821 | series: [ | 13825 | series: [ |
13822 | { | 13826 | { |