Compare commits

..

No commits in common. "f97458fda107b592a71fe416b47eefd50fa4711d" and "fccadb88b1626dcc9cc3cdaa3cb8fe05c3b6dfcb" have entirely different histories.

2 changed files with 9 additions and 42 deletions

View File

@ -496,7 +496,7 @@ export default {
.tree-container { .tree-container {
max-height: 300px; max-height: 300px;
overflow: auto; overflow-y: auto;
padding: 8px 0; padding: 8px 0;
.limited-level-tree { .limited-level-tree {

View File

@ -475,47 +475,14 @@ export default {
// //
loadTreeData() { loadTreeData() {
const allItems = []; // listAnalysisLabelItem({
const pageSize = 10; // analysisId: this.analysisLabelId
let currentPage = 1; // }).then(res => {
if (res.code === 200) {
// this.treeData = this.buildTree(res.rows)
const fetchPage = () => { this.buildLabelItemMap(res.rows)
listAnalysisLabelItem({ }
analysisId: this.analysisLabelId, })
pageNum: currentPage,
pageSize: pageSize
}).then(res => {
if (res.code === 200) {
const { rows, total } = res;
//
if (rows && rows.length > 0) {
allItems.push(...rows);
}
//
const totalPages = Math.ceil(total / pageSize);
//
if (currentPage < totalPages) {
currentPage++;
fetchPage(); //
} else {
//
console.log('所有数据获取完毕,共', allItems.length, '条');
this.treeData = this.buildTree(allItems);
this.buildLabelItemMap(allItems); //
}
} else {
//
this.$modal.msgError('加载标签项数据失败');
}
});
};
//
fetchPage();
}, },
// //