数据匿名更改

main
wangxiaoshuang 2026-05-06 14:38:26 +08:00
parent 1f20834dd3
commit 9ff7928b16
2 changed files with 31 additions and 11 deletions

View File

@ -304,7 +304,7 @@ export default {
cornerstoneTools.addToolForElement(element, Note_RectangleRoiTool, {
configuration: {
color: '#f00',
lineWidth: 0.5,
lineWidth: 2,
drawHandles: false,
fillColor: 'rgba(0, 0, 0, 1)',
},

View File

@ -9,10 +9,10 @@
<div class="Anonymous" v-if="isAnonymous">
<div
:class="{ btn: true, activeBtn: activeTool === 'Note_RectangleRoi' && !isComparison, isNoted: isComparison }"
@click="setToolActive($event, 'Note_RectangleRoi')">{{
@click="setToolActive($event, 'Note_RectangleRoi', true)">{{
$t('DicomViewer:anonymous:Note_RectangleRoi') }}</div>
<div :class="{ btn: true, activeBtn: activeTool === 'Eraser' && !isComparison, isNoted: isComparison }"
@click="setToolActive($event, 'Eraser')">{{
@click="setToolActive($event, 'Eraser', true)">{{
$t('DicomViewer:anonymous:Eraser') }}
</div>
<div :class="{ btn: true, isNoted: isComparison }" @click="anonymousImage(false)">{{
@ -299,7 +299,8 @@
v-if="type === 'Study' && modality && ['PT、CT', 'CT、PT', 'PET-CT'].includes(modality)">
<div class="sideTool-title">{{ $t('trials:tab:patientData') }}</div>
<div class="sideTool-wrapper">
<el-form ref="patientForm" size="mini" :model="formData" :rules="rules" label-width="150" v-loading="formLoading">
<el-form ref="patientForm" size="mini" :model="formData" :rules="rules" label-width="150"
v-loading="formLoading">
<!-- 性别 -->
<el-form-item :label="$t('trials:ptData:label:patientSex')" prop="PatientSex">
<el-select v-model="formData.PatientSex" :placeholder="$t('common:ruleMessage:select')"
@ -401,10 +402,10 @@ export default {
handler(v) {
if (v) {
if (this.type === 'Study' && ['PT、CT', 'CT、PT', 'PET-CT'].includes(v)) {
this.$nextTick(()=>{
this.$nextTick(() => {
this.getPatientInfo()
})
}
}
}
}
}
@ -641,7 +642,7 @@ export default {
})
})
let res = await this.studyMaskImage(data)
if (!res) return false
if (!res || res.length <= 0) return false
this.$emit("update:loading", true)
if (!isAll) {
let strs = image.imageId.split("?")
@ -839,8 +840,25 @@ export default {
}
})
},
setToolActive(e, toolName) {
setToolActive(e, toolName, isNotSetClassName = false) {
const elements = document.querySelectorAll('.dicom-item')
if (isNotSetClassName) {
const scope = this
if (scope.activeTool) {
Array.from(elements).forEach((element, index) => {
if (element.style.display !== 'none') {
scope.$refs[`dicomCanvas${index}`].setToolPassive(scope.activeTool)
}
})
}
if (scope.activeTool === toolName) return scope.activeTool = null
scope.activeTool = toolName
return Array.from(elements).forEach((element, index) => {
if (element.style.display !== 'none') {
scope.$refs[`dicomCanvas${index}`].setToolActive(toolName)
}
})
}
if (e.currentTarget.classList.contains('activeTool')) {
e.currentTarget.classList.remove('activeTool')
const scope = this
@ -1020,7 +1038,7 @@ export default {
try {
this.formLoading = true
let studyId = this.$route.query.studyId
let res = await getPatientInfo({studyId: studyId})
let res = await getPatientInfo({ studyId: studyId })
this.formData = {
Id: res.Result.Id || '',
PatientSex: res.Result.PatientSex || '',
@ -1035,7 +1053,7 @@ export default {
// PT 2D SUV 使/
this.cachePtClinicalDataToInstances()
this.formLoading = false
} catch(e) {
} catch (e) {
this.formLoading = false
console.log(e)
}
@ -1161,6 +1179,7 @@ export default {
cursor: pointer;
padding: 5px 10px;
border: 1px solid rgba(255, 255, 255, .7);
color: #000;
&:hover {
background-color: rgba(255, 255, 255, .5);
@ -1168,7 +1187,8 @@ export default {
}
.activeBtn {
background-color: rgba(255, 255, 255, .5);
background-color: #16477b90;
color: #fff;
}
.isNoted {