"docs/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "38c9a734cb90cdef8678d4fd44bf5140b34b5182"
Commit 4574dcca authored by Lijiao's avatar Lijiao Committed by QuanluZhang
Browse files

Support intermediate is dict (#835)

Support intermediate is dict
parent de9e2842
...@@ -79,7 +79,12 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -79,7 +79,12 @@ class TableList extends React.Component<TableListProps, TableListState> {
if (res.status === 200) { if (res.status === 200) {
const intermediateArr: number[] = []; const intermediateArr: number[] = [];
Object.keys(res.data).map(item => { Object.keys(res.data).map(item => {
intermediateArr.push(parseFloat(res.data[item].data)); const temp = JSON.parse(res.data[item].data);
if (typeof temp === 'object') {
intermediateArr.push(temp.default);
} else {
intermediateArr.push(temp);
}
}); });
const intermediate = intermediateGraphOption(intermediateArr, id); const intermediate = intermediateGraphOption(intermediateArr, id);
if (this._isMounted) { if (this._isMounted) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment