diff --git a/src/api/reading.js b/src/api/reading.js index 53cdedae..e686f326 100644 --- a/src/api/reading.js +++ b/src/api/reading.js @@ -408,6 +408,14 @@ export function changeSegmentationSavedStatus(data) { data }) } +// 修改分割片段锁定状态 +export function lockOrUnLockSegment(data) { + return request({ + url: `/Segmentation/lockOrUnLockSegment`, + method: 'post', + data + }) +} // 图像数据匿名 export function studyMaskImage(data) { return request({ diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index a86af6f4..ccc5bb77 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -708,8 +708,8 @@ export default { criterionType: null, tools: [], rotateOptions: [ - { label: this.$t('trials:reading:button:rotateDefault'), val: 1, icon: ''}, - { label: this.$t('trials:reading:button:rotateVertical'), val: 2, icon: 'rotateVertical' }, + { label: this.$t('trials:reading:button:rotateDefault'), val: 1, icon: '' }, + { label: this.$t('trials:reading:button:rotateVertical'), val: 2, icon: 'rotateVertical' }, { label: this.$t('trials:reading:button:rotateHorizontal'), val: 3, icon: 'rotateHorizontal' }, { label: this.$t('trials:reading:button:rotateTurnLeft'), val: 4, icon: 'rotateTurnLeft' }, { label: this.$t('trials:reading:button:rotateTurnRight'), val: 5, icon: 'rotateTurnRight' } @@ -1004,6 +1004,24 @@ export default { this.getSystemInfoReading(); }, methods: { + changeScreenSave() { + return new Promise(async (reslove, reject) => { + if (this.$refs.Segmentations.readingTaskState < 2) { + let isSaved = this.$refs.Segmentations.segmentList.some(item => !item.isSaved) + if (isSaved) { + let confirm = await this.$confirm(this.$t("trials:reading:Segmentations:confirm:changeScreenSave")) + if (!confirm) reslove(true) + this.$refs.Segmentations.saveSegmentGroup(null, true, () => { + reslove(true) + }) + } else { + reslove(true) + } + } else { + reslove(true) + } + }) + }, resetHistogram() { if (!this.histogramVisible) return false if (this.timer['histogram']) { @@ -3043,6 +3061,10 @@ export default { }, // 更改视图布局 async changeLayout(v) { + if (this.readingTool === 3) { + let res = await this.changeScreenSave() + if (!res) return false + } this.setToolsPassive() this.fullScreenIndex = null this.layout = v @@ -3356,9 +3378,12 @@ export default { }, time) }, // 切换全屏 - toggleFullScreen(e, index) { + async toggleFullScreen(e, index) { if (this.isDelay && (this.readingTool === 3 || this.isMPR)) return false - + if (this.readingTool === 3) { + let res = await this.changeScreenSave() + if (!res) return false + } this.fullScreenIndex = this.fullScreenIndex === index ? null : index this.activeViewportIndex = index if (this.readingTool === 3 || this.isMPR) { @@ -3473,14 +3498,14 @@ export default { this.setToolsPassive() this.rows = 1 this.cols = 1 - this.activeViewportIndex = 0 this.fullScreenIndex = null this.isMPR = false obj.isChange = false return this.$nextTick(() => { DicomEvent.$emit('activeSeries', obj) DicomEvent.$emit('changeMPR') - this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(obj) + this.$refs[`${this.viewportKey}-0`][0].setSeriesInfo(obj) + this.activeViewportIndex = 0 const renderingEngine = getRenderingEngine(renderingEngineId) renderingEngine.resize(true, false) renderingEngine.render() @@ -3494,6 +3519,7 @@ export default { if (!obj.IsDicom) { return this.previewNoneDicoms(obj) } + this.activeViewportIndex = 0 this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(obj) this.clipPlaying = false this.fps = 15 @@ -3516,8 +3542,12 @@ export default { this.setToolsPassive() }, // 激活视口 - activeViewport(index) { + async activeViewport(index) { if (this.activeViewportIndex === index) return + if (this.readingTool === 3) { + let res = await this.changeScreenSave() + if (!res) return false + } this.activeViewportIndex = index // 切换检查列表 const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series @@ -4174,6 +4204,11 @@ export default { if (!data) return resolve(false) let viewportSeries = this.$refs[`viewport-MPR-0`][0].series if (data && viewportSeries.SeriesInstanceUid === data.SeriesInstanceUid) return resolve(true) + } else { + if (this.readingTool === 3) { + let res = await this.changeScreenSave() + if (!res) return false + } } if (!data) { let { imageOrientationPatient, imagePositionPatient } = this.$refs[`viewport-${this.activeViewportIndex}`][0].imageInfo diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue index abc852fc..03bd9f6e 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue @@ -133,8 +133,8 @@ -
- +
+ {{ $t("trials:reading:Segmentations:button:saveAll") }}