diff --git a/src/api/data/sample.js b/src/api/data/sample.js index d0eff48..691bd06 100644 --- a/src/api/data/sample.js +++ b/src/api/data/sample.js @@ -75,3 +75,12 @@ export function getSampleImageListAPI(params) { params }) } + +// 数据管理->样本库管理->获取样本图片列表 +export function getSampleListByVersionIdAPI(params) { + return request({ + url: '/smartPlatform/data/sample/getSampleListByVersionId', + method: 'get', + params + }) +} diff --git a/src/views/data/audit/components/ClassificationAudit.vue b/src/views/data/audit/components/ClassificationAudit.vue index b8b7e0c..028667e 100644 --- a/src/views/data/audit/components/ClassificationAudit.vue +++ b/src/views/data/audit/components/ClassificationAudit.vue @@ -447,6 +447,7 @@ export default { }, // 核心:提交审核结果,适配分类标注的审批参数 +// 核心:提交审核结果,适配分类标注的审批参数 async submitAuditResult(auditStatus) { if (this.isAuditing) return if (!this.currentImage.id) { @@ -474,9 +475,17 @@ export default { if (res.code === 200) { this.$message.success(auditStatus === 1 ? '审核通过提交成功!' : '审核不通过提交成功!') - + // ===== 新增核心代码开始 ===== + await this.loadAuditImages(); // 刷新审批图片列表(等待加载完成) + // 刷新后重置索引:取原索引和新列表最大索引的最小值,防止越界 + this.currentImageIndex = Math.min(this.currentImageIndex, this.imageList.length - 1); + // 若刷新后还有图片,重新赋值当前图片并重置视图;无图片则置空 + if (this.imageList.length === 0) { + this.currentImage = {}; + this.$message.info('暂无剩余审批图片数据'); + } // 自动切换到下一张(如果有),提升审批效率 - if (this.currentImageIndex < this.imageList.length - 1) { + if (this.imageList.length > 0 && this.currentImageIndex < this.imageList.length - 1) { this.nextImage() } } else { @@ -498,7 +507,7 @@ export default { // 全局容器:适配审批页面的布局 .labeling-page-container { width: 100%; - height: 92vh; + height: 90.5vh; display: flex; flex-direction: column; overflow: hidden; diff --git a/src/views/data/audit/components/index.vue b/src/views/data/audit/components/index.vue index 1638432..c01c197 100644 --- a/src/views/data/audit/components/index.vue +++ b/src/views/data/audit/components/index.vue @@ -56,6 +56,7 @@ export default { data() { return { labelingTaskId: this.convertToNumber(decryptWithSM4(this.$route.query.labelingTaskId || '')), + labelingTemplate: decryptWithSM4(this.$route.query.labelingTemplate || ''), // 表格配置 formLabel, columnsList, @@ -107,12 +108,29 @@ export default { // 查看按钮点击事件(支持选中行/批量查看) handleView() { const labelingTaskIdStr = String(this.labelingTaskId) - this.$router.push({ - name: 'LabelingDetail', - query: { - labelingTaskId : encryptWithSM4(labelingTaskIdStr) - } - }); + console.log('123123123131',this.labelingTemplate) + if (this.labelingTemplate === '1' || this.labelingTemplate === '2') { + this.$router.push({ + name: 'ClassificationDetail', + query: { + labelingTaskId: encryptWithSM4(labelingTaskIdStr), + } + }); + } else if (this.labelingTemplate === '3' || this.labelingTemplate === '4' || this.labelingTemplate === '5') { + this.$router.push({ + name: 'LabelingDetail', + query: { + labelingTaskId: encryptWithSM4(labelingTaskIdStr), + } + }); + } else if (this.labelingTemplate === '8' || this.labelingTemplate === '9') { + this.$router.push({ + name: 'OcrLabelingDetail', + query: { + labelingTaskId: encryptWithSM4(labelingTaskIdStr), + } + }); + } }, } } diff --git a/src/views/data/audit/index.vue b/src/views/data/audit/index.vue index 5971272..b00e07d 100644 --- a/src/views/data/audit/index.vue +++ b/src/views/data/audit/index.vue @@ -139,12 +139,13 @@ export default { methods: { // 进度列点击跳转处理 handleProgressClick(data) { + console.log('data',data) const labelingTaskIdStr = String(data.labelingTaskId) this.$router.push({ name: 'auditList', query: { - labelingTaskId : encryptWithSM4(labelingTaskIdStr) - + labelingTaskId : encryptWithSM4(labelingTaskIdStr), + labelingTemplate: encryptWithSM4(data.labelingTemplateValue) } }); }, diff --git a/src/views/data/dataset/components/child/DataSelectDialog.vue b/src/views/data/dataset/components/child/DataSelectDialog.vue index 4eefccb..6841e60 100644 --- a/src/views/data/dataset/components/child/DataSelectDialog.vue +++ b/src/views/data/dataset/components/child/DataSelectDialog.vue @@ -6,6 +6,7 @@ width="1200px" :close-on-click-modal="false" @close="handleClose" + class="data-select-dialog" >
@@ -738,6 +739,7 @@ export default { this.fullScreenImageName = item.fileName || item.label || '样本图片'; this.fullScreenImageVisible = true; document.body.style.overflow = 'hidden'; + document.body.style.paddingRight = '17px'; }, /** 关闭全屏预览 */ @@ -746,6 +748,7 @@ export default { this.fullScreenImageUrl = ""; this.fullScreenImageName = ""; document.body.style.overflow = 'auto'; + document.body.style.paddingRight = '0'; }, /** 页码大小变化 */ @@ -799,174 +802,227 @@ export default { .data-select-root { width: 100%; height: 100%; + overflow: hidden; /* 兜底:禁用根容器滚动 */ } -/* 主容器 */ +// 关键:穿透控制el-dialog的所有默认滚动,全局唯一不会污染其他dialog +::v-deep .data-select-dialog { + .el-dialog__body { + padding: 15px 20px !important; /* 微调内边距,减少高度浪费 */ + height: 700px !important; /* 固定dialog内容区高度,包含标题/内容/按钮 */ + overflow: hidden !important; /* 彻底禁用dialog默认的内容区滚动,核心修复 */ + display: flex; + flex-direction: column; + } +} + +/* 主容器 - 核心:移除外层滚动,弹性占满dialog内容区 */ .data-select-container { display: flex; - height: 600px; gap: 20px; box-sizing: border-box; - padding-bottom: 10px; + padding-bottom: 0; /* 修复1:删掉主容器底部内边距,避免间距放大双横线 */ + overflow: hidden; /* 禁用自身滚动 */ + flex: 1; /* 弹性占满dialog body的剩余高度,抵消footer和内边距 */ + height: 100%; /* 兜底高度 */ +} - .sample-tree-panel { - width: 250px; - border-right: 1px solid #ebeef5; - padding-right: 10px; - box-sizing: border-box; +// 左侧树面板 - 独立滚动,高度100% +.sample-tree-panel { + width: 250px; + border-right: 1px solid #ebeef5; + padding-right: 10px; + box-sizing: border-box; + height: 100%; /* 占满主容器高度 */ + display: flex; + flex-direction: column; /* 弹性列布局,标题固定+树滚动 */ + overflow: hidden; /* 禁用面板自身滚动 */ - .panel-title { - font-size: 14px; - font-weight: 500; - color: #333; - margin: 0 0 10px 0; - padding-bottom: 8px; - border-bottom: 1px solid #ebeef5; - } - - .tree-empty-tip { - text-align: center; - padding: 20px; - color: #999; - font-size: 14px; - } - - ::v-deep .el-tree { - height: calc(100% - 30px); - overflow-y: auto; - .tree-tooltip { - display: inline-block; - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - // 禁用节点样式(关键:覆盖Element UI默认样式) - .el-tree-node.is-disabled { - color: #ccc !important; - .el-checkbox { - pointer-events: none; - .el-checkbox__inner { - background-color: #f5f7fa !important; - border-color: #e4e7ed !important; - color: #c0c4cc !important; - cursor: not-allowed !important; - } - .el-checkbox__label { - color: #ccc !important; - cursor: not-allowed !important; - } - } - } - // 确保禁用节点的复选框不可点击 - .el-tree-node.is-disabled .el-checkbox { - display: inline-block !important; - cursor: not-allowed !important; - } - } + .panel-title { + font-size: 14px; + font-weight: 500; + color: #333; + margin: 0 0 10px 0; + padding-bottom: 8px; + border-bottom: 1px solid #ebeef5; + flex-shrink: 0; /* 标题不收缩,固定高度 */ } - .sample-image-panel { - flex: 1; - overflow-y: auto; - box-sizing: border-box; - padding-bottom: 10px; + .tree-empty-tip { + text-align: center; + padding: 20px; + color: #999; + font-size: 14px; + flex: 1; /* 占满剩余高度,居中显示 */ + display: flex; + align-items: center; + justify-content: center; + } - .select-header { + ::v-deep .el-tree { + flex: 1; /* 弹性占满剩余高度 */ + height: 100%; + overflow-y: auto; /* 仅树组件自身滚动,唯一滚动点 */ + overflow-x: hidden; /* 禁用横向滚动 */ + .tree-tooltip { + display: inline-block; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + // 禁用节点样式 + .el-tree-node.is-disabled { + color: #ccc !important; + .el-checkbox { + pointer-events: none; + .el-checkbox__inner { + background-color: #f5f7fa !important; + border-color: #e4e7ed !important; + color: #c0c4cc !important; + cursor: not-allowed !important; + } + .el-checkbox__label { + color: #ccc !important; + cursor: not-allowed !important; + } + } + } + .el-tree-node.is-disabled .el-checkbox { + display: inline-block !important; + cursor: not-allowed !important; + } + } +} + +// 右侧图片面板 - 独立滚动,高度100% +.sample-image-panel { + flex: 1; /* 占满剩余宽度 */ + height: 100%; /* 占满主容器高度 */ + box-sizing: border-box; + padding-bottom: 0; /* 修复2:删掉面板底部内边距,避免冗余间距 */ + display: flex; + flex-direction: column; /* 弹性列布局:头部+图片滚动+分页固定 */ + overflow: hidden; /* 禁用面板自身滚动,核心 */ + + .select-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 15px; + padding-bottom: 8px; + border-bottom: 1px solid #ebeef5; + flex-shrink: 0; /* 头部固定,不收缩 */ + } + + .select-count { + font-size: 12px; + color: #666; + } + + .image-empty-tip { + text-align: center; + padding: 50px; + color: #999; + font-size: 14px; + flex: 1; /* 占满剩余高度,居中 */ + display: flex; + align-items: center; + justify-content: center; + } + + .image-grid { + display: flex; + flex-wrap: wrap; + gap: 15px; + min-height: 100px; + flex: 1; /* 弹性占满头部和分页之间的所有高度 */ + overflow-y: auto; /* 仅图片网格自身滚动,唯一滚动点 */ + overflow-x: hidden; /* 禁用横向滚动 */ + padding-right: 6px; /* 为滚动条预留空间,避免内容遮挡 */ + box-sizing: border-box; + } + + .image-item { + width: calc(33.33% - 10px); + border: 1px solid #ebeef5; + border-radius: 4px; + padding: 8px; + transition: all 0.2s; + box-sizing: border-box; + display: flex; + flex-direction: column; + height: 280px; + + &:hover { + border-color: #1f72ea; + box-shadow: 0 2px 8px rgba(31, 114, 234, 0.1); + } + + .image-wrapper { + flex: 1; + margin-bottom: 8px; + overflow: hidden; + border-radius: 4px; + + .sample-image { + width: 100%; + height: 100%; + object-fit: contain; + } + } + + .image-footer { display: flex; align-items: center; justify-content: space-between; - margin-bottom: 15px; - padding-bottom: 8px; - border-bottom: 1px solid #ebeef5; + font-size: 12px; + color: #666; + height: 30px; - .select-count { - font-size: 12px; - color: #666; + .image-name { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 60%; } - } - .image-empty-tip { - text-align: center; - padding: 50px; - color: #999; - font-size: 14px; - } - - .image-grid { - display: flex; - flex-wrap: wrap; - gap: 15px; - min-height: 100px; - - .image-item { - width: calc(33.33% - 10px); - border: 1px solid #ebeef5; - border-radius: 4px; - padding: 8px; - transition: all 0.2s; - box-sizing: border-box; + .image-actions { display: flex; - flex-direction: column; - height: 280px; + align-items: center; + gap: 8px; - &:hover { - border-color: #1f72ea; - box-shadow: 0 2px 8px rgba(31, 114, 234, 0.1); - } + .preview-btn { + padding: 0; + margin: 0; + color: #1f72ea; - .image-wrapper { - flex: 1; - margin-bottom: 8px; - overflow: hidden; - border-radius: 4px; - - .sample-image { - width: 100%; - height: 100%; - object-fit: contain; - } - } - - .image-footer { - display: flex; - align-items: center; - justify-content: space-between; - font-size: 12px; - color: #666; - height: 30px; - - .image-name { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - max-width: 60%; - } - - .image-actions { - display: flex; - align-items: center; - gap: 8px; - - .preview-btn { - padding: 0; - margin: 0; - color: #1f72ea; - - &:hover { - color: #0e5bc8; - } - } + &:hover { + color: #0e5bc8; } } } } } + + // 分页组件固定在面板底部,不滚动 + ::v-deep .el-pagination { + flex-shrink: 0; /* 分页固定,不收缩 */ + margin-top: 15px !important; + text-align: right; + // 移除分页自身的任何边框,避免冗余 + border: none !important; + } } +// 弹窗底部按钮区 - 核心:只保留这一条顶部边框 .dialog-footer { text-align: right; padding-top: 10px; + flex-shrink: 0; /* 按钮区固定,不收缩 */ + border-top: 1px solid #ebeef5; /* 唯一保留的分隔线 */ + margin-top: 10px; /* 微调间距,让分隔线和分页的距离更美观 */ + border-bottom: none !important; /* 兜底:确保无底部边框 */ } /* 全屏预览样式 */ @@ -983,6 +1039,7 @@ export default { justify-content: center; padding: 20px; box-sizing: border-box; + overflow: hidden; /* 禁用预览弹窗滚动 */ } .full-screen-image-content { diff --git a/src/views/data/dataset/components/index.vue b/src/views/data/dataset/components/index.vue index a741139..f3ba8ff 100644 --- a/src/views/data/dataset/components/index.vue +++ b/src/views/data/dataset/components/index.vue @@ -37,9 +37,9 @@ type="text" v-hasPermi="['data:dataset:version:add']" class="action-btn version-add-btn" - @click="handleVersionAdd(data)" + @click="handleExport(data)" > - 新增版本 + 导出 \ No newline at end of file + diff --git a/src/views/data/label/components/RightTable.vue b/src/views/data/label/components/RightTable.vue index 536458c..e43ec70 100644 --- a/src/views/data/label/components/RightTable.vue +++ b/src/views/data/label/components/RightTable.vue @@ -29,7 +29,7 @@