From efb88b7ad1522f602582279fed59ea3a6765de49 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Thu, 13 Feb 2025 11:50:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E5=B8=A7=E5=BD=B1=E5=83=8F=E8=B4=A8?= =?UTF-8?q?=E6=8E=A7=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trials.js | 7 ++ src/views/dicom-show/dicom-study.vue | 110 ++++++++++++++++-- src/views/dicom-show/dicom-visit.vue | 166 +++++++++++++++++++++------ 3 files changed, 240 insertions(+), 43 deletions(-) diff --git a/src/api/trials.js b/src/api/trials.js index 432f32c5..31c03293 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -1081,6 +1081,13 @@ export function setSeriesStatus(trialId, subjectVisitId, studyId, seriesId, stat }) } +export function setInstanceStatus(trialId, subjectVisitId, seriesId, instanceId, state) { + return request({ + url: `/QCOperation/setInstanceState/${trialId}/${subjectVisitId}/${seriesId}/${instanceId}/${state}`, + method: 'put' + }) +} + export function getVisitQCStudyAndSeriesList(subjectVisitId) { return request({ url: `/QCList/getVisitQCStudyAndSeriesList/${subjectVisitId}`, diff --git a/src/views/dicom-show/dicom-study.vue b/src/views/dicom-show/dicom-study.vue index 6ffe6298..6ff3e8c9 100644 --- a/src/views/dicom-show/dicom-study.vue +++ b/src/views/dicom-show/dicom-study.vue @@ -52,10 +52,14 @@
+
+ +
{{ instance.InstanceNumber }}
-
{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}
+
+ {{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }} +
+
+ {{ $t('trials:audit:table:isDelete') }} + + {{ $t('trials:audit:table:isReading') }} + +
- +
@@ -138,13 +158,13 @@ import * as cornerstone from 'cornerstone-core' import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader' import dicomViewer from '@/components/Dicom/DicomViewer' import { getStudyInfo, getSeriesList } from '@/api/reading' -import { getInstanceList, getPatientSeriesList, setSeriesStatus } from '@/api/trials' +import { getInstanceList, getPatientSeriesList, setSeriesStatus, setInstanceStatus } from '@/api/trials' 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 }) var config = { maxWebWorkers: 4, startWebWorkersOnDemand: true, @@ -196,7 +216,8 @@ export default { imageList: [], showSeriesList: [], currentLoadIns: [], - isFromCRCUpload: false + isFromCRCUpload: false, + visible: false } }, created: function() { @@ -384,8 +405,8 @@ export default { if (!res.Result || (res.Result && res.Result.length === 0)) return var seriesInstanceUid = res.Result[0].SeriesInstanceUid var sliceThickness = res.Result[0].SliceThickness - var isReading = res.Result[0].IsReading - var isDeleted = res.Result[0].IsDeleted + var isReading = res.OtherInfo.IsReading + var isDeleted = res.OtherInfo.IsDeleted var seriesList = [] var imageIds = [] let isExistMutiFrames = false @@ -403,7 +424,7 @@ export default { imageIds.push(path) imageId = path } - instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId }) + instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId, IsDeleted: instance.IsDeleted, IsReading: instance.IsReading }) }) seriesList.push({ trialId, @@ -671,6 +692,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 + } + }, loadAllImages() { const seriesIndex = this.seriesList.findIndex(i => i.loadStatus === false) if (seriesIndex === -1) return @@ -948,8 +1036,8 @@ export default { background: #d0d0d0; } .frame_content{ - height: 50px; - padding: 5px; + /* height: 50px; */ + padding: 10px; display: flex; justify-content: flex-start; color: #ddd; diff --git a/src/views/dicom-show/dicom-visit.vue b/src/views/dicom-show/dicom-visit.vue index a5bc8294..10eb0958 100644 --- a/src/views/dicom-show/dicom-visit.vue +++ b/src/views/dicom-show/dicom-visit.vue @@ -59,34 +59,56 @@
#{{ series.seriesNumber }}
-
- -
-
{{ instance.InstanceNumber }}
-
{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}
-
- +
+
- +
+
+ +
+
{{ instance.InstanceNumber }}
+
+ {{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }} +
+
+ {{ $t('trials:audit:table:isDelete') }} + + {{ $t('trials:audit:table:isReading') }} + +
+
+ +
+
+
@@ -143,7 +165,7 @@
- +
@@ -197,7 +219,7 @@
@@ -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;