创建分割分组时,分组和分割分段的名称可以设置默认值、部分分割问题解决
parent
eac6b25b9e
commit
b6b918efbf
|
|
@ -40,10 +40,10 @@
|
|||
<div v-if="series" class="right-bottom-text">
|
||||
<div v-show="imageInfo.location">Location: {{
|
||||
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
||||
}}</div>
|
||||
}}</div>
|
||||
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
||||
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
||||
}}</div>
|
||||
}}</div>
|
||||
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
||||
</div>
|
||||
<div class="orientation-top">
|
||||
|
|
@ -195,31 +195,31 @@ export default {
|
|||
this.initViewport()
|
||||
})
|
||||
DicomEvent.$on('createSegmentationRepresentation', (segmentationId) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
createSegmentationRepresentation(this.viewportId, segmentationId)
|
||||
})
|
||||
DicomEvent.$on('viewSegmentation', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
viewSegmentation(obj, this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('viewSegment', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
viewSegment(obj, this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('jumpBidirectional', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
jumpBidirectional(obj, this.viewportId, this.volumeId)
|
||||
})
|
||||
DicomEvent.$on('viewBidirectional', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
viewBidirectional(obj, this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('changeColor', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
changeColor(obj, this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('resetViewport', () => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
resetViewport(this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('renderSegmentation', async (viewportId) => {
|
||||
|
|
|
|||
|
|
@ -366,9 +366,9 @@
|
|||
<el-tab-pane :label="$t('trials:reading:dicom3D:tabs:segment')" name="segment">
|
||||
<Segmentations ref="Segmentations" :visitInfo="taskInfo" :isMPR="isMPR"
|
||||
:volumeToolGroupId="volumeToolGroupId" :viewportKey="viewportKey" :global-loading.sync="loading"
|
||||
:loadingText.sync="loadingText" :rendering-engine-id="renderingEngineId"
|
||||
:SegmentConfig="SegmentConfig" :segId.sync="segId" :segIndex.sync="segIndex"
|
||||
:curSegSeries.sync="curSegSeries" :activeViewportIndex="activeViewportIndex"
|
||||
:trialCriterion="trialCriterion" :loadingText.sync="loadingText"
|
||||
:rendering-engine-id="renderingEngineId" :SegmentConfig="SegmentConfig" :segId.sync="segId"
|
||||
:segIndex.sync="segIndex" :curSegSeries.sync="curSegSeries" :activeViewportIndex="activeViewportIndex"
|
||||
:activeTool.sync="activeTool" :actionConfiguration="actionConfiguration"
|
||||
:histogramVisible="histogramVisible" @setToolsPassive="setToolsPassive"
|
||||
@resetQuestion="resetQuestion" />
|
||||
|
|
@ -2030,6 +2030,7 @@ export default {
|
|||
const errorMsg = { message: 'annotation Not allowed to operate' }
|
||||
throw errorMsg
|
||||
}
|
||||
if (this.activeTool === 'CircularEraser') return false
|
||||
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
||||
if (i === -1) {
|
||||
if (annotation.metadata.toolName === SegmentBidirectionalTool.toolName) {
|
||||
|
|
|
|||
|
|
@ -113,12 +113,15 @@ export default {
|
|||
if (find) {
|
||||
this.form.studyId = this.series.StudyId
|
||||
this.handleChange(null, 'study')
|
||||
let findSeries = find.SeriesArr.some(item => item.Id === this.form.seriesId)
|
||||
if (findSeries) {
|
||||
this.form.seriesId = this.series.Id
|
||||
this.handleChange(null, 'series')
|
||||
if (find.SeriesArr && find.SeriesArr.length > 0) {
|
||||
let findSeries = find.SeriesArr.some(item => item.Id === this.form.seriesId)
|
||||
if (findSeries) {
|
||||
this.form.seriesId = this.series.Id
|
||||
this.handleChange(null, 'series')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
</el-switch>
|
||||
<span style="margin-left: 5px;">{{
|
||||
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
|
||||
}}</span>
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="segmentList.length > 0">
|
||||
|
|
@ -201,7 +201,7 @@
|
|||
<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)
|
||||
}}<i>{{ item.stats[k].unit }}</i></span>
|
||||
}}<i>{{ item.stats[k].unit }}</i></span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="serialNum" slot="reference">{{ index + 1 }}</div>
|
||||
|
|
@ -323,6 +323,12 @@ export default {
|
|||
return {}
|
||||
}
|
||||
},
|
||||
trialCriterion: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
segId: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
|
@ -686,11 +692,30 @@ export default {
|
|||
// this.selectSegment(segment, s ? false : true)
|
||||
// this.readingSegmentByConfig()
|
||||
},
|
||||
getSegmentationName(num = 1) {
|
||||
let defaultSegmentationName = this.trialCriterion.DefaultSegmentName.SegmentationName
|
||||
let name = defaultSegmentationName
|
||||
let has = this.segmentList.find(item => item.name === name)
|
||||
if (has) {
|
||||
name = defaultSegmentationName + num
|
||||
has = this.segmentList.find(item => item.name === name)
|
||||
num++
|
||||
if (has) name = this.getSegmentationName(num)
|
||||
}
|
||||
return name
|
||||
},
|
||||
getSegmentName(arr, num = 1) {
|
||||
let defaultSegmentName = arr[0].SegmentLabel
|
||||
let name = defaultSegmentName + num
|
||||
let has = arr.find(item => item.SegmentLabel === name)
|
||||
num++
|
||||
if (has) name = this.getSegmentName(arr, num)
|
||||
return name
|
||||
},
|
||||
async addSegmentGroup() {
|
||||
let viewportIds = this.viewportIds
|
||||
// let segmentationId = this.$guid();
|
||||
let obj = {
|
||||
name: this.$t('trials:reading:Segmentations:name:SegmentGroup') + (this.segmentList.length + 1),
|
||||
name: this.getSegmentationName(),
|
||||
view: true,
|
||||
segmentationId: null,
|
||||
isSaved: false,
|
||||
|
|
@ -698,47 +723,14 @@ export default {
|
|||
}
|
||||
let segmentationId = await this.addOrUpdateSegmentation({ name: obj.name })
|
||||
obj.segmentationId = segmentationId
|
||||
let o = {
|
||||
segmentIndex: 1,
|
||||
segmentationId,
|
||||
SegmentLabel: 'Segment 1',
|
||||
color: this.colors[0],
|
||||
stats: null,
|
||||
bidirectional: null,
|
||||
bidirectionalView: true,
|
||||
view: true,
|
||||
lock: false
|
||||
}
|
||||
let id = await this.addOrUpdateSegment({ name: o.SegmentLabel, color: o.color, segmentIndex: o.segmentIndex, segmentationId: o.segmentationId })
|
||||
o.id = id
|
||||
obj.segments.push(o);
|
||||
this.segmentList.push(obj);
|
||||
this.segmentationId = obj.segmentationId;
|
||||
await this.createSegmentation(obj.segmentationId)
|
||||
this.createSegmentationRepresentation(obj.segmentationId)
|
||||
this.segmentIndex = 1
|
||||
this.changeColor(this.colors[0], { segmentationId: obj.segmentationId, segmentIndex: 1, color: this.colors[0] })
|
||||
// viewportIds.forEach(id => {
|
||||
// segmentation.config.color.setSegmentIndexColor(id, obj.segmentationId, 1, this.hex2Rgb(this.colors[0]))
|
||||
// })
|
||||
this.selectSegmentGroup()
|
||||
},
|
||||
async addSegment() {
|
||||
let viewportIds = this.viewportIds;
|
||||
if (this.segmentList.length <= 0) {
|
||||
let obj = {
|
||||
name: this.$t('trials:reading:Segmentations:name:SegmentGroup') + 1,
|
||||
view: true,
|
||||
isSaved: false,
|
||||
segments: []
|
||||
}
|
||||
let segmentationId = await this.addOrUpdateSegmentation({ name: obj.name })
|
||||
obj.segmentationId = segmentationId
|
||||
this.trialCriterion.DefaultSegmentName.SegmentNameList.forEach(async (SegmentName, index) => {
|
||||
let o = {
|
||||
segmentIndex: 1,
|
||||
segmentIndex: index + 1,
|
||||
segmentationId,
|
||||
SegmentLabel: 'Segment 1',
|
||||
color: this.colors[0],
|
||||
SegmentLabel: SegmentName,
|
||||
color: this.colors[index],
|
||||
stats: null,
|
||||
bidirectional: null,
|
||||
bidirectionalView: true,
|
||||
|
|
@ -747,14 +739,52 @@ export default {
|
|||
}
|
||||
let id = await this.addOrUpdateSegment({ name: o.SegmentLabel, color: o.color, segmentIndex: o.segmentIndex, segmentationId: o.segmentationId })
|
||||
o.id = id
|
||||
obj.segments.push(o);
|
||||
obj.segments.splice(index, 0, o);
|
||||
this.changeColor(this.colors[index], { segmentationId: obj.segmentationId, segmentIndex: index + 1, color: this.colors[index] })
|
||||
})
|
||||
this.segmentList.push(obj);
|
||||
this.segmentationId = obj.segmentationId;
|
||||
this.segmentIndex = 1
|
||||
// segmentation.segmentIndex.setActiveSegmentIndex(this.segmentationId, 1);
|
||||
// viewportIds.forEach(id => {
|
||||
// segmentation.config.color.setSegmentIndexColor(id, obj.segmentationId, 1, this.hex2Rgb(this.colors[0]))
|
||||
// })
|
||||
// this.selectSegmentGroup()
|
||||
},
|
||||
async addSegment() {
|
||||
if (this.segmentList.length <= 0) {
|
||||
let obj = {
|
||||
name: this.getSegmentationName(),
|
||||
view: true,
|
||||
isSaved: false,
|
||||
segments: []
|
||||
}
|
||||
let segmentationId = await this.addOrUpdateSegmentation({ name: obj.name })
|
||||
obj.segmentationId = segmentationId
|
||||
await this.createSegmentation(segmentationId)
|
||||
this.createSegmentationRepresentation(segmentationId)
|
||||
this.trialCriterion.DefaultSegmentName.SegmentNameList.forEach(async (SegmentName, index) => {
|
||||
let o = {
|
||||
segmentIndex: index + 1,
|
||||
segmentationId,
|
||||
SegmentLabel: SegmentName,
|
||||
color: this.colors[index],
|
||||
stats: null,
|
||||
bidirectional: null,
|
||||
bidirectionalView: true,
|
||||
view: true,
|
||||
lock: false
|
||||
}
|
||||
let id = await this.addOrUpdateSegment({ name: o.SegmentLabel, color: o.color, segmentIndex: o.segmentIndex, segmentationId: o.segmentationId })
|
||||
o.id = id
|
||||
obj.segments.splice(index, 0, o);
|
||||
this.changeColor(this.colors[index], { segmentationId: obj.segmentationId, segmentIndex: index + 1, color: this.colors[index] })
|
||||
})
|
||||
this.segmentList.push(obj);
|
||||
this.segmentationId = this.segmentList[0].segmentationId;
|
||||
await this.createSegmentation(this.segmentationId)
|
||||
this.createSegmentationRepresentation(this.segmentationId)
|
||||
this.segmentationId = segmentationId;
|
||||
this.segmentIndex = 1
|
||||
segmentation.segmentIndex.setActiveSegmentIndex(this.segmentList[0].segmentationId, 1);
|
||||
this.changeColor(this.colors[0], { segmentationId: this.segmentList[0].segmentationId, segmentIndex: 1, color: this.colors[0] })
|
||||
// segmentation.segmentIndex.setActiveSegmentIndex(this.segmentList[0].segmentationId, 1);
|
||||
// this.changeColor(this.colors[0], { segmentationId: this.segmentList[0].segmentationId, segmentIndex: 1, color: this.colors[0] })
|
||||
// viewportIds.forEach(id => {
|
||||
// segmentation.config.color.setSegmentIndexColor(id, this.segmentList[0].segmentationId, 1, this.hex2Rgb(this.colors[0]))
|
||||
// })
|
||||
|
|
@ -767,7 +797,7 @@ export default {
|
|||
let obj = {
|
||||
segmentIndex: segmentIndex,
|
||||
segmentationId: this.segmentationId,
|
||||
SegmentLabel: `Segment ${segmentIndex}`,
|
||||
SegmentLabel: this.getSegmentName(item.segments),
|
||||
color: item.segments.length >= this.colors.length ? this.colors[0] : this.colors[item.segments.length],
|
||||
stats: null,
|
||||
bidirectional: null,
|
||||
|
|
@ -784,7 +814,7 @@ export default {
|
|||
obj.id = id
|
||||
item.segments.push(obj)
|
||||
this.segmentIndex = obj.segmentIndex
|
||||
segmentation.segmentIndex.setActiveSegmentIndex(obj.segmentationId, obj.segmentIndex);
|
||||
// segmentation.segmentIndex.setActiveSegmentIndex(obj.segmentationId, obj.segmentIndex);
|
||||
this.changeColor(obj.color, { segmentationId: obj.segmentationId, segmentIndex: obj.segmentIndex, color: obj.color })
|
||||
// viewportIds.forEach(id => {
|
||||
// segmentation.config.color.setSegmentIndexColor(id, obj.segmentationId, obj.segmentIndex, this.hex2Rgb(obj.color))
|
||||
|
|
@ -1457,7 +1487,6 @@ export default {
|
|||
list.forEach(item => {
|
||||
this.createSegmentConfiguration(item.segmentIndex, item.segmentationId);
|
||||
})
|
||||
|
||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||
const viewportId = `${this.viewportKey}-${this.activeViewportIndex}`
|
||||
const viewport = renderingEngine.getViewport(viewportId);
|
||||
|
|
@ -1530,7 +1559,7 @@ export default {
|
|||
answer = segment.stats && segment.stats[imageToolAttribute] ? Number((segment.stats[imageToolAttribute]).value).toFixed(this.digitPlaces) : ''
|
||||
}
|
||||
let o = {
|
||||
Answer: answer,
|
||||
Answer: answer === '-Infinity' ? null : answer,
|
||||
QuestionId: item.QuestionId,
|
||||
RowId: item.RowId,
|
||||
SegmentId: item.SegmentId,
|
||||
|
|
@ -1599,12 +1628,6 @@ export default {
|
|||
segments: []
|
||||
}
|
||||
this.segmentList.push(obj)
|
||||
// if (item.SEGUrl) {
|
||||
// await this.readSegmentation(obj)
|
||||
// } else {
|
||||
// await this.createSegmentation(obj.segmentationId)
|
||||
// // this.createSegmentationRepresentation(obj.segmentationId)
|
||||
// }
|
||||
}
|
||||
if (!this.segmentationId) {
|
||||
this.segmentationId = obj.segmentationId
|
||||
|
|
@ -1627,38 +1650,13 @@ export default {
|
|||
id: s.Id
|
||||
}
|
||||
obj.segments.push(o)
|
||||
// this.selectSegment(o, false)
|
||||
// this.changeColor(s.ColorRgb, o)
|
||||
// this.lockSegment(o, true)
|
||||
}
|
||||
if (!this.segmentIndex) {
|
||||
this.segmentIndex = s.SegmentNumber
|
||||
}
|
||||
})
|
||||
// this.$nextTick(() => {
|
||||
// if (SEGMENT) {
|
||||
// // console.log(SEGMENT, 'SEGMENT')
|
||||
// return this.getBidirectional(obj.segments, SEGMENT)
|
||||
// }
|
||||
// this.getBidirectional(obj.segments, null, false)
|
||||
// })
|
||||
}
|
||||
// if (this.segmentationId && this.segmentIndex && this.segmentList && this.segmentList.length > 0) {
|
||||
// let o = this.segmentList.find(item => item.segmentationId === this.segmentationId)
|
||||
// if (o) {
|
||||
// let s = o.segments.find(item => item.segmentIndex === this.segmentIndex)
|
||||
// this.selectSegmentGroup(s)
|
||||
// } else {
|
||||
// this.segmentationId = this.segmentList[0].segmentationId
|
||||
// this.segmentIndex = this.segmentationId ? this.segmentList[0].segments[0].segmentIndex : null
|
||||
// if (this.segmentationId && this.segmentIndex) {
|
||||
// this.selectSegmentGroup(this.segmentList[0].segments[0])
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
this.isloaded = false
|
||||
// this.loading = true
|
||||
// this.readingSegmentByConfig()
|
||||
}
|
||||
} catch (err) {
|
||||
// this.loading = false
|
||||
|
|
|
|||
|
|
@ -213,31 +213,31 @@ export default {
|
|||
this.initViewport()
|
||||
})
|
||||
DicomEvent.$on('createSegmentationRepresentation', (segmentationId) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
createSegmentationRepresentation(this.viewportId, segmentationId)
|
||||
})
|
||||
DicomEvent.$on('viewSegmentation', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
viewSegmentation(obj, this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('viewSegment', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
viewSegment(obj, this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('jumpBidirectional', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
jumpBidirectional(obj, this.viewportId, this.volumeId)
|
||||
})
|
||||
DicomEvent.$on('viewBidirectional', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
viewBidirectional(obj, this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('changeColor', (obj) => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
changeColor(obj, this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('resetViewport', () => {
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||
resetViewport(this.viewportId)
|
||||
})
|
||||
DicomEvent.$on('renderSegmentation', async (viewportId) => {
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@ function viewBidirectional(arr, viewportId) {
|
|||
resetViewport(viewportId)
|
||||
}
|
||||
function resetViewport(viewportId) {
|
||||
console.log('resetViewport')
|
||||
let renderingEngine = getRenderingEngine(renderingEngineId)
|
||||
const viewport = renderingEngine.getViewport(viewportId)
|
||||
viewport.render()
|
||||
|
|
|
|||
|
|
@ -52,6 +52,22 @@
|
|||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<!-- 分割组名 -->
|
||||
<el-form-item v-if="CriterionType === 0 && form.ReadingVersionEnum === 1 && form.ReadingTool === 3"
|
||||
:label="$t('trials:readingUnit:readingRules:title:segmentations')" prop="DefaultSegmentName.SegmentationName">
|
||||
<el-input v-model="form.DefaultSegmentName.SegmentationName" :disabled="isConfirm ||
|
||||
!hasPermi(['trials:trials-panel:setting:reading-unit:edit'])" style="width: 80%">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- 分割片段 -->
|
||||
<el-form-item v-if="CriterionType === 0 && form.ReadingVersionEnum === 1 && form.ReadingTool === 3"
|
||||
:label="$t('trials:readingUnit:readingRules:title:segment')" prop="DefaultSegmentName.SegmentNameList">
|
||||
<el-input v-model="form.SegmentNameListStr" style="width: 80%" disabled>
|
||||
</el-input>
|
||||
<el-button :disabled="isConfirm ||
|
||||
!hasPermi(['trials:trials-panel:setting:reading-unit:edit'])
|
||||
" icon="el-icon-plus" circle @click="segmentVisible = true" />
|
||||
</el-form-item>
|
||||
<!--检查类型筛选-->
|
||||
<el-form-item :label="$t('trials:processCfg:form:IsImageFilter')" prop="IsImageFilter">
|
||||
<el-radio-group v-model="form.IsImageFilter" @input="IsImageFilterChange" :disabled="isConfirm ||
|
||||
|
|
@ -392,6 +408,34 @@
|
|||
</el-dialog>
|
||||
<attachmentPreview :visible.sync="perview_visible" :isView="true" :isExternal="true" :ExternalList="ExternalList"
|
||||
v-if="perview_visible" />
|
||||
<!-- 分割段编辑 -->
|
||||
<el-dialog v-if="segmentVisible" :visible.sync="segmentVisible" :close-on-click-modal="false" width="600px"
|
||||
:title="$t('trials:trialCfg:dialogTitle:addSegment')" custom-class="base-dialog-wrapper">
|
||||
<div class="base-dialog-body">
|
||||
<el-button @click.stop="addSegment" style="margin-bottom: 5px;" type="primary" size="small">{{
|
||||
$t('common:button:new') }}</el-button>
|
||||
<el-table :data="SegmentNameList" border style="width: 100%" size="small">
|
||||
<el-table-column prop="name" :label="$t('trials:trialCfg:table:segmentName')" show-overflow-tooltip />
|
||||
<el-table-column :label="$t('common:action:action')" align="left" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button circle icon="el-icon-top" :title="$t('dictionary:template:keyDocList:button:up')"
|
||||
@click.stop="sortSegment(scope, 'up')" :disabled="scope.$index === 0" />
|
||||
<el-button circle icon="el-icon-bottom" :title="$t('dictionary:template:keyDocList:button:down')"
|
||||
@click.stop="sortSegment(scope, 'down')" :disabled="scope.$index === SegmentNameList.length - 1" />
|
||||
<el-button circle icon="el-icon-edit-outline" :title="$t('dictionary:template:keyDocList:button:update')"
|
||||
@click.stop="updateSegment(scope)" />
|
||||
<el-button circle icon="el-icon-delete" :title="$t('dictionary:template:keyDocList:button:del')"
|
||||
@click.stop="delSegment(scope)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- <div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleConfirmConfigData">
|
||||
{{ $t('trials:trialCfg:button:confirmCfg') }}
|
||||
</el-button>
|
||||
</div> -->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -420,6 +464,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
segmentVisible: false,
|
||||
perview_visible: false,
|
||||
ExternalList: [],
|
||||
keyDocVisible: false,
|
||||
|
|
@ -432,6 +477,11 @@ export default {
|
|||
ReadingVersionEnum: null,
|
||||
ReadingToolList: [],
|
||||
SegmentToolList: [],
|
||||
DefaultSegmentName: {
|
||||
SegmentationName: null,
|
||||
SegmentNameList: []
|
||||
},
|
||||
SegmentNameListStr: null,
|
||||
ReadingTaskViewEnum: null,
|
||||
IsImageLabeled: null,
|
||||
IsReadingShowSubjectInfo: null,
|
||||
|
|
@ -596,6 +646,21 @@ export default {
|
|||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
'DefaultSegmentName.SegmentationName': [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
'DefaultSegmentName.SegmentNameList': [
|
||||
{
|
||||
required: true,
|
||||
type: 'array',
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
CriterionModalitys: [
|
||||
{
|
||||
required: true,
|
||||
|
|
@ -642,6 +707,16 @@ export default {
|
|||
isUSA() {
|
||||
return process.env.NODE_ENV === 'usa'
|
||||
},
|
||||
SegmentNameList() {
|
||||
let arr = []
|
||||
this.form.DefaultSegmentName.SegmentNameList.forEach(item => {
|
||||
let obj = {
|
||||
name: item
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
return arr
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
CriterionModalitys: {
|
||||
|
|
@ -652,6 +727,74 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
sortSegment(row, key) {
|
||||
let index = row.$index
|
||||
let name = row.row.name
|
||||
this.form.DefaultSegmentName.SegmentNameList.splice(index, 1)
|
||||
if (key === 'up') {
|
||||
|
||||
|
||||
this.form.DefaultSegmentName.SegmentNameList.splice(index - 1, 0, name)
|
||||
} else {
|
||||
this.form.DefaultSegmentName.SegmentNameList.splice(index + 1, 0, name)
|
||||
}
|
||||
},
|
||||
async updateSegment(row) {
|
||||
let name = await this.customPrompt(row.row.name)
|
||||
if (!name) return false
|
||||
let index = row.$index
|
||||
this.form.DefaultSegmentName.SegmentNameList.splice(index, 1, name)
|
||||
this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join(",")
|
||||
},
|
||||
delSegment(row) {
|
||||
console.log(row)
|
||||
let index = row.$index
|
||||
this.form.DefaultSegmentName.SegmentNameList.splice(index, 1)
|
||||
this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join(",")
|
||||
},
|
||||
async addSegment() {
|
||||
let name = await this.customPrompt()
|
||||
if (!name) return false
|
||||
this.form.DefaultSegmentName.SegmentNameList.push(name)
|
||||
this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join(",")
|
||||
},
|
||||
async customPrompt(name = null) {
|
||||
try {
|
||||
const that = this
|
||||
// 请输入标记名称
|
||||
let message = !name ? this.$t('trials:reading:Segmentations:message:add') : this.$t('trials:reading:Segmentations:message:upate')
|
||||
const { value } = await this.$prompt(message, '', {
|
||||
showClose: false,
|
||||
cancelButtonText: this.$t('common:button:cancel'),
|
||||
confirmButtonText: this.$t('common:button:save'),
|
||||
showCancelButton: true,
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
inputValue: name,
|
||||
inputValidator: (value) => {
|
||||
if (!value) {
|
||||
return that.$t("trials:reading:Segmentations:message:notName")
|
||||
} else if (that.form.DefaultSegmentName.SegmentNameList.includes(value)) {
|
||||
return that.$t("trials:reading:Segmentations:message:nameIsHas")
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
// const value = instance.inputValue
|
||||
done()
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
}
|
||||
})
|
||||
return value
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
return null
|
||||
}
|
||||
},
|
||||
async viewManual() {
|
||||
try {
|
||||
if (this.form.KeyFileList.length <= 0) return this.$message.warning(this.$t("trials:researchRecord:ImageManual:message:noImageManual"))
|
||||
|
|
@ -814,6 +957,7 @@ export default {
|
|||
if (this.form.ReadingTool === 3) {
|
||||
this.segmentTools = [...config.customizeStandardsSegmentDicom]
|
||||
}
|
||||
this.form.SegmentNameListStr = res.Result.DefaultSegmentName.SegmentNameList.join(",")
|
||||
}
|
||||
this.CriterionModalitys = this.form.CriterionModalitys
|
||||
? this.form.CriterionModalitys.split('|')
|
||||
|
|
|
|||
Loading…
Reference in New Issue