新增的分段后,点击计算长短径保存,刷新页面后计算值全部变为0
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2026-04-17 15:52:55 +08:00
parent 74c5d032fb
commit 7afbc360e5
5 changed files with 28 additions and 10 deletions

View File

@ -146,7 +146,6 @@ export default {
},
async handleChange(e, key) {
if (key === 'study') {
console.log(this.studyList, 'this.studyList')
this.seriesList = this.studyList.find(item => item.StudyId === this.form.studyId).SeriesArr
}
if (key === 'series') {

View File

@ -202,7 +202,8 @@
<template v-if="item.stats">
<div v-for="k in statsKey" :key="k" class="statsBox">
<span>{{ k }}</span>
<span v-if="item.stats[k]">{{ Number(item.stats[k].value).toFixed(2)
<span v-if="item.stats[k]">{{ JSON.stringify(item.stats[k].value) !== 'null' ?
Number(item.stats[k].value).toFixed(2) : null
}}<i>{{ item.stats[k].unit }}</i></span>
</div>
</template>
@ -402,13 +403,12 @@ export default {
this.statsKey = getCustomizeStandardsSegmentDicomTools('Labelmap')[0].props.filter(item => item !== 'width' && item !== 'length')
// console.log(segmentation, 'segmentation')
// console.log(annotation, 'annotation')
console.log(cache, 'cache')
// console.log(cache, 'cache')
eventTarget.addEventListener(
'CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED',
this.segmentationModifiedCallback
);
DicomEvent.$on('activeSeries', (series) => {
console.log(series, 'series')
let { TaskInfo = {}, Id } = series
if (this.isMPR) return false
if (Id === this.series.Id && TaskInfo.VisitTaskId === this.visitInfo.VisitTaskId) return false
@ -897,6 +897,8 @@ export default {
annotations.forEach(item => {
annotation.state.removeAnnotation(item.annotationUID)
})
let f = this.segmentList.some(item => item.segUrl)
DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: f })
if (this.segmentList.length > 0) {
this.segmentationId = this.segmentList[0].segmentationId;
this.selectSegmentGroup()
@ -1471,6 +1473,7 @@ export default {
}
this.$emit("update:globalLoading", true)
this.$emit("update:loadingText", this.$t("segment:loadingText:saveSegmentation"))
let IsBeSegment = false
for (let i = 0; i < segmentList.length; i++) {
let segmentGroup = segmentList[i]
//
@ -1487,6 +1490,7 @@ export default {
}/${this.series.Id}/${segmentGroup.name}.dcm`
const result = await this.OSSclient.put(path, blob)
segmentGroup.segUrl = this.$getObjectName(result.url)
DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: true })
} else {
segmentGroup.segUrl = null
}
@ -1498,6 +1502,10 @@ export default {
this.syncBindingAnswer(segmentList)
}
}
if (!IsBeSegment) {
let f = this.segmentList.some(item => item.segUrl)
DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: f })
}
this.$emit("update:globalLoading", false)
} catch (err) {
this.loading = false
@ -1535,7 +1543,7 @@ export default {
segmentationId: list[0].segmentationId,
segmentIndices: list.map(item => item.segmentIndex),
});
console.log(bidirectionalData)
// console.log(bidirectionalData)
if (bidirectionalData.length <= 0) {
list.forEach(item => {
let annotations = annotation.state.getAllAnnotations().filter(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex);

View File

@ -89,8 +89,8 @@
}} image</span>
</div>
<div style="line-height: 12px;">
<i v-show="series.IsBeMark || markedSeriesIds.includes(series.Id)" class="el-icon-star-on"
style="font-size: 12px;color: #ff5722;" />
<i v-show="series.IsBeSegment || series.IsBeMark || markedSeriesIds.includes(series.Id)"
class="el-icon-star-on" style="font-size: 12px;color: #ff5722;" />
</div>
</div>
</div>
@ -151,6 +151,19 @@ export default {
this.$nextTick(() => {
this.activeStudy(this.studyList[0].StudyId)
})
DicomEvent.$on('IsBeSegment', (obj) => {
this.studyList.some(study => {
if (study.StudyId === obj.StudyId) {
study.SeriesList.some(series => {
if (series.Id === obj.Id) {
series.IsBeSegment = obj.IsBeSegment
}
return series.Id === obj.Id
})
}
return study.StudyId === obj.StudyId
})
})
},
methods: {
activeSeries(series, seriesIndex, studyIndex) {

View File

@ -519,7 +519,7 @@ export default {
if (!obj.bidirectional || !obj.bidirectional.maxMajor) return this.$confirm(this.$t("segment:error:notValue"))
answer = obj.bidirectional[s[imageToolAttribute]] ? Number(obj.bidirectional[s[imageToolAttribute]]).toFixed(this.digitPlaces) : ''
} else {
if (!obj.stats) return this.$confirm(this.$t("segment:error:notValue"))
if (!obj.stats || !obj.stats[imageToolAttribute] || obj.stats[imageToolAttribute].value === null) return this.$confirm(this.$t("segment:error:notValue"))
answer = obj.stats[imageToolAttribute] ? Number((obj.stats[imageToolAttribute]).value).toFixed(this.digitPlaces) : ''
}
let o = {

View File

@ -295,7 +295,6 @@ async function jumpBidirectional(item, viewportId, volumeId) {
// DicomEvent.$emit('jumpBidirectional', item)
if (item.bidirectional) {
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
console.log(an, 'an')
if (!an) return false
if (['viewport-MPR-1', 'viewport-MPR-2'].includes(viewportId)) return false
const renderingEngine = getRenderingEngine(renderingEngineId)
@ -400,7 +399,6 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
annotation.locking.setAnnotationLocked(an.annotationUID, true)
annotation.visibility.setAnnotationVisibility(an.annotationUID, true)
}
console.log(an, 'an')
}
})