提交 37449ec8 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!105 fix ui issue:the lines display incorrectly in data traceability of mindinsight

Merge pull request !105 from 潘慧/master_ph
......@@ -381,8 +381,10 @@ export default {
id: item,
checked: true,
};
if (value && value.type == 'float') {
if (value && value.type === 'float') {
obj.type = 'float';
} else if (value && value.type === 'int') {
obj.type = 'int';
}
arrayTemp.push(obj);
});
......@@ -408,14 +410,15 @@ export default {
if (
content.name === this.repeatTitle ||
content.name === this.shuffleTitle ||
content.id === this.deviceNum
content.id === this.deviceNum ||
(content.type && content.type === 'int')
) {
obj.scale = true;
obj.minInterval = 1;
this.setColorOfSelectedBar(selectedBarList, obj);
} else if (
this.numberTypeIdList.includes(content.id) ||
(content.type && content.type == 'float')
(content.type && content.type === 'float')
) {
obj.scale = true;
this.setColorOfSelectedBar(selectedBarList, obj);
......
......@@ -345,9 +345,9 @@ export default {
sampleItem.curImgUrl =
`${basePath}${this.imageBasePath}train_id=${sampleItem.summaryId}` +
`&tag=${sampleItem.tagName}&step=${curSampleData.step}&wt=${curSampleData.wall_time}`;
sampleItem.curTime = new Date(
sampleItem.curTime = this.dealrelativeTime(new Date(
curSampleData.wall_time * 1000,
).toLocaleString();
).toString());
sampleItem.curImageSize = [
curSampleData.width,
curSampleData.height,
......@@ -385,9 +385,9 @@ export default {
sampleItem.curImgUrl =
`${basePath}${this.imageBasePath}train_id=${sampleItem.summaryId}` +
`&tag=${sampleItem.tagName}&step=${curStepData.step}&wt=${curStepData.wall_time}`;
sampleItem.curTime = new Date(
sampleItem.curTime = this.dealrelativeTime(new Date(
curStepData.wall_time * 1000,
).toLocaleString();
).toString());
sampleItem.curImageSize = [curStepData.width, curStepData.height];
},
/**
......@@ -622,6 +622,17 @@ export default {
},
});
},
/**
* Format Absolute Time
* @param {String} time string
* @return {string} str
*/
dealrelativeTime(time) {
const arr = time.split(' ');
const str = arr[0] + ' ' + arr[1] + ' ' + arr[2] + ',' + ' ' + arr[4];
return str;
},
},
components: {
multiselectGroupComponents,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册