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 | DataSource, |
8 | 8 | GradientInfo, |
9 | 9 | } from '/@/api/dataBoard/model'; |
10 | -import { isArray, isNumber } from '/@/utils/is'; | |
10 | +import { isArray } from '/@/utils/is'; | |
11 | 11 | import { buildUUID } from '/@/utils/uuid'; |
12 | 12 | |
13 | 13 | export interface GradientInfoRecord { |
... | ... | @@ -256,7 +256,7 @@ export const update_instrument_2_font = (radioRecord: RadioRecord) => { |
256 | 256 | }; |
257 | 257 | |
258 | 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 | 262 | export const update_instrument_1_value = (params: DashBoardValue) => { |
... | ... | @@ -271,6 +271,7 @@ export const update_instrument_1_value = (params: DashBoardValue) => { |
271 | 271 | ) / 2 |
272 | 272 | : 100 / 2; |
273 | 273 | max = value > max ? max * 2 : max; |
274 | + | |
274 | 275 | return { |
275 | 276 | series: [ |
276 | 277 | { | ... | ... |