修改病灶列表显示信息及病灶信息弹框布局调整
parent
631f79e219
commit
343b9c25e5
|
@ -377,7 +377,8 @@
|
|||
}
|
||||
|
||||
.viewer-backdrop {
|
||||
background-color: rgba(0, 0, 0, 50%);
|
||||
/* background-color: rgba(0, 0, 0, 50%); */
|
||||
background-color:rgb(255, 255, 255, 50%);
|
||||
}
|
||||
|
||||
.viewer-invisible {
|
||||
|
|
|
@ -391,7 +391,8 @@
|
|||
}
|
||||
|
||||
.viewer-backdrop {
|
||||
background-color: rgba(0, 0, 0, 50%);
|
||||
/* background-color: rgba(0, 0, 0, 50%); */
|
||||
background-color:rgb(255, 255, 255, 50%);
|
||||
}
|
||||
|
||||
.viewer-invisible {
|
||||
|
|
|
@ -159,6 +159,7 @@ cornerstoneTools.external.cornerstoneMath = cornerstoneMath
|
|||
cornerstoneTools.toolStyle.setToolWidth(1)
|
||||
cornerstoneTools.toolColors.setToolColor('rgb(255, 0, 0)')
|
||||
cornerstoneTools.toolColors.setActiveColor('rgb(0, 255, 0)')
|
||||
cornerstoneTools.store.state.deleteIfHandleOutsideImage = false
|
||||
// cornerstoneTools.init({ globalToolSyncEnabled: true })
|
||||
cornerstoneTools.init()
|
||||
export default {
|
||||
|
@ -331,6 +332,7 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
console.log(cornerstoneTools)
|
||||
this.subjectCode = this.$router.currentRoute.query.subjectCode
|
||||
document.addEventListener('mouseup', () => {
|
||||
this.sliderMouseup()
|
||||
|
|
|
@ -371,7 +371,7 @@ import vtkPiecewiseFunction from '@kitware/vtk.js/Common/DataModel/PiecewiseFunc
|
|||
import { mat4, vec3 } from 'gl-matrix'
|
||||
// import vtkColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction'
|
||||
// import vtkMath from '@kitware/vtk.js/Common/Core/Math'
|
||||
// import CircleROITool from './tools/CircleROITool'
|
||||
import CircleROITool from './tools/CircleROITool'
|
||||
// import ScaleOverlayTool from './tools/ScaleOverlayTool'
|
||||
const { registerColormap, getColormapNames, getColormap } = csUtils.colormap
|
||||
const {
|
||||
|
@ -388,7 +388,7 @@ const {
|
|||
// SynchronizerManager,
|
||||
// LengthTool,
|
||||
EllipticalROITool,
|
||||
CircleROITool,
|
||||
// CircleROITool,
|
||||
CrosshairsTool,
|
||||
TrackballRotateTool,
|
||||
ProbeTool,
|
||||
|
@ -696,19 +696,27 @@ export default {
|
|||
if (isNotValidAnnotationNum === 0) {
|
||||
this.onAnnotationModified(e)
|
||||
} else {
|
||||
// 移除标记
|
||||
this.removeAnnotation({ otherMeasureData: annotation })
|
||||
// annotation.isInsideVolume = false
|
||||
console.log('异常标记:',annotation)
|
||||
const { remark } = annotation.data
|
||||
// 清除病灶上的标记信息
|
||||
if (remark === 'Liver' || remark === 'Mediastinum') {
|
||||
this.$refs['questions'].clearMeasuredData(remark)
|
||||
// 激活工具
|
||||
this.setNonTargetMeasurementStatus({ status: true, toolName: 'CircleROI' })
|
||||
} else {
|
||||
this.$refs['tableQuestions'].clearMeasuredData()
|
||||
// 激活工具
|
||||
this.setBasicToolActive('CircleROI')
|
||||
this.$refs['questions'].setOutsideMeasuredData(annotation)
|
||||
}else{
|
||||
this.$refs['tableQuestions'].setOutsideMeasuredData(annotation)
|
||||
}
|
||||
// // 移除标记
|
||||
// this.removeAnnotation({ otherMeasureData: annotation })
|
||||
// const { remark } = annotation.data
|
||||
// // 清除病灶上的标记信息
|
||||
// if (remark === 'Liver' || remark === 'Mediastinum') {
|
||||
// this.$refs['questions'].clearMeasuredData(remark)
|
||||
// // 激活工具
|
||||
// this.setNonTargetMeasurementStatus({ status: true, toolName: 'CircleROI' })
|
||||
// } else {
|
||||
// this.$refs['tableQuestions'].clearMeasuredData()
|
||||
// // 激活工具
|
||||
// this.setBasicToolActive('CircleROI')
|
||||
// }
|
||||
}
|
||||
}, 120)
|
||||
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_MODIFIED, (e) => {
|
||||
|
|
|
@ -256,8 +256,8 @@ export default {
|
|||
deleteInfo: null,
|
||||
pictureBaseStr: '',
|
||||
currentMarkTool: '',
|
||||
firstRenderAnnotation: true
|
||||
|
||||
firstRenderAnnotation: true,
|
||||
isInsideVolume:true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -522,6 +522,7 @@ export default {
|
|||
},
|
||||
setMeasureData(measureData, isInit = false) {
|
||||
console.log('setMeasureData')
|
||||
this.isInsideVolume = true
|
||||
return new Promise(resolve => {
|
||||
if (measureData) {
|
||||
// 获取SUVmax(20)
|
||||
|
@ -610,6 +611,31 @@ export default {
|
|||
resolve()
|
||||
})
|
||||
},
|
||||
setOutsideMeasuredData(measureData){
|
||||
this.isInsideVolume = false
|
||||
var suvObj = this.questions.find(i => i.QuestionMark === 20)
|
||||
this.$set(this.questionForm, suvObj.Id, '')
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
} else {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||
}
|
||||
this.$set(this.questionForm, 'OtherMeasureData', measureData)
|
||||
var isLymph = this.getQuestionVal(2)
|
||||
isLymph = !isNaN(parseInt(isLymph)) ? parseInt(isLymph) : null
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
var suvMax = this.getQuestionVal(20)
|
||||
this.$emit('resetQuestions', { isLymphLesion: isLymph, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
this.toolType = measureData.type
|
||||
if (this.questionForm.MeasureData) {
|
||||
this.organList = []
|
||||
this.getOrganInfoList()
|
||||
} else {
|
||||
this.organList = []
|
||||
this.getOrganInfoList()
|
||||
}
|
||||
},
|
||||
returnFloat(num) {
|
||||
if (num) return
|
||||
var value = Math.round(parseFloat(num) * 100) / 100
|
||||
|
@ -693,6 +719,17 @@ export default {
|
|||
handleSave() {
|
||||
this.$refs.measurementForm.validate(async valid => {
|
||||
if (!valid) return
|
||||
if(!this.isInsideVolume){
|
||||
this.$alert('当前标记在图像外,不允许保存!', '提示', {
|
||||
callback: action => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: `action: ${ action }`
|
||||
});
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
var otherMeasureData = this.questionForm.OtherMeasureData ? Object.assign({}, this.questionForm.OtherMeasureData) : null
|
||||
if (otherMeasureData) {
|
||||
|
|
|
@ -749,6 +749,12 @@ export default {
|
|||
this.$refs[refName][0].clearMeasurement()
|
||||
}
|
||||
},
|
||||
setOutsideMeasuredData(annotation){
|
||||
if (this.activeItem.activeCollapseId && this.activeItem.activeRowIndex && this.activeName) {
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
this.$refs[refName][0].setOutsideMeasuredData(annotation)
|
||||
}
|
||||
},
|
||||
// 设置测量数据
|
||||
setMeasuredData(measureData) {
|
||||
// this.$nextTick(() => {
|
||||
|
|
|
@ -2,7 +2,8 @@ import {
|
|||
eventTarget,
|
||||
triggerEvent,
|
||||
VolumeViewport,
|
||||
utilities as csUtils
|
||||
utilities as csUtils,
|
||||
getEnabledElement
|
||||
} from '@cornerstonejs/core'
|
||||
|
||||
const { transformWorldToIndex } = csUtils
|
||||
|
@ -11,21 +12,22 @@ const {
|
|||
Enums,
|
||||
utilities,
|
||||
annotation,
|
||||
drawing
|
||||
drawing,
|
||||
cursors
|
||||
|
||||
} = cornerstoneTools
|
||||
|
||||
// const { getWorldWidthAndHeightFromTwoPoints } = utilities.planar
|
||||
// const { roundNumber } = utilities
|
||||
|
||||
const { getAnnotations } = annotation.state
|
||||
const { hideElementCursor } = cursors.elementCursor
|
||||
const { getAnnotations,addAnnotation } = annotation.state
|
||||
const { isAnnotationVisible } = annotation.visibility
|
||||
const { isAnnotationLocked } = annotation.locking
|
||||
const drawHandlesSvg = drawing.drawHandles
|
||||
const drawCircleSvg = drawing.drawCircle
|
||||
const drawLinkedTextBoxSvg = drawing.drawLinkedTextBox
|
||||
const { triggerAnnotationRenderForViewportIds } = utilities
|
||||
const { getTextBoxCoordsCanvas } = utilities.drawing
|
||||
console.log(utilities)
|
||||
const { getViewportIdsWithToolToRender } = utilities.viewportFilters
|
||||
// const getCanvasCircleRadius
|
||||
// const getCanvasCircleCorners
|
||||
// const { getCanvasCircleRadius, getCanvasCircleCorners } = utilities.math.circle
|
||||
|
@ -40,6 +42,14 @@ import { pointInShapeCallback } from './../js/pointInShapeCallback'
|
|||
import { vec3 } from 'gl-matrix'
|
||||
class CircleROITool extends cornerstoneTools.CircleROITool {
|
||||
static toolName;
|
||||
// editData= {
|
||||
// annotation: null,
|
||||
// viewportIdsToRender: [],
|
||||
// handleIndex: null,
|
||||
// movingTextBox: null,
|
||||
// newAnnotation: null,
|
||||
// hasMoved: null
|
||||
// }
|
||||
// touchDragCallback: any;
|
||||
// mouseDragCallback: any;
|
||||
// _throttledCalculateCachedStats: any;
|
||||
|
@ -73,6 +83,81 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
|||
// )
|
||||
// this._getTextLines = this.getTextLines
|
||||
}
|
||||
// addNewAnnotation = (evt) => {
|
||||
// const eventDetail = evt.detail;
|
||||
// const { currentPoints, element } = eventDetail;
|
||||
// const worldPos = currentPoints.world;
|
||||
// // const canvasPos = currentPoints.canvas;
|
||||
|
||||
// const enabledElement = getEnabledElement(element);
|
||||
// const { viewport, renderingEngine } = enabledElement;
|
||||
|
||||
// this.isDrawing = true;
|
||||
|
||||
// const camera = viewport.getCamera();
|
||||
// const { viewPlaneNormal, viewUp } = camera;
|
||||
|
||||
// const referencedImageId = this.getReferencedImageId(
|
||||
// viewport,
|
||||
// worldPos,
|
||||
// viewPlaneNormal,
|
||||
// viewUp
|
||||
// );
|
||||
|
||||
// const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
||||
|
||||
// const annotation = {
|
||||
// highlighted: true,
|
||||
// invalidated: true,
|
||||
// metadata: {
|
||||
// toolName: this.getToolName(),
|
||||
// viewPlaneNormal: [...viewPlaneNormal],
|
||||
// viewUp: [...viewUp],
|
||||
// FrameOfReferenceUID,
|
||||
// referencedImageId,
|
||||
// },
|
||||
// data: {
|
||||
// label: '',
|
||||
// handles: {
|
||||
// textBox: {
|
||||
// hasMoved: false,
|
||||
// worldPosition: [0, 0, 0],
|
||||
// worldBoundingBox: {
|
||||
// topLeft: [0, 0, 0],
|
||||
// topRight: [0, 0, 0],
|
||||
// bottomLeft: [0, 0, 0],
|
||||
// bottomRight: [0, 0, 0],
|
||||
// },
|
||||
// },
|
||||
// points: [[...worldPos], [...worldPos]],
|
||||
// activeHandleIndex: 1,
|
||||
// },
|
||||
// cachedStats: {},
|
||||
// },
|
||||
// };
|
||||
// addAnnotation(annotation, element);
|
||||
|
||||
// const viewportIdsToRender = getViewportIdsWithToolToRender(
|
||||
// element,
|
||||
// this.getToolName()
|
||||
// );
|
||||
|
||||
// this.editData = {
|
||||
// annotation,
|
||||
// viewportIdsToRender,
|
||||
// newAnnotation: true,
|
||||
// hasMoved: false,
|
||||
// };
|
||||
// this._activateDraw(element);
|
||||
|
||||
// hideElementCursor(element);
|
||||
|
||||
// evt.preventDefault();
|
||||
|
||||
// triggerAnnotationRenderForViewportIds(renderingEngine, viewportIdsToRender);
|
||||
|
||||
// return annotation;
|
||||
// };
|
||||
renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
||||
let renderStatus = false
|
||||
const { viewport } = enabledElement
|
||||
|
@ -107,7 +192,12 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
|||
const annotation = annotations[i]
|
||||
const { annotationUID, data } = annotation
|
||||
const { handles } = data
|
||||
const { points, activeHandleIndex } = handles
|
||||
// const { points, activeHandleIndex } = handles
|
||||
const { points } = handles
|
||||
var activeHandleIndex = null
|
||||
if(annotation.highlighted && !annotation.isLocked && annotation.isVisible){
|
||||
activeHandleIndex = 1
|
||||
}
|
||||
|
||||
styleSpecifier.annotationUID = annotationUID
|
||||
|
||||
|
@ -151,7 +241,6 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
|||
radiusUnit: null,
|
||||
perimeter: null
|
||||
}
|
||||
console.log(111111)
|
||||
this._calculateCachedStats(
|
||||
annotation,
|
||||
viewport,
|
||||
|
@ -160,7 +249,6 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
|||
modalityUnitOptions
|
||||
)
|
||||
} else if (annotation.invalidated) {
|
||||
console.log(22222)
|
||||
|
||||
this._throttledCalculateCachedStats(
|
||||
annotation,
|
||||
|
@ -333,156 +421,6 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
|||
|
||||
return renderStatus
|
||||
};
|
||||
_calculateCachedStats1 = (
|
||||
annotation,
|
||||
viewport,
|
||||
renderingEngine,
|
||||
enabledElement,
|
||||
modalityUnitOptions
|
||||
) => {
|
||||
const data = annotation.data
|
||||
const { viewportId, renderingEngineId } = enabledElement
|
||||
|
||||
const { points } = data.handles
|
||||
|
||||
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p))
|
||||
const { viewPlaneNormal, viewUp } = viewport.getCamera()
|
||||
|
||||
const [topLeftCanvas, bottomRightCanvas] = (
|
||||
getCanvasCircleCorners(canvasCoordinates)
|
||||
)
|
||||
|
||||
const topLeftWorld = viewport.canvasToWorld(topLeftCanvas)
|
||||
const bottomRightWorld = viewport.canvasToWorld(bottomRightCanvas)
|
||||
const { cachedStats } = data
|
||||
|
||||
const targetIds = Object.keys(cachedStats)
|
||||
const worldPos1 = topLeftWorld
|
||||
const worldPos2 = bottomRightWorld
|
||||
for (let i = 0; i < targetIds.length; i++) {
|
||||
const targetId = targetIds[i]
|
||||
|
||||
const image = this.getTargetIdImage(targetId, renderingEngine)
|
||||
|
||||
// If image does not exists for the targetId, skip. This can be due
|
||||
// to various reasons such as if the target was a volumeViewport, and
|
||||
// the volumeViewport has been decached in the meantime.
|
||||
if (!image) {
|
||||
continue
|
||||
}
|
||||
|
||||
const { dimensions, imageData, metadata } = image
|
||||
|
||||
const worldPos1Index = transformWorldToIndex(imageData, worldPos1)
|
||||
|
||||
worldPos1Index[0] = Math.floor(worldPos1Index[0])
|
||||
worldPos1Index[1] = Math.floor(worldPos1Index[1])
|
||||
worldPos1Index[2] = Math.floor(worldPos1Index[2])
|
||||
|
||||
const worldPos2Index = transformWorldToIndex(imageData, worldPos2)
|
||||
|
||||
worldPos2Index[0] = Math.floor(worldPos2Index[0])
|
||||
worldPos2Index[1] = Math.floor(worldPos2Index[1])
|
||||
worldPos2Index[2] = Math.floor(worldPos2Index[2])
|
||||
|
||||
// Check if one of the indexes are inside the volume, this then gives us
|
||||
// Some area to do stats over.
|
||||
|
||||
if (this._isInsideVolume(worldPos1Index, worldPos2Index, dimensions)) {
|
||||
const iMin = Math.min(worldPos1Index[0], worldPos2Index[0])
|
||||
const iMax = Math.max(worldPos1Index[0], worldPos2Index[0])
|
||||
|
||||
const jMin = Math.min(worldPos1Index[1], worldPos2Index[1])
|
||||
const jMax = Math.max(worldPos1Index[1], worldPos2Index[1])
|
||||
|
||||
const kMin = Math.min(worldPos1Index[2], worldPos2Index[2])
|
||||
const kMax = Math.max(worldPos1Index[2], worldPos2Index[2])
|
||||
|
||||
const boundsIJK = [
|
||||
[iMin, iMax],
|
||||
[jMin, jMax],
|
||||
[kMin, kMax]
|
||||
]
|
||||
|
||||
const center = [
|
||||
(topLeftWorld[0] + bottomRightWorld[0]) / 2,
|
||||
(topLeftWorld[1] + bottomRightWorld[1]) / 2,
|
||||
(topLeftWorld[2] + bottomRightWorld[2]) / 2
|
||||
]
|
||||
|
||||
const ellipseObj = {
|
||||
center,
|
||||
xRadius: Math.abs(topLeftWorld[0] - bottomRightWorld[0]) / 2,
|
||||
yRadius: Math.abs(topLeftWorld[1] - bottomRightWorld[1]) / 2,
|
||||
zRadius: Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2
|
||||
}
|
||||
const { worldWidth, worldHeight } = getWorldWidthAndHeightFromTwoPoints(
|
||||
viewPlaneNormal,
|
||||
viewUp,
|
||||
worldPos1,
|
||||
worldPos2
|
||||
)
|
||||
const isEmptyArea = worldWidth === 0 && worldHeight === 0
|
||||
const scale = getCalibratedScale(image)
|
||||
const aspect = getCalibratedAspect(image)
|
||||
const area = Math.abs(
|
||||
Math.PI *
|
||||
(worldWidth / scale / 2) *
|
||||
(worldHeight / aspect / scale / 2)
|
||||
)
|
||||
|
||||
const modalityUnit = getModalityUnit(
|
||||
metadata.Modality,
|
||||
annotation.metadata.referencedImageId,
|
||||
modalityUnitOptions
|
||||
)
|
||||
const pointsInShape = pointInShapeCallback(
|
||||
imageData,
|
||||
(pointLPS, pointIJK) => pointInEllipse(ellipseObj, pointLPS),
|
||||
this.configuration.statsCalculator.statsCallback,
|
||||
boundsIJK
|
||||
)
|
||||
|
||||
const stats = this.configuration.statsCalculator.getStatistics()
|
||||
|
||||
cachedStats[targetId] = {
|
||||
Modality: metadata.Modality,
|
||||
area,
|
||||
mean: stats[1] && stats[1].value ? stats[1].value : null,
|
||||
max: stats[0] && stats[0].value ? stats[0].value : null,
|
||||
stdDev: stats[2] && stats[2].value ? stats[2].value : null,
|
||||
statsArray: stats,
|
||||
pointsInShape: pointsInShape,
|
||||
isEmptyArea,
|
||||
areaUnit: getCalibratedAreaUnits(null, image),
|
||||
radius: worldWidth / 2 / scale,
|
||||
radiusUnit: getCalibratedLengthUnits(null, image),
|
||||
perimeter: (2 * Math.PI * (worldWidth / 2)) / scale,
|
||||
modalityUnit
|
||||
}
|
||||
} else {
|
||||
this.isHandleOutsideImage = true
|
||||
|
||||
cachedStats[targetId] = {
|
||||
Modality: metadata.Modality
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
annotation.invalidated = false
|
||||
|
||||
// Dispatching annotation modified
|
||||
const eventType = Enums.Events.ANNOTATION_MODIFIED
|
||||
|
||||
const eventDetail = {
|
||||
annotation,
|
||||
viewportId,
|
||||
renderingEngineId
|
||||
}
|
||||
triggerEvent(eventTarget, eventType, eventDetail)
|
||||
|
||||
return cachedStats
|
||||
}
|
||||
}
|
||||
function getCanvasCircleCorners(
|
||||
circleCanvasPoints
|
||||
|
|
|
@ -18,116 +18,133 @@
|
|||
<i class="el-icon-circle-close" style="font-size: 25px;cursor: pointer;" @click="handleClose" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-form-item
|
||||
:label="$t('trials:reading:title:lesionType')"
|
||||
prop="LesionType"
|
||||
:rules="[
|
||||
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
||||
]"
|
||||
>
|
||||
<!-- 下拉框 -->
|
||||
<el-select
|
||||
v-model="questionForm.LesionType"
|
||||
filterable
|
||||
:disabled="!isCurrentTask || readingTaskState>=2 || !isBaseLineTask"
|
||||
@change="((val)=>{lesionTypeChange(val)})"
|
||||
<div style="height: 420px;overflow-y: auto;">
|
||||
<el-form-item
|
||||
:label="$t('trials:reading:title:lesionType')"
|
||||
prop="LesionType"
|
||||
:rules="[
|
||||
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
|
||||
]"
|
||||
>
|
||||
|
||||
<el-option
|
||||
v-for="item of $d.LesionType"
|
||||
v-show="!(isBaseLineTask && item.value === 2)"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-for="qs in questions"
|
||||
v-show="qs.ShowQuestion!==2"
|
||||
:key="qs.Id"
|
||||
:label="`${qs.QuestionName}`"
|
||||
:prop="qs.Id"
|
||||
:rules="[
|
||||
{ required: (qs.IsRequired === 0 || (qs.IsRequired ===1 && qs.RelevanceId && (qs.RelevanceValue.includes(questionForm[qs.RelevanceId]))) || (qs.QuestionMark === 6 && questionForm.IsCanEditPosition === true) || (questionForm.IsCanEditPosition && qs.QuestionMark === 10)) && qs.Type!=='group' && qs.Type!=='summary',
|
||||
message:['radio', 'select', 'checkbox'].includes(qs.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
|
||||
]"
|
||||
>
|
||||
|
||||
<!-- 输入框 -->
|
||||
<template v-if="qs.Type==='input' || qs.Type==='number'">
|
||||
<!-- {{ ((qs.QuestionMark === 6 && isCurrentTaskAdd === 'False') || (qs.QuestionMark === 6 && isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition)) }} -->
|
||||
<el-input
|
||||
v-if="qs.Type==='input' || qs.Type==='number'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2 || qs.QuestionMark === 0 || qs.QuestionMark === 1 || qs.QuestionMark === 2 || qs.QuestionMark === 5 || (qs.QuestionMark === 6 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))|| (qs.QuestionMark === 8 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName) && lesionType !== 2) || (qs.QuestionMark === 10 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName))"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
<!-- 下拉框 -->
|
||||
<el-select
|
||||
v-model="questionForm.LesionType"
|
||||
filterable
|
||||
:disabled="!isCurrentTask || readingTaskState>=2 || !isBaseLineTask"
|
||||
@change="((val)=>{lesionTypeChange(val)})"
|
||||
>
|
||||
<template v-if="(qs.QuestionMark===0 || qs.QuestionMark===1) && qs.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<!-- 多行文本输入框 -->
|
||||
<el-input
|
||||
v-if="qs.Type==='textarea'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
/>
|
||||
<!-- 下拉框 -->
|
||||
<!-- :disabled="!isCurrentTask || readingTaskState>=2 || (!isBaseLineTask && qs.QuestionMark === 5 && isCurrentTaskAdd === 'False') || qs.QuestionMark === 2 || (qs.QuestionMark === 8 && !isBaseLineTask && isCurrentTaskAdd === 'False')" -->
|
||||
|
||||
<el-select
|
||||
v-if="qs.Type==='select'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
filterable
|
||||
:placeholder="qs.QuestionMark === 8 ? $t('common:placeholder:selectorsearch') : $t('common:placeholder:select')"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2 || qs.QuestionMark === 0 || qs.QuestionMark === 1 || qs.QuestionMark === 2 || qs.QuestionMark === 5 || (qs.QuestionMark === 6 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))|| (qs.QuestionMark === 8 && (isCurrentTaskAdd === 'False'|| !!answers.SplitOrMergeLesionName)) || (qs.QuestionMark === 10 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName)) || (qs.QuestionMark === 7 && stateDisabled)"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
>
|
||||
<template v-if="qs.QuestionMark === 8" #prefix>
|
||||
<span style="padding-left: 5px;">
|
||||
<i class="el-icon-search" />
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="qs.TableQuestionType === 1">
|
||||
<el-option
|
||||
v-for="item in organList"
|
||||
:key="item.Id"
|
||||
:label="item[qs.DataTableColumn]"
|
||||
:value="item[qs.DataTableColumn]"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && isBaseLineTask">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="(lesionType === 0 && item.value ===0) || (lesionType === 1 && (item.value ===0))"
|
||||
v-for="item of $d.LesionType"
|
||||
v-show="!(isBaseLineTask && item.value === 2)"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-for="qs in questions"
|
||||
v-show="qs.ShowQuestion!==2"
|
||||
:key="qs.Id"
|
||||
:label="`${qs.QuestionName}`"
|
||||
:prop="qs.Id"
|
||||
:rules="[
|
||||
{ required: (qs.IsRequired === 0 || (qs.IsRequired ===1 && qs.RelevanceId && (qs.RelevanceValue.includes(questionForm[qs.RelevanceId]))) || (qs.QuestionMark === 6 && questionForm.IsCanEditPosition === true) || (questionForm.IsCanEditPosition && qs.QuestionMark === 10)) && qs.Type!=='group' && qs.Type!=='summary',
|
||||
message:['radio', 'select', 'checkbox'].includes(qs.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
|
||||
]"
|
||||
>
|
||||
|
||||
<!-- 输入框 -->
|
||||
<template v-if="qs.Type==='input' || qs.Type==='number'">
|
||||
<!-- {{ ((qs.QuestionMark === 6 && isCurrentTaskAdd === 'False') || (qs.QuestionMark === 6 && isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition)) }} -->
|
||||
<el-input
|
||||
v-if="qs.Type==='input' || qs.Type==='number'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2 || qs.QuestionMark === 0 || qs.QuestionMark === 1 || qs.QuestionMark === 2 || qs.QuestionMark === 5 || (qs.QuestionMark === 6 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))|| (qs.QuestionMark === 8 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName) && lesionType !== 2) || (qs.QuestionMark === 10 && (isCurrentTaskAdd === 'False' || !!answers.SplitOrMergeLesionName))"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
>
|
||||
<template v-if="(qs.QuestionMark===0 || qs.QuestionMark===1) && qs.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && !isBaseLineTask">
|
||||
<!-- 首次分裂的病灶只能选择存在 -->
|
||||
<template v-if="answers.IsFristAdd=== 'True' && answers.SplitOrMergeType === '0'">
|
||||
<!-- 多行文本输入框 -->
|
||||
<el-input
|
||||
v-if="qs.Type==='textarea'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
/>
|
||||
<!-- 下拉框 -->
|
||||
<!-- :disabled="!isCurrentTask || readingTaskState>=2 || (!isBaseLineTask && qs.QuestionMark === 5 && isCurrentTaskAdd === 'False') || qs.QuestionMark === 2 || (qs.QuestionMark === 8 && !isBaseLineTask && isCurrentTaskAdd === 'False')" -->
|
||||
|
||||
<el-select
|
||||
v-if="qs.Type==='select'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
filterable
|
||||
:placeholder="qs.QuestionMark === 8 ? $t('common:placeholder:selectorsearch') : $t('common:placeholder:select')"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2 || qs.QuestionMark === 0 || qs.QuestionMark === 1 || qs.QuestionMark === 2 || qs.QuestionMark === 5 || (qs.QuestionMark === 6 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName))|| (qs.QuestionMark === 8 && (isCurrentTaskAdd === 'False'|| !!answers.SplitOrMergeLesionName)) || (qs.QuestionMark === 10 && (isCurrentTaskAdd === 'False' || (isCurrentTaskAdd === 'True' && !questionForm.IsCanEditPosition) || !!answers.SplitOrMergeLesionName)) || (qs.QuestionMark === 7 && stateDisabled)"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
>
|
||||
<template v-if="qs.QuestionMark === 8" #prefix>
|
||||
<span style="padding-left: 5px;">
|
||||
<i class="el-icon-search" />
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="qs.TableQuestionType === 1">
|
||||
<el-option
|
||||
v-for="item in organList"
|
||||
:key="item.Id"
|
||||
:label="item[qs.DataTableColumn]"
|
||||
:value="item[qs.DataTableColumn]"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && isBaseLineTask">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0"
|
||||
v-show="(lesionType === 0 && item.value ===0) || (lesionType === 1 && (item.value ===0))"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<!-- 首次添加的新病灶不能为无法评估和消失 -->
|
||||
<template v-else-if="isCurrentTaskAdd=== 'True' && lesionType === 2">
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && !isBaseLineTask">
|
||||
<!-- 首次分裂的病灶只能选择存在 -->
|
||||
<template v-if="answers.IsFristAdd=== 'True' && answers.SplitOrMergeType === '0'">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<!-- 首次添加的新病灶不能为无法评估和消失 -->
|
||||
<template v-else-if="isCurrentTaskAdd=== 'True' && lesionType === 2">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0 || item.value === 1"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of filterState($d[qs.DictionaryCode])"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark !== 7">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0 || item.value === 1"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
|
@ -135,58 +152,47 @@
|
|||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of filterState($d[qs.DictionaryCode])"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
v-for="val in qs.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
:value="val"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark !== 7">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="val in qs.TypeValue.split('|')"
|
||||
|
||||
</el-select>
|
||||
<!-- 单选 -->
|
||||
<el-radio-group
|
||||
v-if="qs.Type==='radio'"
|
||||
v-model="questionForm[qs.id]"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||
>
|
||||
<el-radio
|
||||
v-for="val in qs.options.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
:value="val"
|
||||
/>
|
||||
</template>
|
||||
|
||||
</el-select>
|
||||
<!-- 单选 -->
|
||||
<el-radio-group
|
||||
v-if="qs.Type==='radio'"
|
||||
v-model="questionForm[qs.id]"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||
>
|
||||
<el-radio
|
||||
v-for="val in qs.options.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
>
|
||||
{{ val }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<el-input
|
||||
v-if="qs.Type==='calculation'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
disabled
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
>
|
||||
{{ val }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<el-input
|
||||
v-if="qs.Type==='calculation'"
|
||||
v-model="questionForm[qs.Id]"
|
||||
disabled
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
<template v-if="qs.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="SUV测量截图"
|
||||
v-if="answers.OtherPicturePath"
|
||||
>
|
||||
<template v-if="qs.Unit" slot="append">
|
||||
{{ $fd('ValueUnit', parseInt(qs.Unit)) }}
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<img v-viewer style="width: 50px; height: 50px; cursor: pointer;" crossorigin="anonymous" :src="answers.OtherPicturePath" alt="Image">
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
@ -295,7 +301,7 @@ export default {
|
|||
pictureBaseStr: '',
|
||||
currentMarkTool: '',
|
||||
digitPlaces: 2,
|
||||
stateDisabled: false
|
||||
stateDisabled: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
{{ $fd('NewLesionState',parseInt(item.TableQuestions.Answers[i].lesionState)) }}
|
||||
</span>
|
||||
</div>
|
||||
<div style="display: inline-block;margin-left:5px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:60px">
|
||||
<div style="display: inline-block;margin-left:5px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:100px">
|
||||
<!-- <template v-if="item.TableQuestions.Answers[i].isLymphLesion && !isNaN(parseInt(item.TableQuestions.Answers[i].lesionShort))">
|
||||
{{ item.TableQuestions.Answers[i].lesionShort }}mm
|
||||
</template>
|
||||
|
@ -92,7 +92,7 @@
|
|||
{{ item.TableQuestions.Answers[i].lesionLength }}mm
|
||||
</template> -->
|
||||
<template v-if="!isNaN(parseInt(item.TableQuestions.Answers[i].lesionLength))">
|
||||
{{ item.TableQuestions.Answers[i].lesionLength }}mm
|
||||
{{ item.TableQuestions.Answers[i].lesionLength }}mm * {{item.TableQuestions.Answers[i].lesionShort}}mm
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -37,8 +37,8 @@ export default class LengthTool extends cornerstoneTools.LengthTool {
|
|||
drawHandlesOnHover: false,
|
||||
hideHandlesIfMoving: false,
|
||||
renderDashed: false,
|
||||
digits: 2
|
||||
}
|
||||
digits: 2,
|
||||
},
|
||||
}
|
||||
|
||||
super(props, defaultProps)
|
||||
|
@ -48,7 +48,7 @@ export default class LengthTool extends cornerstoneTools.LengthTool {
|
|||
createNewMeasurement(eventData) {
|
||||
const goodEventData =
|
||||
eventData && eventData.currentPoints && eventData.currentPoints.image
|
||||
|
||||
console.log('createNewMeasurement: ',goodEventData)
|
||||
if (!goodEventData) {
|
||||
console.log(
|
||||
`required eventData not supplied to tool ${this.name}'s createNewMeasurement`
|
||||
|
@ -84,7 +84,8 @@ export default class LengthTool extends cornerstoneTools.LengthTool {
|
|||
drawnIndependently: true,
|
||||
allowedOutsideImage: true,
|
||||
hasBoundingBox: true
|
||||
}
|
||||
},
|
||||
allowedOutsideImage:true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ const name = defaultSettings.title || 'IRCIS' // page title
|
|||
|
||||
// eslint-disable-next-line no-undef
|
||||
module.exports = {
|
||||
lintOnSave: false,
|
||||
// lintOnSave: false,
|
||||
transpileDependencies: ['@cornerstonejs', 'minio'],
|
||||
// publicPath: process.env.NODE_ENV === 'development' || process.env.VUE_APP_OSS_CONFIG_BUCKET === 'zyypacs-usa' ? process.env.VUE_APP_BASE_PATH : `${process.env.VUE_FILE_PATH}${process.env.VUE_APP_OSS_PATH}${distDate}/`,
|
||||
publicPath: '/',
|
||||
|
|
Loading…
Reference in New Issue