提交 60203207 编写于 作者: X xiayifan

add tensor feature (v2)

1.The table drawing performance is optimized when the table is automatically refreshed.
2.Fixed some self-verification issues.
3.Related error codes are added.
上级 aeed834f
......@@ -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) {
......
......@@ -418,6 +418,9 @@
"50542215": "查询参数错误",
"50542216": "Summary日志文件未找到",
"50542217": "Summary日志路径错误",
"50542218": "筛选参数错误"
"50542218": "筛选参数错误",
"50545012": "张量数据不存在,请刷新。",
"50545013": "请求的数据过大,无法返回,请使用其他维度重试。",
"50545014": "查询的张量数据已被新数据替换,请刷新。"
}
}
\ No newline at end of file
......@@ -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);
},
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册