Compare commits
No commits in common. "7a454d09ffba04a23a6f156fda1012a565dfc230" and "877e47ccb197faa30d4a8204b6de843adee8fadb" have entirely different histories.
7a454d09ff
...
877e47ccb1
|
|
@ -408,14 +408,6 @@ export function changeSegmentationSavedStatus(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 修改分割片段锁定状态
|
|
||||||
export function lockOrUnLockSegment(data) {
|
|
||||||
return request({
|
|
||||||
url: `/Segmentation/lockOrUnLockSegment`,
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 图像数据匿名
|
// 图像数据匿名
|
||||||
export function studyMaskImage(data) {
|
export function studyMaskImage(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -1004,24 +1004,6 @@ export default {
|
||||||
this.getSystemInfoReading();
|
this.getSystemInfoReading();
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
resetHistogram() {
|
||||||
if (!this.histogramVisible) return false
|
if (!this.histogramVisible) return false
|
||||||
if (this.timer['histogram']) {
|
if (this.timer['histogram']) {
|
||||||
|
|
@ -3061,10 +3043,6 @@ export default {
|
||||||
},
|
},
|
||||||
// 更改视图布局
|
// 更改视图布局
|
||||||
async changeLayout(v) {
|
async changeLayout(v) {
|
||||||
if (this.readingTool === 3) {
|
|
||||||
let res = await this.changeScreenSave()
|
|
||||||
if (!res) return false
|
|
||||||
}
|
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
this.fullScreenIndex = null
|
this.fullScreenIndex = null
|
||||||
this.layout = v
|
this.layout = v
|
||||||
|
|
@ -3378,12 +3356,9 @@ export default {
|
||||||
}, time)
|
}, time)
|
||||||
},
|
},
|
||||||
// 切换全屏
|
// 切换全屏
|
||||||
async toggleFullScreen(e, index) {
|
toggleFullScreen(e, index) {
|
||||||
if (this.isDelay && (this.readingTool === 3 || this.isMPR)) return false
|
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.fullScreenIndex = this.fullScreenIndex === index ? null : index
|
||||||
this.activeViewportIndex = index
|
this.activeViewportIndex = index
|
||||||
if (this.readingTool === 3 || this.isMPR) {
|
if (this.readingTool === 3 || this.isMPR) {
|
||||||
|
|
@ -3541,12 +3516,8 @@ export default {
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
},
|
},
|
||||||
// 激活视口
|
// 激活视口
|
||||||
async activeViewport(index) {
|
activeViewport(index) {
|
||||||
if (this.activeViewportIndex === index) return
|
if (this.activeViewportIndex === index) return
|
||||||
if (this.readingTool === 3) {
|
|
||||||
let res = await this.changeScreenSave()
|
|
||||||
if (!res) return false
|
|
||||||
}
|
|
||||||
this.activeViewportIndex = index
|
this.activeViewportIndex = index
|
||||||
// 切换检查列表
|
// 切换检查列表
|
||||||
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
||||||
|
|
@ -4203,11 +4174,6 @@ export default {
|
||||||
if (!data) return resolve(false)
|
if (!data) return resolve(false)
|
||||||
let viewportSeries = this.$refs[`viewport-MPR-0`][0].series
|
let viewportSeries = this.$refs[`viewport-MPR-0`][0].series
|
||||||
if (data && viewportSeries.SeriesInstanceUid === data.SeriesInstanceUid) return resolve(true)
|
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) {
|
if (!data) {
|
||||||
let { imageOrientationPatient, imagePositionPatient } = this.$refs[`viewport-${this.activeViewportIndex}`][0].imageInfo
|
let { imageOrientationPatient, imagePositionPatient } = this.$refs[`viewport-${this.activeViewportIndex}`][0].imageInfo
|
||||||
|
|
|
||||||
|
|
@ -133,8 +133,8 @@
|
||||||
<template v-if="segmentList.length > 0">
|
<template v-if="segmentList.length > 0">
|
||||||
<div class="SegmentGroupBox">
|
<div class="SegmentGroupBox">
|
||||||
<div style="display: flex;align-items: center;">
|
<div style="display: flex;align-items: center;">
|
||||||
<el-popover placement="left" width="200px" trigger="click"
|
<el-popover placement="left" width="200px" trigger="click" v-if="readingTaskState < 2"
|
||||||
v-if="readingTaskState < 2 && !isMPR" v-model="popoverVisible" :teleported="true">
|
v-model="popoverVisible" :teleported="true">
|
||||||
<div class="SegmentGroupBtnBox">
|
<div class="SegmentGroupBtnBox">
|
||||||
<div class="SegmentGroupBtn" @click.stop="addSegmentGroup">
|
<div class="SegmentGroupBtn" @click.stop="addSegmentGroup">
|
||||||
{{ $t('trials:reading:Segmentations:button:addSegmentGroup') }}
|
{{ $t('trials:reading:Segmentations:button:addSegmentGroup') }}
|
||||||
|
|
@ -151,7 +151,6 @@
|
||||||
</div>
|
</div>
|
||||||
<i slot="reference" class="el-icon-more" style="cursor: pointer;color:#fff" />
|
<i slot="reference" class="el-icon-more" style="cursor: pointer;color:#fff" />
|
||||||
</el-popover>
|
</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()"
|
<el-select v-model="segmentationId" placeholder="" @change="selectSegmentGroup()"
|
||||||
:disabled="saveLoading">
|
:disabled="saveLoading">
|
||||||
<el-option v-for="item in segmentList" :key="`${item.segmentationId}`"
|
<el-option v-for="item in segmentList" :key="`${item.segmentationId}`"
|
||||||
|
|
@ -163,7 +162,7 @@
|
||||||
<i class="el-icon-warning-outline" style="color:red;margin-right: 5px;"
|
<i class="el-icon-warning-outline" style="color:red;margin-right: 5px;"
|
||||||
:title="$t('trials:reading:Segmentations:tip:segmentationIsNotSave')"
|
:title="$t('trials:reading:Segmentations:tip:segmentationIsNotSave')"
|
||||||
v-if="!curSegmentGroup.isSaved"></i>
|
v-if="!curSegmentGroup.isSaved"></i>
|
||||||
<el-button type="success" size="small" :disabled="saveLoading && isMPR"
|
<el-button type="success" size="small" :disabled="saveLoading"
|
||||||
@click="saveSegmentGroup([curSegmentGroup])">
|
@click="saveSegmentGroup([curSegmentGroup])">
|
||||||
{{ $t("trials:reading:Segmentations:button:save") }}
|
{{ $t("trials:reading:Segmentations:button:save") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -226,7 +225,7 @@
|
||||||
<i class="el-icon-lock" v-if="item.lock" @click.stop="lockSegment(item, false)"></i>
|
<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"
|
<el-popover placement="bottom" width="40" trigger="click" class="docShow"
|
||||||
:value="popoverId === `popover-${item.segmentationId}_${item.segmentIndex}`"
|
:value="popoverId === `popover-${item.segmentationId}_${item.segmentIndex}`"
|
||||||
@show="handleClickPopover(item)" v-if="readingTaskState < 2 && !isMPR">
|
@show="handleClickPopover(item)" v-if="readingTaskState < 2">
|
||||||
<div class="SegmentGroupBtnBox">
|
<div class="SegmentGroupBtnBox">
|
||||||
<div class="SegmentGroupBtn" @click.stop="rename('segment', item)">
|
<div class="SegmentGroupBtn" @click.stop="rename('segment', item)">
|
||||||
{{ $t('trials:reading:Segmentations:button:renameSegmentGroup') }}
|
{{ $t('trials:reading:Segmentations:button:renameSegmentGroup') }}
|
||||||
|
|
@ -245,22 +244,21 @@
|
||||||
</div>
|
</div>
|
||||||
<i slot="reference" class="el-icon-more" style="cursor: pointer;color:#fff" />
|
<i slot="reference" class="el-icon-more" style="cursor: pointer;color:#fff" />
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<i class="el-icon-more" style="cursor: not-allowed;color: #fff;" v-if="isMPR"></i>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
<div class="saveBtnBox" v-if="readingTaskState < 2 && segmentList && segmentList.length > 1">
|
<div class="saveBtnBox" v-if="readingTaskState < 2">
|
||||||
<el-button type="success" size="small" :disabled="saveLoading && isMPR" @click="saveSegmentGroup()">
|
<el-button type="success" size="small" :disabled="saveLoading" @click="saveSegmentGroup()">
|
||||||
{{ $t("trials:reading:Segmentations:button:saveAll") }}
|
{{ $t("trials:reading:Segmentations:button:saveAll") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { changeSegmentationSavedStatus, getSegmentationList, addOrUpdateSegmentation, deleteSegmentation, getSegmentList, addOrUpdateSegment, deleteSegment, getSegmentBindingList, saveSegmentBindingAndAnswer, getReadingTableQuestionTrialById, getReadingQuestionTrialById, lockOrUnLockSegment } from '@/api/reading'
|
import { changeSegmentationSavedStatus, getSegmentationList, addOrUpdateSegmentation, deleteSegmentation, getSegmentList, addOrUpdateSegment, deleteSegment, getSegmentBindingList, saveSegmentBindingAndAnswer, getReadingTableQuestionTrialById, getReadingQuestionTrialById } from '@/api/reading'
|
||||||
import * as cornerstoneTools from '@cornerstonejs/tools';
|
import * as cornerstoneTools from '@cornerstonejs/tools';
|
||||||
import * as cornerstone from "@cornerstonejs/core";
|
import * as cornerstone from "@cornerstonejs/core";
|
||||||
import dcmjs from '@/utils/dcmUpload/dcmjs'
|
import dcmjs from '@/utils/dcmUpload/dcmjs'
|
||||||
|
|
@ -420,7 +418,7 @@ export default {
|
||||||
if (this.isMPR) return false
|
if (this.isMPR) return false
|
||||||
if (Id === this.series.Id && TaskInfo.VisitTaskId === this.visitInfo.VisitTaskId) return false
|
if (Id === this.series.Id && TaskInfo.VisitTaskId === this.visitInfo.VisitTaskId) return false
|
||||||
this.series = series
|
this.series = series
|
||||||
this.$emit("update:curSegSeries", Object.assign({}, series))
|
this.$emit("update:curSegSeries", Object.assign(series, {}))
|
||||||
this.getSegmentationList()
|
this.getSegmentationList()
|
||||||
})
|
})
|
||||||
DicomEvent.$on('isloaded', (data) => {
|
DicomEvent.$on('isloaded', (data) => {
|
||||||
|
|
@ -693,12 +691,9 @@ export default {
|
||||||
},
|
},
|
||||||
lockSegment(item, lock) {
|
lockSegment(item, lock) {
|
||||||
if (this.readingTaskState >= 2) return false
|
if (this.readingTaskState >= 2) return false
|
||||||
if (this.isMPR) return false
|
|
||||||
this.$emit('setToolsPassive')
|
|
||||||
segmentation.segmentLocking.setSegmentIndexLocked(item.segmentationId, item.segmentIndex, lock)
|
segmentation.segmentLocking.setSegmentIndexLocked(item.segmentationId, item.segmentIndex, lock)
|
||||||
item.lock = lock
|
item.lock = lock
|
||||||
if (!lock) this.changeSegmentationSavedStatus(item.segmentationId, lock)
|
if (!lock) this.changeSegmentationSavedStatus(item.segmentationId, lock)
|
||||||
this.lockOrUnLockSegment(item.id, lock)
|
|
||||||
},
|
},
|
||||||
selectSegment(item, isChange = true) {
|
selectSegment(item, isChange = true) {
|
||||||
if (isChange) {
|
if (isChange) {
|
||||||
|
|
@ -792,7 +787,6 @@ export default {
|
||||||
},
|
},
|
||||||
async addSegment() {
|
async addSegment() {
|
||||||
if (this.saveLoading) return false
|
if (this.saveLoading) return false
|
||||||
if (this.isMPR) return false
|
|
||||||
if (this.segmentList.length <= 0) {
|
if (this.segmentList.length <= 0) {
|
||||||
let obj = {
|
let obj = {
|
||||||
name: this.getSegmentationName(),
|
name: this.getSegmentationName(),
|
||||||
|
|
@ -837,7 +831,6 @@ export default {
|
||||||
// this.readingSegmentByConfig()
|
// this.readingSegmentByConfig()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.changeSegmentationSavedStatus(this.segmentationId, false)
|
|
||||||
let item = this.segmentList.find(i => i.segmentationId === this.segmentationId)
|
let item = this.segmentList.find(i => i.segmentationId === this.segmentationId)
|
||||||
let arr = item.segments.sort((a, b) => a.segmentIndex - b.segmentIndex)
|
let arr = item.segments.sort((a, b) => a.segmentIndex - b.segmentIndex)
|
||||||
let segmentIndex = arr[item.segments.length - 1].segmentIndex + 1
|
let segmentIndex = arr[item.segments.length - 1].segmentIndex + 1
|
||||||
|
|
@ -1464,7 +1457,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 保存整个分组
|
// 保存整个分组
|
||||||
async saveSegmentGroup(list = null, saveSegment = true, callback) {
|
async saveSegmentGroup(list = null, saveSegment = true) {
|
||||||
try {
|
try {
|
||||||
let segmentList = list ? list : this.segmentList
|
let segmentList = list ? list : this.segmentList
|
||||||
if (segmentList.length <= 0) return false
|
if (segmentList.length <= 0) return false
|
||||||
|
|
@ -1523,7 +1516,6 @@ export default {
|
||||||
DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: f })
|
DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: f })
|
||||||
}
|
}
|
||||||
this.$emit("update:globalLoading", false)
|
this.$emit("update:globalLoading", false)
|
||||||
if (callback) callback()
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
|
@ -1711,7 +1703,7 @@ export default {
|
||||||
bidirectional: SegmentJson.bidirectional,
|
bidirectional: SegmentJson.bidirectional,
|
||||||
bidirectionalView: true,
|
bidirectionalView: true,
|
||||||
view: true,
|
view: true,
|
||||||
lock: s.IsLock,
|
lock: true,
|
||||||
id: s.Id
|
id: s.Id
|
||||||
}
|
}
|
||||||
obj.segments.push(o)
|
obj.segments.push(o)
|
||||||
|
|
@ -1831,20 +1823,6 @@ export default {
|
||||||
console.log(err)
|
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) {
|
hex2Rgb(hexValue, alpha = 1) {
|
||||||
const rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
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);
|
const hex = hexValue.replace(rgx, (m, r, g, b) => r + r + g + g + b + b);
|
||||||
|
|
@ -2075,7 +2053,6 @@ export default {
|
||||||
|
|
||||||
.messageBox {
|
.messageBox {
|
||||||
color: #333;
|
color: #333;
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.serialNum {
|
.serialNum {
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
|
||||||
let SegmentJson = s.SegmentJson ? JSON.parse(s.SegmentJson) : {};
|
let SegmentJson = s.SegmentJson ? JSON.parse(s.SegmentJson) : {};
|
||||||
segmentation.segmentIndex.setActiveSegmentIndex(s.SegmentationId, s.SegmentNumber);
|
segmentation.segmentIndex.setActiveSegmentIndex(s.SegmentationId, s.SegmentNumber);
|
||||||
segmentation.config.color.setSegmentIndexColor(viewportId, s.SegmentationId, s.SegmentNumber, hex2Rgb(s.ColorRgb))
|
segmentation.config.color.setSegmentIndexColor(viewportId, s.SegmentationId, s.SegmentNumber, hex2Rgb(s.ColorRgb))
|
||||||
segmentation.segmentLocking.setSegmentIndexLocked(s.SegmentationId, s.SegmentNumber, s.IsLock)
|
segmentation.segmentLocking.setSegmentIndexLocked(s.SegmentationId, s.SegmentNumber, true)
|
||||||
if (SegmentJson.bidirectional) {
|
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");
|
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === s.SegmentationId && i.metadata.segmentIndex === SegmentJson.bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
|
||||||
if (!an) {
|
if (!an) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue