Commit 82bbbaea1054bdda0edaa928f84cd56fe20dbdbc
1 parent
ef70ec8d
fix: visual board dashBoardComponent can not echo data
Showing
1 changed file
with
3 additions
and
2 deletions
| @@ -7,7 +7,7 @@ import { | @@ -7,7 +7,7 @@ import { | ||
| 7 | DataSource, | 7 | DataSource, |
| 8 | GradientInfo, | 8 | GradientInfo, |
| 9 | } from '/@/api/dataBoard/model'; | 9 | } from '/@/api/dataBoard/model'; |
| 10 | -import { isArray, isNumber } from '/@/utils/is'; | 10 | +import { isArray } from '/@/utils/is'; |
| 11 | import { buildUUID } from '/@/utils/uuid'; | 11 | import { buildUUID } from '/@/utils/uuid'; |
| 12 | 12 | ||
| 13 | export interface GradientInfoRecord { | 13 | export interface GradientInfoRecord { |
| @@ -256,7 +256,7 @@ export const update_instrument_2_font = (radioRecord: RadioRecord) => { | @@ -256,7 +256,7 @@ export const update_instrument_2_font = (radioRecord: RadioRecord) => { | ||
| 256 | }; | 256 | }; |
| 257 | 257 | ||
| 258 | const handleValue = (value: any) => { | 258 | const handleValue = (value: any) => { |
| 259 | - return isNumber(value) ? Number(value).toFixed(2) : 0; | 259 | + return isNaN(value) ? 0 : Number(value).toFixed(2); |
| 260 | }; | 260 | }; |
| 261 | 261 | ||
| 262 | export const update_instrument_1_value = (params: DashBoardValue) => { | 262 | export const update_instrument_1_value = (params: DashBoardValue) => { |
| @@ -271,6 +271,7 @@ export const update_instrument_1_value = (params: DashBoardValue) => { | @@ -271,6 +271,7 @@ export const update_instrument_1_value = (params: DashBoardValue) => { | ||
| 271 | ) / 2 | 271 | ) / 2 |
| 272 | : 100 / 2; | 272 | : 100 / 2; |
| 273 | max = value > max ? max * 2 : max; | 273 | max = value > max ? max * 2 : max; |
| 274 | + | ||
| 274 | return { | 275 | return { |
| 275 | series: [ | 276 | series: [ |
| 276 | { | 277 | { |