分割标记数据值计算完成后才可保存
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2026-03-31 16:30:37 +08:00
parent ff5aea17a5
commit b39ea3a032
1 changed files with 36 additions and 28 deletions

View File

@ -158,7 +158,8 @@
<i class="el-icon-warning-outline" style="color:red;margin-right: 5px;" <i class="el-icon-warning-outline" style="color:red;margin-right: 5px;"
:title="$t('trials:reading:Segmentations:tip:segmentationIsNotSave')" :title="$t('trials:reading:Segmentations:tip:segmentationIsNotSave')"
v-if="!curSegmentGroup.isSaved"></i> v-if="!curSegmentGroup.isSaved"></i>
<el-button type="success" size="small" @click="saveSegmentGroup([curSegmentGroup])"> <el-button type="success" size="small" :disabled="saveLoading"
@click="saveSegmentGroup([curSegmentGroup])">
{{ $t("trials:reading:Segmentations:button:save") }} {{ $t("trials:reading:Segmentations:button:save") }}
</el-button> </el-button>
</div> </div>
@ -243,7 +244,7 @@
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
<div class="saveBtnBox"> <div class="saveBtnBox">
<el-button type="success" size="small" @click="saveSegmentGroup()"> <el-button type="success" size="small" :disabled="saveLoading" @click="saveSegmentGroup()">
{{ $t("trials:reading:Segmentations:button:saveAll") }} {{ $t("trials:reading:Segmentations:button:saveAll") }}
</el-button> </el-button>
</div> </div>
@ -367,7 +368,8 @@ export default {
// isDel: false, // isDel: false,
digitPlaces: 2, digitPlaces: 2,
isloaded: false, isloaded: false,
popoverId: null popoverId: null,
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -1249,7 +1251,9 @@ export default {
this.drawing = true this.drawing = true
}, },
async calculateStatistics(indices, segmentationId, mode) { async calculateStatistics(indices, segmentationId, mode) {
try {
if (!segmentation.state.getSegmentation(segmentationId)) return false if (!segmentation.state.getSegmentation(segmentationId)) return false
this.saveLoading = true
const stats = await segmentationUtils.getStatistics({ const stats = await segmentationUtils.getStatistics({
segmentationId, segmentationId,
segmentIndices: indices, segmentIndices: indices,
@ -1278,7 +1282,11 @@ export default {
namedStats.count.label = 'Voxels'; namedStats.count.label = 'Voxels';
} }
this.saveLoading = false
} catch (err) {
console.log(err)
this.saveLoading = false
}
}, },
createSegmentationRepresentation(segmentationId) { createSegmentationRepresentation(segmentationId) {
this.viewprotIds.forEach(id => { this.viewprotIds.forEach(id => {