diff --git a/mindinsight/ui/src/components/gridTableSimple.vue b/mindinsight/ui/src/components/gridTableSimple.vue index eb6accb964b9a2fa1f7aace35b558582932a1753..2105fc1832148b20011a594482ba79e4601773b1 100644 --- a/mindinsight/ui/src/components/gridTableSimple.vue +++ b/mindinsight/ui/src/components/gridTableSimple.vue @@ -104,6 +104,7 @@ export default { itemId: '', // Dom id gridObj: null, // slickgrid object columnsData: [], // Column information + columnsLength: 0, // Column length filterArr: [], // Dimension selection array formateData: [], // formatted data formateArr: [], // formatted Array @@ -268,10 +269,15 @@ export default { this.columnsData, this.optionObj, ); + this.columnsLength = this.columnsData.length; } this.gridObj.setData(this.formateArr, this.scrollTop); this.scrollTop = false; - this.gridObj.setColumns(this.columnsData); + const columnsLength = this.columnsData.length; + if (this.columnsLength !== columnsLength) { + this.gridObj.setColumns(this.columnsData); + this.columnsLength = columnsLength; + } this.gridObj.render(); }); }, @@ -293,14 +299,19 @@ export default { let limitCount = 2; const tempArr = []; this.filterArr.forEach((filter) => { - const value = filter.model.trim(); - tempArr.push(value); + let value = filter.model.trim(); if (!isNaN(value)) { - if (value < -(filter.max + 1) || value > filter.max || value === '') { + if ( + value < -(filter.max + 1) || + value > filter.max || + value === '' || + value % 1 + ) { filter.showError = true; filterCorrect = false; } else { filter.showError = false; + value = Number(value); } } else if (value === ':') { filter.showError = false; @@ -313,6 +324,7 @@ export default { filter.showError = true; filterCorrect = false; } + tempArr.push(value); }); this.filterCorrect = filterCorrect; if (incorrectData && filterCorrect) { diff --git a/mindinsight/ui/src/locales/zh-cn.json b/mindinsight/ui/src/locales/zh-cn.json index f525c5d5a213fde82f3063ddbe2517955cc0c017..54a79a14991ec42723c5950dedbb70f9b9af5ba2 100644 --- a/mindinsight/ui/src/locales/zh-cn.json +++ b/mindinsight/ui/src/locales/zh-cn.json @@ -418,6 +418,9 @@ "50542215": "查询参数错误", "50542216": "Summary日志文件未找到", "50542217": "Summary日志路径错误", - "50542218": "筛选参数错误" + "50542218": "筛选参数错误", + "50545012": "张量数据不存在,请刷新。", + "50545013": "请求的数据过大,无法返回,请使用其他维度重试。", + "50545014": "查询的张量数据已被新数据替换,请刷新。" } } \ No newline at end of file diff --git a/mindinsight/ui/src/views/train-manage/tensor.vue b/mindinsight/ui/src/views/train-manage/tensor.vue index defdaaf8e7369140ed93a03e4ef505539a52d392..49a9a350d0fb5b1e239e979c5fe9f377a46a5263 100644 --- a/mindinsight/ui/src/views/train-manage/tensor.vue +++ b/mindinsight/ui/src/views/train-manage/tensor.vue @@ -452,7 +452,7 @@ export default { if (this.curDataType === 1 && this.curViewName === 1) { const elementItem = this.$refs[sampleItem.ref]; if (elementItem) { - elementItem.clearZrData(); + elementItem[0].clearZrData(); } } }); @@ -474,8 +474,9 @@ export default { }, /** * Refresh the data on the current page + * @param {Boolean} isFromTypeChange */ - freshCurPageData() { + freshCurPageData(isFromTypeChange) { this.curPageArr.forEach((sampleItem, index) => { if (!sampleItem || !sampleItem.tagName) { return; @@ -484,6 +485,7 @@ export default { if (dataType) { this.getHistogramData(sampleItem); } else { + sampleItem.newDataFlag = !!isFromTypeChange || sampleItem.newDataFlag; this.getMartixData(sampleItem); } }); @@ -686,7 +688,7 @@ export default { this.dataTypeChangeTimer = null; } this.dataTypeChangeTimer = setTimeout(() => { - this.freshCurPageData(); + this.freshCurPageData(true); }, 500); }, /**