@@ -260,13 +282,13 @@ import * as cornerstone from 'cornerstone-core'
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
import dicomViewer from '@/components/Dicom/DicomViewer'
import { getVisitStudyList, getAllRelationStudyList, getSeriesList } from '@/api/reading'
-import { setSeriesStatus } from '@/api/trials'
+import { setSeriesStatus, setInstanceStatus } from '@/api/trials'
import { getTaskUploadedDicomStudyList } from '@/api/reading'
import requestPoolManager from '@/utils/request-pool'
import store from '@/store'
import { changeURLStatic } from '@/utils/history.js'
import metaDataProvider from '@/utils/metaDataProvider'
-cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
+cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 })
// import * as cornerstoneTools from 'cornerstone-tools'
var config = {
maxWebWorkers: 4,
@@ -306,7 +328,8 @@ export default {
currentLoadIns: [],
isFromCRCUpload: false,
visitTaskId: null,
- page: ''
+ page: '',
+ visible: false
}
},
mounted() {
@@ -348,7 +371,7 @@ export default {
let res = null
if (this.page === 'upload') {
res = await getTaskUploadedDicomStudyList({ visitTaskId: this.visitTaskId })
- } else if (this.page === 'download'){
+ } else if (this.page === 'download') {
res = await getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading, this.visitTaskId)
} else {
res = await getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading)
@@ -595,6 +618,73 @@ export default {
this.loading = false
}
},
+ async changeInstanceReadingStatus(callback, series, instance) {
+ let statusStr = ''
+ if (callback) {
+ statusStr = this.$t('trials:audit:label:setSeriesReading')
+ instance.IsReading = false
+ } else {
+ statusStr = this.$t('trials:audit:label:setSeriesNotReading')
+ instance.IsReading = true
+ }
+ var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
+ message = message.replace('yyy', this.$fd('YesOrNo', !instance.IsReading))
+ const confirm = await this.$confirm(
+ message,
+ {
+ type: 'warning',
+ distinguishCancelAndClose: true
+ }
+ )
+ if (confirm !== 'confirm') return
+ const state = instance.IsReading ? 1 : 2
+ this.loading = true
+ try {
+ const res = await setInstanceStatus(series.trialId, series.subjectVisitId, series.seriesId, instance.Id, state)
+ this.loading = false
+ if (res.IsSuccess) {
+ instance.IsReading = !instance.IsReading
+ this.$message.success(this.$t('common:message:savedSuccessfully'))
+ window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
+ }
+ } catch (e) {
+ this.loading = false
+ }
+ },
+ async changeInstanceDeleteStatus(callback, series, instance) {
+ let statusStr = ''
+ if (callback) {
+ statusStr = this.$t('trials:audit:label:setSeriesDeleted')
+ instance.IsDeleted = false
+ } else {
+ statusStr = this.$t('trials:audit:label:setSeriesNotDelete')
+ instance.IsDeleted = true
+ }
+ var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
+ message = message.replace('yyy', this.$fd('YesOrNo', !instance.IsDeleted))
+ const confirm = await this.$confirm(
+ message,
+ {
+ type: 'warning',
+ distinguishCancelAndClose: true
+ }
+ )
+ if (confirm !== 'confirm') return
+
+ const state = instance.IsDeleted ? 5 : 4
+ this.loading = true
+ try {
+ const res = await setInstanceStatus(series.trialId, series.subjectVisitId, series.seriesId, instance.Id, state)
+ this.loading = false
+ if (res.IsSuccess) {
+ instance.IsDeleted = !instance.IsDeleted
+ this.$message.success(this.$t('common:message:savedSuccessfully'))
+ window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
+ }
+ } catch (e) {
+ this.loading = false
+ }
+ },
// 切换关联检查Tab时获取关联检查信息
async handleTabClick(tab, event) {
if (tab.name === 'relation-study' && this.relationStudyList.length <= 0) {
@@ -978,9 +1068,21 @@ export default {
border: 1px solid #2c2c2c;
padding: 5px;
}
+.frame_list{
+ max-height: 500px;
+ overflow-y: auto;
+}
+.instance_frame_wrapper ::-webkit-scrollbar {
+ width: 7px;
+ height: 7px;
+}
+.instance_frame_wrapper ::-webkit-scrollbar-thumb {
+ border-radius: 10px;
+ background: #d0d0d0;
+}
.frame_content{
- height: 50px;
- padding: 5px;
+ /* height: 50px; */
+ padding: 10px;
display: flex;
justify-content: flex-start;
color: #ddd;