处理分页模块中所有弹窗的表格数字回显的格式及beta 的Result display 模块数据格式
This commit is contained in:
parent
a7b18c57c7
commit
90d90da2eb
|
@ -30,6 +30,13 @@ const columns = [
|
||||||
title: 'Value',
|
title: 'Value',
|
||||||
dataIndex: 'value',
|
dataIndex: 'value',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
customRender: (text) => {
|
||||||
|
if (text !== 'Match' && text !== 'UnMatch') {
|
||||||
|
return parseFloat(Number(text).toPrecision(6))
|
||||||
|
} else {
|
||||||
|
return text
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Status',
|
title: 'Status',
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
style: {
|
style: {
|
||||||
width: '70px',
|
width: '70px',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
flexShrink: 0
|
flexShrink: 0,
|
||||||
}
|
},
|
||||||
}"
|
}"
|
||||||
:wrapperCol="{
|
:wrapperCol="{
|
||||||
style: {
|
style: {
|
||||||
flex: 1
|
flex: 1,
|
||||||
}
|
},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<a-form-model-item label="Energy">
|
<a-form-model-item label="Energy">
|
||||||
|
@ -54,13 +54,7 @@
|
||||||
<div>
|
<div>
|
||||||
<label>
|
<label>
|
||||||
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
||||||
<input
|
<input ref="fileInput" type="file" accept=".ent" style="display: none" @change="handleFileChange" />
|
||||||
ref="fileInput"
|
|
||||||
type="file"
|
|
||||||
accept=".ent"
|
|
||||||
style="display: none;"
|
|
||||||
@change="handleFileChange"
|
|
||||||
/>
|
|
||||||
</label>
|
</label>
|
||||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -126,23 +120,23 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy',
|
dataIndex: 'energy',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Efficiency',
|
title: 'Efficiency',
|
||||||
dataIndex: 'efficiency',
|
dataIndex: 'efficiency',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Fit(keV)',
|
title: 'Fit(keV)',
|
||||||
dataIndex: 'fit',
|
dataIndex: 'fit',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Delta(%)',
|
title: 'Delta(%)',
|
||||||
dataIndex: 'delta',
|
dataIndex: 'delta',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const initialOption = {
|
const initialOption = {
|
||||||
|
@ -150,99 +144,99 @@ const initialOption = {
|
||||||
top: 20,
|
top: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
bottom: 50,
|
bottom: 50,
|
||||||
left: 70
|
left: 70,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'Channel',
|
text: 'Channel',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#8FD4F8',
|
color: '#8FD4F8',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal',
|
||||||
},
|
},
|
||||||
right: 10,
|
right: 10,
|
||||||
bottom: 0
|
bottom: 0,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
formatter: params => {
|
formatter: (params) => {
|
||||||
const [x, y] = params[0].value
|
const [x, y] = params[0].value
|
||||||
const energy = parseInt(x)
|
const energy = parseInt(x)
|
||||||
const efficiency = y.toFixed(3)
|
const efficiency = y.toFixed(3)
|
||||||
return `<div class="channel">Energy: ${energy}</div>
|
return `<div class="channel">Energy: ${energy}</div>
|
||||||
<div class="energy">Efficiency: ${efficiency}</div>`
|
<div class="energy">Efficiency: ${efficiency}</div>`
|
||||||
},
|
},
|
||||||
className: 'figure-chart-option-tooltip'
|
className: 'figure-chart-option-tooltip',
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
min: 1,
|
min: 1,
|
||||||
max: 'dataMax',
|
max: 'dataMax',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
name: 'keV',
|
name: 'keV',
|
||||||
nameLocation: 'center',
|
nameLocation: 'center',
|
||||||
nameGap: 50,
|
nameGap: 50,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: '#8FD4F8',
|
color: '#8FD4F8',
|
||||||
fontSize: 14
|
fontSize: 14,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
series: []
|
series: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
const functions = [
|
const functions = [
|
||||||
{
|
{
|
||||||
label: 'Interpolation',
|
label: 'Interpolation',
|
||||||
value: 1
|
value: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'HT Efficiency',
|
label: 'HT Efficiency',
|
||||||
value: 5
|
value: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Log Polynomial',
|
label: 'Log Polynomial',
|
||||||
value: 6
|
value: 6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Invlog Polynomial',
|
label: 'Invlog Polynomial',
|
||||||
value: 8
|
value: 8,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'HAE Efficiency(1-3)',
|
label: 'HAE Efficiency(1-3)',
|
||||||
value: 93
|
value: 93,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'HAE Efficiency(1-2)',
|
label: 'HAE Efficiency(1-2)',
|
||||||
value: 94
|
value: 94,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'HAE Efficiency(1-2-3)',
|
label: 'HAE Efficiency(1-2-3)',
|
||||||
value: 95
|
value: 95,
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -266,11 +260,11 @@ export default {
|
||||||
currSelectedDataSource: '',
|
currSelectedDataSource: '',
|
||||||
appliedDataSource: '',
|
appliedDataSource: '',
|
||||||
opts: {
|
opts: {
|
||||||
notMerge: true
|
notMerge: true,
|
||||||
},
|
},
|
||||||
ECutAnalysis_Low: -1,
|
ECutAnalysis_Low: -1,
|
||||||
G_energy_span: -1,
|
G_energy_span: -1,
|
||||||
funcId: 1
|
funcId: 1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -282,7 +276,7 @@ export default {
|
||||||
sampleId,
|
sampleId,
|
||||||
fileName,
|
fileName,
|
||||||
currentText,
|
currentText,
|
||||||
width: 922
|
width: 922,
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -332,15 +326,15 @@ export default {
|
||||||
value: [x, y],
|
value: [x, y],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: scatterPoint.color,
|
color: scatterPoint.color,
|
||||||
borderWidth: 0
|
borderWidth: 0,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
emphasis: {
|
emphasis: {
|
||||||
disabled: true
|
disabled: true,
|
||||||
},
|
},
|
||||||
animation: false,
|
animation: false,
|
||||||
zlevel: 20
|
zlevel: 20,
|
||||||
})
|
})
|
||||||
this.option.series = series
|
this.option.series = series
|
||||||
}
|
}
|
||||||
|
@ -390,7 +384,7 @@ export default {
|
||||||
|
|
||||||
this.list.splice(i, 0, {
|
this.list.splice(i, 0, {
|
||||||
energy: energy,
|
energy: energy,
|
||||||
efficiency
|
efficiency,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.uncert.splice(i, 0, 0.5)
|
this.uncert.splice(i, 0, 0.5)
|
||||||
|
@ -463,12 +457,12 @@ export default {
|
||||||
const { success, result, message } = await postAction('/gamma/changeDataEfficiency', {
|
const { success, result, message } = await postAction('/gamma/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: 922,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.handleResult(result)
|
this.handleResult(result)
|
||||||
|
@ -487,10 +481,10 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isSaving = true
|
this.isSaving = true
|
||||||
const res = await postAction('/gamma/saveDataEfficiency', {
|
const res = await postAction('/gamma/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,
|
||||||
funcId: this.funcId
|
funcId: this.funcId,
|
||||||
})
|
})
|
||||||
if (typeof res == 'string') {
|
if (typeof res == 'string') {
|
||||||
const blob = new Blob([res], { type: 'text/plain' })
|
const blob = new Blob([res], { type: 'text/plain' })
|
||||||
|
@ -548,18 +542,18 @@ export default {
|
||||||
let curCalName = this.currSelectedDataSource
|
let curCalName = this.currSelectedDataSource
|
||||||
// 如果沒选中以Input开头的,也就是选中了PHD之类的
|
// 如果沒选中以Input开头的,也就是选中了PHD之类的
|
||||||
if (!curCalName.includes('Input')) {
|
if (!curCalName.includes('Input')) {
|
||||||
curCalName = `Input ${this.dataSourceList.filter(item => item.includes('Input')).length + 1}`
|
curCalName = `Input ${this.dataSourceList.filter((item) => item.includes('Input')).length + 1}`
|
||||||
}
|
}
|
||||||
|
|
||||||
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('/gamma/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) {
|
||||||
this.handleDataSourceClick(curCalName)
|
this.handleDataSourceClick(curCalName)
|
||||||
|
@ -591,8 +585,8 @@ export default {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
style: {
|
style: {
|
||||||
width: '70px',
|
width: '70px',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
flexShrink: 0
|
flexShrink: 0,
|
||||||
}
|
},
|
||||||
}"
|
}"
|
||||||
:wrapperCol="{
|
:wrapperCol="{
|
||||||
style: {
|
style: {
|
||||||
flex: 1
|
flex: 1,
|
||||||
}
|
},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<a-form-model-item label="Channel">
|
<a-form-model-item label="Channel">
|
||||||
|
@ -54,13 +54,7 @@
|
||||||
<div>
|
<div>
|
||||||
<label>
|
<label>
|
||||||
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
||||||
<input
|
<input ref="fileInput" type="file" accept=".ent" style="display: none" @change="handleFileChange" />
|
||||||
ref="fileInput"
|
|
||||||
type="file"
|
|
||||||
accept=".ent"
|
|
||||||
style="display: none;"
|
|
||||||
@change="handleFileChange"
|
|
||||||
/>
|
|
||||||
</label>
|
</label>
|
||||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -121,23 +115,23 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'Channel',
|
title: 'Channel',
|
||||||
dataIndex: 'channel',
|
dataIndex: 'channel',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy',
|
dataIndex: 'energy',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Fit(keV)',
|
title: 'Fit(keV)',
|
||||||
dataIndex: 'fit',
|
dataIndex: 'fit',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Delta(%)',
|
title: 'Delta(%)',
|
||||||
dataIndex: 'delta',
|
dataIndex: 'delta',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const initialOption = {
|
const initialOption = {
|
||||||
|
@ -145,68 +139,68 @@ const initialOption = {
|
||||||
top: 20,
|
top: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
bottom: 50,
|
bottom: 50,
|
||||||
left: 70
|
left: 70,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'Channel',
|
text: 'Channel',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#8FD4F8',
|
color: '#8FD4F8',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal',
|
||||||
},
|
},
|
||||||
right: 10,
|
right: 10,
|
||||||
bottom: 0
|
bottom: 0,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
formatter: params => {
|
formatter: (params) => {
|
||||||
const [x, y] = params[0].value
|
const [x, y] = params[0].value
|
||||||
const channel = parseInt(x)
|
const channel = parseInt(x)
|
||||||
const energy = y.toFixed(3)
|
const energy = y.toFixed(3)
|
||||||
return `<div class="channel">Channel: ${channel}</div>
|
return `<div class="channel">Channel: ${channel}</div>
|
||||||
<div class="energy">Energy: ${energy}</div>`
|
<div class="energy">Energy: ${energy}</div>`
|
||||||
},
|
},
|
||||||
className: 'figure-chart-option-tooltip'
|
className: 'figure-chart-option-tooltip',
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
min: 1,
|
min: 1,
|
||||||
max: 'dataMax',
|
max: 'dataMax',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
name: 'keV',
|
name: 'keV',
|
||||||
nameLocation: 'center',
|
nameLocation: 'center',
|
||||||
nameGap: 50,
|
nameGap: 50,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: '#8FD4F8',
|
color: '#8FD4F8',
|
||||||
fontSize: 14
|
fontSize: 14,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
series: []
|
series: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -228,11 +222,11 @@ export default {
|
||||||
currSelectedDataSource: '',
|
currSelectedDataSource: '',
|
||||||
appliedDataSource: '',
|
appliedDataSource: '',
|
||||||
opts: {
|
opts: {
|
||||||
notMerge: true
|
notMerge: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
rg_high: -1,
|
rg_high: -1,
|
||||||
rg_low: -1
|
rg_low: -1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -244,7 +238,7 @@ export default {
|
||||||
sampleId,
|
sampleId,
|
||||||
fileName,
|
fileName,
|
||||||
currentText,
|
currentText,
|
||||||
width: 922
|
width: 922,
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -294,15 +288,15 @@ export default {
|
||||||
value: [x, y],
|
value: [x, y],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: scatterPoint.color,
|
color: scatterPoint.color,
|
||||||
borderWidth: 0
|
borderWidth: 0,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
emphasis: {
|
emphasis: {
|
||||||
disabled: true
|
disabled: true,
|
||||||
},
|
},
|
||||||
animation: false,
|
animation: false,
|
||||||
zlevel: 20
|
zlevel: 20,
|
||||||
})
|
})
|
||||||
this.option.series = series
|
this.option.series = series
|
||||||
}
|
}
|
||||||
|
@ -351,7 +345,7 @@ export default {
|
||||||
|
|
||||||
this.list.splice(i, 0, {
|
this.list.splice(i, 0, {
|
||||||
channel: centroid,
|
channel: centroid,
|
||||||
energy
|
energy,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.uncert.splice(i, 0, 0.5)
|
this.uncert.splice(i, 0, 0.5)
|
||||||
|
@ -424,11 +418,11 @@ export default {
|
||||||
const { success, result, message } = await postAction('/gamma/changeDataEnergy', {
|
const { success, result, message } = await postAction('/gamma/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: 922,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.handleResult(result)
|
this.handleResult(result)
|
||||||
|
@ -447,9 +441,9 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isSaving = true
|
this.isSaving = true
|
||||||
const res = await postAction('/gamma/saveDataEnergy', {
|
const res = await postAction('/gamma/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,
|
||||||
})
|
})
|
||||||
if (typeof res == 'string') {
|
if (typeof res == 'string') {
|
||||||
const blob = new Blob([res], { type: 'text/plain' })
|
const blob = new Blob([res], { type: 'text/plain' })
|
||||||
|
@ -507,18 +501,18 @@ export default {
|
||||||
let curCalName = this.currSelectedDataSource
|
let curCalName = this.currSelectedDataSource
|
||||||
// 如果沒选中以Input开头的,也就是选中了PHD之类的
|
// 如果沒选中以Input开头的,也就是选中了PHD之类的
|
||||||
if (!curCalName.includes('Input')) {
|
if (!curCalName.includes('Input')) {
|
||||||
curCalName = `Input ${this.dataSourceList.filter(item => item.includes('Input')).length + 1}`
|
curCalName = `Input ${this.dataSourceList.filter((item) => item.includes('Input')).length + 1}`
|
||||||
}
|
}
|
||||||
|
|
||||||
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('/gamma/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) {
|
||||||
this.handleDataSourceClick(curCalName)
|
this.handleDataSourceClick(curCalName)
|
||||||
|
@ -550,8 +544,8 @@ export default {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -64,53 +64,56 @@ const columns = [
|
||||||
title: 'Energy (keV)',
|
title: 'Energy (keV)',
|
||||||
dataIndex: 'energy',
|
dataIndex: 'energy',
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return text && text !== 'null' ? Number(text).toPrecision(6) : text
|
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Yield (%)',
|
title: 'Yield (%)',
|
||||||
dataIndex: 'yield',
|
dataIndex: 'yield',
|
||||||
|
customRender: (text) => {
|
||||||
|
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Efficiency',
|
title: 'Efficiency',
|
||||||
dataIndex: 'efficiency',
|
dataIndex: 'efficiency',
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return text && text !== 'null' ? Number(text).toPrecision(6) : text
|
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Activity (Bq)',
|
title: 'Activity (Bq)',
|
||||||
dataIndex: 'activity',
|
dataIndex: 'activity',
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return text && text !== 'null' ? Number(text).toPrecision(6) : text
|
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Act Err (%)',
|
title: 'Act Err (%)',
|
||||||
dataIndex: 'actErr',
|
dataIndex: 'actErr',
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return text && text !== 'null' ? Number(text).toPrecision(6) : text
|
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'MDA (Bq)',
|
title: 'MDA (Bq)',
|
||||||
dataIndex: 'mda',
|
dataIndex: 'mda',
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return text && text !== 'null' ? Number(text).toPrecision(6) : text
|
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Conc (uBq/m3)',
|
title: 'Conc (uBq/m3)',
|
||||||
dataIndex: 'conc',
|
dataIndex: 'conc',
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return text && text !== 'null' ? Number(text).toPrecision(6) : text
|
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'MDC (uBq/m3)',
|
title: 'MDC (uBq/m3)',
|
||||||
dataIndex: 'mdc',
|
dataIndex: 'mdc',
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return text && text !== 'null' ? Number(text).toPrecision(5) : text
|
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
:columns="daughterColumns"
|
:columns="daughterColumns"
|
||||||
:list="daughterList"
|
:list="daughterList"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ y: 84 }"
|
:scroll="{ y: 84 }"
|
||||||
rowKey="daughters"
|
rowKey="daughters"
|
||||||
@rowDblClick="handleParentDBClick($event.daughters)"
|
@rowDblClick="handleParentDBClick($event.daughters)"
|
||||||
></custom-table>
|
></custom-table>
|
||||||
|
@ -86,9 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="nuclide-library-settings-operation">
|
<div class="nuclide-library-settings-operation">
|
||||||
<a-space :size="10">
|
<a-space :size="10">
|
||||||
<span>
|
<span> Energy: </span>
|
||||||
Energy:
|
|
||||||
</span>
|
|
||||||
<a-input v-model="model.editEnergy"></a-input>
|
<a-input v-model="model.editEnergy"></a-input>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-model="model.err"
|
v-model="model.err"
|
||||||
|
@ -122,18 +120,18 @@ const daughterColumns = [
|
||||||
{
|
{
|
||||||
title: 'Name',
|
title: 'Name',
|
||||||
dataIndex: 'daughters',
|
dataIndex: 'daughters',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Ratio',
|
title: 'Ratio',
|
||||||
dataIndex: 'branchingratios',
|
dataIndex: 'branchingratios',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Status',
|
title: 'Status',
|
||||||
dataIndex: 'daughtersstable',
|
dataIndex: 'daughtersstable',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 主体表格配置
|
// 主体表格配置
|
||||||
|
@ -143,43 +141,35 @@ const mainColumns = [
|
||||||
width: 80,
|
width: 80,
|
||||||
customRender: (_, __, index) => {
|
customRender: (_, __, index) => {
|
||||||
return index + 1
|
return index + 1
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Full Name',
|
title: 'Full Name',
|
||||||
dataIndex: 'fullName'
|
dataIndex: 'fullName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy',
|
dataIndex: 'energy',
|
||||||
width: 100,
|
width: 100,
|
||||||
customRender: text => {
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
return toFixed(text, 3)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Energy Uncert(%)',
|
title: 'Energy Uncert(%)',
|
||||||
dataIndex: 'energyUncert',
|
dataIndex: 'energyUncert',
|
||||||
width: 120,
|
width: 120,
|
||||||
customRender: text => {
|
customRender: (text) => parseFloat(Number(text * 100).toPrecision(6)),
|
||||||
return text ? toFixed(text * 100, 6) : ''
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Yield',
|
title: 'Yield',
|
||||||
dataIndex: 'yield',
|
dataIndex: 'yield',
|
||||||
width: 80,
|
width: 80,
|
||||||
customRender: text => {
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
return toFixed(text, 3)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Yield Uncert(%)',
|
title: 'Yield Uncert(%)',
|
||||||
dataIndex: 'yieldUncert',
|
dataIndex: 'yieldUncert',
|
||||||
width: 120,
|
width: 120,
|
||||||
customRender: text => {
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
return toFixed(text, 3)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'KeyLine',
|
title: 'KeyLine',
|
||||||
|
@ -187,15 +177,15 @@ const mainColumns = [
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
scopedSlots: {
|
scopedSlots: {
|
||||||
customRender: 'keyLine'
|
customRender: 'keyLine',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin, SampleDataMixin],
|
mixins: [ModalMixin, SampleDataMixin],
|
||||||
components: {
|
components: {
|
||||||
TitleOverBorder
|
TitleOverBorder,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
this.daughterColumns = daughterColumns
|
this.daughterColumns = daughterColumns
|
||||||
|
@ -210,7 +200,7 @@ export default {
|
||||||
model: {},
|
model: {},
|
||||||
|
|
||||||
selectedNuclide: {}, // 当前选中的Nuclide
|
selectedNuclide: {}, // 当前选中的Nuclide
|
||||||
selectedParent: {} // 当前选中的Parent
|
selectedParent: {}, // 当前选中的Parent
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -224,19 +214,19 @@ export default {
|
||||||
const { success, result, message } = await getAction('/gamma/NuclideLibrary', {
|
const { success, result, message } = await getAction('/gamma/NuclideLibrary', {
|
||||||
sampleId,
|
sampleId,
|
||||||
fileName,
|
fileName,
|
||||||
...this.model
|
...this.model,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
const {
|
const {
|
||||||
daughter: { list_parent, table_daughter },
|
daughter: { list_parent, table_daughter },
|
||||||
nuclLinesLibs,
|
nuclLinesLibs,
|
||||||
nuclideInfo,
|
nuclideInfo,
|
||||||
nuclides
|
nuclides,
|
||||||
} = result
|
} = result
|
||||||
|
|
||||||
this.nuclideList = nuclides
|
this.nuclideList = nuclides
|
||||||
this.parentList = list_parent ? list_parent.filter(item => item) : []
|
this.parentList = list_parent ? list_parent.filter((item) => item) : []
|
||||||
this.daughterList = table_daughter ? table_daughter.filter(item => item.daughters) : []
|
this.daughterList = table_daughter ? table_daughter.filter((item) => item.daughters) : []
|
||||||
this.nuclideInfo = nuclideInfo
|
this.nuclideInfo = nuclideInfo
|
||||||
this.nuclLinesLibs = nuclLinesLibs
|
this.nuclLinesLibs = nuclLinesLibs
|
||||||
|
|
||||||
|
@ -259,7 +249,7 @@ export default {
|
||||||
libraryName: 'UserLibrary',
|
libraryName: 'UserLibrary',
|
||||||
err: 0.5,
|
err: 0.5,
|
||||||
editEnergy: '',
|
editEnergy: '',
|
||||||
nuclideName: ''
|
nuclideName: '',
|
||||||
}
|
}
|
||||||
this.getInfo(true)
|
this.getInfo(true)
|
||||||
},
|
},
|
||||||
|
@ -300,8 +290,8 @@ export default {
|
||||||
handleParentDBClick(item) {
|
handleParentDBClick(item) {
|
||||||
this.model.nuclideName = item
|
this.model.nuclideName = item
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
style: {
|
style: {
|
||||||
width: '70px',
|
width: '70px',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
flexShrink: 0
|
flexShrink: 0,
|
||||||
}
|
},
|
||||||
}"
|
}"
|
||||||
:wrapperCol="{
|
:wrapperCol="{
|
||||||
style: {
|
style: {
|
||||||
flex: 1
|
flex: 1,
|
||||||
}
|
},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<a-form-model-item label="Energy">
|
<a-form-model-item label="Energy">
|
||||||
|
@ -54,13 +54,7 @@
|
||||||
<div>
|
<div>
|
||||||
<label>
|
<label>
|
||||||
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
||||||
<input
|
<input ref="fileInput" type="file" accept=".ent" style="display: none" @change="handleFileChange" />
|
||||||
ref="fileInput"
|
|
||||||
type="file"
|
|
||||||
accept=".ent"
|
|
||||||
style="display: none;"
|
|
||||||
@change="handleFileChange"
|
|
||||||
/>
|
|
||||||
</label>
|
</label>
|
||||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -121,23 +115,23 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy',
|
dataIndex: 'energy',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'FWHM(keV)',
|
title: 'FWHM(keV)',
|
||||||
dataIndex: 'fwhm',
|
dataIndex: 'fwhm',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Fit(keV)',
|
title: 'Fit(keV)',
|
||||||
dataIndex: 'fit',
|
dataIndex: 'fit',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Delta(%)',
|
title: 'Delta(%)',
|
||||||
dataIndex: 'delta',
|
dataIndex: 'delta',
|
||||||
customRender: (text) => Number(text).toFixed(3)
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const initialOption = {
|
const initialOption = {
|
||||||
|
@ -145,68 +139,68 @@ const initialOption = {
|
||||||
top: 20,
|
top: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
bottom: 50,
|
bottom: 50,
|
||||||
left: 70
|
left: 70,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'Channel',
|
text: 'Channel',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#8FD4F8',
|
color: '#8FD4F8',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal',
|
||||||
},
|
},
|
||||||
right: 10,
|
right: 10,
|
||||||
bottom: 0
|
bottom: 0,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
formatter: params => {
|
formatter: (params) => {
|
||||||
const [x, y] = params[0].value
|
const [x, y] = params[0].value
|
||||||
const energy = parseInt(x)
|
const energy = parseInt(x)
|
||||||
const fwhm = y.toFixed(3)
|
const fwhm = y.toFixed(3)
|
||||||
return `<div class="channel">Energy: ${energy}</div>
|
return `<div class="channel">Energy: ${energy}</div>
|
||||||
<div class="energy">Fwhm: ${fwhm}</div>`
|
<div class="energy">Fwhm: ${fwhm}</div>`
|
||||||
},
|
},
|
||||||
className: 'figure-chart-option-tooltip'
|
className: 'figure-chart-option-tooltip',
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
min: 1,
|
min: 1,
|
||||||
max: 'dataMax',
|
max: 'dataMax',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
name: 'keV',
|
name: 'keV',
|
||||||
nameLocation: 'center',
|
nameLocation: 'center',
|
||||||
nameGap: 50,
|
nameGap: 50,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: '#8FD4F8',
|
color: '#8FD4F8',
|
||||||
fontSize: 14
|
fontSize: 14,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
series: []
|
series: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -228,10 +222,10 @@ export default {
|
||||||
currSelectedDataSource: '',
|
currSelectedDataSource: '',
|
||||||
appliedDataSource: '',
|
appliedDataSource: '',
|
||||||
opts: {
|
opts: {
|
||||||
notMerge: true
|
notMerge: true,
|
||||||
},
|
},
|
||||||
ECutAnalysis_Low: -1,
|
ECutAnalysis_Low: -1,
|
||||||
G_energy_span: -1
|
G_energy_span: -1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -243,7 +237,7 @@ export default {
|
||||||
sampleId,
|
sampleId,
|
||||||
fileName,
|
fileName,
|
||||||
currentText,
|
currentText,
|
||||||
width: 922
|
width: 922,
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -293,15 +287,15 @@ export default {
|
||||||
value: [x, y],
|
value: [x, y],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: scatterPoint.color,
|
color: scatterPoint.color,
|
||||||
borderWidth: 0
|
borderWidth: 0,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
emphasis: {
|
emphasis: {
|
||||||
disabled: true
|
disabled: true,
|
||||||
},
|
},
|
||||||
animation: false,
|
animation: false,
|
||||||
zlevel: 20
|
zlevel: 20,
|
||||||
})
|
})
|
||||||
this.option.series = series
|
this.option.series = series
|
||||||
}
|
}
|
||||||
|
@ -350,7 +344,7 @@ export default {
|
||||||
|
|
||||||
this.list.splice(i, 0, {
|
this.list.splice(i, 0, {
|
||||||
energy: energy,
|
energy: energy,
|
||||||
fwhm
|
fwhm,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.uncert.splice(i, 0, 0.5)
|
this.uncert.splice(i, 0, 0.5)
|
||||||
|
@ -423,10 +417,10 @@ export default {
|
||||||
const { success, result, message } = await postAction('/gamma/changeDataResolution', {
|
const { success, result, message } = await postAction('/gamma/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,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.handleResult(result)
|
this.handleResult(result)
|
||||||
|
@ -445,9 +439,9 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isSaving = true
|
this.isSaving = true
|
||||||
const res = await postAction('/gamma/saveDataResolution', {
|
const res = await postAction('/gamma/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,
|
||||||
})
|
})
|
||||||
if (typeof res == 'string') {
|
if (typeof res == 'string') {
|
||||||
const blob = new Blob([res], { type: 'text/plain' })
|
const blob = new Blob([res], { type: 'text/plain' })
|
||||||
|
@ -505,18 +499,18 @@ export default {
|
||||||
let curCalName = this.currSelectedDataSource
|
let curCalName = this.currSelectedDataSource
|
||||||
// 如果沒选中以Input开头的,也就是选中了PHD之类的
|
// 如果沒选中以Input开头的,也就是选中了PHD之类的
|
||||||
if (!curCalName.includes('Input')) {
|
if (!curCalName.includes('Input')) {
|
||||||
curCalName = `Input ${this.dataSourceList.filter(item => item.includes('Input')).length + 1}`
|
curCalName = `Input ${this.dataSourceList.filter((item) => item.includes('Input')).length + 1}`
|
||||||
}
|
}
|
||||||
|
|
||||||
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('/gamma/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) {
|
||||||
this.handleDataSourceClick(curCalName)
|
this.handleDataSourceClick(curCalName)
|
||||||
|
@ -548,8 +542,8 @@ export default {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -47,10 +47,12 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy',
|
dataIndex: 'energy',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Centroid',
|
title: 'Centroid',
|
||||||
dataIndex: 'centroid',
|
dataIndex: 'centroid',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Multiplet',
|
title: 'Multiplet',
|
||||||
|
@ -59,22 +61,27 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'Fwhm(keV)',
|
title: 'Fwhm(keV)',
|
||||||
dataIndex: 'fwhm',
|
dataIndex: 'fwhm',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'NetArea',
|
title: 'NetArea',
|
||||||
dataIndex: 'netArea',
|
dataIndex: 'netArea',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'AreaErr(%)',
|
title: 'AreaErr(%)',
|
||||||
dataIndex: 'areaErr',
|
dataIndex: 'areaErr',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Significant',
|
title: 'Significant',
|
||||||
dataIndex: 'significant',
|
dataIndex: 'significant',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Sensitivity',
|
title: 'Sensitivity',
|
||||||
dataIndex: 'sensitivity',
|
dataIndex: 'sensitivity',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Indentify',
|
title: 'Indentify',
|
||||||
|
|
|
@ -426,10 +426,10 @@ export default {
|
||||||
},
|
},
|
||||||
getStationName(arg, val, flag) {
|
getStationName(arg, val, flag) {
|
||||||
arg.forEach((item) => {
|
arg.forEach((item) => {
|
||||||
item.conc = Number(item.conc).toFixed(6)
|
item.conc = Number(item.conc).toPrecision(6)
|
||||||
item.concErr = Number(item.concErr).toFixed(6)
|
item.concErr = Number(item.concErr).toPrecision(6)
|
||||||
item.lc = Number(item.lc).toFixed(6)
|
item.lc = Number(item.lc).toPrecision(6)
|
||||||
item.mdc = Number(item.mdc).toFixed(6)
|
item.mdc = Number(item.mdc).toPrecision(6)
|
||||||
})
|
})
|
||||||
this.resultDisplayFlag = arg
|
this.resultDisplayFlag = arg
|
||||||
this.params_toDB.stationName = val
|
this.params_toDB.stationName = val
|
||||||
|
@ -718,10 +718,10 @@ export default {
|
||||||
this.analyseCurrentSpectrumData = res.result
|
this.analyseCurrentSpectrumData = res.result
|
||||||
this.resultDisplayFlag = res.result.XeData
|
this.resultDisplayFlag = res.result.XeData
|
||||||
this.resultDisplayFlag.forEach((item) => {
|
this.resultDisplayFlag.forEach((item) => {
|
||||||
item.conc = item.conc.toFixed(6)
|
item.conc = item.conc.toPrecision(6)
|
||||||
item.concErr = item.concErr.toFixed(6)
|
item.concErr = item.concErr.toPrecision(6)
|
||||||
item.lc = item.lc.toFixed(6)
|
item.lc = item.lc.toPrecision(6)
|
||||||
item.mdc = item.mdc.toFixed(6)
|
item.mdc = item.mdc.toPrecision(6)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
|
@ -743,10 +743,10 @@ export default {
|
||||||
this.analyseCurrentSpectrumData = res.result
|
this.analyseCurrentSpectrumData = res.result
|
||||||
this.resultDisplayFlag = res.result.XeData
|
this.resultDisplayFlag = res.result.XeData
|
||||||
this.resultDisplayFlag.forEach((item) => {
|
this.resultDisplayFlag.forEach((item) => {
|
||||||
item.conc = item.conc.toFixed(6)
|
item.conc = item.conc.toPrecision(6)
|
||||||
item.concErr = item.concErr.toFixed(6)
|
item.concErr = item.concErr.toPrecision(6)
|
||||||
item.lc = item.lc.toFixed(6)
|
item.lc = item.lc.toPrecision(6)
|
||||||
item.mdc = item.mdc.toFixed(6)
|
item.mdc = item.mdc.toPrecision(6)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user