Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
8545e8f1d6
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -708,7 +708,7 @@ export default {
|
|||
criterionType: null,
|
||||
tools: [],
|
||||
rotateOptions: [
|
||||
{ label: this.$t('trials:reading:button:rotateDefault'), val: 1, icon: ''},
|
||||
{ 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' },
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@
|
|||
<template v-if="segmentList.length > 0">
|
||||
<div class="SegmentGroupBox">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<el-popover placement="left" width="200px" trigger="click" v-if="readingTaskState < 2"
|
||||
v-model="popoverVisible" :teleported="true">
|
||||
<el-popover placement="left" width="200px" trigger="click"
|
||||
v-if="readingTaskState < 2 && !isMPR" v-model="popoverVisible" :teleported="true">
|
||||
<div class="SegmentGroupBtnBox">
|
||||
<div class="SegmentGroupBtn" @click.stop="addSegmentGroup">
|
||||
{{ $t('trials:reading:Segmentations:button:addSegmentGroup') }}
|
||||
|
|
@ -151,6 +151,7 @@
|
|||
</div>
|
||||
<i slot="reference" class="el-icon-more" style="cursor: pointer;color:#fff" />
|
||||
</el-popover>
|
||||
<i class="el-icon-more" style="cursor: not-allowed;color: #fff;" v-if="isMPR"></i>
|
||||
<el-select v-model="segmentationId" placeholder="" @change="selectSegmentGroup()"
|
||||
:disabled="saveLoading">
|
||||
<el-option v-for="item in segmentList" :key="`${item.segmentationId}`"
|
||||
|
|
@ -162,7 +163,7 @@
|
|||
<i class="el-icon-warning-outline" style="color:red;margin-right: 5px;"
|
||||
:title="$t('trials:reading:Segmentations:tip:segmentationIsNotSave')"
|
||||
v-if="!curSegmentGroup.isSaved"></i>
|
||||
<el-button type="success" size="small" :disabled="saveLoading"
|
||||
<el-button type="success" size="small" :disabled="saveLoading && isMPR"
|
||||
@click="saveSegmentGroup([curSegmentGroup])">
|
||||
{{ $t("trials:reading:Segmentations:button:save") }}
|
||||
</el-button>
|
||||
|
|
@ -225,7 +226,7 @@
|
|||
<i class="el-icon-lock" v-if="item.lock" @click.stop="lockSegment(item, false)"></i>
|
||||
<el-popover placement="bottom" width="40" trigger="click" class="docShow"
|
||||
:value="popoverId === `popover-${item.segmentationId}_${item.segmentIndex}`"
|
||||
@show="handleClickPopover(item)" v-if="readingTaskState < 2">
|
||||
@show="handleClickPopover(item)" v-if="readingTaskState < 2 && !isMPR">
|
||||
<div class="SegmentGroupBtnBox">
|
||||
<div class="SegmentGroupBtn" @click.stop="rename('segment', item)">
|
||||
{{ $t('trials:reading:Segmentations:button:renameSegmentGroup') }}
|
||||
|
|
@ -244,21 +245,22 @@
|
|||
</div>
|
||||
<i slot="reference" class="el-icon-more" style="cursor: pointer;color:#fff" />
|
||||
</el-popover>
|
||||
<i class="el-icon-more" style="cursor: not-allowed;color: #fff;" v-if="isMPR"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<div class="saveBtnBox" v-if="readingTaskState < 2">
|
||||
<el-button type="success" size="small" :disabled="saveLoading" @click="saveSegmentGroup()">
|
||||
<div class="saveBtnBox" v-if="readingTaskState < 2 && segmentList && segmentList.length > 1">
|
||||
<el-button type="success" size="small" :disabled="saveLoading && isMPR" @click="saveSegmentGroup()">
|
||||
{{ $t("trials:reading:Segmentations:button:saveAll") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { changeSegmentationSavedStatus, getSegmentationList, addOrUpdateSegmentation, deleteSegmentation, getSegmentList, addOrUpdateSegment, deleteSegment, getSegmentBindingList, saveSegmentBindingAndAnswer, getReadingTableQuestionTrialById, getReadingQuestionTrialById } from '@/api/reading'
|
||||
import { changeSegmentationSavedStatus, getSegmentationList, addOrUpdateSegmentation, deleteSegmentation, getSegmentList, addOrUpdateSegment, deleteSegment, getSegmentBindingList, saveSegmentBindingAndAnswer, getReadingTableQuestionTrialById, getReadingQuestionTrialById, lockOrUnLockSegment } from '@/api/reading'
|
||||
import * as cornerstoneTools from '@cornerstonejs/tools';
|
||||
import * as cornerstone from "@cornerstonejs/core";
|
||||
import dcmjs from '@/utils/dcmUpload/dcmjs'
|
||||
|
|
@ -418,7 +420,7 @@ export default {
|
|||
if (this.isMPR) return false
|
||||
if (Id === this.series.Id && TaskInfo.VisitTaskId === this.visitInfo.VisitTaskId) return false
|
||||
this.series = series
|
||||
this.$emit("update:curSegSeries", Object.assign(series, {}))
|
||||
this.$emit("update:curSegSeries", Object.assign({}, series))
|
||||
this.getSegmentationList()
|
||||
})
|
||||
DicomEvent.$on('isloaded', (data) => {
|
||||
|
|
@ -691,9 +693,12 @@ export default {
|
|||
},
|
||||
lockSegment(item, lock) {
|
||||
if (this.readingTaskState >= 2) return false
|
||||
if (this.isMPR) return false
|
||||
this.$emit('setToolsPassive')
|
||||
segmentation.segmentLocking.setSegmentIndexLocked(item.segmentationId, item.segmentIndex, lock)
|
||||
item.lock = lock
|
||||
if (!lock) this.changeSegmentationSavedStatus(item.segmentationId, lock)
|
||||
this.lockOrUnLockSegment(item.id, lock)
|
||||
},
|
||||
selectSegment(item, isChange = true) {
|
||||
if (isChange) {
|
||||
|
|
@ -787,6 +792,7 @@ export default {
|
|||
},
|
||||
async addSegment() {
|
||||
if (this.saveLoading) return false
|
||||
if (this.isMPR) return false
|
||||
if (this.segmentList.length <= 0) {
|
||||
let obj = {
|
||||
name: this.getSegmentationName(),
|
||||
|
|
@ -831,6 +837,7 @@ export default {
|
|||
// this.readingSegmentByConfig()
|
||||
|
||||
} else {
|
||||
this.changeSegmentationSavedStatus(this.segmentationId, false)
|
||||
let item = this.segmentList.find(i => i.segmentationId === this.segmentationId)
|
||||
let arr = item.segments.sort((a, b) => a.segmentIndex - b.segmentIndex)
|
||||
let segmentIndex = arr[item.segments.length - 1].segmentIndex + 1
|
||||
|
|
@ -1457,7 +1464,7 @@ export default {
|
|||
}
|
||||
},
|
||||
// 保存整个分组
|
||||
async saveSegmentGroup(list = null, saveSegment = true) {
|
||||
async saveSegmentGroup(list = null, saveSegment = true, callback) {
|
||||
try {
|
||||
let segmentList = list ? list : this.segmentList
|
||||
if (segmentList.length <= 0) return false
|
||||
|
|
@ -1516,6 +1523,7 @@ export default {
|
|||
DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: f })
|
||||
}
|
||||
this.$emit("update:globalLoading", false)
|
||||
if (callback) callback()
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
|
|
@ -1703,7 +1711,7 @@ export default {
|
|||
bidirectional: SegmentJson.bidirectional,
|
||||
bidirectionalView: true,
|
||||
view: true,
|
||||
lock: true,
|
||||
lock: s.IsLock,
|
||||
id: s.Id
|
||||
}
|
||||
obj.segments.push(o)
|
||||
|
|
@ -1823,6 +1831,20 @@ export default {
|
|||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 修改分割片段锁定状态
|
||||
async lockOrUnLockSegment(SegmentId, IsLock) {
|
||||
try {
|
||||
let data = {
|
||||
SegmentId,
|
||||
IsLock
|
||||
}
|
||||
let res = await lockOrUnLockSegment(data)
|
||||
if (res.IsSuccess) return true
|
||||
return false
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
hex2Rgb(hexValue, alpha = 1) {
|
||||
const rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
||||
const hex = hexValue.replace(rgx, (m, r, g, b) => r + r + g + g + b + b);
|
||||
|
|
@ -2053,6 +2075,7 @@ export default {
|
|||
|
||||
.messageBox {
|
||||
color: #333;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.serialNum {
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
|
|||
let SegmentJson = s.SegmentJson ? JSON.parse(s.SegmentJson) : {};
|
||||
segmentation.segmentIndex.setActiveSegmentIndex(s.SegmentationId, s.SegmentNumber);
|
||||
segmentation.config.color.setSegmentIndexColor(viewportId, s.SegmentationId, s.SegmentNumber, hex2Rgb(s.ColorRgb))
|
||||
segmentation.segmentLocking.setSegmentIndexLocked(s.SegmentationId, s.SegmentNumber, true)
|
||||
segmentation.segmentLocking.setSegmentIndexLocked(s.SegmentationId, s.SegmentNumber, s.IsLock)
|
||||
if (SegmentJson.bidirectional) {
|
||||
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === s.SegmentationId && i.metadata.segmentIndex === SegmentJson.bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
|
||||
if (!an) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue