@@ -479,7 +478,7 @@ export default {
.qualification-grid {
display: grid;
- grid-template-columns: repeat(5, 1fr);
+ grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
gap: 24px;
margin-bottom: 20px; /* 与分页保持间距 */
padding: 20px 6px 20px 0px;
diff --git a/src/views/template/analysisLabel/components/AnalysisLabelItem.vue b/src/views/template/analysisLabel/components/AnalysisLabelItem.vue
index a5d13c5..fbb9d59 100644
--- a/src/views/template/analysisLabel/components/AnalysisLabelItem.vue
+++ b/src/views/template/analysisLabel/components/AnalysisLabelItem.vue
@@ -207,15 +207,47 @@ export default {
// 加载树形结构数据,并构建ID-名称映射表
loadTreeData() {
- // 调用列表接口时,传递analysisId参数(与sendParams保持一致)
- listAnalysisLabelItem({
- analysisId: this.tableSendParams.analysisId
- }).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.tableSendParams.analysisId,
+ 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();
},
// 构建树形结构
diff --git a/src/views/template/analysisLabel/components/child/AnalysisLabelItemForm.vue b/src/views/template/analysisLabel/components/child/AnalysisLabelItemForm.vue
index 94f89b5..797e7c5 100644
--- a/src/views/template/analysisLabel/components/child/AnalysisLabelItemForm.vue
+++ b/src/views/template/analysisLabel/components/child/AnalysisLabelItemForm.vue
@@ -407,10 +407,10 @@ export default {
analysisLabelItemId: this.type === 'edit' ? this.formData.analysisLabelItemId : ''
};
const uniqueRes = await checkLabelItemNameUnique(uniqueParams);
- if (uniqueRes.data > 0) {
- this.$message.error('当前标签组下标签名称已存在');
- return;
- }
+ // if (uniqueRes.data > 0) {
+ // this.$message.error('当前标签组下标签名称已存在');
+ // return;
+ // }
if (this.type === 'add') {
await addAnalysisLabelItem(this.formData);
diff --git a/src/views/template/templateInfo/components/AnalysisRule.vue b/src/views/template/templateInfo/components/AnalysisRule.vue
index 8d9281d..cccc1ef 100644
--- a/src/views/template/templateInfo/components/AnalysisRule.vue
+++ b/src/views/template/templateInfo/components/AnalysisRule.vue
@@ -1,12 +1,13 @@
-
-
+
保存
@@ -60,211 +61,265 @@
-
+
-
-
-
模板名称: {{ templateName }}
-
+
+
+
+
+
+
-
-
-
-
-
- 添加规则
-
-
-
-
-
-