2023-06-28 19:25:11 +08:00
|
|
|
<template>
|
|
|
|
<div class="gamma-analysis">
|
2023-07-11 19:35:18 +08:00
|
|
|
<!-- 二级交互栏 -->
|
|
|
|
<div class="spectrum-analysis-sub-operators">
|
|
|
|
<pop-over-with-icon placement="bottomLeft">
|
|
|
|
Detailed-Information
|
|
|
|
<detailed-infomation slot="content" />
|
|
|
|
</pop-over-with-icon>
|
|
|
|
<pop-over-with-icon placement="bottomLeft">
|
|
|
|
QC Flags
|
|
|
|
<qc-flags slot="content" :data="{ collectionTime: '123' }" />
|
|
|
|
</pop-over-with-icon>
|
|
|
|
<pop-over-with-icon>
|
|
|
|
Graph Assistance
|
|
|
|
<graph-assistance slot="content" />
|
|
|
|
</pop-over-with-icon>
|
|
|
|
<pop-over-with-icon>
|
|
|
|
Nuclide Library
|
|
|
|
<nuclear-library slot="content" />
|
|
|
|
</pop-over-with-icon>
|
|
|
|
<div class="peak-info">
|
|
|
|
<button-with-switch-icon @change="handlePeakInfoChange">
|
|
|
|
Peak Information
|
|
|
|
</button-with-switch-icon>
|
|
|
|
</div>
|
2023-06-28 19:25:11 +08:00
|
|
|
</div>
|
2023-07-11 19:35:18 +08:00
|
|
|
<!-- 二级交互栏结束 -->
|
|
|
|
<!-- 主体部分 -->
|
|
|
|
<div class="gamma-analysis-main">
|
|
|
|
<div class="gamma-analysis-chart">
|
|
|
|
<custom-chart ref="chartRef" :option="option" style="height: 100%" />
|
|
|
|
</div>
|
|
|
|
<div class="gamma-analysis-thumbnail">
|
|
|
|
<custom-chart :option="thumbnailOption" style="height: 100%" />
|
|
|
|
</div>
|
2023-06-28 19:25:11 +08:00
|
|
|
</div>
|
2023-07-11 19:35:18 +08:00
|
|
|
<!-- 主体部分结束 -->
|
2023-06-28 19:25:11 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import CustomChart from '@/components/CustomChart/index.vue'
|
2023-07-11 19:35:18 +08:00
|
|
|
import PopOverWithIcon from './components/SubOperators/PopOverWithIcon.vue'
|
|
|
|
import DetailedInfomation from './components/SubOperators/DetailedInfomation.vue'
|
|
|
|
import QcFlags from './components/SubOperators/QcFlags.vue'
|
|
|
|
import GraphAssistance from './components/SubOperators/GraphAssistance.vue'
|
|
|
|
import NuclearLibrary from './components/SubOperators/NuclearLibrary.vue'
|
|
|
|
import ButtonWithSwitchIcon from './components/SubOperators/ButtonWithSwitchIcon.vue'
|
2023-06-28 19:25:11 +08:00
|
|
|
|
|
|
|
// 初始配置
|
|
|
|
const initialOption = {
|
|
|
|
grid: {
|
|
|
|
top: 40,
|
|
|
|
left: 60,
|
|
|
|
right: 0
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
text: '',
|
|
|
|
left: 'center',
|
|
|
|
bottom: 10,
|
|
|
|
textStyle: {
|
|
|
|
color: '#8FD4F8',
|
|
|
|
rich: {
|
|
|
|
a: {
|
|
|
|
padding: [0, 20, 0, 0],
|
|
|
|
fontSize: 16
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'axis',
|
|
|
|
axisPointer: {
|
|
|
|
animation: false,
|
|
|
|
type: 'cross',
|
|
|
|
lineStyle: {
|
|
|
|
type: 'dashed'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
type: 'category',
|
|
|
|
axisLine: {
|
|
|
|
lineStyle: {
|
|
|
|
color: '#ade6ee'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
splitLine: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
textStyle: {
|
|
|
|
color: '#ade6ee'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data: new Array(3928).fill(0).map((_, index) => index)
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
name: 'Counts',
|
|
|
|
nameTextStyle: {
|
|
|
|
color: '#8FD4F8',
|
|
|
|
fontSize: 16
|
|
|
|
},
|
|
|
|
axisLine: {
|
|
|
|
show: true,
|
|
|
|
lineStyle: {
|
|
|
|
color: '#ade6ee'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
splitLine: {
|
|
|
|
show: true,
|
|
|
|
lineStyle: {
|
|
|
|
color: 'rgba(173, 230, 238, .2)'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
textStyle: {
|
|
|
|
color: '#ade6ee'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
type: 'line',
|
|
|
|
data: new Array(3928)
|
|
|
|
.fill(0)
|
|
|
|
.map((_, index) => (Math.random() < 0.05 ? parseInt(Math.random() * 16000) : parseInt(Math.random() * 800))),
|
|
|
|
itemStyle: {
|
|
|
|
color: '#24FF0B'
|
|
|
|
},
|
|
|
|
lineStyle: {
|
|
|
|
width: 1
|
|
|
|
},
|
|
|
|
symbol: 'none',
|
|
|
|
markLine: {
|
|
|
|
symbol: 'none',
|
|
|
|
label: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
lineStyle: {
|
|
|
|
type: 'solid'
|
|
|
|
},
|
2023-07-11 19:35:18 +08:00
|
|
|
data: [
|
|
|
|
{
|
|
|
|
xAxis: 100,
|
|
|
|
lineStyle: {
|
|
|
|
color: 'red'
|
|
|
|
}
|
2023-06-28 19:25:11 +08:00
|
|
|
}
|
2023-07-11 19:35:18 +08:00
|
|
|
]
|
2023-06-28 19:25:11 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'line',
|
|
|
|
data: new Array(3928)
|
|
|
|
.fill(0)
|
|
|
|
.map((_, index) => (Math.random() < 0.05 ? parseInt(Math.random() * 14000) : parseInt(Math.random() * 600))),
|
|
|
|
itemStyle: {
|
|
|
|
color: '#D8DE07'
|
|
|
|
},
|
|
|
|
lineStyle: {
|
|
|
|
width: 1
|
|
|
|
},
|
|
|
|
symbol: 'none'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
dataZoom: {
|
|
|
|
type: 'inside',
|
|
|
|
start: 0,
|
|
|
|
end: 20,
|
|
|
|
zoomLock: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 缩略图配置
|
|
|
|
const thumbnailOption = {
|
|
|
|
grid: {
|
|
|
|
top: 0,
|
|
|
|
left: 5,
|
|
|
|
right: 5,
|
|
|
|
bottom: 0
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
type: 'category',
|
|
|
|
axisLine: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
splitLine: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
data: new Array(3928).fill(0).map((_, index) => index)
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
axisLine: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
splitLine: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
show: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
type: 'line',
|
|
|
|
data: new Array(3928)
|
|
|
|
.fill(0)
|
|
|
|
.map((_, index) => (Math.random() < 0.05 ? parseInt(Math.random() * 16000) : parseInt(Math.random() * 800))),
|
|
|
|
itemStyle: {
|
|
|
|
color: '#24FF0B'
|
|
|
|
},
|
|
|
|
lineStyle: {
|
|
|
|
width: 1
|
|
|
|
},
|
|
|
|
symbol: 'none'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'line',
|
|
|
|
data: new Array(3928)
|
|
|
|
.fill(0)
|
|
|
|
.map((_, index) => (Math.random() < 0.05 ? parseInt(Math.random() * 14000) : parseInt(Math.random() * 600))),
|
|
|
|
itemStyle: {
|
|
|
|
color: '#D8DE07'
|
|
|
|
},
|
|
|
|
lineStyle: {
|
|
|
|
width: 1
|
|
|
|
},
|
|
|
|
symbol: 'none'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
data: {
|
|
|
|
type: Object
|
|
|
|
},
|
|
|
|
chartType: {
|
|
|
|
type: String,
|
|
|
|
default: ''
|
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
2023-07-11 19:35:18 +08:00
|
|
|
CustomChart,
|
|
|
|
PopOverWithIcon,
|
|
|
|
DetailedInfomation,
|
|
|
|
QcFlags,
|
|
|
|
GraphAssistance,
|
|
|
|
NuclearLibrary,
|
|
|
|
ButtonWithSwitchIcon
|
2023-06-28 19:25:11 +08:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
option: initialOption,
|
|
|
|
thumbnailOption
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.option.title.text = '{a|Channel:0} {a|Energy:0} {a|Counts:0} {a|Detectability:0}'
|
|
|
|
|
|
|
|
console.log('%c [ ]-108', 'font-size:13px; background:pink; color:#bf2c9f;', this.option)
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
resize() {
|
|
|
|
this.$refs.chartRef.resize()
|
|
|
|
},
|
|
|
|
|
2023-07-11 19:35:18 +08:00
|
|
|
// peak info 点击左右方向
|
|
|
|
handlePeakInfoChange(direction) {
|
|
|
|
this.moveMarkLine(direction)
|
|
|
|
},
|
|
|
|
|
2023-06-28 19:25:11 +08:00
|
|
|
/**
|
|
|
|
* 向某一个方向移动标记线
|
|
|
|
* @param { 'left'| 'right' } direction
|
|
|
|
*/
|
|
|
|
moveMarkLine(direction) {
|
2023-07-11 19:35:18 +08:00
|
|
|
if (direction == 'left') {
|
2023-06-28 19:25:11 +08:00
|
|
|
this.option.series[0].markLine.data[0].xAxis = this.option.series[0].markLine.data[0].xAxis - 10
|
2023-07-11 19:35:18 +08:00
|
|
|
} else {
|
2023-06-28 19:25:11 +08:00
|
|
|
this.option.series[0].markLine.data[0].xAxis = this.option.series[0].markLine.data[0].xAxis + 10
|
|
|
|
}
|
|
|
|
|
2023-07-11 19:35:18 +08:00
|
|
|
this.$emit('markLineChange', {})
|
2023-06-28 19:25:11 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
data: {
|
|
|
|
handler() {},
|
|
|
|
deep: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
.gamma-analysis {
|
|
|
|
height: 100%;
|
2023-07-11 19:35:18 +08:00
|
|
|
|
|
|
|
&-main {
|
|
|
|
height: calc(100% - 51px);
|
|
|
|
display: flex;
|
|
|
|
overflow: auto hidden;
|
|
|
|
position: relative;
|
|
|
|
}
|
2023-06-28 19:25:11 +08:00
|
|
|
|
|
|
|
&-chart {
|
2023-07-11 19:35:18 +08:00
|
|
|
width: 100%;
|
2023-06-28 19:25:11 +08:00
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-thumbnail {
|
|
|
|
position: absolute;
|
|
|
|
top: 50px;
|
|
|
|
right: 10px;
|
|
|
|
width: 500px;
|
|
|
|
height: 150px;
|
2023-07-11 19:35:18 +08:00
|
|
|
background-color: #153e44;
|
2023-06-28 19:25:11 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|