阅片界面及oss配置更新

main
caiyiling 2024-04-22 11:46:28 +08:00
parent c08082190b
commit 182e9779d4
43 changed files with 2317 additions and 1448 deletions

View File

@ -400,7 +400,7 @@ export default {
this.dicomInfo.zoom = viewport.scale.toFixed(4)
var data = e.detail.image.data
const position = data.string('x00201041')
this.dicomInfo.location = parseFloat(position).toFixed(2)
this.dicomInfo.location = position
},
getOrientationMarker(element) {
const enabledElement = cornerstone.getEnabledElement(element)

View File

@ -113,9 +113,9 @@
<div ref="dicomTools" class="dicom-tools">
<!-- 布局 -->
<div class="measureTool-wrapper">
<div class="sideTool-title">{{$t('trials:reading:button:layout')}}</div>
<div class="sideTool-title">{{ $t('trials:reading:button:layout') }}</div>
<div class="sideTool-wrapper">
<label>{{$t('trials:reading:button:layout')}}:</label>
<label>{{ $t('trials:reading:button:layout') }}:</label>
<select class="sidetool-select" style="width:90px" @change="changeLayout($event)">
<option value="1x1" selected>1x1</option>
<option value="1x2">1x2</option>
@ -131,7 +131,7 @@
</div>
<!-- 图像变换 -->
<div class="measureTool-wrapper">
<div class="sideTool-title">{{$t('trials:dicom-show:transform')}}</div>
<div class="sideTool-title">{{ $t('trials:dicom-show:transform') }}</div>
<div class="sideTool-wrapper">
<button
:title="$t('trials:reading:button:wwwc')"
@ -236,7 +236,7 @@
</div>
<div class="measureTool-wrapper">
<!-- 播放 -->
<div class="sideTool-title">{{$t('trials:dicom-show:play')}}</div>
<div class="sideTool-title">{{ $t('trials:dicom-show:play') }}</div>
<div class="sideTool-wrapper">
<!-- 第一帧 -->
<button class="btn-link" :title="$t('trials:dicom-show:firstframe')" @click="currentDicomCanvas.scrollPage(-9999)">
@ -263,7 +263,7 @@
</button>
<select class="sidetool-select" style="width:60px" @change="setDicomCanvasfps($event)">
<!-- 默认值 -->
<option :value="10">{{$t('trials:dicom-show:default')}}</option>
<option :value="10">{{ $t('trials:dicom-show:default') }}</option>
<option :value="15">15</option>
<option :value="20">20</option>
<option :value="30">30</option>
@ -275,7 +275,7 @@
<div class="sideTool-title">{{ $t('trials:dicom-show:color') }}</div>
<div class="sideTool-wrapper">
<!-- 预设窗位值 -->
<label>{{$t('trials:dicom-show:dicomCanvasWwwc')}}:</label>
<label>{{ $t('trials:dicom-show:dicomCanvasWwwc') }}:</label>
<select
v-model="wwwcList[currentDicomCanvasIndex]"
class="sidetool-select"
@ -283,11 +283,11 @@
@change="setDicomCanvasWwwc($event)"
>
<!-- 默认值 -->
<option :value="-1">{{$t('trials:dicom-show:default')}}</option>
<option :value="-1">{{ $t('trials:dicom-show:default') }}</option>
<!-- 自定义 -->
<option :value="0">{{$t('trials:dicom-show:custom')}}</option>
<option :value="0">{{ $t('trials:dicom-show:custom') }}</option>
<!-- 区域窗宽 -->
<option :value="1" style="border-bottom:1px solid #fff;">{{$t('trials:reading:button:wwwcRegion')}}</option>
<option :value="1" style="border-bottom:1px solid #fff;">{{ $t('trials:reading:button:wwwcRegion') }}</option>
<option :value="2">
CT Abdomen
</option>
@ -319,7 +319,7 @@
@change="setColormap($event)"
>
<!-- 默认值 -->
<option value>{{$t('trials:dicom-show:default')}}</option>
<option value>{{ $t('trials:dicom-show:default') }}</option>
<option
v-for="(item,index) in colormapsList"
:key="index"

View File

@ -4,9 +4,9 @@ import store from './store'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken } from '@/utils/auth'
import getPageTitle from '@/utils/get-page-title'
import { OSSclient } from './utils/oss'
import Vue from 'vue'
import { OSSclient } from './utils/oss'
// import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false })
@ -19,21 +19,27 @@ router.beforeEach(async(to, from, next) => {
// 确定用户是否已登录
const hasToken = getToken()
Vue.prototype.toPath = to.path
Vue.prototype.$path = []
if (hasToken) {
if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') {
if (to.path === '/ReviewersResearch') {
await this.$store.dispatch('user/logout')
OSSclient()
}
if (to.path === '/ReviewersResearchForm') {
OSSclient()
}
next()
NProgress.done()
} else {
if (!Vue.prototype.OSSclient) {
OSSclient()
}
OSSclient()
const hasGetUserInfo = store.getters.name
if (hasGetUserInfo) {
next()
} else {
try {
// 获取用户信息
// OSSclient()
await store.dispatch('user/getInfo')
const accessRoutes = await store.dispatch('permission/generateRoutes')
router.addRoutes(accessRoutes)
@ -50,6 +56,9 @@ router.beforeEach(async(to, from, next) => {
/* has no token*/
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录whiteList中直接进入
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading'){
OSSclient()
}
next()
} else {
if (to.path === '/researchForm') {

View File

@ -40,6 +40,7 @@ const getters = {
activeSeries: state => state.reading.activeSeries,
lastCanvasTaskId: state => state.reading.lastCanvasTaskId,
imageQuality: state => state.reading.imageQuality,
imageQualityIssues: state => state.reading.imageQualityIssues,
language: state => state.lang.language,
TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount,
TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount,

View File

@ -8,9 +8,10 @@ import {
}
from '@/api/trials'
import Vue from 'vue'
import { getCustomTag } from '@/api/reading'
import requestPoolManager from '@/utils/request-pool'
import { getReadingVisitStudyList } from '@/api/trials'
import { getCustomTag } from '@/api/reading'
const hangingAgreement = [
{ name: 'A', row: 1, col: 1 },
{ name: 'A|A', row: 1, col: 2 },
@ -28,7 +29,8 @@ const getDefaultState = () => {
currentReadingTaskState: 2,
activeSeries: {},
lastCanvasTaskId: '',
imageQuality: null
imageQuality: null,
imageQualityIssues: null
}
}
function getQuestions(questions) {
@ -154,6 +156,7 @@ const actions = {
})
},
getVisitTasks({ state }, visitTaskId) {
console.log('getVisitTasks')
return new Promise(resolve => {
getRelatedVisitTask({ visitTaskId: visitTaskId }).then(res => {
res.Result.forEach(item => {
@ -181,6 +184,7 @@ const actions = {
state.activeSeries = {}
state.lastCanvasTaskId = ''
state.imageQuality = null
state.imageQualityIssues = null
resolve()
})
},
@ -221,6 +225,7 @@ const actions = {
modality: series.Modality,
description: series.Description,
previewImageUrl: study.IsDicom ? series.ImageResizePath ? Vue.prototype.OSSclientConfig.basePath + series.ImageResizePath : `/api/series/preview/${series.Id}` : Vue.prototype.OSSclientConfig.basePath + `${series.NoneDicomFileFirstFile}`,
instanceHtmlPathList: series.InstanceHtmlPathList,
instanceCount: series.InstanceCount,
prefetchInstanceCount: series.InstanceCount,
loadStatus: true,
@ -228,8 +233,8 @@ const actions = {
studyId: study.StudyId,
studyIndex: 0,
seriesIndex: index,
studyCode: study.StudyCode,
taskBlindName: state.visitTaskList[i].TaskBlindName,
taskName: state.visitTaskList[i].TaskName,
visitTaskId: obj.visitTaskId,
readingTaskState: state.visitTaskList[i].ReadingTaskState,
isBaseLineTask: state.visitTaskList[i].IsBaseLineTask,
@ -274,10 +279,12 @@ const actions = {
obj.StudyList = []
var i = state.visitTaskList.findIndex(i => i.VisitId === res.Result[idx].VisitId)
if (i > -1) {
state.visitTaskList.splice(i, 1)
// state.visitTaskList.splice(i, 1)
state.visitTaskList.splice(i, 1, obj)
requestPoolManager.resetCachedTask()
} else {
state.visitTaskList.push(obj)
}
state.visitTaskList.push(obj)
}
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
@ -314,6 +321,7 @@ const actions = {
getDicomReadingQuestionAnswer(params).then(res => {
state.visitTaskList[index].Questions = res.Result
state.visitTaskList[index].questionsInit = true
state.visitTaskList[index].QuestionMarkInfoList = res.OtherInfo.QuestionMarkInfoList
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
}).catch(() => { resolve() })
@ -331,6 +339,7 @@ const actions = {
getDicomReadingQuestionAnswer(params).then(res => {
state.visitTaskList[index].Questions = res.Result
state.visitTaskList[index].questionsInit = true
state.visitTaskList[index].QuestionMarkInfoList = res.OtherInfo.QuestionMarkInfoList
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
}).catch(() => { resolve() })
@ -418,60 +427,6 @@ const actions = {
resolve()
})
},
getMeasuredData({ state }, visitTaskId) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
if (state.visitTaskList[index].measureDataInit) {
resolve()
} else {
getTableAnswerRowInfoList(visitTaskId).then(res => {
var arr = []
res.Result.forEach(el => {
if (el.MeasureData) {
el.MeasureData = JSON.parse(el.MeasureData)
el.MeasureData.data.remark = el.OrderMarkName
}
arr.push(el)
})
state.visitTaskList[index].MeasureData = arr
state.visitTaskList[index].measureDataInit = true
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
}).catch(() => { resolve() })
}
})
},
refreshMeasuredData({ state }, visitTaskId) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
getTableAnswerRowInfoList(visitTaskId).then(res => {
var arr = []
res.Result.forEach(el => {
if (el.MeasureData) {
el.MeasureData = JSON.parse(el.MeasureData)
el.MeasureData.data.remark = el.OrderMarkName
}
arr.push(el)
})
state.visitTaskList[index].MeasureData = arr
state.visitTaskList[index].measureDataInit = true
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
}).catch(() => { resolve() })
})
},
getNoneDicomMeasuredData({ state }, visitTaskId) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
var measureData = state.visitTaskList[index].MeasureData
var noneDicomMeasureData = measureData.filter(item => !item.IsDicomReading)
resolve(noneDicomMeasureData)
})
},
getCustomizeMeasuredData({ state }, visitTaskId) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
@ -495,6 +450,33 @@ const actions = {
}
})
},
getMeasuredData({ state }, visitTaskId) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
if (state.visitTaskList[index].measureDataInit) {
resolve()
} else {
getTableAnswerRowInfoList(visitTaskId).then(res => {
var arr = []
res.Result.forEach(el => {
if (el.MeasureData) {
el.MeasureData = JSON.parse(el.MeasureData)
el.MeasureData.data.remark = el.OrderMarkName
}
if (el.OtherMeasureData) {
el.OtherMeasureData = JSON.parse(el.OtherMeasureData)
el.OtherMeasureData.data.remark = el.OrderMarkName
}
arr.push(el)
})
state.visitTaskList[index].MeasureData = arr
state.visitTaskList[index].measureDataInit = true
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
}).catch(() => { resolve() })
}
})
},
removeCustomizeMeasuredData({ state }, obj) {
return new Promise(async resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
@ -552,6 +534,98 @@ const actions = {
}).catch(() => { resolve() })
})
},
refreshMeasuredData({ state }, visitTaskId) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
getTableAnswerRowInfoList(visitTaskId).then(res => {
var arr = []
res.Result.forEach(el => {
if (el.MeasureData) {
el.MeasureData = JSON.parse(el.MeasureData)
el.MeasureData.data.remark = el.OrderMarkName
}
arr.push(el)
})
state.visitTaskList[index].MeasureData = arr
state.visitTaskList[index].measureDataInit = true
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
}).catch(() => { resolve() })
})
},
getNoneDicomMeasuredData({ state }, visitTaskId) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
var measureData = state.visitTaskList[index].MeasureData
var noneDicomMeasureData = measureData.filter(item => !item.IsDicomReading)
resolve(noneDicomMeasureData)
})
},
addMeasuredData({ state }, obj) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
var measureData = state.visitTaskList[index].MeasureData
// var idx = measureData.findIndex(item => item.MeasureData.uuid === obj.data.MeasureData.data.uuid)
var idx = measureData.findIndex(item => item.QuestionId === obj.data.QuestionId && item.RowIndex === obj.data.RowIndex)
if (idx > -1) {
for (const k in state.visitTaskList[index].MeasureData[idx]) {
if (k !== 'Id' && obj.data[k]) {
state.visitTaskList[index].MeasureData[idx][k] = obj.data[k]
}
}
// state.visitTaskList[index].MeasureData[idx].MeasureData = obj.data.MeasureData
console.log('更新标记成功', idx)
} else {
state.visitTaskList[index].MeasureData.push(obj.data)
console.log('新增标记成功')
}
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
console.log(state.visitTaskList)
resolve()
})
},
addOrUpdateNonTargetMeasuredData({ state }, obj) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
var measureData = state.visitTaskList[index].MeasureData
console.log('addOrUpdateNonTargetMeasuredData')
var idx = measureData.findIndex(item => item.QuestionId === obj.data.QuestionId && item.OrderMarkName === obj.data.OrderMarkName)
if (idx > -1) {
for (const k in state.visitTaskList[index].MeasureData[idx]) {
if (k !== 'Id' && obj.data[k]) {
state.visitTaskList[index].MeasureData[idx][k] = obj.data[k]
}
}
console.log('更新标记成功', idx)
} else {
state.visitTaskList[index].MeasureData.push(obj.data)
console.log('新增标记成功')
}
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
})
},
removeNonTargetMeasuredData({ state }, obj) {
return new Promise(resolve => {
console.log('removeNonTargetMeasuredData')
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
var measureData = state.visitTaskList[index].MeasureData
var idx = measureData.findIndex(item => item.QuestionId === obj.questionId)
if (idx > -1) {
if (measureData[idx].FristAddTaskId) {
measureData[idx].MeasureData = ''
console.log('清除标记成功', idx)
} else {
measureData.splice(idx, 1)
console.log('移除标记成功', idx)
}
state.visitTaskList[index].MeasureData = measureData
}
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
})
},
addCustomizeMeasuredData({ state }, obj) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
@ -587,29 +661,6 @@ const actions = {
resolve()
})
},
addMeasuredData({ state }, obj) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
var measureData = state.visitTaskList[index].MeasureData
// var idx = measureData.findIndex(item => item.MeasureData.uuid === obj.data.MeasureData.data.uuid)
var idx = measureData.findIndex(item => item.QuestionId === obj.data.QuestionId && item.RowIndex === obj.data.RowIndex)
if (idx > -1) {
for (const k in state.visitTaskList[index].MeasureData[idx]) {
if (k !== 'Id' && obj.data[k]) {
state.visitTaskList[index].MeasureData[idx][k] = obj.data[k]
}
}
// state.visitTaskList[index].MeasureData[idx].MeasureData = obj.data.MeasureData
console.log('更新标记成功', idx)
} else {
state.visitTaskList[index].MeasureData.push(obj.data)
console.log('新增标记成功')
}
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
})
},
removeMeasuredData({ state }, obj) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
@ -698,11 +749,6 @@ const actions = {
// var path = id.split('/')[id.split('/').length - 1]
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
})
// } else {
// series.InstanceList.forEach((id) => {
// imageIds.push(`wadouri:${process.env.VUE_APP_DICOM_PATH}/instance/content/${id}`)
// })
// }
} catch (e) {
console.log(e)
}
@ -719,18 +765,20 @@ const actions = {
description: series.Description,
previewImageUrl: study.IsDicom ? series.ImageResizePath ? Vue.prototype.OSSclientConfig.basePath + series.ImageResizePath : `/api/series/preview/${series.Id}` : Vue.prototype.OSSclientConfig.basePath + `${series.NoneDicomFileFirstFile}`,
instanceCount: series.InstanceCount,
instanceHtmlPathList: series.InstanceHtmlPathList,
prefetchInstanceCount: 0,
loadStatus: false,
imageloadedArr: [],
studyId: study.StudyId,
studyIndex: studyIndex,
seriesIndex: seriesIndex,
studyCode: study.StudyCode,
taskBlindName: state.visitTaskList[index].TaskBlindName,
taskName: state.visitTaskList[index].TaskName,
visitTaskId: obj.visitTaskId,
readingTaskState: state.visitTaskList[index].ReadingTaskState,
isBaseLineTask: state.visitTaskList[index].IsBaseLineTask,
isCurrentTask: state.visitTaskList[index].IsCurrentTask,
isExistsClinicalData: state.visitTaskList[index].IsExistsClinicalData,
isLoading: false,
isBeMark: series.IsBeMark,
ww: series.WindowWidth,
@ -768,6 +816,7 @@ const actions = {
// 设置当前序列状态为已下载完成
studyList[i].SeriesList[j].loadStatus = true
}
break
}
}
}
@ -781,6 +830,24 @@ const actions = {
resolve()
})
},
updateSeriesList({ state }, obj) {
return new Promise(resolve => {
if (obj.visitTaskindex > -1 && obj.studyIndex > -1 && obj.seriesIndex > -1) {
var studyList = state.visitTaskList[obj.visitTaskindex].StudyList || []
if (studyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr.indexOf(obj.imageId) < 0) {
studyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr.push(obj.imageId)
++studyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount
} else {
studyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount = studyList[obj.studyIndex].SeriesList[obj.seriesIndex].instanceCount
// 设置当前序列状态为已下载完成
studyList[obj.studyIndex].SeriesList[obj.seriesIndex].loadStatus = true
}
state.visitTaskList[obj.visitTaskindex].StudyList = studyList
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
}
resolve()
})
},
setStatus({ state }, obj) {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
state.visitTaskList[index].IsInit = true
@ -809,6 +876,45 @@ const actions = {
},
setImageQuality({ state }, imageQuality) {
state.imageQuality = isNaN(parseInt(imageQuality)) ? null : parseInt(imageQuality)
},
setImageQualityIssues({ state }, imageQualityIssues) {
state.imageQualityIssues = isNaN(parseInt(imageQualityIssues)) ? null : parseInt(imageQualityIssues)
},
addQuestionMeasuredData({ state }, obj) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
var measureData = state.visitTaskList[index].QuestionMarkInfoList
var idx = measureData.findIndex(item => item.QuestionId === obj.data.QuestionId)
if (idx > -1) {
for (const k in state.visitTaskList[index].QuestionMarkInfoList[idx]) {
if (k !== 'Id' && obj.data[k]) {
state.visitTaskList[index].QuestionMarkInfoList[idx][k] = obj.data[k]
}
}
console.log('更新标记成功', idx)
} else {
state.visitTaskList[index].QuestionMarkInfoList.push(obj.data)
console.log('新增标记成功')
}
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
})
},
removeQuestionMeasuredData({ state }, obj) {
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
var measureData = state.visitTaskList[index].QuestionMarkInfoList
if (obj.orderMarkName) {
const i = measureData.findIndex(item => item.QuestionId === obj.questionId && item.OrderMarkName === obj.orderMarkName)
if (i > -1) {
measureData[i].MeasureData = ''
console.log('清除标记成功', i)
}
state.visitTaskList[index].QuestionMarkInfoList = measureData
}
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
resolve()
})
}
}

View File

@ -1,5 +1,6 @@
const OSS = require('ali-oss')
const router = require('@/router');
const Minio = require('minio')
const stream = require('stream')
import Vue from 'vue'
const { GenerateSTS, GetObjectStoreToken } = require('../api/user.js')
@ -51,6 +52,43 @@ async function ossGenerateSTS() {
}
}
break
case 'MinIO':
let minioClient = new Minio.Client(Vue.prototype.OSSclientConfig);
Vue.prototype.OSSclient = {
put: function (objectName, object) {
return new Promise(async (resolve, reject) => {
try {
var name = objectName.split('/')[objectName.split('/').length - 1]
let _vm = router.default.app
if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') {
var objectItem = objectName.split('/')
objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1]
objectName = objectItem.join('/')
}
const reader = new FileReader();
reader.onload = (ex) => {
const bufferStream = new stream.PassThrough()
bufferStream.end(Buffer.from(ex.target.result))
minioClient.putObject(Vue.prototype.OSSclientConfig.bucketName, objectName, bufferStream, function(err,etag) {
if (err) {
console.log(err)
reject()
} else {
resolve({
name: objectName,
url: 'http://www.abc.com' + objectName
})
}
})
};
reader.readAsArrayBuffer(object);
} catch (e) {
console.log(e)
}
})
}
}
break
}
return
}

View File

@ -1,90 +1,70 @@
import * as cornerstone from 'cornerstone-core'
var taskPool = [] // 请求池
let numRequest = 0 // 正在执行数量
const maxRequest = 1 // 可配置
const maxRequest = 5 // 可配置
let taskTimer // 轮询的定时器
var pendingList =[]
var cachedTask = {} // 存放的任务数据
const maxTask = 6
// 预加载池的添加
function addTaskIntoPool(task) {
return new Promise((resolve, reject) => {
taskPool.forEach(task=>{
task.priority = task.priority
})
const cache = cachedTask[task.key]
const callback = (executeRes) => {
if (executeRes.success) {
resolve(executeRes.res)
} else {
reject(executeRes.err)
}
}
const priority = task.priority || 0;
if (cache) {
cache.priority = priority
task.callback =callback
} else {
task.callback =callback
cachedTask[task.key] = task
taskPool.push(task)
}
})
}
let sortType = 1
var i= 0
let startExecuteTask = null
let endExecuteTask = performance.now()
// 执行下载
function executeTask() {
async function executeTask() {
// console.log(taskPool)
endExecuteTask = performance.now()
i++
stopTaskTimer()
if (taskPool.length > 0) {
numRequest = 0
const executeRequest = maxRequest - numRequest
// let startSortTime = performance.now()
// if( sortType ){
// maxRequest = 6
// }
// let endSortTime = performance.now()
var requestNum = Math.min(taskPool.length, maxRequest)
const tasks = taskPool.splice(0, requestNum);
if (executeRequest > 0) {
const taskPromises = tasks.map((task) => {
return task.execute().then((result) => {
task.callback({ success: true, res: result })
for (let i = 0; i < executeRequest; i++) {
sortTaskPool()
const task = taskPool.shift()
if (!task) {
return
}
numRequest++
task.execute().then((res) => {
numRequest--
task.callback({ success: true, res })
executeTask()
}, (err) => {
numRequest--
task.callback({ success: false,err })
executeTask()
})
}
}
}).catch((error) => {
task.callback({ success: true, err: error })
})
})
// let starLoadTime = performance.now()
await Promise.all(taskPromises)
// let endLoadTime = performance.now()
// let isTest = process.env.VUE_APP_OSS_PATH === '/test/dist'
// if(i > 1 && isTest){
// console.log(`第${i}次:${startExecuteTask?endExecuteTask - startExecuteTask:0}:${endSortTime - startSortTime}:${endLoadTime - starLoadTime}`)
// }
// startExecuteTask = performance.now()
executeTask()
}else{
startTaskTimer()
}
}
function sortTaskPool() {
if (taskPool.length > 0) {
taskPool.sort((a, b) => b.priority-a.priority )
}
}
// 轮询检查请求池中是否有请求需要执行
function startTaskTimer() {
if(taskTimer){
clearInterval(taskTimer)
taskTimer = null
}
if (taskTimer) return; // 如果已存在定时器,则不重复启动
taskTimer = setInterval(() => {
if (taskPool.length > 0) {
stopTaskTimer()
executeTask()
}else{
return
stopTaskTimer();
executeTask();
}
}, 50)
}, 50);
}
// 停止轮询
@ -111,6 +91,20 @@ function loadAndCacheImagePlus(imageId,seriesId, priority) {
}
})
}
// 预加载池的添加
function addTaskIntoPool(task) {
return new Promise((resolve, reject) => {
const callback = (executeRes) => {
if (executeRes.success) {
resolve(executeRes.res)
} else {
reject(executeRes.err)
}
}
task.callback =callback
taskPool.push(task)
})
}
function removeTask(seriesId){
stopTaskTimer()
if (taskPool.length > 0) {
@ -118,21 +112,31 @@ function removeTask(seriesId){
if(taskPool[i] && taskPool[i].seriesId === seriesId){
delete cachedTask[taskPool[i].key]
taskPool.splice(i,1)
}
}
}
startTaskTimer()
}
function changePriority(seriesId){
taskPool.map(task=>{
if(task.seriesId === seriesId){
task.priority = parseInt(new Date().getTime()) * 10
}
})
sortTaskPool()
}
function setSortType(type){
sortType = type
}
function resetRequestPool(){
taskPool = []
pendingList =[]
cachedTask = {}
sortType = 1
}
function resetCachedTask(){
taskPool = []
pendingList =[]
cachedTask = {}
}
function buildImageRequestTask(imageId,seriesId, config = {}) {
@ -149,6 +153,9 @@ function buildImageRequestTask(imageId,seriesId, config = {}) {
export default {
addTaskIntoPool,
executeTask,
setSortType,
sortTaskPool,
changePriority,
startTaskTimer,
stopTaskTimer,
loadAndCacheImagePlus,

View File

@ -371,7 +371,7 @@ export default {
}
.viewerLeftSidePanel .viewernavigatorwrapper {
display: flex;
width: 210px;
width: 200px;
height: 84px;
padding: 1px 2px 1px 8px;
margin: 6px 0 6px 1px;

View File

@ -404,7 +404,7 @@ export default {
}
.viewerContainer .viewerLeftSidePanel .viewernavigatorwrapper {
display: flex;
width: 210px;
width: 200px;
height: 84px;
padding: 1px 2px 1px 8px;
margin: 6px 0 6px 1px;

View File

@ -39,12 +39,21 @@
<script>
export default {
name: 'CustomWwwcForm',
props: {
ww: {
type: Number,
default: null
},
wc: {
type: Number,
default: null
}
},
data() {
return {
form: {
ww: null,
wc: null
ww: this.ww,
wc: this.wc
},
rules: {
ww: [

View File

@ -7,9 +7,8 @@
element-loading-background="rgba(0, 0, 0, 0.8)"
style="position:relative;"
class="cornerstone-element"
@contextmenu.prevent="onContextmenu"
@mousemove="sliderMousemove"
@mouseup="sliderMouseup"
@contextmenu.prevent="onContextmenu"
>
<!-- 临床数据 -->
<div v-if="stack.isExistsClinicalData" class="info-cd" @click.stop="handleViewCD($event)">
@ -33,7 +32,7 @@
<i class="el-icon-caret-left" />
</div>
<div class="blind_name_wrapper">
{{ stack.taskName }}
{{ stack.taskBlindName }}
</div>
<div
class="arrw_div_wrapper"
@ -44,13 +43,13 @@
<i class="el-icon-caret-right" />
</div>
</div>
<div v-show="dicomInfo.series" class="info-series">
<h2 v-if="isReadingShowSubjectInfo" style="color:#f44336;padding: 5px 0px;margin: 0;">{{ subjectCode }} {{ stack.taskName }}</h2>
<div>Series: #{{ dicomInfo.series }}</div>
<div class="info-series">
<h2 v-if="isReadingShowSubjectInfo" style="color:#f44336;padding: 5px 0px;margin: 0;">{{ subjectCode }} {{ stack.taskBlindName }}</h2>
<div v-show="dicomInfo.series">Series: #{{ dicomInfo.series }}</div>
<div>Image: #{{ dicomInfo.frame }}</div>
<div>{{ dicomInfo.modality }}</div>
</div>
<div v-show="dicomInfo.series" class="info-image">
<div class="info-image">
<div v-show="mousePosition.mo">
Pos: {{ mousePosition.x?mousePosition.x.toFixed(0):'' }}, {{ mousePosition.y?mousePosition.y.toFixed(0):'' }}
</div>
@ -83,7 +82,7 @@
<!-- <div>{{ dicomInfo.time }}</div> -->
</div>
<div ref="sliderBox" class="my_slider_box" style="position: absolute;right: 1px;height: calc(100% - 140px);transform: translateY(-50%);top: calc(50% - 30px);width: 10px;background: #333;cursor: pointer" @click.stop="goViewer($event)">
<div :style="{top: height + '%'}" style="z-index:10;background: #9e9e9e;height: 20px;width: 100%;position: absolute;top: 0;cursor: move" @mousedown.stop="sliderMousedown($event)" />
<div :style="{top: height + '%'}" style="z-index:10;background: #9e9e9e;height: 20px;width: 100%;position: absolute;top: 0;cursor: move" @click.stop.prevent="() => {return}" @mousedown.stop="sliderMousedown($event)" />
</div>
<div style="position: absolute;left: 50%;top: 30px;color: #f44336;transform: translateX(-50%);">
{{ markers.top }}
@ -100,8 +99,8 @@
</div>
<div class="info-instance">
<div v-show="dicomInfo.location">Location: {{ dicomInfo.location }}</div>
<div v-show="dicomInfo.thick">Slice Thickness: {{ dicomInfo.thick }}mm</div>
<div v-if="dicomInfo.location">Location: {{ `${Number(dicomInfo.location).toFixed(digitPlaces)} mm` }}</div>
<div v-show="dicomInfo.thick">Slice Thickness: {{ `${dicomInfo.thick} mm` }}</div>
<div v-show="dicomInfo.wwwc">WW/WL: {{ dicomInfo.wwwc }}</div>
</div>
@ -159,6 +158,7 @@ cornerstoneTools.external.cornerstoneMath = cornerstoneMath
cornerstoneTools.toolStyle.setToolWidth(1)
cornerstoneTools.toolColors.setToolColor('rgb(255, 0, 0)')
cornerstoneTools.toolColors.setActiveColor('rgb(0, 255, 0)')
cornerstoneTools.store.state.deleteIfHandleOutsideImage = false
// cornerstoneTools.init({ globalToolSyncEnabled: true })
cornerstoneTools.init()
export default {
@ -220,9 +220,9 @@ export default {
firstImageLoading: false,
visitTaskId: '',
taskBlindName: '',
taskName: '',
frame: null,
imageRendered: false
imageRendered: false,
isExistsClinicalData: false
// preventCache: true
},
dicomInfo: {
@ -332,13 +332,14 @@ export default {
},
mounted() {
console.log(cornerstoneTools)
this.subjectCode = this.$router.currentRoute.query.subjectCode
document.addEventListener('mouseup', () => {
this.sliderMouseup()
})
// document.addEventListener('mousemove', () => {
// this.sliderMousemove()
// })
document.addEventListener('mousemove', (e) => {
this.sliderMousemove(e)
})
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
this.type = this.$router.currentRoute.query.type ? this.$router.currentRoute.query.type : ''
@ -375,10 +376,10 @@ export default {
}
)
// this.canvas.addEventListener(
// 'cornerstonetoolsmeasurementremoved',
// this.onMeasurementremoved
// )
this.canvas.addEventListener(
'cornerstonetoolsmeasurementremoved',
this.onMeasurementremoved
)
// EVENTS.MOUSE_UP
this.canvas.addEventListener('cornerstonetoolsmouseup', this.mouseUp)
this.canvas.addEventListener('cornerstonetoolsmousedown', this.mouseDown)
@ -537,7 +538,7 @@ export default {
this.mousePosition.y = currentPoints.image.y + 1
this.mousePosition.mo = stats.mo
this.mousePosition.suv = stats.suv
if (this.isFirstChangeTask && this.pointNearTool(e)) {
if ((this.isFirstChangeTask || this.disabledMarks.length > 0) && this.pointNearTool(e)) {
e.stopImmediatePropagation()
e.stopPropagation()
e.preventDefault()
@ -553,7 +554,7 @@ export default {
mouseDown(e) {
this.image = e.detail.image
var pointNearTool = this.pointNearTool(e)
if (this.isFirstChangeTask && pointNearTool) {
if ((this.isFirstChangeTask || this.disabledMarks.length > 0) && pointNearTool) {
e.stopImmediatePropagation()
e.stopPropagation()
e.preventDefault()
@ -602,6 +603,15 @@ export default {
})
return arr
},
getMergeMarks(measureDatas) {
var arr = []
measureDatas.map(i => {
if ((i.LesionType === 0) && i.SplitOrMergeType === 1) {
arr.push(i.OrderMarkName)
}
})
return arr
},
getRGBPixels(element, x, y, width, height) {
if (!element) {
return
@ -650,7 +660,7 @@ export default {
if (PX < 0) return
if (PX > boxHeight) return
var height = PX * 100 / boxHeight
var index = Math.trunc(this.stack.imageIds.length * this.height / 100)
var index = Math.trunc(this.stack.imageIds.length * height / 100)
index = index > this.stack.imageIds.length ? this.stack.imageIds.length : index < 0 ? 0 : index
// if (!cornerstone.imageCache.getImageLoadObject(this.stack.imageIds[index])) return
this.height = height
@ -662,58 +672,68 @@ export default {
this.sliderInfo.isMove = false
},
getMeasureData() {
console.log('getMeasureData')
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId)
this.measureData = this.visitTaskList[idx].MeasureData
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
const imageId = this.stack.imageIds[this.stack.currentImageIdIndex]
ToolStateManager.clearImageIdToolState(imageId)
cornerstone.updateImage(this.canvas, true)
var criterionType = parseInt(localStorage.getItem('CriterionType'))
if (this.isFirstChangeTask) {
this.disabledMarks = this.getDisabledMarks(this.visitTaskList[idx].MeasureData)
} else if (criterionType === 2) {
this.disabledMarks = this.getMergeMarks(this.visitTaskList[idx].MeasureData)
} else {
this.disabledMarks = []
}
return true
},
onContextmenu(event) {
if (this.isBaseline || this.readingTaskState >= 2 || this.CriterionType === 10) return false
const x = event.offsetX
const y = event.offsetY
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
event.preventDefault()
// if (this.isBaseline || this.readingTaskState >= 2 || this.CriterionType === 10) return false
// const x = event.offsetX
// const y = event.offsetY
// const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
var element = cornerstone.getEnabledElement(this.canvas)
var { imageId } = element.image
this.measuredTools.map(toolType => {
const toolState = ToolStateManager.getImageIdToolState(imageId, toolType)
if (!toolState) return
var toolObj = new cornerstoneTools[`${toolType}Tool`]()
// var element = cornerstone.getEnabledElement(this.canvas)
// var { imageId } = element.image
// this.measuredTools.map(toolType => {
// const toolState = ToolStateManager.getImageIdToolState(imageId, toolType)
// if (!toolState) return
// var toolObj = new cornerstoneTools[`${toolType}Tool`]()
var i = toolState.data.findIndex(data => toolObj.pointNearTool(this.canvas, data, { x, y }, 'mouse'))
if (i === -1) return false
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === toolState.data[i].uuid)
var rowId = null
if (idx > -1) {
rowId = this.measureData[idx].RowId
}
if (rowId) {
this.selectedLesion = toolState.data[i]
this.$contextmenu({
items: [
// {
// label: 'Split',
// divided: true,
// onClick: () => {
// this.handleSplit()
// }
// }
],
event,
x: event.clientX,
y: event.clientY,
customClass: 'class-a',
zIndex: 3,
minWidth: 100
})
return false
} else {
return false
}
})
// var i = toolState.data.findIndex(data => toolObj.pointNearTool(this.canvas, data, { x, y }, 'mouse'))
// if (i === -1) return false
// var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === toolState.data[i].uuid)
// var rowId = null
// if (idx > -1) {
// rowId = this.measureData[idx].RowId
// }
// if (rowId) {
// this.selectedLesion = toolState.data[i]
// this.$contextmenu({
// items: [
// // {
// // label: 'Split',
// // divided: true,
// // onClick: () => {
// // this.handleSplit()
// // }
// // }
// ],
// event,
// x: event.clientX,
// y: event.clientY,
// customClass: 'class-a',
// zIndex: 3,
// minWidth: 100
// })
// return false
// } else {
// return false
// }
// })
},
handleSplit() {
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === this.selectedLesion.uuid)
@ -769,6 +789,7 @@ export default {
measureData.data = toolState.data[i]
measureData.type = toolType
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
var uuid = toolState.data[i].uuid
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
if (idx > -1) {
@ -864,6 +885,7 @@ export default {
renderMeasuredData(e) {
this.stack.frame = !isNaN(parseInt(this.stack.frame)) ? parseInt(this.stack.frame) : 0
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId)
if (idx === -1) return
this.measureData = this.visitTaskList[idx].MeasureData
const { element } = e.detail
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
@ -1015,6 +1037,7 @@ export default {
measureData.data = toolState.data[i]
measureData.type = toolType
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter)
measureData.data.active = false
@ -1054,15 +1077,20 @@ export default {
this.stack.seriesIndex = dicomSeries.seriesIndex
this.stack.sliceThickness = dicomSeries.sliceThickness
this.stack.instanceCount = dicomSeries.instanceCount
this.stack.isExistsClinicalData = dicomSeries.isExistsClinicalData
// this.measuredData = dicomSeries.measuredData
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === dicomSeries.visitTaskId)
this.stack.visitTaskNum = this.visitTaskList[idx].VisitTaskNum
this.isFirstChangeTask = this.visitTaskList[idx].IsFirstChangeTask
var criterionType = parseInt(localStorage.getItem('CriterionType'))
if (this.isFirstChangeTask) {
this.disabledMarks = this.getDisabledMarks(this.visitTaskList[idx].MeasureData)
} else if (criterionType === 2) {
this.disabledMarks = this.getMergeMarks(this.visitTaskList[idx].MeasureData)
} else {
this.disabledMarks = []
}
this.maxVistNum = this.visitTaskList[this.visitTaskList.length - 1].VisitTaskNum
this.minVistNum = this.visitTaskList[0].VisitTaskNum
this.measureData = this.visitTaskList[idx].MeasureData
@ -1099,8 +1127,8 @@ export default {
// resolve()
// })
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
.then(image => {
scope.onFirstImageLoaded(image)
.then(async image => {
await scope.onFirstImageLoaded(image)
resolve()
})
.catch((error) => {
@ -1113,84 +1141,86 @@ export default {
},
onFirstImageLoaded(image) {
console.log('onFirstImageLoaded')
return new Promise(async resolve => {
const element = this.$refs.canvas
var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
cornerstone.displayImage(this.canvas, image, viewport)
const element = this.$refs.canvas
var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
cornerstone.displayImage(this.canvas, image, viewport)
if (!this.toolState.initialized) {
this.toolState.initialized = true
const toolButtons = document.querySelectorAll('[data-tool]')
if (!this.toolState.initialized) {
this.toolState.initialized = true
const toolButtons = document.querySelectorAll('[data-tool]')
// const scope = this
Array.from(toolButtons).forEach((toolBtn) => {
// const scope = this
Array.from(toolButtons).forEach((toolBtn) => {
// Add the tool
const toolName = toolBtn.getAttribute('data-tool')
const apiTool = cornerstoneTools[`${toolName}Tool`]
if (apiTool) {
const toolAlreadyAddedToElement = cornerstoneTools.getToolForElement(element, apiTool)
const toolName = toolBtn.getAttribute('data-tool')
const apiTool = cornerstoneTools[`${toolName}Tool`]
if (apiTool) {
const toolAlreadyAddedToElement = cornerstoneTools.getToolForElement(element, apiTool)
if (!toolAlreadyAddedToElement) {
if (toolName === 'Length') {
cornerstoneTools.addToolForElement(element, LengthTool, { configuration: { handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true, digits: this.digitPlaces, drawHandles: true }})
} else if (toolName === 'Bidirectional') {
if (!toolAlreadyAddedToElement) {
if (toolName === 'Length') {
cornerstoneTools.addToolForElement(element, LengthTool, { configuration: { handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true, digits: this.digitPlaces, drawHandles: true }})
} else if (toolName === 'Bidirectional') {
// cornerstoneTools.addToolForElement(element, BidirectionalTool, { digits: this.digitPlaces })
// , handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true
cornerstoneTools.addToolForElement(element, BidirectionalTool, { configuration: { digits: this.digitPlaces, hideHandlesIfMoving: true }})
} else if (toolName === 'ArrowAnnotate') {
cornerstoneTools.addToolForElement(element, ArrowAnnotateTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
} else if (toolName === 'RectangleRoi') {
cornerstoneTools.addToolForElement(element, RectangleRoiTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
} else {
cornerstoneTools.addToolForElement(element, apiTool)
cornerstoneTools.addToolForElement(element, BidirectionalTool, { configuration: { digits: this.digitPlaces, hideHandlesIfMoving: true }})
} else if (toolName === 'ArrowAnnotate') {
cornerstoneTools.addToolForElement(element, ArrowAnnotateTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
} else if (toolName === 'RectangleRoi') {
cornerstoneTools.addToolForElement(element, RectangleRoiTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
} else {
cornerstoneTools.addToolForElement(element, apiTool)
}
}
}
})
if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.WwwcRegionTool)) {
cornerstoneTools.addToolForElement(element, cornerstoneTools.WwwcRegionTool)
}
})
if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.WwwcRegionTool)) {
cornerstoneTools.addToolForElement(element, cornerstoneTools.WwwcRegionTool)
}
if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)) {
cornerstoneTools.addToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)
}
cornerstoneTools.setToolActiveForElement(element, 'StackScrollMouseWheel', {})
if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)) {
cornerstoneTools.addToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)
}
cornerstoneTools.setToolActiveForElement(element, 'StackScrollMouseWheel', {})
if (!cornerstoneTools.getToolForElement(element, ScaleOverlayTool)) {
cornerstoneTools.addToolForElement(element, ScaleOverlayTool)
}
cornerstoneTools.setToolActiveForElement(element, 'ScaleOverlay', {})
cornerstoneTools.setToolActiveForElement(this.canvas, 'Zoom', {
mouseButtonMask: 2
})
cornerstoneTools.setToolActiveForElement(this.canvas, 'Pan', {
mouseButtonMask: 4
})
if (!cornerstoneTools.getToolForElement(element, ScaleOverlayTool)) {
cornerstoneTools.addToolForElement(element, ScaleOverlayTool)
}
cornerstoneTools.setToolActiveForElement(element, 'ScaleOverlay', {})
cornerstoneTools.setToolActiveForElement(this.canvas, 'Zoom', {
mouseButtonMask: 2
})
cornerstoneTools.setToolActiveForElement(this.canvas, 'Pan', {
mouseButtonMask: 4
})
// if (!cornerstoneTools.getToolForElement(element, OrientationMarkersTool)) {
// cornerstoneTools.addToolForElement(element, OrientationMarkersTool)
// }
// cornerstoneTools.setToolActiveForElement(element, 'OrientationMarkers', { })
}
}
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'playClip'])
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
// cornerstoneTools.stackPrefetch.enable(this.canvas)
cornerstone.updateImage(element, true)
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'playClip'])
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
// cornerstoneTools.stackPrefetch.enable(this.canvas)
cornerstone.updateImage(element, true)
this.stack.firstImageLoading = false
this.toolState.dicomInfoVisible = true
var instanceId = image.imageId.split('/')[image.imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
this.stack.instanceId = instanceId
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
this.resetWwwc()
this.stack.firstImageLoading = false
this.toolState.dicomInfoVisible = true
var instanceId = image.imageId.split('/')[image.imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
this.stack.instanceId = instanceId
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
this.resetWwwc()
resolve()
})
},
onNewImage(e) {
console.log('cornerstonenewimage')
@ -1295,20 +1325,11 @@ export default {
if (!imagePlane || !imagePlane.rowCosines || !imagePlane.columnCosines) {
return
}
const row = getOrientationString(imagePlane.rowCosines)
const column = getOrientationString(imagePlane.columnCosines)
const oppositeRow = invertOrientationString(row)
const oppositeColumn = invertOrientationString(column)
const markers = {
top: oppositeColumn,
bottom: column,
left: oppositeRow,
right: row
}
if (!markers) {
return
}
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
this.setMarkers()
@ -1340,6 +1361,7 @@ export default {
measureData.data = e.detail.measurementData
measureData.type = e.detail.toolName
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter)
@ -1356,6 +1378,7 @@ export default {
measureData.data = e.detail.measurementData
measureData.type = e.detail.toolName
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter)
const canvas = this.canvas.querySelector('canvas')
@ -1435,7 +1458,7 @@ export default {
}
},
onMeasurementremoved(e) {
console.log('================移除病灶=================', e)
},
onMeasurementmodified(e) {
//
@ -1470,6 +1493,7 @@ export default {
measureData.data = measurementData
measureData.type = toolType
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter)
measureData.data.active = false
@ -1477,14 +1501,6 @@ export default {
}
}
},
// updateImage(obj) {
// // const element = this.$refs.canvas
// // this.measuredData = obj.measuredData
// // const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
// // var imageId = `wadouri:/api/instance/content/${obj.instanceId}`
// // ToolStateManager.clearImageIdToolState(imageId)
// // cornerstone.updateImage(element, true)
// },
debounce(callback, delay) {
let timerId
return function() {

View File

@ -1,6 +1,6 @@
<template>
<div class="dicom-viewer-wrapper">
<div class="dicom-viewer-container">
<div class="dicom-viewer-container" style="position:relative">
<div class="dicom-tools">
<el-tooltip class="item" effect="dark" :content="`${$t('trials:reading:button:layout')}`" placement="bottom">
<div class="tool-wrapper" @click.stop="showPanel($event)" @mouseleave="handleMouseout">
@ -76,13 +76,13 @@
<!-- 调窗 -->
<!-- <div class="text">{{ $t('trials:reading:button:wwwc') }}<i class="el-icon-caret-bottom" /></div> -->
<div class="dropdown-content">
<ul style="width:165px;padding: 0 10px;">
<ul style="width:165px;">
<li v-for="item in wwwcArr" :key="item.label">
<a href="#" @click.prevent="setDicomCanvasWwwc(item)">
<div v-if="item.wc" style="display:flex;flex-direction: row;justify-content: space-between;">
<div v-if="item.wc !== null" style="display:flex;flex-direction: row;justify-content: space-between;">
<div>{{ item.label }}</div>
<div>{{ item.ww }}/{{ item.wc }}</div>
<div>{{ `${item.ww} / ${item.wc}` }}</div>
</div>
<div v-else style="text-align:left;">
{{ item.label }}
@ -179,7 +179,7 @@
<!-- 旋转 -->
<div class="text">{{ $t('trials:reading:button:rotate') }}<i class="el-icon-caret-bottom" /></div>
<div class="dropdown-content">
<ul style="width:100px;padding:0 10px;">
<ul style="width:100px;">
<li v-for="rotate in rotateArr" :key="rotate.label" style="text-align:left;">
<a href="#" @click.prevent="setDicomCanvasRotate(rotate.val)">{{ rotate.label }}</a>
</li>
@ -327,6 +327,7 @@
:is-reading-task-view-in-order="isReadingTaskViewInOrder"
:current-dicom-canvas-index="currentDicomCanvasIndex"
:custom-wwc-tpl="customWwcTpl"
:data-canvas-uid="`dicomCanvas${i-1}`"
@setCornerstoneStyle="setCornerstoneStyle(i-1)"
@setMeasureData="setMeasureData"
@modifyMeasureData="modifyMeasureData"
@ -362,6 +363,7 @@
:is-show="isShow"
:is-reading-show-subject-info="isReadingShowSubjectInfo"
/>
<RecistQuestionList
v-else-if="CriterionType !== 17"
ref="measurementList"
@ -369,10 +371,16 @@
:question-form-change-num="questionFormChangeNum"
:is-show="isShow"
:is-reading-show-subject-info="isReadingShowSubjectInfo"
@setToolPassive="setToolPassive"
/>
</div>
</div>
<!-- <div v-if="petct.visible" class="petct_wrapper">
<PetCt
:is-reading-show-subject-info="isReadingShowSubjectInfo"
@close="petct.visible = false"
/>
</div> -->
</div>
<el-dialog
@ -383,7 +391,7 @@
width="400px"
custom-class="base-dialog-wrapper"
>
<CustomWwwcForm @close="customWwc.visible = false" @setWwwc="setWwwc" />
<CustomWwwcForm :ww="activeCanvasWW" :wc="activeCanvasWC" @close="customWwc.visible = false" @setWwwc="setWwwc" />
</el-dialog>
<el-dialog
@ -440,8 +448,12 @@ import Hammer from 'hammerjs'
cornerstoneTools.external.cornerstone = cornerstone
cornerstoneTools.external.Hammer = Hammer
cornerstoneTools.external.cornerstoneMath = cornerstoneMath
import { getDoctorShortcutKey, getUserWLTemplateList } from '@/api/user'
import { mapGetters } from 'vuex'
import store from '@/store'
import { getToken } from '@/utils/auth'
// import DicomCanvas from './DicomCanvas'
// import PetCt from './Fusion/PetCt'
import DicomCanvas from '@/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue'
import RecistQuestionList from './Recist/QuestionList'
import RecistBMQuestionList from './RecistBM/QuestionList'
@ -453,12 +465,11 @@ import Hotkeys from './Hotkeys'
import WL from './WL'
import Others from './Others'
import DicomEvent from './DicomEvent'
import { mapGetters } from 'vuex'
import store from '@/store'
import { getDoctorShortcutKey, getUserWLTemplateList } from '@/api/user'
import html2canvas from 'html2canvas'
export default {
name: 'DicomViewer',
components: {
// PetCt,
DicomCanvas,
CustomWwwcForm,
Manuals,
@ -468,7 +479,8 @@ export default {
RecistQuestionList,
PCWGQuestionList,
RecistBMQuestionList,
IRecistQuestionList },
IRecistQuestionList
},
props: {
isShow: {
type: Boolean,
@ -565,7 +577,8 @@ export default {
{ label: 'CT Lungs', wc: -400, ww: 1500 },
{ label: 'CT Abdomen', wc: 60, ww: 400 },
{ label: 'CT Liver', wc: 40, ww: 400 },
{ label: 'CT Bone', wc: 300, ww: 1500 }
{ label: 'CT Bone', wc: 300, ww: 1500 },
{ label: 'CT Bone1', wc: 0, ww: 0 }
],
activeSeries: {},
@ -585,12 +598,17 @@ export default {
activeName: '1',
customWwcTpl: [],
isFullscreen: false,
manualsDialog: { visible: false }
manualsDialog: { visible: false },
studyList: [],
digitPlaces: 2,
activeCanvasWW: null,
activeCanvasWC: null,
activeTaskInfo: {}
}
},
computed: {
...mapGetters(['visitTaskList', 'currentReadingTaskState'])
...mapGetters(['visitTaskList', 'currentReadingTaskState', 'lastCanvasTaskId', 'imageQualityIssues'])
},
watch: {
currentReadingTaskState: {
@ -604,16 +622,53 @@ export default {
}
}
}
},
lastCanvasTaskId: {
immediate: true,
handler(v) {
// if (v) {
// console.log('lastCanvasTaskId')
// const i = this.visitTaskList.findIndex(i => i.VisitTaskId === v)
// if (i < 0) return
// var studyList = this.visitTaskList[i].StudyList || []
// studyList = studyList.filter(i => !i.IsCriticalSequence && i.Modalities.indexOf('CT') !== -1 && i.Modalities.indexOf('PT') !== -1)
// if (studyList.length === 0) return
// this.studyList = studyList
// } else {
// this.studyList = []
// }
}
},
activeSeries: {
immediate: true,
handler(v) {
if (v && v.isCurrentTask && this.studyList.length === 0) {
this.activeTaskInfo.taskName = v.taskBlindName
this.activeTaskInfo.visitTaskId = v.visitTaskId
const i = this.visitTaskList.findIndex(i => i.VisitTaskId === v.visitTaskId)
if (i < 0) return
this.activeTaskInfo.visitTaskIndex = i
var studyList = this.visitTaskList[i].StudyList || []
studyList = studyList.filter(i => !i.IsCriticalSequence && i.Modalities.indexOf('CT') !== -1 && i.Modalities.indexOf('PT') !== -1)
if (studyList.length === 0) return
this.studyList = studyList
}
}
},
imageQualityIssues: {
immediate: true,
handler(v) {}
}
},
mounted() {
this.getHotKeys()
this.getWwcTpl()
// cornerstone.imageCache.setMaximumSizeBytes(0)
const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
// const maximumSizeInBytes = 1024 * 1024 * 500
cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes)
// const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
// // const maximumSizeInBytes = 1024 * 1024 * 500
// cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes)
this.customWwc = { visible: false, title: this.$t('trials:reading:dagTitle:wwwcCustom') }
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
if (this.CriterionType === 10) {
@ -627,6 +682,8 @@ export default {
this.colormapsList = cornerstone.colors.getColormapsList()
this.currentDicomCanvas = this.$refs['dicomCanvas0'] ? this.$refs['dicomCanvas0'][0] : ''
this.trialId = this.$router.currentRoute.query.trialId
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
this.setCanvasStyle()
window.addEventListener('resize', this.setCanvasStyle)
DicomEvent.$on('updateImage', (instanceId) => {
@ -646,17 +703,48 @@ export default {
}
console.log('getMeasureData')
})
DicomEvent.$on('getScreenshots', (callback) => {
var base64Str = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].getScreenshots()
callback(base64Str)
console.log('getScreenshots')
DicomEvent.$on('getScreenshots', async(measuredData, callback) => {
if (this.currentDicomCanvasIndex > -1) {
if (!measuredData) return
await this.imageLocation(measuredData)
setTimeout(async() => {
// var base64Str = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].getScreenshots()
const divForDownloadViewport = document.querySelector(
`div[data-canvas-uid="dicomCanvas${this.currentDicomCanvasIndex}"]`
)
var canvas = await html2canvas(divForDownloadViewport)
var base64Str = canvas.toDataURL('image/png', 1)
console.log('getScreenshots')
callback(base64Str)
}, 50)
}
})
DicomEvent.$on('imageLocation', measuredData => {
if (!measuredData) return
this.imageLocation(measuredData)
DicomEvent.$on('imageLocation', async(measuredData) => {
return new Promise(async resolve => {
if (!measuredData) return
await this.imageLocation(measuredData)
console.log('imageLocation')
console.log('imageLocation')
resolve()
})
})
// DicomEvent.$on('imageLocation', async(measuredData, callback) => {
// if (measuredData) {
// await this.imageLocation(measuredData)
// }
// console.log('imageLocation')
// this.$nextTick(() => {
// if (callback) {
// callback()
// }
// })
// })
// DicomEvent.$on('imageLocation', measuredData => {
// if (!measuredData) return
// this.imageLocation(measuredData)
// console.log('imageLocation')
// })
DicomEvent.$on('setReadingState', readingTaskState => {
this.canvasObj[this.currentDicomCanvasIndex].readingTaskState = readingTaskState
if (this.activeTool) {
@ -678,6 +766,24 @@ export default {
DicomEvent.$on('setMeasuredToolsPassive', () => {
this.setMeasuredToolsPassive()
})
DicomEvent.$on('readingPageUpdate', (data) => {
if (!this.petctWindow) return
this.petctWindow.postMessage({ type: 'readingPageUpdate', data: data }, window.location)
})
DicomEvent.$on('setReadingState', (data) => {
if (!this.petctWindow) return
this.petctWindow.postMessage({ type: 'setReadingState', data: data }, window.location)
})
DicomEvent.$on('closePetct', () => {
if (this.petctWindow) {
this.petctWindow.close()
}
})
window.addEventListener('beforeunload', () => {
if (this.petctWindow) {
this.petctWindow.close()
}
})
},
beforeDestroy() {
DicomEvent.$off('updateImage')
@ -687,6 +793,14 @@ export default {
DicomEvent.$off('loadImageStacks')
DicomEvent.$off('loadLinkedImageStack')
DicomEvent.$off('setMeasuredToolsPassive')
DicomEvent.$off('readingPageUpdate')
DicomEvent.$off('setReadingState')
DicomEvent.$off('reload')
DicomEvent.$off('closePetct')
if (this.petctWindow) {
this.petctWindow.close()
}
window.removeEventListener('beforeunload')
},
methods: {
getWwcTpl() {
@ -826,7 +940,7 @@ export default {
this.cornerstoneStyle = {
position: 'absolute',
top: '72px',
left: '205px',
left: '0px',
right: '350px',
zIndex: 10
}
@ -1041,108 +1155,117 @@ export default {
// 访
//
async imageLocation(obj) {
var loading = null
var loadImagePromises = []
var isScrollSync = this.isScrollSync
if (this.isScrollSync) {
imageLocation(obj) {
return new Promise(async resolve => {
var loading = null
var loadImagePromises = []
var isScrollSync = this.isScrollSync
if (this.isScrollSync) {
//
this.isScrollSync = false
}
this.isScrollSync = false
}
var activeCanvasTaskId = obj.visitTaskId
var activeCanvasTaskId = obj.visitTaskId
var index = this.visitTaskList.findIndex(i => i.VisitTaskId === activeCanvasTaskId)
if (index === -1) return
var index = this.visitTaskList.findIndex(i => i.VisitTaskId === activeCanvasTaskId)
if (index === -1) {
resolve()
return
}
var firstAddSeries = null
var currentAddSeries = null
if (this.isReadingTaskViewInOrder) {
var firstAddSeries = null
var currentAddSeries = null
if (this.isReadingTaskViewInOrder) {
//
// 访
var firstAddVisitTaskId = null
var firstAddVisitTaskId = null
var idx = this.visitTaskList[index].MeasureData.findIndex(item => {
return item.OrderMarkName === obj.lesionName
})
if (idx > -1) {
firstAddVisitTaskId = this.visitTaskList[index].MeasureData[idx].FristAddTaskId
}
if (firstAddVisitTaskId) {
var taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === firstAddVisitTaskId)
if (taskIdx > -1 && !this.visitTaskList[taskIdx].IsInit) {
loading = this.$loading({ fullscreen: true })
if (!this.visitTaskList[taskIdx].measureDataInit) {
await store.dispatch('reading/getMeasuredData', this.visitTaskList[taskIdx].VisitTaskId)
}
if (!this.visitTaskList[taskIdx].studyListInit) {
await store.dispatch('reading/getStudyInfo', { trialId: this.trialId, subjectVisitId: this.visitTaskList[taskIdx].VisitId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId, taskBlindName: this.visitTaskList[taskIdx].TaskBlindName })
}
if (!this.visitTaskList[taskIdx].readingQuestionsInit) {
await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
}
if (!this.visitTaskList[taskIdx].questionsInit) {
await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
}
await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
var idx = this.visitTaskList[index].MeasureData.findIndex(item => {
return item.OrderMarkName === obj.lesionName
})
if (idx > -1) {
firstAddVisitTaskId = this.visitTaskList[index].MeasureData[idx].FristAddTaskId
}
if (this.CriterionType === 3 && obj.lesionType === 7 && obj.fromMark) {
const measureDataInfo = Object.assign({}, obj)
measureDataInfo.lesionName = obj.fromMark
firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, measureDataInfo)
} else {
firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, obj)
}
}
// 访
currentAddSeries = this.getSeriesInfoByMark(activeCanvasTaskId, obj)
if (!firstAddSeries && currentAddSeries) {
//
firstAddSeries = currentAddSeries
} else if (!firstAddSeries && !currentAddSeries) {
//
loading && loading.close()
this.isScrollSync = isScrollSync
this.setToolToTarget(obj)
return
} else if (firstAddSeries && !currentAddSeries) {
// 访
currentAddSeries = this.getLinkedSeries(firstAddSeries, activeCanvasTaskId)
if (firstAddVisitTaskId) {
var taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === firstAddVisitTaskId)
if (taskIdx > -1 && !this.visitTaskList[taskIdx].IsInit) {
loading = this.$loading({ fullscreen: true })
if (!this.visitTaskList[taskIdx].measureDataInit) {
await store.dispatch('reading/getMeasuredData', this.visitTaskList[taskIdx].VisitTaskId)
}
if (!this.visitTaskList[taskIdx].studyListInit) {
await store.dispatch('reading/getStudyInfo', { trialId: this.trialId, subjectVisitId: this.visitTaskList[taskIdx].VisitId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId, taskBlindName: this.visitTaskList[taskIdx].TaskBlindName })
}
if (!this.visitTaskList[taskIdx].readingQuestionsInit) {
await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
}
if (!this.visitTaskList[taskIdx].questionsInit) {
await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
}
await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
}
if (this.CriterionType === 3 && obj.lesionType === 7 && obj.fromMark) {
const measureDataInfo = Object.assign({}, obj)
measureDataInfo.lesionName = obj.fromMark
firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, measureDataInfo)
} else {
firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, obj)
}
}
// 访
currentAddSeries = this.getSeriesInfoByMark(activeCanvasTaskId, obj)
if (!firstAddSeries && currentAddSeries) {
//
firstAddSeries = currentAddSeries
} else if (!firstAddSeries && !currentAddSeries) {
//
loading && loading.close()
this.isScrollSync = isScrollSync
this.setToolToTarget(obj)
resolve()
return
} else if (firstAddSeries && !currentAddSeries) {
// 访
currentAddSeries = this.getLinkedSeries(firstAddSeries, activeCanvasTaskId)
if (!currentAddSeries) {
//
currentAddSeries = this.$refs[`dicomCanvas${this.maxCanvas - 1}`][0].series
}
}
} else {
//
currentAddSeries = this.getSeriesInfoByMark(activeCanvasTaskId, obj)
if (!currentAddSeries) {
//
currentAddSeries = this.$refs[`dicomCanvas${this.maxCanvas - 1}`][0].series
}
firstAddSeries = currentAddSeries
}
} else {
//
currentAddSeries = this.getSeriesInfoByMark(activeCanvasTaskId, obj)
if (!currentAddSeries) {
//
currentAddSeries = this.$refs[`dicomCanvas${this.maxCanvas - 1}`][0].series
}
firstAddSeries = currentAddSeries
}
for (let i = 0; i < this.maxCanvas; i++) {
if (i === this.maxCanvas - 1) {
loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(currentAddSeries))
this.currentDicomCanvasIndex = i
this.activeSeries = currentAddSeries
store.dispatch('reading/setActiveSeries', currentAddSeries)
} else {
loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(firstAddSeries))
for (let i = 0; i < this.maxCanvas; i++) {
if (i === this.maxCanvas - 1) {
loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(currentAddSeries))
this.currentDicomCanvasIndex = i
this.activeSeries = currentAddSeries
store.dispatch('reading/setActiveSeries', currentAddSeries)
} else {
loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(firstAddSeries))
}
}
}
Promise.all(loadImagePromises)
.then(() => {
this.isScrollSync = isScrollSync
this.setToolToTarget(obj)
})
if (loading) {
loading.close()
}
Promise.all(loadImagePromises)
.then(() => {
this.isScrollSync = isScrollSync
this.setToolToTarget(obj)
resolve()
}).catch(() => {
resolve()
})
if (loading) {
loading.close()
}
})
},
setToolToTarget(obj) {
if (obj.readingTaskState < 2 && obj.markTool && !obj.isMarked) {
@ -1440,7 +1563,6 @@ export default {
if (!this.wwwcList[this.currentDicomCanvasIndex]) {
this.wwwcList[this.currentDicomCanvasIndex] = '1'
}
// var stack = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].stack
this.$refs['container'].focus()
// if (stack.studyId) {
// DicomEvent.$emit('toggleVisitList', stack)
@ -1569,8 +1691,24 @@ export default {
this.$refs['measurementList'].modifyMeasuredData(data)
this.activeTool = ''
},
saveImage() {
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].saveImage()
async saveImage() {
// this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].saveImage()
// canvasCanvas
const divForDownloadViewport = document.querySelector(
`div[data-canvas-uid="dicomCanvas${this.currentDicomCanvasIndex}"]`
)
var canvas = await html2canvas(divForDownloadViewport)
let oImg = new Image()
oImg = canvas.toDataURL('image/png', 1)//
var oA = document.createElement('a')
var subjectCode = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].subjectCode
var taskBlindName = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].stack.taskBlindName
var timestamp = Date.now()
oA.download = `${subjectCode}_${taskBlindName}_${timestamp}`// ''
oA.href = oImg
document.body.appendChild(oA)
oA.click()
oA.remove() //
},
// /
setDicomCanvasWwwc(v) {
@ -1591,6 +1729,9 @@ export default {
}
},
setCustomWwwc() {
var wwwc = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].dicomInfo.wwwc
this.activeCanvasWW = wwwc ? parseInt(wwwc.split('/')[0]) : null
this.activeCanvasWC = wwwc ? parseInt(wwwc.split('/')[1]) : null
this.customWwc.visible = true
},
setWwwc(v) {
@ -1737,11 +1878,11 @@ export default {
li{
a{
display: block;
padding: 5px 0px;
padding: 5px;
}
}
}
ul li:hover a{
ul li:hover{
background-color: #727272;
}
}
@ -1842,8 +1983,9 @@ export default {
border: 1px solid rgba(255, 255, 255, 0.21);
position: relative;
&_active{
// border: 2px solid #ffeb3b;fff
border: 1px dashed #428bca;
// border: 2px solid #ffeb3b;fff;#428bca
// border: 1.5px dashed #ffeb3b;
border: 1px dashed rgb(250, 250, 0);
}
}
@ -1880,12 +2022,12 @@ export default {
}
.personal_config {
>>>.el-tabs__content{
/deep/ .el-tabs__content{
height: 450px;
overflow-y: auto;
}
}
>>>.manuals-dialog-container{
/deep/ .manuals-dialog-container{
margin-top: 50px !important;
width:75%;
height:80%;
@ -1897,7 +2039,7 @@ export default {
position: relative;
}
}
>>>.manuals-full-dialog-container{
/deep/ .manuals-full-dialog-container{
.el-dialog__body{
padding: 10px;
height: calc(100% - 50px) !important;
@ -1906,5 +2048,43 @@ export default {
position: relative;
}
}
.petct_wrapper{
position: absolute;
left: -205px;
right: 345px;
height: 100%;
background-color: #000000;
}
.series-table{
/deep/.el-table{
background-color: #1e1e1e !important;
color: #dfdfdf;
}
/deep/.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
border-bottom: 1px solid #dfdfdf;
}
.el-table--border::after, .el-table--group::after, .el-table::before{
background-color: #1e1e1e;
}
/deep/.el-table__header-wrapper{
th{
background-color: #1e1e1e !important;
color: #dfdfdf;
}
}
/deep/.el-table__body-wrapper{
tr{
background-color: #1e1e1e !important;
color: #dfdfdf;
}
tr:hover > td{
background-color: #1e1e1e !important;
}
}
/deep/.el-table__empty-block{
background-color: #1e1e1e !important;
}
}
}
</style>

View File

@ -479,10 +479,7 @@ export default {
//
if ((this.isBaseLineTask || this.questionForm.IsDicomReading === false) && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'ArrowAnnotate' && v === 0) {
//
let msg = this.$t('trials:reading:warnning:msg15')
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
this.$confirm(msg, {
this.$confirm(this.$t(' trials:reading:warnning:msg15'), {
type: 'warning',
distinguishCancelAndClose: true
})
@ -495,8 +492,6 @@ export default {
var idx = this.tableQuestions.findIndex(item => item.LesionType === v)
if (idx > -1 && !!this.tableQuestions[idx].MaxQuestionCount && this.tableQuestions[idx].MaxQuestionCount <= this.tableQuestions[idx].TableQuestions.Answers.length) {
let msg = this.$t('trials:reading:warnning:msg14')
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
// msg = msg.replace('xxx', this.tableQuestions[idx].QuestionName)
msg = msg.replace('xxx', this.tableQuestions[idx].MaxQuestionCount)
this.$confirm(msg, {
@ -524,7 +519,7 @@ export default {
item.Answer = this.questionForm[item.Id]
arr.push(item)
})
var obj = { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionType: this.lesionType }
var obj = { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType }
DicomEvent.$emit('imageLocation', obj)
var type = null
@ -895,11 +890,6 @@ export default {
async uploadScreenshots(fileName, file) {
try {
file = this.convertBase64ToBlob(file)
// const formData = new FormData()
// formData.append('file', file)
// const result = await uploadPrintscreen(formData, this.$route.query.subjectId)
// result.url = result.Result.Path
// const result = await this.OSSclient.put(`${fileName}.png`, file)
var trialId = this.$route.query.trialId
var subjectId = this.$route.query.trialId
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${fileName}.png`, file)
@ -1967,77 +1957,75 @@ export default {
}
}
DicomEvent.$emit('getScreenshots', async val => {
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType }, async val => {
// 0线
// 10mm2线
// 15mm2线
var picturePath = ''
if (val) {
if (val && measureData && this.questionForm.IsDicomReading) {
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
picturePath = pictureObj.isSuccess ? pictureObj.result.url : ''
var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const k in this.questionForm) {
if (reg.test(k)) {
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
answers.push({ tableQuestionId: k, answer: this.questionForm[k] })
}
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
}
var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const k in this.questionForm) {
if (reg.test(k)) {
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
answers.push({ tableQuestionId: k, answer: this.questionForm[k] })
}
}
var params = {
questionId: this.parentQsId,
rowId: this.questionForm.RowId,
rowIndex: this.answers.RowIndex,
visitTaskId: this.visitTaskId,
trialId: this.trialId,
measureData: measureData ? JSON.stringify(measureData) : '',
answerList: answers,
isCanEditPosition: this.questionForm.IsCanEditPosition,
studyId: measureData ? this.questionForm.MeasureData.studyId : '',
seriesId: measureData ? this.questionForm.MeasureData.seriesId : '',
instanceId: measureData ? this.questionForm.MeasureData.instanceId : '',
numberOfFrames: measureData && !isNaN(parseInt(this.questionForm.MeasureData.frame)) ? parseInt(this.questionForm.MeasureData.frame) : 0,
picturePath: picturePath,
organInfoId: this.questionForm.OrganInfoId,
markTool: measureData ? measureData.type : '',
fromMark: this.answers.FromMark,
reportMark: this.answers.FromMark
}
if (this.questionForm.IsDicomReading === false) {
params.isDicomReading = false
}
if (this.deleteInfo) {
await this.deleteOldLesion(this.deleteInfo.rowId)
this.deleteInfo = null
params.rowId = ''
}
submitTableQuestion(params).then(async res => {
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : ''
// saveTypeEnum 01访/2
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
loading.close()
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const lesionState = Number(this.getQuestionVal(7))
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, lesionState, rowIndex: this.rowIndex, rowId: res.Result.RowId, questionId: this.parentQsId, anwsers: this.questionForm })
// await store.dispatch('reading/refreshMeasuredData', this.visitTaskId)
// DicomEvent.$emit('getMeasureData')
this.$emit('close')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
}).catch(() => { loading.close() })
}
var params = {
questionId: this.parentQsId,
rowId: this.questionForm.RowId,
rowIndex: this.answers.RowIndex,
visitTaskId: this.visitTaskId,
trialId: this.trialId,
measureData: measureData ? JSON.stringify(measureData) : '',
answerList: answers,
isCanEditPosition: this.questionForm.IsCanEditPosition,
studyId: measureData ? this.questionForm.MeasureData.studyId : '',
seriesId: measureData ? this.questionForm.MeasureData.seriesId : '',
instanceId: measureData ? this.questionForm.MeasureData.instanceId : '',
numberOfFrames: measureData && !isNaN(parseInt(this.questionForm.MeasureData.frame)) ? parseInt(this.questionForm.MeasureData.frame) : 0,
picturePath: picturePath,
organInfoId: this.questionForm.OrganInfoId,
markTool: measureData ? measureData.type : '',
fromMark: this.answers.FromMark,
reportMark: this.answers.FromMark
}
if (this.questionForm.IsDicomReading === false) {
params.isDicomReading = false
}
if (this.deleteInfo) {
await this.deleteOldLesion(this.deleteInfo.rowId)
this.deleteInfo = null
params.rowId = ''
}
submitTableQuestion(params).then(async res => {
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : ''
// saveTypeEnum 01访/2
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
loading.close()
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const lesionState = Number(this.getQuestionVal(7))
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, lesionState, rowIndex: this.rowIndex, rowId: res.Result.RowId, questionId: this.parentQsId, anwsers: this.questionForm })
// await store.dispatch('reading/refreshMeasuredData', this.visitTaskId)
// DicomEvent.$emit('getMeasureData')
this.$emit('close')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
}).catch(() => { loading.close() })
})
})
},
@ -2208,29 +2196,29 @@ export default {
</script>
<style lang="scss" scoped>
.measurement-form{
>>>.el-form-item__label{
/deep/ .el-form-item__label{
color: #c3c3c3;
}
>>>.el-input .el-input__inner{
/deep/ .el-input .el-input__inner{
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
>>>.el-form-item{
/deep/ .el-form-item{
display: flex;
flex-direction: row;
justify-content: flex-start;
}
>>>.el-form-item__content{
/deep/ .el-form-item__content{
flex: 1;
}
>>>.el-input.is-disabled .el-input__inner{
/deep/ .el-input.is-disabled .el-input__inner{
background-color: #646464a1;
}
>>>.el-select.is-disabled .el-input__inner{
/deep/ .el-select.is-disabled .el-input__inner{
background-color: #646464a1;
}
>>>.el-button--mini, .el-button--mini.is-round {
/deep/ .el-button--mini, .el-button--mini.is-round {
padding: 7px 10px;
}
.el-form-item__content

View File

@ -4,7 +4,7 @@
<div class="container" :style="{'height':height+'px'}">
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
<span v-if="subjectCode">{{ subjectCode }} </span>
<span style="margin-left:5px;">{{ taskName }}</span>
<span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<!-- 非测量问题 -->
<div class="lesions">
@ -71,7 +71,7 @@
</el-tooltip>
<div style="position: absolute;left: 62px;top: 2px;">
<!-- white-space: nowrap;overflow: hidden;text-overflow: ellipsis; -->
<div style="font-size: 10px;width:220px;height: 30px;">
<div style="font-size: 11px;width:220px;height: 30px;">
<div
v-if="item.TableQuestions.Answers[i].lesionPart"
style="margin-left:10px;display: inline-block; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:90px"
@ -207,7 +207,6 @@ export default {
readingTaskState: 2,
isBaseLineTask: false,
taskBlindName: '',
taskName: '',
tableQuestions: [],
isFirstRender: false,
criterionType: null,
@ -272,7 +271,6 @@ export default {
if (i > -1) {
this.visitTaskId = this.visitTaskList[i].VisitTaskId
this.taskBlindName = this.visitTaskList[i].TaskBlindName
this.taskName = this.visitTaskList[i].TaskName
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
this.isBaseLineTask = this.visitTaskList[i].IsBaseLineTask
this.isCurrentTask = this.visitTaskList[i].IsCurrentTask
@ -735,8 +733,6 @@ export default {
if (!!qs.MaxQuestionCount && qs.MaxQuestionCount <= qs.TableQuestions.Answers.length) {
let msg = this.$t('trials:reading:warnning:msg14')
// msg = msg.replace('xxx', qs.QuestionName)
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
msg = msg.replace('xxx', qs.MaxQuestionCount)
this.$confirm(msg, {
type: 'warning',
@ -1021,7 +1017,7 @@ export default {
//
this.$nextTick(() => {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
if ((this.$refs[refName][0].questionForm && this.$refs[refName][0].questionForm.MeasureData && measureData.data.uuid === this.$refs[refName][0].questionForm.MeasureData.data.uuid) || !this.$refs[refName][0].questionForm.MeasureData) {
if (!this.$refs[refName][0].questionForm.MeasureData || (this.$refs[refName][0].questionForm && this.$refs[refName][0].questionForm.MeasureData && measureData.data.uuid === this.$refs[refName][0].questionForm.MeasureData.data.uuid)) {
this.$refs[refName][0].setMeasureData(measureData)
} else {
if (this.isBaseLineTask) {
@ -1177,12 +1173,12 @@ export default {
.el-collapse{
border-bottom:none;
border-top:none;
>>>.el-collapse-item{
/deep/ .el-collapse-item{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__header{
/deep/ .el-collapse-item__header{
background-color: #000!important;
color: #ddd;
border-bottom-color:#5a5a5a;
@ -1190,11 +1186,11 @@ export default {
height: 35px;
line-height: 35px;
}
>>>.el-collapse-item__wrap{
/deep/ .el-collapse-item__wrap{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__content{
/deep/ .el-collapse-item__content{
width:260px;
position: absolute;
top: 0px;

View File

@ -79,7 +79,6 @@
import { on, off } from 'element-ui/src/utils/dom'
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
import store from '@/store'
// import Vue from 'vue'
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
var ctx = '' //
export default {
@ -243,10 +242,8 @@ export default {
this.isInit = true
}
const img = new Image() // img
img.src = this.OSSclientConfig.basePath + this.imgUrl // src
img.setAttribute('crossorigin', 'anonymous')
// img.crossorigin = 'anonymous'
return new Promise(resolve => {
img.onload = () => {
this.currentImg = img
@ -479,7 +476,7 @@ export default {
e.data.handles.start.x,
e.data.handles.start.y,
e.data.handles.end.x - e.data.handles.start.x,
e.data.handles.end.y - e.data.handles.start.y,
e.data.handles.end.y - e.data.handles.start.y
)
this.drawText(ctx, { x: e.data.handles.start.x, y: e.data.handles.start.y }, { x: e.data.handles.end.x, y: e.data.handles.end.y }, e.data.remark, this.color)
}
@ -511,10 +508,6 @@ export default {
y: e.offsetY
}
//
//
const canvas = document.querySelector('canvas')
var pictureBaseStr = canvas.toDataURL('image/png', 1)
this.currentDrawData.pictureBaseStr = pictureBaseStr
var data = { type: 'setMeasurement', data: this.currentDrawData }
window.opener.postMessage(data, window.location)
},
@ -584,7 +577,6 @@ export default {
)
this.drawText(ctx, { x: this.canvasMouseStart.x, y: this.canvasMouseStart.y }, { x: e.offsetX, y: e.offsetY }, this.lesionName, this.color)
//
console.log(this.imgId)
this.currentDrawData = {
isDicomReading: false,
studyId: this.studyId,

View File

@ -44,7 +44,7 @@
}"
@click="selected(index)"
>
<img :title="item.FileName" :src="OSSclientConfig.basePath +`${item.PreviewPath}`" crossorigin="anonymous">
<img :title="item.FileName" :src="`${OSSclientConfig.basePath + item.Path}`" crossorigin="anonymous">
<p v-if="item.FileName" class="item-date">
{{ `${index+1}` }}
</p>

View File

@ -268,6 +268,7 @@ export default {
lesionName: '',
isCurrentTaskAdd: 'False',
splitOrMergeLesionName: '',
lesionMark: '',
pictureBaseStr: '',
digitPlaces: 0,
focusQs: null,
@ -362,6 +363,7 @@ export default {
this.getOrganInfoList()
this.lesionName = this.getLesionInfo(this.orderMark, this.rowIndex)
this.isCurrentTaskAdd = this.answers.IsCurrentTaskAdd ? this.answers.IsCurrentTaskAdd : 'True'
this.lesionMark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
this.isRender = true
},
getLesionName(orderMark, rowIndex) {
@ -581,10 +583,6 @@ export default {
async uploadScreenshots(fileName, file) {
try {
file = this.convertBase64ToBlob(file)
// const formData = new FormData()
// formData.append('file', file)
// const result = await uploadPrintscreen(formData, this.$route.query.subjectId)
// result.url = result.Result.Path
var trialId = this.$route.query.trialId
var subjectId = this.$route.query.trialId
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${fileName}.png`, file)
@ -692,11 +690,11 @@ export default {
}
}
const loading = this.$loading({ fullscreen: true })
DicomEvent.$emit('getScreenshots', async val => {
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType }, async val => {
var picturePath = ''
if (val) {
if (val && measureData) {
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
picturePath = pictureObj.isSuccess ? pictureObj.result.url : ''
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
}
var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
@ -879,26 +877,26 @@ export default {
</script>
<style lang="scss" scoped>
.measurement-form{
>>>.el-form-item__label{
/deep/ .el-form-item__label{
color: #c3c3c3;
}
>>>.el-input .el-input__inner{
/deep/ .el-input .el-input__inner{
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
>>>.el-form-item{
/deep/ .el-form-item{
display: flex;
flex-direction: row;
justify-content: flex-start;
}
>>>.el-form-item__content{
/deep/ .el-form-item__content{
flex: 1;
}
>>>.el-input.is-disabled .el-input__inner{
/deep/ .el-input.is-disabled .el-input__inner{
background-color: #646464a1;
}
>>>.el-select.is-disabled .el-input__inner{
/deep/ .el-select.is-disabled .el-input__inner{
background-color: #646464a1;
}
.el-form-item__content

View File

@ -4,7 +4,7 @@
<div class="container" :style="{'height':height+'px'}">
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
<span v-if="subjectCode">{{ subjectCode }} </span>
<span style="margin-left:5px;">{{ taskName }}</span>
<span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<!-- 非测量问题 -->
<div class="lesions">
@ -53,7 +53,7 @@
<i class="el-icon-warning" style="color:#ff9800" />
</el-tooltip>
<div style="position: absolute;left: 60px;top: 2px;">
<div style="display: flex;flex-direction: row;font-size: 10px;width:200px;height: 30px;">
<div style="display: flex;flex-direction: row;font-size: 11px;width:200px;height: 30px;">
<div v-if="item.TableQuestions.Answers[i].lesionPart" style="margin-left:10px;">
{{ item.TableQuestions.Answers[i].lesionPart }}
</div>
@ -151,7 +151,6 @@ export default {
readingTaskState: 2,
isBaseLineTask: false,
taskBlindName: '',
taskName: '',
tableQuestions: [],
isFirstRender: false,
criterionType: null,
@ -215,7 +214,6 @@ export default {
if (i > -1) {
this.visitTaskId = this.visitTaskList[i].VisitTaskId
this.taskBlindName = this.visitTaskList[i].TaskBlindName
this.taskName = this.visitTaskList[i].TaskName
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
this.isBaseLineTask = this.visitTaskList[i].IsBaseLineTask
this.isCurrentTask = this.visitTaskList[i].IsCurrentTask
@ -270,7 +268,7 @@ export default {
//
this.$nextTick(() => {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
if ((this.$refs[refName][0].questionForm && this.$refs[refName][0].questionForm.MeasureData && measureData.data.uuid === this.$refs[refName][0].questionForm.MeasureData.data.uuid) || !this.$refs[refName][0].questionForm.MeasureData) {
if (!this.$refs[refName][0].questionForm.MeasureData || (this.$refs[refName][0].questionForm && this.$refs[refName][0].questionForm.MeasureData && measureData.data.uuid === this.$refs[refName][0].questionForm.MeasureData.data.uuid)) {
this.$refs[refName][0].setMeasureData(measureData)
} else {
if (this.isBaseLineTask) {
@ -735,12 +733,12 @@ export default {
.el-collapse{
border-bottom:none;
border-top:none;
>>>.el-collapse-item{
/deep/ .el-collapse-item{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__header{
/deep/ .el-collapse-item__header{
background-color: #000!important;
color: #ddd;
border-bottom-color:#5a5a5a;
@ -748,11 +746,11 @@ export default {
height: 35px;
line-height: 35px;
}
>>>.el-collapse-item__wrap{
/deep/ .el-collapse-item__wrap{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__content{
/deep/ .el-collapse-item__content{
width:260px;
position: absolute;
top: 0px;

View File

@ -14,7 +14,7 @@
:class="{'visit-item-active': activeTaskVisitId==s.VisitTaskId}"
@click.prevent="handleClick(s)"
>{{ s.TaskName }}</div>
>{{ s.TaskBlindName }}</div>
</div>
@ -35,7 +35,6 @@
:trial-id="trialId"
:subject-visit-id="s.VisitId"
:task-blind-name="s.TaskBlindName"
:task-name="s.TaskName"
:is-reading-show-subject-info="isReadingShowSubjectInfo"
@loadImageStack="loadImageStack"
@previewNoneDicoms="previewNoneDicoms"
@ -250,6 +249,7 @@ export default {
const loading = this.$loading({ fullscreen: true })
var i = this.visitTaskList.length - 1
await store.dispatch('reading/getMasterSeries', { trialId: this.trialId, visitTaskId: this.visitTaskList[i].VisitTaskId, visitId: this.visitTaskList[i].VisitId })
await store.dispatch('reading/refreshMeasuredData', this.visitTaskList[i].VisitTaskId)
await store.dispatch('reading/getNextVisitTask', { visitTaskId: this.visitTaskId })
@ -332,14 +332,16 @@ export default {
if (!this.visitTaskList[index].studyListInit) {
await store.dispatch('reading/getStudyInfo', { trialId: this.trialId, subjectVisitId: this.visitTaskList[index].VisitId, visitTaskId: this.visitTaskList[index].VisitTaskId, taskBlindName: this.visitTaskList[index].TaskBlindName })
}
if (!this.visitTaskList[index].readingQuestionsInit) {
await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[index].VisitTaskId })
}
await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[index].VisitTaskId })
if (!this.visitTaskList[index].questionsInit) {
await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[index].VisitTaskId })
}
await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[index].VisitTaskId })
} else if (this.visitTaskList[index].IsCurrentTask && this.visitTaskList[index].ReadingTaskState === 2) {
await store.dispatch('reading/refreshMeasuredData', this.visitTaskList[index].VisitTaskId)
}
this.activeTaskVisitId = visitTaskId
this.activeTaskIndex = index
@ -496,6 +498,7 @@ export default {
justify-content: flex-start;
background-color: #000;
box-sizing: border-box;
user-select: none;
::-webkit-scrollbar {
width: 5px;
height: 5px;
@ -529,7 +532,7 @@ export default {
// border: 1px solid #ccc;
}
.el-tabs{
/deep/.el-tabs{
box-sizing: border-box;
padding: 0 5px;
height: 100%;
@ -540,18 +543,18 @@ export default {
.el-tabs__item{
color: #fff;
}
>>>.el-tabs__header{
.el-tabs__header{
height: 55px;
margin:0px;
box-sizing: border-box;
}
>>>.el-tabs__content{
.el-tabs__content{
flex: 1;
margin:0px;
overflow-y: auto;
box-sizing: border-box;
}
>>>.el-tabs__item{
.el-tabs__item{
color: #fff;
}
@ -572,7 +575,7 @@ export default {
background-color: #607d8b!important;
border: 1px solid #607d8b!important;
}
>>>.el-progress__text{
/deep/.el-progress__text{
color: #ccc;
font-size: 12px;
}

View File

@ -461,10 +461,7 @@ export default {
//
if ((this.isBaseLineTask || this.questionForm.IsDicomReading === false) && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'ArrowAnnotate' && v === 0) {
//
let msg = this.$t('trials:reading:warnning:msg15')
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
this.$confirm(msg, {
this.$confirm(this.$t(' trials:reading:warnning:msg15'), {
type: 'warning',
distinguishCancelAndClose: true
})
@ -478,8 +475,6 @@ export default {
if (idx > -1 && !!this.tableQuestions[idx].MaxQuestionCount && this.tableQuestions[idx].MaxQuestionCount <= this.tableQuestions[idx].TableQuestions.Answers.length) {
let msg = this.$t('trials:reading:warnning:msg14')
// msg = msg.replace('xxx', this.tableQuestions[idx].QuestionName)
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
msg = msg.replace('xxx', this.tableQuestions[idx].MaxQuestionCount)
this.$confirm(msg, {
type: 'warning',
@ -501,7 +496,7 @@ export default {
item.Answer = this.questionForm[item.Id] ? this.questionForm[item.Id] : ''
arr.push(item)
})
var obj = { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionType: this.lesionType }
var obj = { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType }
DicomEvent.$emit('imageLocation', obj)
var type = null
if (this.questionForm.RowId) {
@ -836,12 +831,8 @@ export default {
},
async uploadScreenshots(fileName, file) {
try {
console.log(this.OSSclient)
file = this.convertBase64ToBlob(file)
// const formData = new FormData()
// formData.append('file', file)
// const result = await uploadPrintscreen(formData, this.$route.query.subjectId)
// result.url = result.Result.Path
// const result = await this.OSSclient.put(`${fileName}.png`, file)
var trialId = this.$route.query.trialId
var subjectId = this.$route.query.trialId
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${fileName}.png`, file)
@ -1329,75 +1320,75 @@ export default {
}
}
DicomEvent.$emit('getScreenshots', async val => {
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType }, async val => {
// 0线
// 10mm2线
// 15mm2线
var picturePath = ''
if (val) {
if (val && measureData && this.questionForm.IsDicomReading) {
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
picturePath = pictureObj.isSuccess ? pictureObj.result.url : ''
var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const k in this.questionForm) {
if (reg.test(k)) {
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
answers.push({ tableQuestionId: k, answer: this.questionForm[k] })
}
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
}
var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const k in this.questionForm) {
if (reg.test(k)) {
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
answers.push({ tableQuestionId: k, answer: this.questionForm[k] })
}
}
var params = {
questionId: this.parentQsId,
rowId: this.questionForm.RowId,
rowIndex: this.answers.RowIndex,
visitTaskId: this.visitTaskId,
trialId: this.trialId,
measureData: measureData ? JSON.stringify(measureData) : '',
answerList: answers,
isCanEditPosition: this.questionForm.IsCanEditPosition,
studyId: measureData ? this.questionForm.MeasureData.studyId : '',
seriesId: measureData ? this.questionForm.MeasureData.seriesId : '',
instanceId: measureData ? this.questionForm.MeasureData.instanceId : '',
numberOfFrames: measureData && !isNaN(parseInt(this.questionForm.MeasureData.frame)) ? parseInt(this.questionForm.MeasureData.frame) : 0,
picturePath: picturePath,
organInfoId: this.questionForm.OrganInfoId,
markTool: measureData ? measureData.type : ''
}
if (this.questionForm.IsDicomReading === false) {
params.isDicomReading = false
}
if (this.deleteInfo) {
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
this.deleteInfo = null
params.rowId = ''
}
submitTableQuestion(params).then(async res => {
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : ''
// saveTypeEnum 01访/2
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
loading.close()
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const lesionState = Number(this.getQuestionVal(7))
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, lesionState, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
// await store.dispatch('reading/refreshMeasuredData', this.visitTaskId)
// DicomEvent.$emit('getMeasureData')
this.$emit('close')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
}).catch(() => { loading.close() })
}
var params = {
questionId: this.parentQsId,
rowId: this.questionForm.RowId,
rowIndex: this.answers.RowIndex,
visitTaskId: this.visitTaskId,
trialId: this.trialId,
measureData: measureData ? JSON.stringify(measureData) : '',
answerList: answers,
isCanEditPosition: this.questionForm.IsCanEditPosition,
studyId: measureData ? this.questionForm.MeasureData.studyId : '',
seriesId: measureData ? this.questionForm.MeasureData.seriesId : '',
instanceId: measureData ? this.questionForm.MeasureData.instanceId : '',
numberOfFrames: measureData && !isNaN(parseInt(this.questionForm.MeasureData.frame)) ? parseInt(this.questionForm.MeasureData.frame) : 0,
picturePath: picturePath,
organInfoId: this.questionForm.OrganInfoId,
markTool: measureData ? measureData.type : ''
}
if (this.questionForm.IsDicomReading === false) {
params.isDicomReading = false
}
if (this.deleteInfo) {
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
this.deleteInfo = null
params.rowId = ''
}
submitTableQuestion(params).then(async res => {
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : ''
// saveTypeEnum 01访/2
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
loading.close()
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const lesionState = Number(this.getQuestionVal(7))
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, lesionState, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
// await store.dispatch('reading/refreshMeasuredData', this.visitTaskId)
// DicomEvent.$emit('getMeasureData')
this.$emit('close')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
}).catch(() => { loading.close() })
})
})
},
@ -1565,29 +1556,29 @@ export default {
</script>
<style lang="scss" scoped>
.measurement-form{
>>>.el-form-item__label{
/deep/ .el-form-item__label{
color: #c3c3c3;
}
>>>.el-input .el-input__inner{
/deep/ .el-input .el-input__inner{
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
>>>.el-form-item{
/deep/ .el-form-item{
display: flex;
flex-direction: row;
justify-content: flex-start;
}
>>>.el-form-item__content{
/deep/ .el-form-item__content{
flex: 1;
}
>>>.el-input.is-disabled .el-input__inner{
/deep/ .el-input.is-disabled .el-input__inner{
background-color: #646464a1;
}
>>>.el-select.is-disabled .el-input__inner{
/deep/ .el-select.is-disabled .el-input__inner{
background-color: #646464a1;
}
>>>.el-button--mini, .el-button--mini.is-round {
/deep/ .el-button--mini, .el-button--mini.is-round {
padding: 7px 10px;
}
.el-form-item__content

View File

@ -4,7 +4,7 @@
<div class="container" :style="{'height':height+'px'}">
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
<span v-if="subjectCode">{{ subjectCode }} </span>
<span style="margin-left:5px;">{{ taskName }}</span>
<span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<!-- 非测量问题 -->
<div class="lesions">
@ -51,7 +51,7 @@
</el-tooltip>
<div style="position: absolute;left: 50px;top: 2px;">
<!-- white-space: nowrap;overflow: hidden;text-overflow: ellipsis; -->
<div style="font-size: 10px;width:220px;height: 30px;">
<div style="font-size: 11px;width:220px;height: 30px;">
<div
v-if="item.TableQuestions.Answers[i].lesionPart"
style="margin-left:10px;display: inline-block; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:90px"
@ -172,7 +172,6 @@ export default {
readingTaskState: 2,
isBaseLineTask: false,
taskBlindName: '',
taskName: '',
tableQuestions: [],
isFirstRender: false,
CriterionType: null,
@ -236,7 +235,6 @@ export default {
if (i > -1) {
this.visitTaskId = this.visitTaskList[i].VisitTaskId
this.taskBlindName = this.visitTaskList[i].TaskBlindName
this.taskName = this.visitTaskList[i].TaskName
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
this.isBaseLineTask = this.visitTaskList[i].IsBaseLineTask
this.isCurrentTask = this.visitTaskList[i].IsCurrentTask
@ -628,8 +626,6 @@ export default {
}
if (!!qs.MaxQuestionCount && qs.MaxQuestionCount <= qs.TableQuestions.Answers.length) {
let msg = this.$t('trials:reading:warnning:msg14')
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
// msg = msg.replace('xxx', qs.QuestionName)
msg = msg.replace('xxx', qs.MaxQuestionCount)
this.$confirm(msg, {
@ -1058,12 +1054,12 @@ export default {
.el-collapse{
border-bottom:none;
border-top:none;
>>>.el-collapse-item{
/deep/ .el-collapse-item{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__header{
/deep/ .el-collapse-item__header{
background-color: #000!important;
color: #ddd;
border-bottom-color:#5a5a5a;
@ -1071,11 +1067,11 @@ export default {
height: 35px;
line-height: 35px;
}
>>>.el-collapse-item__wrap{
/deep/ .el-collapse-item__wrap{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__content{
/deep/ .el-collapse-item__content{
width:260px;
position: absolute;
top: 0px;

View File

@ -420,10 +420,7 @@ export default {
//
if ((this.isBaseLineTask || this.questionForm.IsDicomReading === false) && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'ArrowAnnotate' && v === 0) {
//
let msg = this.$t('trials:reading:warnning:msg15')
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
this.$confirm(msg, {
this.$confirm(this.$t(' trials:reading:warnning:msg15'), {
type: 'warning',
distinguishCancelAndClose: true
})
@ -436,8 +433,6 @@ export default {
var idx = this.tableQuestions.findIndex(item => item.LesionType === v)
if (idx > -1 && !!this.tableQuestions[idx].MaxQuestionCount && this.tableQuestions[idx].MaxQuestionCount <= this.tableQuestions[idx].TableQuestions.Answers.length) {
let msg = this.$t('trials:reading:warnning:msg14')
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
msg = msg.replace('xxx', this.tableQuestions[idx].MaxQuestionCount)
this.$confirm(msg, {
type: 'warning',
@ -459,7 +454,7 @@ export default {
item.Answer = this.questionForm[item.Id] ? this.questionForm[item.Id] : ''
arr.push(item)
})
var obj = { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionType: this.lesionType }
var obj = { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType }
DicomEvent.$emit('imageLocation', obj)
var type = null
if (this.questionForm.RowId) {
@ -723,11 +718,6 @@ export default {
async uploadScreenshots(fileName, file) {
try {
file = this.convertBase64ToBlob(file)
// const formData = new FormData()
// formData.append('file', file)
// const result = await uploadPrintscreen(formData, this.$route.query.subjectId)
// result.url = result.Result.Path
// const result = await this.OSSclient.put(`${fileName}.png`, file)
var trialId = this.$route.query.trialId
var subjectId = this.$route.query.trialId
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${fileName}.png`, file)
@ -980,67 +970,65 @@ export default {
}
}
DicomEvent.$emit('getScreenshots', async val => {
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType }, async val => {
var picturePath = ''
if (val) {
if (val && measureData && this.questionForm.IsDicomReading) {
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
picturePath = pictureObj.isSuccess ? pictureObj.result.url : ''
var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const k in this.questionForm) {
if (reg.test(k)) {
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
answers.push({ tableQuestionId: k, answer: this.questionForm[k] })
}
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
}
var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const k in this.questionForm) {
if (reg.test(k)) {
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
answers.push({ tableQuestionId: k, answer: this.questionForm[k] })
}
}
var params = {
questionId: this.parentQsId,
rowId: this.questionForm.RowId,
rowIndex: this.answers.RowIndex,
visitTaskId: this.visitTaskId,
trialId: this.trialId,
measureData: measureData ? JSON.stringify(measureData) : '',
answerList: answers,
isCanEditPosition: this.questionForm.IsCanEditPosition,
studyId: measureData ? this.questionForm.MeasureData.studyId : '',
seriesId: measureData ? this.questionForm.MeasureData.seriesId : '',
instanceId: measureData ? this.questionForm.MeasureData.instanceId : '',
numberOfFrames: measureData && !isNaN(parseInt(this.questionForm.MeasureData.frame)) ? parseInt(this.questionForm.MeasureData.frame) : 0,
picturePath: picturePath,
organInfoId: this.questionForm.OrganInfoId,
markTool: measureData ? measureData.type : ''
}
if (this.questionForm.IsDicomReading === false) {
params.isDicomReading = false
}
if (this.deleteInfo) {
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
this.deleteInfo = null
}
submitTableQuestion(params).then(async res => {
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : ''
// saveTypeEnum 01访/2
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
loading.close()
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const lesionState = Number(this.getQuestionVal(7))
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, lesionState, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
this.$emit('close')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
}).catch(() => { loading.close() })
}
var params = {
questionId: this.parentQsId,
rowId: this.questionForm.RowId,
rowIndex: this.answers.RowIndex,
visitTaskId: this.visitTaskId,
trialId: this.trialId,
measureData: measureData ? JSON.stringify(measureData) : '',
answerList: answers,
isCanEditPosition: this.questionForm.IsCanEditPosition,
studyId: measureData ? this.questionForm.MeasureData.studyId : '',
seriesId: measureData ? this.questionForm.MeasureData.seriesId : '',
instanceId: measureData ? this.questionForm.MeasureData.instanceId : '',
numberOfFrames: measureData && !isNaN(parseInt(this.questionForm.MeasureData.frame)) ? parseInt(this.questionForm.MeasureData.frame) : 0,
picturePath: picturePath,
organInfoId: this.questionForm.OrganInfoId,
markTool: measureData ? measureData.type : ''
}
if (this.questionForm.IsDicomReading === false) {
params.isDicomReading = false
}
if (this.deleteInfo) {
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
this.deleteInfo = null
}
submitTableQuestion(params).then(async res => {
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : ''
// saveTypeEnum 01访/2
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
loading.close()
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const lesionState = Number(this.getQuestionVal(7))
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, lesionState, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
this.$emit('close')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
}).catch(() => { loading.close() })
})
})
},
@ -1179,29 +1167,29 @@ export default {
</script>
<style lang="scss" scoped>
.measurement-form{
>>>.el-form-item__label{
/deep/ .el-form-item__label{
color: #c3c3c3;
}
>>>.el-input .el-input__inner{
/deep/ .el-input .el-input__inner{
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
>>>.el-form-item{
/deep/ .el-form-item{
display: flex;
flex-direction: row;
justify-content: flex-start;
}
>>>.el-form-item__content{
/deep/ .el-form-item__content{
flex: 1;
}
>>>.el-input.is-disabled .el-input__inner{
/deep/ .el-input.is-disabled .el-input__inner{
background-color: #646464a1;
}
>>>.el-select.is-disabled .el-input__inner{
/deep/ .el-select.is-disabled .el-input__inner{
background-color: #646464a1;
}
>>>.el-button--mini, .el-button--mini.is-round {
/deep/ .el-button--mini, .el-button--mini.is-round {
padding: 7px 10px;
}
.el-form-item__content

View File

@ -4,7 +4,7 @@
<div class="container" :style="{'height':height+'px'}">
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
<span v-if="subjectCode">{{ subjectCode }} </span>
<span style="margin-left:5px;">{{ taskName }}</span>
<span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<!-- 非测量问题 -->
<div class="lesions">
@ -49,7 +49,7 @@
<i class="el-icon-warning" style="color:#ff9800" />
</el-tooltip>
<div style="position: absolute;left: 50px;top: 2px;">
<div style="font-size: 10px;width:220px;height: 30px;">
<div style="font-size: 11px;width:220px;height: 30px;">
<div
v-if="item.TableQuestions.Answers[i].lesionPart"
style="margin-left:10px;display: inline-block; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width:90px"
@ -169,7 +169,6 @@ export default {
readingTaskState: 2,
isBaseLineTask: false,
taskBlindName: '',
taskName: '',
tableQuestions: [],
isFirstRender: false,
CriterionType: null,
@ -234,7 +233,6 @@ export default {
if (i > -1) {
this.visitTaskId = this.visitTaskList[i].VisitTaskId
this.taskBlindName = this.visitTaskList[i].TaskBlindName
this.taskName = this.visitTaskList[i].TaskName
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
this.isBaseLineTask = this.visitTaskList[i].IsBaseLineTask
this.isCurrentTask = this.visitTaskList[i].IsCurrentTask
@ -602,8 +600,6 @@ export default {
}
if (!!qs.MaxQuestionCount && qs.MaxQuestionCount <= qs.TableQuestions.Answers.length) {
let msg = this.$t('trials:reading:warnning:msg14')
const criterionName = this.$route.query.criterionName
msg = msg.replace('***', criterionName)
msg = msg.replace('xxx', qs.MaxQuestionCount)
this.$confirm(msg, {
type: 'warning',
@ -988,12 +984,12 @@ export default {
.el-collapse{
border-bottom:none;
border-top:none;
>>>.el-collapse-item{
/deep/ .el-collapse-item{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__header{
/deep/ .el-collapse-item__header{
background-color: #000!important;
color: #ddd;
border-bottom-color:#5a5a5a;
@ -1001,11 +997,11 @@ export default {
height: 35px;
line-height: 35px;
}
>>>.el-collapse-item__wrap{
/deep/ .el-collapse-item__wrap{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__content{
/deep/ .el-collapse-item__content{
width:260px;
position: absolute;
top: 0px;

View File

@ -80,12 +80,12 @@
<template slot="header">
<div v-if="task.IsCurrentTask">
<div>
{{ task.TaskName }}
{{ task.BlindName }}
</div>
</div>
<div v-else>
<div>
{{ task.TaskName }}
{{ task.BlindName }}
<el-button type="text" size="small" @click="previewDicoms(task)">
<span class="el-icon-view" />
</el-button>
@ -93,8 +93,8 @@
</div>
</template>
<template slot-scope="scope">
<span :style="{color: ((scope.row.isLymphNodes === 1 && scope.row.QuestionMark === 1) || (scope.row.isLymphNodes === 0 && scope.row.QuestionMark === 0)) && (scope.row.LesionType === 0 || scope.row.LesionType === 5) ? '#f66' : '#fff'}">
<template v-if="task.VisitTaskId === visitTaskId && readingTaskState < 2 && [13,14,15].includes(scope.row.QuestionType)">
<span :style="{color: ((scope.row.isLymphNodes === 1 && scope.row.QuestionMark === 1) || (scope.row.isLymphNodes === 0 && scope.row.QuestionMark === 0)) && (scope.row.LesionType === 0 || scope.row.LesionType === 5) || (scope.row.QuestionMark === 12) ? '#f66' : '#fff'}">
<template v-if="task.VisitTaskId === visitTaskId && readingTaskState < 2 && [13,14,15,42].includes(scope.row.QuestionType)">
<!-- 是否存在疾病基线时可修改 -->
<template v-if="task.IsBaseLine && scope.row.QuestionType=== 15">
<el-select
@ -112,7 +112,7 @@
</el-select>
</template>
<!-- 整体肿瘤评估非基线可修改 -->
<template v-else-if="!task.IsBaseLine && scope.row.QuestionType=== 13">
<template v-else-if="!task.IsBaseLine && (scope.row.QuestionType=== 13 || scope.row.QuestionType=== 42)">
<el-select
v-if="scope.row.Type==='select' && scope.row.DictionaryCode"
v-model="currentEvaluateResult"
@ -172,7 +172,7 @@
@change="evaluateReasonChange"
/>
<!-- 系统评估结果为xxx,与当前调整的结果不一致请填写调整原因 -->
<p v-if="currentEvaluateResult !== tumorEvaluate" style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;">{{ $t('trials:readingReport:message:msg6').replace('***', criterionName) }}<span style="color:red">{{ $fd('OverallAssessment',tumorEvaluate) }}</span>{{ $t('trials:readingReport:message:msg7') }}<span style="color:red">{{ $fd('OverallAssessment',currentEvaluateResult) }}</span>{{ $t('trials:readingReport:message:msg8') }}</p>
<p v-if="currentEvaluateResult !== tumorEvaluate" style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;">{{ $t('trials:readingReport:message:msg6') }}<span v-if="CriterionType === 2" style="color:red">{{ $fd('ImagingOverallAssessment_Lugano',tumorEvaluate) }}</span><span v-else style="color:red">{{ $fd('OverallAssessment',tumorEvaluate) }}</span>{{ $t('trials:readingReport:message:msg7') }}<span v-if="CriterionType === 2" style="color:red">{{ $fd('ImagingOverallAssessment_Lugano',currentEvaluateResult) }}</span><span v-else style="color:red">{{ $fd('OverallAssessment',currentEvaluateResult) }}</span>{{ $t('trials:readingReport:message:msg8') }}</p>
<p v-else-if="currentExistDisease !== isExistDisease" style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;">{{ $t('trials:readingReport:title:sysEvaluationRes') }}<span style="color:red">{{ $fd('ExistDisease',isExistDisease) }}</span>{{ $t('trials:readingReport:message:msg1') }}</p>
</template>
<!-- <template v-else>
@ -195,7 +195,7 @@
<span v-else>{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}</span>
</template>
<template v-else-if="scope.row.QuestionType=== 13">
<template v-else-if="scope.row.QuestionType=== 13 || scope.row.QuestionType=== 42">
<el-tooltip v-if="getAnswerInfo(scope.row.Answer,task.VisitTaskId,'IsGlobalChange')" :content="`${$t('trials:reading:warnning:msg55')}${$fd(scope.row.DictionaryCode, getAnswerInfo(scope.row.Answer,task.VisitTaskId,'GlobalChangeAnswer'))}`" placement="top" effect="light">
<span style="color:red;"> {{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}</span>
</el-tooltip>
@ -212,7 +212,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.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]} ${$fd('ValueUnit',scope.row.Unit)}` }}
{{ `${scope.row.Answers[task.VisitTaskId]}` }}
<span v-if="scope.row.Answers[task.VisitTaskId] !== 'NA' && !isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))">{{ `${$fd('ValueUnit',scope.row.Unit)}` }}</span>
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]}%` }}
@ -307,8 +308,7 @@ export default {
assessmentQuestions: [],
tLesionCount: null,
ntLesionCount: null,
openWindow: null,
criterionName: this.$route.query.criterionName
openWindow: null
}
},
computed: {
@ -326,7 +326,6 @@ export default {
created() { this.getTableHeight() },
mounted() {
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
window.addEventListener('resize', () => {
this.handleResize()
this.setScrollTop()
@ -363,7 +362,7 @@ export default {
})
},
async beforeLeave() {
if (this.questionFormChangeState) {
if (this.questionFormChangeState && this.CriterionType !== 2) {
var msg = this.$t('trials:readingReport:message:msg5')
var isgo = await this.myConfirm(msg)
if (!isgo) {
@ -542,9 +541,9 @@ export default {
this.currentExistDisease = obj.Answers[this.visitTaskId]
this.answerArr.push({ id: item.QuestionId, answer: obj.Answers[this.visitTaskId], questionType: 15 })
}
if (item.QuestionType === 13) {
if (item.QuestionType === 13 || item.QuestionType === 42) {
this.currentEvaluateResult = obj.Answers[this.visitTaskId]
this.answerArr.push({ id: item.QuestionId, answer: obj.Answers[this.visitTaskId], questionType: 13 })
this.answerArr.push({ id: item.QuestionId, answer: obj.Answers[this.visitTaskId], questionType: item.QuestionType })
}
if (item.QuestionType === 14) {
this.currentTaskReason = obj.Answers[this.visitTaskId]
@ -584,7 +583,7 @@ export default {
}
this.currentTaskReason = ''
this.evaluateReasonChange('')
var idx = this.answerArr.findIndex(i => i.questionType === 13)
var idx = this.answerArr.findIndex(i => i.questionType === 13 || i.questionType === 42)
if (idx > -1) {
this.answerArr[idx].answer = val
}
@ -691,7 +690,9 @@ export default {
await store.dispatch('reading/setCurrentReadingTaskState', 2)
var isAutoTask = await this.getAutoTaskVal()
if (isAutoTask) {
DicomEvent.$emit('getNextTask')
// DicomEvent.$emit('reload')
// DicomEvent.$emit('getNextTask')
window.location.reload()
} else {
// ''
this.$confirm(this.$t('trials:readingReport:message:msg4'), {
@ -699,7 +700,8 @@ export default {
distinguishCancelAndClose: true
})
.then(() => {
DicomEvent.$emit('getNextTask')
window.location.reload()
// DicomEvent.$emit('getNextTask')
})
.catch(action => {
changeURLStatic('visitTaskId', this.visitTaskId)
@ -707,6 +709,7 @@ export default {
}
window.opener.postMessage('refreshTaskList', window.location)
// DicomEvent.$emit('readingPageStateUpdate', { readingTaskState: 2 })
}
this.loading = false
}).catch(() => {
@ -728,13 +731,13 @@ export default {
this.openWindow.close()
}
var token = getToken()
var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
var subjectCode = this.$router.currentRoute.query.subjectCode
var subjectId = this.$router.currentRoute.query.subjectId
var trialId = this.$router.currentRoute.query.trialId
var isReadingTaskViewInOrder = this.$router.currentRoute.query.isReadingTaskViewInOrder
var criterionType = this.$router.currentRoute.query.criterionType
var readingTool = this.$router.currentRoute.query.readingTool
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 })
this.openWindow = window.open(routeData.href, '_blank')
@ -747,7 +750,7 @@ export default {
this.answers = []
var isExistEvaluateResult = false
this.answerArr.map(item => {
if (item.questionType === 13) {
if (item.questionType === 13 || item.questionType === 42) {
evaluateResult = item.answer
isExistEvaluateResult = true
}
@ -832,57 +835,57 @@ export default {
background-color: #000;
color: #ffffff;
border:none;
>>>.el-card__body{
/deep/ .el-card__body{
flex: 1;
}
}
// >>>.el-table__cell{
// /deep/ .el-table__cell{
// background-color: #000;
// color: #ffffff;
// }
// >>>.el-table{
// /deep/ .el-table{
// background-color: #000;
// color: #ffffff;
// }
// >>>.el-table__cell{
// /deep/ .el-table__cell{
// background-color: #000;
// color: #ffffff;
// }
>>>.el-table, .el-table__expanded-cell {
/deep/ .el-table, .el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color:#444444;
}
>>>.el-table th, .el-table tr {
/deep/ .el-table th, .el-table tr {
background-color: #000;
color: #fff;
border-color:#444444;
}
>>>.el-table__body tr > td{
/deep/ .el-table__body tr > td{
background-color:#000 !important;
color: #fff;
border-color:#444444;
}
>>>.el-table__body tr:hover > td{
/deep/ .el-table__body tr:hover > td{
background-color:#858282 !important;
color: #fff;
border-color:#444444;
}
>>>.el-table--border th.gutter:last-of-type{
/deep/ .el-table--border th.gutter:last-of-type{
border: none;
}
>>>.el-card__header{
/deep/ .el-card__header{
border: none;
padding: 10px;
}
}
>>>.el-switch__label{
/deep/ .el-switch__label{
color:#fff;
}
>>>.el-switch__label.is-active{
/deep/ .el-switch__label.is-active{
color: #428bca;
}
</style>

View File

@ -0,0 +1,168 @@
<template>
<div v-loading="loading" class="preview-wrapper">
<div class="left-wrapper">
<div class="basic-info">
<span v-if="srInfo.SubjectCode">{{ `${srInfo.SubjectCode}` }}</span>
<span v-if="srInfo.TaskBlindName">({{ `${srInfo.TaskBlindName}` }})</span>
</div>
<div class="basic-content">
<div v-for="(item,index) in srInfo.SrList" :key="index" class="sr-wrapper">
<div class="sr-item" :class="{activeBtn:index === selectedIdx}" @click.prevent="preview(item,index)">
{{ index+1 }}
</div>
</div>
</div>
<!-- <div v-else class="basic-content-empty">
<span>{{ $t('trials:clinicaldara:title:nodata') }}</span>
</div> -->
</div>
<div class="right-wrapper">
<template v-for="item in srhtmls">
<div v-if="item.index === selectedIdx" :key="item.index" class="right-content" v-html="item.htmlData" />
</template>
</div>
</div>
</template>
<script>
import axios from 'axios'
export default {
name: 'SrList',
props: {
srInfo: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
isShow: false,
selectedIdx: -1,
loading: false,
srhtmls: [],
seletedHtml: ''
}
},
mounted() {
this.initList()
},
methods: {
async initList() {
if (this.srInfo.SrList.length > 0) {
this.loading = true
for (let i = 0; i < this.srInfo.SrList.length; i++) {
var htmlUrl = this.OSSclientConfig.basePath + this.srInfo.SrList[i]
var res = await axios.get(htmlUrl)
this.srhtmls.push({ index: i, htmlData: res.data })
}
this.loading = false
this.selectedIdx = 0
// this.getHtml(this.srInfo.SrList[0], 0)
}
},
getHtml(url, index) {
this.loading = true
var htmlUrl = this.OSSclientConfig.basePath + url
axios.get(htmlUrl).then(response => {
this.seletedHtml = response.data
this.srhtmls.push({ index: index, htmlData: response.data })
this.loading = false
return
}).catch(() => {
this.loading = false
})
},
preview(url, index) {
// var i = this.srhtmls.findIndex(i => i.index === index)
// if (i === -1) {
// this.getHtml(url, index)
// } else {
// this.seletedHtml = this.srhtmls[i].htmlData
// }
this.selectedIdx = index
}
}
}
</script>
<style lang="scss">
.preview-wrapper{
display: flex;
flex-direction: row !important;
width: 100%;
height: 100%;
padding: 5px;
overflow: hidden;
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #d0d0d0;
}
.left-wrapper{
box-sizing: border-box;
margin-right: 10px;
height: 100%;
width: 150px;
border: 1px solid #ddd;
.basic-info{
height: 30px;
line-height: 30px;
padding: 5px 10px;
font-size: 20px;
font-weight: bold;
background-color: #fff;
color: #fbfbfb;
}
.activeBtn{
color: #428bca;
border-color: #428bca;
}
.basic-content{
height: 100%;
overflow: auto;
}
.basic-content-empty{
padding: 5px;
font-size: 16px;
}
.sr-wrapper{
padding: 5px;
}
.sr-item{
box-sizing: border-box;
border-bottom: 2px solid #f3f3f3;
height: 30px;
line-height: 30px;
cursor: pointer;
padding-left: 5px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.right-wrapper{
flex: 1;
height: 100%;
border: 1px solid #ddd;
}
.right-content{
height:100%;
overflow-y: auto;
padding: 0 10px;
// color: #ddd;
.footnote{
display: none;
}
}
}
</style>

View File

@ -4,7 +4,7 @@
{{ subjectCode }}
</h4>
<h4 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;text-align: center;background-color: #4c4c4c;margin-bottom: 5px;">
{{ taskName }}
{{ taskBlindName }}
</h4>
<div class="ps">
<el-collapse v-model="activeNames">
@ -32,7 +32,7 @@
<div
v-for="(series, i) in study.SeriesList"
:key="i"
style="position:relative;margin:10px 0px;"
style="position:relative;margin-top:5px;"
series-type="current"
@click="showSeriesImage(index,i,series)"
>
@ -41,49 +41,44 @@
:class="{'series-active': i==seriesIndex && index === studyIndex}"
class="series-wrapper"
>
<!-- <el-image
<el-image
class="image-preview"
:src="series.previewImageUrl"
fit="fill"
/> -->
<img
class="image-preview"
:src="series.previewImageUrl"
crossorigin="anonymous"
alt=""
fit="fill"
>
/>
<div class="image-desc">
<div class="flex-div">
<div v-show="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
<div v-if="series.isDicom && series.prefetchInstanceCount<series.instanceCount">
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
<div v-if="series.isDicom && series.prefetchInstanceCount<series.instanceCount && series.modality!== 'SR'">
<!-- 下载 -->
<el-tooltip v-if="!series.isLoading" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
</el-tooltip>
<!-- 暂停 -->
<el-tooltip v-else class="item" effect="dark" :content="$t('trials:reading:button:pause')" placement="bottom">
<!-- <el-tooltip v-else class="item" effect="dark" :content="$t('trials:reading:button:pause')" placement="bottom">
<i class="el-icon-video-pause" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="stopLoadSeries(series,index,i)" />
</el-tooltip>
</el-tooltip> -->
</div>
<el-tooltip v-else-if="series.isDicom && series.prefetchInstanceCount === 0" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<el-tooltip v-else-if="series.isDicom && series.prefetchInstanceCount === 0 &&series.modality!== 'SR'" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
</el-tooltip>
</div>
<p v-show="series.description">
<el-tooltip class="item" effect="dark" :content="series.description" placement="right">
<div>{{ series.description }}</div>
<div style="">{{ series.description }}</div>
</el-tooltip>
</p>
<p v-show="series.sliceThickness && !study.IsCriticalSequence">
T: {{ series.sliceThickness }}
T: {{ parseFloat(series.sliceThickness).toFixed(digitPlaces) }}
</p>
<p v-show="series.instanceCount">
{{ series.modality }}: {{ series.instanceCount }} image
</p>
<div class="flex-div">
<div v-if="measureData.findIndex(v=>v.SeriesId === series.seriesId && v.MeasureData) > -1">
<div v-if="measureData && measureData.findIndex(v=>v.SeriesId === series.seriesId && v.MeasureData) > -1">
<!-- 有标注 -->
<el-tooltip class="item" effect="dark" :content="$t('trials:reading:button:marked')" placement="right">
<i class="el-icon-star-on" style="font-size: 16px;color: #ff5722;" />
@ -104,22 +99,47 @@
</el-collapse-item>
</el-collapse>
</div>
<div class="sr-wrapper">
<el-dialog
:visible.sync="srDialogVisible"
:custom-class="isSrFullscreen?'sr-full-dialog-container':'sr-dialog-container'"
:show-close="false"
:close-on-click-modal="false"
:fullscreen="isSrFullscreen"
>
<span slot="title" class="dialog-footer">
<div style="position: absolute;right: 20px;top: 10px;">
<svg-icon :icon-class="isSrFullscreen?'exit-fullscreen':'fullscreen'" style="cursor: pointer;font-size: 20px;color:#000;" @click="isSrFullscreen=!isSrFullscreen" />
<svg-icon icon-class="dClose" style="cursor: pointer;font-size: 25px;margin-left: 10px;" @click="srDialogVisible = false" />
</div>
</span>
<div style="height: 100%;margin:0;">
<SrList
v-if="srDialogVisible"
:sr-info="srInfo"
/>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import * as dicomParser from 'dicom-parser'
import * as cornerstone from 'cornerstone-core'
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
import requestPoolManager from '@/utils/request-pool'
import DicomEvent from './DicomEvent'
import { mapGetters } from 'vuex'
import store from '@/store'
import SrList from './SrList'
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
// const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes)
export default {
name: 'StudyList',
components: { SrList },
props: {
trialId: {
type: String,
@ -141,10 +161,6 @@ export default {
type: String,
default: ''
},
taskName: {
type: String,
default: ''
},
isReadingShowSubjectInfo: {
type: Boolean,
required: true
@ -154,6 +170,7 @@ export default {
return {
studyList: [],
cachedImages: [],
showSeriesList: [],
studyIndex: null,
seriesIndex: null,
loading: false,
@ -163,9 +180,15 @@ export default {
activeNames: [],
seriesArr: [],
imageList: [],
loopLoadStatus: 0 // -1 0 1
loopLoadStatus: 0, // -1 0 1
isSrFullscreen: false,
srDialogVisible: false,
srInfo: {},
digitPlaces: 2,
visitTaskIdx: -1
}
},
computed: {
...mapGetters(['visitTaskList', 'currentTaskId', 'activeSeries'])
},
@ -173,11 +196,18 @@ export default {
visitTaskList: {
immediate: true,
handler(val) {
console.log('visitTaskList--watch')
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx === -1) return
this.measureData = this.visitTaskList[idx].MeasureData
}
},
visitTaskId: {
immediate: true,
handler(val) {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx === -1) return
this.visitTaskIdx = idx
}
}
// activeSeries: {
// immediate: true,
@ -190,6 +220,8 @@ export default {
},
mounted() {
this.subjectCode = this.$router.currentRoute.query.subjectCode
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
DicomEvent.$on('refreshStudyListMeasureData', () => {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
this.measureData = this.visitTaskList[idx].MeasureData
@ -201,15 +233,65 @@ export default {
// this.studyList = this.visitTaskList[idx].StudyList
// }
// })
cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
// cornerstone.events.addEventListener('cornerstoneimagecachefull', this.cornerstoneimagecachefull)
// cornerstone.events.addEventListener('cornerstoneimagecachechanged', this.cornerstoneimagecachechanged)
window.addEventListener('beforeunload', e => {
cornerstone.imageCache.purgeCache()
})
},
beforeDestroy() {
cornerstone.imageCache.purgeCache()
DicomEvent.$off('refreshStudyListMeasureData')
window.removeEventListener('beforeunload', e => { cornerstone.imageCache.purgeCache() })
},
methods: {
initStudyInfo() {
const loading = this.$loading({ fullscreen: true })
//
this.getInitSeries().then((res) => {
requestPoolManager.startTaskTimer()
res.map((item) => {
this.loadInitialImage(item)
})
var i = res.findIndex(s => s.isCurrentTask)
if (i > -1) {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx > -1) {
this.measureData = this.visitTaskList[idx].MeasureData
this.studyList = this.visitTaskList[idx].StudyList
var priority = parseInt(new Date().getTime())
res[i].imageIds.map(image => {
priority--
this.imageList.push({ imageId: image, seriesId: res[i].seriesId, studyIndex: res[i].studyIndex, seriesIndex: res[i].seriesIndex, visitTaskId: res[i].visitTaskId, priority })
})
// this.studyList.map((study, studyIndex) => {
// study.SeriesList.map((series, seriesIndex) => {
// if (series.modality !== 'SR') {
// series.imageIds.map(image => {
// var p = priority - seriesIndex
// if (series.seriesId === res[i].seriesId) {
// p = priority
// } else {
// --p
// }
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority: p })
// })
// }
// })
// })
this.loopLoad()
}
}
DicomEvent.$emit('loadImageStacks', res)
loading.close()
this.isRender = true
}).catch(() => {
loading.close()
})
},
initStudyInfo2() {
console.log('initStudyInfo')
const loading = this.$loading({ fullscreen: true })
//
@ -229,17 +311,19 @@ export default {
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
if (series.modality !== 'SR') {
// var sliceThickness = isNaN(parseInt(series.sliceThickness)) ? null : parseInt(series.sliceThickness)
// if (sliceThickness === 5 || series.instanceCount <= 100) {
series.imageIds.map(image => {
let priority = 0
if (series.seriesId === res[i].seriesId) {
priority = parseInt(new Date().getTime()) * 10
} else {
priority = --p
}
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
series.imageIds.map(image => {
let priority = 0
if (series.seriesId === res[i].seriesId) {
priority = parseInt(new Date().getTime()) * 10
} else {
priority = --p
}
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
})
})
this.loopLoad()
@ -257,7 +341,9 @@ export default {
var p = parseInt(new Date().getTime())
var imageId = seriesInfo.imageIds[seriesInfo.imageIdIndex]
requestPoolManager.loadAndCacheImagePlus(imageId, seriesInfo.seriesId, p * 100).then(res => {
this.imageLoaded(seriesInfo, res.data.string('x0020000e'))
if (seriesInfo.isCurrentTask) {
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
}
})
},
getStudyList() {
@ -513,31 +599,47 @@ export default {
},
showSeriesImage(studyIndex, seriesIndex, series) {
if (series.isDicom) {
this.studyIndex = studyIndex
this.seriesIndex = seriesIndex
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
this.$emit('loadImageStack', dicomStatck)
if (!series.loadStatus) {
this.loopLoadStatus = -1
series.isLoading = true
var p = parseInt(new Date().getTime())
series.imageIds.map((imageId, i) => {
var priority = ''
if (i === 0) {
priority = parseInt(new Date().getTime()) * 10
} else {
priority = --p
}
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
if (series.modality === 'SR') {
this.studyIndex = studyIndex
this.seriesIndex = seriesIndex
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
this.srDialogVisible = true
this.srInfo = {
SubjectCode: series.studyCode,
TaskBlindName: series.taskBlindName,
SrList: series.instanceHtmlPathList
}
} else {
this.studyIndex = studyIndex
this.seriesIndex = seriesIndex
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
this.$emit('loadImageStack', dicomStatck)
if (!series.loadStatus && series.modality !== 'SR') {
this.loopLoadStatus = -1
series.isLoading = true
var isAddToTakPool = false
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
isAddToTakPool = true
} else {
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
}
if (!isAddToTakPool) {
var priority = parseInt(new Date().getTime())
series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
}
} else {
requestPoolManager.changePriority(series.seriesId)
}
}
}
DicomEvent.$emit('loadMeasurementList', { visitTaskId: this.visitTaskId, taskBlindName: this.taskBlindName })
DicomEvent.$emit('loadMeasurementList', { visitTaskId: this.visitTaskId, taskBlindName: this.taskBlindName })
}
} else {
// Dicom
this.$emit('previewNoneDicoms', { visitTaskId: this.visitTaskId })
@ -583,21 +685,26 @@ export default {
store.dispatch('reading/setActiveSeries', series)
},
loadImages(taskInfo) {
const isBaseLineTask = taskInfo.IsBaseLineTask
// const isBaseLineTask = taskInfo.IsBaseLineTask
const isCurrentTask = taskInfo.IsCurrentTask
// var priority = isCurrentTask ? parseInt(new Date().getTime()) : 999
var priority = parseInt(new Date().getTime())
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
if (!series.loadStatus && series.isDicom) {
if (isCurrentTask || isBaseLineTask) {
// /线
series.imageIds.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
} else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) {
// 访
if (!series.loadStatus && series.isDicom && series.modality !== 'SR') {
// if (isCurrentTask || isBaseLineTask) {
// // /线
// series.imageIds.map(image => {
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
// })
// } else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) {
// // 访
// series.imageIds.map(image => {
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
// })
// }
//
if (!isCurrentTask && study.IsCriticalSequence) {
series.imageIds.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
@ -608,47 +715,19 @@ export default {
})
this.loopLoad()
},
loadImages2(taskInfo) {
var priority = parseInt(new Date().getTime())
// 5mm 100
if (taskInfo.IsCurrentTask) {
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
var sliceThickness = isNaN(parseInt(series.sliceThickness)) ? null : parseInt(series.sliceThickness)
if (sliceThickness === 5 || series.instanceCount <= 100) {
series.imageIds.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
})
})
this.loopLoad()
} else {
//
var idx = this.studyList.findIndex(study => study.IsCriticalSequence)
if (idx === -1) return
this.studyList[idx].SeriesList.forEach((series, seriesIndex) => {
if (!series.loadStatus) {
series.imageIds.map(image => {
priority--
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: idx, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
})
this.loopLoad()
}
},
loopLoad() {
if (this.imageList.length > 0) {
requestPoolManager.startTaskTimer()
// requestPoolManager.startTaskTimer()
this.imageList.map(image => {
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
this.imageLoaded({ visitTaskId: this.visitTaskId, imageId: image.imageId }, res.data.string('x0020000e'))
if (res) {
this.imageLoaded(image, res.data.string('x0020000e'))
}
})
})
requestPoolManager.sortTaskPool()
this.imageList = []
}
},
@ -657,15 +736,26 @@ export default {
console.log('loadSeries')
this.loopLoadStatus = -1
this.$set(this.studyList[studyIndex].SeriesList[seriesIndex], 'isLoading', true)
const priority = parseInt(new Date().getTime())
series.imageIds.map(image => {
if (series.imageloadedArr.indexOf(image) === -1) {
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
var isAddToTakPool = false
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
isAddToTakPool = true
} else {
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
}
if (!isAddToTakPool) {
const priority = parseInt(new Date().getTime())
series.imageIds.map(image => {
const index = this.cachedImages.findIndex(item => item.uri === image)
if (index === -1) {
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
}
})
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
}
})
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
} else {
requestPoolManager.changePriority(series.seriesId)
}
},
//
@ -675,16 +765,33 @@ export default {
this.$set(this.studyList[studyIndex].SeriesList[seriesIndex], 'isLoading', false)
},
async imageLoaded(image, seriesUid) {
await store.dispatch('reading/updateStudyList', { visitTaskId: image.visitTaskId, imageId: image.imageId, seriesUid })
// await store.dispatch('reading/updateStudyList', { visitTaskId: image.visitTaskId, imageId: image.imageId, seriesUid })
// console.log(this.studyList[image.studyIndex].SeriesList[image.seriesIndex])
if (image.studyIndex > -1 && image.seriesIndex > -1) {
var prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount
var instanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
if (this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.push(image.imageId)
prefetchInstanceCount = prefetchInstanceCount + 1
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = prefetchInstanceCount
}
if (prefetchInstanceCount >= instanceCount) {
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
//
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].loadStatus = true
}
}
// store.dispatch('reading/updateSeriesList', { visitTaskindex: this.visitTaskIdx, studyIndex: image.studyIndex, seriesIndex: image.seriesIndex, imageId: image.imageId })
},
// instance
async cornerstoneImageLoaded(e) {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx === -1) return
this.studyList = this.visitTaskList[idx].StudyList
if (!this.studyList || this.studyList.length === 0) {
return
}
// var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
// if (idx === -1) return
// this.studyList = this.visitTaskList[idx].StudyList
// if (!this.studyList || this.studyList.length === 0) {
// return
// }
// if (!this.visitTaskList[idx].IsInit) {
// const loading = this.$loading({ fullscreen: true })
// await store.dispatch('reading/getMeasuredData', this.visitTaskList[idx].VisitTaskId)
@ -694,50 +801,58 @@ export default {
// await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[idx].VisitTaskId })
// loading.close()
// }
await store.dispatch('reading/updateStudyList', { visitTaskId: this.visitTaskId, imageId: e.detail.image.imageId, seriesUid: e.detail.image.data.string('x0020000e') })
const uri = e.detail.image.sharedCacheKey
const index = this.cachedImages.findIndex(item => item.uri === uri)
if (index === -1) {
this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
} else {
this.cachedImages[index].timestamp = new Date().getTime()
}
var imageId = e.detail.image.imageId
var seriesUid = e.detail.image.data.string('x0020000e')
var studyIndex = -1
var seriesIndex = -1
for (let i = 0; i < this.studyList.length; ++i) {
for (let j = 0; j < this.studyList[i].SeriesList.length; ++j) {
if (this.studyList[i].SeriesList[j].seriesUid === seriesUid) {
studyIndex = i
seriesIndex = j
break
}
}
if (studyIndex > 0) break
}
if (seriesIndex < 0) return
// await store.dispatch('reading/updateStudyList', { visitTaskId: this.visitTaskId, imageId: e.detail.image.imageId, seriesUid: e.detail.image.data.string('x0020000e') })
// const uri = e.detail.image.sharedCacheKey
// const index = this.cachedImages.findIndex(item => item.uri === uri)
// if (index === -1) {
// this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
// } else {
// this.cachedImages[index].timestamp = new Date().getTime()
// }
// var imageId = e.detail.image.imageId
// var seriesUid = e.detail.image.data.string('x0020000e')
// var studyIndex = -1
// var seriesIndex = -1
// for (let i = 0; i < this.studyList.length; ++i) {
// for (let j = 0; j < this.studyList[i].SeriesList.length; ++j) {
// if (this.studyList[i].SeriesList[j].seriesUid === seriesUid) {
// studyIndex = i
// seriesIndex = j
// break
// }
// }
// if (studyIndex > 0) break
// }
// if (seriesIndex < 0) return
const imageIdIndex = this.studyList[studyIndex].SeriesList[seriesIndex].imageIds.indexOf(imageId)
if (imageIdIndex < 0) return
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
if (this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount >= this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
//
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
}
}
// const imageIdIndex = this.studyList[studyIndex].SeriesList[seriesIndex].imageIds.indexOf(imageId)
// if (imageIdIndex < 0) return
// if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
// if (this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount >= this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
// //
// this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
// }
// }
},
cornerstoneimagecachechanged(e) {
const cacheInfo = cornerstone.imageCache.getCacheInfo()
console.log(cacheInfo)
},
cornerstoneimagecachefull(e) {
console.log('超过内存了')
}
}
}
</script>
<style lang="scss" scoped>
.study-wrapper{
>>>.el-progress-bar__inner{
/deep/ .el-progress-bar__inner{
transition: width 0s ease;
}
width:100%;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
.dicom-desc{
font-weight: bold;
font-size: 13px;
@ -754,7 +869,7 @@ export default {
background-color: #607d8b!important;
border: 1px solid #607d8b!important;
}
>>>.el-progress__text{
/deep/.el-progress__text{
color: #ccc;
font-size: 12px;
}
@ -791,7 +906,7 @@ export default {
.image-desc {
vertical-align: top;
p{
width: 100px;
width: 95px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -800,7 +915,10 @@ export default {
margin: 0px;
line-height: 1.5;
div{
width: 100px;
width: 95px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
@ -820,18 +938,18 @@ export default {
}
}
}
.el-collapse{
/deep/.el-collapse{
border: none;
>>>.el-collapse-item{
.el-collapse-item{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__content{
padding-bottom:10px;
.el-collapse-item__content{
padding-bottom:5px;
background-color: #000!important;
}
>>>.el-collapse-item__header{
.el-collapse-item__header{
background-color: #000!important;
color: #ddd;
border-bottom-color:#5a5a5a;
@ -840,5 +958,33 @@ export default {
line-height: 20px;
}
}
.sr-wrapper{
/deep/.el-dialog{
background: #fff !important;
border: 1px solid #ddd;
// color: #ddd;
.el-dialog__title{
color:#fff;
}
}
/deep/.sr-dialog-container{
margin-top: 50px !important;
width:75%;
height:80%;
}
/deep/.el-dialog__body{
padding: 10px;
height: calc(100% - 50px);
}
.el-dialog__header{
position: relative;
}
.sr-full-dialog-container{
/deep/.is-fullscreen .el-dialog__body{
height: calc(100% - 50px);
}
}
}
}
</style>

View File

@ -125,7 +125,7 @@ export default {
<style lang="scss">
.wl-container {
width: 100%;
// >>>.el-table{
// /deep/ .el-table{
// background-color: #1e1e1e !important;
// }
@ -149,7 +149,7 @@ export default {
background-color: #1e1e1e !important;
}
}
// >>>.el-table th,.el-table tr{
// /deep/ .el-table th,.el-table tr{
// background-color: #1e1e1e !important;
// }

View File

@ -7,9 +7,8 @@
element-loading-background="rgba(0, 0, 0, 0.8)"
style="position:relative;"
class="cornerstone-element"
@contextmenu.prevent="onContextmenu"
@mousemove="sliderMousemove"
@mouseup="sliderMouseup"
@contextmenu.prevent="onContextmenu"
>
<!-- 临床数据 -->
<div v-if="stack.isExistsClinicalData" class="info-cd" @click.stop="handleViewCD($event)">
@ -44,13 +43,13 @@
<i class="el-icon-caret-right" />
</div>
</div>
<div v-show="dicomInfo.series" class="info-series">
<div class="info-series">
<h2 v-if="isReadingShowSubjectInfo" style="color:#f44336;padding: 5px 0px;margin: 0;">{{ subjectCode }} {{ stack.taskBlindName }}</h2>
<div>Series: #{{ dicomInfo.series }}</div>
<div v-show="dicomInfo.series">Series: #{{ dicomInfo.series }}</div>
<div>Image: #{{ dicomInfo.frame }}</div>
<div>{{ dicomInfo.modality }}</div>
</div>
<div v-show="dicomInfo.series" class="info-image">
<div class="info-image">
<div v-show="mousePosition.mo">
Pos: {{ mousePosition.x?mousePosition.x.toFixed(0):'' }}, {{ mousePosition.y?mousePosition.y.toFixed(0):'' }}
</div>
@ -83,7 +82,7 @@
<!-- <div>{{ dicomInfo.time }}</div> -->
</div>
<div ref="sliderBox" class="my_slider_box" style="position: absolute;right: 1px;height: calc(100% - 140px);transform: translateY(-50%);top: calc(50% - 30px);width: 10px;background: #333;cursor: pointer" @click.stop="goViewer($event)">
<div :style="{top: height + '%'}" style="z-index:10;background: #9e9e9e;height: 20px;width: 100%;position: absolute;top: 0;cursor: move" @mousedown.stop="sliderMousedown($event)" />
<div :style="{top: height + '%'}" style="z-index:10;background: #9e9e9e;height: 20px;width: 100%;position: absolute;top: 0;cursor: move" @click.stop.prevent="() => {return}" @mousedown.stop="sliderMousedown($event)" />
</div>
<div style="position: absolute;left: 50%;top: 30px;color: #f44336;transform: translateX(-50%);">
{{ markers.top }}
@ -335,9 +334,9 @@ export default {
document.addEventListener('mouseup', () => {
this.sliderMouseup()
})
// document.addEventListener('mousemove', () => {
// this.sliderMousemove()
// })
document.addEventListener('mousemove', (e) => {
this.sliderMousemove(e)
})
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
this.type = this.$router.currentRoute.query.type ? this.$router.currentRoute.query.type : ''
@ -478,6 +477,7 @@ export default {
},
methods: {
goViewer(e) {
console.log('goViewer')
console.log(this.$refs['sliderBox'].clientHeight)
var height = e.offsetY * 100 / this.$refs['sliderBox'].clientHeight
this.height = height
@ -566,7 +566,6 @@ export default {
showCancelButton: false,
type: 'warning'
}).then(() => {
}).catch(() => {})
e.stopImmediatePropagation()
e.stopPropagation()
@ -673,49 +672,50 @@ export default {
return true
},
onContextmenu(event) {
if (this.isBaseline || this.readingTaskState >= 2 || this.CriterionType === 10) return false
const x = event.offsetX
const y = event.offsetY
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
event.preventDefault()
// if (this.isBaseline || this.readingTaskState >= 2 || this.CriterionType === 10) return false
// const x = event.offsetX
// const y = event.offsetY
// const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
var element = cornerstone.getEnabledElement(this.canvas)
var { imageId } = element.image
this.measuredTools.map(toolType => {
const toolState = ToolStateManager.getImageIdToolState(imageId, toolType)
if (!toolState) return
var toolObj = new cornerstoneTools[`${toolType}Tool`]()
// var element = cornerstone.getEnabledElement(this.canvas)
// var { imageId } = element.image
// this.measuredTools.map(toolType => {
// const toolState = ToolStateManager.getImageIdToolState(imageId, toolType)
// if (!toolState) return
// var toolObj = new cornerstoneTools[`${toolType}Tool`]()
var i = toolState.data.findIndex(data => toolObj.pointNearTool(this.canvas, data, { x, y }, 'mouse'))
if (i === -1) return false
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === toolState.data[i].uuid)
var rowId = null
if (idx > -1) {
rowId = this.measureData[idx].RowId
}
if (rowId) {
this.selectedLesion = toolState.data[i]
this.$contextmenu({
items: [
// {
// label: 'Split',
// divided: true,
// onClick: () => {
// this.handleSplit()
// }
// }
],
event,
x: event.clientX,
y: event.clientY,
customClass: 'class-a',
zIndex: 3,
minWidth: 100
})
return false
} else {
return false
}
})
// var i = toolState.data.findIndex(data => toolObj.pointNearTool(this.canvas, data, { x, y }, 'mouse'))
// if (i === -1) return false
// var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === toolState.data[i].uuid)
// var rowId = null
// if (idx > -1) {
// rowId = this.measureData[idx].RowId
// }
// if (rowId) {
// this.selectedLesion = toolState.data[i]
// this.$contextmenu({
// items: [
// // {
// // label: 'Split',
// // divided: true,
// // onClick: () => {
// // this.handleSplit()
// // }
// // }
// ],
// event,
// x: event.clientX,
// y: event.clientY,
// customClass: 'class-a',
// zIndex: 3,
// minWidth: 100
// })
// return false
// } else {
// return false
// }
// })
},
handleSplit() {
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === this.selectedLesion.uuid)
@ -997,9 +997,7 @@ export default {
var markName = this.measureData[idx].OrderMarkName
if (this.activeToolName === 'Eraser') {
var questionInfo = this.measureData[idx]
var markName = this.measureData[idx].MeasureData.data.remark
console.log(questionInfo)
this.$emit('moveMeasureData', { measureData, questionInfo, markName })
this.$emit('moveMeasureData', { measureData, questionInfo })
}
if ((this.disabledMarks.indexOf(markName) === -1 || !this.disabledMarks) && this.activeToolName !== 'Eraser') {
var questionInfo = this.measureData[idx]
@ -1474,14 +1472,6 @@ export default {
}
}
},
// updateImage(obj) {
// // const element = this.$refs.canvas
// // this.measuredData = obj.measuredData
// // const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
// // var imageId = `wadouri:/api/instance/content/${obj.instanceId}`
// // ToolStateManager.clearImageIdToolState(imageId)
// // cornerstone.updateImage(element, true)
// },
debounce(callback, delay) {
let timerId
return function() {

View File

@ -285,7 +285,7 @@
<div
class="icon"
:class="[activeTool==='Eraser'?'tool_active':'']"
data-tool="Eraser"
data-tool="Zoom"
@click.prevent="setToolActive('Eraser',false)"
>
<svg-icon icon-class="clear" class="svg-icon" />
@ -381,13 +381,13 @@
width="600px"
>
<el-tabs v-model="activeName" class="personal_config">
<el-tab-pane label="热键" name="1">
<el-tab-pane :label="$t('trials:reading:tab:hotkeys')" name="1">
<Hotkeys v-if="activeName === '1'" :reading-tool="0" @reset="resetHotkeyList" />
</el-tab-pane>
<el-tab-pane label="W/L模板" name="2">
<el-tab-pane :label="$t('trials:reading:tab:wlTemplate')" name="2">
<WL v-if="activeName === '2'" @getWwcTpl="getWwcTpl" />
</el-tab-pane>
<el-tab-pane label="其他" name="3">
<el-tab-pane :label="$t('trials:reading:tab:others')" name="3">
<Others v-if="activeName === '3'" />
</el-tab-pane>
</el-tabs>
@ -1435,8 +1435,9 @@ export default {
},
//
moveMeasureData(data) {
this.$refs['measurementList'].moveMeasureData(data)
// this.activeTool = ''
this.$confirm(this.$t('trials:trials-list:table:isDeleted') + data.questionInfo.MeasureData.data.remark + '?').then(() => {
this.$refs['measurementList'].moveMeasureData(data)
})
},
saveImage() {
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].saveImage()
@ -1749,12 +1750,12 @@ export default {
}
.personal_config {
>>>.el-tabs__content{
/deep/ .el-tabs__content{
height: 450px;
overflow-y: auto;
}
}
>>>.manuals-dialog-container{
/deep/ .manuals-dialog-container{
margin-top: 50px !important;
width:75%;
height:80%;
@ -1766,7 +1767,7 @@ export default {
position: relative;
}
}
>>>.manuals-full-dialog-container{
/deep/ .manuals-full-dialog-container{
.el-dialog__body{
padding: 10px;
height: calc(100% - 50px) !important;

View File

@ -50,7 +50,7 @@
size="small"
>
<el-form-item
label="标记名称"
:label="$t('trials:reading:title:measuredDataName')"
prop="measuredDataName"
>
<el-input v-model="form.measuredDataName"></el-input>
@ -171,17 +171,16 @@ export default {
this.activeName = ''
this.ecrfShow = true
var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.lastCanvasTaskId)
console.log(i)
if (i > -1) {
// for (var i = 0; this.visitTaskList.length > 0; i++) {
// console.log(this.visitTaskList,this.visitTaskList[i])
this.visitTaskId = this.visitTaskList[i].VisitTaskId
this.taskBlindName = this.visitTaskList[i].TaskBlindName
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
console.log(this.visitTaskList[i].IsInit)
if (!this.visitTaskList[i].IsInit) {
var loading = this.$loading({ fullscreen: true })
var triald = this.trialId = this.$router.currentRoute.query.trialId
if (!this.visitTaskList[i].measureDataInit) {
console.log('获取到以前访视标记')
await store.dispatch('reading/getCustomizeMeasuredData', this.visitTaskList[i].VisitTaskId)
}
if (!this.visitTaskList[i].studyListInit) {
@ -203,7 +202,6 @@ export default {
}
})
}
// }
}
},
getCustomTag() {
@ -234,10 +232,8 @@ export default {
},
async moveMeasureData(measureData) {
console.log('measureData', measureData)
this.$confirm(`确定删除该标记${measureData.markName}`).then(async res => {
await store.dispatch('reading/removeCustomizeMeasuredData', { visitTaskId: this.visitTaskId, ...measureData })
DicomEvent.$emit('updateImage')
})
await store.dispatch('reading/removeCustomizeMeasuredData', { visitTaskId: this.visitTaskId, ...measureData })
DicomEvent.$emit('updateImage')
},
handleMeasuredDataCancel() {
this.measuredDataVisible = false
@ -290,7 +286,7 @@ export default {
store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 })
DicomEvent.$emit('setReadingState', 2)
window.opener.postMessage('refreshTaskList', window.location)
this.$confirm('当前阅片任务已完成,是否进入下一个阅片任务?', {
this.$confirm(this.$t('trials:oncologyReview:title:msg2'), {
type: 'warning',
distinguishCancelAndClose: true
})
@ -376,12 +372,12 @@ export default {
}
.el-collapse{
border-bottom:none;
>>>.el-collapse-item{
/deep/ .el-collapse-item{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__header{
/deep/ .el-collapse-item__header{
background-color: #000!important;
color: #ddd;
border-bottom-color:#5a5a5a;
@ -389,11 +385,11 @@ export default {
height: 35px;
line-height: 35px;
}
>>>.el-collapse-item__wrap{
/deep/ .el-collapse-item__wrap{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__content{
/deep/ .el-collapse-item__content{
width:260px;
position: absolute;
top: 0px;

View File

@ -242,7 +242,8 @@ export default {
this.isInit = true
}
const img = new Image() // img
img.src = this.imgUrl // src
img.src = this.OSSclientConfig.basePath + this.imgUrl // src
img.setAttribute('crossorigin', 'anonymous')
return new Promise(resolve => {
img.onload = () => {
this.currentImg = img

View File

@ -31,7 +31,7 @@
/>
<div ref="imagesWrapper" class="images">
<div v-if="noData" class="empty-text">
<slot name="empty">暂无数据</slot>
<slot name="empty">{{ $t('trials:audit:message:noData') }}</slot>
</div>
<div v-show="!noData" class="items" :style="itemsStyle">
<div
@ -44,7 +44,7 @@
}"
@click="selected(index)"
>
<img :title="item.FileName" :src="`/api/${item.PreviewPath}`">
<img :title="item.FileName" :src="`${OSSclientConfig.basePath + item.Path}`">
<p v-if="item.FileName" class="item-date">
{{ `${index+1}` }}
</p>

View File

@ -13,11 +13,16 @@
<div style="display: flex;justify-content: space-between;align-items: center;color:#fff;margin: 10px 0 5px">
<span>{{ question.QuestionName }}</span>
<el-button size="mini" v-if="readingTaskState<2" @click="openAddTableCol(question)">
添加
{{ $t('common:button:add') }}
</el-button>
</div>
<el-table
:data="questionForm[question.Id]">
<el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
<template slot-scope="scope">
{{question.OrderMark}}{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column
:prop="item.Id"
:label="item.QuestionName"
@ -39,7 +44,7 @@
</template>
</el-table-column>
<el-table-column
label="操作"
:label="$t('common:action:action')"
show-overflow-tooltip
width="100px"
v-if="readingTaskState < 2"
@ -47,10 +52,10 @@
>
<template slot-scope="scope">
<el-button type="text" size="mini" @click="openAddTableCol(question, scope.$index)">
编辑
{{$t('common:button:edit')}}
</el-button>
<el-button type="text" size="mini" v-if="scope.row.IsCurrentTaskAdd === 'True' || !question.IsCopyLesions || IsBaseline" @click="deleteTableCol(question, scope.$index)">
删除
{{$t('common:button:delete')}}
</el-button>
</template>
</el-table-column>
@ -63,7 +68,7 @@
:prop="question.Id"
:rules="[
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && (question.RelevanceValueList.includes(questionForm[question.RelevanceId])))) && question.Type!=='group' && question.Type!=='summary',
message: '请注明', trigger: ['blur', 'change']},
message: $t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
]"
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
>
@ -149,7 +154,12 @@
{{ val }}
</el-checkbox>
</el-checkbox-group>
<!-- 自动分类 -->
<el-input
v-if="question.Type === 'class'"
v-model="questionForm[question.Id]"
disabled
/>
<!-- 自动计算 -->
<!-- :precision="2" :step="0.1" :max="10" -->
<el-input
@ -171,7 +181,8 @@
type="number"
v-if="question.Type === 'number' && question.DataSource !== 1"
@change="((val)=>{formItemNumberChange(val, question)})"
onblur="value=parseInt(value).toFixed(parseInt(localStorage.getItem('digitPlaces')))"
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')));console.log(localStorage.getItem('digitPlaces'))"
@input="limitInput($event, questionForm, question.Id)"
v-model="questionForm[question.Id]"
>
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
@ -180,7 +191,8 @@
<el-input
type="number"
v-if="question.Type === 'number' && question.DataSource === 1"
onblur="value=parseInt(value).toFixed(parseInt(localStorage.getItem('digitPlaces')))"
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')));console.log(localStorage.getItem('digitPlaces'))"
@input="limitInput($event, questionForm, question.Id)"
:disabled="question.DataSource === 1"
v-model="questionForm[question.Id]"
>
@ -190,41 +202,42 @@
<!-- 上传图像 -->
<el-upload
v-if="question.Type==='upload'"
:action="accept"
:action="question.FileType"
:limit="question.ImageCount"
:on-preview="handlePictureCardPreview"
:before-upload="handleBeforeUpload"
:before-upload="(file) => {return handleBeforeUpload(file, question.FileType)}"
:http-request="uploadScreenshot"
list-type="picture-card"
:on-remove="handleRemove"
:file-list="fileList"
:class="{disabled:fileList.length >= question.ImageCount}"
>
<i slot="default" class="el-icon-plus" />
<div slot="file" slot-scope="{file}">
<img
class="el-upload-list__item-thumbnail"
crossOrigin="Anonymous"
:src="OSSclientConfig.basePath + file.url"
alt=""
>
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in" />
</span>
<el-button slot="default" class="el-icon-plus">
{{this.$t('common:button:upload')}}
</el-button>
<!-- <div slot="file" slot-scope="{file}">-->
<!-- <div class="el-upload-list__item-name"></div>-->
<!--&lt;!&ndash; <img&ndash;&gt;-->
<!--&lt;!&ndash; class="el-upload-list__item-thumbnail"&ndash;&gt;-->
<!--&lt;!&ndash; :src="OSSclientConfig.basePath + file.url"&ndash;&gt;-->
<!--&lt;!&ndash; alt=""&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!-- <span class="el-upload-list__item-actions">-->
<!-- <span-->
<!-- class="el-upload-list__item-preview"-->
<!-- @click="handlePictureCardPreview(file)"-->
<!-- >-->
<!-- <i class="el-icon-zoom-in" />-->
<!-- </span>-->
<span
v-if="readingTaskState < 2"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete" />
</span>
</span>
</div>
<!-- <span-->
<!-- v-if="readingTaskState < 2"-->
<!-- class="el-upload-list__item-delete"-->
<!-- @click="handleRemove(file)"-->
<!-- >-->
<!-- <i class="el-icon-delete" />-->
<!-- </span>-->
<!-- </span>-->
<!-- </div>-->
</el-upload>
<el-dialog
v-if="question.Type==='upload'"
@ -232,7 +245,7 @@
:visible.sync="imgVisible"
width="600px"
>
<el-image :src="imageUrl" crossOrigin="Anonymous" width="100%">
<el-image :src="imageUrl" width="100%">
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
</div>
@ -280,7 +293,7 @@
:visit-task-id="visitTaskId"
:criterion-id="criterionId"
:type="addOrEdit.type"
:CalculationList="CalculationList"
:CalculationList="CalculationTabelList"
@formItemTableNumberChange="formItemTableNumberChange"
@setFormItemData="setFormItemData"
@resetFormItemData="resetFormItemData"
@ -360,7 +373,8 @@ export default {
loading: false,
RowIndex: 0,
RowId: null,
digitPlaces: 0
digitPlaces: 0,
CalculationTabelList: []
}
},
watch: {
@ -378,17 +392,32 @@ export default {
},
mounted() {
this.digitPlaces = localStorage.getItem('digitPlaces') ? parseInt(localStorage.getItem('digitPlaces')) : 0
if (this.question.Type === 'class') {
this.ClassifyAlgorithmsList = JSON.parse(this.question.ClassifyAlgorithms)
}
setInterval(()=> {
if (this.question.Type === 'class') {
let o = this.ClassifyAlgorithmsList.find(v => {
return this.questionForm[this.question.ClassifyQuestionId] >= v.gt && this.questionForm[this.question.ClassifyQuestionId] < v.lt
})
if (this.questionForm[this.question.ClassifyQuestionId]) {
this.questionForm[this.question.Id] = o ? o.label : null
} else {
this.questionForm[this.question.Id] = null
}
}
}, 300)
if (this.question.Type === 'upload') {
if (this.questionForm[this.question.Id]) {
this.urls = this.questionForm[this.question.Id].split('|')
this.fileList = []
this.urls.map(url => {
this.fileList.push({ name: '', url: `/${url}` })
this.urls.map((url, index) => {
this.fileList.push({ name: `${this.$t('trials:emailManageCfg:title:fileName')}${index + 1}`, url: `${url}` })
})
}
}
if (this.question.Type === 'table') {
// this.getQuestionCalculateRelation()
this.getQuestionCalculateRelation()
if (this.questionForm[this.question.Id]) {
this.QuestionsForm = {}
this.question.TableQuestions.Questions.forEach(v => {
@ -402,8 +431,17 @@ export default {
}
},
methods: {
limitInput(value, a, b) {
if (value.indexOf('.') > -1) {
if (value.split('.')[1].length >= this.digitPlaces) {
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
}
} else {
}
},
deleteTableCol(row, index) {
this.$confirm('确定要删除该行表格问题吗?').then(() => {
console.log(row)
this.$confirm(this.$t('trials:uploadNonDicoms:message:msg1')).then(() => {
const loading = this.$loading({ fullscreen: true })
var param = {
visitTaskId: this.visitTaskId,
@ -461,7 +499,7 @@ export default {
this.QuestionsForm.RowIndex = this.questionForm[this.question.Id].length + 1
}
submitTableQuestion(params).then(async res => {
this.$message.success('保存成功!')
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.QuestionsForm.RowId = res.Result.RowId
this.save()
loading.close()
@ -479,10 +517,9 @@ export default {
},
getQuestionCalculateRelation() {
getQuestionCalculateRelation({
TrialReadingCriterionId: this.criterionId,
ReadingQuestionId: this.question.Id
}).then(res => {
this.CalculationList = res.Result
this.CalculationTabelList = res.Result
})
},
save() {
@ -648,7 +685,7 @@ export default {
},
openAddTableCol(row, index) {
this.addOrEdit.visible = true
this.addOrEdit.title = row.QuestionName + '表格问题'
this.addOrEdit.title = row.QuestionName + this.$t('trials:readingUnit:qsList:title:tableQs')
this.QuestionsList = row.TableQuestions.Questions
this.AnswersList = row.TableQuestions.Answers
if (!index && index !== 0) {
@ -706,6 +743,7 @@ export default {
this.$emit('setFormItemData', obj)
},
async uploadScreenshot(param) {
console.log('uploadScreenshot')
if (!this.visitTaskId) return
const loading = this.$loading({
target: document.querySelector('.ecrf-wrapper'),
@ -722,22 +760,33 @@ export default {
this.urls.push(this.$getObjectName(res.url))
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
loading.close()
// uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
// if (res.IsSuccess) {
// this.fileList.push({ url: `/api/${res.Result.Path}` })
// this.urls.push(res.Result.Path)
// this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
// }
// loading.close()
// }).catch(() => {
// loading.close()
// })
},
handleBeforeUpload(file) {
handleBeforeUpload(file, accept) {
//
if (this.checkFileSuffix(file.name)) {
// this.fileList = []
console.log('handleBeforeUpload', file)
if (this.checkFileSuffix(file.name, accept) || accept === '-1') {
return true
} else {
const msg = this.$t('trials:adReview:title:msg4').replace('xxx', this.accept)
const msg = this.$t('trials:adReview:title:msg4').replace('xxx', accept)
this.$alert(msg)
return false
}
console.log(file)
},
checkFileSuffix(fileName) {
checkFileSuffix(fileName, accept) {
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
if (this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
if (accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
return false
} else {
return true
@ -750,10 +799,13 @@ export default {
},
//
handleRemove(file, fileList) {
this.imageUrl = ''
this.fileList.splice(this.fileList.findIndex(f => f.url === file.url), 1)
this.urls.splice(this.fileList.findIndex(f => f === file.url), 1)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
console.log('handleRemove')
if (file && file.status === "success") {
this.imageUrl = ''
this.fileList.splice(this.fileList.findIndex(f => f.url === file.url), 1)
this.urls.splice(this.fileList.findIndex(f => f === file.url), 1)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
}
}
}
}
@ -762,13 +814,34 @@ export default {
.my_dialog{
.criterion-form-item{
width: 100%;
>>>.el-form-item__content{
/deep/ .el-form-item__content{
width: auto;
}
///deep/ .el-input-goup__append{
// background-color: transparent;
// color: #ddd;
// border: 1px solid #5e5e5e;
//}
}
}
/deep/ .el-form-item__label{
color: #c3c3c3;
}
/deep/ .el-radio__label{
color: #c3c3c3;
}
/deep/ .el-input-group__append{
background: #000;
color: #ddd;
border: 1px solid #5e5e5e;
}
/deep/ .el-input .el-input__inner{
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
.criterion-form-item{
>>>.criterion-form-item .el-form-item{
/deep/ .criterion-form-item .el-form-item{
display: block;
.el-form-item__label{
display: block;
@ -776,16 +849,13 @@ export default {
float: none;
text-align: left;
}
.el-input--small .el-input__inner{
display: block;
}
}
.el-form-item{
display: flex;
flex-direction: row;
align-items: flex-start;
}
>>>.el-form-item__content{
/deep/ .el-form-item__content{
}
.el-input{
width:100%;
@ -794,7 +864,7 @@ export default {
margin-bottom: 0px;
}
.disabled{
>>>.el-upload--picture-card {
/deep/ .el-upload--picture-card {
display: none;
}
}
@ -804,10 +874,16 @@ export default {
align-items: flex-start;
}
}
>>>.el-table__body-wrapper::-webkit-scrollbar{
/deep/ .el-table__body-wrapper::-webkit-scrollbar{
height: 10px!important;
}
>>>.el-table__fixed-right::before{
/deep/ .el-table__fixed-right::before{
display: none;
}
/deep/ .el-upload-list__item-name{
color: #0a84ff;
.el-icon-document{
color: #0a84ff;
}
}
</style>

View File

@ -140,7 +140,6 @@
<div slot="file" slot-scope="{file}">
<img
class="el-upload-list__item-thumbnail"
crossOrigin="Anonymous"
:src="OSSclientConfig.basePath + file.url"
alt=""
>
@ -236,11 +235,11 @@ export default {
mounted() {
if (this.question.Type === 'upload') {
if (this.questionForm[this.question.Id]) {
this.accept = this.question.Accept
this.urls = this.questionForm[this.question.Id].split('|')
this.fileList = []
this.urls.map(url => {
this.fileList.push({ name: '', url: `/${url}` })
this.fileList.push({ name: '', url: `/api/${url}` })
})
}
}
@ -273,11 +272,9 @@ export default {
lock: true,
spinner: 'el-icon-loading'
})
var fileName = param.file.name
let file = await this.fileToBlob(param.file)
let res = await this.OSSclient.put(`/${this.$route.query.trialId}/Customize/${this.visitTaskId}/${fileName}`, file)
this.fileList.push({ name: `${this.$t('trials:emailManageCfg:title:fileName')}${this.fileList.length + 1}`, url: this.$getObjectName(res.url) })
console.log('fileList', this.fileList)
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, url: this.$getObjectName(res.url) })
this.urls.push(this.$getObjectName(res.url))
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
loading.close()
@ -288,11 +285,13 @@ export default {
// this.fileList = []
return true
} else {
this.$alert(`必须是 ${this.accept} 格式`)
const msg = this.$t('trials:adReview:title:msg4').replace('xxx', this.accept)
this.$alert(msg)
return false
}
},
checkFileSuffix(fileName) {
console.log(this.accept)
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
if (this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
@ -321,7 +320,7 @@ export default {
margin-bottom: 0px;
}
.disabled{
>>>.el-upload--picture-card {
/deep/ .el-upload--picture-card {
display: none;
}
}
@ -330,10 +329,10 @@ export default {
flex-direction: column;
align-items: flex-start;
}
>>>.el-input.is-disabled .el-input__inner{
/deep/ .el-input.is-disabled .el-input__inner{
background-color: #646464a1;
}
>>>.el-select.is-disabled .el-input__inner{
/deep/ .el-select.is-disabled .el-input__inner{
background-color: #646464a1;
}
</style>

View File

@ -6,7 +6,7 @@
:prop="question.Id"
:rules="[
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && !!~question.RelevanceValueList.indexOf(questionForm[question.RelevanceId]))) && question.Type!=='group' && question.Type!=='summary',
message: '请注明', trigger: ['blur', 'change']},
message: $t('common:ruleMessage:select'), trigger: ['blur', 'change']},
]"
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
>
@ -150,7 +150,6 @@
<div slot="file" slot-scope="{file}">
<img
class="el-upload-list__item-thumbnail"
crossOrigin="Anonymous"
:src="OSSclientConfig.basePath + file.url"
alt=""
>
@ -178,9 +177,9 @@
:visible.sync="imgVisible"
width="600px"
>
<el-image :src="imageUrl" crossOrigin="Anonymous" width="100%">
<el-image :src="imageUrl" width="100%">
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
{{$t('trials:readingUnit:qsList:message:loading')}}<span class="dot">...</span>
</div>
</el-image>
</el-dialog>
@ -212,6 +211,12 @@ export default {
type: String,
required: true
},
CalculationList: {
type: Array,
default() {
return []
}
},
readingTaskState: {
type: Number,
required: true
@ -225,6 +230,16 @@ export default {
default: 'add'
}
},
computed: {
calculationValue: {
get() {
return this.questionForm[this.question.Id]
},
set() {
}
}
},
data() {
return {
addOrEdit: { visible: false, title: '' },
@ -239,14 +254,27 @@ export default {
digitPlaces: 0
}
},
// watch: {
// questionForm: {
// deep: true,
// immediate: true,
// handler(v) {
//
// }
// }
// },
watch: {
questionForm: {
deep: true,
immediate: true,
handler(v) {
handler(v, oldv) {
try {
if (!v[this.question.Id] || !oldv[this.question.Id]) return
} catch (e) {
}
this.formItemNumberChange(this.question.Id, false)
}
}
},
},
mounted() {
this.digitPlaces = localStorage.getItem('digitPlaces') ? parseInt(localStorage.getItem('digitPlaces')) : 0
@ -255,7 +283,7 @@ export default {
this.urls = this.questionForm[this.question.Id].split('|')
this.fileList = []
this.urls.map(url => {
this.fileList.push({ name: '', url: `/${url}` })
this.fileList.push({ name: '', url: `${url}` })
})
}
}
@ -272,7 +300,7 @@ export default {
},
openAddTableCol(row) {
this.addOrEdit.visible = true
this.addOrEdit.title = row.QuestionName + '表格问题'
this.addOrEdit.title = row.QuestionName + this.$t('trials:readingUnit:qsList:title:tableQs')
this.QuestionsList = row.TableQuestions.Questions
this.AnswersList = row.TableQuestions.Answers
this.QuestionsForm = {}
@ -314,8 +342,95 @@ export default {
} else {
}
},
logic(rules, num = 0) {
try {
if (rules.CalculateQuestionList.length === 0) {
return false
}
var count = 0
var maxList = [], minList = []
rules.CalculateQuestionList.forEach((o, i) => {
if (rules.CustomCalculateMark > 4) {
if (i !== 0) {
switch (rules.CustomCalculateMark) {
case 7:
count += parseFloat(this.questionForm[o.TableQuestionId])
if (i === rules.CalculateQuestionList.length - 1) {
num = count / rules.CalculateQuestionList.length
}
break;
case 8:
maxList.push(this.questionForm[o.TableQuestionId])
if (i === rules.CalculateQuestionList.length - 1) {
num = Math.max(...maxList)
}
break;
case 9:
minList.push(this.questionForm[o.TableQuestionId])
if (i === rules.CalculateQuestionList.length - 1) {
num = Math.min(...minList)
}
break;
}
} else {
maxList.push(this.questionForm[o.TableQuestionId])
minList.push(this.questionForm[o.TableQuestionId])
count = parseFloat(this.questionForm[o.TableQuestionId])
num = parseFloat(this.questionForm[o.TableQuestionId])
}
} else {
if (i !== 0) {
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
break;
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
break;
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
break;
case 4:
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
}
} else {
num = parseFloat(this.questionForm[o.TableQuestionId])
}
}
})
} catch (e) {
console.log(e)
}
var digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
if (rules.ValueType === 2) {
num = num * 100
}
return num.toFixed(digitPlaces)
},
formItemNumberChange(v, question) {
this.$emit('formItemTableNumberChange', v, question)
console.log(this.CalculationList)
this.CalculationList.forEach((v, i) => {
console.log('v', v)
var find = v.CalculateQuestionList.filter(o => {
return o.QuestionId === question.Id
})
console.log('find', find)
// findnumber
if (find) {
var num = this.logic(v)
console.log(num)
if (num !== false) {
this.$set(this.questionForm, v.QuestionId, num)
// this.$emit('setFormItemData', { key: v.QuestionId, val: num })
}
}
})
// this.$emit('formItemTableNumberChange', v, question)
},
resetChild(obj) {
obj.forEach(i => {
@ -344,6 +459,7 @@ export default {
var subjectId = this.$route.query.trialId
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${param.file.name}`, file)
console.log(res)
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url)})
this.urls.push(this.$getObjectName(res.url))
this.$emit('setFormTableItemData', this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '')
@ -386,7 +502,7 @@ export default {
<style lang="scss" scoped>
.my_dialog{
.criterion-form-item{
>>>.el-form-item__content{
/deep/ .el-form-item__content{
width: auto;
}
}
@ -397,7 +513,7 @@ export default {
flex-direction: row;
align-items: flex-start;
}
>>>.el-form-item__content{
/deep/ .el-form-item__content{
width: 500px;
}
.el-input{
@ -407,7 +523,7 @@ export default {
margin-bottom: 0px;
}
.disabled{
>>>.el-upload--picture-card {
/deep/ .el-upload--picture-card {
display: none;
}
}

View File

@ -219,9 +219,7 @@ export default {
await store.dispatch('reading/getVisitTasks', this.visitTaskId)
var index = this.visitTaskList.findIndex(i => i.IsCurrentTask)
if (index > -1) {
for (let i = 0; i < this.visitTaskList.length ; i++) {
await store.dispatch('reading/getCustomizeMeasuredData', this.visitTaskList[i].VisitTaskId)
}
await store.dispatch('reading/getCustomizeMeasuredData', this.visitTaskList[index].VisitTaskId)
await store.dispatch('reading/getStudyInfo', { trialId: this.trialId, subjectVisitId: this.visitTaskList[index].VisitId, visitTaskId: this.visitTaskList[index].VisitTaskId, taskBlindName: this.visitTaskList[index].TaskBlindName })
await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[index].VisitTaskId })
await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[index].VisitTaskId })
@ -501,31 +499,31 @@ export default {
color: #ffffff;
border:none;
}
>>>.el-table, .el-table__expanded-cell {
/deep/ .el-table, .el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color:#444444;
}
>>>.el-table th, .el-table tr {
/deep/ .el-table th, .el-table tr {
background-color: #000;
color: #fff;
border-color:#444444;
}
>>>.el-table__body tr > td{
/deep/ .el-table__body tr > td{
background-color:#000 !important;
color: #fff;
border-color:#444444;
}
>>>.el-table__body tr:hover > td{
/deep/ .el-table__body tr:hover > td{
background-color:#858282 !important;
color: #fff;
border-color:#444444;
}
>>>.el-table--border th.gutter:last-of-type{
/deep/ .el-table--border th.gutter:last-of-type{
border: none;
}
>>>.el-card__header{
/deep/ .el-card__header{
border: none;
padding: 10px;
}
@ -581,18 +579,18 @@ export default {
.el-tabs__item{
color: #fff;
}
>>>.el-tabs__header{
/deep/ .el-tabs__header{
height: 55px;
margin:0px;
box-sizing: border-box;
}
>>>.el-tabs__content{
/deep/ .el-tabs__content{
flex: 1;
margin:0px;
overflow-y: auto;
box-sizing: border-box;
}
>>>.el-tabs__item{
/deep/ .el-tabs__item{
color: #fff;
}
@ -613,7 +611,7 @@ export default {
background-color: #607d8b!important;
border: 1px solid #607d8b!important;
}
>>>.el-progress__text{
/deep/ .el-progress__text{
color: #ccc;
font-size: 12px;
}

View File

@ -148,6 +148,9 @@
<template v-else-if="scope.row.ValueType === 2">
{{ 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]} %` }}
</template>
<template v-else>
{{ 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]}` }}
</template>
</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)"
@ -168,6 +171,9 @@
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} %` }}
</template>
<template v-else>
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] : questionForm[scope.row.QuestionId]}}
</template>
</span>
</div>
</template>
@ -703,7 +709,7 @@ export default {
},
handleResize() {
this.$nextTick(() => {
this.$refs.reportList && this.$refs.reportList.doLayout()
this.$refs.reportList.doLayout()
})
},
//
@ -739,7 +745,7 @@ export default {
store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 })
DicomEvent.$emit('setReadingState', 2)
window.opener.postMessage('refreshTaskList', window.location)
this.$confirm('当前阅片任务已完成,是否进入下一个阅片任务?', {
this.$confirm(this.$t('trials:oncologyReview:title:msg2'), {
type: 'warning',
distinguishCancelAndClose: true
})
@ -752,7 +758,8 @@ export default {
// this.$router.push({
// path: `/readingPage?subjectCode=${subjectCode}&subjectId=${subjectId}&trialId=${trialId}&TokenKey=${token}`
// })
DicomEvent.$emit('getNextTask')
// DicomEvent.$emit('getNextTask')
window.location.reload()
})
.catch(action => {
@ -845,61 +852,61 @@ export default {
color: #ffffff;
border:none;
}
// >>>.el-table__cell{
// /deep/ .el-table__cell{
// background-color: #000;
// color: #ffffff;
// }
// >>>.el-table{
// /deep/ .el-table{
// background-color: #000;
// color: #ffffff;
// }
// >>>.el-table__cell{
// /deep/ .el-table__cell{
// background-color: #000;
// color: #ffffff;
// }
>>>.el-table, .el-table__expanded-cell {
/deep/ .el-table, .el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color:#444444;
}
>>>.el-table th, .el-table tr {
/deep/ .el-table th, .el-table tr {
background-color: #000;
color: #fff;
border-color:#444444;
}
>>>.el-table__body tr > td{
/deep/ .el-table__body tr > td{
background-color:#000 !important;
color: #fff;
border-color:#444444;
}
>>>.el-table__body tr:hover > td{
/deep/ .el-table__body tr:hover > td{
background-color:#858282 !important;
color: #fff;
border-color:#444444;
}
>>>.el-table--border th.gutter:last-of-type{
/deep/ .el-table--border th.gutter:last-of-type{
border: none;
}
>>>.el-card__header{
/deep/ .el-card__header{
border: none;
padding: 10px;
}
>>>.el-upload-list--picture-card .el-upload-list__item{
/deep/ .el-upload-list--picture-card .el-upload-list__item{
width: 30px;
height: 30px;
}
>>>.el-upload--picture-card{
/deep/ .el-upload--picture-card{
width: 30px;
height: 30px;
line-height: 40px;
}
}
>>>.el-switch__label{
/deep/ .el-switch__label{
color:#fff;
}
>>>.el-switch__label.is-active{
/deep/ .el-switch__label.is-active{
color: #428bca;
}
.uploadWrapper{

View File

@ -88,6 +88,7 @@ name: "CustomizeReportPageUpload",
},
mounted() {
this.urls = this.initUrl === '' ? [] : this.initUrl.split('|')
console.log(this.visitTaskId, this.urls)
this.fileList = []
this.urls.map(url => {
this.fileList.push({ name: '', url: `${url}` })

View File

@ -32,7 +32,7 @@
<div
v-for="(series, i) in study.SeriesList"
:key="i"
style="position:relative;margin:10px 0px;"
style="position:relative;margin-top:5px;"
series-type="current"
@click="showSeriesImage(index,i,series)"
>
@ -45,21 +45,22 @@
class="image-preview"
:src="series.previewImageUrl"
fit="fill"
crossorigin="anonymous"
/>
<div class="image-desc">
<div class="flex-div">
<div>#{{ series.seriesNumber }} </div>
<div v-if="series.isDicom && series.prefetchInstanceCount<series.instanceCount">
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
<div v-if="series.isDicom && series.prefetchInstanceCount<series.instanceCount && series.modality!== 'SR'">
<!-- 下载 -->
<el-tooltip v-if="!series.isLoading" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
</el-tooltip>
<!-- 暂停 -->
<el-tooltip v-else class="item" effect="dark" :content="$t('trials:reading:button:pause')" placement="bottom">
<!-- <el-tooltip v-else class="item" effect="dark" :content="$t('trials:reading:button:pause')" placement="bottom">
<i class="el-icon-video-pause" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="stopLoadSeries(series,index,i)" />
</el-tooltip>
</el-tooltip> -->
</div>
<el-tooltip v-else-if="series.prefetchInstanceCount === 0" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<el-tooltip v-else-if="series.isDicom && series.prefetchInstanceCount === 0 &&series.modality!== 'SR'" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
</el-tooltip>
</div>
@ -69,15 +70,15 @@
</el-tooltip>
</p>
<p v-show="series.sliceThickness">
T: {{ series.sliceThickness }}
<p v-show="series.sliceThickness && !study.IsCriticalSequence">
T: {{ parseFloat(series.sliceThickness).toFixed(digitPlaces) }}
</p>
<p v-show="series.instanceCount">
{{ series.modality }}: {{ series.instanceCount }} image
</p>
<div class="flex-div">
<div v-if="measureData && measureData.findIndex(v=>v.SeriesId === series.seriesId) > -1">
<div v-if="measureData && measureData.findIndex(v=>v.SeriesId === series.seriesId && v.MeasureData) > -1">
<!-- 有标注 -->
<el-tooltip class="item" effect="dark" :content="$t('trials:reading:button:marked')" placement="right">
<i class="el-icon-star-on" style="font-size: 16px;color: #ff5722;" />
@ -98,22 +99,47 @@
</el-collapse-item>
</el-collapse>
</div>
<div class="sr-wrapper">
<el-dialog
:visible.sync="srDialogVisible"
:custom-class="isSrFullscreen?'sr-full-dialog-container':'sr-dialog-container'"
:show-close="false"
:close-on-click-modal="false"
:fullscreen="isSrFullscreen"
>
<span slot="title" class="dialog-footer">
<div style="position: absolute;right: 20px;top: 10px;">
<svg-icon :icon-class="isSrFullscreen?'exit-fullscreen':'fullscreen'" style="cursor: pointer;font-size: 20px;color:#000;" @click="isSrFullscreen=!isSrFullscreen" />
<svg-icon icon-class="dClose" style="cursor: pointer;font-size: 25px;margin-left: 10px;" @click="srDialogVisible = false" />
</div>
</span>
<div style="height: 100%;margin:0;">
<SrList
v-if="srDialogVisible"
:sr-info="srInfo"
/>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import * as dicomParser from 'dicom-parser'
import * as cornerstone from 'cornerstone-core'
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
import requestPoolManager from '@/utils/request-pool'
import DicomEvent from './../components/DicomEvent'
import { mapGetters } from 'vuex'
import store from '@/store'
import SrList from './../components/SrList'
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
// const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes)
export default {
name: 'StudyList',
components: { SrList },
props: {
trialId: {
type: String,
@ -144,6 +170,7 @@ export default {
return {
studyList: [],
cachedImages: [],
showSeriesList: [],
studyIndex: null,
seriesIndex: null,
loading: false,
@ -153,9 +180,15 @@ export default {
activeNames: [],
seriesArr: [],
imageList: [],
loopLoadStatus: 0 // -1 0 1
loopLoadStatus: 0, // -1 0 1
isSrFullscreen: false,
srDialogVisible: false,
srInfo: {},
digitPlaces: 2,
visitTaskIdx: -1
}
},
computed: {
...mapGetters(['visitTaskList', 'currentTaskId', 'activeSeries'])
},
@ -167,6 +200,14 @@ export default {
if (idx === -1) return
this.measureData = this.visitTaskList[idx].MeasureData
}
},
visitTaskId: {
immediate: true,
handler(val) {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx === -1) return
this.visitTaskIdx = idx
}
}
// activeSeries: {
// immediate: true,
@ -179,10 +220,8 @@ export default {
},
mounted() {
this.subjectCode = this.$router.currentRoute.query.subjectCode
// DicomEvent.$on('getMeasureData', () => {
// var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
// this.measureData = this.visitTaskList[idx].MeasureData
// })
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
// DicomEvent.$on('setReadingState', readingTaskState => {
// var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
@ -190,12 +229,12 @@ export default {
// this.studyList = this.visitTaskList[idx].StudyList
// }
// })
cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
// cornerstone.events.addEventListener('cornerstoneimagecachefull', this.cornerstoneimagecachefull)
// cornerstone.events.addEventListener('cornerstoneimagecachechanged', this.cornerstoneimagecachechanged)
},
beforeDestroy() {
cornerstone.imageCache.purgeCache()
// DicomEvent.$off('getMeasureData')
},
methods: {
initStudyInfo() {
@ -208,7 +247,54 @@ export default {
})
var i = res.findIndex(s => s.isCurrentTask)
if (i > -1) {
var p = this.visitTaskId === this.currentTaskId ? parseInt(new Date().getTime()) : 999 //
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx > -1) {
this.measureData = this.visitTaskList[idx].MeasureData
this.studyList = this.visitTaskList[idx].StudyList
var priority = parseInt(new Date().getTime())
res[i].imageIds.map(image => {
priority--
this.imageList.push({ imageId: image, seriesId: res[i].seriesId, studyIndex: res[i].studyIndex, seriesIndex: res[i].seriesIndex, visitTaskId: res[i].visitTaskId, priority })
})
// this.studyList.map((study, studyIndex) => {
// study.SeriesList.map((series, seriesIndex) => {
// if (series.modality !== 'SR') {
// series.imageIds.map(image => {
// var p = priority - seriesIndex
// if (series.seriesId === res[i].seriesId) {
// p = priority
// } else {
// --p
// }
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority: p })
// })
// }
// })
// })
this.loopLoad()
}
}
DicomEvent.$emit('loadImageStacks', res)
loading.close()
this.isRender = true
}).catch(() => {
loading.close()
})
},
initStudyInfo2() {
console.log('initStudyInfo')
const loading = this.$loading({ fullscreen: true })
//
this.getInitSeries().then((res) => {
requestPoolManager.startTaskTimer()
res.map((item) => {
this.loadInitialImage(item)
})
var i = res.findIndex(s => s.isCurrentTask)
if (i > -1) {
var p = parseInt(new Date().getTime())
// var p = this.visitTaskId === this.currentTaskId ? parseInt(new Date().getTime()) : 999 //
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx > -1) {
this.measureData = this.visitTaskList[idx].MeasureData
@ -216,7 +302,8 @@ export default {
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
var sliceThickness = isNaN(parseInt(series.sliceThickness)) ? null : parseInt(series.sliceThickness)
if (series.modality !== 'SR') {
// var sliceThickness = isNaN(parseInt(series.sliceThickness)) ? null : parseInt(series.sliceThickness)
// if (sliceThickness === 5 || series.instanceCount <= 100) {
series.imageIds.map(image => {
let priority = 0
@ -227,26 +314,31 @@ export default {
}
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
})
})
this.loopLoad()
}
}
DicomEvent.$emit('loadImageStacks', res)
loading.close()
this.isRender = true
}).catch(() => {
loading.close()
})
this.isRender = true
loading.close()
},
//
loadInitialImage(seriesInfo) {
var p = parseInt(new Date().getTime())
var imageId = seriesInfo.imageIds[seriesInfo.imageIdIndex]
requestPoolManager.loadAndCacheImagePlus(imageId, seriesInfo.seriesId, p * 100).then(res => {
this.imageLoaded(seriesInfo, res.data.string('x0020000e'))
if (seriesInfo.isCurrentTask) {
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
}
})
},
getStudyList() {
console.log('getStudyList')
if (!this.isRender) {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx > -1 && this.visitTaskList[idx].StudyList && this.visitTaskList[idx].StudyList.length > 0) {
@ -318,7 +410,8 @@ export default {
} else {
const sIdx = this.studyList.findIndex(s => s.IsDicom)
const series = this.studyList[sIdx].SeriesList[0]
series.imageIdIndex = Math.floor(series.imageIds.length / 2) - 1
const imageIdIndex = Math.floor(series.imageIds.length / 2)
series.imageIdIndex = imageIdIndex > 0 ? imageIdIndex - 1 : 0
seriesList.push(series)
this.studyIndex = sIdx
this.seriesIndex = 0
@ -383,7 +476,7 @@ export default {
idx > -1 ? seriesInfo = seriesList[idx] : seriesInfo = seriesList[0]
}
if (seriesInfo) {
let index = Math.floor(seriesInfo.imageIds.length * ((baseObj.series.imageIdIndex+ 1) / baseObj.series.imageIds.length))
const index = Math.floor(seriesInfo.imageIds.length * ((baseObj.series.imageIdIndex + 1) / baseObj.series.imageIds.length))
seriesInfo.imageIdIndex = index > 0 ? index - 1 : 0
obj.studyIndex = seriesInfo.studyIndex
obj.seriesIndex = seriesInfo.seriesIndex
@ -436,7 +529,9 @@ export default {
if (seriesObj) {
obj.studyIndex = seriesObj.studyIndex
obj.seriesIndex = seriesObj.seriesIdx
seriesObj.series.imageIdIndex = Math.floor(seriesObj.series.imageIds.length / 2) - 1
const imageIdIndex = Math.floor(seriesObj.series.imageIds.length / 2)
seriesObj.series.imageIdIndex = imageIdIndex > 0 ? imageIdIndex - 1 : 0
obj.series = seriesObj.series
obj.seriesId = seriesObj.series.seriesId
obj.isMarked = false
@ -445,11 +540,11 @@ export default {
if (sIdx > -1) {
// 5
const series = studyList[sIdx].SeriesList[0]
var imageIdIndex = Math.floor(series.imageIds.length / 2) - 1
var imageIdIndex = series.imageIds.length > 1 ? Math.floor(series.imageIds.length / 2) - 1 : 0
obj.studyIndex = sIdx
obj.seriesIndex = 0
obj.series = series
obj.series.imageIdIndex = imageIdIndex
obj.series.imageIdIndex = imageIdIndex >= 0 ? imageIdIndex : 0
obj.seriesId = series.seriesId
obj.isMarked = false
}
@ -495,31 +590,47 @@ export default {
},
showSeriesImage(studyIndex, seriesIndex, series) {
if (series.isDicom) {
this.studyIndex = studyIndex
this.seriesIndex = seriesIndex
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
this.$emit('loadImageStack', dicomStatck)
if (!series.loadStatus) {
this.loopLoadStatus = -1
series.isLoading = true
var p = parseInt(new Date().getTime())
series.imageIds.map((imageId, i) => {
var priority = ''
if (i === 0) {
priority = parseInt(new Date().getTime()) * 10
} else {
priority = --p
}
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
if (series.modality === 'SR') {
this.studyIndex = studyIndex
this.seriesIndex = seriesIndex
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
this.srDialogVisible = true
this.srInfo = {
SubjectCode: series.studyCode,
TaskBlindName: series.taskBlindName,
SrList: series.instanceHtmlPathList
}
} else {
this.studyIndex = studyIndex
this.seriesIndex = seriesIndex
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
this.$emit('loadImageStack', dicomStatck)
if (!series.loadStatus && series.modality !== 'SR') {
this.loopLoadStatus = -1
series.isLoading = true
var isAddToTakPool = false
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
isAddToTakPool = true
} else {
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
}
if (!isAddToTakPool) {
var priority = parseInt(new Date().getTime())
series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
}
} else {
requestPoolManager.changePriority(series.seriesId)
}
}
}
DicomEvent.$emit('loadMeasurementList', { visitTaskId: this.visitTaskId, taskBlindName: this.taskBlindName })
DicomEvent.$emit('loadMeasurementList', { visitTaskId: this.visitTaskId, taskBlindName: this.taskBlindName })
}
} else {
// Dicom
this.$emit('previewNoneDicoms', { visitTaskId: this.visitTaskId })
@ -564,40 +675,27 @@ export default {
this.loadImages(this.visitTaskList[idx])
store.dispatch('reading/setActiveSeries', series)
},
loadImages1(taskInfo) {
var priority = taskInfo.IsCurrentTask ? parseInt(new Date().getTime()) : 999
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
if (!series.loadStatus) {
var sliceThickness = isNaN(parseInt(series.sliceThickness)) ? null : parseInt(series.sliceThickness)
if (series.isBeMark || sliceThickness === 5 || series.instanceCount <= 100) {
series.imageIds.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
}
})
})
this.loopLoad()
},
loadImages(taskInfo) {
const isBaseLineTask = taskInfo.IsBaseLineTask
// const isBaseLineTask = taskInfo.IsBaseLineTask
const isCurrentTask = taskInfo.IsCurrentTask
// var priority = isCurrentTask ? parseInt(new Date().getTime()) : 999
var priority = parseInt(new Date().getTime())
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
if (!series.loadStatus && series.isDicom) {
if (isCurrentTask || isBaseLineTask) {
// /线
series.imageIds.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
} else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) {
// 访
if (!series.loadStatus && series.isDicom && series.modality !== 'SR') {
// if (isCurrentTask || isBaseLineTask) {
// // /线
// series.imageIds.map(image => {
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
// })
// } else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) {
// // 访
// series.imageIds.map(image => {
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
// })
// }
//
if (!isCurrentTask && study.IsCriticalSequence) {
series.imageIds.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
@ -608,47 +706,16 @@ export default {
})
this.loopLoad()
},
loadImages2(taskInfo) {
var priority = parseInt(new Date().getTime())
// 5mm 100
if (taskInfo.IsCurrentTask) {
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
var sliceThickness = isNaN(parseInt(series.sliceThickness)) ? null : parseInt(series.sliceThickness)
if (sliceThickness === 5 || series.instanceCount <= 100) {
series.imageIds.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
})
})
this.loopLoad()
} else {
//
var idx = this.studyList.findIndex(study => study.IsCriticalSequence)
if (idx === -1) return
this.studyList[idx].SeriesList.forEach((series, seriesIndex) => {
if (!series.loadStatus) {
series.imageIds.map(image => {
priority--
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: idx, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
})
this.loopLoad()
}
},
loopLoad() {
if (this.imageList.length > 0) {
requestPoolManager.startTaskTimer()
// requestPoolManager.startTaskTimer()
this.imageList.map(image => {
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
this.imageLoaded(image, res.data.string('x0020000e'))
})
})
requestPoolManager.sortTaskPool()
this.imageList = []
}
@ -658,15 +725,26 @@ export default {
console.log('loadSeries')
this.loopLoadStatus = -1
this.$set(this.studyList[studyIndex].SeriesList[seriesIndex], 'isLoading', true)
const priority = parseInt(new Date().getTime())
series.imageIds.map(image => {
if (series.imageloadedArr.indexOf(image) === -1) {
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
var isAddToTakPool = false
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
isAddToTakPool = true
} else {
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
}
if (!isAddToTakPool) {
const priority = parseInt(new Date().getTime())
series.imageIds.map(image => {
const index = this.cachedImages.findIndex(item => item.uri === image)
if (index === -1) {
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
}
})
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
}
})
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
} else {
requestPoolManager.changePriority(series.seriesId)
}
},
//
@ -676,59 +754,94 @@ export default {
this.$set(this.studyList[studyIndex].SeriesList[seriesIndex], 'isLoading', false)
},
async imageLoaded(image, seriesUid) {
await store.dispatch('reading/updateStudyList', { visitTaskId: image.visitTaskId, imageId: image.imageId, seriesUid })
// await store.dispatch('reading/updateStudyList', { visitTaskId: image.visitTaskId, imageId: image.imageId, seriesUid })
// console.log(this.studyList[image.studyIndex].SeriesList[image.seriesIndex])
if (image.studyIndex > -1 && image.seriesIndex > -1) {
var prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount
var instanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
if (this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.push(image.imageId)
prefetchInstanceCount = prefetchInstanceCount + 1
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = prefetchInstanceCount
}
if (prefetchInstanceCount >= instanceCount) {
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
//
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].loadStatus = true
}
}
// store.dispatch('reading/updateSeriesList', { visitTaskindex: this.visitTaskIdx, studyIndex: image.studyIndex, seriesIndex: image.seriesIndex, imageId: image.imageId })
},
// instance
async cornerstoneImageLoaded(e) {
await store.dispatch('reading/updateStudyList', { visitTaskId: this.visitTaskId, imageId: e.detail.image.imageId, seriesUid: e.detail.image.data.string('x0020000e') })
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
this.studyList = this.visitTaskList[idx].StudyList
if (!this.studyList || this.studyList.length === 0) {
return
}
const uri = e.detail.image.sharedCacheKey
const index = this.cachedImages.findIndex(item => item.uri === uri)
if (index === -1) {
this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
} else {
this.cachedImages[index].timestamp = new Date().getTime()
}
var imageId = e.detail.image.imageId
var seriesUid = e.detail.image.data.string('x0020000e')
var studyIndex = -1
var seriesIndex = -1
for (let i = 0; i < this.studyList.length; ++i) {
for (let j = 0; j < this.studyList[i].SeriesList.length; ++j) {
if (this.studyList[i].SeriesList[j].seriesUid === seriesUid) {
studyIndex = i
seriesIndex = j
break
}
}
if (studyIndex > 0) break
}
if (seriesIndex < 0) return
// var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
// if (idx === -1) return
// this.studyList = this.visitTaskList[idx].StudyList
// if (!this.studyList || this.studyList.length === 0) {
// return
// }
// if (!this.visitTaskList[idx].IsInit) {
// const loading = this.$loading({ fullscreen: true })
// await store.dispatch('reading/getMeasuredData', this.visitTaskList[idx].VisitTaskId)
// await store.dispatch('reading/getStudyInfo', { trialId: this.trialId, subjectVisitId: this.visitTaskList[idx].VisitId, visitTaskId: this.visitTaskList[idx].VisitTaskId, taskBlindName: this.visitTaskList[idx].TaskBlindName })
// await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[idx].VisitTaskId })
// await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[idx].VisitTaskId })
// await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[idx].VisitTaskId })
// loading.close()
// }
// await store.dispatch('reading/updateStudyList', { visitTaskId: this.visitTaskId, imageId: e.detail.image.imageId, seriesUid: e.detail.image.data.string('x0020000e') })
// const uri = e.detail.image.sharedCacheKey
// const index = this.cachedImages.findIndex(item => item.uri === uri)
// if (index === -1) {
// this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
// } else {
// this.cachedImages[index].timestamp = new Date().getTime()
// }
// var imageId = e.detail.image.imageId
// var seriesUid = e.detail.image.data.string('x0020000e')
// var studyIndex = -1
// var seriesIndex = -1
// for (let i = 0; i < this.studyList.length; ++i) {
// for (let j = 0; j < this.studyList[i].SeriesList.length; ++j) {
// if (this.studyList[i].SeriesList[j].seriesUid === seriesUid) {
// studyIndex = i
// seriesIndex = j
// break
// }
// }
// if (studyIndex > 0) break
// }
// if (seriesIndex < 0) return
const imageIdIndex = this.studyList[studyIndex].SeriesList[seriesIndex].imageIds.indexOf(imageId)
if (imageIdIndex < 0) return
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
if (this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount >= this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
//
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
}
}
// const imageIdIndex = this.studyList[studyIndex].SeriesList[seriesIndex].imageIds.indexOf(imageId)
// if (imageIdIndex < 0) return
// if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
// if (this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount >= this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
// //
// this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
// }
// }
},
cornerstoneimagecachechanged(e) {
const cacheInfo = cornerstone.imageCache.getCacheInfo()
console.log(cacheInfo)
},
cornerstoneimagecachefull(e) {
console.log('超过内存了')
}
}
}
</script>
<style lang="scss" scoped>
.study-wrapper{
>>>.el-progress-bar__inner{
/deep/ .el-progress-bar__inner{
transition: width 0s ease;
}
width:100%;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
.dicom-desc{
font-weight: bold;
font-size: 13px;
@ -745,7 +858,7 @@ export default {
background-color: #607d8b!important;
border: 1px solid #607d8b!important;
}
>>>.el-progress__text{
/deep/.el-progress__text{
color: #ccc;
font-size: 12px;
}
@ -782,7 +895,7 @@ export default {
.image-desc {
vertical-align: top;
p{
width: 100px;
width: 95px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -791,7 +904,10 @@ export default {
margin: 0px;
line-height: 1.5;
div{
width: 100px;
width: 95px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
@ -811,18 +927,18 @@ export default {
}
}
}
.el-collapse{
/deep/.el-collapse{
border: none;
>>>.el-collapse-item{
.el-collapse-item{
background-color: #000!important;
color: #ddd;
}
>>>.el-collapse-item__content{
padding-bottom:10px;
.el-collapse-item__content{
padding-bottom:5px;
background-color: #000!important;
}
>>>.el-collapse-item__header{
.el-collapse-item__header{
background-color: #000!important;
color: #ddd;
border-bottom-color:#5a5a5a;
@ -831,5 +947,33 @@ export default {
line-height: 20px;
}
}
.sr-wrapper{
/deep/.el-dialog{
background: #fff !important;
border: 1px solid #ddd;
// color: #ddd;
.el-dialog__title{
color:#fff;
}
}
/deep/.sr-dialog-container{
margin-top: 50px !important;
width:75%;
height:80%;
}
/deep/.el-dialog__body{
padding: 10px;
height: calc(100% - 50px);
}
.el-dialog__header{
position: relative;
}
.sr-full-dialog-container{
/deep/.is-fullscreen .el-dialog__body{
height: calc(100% - 50px);
}
}
}
}
</style>

View File

@ -117,7 +117,7 @@ export default {
<style lang="scss">
.wl-container {
width: 100%;
// >>>.el-table{
// /deep/ .el-table{
// background-color: #1e1e1e !important;
// }
@ -141,7 +141,7 @@ export default {
background-color: #1e1e1e !important;
}
}
// >>>.el-table th,.el-table tr{
// /deep/ .el-table th,.el-table tr{
// background-color: #1e1e1e !important;
// }

View File

@ -118,11 +118,9 @@
:visit-task-id="cdVisitTaskId"
/>
</div>
<span slot="footer" class="dialog-footer">
<span v-if="!closeCDVisible" slot="footer" class="dialog-footer">
<!-- 确认 -->
<el-button type="primary" @click="handleReturnCD">{{$t('trials:medicalFeedback:title:feedback')}}</el-button>
<el-button v-if="!closeCDVisible" type="primary" @click="handleConfirmCD">{{ $t('trials:reading:button:confirm') }}</el-button>
<el-button type="primary" @click="handleConfirmCD">{{ $t('trials:reading:button:confirm') }}</el-button>
</span>
</el-dialog>
@ -139,7 +137,7 @@
<div>
<div>
<!-- 您确定当前访视的整体评估结果为PD根据独立影像评估章程该访视进入iRECIST阅片环节请对新病灶进行重新评估 -->
{{ $t('trials:iRecist:warnning:msg45').replace('***', criterionName) }}
{{ $t('trials:iRecist:warnning:msg45') }}
</div>
<div style="color: #f44336;font-size: 12px;margin: 5px;">
<!-- 1新病灶可转为新靶病灶新非靶病灶其它既往新病灶 -->
@ -164,73 +162,11 @@
<el-button type="primary" @click="tipVisible = false">{{ $t('trials:reading:button:confirm') }}</el-button>
</span>
</el-dialog>
<el-dialog
:visible.sync="returnCDVisible"
:close-on-click-modal="false"
width="500px"
>
<span slot="title" class="dialog-footer">
临床资料反馈{{subjectCode}}{{ taskBlindName }}
</span>
<div>
<el-form ref="questions"
:model="form">
<el-form-item label-width="100px" label="请说明" prop="content">
<el-input type="textarea"
v-model="form.content"
:autosize="{ minRows: 2, maxRows: 4}">
</el-input>
</el-form-item>
</el-form>
<div style="padding-left:100px;font-size: 12px;color:#f66;margin-bottom: 10px">
<span class="el-icon-info"></span>提交后您的反馈会以邮件形式通知CRCCRA及PM
</div>
<span @click="returnHistory" style="padding-left:100px;padding-top:10px;text-decoration: underline;color:#409eff;font-size: 12px;cursor: pointer">
反馈历史
</span>
</div>
<span slot="footer" class="dialog-footer">
<!-- 确认 -->
<el-button type="primary" @click="addClinicalDataDialog"></el-button>
</span>
</el-dialog>
<el-dialog
:visible.sync="historyVisible"
:close-on-click-modal="false"
width="600px"
>
<span slot="title" class="dialog-footer">
反馈历史{{subjectCode}}{{ taskBlindName }}
</span>
<div>
<el-table
ref="filesTable"
:data="tableList"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column
prop="Content"
label="内容"
/>
<el-table-column
prop="CreateTime"
label="提交时间"
width="180"
/>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<!-- 确认 -->
<el-button type="primary" @click="historyVisible = false">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getNextTask, readClinicalData, verifyDefaultQuestionBeAnswer, addClinicalDataDialog, getClinicalDataDialog } from '@/api/trials'
import { getNextTask, readClinicalData, verifyDefaultQuestionBeAnswer } from '@/api/trials'
import ReadPage from './components/ReadPage'
import CustomizeReadPage from './customize/CustomizeReadPage'
import ReportPage from './components/ReportPage'
@ -243,6 +179,7 @@ import DicomEvent from './components/DicomEvent'
import store from '@/store'
import { getToken } from '@/utils/auth'
import { changeURLStatic } from '@/utils/history.js'
import requestPoolManager from '@/utils/request-pool'
export default {
name: 'Reading',
components: {
@ -257,6 +194,7 @@ export default {
},
data() {
return {
isClinicalDataShow: false,
activeName: '',
tabs: [],
trialId: '',
@ -287,17 +225,12 @@ export default {
isFullscreen: false,
tipVisible: false,
closeCDVisible: false,
criterionName: this.$route.query.criterionName,
returnCDVisible: false,
taskBlindName: null,
historyVisible: false,
tableList: [],
form: {
content: ''
}
cdVisitTaskId: ''
}
},
mounted() {
requestPoolManager.resetRequestPool()
requestPoolManager.setSortType(0)
DicomEvent.$on('questionFormChange', (v) => {
if (this.questionFormChangeNum !== 0) {
this.questionFormChangeState = v
@ -349,31 +282,11 @@ export default {
},
beforeDestroy() {
DicomEvent.$off('getNextTask')
DicomEvent.$emit('resetOpenWindow')
DicomEvent.$off('previewCD')
DicomEvent.$emit('resetOpenWindow')
window.removeEventListener('beforeunload', this.handleWindowClose)
},
methods: {
returnHistory() {
this.historyVisible = true
getClinicalDataDialog(this.visitTaskId).then(res => {
this.tableList = res.Result
})
},
addClinicalDataDialog() {
if (!this.form.content) {
this.$message.error('请说明情况!')
return
}
addClinicalDataDialog(this.visitTaskId, this.form.content).then(res => {
this.$message.success('反馈成功')
this.form.content = ''
this.returnCDVisible = false
})
},
handleReturnCD() {
this.returnCDVisible = true
},
getTaskInfo(flag = 0) {
this.loading = true
var param = {
@ -386,20 +299,19 @@ export default {
getNextTask(param).then(async res => {
this.isShow = false
if (res.Result.ReadingTaskState !== 2) {
window.opener.postMessage('refreshTaskList', window.location)
}
this.visitTaskId = res.Result.VisitTaskId
// DicomEvent.$emit('getCustomTableQuestionAnswer', res.Result.VisitTaskId)
if (this.subjectId !== res.Result.SubjectId) {
store.dispatch('reading/resetVisitTasks')
var token = getToken()
window.location.href = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${res.Result.SubjectCode}&subjectId=${res.Result.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}&isNewSubject=1`
return
} else if (!this.isReadingTaskViewInOrder || res.Result.ReadingCategory !== 1) {
store.dispatch('reading/resetVisitTasks')
if (this.firstTaskReadingCategory) {
const token = getToken()
window.location.href = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${res.Result.SubjectCode}&subjectId=${res.Result.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
return
}
}
this.subjectId = res.Result.SubjectId
@ -423,6 +335,7 @@ export default {
if (this.isExistsClinicalData && this.isNeedReadClinicalData && !this.isReadClinicalData) {
this.isFullscreen = false
this.dialogVisible = true
this.cdVisitTaskId = this.visitTaskId
}
if (res.Result.ReadingCategory === 1) {
this.activeName = 'read'
@ -437,7 +350,6 @@ export default {
DicomEvent.$emit('resetOpenWindow')
})
}
this.$nextTick(() => {
this.isShow = true
this.loading = false
@ -453,14 +365,12 @@ export default {
beforeLeaveCustomize(activeName, oldActiveName) {
if (oldActiveName === 'read') {
this.isShow = true
this.tabs.push(activeName)
DicomEvent.$emit('getReportInfo', true)
this.$nextTick(() => {
this.$refs.reportPage.setScrollTop(1)
})
} else {
this.tabs.push(activeName)
// this.isShow = false
this.isShow = false
}
return Promise.resolve(true)
},
@ -582,7 +492,7 @@ export default {
}
</script>
<style lang="scss" scoped>
>>>.el-message-box__headerbtn{
/deep/.el-message-box__headerbtn{
display: none;
}
.dicom-container{
@ -592,7 +502,7 @@ export default {
padding: 0 5px;
box-sizing: border-box;
background-color: #000;
.el-tabs{
/deep/.el-tabs{
box-sizing: border-box;
height: 100%;
display: flex;
@ -600,38 +510,38 @@ export default {
.el-tabs__item{
color: #fff;
}
>>>.el-tabs__header{
.el-tabs__header{
height: 50px;
margin:0px;
box-sizing: border-box;
}
>>>.el-tabs__content{
.el-tabs__content{
flex: 1;
margin:0px;
box-sizing: border-box;
}
>>>.el-tabs__item{
.el-tabs__item{
color: #fff;
}
>>>.el-tab-pane{
.el-tab-pane{
height: 100%;
}
}
>>>.hot-keys-label{
/deep/.hot-keys-label{
color: #dfdfdf !important;
}
>>>.shortcut-key-input span{
/deep/.shortcut-key-input span{
color: #dfdfdf !important;
}
// >>>.el-dialog{
// /deep/ .el-dialog{
// background: #1e1e1e;
// >>>.el-dialog__body{
// /deep/ .el-dialog__body{
// padding: 10px;
// }
// }
>>>.el-dialog{
/deep/.el-dialog{
background: #1e1e1e;
border: 1px solid #ddd;
color: #ddd;
@ -652,13 +562,13 @@ export default {
}
}
>>>.dialog-container{
/deep/.dialog-container{
margin-top: 50px !important;
width:75%;
height:80%;
}
>>>.el-dialog__body{
padding: 10px;
/deep/.el-dialog__body{
padding: 20px;
height: calc(100% - 120px);
}
.el-dialog__header{
@ -667,7 +577,7 @@ export default {
}
.full-dialog-container{
>>>.is-fullscreen .el-dialog__body{
/deep/.is-fullscreen .el-dialog__body{
height: calc(100% - 120px);
}
}

View File

@ -209,7 +209,7 @@ export default {
border-radius: 10px;
background: #d0d0d0;
}
>>>.el-card__body{
/deep/ .el-card__body{
padding: 0px;
}
}
@ -223,7 +223,7 @@ export default {
width:240px;
height: 100%;
>>>.el-card__body{
/deep/ .el-card__body{
height: 100%;
width: 100%;
display: flex;
@ -242,18 +242,18 @@ export default {
flex: 1;
overflow-y: auto;
}
>>>.el-tabs{
/deep/ .el-tabs{
height: 100%;
display:flex;
flex-direction: column;
}
>>>.el-tabs__header{
/deep/ .el-tabs__header{
height: 40px;
padding: 0 5px;
margin-bottom: 5px;
}
>>>.el-tabs__content{
/deep/ .el-tabs__content{
flex: 1;
overflow-y: auto;
padding: 0 5px;
@ -285,7 +285,7 @@ export default {
flex: 1;
height: 100%;
margin-left: 10px;
>>>.el-card__body{
/deep/ .el-card__body{
height: 100%;
width: 100%;
}

View File

@ -17,6 +17,7 @@ const name = defaultSettings.title || 'HIRS' // page title
// eslint-disable-next-line no-undef
module.exports = {
transpileDependencies: ['minio'],
publicPath: process.env.NODE_ENV === 'development' || process.env.VUE_APP_OSS_CONFIG_BUCKET === 'zyypacs-usa' ? process.env.VUE_APP_BASE_PATH : `${process.env.VUE_FILE_PATH}${process.env.VUE_APP_OSS_PATH}${distDate}/`,
outputDir: 'dist',
assetsDir: 'static',