影像阅片时,支持双屏、竖屏
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-11-05 14:21:23 +08:00
parent 0002bd0165
commit 5f89d7d10c
10 changed files with 521 additions and 530 deletions

BIN
public/screen.pdf Normal file

Binary file not shown.

88
src/utils/splitScreen.js Normal file
View File

@ -0,0 +1,88 @@
async function queryWindowManagement() {
return await navigator.permissions.query({ name: 'window-management' });;
}
async function getPermission() {
const permission = await queryWindowManagement();
console.log(permission.state, 'permission.state')
if (permission.state === "granted") { // 已经授权
return true
} else if (permission.state === "prompt") { // 询问是否授权
// 请求授权
if (navigator.permissions.request) {
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, Skip = false) {
// 判断浏览器是否兼容
// 高版本的谷歌edge不支持跨屏需要降低浏览器版本86.0版
if (!window.getScreens && !window.getScreenDetails) {
console.log('你的浏览器版本不支持多屏展示功能!');
return window.open(url, name);
}
let permission = await getPermission()
if (!permission) {
// alert('使用多屏功能请先进行授权')
if (Skip) {
return window.open(url, name);
}
return false
}
let multiScreen = await getScreen()
console.log(multiScreen, 'multiScreen')
// 判断是否2个屏幕
if (multiScreen.length < 2) {
console.log('请接入多个显示屏!');
return window.open(url, name);
}
console.log(screen, 'screen')
// 获取当前屏幕availLeft信息和所有信息比对取另一个屏幕数据
let currentAvailLeft = screen.availLeft ? screen.availLeft : '0'
let newCurr = multiScreen.find((t) => t.availLeft != currentAvailLeft)
console.log(newCurr, 'newCurr')
let fulls = ''
for (let key in newCurr) {
fulls += `${key}=${(newCurr[key] || newCurr[key] === 0) ? newCurr[key] : 0},`
}
console.log(fulls, 'fulls')
return window.open(url, name, fulls);
}

View File

@ -3,15 +3,22 @@
<div class="base-dialog-body" style="height:380px;overflow-y: auto;"> <div class="base-dialog-body" style="height:380px;overflow-y: auto;">
<el-form ref="otherForm" :model="form"> <el-form ref="otherForm" :model="form">
<!-- 自动切换下一个任务不必提示 --> <!-- 自动切换下一个任务不必提示 -->
<el-form-item <el-form-item :label="$t('trials:reading:label:autoSwitch')" prop="AutoCutNextTask" :rules="[
:label="$t('trials:reading:label:autoSwitch')" { required: true, message: $t('common:ruleMessage:select') }
prop="AutoCutNextTask" ]">
:rules="[
{ required: true, message: $t('common:ruleMessage:select')}
]"
>
<el-switch v-model="form.AutoCutNextTask" /> <el-switch v-model="form.AutoCutNextTask" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('trials:reading:label:MultiScreen')" prop="IsDoubleScreen" :rules="[
{ required: true, message: $t('common:ruleMessage:select') }
]">
<el-switch v-model="form.IsDoubleScreen" />
</el-form-item>
<el-form-item>
<div><span>{{ $t("trials:reading:tip:MultiScreen") }}</span><a style="color:#409EFF" href="/screen.pdf"
target="blank">{{
$t("trials:reading:tip:openFile")
}}</a></div>
</el-form-item>
</el-form> </el-form>
</div> </div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;"> <div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
@ -27,7 +34,8 @@ export default {
data() { data() {
return { return {
form: { form: {
AutoCutNextTask: false AutoCutNextTask: false,
IsDoubleScreen: false
}, },
loading: false loading: false
} }
@ -42,6 +50,7 @@ export default {
const res = await getAutoCutNextTask() const res = await getAutoCutNextTask()
if (res.IsSuccess) { if (res.IsSuccess) {
this.form.AutoCutNextTask = res.Result.AutoCutNextTask this.form.AutoCutNextTask = res.Result.AutoCutNextTask
this.form.IsDoubleScreen = res.Result.IsDoubleScreen
} }
this.loading = false this.loading = false
} catch (e) { } catch (e) {
@ -66,6 +75,4 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss"></style>
</style>

View File

@ -220,6 +220,7 @@ import store from '@/store'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { changeURLStatic } from '@/utils/history.js' import { changeURLStatic } from '@/utils/history.js'
import AdditionalAssessment from './AdditionalAssessment' import AdditionalAssessment from './AdditionalAssessment'
import { openWindow } from "@/utils/splitScreen";
export default { export default {
name: 'ReportPage', name: 'ReportPage',
components: { SignForm, AdditionalAssessment }, components: { SignForm, AdditionalAssessment },
@ -726,7 +727,7 @@ export default {
} }
} }
}, },
previewDicoms(task) { async previewDicoms(task) {
if (this.openWindow) { if (this.openWindow) {
this.openWindow.close() this.openWindow.close()
} }
@ -741,7 +742,25 @@ export default {
var readingTool = this.$router.currentRoute.query.readingTool 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}&TokenKey=${token}`
const routeData = this.$router.resolve({ path }) const routeData = this.$router.resolve({ path })
this.openWindow = window.open(routeData.href, '_blank') const res = await getAutoCutNextTask()
let IsDoubleScreen = false
if (res.IsSuccess) {
IsDoubleScreen = res.Result.IsDoubleScreen
}
if (IsDoubleScreen) {
this.openWindow = await openWindow(routeData.href)
if (!this.openWindow) {
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
href="/screen.pdf"
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
if (!confirm) return false
this.openWindow = await openWindow(routeData.href, '', true)
}
} else {
this.openWindow = window.open(routeData.href, "_blank");
}
// this.openWindow = window.open(routeData.href, '_blank')
}, },
handleSave(isPrompt) { handleSave(isPrompt) {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {

View File

@ -280,7 +280,8 @@ export default {
tableAnswers: {}, tableAnswers: {},
questionForm: {}, questionForm: {},
questionId: null, questionId: null,
digitPlaces: 2 digitPlaces: 2,
openWindow: null
} }
}, },
watch: { watch: {
@ -408,7 +409,7 @@ export default {
} }
if (v.Type === 'number') { if (v.Type === 'number') {
// this.$set(this.questionForm, v.QuestionId, v.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : v.Answers[this.visitTaskId]) // this.$set(this.questionForm, v.QuestionId, v.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : v.Answers[this.visitTaskId])
this.$set(this.questionForm, v.QuestionId, v.Answers[this.visitTaskId]) this.$set(this.questionForm, v.QuestionId, v.Answers[this.visitTaskId])
} }
if (v.Childrens.length > 0) { if (v.Childrens.length > 0) {
this.setChild(v.Childrens) this.setChild(v.Childrens)
@ -427,7 +428,7 @@ export default {
} }
if (i.Type === 'number') { if (i.Type === 'number') {
// this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : i.Answers[this.visitTaskId]) // this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : i.Answers[this.visitTaskId])
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId]) this.$set(this.questionForm, i.QuestionId, 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) this.setChild(i.Childrens)
@ -826,7 +827,10 @@ export default {
} }
} }
}, },
previewDicoms(task) { async previewDicoms(task) {
if (this.openWindow) {
this.openWindow.close()
}
var token = getToken() var token = getToken()
// var subjectCode = this.$router.currentRoute.query.subjectCode // var subjectCode = this.$router.currentRoute.query.subjectCode
var subjectCode = localStorage.getItem('subjectCode') var subjectCode = localStorage.getItem('subjectCode')
@ -838,7 +842,25 @@ export default {
var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId 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}` 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 }) const routeData = this.$router.resolve({ path })
window.open(routeData.href, '_blank') const res = await getAutoCutNextTask()
let IsDoubleScreen = false
if (res.IsSuccess) {
IsDoubleScreen = res.Result.IsDoubleScreen
}
if (IsDoubleScreen) {
this.openWindow = await openWindow(routeData.href)
if (!this.openWindow) {
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
href="/screen.pdf"
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
if (!confirm) return false
this.openWindow = await openWindow(routeData.href, '', true)
}
} else {
this.openWindow = window.open(routeData.href, "_blank");
}
// window.open(routeData.href, '_blank')
}, },
handleSave(isPrompt) { handleSave(isPrompt) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

View File

@ -218,6 +218,7 @@ import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { changeURLStatic } from '@/utils/history.js' import { changeURLStatic } from '@/utils/history.js'
import AdditionalAssessment from '@/views/trials/trials-panel/reading/dicoms/components/AdditionalAssessment' import AdditionalAssessment from '@/views/trials/trials-panel/reading/dicoms/components/AdditionalAssessment'
import { openWindow } from "@/utils/splitScreen";
export default { export default {
name: 'ReportPage', name: 'ReportPage',
components: { SignForm, AdditionalAssessment }, components: { SignForm, AdditionalAssessment },
@ -673,7 +674,7 @@ export default {
} }
} }
}, },
previewDicoms(task) { async previewDicoms(task) {
if (this.openWindow) { if (this.openWindow) {
this.openWindow.close() this.openWindow.close()
} }
@ -688,7 +689,25 @@ export default {
var readingTool = this.$router.currentRoute.query.readingTool 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}&TokenKey=${token}`
const routeData = this.$router.resolve({ path }) const routeData = this.$router.resolve({ path })
this.openWindow = window.open(routeData.href, '_blank') const res = await getAutoCutNextTask()
let IsDoubleScreen = false
if (res.IsSuccess) {
IsDoubleScreen = res.Result.IsDoubleScreen
}
if (IsDoubleScreen) {
this.openWindow = await openWindow(routeData.href)
if (!this.openWindow) {
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
href="/screen.pdf"
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
if (!confirm) return false
this.openWindow = await openWindow(routeData.href, '', true)
}
} else {
this.openWindow = window.open(routeData.href, "_blank");
}
// this.openWindow = window.open(routeData.href, '_blank')
}, },
handleSave(isPrompt) { handleSave(isPrompt) {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {

View File

@ -215,6 +215,7 @@ import { getAutoCutNextTask } from '@/api/user'
import const_ from '@/const/sign-code' import const_ from '@/const/sign-code'
import SignForm from '@/views/trials/components/newSignForm' import SignForm from '@/views/trials/components/newSignForm'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { openWindow } from "@/utils/splitScreen";
export default { export default {
name: 'CustomizeReportPage', name: 'CustomizeReportPage',
components: { SignForm }, components: { SignForm },
@ -734,7 +735,7 @@ export default {
} }
} }
}, },
previewDicoms(task) { async previewDicoms(task) {
if (this.openWindow) { if (this.openWindow) {
this.openWindow.close() this.openWindow.close()
} }
@ -749,7 +750,25 @@ export default {
var readingTool = this.$router.currentRoute.query.readingTool 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}&TokenKey=${token}`
const routeData = this.$router.resolve({ path }) const routeData = this.$router.resolve({ path })
this.openWindow = window.open(routeData.href, '_blank') const res = await getAutoCutNextTask()
let IsDoubleScreen = false
if (res.IsSuccess) {
IsDoubleScreen = res.Result.IsDoubleScreen
}
if (IsDoubleScreen) {
this.openWindow = await openWindow(routeData.href)
if (!this.openWindow) {
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
href="/screen.pdf"
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
if (!confirm) return false
this.openWindow = await openWindow(routeData.href, '', true)
}
} else {
this.openWindow = window.open(routeData.href, "_blank");
}
// this.openWindow = window.open(routeData.href, '_blank')
}, },
handleSave(isPrompt) { handleSave(isPrompt) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

View File

@ -1,7 +1,8 @@
<template> <template>
<BaseContainer v-loading="loading" class="read-task"> <BaseContainer v-loading="loading" class="read-task">
<el-tabs v-model="TrialReadingCriterionId" type="border-card"> <el-tabs v-model="TrialReadingCriterionId" type="border-card">
<el-tab-pane v-for="item of trialCriterionList" :key="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" :name="item.TrialReadingCriterionId"> <el-tab-pane v-for="item of trialCriterionList" :key="item.TrialReadingCriterionId"
:label="item.TrialReadingCriterionName" :name="item.TrialReadingCriterionId">
<div v-if="TrialReadingCriterionId === item.TrialReadingCriterionId"> <div v-if="TrialReadingCriterionId === item.TrialReadingCriterionId">
<div slot="search-container" style="position:relative;"> <div slot="search-container" style="position:relative;">
<el-form :inline="true"> <el-form :inline="true">
@ -13,11 +14,7 @@
</el-form-item> </el-form-item>
<!-- 受试者编号 --> <!-- 受试者编号 -->
<el-form-item :label="$t('trials:readTask:table:subjectCode')"> <el-form-item :label="$t('trials:readTask:table:subjectCode')">
<el-input <el-input v-model="searchData.SubjectCode" style="width:130px;" clearable />
v-model="searchData.SubjectCode"
style="width:130px;"
clearable
/>
</el-form-item> </el-form-item>
<!-- 任务状态 --> <!-- 任务状态 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:readTask:table:taskState')"> <el-form-item style="margin-bottom:10px" :label="$t('trials:readTask:table:taskState')">
@ -28,7 +25,8 @@
<!-- 任务类型 --> <!-- 任务类型 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:readTask:table:readingCategory')"> <el-form-item style="margin-bottom:10px" :label="$t('trials:readTask:table:readingCategory')">
<el-select v-model="searchData.ReadingCategory" clearable style="width:120px;"> <el-select v-model="searchData.ReadingCategory" clearable style="width:120px;">
<el-option v-for="i of $d.ReadingCategory" :key="'ReadingCategory' + i.label" :value="i.value" :label="i.label" /> <el-option v-for="i of $d.ReadingCategory" :key="'ReadingCategory' + i.label" :value="i.value"
:label="i.label" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -45,34 +43,19 @@
</el-form> </el-form>
<span style="position: absolute;right: 0;top: 0;"> <span style="position: absolute;right: 0;top: 0;">
<el-button <el-button v-hasPermi="['trials:readTask:reread']" :disabled="list.length === 0" type="primary"
v-hasPermi="['trials:readTask:reread']" icon="el-icon-refresh-right" @click="handleReread">
:disabled="list.length ===0"
type="primary"
icon="el-icon-refresh-right"
@click="handleReread"
>
{{ $t('trials:readTask:button:reread') }} {{ $t('trials:readTask:button:reread') }}
</el-button> </el-button>
</span> </span>
</div> </div>
<div slot="main-container"> <div slot="main-container">
<el-table <el-table v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100"
v-adaptive="{bottomOffset:75}" @sort-change="handleSortChange">
:data="list"
stripe
height="100"
@sort-change="handleSortChange"
>
<el-table-column type="index" width="40" align="left" /> <el-table-column type="index" width="40" align="left" />
<!-- 是否加急 --> <!-- 是否加急 -->
<el-table-column <el-table-column prop="IsUrgent" min-width="100" :label="$t('trials:readTask:table:isUrgent')"
prop="IsUrgent" sortable="custom" show-overflow-tooltip>
min-width="100"
:label="$t('trials:readTask:table:isUrgent')"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsUrgent" type="danger">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag> <el-tag v-if="scope.row.IsUrgent" type="danger">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag> <el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
@ -87,21 +70,11 @@
show-overflow-tooltip show-overflow-tooltip
/> --> /> -->
<!-- 受试者编号 --> <!-- 受试者编号 -->
<el-table-column <el-table-column prop="SubjectCode" min-width="100" :label="$t('trials:readTask:table:subjectCode')"
prop="SubjectCode" sortable="custom" show-overflow-tooltip />
min-width="100"
:label="$t('trials:readTask:table:subjectCode')"
sortable="custom"
show-overflow-tooltip
/>
<!-- 盲态任务标识 --> <!-- 盲态任务标识 -->
<el-table-column <el-table-column prop="TaskBlindName" min-width="100" :label="$t('trials:readTask:table:blindName')"
prop="TaskBlindName" sortable="custom" show-overflow-tooltip />
min-width="100"
:label="$t('trials:readTask:table:blindName')"
sortable="custom"
show-overflow-tooltip
/>
<!-- 阅片标准 --> <!-- 阅片标准 -->
<!-- <el-table-column <!-- <el-table-column
prop="TrialReadingCriterionName" prop="TrialReadingCriterionName"
@ -111,34 +84,33 @@
sortable="custom" sortable="custom"
/> --> /> -->
<!-- 任务状态 --> <!-- 任务状态 -->
<el-table-column <el-table-column prop="TaskState" :label="$t('trials:readTask:table:taskState')" min-width="100"
prop="TaskState" sortable="custom" show-overflow-tooltip>
:label="$t('trials:readTask:table:taskState')"
min-width="100"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> <el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState)
<el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> }}</el-tag>
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> <el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState)
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> }}</el-tag>
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> <el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 任务类型 --> <!-- 任务类型 -->
<el-table-column <el-table-column prop="ReadingCategory" min-width="90"
prop="ReadingCategory" :label="$t('trials:readTask:table:readingCategory')" sortable="custom" show-overflow-tooltip>
min-width="90"
:label="$t('trials:readTask:table:readingCategory')"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag> <el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory',
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag> scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag> <el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory',
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag> scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory',
scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory',
scope.row.ReadingCategory) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 阅片状态 --> <!-- 阅片状态 -->
@ -162,94 +134,55 @@
<!-- show-overflow-tooltip--> <!-- show-overflow-tooltip-->
<!-- />--> <!-- />-->
<!-- 签名时间 --> <!-- 签名时间 -->
<el-table-column <el-table-column prop="SignTime" min-width="120" :label="$t('trials:readTask:table:signTime')"
prop="SignTime" sortable="custom" show-overflow-tooltip />
min-width="120"
:label="$t('trials:readTask:table:signTime')"
sortable="custom"
show-overflow-tooltip
/>
<!-- 申请状态 --> <!-- 申请状态 -->
<el-table-column <el-table-column v-if="!hasPermi(['role:air'])" prop="ReReadingApplyState"
v-if="!hasPermi(['role:air'])" :label="$t('trials:readTask:table:reReadingApplyState')" min-width="140" sortable="custom"
prop="ReReadingApplyState" show-overflow-tooltip>
:label="$t('trials:readTask:table:reReadingApplyState')"
min-width="140"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.ReReadingApplyState === 4 || scope.row.ReReadingApplyState === 5" type="danger">{{ $fd('ReReadingApplyState', scope.row.ReReadingApplyState) }}</el-tag> <el-tag v-if="scope.row.ReReadingApplyState === 4 || scope.row.ReReadingApplyState === 5"
<el-tag v-if="scope.row.ReReadingApplyState === 2" type="primary">{{ $fd('ReReadingApplyState', scope.row.ReReadingApplyState) }}</el-tag> type="danger">{{ $fd('ReReadingApplyState', scope.row.ReReadingApplyState) }}</el-tag>
<el-tag v-if="scope.row.ReReadingApplyState === 3" type="warning">{{ $fd('ReReadingApplyState', scope.row.ReReadingApplyState) }}</el-tag> <el-tag v-if="scope.row.ReReadingApplyState === 2" type="primary">{{ $fd('ReReadingApplyState',
scope.row.ReReadingApplyState) }}</el-tag>
<el-tag v-if="scope.row.ReReadingApplyState === 3" type="warning">{{ $fd('ReReadingApplyState',
scope.row.ReReadingApplyState) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('common:action:action')" width="250" fixed="right">
:label="$t('common:action:action')"
width="250"
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 查看 --> <!-- 查看 -->
<el-button <el-button circle :title="$t('trials:readTask:button:view')" icon="el-icon-view"
circle @click="handleReadImage(scope.row)" />
:title="$t('trials:readTask:button:view')"
icon="el-icon-view"
@click="handleReadImage(scope.row)"
/>
<!-- 申请重阅 --> <!-- 申请重阅 -->
<el-button <el-button v-hasPermi="['trials:readTask:apply']"
v-hasPermi="['trials:readTask:apply']"
:disabled="(scope.row.TaskState !== 0 && scope.row.TaskState !== 5) || scope.row.ReadingTaskState !== 2 || scope.row.ReReadingApplyState === 2 || scope.row.ReReadingApplyState === 4 || scope.row.ReReadingApplyState === 5" :disabled="(scope.row.TaskState !== 0 && scope.row.TaskState !== 5) || scope.row.ReadingTaskState !== 2 || scope.row.ReReadingApplyState === 2 || scope.row.ReReadingApplyState === 4 || scope.row.ReReadingApplyState === 5"
icon="el-icon-collection" icon="el-icon-collection" circle :title="$t('trials:readTask:button:apply')"
circle @click="openApplyReReading(scope.row)" />
:title="$t('trials:readTask:button:apply')" <el-button v-hasPermi="['trials:readTask:backwardHistory']" :disabled="!scope.row.ReReadingApplyState"
@click="openApplyReReading(scope.row)" icon="el-icon-toilet-paper" circle :title="$t('trials:readTask:button:backward')"
/> @click="reReadingHistory(scope.row, 1)" />
<el-button
v-hasPermi="['trials:readTask:backwardHistory']"
:disabled="!scope.row.ReReadingApplyState"
icon="el-icon-toilet-paper"
circle
:title="$t('trials:readTask:button:backward')"
@click="reReadingHistory(scope.row, 1)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" /> <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog <el-dialog v-if="ApplyforReasonVisible" :title="$t('trials:readTask:dagTitle:apply')"
v-if="ApplyforReasonVisible" :visible.sync="ApplyforReasonVisible" width="1460px" append-to-body :close-on-click-modal="false"
:title="$t('trials:readTask:dagTitle:apply')" custom-class="base-dialog-wrapper">
:visible.sync="ApplyforReasonVisible" <el-form ref="reasonForm" :rules="rules" :model="ApplyforReasonForm" class="demo-ruleForm" size="small"
width="1460px" label-width="380px">
append-to-body
:close-on-click-modal="false"
custom-class="base-dialog-wrapper"
>
<el-form
ref="reasonForm"
:rules="rules"
:model="ApplyforReasonForm"
class="demo-ruleForm"
size="small"
label-width="380px"
>
<!-- 申请原因 --> <!-- 申请原因 -->
<el-divider content-position="left">{{ $t('trials:readTask:title:applyReason') }}</el-divider> <el-divider content-position="left">{{ $t('trials:readTask:title:applyReason') }}</el-divider>
<!-- 申请原因 --> <!-- 申请原因 -->
<el-form-item <el-form-item :label="$t('trials:readTask:title:applyReason')" prop="Type" :rules="[
:label="$t('trials:readTask:title:applyReason')" { required: true, message: $t('common:ruleMessage:select') },
prop="Type" ]">
:rules="[
{ required: true, message: $t('common:ruleMessage:select')},
]"
>
<el-radio-group v-model="ApplyforReasonForm.Type"> <el-radio-group v-model="ApplyforReasonForm.Type">
<!-- 阅片记录错误 --> <!-- 阅片记录错误 -->
<el-radio :label="1">{{ $t('trials:readTask:option:errorRecords') }}</el-radio> <el-radio :label="1">{{ $t('trials:readTask:option:errorRecords') }}</el-radio>
@ -258,61 +191,35 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- 备注 --> <!-- 备注 -->
<el-form-item v-if="ApplyforReasonForm.Type === 2" :label="$t('trials:readTask:title:remark')" prop="RequestReReadingReason"> <el-form-item v-if="ApplyforReasonForm.Type === 2" :label="$t('trials:readTask:title:remark')"
<el-input prop="RequestReReadingReason">
v-model="ApplyforReasonForm.RequestReReadingReason" <el-input v-model="ApplyforReasonForm.RequestReReadingReason" type="textarea" style="width: 400px"
type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" :placeholder="$t('common:ruleMessage:specify')" maxlength="500"
style="width: 400px" show-word-limit />
:autosize="{ minRows: 2, maxRows: 4}"
:placeholder="$t('common:ruleMessage:specify')"
maxlength="500"
show-word-limit
/>
</el-form-item> </el-form-item>
<!-- 是否复制阅片表单 --> <!-- 是否复制阅片表单 -->
<el-form-item <el-form-item :label="$t('trials:readTask:title:copyForm')" prop="IsCopyOrigenalForms" :rules="[
:label="$t('trials:readTask:title:copyForm')" { required: true, message: $t('common:ruleMessage:select') },
prop="IsCopyOrigenalForms" ]">
:rules="[
{ required: true, message: $t('common:ruleMessage:select')},
]"
>
<el-radio-group v-model="ApplyforReasonForm.IsCopyOrigenalForms"> <el-radio-group v-model="ApplyforReasonForm.IsCopyOrigenalForms">
<el-radio v-for="item of $d.YesOrNo" :key="`IsCopyOrigenalForms${item.raw.Id}`" :label="item.value">{{ item.label }}</el-radio> <el-radio v-for="item of $d.YesOrNo" :key="`IsCopyOrigenalForms${item.raw.Id}`" :label="item.value">{{
item.label }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 影响的任务列表 --> <!-- 影响的任务列表 -->
<el-divider content-position="left">{{ $t('trials:readTask:title:influenceList') }}</el-divider> <el-divider content-position="left">{{ $t('trials:readTask:title:influenceList') }}</el-divider>
<div style="padding:10px;border: 1px solid #e0e0e0;max-height:650px;overflow-y: auto;"> <div style="padding:10px;border: 1px solid #e0e0e0;max-height:650px;overflow-y: auto;">
<el-table <el-table v-loading="loading" :data="InfluenceTaskList" stripe height="100" style="min-height: 400px;">
v-loading="loading"
:data="InfluenceTaskList"
stripe
height="100"
style="min-height: 400px;"
>
<!-- 任务编号 --> <!-- 任务编号 -->
<el-table-column <el-table-column prop="TaskCode" :label="$t('trials:readTask:table:taskCode')" min-width="100"
prop="TaskCode" show-overflow-tooltip />
:label="$t('trials:readTask:table:taskCode')"
min-width="100"
show-overflow-tooltip
/>
<!-- 中心编号 --> <!-- 中心编号 -->
<el-table-column <el-table-column prop="TrialSiteCode" :label="$t('trials:readTask:table:siteCode')" min-width="100"
prop="TrialSiteCode" show-overflow-tooltip />
:label="$t('trials:readTask:table:siteCode')"
min-width="100"
show-overflow-tooltip
/>
<!-- 受试者编号 --> <!-- 受试者编号 -->
<el-table-column <el-table-column prop="SubjectCode" :label="$t('trials:readTask:table:subjectCode')" min-width="120"
prop="SubjectCode" show-overflow-tooltip />
:label="$t('trials:readTask:table:subjectCode')"
min-width="120"
show-overflow-tooltip
/>
<!-- <el-table-column <!-- <el-table-column
prop="VisitTaskNum" prop="VisitTaskNum"
label="访视/阅片期名称" label="访视/阅片期名称"
@ -324,80 +231,64 @@
</template> </template>
</el-table-column> --> </el-table-column> -->
<!-- 盲态任务标识 --> <!-- 盲态任务标识 -->
<el-table-column <el-table-column prop="TaskBlindName" :label="$t('trials:readTask:table:blindName')" min-width="120"
prop="TaskBlindName" show-overflow-tooltip />
:label="$t('trials:readTask:table:blindName')"
min-width="120"
show-overflow-tooltip
/>
<!-- 阅片标准 --> <!-- 阅片标准 -->
<el-table-column <el-table-column prop="TrialReadingCriterionName" :label="$t('trials:readTask:table:criterionName')"
prop="TrialReadingCriterionName" min-width="100" show-overflow-tooltip />
:label="$t('trials:readTask:table:criterionName')"
min-width="100"
show-overflow-tooltip
/>
<!-- 任务状态 --> <!-- 任务状态 -->
<el-table-column <el-table-column prop="TaskState" :label="$t('trials:readTask:table:taskState')" min-width="100"
prop="TaskState" show-overflow-tooltip>
:label="$t('trials:readTask:table:taskState')"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> <el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> <el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> <el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState)
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> }}</el-tag>
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag> <el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 任务类型 --> <!-- 任务类型 -->
<el-table-column <el-table-column prop="ReadingCategory" min-width="100" :label="$t('trials:readTask:table:readingCategory')"
prop="ReadingCategory" show-overflow-tooltip>
min-width="100"
:label="$t('trials:readTask:table:readingCategory')"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag> <el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory',
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag> scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag> <el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory',
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag> scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory',
scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory',
scope.row.ReadingCategory) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 阅片状态 --> <!-- 阅片状态 -->
<el-table-column <el-table-column prop="ReadingTaskState" :label="$t('trials:readTask:table:readingTaskState')" min-width="100"
prop="ReadingTaskState" show-overflow-tooltip>
:label="$t('trials:readTask:table:readingTaskState')"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag> <el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{ $fd('ReadingTaskState',
scope.row.ReadingTaskState) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag> <el-tag v-else type="danger">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 生效后影响 --> <!-- 生效后影响 -->
<el-table-column <el-table-column prop="OptType" :label="$t('trials:readTask:table:optType')" min-width="100"
prop="OptType" show-overflow-tooltip>
:label="$t('trials:readTask:table:optType')"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.OptType === 0" type="primary">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag> <el-tag v-if="scope.row.OptType === 0" type="primary">{{ $fd('ReReadingOrBackOptType', scope.row.OptType)
<el-tag v-if="scope.row.OptType === 1" type="danger">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag> }}</el-tag>
<el-tag v-if="scope.row.OptType === 2" type="warning">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag> <el-tag v-if="scope.row.OptType === 1" type="danger">{{ $fd('ReReadingOrBackOptType', scope.row.OptType)
}}</el-tag>
<el-tag v-if="scope.row.OptType === 2" type="warning">{{ $fd('ReReadingOrBackOptType', scope.row.OptType)
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 阅片人 --> <!-- 阅片人 -->
<el-table-column <el-table-column prop="UserName" :label="$t('trials:readTask:table:reader')" min-width="160"
prop="UserName" show-overflow-tooltip>
:label="$t('trials:readTask:table:reader')"
min-width="160"
show-overflow-tooltip
>
<template v-if="scope.row.DoctorUser" slot-scope="scope"> <template v-if="scope.row.DoctorUser" slot-scope="scope">
{{ scope.row.DoctorUser.UserName }}({{ scope.row.DoctorUser.FullName }}) {{ scope.row.DoctorUser.UserName }}({{ scope.row.DoctorUser.FullName }})
</template> </template>
@ -406,7 +297,8 @@
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<!-- 取消 --> <!-- 取消 -->
<el-button :disabled="btnLoading" size="small" type="primary" @click="ApplyforReasonVisible = false;ApplyforReasonForm = { Type: null, RequestReReadingReason: null }"> <el-button :disabled="btnLoading" size="small" type="primary"
@click="ApplyforReasonVisible = false; ApplyforReasonForm = { Type: null, RequestReReadingReason: null }">
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
@ -420,10 +312,11 @@
<script> <script>
import { getIRHaveReadTaskList, aIRReReading } from '@/api/trials' import { getIRHaveReadTaskList, aIRReReading } from '@/api/trials'
import { applyReReading, getReReadingOrBackInfluenceTaskList, getTrialCriterionList } from '@/api/trials/reading' import { applyReReading, getReReadingOrBackInfluenceTaskList, getTrialCriterionList } from '@/api/trials/reading'
import { getAutoCutNextTask } from '@/api/user'
import BaseContainer from '@/components/BaseContainer' import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { openWindow } from "@/utils/splitScreen";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
SubjectCode: '', SubjectCode: '',
@ -485,7 +378,7 @@ export default {
getTrialCriterionList(this.trialId).then(res => { getTrialCriterionList(this.trialId).then(res => {
this.trialCriterionList = res.Result this.trialCriterionList = res.Result
this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
}).catch(() => {}) }).catch(() => { })
}, },
// //
reReadingHistory(row) { reReadingHistory(row) {
@ -509,7 +402,7 @@ export default {
this.searchData = searchDataDefault() this.searchData = searchDataDefault()
this.getList() this.getList()
}, },
handleReadImage(row) { async handleReadImage(row) {
if (this.openWindow) { if (this.openWindow) {
this.openWindow.close() this.openWindow.close()
} }
@ -521,13 +414,31 @@ export default {
window.localStorage.setItem('TrialReadingCriterionId', this.TrialReadingCriterionId) window.localStorage.setItem('TrialReadingCriterionId', this.TrialReadingCriterionId)
var token = getToken() var token = getToken()
var path = '' var path = ''
if (row.ReadingTool === 0 || row.ReadingTool === 2 ) { if (row.ReadingTool === 0 || row.ReadingTool === 2) {
path = `/readingDicoms?TrialReadingCriterionId=${row.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&visitTaskId=${row.Id}&isReadingTaskViewInOrder=${row.IsReadingTaskViewInOrder}&criterionType=${row.CriterionType}&readingTool=${row.ReadingTool}&TokenKey=${token}` path = `/readingDicoms?TrialReadingCriterionId=${row.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&visitTaskId=${row.Id}&isReadingTaskViewInOrder=${row.IsReadingTaskViewInOrder}&criterionType=${row.CriterionType}&readingTool=${row.ReadingTool}&TokenKey=${token}`
} else { } else {
path = `/noneDicomReading?TrialReadingCriterionId=${row.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&visitTaskId=${row.Id}&isReadingTaskViewInOrder=${row.IsReadingTaskViewInOrder}&criterionType=${row.CriterionType}&readingTool=${row.ReadingTool}&TokenKey=${token}` path = `/noneDicomReading?TrialReadingCriterionId=${row.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&visitTaskId=${row.Id}&isReadingTaskViewInOrder=${row.IsReadingTaskViewInOrder}&criterionType=${row.CriterionType}&readingTool=${row.ReadingTool}&TokenKey=${token}`
} }
var routeData = this.$router.resolve({ path }) var routeData = this.$router.resolve({ path })
this.openWindow = window.open(routeData.href, '_blank') const res = await getAutoCutNextTask()
let IsDoubleScreen = false
if (res.IsSuccess) {
IsDoubleScreen = res.Result.IsDoubleScreen
}
if (IsDoubleScreen) {
this.openWindow = await openWindow(routeData.href)
if (!this.openWindow) {
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
href="/screen.pdf"
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
if (!confirm) return false
this.openWindow = await openWindow(routeData.href, '', true)
}
} else {
this.openWindow = window.open(routeData.href, "_blank");
}
// this.openWindow = window.open(routeData.href, '_blank')
}, },
openApplyReReading(row) { openApplyReReading(row) {
this.rowData = { ...row } this.rowData = { ...row }
@ -608,11 +519,12 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.read-task{ .read-task {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
::v-deep.search {
padding: 0px !important; ::v-deep.search {
} padding: 0px !important;
} }
}
</style> </style>

View File

@ -1,272 +1,147 @@
<template> <template>
<BaseContainer <BaseContainer v-loading="loading" class="reading-task">
v-loading="loading" <el-tabs v-if="TrialReadingCriterionId" v-model="TrialReadingCriterionId" type="border-card">
class="reading-task" <el-tab-pane v-for="item of trialCriterionList" :key="item.TrialReadingCriterionId"
> :label="item.TrialReadingCriterionName" :name="item.TrialReadingCriterionId">
<el-tabs <div v-if="
v-if="TrialReadingCriterionId" (isReadingTaskViewInOrder === 1 ||
v-model="TrialReadingCriterionId" isReadingTaskViewInOrder === 2) &&
type="border-card" TrialReadingCriterionId === item.TrialReadingCriterionId
> ">
<el-tab-pane
v-for="item of trialCriterionList"
:key="item.TrialReadingCriterionId"
:label="item.TrialReadingCriterionName"
:name="item.TrialReadingCriterionId"
>
<div
v-if="
(isReadingTaskViewInOrder === 1 ||
isReadingTaskViewInOrder === 2) &&
TrialReadingCriterionId === item.TrialReadingCriterionId
"
>
<div slot="search-container"> <div slot="search-container">
<el-form :inline="true"> <el-form :inline="true">
<!-- 受试者编号 --> <!-- 受试者编号 -->
<el-form-item <el-form-item :label="$t('trials:pendingReadingTasks:table:subjectCode')">
:label="$t('trials:pendingReadingTasks:table:subjectCode')" <el-input v-model="searchData.SubjectCode" style="width: 130px" clearable />
>
<el-input
v-model="searchData.SubjectCode"
style="width: 130px"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button <el-button type="primary" icon="el-icon-search" @click="handleSearch">
type="primary"
icon="el-icon-search"
@click="handleSearch"
>
{{ $t('common:button:search') }} {{ $t('common:button:search') }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button <el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }} {{ $t('common:button:reset') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div slot="main-container"> <div slot="main-container">
<el-table <el-table v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100"
v-adaptive="{ bottomOffset: 75 }" @sort-change="handleSortChange">
:data="list"
stripe
height="100"
@sort-change="handleSortChange"
>
<el-table-column type="index" width="40" align="left" /> <el-table-column type="index" width="40" align="left" />
<el-table-column <el-table-column prop="IsUrgent" :label="$t('trials:consistencyCheck:table:isUrgent')"
prop="IsUrgent" show-overflow-tooltip min-width="100">
:label="$t('trials:consistencyCheck:table:isUrgent')"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip <el-tooltip class="item" effect="dark" :content="$t('trials:pendingReadingTasks:table:feedbackmsg')"
class="item" placement="bottom" v-if="scope.row.IsExistUnprocessedFeedback">
effect="dark" <i v-if="scope.row.IsExistUnprocessedFeedback" class="el-icon-warning"
:content="$t('trials:pendingReadingTasks:table:feedbackmsg')" style="color: #f44336; font-size: 16px" />
placement="bottom"
v-if="scope.row.IsExistUnprocessedFeedback"
>
<i
v-if="scope.row.IsExistUnprocessedFeedback"
class="el-icon-warning"
style="color: #f44336; font-size: 16px"
/>
</el-tooltip> </el-tooltip>
<el-tag <el-tag :type="scope.row.UrgentColor === 1
:type=" ? 'danger'
scope.row.UrgentColor === 1 : scope.row.UrgentColor === 2
? 'danger' ? 'warning'
: scope.row.UrgentColor === 2 : 'primary'
? 'warning' ">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
: 'primary'
"
>{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag
>
</template> </template>
</el-table-column> </el-table-column>
<!-- 受试者编号 --> <!-- 受试者编号 -->
<el-table-column <el-table-column prop="SubjectCode" min-width="100"
prop="SubjectCode" :label="$t('trials:pendingReadingTasks:table:subjectCode')" show-overflow-tooltip sortable="custom" />
min-width="100"
:label="$t('trials:pendingReadingTasks:table:subjectCode')"
show-overflow-tooltip
sortable="custom"
/>
<!-- 剩余阅片量 --> <!-- 剩余阅片量 -->
<el-table-column <el-table-column prop="UnReadCanReadTaskCount" min-width="100" :label="$t('trials:pendingReadingTasks:table:remainingReadingVolume')
prop="UnReadCanReadTaskCount" " show-overflow-tooltip sortable="custom" />
min-width="100" <el-table-column prop="UrgentCount" :label="$t('trials:sysDocBeSigned:table:UrgentCount')"
:label=" show-overflow-tooltip min-width="100" sortable="custom">
$t('trials:pendingReadingTasks:table:remainingReadingVolume')
"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="UrgentCount"
:label="$t('trials:sysDocBeSigned:table:UrgentCount')"
show-overflow-tooltip
min-width="100"
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span <span :style="{
:style="{ color:
color: scope.row.UrgentColor === 1
scope.row.UrgentColor === 1 ? '#F56C6C'
? '#F56C6C' : scope.row.UrgentColor === 2
: scope.row.UrgentColor === 2
? '#E6A23C' ? '#E6A23C'
: '#409EFF', : '#409EFF',
}" }">{{ scope.row.UrgentCount }}</span>
>{{ scope.row.UrgentCount }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<!-- 建议完成时间 --> <!-- 建议完成时间 -->
<el-table-column <el-table-column prop="SuggesteFinishedTime" min-width="100" :label="$t('trials:pendingReadingTasks:table:suggestedCompletionTime')
prop="SuggesteFinishedTime" " show-overflow-tooltip sortable="custom">
min-width="100"
:label="
$t('trials:pendingReadingTasks:table:suggestedCompletionTime')
"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.SuggesteFinishedTime.split(':')[0] + ':00:00' }} {{ scope.row.SuggesteFinishedTime.split(':')[0] + ':00:00' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('common:action:action')" width="250" fixed="right">
:label="$t('common:action:action')"
width="250"
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 阅片 --> <!-- 阅片 -->
<el-button <el-button :disabled="scope.row.ExistReadingApply" circle :title="scope.row.ExistReadingApply
:disabled="scope.row.ExistReadingApply" ? $t(
circle 'trials:pendingReadingTasks:button:ExistReadingApply'
:title=" )
scope.row.ExistReadingApply : $t('trials:pendingReadingTasks:button:review')
? $t( " icon="el-icon-edit-outline" @click="handleReadImage(scope.row)" />
'trials:pendingReadingTasks:button:ExistReadingApply'
)
: $t('trials:pendingReadingTasks:button:review')
"
icon="el-icon-edit-outline"
@click="handleReadImage(scope.row)"
/>
<!-- 上传 --> <!-- 上传 -->
<el-button <el-button v-if="
v-if=" item.ImageUploadEnum > 0 &&
item.ImageUploadEnum > 0 && item.IsReadingTaskViewInOrder > 1 &&
item.IsReadingTaskViewInOrder > 1 && !scope.row.IsSubjectJudge
!scope.row.IsSubjectJudge " v-hasPermi="['role:ir']" circle icon="el-icon-upload2"
"
v-hasPermi="['role:ir']"
circle
icon="el-icon-upload2"
:title="$t('trials:pendingReadingTasks:button:upload')" :title="$t('trials:pendingReadingTasks:button:upload')"
@click="openUploadImage(scope.row, item, 'upload')" @click="openUploadImage(scope.row, item, 'upload')" />
/>
<!-- 下载 --> <!-- 下载 -->
<el-button <el-button v-if="
v-if=" item.ImageDownloadEnum > 0 &&
item.ImageDownloadEnum > 0 && item.IsReadingTaskViewInOrder > 1 &&
item.IsReadingTaskViewInOrder > 1 && !scope.row.IsSubjectJudge
!scope.row.IsSubjectJudge " v-hasPermi="['role:ir']" circle icon="el-icon-download"
"
v-hasPermi="['role:ir']"
circle
icon="el-icon-download"
:title="$t('trials:pendingReadingTasks:button:download')" :title="$t('trials:pendingReadingTasks:button:download')"
@click="openUploadImage(scope.row, item, 'download')" @click="openUploadImage(scope.row, item, 'download')" />
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
class="page" @pagination="getList" />
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
</div> </div>
</div> </div>
<div <div v-else-if="
v-else-if=" isReadingTaskViewInOrder === 0 &&
isReadingTaskViewInOrder === 0 && TrialReadingCriterionId === item.TrialReadingCriterionId
TrialReadingCriterionId === item.TrialReadingCriterionId ">
"
>
<el-descriptions :column="2" border style="width: 800px"> <el-descriptions :column="2" border style="width: 800px">
<!-- 剩余任务量 --> <!-- 剩余任务量 -->
<el-descriptions-item <el-descriptions-item :label="$t('trials:pendingReadingTasks:table:remainingTaskVolume')
:label=" " :label-style="{ width: '200px' }">
$t('trials:pendingReadingTasks:table:remainingTaskVolume')
"
:label-style="{ width: '200px' }"
>
<el-tag size="small" type="danger">{{ <el-tag size="small" type="danger">{{
randomReadInfo.UnReadTaskCount randomReadInfo.UnReadTaskCount
}}</el-tag> }}</el-tag>
</el-descriptions-item> </el-descriptions-item>
<!-- 剩余裁判量 --> <!-- 剩余裁判量 -->
<el-descriptions-item <el-descriptions-item :label="$t('trials:pendingReadingTasks:table:amountOfJudgesRemaining')
:label=" " :label-style="{ width: '200px' }">
$t('trials:pendingReadingTasks:table:amountOfJudgesRemaining')
"
:label-style="{ width: '200px' }"
>
<el-tag size="small" type="danger">{{ <el-tag size="small" type="danger">{{
randomReadInfo.UnReadJudgeTaskCount randomReadInfo.UnReadJudgeTaskCount
}}</el-tag> }}</el-tag>
</el-descriptions-item> </el-descriptions-item>
<!-- 已完成任务量 --> <!-- 已完成任务量 -->
<el-descriptions-item <el-descriptions-item :label="$t('trials:pendingReadingTasks:table:amountOfCompletedTasks')
:label=" " :label-style="{ width: '200px' }">
$t('trials:pendingReadingTasks:table:amountOfCompletedTasks')
"
:label-style="{ width: '200px' }"
>
<el-tag size="small">{{ randomReadInfo.FinishTaskCount }}</el-tag> <el-tag size="small">{{ randomReadInfo.FinishTaskCount }}</el-tag>
</el-descriptions-item> </el-descriptions-item>
<!-- 已完成裁判量 --> <!-- 已完成裁判量 -->
<el-descriptions-item <el-descriptions-item :label="$t('trials:pendingReadingTasks:table:numberOfJudgesCompleted')
:label=" " :label-style="{ width: '200px' }">
$t('trials:pendingReadingTasks:table:numberOfJudgesCompleted')
"
:label-style="{ width: '200px' }"
>
<el-tag size="small">{{ <el-tag size="small">{{
randomReadInfo.FinishJudgeTaskCount randomReadInfo.FinishJudgeTaskCount
}}</el-tag> }}</el-tag>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<!-- 开始随机阅片 --> <!-- 开始随机阅片 -->
<el-button <el-button type="primary" size="small" :disabled="randomReadInfo.UnReadTaskCount +
type="primary" randomReadInfo.UnReadJudgeTaskCount ===
size="small" 0
:disabled=" " @click="handleOutOfOrderReading">
randomReadInfo.UnReadTaskCount +
randomReadInfo.UnReadJudgeTaskCount ===
0
"
@click="handleOutOfOrderReading"
>
{{ $t('trials:pendingReadingTasks:button:beginRandomReview') }} {{ $t('trials:pendingReadingTasks:button:beginRandomReview') }}
</el-button> </el-button>
</el-descriptions-item> </el-descriptions-item>
@ -282,21 +157,11 @@
:status="uploadStatus" :status="uploadStatus"
@getList="getList" @getList="getList"
/> --> /> -->
<upload-dicom-and-nonedicom <upload-dicom-and-nonedicom v-if="uploadImageVisible" :SubjectId="uploadSubjectId" :SubjectCode="uploadSubjectCode"
v-if="uploadImageVisible" :Criterion="uploadTrialCriterion" :isReadingTaskViewInOrder="isReadingTaskViewInOrder"
:SubjectId="uploadSubjectId" :visible.sync="uploadImageVisible" />
:SubjectCode="uploadSubjectCode" <download-dicom-and-nonedicom v-if="downloadImageVisible" :SubjectId="uploadSubjectId"
:Criterion="uploadTrialCriterion" :SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion" :visible.sync="downloadImageVisible" />
:isReadingTaskViewInOrder="isReadingTaskViewInOrder"
:visible.sync="uploadImageVisible"
/>
<download-dicom-and-nonedicom
v-if="downloadImageVisible"
:SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode"
:Criterion="uploadTrialCriterion"
:visible.sync="downloadImageVisible"
/>
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
@ -308,6 +173,8 @@ import uploadDicomAndNonedicom from '@/components/uploadDicomAndNonedicom'
import downloadDicomAndNonedicom from '@/components/downloadDicomAndNonedicom' import downloadDicomAndNonedicom from '@/components/downloadDicomAndNonedicom'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { getAutoCutNextTask } from '@/api/user'
import { openWindow } from "@/utils/splitScreen";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
SubjectCode: '', SubjectCode: '',
@ -438,7 +305,7 @@ export default {
var path = '' var path = ''
if (this.readingTool === 0 || this.readingTool === 2) { if (this.readingTool === 0 || this.readingTool === 2) {
if (this.criterionType === 0 && this.trialId === '08dd28b3-6843-fc05-0242-ac1301000000') { if (this.criterionType === 0 && this.trialId === '08dd28b3-6843-fc05-0242-ac1301000000') {
path = `/fusion?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&studyId=62b3dfc4-1e04-4180-910d-fe595f398361&ctseriesId=1bd24f53-d419-32e5-92d4-2b04640aaa65&ptseriesId=2b7b128d-8c3f-8357-ad14-e38f3acbbdff&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&TokenKey=${token}&lang=${this.$i18n.locale}` path = `/fusion?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&studyId=62b3dfc4-1e04-4180-910d-fe595f398361&ctseriesId=1bd24f53-d419-32e5-92d4-2b04640aaa65&ptseriesId=2b7b128d-8c3f-8357-ad14-e38f3acbbdff&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&TokenKey=${token}&lang=${this.$i18n.locale}`
} else { } else {
path = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}` path = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
} }
@ -446,8 +313,25 @@ export default {
path = `/noneDicomReading?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}` path = `/noneDicomReading?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
} }
var routeData = this.$router.resolve({ path }) var routeData = this.$router.resolve({ path })
const res = await getAutoCutNextTask()
this.openWindow = window.open(routeData.href, '_blank') let IsDoubleScreen = false
if (res.IsSuccess) {
IsDoubleScreen = res.Result.IsDoubleScreen
}
if (IsDoubleScreen) {
this.openWindow = await openWindow(routeData.href)
if (!this.openWindow) {
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
href="/screen.pdf"
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
if (!confirm) return false
this.openWindow = await openWindow(routeData.href, '', true)
}
} else {
this.openWindow = window.open(routeData.href, "_blank");
}
// this.openWindow = window.open(routeData.href, '_blank')
} catch (e) { } catch (e) {
this.loading = false this.loading = false
console.log(e) console.log(e)
@ -468,7 +352,7 @@ export default {
) )
var token = getToken() var token = getToken()
var path = '' var path = ''
if (this.readingTool === 0 || this.readingTool === 2 ) { if (this.readingTool === 0 || this.readingTool === 2) {
path = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}` path = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
} else { } else {
path = `/noneDicomReading?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}` path = `/noneDicomReading?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
@ -500,11 +384,12 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.reading-task{ .reading-task {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
::v-deep.search {
padding: 0px !important; ::v-deep.search {
} padding: 0px !important;
} }
}
</style> </style>

View File

@ -217,6 +217,7 @@ import SignForm from '@/views/trials/components/newSignForm'
import PreviewFile from '@/components/PreviewFile/index' import PreviewFile from '@/components/PreviewFile/index'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import store from '@/store' import store from '@/store'
import { openWindow } from "@/utils/splitScreen";
export default { export default {
name: 'CustomizeReportPage', name: 'CustomizeReportPage',
components: { SignForm, PreviewFile }, components: { SignForm, PreviewFile },
@ -246,7 +247,8 @@ export default {
taskInfo: null, taskInfo: null,
previewVisible: false, previewVisible: false,
currentPath: '', currentPath: '',
currentType: '' currentType: '',
openWindow: null
} }
}, },
watch: { watch: {
@ -512,37 +514,37 @@ export default {
num = arr1.length === 0 ? 0 : Math.min(...arr1) num = arr1.length === 0 ? 0 : Math.min(...arr1)
break break
case 10: case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} }
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => { num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
return acc + (typeof curr === "number" ? curr : 0); return acc + (typeof curr === "number" ? curr : 0);
}, 0) / dataArr.length; }, 0) / dataArr.length;
break; break;
case 11: case 11:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} }
num = dataArr.length > 0 ? Math.max(...dataArr) : 0; num = dataArr.length > 0 ? Math.max(...dataArr) : 0;
break; break;
case 12: case 12:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} }
num = dataArr.length > 0 ? Math.min(...dataArr) : 0; num = dataArr.length > 0 ? Math.min(...dataArr) : 0;
break; break;
case 13: case 13:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} }
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0 num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
break; break;
case 14: case 14:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} }
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0; num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0;
break; break;
} }
} else { } else {
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
@ -580,13 +582,13 @@ export default {
// num /= parseFloat(this.questionForm[o.TableQuestionId]) // num /= parseFloat(this.questionForm[o.TableQuestionId])
break break
case 10: case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} }
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => { num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
return acc + (typeof curr === "number" ? curr : 0); return acc + (typeof curr === "number" ? curr : 0);
}, 0) / dataArr.length; }, 0) / dataArr.length;
break; break;
case 11: case 11:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
@ -601,7 +603,7 @@ export default {
num = dataArr.length > 0 ? Math.min(...dataArr) : 0; num = dataArr.length > 0 ? Math.min(...dataArr) : 0;
break; break;
case 13: case 13:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
} }
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0 num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
@ -770,7 +772,7 @@ export default {
} }
} }
}, },
previewDicoms(task) { async previewDicoms(task) {
var token = getToken() var token = getToken()
// var subjectCode = this.$router.currentRoute.query.subjectCode // var subjectCode = this.$router.currentRoute.query.subjectCode
var subjectCode = localStorage.getItem('subjectCode') var subjectCode = localStorage.getItem('subjectCode')
@ -782,7 +784,25 @@ export default {
var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
var path = `/noneDicomReading?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}` var path = `/noneDicomReading?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 }) const routeData = this.$router.resolve({ path })
window.open(routeData.href, '_blank') const res = await getAutoCutNextTask()
let IsDoubleScreen = false
if (res.IsSuccess) {
IsDoubleScreen = res.Result.IsDoubleScreen
}
if (IsDoubleScreen) {
this.openWindow = await openWindow(routeData.href)
if (!this.openWindow) {
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
href="/screen.pdf"
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
if (!confirm) return false
this.openWindow = await openWindow(routeData.href, '', true)
}
} else {
this.openWindow = window.open(routeData.href, "_blank");
}
// window.open(routeData.href, '_blank')
}, },
handleSave(isPrompt) { handleSave(isPrompt) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {