自建台站ROI框增加可禁用配置

This commit is contained in:
Xu Zhimeng 2024-08-07 14:14:42 +08:00
parent 1ee1a830de
commit 6e305d9e7d
2 changed files with 19 additions and 1 deletions

View File

@ -58,6 +58,7 @@
:betaEnergyData="betaEnergyData"
:gammaEnergyData="gammaEnergyData"
:isLoading.sync="isLoading"
:disabled="spectraType !== 'sample'"
@boundaryChange="handleBoundaryChange"
@open-modal="handleOpenModal"
/>

View File

@ -33,7 +33,7 @@
<!-- 2D图表结束 -->
<!-- 图表上面的四边形 -->
<div
:class="['boundary-list', currBoundaryItem ? 'is-moving' : '']"
:class="['boundary-list', currBoundaryItem ? 'is-moving' : '', disabled ? 'disabled' : '']"
:style="{
left: boundaryContainerPosition.left + 'px',
top: boundaryContainerPosition.top + 'px',
@ -216,6 +216,10 @@ export default {
type: Array,
default: () => [],
},
disabled: {
type: Boolean,
default: false,
},
},
data() {
this.buttons = buttons
@ -512,6 +516,10 @@ export default {
//
handleBorderMouseDown(boundaryItem, direction, index) {
if (this.disabled) {
return
}
this.boundaryRight = boundaryItem.left + boundaryItem.width
this.currBoundaryItem = boundaryItem
this.boundaryIndex = index
@ -671,6 +679,15 @@ export default {
pointer-events: all;
cursor: w-resize;
}
&.disabled {
cursor: not-allowed;
.boundary-item-left,
.boundary-item-right {
cursor: default;
}
}
}
.boundary-item {