Compare commits
No commits in common. "c9ef6cd19fe0059ccab6499186d50492188e1afa" and "25ddd422a3588e0a6044c49246a6b1679cef43f8" have entirely different histories.
c9ef6cd19f
...
25ddd422a3
|
@ -108,7 +108,6 @@ export default {
|
||||||
const res = await getNextTask(params)
|
const res = await getNextTask(params)
|
||||||
this.taskInfo = res.Result
|
this.taskInfo = res.Result
|
||||||
localStorage.setItem('taskInfo', JSON.stringify(res.Result))
|
localStorage.setItem('taskInfo', JSON.stringify(res.Result))
|
||||||
localStorage.setItem('digitPlaces', JSON.stringify(res.Result.DigitPlaces))
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.taskInfo.IsExistsClinicalData && this.taskInfo.IsNeedReadClinicalData && !this.taskInfo.IsReadClinicalData) {
|
if (this.taskInfo.IsExistsClinicalData && this.taskInfo.IsNeedReadClinicalData && !this.taskInfo.IsReadClinicalData) {
|
||||||
|
|
|
@ -70,13 +70,6 @@
|
||||||
>
|
>
|
||||||
<svg-icon icon-class="clear" class="svg-icon" />
|
<svg-icon icon-class="clear" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div
|
|
||||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'Length' ? 'tool-item-active' : '']"
|
|
||||||
:title="$t('trials:dicom-show:length')"
|
|
||||||
@click.prevent="setAnnotateToolActive('Length')"
|
|
||||||
>
|
|
||||||
<svg-icon icon-class="length" class="svg-icon" />
|
|
||||||
</div> -->
|
|
||||||
<!-- 截图 -->
|
<!-- 截图 -->
|
||||||
<!-- <div
|
<!-- <div
|
||||||
class="tool-item"
|
class="tool-item"
|
||||||
|
@ -219,8 +212,7 @@ import {
|
||||||
imageLoader,
|
imageLoader,
|
||||||
metaData,
|
metaData,
|
||||||
getRenderingEngine,
|
getRenderingEngine,
|
||||||
eventTarget,
|
eventTarget
|
||||||
utilities as csUtils
|
|
||||||
// getEnabledElementByIds
|
// getEnabledElementByIds
|
||||||
} from '@cornerstonejs/core'
|
} from '@cornerstonejs/core'
|
||||||
|
|
||||||
|
@ -242,8 +234,7 @@ const {
|
||||||
ArrowAnnotateTool,
|
ArrowAnnotateTool,
|
||||||
RectangleROITool,
|
RectangleROITool,
|
||||||
PlanarFreehandROITool,
|
PlanarFreehandROITool,
|
||||||
EraserTool,
|
EraserTool
|
||||||
LengthTool
|
|
||||||
// cursors
|
// cursors
|
||||||
} = cornerstoneTools
|
} = cornerstoneTools
|
||||||
const { MouseBindings, Events: toolsEvents } = csToolsEnums
|
const { MouseBindings, Events: toolsEvents } = csToolsEnums
|
||||||
|
@ -414,8 +405,6 @@ export default {
|
||||||
cornerstoneTools.addTool(RectangleROITool)
|
cornerstoneTools.addTool(RectangleROITool)
|
||||||
cornerstoneTools.addTool(PlanarFreehandROITool)
|
cornerstoneTools.addTool(PlanarFreehandROITool)
|
||||||
cornerstoneTools.addTool(EraserTool)
|
cornerstoneTools.addTool(EraserTool)
|
||||||
cornerstoneTools.addTool(LengthTool)
|
|
||||||
|
|
||||||
|
|
||||||
viewportIds.forEach((viewportId, i) => {
|
viewportIds.forEach((viewportId, i) => {
|
||||||
const toolGroupId = `canvas-${i}`
|
const toolGroupId = `canvas-${i}`
|
||||||
|
@ -436,14 +425,10 @@ export default {
|
||||||
})
|
})
|
||||||
toolGroup.addTool(RectangleROITool.toolName)
|
toolGroup.addTool(RectangleROITool.toolName)
|
||||||
toolGroup.addTool(PlanarFreehandROITool.toolName, {
|
toolGroup.addTool(PlanarFreehandROITool.toolName, {
|
||||||
allowOpenContours: false,
|
allowOpenContours: false
|
||||||
cachedStats: false
|
// cachedStats: false
|
||||||
})
|
})
|
||||||
toolGroup.addTool(EraserTool.toolName)
|
toolGroup.addTool(EraserTool.toolName)
|
||||||
toolGroup.addTool(LengthTool.toolName, {
|
|
||||||
getTextLines: this.getLengthToolTextLines
|
|
||||||
})
|
|
||||||
|
|
||||||
toolGroup.setToolActive(StackScrollTool.toolName, {
|
toolGroup.setToolActive(StackScrollTool.toolName, {
|
||||||
bindings: [{ mouseButton: MouseBindings.Wheel }]
|
bindings: [{ mouseButton: MouseBindings.Wheel }]
|
||||||
})
|
})
|
||||||
|
@ -454,12 +439,10 @@ export default {
|
||||||
toolGroup.setToolPassive(ArrowAnnotateTool.toolName)
|
toolGroup.setToolPassive(ArrowAnnotateTool.toolName)
|
||||||
toolGroup.setToolPassive(RectangleROITool.toolName)
|
toolGroup.setToolPassive(RectangleROITool.toolName)
|
||||||
toolGroup.setToolPassive(PlanarFreehandROITool.toolName)
|
toolGroup.setToolPassive(PlanarFreehandROITool.toolName)
|
||||||
toolGroup.setToolPassive(LengthTool.toolName)
|
|
||||||
} else {
|
} else {
|
||||||
toolGroup.setToolEnabled(ArrowAnnotateTool.toolName)
|
toolGroup.setToolEnabled(ArrowAnnotateTool.toolName)
|
||||||
toolGroup.setToolEnabled(RectangleROITool.toolName)
|
toolGroup.setToolEnabled(RectangleROITool.toolName)
|
||||||
toolGroup.setToolEnabled(PlanarFreehandROITool.toolName)
|
toolGroup.setToolEnabled(PlanarFreehandROITool.toolName)
|
||||||
toolGroup.setToolEnabled(LengthTool.toolName)
|
|
||||||
}
|
}
|
||||||
toolGroup.setToolPassive(EraserTool.toolName)
|
toolGroup.setToolPassive(EraserTool.toolName)
|
||||||
})
|
})
|
||||||
|
@ -819,17 +802,6 @@ export default {
|
||||||
const fileList = this.viewportInfos[i].fileList
|
const fileList = this.viewportInfos[i].fileList
|
||||||
const fileIndex = fileList.findIndex(f => f.Path === path)
|
const fileIndex = fileList.findIndex(f => f.Path === path)
|
||||||
if (fileIndex === -1) return
|
if (fileIndex === -1) return
|
||||||
if (annotation.metadata.toolName === 'Length') {
|
|
||||||
const { value } = await this.$prompt('请录入录入物理长度(mm)!')
|
|
||||||
annotation.data.handles.scale = value
|
|
||||||
if (!value) {
|
|
||||||
// 移除标记
|
|
||||||
cornerstoneTools.annotation.state.addAnnotation(annotation.annotationUID)
|
|
||||||
const renderingEngine = getRenderingEngine(renderingEngineId)
|
|
||||||
const viewport = renderingEngine.getViewport(`canvas-${this.activeCanvasIndex}`)
|
|
||||||
viewport.render()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const params = {
|
const params = {
|
||||||
id: '',
|
id: '',
|
||||||
visitTaskId: this.viewportInfos[i].taskInfo.VisitTaskId,
|
visitTaskId: this.viewportInfos[i].taskInfo.VisitTaskId,
|
||||||
|
@ -840,25 +812,9 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await addNoneDicomMark(params)
|
const res = await addNoneDicomMark(params)
|
||||||
annotation.annotationId = res.Result
|
annotation.annotationId = res.Result
|
||||||
|
|
||||||
// 保存成功
|
// 保存成功
|
||||||
// this.$message.success(this.$t('common:message:savedSuccessfully'))
|
// this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
},
|
},
|
||||||
getLengthToolTextLines(data, targetId) {
|
|
||||||
const cachedVolumeStats = data.cachedStats[targetId]
|
|
||||||
const { length, unit } = cachedVolumeStats
|
|
||||||
if (length === undefined || length === null || isNaN(length)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (data.handles.scale === undefined || data.handles.scale === null || isNaN(data.handles.scale)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const textLines = []
|
|
||||||
textLines.push(`${csUtils.roundNumber(length)} ${unit}`)
|
|
||||||
textLines.push(`${csUtils.roundNumber(data.handles.scale)} mm`)
|
|
||||||
|
|
||||||
return textLines;
|
|
||||||
},
|
|
||||||
debounce(callback, delay) {
|
debounce(callback, delay) {
|
||||||
let timerId
|
let timerId
|
||||||
return function() {
|
return function() {
|
||||||
|
@ -880,8 +836,7 @@ export default {
|
||||||
// 箭头工具输入标记名称自定义弹窗
|
// 箭头工具输入标记名称自定义弹窗
|
||||||
async customPrompt() {
|
async customPrompt() {
|
||||||
try {
|
try {
|
||||||
// 请输入标记名称
|
const { value } = await this.$prompt('请输入标记名称')
|
||||||
const { value } = await this.$prompt(this.$t('trials:noneDicom:message:msg1'))
|
|
||||||
return value
|
return value
|
||||||
} catch {
|
} catch {
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -127,7 +127,6 @@
|
||||||
v-model="questionForm[question.Id]"
|
v-model="questionForm[question.Id]"
|
||||||
clearable
|
clearable
|
||||||
@change="(val) => { formItemNumberChange(val, question) }"
|
@change="(val) => { formItemNumberChange(val, question) }"
|
||||||
:disabled="readingTaskState >= 2"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="val in question.TypeValue.split('|')"
|
v-for="val in question.TypeValue.split('|')"
|
||||||
|
@ -140,9 +139,9 @@
|
||||||
v-else-if="question.DataSource !== 1"
|
v-else-if="question.DataSource !== 1"
|
||||||
v-model="questionForm[question.Id]"
|
v-model="questionForm[question.Id]"
|
||||||
type="number"
|
type="number"
|
||||||
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')));"
|
||||||
@change="(val) => { formItemNumberChange(val, question) }"
|
@change="(val) => { formItemNumberChange(val, question) }"
|
||||||
:disabled="readingTaskState >= 2"
|
@input="limitInput($event, questionForm, question.Id)"
|
||||||
>
|
>
|
||||||
<template v-if="question.Unit !== 0" slot="append">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit }}</template>
|
<template v-if="question.Unit !== 0" slot="append">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit }}</template>
|
||||||
<template v-else-if="question.ValueType === 2" slot="append">%</template>
|
<template v-else-if="question.ValueType === 2" slot="append">%</template>
|
||||||
|
@ -151,8 +150,9 @@
|
||||||
v-else-if="question.DataSource === 1"
|
v-else-if="question.DataSource === 1"
|
||||||
v-model="questionForm[question.Id]"
|
v-model="questionForm[question.Id]"
|
||||||
type="number"
|
type="number"
|
||||||
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')));"
|
||||||
:disabled="question.DataSource === 1 || readingTaskState >= 2"
|
:disabled="question.DataSource === 1"
|
||||||
|
@input="limitInput($event, questionForm, question.Id)"
|
||||||
>
|
>
|
||||||
<template v-if="question.Unit !== 0" slot="append">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit }}</template>
|
<template v-if="question.Unit !== 0" slot="append">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit }}</template>
|
||||||
<template v-else-if="question.ValueType === 2" slot="append">%</template>
|
<template v-else-if="question.ValueType === 2" slot="append">%</template>
|
||||||
|
@ -336,8 +336,7 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
this.digitPlaces = localStorage.getItem('digitPlaces') ? parseInt(localStorage.getItem('digitPlaces')) : 0
|
||||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
limitInput(value, a, b) {
|
limitInput(value, a, b) {
|
||||||
|
@ -347,9 +346,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleBlur(value, a, b) {
|
|
||||||
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
|
||||||
},
|
|
||||||
logic(rules, num = 0) {
|
logic(rules, num = 0) {
|
||||||
try {
|
try {
|
||||||
if (rules.CalculateQuestionList.length === 0) {
|
if (rules.CalculateQuestionList.length === 0) {
|
||||||
|
@ -465,13 +461,14 @@ export default {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
var digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
|
||||||
if (rules.ValueType === 2) {
|
if (rules.ValueType === 2) {
|
||||||
num = num * 100
|
num = num * 100
|
||||||
}
|
}
|
||||||
if (rules.CustomCalculateMark === 13 || rules.CustomCalculateMark === 14) {
|
if (rules.CustomCalculateMark === 13 || rules.CustomCalculateMark === 14) {
|
||||||
return num
|
return num
|
||||||
} else {
|
} else {
|
||||||
return num.toFixed(this.digitPlaces)
|
return num.toFixed(digitPlaces)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
formItemNumberChange(questionId, isTable) {
|
formItemNumberChange(questionId, isTable) {
|
||||||
|
|
Loading…
Reference in New Issue