自建台站ROI框增加可禁用配置
This commit is contained in:
		
							parent
							
								
									1ee1a830de
								
							
						
					
					
						commit
						6e305d9e7d
					
				|  | @ -58,6 +58,7 @@ | ||||||
|               :betaEnergyData="betaEnergyData" |               :betaEnergyData="betaEnergyData" | ||||||
|               :gammaEnergyData="gammaEnergyData" |               :gammaEnergyData="gammaEnergyData" | ||||||
|               :isLoading.sync="isLoading" |               :isLoading.sync="isLoading" | ||||||
|  |               :disabled="spectraType !== 'sample'" | ||||||
|               @boundaryChange="handleBoundaryChange" |               @boundaryChange="handleBoundaryChange" | ||||||
|               @open-modal="handleOpenModal" |               @open-modal="handleOpenModal" | ||||||
|             /> |             /> | ||||||
|  |  | ||||||
|  | @ -33,7 +33,7 @@ | ||||||
|       <!-- 2D图表结束 --> |       <!-- 2D图表结束 --> | ||||||
|       <!-- 图表上面的四边形 --> |       <!-- 图表上面的四边形 --> | ||||||
|       <div |       <div | ||||||
|         :class="['boundary-list', currBoundaryItem ? 'is-moving' : '']" |         :class="['boundary-list', currBoundaryItem ? 'is-moving' : '', disabled ? 'disabled' : '']" | ||||||
|         :style="{ |         :style="{ | ||||||
|           left: boundaryContainerPosition.left + 'px', |           left: boundaryContainerPosition.left + 'px', | ||||||
|           top: boundaryContainerPosition.top + 'px', |           top: boundaryContainerPosition.top + 'px', | ||||||
|  | @ -216,6 +216,10 @@ export default { | ||||||
|       type: Array, |       type: Array, | ||||||
|       default: () => [], |       default: () => [], | ||||||
|     }, |     }, | ||||||
|  |     disabled: { | ||||||
|  |       type: Boolean, | ||||||
|  |       default: false, | ||||||
|  |     }, | ||||||
|   }, |   }, | ||||||
|   data() { |   data() { | ||||||
|     this.buttons = buttons |     this.buttons = buttons | ||||||
|  | @ -512,6 +516,10 @@ export default { | ||||||
| 
 | 
 | ||||||
|     // 矩形周边点击 |     // 矩形周边点击 | ||||||
|     handleBorderMouseDown(boundaryItem, direction, index) { |     handleBorderMouseDown(boundaryItem, direction, index) { | ||||||
|  |       if (this.disabled) { | ||||||
|  |         return | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|       this.boundaryRight = boundaryItem.left + boundaryItem.width |       this.boundaryRight = boundaryItem.left + boundaryItem.width | ||||||
|       this.currBoundaryItem = boundaryItem |       this.currBoundaryItem = boundaryItem | ||||||
|       this.boundaryIndex = index |       this.boundaryIndex = index | ||||||
|  | @ -671,6 +679,15 @@ export default { | ||||||
|       pointer-events: all; |       pointer-events: all; | ||||||
|       cursor: w-resize; |       cursor: w-resize; | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     &.disabled { | ||||||
|  |       cursor: not-allowed; | ||||||
|  | 
 | ||||||
|  |       .boundary-item-left, | ||||||
|  |       .boundary-item-right { | ||||||
|  |         cursor: default; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   .boundary-item { |   .boundary-item { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user