From cd224161bb0e7397ffcf1ba1983b0c8879e5d9c1 Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Fri, 22 Aug 2025 14:50:20 +0800
Subject: [PATCH] =?UTF-8?q?=E9=98=85=E7=89=87=E5=88=86=E5=B1=8F=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/splitScreen.js | 78 ++++
.../reading/dicoms/components/ReportPage.vue | 8 +-
.../dicoms/customize/CustomizeReportPage.vue | 365 +++++++++---------
.../reading-task/components/TaskList.vue | 143 ++-----
4 files changed, 297 insertions(+), 297 deletions(-)
create mode 100644 src/utils/splitScreen.js
diff --git a/src/utils/splitScreen.js b/src/utils/splitScreen.js
new file mode 100644
index 0000000..7dfbce2
--- /dev/null
+++ b/src/utils/splitScreen.js
@@ -0,0 +1,78 @@
+async function queryWindowManagement() {
+ return await navigator.permissions.query({ name: 'window-management' });;
+}
+async function getPermission() {
+ const permission = await queryWindowManagement();
+ if (permission.state === "granted") { // 已经授权
+ return true
+ } else if (permission.state === "prompt") { // 询问是否授权
+ // 请求授权
+ navigator.permissions.request({ name: 'window-management' })
+ return false
+ } else if (permission.state === "denied") {
+ // 权限被拒绝
+ return false
+ }
+}
+function getScreen() {
+ return new Promise((resolve, reject) => {
+ let multiScreen = []
+ if (window.getScreenDetails) {
+ let getScreensProsime1 = window.getScreenDetails();
+ getScreensProsime1.then((c) => {
+ if (c instanceof Array) {
+ multiScreen = c
+ } else if (c instanceof Object) {
+ multiScreen = c.screens
+ } else {
+ multiScreen = []
+ }
+ resolve(multiScreen)
+ }).catch((err) => {
+ reject(err)
+ });
+ } else if (window.getScreens) {
+ let getScreensProsime = window.getScreens();
+ getScreensProsime.then((c) => {
+ if (c instanceof Array) {
+ multiScreen = c
+ } else if (c instanceof Object) {
+ multiScreen = c.screens
+ } else {
+ multiScreen = []
+ }
+ resolve(multiScreen)
+ }).catch((err) => {
+ reject(err)
+ })
+ }
+ })
+
+}
+export async function openWindow(url, name) {
+ // 判断浏览器是否兼容
+ // 高版本的谷歌,edge不支持跨屏,需要降低浏览器版本86.0版
+ if (!window.getScreens && !window.getScreenDetails) {
+ console.log('你的浏览器版本不支持多屏展示功能!');
+ return window.open(url, name);
+ }
+ let permission = await getPermission()
+ if (!permission) {
+ alert('使用多屏功能请先进行授权')
+ return false
+ }
+ let multiScreen = await getScreen()
+ // 判断是否2个屏幕
+ if (multiScreen.length < 2) {
+ console.log('请接入多个显示屏!');
+ return window.open(url, name);
+ }
+ // 获取当前屏幕availLeft信息和所有信息比对,取另一个屏幕数据
+ let currentAvailLeft = screen.availLeft ? screen.availLeft : '0'
+ let newCurr = multiScreen.find((t) => t.availLeft !== currentAvailLeft)
+ let fulls = ''
+ for (let key in newCurr) {
+ fulls += `${key}=${(newCurr[key] || newCurr[key] === 0) ? newCurr[key] : 0},`
+ }
+ return window.open(url, name, fulls);
+}
\ No newline at end of file
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue b/src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue
index 6d53e64..7d57b4e 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue
@@ -220,6 +220,7 @@ import { changeURLStatic } from '@/utils/history.js'
import AdditionalAssessment from './AdditionalAssessment'
import { showReadReport, showTumorReport } from "@/api/export";
import PreviewFileDialog from "@/components/PreviewFileDialog/PreviewFileDialog";
+import { openWindow } from "@/utils/splitScreen";
export default {
name: 'ReportPage',
components: { SignForm, AdditionalAssessment, PreviewFileDialog },
@@ -701,7 +702,7 @@ export default {
}
}
},
- previewDicoms(task) {
+ async previewDicoms(task) {
if (this.openWindow) {
this.openWindow.close()
}
@@ -716,7 +717,10 @@ export default {
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}`
const routeData = this.$router.resolve({ path })
- this.openWindow = window.open(routeData.href, '_blank')
+ this.openWindow = await openWindow(routeData.href)
+ // if (this.openWindow) {
+ // this.$setOpenWindow(this.openWindow);
+ // }
},
handleSave(isPrompt) {
return new Promise(async (resolve, reject) => {
diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPage.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPage.vue
index 3f320e2..6a3c089 100644
--- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPage.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPage.vue
@@ -4,63 +4,36 @@
-
-
+
+
- {{ scope.row.BlindName ? scope.row.QuestionName : scope.row.QuestionName }}
-
+ {{ scope.row.BlindName ? scope.row.QuestionName :
+ scope.row.QuestionName }}
+
{{ scope.row.GroupName }}
-
+
{{ task.BlindName }}
@@ -72,181 +45,179 @@
-
-
-
+
+
+
-
+
-
+
-
- {{questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}}
+ size="mini" />
+
+ {{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
-
- {{questionForm[scope.row.QuestionId]}}
+ 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" />
+
+ {{ questionForm[scope.row.QuestionId] }}
+ size="mini" clearable>
-
+
-
- {{questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}}
+
+ {{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
+ 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>
-
+
-
- {{questionForm[scope.row.QuestionId]}}
+
+ {{ questionForm[scope.row.QuestionId] }}
-
- {{questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}}
+
+ {{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
-
- {{questionForm[scope.row.QuestionId]}}
+
+ {{ questionForm[scope.row.QuestionId] }}
{questionId = scope.row.QuestionId}"
- >
- {{scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}}
+ size="mini" @focus="() => { questionId = scope.row.QuestionId }">
+ {{ scope.row.Unit !== 4 ? $fd('ValueUnit',
+ scope.row.Unit) : scope.row.CustomUnit }}
%
-
+
- {{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
+ {{
+ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
+ ?
+ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
+ `${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}
+ ${scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
- {{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])) ? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]} %` }}
+ {{
+ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
+ ?
+ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
+ `${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}
+ %` }}
- {{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])) ? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}` }}
+ {{
+ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
+ ?
+ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
+ `${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}`
+ }}
{questionId = scope.row.QuestionId}"
- >
- {{scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}}
+ @input="limitInput($event, questionForm, scope.row.QuestionId)" size="mini"
+ @focus="() => { questionId = scope.row.QuestionId }">
+ {{ scope.row.Unit !== 4 ? $fd('ValueUnit',
+ scope.row.Unit) : scope.row.CustomUnit }}
%
-
+
- {{ isNaN(parseInt(questionForm[scope.row.QuestionId]))? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
+ {{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
+ questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} ${scope.row.Unit !==
+ 4
+ ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
- {{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} %` }}
+ {{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
+ questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} %` }}
- {{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] : questionForm[scope.row.QuestionId]}}
+ {{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] :
+ questionForm[scope.row.QuestionId] }}
- {setImageUrl(scope.row.QuestionId, scope.row.xfIndex, scope.row.TableQuestionId, url, scope.row.RowId)}"
- >
- {setImageUrl(scope.row.QuestionId, scope.row.xfIndex, scope.row.TableQuestionId, url)}"
- >
+ { setImageUrl(scope.row.QuestionId, scope.row.xfIndex, scope.row.TableQuestionId, url, scope.row.RowId) }">
+
+ { setImageUrl(scope.row.QuestionId, scope.row.xfIndex, scope.row.TableQuestionId, url) }">
+
-
+ v-if="scope.row.Type === 'upload' && (scope.row.xfIndex || scope.row.xfIndex === 0)"
+ :visitTaskId="visitTaskId" :question="scope.row" :task="task" :readingTaskState="readingTaskState"
+ :initUrl="scope.row.Answers[task.VisitTaskId]">
+
-
+
{{ scope.row.Answers[task.VisitTaskId] === '-1' ? '未知' : scope.row.Answers[task.VisitTaskId] }}
{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}
- {{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]}` }}
+ {{
+ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
+ `${scope.row.Answers[task.VisitTaskId]}`
+ }}
-
+
- {{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
+ {{
+ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
+ `${scope.row.Answers[task.VisitTaskId]}
+ ${scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
- {{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]} %` }}
+ {{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ?
+ scope.row.Answers[task.VisitTaskId] : `${scope.row.Answers[task.VisitTaskId]} %` }}
{{ scope.row.Answers[task.VisitTaskId] }}
@@ -258,16 +229,11 @@
-
+
{{ $t('common:dialogTitle:sign') }}
- {{ `(${$t('common:label:sign')}${ currentUser })` }}
+ {{ `(${$t('common:label:sign')}${currentUser})` }}
@@ -282,6 +248,7 @@ import const_ from '@/const/sign-code'
import SignForm from '@/views/trials/components/newSignForm'
import { getToken } from '@/utils/auth'
import store from '@/store'
+import { openWindow } from "@/utils/splitScreen";
export default {
name: 'CustomizeReportPage',
components: { SignForm, CustomizeReportPageUpload },
@@ -314,7 +281,8 @@ export default {
TrialReadingCriterionId: null,
tableAnswers: {},
questionForm: {},
- questionId: null
+ questionId: null,
+ openWindow: null
}
},
watch: {
@@ -378,7 +346,7 @@ export default {
list.forEach(v => {
if (v.QuestionId === questionId) {
return Object.assign({}, v.Answers)
- } else if (v.Childrens.length > 0){
+ } else if (v.Childrens.length > 0) {
return this.getTagterAnswers(v.Childrens, questionId)
}
})
@@ -451,7 +419,7 @@ export default {
},
setChild(obj) {
obj.forEach((i, index) => {
- if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
+ if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId])
}
if (i.Type === 'table' || i.Type === 'basicTable') {
@@ -461,7 +429,7 @@ export default {
if (i.Type === 'number') {
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : i.Answers[this.visitTaskId])
}
- if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table' && i.Type !== 'basicTable') {
+ if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table' && i.Type !== 'basicTable') {
this.setChild(i.Childrens)
}
})
@@ -585,12 +553,12 @@ export default {
setScrollTop(a) {
setTimeout(() => {
this.$nextTick(() => {
- if(this.$refs.reportList){
+ if (this.$refs.reportList) {
this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight
this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight
}
})
- },50)
+ }, 50)
},
getQuestions(questions, isNTFilterLength, lesionType, isLymphNodes) {
const arr = []
@@ -789,7 +757,10 @@ export default {
}
})
},
- previewDicoms(task) {
+ async previewDicoms(task) {
+ if (this.openWindow) {
+ this.openWindow.close()
+ }
var token = getToken()
// var subjectCode = this.$router.currentRoute.query.subjectCode
var subjectCode = localStorage.getItem('subjectCode')
@@ -801,7 +772,7 @@ export default {
var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}`
const routeData = this.$router.resolve({ path })
- window.open(routeData.href, '_blank')
+ this.openWindow = await openWindow(routeData.href)
},
handleSave(isPrompt) {
return new Promise((resolve, reject) => {
@@ -817,7 +788,7 @@ export default {
questionId: k,
answer: v[o],
tableQuestionId: o,
- rowId: v[o+'_RowId']
+ rowId: v[o + '_RowId']
})
}
})
@@ -871,27 +842,32 @@ export default {
}