自建台站页面散点图优化
Energy Resolution Efficiency 弹窗功能开发,接口对接
This commit is contained in:
parent
82f707971a
commit
666c332c56
|
@ -35,6 +35,7 @@
|
||||||
:histogramDataList="histogramDataList"
|
:histogramDataList="histogramDataList"
|
||||||
:boundary="boundaryList"
|
:boundary="boundaryList"
|
||||||
:currIdx="currIdx"
|
:currIdx="currIdx"
|
||||||
|
@refreshRoi="refreshRoi"
|
||||||
/>
|
/>
|
||||||
</beta-gamma-chart-container>
|
</beta-gamma-chart-container>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
<div class="beta-gamma-analysis-main-bottom-right">
|
<div class="beta-gamma-analysis-main-bottom-right">
|
||||||
<beta-gamma-chart-container>
|
<beta-gamma-chart-container>
|
||||||
<template slot="title"> ROI Param </template>
|
<template slot="title"> ROI Param </template>
|
||||||
<roi-param :roiParam="roiParam" />
|
<roi-param :roiParamList="roiParamList" />
|
||||||
</beta-gamma-chart-container>
|
</beta-gamma-chart-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,16 +126,7 @@ export default {
|
||||||
gammaEnergyData: [],
|
gammaEnergyData: [],
|
||||||
betaEnergyData: [],
|
betaEnergyData: [],
|
||||||
ROILists: [],
|
ROILists: [],
|
||||||
roiParam: {
|
roiParamList: [],
|
||||||
ROIOneStart: 0,
|
|
||||||
ROIOneStop: 0,
|
|
||||||
ROITwoStart: 0,
|
|
||||||
ROITwoStop: 0,
|
|
||||||
ROIThreeStart: 0,
|
|
||||||
ROIThreeStop: 0,
|
|
||||||
ROIFourStart: 0,
|
|
||||||
ROIFourStop: 0,
|
|
||||||
},
|
|
||||||
boundaryList: [],
|
boundaryList: [],
|
||||||
sampleDetail: {},
|
sampleDetail: {},
|
||||||
qcFlags: {},
|
qcFlags: {},
|
||||||
|
@ -172,6 +164,14 @@ export default {
|
||||||
// this.getSelfStationSampleDetail()
|
// this.getSelfStationSampleDetail()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
refreshRoi(data) {
|
||||||
|
const { list, start, stop } = data
|
||||||
|
let currRoiParam = { start, stop }
|
||||||
|
let currBoundary = { minX: start, maxX: stop, minY: 0, maxY: 4096 }
|
||||||
|
this.ROILists.splice(this.currIdx, 1, list)
|
||||||
|
this.roiParamList.splice(this.currIdx, 1, currRoiParam)
|
||||||
|
this.boundaryList.splice(this.currIdx, 1, currBoundary)
|
||||||
|
},
|
||||||
getIndex(val) {
|
getIndex(val) {
|
||||||
this.currIdx = val
|
this.currIdx = val
|
||||||
},
|
},
|
||||||
|
@ -229,24 +229,16 @@ export default {
|
||||||
this.gammaEnergyData = gammaEnergyData
|
this.gammaEnergyData = gammaEnergyData
|
||||||
this.betaEnergyData = betaEnergyData
|
this.betaEnergyData = betaEnergyData
|
||||||
this.ROILists = [ROIOneList, ROITwoList, ROIThreeList, ROIFourList]
|
this.ROILists = [ROIOneList, ROITwoList, ROIThreeList, ROIFourList]
|
||||||
this.roiParam.ROIOneStart = ROIOneStart
|
let roiParam1 = { start: ROIOneStart, stop: ROIOneStop }
|
||||||
this.roiParam.ROIOneStop = ROIOneStop
|
let roiParam2 = { start: ROITwoStart, stop: ROITwoStop }
|
||||||
this.roiParam.ROITwoStart = ROITwoStart
|
let roiParam3 = { start: ROIThreeStart, stop: ROIThreeStop }
|
||||||
this.roiParam.ROITwoStop = ROITwoStop
|
let roiParam4 = { start: ROIFourStart, stop: ROIFourStop }
|
||||||
this.roiParam.ROIThreeStart = ROIThreeStart
|
this.roiParamList.push(roiParam1, roiParam2, roiParam3, roiParam4)
|
||||||
this.roiParam.ROIThreeStop = ROIThreeStop
|
|
||||||
this.roiParam.ROIFourStart = ROIFourStart
|
|
||||||
this.roiParam.ROIFourStop = ROIFourStop
|
|
||||||
let boundary1 = { minX: ROIOneStart, maxX: ROIOneStop, minY: 0, maxY: 4096 }
|
let boundary1 = { minX: ROIOneStart, maxX: ROIOneStop, minY: 0, maxY: 4096 }
|
||||||
let boundary2 = { minX: ROITwoStart, maxX: ROITwoStop, minY: 0, maxY: 4096 }
|
let boundary2 = { minX: ROITwoStart, maxX: ROITwoStop, minY: 0, maxY: 4096 }
|
||||||
let boundary3 = { minX: ROIThreeStart, maxX: ROIThreeStop, minY: 0, maxY: 4096 }
|
let boundary3 = { minX: ROIThreeStart, maxX: ROIThreeStop, minY: 0, maxY: 4096 }
|
||||||
let boundary4 = { minX: ROIFourStart, maxX: ROIFourStop, minY: 0, maxY: 4096 }
|
let boundary4 = { minX: ROIFourStart, maxX: ROIFourStop, minY: 0, maxY: 4096 }
|
||||||
this.boundaryList.push(boundary1, boundary2, boundary3, boundary4)
|
this.boundaryList.push(boundary1, boundary2, boundary3, boundary4)
|
||||||
// this.$store.commit('ADD_SAMPLE_DATA', {
|
|
||||||
// inputFileName: this.sample.sampleFileName,
|
|
||||||
// data: result,
|
|
||||||
// from: 'file',
|
|
||||||
// })
|
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
import CustomChart from '@/components/CustomChart/index.vue'
|
import CustomChart from '@/components/CustomChart/index.vue'
|
||||||
import ColorPalette from './ColorPalette.vue'
|
import ColorPalette from './ColorPalette.vue'
|
||||||
import { getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper.js'
|
import { getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper.js'
|
||||||
import { getAction, postAction, deleteAction } from '../../../api/manage'
|
import { getAction, putAction, deleteAction } from '../../../api/manage'
|
||||||
import SampleDataMixin from '../SampleDataMixin'
|
import SampleDataMixin from '../SampleDataMixin'
|
||||||
const buttons = ['Beta-Gamma', 'Gamma', 'Beta']
|
const buttons = ['Beta-Gamma', 'Gamma', 'Beta']
|
||||||
// Beta-Gamma 的配置
|
// Beta-Gamma 的配置
|
||||||
|
@ -169,8 +169,8 @@ const dragOption = {
|
||||||
position: [],
|
position: [],
|
||||||
draggable: true,
|
draggable: true,
|
||||||
style: {
|
style: {
|
||||||
fill: 'rgba(255,0,255,0.3)', // fill: 'rgba(0,0,0,0.03)', 方便观察
|
fill: 'rgba(0,0,0,0)', // fill: 'rgba(0,0,0,0.03)', 方便观察
|
||||||
stroke: 'rgba(255,0,255,0.3)', // stroke: 'rgba(0,0,0,0.03)', 方便观察
|
stroke: 'rgba(0,0,0,0)', // stroke: 'rgba(0,0,0,0.03)', 方便观察
|
||||||
lineWidth: 10,
|
lineWidth: 10,
|
||||||
},
|
},
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
|
@ -178,7 +178,6 @@ const dragOption = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'rect',
|
type: 'rect',
|
||||||
// rotation: Math.PI/2,
|
|
||||||
z: 1000,
|
z: 1000,
|
||||||
shape: {
|
shape: {
|
||||||
width: 5,
|
width: 5,
|
||||||
|
@ -189,8 +188,8 @@ const dragOption = {
|
||||||
position: [],
|
position: [],
|
||||||
draggable: true,
|
draggable: true,
|
||||||
style: {
|
style: {
|
||||||
fill: 'rgba(255,0,255,0.3)', // fill: 'rgba(0,0,0,0.03)', 方便观察
|
fill: 'rgba(0,0,0,0)', // fill: 'rgba(0,0,0,0.03)', 方便观察
|
||||||
stroke: 'rgba(255,0,255,0.3)', // stroke: 'rgba(0,0,0,0.03)', 方便观察
|
stroke: 'rgba(0,0,0,0)', // stroke: 'rgba(0,0,0,0.03)', 方便观察
|
||||||
lineWidth: 10,
|
lineWidth: 10,
|
||||||
},
|
},
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
|
@ -252,7 +251,6 @@ const gammaOption = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
series: {
|
series: {
|
||||||
name: '今日',
|
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
showSymbol: false,
|
showSymbol: false,
|
||||||
|
@ -324,7 +322,6 @@ const betaOption = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
series: {
|
series: {
|
||||||
name: '今日',
|
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
showSymbol: false,
|
showSymbol: false,
|
||||||
|
@ -418,6 +415,8 @@ export default {
|
||||||
boundaryData: {
|
boundaryData: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
const { minX, maxX, minY, maxY, color } = newVal
|
const { minX, maxX, minY, maxY, color } = newVal
|
||||||
|
this.startChannel = minX
|
||||||
|
this.endChannel = maxX
|
||||||
const [graphic1, graphic2] = this.dragOption.graphic
|
const [graphic1, graphic2] = this.dragOption.graphic
|
||||||
const _this = this
|
const _this = this
|
||||||
this.myChart = this.$refs.chartTwoDRef.getChartInstance()
|
this.myChart = this.$refs.chartTwoDRef.getChartInstance()
|
||||||
|
@ -429,15 +428,14 @@ export default {
|
||||||
]
|
]
|
||||||
graphic1.ondrag = function () {
|
graphic1.ondrag = function () {
|
||||||
const rectList = []
|
const rectList = []
|
||||||
this.startChannel = _this.myChart.convertFromPixel({ xAxisId: '2' }, this.position[0])
|
_this.startChannel = parseInt(_this.myChart.convertFromPixel({ xAxisId: '2' }, this.position[0]))
|
||||||
const rect = [
|
const rect = [
|
||||||
[this.startChannel, minY],
|
[_this.startChannel, minY],
|
||||||
[maxX, minY],
|
[_this.endChannel, minY],
|
||||||
[maxX, maxY],
|
[_this.endChannel, maxY],
|
||||||
[this.startChannel, maxY],
|
[_this.startChannel, maxY],
|
||||||
]
|
]
|
||||||
rectList.push(..._this.drawOneRect(rect, color))
|
rectList.push(..._this.drawOneRect(rect, color))
|
||||||
console.log(rectList)
|
|
||||||
_this.myChart.setOption({
|
_this.myChart.setOption({
|
||||||
series: {
|
series: {
|
||||||
markLine: {
|
markLine: {
|
||||||
|
@ -453,15 +451,14 @@ export default {
|
||||||
]
|
]
|
||||||
graphic2.ondrag = function () {
|
graphic2.ondrag = function () {
|
||||||
const rectList = []
|
const rectList = []
|
||||||
this.endChannel = _this.myChart.convertFromPixel({ xAxisId: '2' }, this.position[0])
|
_this.endChannel = parseInt(_this.myChart.convertFromPixel({ xAxisId: '2' }, this.position[0]))
|
||||||
const rect = [
|
const rect = [
|
||||||
[minX, minY],
|
[_this.startChannel, minY],
|
||||||
[this.endChannel, minY],
|
[_this.endChannel, minY],
|
||||||
[this.endChannel, maxY],
|
[_this.endChannel, maxY],
|
||||||
[minX, maxY],
|
[_this.startChannel, maxY],
|
||||||
]
|
]
|
||||||
rectList.push(..._this.drawOneRect(rect, color))
|
rectList.push(..._this.drawOneRect(rect, color))
|
||||||
console.log(rectList)
|
|
||||||
_this.myChart.setOption({
|
_this.myChart.setOption({
|
||||||
series: {
|
series: {
|
||||||
markLine: {
|
markLine: {
|
||||||
|
@ -494,27 +491,6 @@ export default {
|
||||||
this.twoDOption.brush = { toolbox: [] }
|
this.twoDOption.brush = { toolbox: [] }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// onLineDragging(position, data) {
|
|
||||||
// const { minX, maxX, minY, maxY, color } = data
|
|
||||||
// console.log(this)
|
|
||||||
// const rectList = []
|
|
||||||
// let xAxis = this.myChart.convertFromPixel({ xAxisId: '2' }, position[0])
|
|
||||||
// const rect = [
|
|
||||||
// [xAxis, minY],
|
|
||||||
// [maxX, minY],
|
|
||||||
// [maxX, maxY],
|
|
||||||
// [xAxis, maxY],
|
|
||||||
// ]
|
|
||||||
// rectList.push(...this.drawOneRect(rect, color))
|
|
||||||
// console.log(rectList)
|
|
||||||
// this.myChart.setOption({
|
|
||||||
// series: {
|
|
||||||
// markLine: {
|
|
||||||
// data: rectList,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// Gamma 的折线图数据
|
// Gamma 的折线图数据
|
||||||
buildGammaLineList(val) {
|
buildGammaLineList(val) {
|
||||||
const gammaSeries = this.gammaOption.series
|
const gammaSeries = this.gammaOption.series
|
||||||
|
@ -576,7 +552,7 @@ export default {
|
||||||
xAxis: { min: minX, max: maxX },
|
xAxis: { min: minX, max: maxX },
|
||||||
yAxis: { min: minY, max: maxY },
|
yAxis: { min: minY, max: maxY },
|
||||||
} = this.twoDOption
|
} = this.twoDOption
|
||||||
|
debugger
|
||||||
const inchartPoints = this.getInChartPoints(rect)
|
const inchartPoints = this.getInChartPoints(rect)
|
||||||
const outchartPoints = rect.filter((pointItem) => !inchartPoints.includes(pointItem))
|
const outchartPoints = rect.filter((pointItem) => !inchartPoints.includes(pointItem))
|
||||||
// 如果框选范围内只有俩点
|
// 如果框选范围内只有俩点
|
||||||
|
@ -738,6 +714,13 @@ export default {
|
||||||
return xAxis >= minX && xAxis <= maxX && yAxis >= minY && yAxis <= maxY
|
return xAxis >= minX && xAxis <= maxX && yAxis >= minY && yAxis <= maxY
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 根据俩点判断是横向还是纵向
|
||||||
|
* x坐标相同,则是纵向,否则横向
|
||||||
|
*/
|
||||||
|
isVerticleLine(point1, point2) {
|
||||||
|
return point1[0] == point2[0] ? true : false
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 根据两个点生成一个markLine直线
|
* 根据两个点生成一个markLine直线
|
||||||
*/
|
*/
|
||||||
|
@ -844,10 +827,39 @@ export default {
|
||||||
sampleFileName: inputFileName,
|
sampleFileName: inputFileName,
|
||||||
startChannel: this.startChannel,
|
startChannel: this.startChannel,
|
||||||
endChannel: this.endChannel,
|
endChannel: this.endChannel,
|
||||||
ROINum: this.currCount + 1,
|
ROINum: this.currIdx + 1,
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const { success, result, message } = await postAction('/selfStation/updateROI', params)
|
const { success, result, message } = await putAction(
|
||||||
|
`/selfStation/updateROI?sampleFileName=${inputFileName}&startChannel=${this.startChannel}&endChannel=${
|
||||||
|
this.endChannel
|
||||||
|
}&ROINum=${this.currIdx + 1}`
|
||||||
|
)
|
||||||
|
if (success) {
|
||||||
|
let obj = {}
|
||||||
|
for (const key in result) {
|
||||||
|
if (Object.hasOwnProperty.call(result, key)) {
|
||||||
|
const element = result[key]
|
||||||
|
if (key.includes('List')) {
|
||||||
|
obj.list = element
|
||||||
|
} else if (key.includes('Start')) {
|
||||||
|
obj.start = element
|
||||||
|
} else {
|
||||||
|
obj.stop = element
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$emit('refreshRoi', obj)
|
||||||
|
// this.$bus.$emit('updateRoi', obj.list)
|
||||||
|
// this.boundaryData = {
|
||||||
|
// minX: obj.start,
|
||||||
|
// maxX: obj.stop,
|
||||||
|
// minY: 0,
|
||||||
|
// maxY: 4096,
|
||||||
|
// color: '#99CA53',
|
||||||
|
// }
|
||||||
|
// this.reDrawRect()
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,16 +479,16 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await postAction('/gamma/changeDataEfficiency', {
|
const { success, result, message } = await postAction('/selfStation/changeDataEfficiency', {
|
||||||
sampleId,
|
// sampleId,
|
||||||
fileName,
|
fileName,
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurEffi: this.list.map((item) => item.efficiency),
|
m_vCurEffi: this.list.map((item) => item.efficiency),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
m_curParam: this.param,
|
m_curParam: this.param,
|
||||||
funcId: this.funcId,
|
funcId: this.funcId,
|
||||||
width: 922,
|
width: 768,
|
||||||
curRow: this.selectedRowKeys[0] || 0,
|
// curRow: this.selectedRowKeys[0] || 0,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.handleResult(result)
|
this.handleResult(result)
|
||||||
|
@ -506,7 +506,7 @@ export default {
|
||||||
async handleSave() {
|
async handleSave() {
|
||||||
try {
|
try {
|
||||||
this.isSaving = true
|
this.isSaving = true
|
||||||
const res = await postAction('/gamma/saveDataEfficiency', {
|
const res = await postAction('/selfStation/saveDataEfficiency', {
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurEffi: this.list.map((item) => item.efficiency),
|
m_vCurEffi: this.list.map((item) => item.efficiency),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
|
@ -572,13 +572,13 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await postAction('/gamma/applyDataEfficiency', {
|
const { success, result, message } = await postAction('/selfStation/applyDataEfficiency', {
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurEffi: this.list.map((item) => item.efficiency),
|
m_vCurEffi: this.list.map((item) => item.efficiency),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
m_curParam: this.param,
|
m_curParam: this.param,
|
||||||
curCalName,
|
curCalName,
|
||||||
sampleId,
|
sampleId: '',
|
||||||
fileName,
|
fileName,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -603,7 +603,7 @@ export default {
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
const { success, message } = await putAction(
|
const { success, message } = await putAction(
|
||||||
`/gamma/setCurrentEfficiency?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
`/selfStation/setCurrentEfficiency?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||||
)
|
)
|
||||||
if (!success) {
|
if (!success) {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
|
|
@ -438,14 +438,14 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await postAction('/gamma/changeDataEnergy', {
|
const { success, result, message } = await postAction('/selfStation/changeDataEnergy', {
|
||||||
sampleId,
|
sampleId: '',
|
||||||
fileName,
|
fileName,
|
||||||
m_vCurCentroid: this.list.map((item) => item.channel),
|
m_vCurCentroid: this.list.map((item) => item.channel),
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
m_curParam: this.param,
|
m_curParam: this.param,
|
||||||
width: 922,
|
width: 768,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.handleResult(result)
|
this.handleResult(result)
|
||||||
|
@ -463,7 +463,7 @@ export default {
|
||||||
async handleSave() {
|
async handleSave() {
|
||||||
try {
|
try {
|
||||||
this.isSaving = true
|
this.isSaving = true
|
||||||
const res = await postAction('/gamma/saveDataEnergy', {
|
const res = await postAction('/selfStation/saveDataEnergy', {
|
||||||
m_vCurCentroid: this.list.map((item) => item.channel),
|
m_vCurCentroid: this.list.map((item) => item.channel),
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
|
@ -528,13 +528,13 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await postAction('/gamma/applyDataEnergy', {
|
const { success, result, message } = await postAction('/selfStation/applyDataEnergy', {
|
||||||
m_vCurCentroid: this.list.map((item) => item.channel),
|
m_vCurCentroid: this.list.map((item) => item.channel),
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
m_curParam: this.param,
|
m_curParam: this.param,
|
||||||
curCalName,
|
curCalName,
|
||||||
sampleId,
|
sampleId: '',
|
||||||
fileName,
|
fileName,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -559,7 +559,7 @@ export default {
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
const { success, message } = await putAction(
|
const { success, message } = await putAction(
|
||||||
`/gamma/setCurrentEnergy?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
`/selfStation/setCurrentEnergy?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||||
)
|
)
|
||||||
if (!success) {
|
if (!success) {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
|
|
@ -436,14 +436,14 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await postAction('/gamma/changeDataResolution', {
|
const { success, result, message } = await postAction('/selfStation/changeDataResolution', {
|
||||||
sampleId,
|
sampleId: '',
|
||||||
fileName,
|
fileName,
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurReso: this.list.map((item) => item.fwhm),
|
m_vCurReso: this.list.map((item) => item.fwhm),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
m_curParam: this.param,
|
m_curParam: this.param,
|
||||||
width: 922,
|
width: 768,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.handleResult(result)
|
this.handleResult(result)
|
||||||
|
@ -461,7 +461,7 @@ export default {
|
||||||
async handleSave() {
|
async handleSave() {
|
||||||
try {
|
try {
|
||||||
this.isSaving = true
|
this.isSaving = true
|
||||||
const res = await postAction('/gamma/saveDataResolution', {
|
const res = await postAction('/selfStation/saveDataResolution', {
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurReso: this.list.map((item) => item.fwhm),
|
m_vCurReso: this.list.map((item) => item.fwhm),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
|
@ -526,13 +526,13 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await postAction('/gamma/applyDataResolution', {
|
const { success, result, message } = await postAction('/selfStation/applyDataResolution', {
|
||||||
m_vCurEnergy: this.list.map((item) => item.energy),
|
m_vCurEnergy: this.list.map((item) => item.energy),
|
||||||
m_vCurReso: this.list.map((item) => item.fwhm),
|
m_vCurReso: this.list.map((item) => item.fwhm),
|
||||||
m_vCurUncert: this.uncert,
|
m_vCurUncert: this.uncert,
|
||||||
m_curParam: this.param,
|
m_curParam: this.param,
|
||||||
curCalName,
|
curCalName,
|
||||||
sampleId,
|
sampleId: '',
|
||||||
fileName,
|
fileName,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -557,7 +557,7 @@ export default {
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
const { success, message } = await putAction(
|
const { success, message } = await putAction(
|
||||||
`/gamma/setCurrentResolution?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
`/selfStation/setCurrentResolution?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||||
)
|
)
|
||||||
if (!success) {
|
if (!success) {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
|
|
@ -103,6 +103,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
ROILists: {
|
ROILists: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
|
this.active = 0
|
||||||
const [ROIOneList, ...lists] = newVal
|
const [ROIOneList, ...lists] = newVal
|
||||||
this.buildOneLineList(ROIOneList)
|
this.buildOneLineList(ROIOneList)
|
||||||
},
|
},
|
||||||
|
@ -116,17 +117,27 @@ export default {
|
||||||
roiLimitsOption,
|
roiLimitsOption,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.$bus.$on('updateRoi', this.updateRoi)
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
// this.$bus.$off('updateRoi', this.updateRoi)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
updateRoi(data) {
|
||||||
|
this.buildOneLineList(data)
|
||||||
|
this.active = 0
|
||||||
|
},
|
||||||
buildOneLineList(val) {
|
buildOneLineList(val) {
|
||||||
|
if (val) {
|
||||||
const currSeries = this.roiLimitsOption.series
|
const currSeries = this.roiLimitsOption.series
|
||||||
currSeries.data = val.map((item) => [item.x, item.y])
|
currSeries.data = val.map((item) => [item.x, item.y])
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 点击改变Beta-Gamma Spectrum: Sample图表类型
|
// 点击改变Beta-Gamma Spectrum: Sample图表类型
|
||||||
handleChange(index) {
|
handleChange(index) {
|
||||||
console.log(index)
|
|
||||||
this.active = index
|
this.active = index
|
||||||
this.buildOneLineList(this.ROILists[index])
|
this.buildOneLineList(this.ROILists[index])
|
||||||
// this.$bus.$emit('sendIndex', index)
|
|
||||||
this.$emit('sendIndex', index)
|
this.$emit('sendIndex', index)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="roi-param-container">
|
<div class="roi-param-container">
|
||||||
<div class="roi-param-container-roi">
|
<div class="roi-param-container-roi" v-for="(item, index) in roiParamList" :key="index">
|
||||||
<div class="roi-param-container-roi-label">ROI1</div>
|
<div class="roi-param-container-roi-label">ROI{{ index + 1 }}</div>
|
||||||
<div class="roi-param-container-roi-item">
|
<div class="roi-param-container-roi-item">
|
||||||
<div style="text-align: center">Beta</div>
|
<div style="text-align: center">Beta</div>
|
||||||
<a-input :value="roiParam.ROIOneStart" style="margin: 15px 0 20px" />
|
<a-input :value="item.start" style="margin: 15px 0 20px" />
|
||||||
<a-input :value="roiParam.ROIOneStop" />
|
<a-input :value="item.stop" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="roi-param-container-roi">
|
<!-- <div class="roi-param-container-roi">
|
||||||
<div class="roi-param-container-roi-label">ROI2</div>
|
<div class="roi-param-container-roi-label">ROI2</div>
|
||||||
<div class="roi-param-container-roi-item">
|
<div class="roi-param-container-roi-item">
|
||||||
<div style="text-align: center">Beta</div>
|
<div style="text-align: center">Beta</div>
|
||||||
|
@ -31,16 +31,16 @@
|
||||||
<a-input :value="roiParam.ROIFourStart" style="margin: 15px 0 20px" />
|
<a-input :value="roiParam.ROIFourStart" style="margin: 15px 0 20px" />
|
||||||
<a-input :value="roiParam.ROIFourStop" />
|
<a-input :value="roiParam.ROIFourStop" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
roiParam: {
|
roiParamList: {
|
||||||
type: Object,
|
type: Array,
|
||||||
default: () => {},
|
default: () => [],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user