You need to sign in or sign up before continuing.
提交 db9d081d 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!583 Turn the page for data traceability, and the parameters carried after the...

!583 Turn the page for data traceability, and the parameters carried after the model traceability box are not displayed. Problem modification
Merge pull request !583 from 秦君艳/page
......@@ -1367,7 +1367,71 @@ export default {
this.errorData = false;
this.lineagedata = this.formateOriginData(res.data);
const serData = this.lineagedata.serData;
if (this.selectedBarList && this.selectedBarList.length) {
const tempList = JSON.parse(JSON.stringify(res.data.object));
const list = [];
const metricKeys = {};
tempList.forEach((item) => {
if (item.model_lineage) {
const modelData = JSON.parse(
JSON.stringify(item.model_lineage),
);
modelData.model_size = parseFloat(
((modelData.model_size || 0) / 1024 / 1024).toFixed(2),
);
const keys = Object.keys(modelData.metric || {});
if (keys.length) {
keys.forEach((key) => {
if (
modelData.metric[key] ||
modelData.metric[key] === 0
) {
const temp = this.replaceStr.metric + key;
metricKeys[temp] = key;
modelData[temp] = modelData.metric[key];
}
});
delete modelData.metric;
}
const udkeys = Object.keys(modelData.user_defined || {});
if (udkeys.length) {
udkeys.forEach((key) => {
if (
modelData.user_defined[key] ||
modelData.user_defined[key] === 0
) {
const temp = this.replaceStr.userDefined + key;
modelData[temp] = modelData.user_defined[key];
}
});
delete modelData.user_defined;
}
list.push(modelData);
}
});
this.modelObjectArray = [];
for (let i = 0; i < list.length; i++) {
const modelObject = {};
for (let j = 0; j < this.selectedBarList.length; j++) {
const tempObject = list[i];
const key = this.selectedBarList[j];
modelObject[key] = tempObject[key];
}
this.modelObjectArray.push(modelObject);
}
if (this.modelObjectArray.length) {
const list = JSON.parse(JSON.stringify(serData));
for (let i = 0; i < list.length; i++) {
const temp = this.modelObjectArray[i];
list[i] = Object.assign(list[i], temp);
}
this.table.data = list;
} else {
this.table.data = JSON.parse(JSON.stringify(serData));
}
} else {
this.table.data = JSON.parse(JSON.stringify(serData));
}
},
(error) => {
this.errorData = true;
......
......@@ -1017,11 +1017,11 @@ export default {
this.loading = false;
if (res && res.data && res.data.object) {
this.errorData = false;
this.setInitListValue();
const listTemp = this.setDataOfModel(res.data.object);
const list = JSON.parse(JSON.stringify(listTemp));
const tempEchartData = JSON.parse(JSON.stringify(listTemp));
if (allData) {
this.setInitListValue();
let customized = {};
if (res.data.customized) {
customized = JSON.parse(JSON.stringify(res.data.customized));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册