提交 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 { ...@@ -104,6 +104,7 @@ export default {
itemId: '', // Dom id itemId: '', // Dom id
gridObj: null, // slickgrid object gridObj: null, // slickgrid object
columnsData: [], // Column information columnsData: [], // Column information
columnsLength: 0, // Column length
filterArr: [], // Dimension selection array filterArr: [], // Dimension selection array
formateData: [], // formatted data formateData: [], // formatted data
formateArr: [], // formatted Array formateArr: [], // formatted Array
...@@ -268,10 +269,15 @@ export default { ...@@ -268,10 +269,15 @@ export default {
this.columnsData, this.columnsData,
this.optionObj, this.optionObj,
); );
this.columnsLength = this.columnsData.length;
} }
this.gridObj.setData(this.formateArr, this.scrollTop); this.gridObj.setData(this.formateArr, this.scrollTop);
this.scrollTop = false; 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(); this.gridObj.render();
}); });
}, },
...@@ -293,14 +299,19 @@ export default { ...@@ -293,14 +299,19 @@ export default {
let limitCount = 2; let limitCount = 2;
const tempArr = []; const tempArr = [];
this.filterArr.forEach((filter) => { this.filterArr.forEach((filter) => {
const value = filter.model.trim(); let value = filter.model.trim();
tempArr.push(value);
if (!isNaN(value)) { 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; filter.showError = true;
filterCorrect = false; filterCorrect = false;
} else { } else {
filter.showError = false; filter.showError = false;
value = Number(value);
} }
} else if (value === ':') { } else if (value === ':') {
filter.showError = false; filter.showError = false;
...@@ -313,6 +324,7 @@ export default { ...@@ -313,6 +324,7 @@ export default {
filter.showError = true; filter.showError = true;
filterCorrect = false; filterCorrect = false;
} }
tempArr.push(value);
}); });
this.filterCorrect = filterCorrect; this.filterCorrect = filterCorrect;
if (incorrectData && filterCorrect) { if (incorrectData && filterCorrect) {
......
...@@ -418,6 +418,9 @@ ...@@ -418,6 +418,9 @@
"50542215": "查询参数错误", "50542215": "查询参数错误",
"50542216": "Summary日志文件未找到", "50542216": "Summary日志文件未找到",
"50542217": "Summary日志路径错误", "50542217": "Summary日志路径错误",
"50542218": "筛选参数错误" "50542218": "筛选参数错误",
"50545012": "张量数据不存在,请刷新。",
"50545013": "请求的数据过大,无法返回,请使用其他维度重试。",
"50545014": "查询的张量数据已被新数据替换,请刷新。"
} }
} }
\ No newline at end of file
...@@ -452,7 +452,7 @@ export default { ...@@ -452,7 +452,7 @@ export default {
if (this.curDataType === 1 && this.curViewName === 1) { if (this.curDataType === 1 && this.curViewName === 1) {
const elementItem = this.$refs[sampleItem.ref]; const elementItem = this.$refs[sampleItem.ref];
if (elementItem) { if (elementItem) {
elementItem.clearZrData(); elementItem[0].clearZrData();
} }
} }
}); });
...@@ -474,8 +474,9 @@ export default { ...@@ -474,8 +474,9 @@ export default {
}, },
/** /**
* Refresh the data on the current page * Refresh the data on the current page
* @param {Boolean} isFromTypeChange
*/ */
freshCurPageData() { freshCurPageData(isFromTypeChange) {
this.curPageArr.forEach((sampleItem, index) => { this.curPageArr.forEach((sampleItem, index) => {
if (!sampleItem || !sampleItem.tagName) { if (!sampleItem || !sampleItem.tagName) {
return; return;
...@@ -484,6 +485,7 @@ export default { ...@@ -484,6 +485,7 @@ export default {
if (dataType) { if (dataType) {
this.getHistogramData(sampleItem); this.getHistogramData(sampleItem);
} else { } else {
sampleItem.newDataFlag = !!isFromTypeChange || sampleItem.newDataFlag;
this.getMartixData(sampleItem); this.getMartixData(sampleItem);
} }
}); });
...@@ -686,7 +688,7 @@ export default { ...@@ -686,7 +688,7 @@ export default {
this.dataTypeChangeTimer = null; this.dataTypeChangeTimer = null;
} }
this.dataTypeChangeTimer = setTimeout(() => { this.dataTypeChangeTimer = setTimeout(() => {
this.freshCurPageData(); this.freshCurPageData(true);
}, 500); }, 500);
}, },
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册