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