数据匿名多个编辑选框应用时清除
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
e8dda21459
commit
27a9ccd3c2
|
|
@ -950,15 +950,11 @@ export default {
|
||||||
},
|
},
|
||||||
removeNote_RectangleRoi() {
|
removeNote_RectangleRoi() {
|
||||||
const toolState = cornerstoneTools.getToolState(this.canvas, 'Note_RectangleRoi');
|
const toolState = cornerstoneTools.getToolState(this.canvas, 'Note_RectangleRoi');
|
||||||
|
|
||||||
if (toolState && toolState.data.length > 0) {
|
if (toolState && toolState.data.length > 0) {
|
||||||
toolState.data.forEach(item => {
|
let arr = toolState.data.map(item => item)
|
||||||
// 例如:删除列表中最后一个矩形
|
arr.forEach(item => {
|
||||||
const dataToRemove = item
|
cornerstoneTools.removeToolState(this.canvas, 'Note_RectangleRoi', item);
|
||||||
// 调用 removeToolState 删除指定的数据对象
|
|
||||||
cornerstoneTools.removeToolState(this.canvas, 'Note_RectangleRoi', dataToRemove);
|
|
||||||
})
|
})
|
||||||
// 刷新视图
|
|
||||||
cornerstone.updateImage(this.canvas);
|
cornerstone.updateImage(this.canvas);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -510,7 +510,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
comparison(f) {
|
setToolsPassive() {
|
||||||
const elements = document.querySelectorAll('.dicom-item')
|
const elements = document.querySelectorAll('.dicom-item')
|
||||||
const scope = this
|
const scope = this
|
||||||
Array.from(elements).forEach((element, index) => {
|
Array.from(elements).forEach((element, index) => {
|
||||||
|
|
@ -519,6 +519,9 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
scope.activeTool = null
|
scope.activeTool = null
|
||||||
|
},
|
||||||
|
comparison(f) {
|
||||||
|
this.setToolsPassive()
|
||||||
if (f) {
|
if (f) {
|
||||||
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(obj => {
|
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(obj => {
|
||||||
let { image } = obj
|
let { image } = obj
|
||||||
|
|
@ -570,6 +573,7 @@ export default {
|
||||||
},
|
},
|
||||||
recovery(isAll = false) {
|
recovery(isAll = false) {
|
||||||
if (this.isComparison) return false
|
if (this.isComparison) return false
|
||||||
|
this.setToolsPassive()
|
||||||
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(async obj => {
|
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(async obj => {
|
||||||
let { image } = obj
|
let { image } = obj
|
||||||
let instanceInfo = this.series.instanceInfoList.find(item => {
|
let instanceInfo = this.series.instanceInfoList.find(item => {
|
||||||
|
|
@ -616,6 +620,7 @@ export default {
|
||||||
},
|
},
|
||||||
anonymousImage(isAll = false) {
|
anonymousImage(isAll = false) {
|
||||||
if (this.isComparison) return false
|
if (this.isComparison) return false
|
||||||
|
this.setToolsPassive()
|
||||||
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(async obj => {
|
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(async obj => {
|
||||||
let { toolInfo, image } = obj
|
let { toolInfo, image } = obj
|
||||||
if (!toolInfo || toolInfo.data.length <= 0) return this.$confirm(this.$t("DicomViewer:anonymous:notMark"))
|
if (!toolInfo || toolInfo.data.length <= 0) return this.$confirm(this.$t("DicomViewer:anonymous:notMark"))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue