Compare commits
No commits in common. "a6b5d0b1966061bd6eafa631e68c6f77e92b0226" and "74f3852ecceb9e04c7630467d4b119253410b964" have entirely different histories.
a6b5d0b196
...
74f3852ecc
|
@ -456,7 +456,7 @@ export default {
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(v, oldv) {
|
handler(v, oldv) {
|
||||||
// console.log(v)
|
console.log(v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -209,15 +209,7 @@
|
||||||
>
|
>
|
||||||
<svg-icon :icon-class="tool.icon" class="svg-icon" />
|
<svg-icon :icon-class="tool.icon" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 清除标注 -->
|
|
||||||
<div
|
|
||||||
v-if="criterionType === 0"
|
|
||||||
:class="['tool-item', activeTool === 'Eraser' ? 'tool-item-active' : '']"
|
|
||||||
:title="$t('trials:dicom-show:Eraser')"
|
|
||||||
@click.prevent="setToolActive('Eraser')"
|
|
||||||
>
|
|
||||||
<svg-icon icon-class="clear" class="svg-icon" />
|
|
||||||
</div>
|
|
||||||
<div class="tool-frame">
|
<div class="tool-frame">
|
||||||
<!-- 第一帧 -->
|
<!-- 第一帧 -->
|
||||||
<div :title="$t('trials:dicom-show:firstframe')" class="icon" @click.prevent="scrollPage(0)">
|
<div :title="$t('trials:dicom-show:firstframe')" class="icon" @click.prevent="scrollPage(0)">
|
||||||
|
@ -364,7 +356,7 @@
|
||||||
<customize-question-list
|
<customize-question-list
|
||||||
v-else-if="lastViewportTaskId && criterionType === 0 && lastViewportTaskIds.includes(s.VisitTaskId)"
|
v-else-if="lastViewportTaskId && criterionType === 0 && lastViewportTaskIds.includes(s.VisitTaskId)"
|
||||||
:ref="`ecrf_${s.VisitTaskId}`"
|
:ref="`ecrf_${s.VisitTaskId}`"
|
||||||
:reading-task-state="taskInfo && currentVisitInfo.VisitTaskId === taskInfo.VisitTaskId ? readingTaskState : 2"
|
:reading-task-state="currentVisitInfo.VisitTaskId === taskInfo.VisitTaskId ? readingTaskState : 2"
|
||||||
:last-viewport-task-id="lastViewportTaskId"
|
:last-viewport-task-id="lastViewportTaskId"
|
||||||
:visit-info="s"
|
:visit-info="s"
|
||||||
@resetAnnotations="resetAnnotations"
|
@resetAnnotations="resetAnnotations"
|
||||||
|
@ -462,7 +454,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getRelatedVisitTask, getReadingVisitStudyList, getTableAnswerRowInfoList, deleteCustomTag } from '@/api/trials'
|
import { getRelatedVisitTask, getReadingVisitStudyList, getTableAnswerRowInfoList } from '@/api/trials'
|
||||||
import { getDoctorShortcutKey, getUserWLTemplateList } from '@/api/user'
|
import { getDoctorShortcutKey, getUserWLTemplateList } from '@/api/user'
|
||||||
import { getCustomTag, submitCustomTag } from '@/api/reading'
|
import { getCustomTag, submitCustomTag } from '@/api/reading'
|
||||||
import {
|
import {
|
||||||
|
@ -985,15 +977,27 @@ export default {
|
||||||
toolGroup.addTool(WindowLevelTool.toolName)
|
toolGroup.addTool(WindowLevelTool.toolName)
|
||||||
toolGroup.addTool(WindowLevelRegionTool.toolName)
|
toolGroup.addTool(WindowLevelRegionTool.toolName)
|
||||||
toolGroup.addTool(PlanarRotateTool.toolName)
|
toolGroup.addTool(PlanarRotateTool.toolName)
|
||||||
toolGroup.addTool(ArrowAnnotateTool.toolName, {
|
if (this.criterionType === 0) {
|
||||||
arrowHeadStyle: 'standard',
|
toolGroup.addTool(ArrowAnnotateTool.toolName, {
|
||||||
changeTextCallback: async(data, eventData, doneChangingTextCallback) => {
|
arrowHeadStyle: 'standard',
|
||||||
return doneChangingTextCallback(data.text)
|
changeTextCallback: async(data, eventData, doneChangingTextCallback) => {
|
||||||
},
|
return doneChangingTextCallback(await this.customPrompt())
|
||||||
getTextCallback: async(doneChangingTextCallback) => {
|
},
|
||||||
return doneChangingTextCallback('_')
|
getTextCallback: async(doneChangingTextCallback) => {
|
||||||
}
|
return doneChangingTextCallback(await this.customPrompt())
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
toolGroup.addTool(ArrowAnnotateTool.toolName, {
|
||||||
|
arrowHeadStyle: 'standard',
|
||||||
|
changeTextCallback: async(data, eventData, doneChangingTextCallback) => {
|
||||||
|
return doneChangingTextCallback(data.text)
|
||||||
|
},
|
||||||
|
getTextCallback: async(doneChangingTextCallback) => {
|
||||||
|
return doneChangingTextCallback('_')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
toolGroup.addTool(RectangleROITool.toolName, {
|
toolGroup.addTool(RectangleROITool.toolName, {
|
||||||
cachedStats: false,
|
cachedStats: false,
|
||||||
getTextLines: this.getRectangleROIToolTextLines
|
getTextLines: this.getRectangleROIToolTextLines
|
||||||
|
@ -1041,7 +1045,7 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
eventTarget.addEventListener('cornerstoneimageloadprogress', this.imageLoadProgress)
|
eventTarget.addEventListener('cornerstoneimageloadprogress', this.imageLoadProgress)
|
||||||
console.log(Events, toolsEvents)
|
console.log(Events)
|
||||||
},
|
},
|
||||||
// 影像下载进度回调
|
// 影像下载进度回调
|
||||||
imageLoadProgress(e) {
|
imageLoadProgress(e) {
|
||||||
|
@ -1102,6 +1106,7 @@ export default {
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
renderAnnotations(series) {
|
renderAnnotations(series) {
|
||||||
|
console.log('renderAnnotations')
|
||||||
const taskId = series.TaskInfo.VisitTaskId
|
const taskId = series.TaskInfo.VisitTaskId
|
||||||
if (!taskId || this.renderedTaskIds.includes(taskId)) return
|
if (!taskId || this.renderedTaskIds.includes(taskId)) return
|
||||||
this.renderedTaskIds.push(taskId)
|
this.renderedTaskIds.push(taskId)
|
||||||
|
@ -1223,12 +1228,8 @@ export default {
|
||||||
annotation.markTool = annotation.metadata.toolName
|
annotation.markTool = annotation.metadata.toolName
|
||||||
this.markedSeriesIds.push(series.Id)
|
this.markedSeriesIds.push(series.Id)
|
||||||
const markName = await this.customPrompt()
|
const markName = await this.customPrompt()
|
||||||
|
|
||||||
if (markName) {
|
if (markName) {
|
||||||
annotation.data.label = markName
|
annotation.data.label = markName
|
||||||
if (annotation.metadata.toolName === 'ArrowAnnotate') {
|
|
||||||
annotation.data.text = markName
|
|
||||||
}
|
|
||||||
this.saveCustomAnnotation(annotation)
|
this.saveCustomAnnotation(annotation)
|
||||||
} else {
|
} else {
|
||||||
this.removeAnnotation(annotation)
|
this.removeAnnotation(annotation)
|
||||||
|
@ -1237,11 +1238,6 @@ export default {
|
||||||
|
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
},
|
},
|
||||||
validMarkName(markName) {
|
|
||||||
const annotations = cornerstoneTools.annotation.state.getAllAnnotations()
|
|
||||||
const i = annotations.findIndex(i => i.visitTaskId === this.taskInfo.VisitTaskId && i.data.label === markName)
|
|
||||||
return i > -1
|
|
||||||
},
|
|
||||||
async saveCustomAnnotation(annotation) {
|
async saveCustomAnnotation(annotation) {
|
||||||
try {
|
try {
|
||||||
const measureData = Object.assign({}, annotation)
|
const measureData = Object.assign({}, annotation)
|
||||||
|
@ -1255,6 +1251,7 @@ export default {
|
||||||
params.NumberOfFrames = annotation.numberOfFrames
|
params.NumberOfFrames = annotation.numberOfFrames
|
||||||
const res = await submitCustomTag(params)
|
const res = await submitCustomTag(params)
|
||||||
annotation.id = res.Result
|
annotation.id = res.Result
|
||||||
|
console.log(res)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
@ -1272,41 +1269,14 @@ export default {
|
||||||
}
|
}
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
},
|
},
|
||||||
async customAnnotationRemovedListener(e) {
|
customAnnotationRemovedListener(e) {
|
||||||
if (this.readingTaskState === 2) return
|
if (this.readingTaskState === 2) return
|
||||||
const { annotation } = e.detail
|
const { annotation } = e.detail
|
||||||
if (!annotation) return
|
if (!annotation) return
|
||||||
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
|
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
|
||||||
try {
|
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
|
||||||
if (this.activeTool === 'Eraser') {
|
if (index !== -1) {
|
||||||
await this.$confirm(
|
this.markedSeriesIds.splice(index, 1)
|
||||||
this.$t('trials:trials-list:table:isDeleted') +
|
|
||||||
annotation.data.label +
|
|
||||||
'?'
|
|
||||||
)
|
|
||||||
if (annotation.id) {
|
|
||||||
deleteCustomTag(annotation.id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
|
|
||||||
if (index !== -1) {
|
|
||||||
this.markedSeriesIds.splice(index, 1)
|
|
||||||
}
|
|
||||||
const renderingEngine = getRenderingEngine(renderingEngineId)
|
|
||||||
for (let i = 0; i < this.cells.length; i++) {
|
|
||||||
const viewportId = `viewport-${i}`
|
|
||||||
const viewport = renderingEngine.getViewport(viewportId)
|
|
||||||
viewport.render()
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
cornerstoneTools.annotation.state.addAnnotation(annotation)
|
|
||||||
const renderingEngine = getRenderingEngine(renderingEngineId)
|
|
||||||
for (let i = 0; i < this.cells.length; i++) {
|
|
||||||
const viewportId = `viewport-${i}`
|
|
||||||
const viewport = renderingEngine.getViewport(viewportId)
|
|
||||||
viewport.render()
|
|
||||||
}
|
|
||||||
console.log(e)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2321,28 +2291,11 @@ export default {
|
||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
},
|
},
|
||||||
// 输入标记名称自定义弹窗
|
// 箭头工具输入标记名称自定义弹窗
|
||||||
async customPrompt() {
|
async customPrompt() {
|
||||||
try {
|
try {
|
||||||
const that = this
|
|
||||||
// 请输入标记名称
|
// 请输入标记名称
|
||||||
const { value } = await this.$prompt(this.$t('trials:noneDicom:message:msg1'), '', {
|
const { value } = await this.$prompt(this.$t('trials:noneDicom:message:msg1'))
|
||||||
showClose: false,
|
|
||||||
beforeClose: (action, instance, done) => {
|
|
||||||
if (action === 'confirm') {
|
|
||||||
const value = instance.inputValue
|
|
||||||
if (!value) {
|
|
||||||
that.$message.error(this.$t('trials:customReading:error:validMarkName1'))
|
|
||||||
} else if (this.validMarkName(value)) {
|
|
||||||
that.$message.error(this.$t('trials:customReading:error:validMarkName'))
|
|
||||||
} else {
|
|
||||||
done()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
done()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return value
|
return value
|
||||||
} catch {
|
} catch {
|
||||||
return null
|
return null
|
||||||
|
|
Loading…
Reference in New Issue