Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
a59ebff589
|
@ -6,7 +6,7 @@ import * as echarts from 'echarts'
|
||||||
import 'echarts-gl'
|
import 'echarts-gl'
|
||||||
|
|
||||||
const events = ['click', 'brushEnd']
|
const events = ['click', 'brushEnd']
|
||||||
const zrEvents = ['mousemove', 'mousedown', 'mouseup', 'click', 'dblclick']
|
const zrEvents = ['mousemove', 'mousedown', 'mouseup', 'click', 'dblclick', 'contextmenu']
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
option: {
|
option: {
|
||||||
|
|
|
@ -251,7 +251,6 @@ export default {
|
||||||
if (success) {
|
if (success) {
|
||||||
this.sampleDetail = result
|
this.sampleDetail = result
|
||||||
this.changeChartByType('sample')
|
this.changeChartByType('sample')
|
||||||
this.isLoading = false
|
|
||||||
this.$emit('getFiles', {
|
this.$emit('getFiles', {
|
||||||
detFileName: result.detBg.fileName,
|
detFileName: result.detBg.fileName,
|
||||||
gasFileName: result.gasBg.fileName,
|
gasFileName: result.gasBg.fileName,
|
||||||
|
@ -262,6 +261,8 @@ export default {
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getSampleDetail_file() {
|
async getSampleDetail_file() {
|
||||||
|
@ -323,7 +324,6 @@ export default {
|
||||||
histogramDataDList, // 左侧 Beta-Gamma Spectrum: Sample 图表的3D部分
|
histogramDataDList, // 左侧 Beta-Gamma Spectrum: Sample 图表的3D部分
|
||||||
Boundary, // 左侧2d图表的矩形
|
Boundary, // 左侧2d图表的矩形
|
||||||
|
|
||||||
XeData, // 右下角Result Display
|
|
||||||
spectrumData,
|
spectrumData,
|
||||||
|
|
||||||
AcqTimeBtn, // QC Flags 相关
|
AcqTimeBtn, // QC Flags 相关
|
||||||
|
@ -333,6 +333,10 @@ export default {
|
||||||
GasBgBtn, // QC Flags 相关
|
GasBgBtn, // QC Flags 相关
|
||||||
DetBgBtn, // QC Flags 相关
|
DetBgBtn, // QC Flags 相关
|
||||||
} = this.sampleDetail[this.spectraType]
|
} = this.sampleDetail[this.spectraType]
|
||||||
|
const {
|
||||||
|
XeData, // 右下角Result Display
|
||||||
|
savedAnalysisResult,
|
||||||
|
} = this.sampleDetail
|
||||||
|
|
||||||
this.spectrumData = spectrumData
|
this.spectrumData = spectrumData
|
||||||
|
|
||||||
|
@ -348,9 +352,9 @@ export default {
|
||||||
this.betaProjectedData = betaProjectedData
|
this.betaProjectedData = betaProjectedData
|
||||||
this.betaEnergyData = betaEnergyData
|
this.betaEnergyData = betaEnergyData
|
||||||
|
|
||||||
this.resultDisplay = XeData
|
this.resultDisplay = this.resultDisplay.length > 0 ? this.resultDisplay : XeData
|
||||||
|
|
||||||
this.$emit('sendInfo', this.resultDisplay, this.spectrumData.stationCode)
|
this.$emit('sendInfo', this.resultDisplay, this.spectrumData.stationCode, savedAnalysisResult)
|
||||||
|
|
||||||
this.qcFlags = {
|
this.qcFlags = {
|
||||||
AcqTimeBtn,
|
AcqTimeBtn,
|
||||||
|
@ -432,6 +436,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
sample: {
|
sample: {
|
||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {
|
||||||
|
this.resultDisplay = []
|
||||||
if (newVal.sampleId) {
|
if (newVal.sampleId) {
|
||||||
this.getSampleDetail()
|
this.getSampleDetail()
|
||||||
} else {
|
} else {
|
||||||
|
@ -443,8 +448,8 @@ export default {
|
||||||
},
|
},
|
||||||
analyseCurrentSpectrum: {
|
analyseCurrentSpectrum: {
|
||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {
|
||||||
this.currResultDisplay = newVal.XeData
|
// this.currResultDisplay = newVal.XeData
|
||||||
this.resultDisplay = newVal.XeData
|
this.resultDisplay = newVal.XeData || []
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
@brushEnd="handleBrushEnd"
|
@brushEnd="handleBrushEnd"
|
||||||
/>
|
/>
|
||||||
<div class="bar">
|
<div class="bar">
|
||||||
<color-palette v-model="currCount" :maxValue="4" />
|
<color-palette v-model="currCount" />
|
||||||
<div>{{ currCount + 1 }}</div>
|
<div>{{ currCount }}</div>
|
||||||
<div class="bar-main"></div>
|
<div class="bar-main"></div>
|
||||||
<div>0</div>
|
<div>0</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -322,8 +322,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
active: 0,
|
active: 0,
|
||||||
|
|
||||||
maxCount: 15, // count的最大值
|
currCount: 50,
|
||||||
currCount: 15,
|
|
||||||
|
|
||||||
twoDOption,
|
twoDOption,
|
||||||
threeDSurfaceOption,
|
threeDSurfaceOption,
|
||||||
|
@ -359,7 +358,7 @@ export default {
|
||||||
this.emitRangeChange([0, 256, 0, 256])
|
this.emitRangeChange([0, 256, 0, 256])
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
|
||||||
this.rangeScatter()
|
this.buildScatterList()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击ROI
|
// 点击ROI
|
||||||
|
@ -439,26 +438,33 @@ export default {
|
||||||
|
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
|
||||||
this.rangeScatter()
|
this.buildScatterList()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearBrush(chart)
|
this.clearBrush(chart)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
// 构造scatter列表
|
||||||
* 因scatterGL 不受axis中max和min的控制,手动处理溢出部分
|
buildScatterList() {
|
||||||
*/
|
|
||||||
rangeScatter() {
|
|
||||||
const {
|
const {
|
||||||
xAxis: { min: minX, max: maxX },
|
xAxis: { min: minX, max: maxX },
|
||||||
yAxis: { min: minY, max: maxY }
|
yAxis: { min: minY, max: maxY }
|
||||||
} = this.twoDOption
|
} = this.twoDOption
|
||||||
|
|
||||||
const data = this.histogramDataList
|
this.twoDOption.series.data = this.histogramDataDList
|
||||||
.filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY)
|
.filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY)
|
||||||
.map(({ b, g, c }) => [b, g, c])
|
.map(({ b, g, c }) => this.buildScatterItem(b, g, c))
|
||||||
|
},
|
||||||
|
|
||||||
this.twoDOption.series.data = data
|
// 构造一个scatter 的点
|
||||||
|
buildScatterItem(xAxis, yAxis, count) {
|
||||||
|
const { r, g, b } = this.interpolateColor(1 - (count / this.currCount))
|
||||||
|
return {
|
||||||
|
value: [xAxis, yAxis],
|
||||||
|
itemStyle: {
|
||||||
|
color: `rgb(${r}, ${g}, ${b})`
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 通知上层范围改变
|
// 通知上层范围改变
|
||||||
|
@ -482,7 +488,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
this.rangeScatter()
|
this.buildScatterList()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重绘矩形框区域
|
// 重绘矩形框区域
|
||||||
|
@ -713,7 +719,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 颜色插值算法
|
// 颜色插值算法
|
||||||
interpolateColor(color1, color2, percentage) {
|
interpolateColor(percentage) {
|
||||||
|
const color1 = { r: 255, g: 0, b: 0 },
|
||||||
|
color2 = { r: 255, g: 255, b: 255 }
|
||||||
|
|
||||||
const r = color1.r + (color2.r - color1.r) * percentage
|
const r = color1.r + (color2.r - color1.r) * percentage
|
||||||
const g = color1.g + (color2.g - color1.g) * percentage
|
const g = color1.g + (color2.g - color1.g) * percentage
|
||||||
const b = color1.b + (color2.b - color1.b) * percentage
|
const b = color1.b + (color2.b - color1.b) * percentage
|
||||||
|
@ -723,10 +732,9 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
// 2D 图表
|
// 2D 图表
|
||||||
histogramDataList: {
|
histogramDataList: {
|
||||||
handler(newVal) {
|
handler() {
|
||||||
this.active = 0
|
this.active = 0
|
||||||
this.twoDOption.series.data = newVal.filter(item => item.c).map(item => [item.b, item.g, item.c]) // 设置2D Scatter数据
|
this.buildScatterList()
|
||||||
this.rangeScatter()
|
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
},
|
},
|
||||||
|
@ -759,18 +767,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
currCount: {
|
currCount: {
|
||||||
handler(val) {
|
handler() {
|
||||||
if (val <= this.maxCount) {
|
this.buildScatterList()
|
||||||
const { r, g, b } = this.interpolateColor(
|
|
||||||
{ r: 255, g: 0, b: 0 },
|
|
||||||
{ r: 255, g: 255, b: 255 },
|
|
||||||
val / this.maxCount
|
|
||||||
)
|
|
||||||
|
|
||||||
this.twoDOption.series.itemStyle.color = `rgb(${r}, ${g}, ${b})`
|
|
||||||
} else {
|
|
||||||
this.twoDOption.series.itemStyle.color = '#fff'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,16 +23,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
const startRange = [0, 36], // 1 所在的角度范围
|
||||||
|
endRange = [324, 360], // 50 所在的角度范围
|
||||||
|
angleRange = [startRange]
|
||||||
|
for (let i = 0; i <= 47; i++) {
|
||||||
|
angleRange.push([36 + i * 6, 36 + (i + 1) * 6])
|
||||||
|
}
|
||||||
|
angleRange.push(endRange)
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 1
|
default: 1
|
||||||
},
|
},
|
||||||
maxValue: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
},
|
|
||||||
circleWidth: {
|
circleWidth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 26
|
default: 26
|
||||||
|
@ -48,7 +51,8 @@ export default {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
},
|
},
|
||||||
isMouseDown: false
|
isMouseDown: false,
|
||||||
|
angleRange
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -79,16 +83,23 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
setPositionByMouseEvent(offsetX, offsetY) {
|
setPositionByMouseEvent(offsetX, offsetY) {
|
||||||
const { degree, radian } = this.getDegree([offsetX, offsetY])
|
const { angle } = this.getDegree([offsetX, offsetY])
|
||||||
for (let index = 0; index < this.range; index++) {
|
for (let i = 0; i < this.angleRange.length; i++) {
|
||||||
if (degree >= this.perDegree * index && degree < this.perDegree * (index + 1)) {
|
const [start, end] = this.angleRange[i]
|
||||||
this.$emit('input', index)
|
if (angle >= start && angle <= end) {
|
||||||
|
const center = (start + end) / 2
|
||||||
|
const radian = (center * Math.PI) / 180
|
||||||
|
this.setDotPosition(radian)
|
||||||
|
this.$emit('input', i + 1)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setDotPosition(radian)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置圆点位置
|
||||||
|
* @param {*} radian
|
||||||
|
*/
|
||||||
setDotPosition(radian) {
|
setDotPosition(radian) {
|
||||||
const circleRadius = this.circleWidth / 2 // 半径
|
const circleRadius = this.circleWidth / 2 // 半径
|
||||||
const dotRadius = circleRadius - this.dotWidth // 绘制圆点时的半径
|
const dotRadius = circleRadius - this.dotWidth // 绘制圆点时的半径
|
||||||
|
@ -102,6 +113,7 @@ export default {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据圆心和某个点,计算从圆心到该点的角度
|
* 根据圆心和某个点,计算从圆心到该点的角度
|
||||||
|
* @returns { { radian: number; angle: number; } } radian: 弧度 angle: 角度
|
||||||
*/
|
*/
|
||||||
getDegree(point) {
|
getDegree(point) {
|
||||||
// 计算两个点在 x 轴上的差值和在 y 轴上的差值
|
// 计算两个点在 x 轴上的差值和在 y 轴上的差值
|
||||||
|
@ -112,13 +124,13 @@ export default {
|
||||||
const deltaY = pointY - circleRadius
|
const deltaY = pointY - circleRadius
|
||||||
// 使用反正切函数计算角度(弧度)
|
// 使用反正切函数计算角度(弧度)
|
||||||
const radian = Math.atan2(deltaX, deltaY)
|
const radian = Math.atan2(deltaX, deltaY)
|
||||||
let degree = radian * (180 / Math.PI)
|
let angle = radian * (180 / Math.PI)
|
||||||
if (degree < 0) {
|
if (angle < 0) {
|
||||||
degree = 360 + degree
|
angle = 360 + angle
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
radian,
|
radian,
|
||||||
degree
|
angle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -126,22 +138,13 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
value: {
|
value: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
const degree = newVal * this.perDegree
|
const [start, end] = this.angleRange[newVal - 1]
|
||||||
const radian = (degree * Math.PI) / 180 // 角度转弧度
|
const center = (start + end) / 2
|
||||||
|
const radian = (center * Math.PI) / 180 // 角度转弧度
|
||||||
this.setDotPosition(radian)
|
this.setDotPosition(radian)
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
range() {
|
|
||||||
return this.maxValue > 50 ? this.maxValue : 50
|
|
||||||
},
|
|
||||||
|
|
||||||
perDegree() {
|
|
||||||
return 360 / this.range
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -6,16 +6,29 @@
|
||||||
<a-checkbox v-if="slot.isCheckbox" :key="index" v-model="record[slot.dataIndex]">
|
<a-checkbox v-if="slot.isCheckbox" :key="index" v-model="record[slot.dataIndex]">
|
||||||
Fixed
|
Fixed
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
<a-input v-else :key="index" v-model="record[slot.dataIndex]" :readOnly="slot.isStatic"></a-input>
|
<a-input
|
||||||
|
v-else
|
||||||
|
:key="index"
|
||||||
|
v-model="record[slot.dataIndex]"
|
||||||
|
:readOnly="slot.isStatic"
|
||||||
|
@change="handleInput(record, slot.dataIndex)"
|
||||||
|
></a-input>
|
||||||
</template>
|
</template>
|
||||||
</custom-table>
|
</custom-table>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<div slot="custom-footer">
|
<div slot="custom-footer">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button type="primary" :disabled="isCanceling || isLoading" :loading="isAcceptting" @click="handlePeaks">
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="isCanceling || isLoading"
|
||||||
|
:loading="isAcceptting"
|
||||||
|
@click="handlePeaks(true)"
|
||||||
|
>
|
||||||
Peaks
|
Peaks
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button :disabled="isAcceptting || isLoading" :loading="isCanceling" @click="handleCancel">Cancel</a-button>
|
<a-button :disabled="isAcceptting || isLoading" :loading="isCanceling" @click="handlePeaks(false)"
|
||||||
|
>Cancel</a-button
|
||||||
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
</custom-modal>
|
</custom-modal>
|
||||||
|
@ -25,6 +38,7 @@
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
@ -116,8 +130,14 @@ const columns = [
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin, SampleDataMixin],
|
mixins: [ModalMixin, SampleDataMixin],
|
||||||
props: {
|
props: {
|
||||||
curChan: {
|
channel_1: {
|
||||||
type: Number
|
type: Number
|
||||||
|
},
|
||||||
|
channel_2: {
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
|
isInsertPeak: {
|
||||||
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -129,18 +149,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 接收
|
async handlePeaks(accept) {
|
||||||
async handlePeaks() {
|
|
||||||
try {
|
try {
|
||||||
this.isAcceptting = true
|
this.isAcceptting = true
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const { inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await postAction('/gamma/acceptResults', {
|
const { success, result, message } = await postAction('/gamma/acceptResults', {
|
||||||
fileName,
|
fileName,
|
||||||
accept: true
|
accept,
|
||||||
|
oldPeaks: this.oldPeaks,
|
||||||
|
newPeak: this.newPeaks,
|
||||||
|
flag: this.isInsertPeak ? 'insert' : 'fit'
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('result', result)
|
this.$emit(accept ? 'result' : 'cancel', result)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -151,46 +173,51 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 取消
|
// 值变化
|
||||||
async handleCancel() {
|
handleInput(record, index) {
|
||||||
try {
|
const find = this.newPeaks.find(item => item.index == record.lab)
|
||||||
this.isCanceling = true
|
if (find) {
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const table2NewPeakMap = {
|
||||||
const { success, result, message } = await postAction('/gamma/acceptResults', {
|
energy: 'energy',
|
||||||
fileName,
|
netArea: 'area',
|
||||||
accept: false,
|
fwhm: 'fwhm'
|
||||||
oldPeak: this.oldPeaks
|
|
||||||
})
|
|
||||||
if (success) {
|
|
||||||
this.visible = false
|
|
||||||
this.$emit('cancel', result)
|
|
||||||
} else {
|
|
||||||
this.$message.error(message)
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
find[table2NewPeakMap[index]] = record[index]
|
||||||
} finally {
|
|
||||||
this.isCanceling = false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async getData() {
|
async getData() {
|
||||||
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
try {
|
try {
|
||||||
|
let url = '/gamma/fitPeak'
|
||||||
|
let params = {
|
||||||
|
left: this.channel_1,
|
||||||
|
right: this.channel_2,
|
||||||
|
fileName
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果是Insert Peak
|
||||||
|
if (this.isInsertPeak) {
|
||||||
|
url = '/gamma/insertPeak'
|
||||||
|
params = {
|
||||||
|
sampleId,
|
||||||
|
fileName,
|
||||||
|
curChan: Math.ceil(this.channel_1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName } = this.sampleData
|
const { success, result, message } = await getAction(url, params)
|
||||||
const { success, result, message } = await getAction('/gamma/insertPeak', {
|
|
||||||
sampleId,
|
|
||||||
fileName: inputFileName,
|
|
||||||
curChan: Math.ceil(this.curChan)
|
|
||||||
})
|
|
||||||
if (success) {
|
if (success) {
|
||||||
const { oldPeaks, tablePeaksList } = result
|
const { newPeaks, oldPeaks, tablePeaksList } = result
|
||||||
tablePeaksList.forEach(item => {
|
tablePeaksList.forEach(item => {
|
||||||
item.energy = Number(item.energy).toPrecision(6)
|
item.energy = Number(item.energy).toPrecision(6)
|
||||||
item.netArea = Number(item.netArea).toPrecision(6)
|
item.netArea = Number(item.netArea).toPrecision(6)
|
||||||
item.fwhm = Number(item.fwhm).toPrecision(6)
|
item.fwhm = Number(item.fwhm).toPrecision(6)
|
||||||
})
|
})
|
||||||
this.list = tablePeaksList
|
this.list = tablePeaksList
|
||||||
|
this.newPeaks = newPeaks
|
||||||
this.oldPeaks = oldPeaks
|
this.oldPeaks = oldPeaks
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
|
|
@ -104,10 +104,10 @@
|
||||||
<a-button type="primary" :disabled="isOperationStackEmpty" @click="handleUndo">Undo</a-button>
|
<a-button type="primary" :disabled="isOperationStackEmpty" @click="handleUndo">Undo</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="peak-box-item">
|
<div class="peak-box-item">
|
||||||
<a-button type="primary" @click="handleReplot">Replot</a-button>
|
<a-button type="primary" :loading="isReploting" @click="handleReplot">Replot</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="peak-box-item">
|
<div class="peak-box-item">
|
||||||
<a-button type="primary" @click="handleAccept">Accept</a-button>
|
<a-button type="primary" :loading="isAccepting" @click="handleAccept">Accept</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="peak-box-item">
|
<div class="peak-box-item">
|
||||||
<a-button type="primary" @click="handleSwitchOperation">Cancel</a-button>
|
<a-button type="primary" @click="handleSwitchOperation">Cancel</a-button>
|
||||||
|
@ -181,7 +181,9 @@
|
||||||
<!-- Fit Peaks and Baseline弹窗 开始 -->
|
<!-- Fit Peaks and Baseline弹窗 开始 -->
|
||||||
<fit-peaks-and-base-line-modal
|
<fit-peaks-and-base-line-modal
|
||||||
v-model="fitPeaksAndBaselineModalVisible"
|
v-model="fitPeaksAndBaselineModalVisible"
|
||||||
:curChan="currChannel"
|
:channel_1="channel_1"
|
||||||
|
:channel_2="channel_2"
|
||||||
|
:isInsertPeak="isInsertPeak"
|
||||||
@result="handleInsertSuccess"
|
@result="handleInsertSuccess"
|
||||||
@cancel="handleCancelSuccess"
|
@cancel="handleCancelSuccess"
|
||||||
/>
|
/>
|
||||||
|
@ -461,13 +463,21 @@ export default {
|
||||||
model: cloneDeep(nuclideIdentifyModal),
|
model: cloneDeep(nuclideIdentifyModal),
|
||||||
|
|
||||||
currChannel: undefined, // 当currChannel前选中的channel
|
currChannel: undefined, // 当currChannel前选中的channel
|
||||||
|
|
||||||
|
channel_1: undefined, // 用于Fit Peaks And Baseline Modal的道值
|
||||||
|
channel_2: undefined,
|
||||||
|
isInsertPeak: false, // 是否是插入Peak
|
||||||
|
|
||||||
selectedTableItem: undefined, // 当前选中的表格项
|
selectedTableItem: undefined, // 当前选中的表格项
|
||||||
|
|
||||||
isModifying: false, // 正在修改控制点
|
isModifying: false, // 正在修改控制点
|
||||||
isFitting: false, // 正在进行Fit操作
|
isFitting: false, // 正在进行Fit操作
|
||||||
firstFittingChannel: null, // Fit操作时点击的第一个channel
|
firstFittingChannel: null, // Fit操作时点击的第一个channel
|
||||||
|
isAccepting: false,
|
||||||
|
isReploting: false,
|
||||||
|
|
||||||
operationStack: [] // 操作记录
|
operationStack: [], // 操作记录
|
||||||
|
replotNeeded: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -517,25 +527,10 @@ export default {
|
||||||
this.energy = energy
|
this.energy = energy
|
||||||
this.BaseCtrls = BaseCtrls
|
this.BaseCtrls = BaseCtrls
|
||||||
this.FitBaseLine = FitBaseLine
|
this.FitBaseLine = FitBaseLine
|
||||||
|
this.barChart = barChart
|
||||||
|
|
||||||
const series = []
|
this.setChartOption(channelBaseLineChart, channelCountChart, channelPeakChart, channelBaseCPChart, barChart)
|
||||||
|
|
||||||
// 推入BaseLine
|
|
||||||
series.push(this.buildBaseLine(channelBaseLineChart))
|
|
||||||
|
|
||||||
// 推入Count
|
|
||||||
series.push(this.buildCountLine(channelCountChart))
|
|
||||||
|
|
||||||
// 推入Peak
|
|
||||||
series.push(...this.buildPeaks(channelPeakChart))
|
|
||||||
|
|
||||||
// 推入基线控制点
|
|
||||||
series.push(this.buildCtrlPoint(channelBaseCPChart))
|
|
||||||
|
|
||||||
this.thumbnailOption.series = this.buildBarChart(barChart)
|
|
||||||
|
|
||||||
this.list = table
|
this.list = table
|
||||||
this.option.series = series
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -544,11 +539,32 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setChartOption(baseLine, count, peaks, baseCP, bar) {
|
||||||
|
const series = []
|
||||||
|
|
||||||
|
// 推入BaseLine
|
||||||
|
series.push(this.buildBaseLine(baseLine))
|
||||||
|
|
||||||
|
// 推入Count
|
||||||
|
series.push(this.buildCountLine(count))
|
||||||
|
|
||||||
|
// 推入Peak
|
||||||
|
series.push(...this.buildPeaks(peaks))
|
||||||
|
|
||||||
|
// 推入基线控制点
|
||||||
|
series.push(this.buildCtrlPoint(baseCP))
|
||||||
|
|
||||||
|
this.thumbnailOption.series = this.buildBarChart(bar)
|
||||||
|
|
||||||
|
this.option.series = series
|
||||||
|
},
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.currChannel = undefined
|
this.currChannel = undefined
|
||||||
this.btnGroupType = 1
|
this.btnGroupType = 1
|
||||||
this.opts.notMerge = false
|
this.opts.notMerge = false
|
||||||
this.isFitting = false
|
this.isFitting = false
|
||||||
|
this.replotNeeded = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.option.brush = { toolbox: [] }
|
this.option.brush = { toolbox: [] }
|
||||||
this.selectedKeys = []
|
this.selectedKeys = []
|
||||||
|
@ -597,13 +613,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectedRow = this.list[index]
|
if (this.list.length) {
|
||||||
|
const selectedRow = this.list[index]
|
||||||
this.selectedKeys = [selectedRow.index]
|
this.selectedKeys = [selectedRow.index]
|
||||||
|
this.getSelPosNuclide(selectedRow)
|
||||||
this.getSelPosNuclide(selectedRow)
|
this.selectedTableItem = selectedRow
|
||||||
|
}
|
||||||
this.selectedTableItem = selectedRow
|
|
||||||
|
|
||||||
// 如果点击了Fit按钮
|
// 如果点击了Fit按钮
|
||||||
if (this.isFitting) {
|
if (this.isFitting) {
|
||||||
|
@ -636,6 +651,9 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.channel_1 = left
|
||||||
|
this.channel_2 = right
|
||||||
|
this.isInsertPeak = false
|
||||||
this.fitPeaksAndBaselineModalVisible = true
|
this.fitPeaksAndBaselineModalVisible = true
|
||||||
|
|
||||||
this.isFitting = false
|
this.isFitting = false
|
||||||
|
@ -737,7 +755,10 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.channel_1 = this.currChannel
|
||||||
|
|
||||||
this.fitPeaksAndBaselineModalVisible = true
|
this.fitPeaksAndBaselineModalVisible = true
|
||||||
|
this.isInsertPeak = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击 Fit Peak XXX 弹窗中的 Peaks 按钮
|
// 点击 Fit Peak XXX 弹窗中的 Peaks 按钮
|
||||||
|
@ -765,47 +786,32 @@ export default {
|
||||||
|
|
||||||
this.channelPeakChart = channelPeakChart
|
this.channelPeakChart = channelPeakChart
|
||||||
this.channelBaseLineChart = channelBaseLineChart
|
this.channelBaseLineChart = channelBaseLineChart
|
||||||
|
this.barChart = barChart
|
||||||
|
|
||||||
const series = []
|
this.setChartOption(
|
||||||
|
channelBaseLineChart,
|
||||||
// 推入BaseLine
|
this.channelCountChart,
|
||||||
series.push(this.buildBaseLine(channelBaseLineChart))
|
channelPeakChart,
|
||||||
|
this.channelBaseCPChart,
|
||||||
// 推入旧的Count
|
barChart
|
||||||
series.push(this.buildCountLine(channelCountChart))
|
)
|
||||||
|
|
||||||
// 推入Peak
|
|
||||||
series.push(...this.buildPeaks(channelPeakChart))
|
|
||||||
|
|
||||||
// 推入旧的基线控制点
|
|
||||||
series.push(this.buildCtrlPoint(channelBaseCPChart))
|
|
||||||
|
|
||||||
this.thumbnailOption.series = this.buildBarChart(barChart)
|
|
||||||
|
|
||||||
this.list = table
|
this.list = table
|
||||||
this.option.series = series
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击 Fit Peak XXX 弹窗中的 Cancel 按钮
|
// 点击 Fit Peak XXX 弹窗中的 Cancel 按钮
|
||||||
handleCancelSuccess(result) {
|
handleCancelSuccess(result) {
|
||||||
const { channelPeakChart, table } = result
|
const { channelPeakChart, table } = result
|
||||||
this.channelPeakChart = channelPeakChart
|
this.channelPeakChart = channelPeakChart
|
||||||
const series = []
|
|
||||||
|
|
||||||
// 推入旧的BaseLine
|
this.setChartOption(
|
||||||
series.push(this.buildBaseLine(this.channelBaseLineChart))
|
this.channelBaseLineChart,
|
||||||
|
this.channelCountChart,
|
||||||
// 推入旧的Count
|
channelPeakChart,
|
||||||
series.push(this.buildCountLine(this.channelCountChart))
|
this.channelBaseCPChart,
|
||||||
|
this.barChart
|
||||||
// 推入Peak
|
)
|
||||||
series.push(...this.buildPeaks(channelPeakChart))
|
|
||||||
|
|
||||||
// 推入旧的基线控制点
|
|
||||||
series.push(this.buildCtrlPoint(this.channelBaseCPChart))
|
|
||||||
|
|
||||||
this.list = table
|
this.list = table
|
||||||
this.option.series = series
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -1022,6 +1028,7 @@ export default {
|
||||||
if (this.btnGroupType == 1) {
|
if (this.btnGroupType == 1) {
|
||||||
this.btnGroupType = 2
|
this.btnGroupType = 2
|
||||||
this.baseCtrls_Copy = cloneDeep(this.BaseCtrls)
|
this.baseCtrls_Copy = cloneDeep(this.BaseCtrls)
|
||||||
|
this.replotNeeded = false
|
||||||
|
|
||||||
// 供编辑的白色基线
|
// 供编辑的白色基线
|
||||||
const baseLineEditSeries = buildLineSeries(
|
const baseLineEditSeries = buildLineSeries(
|
||||||
|
@ -1042,7 +1049,10 @@ export default {
|
||||||
else {
|
else {
|
||||||
this.btnGroupType = 1
|
this.btnGroupType = 1
|
||||||
this.opts.notMerge = true
|
this.opts.notMerge = true
|
||||||
this.option.series.splice(this.option.series.length - 1, 1) // 去掉白色的基线副本
|
const baseLineEditSeries = findSeriesByName(this.option.series, 'BaseLine_Edit')
|
||||||
|
const index = this.option.series.findIndex(item => item == baseLineEditSeries)
|
||||||
|
this.option.series.splice(index, 1)
|
||||||
|
|
||||||
this.clearRect()
|
this.clearRect()
|
||||||
|
|
||||||
const baseLineSeries = findSeriesByName(this.option.series, 'BaseLine')
|
const baseLineSeries = findSeriesByName(this.option.series, 'BaseLine')
|
||||||
|
@ -1051,6 +1061,8 @@ export default {
|
||||||
const baseLineCP = findSeriesByName(this.option.series, 'BaseLine_Ctrl_Point')
|
const baseLineCP = findSeriesByName(this.option.series, 'BaseLine_Ctrl_Point')
|
||||||
baseLineCP.data = this.buildCPPointData(this.channelBaseCPChart)
|
baseLineCP.data = this.buildCPPointData(this.channelBaseCPChart)
|
||||||
|
|
||||||
|
this.redrawPeaks(this.channelPeakChart)
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.resetChartOpts()
|
this.resetChartOpts()
|
||||||
})
|
})
|
||||||
|
@ -1090,6 +1102,7 @@ export default {
|
||||||
|
|
||||||
// 重新生成基线
|
// 重新生成基线
|
||||||
redrawBaseLine() {
|
redrawBaseLine() {
|
||||||
|
this.replotNeeded = true
|
||||||
try {
|
try {
|
||||||
console.time('updateBaseLine')
|
console.time('updateBaseLine')
|
||||||
const res = updateBaseLine(JSON.stringify(this.baseCtrls_Copy))
|
const res = updateBaseLine(JSON.stringify(this.baseCtrls_Copy))
|
||||||
|
@ -1105,6 +1118,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 重绘Peaks
|
||||||
|
redrawPeaks(peakList) {
|
||||||
|
this.option.series = this.option.series.filter(item => {
|
||||||
|
return !item.name.includes('Peak_')
|
||||||
|
})
|
||||||
|
this.option.series.push(...this.buildPeaks(peakList))
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置小方块可拖拽
|
* 设置小方块可拖拽
|
||||||
*/
|
*/
|
||||||
|
@ -1238,26 +1259,57 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 将原先的基线和控制点移动到新位置
|
// 将原先的基线和控制点移动到新位置
|
||||||
handleReplot() {
|
async handleReplot() {
|
||||||
const { xctrl, yctrl, yslope, baseline } = this.baseCtrls_Copy
|
if (!this.replotNeeded) {
|
||||||
const baseLineSeries = findSeriesByName(this.option.series, 'BaseLine')
|
return
|
||||||
baseLineSeries.data = baseline.map((val, index) => [index + 1, val])
|
}
|
||||||
|
try {
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
this.isReploting = true
|
||||||
|
const { success, result, message } = await postAction('/gamma/replotBaseLine', {
|
||||||
|
...this.baseCtrls_Copy,
|
||||||
|
fileName,
|
||||||
|
replotNeeded: this.replotNeeded
|
||||||
|
})
|
||||||
|
if (success) {
|
||||||
|
const { chartData, peakSet, shapeData } = result
|
||||||
|
|
||||||
const baseLineCP = findSeriesByName(this.option.series, 'BaseLine_Ctrl_Point')
|
const { xctrl, yctrl, yslope, baseline } = this.baseCtrls_Copy
|
||||||
// 第一个控制点(因为第一个和最后一个不会被删除)
|
const baseLineSeries = findSeriesByName(this.option.series, 'BaseLine')
|
||||||
const firstCP = this.channelBaseCPChart[0]
|
baseLineSeries.data = baseline.map((val, index) => [index + 1, val])
|
||||||
const { color, size } = firstCP
|
|
||||||
const baseCPPoints = xctrl.map((xAxis, index) => {
|
const baseLineCP = findSeriesByName(this.option.series, 'BaseLine_Ctrl_Point')
|
||||||
return {
|
// 第一个控制点(因为第一个和最后一个不会被删除)
|
||||||
size,
|
const firstCP = this.channelBaseCPChart[0]
|
||||||
color,
|
const { color, size } = firstCP
|
||||||
point: {
|
const baseCPPoints = xctrl.map((xAxis, index) => {
|
||||||
x: xAxis,
|
return {
|
||||||
y: yctrl[index]
|
size,
|
||||||
}
|
color,
|
||||||
|
point: {
|
||||||
|
x: xAxis,
|
||||||
|
y: yctrl[index]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
baseLineCP.data = this.buildCPPointData(baseCPPoints)
|
||||||
|
|
||||||
|
this.opts.notMerge = true
|
||||||
|
this.redrawPeaks(peakSet)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetChartOpts()
|
||||||
|
})
|
||||||
|
|
||||||
|
this.BaseCtrls = cloneDeep(this.baseCtrls_Copy)
|
||||||
|
this.replotNeeded = false
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
})
|
} catch (error) {
|
||||||
baseLineCP.data = this.buildCPPointData(baseCPPoints)
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isReploting = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1278,31 +1330,75 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 确定对Baseline Control Points 的操作
|
// 确定对Baseline Control Points 的操作
|
||||||
handleAccept() {
|
async handleAccept() {
|
||||||
this.BaseCtrls = cloneDeep(this.baseCtrls_Copy)
|
// this.BaseCtrls = cloneDeep(this.baseCtrls_Copy)
|
||||||
const { baseline, xctrl, yctrl } = this.BaseCtrls
|
// const { baseline, xctrl, yctrl } = this.BaseCtrls
|
||||||
this.channelBaseLineChart.pointlist = baseline.map((val, index) => {
|
// this.channelBaseLineChart.pointlist = baseline.map((val, index) => {
|
||||||
return {
|
// return {
|
||||||
x: index + 1,
|
// x: index + 1,
|
||||||
y: val
|
// y: val
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
// this.channelBaseCPChart = xctrl.map((val, index) => {
|
||||||
|
// return {
|
||||||
|
// color: this.channelBaseCPChart[0].color,
|
||||||
|
// name: index.toString(),
|
||||||
|
// point: {
|
||||||
|
// x: val,
|
||||||
|
// y: yctrl[index]
|
||||||
|
// },
|
||||||
|
// size: 4
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.isAccepting = true
|
||||||
|
const { success, result, message } = await postAction('/gamma/acceptBaseLine', {
|
||||||
|
...this.baseCtrls_Copy,
|
||||||
|
fileName
|
||||||
|
})
|
||||||
|
if (success) {
|
||||||
|
this.BaseCtrls = cloneDeep(this.baseCtrls_Copy)
|
||||||
|
|
||||||
|
const {
|
||||||
|
allData,
|
||||||
|
barChart,
|
||||||
|
channelBaseLineChart,
|
||||||
|
peakSet,
|
||||||
|
shadowChannelChart,
|
||||||
|
shadowEnergyChart,
|
||||||
|
shapeChannelData,
|
||||||
|
shapeData,
|
||||||
|
shapeEnergyData
|
||||||
|
} = result
|
||||||
|
|
||||||
|
this.channelBaseLineChart = channelBaseLineChart
|
||||||
|
this.channelPeakChart = peakSet
|
||||||
|
this.shadowChannelChart = shadowChannelChart
|
||||||
|
this.channelBaseCPChart = shapeChannelData
|
||||||
|
this.barChart = barChart
|
||||||
|
|
||||||
|
this.btnGroupType = 1
|
||||||
|
this.opts.notMerge = true
|
||||||
|
this.clearRect()
|
||||||
|
|
||||||
|
this.setChartOption(channelBaseLineChart, this.channelCountChart, peakSet, this.channelBaseCPChart, barChart)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetChartOpts()
|
||||||
|
})
|
||||||
|
|
||||||
|
this.$bus.$emit('accept', result)
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
})
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
this.channelBaseCPChart = xctrl.map((val, index) => {
|
} finally {
|
||||||
return {
|
this.isAccepting = false
|
||||||
color: this.channelBaseCPChart[0].color,
|
}
|
||||||
name: index.toString(),
|
|
||||||
point: {
|
|
||||||
x: val,
|
|
||||||
y: yctrl[index]
|
|
||||||
},
|
|
||||||
size: 4
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.handleSwitchOperation()
|
|
||||||
|
|
||||||
this.$bus.$emit('accept')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 右下角添加当前选中的nuclide
|
// 右下角添加当前选中的nuclide
|
||||||
|
|
|
@ -52,16 +52,43 @@ export default {
|
||||||
url = '/spectrumAnalysis/viewRRR'
|
url = '/spectrumAnalysis/viewRRR'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
console.log(this.extraData)
|
||||||
try {
|
try {
|
||||||
this.content = ''
|
this.content = ''
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
console.log(this.sampleData)
|
||||||
const method = this.type == 4? postAction : getAction
|
const {
|
||||||
const res = await method(url, {
|
|
||||||
sampleId,
|
sampleId,
|
||||||
fileName,
|
inputFileName: fileName,
|
||||||
...this.extraData,
|
dbName,
|
||||||
})
|
detFileName,
|
||||||
|
gasFileName,
|
||||||
|
qcFileName,
|
||||||
|
sampleFileName,
|
||||||
|
} = this.sampleData
|
||||||
|
// const method = this.type == 4 ? postAction : getAction
|
||||||
|
let res = null
|
||||||
|
if (this.type == 4) {
|
||||||
|
let params = {
|
||||||
|
dbName,
|
||||||
|
sampleId,
|
||||||
|
sampleData: this.extraData.sampleData,
|
||||||
|
gasBgData: this.extraData.GasBgData,
|
||||||
|
detBgData: this.extraData.DetBgData,
|
||||||
|
qcData: this.extraData.QCData,
|
||||||
|
sampleFileName,
|
||||||
|
gasFileName,
|
||||||
|
detFileName,
|
||||||
|
qcFileName,
|
||||||
|
}
|
||||||
|
res = await postAction(url, params)
|
||||||
|
} else {
|
||||||
|
res = await getAction(url, {
|
||||||
|
sampleId,
|
||||||
|
fileName,
|
||||||
|
...this.extraData,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof res == 'string') {
|
if (typeof res == 'string') {
|
||||||
this.content = res
|
this.content = res
|
||||||
|
|
|
@ -596,6 +596,7 @@ export default {
|
||||||
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
||||||
isFirstFitting: true,
|
isFirstFitting: true,
|
||||||
isInverse: false, // 是否需要反算
|
isInverse: false, // 是否需要反算
|
||||||
|
betaIsFitting: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -869,6 +870,8 @@ export default {
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.isFirstFitting = false
|
this.isFirstFitting = false
|
||||||
|
this.betaIsFitting = true
|
||||||
|
this.$emit('isFitting', this.betaIsFitting)
|
||||||
|
|
||||||
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
||||||
this.newE2C = EToC
|
this.newE2C = EToC
|
||||||
|
|
|
@ -467,6 +467,7 @@ export default {
|
||||||
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
||||||
isFirstFitting: true,
|
isFirstFitting: true,
|
||||||
isInverse: false, // 是否需要反算
|
isInverse: false, // 是否需要反算
|
||||||
|
gammaIsFitting: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -646,6 +647,8 @@ export default {
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.isFirstFitting = false
|
this.isFirstFitting = false
|
||||||
|
this.gammaIsFitting = false
|
||||||
|
this.$emit('isFitting', this.gammaIsFitting)
|
||||||
|
|
||||||
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
||||||
this.newE2C = EToC
|
this.newE2C = EToC
|
||||||
|
|
|
@ -9,19 +9,19 @@
|
||||||
>
|
>
|
||||||
<a-tabs :animated="false" v-model="currTab">
|
<a-tabs :animated="false" v-model="currTab">
|
||||||
<a-tab-pane tab="Gamma Detector Calibration" key="gamma">
|
<a-tab-pane tab="Gamma Detector Calibration" key="gamma">
|
||||||
<gamma-detector-calibration />
|
<gamma-detector-calibration @isFitting="getFittingFlag_gamma" />
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="Beta Detector Calibration" key="beta">
|
<a-tab-pane tab="Beta Detector Calibration" key="beta">
|
||||||
<beta-detector-calibration />
|
<beta-detector-calibration @isFitting="getFittingFlag_beta" />
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<title-over-border title="New Calibration is Applied to">
|
<title-over-border title="New Calibration is Applied to">
|
||||||
<a-radio-group v-model="newCalibrationIsAppliedTo">
|
<a-radio-group v-model="newCalibrationIsAppliedTo">
|
||||||
<p>
|
<p>
|
||||||
<a-radio value="1">All Spectra</a-radio>
|
<a-radio value="AllSpectrum">All Spectra</a-radio>
|
||||||
</p>
|
</p>
|
||||||
<a-radio value="2">Current Spectrum</a-radio>
|
<a-radio value="CurrentSpectrum">Current Spectrum</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Recalculate ROI Counts For">
|
<title-over-border title="Recalculate ROI Counts For">
|
||||||
|
@ -44,22 +44,26 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
|
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||||
|
import { postAction } from '@/api/manage'
|
||||||
import BetaDetectorCalibration from './components/BetaDetectorCalibration.vue'
|
import BetaDetectorCalibration from './components/BetaDetectorCalibration.vue'
|
||||||
import GammaDetectorCalibration from './components/GammaDetectorCalibration.vue'
|
import GammaDetectorCalibration from './components/GammaDetectorCalibration.vue'
|
||||||
import TitleOverBorder from '@/views/spectrumAnalysis/components/TitleOverBorder.vue'
|
import TitleOverBorder from '@/views/spectrumAnalysis/components/TitleOverBorder.vue'
|
||||||
export default {
|
export default {
|
||||||
components: { BetaDetectorCalibration, GammaDetectorCalibration, TitleOverBorder },
|
components: { BetaDetectorCalibration, GammaDetectorCalibration, TitleOverBorder },
|
||||||
mixins: [ModalMixin],
|
mixins: [ModalMixin, SampleDataMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currTab: 'gamma',
|
currTab: 'gamma',
|
||||||
newCalibrationIsAppliedTo: '2',
|
newCalibrationIsAppliedTo: 'CurrentSpectrum',
|
||||||
recalculateROICountsFor: [],
|
recalculateROICountsFor: [],
|
||||||
checkFlag: {
|
checkFlag: {
|
||||||
checkSample: false,
|
checkSample: false,
|
||||||
checkGas: false,
|
checkGas: false,
|
||||||
checkDet: false,
|
checkDet: false,
|
||||||
},
|
},
|
||||||
|
betaEnergyValid: false,
|
||||||
|
gammaEnergyValid: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -74,8 +78,44 @@ export default {
|
||||||
this.checkFlag.checkDet = checkedVal.includes('detBg') ? true : false
|
this.checkFlag.checkDet = checkedVal.includes('detBg') ? true : false
|
||||||
this.$emit('sendInfo', this.checkFlag)
|
this.$emit('sendInfo', this.checkFlag)
|
||||||
},
|
},
|
||||||
|
getFittingFlag_beta(val) {
|
||||||
|
this.betaEnergyValid = val
|
||||||
|
},
|
||||||
|
getFittingFlag_gamma(val) {
|
||||||
|
this.gammaEnergyValid = val
|
||||||
|
},
|
||||||
handleReAnalyse() {
|
handleReAnalyse() {
|
||||||
console.log(this.currTab)
|
let params = {
|
||||||
|
applyType: this.newCalibrationIsAppliedTo,
|
||||||
|
sampleData: this.recalculateROICountsFor.includes('sample') ? true : false,
|
||||||
|
gasBgData: this.recalculateROICountsFor.includes('gasBg') ? true : false,
|
||||||
|
detBgData: this.recalculateROICountsFor.includes('detBg') ? true : false,
|
||||||
|
qcData: this.recalculateROICountsFor.includes('qc') ? true : false,
|
||||||
|
betaEnergyValid: this.betaEnergyValid,
|
||||||
|
gammaEnergyValid: this.gammaEnergyValid,
|
||||||
|
dbNames: [this.newSampleData.dbName],
|
||||||
|
sampleIds: [this.newSampleData.sampleId ? this.newSampleData.sampleId : ''],
|
||||||
|
sampleFileNames: [this.newSampleData.inputFileName],
|
||||||
|
gasFileNames: [this.newSampleData.gasFileName],
|
||||||
|
detFileNames: [this.newSampleData.detFileName],
|
||||||
|
qcFileNames: [this.newSampleData.qcFileName],
|
||||||
|
currentFileName: this.newSampleData.inputFileName,
|
||||||
|
}
|
||||||
|
postAction('/spectrumAnalysis/ReAnalyse', params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
res.result.XeData.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)
|
||||||
|
})
|
||||||
|
this.$emit('sendXeData', res.result.XeData)
|
||||||
|
this.$message.success('Analyse Success!')
|
||||||
|
this.visible = false
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleExit() {
|
handleExit() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
|
|
@ -30,9 +30,21 @@
|
||||||
<!-- 两个图表开始 -->
|
<!-- 两个图表开始 -->
|
||||||
<div class="gamma-beta-spectrum-sample border">
|
<div class="gamma-beta-spectrum-sample border">
|
||||||
<div class="gamma-spectrum-sample">
|
<div class="gamma-spectrum-sample">
|
||||||
<div class="title">Gamma Spectrum:Sample</div>
|
<div class="title">
|
||||||
|
<div>Gamma Spectrum:Sample</div>
|
||||||
|
<div class="total-counts">
|
||||||
|
<span>Total Counts:</span>
|
||||||
|
<span class="count-1">{{ totalCount[0] }}</span>
|
||||||
|
<span class="count-2">{{ totalCount[1] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="chart border">
|
<div class="chart border">
|
||||||
<custom-chart ref="gammaSpectrumChart" :option="gammaSpectrumChartOption" @zr:click="handleChartClick" />
|
<custom-chart
|
||||||
|
ref="gammaSpectrumChart"
|
||||||
|
:option="gammaSpectrumChartOption"
|
||||||
|
@zr:click="handleChartClick($event, true)"
|
||||||
|
@zr:contextmenu="handleChartClick($event, false)"
|
||||||
|
/>
|
||||||
<!-- 自定义tooltip,用于点击图表后的tooltip显示 -->
|
<!-- 自定义tooltip,用于点击图表后的tooltip显示 -->
|
||||||
<div
|
<div
|
||||||
v-if="customToolTip.visible"
|
v-if="customToolTip.visible"
|
||||||
|
@ -45,6 +57,17 @@
|
||||||
<div class="channel">Channel: {{ customToolTip.channel }}</div>
|
<div class="channel">Channel: {{ customToolTip.channel }}</div>
|
||||||
<div class="channel">Energy: {{ customToolTip.energy }}</div>
|
<div class="channel">Energy: {{ customToolTip.energy }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="customToolTip2.visible"
|
||||||
|
class="custom-tool-tip"
|
||||||
|
:style="{
|
||||||
|
top: customToolTip2.top + 'px',
|
||||||
|
left: customToolTip2.left + 'px'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<div class="channel">Channel: {{ customToolTip2.channel }}</div>
|
||||||
|
<div class="channel">Energy: {{ customToolTip2.energy }}</div>
|
||||||
|
</div>
|
||||||
<!-- tooltip结束 -->
|
<!-- tooltip结束 -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,33 +89,35 @@
|
||||||
<div class="title">Gamma Window Setting</div>
|
<div class="title">Gamma Window Setting</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="label">Gamma Window Begin:</div>
|
<div class="label">Gamma Window Begin:</div>
|
||||||
<a-input-number size="small"></a-input-number> Channel
|
<a-input-number size="small" v-model="model.windowBegin" @change="calculateTotalCount"></a-input-number>
|
||||||
|
Channel
|
||||||
<div class="label">Gamma Window End:</div>
|
<div class="label">Gamma Window End:</div>
|
||||||
<a-input-number size="small"></a-input-number> Channel
|
<a-input-number size="small" v-model="model.windowEnd" @change="calculateTotalCount"></a-input-number>
|
||||||
|
Channel
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<div class="title">Parameter Setting</div>
|
<div class="title">Parameter Setting</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="label">Min of Energy:</div>
|
<div class="label">Min of Energy:</div>
|
||||||
<a-input-number size="small"></a-input-number> keV
|
<a-input-number size="small" v-model="model.minEnergy"></a-input-number> keV
|
||||||
<div class="label">Half Life:</div>
|
<div class="label">Half Life:</div>
|
||||||
<a-input-number size="small"></a-input-number> Day
|
<a-input-number size="small" v-model="model.halfLife"></a-input-number> Day
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<div class="title">Function of Fitting</div>
|
<div class="title">Function of Fitting</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a-radio-group v-model="model.fittingType">
|
<a-radio-group v-model="model.fitType" @change="handleFuncChange">
|
||||||
<a-radio value="1">Linear</a-radio>
|
<a-radio value="liner">Linear</a-radio>
|
||||||
<a-radio value="2">2-polynomial</a-radio>
|
<a-radio value="poly2">2-polynomial</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<a-button type="primary">Analyse</a-button>
|
<a-button type="primary" :loading="isAnalysing" @click="handleAnalyse">Analyse</a-button>
|
||||||
<a-button @click="visible = false">Exit</a-button>
|
<a-button @click="visible = false">Exit</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -110,8 +135,10 @@
|
||||||
:class="tableList.length ? 'has-data' : ''"
|
:class="tableList.length ? 'has-data' : ''"
|
||||||
:scroll="{ y: 101 }"
|
:scroll="{ y: 101 }"
|
||||||
>
|
>
|
||||||
<template slot="delete">
|
<template slot="delete" slot-scope="text, record, index">
|
||||||
<a-button type="link" size="small">Delete</a-button>
|
<a-button type="link" size="small" @click="handleDel(index)">
|
||||||
|
<a-icon type="delete" style="color: red;"></a-icon>
|
||||||
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<!-- 表格结束 -->
|
<!-- 表格结束 -->
|
||||||
|
@ -132,25 +159,20 @@
|
||||||
<!-- 右下角信息开始 -->
|
<!-- 右下角信息开始 -->
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<title-over-border title="Function of Fitting">
|
<title-over-border title="Function of Fitting">
|
||||||
<template v-if="model.fittingType == '1'">
|
{{ currFunction }}
|
||||||
y = ax + b
|
|
||||||
</template>
|
|
||||||
<template v-if="model.fittingType == '2'">
|
|
||||||
y = axx + bx + c
|
|
||||||
</template>
|
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Xe Activity (Bq)">
|
<title-over-border title="Xe Activity (Bq)">
|
||||||
<div class="xe-activity">
|
<div class="xe-activity">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<label>Reference Time :</label>
|
<label>Reference Time :</label>
|
||||||
<span>
|
<span>
|
||||||
这是内容
|
{{ xeActivity.referenceTime }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<label>Xe Activity (Bq) :</label>
|
<label>Xe Activity (Bq) :</label>
|
||||||
<span>
|
<span>
|
||||||
这是内容
|
{{ xeActivity.activity }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -170,10 +192,11 @@ import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import CustomChart from '@/components/CustomChart/index.vue'
|
import CustomChart from '@/components/CustomChart/index.vue'
|
||||||
import { exportEchartImg, getXAxisAndYAxisByPosition, splitAxis } from '@/utils/chartHelper'
|
import { exportEchartImg, getXAxisAndYAxisByPosition, splitAxis } from '@/utils/chartHelper'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import { useBaseChartSetting } from '../../../useChart'
|
import { useBaseChartSetting } from '../../../useChart'
|
||||||
import TitleOverBorder from '../../TitleOverBorder.vue'
|
import TitleOverBorder from '../../TitleOverBorder.vue'
|
||||||
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||||
|
import { isNullOrUndefined } from '@/utils/util'
|
||||||
|
|
||||||
const initialGammaChartOption = {
|
const initialGammaChartOption = {
|
||||||
grid: {
|
grid: {
|
||||||
|
@ -226,7 +249,8 @@ const initialGammaChartOption = {
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#ade6ee'
|
color: '#ade6ee'
|
||||||
}
|
},
|
||||||
|
animation: false
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
@ -248,8 +272,9 @@ const initialGammaChartOption = {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#f00'
|
color: '#f00'
|
||||||
},
|
},
|
||||||
data: []
|
data: [{ xAxis: -1 }, { xAxis: -1 }]
|
||||||
}
|
},
|
||||||
|
animation: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
@ -257,7 +282,8 @@ const initialGammaChartOption = {
|
||||||
color: '#A8DA56'
|
color: '#A8DA56'
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: []
|
data: [],
|
||||||
|
animation: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -313,7 +339,8 @@ const initialBetaChartOption = {
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#ade6ee'
|
color: '#ade6ee'
|
||||||
}
|
},
|
||||||
|
animation: false
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
@ -336,7 +363,8 @@ const initialBetaChartOption = {
|
||||||
color: '#f00'
|
color: '#f00'
|
||||||
},
|
},
|
||||||
data: []
|
data: []
|
||||||
}
|
},
|
||||||
|
animation: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
@ -344,7 +372,8 @@ const initialBetaChartOption = {
|
||||||
color: '#A8DA56'
|
color: '#A8DA56'
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: []
|
data: [],
|
||||||
|
animation: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -359,32 +388,23 @@ const initialResultChartOption = {
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: [],
|
data: [],
|
||||||
markLine: {
|
animation: false
|
||||||
symbol: 'none',
|
|
||||||
label: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
animation: false,
|
|
||||||
emphasis: {
|
|
||||||
disabled: true
|
|
||||||
},
|
|
||||||
lineStyle: {
|
|
||||||
color: '#f00'
|
|
||||||
},
|
|
||||||
data: []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'scatter',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#A8DA56'
|
color: 'red'
|
||||||
},
|
},
|
||||||
symbol: 'none',
|
symbolSize: 6,
|
||||||
data: []
|
data: [],
|
||||||
|
zlevel: 2,
|
||||||
|
animation: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initialResultChartOption.yAxis.boundaryGap = ['20%', '20%']
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: 'Index',
|
title: 'Index',
|
||||||
|
@ -395,17 +415,17 @@ const columns = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Eb',
|
title: 'Eb',
|
||||||
dataIndex: 'Eb',
|
dataIndex: 'eb',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Nx',
|
title: 'Nx',
|
||||||
dataIndex: 'Nx',
|
dataIndex: 'nx',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Ny',
|
title: 'Ny',
|
||||||
dataIndex: 'Ny',
|
dataIndex: 'ny',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -417,6 +437,20 @@ const columns = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const initialModel = {
|
||||||
|
windowBegin: undefined,
|
||||||
|
windowEnd: undefined,
|
||||||
|
minEnergy: 0.1,
|
||||||
|
halfLife: 5.243,
|
||||||
|
fitType: 'liner'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function of Fitting
|
||||||
|
const funcList = {
|
||||||
|
liner: 'y = ax + b',
|
||||||
|
poly2: 'y = axx + bx + c'
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin, SampleDataMixin],
|
mixins: [ModalMixin, SampleDataMixin],
|
||||||
components: {
|
components: {
|
||||||
|
@ -437,28 +471,42 @@ export default {
|
||||||
channel: '',
|
channel: '',
|
||||||
energy: ''
|
energy: ''
|
||||||
},
|
},
|
||||||
|
customToolTip2: {
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
visible: false,
|
||||||
|
channel: '',
|
||||||
|
energy: ''
|
||||||
|
},
|
||||||
|
|
||||||
|
totalCount: [0, 0],
|
||||||
|
currFunction: '',
|
||||||
|
xeActivity: {},
|
||||||
|
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
|
||||||
detail: {},
|
detail: {},
|
||||||
gammaChannelEnergy: [],
|
gammaChannelEnergy: [],
|
||||||
|
|
||||||
model: {
|
model: cloneDeep(initialModel),
|
||||||
fittingType: '1'
|
tableList: [],
|
||||||
},
|
isAnalysing: false
|
||||||
tableList: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
beforeModalOpen() {
|
beforeModalOpen() {
|
||||||
this.customToolTip.visible = false
|
this.customToolTip.visible = false
|
||||||
const gammaSeries = this.gammaSpectrumChartOption.series
|
this.customToolTip2.visible = false
|
||||||
gammaSeries[0].data = []
|
this.gammaSpectrumChartOption = cloneDeep(initialGammaChartOption)
|
||||||
gammaSeries[1].data = []
|
this.betaSpectrumChartOption = cloneDeep(initialBetaChartOption)
|
||||||
|
this.resultChartOption = cloneDeep(initialResultChartOption)
|
||||||
|
|
||||||
|
this.model = cloneDeep(initialModel)
|
||||||
|
this.currFunction = funcList[this.model.fitType]
|
||||||
|
this.tableList = []
|
||||||
|
|
||||||
|
this.calculateTotalCount()
|
||||||
|
|
||||||
const betaSeries = this.betaSpectrumChartOption.series
|
|
||||||
betaSeries[0].data = []
|
|
||||||
betaSeries[1].data = []
|
|
||||||
|
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -518,28 +566,171 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 图表点击
|
// 图表点击
|
||||||
handleChartClick(param) {
|
handleChartClick({ offsetX, offsetY, event }, isMouseLeft) {
|
||||||
const { offsetX, offsetY } = param
|
event.preventDefault()
|
||||||
|
|
||||||
const point = getXAxisAndYAxisByPosition(this.$refs.gammaSpectrumChart.getChartInstance(), offsetX, offsetY)
|
const point = getXAxisAndYAxisByPosition(this.$refs.gammaSpectrumChart.getChartInstance(), offsetX, offsetY)
|
||||||
if (point) {
|
if (point) {
|
||||||
|
const markLineData = this.gammaSpectrumChartOption.series[0].markLine.data
|
||||||
const xAxis = parseInt(point[0].toFixed())
|
const xAxis = parseInt(point[0].toFixed())
|
||||||
this.gammaSpectrumChartOption.series[0].markLine.data = [{ xAxis }]
|
|
||||||
|
|
||||||
this.customToolTip.top = offsetY
|
let currToolTip = this.customToolTip2
|
||||||
if (xAxis > 225) {
|
|
||||||
this.customToolTip.left = offsetX - 125
|
// 如果是左键
|
||||||
} else {
|
if (isMouseLeft) {
|
||||||
this.customToolTip.left = offsetX + 20
|
// 如果有右值且左值大于等于右值,清空
|
||||||
|
if (!isNullOrUndefined(this.model.windowEnd) && xAxis >= this.model.windowEnd) {
|
||||||
|
this.clearMarkLineAndToolTip()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
currToolTip = this.customToolTip
|
||||||
|
|
||||||
|
markLineData[0].xAxis = xAxis
|
||||||
|
this.model.windowBegin = xAxis
|
||||||
}
|
}
|
||||||
this.customToolTip.visible = true
|
// 如果是右键
|
||||||
this.customToolTip.channel = xAxis
|
else {
|
||||||
|
if (!isNullOrUndefined(this.model.windowBegin) && xAxis <= this.model.windowBegin) {
|
||||||
|
this.clearMarkLineAndToolTip()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
markLineData[1].xAxis = xAxis
|
||||||
|
this.model.windowEnd = xAxis
|
||||||
|
}
|
||||||
|
|
||||||
|
currToolTip.top = offsetY
|
||||||
|
if (xAxis > 225) {
|
||||||
|
currToolTip.left = offsetX - 125
|
||||||
|
} else {
|
||||||
|
currToolTip.left = offsetX + 20
|
||||||
|
}
|
||||||
|
currToolTip.visible = true
|
||||||
|
currToolTip.channel = xAxis
|
||||||
const energy = this.gammaChannelEnergy[xAxis] || 0
|
const energy = this.gammaChannelEnergy[xAxis] || 0
|
||||||
this.customToolTip.energy = parseInt(energy) + 'keV'
|
currToolTip.energy = parseInt(energy) + 'keV'
|
||||||
|
|
||||||
|
this.calculateTotalCount()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clearMarkLineAndToolTip() {
|
||||||
|
const markLineData = this.gammaSpectrumChartOption.series[0].markLine.data
|
||||||
|
markLineData[0].xAxis = -1
|
||||||
|
markLineData[1].xAxis = -1
|
||||||
|
|
||||||
|
this.customToolTip.visible = false
|
||||||
|
this.customToolTip2.visible = false
|
||||||
|
|
||||||
|
this.model.windowBegin = null
|
||||||
|
this.model.windowEnd = null
|
||||||
|
|
||||||
|
this.calculateTotalCount()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 计算Total Count
|
||||||
|
calculateTotalCount() {
|
||||||
|
if (!this.model.windowBegin || !this.model.windowEnd || this.model.windowBegin >= this.model.windowEnd) {
|
||||||
|
this.totalCount = [0, 0]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const gammaOriginSeriseData = this.gammaSpectrumChartOption.series[0].data
|
||||||
|
const betaProjectedSeriseData = this.betaSpectrumChartOption.series[1].data
|
||||||
|
|
||||||
|
const originSeriseTotalCount = gammaOriginSeriseData
|
||||||
|
.slice(this.model.windowBegin, this.model.windowEnd + 1)
|
||||||
|
.reduce((prev, curr) => prev + curr[1], 0)
|
||||||
|
const projectedSeriseTotalCount = betaProjectedSeriseData
|
||||||
|
.slice(this.model.windowBegin, this.model.windowEnd + 1)
|
||||||
|
.reduce((prev, curr) => prev + curr[1], 0)
|
||||||
|
this.totalCount = [originSeriseTotalCount, projectedSeriseTotalCount]
|
||||||
|
},
|
||||||
|
|
||||||
|
// Function of Fitting 改变
|
||||||
|
handleFuncChange() {
|
||||||
|
this.xeActivity = {}
|
||||||
|
this.currFunction = funcList[this.model.fitType]
|
||||||
|
},
|
||||||
|
|
||||||
handleSnapshot() {
|
handleSnapshot() {
|
||||||
exportEchartImg(this.$refs.chartRef.getChartInstance())
|
exportEchartImg(this.$refs.chartRef.getChartInstance())
|
||||||
|
},
|
||||||
|
|
||||||
|
// 分析
|
||||||
|
async handleAnalyse() {
|
||||||
|
const { windowBegin, windowEnd, minEnergy, halfLife, fitType } = this.model
|
||||||
|
if (
|
||||||
|
isNullOrUndefined(windowBegin) ||
|
||||||
|
isNullOrUndefined(windowEnd) ||
|
||||||
|
isNullOrUndefined(minEnergy) ||
|
||||||
|
isNullOrUndefined(halfLife)
|
||||||
|
) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const { sampleFileName, detFileName } = this.sampleData
|
||||||
|
|
||||||
|
const params = {
|
||||||
|
sampleId: null,
|
||||||
|
dbName: '',
|
||||||
|
sampleFileName,
|
||||||
|
detFileName,
|
||||||
|
gammaBegin: windowBegin,
|
||||||
|
gammaEnd: windowEnd,
|
||||||
|
minEnergy,
|
||||||
|
halfLife,
|
||||||
|
fitType //选择Linear 传 liner 选择2-Polynomial 传 poly2
|
||||||
|
}
|
||||||
|
this.isAnalysing = true
|
||||||
|
const { success, result, message } = await postAction('/spectrumAnalysis/analyseExtrapolation', params)
|
||||||
|
if (success) {
|
||||||
|
console.log('%c [ ]-679', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||||
|
const {
|
||||||
|
functionFit, // Function of Fitting
|
||||||
|
resultViewLineDataValue, // 折线
|
||||||
|
resultViewScatterDataValue, // 原点
|
||||||
|
tableData, // 表格数据
|
||||||
|
xeAct
|
||||||
|
} = result
|
||||||
|
|
||||||
|
this.currFunction = functionFit
|
||||||
|
|
||||||
|
const [lineSeries, scatterSeries] = this.resultChartOption.series
|
||||||
|
lineSeries.data = resultViewLineDataValue.map(({ x, y }) => [x, y])
|
||||||
|
scatterSeries.data = resultViewScatterDataValue.map(({ x, y }) => [x, y])
|
||||||
|
this.resetResultChartPerform()
|
||||||
|
|
||||||
|
this.xeActivity = {
|
||||||
|
referenceTime: this.detail.acquisitionStart,
|
||||||
|
activity: Number.isNaN(xeAct)? xeAct: Number(xeAct).toPrecision(6)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.tableList = tableData
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isAnalysing = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
resetResultChartPerform() {
|
||||||
|
this.resultChartOption.yAxis.min = undefined
|
||||||
|
this.resultChartOption.yAxis.max = undefined
|
||||||
|
this.resultChartOption.xAxis.min = undefined
|
||||||
|
this.resultChartOption.xAxis.max = undefined
|
||||||
|
this.resultChartOption.yAxis.interval = undefined
|
||||||
|
this.resultChartOption.xAxis.interval = undefined
|
||||||
|
},
|
||||||
|
|
||||||
|
// 表格删除
|
||||||
|
handleDel(index) {
|
||||||
|
this.tableList.splice(index, 1)
|
||||||
|
this.resultChartOption.series[1].data.splice(index, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -551,6 +742,21 @@ export default {
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
color: @primary-color;
|
color: @primary-color;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-counts {
|
||||||
|
.count-1 {
|
||||||
|
color: @primary-color;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.count-2 {
|
||||||
|
color: #ffc90e;
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sample-infomation {
|
.sample-infomation {
|
||||||
|
@ -570,6 +776,7 @@ export default {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -635,7 +842,7 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -725,7 +932,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.xe-activity {
|
.xe-activity {
|
||||||
width: 80%;
|
width: 90%;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
@change="handleTableChange"
|
@change="handleTableChange"
|
||||||
></custom-table>
|
></custom-table>
|
||||||
<div slot="custom-footer">
|
<div slot="custom-footer">
|
||||||
<a-button type="primary" :loading="isComparing" @click="handleOk">Compare</a-button>
|
<a-button type="primary" @click="handleOk">Ok</a-button>
|
||||||
<a-button @click="visible = false">Cancel</a-button>
|
<a-button @click="visible = false">Cancel</a-button>
|
||||||
</div>
|
</div>
|
||||||
</custom-modal>
|
</custom-modal>
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import SampleDataMixin from '../../SampleDataMixin'
|
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
@ -56,7 +55,7 @@ const formItems = [
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin, JeecgListMixin, SampleDataMixin],
|
mixins: [ModalMixin, JeecgListMixin],
|
||||||
data() {
|
data() {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
this.formItems = formItems
|
this.formItems = formItems
|
||||||
|
@ -64,8 +63,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectionRows: [],
|
selectionRows: []
|
||||||
isComparing: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -109,27 +107,9 @@ export default {
|
||||||
this.$message.warn('Please Select A File to Compare')
|
this.$message.warn('Please Select A File to Compare')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
const { inputFileName: fileName } = this.sampleData
|
|
||||||
const compareFileName = this.selectionRows[0].name
|
|
||||||
|
|
||||||
this.isComparing = true
|
this.$emit('fileSelect', this.selectionRows[0].name)
|
||||||
|
this.visible = false
|
||||||
const { success, result, message } = await getAction('/gamma/Compare', {
|
|
||||||
fileName,
|
|
||||||
compareFileName
|
|
||||||
})
|
|
||||||
if (success) {
|
|
||||||
this.visible = false
|
|
||||||
this.$emit('compareWithFile', result)
|
|
||||||
} else {
|
|
||||||
this.$message.error(message)
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
} finally {
|
|
||||||
this.isComparing = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<custom-modal v-model="visible" :width="1280" title="Efficiency Calibration" :footer="null" destroy-on-close>
|
<custom-modal v-model="visible" :width="1280" title="Efficiency Calibration" :footer="null">
|
||||||
<a-spin :spinning="isLoading">
|
<a-spin :spinning="isLoading">
|
||||||
<div class="energy-calibration">
|
<div class="energy-calibration">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
|
@ -125,19 +125,23 @@ import { showSaveFileModal } from '@/utils/file'
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy'
|
dataIndex: 'energy',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Efficiency',
|
title: 'Efficiency',
|
||||||
dataIndex: 'efficiency'
|
dataIndex: 'efficiency',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Fit(keV)',
|
title: 'Fit(keV)',
|
||||||
dataIndex: 'fit'
|
dataIndex: 'fit',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Delta(%)',
|
title: 'Delta(%)',
|
||||||
dataIndex: 'delta'
|
dataIndex: 'delta',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -282,11 +286,11 @@ export default {
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (success) {
|
if (success) {
|
||||||
const { list_dataSource, ECutAnalysis_Low, G_energy_span } = result
|
const { list_dataSource, ECutAnalysis_Low, G_energy_span, currentText: resultCurrentText } = result
|
||||||
this.dataSourceList = list_dataSource
|
this.dataSourceList = list_dataSource
|
||||||
if (!currentText) {
|
if (!currentText) {
|
||||||
this.currSelectedDataSource = list_dataSource[list_dataSource.length - 1]
|
this.currSelectedDataSource = resultCurrentText
|
||||||
this.appliedDataSource = list_dataSource[list_dataSource.length - 1]
|
this.appliedDataSource = resultCurrentText
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ECutAnalysis_Low = ECutAnalysis_Low
|
this.ECutAnalysis_Low = ECutAnalysis_Low
|
||||||
|
|
|
@ -120,19 +120,23 @@ import { showSaveFileModal } from '@/utils/file'
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: 'Channel',
|
title: 'Channel',
|
||||||
dataIndex: 'channel'
|
dataIndex: 'channel',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy'
|
dataIndex: 'energy',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Fit(keV)',
|
title: 'Fit(keV)',
|
||||||
dataIndex: 'fit'
|
dataIndex: 'fit',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Delta(%)',
|
title: 'Delta(%)',
|
||||||
dataIndex: 'delta'
|
dataIndex: 'delta',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -244,11 +248,11 @@ export default {
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (success) {
|
if (success) {
|
||||||
const { list_dataSource, rg_high, rg_low } = result
|
const { list_dataSource, rg_high, rg_low, currentText: resultCurrentText } = result
|
||||||
this.dataSourceList = list_dataSource
|
this.dataSourceList = list_dataSource
|
||||||
if (!currentText) {
|
if (!currentText) {
|
||||||
this.currSelectedDataSource = list_dataSource[list_dataSource.length - 1]
|
this.currSelectedDataSource = resultCurrentText
|
||||||
this.appliedDataSource = list_dataSource[list_dataSource.length - 1]
|
this.appliedDataSource = resultCurrentText
|
||||||
}
|
}
|
||||||
|
|
||||||
this.rg_high = rg_high
|
this.rg_high = rg_high
|
||||||
|
|
|
@ -3,23 +3,31 @@
|
||||||
<a-form-model class="settings" :labelCol="{ style: { width: '75px', textAlign: 'center' } }">
|
<a-form-model class="settings" :labelCol="{ style: { width: '75px', textAlign: 'center' } }">
|
||||||
<div class="top-left">
|
<div class="top-left">
|
||||||
<a-form-model-item label="MSG_ID">
|
<a-form-model-item label="MSG_ID">
|
||||||
<a-input></a-input>
|
<a-input v-model="canberraIecImsParams.msgId"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Comment">
|
<a-form-model-item label="Comment">
|
||||||
<a-textarea></a-textarea>
|
<a-textarea v-model="canberraIecImsParams.comment"></a-textarea>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<title-over-border title="Collection Block">
|
<title-over-border title="Collection Block">
|
||||||
<a-form-model-item label="Start Time">
|
<a-form-model-item label="Start Time">
|
||||||
<custom-date-picker show-time />
|
<custom-date-picker
|
||||||
|
show-time
|
||||||
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
|
v-model="canberraIecImsParams.startTime"
|
||||||
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Stop Time">
|
<a-form-model-item label="Stop Time">
|
||||||
<custom-date-picker show-time />
|
<custom-date-picker
|
||||||
|
show-time
|
||||||
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
|
v-model="canberraIecImsParams.stopTime"
|
||||||
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>Total air volume sampled</p>
|
||||||
Total air volume sampled
|
<a-input v-model="canberraIecImsParams.totalAir"></a-input>
|
||||||
</p>
|
|
||||||
<a-input></a-input>
|
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,81 +38,139 @@
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox></a-checkbox>
|
||||||
Designator
|
Designator
|
||||||
</div>
|
</div>
|
||||||
<a-input></a-input>
|
<a-input v-model="canberraIecImsParams.designator"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox></a-checkbox>
|
||||||
Station code
|
Station code
|
||||||
</div>
|
</div>
|
||||||
<a-input></a-input>
|
<a-input v-model="canberraIecImsParams.stationCode"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox></a-checkbox>
|
||||||
Detector code
|
Detector code
|
||||||
</div>
|
</div>
|
||||||
<a-input></a-input>
|
<a-input v-model="canberraIecImsParams.detectorCode"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox></a-checkbox>
|
||||||
Sample geometry
|
Sample geometry
|
||||||
</div>
|
</div>
|
||||||
<a-input></a-input>
|
<a-input v-model="canberraIecImsParams.sampleGeometry"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="system-type-and-spectrum-qualifier">
|
<div class="system-type-and-spectrum-qualifier">
|
||||||
<title-over-border title="System type" class="system-type">
|
<title-over-border title="System type" class="system-type">
|
||||||
<a-radio-group>
|
<a-radio-group v-model="canberraIecImsParams.systemType">
|
||||||
<a-radio>P</a-radio>
|
<a-radio value="P">P</a-radio>
|
||||||
<a-radio>G</a-radio>
|
<a-radio value="G">G</a-radio>
|
||||||
<a-radio>B</a-radio>
|
<a-radio value="B">B</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Spectrum qualifier" class="spectrum-qualifier">
|
<title-over-border title="Spectrum qualifier" class="spectrum-qualifier">
|
||||||
<a-radio-group>
|
<a-radio-group v-model="canberraIecImsParams.spectrumQualifier">
|
||||||
<a-radio>PREL</a-radio>
|
<a-radio value="PREL">PREL</a-radio>
|
||||||
<a-radio>FULL</a-radio>
|
<a-radio value="FULL">FULL</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
<div class="identifications">
|
<div class="identifications">
|
||||||
<div>
|
<div>
|
||||||
<p>Sample reference identification</p>
|
<p>Sample reference identification</p>
|
||||||
<a-input></a-input>
|
<a-input v-model="canberraIecImsParams.sampleRef"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>Background measurement identification</p>
|
<p>Background measurement identification</p>
|
||||||
<a-input></a-input>
|
<a-input v-model="canberraIecImsParams.backgroundMea"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="transmit-time">
|
<div class="transmit-time">
|
||||||
<a-checkbox>Transmit time</a-checkbox>
|
<a-checkbox>Transmit time</a-checkbox>
|
||||||
<custom-date-picker></custom-date-picker>
|
<custom-date-picker
|
||||||
|
show-time
|
||||||
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
|
v-model="canberraIecImsParams.transmitTime"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
<title-over-border title="Spectrum Transfer" class="spectrum-transfer">
|
<title-over-border title="Spectrum Transfer" class="spectrum-transfer">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title">Canberra IEC1455(.IEC)</div>
|
<div class="title">
|
||||||
|
<a-upload name="file" :multiple="true" :showUploadList="false" :beforeUpload="ortecBeforeUpload">
|
||||||
|
<div>Canberra IEC1455(.IEC)</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
<div class="data-type">
|
<div class="data-type">
|
||||||
Data type
|
Data type
|
||||||
<div class="data-type-select">
|
<div class="data-type-select">
|
||||||
<custom-select :option="[{ label: 'SAMPLEPHD', value: 1 }]" />
|
<custom-select :option="[{ label: 'SAMPLEPHD', value: 1 }]" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">IMS .ims .rms</div>
|
<div class="title">
|
||||||
|
<a-upload name="file" :multiple="true" :showUploadList="false" :beforeUpload="imsBeforeUpload">
|
||||||
|
<div>IMS .ims .rms</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-transfer></a-transfer>
|
<a-transfer :render="(item) => item.title" :data-source="dataSource" :target-keys="targetKeys" />
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
||||||
|
import moment from 'moment'
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder }
|
components: { TitleOverBorder },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
canberraIecImsParams: {
|
||||||
|
msgId: '123456789',
|
||||||
|
comment: '',
|
||||||
|
startTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
stopTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
totalAir: '0',
|
||||||
|
designator: '3',
|
||||||
|
stationCode: 'CNL06',
|
||||||
|
detectorCode: 'CNL06_001',
|
||||||
|
sampleGeometry: 'DISC70MMX5MM',
|
||||||
|
systemType: 'P',
|
||||||
|
spectrumQualifier: 'FULL',
|
||||||
|
sampleRef: '123456789',
|
||||||
|
backgroundMea: '0',
|
||||||
|
transmitTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
},
|
||||||
|
dataSource: [],
|
||||||
|
targetKeys: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
ortecBeforeUpload(file, fileList) {
|
||||||
|
console.log(file, fileList)
|
||||||
|
this.dataSource = fileList.map((item) => {
|
||||||
|
return {
|
||||||
|
key: item.uid,
|
||||||
|
title: item.name,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
imsBeforeUpload(file, fileList) {
|
||||||
|
console.log(file, fileList)
|
||||||
|
let arr = fileList.map((item) => {
|
||||||
|
return {
|
||||||
|
key: item.uid,
|
||||||
|
title: item.name,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.targetKeys = arr.map((item) => item.key)
|
||||||
|
this.dataSource.push(...arr)
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -205,6 +271,10 @@ export default {
|
||||||
background-color: #225a6a;
|
background-color: #225a6a;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
|
/deep/.ant-upload {
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,23 +3,31 @@
|
||||||
<a-form-model class="settings" :labelCol="{ style: { width: '75px', textAlign: 'center' } }">
|
<a-form-model class="settings" :labelCol="{ style: { width: '75px', textAlign: 'center' } }">
|
||||||
<div class="top-left">
|
<div class="top-left">
|
||||||
<a-form-model-item label="MSG_ID">
|
<a-form-model-item label="MSG_ID">
|
||||||
<a-input></a-input>
|
<a-input v-model="intSpacImsParams.msgId"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Comment">
|
<a-form-model-item label="Comment">
|
||||||
<a-textarea></a-textarea>
|
<a-textarea v-model="intSpacImsParams.comment"></a-textarea>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<title-over-border title="Collection Block">
|
<title-over-border title="Collection Block">
|
||||||
<a-form-model-item label="Start Time">
|
<a-form-model-item label="Start Time">
|
||||||
<custom-date-picker show-time />
|
<custom-date-picker
|
||||||
|
show-time
|
||||||
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
|
v-model="intSpacImsParams.startTime"
|
||||||
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Stop Time">
|
<a-form-model-item label="Stop Time">
|
||||||
<custom-date-picker show-time />
|
<custom-date-picker
|
||||||
|
show-time
|
||||||
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
|
v-model="intSpacImsParams.stopTime"
|
||||||
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>Total air volume sampled</p>
|
||||||
Total air volume sampled
|
<a-input v-model="intSpacImsParams.totalAir"></a-input>
|
||||||
</p>
|
|
||||||
<a-input></a-input>
|
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,81 +38,139 @@
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox></a-checkbox>
|
||||||
Designator
|
Designator
|
||||||
</div>
|
</div>
|
||||||
<a-input></a-input>
|
<a-input v-model="intSpacImsParams.designator"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox></a-checkbox>
|
||||||
Station code
|
Station code
|
||||||
</div>
|
</div>
|
||||||
<a-input></a-input>
|
<a-input v-model="intSpacImsParams.stationCode"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox></a-checkbox>
|
||||||
Detector code
|
Detector code
|
||||||
</div>
|
</div>
|
||||||
<a-input></a-input>
|
<a-input v-model="intSpacImsParams.detectorCode"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox></a-checkbox>
|
||||||
Sample geometry
|
Sample geometry
|
||||||
</div>
|
</div>
|
||||||
<a-input></a-input>
|
<a-input v-model="intSpacImsParams.sampleGeometry"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="system-type-and-spectrum-qualifier">
|
<div class="system-type-and-spectrum-qualifier">
|
||||||
<title-over-border title="System type" class="system-type">
|
<title-over-border title="System type" class="system-type">
|
||||||
<a-radio-group>
|
<a-radio-group v-model="intSpacImsParams.systemType">
|
||||||
<a-radio>P</a-radio>
|
<a-radio value="P">P</a-radio>
|
||||||
<a-radio>G</a-radio>
|
<a-radio value="G">G</a-radio>
|
||||||
<a-radio>B</a-radio>
|
<a-radio value="B">B</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Spectrum qualifier" class="spectrum-qualifier">
|
<title-over-border title="Spectrum qualifier" class="spectrum-qualifier">
|
||||||
<a-radio-group>
|
<a-radio-group v-model="intSpacImsParams.spectrumQualifier">
|
||||||
<a-radio>PREL</a-radio>
|
<a-radio value="PREL">PREL</a-radio>
|
||||||
<a-radio>FULL</a-radio>
|
<a-radio value="FULL">FULL</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
<div class="identifications">
|
<div class="identifications">
|
||||||
<div>
|
<div>
|
||||||
<p>Sample reference identification</p>
|
<p>Sample reference identification</p>
|
||||||
<a-input></a-input>
|
<a-input v-model="intSpacImsParams.sampleRef"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>Background measurement identification</p>
|
<p>Background measurement identification</p>
|
||||||
<a-input></a-input>
|
<a-input v-model="intSpacImsParams.backgroundMea"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="transmit-time">
|
<div class="transmit-time">
|
||||||
<a-checkbox>Transmit time</a-checkbox>
|
<a-checkbox>Transmit time</a-checkbox>
|
||||||
<custom-date-picker></custom-date-picker>
|
<custom-date-picker
|
||||||
|
show-time
|
||||||
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
|
v-model="intSpacImsParams.transmitTime"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
<title-over-border title="Spectrum Transfer" class="spectrum-transfer">
|
<title-over-border title="Spectrum Transfer" class="spectrum-transfer">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title">ORTEC int.spc</div>
|
<div class="title">
|
||||||
|
<a-upload name="file" :multiple="true" :showUploadList="false" :beforeUpload="ortecBeforeUpload">
|
||||||
|
<div>ORTEC int.spc</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
<div class="data-type">
|
<div class="data-type">
|
||||||
Data type
|
Data type
|
||||||
<div class="data-type-select">
|
<div class="data-type-select">
|
||||||
<custom-select :option="[{ label: 'SAMPLEPHD', value: 1 }]" />
|
<custom-select :option="[{ label: 'SAMPLEPHD', value: 1 }]" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">IMS .ims .rms</div>
|
<div class="title">
|
||||||
|
<a-upload name="file" :multiple="true" :showUploadList="false" :beforeUpload="imsBeforeUpload">
|
||||||
|
<div>IMS .ims .rms</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-transfer></a-transfer>
|
<a-transfer :render="(item) => item.title" :data-source="dataSource" :target-keys="targetKeys" />
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
||||||
|
import moment from 'moment'
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder }
|
components: { TitleOverBorder },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
intSpacImsParams: {
|
||||||
|
msgId: '123456789',
|
||||||
|
comment: '',
|
||||||
|
startTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
stopTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
totalAir: '0',
|
||||||
|
designator: '3',
|
||||||
|
stationCode: 'CNL06',
|
||||||
|
detectorCode: 'CNL06_001',
|
||||||
|
sampleGeometry: 'DISC70MMX5MM',
|
||||||
|
systemType: 'P',
|
||||||
|
spectrumQualifier: 'FULL',
|
||||||
|
sampleRef: '123456789',
|
||||||
|
backgroundMea: '0',
|
||||||
|
transmitTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
},
|
||||||
|
dataSource: [],
|
||||||
|
targetKeys: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
ortecBeforeUpload(file, fileList) {
|
||||||
|
console.log(file, fileList)
|
||||||
|
this.dataSource = fileList.map((item) => {
|
||||||
|
return {
|
||||||
|
key: item.uid,
|
||||||
|
title: item.name,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
imsBeforeUpload(file, fileList) {
|
||||||
|
console.log(file, fileList)
|
||||||
|
let arr = fileList.map((item) => {
|
||||||
|
return {
|
||||||
|
key: item.uid,
|
||||||
|
title: item.name,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.targetKeys = arr.map((item) => item.key)
|
||||||
|
this.dataSource.push(...arr)
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -205,6 +271,10 @@ export default {
|
||||||
background-color: #225a6a;
|
background-color: #225a6a;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
|
/deep/.ant-upload {
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<a-input v-model="model.dataType" @change="e=>handleValueChange(e.target.value)"/>
|
<a-input v-model="model.dataType" @change="e=>handleValueChange(e.target.value)"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Priority Level">
|
<a-form-model-item label="Priority Level">
|
||||||
<custom-select v-model="model.priorityLevel" style="width: 150px" :options="priorityLevbelOptions" @change="handleValueChange"> </custom-select>
|
<custom-select v-model="model.priorityLevel" :options="priorityLevbelOptions" @change="handleValueChange"> </custom-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Station Code">
|
<a-form-model-item label="Station Code">
|
||||||
<a-input v-model="model.stationCode" @change="e=>handleValueChange(e.target.value)"/>
|
<a-input v-model="model.stationCode" @change="e=>handleValueChange(e.target.value)"/>
|
||||||
|
@ -27,13 +27,13 @@
|
||||||
<a-input v-model="model.labDetector" @change="e=>handleValueChange(e.target.value)"/>
|
<a-input v-model="model.labDetector" @change="e=>handleValueChange(e.target.value)"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Report Type">
|
<a-form-model-item label="Report Type">
|
||||||
<custom-select v-model="model.reportType" style="width: 150px" :options="reportTypeOptions" @change="handleValueChange"> </custom-select>
|
<custom-select v-model="model.reportType" :options="reportTypeOptions" @change="handleValueChange"> </custom-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Report Number">
|
<a-form-model-item label="Report Number">
|
||||||
<a-input-number v-model="model.reportnumber" style="width: 100%;" @change="handleValueChange"/>
|
<a-input-number v-model="model.reportnumber" style="width: 100%;" @change="handleValueChange"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Sample Category">
|
<a-form-model-item label="Sample Category">
|
||||||
<custom-select v-model="model.sampleCategory" style="width: 150px" :options="sampleCategoryOptions" @change="handleValueChange"> </custom-select>
|
<custom-select v-model="model.sampleCategory" :options="sampleCategoryOptions" @change="handleValueChange"> </custom-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Message Transmission Time">
|
<a-form-model-item label="Message Transmission Time">
|
||||||
<custom-date-picker v-model="model.transmission" show-time @change="(mont,date)=>handleValueChange(date)"/>
|
<custom-date-picker v-model="model.transmission" show-time @change="(mont,date)=>handleValueChange(date)"/>
|
||||||
|
|
|
@ -120,19 +120,23 @@ import { showSaveFileModal } from '@/utils/file'
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy'
|
dataIndex: 'energy',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'FWHM(keV)',
|
title: 'FWHM(keV)',
|
||||||
dataIndex: 'fwhm'
|
dataIndex: 'fwhm',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Fit(keV)',
|
title: 'Fit(keV)',
|
||||||
dataIndex: 'fit'
|
dataIndex: 'fit',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Delta(%)',
|
title: 'Delta(%)',
|
||||||
dataIndex: 'delta'
|
dataIndex: 'delta',
|
||||||
|
customRender: (text) => Number(text).toFixed(3)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -243,11 +247,11 @@ export default {
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (success) {
|
if (success) {
|
||||||
const { list_dataSource, ECutAnalysis_Low, G_energy_span } = result
|
const { list_dataSource, ECutAnalysis_Low, G_energy_span, currentText: resultCurrentText } = result
|
||||||
this.dataSourceList = list_dataSource
|
this.dataSourceList = list_dataSource
|
||||||
if (!currentText) {
|
if (!currentText) {
|
||||||
this.currSelectedDataSource = list_dataSource[list_dataSource.length - 1]
|
this.currSelectedDataSource = resultCurrentText
|
||||||
this.appliedDataSource = list_dataSource[list_dataSource.length - 1]
|
this.appliedDataSource = resultCurrentText
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ECutAnalysis_Low = ECutAnalysis_Low
|
this.ECutAnalysis_Low = ECutAnalysis_Low
|
||||||
|
|
|
@ -2,16 +2,14 @@
|
||||||
<custom-modal v-model="visible" title="Save Setting" :width="380" :okHandler="handleOk">
|
<custom-modal v-model="visible" title="Save Setting" :width="380" :okHandler="handleOk">
|
||||||
<div class="save-setting">
|
<div class="save-setting">
|
||||||
<div class="save-setting-all">
|
<div class="save-setting-all">
|
||||||
<a-checkbox v-model="saveAll">
|
<a-checkbox v-model="saveAll"> Save All </a-checkbox>
|
||||||
Save All
|
|
||||||
</a-checkbox>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<title-over-border title="Format">
|
<title-over-border title="Format">
|
||||||
<a-radio-group v-model="saveFormat" class="format-radio-group">
|
<a-radio-group v-model="saveFormat" class="format-radio-group">
|
||||||
<a-radio value="txt">Save as Txt</a-radio>
|
<a-radio value="txt">Save as Txt</a-radio>
|
||||||
<a-radio value="xls">Save as Excel</a-radio>
|
<a-radio value="xls">Save as Excel</a-radio>
|
||||||
<a-radio value="html">Save as Html</a-radio>
|
<!-- <a-radio value="html">Save as Html</a-radio> -->
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,13 +23,13 @@ export default {
|
||||||
components: { TitleOverBorder },
|
components: { TitleOverBorder },
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: Boolean
|
type: Boolean,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
saveAll: false,
|
saveAll: false,
|
||||||
saveFormat: 'txt'
|
saveFormat: 'txt',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -42,7 +40,7 @@ export default {
|
||||||
|
|
||||||
handleOk() {
|
handleOk() {
|
||||||
this.$emit('save', this.saveFormat)
|
this.$emit('save', this.saveFormat)
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
visible: {
|
visible: {
|
||||||
|
@ -55,9 +53,9 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.value
|
return this.value
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,45 @@
|
||||||
<template>
|
<template>
|
||||||
<custom-modal v-model="visible" title="Ratio" :width="240" :okHandler="handleOk">
|
<custom-modal v-model="visible" title="Ratio" :width="240" @cancel="handleReject">
|
||||||
<a-input-number :min="1" v-model="ratio"></a-input-number>
|
<a-input-number :min="1" v-model="ratio"></a-input-number>
|
||||||
|
|
||||||
|
<div slot="custom-footer">
|
||||||
|
<a-button type="primary" @click="handleOk">OK</a-button>
|
||||||
|
<a-button @click="handleCancel">Cancel</a-button>
|
||||||
|
</div>
|
||||||
</custom-modal>
|
</custom-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
visible: false,
|
||||||
ratio: 1
|
ratio: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getRatio() {
|
||||||
|
this.visible = true
|
||||||
|
this.ratio = 1
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.resolve = resolve
|
||||||
|
this.reject = reject
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
handleOk() {
|
handleOk() {
|
||||||
console.log('%c [ ]-14', 'font-size:13px; background:pink; color:#bf2c9f;', this.ratio)
|
this.resolve(this.ratio)
|
||||||
if(!this.ratio) {
|
this.visible = false
|
||||||
this.$message.warn('Ratio Cannot Be Null')
|
},
|
||||||
throw new Error('Ratio Empty')
|
|
||||||
}
|
handleCancel() {
|
||||||
|
this.resolve()
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
handleReject() {
|
||||||
|
this.reject('cancel')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,12 @@
|
||||||
:nuclide="nuclideReview.nuclide"
|
:nuclide="nuclideReview.nuclide"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<compare-file-list-modal v-model="compareFileListModalVisible" @compareWithFile="handleCompareWithFile" />
|
<compare-file-list-modal v-model="compareFileListModalVisible" @fileSelect="handleFileSelect" />
|
||||||
|
|
||||||
|
<!-- Strip 弹窗开始 -->
|
||||||
|
<strip-modal ref="stripModal" />
|
||||||
|
<!-- Strip 弹窗结束 -->
|
||||||
|
|
||||||
<!-- ReProcessing 弹窗开始 -->
|
<!-- ReProcessing 弹窗开始 -->
|
||||||
<re-processing-modal
|
<re-processing-modal
|
||||||
v-if="abc"
|
v-if="abc"
|
||||||
|
@ -132,6 +137,7 @@ import { GammaOptions, graphAssistance } from './settings'
|
||||||
import store from '@/store/'
|
import store from '@/store/'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
import StripModal from './components/Modals/StripModal.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
@ -153,6 +159,7 @@ export default {
|
||||||
NuclideReviewModal,
|
NuclideReviewModal,
|
||||||
CompareFileListModal,
|
CompareFileListModal,
|
||||||
ReProcessingModal,
|
ReProcessingModal,
|
||||||
|
StripModal,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -205,6 +212,8 @@ export default {
|
||||||
currChannel: -1,
|
currChannel: -1,
|
||||||
|
|
||||||
compareFileListModalVisible: false, // Compare 弹窗
|
compareFileListModalVisible: false, // Compare 弹窗
|
||||||
|
isStrip: false,
|
||||||
|
|
||||||
reprocessingModalVisible: false, // 重新分析弹窗
|
reprocessingModalVisible: false, // 重新分析弹窗
|
||||||
isProcessing: false, // 正在处理
|
isProcessing: false, // 正在处理
|
||||||
websock: null,
|
websock: null,
|
||||||
|
@ -213,6 +222,7 @@ export default {
|
||||||
checkBox_updateCal: false, //update复选框状态
|
checkBox_updateCal: false, //update复选框状态
|
||||||
newCheckBox_updateCal: false, //update复选框状态
|
newCheckBox_updateCal: false, //update复选框状态
|
||||||
currStep: '',
|
currStep: '',
|
||||||
|
isReAnalyed: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -306,9 +316,11 @@ export default {
|
||||||
this.dataProsess(result, 'db')
|
this.dataProsess(result, 'db')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -334,9 +346,11 @@ export default {
|
||||||
this.dataProsess(result, 'file')
|
this.dataProsess(result, 'file')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -375,6 +389,7 @@ export default {
|
||||||
} = result
|
} = result
|
||||||
if (flag && (flag == 'dab' || flag == 'file')) {
|
if (flag && (flag == 'dab' || flag == 'file')) {
|
||||||
this.bAnalyed = result.bAnalyed
|
this.bAnalyed = result.bAnalyed
|
||||||
|
this.$emit('reAnalyed', this.bAnalyed)
|
||||||
this.checkBox_updateCal = result.checkBox_updateCal
|
this.checkBox_updateCal = result.checkBox_updateCal
|
||||||
this.newCheckBox_updateCal = '2'
|
this.newCheckBox_updateCal = '2'
|
||||||
console.log(this.checkBox_updateCal)
|
console.log(this.checkBox_updateCal)
|
||||||
|
@ -1159,15 +1174,40 @@ export default {
|
||||||
|
|
||||||
// 分析工具Accept时刷新部分数据
|
// 分析工具Accept时刷新部分数据
|
||||||
handleAccept(data) {
|
handleAccept(data) {
|
||||||
console.log('%c [ handleAccept ]-1088', 'font-size:13px; background:pink; color:#bf2c9f;', data)
|
console.log('%c [ data ]-1166', 'font-size:13px; background:pink; color:#bf2c9f;', data)
|
||||||
this.handleResetState()
|
const {
|
||||||
// data.DetailedInformation = this.detailedInfomation
|
allData,
|
||||||
|
barChart,
|
||||||
|
channelBaseLineChart,
|
||||||
|
peakSet,
|
||||||
|
shadowChannelChart,
|
||||||
|
shadowEnergyChart,
|
||||||
|
shapeChannelData,
|
||||||
|
shapeData,
|
||||||
|
shapeEnergyData,
|
||||||
|
} = data
|
||||||
|
|
||||||
this.clearCompareLine()
|
this.clearCompareLine()
|
||||||
// this.dataProsess(data)
|
this.channelData.peakGroup = this.getLineData(allData, 'Peak', 'channel', true)
|
||||||
|
this.energyData.peakGroup = this.getLineData(allData, 'Peak', 'energy', true)
|
||||||
|
this.redrawPeakLine()
|
||||||
|
|
||||||
|
this.channelData.baseLine = this.getLineData(allData, 'BaseLine', 'channel')
|
||||||
|
this.energyData.baseLine = this.getLineData(allData, 'BaseLine', 'energy')
|
||||||
|
this.redrawLineBySeriesName(
|
||||||
|
'BaseLine',
|
||||||
|
this.energyData.baseLine,
|
||||||
|
this.channelData.baseLine,
|
||||||
|
this.graphAssistance.Baseline
|
||||||
|
)
|
||||||
|
|
||||||
|
this.channelData.baseLineCP = shapeChannelData
|
||||||
|
this.energyData.baseLineCP = shapeEnergyData
|
||||||
|
this.redrawCtrlPointBySeriesName()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 显示比较弹窗
|
// 显示比较弹窗
|
||||||
showCompareModal() {
|
showCompareModal(isStrip) {
|
||||||
if (this.isLoading) {
|
if (this.isLoading) {
|
||||||
this.$message.warn('Sample is Loading')
|
this.$message.warn('Sample is Loading')
|
||||||
return
|
return
|
||||||
|
@ -1175,21 +1215,55 @@ export default {
|
||||||
this.handleResetChart()
|
this.handleResetChart()
|
||||||
this.clearCompareLine()
|
this.clearCompareLine()
|
||||||
this.compareFileListModalVisible = true
|
this.compareFileListModalVisible = true
|
||||||
|
|
||||||
|
this.isStrip = isStrip
|
||||||
},
|
},
|
||||||
|
|
||||||
// 文件之间对比
|
// 文件之间对比
|
||||||
handleCompareWithFile([channelData, energyData]) {
|
async handleFileSelect(selectedFileName) {
|
||||||
this.channelCompareLine = channelData
|
const { inputFileName: fileName } = this.sample
|
||||||
this.energyCompareLine = energyData
|
|
||||||
this.redrawLineBySeriesName('Compare', energyData, channelData, true, channelData.color)
|
|
||||||
|
|
||||||
if (this.isScatter()) {
|
try {
|
||||||
lineSeries.type = 'scatterGL'
|
let param = {
|
||||||
|
fileName,
|
||||||
|
compareFileName: selectedFileName,
|
||||||
|
},
|
||||||
|
url = '/gamma/Compare'
|
||||||
|
// 如果是Strip
|
||||||
|
if (this.isStrip) {
|
||||||
|
const ratio = await this.$refs.stripModal.getRatio()
|
||||||
|
|
||||||
|
param = {
|
||||||
|
fileName,
|
||||||
|
stripFileName: selectedFileName,
|
||||||
|
ratioRate: ratio || 1,
|
||||||
|
}
|
||||||
|
url = '/gamma/Strip'
|
||||||
|
}
|
||||||
|
|
||||||
|
this.isLoading = true
|
||||||
|
const { success, result, message } = await getAction(url, param)
|
||||||
|
if (success) {
|
||||||
|
const [channelData, energyData] = result
|
||||||
|
this.channelCompareLine = channelData
|
||||||
|
this.energyCompareLine = energyData
|
||||||
|
this.redrawLineBySeriesName('Compare', energyData, channelData, true, channelData.color)
|
||||||
|
|
||||||
|
if (this.isScatter()) {
|
||||||
|
lineSeries.type = 'scatterGL'
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.thumbnailOption.yAxis.max = getAxisMax(this.getChart(), 'yAxis')
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.thumbnailOption.yAxis.max = getAxisMax(this.getChart(), 'yAxis')
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 移除 Compare 线
|
// 移除 Compare 线
|
||||||
|
@ -1216,11 +1290,12 @@ export default {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
this.handleResetState()
|
|
||||||
|
|
||||||
const { inputFileName: fileName } = this.sample
|
const { inputFileName: fileName } = this.sample
|
||||||
const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileName}`)
|
const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileName}`)
|
||||||
if (success) {
|
if (success) {
|
||||||
|
this.isReAnalyed = true
|
||||||
|
this.$emit('reAnalyed', this.isReAnalyed)
|
||||||
|
this.handleResetState()
|
||||||
result.DetailedInformation = this.detailedInfomation
|
result.DetailedInformation = this.detailedInfomation
|
||||||
this.dataProsess(result)
|
this.dataProsess(result)
|
||||||
} else {
|
} else {
|
||||||
|
@ -1446,7 +1521,6 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
currStep: {
|
currStep: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
console.log('dfad', val)
|
|
||||||
if (val && val == '0') {
|
if (val && val == '0') {
|
||||||
this.abc = true
|
this.abc = true
|
||||||
this.reprocessingModalVisible = true
|
this.reprocessingModalVisible = true
|
||||||
|
@ -1467,7 +1541,6 @@ export default {
|
||||||
},
|
},
|
||||||
updateFlag: {
|
updateFlag: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
console.log('dfad', val)
|
|
||||||
this.newCheckBox_updateCal = val
|
this.newCheckBox_updateCal = val
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|
|
@ -30,7 +30,13 @@
|
||||||
<!-- 频谱分析部分 -->
|
<!-- 频谱分析部分 -->
|
||||||
<div class="spectrum-analysis-main">
|
<div class="spectrum-analysis-main">
|
||||||
<!-- Gamma 分析 -->
|
<!-- Gamma 分析 -->
|
||||||
<gamma-analysis v-if="isGamma" ref="gammaAnalysisRef" :sample="sampleData" :updateFlag="updateFlag" />
|
<gamma-analysis
|
||||||
|
v-if="isGamma"
|
||||||
|
ref="gammaAnalysisRef"
|
||||||
|
:sample="sampleData"
|
||||||
|
:updateFlag="updateFlag"
|
||||||
|
@reAnalyed="handleReAnalyed"
|
||||||
|
/>
|
||||||
<!-- Gamma 分析 -->
|
<!-- Gamma 分析 -->
|
||||||
|
|
||||||
<!-- Beta-Gamma 分析 -->
|
<!-- Beta-Gamma 分析 -->
|
||||||
|
@ -57,10 +63,6 @@
|
||||||
<load-from-file-modal v-model="loadFromFileModalVisible" @loadFormFile="handleLoadSampleFromFile" />
|
<load-from-file-modal v-model="loadFromFileModalVisible" @loadFormFile="handleLoadSampleFromFile" />
|
||||||
<!-- 从文件加载结束 -->
|
<!-- 从文件加载结束 -->
|
||||||
|
|
||||||
<!-- Strip 弹窗开始 -->
|
|
||||||
<strip-modal v-model="stripModalVisible" />
|
|
||||||
<!-- Strip 弹窗结束 -->
|
|
||||||
|
|
||||||
<!-- Ftransit 弹窗开始 -->
|
<!-- Ftransit 弹窗开始 -->
|
||||||
<ftranslt-modal v-model="ftransltModalVisible" />
|
<ftranslt-modal v-model="ftransltModalVisible" />
|
||||||
<!-- Ftransit 弹窗结束 -->
|
<!-- Ftransit 弹窗结束 -->
|
||||||
|
@ -160,7 +162,11 @@
|
||||||
<!-- Beta-Gamma 的Comments 结束 -->
|
<!-- Beta-Gamma 的Comments 结束 -->
|
||||||
|
|
||||||
<!-- Beta-Gamma 的Energy Calibration开始 -->
|
<!-- Beta-Gamma 的Energy Calibration开始 -->
|
||||||
<beta-gamma-energy-calibration-modal v-model="betaGammaEnergyCalibrationModalVisible" @sendInfo="getCheckFlag" />
|
<beta-gamma-energy-calibration-modal
|
||||||
|
v-model="betaGammaEnergyCalibrationModalVisible"
|
||||||
|
@sendInfo="getCheckFlag"
|
||||||
|
@sendXeData="getXeData"
|
||||||
|
/>
|
||||||
<!-- Beta-Gamma 的Energy Calibration结束 -->
|
<!-- Beta-Gamma 的Energy Calibration结束 -->
|
||||||
|
|
||||||
<!-- Beta-Gamma 的 Extrapolation 弹窗开始 -->
|
<!-- Beta-Gamma 的 Extrapolation 弹窗开始 -->
|
||||||
|
@ -227,7 +233,6 @@ import BetaGammaRlrModal from './components/Modals/BetaGammaModals/BetaGammaRLRM
|
||||||
import StatisticsParamerHistoryModal from './components/Modals/BetaGammaModals/StatisticsParamerHistoryModal.vue'
|
import StatisticsParamerHistoryModal from './components/Modals/BetaGammaModals/StatisticsParamerHistoryModal.vue'
|
||||||
import FtransltModal from './components/Modals/FtransltModal/index.vue'
|
import FtransltModal from './components/Modals/FtransltModal/index.vue'
|
||||||
import BetaGammaEnergyCalibrationModal from './components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue'
|
import BetaGammaEnergyCalibrationModal from './components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue'
|
||||||
import StripModal from './components/Modals/StripModal.vue'
|
|
||||||
import AutomaticAnalysisLogModal from './components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue'
|
import AutomaticAnalysisLogModal from './components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue'
|
||||||
import BetaGammaExtrapolationModal from './components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue'
|
import BetaGammaExtrapolationModal from './components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
|
@ -273,7 +278,6 @@ export default {
|
||||||
StatisticsParamerHistoryModal,
|
StatisticsParamerHistoryModal,
|
||||||
FtransltModal,
|
FtransltModal,
|
||||||
BetaGammaEnergyCalibrationModal,
|
BetaGammaEnergyCalibrationModal,
|
||||||
StripModal,
|
|
||||||
AutomaticAnalysisLogModal,
|
AutomaticAnalysisLogModal,
|
||||||
BetaGammaExtrapolationModal,
|
BetaGammaExtrapolationModal,
|
||||||
},
|
},
|
||||||
|
@ -299,7 +303,6 @@ export default {
|
||||||
|
|
||||||
loadFromDbModalVisible: false, // 从数据库加载弹窗
|
loadFromDbModalVisible: false, // 从数据库加载弹窗
|
||||||
loadFromFileModalVisible: false, // 从文件加载弹窗
|
loadFromFileModalVisible: false, // 从文件加载弹窗
|
||||||
stripModalVisible: false, // Strip 弹窗
|
|
||||||
ftransltModalVisible: false, // Ftransit 弹窗
|
ftransltModalVisible: false, // Ftransit 弹窗
|
||||||
|
|
||||||
sampleData: {}, // 要分析的谱数据
|
sampleData: {}, // 要分析的谱数据
|
||||||
|
@ -379,6 +382,8 @@ export default {
|
||||||
xe135Flag: null,
|
xe135Flag: null,
|
||||||
},
|
},
|
||||||
updateFlag: '2',
|
updateFlag: '2',
|
||||||
|
isReAnalyed_gamma: false,
|
||||||
|
isReAnalyed_beta: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -396,6 +401,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
handleReAnalyed(val) {
|
||||||
|
this.isReAnalyed_gamma = val
|
||||||
|
},
|
||||||
getUpdateFlag(val) {
|
getUpdateFlag(val) {
|
||||||
console.log('qerq', val)
|
console.log('qerq', val)
|
||||||
this.updateFlag = val
|
this.updateFlag = val
|
||||||
|
@ -403,15 +411,26 @@ export default {
|
||||||
getcommentsInfo(val) {
|
getcommentsInfo(val) {
|
||||||
this.params_toDB.comment = val.spectrumAnalysisCommentInfo
|
this.params_toDB.comment = val.spectrumAnalysisCommentInfo
|
||||||
},
|
},
|
||||||
getStationName(arg, val) {
|
getStationName(arg, val, flag) {
|
||||||
|
arg.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)
|
||||||
|
})
|
||||||
this.resultDisplayFlag = arg
|
this.resultDisplayFlag = arg
|
||||||
this.params_toDB.stationName = val
|
this.params_toDB.stationName = val
|
||||||
|
this.isReAnalyed_beta = flag
|
||||||
},
|
},
|
||||||
getCheckFlag(val) {
|
getCheckFlag(val) {
|
||||||
this.params_toDB.checkSample = val.checkSample
|
this.params_toDB.checkSample = val.checkSample
|
||||||
this.params_toDB.checkGas = val.checkGas
|
this.params_toDB.checkGas = val.checkGas
|
||||||
this.params_toDB.checkDet = val.checkDet
|
this.params_toDB.checkDet = val.checkDet
|
||||||
},
|
},
|
||||||
|
getXeData(val) {
|
||||||
|
this.$set(this.analyseCurrentSpectrumData, 'XeData', val)
|
||||||
|
this.resultDisplayFlag = val
|
||||||
|
},
|
||||||
// formDB 来源 吧接口返回的文件名称添加到sampleData
|
// formDB 来源 吧接口返回的文件名称添加到sampleData
|
||||||
getFiles(val) {
|
getFiles(val) {
|
||||||
this.newSampleData = { ...this.sampleData, ...val }
|
this.newSampleData = { ...this.sampleData, ...val }
|
||||||
|
@ -467,30 +486,39 @@ export default {
|
||||||
|
|
||||||
// 保存结果到文件, 服务端生成文件,前端下载
|
// 保存结果到文件, 服务端生成文件,前端下载
|
||||||
async handleSaveResultsToFile(saveFormat) {
|
async handleSaveResultsToFile(saveFormat) {
|
||||||
const url =
|
if (this.isGamma) {
|
||||||
saveFormat == 'xls'
|
const url = saveFormat == 'xls' ? '/gamma/saveToExcel' : saveFormat == 'txt' ? '/gamma/saveToTxt' : ''
|
||||||
? '/spectrumAnalysis/saveToExcel'
|
let params = {
|
||||||
: saveFormat == 'txt'
|
fileName: this.newSampleData.inputFileName,
|
||||||
? '/spectrumAnalysis/saveToTxt'
|
}
|
||||||
: saveFormat == 'html'
|
downloadFile(url, `result.${saveFormat}`, params, 'get')
|
||||||
? '/spectrumAnalysis/saveToHTML'
|
|
||||||
: ''
|
|
||||||
if (!this.resultDisplayFlag) {
|
|
||||||
this.$message.warn('Please Analyse Spectrum First')
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
if (this.isBetaGamma) {
|
||||||
|
const url =
|
||||||
|
saveFormat == 'xls'
|
||||||
|
? '/spectrumAnalysis/saveToExcel'
|
||||||
|
: saveFormat == 'txt'
|
||||||
|
? '/spectrumAnalysis/saveToTxt'
|
||||||
|
: saveFormat == 'html'
|
||||||
|
? '/spectrumAnalysis/saveToHTML'
|
||||||
|
: ''
|
||||||
|
if (!this.resultDisplayFlag) {
|
||||||
|
this.$message.warn('Please Analyse Spectrum First')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.resultDisplayFlag.forEach((item) => {
|
this.resultDisplayFlag.forEach((item) => {
|
||||||
this.params_toDB[`${item.nuclideName.toLowerCase()}Flag`] = item.nidFlag
|
this.params_toDB[`${item.nuclideName.toLowerCase()}Flag`] = item.nidFlag
|
||||||
})
|
})
|
||||||
|
|
||||||
this.params_toDB.sampleFileName = this.newSampleData.inputFileName
|
this.params_toDB.sampleFileName = this.newSampleData.inputFileName
|
||||||
this.params_toDB.gasFileName = this.newSampleData.gasFileName
|
this.params_toDB.gasFileName = this.newSampleData.gasFileName
|
||||||
this.params_toDB.detFileName = this.newSampleData.detFileName
|
this.params_toDB.detFileName = this.newSampleData.detFileName
|
||||||
this.params_toDB.qcFileName = this.newSampleData.qcFileName
|
this.params_toDB.qcFileName = this.newSampleData.qcFileName
|
||||||
this.params_toDB.dbName = this.newSampleData.dbName
|
this.params_toDB.dbName = this.newSampleData.dbName
|
||||||
|
|
||||||
downloadFile(url, `result.${saveFormat}`, this.params_toDB, 'post')
|
downloadFile(url, `result.${saveFormat}`, this.params_toDB, 'post')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -558,6 +586,13 @@ export default {
|
||||||
*/
|
*/
|
||||||
handleSavePHDToFile(type) {
|
handleSavePHDToFile(type) {
|
||||||
console.log('%c [ savePHDToFile ]-162', 'font-size:13px; background:pink; color:#bf2c9f;', type)
|
console.log('%c [ savePHDToFile ]-162', 'font-size:13px; background:pink; color:#bf2c9f;', type)
|
||||||
|
if (this.isGamma) {
|
||||||
|
const url = '/gamma/saveToPHD'
|
||||||
|
let params = {
|
||||||
|
fileName: this.newSampleData.inputFileName,
|
||||||
|
}
|
||||||
|
downloadFile(url, `result.PHD`, params, 'get')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleReprocessAll() {
|
handleReprocessAll() {
|
||||||
|
@ -610,13 +645,41 @@ export default {
|
||||||
getAnalyzeCurrentSpectrum() {
|
getAnalyzeCurrentSpectrum() {
|
||||||
let params = {
|
let params = {
|
||||||
dbNames: [this.newSampleData.dbName],
|
dbNames: [this.newSampleData.dbName],
|
||||||
sampleIds: [this.newSampleData.sampleId],
|
sampleIds: [this.newSampleData.sampleId ? this.newSampleData.sampleId : ''],
|
||||||
sampleFileNames: [this.newSampleData.inputFileName],
|
sampleFileNames: [this.newSampleData.inputFileName],
|
||||||
gasFileNames: [this.newSampleData.gasFileName],
|
gasFileNames: [this.newSampleData.gasFileName],
|
||||||
detFileNames: [this.newSampleData.detFileName],
|
detFileNames: [this.newSampleData.detFileName],
|
||||||
|
qcFileNames: [this.newSampleData.qcFileName],
|
||||||
}
|
}
|
||||||
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
|
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
this.isReAnalyed_beta = true
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAnalyzeAllSpectrum() {
|
||||||
|
let params = {
|
||||||
|
dbNames: [this.newSampleData.dbName],
|
||||||
|
sampleIds: [this.newSampleData.sampleId ? this.newSampleData.sampleId : ''],
|
||||||
|
sampleFileNames: [this.newSampleData.inputFileName],
|
||||||
|
gasFileNames: [this.newSampleData.gasFileName],
|
||||||
|
detFileNames: [this.newSampleData.detFileName],
|
||||||
|
qcFileNames: [this.newSampleData.qcFileName],
|
||||||
|
currentFileName: this.newSampleData.inputFileName,
|
||||||
|
}
|
||||||
|
postAction('/spectrumAnalysis/analyseAllSpectrum', params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
console.log(res)
|
||||||
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) => {
|
||||||
|
@ -666,18 +729,18 @@ export default {
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Compare',
|
title: 'Compare',
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(),
|
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(false),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Strip',
|
title: 'Strip',
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
handler: () => (this.stripModalVisible = true),
|
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Ftransit',
|
title: 'Ftransit',
|
||||||
show: this.isGamma,
|
show: this.isGamma || this.isBetaGamma,
|
||||||
handler: () => (this.ftransltModalVisible = true),
|
handler: () => (this.ftransltModalVisible = true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -737,6 +800,7 @@ export default {
|
||||||
key: 'all',
|
key: 'all',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
key: 'resultsToDB',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Save PHD to File',
|
title: 'Save PHD to File',
|
||||||
|
@ -750,18 +814,20 @@ export default {
|
||||||
key: 'all',
|
key: 'all',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
key: 'phdToFile',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
width: '170px',
|
width: '170px',
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
menuClick: () => {
|
menuClick: () => {
|
||||||
|
console.log(this.isBetaGamma, this.isGamma)
|
||||||
this.saveSettingModalVisible = true
|
this.saveSettingModalVisible = true
|
||||||
},
|
},
|
||||||
submenuClick: ({ item, child }) => {
|
submenuClick: ({ item, child }) => {
|
||||||
if (item.title == 'Save Results to DB') {
|
if (item.key == 'resultsToDB') {
|
||||||
this.handleSaveResultsToDB(child.key)
|
this.handleSaveResultsToDB(child.key)
|
||||||
} else if (item.title == 'Save PHD to File') {
|
} else if (item.key == 'phdToFile') {
|
||||||
this.handleSavePHDToFile(child.key)
|
this.handleSavePHDToFile(child.key)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -823,7 +889,9 @@ export default {
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Analyze all spectra',
|
title: 'Analyze all spectra',
|
||||||
show: this.isBetaGamma,
|
show: this.isBetaGamma,
|
||||||
handler: () => {},
|
handler: () => {
|
||||||
|
this.getAnalyzeAllSpectrum()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -871,6 +939,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'NUCLIDELIBRARY',
|
title: 'NUCLIDELIBRARY',
|
||||||
|
show: !this.isBetaGamma,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: 'a-menu',
|
type: 'a-menu',
|
||||||
|
@ -878,13 +947,11 @@ export default {
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Nuclide Library',
|
title: 'Nuclide Library',
|
||||||
show: this.isGamma,
|
|
||||||
handler: () => (this.nuclideLibraryModalVisible = true),
|
handler: () => (this.nuclideLibraryModalVisible = true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Config User Library',
|
title: 'Config User Library',
|
||||||
show: this.isGamma,
|
|
||||||
handler: () => (this.configUserLibModalVisible = true),
|
handler: () => (this.configUserLibModalVisible = true),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -957,9 +1024,14 @@ export default {
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'ARR',
|
title: 'ARR',
|
||||||
handler: () => {
|
handler: () => {
|
||||||
this.arrOrRRRModalVisible = true
|
console.log(this.newSampleData)
|
||||||
this.arrOrRRRModalExtraData = {}
|
if (this.newSampleData.sampleId) {
|
||||||
this.arrOrRRRModalType = 1
|
this.arrOrRRRModalVisible = true
|
||||||
|
this.arrOrRRRModalExtraData = {}
|
||||||
|
this.arrOrRRRModalType = 1
|
||||||
|
} else {
|
||||||
|
this.$message.warning("The file isn't existed.")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
},
|
},
|
||||||
|
@ -967,9 +1039,13 @@ export default {
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'RRR',
|
title: 'RRR',
|
||||||
handler: () => {
|
handler: () => {
|
||||||
this.arrOrRRRModalVisible = true
|
if (this.isReAnalyed_gamma) {
|
||||||
this.arrOrRRRModalExtraData = {}
|
this.arrOrRRRModalVisible = true
|
||||||
this.arrOrRRRModalType = 2
|
this.arrOrRRRModalExtraData = {}
|
||||||
|
this.arrOrRRRModalType = 2
|
||||||
|
} else {
|
||||||
|
this.$message.warning('Please analyze the spectrum first!')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
},
|
},
|
||||||
|
@ -1010,28 +1086,36 @@ export default {
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'View ARR',
|
title: 'View ARR',
|
||||||
handler: () => {
|
|
||||||
this.arrOrRRRModalVisible = true
|
|
||||||
this.arrOrRRRModalExtraData = {}
|
|
||||||
this.arrOrRRRModalType = 3
|
|
||||||
},
|
|
||||||
show: this.isBetaGamma,
|
show: this.isBetaGamma,
|
||||||
|
handler: () => {
|
||||||
|
if (this.newSampleData.sampleId) {
|
||||||
|
this.arrOrRRRModalVisible = true
|
||||||
|
this.arrOrRRRModalExtraData = {}
|
||||||
|
this.arrOrRRRModalType = 3
|
||||||
|
} else {
|
||||||
|
this.$message.warning("The file isn't existed.")
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'View RRR',
|
title: 'View RRR',
|
||||||
handler: () => {
|
handler: () => {
|
||||||
this.arrOrRRRModalVisible = true
|
if (this.isReAnalyed_beta) {
|
||||||
this.arrOrRRRModalExtraData = {
|
this.arrOrRRRModalVisible = true
|
||||||
dbName: this.sampleData.dbName,
|
this.arrOrRRRModalExtraData = {
|
||||||
sampleData: false,
|
dbName: this.sampleData.dbName,
|
||||||
GasBgData: false,
|
sampleData: false,
|
||||||
DetBgData: false,
|
GasBgData: false,
|
||||||
QCData: false,
|
DetBgData: false,
|
||||||
bGammaEnergyValid: false,
|
QCData: false,
|
||||||
bBetaEnergyValid: false,
|
bGammaEnergyValid: false,
|
||||||
|
bBetaEnergyValid: false,
|
||||||
|
}
|
||||||
|
this.arrOrRRRModalType = 4
|
||||||
|
} else {
|
||||||
|
this.$message.warning('Please analyze the spectrum first!')
|
||||||
}
|
}
|
||||||
this.arrOrRRRModalType = 4
|
|
||||||
},
|
},
|
||||||
show: this.isBetaGamma,
|
show: this.isBetaGamma,
|
||||||
},
|
},
|
||||||
|
@ -1074,8 +1158,14 @@ export default {
|
||||||
title: 'Automatic Analysis Log',
|
title: 'Automatic Analysis Log',
|
||||||
show: this.isBetaGamma || this.isGamma,
|
show: this.isBetaGamma || this.isGamma,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1
|
if (this.isBetaGamma || this.isGamma) {
|
||||||
this.autoAnalysisMogModalVisible = true
|
if (this.newSampleData.sampleId) {
|
||||||
|
this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1
|
||||||
|
this.autoAnalysisMogModalVisible = true
|
||||||
|
} else {
|
||||||
|
this.$message.warning("The file isn't existed.")
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user