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 {
max-height: 300px;
overflow: auto;
overflow-y: auto;
padding: 8px 0;
.limited-level-tree {

View File

@ -475,47 +475,14 @@ export default {
//
loadTreeData() {
const allItems = []; //
const pageSize = 10; //
let currentPage = 1; //
//
const fetchPage = () => {
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();
listAnalysisLabelItem({
analysisId: this.analysisLabelId
}).then(res => {
if (res.code === 200) {
this.treeData = this.buildTree(res.rows)
this.buildLabelItemMap(res.rows)
}
})
},
//