Compare commits

..

No commits in common. "417d900cd5a0cd8c4db4fcb229bd94e3b5b6e867" and "1b4fd2a65a399d7c7af23c546e26e0d8f9dcf92c" have entirely different histories.

8 changed files with 26 additions and 268 deletions

View File

@ -322,7 +322,7 @@ export default {
updateSampleData({
inputFileName,
key: 'savedAnalysisResult',
key: 'isReprocessed',
data: true,
})
},

View File

@ -1,5 +1,5 @@
<template>
<custom-modal v-model="visible" title="Beta" width="800px" destroy-on-close enable-full-screen>
<custom-modal v-model="visible" title="Beta" width="800px" destroy-on-close>
<div class="beta-modal">
<div class="beta-modal__header">
<span class="count">Channel: {{ axisInfo.channel }}</span>
@ -7,31 +7,15 @@
<span class="energy">Energy: {{ axisInfo.energy }}</span>
</div>
<div class="beta-modal__content">
<CustomChart
ref="chartRef"
:option="option"
:opts="opts"
autoresize
@zr:mousedown="handleMouseDown"
@zr:mouseup="handleMouseUp"
@brushEnd="handleBrushEnd"
/>
<custom-chart :option="option" autoresize />
</div>
</div>
<template slot="custom-footer">
<div style="text-align: center">
<a-space>
<a-button type="success" @click="handleUnzoom">Unzoom</a-button>
<a-button type="warn" @click="visible = false">Cancel</a-button>
</a-space>
</div>
</template>
</custom-modal>
</template>
<script>
import CustomChart from '@/components/CustomChart/index.vue'
import { buildLineSeries, getAxisMax, rangeNumber } from '@/utils/chartHelper'
import { buildLineSeries } from '@/utils/chartHelper'
import { cloneDeep } from 'lodash'
const initialOption = {
@ -112,7 +96,6 @@ const initialOption = {
max: 'dataMax',
},
series: buildLineSeries('Line', [], 'yellow'),
brush: {},
}
const initialAxisInfo = {
@ -130,10 +113,6 @@ export default {
visible: false,
option: cloneDeep(initialOption),
axisInfo: cloneDeep(initialAxisInfo),
opts: {
notMerge: false,
},
}
},
created() {
@ -145,17 +124,6 @@ export default {
this.energys = energys || []
this.axisInfo = cloneDeep(initialAxisInfo)
this.visible = true
this.$nextTick(() => {
this.option.brush = { toolbox: [] }
this.handleUnzoom()
})
},
handleUnzoom() {
this.option.xAxis.min = 0
this.option.xAxis.max = 512
this.option.yAxis.min = 1
this.option.yAxis.max = 'dataMax'
},
handleTooltipFormat(params) {
@ -166,81 +134,6 @@ export default {
energy: (this.energys[channel] || 0).toFixed(3),
}
},
getChart() {
return this.$refs.chartRef.getChartInstance()
},
//
handleMouseDown() {
const chart = this.getChart()
chart.dispatchAction({
type: 'takeGlobalCursor',
//
key: 'brush',
brushOption: {
// brush brushType false
brushType: 'rect',
},
})
},
handleMouseUp() {
this.$nextTick(() => {
this.clearBrush()
})
},
clearBrush() {
const chart = this.getChart()
//
chart.dispatchAction({
type: 'brush',
areas: [],
})
//
chart.dispatchAction({
type: 'takeGlobalCursor',
})
},
//
handleBrushEnd(param) {
const chart = this.getChart()
const areas = param.areas[0]
if (areas) {
const range = areas.range
const [[minX, maxX], [minY, maxY]] = range
const point1 = chart.convertFromPixel({ seriesIndex: 0 }, [minX, minY]).map((num) => parseInt(num.toFixed()))
const point2 = chart.convertFromPixel({ seriesIndex: 0 }, [maxX, maxY]).map((num) => parseInt(num.toFixed()))
//
const xAxisMax = getAxisMax(chart, 'xAxis')
const yAxisMax = getAxisMax(chart, 'yAxis')
//
const xAxisMin = this.option.xAxis.min
const yAxisMin = this.option.yAxis.min
let [x1, y2, x2, y1] = [...point1, ...point2] //
const xAxisLimit = rangeNumber(xAxisMin, xAxisMax)
const yAxisLimit = rangeNumber(yAxisMin, yAxisMax)
x1 = xAxisLimit(x1)
x2 = xAxisLimit(x2)
y1 = yAxisLimit(y1)
y2 = yAxisLimit(y2)
this.option.xAxis.min = x1
this.option.xAxis.max = x2
this.option.yAxis.min = y1
this.option.yAxis.max = y2
}
},
},
}
</script>
@ -276,16 +169,4 @@ export default {
overflow: hidden;
}
}
.fullscreen {
::v-deep {
.ant-modal-body {
height: calc(100% - 93px);
.beta-modal {
height: 100%;
}
}
}
}
</style>

View File

@ -80,10 +80,11 @@ export default {
console.log('gammaEnergyValid>>>' + this.gammaEnergyValid)
},
async handleReAnalyse() {
const { data } = getSampleData(this.newSampleData.inputFileName)
const { savedAnalysisResult } = data
const {
data: { isReprocessed },
} = getSampleData(this.newSampleData.inputFileName)
if (!savedAnalysisResult) {
if (!isReprocessed) {
this.$message.warning('Please analyze the spectrum first')
return
}

View File

@ -1,5 +1,5 @@
<template>
<custom-modal v-model="visible" title="Gamma" width="800px" destroy-on-close enable-full-screen>
<custom-modal v-model="visible" title="Gamma" width="800px" destroy-on-close>
<div class="gamma-modal">
<div class="gamma-modal__header">
<span class="count">Channel: {{ axisInfo.channel }}</span>
@ -7,31 +7,15 @@
<span class="energy">Energy: {{ axisInfo.energy }}</span>
</div>
<div class="gamma-modal__content">
<CustomChart
ref="chartRef"
:option="option"
:opts="opts"
autoresize
@zr:mousedown="handleMouseDown"
@zr:mouseup="handleMouseUp"
@brushEnd="handleBrushEnd"
/>
<custom-chart :option="option" autoresize />
</div>
</div>
<template slot="custom-footer">
<div style="text-align: center">
<a-space>
<a-button type="success" @click="handleUnzoom">Unzoom</a-button>
<a-button type="warn" @click="visible = false">Cancel</a-button>
</a-space>
</div>
</template>
</custom-modal>
</template>
<script>
import CustomChart from '@/components/CustomChart/index.vue'
import { buildLineSeries, getAxisMax, rangeNumber } from '@/utils/chartHelper'
import { buildLineSeries } from '@/utils/chartHelper'
import { cloneDeep } from 'lodash'
const initialOption = {
@ -112,7 +96,6 @@ const initialOption = {
max: 'dataMax',
},
series: buildLineSeries('Line', [], 'yellow'),
brush: {},
}
const initialAxisInfo = {
@ -130,10 +113,6 @@ export default {
visible: false,
option: cloneDeep(initialOption),
axisInfo: cloneDeep(initialAxisInfo),
opts: {
notMerge: false,
},
}
},
created() {
@ -145,17 +124,6 @@ export default {
this.energys = energys || []
this.axisInfo = cloneDeep(initialAxisInfo)
this.visible = true
this.$nextTick(() => {
this.option.brush = { toolbox: [] }
this.handleUnzoom()
})
},
handleUnzoom() {
this.option.xAxis.min = 0
this.option.xAxis.max = 4096
this.option.yAxis.min = 1
this.option.yAxis.max = 'dataMax'
},
handleTooltipFormat(params) {
@ -166,81 +134,6 @@ export default {
energy: (this.energys[channel] || 0).toFixed(3),
}
},
getChart() {
return this.$refs.chartRef.getChartInstance()
},
//
handleMouseDown() {
const chart = this.getChart()
chart.dispatchAction({
type: 'takeGlobalCursor',
//
key: 'brush',
brushOption: {
// brush brushType false
brushType: 'rect',
},
})
},
handleMouseUp() {
this.$nextTick(() => {
this.clearBrush()
})
},
clearBrush() {
const chart = this.getChart()
//
chart.dispatchAction({
type: 'brush',
areas: [],
})
//
chart.dispatchAction({
type: 'takeGlobalCursor',
})
},
//
handleBrushEnd(param) {
const chart = this.getChart()
const areas = param.areas[0]
if (areas) {
const range = areas.range
const [[minX, maxX], [minY, maxY]] = range
const point1 = chart.convertFromPixel({ seriesIndex: 0 }, [minX, minY]).map((num) => parseInt(num.toFixed()))
const point2 = chart.convertFromPixel({ seriesIndex: 0 }, [maxX, maxY]).map((num) => parseInt(num.toFixed()))
//
const xAxisMax = getAxisMax(chart, 'xAxis')
const yAxisMax = getAxisMax(chart, 'yAxis')
//
const xAxisMin = this.option.xAxis.min
const yAxisMin = this.option.yAxis.min
let [x1, y2, x2, y1] = [...point1, ...point2] //
const xAxisLimit = rangeNumber(xAxisMin, xAxisMax)
const yAxisLimit = rangeNumber(yAxisMin, yAxisMax)
x1 = xAxisLimit(x1)
x2 = xAxisLimit(x2)
y1 = yAxisLimit(y1)
y2 = yAxisLimit(y2)
this.option.xAxis.min = x1
this.option.xAxis.max = x2
this.option.yAxis.min = y1
this.option.yAxis.max = y2
}
},
},
}
</script>
@ -276,16 +169,4 @@ export default {
overflow: hidden;
}
}
.fullscreen {
::v-deep {
.ant-modal-body {
height: calc(100% - 93px);
.gamma-modal {
height: 100%;
}
}
}
}
</style>

View File

@ -96,7 +96,7 @@ export default {
async getInfo() {
try {
this.isLoading = true
const { inputFileName: sampleFileName } = this.sampleData
const { sampleFileName } = this.sampleData
const { success, result, message } = await getAction('/selfStation/peakInformation', {
sampleFileName,
})

View File

@ -1,9 +1,9 @@
<template>
<div class="beta-gamma-spectrum" :class="{ 'has-max': isMax }">
<roi-limit-item
v-for="(item, index) in RoiTitleNames"
v-for="(_, index) in 4"
:key="index"
:title="`ROI${index + 1}: ${item}`"
:title="`ROI${index + 1}`"
:title-color="RoiTitleColors[index]"
:roi-list="ROILists[index]"
:analyze-result="ROIAnalyzeLists[index]"
@ -18,8 +18,6 @@ import CustomChart from '@/components/CustomChart/index.vue'
import RoiLimitItem from './components/RoiLimitItem.vue'
const RoiTitleColors = ['#0CB4C1', '#1B88E5', '#43960C', '#D09324']
const RoiTitleNames = ['XE-131m', 'XE-133m', 'XE-133', 'XE-135']
// 线
export default {
components: {
@ -41,7 +39,6 @@ export default {
return {
isMax: false,
RoiTitleNames,
}
},
methods: {

View File

@ -515,10 +515,10 @@ export default {
align-items: center;
&-title {
width: 100px;
width: 46px;
height: 100%;
line-height: 18px;
padding-left: 5px;
text-align: center;
font-family: ArialMT;
font-size: 12px;
cursor: pointer;

View File

@ -657,9 +657,7 @@ export default {
dbName,
analyst: analyst ? analyst : null,
sampleFileName,
gasFileName,
detFileName,
qcFileName,
}
getAction('/selfStation/initValue', params)
}
@ -1112,20 +1110,20 @@ export default {
//
handleHelp() {
let docPath = null
let apiBaseUrl = window._CONFIG['onlinePreviewDomainURL'] || '/jeecg-boot'
if (this.isGamma) {
docPath = `/armd-help/Gamma.pdf`
let apiBaseUrl = window._CONFIG['onlinePreviewDomainURL'] || "/jeecg-boot";
if(this.isGamma) {
docPath = `/armd-help/Gamma.pdf`;
} else if (this.isBeta) {
docPath = `/armd-help/Self-Beta-Gamma.pdf`
} else if (this.isBetaGamma) {
docPath = `/armd-help/Beta-Gamma.pdf`
docPath = `/armd-help/Self-Beta-Gamma.pdf`;
} else if(this.isBetaGamma) {
docPath = `/armd-help/Beta-Gamma.pdf`;
}
if (!docPath) {
if(!docPath) {
this.$message.warning('Please load an spectrum first!')
return
return ;
}
window.open(apiBaseUrl + docPath, '_blank')
window.open(apiBaseUrl + docPath, '_blank');
console.log('%c [ handleHelp ]-221', 'font-size:13px; background:pink; color:#bf2c9f;')
},