窗口联动关闭

uat_us
wangxiaoshuang 2026-04-27 11:15:49 +08:00
parent b4fc5d970f
commit b2a9f279a1
3 changed files with 113 additions and 192 deletions

View File

@ -52,27 +52,21 @@
<GlobalReview v-else-if="isShow && readingCategory === 2" :trial-id="trialId" :subject-id="subjectId"
:visit-task-id="visitTaskId" :reading-category="readingCategory" :subject-code="subjectCode"
:task-blind-name="taskBlindName" :is-reading-show-subject-info="isReadingShowSubjectInfo"
:is-reading-show-previous-results="isReadingShowPreviousResults"
:is-exists-clinical-data="isExistsClinicalData"
:imageToolType="1"
/>
:is-reading-show-previous-results="isReadingShowPreviousResults" :is-exists-clinical-data="isExistsClinicalData"
:imageToolType="1" />
<!-- 裁判阅片 -->
<AdReview v-else-if="isShow && readingCategory === 4" :trial-id="trialId" :subject-id="subjectId"
:visit-task-id="visitTaskId" :reading-category="readingCategory" :subject-code="subjectCode"
:task-blind-name="taskBlindName" :is-reading-show-subject-info="isReadingShowSubjectInfo"
:is-reading-show-previous-results="isReadingShowPreviousResults"
:is-exists-clinical-data="isExistsClinicalData"
:imageToolType="1"
/>
:is-reading-show-previous-results="isReadingShowPreviousResults" :is-exists-clinical-data="isExistsClinicalData"
:imageToolType="1" />
<!-- 肿瘤学阅片 -->
<OncologyReview v-else-if="isShow && readingCategory === 5" :trial-id="trialId" :subject-id="subjectId"
:visit-task-id="visitTaskId" :reading-category="readingCategory" :subject-code="subjectCode"
:task-blind-name="taskBlindName" :is-reading-show-subject-info="isReadingShowSubjectInfo"
:is-reading-show-previous-results="isReadingShowPreviousResults"
:is-exists-clinical-data="isExistsClinicalData"
:imageToolType="1"
/>
:is-reading-show-previous-results="isReadingShowPreviousResults" :is-exists-clinical-data="isExistsClinicalData"
:imageToolType="1" />
<el-dialog :visible.sync="dialogVisible" :custom-class="isFullscreen ? 'full-dialog-container' : 'dialog-container'"
:show-close="false" :close-on-click-modal="false" :fullscreen="isFullscreen">
@ -291,6 +285,13 @@ export default {
store.dispatch('reading/resetVisitTasks')
this.getTaskInfo()
window.addEventListener('beforeunload', this.handleWindowClose)
window.addEventListener('storage', (event) => {
if (event.key === 'closePage') {
if (this.$router.currentRoute.query.pageType && this.$router.currentRoute.query.pageType === 'History') {
window.close()
}
}
});
},
beforeDestroy() {
DicomEvent.$off('getNextTask')

View File

@ -961,7 +961,7 @@ export default {
this.$router.currentRoute.query.isReadingTaskViewInOrder
var criterionType = this.$router.currentRoute.query.criterionType
var readingTool = this.$router.currentRoute.query.readingTool
var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}`
var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&pageType=History&TokenKey=${token}`
const routeData = this.$router.resolve({ path })
const res = await getAutoCutNextTask({imageToolType: 1})
let IsDoubleScreen = false

View File

@ -12,12 +12,7 @@
{{
$t('trials:readingReport:button:refresh') }}
</el-button>
<el-button
v-if="readingTaskState < 2"
type="primary"
size="small"
@click="handleSave(true)"
>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleSave(true)">
{{
$t('common:button:save') }}
</el-button>
@ -28,18 +23,9 @@
</div>
</div>
<div style="flex: 1">
<el-table
v-if="taskQuestions.length > 0"
ref="reportList"
v-adaptive="{ bottomOffset: 0 }"
:data="taskQuestions"
row-key="Id"
border
default-expand-all
height="100"
:tree-props="{ children: 'Childrens', hasChildren: 'hasChildren' }"
size="mini"
>
<el-table v-if="taskQuestions.length > 0" ref="reportList" v-adaptive="{ bottomOffset: 0 }"
:data="taskQuestions" row-key="Id" border default-expand-all height="100"
:tree-props="{ children: 'Childrens', hasChildren: 'hasChildren' }" size="mini">
<el-table-column prop label show-overflow-tooltip width="350px">
<template slot-scope="scope">
<span v-if="scope.row.QuestionName">
@ -47,9 +33,7 @@
scope.row.QuestionName }}
<svg-icon
v-if="scope.row.ShowChartTypeEnum > 0 || (scope.row.LesionType === 0 && scope.row.ReportLayType === 1)"
icon-class="readingChart"
class="svg-icon svg-readingChart-mini"
@click.stop="(e) => handleReadingChart({
icon-class="readingChart" class="svg-icon svg-readingChart-mini" @click.stop="(e) => handleReadingChart({
e,
data: {
QuestionId: scope.row.RowIndex ? null : scope.row.QuestionId,
@ -58,22 +42,13 @@
ReportChartTypeEnum: scope.row.LesionType === 0 && scope.row.ReportLayType === 1 ? 0 : null,
QuestionName: scope.row.QuestionName
}
})"
/>
})" />
</span>
<span
v-else
style="font-weight: bold;font-size: 16px;color: #f44336;"
>{{ scope.row.GroupName }}</span>
<span v-else style="font-weight: bold;font-size: 16px;color: #f44336;">{{ scope.row.GroupName }}</span>
</template>
</el-table-column>
<el-table-column
v-for="task in visitTaskList"
:key="task.VisitTaskId"
prop="date"
show-overflow-tooltip
width="200px"
>
<el-table-column v-for="task in visitTaskList" :key="task.VisitTaskId" prop="date" show-overflow-tooltip
width="200px">
<template slot="header">
<div v-if="task.IsCurrentTask">{{ task.BlindName }}</div>
<div v-else>
@ -87,48 +62,33 @@
</template>
<template slot-scope="scope">
<template
v-if="readingTaskState < 2 && task.VisitTaskId === visitTaskId && (scope.row.Type === 'input' || scope.row.Type === 'number' || scope.row.Type === 'select' || scope.row.Type === 'textarea' || scope.row.Type === 'radio')"
>
v-if="readingTaskState < 2 && task.VisitTaskId === visitTaskId && (scope.row.Type === 'input' || scope.row.Type === 'number' || scope.row.Type === 'select' || scope.row.Type === 'textarea' || scope.row.Type === 'radio')">
<!-- 输入框 -->
<div>
<template
v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
/>
v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<el-input
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
size="mini"
/>
size="mini" />
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea')"
>{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}</span>
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea')">{{
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}</span>
<el-input
v-else-if="(scope.row.Type === 'input' || scope.row.Type === 'textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId]"
size="mini"
/>
<span
v-else-if="scope.row.Type === 'input' || scope.row.Type === 'textarea'"
>{{ questionForm[scope.row.QuestionId] }}</span>
v-model="questionForm[scope.row.QuestionId]" size="mini" />
<span v-else-if="scope.row.Type === 'input' || scope.row.Type === 'textarea'">{{
questionForm[scope.row.QuestionId] }}</span>
<el-select
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'select' || scope.row.Type === 'radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
size="mini"
clearable
:multiple="scope.row.OptionTypeEnum === 1"
>
size="mini" clearable :multiple="scope.row.OptionTypeEnum === 1">
<template>
<el-option
v-for="val in scope.row.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
</template>
</el-select>
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && questionForm[scope.row.QuestionId][scope.row.xfIndex] && (scope.row.Type === 'select' || scope.row.Type === 'radio')"
>
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && questionForm[scope.row.QuestionId][scope.row.xfIndex] && (scope.row.Type === 'select' || scope.row.Type === 'radio')">
{{
Array.isArray(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])
?
@ -138,18 +98,10 @@
</span>
<el-select
v-else-if="(scope.row.Type === 'select' || scope.row.Type === 'radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId]"
size="mini"
clearable
:multiple="scope.row.OptionTypeEnum === 1"
>
v-model="questionForm[scope.row.QuestionId]" size="mini" clearable
:multiple="scope.row.OptionTypeEnum === 1">
<template>
<el-option
v-for="val in scope.row.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
</template>
</el-select>
<span v-else-if="scope.row.Type === 'select' || scope.row.Type === 'radio'">
@ -162,11 +114,9 @@
<el-input
v-else-if="scope.row.DataSource !== 1 && questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0) && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
:disabled="scope.row.DataSource === 1"
size="mini"
:disabled="scope.row.DataSource === 1" size="mini"
@blur="limitBlur(questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)"
@focus="() => { questionId = scope.row.QuestionId }"
>
@focus="() => { questionId = scope.row.QuestionId }">
<template v-if="scope.row.Unit !== 0" slot="append">
{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
scope.row.Unit) : scope.row.CustomUnit }}
@ -174,11 +124,8 @@
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
</el-input>
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0)"
>
<template
v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit"
>
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0)">
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
@ -205,12 +152,9 @@
</span>
<el-input
v-else-if="scope.row.DataSource !== 1 && scope.row.Type === 'number' && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId]"
:disabled="scope.row.DataSource === 1"
size="mini"
v-model="questionForm[scope.row.QuestionId]" :disabled="scope.row.DataSource === 1" size="mini"
@blur="limitBlur(questionForm, scope.row.QuestionId, scope.row.ValueType)"
@focus="() => { questionId = scope.row.QuestionId }"
>
@focus="() => { questionId = scope.row.QuestionId }">
<template v-if="scope.row.Unit !== 0" slot="append">
{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
scope.row.Unit) : scope.row.CustomUnit }}
@ -218,9 +162,7 @@
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
</el-input>
<span v-else-if="scope.row.Type === 'number'">
<template
v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit"
>
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4
?
@ -237,19 +179,11 @@
</span>
</div>
</template>
<template
v-else-if="scope.row.Type === 'upload' && scope.row.Answers[task.VisitTaskId]"
>
<span
v-for="(url, index) in scope.row.Answers[task.VisitTaskId].split('|')"
:key="url"
style="margin-left: 5px;"
>
<el-button
v-if="scope.row.Answers[task.VisitTaskId]"
type="text"
@click="preview(url)"
>{{ `${$t('trials:noneDicom:title:attachment')}${index + 1}` }}</el-button>
<template v-else-if="scope.row.Type === 'upload' && scope.row.Answers[task.VisitTaskId]">
<span v-for="(url, index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url"
style="margin-left: 5px;">
<el-button v-if="scope.row.Answers[task.VisitTaskId]" type="text" @click="preview(url)">{{
`${$t('trials:noneDicom:title:attachment')}${index + 1}` }}</el-button>
</span>
</template>
<template v-else-if="scope.row.DictionaryCode">
@ -265,11 +199,8 @@
}}
</template>
<template
v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
/>
<template
v-else-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit"
>
v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<template v-else-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
`${scope.row.Answers[task.VisitTaskId]}
@ -279,9 +210,8 @@
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ?
scope.row.Answers[task.VisitTaskId] : `${scope.row.Answers[task.VisitTaskId]} %` }}
</template>
<template
v-else-if="scope.row.Answers && scope.row.Answers.hasOwnProperty(task.VisitTaskId)"
>{{ scope.row.Answers[task.VisitTaskId] }}</template>
<template v-else-if="scope.row.Answers && scope.row.Answers.hasOwnProperty(task.VisitTaskId)">{{
scope.row.Answers[task.VisitTaskId] }}</template>
</template>
</el-table-column>
</el-table>
@ -289,30 +219,19 @@
</el-card>
<!-- 签名框 -->
<el-dialog
v-if="signVisible"
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
custom-class="base-dialog-wrapper"
>
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
custom-class="base-dialog-wrapper">
<div slot="title">
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
<span
style="font-size:12px;margin-left:5px"
>{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
</div>
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
</el-dialog>
<!-- 预览文件 -->
<viewer
ref="picture_perview_customizeReportPage"
style="margin: 0 10px"
<viewer ref="picture_perview_customizeReportPage" style="margin: 0 10px"
v-if="currentType && ['png', 'jpg', 'jpeg'].includes(currentType.toLowerCase())"
:images="[`${OSSclientConfig.basePath}${currentPath}`]"
:options="viewerOptions"
>
:images="[`${OSSclientConfig.basePath}${currentPath}`]" :options="viewerOptions">
<img v-show="false" :src="`${OSSclientConfig.basePath}${currentPath}`" alt="Image" />
</viewer>
<readingChart ref="readingChart_report" />
@ -1029,7 +948,7 @@ export default {
this.$router.currentRoute.query.isReadingTaskViewInOrder
var criterionType = this.$router.currentRoute.query.criterionType
var readingTool = this.$router.currentRoute.query.readingTool
var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}`
var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&pageType=History&TokenKey=${token}`
const routeData = this.$router.resolve({ path })
const res = await getAutoCutNextTask({ imageToolType: 1 })
let IsDoubleScreen = false
@ -1059,6 +978,7 @@ export default {
'noopener,noreferrer'
)
}
localStorage.setItem('closePage', Date.now());
},
handleSave(isPrompt) {
return new Promise((resolve, reject) => {