PCWG3修改
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-09-09 11:27:25 +08:00
parent 4b03a52768
commit df477c6988
2 changed files with 125 additions and 13 deletions

View File

@ -2794,7 +2794,13 @@ export function changeDicomReadingQuestionAnswer(param) {
data: param
})
}
export function changeReportAnswer(param) {
return request({
url: `/ReadingImageTask/changeReportAnswer`,
method: 'post',
data: param
})
}
export function saveImageQuality(param) {
return request({
url: `/ReadingImageTask/saveImageQuality`,

View File

@ -20,8 +20,8 @@
<!-- 刷新 -->
{{ $t('trials:readingReport:button:refresh') }}
</el-button>
<el-button :loading="reportBtnLoading" v-if="readingTaskState >= 2" type="primary"
size="small" @click="showReport('evaluate')">{{ $t('trials:dicoms:button:evaluationReport') }}</el-button>
<el-button :loading="reportBtnLoading" v-if="readingTaskState >= 2" type="primary" size="small"
@click="showReport('evaluate')">{{ $t('trials:dicoms:button:evaluationReport') }}</el-button>
<el-button :loading="reportBtnLoading" v-if="readingTaskState >= 2 && CriterionType !== 10" type="primary"
size="small" @click="showReport('tumor')">{{ $t('trials:dicoms:button:tumorReport') }}</el-button>
<el-button v-if="readingTaskState < 2 && CriterionType !== 10" type="primary" size="small"
@ -48,8 +48,8 @@
</span>
</template>
</el-table-column>
<el-table-column v-for="task in visitTaskList" :key="task.VisitTaskId" prop="date" show-overflow-tooltip
width="150px">
<el-table-column v-for="(task, index) in visitTaskList" :key="task.VisitTaskId" prop="date"
show-overflow-tooltip width="150px">
<template slot="header">
<div v-if="task.IsCurrentTask">
<div>
@ -69,7 +69,46 @@
<span
:style="{ color: ((scope.row.isLymphNodes === 1 && scope.row.QuestionMark === 1) || (scope.row.isLymphNodes === 0 && scope.row.QuestionMark === 0)) && (scope.row.LesionType === 0 || scope.row.LesionType === 5) || (scope.row.QuestionMark === 12) || scope.row.HighlightAnswerList.includes(`${scope.row.Answers[task.VisitTaskId]}`) ? '#f66' : '#fff' }">
<template
v-if="task.VisitTaskId === visitTaskId && readingTaskState < 2 && [13, 14, 15, 42].includes(scope.row.QuestionType)">
v-if="CriterionType === 10 && readingTaskState < 2 && [21, 14].includes(scope.row.QuestionType)">
<!-- 访视点肿瘤评估基线时不可修改 -->
<template v-if="index > 0 && CriterionType === 10 && scope.row.QuestionType === 21">
<el-select v-if="scope.row.Type === 'calculation' && scope.row.DictionaryCode"
v-model="tumorEvaluationObj[task.VisitTaskId]" size="mini"
@change="(val) => handleTumorEvaluationChange(val, task.VisitTaskId)">
<el-option v-for="item of $d[scope.row.DictionaryCode]" :key="item.id" :value="item.value"
:label="item.label" />
</el-select>
</template>
<template v-else-if="index === 0 && CriterionType === 10 && scope.row.QuestionType === 21">
{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}
</template>
<template v-else-if="CriterionType === 10 && scope.row.QuestionType === 14">
<!-- v-if="tumorEvaluate && (currentEvaluateResult !== tumorEvaluate || currentExistDisease !== isExistDisease)" -->
<template>
<!-- 输入框 -->
<el-input v-if="scope.row.Type === 'input'" v-model="taskReasonObj[task.VisitTaskId]" size="mini"
@change="(val) => evaluateReasonObjChange(val, task.VisitTaskId)" />
<el-input v-else-if="scope.row.Type === 'textarea'" v-model="taskReasonObj[task.VisitTaskId]"
:autosize="{ minRows: 2, maxRows: 4 }" size="mini" maxlength="500"
@change="(val) => evaluateReasonObjChange(val, task.VisitTaskId)" />
<!-- 系统评估结果为xxx,与当前调整的结果不一致请填写调整原因 -->
<p v-if="tumorEvaluationObj[task.VisitTaskId] !== currentTumorEvaluationObj[task.VisitTaskId]"
style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;"
v-html="getWarningText(task.VisitTaskId)" />
<!-- <p v-else-if="currentExistDisease !== isExistDisease"
style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;">
{{ $t('trials:readingReport:title:sysEvaluationRes') }}<span style="color:red">{{
$fd('ExistDisease', isExistDisease) }}</span>{{ $t('trials:readingReport:message:msg1') }}
</p> -->
</template>
<!-- <template v-else>
<span>{{ currentTaskReason }}</span>
</template> -->
</template>
</template>
<template
v-else-if="task.VisitTaskId === visitTaskId && readingTaskState < 2 && [13, 14, 15, 42].includes(scope.row.QuestionType)">
<!-- 是否存在疾病基线时可修改 -->
<template v-if="task.IsBaseLine && scope.row.QuestionType === 15">
<el-select v-if="scope.row.Type === 'select' && scope.row.DictionaryCode"
@ -221,7 +260,7 @@
</el-form-item>
<!-- 名称 -->
<el-form-item :label="$t('trials:reading:label:TNMValue')" prop="TemplateName">
<el-input v-model="TnmForm.TNMValue" :disabled="readingTaskState >= 2"/>
<el-input v-model="TnmForm.TNMValue" :disabled="readingTaskState >= 2" />
</el-form-item>
<el-form-item style="text-align:right;" v-if="readingTaskState < 2">
<!-- Cancel -->
@ -238,7 +277,7 @@
</div>
</template>
<script>
import { getReadingReportEvaluation, changeDicomReadingQuestionAnswer, submitDicomVisitTask, verifyVisitTaskQuestions, getTaskAdditionalQuestion } from '@/api/trials'
import { getReadingReportEvaluation, changeDicomReadingQuestionAnswer, changeReportAnswer, submitDicomVisitTask, verifyVisitTaskQuestions, getTaskAdditionalQuestion } from '@/api/trials'
import { setSkipReadingCache, setTNMValue, getTNMValue } from '@/api/reading'
import { getAutoCutNextTask } from '@/api/user'
import DicomEvent from './DicomEvent'
@ -282,6 +321,9 @@ export default {
isExistDisease: null,
currentExistDisease: null,
currentTaskReason: '',
taskReasonObj: {},
tumorEvaluationObj: {},
currentTumorEvaluationObj: {},
answerArr: [],
questions: [],
isShowDetail: false,
@ -610,6 +652,19 @@ export default {
} else {
obj.Answers[i.VisitTaskId] = i.Answer
}
if (item.QuestionType === 14) {
this.$set(this.taskReasonObj, i.VisitTaskId, obj.Answers[i.VisitTaskId])
if (this.CriterionType === 10) {
this.answerArr.push({ id: item.QuestionId, answer: obj.Answers[i.VisitTaskId], questionType: 14, visitTaskId: i.VisitTaskId })
}
}
if (item.QuestionType === 21) {
this.$set(this.tumorEvaluationObj, i.VisitTaskId, obj.Answers[i.VisitTaskId])
this.$set(this.currentTumorEvaluationObj, i.VisitTaskId, obj.Answers[i.VisitTaskId])
if (this.CriterionType === 10) {
this.answerArr.push({ id: item.QuestionId, answer: obj.Answers[i.VisitTaskId], questionType: 21, visitTaskId: i.VisitTaskId })
}
}
})
if (item.QuestionType === 15) {
this.currentExistDisease = obj.Answers[this.visitTaskId]
@ -621,7 +676,9 @@ export default {
}
if (item.QuestionType === 14) {
this.currentTaskReason = obj.Answers[this.visitTaskId]
this.answerArr.push({ id: item.QuestionId, answer: obj.Answers[this.visitTaskId], questionType: 14 })
if (this.CriterionType !== 10) {
this.answerArr.push({ id: item.QuestionId, answer: obj.Answers[this.visitTaskId], questionType: 14 })
}
}
if (item.Childrens.length >= 1) {
obj.Childrens = this.getQuestions(item.Childrens, isNTFilterLength, lesionType, isLymphNodes)
@ -649,6 +706,14 @@ export default {
this.answerArr[idx].answer = val
}
},
handleTumorEvaluationChange(val, visitTaskId) {
this.taskReasonObj[visitTaskId] = ''
this.evaluateReasonObjChange('', visitTaskId)
var idx = this.answerArr.findIndex(i => i.questionType === 21 && i.visitTaskId === visitTaskId)
if (idx > -1) {
this.answerArr[idx].answer = val
}
},
handleEvaluateResultChange(val) {
// this.currentEvaluateResult = parseInt(val)
if (val === this.tumorEvaluate && this.isExistDisease === this.currentExistDisease) {
@ -670,6 +735,12 @@ export default {
this.answerArr[idx].answer = val
}
},
evaluateReasonObjChange(val, visitTaskId) {
var idx = this.answerArr.findIndex(i => i.questionType === 14 && i.visitTaskId === visitTaskId)
if (idx > -1) {
this.answerArr[idx].answer = val
}
},
async handleConfirm() {
this.loading = true
try {
@ -827,6 +898,7 @@ export default {
var evaluateAjustReason = ''
this.answers = []
var isExistEvaluateResult = false
let isRequired = false
this.answerArr.map(item => {
if (item.questionType === 13 || item.questionType === 42) {
evaluateResult = item.answer
@ -838,8 +910,42 @@ export default {
if (item.questionType === 15) {
isBeill = item.answer
}
this.answers.push({ id: item.id, answer: item.answer })
if (this.CriterionType === 10) {
if (this.tumorEvaluationObj[item.visitTaskId] !== this.currentTumorEvaluationObj[item.visitTaskId] && !this.taskReasonObj[item.visitTaskId]) isRequired = true
this.answers.push({ questionId: item.id, answer: item.answer, visitTaskId: item.visitTaskId })
} else {
this.answers.push({ id: item.id, answer: item.answer })
}
})
if (this.CriterionType === 10) {
if (isRequired) {
//
this.$confirm(this.$t('trials:readingReport:message:msg2'), {
type: 'warning',
showCancelButton: false,
callback: action => { }
})
reject()
return
}
this.loading = true
try {
var params = {
answerlist: this.answers
}
const res = await changeReportAnswer(params)
if (res.IsSuccess && isPrompt) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
this.loading = false
resolve()
} catch (e) {
this.loading = false
reject()
}
return false
}
console.log(this.currentExistDisease, this.isExistDisease, evaluateAjustReason, isBeill)
if (this.currentExistDisease !== this.isExistDisease && !evaluateAjustReason) {
this.$confirm(this.$t('trials:readingReport:message:msg2'), {
@ -888,15 +994,15 @@ export default {
}
})
},
getWarningText() {
getWarningText(visitTaskId) {
var sysRes = ''
var curRes = ''
if (this.CriterionType === 2) {
sysRes = this.$fd('ImagingOverallAssessment_Lugano', this.tumorEvaluate)
curRes = this.$fd('ImagingOverallAssessment_Lugano', this.currentEvaluateResult)
} else {
sysRes = this.$fd('OverallAssessment', this.tumorEvaluate)
curRes = this.$fd('OverallAssessment', this.currentEvaluateResult)
sysRes = this.$fd('OverallAssessment', visitTaskId ? this.tumorEvaluationObj[visitTaskId] : this.tumorEvaluate)
curRes = this.$fd('OverallAssessment', visitTaskId ? this.currentTumorEvaluationObj[visitTaskId] : this.currentEvaluateResult)
}
if (!curRes) {
return ''