解析规则

This commit is contained in:
LHD_HY 2025-11-29 17:54:26 +08:00
parent 892a6c5543
commit 000e35373f
2 changed files with 42 additions and 9 deletions

View File

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

View File

@ -475,14 +475,47 @@ export default {
//
loadTreeData() {
listAnalysisLabelItem({
analysisId: this.analysisLabelId
}).then(res => {
if (res.code === 200) {
this.treeData = this.buildTree(res.rows)
this.buildLabelItemMap(res.rows)
}
})
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();
},
//