Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
f9472a529f
|
@ -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: {
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
import { Modal } from 'ant-design-vue'
|
import { Modal } from 'ant-design-vue'
|
||||||
import { saveAs } from 'file-saver'
|
import { saveAs } from 'file-saver'
|
||||||
import JSZip from 'jszip'
|
import JSZip from 'jszip'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import signMd5Utils from '@/utils/encryption/signMd5Utils'
|
||||||
|
import Axios from 'axios'
|
||||||
|
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
|
||||||
|
import { message } from 'ant-design-vue'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 弹窗填入文件名保存文件
|
* 弹窗填入文件名保存文件
|
||||||
|
@ -85,3 +90,52 @@ export const zipFile = async (fileList, zipName) => {
|
||||||
const content = await zip.generateAsync({ type: 'blob' })
|
const content = await zip.generateAsync({ type: 'blob' })
|
||||||
return new File([content], zipName, { type: content.type })
|
return new File([content], zipName, { type: content.type })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据响应头获取文件名
|
||||||
|
* @param {String} contentDisposition
|
||||||
|
*/
|
||||||
|
export function getFileNameByHeaderContentDisposition(contentDisposition) {
|
||||||
|
const patt = new RegExp('file[Nn]ame=([^;]+\\.[^\\.;]+);*')
|
||||||
|
contentDisposition = decodeURI(contentDisposition)
|
||||||
|
const result = patt.exec(contentDisposition)
|
||||||
|
let fileName = result[1]
|
||||||
|
fileName = fileName.replace(/"/g, '')
|
||||||
|
return fileName
|
||||||
|
}
|
||||||
|
|
||||||
|
export const fetchAndDownload = async (url, data) => {
|
||||||
|
const apiBaseUrl = window._CONFIG['domianURL'] || '/jeecg-boot'
|
||||||
|
const sign = signMd5Utils.getSign(url, data)
|
||||||
|
const response = await Axios({
|
||||||
|
baseURL: apiBaseUrl,
|
||||||
|
method: 'post',
|
||||||
|
url,
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'X-Sign': sign,
|
||||||
|
'X-TIMESTAMP': signMd5Utils.getTimestamp(),
|
||||||
|
'X-Access-Token': Vue.ls.get(ACCESS_TOKEN),
|
||||||
|
'tenant-id': Vue.ls.get(TENANT_ID)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const { status, headers, data: responseData } = response
|
||||||
|
if (status == 200) {
|
||||||
|
if (typeof responseData == 'object') {
|
||||||
|
const { message: msg } = responseData
|
||||||
|
message.error(msg)
|
||||||
|
throw new Error(msg)
|
||||||
|
} else {
|
||||||
|
const disposition = headers['content-disposition']
|
||||||
|
const fileName = getFileNameByHeaderContentDisposition(disposition)
|
||||||
|
if (typeof responseData == 'string') {
|
||||||
|
const blob = new Blob([responseData], { type: headers['content-type'] })
|
||||||
|
saveAs(blob, fileName)
|
||||||
|
return fileName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.error('This operation fails. Contact your system administrator')
|
||||||
|
throw new Error('This operation fails. Contact your system administrator')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -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() {
|
||||||
|
@ -334,6 +335,7 @@ export default {
|
||||||
} = this.sampleDetail[this.spectraType]
|
} = this.sampleDetail[this.spectraType]
|
||||||
const {
|
const {
|
||||||
XeData, // 右下角Result Display
|
XeData, // 右下角Result Display
|
||||||
|
savedAnalysisResult,
|
||||||
} = this.sampleDetail
|
} = this.sampleDetail
|
||||||
|
|
||||||
this.spectrumData = spectrumData
|
this.spectrumData = spectrumData
|
||||||
|
@ -350,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,
|
||||||
|
@ -434,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 {
|
||||||
|
@ -445,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,
|
||||||
|
|
17
src/views/spectrumAnalysis/clearSampleCache.js
Normal file
17
src/views/spectrumAnalysis/clearSampleCache.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import { deleteAction } from '@/api/manage'
|
||||||
|
/**
|
||||||
|
* 发起请求清理后端对sample的缓存
|
||||||
|
* @param {Array<any>} sampleList
|
||||||
|
*/
|
||||||
|
export const clearSampleCache = (sampleList) => {
|
||||||
|
sampleList.forEach(sample => {
|
||||||
|
const { inputFileName: fileName, sampleFileName, qcFileName } = sample
|
||||||
|
let url = '/gamma/delPHDCache',
|
||||||
|
params = { fileName }
|
||||||
|
if (sample.sampleType == 'B') {
|
||||||
|
url = '/spectrumAnalysis/deleteSpectrumCacheData'
|
||||||
|
params = { sampleFileName , qcFileName }
|
||||||
|
}
|
||||||
|
deleteAction(url, params)
|
||||||
|
})
|
||||||
|
}
|
|
@ -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>
|
||||||
|
|
|
@ -476,7 +476,8 @@ export default {
|
||||||
isAccepting: false,
|
isAccepting: false,
|
||||||
isReploting: false,
|
isReploting: false,
|
||||||
|
|
||||||
operationStack: [] // 操作记录
|
operationStack: [], // 操作记录
|
||||||
|
replotNeeded: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -563,6 +564,7 @@ export default {
|
||||||
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 = []
|
||||||
|
@ -611,13 +613,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.list.length) {
|
||||||
const selectedRow = this.list[index]
|
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) {
|
||||||
|
@ -1027,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(
|
||||||
|
@ -1100,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))
|
||||||
|
@ -1117,7 +1120,7 @@ export default {
|
||||||
|
|
||||||
// 重绘Peaks
|
// 重绘Peaks
|
||||||
redrawPeaks(peakList) {
|
redrawPeaks(peakList) {
|
||||||
this.option.series = this.option.series.filter((item) => {
|
this.option.series = this.option.series.filter(item => {
|
||||||
return !item.name.includes('Peak_')
|
return !item.name.includes('Peak_')
|
||||||
})
|
})
|
||||||
this.option.series.push(...this.buildPeaks(peakList))
|
this.option.series.push(...this.buildPeaks(peakList))
|
||||||
|
@ -1257,13 +1260,16 @@ export default {
|
||||||
|
|
||||||
// 将原先的基线和控制点移动到新位置
|
// 将原先的基线和控制点移动到新位置
|
||||||
async handleReplot() {
|
async handleReplot() {
|
||||||
|
if (!this.replotNeeded) {
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const { inputFileName: fileName } = this.sampleData
|
||||||
this.isReploting = true
|
this.isReploting = true
|
||||||
const { success, result, message } = await postAction('/gamma/replotBaseLine', {
|
const { success, result, message } = await postAction('/gamma/replotBaseLine', {
|
||||||
...this.baseCtrls_Copy,
|
...this.baseCtrls_Copy,
|
||||||
fileName,
|
fileName,
|
||||||
replotNeeded: true
|
replotNeeded: this.replotNeeded
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
const { chartData, peakSet, shapeData } = result
|
const { chartData, peakSet, shapeData } = result
|
||||||
|
@ -1295,6 +1301,7 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
this.BaseCtrls = cloneDeep(this.baseCtrls_Copy)
|
this.BaseCtrls = cloneDeep(this.baseCtrls_Copy)
|
||||||
|
this.replotNeeded = false
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
|
inputFileName: fileName,
|
||||||
|
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,
|
sampleId,
|
||||||
fileName,
|
fileName,
|
||||||
...this.extraData,
|
...this.extraData,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof res == 'string') {
|
if (typeof res == 'string') {
|
||||||
this.content = res
|
this.content = res
|
||||||
|
|
|
@ -110,6 +110,8 @@ export default {
|
||||||
item.mdc = item.mdc.toFixed(6)
|
item.mdc = item.mdc.toFixed(6)
|
||||||
})
|
})
|
||||||
this.$emit('sendXeData', res.result.XeData)
|
this.$emit('sendXeData', res.result.XeData)
|
||||||
|
this.$message.success('Analyse Success!')
|
||||||
|
this.visible = false
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,27 +471,41 @@ 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)
|
||||||
|
|
||||||
const betaSeries = this.betaSpectrumChartOption.series
|
this.model = cloneDeep(initialModel)
|
||||||
betaSeries[0].data = []
|
this.currFunction = funcList[this.model.fitType]
|
||||||
betaSeries[1].data = []
|
this.tableList = []
|
||||||
|
|
||||||
|
this.calculateTotalCount()
|
||||||
|
|
||||||
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 (isMouseLeft) {
|
||||||
|
// 如果有右值且左值大于等于右值,清空
|
||||||
|
if (!isNullOrUndefined(this.model.windowEnd) && xAxis >= this.model.windowEnd) {
|
||||||
|
this.clearMarkLineAndToolTip()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
currToolTip = this.customToolTip
|
||||||
|
|
||||||
|
markLineData[0].xAxis = xAxis
|
||||||
|
this.model.windowBegin = 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) {
|
if (xAxis > 225) {
|
||||||
this.customToolTip.left = offsetX - 125
|
currToolTip.left = offsetX - 125
|
||||||
} else {
|
} else {
|
||||||
this.customToolTip.left = offsetX + 20
|
currToolTip.left = offsetX + 20
|
||||||
}
|
}
|
||||||
this.customToolTip.visible = true
|
currToolTip.visible = true
|
||||||
this.customToolTip.channel = xAxis
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
|
||||||
const { success, result, message } = await getAction('/gamma/Compare', {
|
|
||||||
fileName,
|
|
||||||
compareFileName
|
|
||||||
})
|
|
||||||
if (success) {
|
|
||||||
this.visible = false
|
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,10 +3,10 @@
|
||||||
<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 v-model="canberraIecImsParams.msgId"></a-input>
|
<a-input v-model="params.msg_id"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Comment">
|
<a-form-model-item label="Comment">
|
||||||
<a-textarea v-model="canberraIecImsParams.comment"></a-textarea>
|
<a-textarea v-model="params.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">
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="canberraIecImsParams.startTime"
|
v-model="params.collect_start"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Stop Time">
|
<a-form-model-item label="Stop Time">
|
||||||
|
@ -22,12 +22,12 @@
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="canberraIecImsParams.stopTime"
|
v-model="params.collect_stop"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<div>
|
<div>
|
||||||
<p>Total air volume sampled</p>
|
<p>Total air volume sampled</p>
|
||||||
<a-input v-model="canberraIecImsParams.totalAir"></a-input>
|
<a-input-number v-model="params.air_volume" style="width: 100%;"></a-input-number>
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,43 +35,43 @@
|
||||||
<div class="header-block-list">
|
<div class="header-block-list">
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.designatorEditable"></a-checkbox>
|
||||||
Designator
|
Designator
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="canberraIecImsParams.designator"></a-input>
|
<a-input :disabled="!states.designatorEditable" v-model="params.designator"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.stationCodeEditable"></a-checkbox>
|
||||||
Station code
|
Station code
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="canberraIecImsParams.stationCode"></a-input>
|
<a-input :disabled="!states.stationCodeEditable" v-model="params.station"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.detectorCodeEditable"></a-checkbox>
|
||||||
Detector code
|
Detector code
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="canberraIecImsParams.detectorCode"></a-input>
|
<a-input :disabled="!states.detectorCodeEditable" v-model="params.detector"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.sampleGeometryEditable"></a-checkbox>
|
||||||
Sample geometry
|
Sample geometry
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="canberraIecImsParams.sampleGeometry"></a-input>
|
<a-input :disabled="!states.sampleGeometryEditable" v-model="params.sam_geom"></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 v-model="canberraIecImsParams.systemType">
|
<a-radio-group v-model="params.sys_type">
|
||||||
<a-radio value="P">P</a-radio>
|
<a-radio value="P">P</a-radio>
|
||||||
<a-radio value="G">G</a-radio>
|
<a-radio value="G">G</a-radio>
|
||||||
<a-radio value="B">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 v-model="canberraIecImsParams.spectrumQualifier">
|
<a-radio-group v-model="params.quantity">
|
||||||
<a-radio value="PREL">PREL</a-radio>
|
<a-radio value="PREL">PREL</a-radio>
|
||||||
<a-radio value="FULL">FULL</a-radio>
|
<a-radio value="FULL">FULL</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
|
@ -80,36 +80,27 @@
|
||||||
<div class="identifications">
|
<div class="identifications">
|
||||||
<div>
|
<div>
|
||||||
<p>Sample reference identification</p>
|
<p>Sample reference identification</p>
|
||||||
<a-input v-model="canberraIecImsParams.sampleRef"></a-input>
|
<a-input v-model="params.srId"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>Background measurement identification</p>
|
<p>Background measurement identification</p>
|
||||||
<a-input v-model="canberraIecImsParams.backgroundMea"></a-input>
|
<a-input v-model="params.bgMeasureId"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="transmit-time">
|
<div class="transmit-time">
|
||||||
<a-checkbox>Transmit time</a-checkbox>
|
<a-checkbox v-model="states.transmitTimeEditable">Transmit time</a-checkbox>
|
||||||
<custom-date-picker
|
<custom-date-picker
|
||||||
|
:disabled="!states.transmitTimeEditable"
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="canberraIecImsParams.transmitTime"
|
v-model="params.transmit"
|
||||||
/>
|
/>
|
||||||
</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">
|
<spectrum-transfer-com :params="params" :fileOptions="fileOptions" />
|
||||||
<div class="title">Canberra IEC1455(.IEC)</div>
|
|
||||||
<div class="data-type">
|
|
||||||
Data type
|
|
||||||
<div class="data-type-select">
|
|
||||||
<custom-select :option="[{ label: 'SAMPLEPHD', value: 1 }]" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="title">IMS .ims .rms</div>
|
|
||||||
</div>
|
|
||||||
<a-transfer></a-transfer>
|
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -117,28 +108,60 @@
|
||||||
<script>
|
<script>
|
||||||
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
import SpectrumTransferCom from './SpectrumTransferCom.vue'
|
||||||
|
|
||||||
|
const initParams = {
|
||||||
|
msg_id: '123456789',
|
||||||
|
comment: '',
|
||||||
|
collect_start: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
collect_stop: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
air_volume: '0',
|
||||||
|
designator: '3',
|
||||||
|
station: 'CNL06',
|
||||||
|
detector: 'CNL06_001',
|
||||||
|
sam_geom: 'DISC70MMX5MM',
|
||||||
|
sys_type: 'P',
|
||||||
|
quantity: 'FULL',
|
||||||
|
srId: '123456789',
|
||||||
|
bgMeasureId: '0',
|
||||||
|
transmit: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
}
|
||||||
|
|
||||||
|
const initStates = {
|
||||||
|
designatorEditable: false,
|
||||||
|
stationCodeEditable: false,
|
||||||
|
detectorCodeEditable: false,
|
||||||
|
sampleGeometryEditable: false,
|
||||||
|
transmitTimeEditable: false,
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder },
|
components: { TitleOverBorder, SpectrumTransferCom },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
canberraIecImsParams: {
|
params: cloneDeep(initParams),
|
||||||
msgId: '123456789',
|
states: cloneDeep(initStates),
|
||||||
comment: '',
|
fileOptions: [
|
||||||
startTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
{
|
||||||
stopTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
title: 'Canberra IEC1455(.IEC)',
|
||||||
totalAir: '0',
|
accept: '.IEC',
|
||||||
designator: '3',
|
transformUrl: '/gamma/ftransit/IecToIms',
|
||||||
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'),
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'IMS.ims.rms',
|
||||||
|
accept: '.IMS,.RMS,.PHD',
|
||||||
|
transformUrl: '/gamma/ftransit/ImsToIec'
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
beforeModalOpen() {
|
||||||
|
this.params = cloneDeep(initParams)
|
||||||
|
this.states = cloneDeep(initStates)
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -229,63 +252,5 @@ export default {
|
||||||
|
|
||||||
.spectrum-transfer {
|
.spectrum-transfer {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.title-container {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #225a6a;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-type {
|
|
||||||
width: 166px;
|
|
||||||
padding: 0 8px;
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
z-index: 1;
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
&-select {
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
padding: 8px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-transfer {
|
|
||||||
margin-top: 8px;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
|
|
||||||
::v-deep {
|
|
||||||
.ant-transfer {
|
|
||||||
&-list {
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-operation {
|
|
||||||
width: 150px;
|
|
||||||
|
|
||||||
.ant-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="int-spc-canberra-iec-transfer">
|
<div class="int-spc-canberra-iec-transfer">
|
||||||
<div class="spectrum-transfer">
|
<div class="spectrum-transfer">
|
||||||
<div class="title-container">
|
<spectrum-transfer-com :fileOptions="fileOptions" :showDataType="false" />
|
||||||
<div class="title">Select .SPC File</div>
|
|
||||||
<div class="title">Select .IEC File</div>
|
|
||||||
</div>
|
|
||||||
<a-transfer></a-transfer>
|
|
||||||
|
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
<p>使用说明</p>
|
<p>使用说明</p>
|
||||||
|
@ -17,64 +13,31 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
import SpectrumTransferCom from './SpectrumTransferCom.vue'
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder }
|
components: { SpectrumTransferCom },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fileOptions: [
|
||||||
|
{
|
||||||
|
title: 'Select .SPC File',
|
||||||
|
accept: '.SPC',
|
||||||
|
transformUrl: '/gamma/ftransit/SpcToIec',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Select .IEC File',
|
||||||
|
accept: '.IEC',
|
||||||
|
transformUrl: '/gamma/ftransit/IecToSpc',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
|
||||||
.spectrum-transfer {
|
.spectrum-transfer {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.title-container {
|
|
||||||
display: flex;
|
|
||||||
gap: 66px;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #225a6a;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-transfer {
|
|
||||||
margin-top: 8px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
::v-deep {
|
|
||||||
.ant-transfer {
|
|
||||||
&-list {
|
|
||||||
flex: 1;
|
|
||||||
height: 400px;
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-operation {
|
|
||||||
width: 50px;
|
|
||||||
|
|
||||||
.ant-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
margin-bottom: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.desc {
|
.desc {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
|
@ -82,5 +45,17 @@ export default {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spectrum-transfer-com {
|
||||||
|
grid-template-rows: 30px 450px;
|
||||||
|
grid-template-columns: 1fr 75px 1fr;
|
||||||
|
|
||||||
|
::v-deep {
|
||||||
|
.operators {
|
||||||
|
justify-content: center;
|
||||||
|
gap: 80px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
<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 v-model="intSpacImsParams.msgId"></a-input>
|
<a-input v-model="params.msg_id"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Comment">
|
<a-form-model-item label="Comment">
|
||||||
<a-textarea v-model="intSpacImsParams.comment"></a-textarea>
|
<a-textarea v-model="params.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">
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="intSpacImsParams.startTime"
|
v-model="params.collect_start"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Stop Time">
|
<a-form-model-item label="Stop Time">
|
||||||
|
@ -22,12 +22,12 @@
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="intSpacImsParams.stopTime"
|
v-model="params.collect_stop"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<div>
|
<div>
|
||||||
<p>Total air volume sampled</p>
|
<p>Total air volume sampled</p>
|
||||||
<a-input v-model="intSpacImsParams.totalAir"></a-input>
|
<a-input-number v-model="params.air_volume" style="width: 100%;"></a-input-number>
|
||||||
</div>
|
</div>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,43 +35,43 @@
|
||||||
<div class="header-block-list">
|
<div class="header-block-list">
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.designatorEditable"></a-checkbox>
|
||||||
Designator
|
Designator
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="intSpacImsParams.designator"></a-input>
|
<a-input :disabled="!states.designatorEditable" v-model="params.designator"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.stationCodeEditable"></a-checkbox>
|
||||||
Station code
|
Station code
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="intSpacImsParams.stationCode"></a-input>
|
<a-input :disabled="!states.stationCodeEditable" v-model="params.station"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.detectorCodeEditable"></a-checkbox>
|
||||||
Detector code
|
Detector code
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="intSpacImsParams.detectorCode"></a-input>
|
<a-input :disabled="!states.detectorCodeEditable" v-model="params.detector"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-block-item">
|
<div class="header-block-item">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox></a-checkbox>
|
<a-checkbox v-model="states.sampleGeometryEditable"></a-checkbox>
|
||||||
Sample geometry
|
Sample geometry
|
||||||
</div>
|
</div>
|
||||||
<a-input v-model="intSpacImsParams.sampleGeometry"></a-input>
|
<a-input :disabled="!states.sampleGeometryEditable" v-model="params.sam_geom"></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 v-model="intSpacImsParams.systemType">
|
<a-radio-group v-model="params.sys_type">
|
||||||
<a-radio value="P">P</a-radio>
|
<a-radio value="P">P</a-radio>
|
||||||
<a-radio value="G">G</a-radio>
|
<a-radio value="G">G</a-radio>
|
||||||
<a-radio value="B">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 v-model="intSpacImsParams.spectrumQualifier">
|
<a-radio-group v-model="params.quantity">
|
||||||
<a-radio value="PREL">PREL</a-radio>
|
<a-radio value="PREL">PREL</a-radio>
|
||||||
<a-radio value="FULL">FULL</a-radio>
|
<a-radio value="FULL">FULL</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
|
@ -80,36 +80,27 @@
|
||||||
<div class="identifications">
|
<div class="identifications">
|
||||||
<div>
|
<div>
|
||||||
<p>Sample reference identification</p>
|
<p>Sample reference identification</p>
|
||||||
<a-input v-model="intSpacImsParams.sampleRef"></a-input>
|
<a-input v-model="params.srId"></a-input>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>Background measurement identification</p>
|
<p>Background measurement identification</p>
|
||||||
<a-input v-model="intSpacImsParams.backgroundMea"></a-input>
|
<a-input v-model="params.bgMeasureId"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="transmit-time">
|
<div class="transmit-time">
|
||||||
<a-checkbox>Transmit time</a-checkbox>
|
<a-checkbox v-model="states.transmitTimeEditable">Transmit time</a-checkbox>
|
||||||
<custom-date-picker
|
<custom-date-picker
|
||||||
|
:disabled="!states.transmitTimeEditable"
|
||||||
show-time
|
show-time
|
||||||
format="YYYY/MM/DD HH:mm:ss"
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
v-model="intSpacImsParams.transmitTime"
|
v-model="params.transmit"
|
||||||
/>
|
/>
|
||||||
</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">
|
<spectrum-transfer-com :params="params" :fileOptions="fileOptions" />
|
||||||
<div class="title">ORTEC int.spc</div>
|
|
||||||
<div class="data-type">
|
|
||||||
Data type
|
|
||||||
<div class="data-type-select">
|
|
||||||
<custom-select :option="[{ label: 'SAMPLEPHD', value: 1 }]" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="title">IMS .ims .rms</div>
|
|
||||||
</div>
|
|
||||||
<a-transfer></a-transfer>
|
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -117,28 +108,60 @@
|
||||||
<script>
|
<script>
|
||||||
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
import TitleOverBorder from '../../../TitleOverBorder.vue'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
import SpectrumTransferCom from './SpectrumTransferCom.vue'
|
||||||
|
|
||||||
|
const initParams = {
|
||||||
|
msg_id: '123456789',
|
||||||
|
comment: '',
|
||||||
|
collect_start: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
collect_stop: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
air_volume: '0',
|
||||||
|
designator: '3',
|
||||||
|
station: 'CNL06',
|
||||||
|
detector: 'CNL06_001',
|
||||||
|
sam_geom: 'DISC70MMX5MM',
|
||||||
|
sys_type: 'P',
|
||||||
|
quantity: 'FULL',
|
||||||
|
srId: '123456789',
|
||||||
|
bgMeasureId: '0',
|
||||||
|
transmit: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
|
}
|
||||||
|
|
||||||
|
const initStates = {
|
||||||
|
designatorEditable: false,
|
||||||
|
stationCodeEditable: false,
|
||||||
|
detectorCodeEditable: false,
|
||||||
|
sampleGeometryEditable: false,
|
||||||
|
transmitTimeEditable: false,
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder },
|
components: { TitleOverBorder, SpectrumTransferCom },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
intSpacImsParams: {
|
params: cloneDeep(initParams),
|
||||||
msgId: '123456789',
|
states: cloneDeep(initStates),
|
||||||
comment: '',
|
fileOptions: [
|
||||||
startTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
{
|
||||||
stopTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'),
|
title: 'ORTEC int.spc',
|
||||||
totalAir: '0',
|
accept: '.SPC',
|
||||||
designator: '3',
|
transformUrl: '/gamma/ftransit/SpcToIms',
|
||||||
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'),
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'IMS.ims.rms',
|
||||||
|
accept: '.IMS,.RMS,.PHD',
|
||||||
|
transformUrl: '/gamma/ftransit/ImsToSpc'
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
beforeModalOpen() {
|
||||||
|
this.params = cloneDeep(initParams)
|
||||||
|
this.states = cloneDeep(initStates)
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -229,63 +252,5 @@ export default {
|
||||||
|
|
||||||
.spectrum-transfer {
|
.spectrum-transfer {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.title-container {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #225a6a;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-type {
|
|
||||||
width: 166px;
|
|
||||||
padding: 0 8px;
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
z-index: 1;
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
&-select {
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
padding: 8px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-transfer {
|
|
||||||
margin-top: 8px;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
|
|
||||||
::v-deep {
|
|
||||||
.ant-transfer {
|
|
||||||
&-list {
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-operation {
|
|
||||||
width: 150px;
|
|
||||||
|
|
||||||
.ant-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -0,0 +1,255 @@
|
||||||
|
<template>
|
||||||
|
<div class="spectrum-transfer-com">
|
||||||
|
<div class="title">
|
||||||
|
<a-upload
|
||||||
|
name="file"
|
||||||
|
:multiple="true"
|
||||||
|
:showUploadList="false"
|
||||||
|
:beforeUpload="beforeLeftFileUpload"
|
||||||
|
:accept="fileOptions[0].accept"
|
||||||
|
>
|
||||||
|
<div>{{ fileOptions[0].title }}</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
|
<div class="data-type">
|
||||||
|
<template v-if="showDataType"> Data type </template>
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<a-upload
|
||||||
|
name="file"
|
||||||
|
:multiple="true"
|
||||||
|
:showUploadList="false"
|
||||||
|
:beforeUpload="beforeRightFileUpload"
|
||||||
|
:accept="fileOptions[1].accept"
|
||||||
|
>
|
||||||
|
<div>{{ fileOptions[1].title }}</div>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
|
<div class="file-list">
|
||||||
|
<div
|
||||||
|
class="file-item"
|
||||||
|
:class="{ active: leftSelFileIndex == index }"
|
||||||
|
v-for="(file, index) in leftFileList"
|
||||||
|
:key="index"
|
||||||
|
@click="handleFileClick('left', index)"
|
||||||
|
>
|
||||||
|
{{ file.name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="operators">
|
||||||
|
<div class="data-type-select" v-if="showDataType">
|
||||||
|
<custom-select :options="dataTypeList" v-model="dataType" />
|
||||||
|
</div>
|
||||||
|
<div class="transit">
|
||||||
|
<a-button :disabled="leftSelFileIndex == null" type="primary" @click="handleTransfer('right')">
|
||||||
|
<a-icon type="double-right" />
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
<div class="transit">
|
||||||
|
<a-button :disabled="rightSelFileIndex == null" type="primary" @click="handleTransfer('left')">
|
||||||
|
<a-icon type="double-left" />
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="file-list">
|
||||||
|
<div
|
||||||
|
class="file-item"
|
||||||
|
:class="{ active: rightSelFileIndex == index }"
|
||||||
|
v-for="(file, index) in rightFileList"
|
||||||
|
:key="index"
|
||||||
|
@click="handleFileClick('right', index)"
|
||||||
|
>
|
||||||
|
{{ file.name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { fetchAndDownload } from '@/utils/file'
|
||||||
|
import { isNullOrUndefined } from '@/utils/util'
|
||||||
|
const dataTypeList = ['SAMPLEPHD', 'BLANKPHD', 'DETBKPHD', 'CALIBPHD', 'QCPHD']
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
msg_id: `MSG_ID can't be null`,
|
||||||
|
designator: `Designator can't be null!`,
|
||||||
|
station: `Station code can't be null!`,
|
||||||
|
detector: `Detector code can't be null!`,
|
||||||
|
sam_geom: `Sample geometry can't be null!`,
|
||||||
|
srId: `Sample reference identification can't be null!`,
|
||||||
|
air_volume: `The format of Total air volume sampled is error!`,
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
params: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
fileOptions: {
|
||||||
|
type: Array,
|
||||||
|
},
|
||||||
|
showDataType: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
this.dataTypeList = dataTypeList.map((item) => ({
|
||||||
|
label: item,
|
||||||
|
value: item,
|
||||||
|
}))
|
||||||
|
|
||||||
|
return {
|
||||||
|
dataType: dataTypeList[0],
|
||||||
|
leftFileList: [],
|
||||||
|
rightFileList: [],
|
||||||
|
|
||||||
|
leftSelFileIndex: null,
|
||||||
|
rightSelFileIndex: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
beforeLeftFileUpload(file) {
|
||||||
|
this.leftFileList = [...this.leftFileList, file]
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeRightFileUpload(file) {
|
||||||
|
this.rightFileList = [...this.rightFileList, file]
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFileClick(side, index) {
|
||||||
|
if (side == 'left') {
|
||||||
|
this.leftSelFileIndex = index
|
||||||
|
} else {
|
||||||
|
this.rightSelFileIndex = index
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
validateForm() {
|
||||||
|
const entries = Object.entries(this.params)
|
||||||
|
if (entries.length) {
|
||||||
|
for (const item of entries) {
|
||||||
|
const [k, v] = item
|
||||||
|
const rule = rules[k]
|
||||||
|
if (rule) {
|
||||||
|
// 如果这个字段需要验证
|
||||||
|
if (typeof v == 'string' && (!v || !v.trim())) {
|
||||||
|
this.$message.warn(rule)
|
||||||
|
return false
|
||||||
|
} else if (typeof v == 'object' && isNullOrUndefined(v)) {
|
||||||
|
this.$message.warn(rule)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 转换
|
||||||
|
async handleTransfer(target) {
|
||||||
|
const validate = this.validateForm()
|
||||||
|
if (!validate) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let url = this.fileOptions[1].transformUrl
|
||||||
|
let file = this.rightFileList[this.rightSelFileIndex]
|
||||||
|
const formData = new FormData()
|
||||||
|
|
||||||
|
if (target == 'right') {
|
||||||
|
url = this.fileOptions[0].transformUrl
|
||||||
|
file = this.leftFileList[this.leftSelFileIndex]
|
||||||
|
Object.entries(this.params).forEach(([k, v]) => {
|
||||||
|
if (['collect_start', 'collect_stop', 'transmit'].includes(k)) {
|
||||||
|
v = v + '.0'
|
||||||
|
}
|
||||||
|
formData.append(k, v)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file.size) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
formData.append('file', file)
|
||||||
|
|
||||||
|
if (this.showDataType) {
|
||||||
|
formData.append('data_type', this.dataType)
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const fileName = await fetchAndDownload(url, formData)
|
||||||
|
if (target == 'left') {
|
||||||
|
this.leftFileList.push({
|
||||||
|
name: fileName,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.rightFileList.push({
|
||||||
|
name: fileName,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.spectrum-transfer-com {
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: 30px 175px;
|
||||||
|
grid-template-columns: 1fr 166px 1fr;
|
||||||
|
row-gap: 8px;
|
||||||
|
column-gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: center;
|
||||||
|
background-color: #225a6a;
|
||||||
|
line-height: 30px;
|
||||||
|
/deep/.ant-upload {
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-type {
|
||||||
|
text-align: center;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-list {
|
||||||
|
background-color: #225a6a;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-item {
|
||||||
|
padding: 0 5px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #296d81;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.operators {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.transit {
|
||||||
|
.ant-btn {
|
||||||
|
height: 40px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<custom-modal v-model="visible" :width="1080" title="File-Format-Ftransit" :footer="null">
|
<custom-modal v-model="visible" :width="1080" title="File-Format-Ftransit" :footer="null" destroy-on-close>
|
||||||
<a-tabs :animated="false">
|
<a-tabs :animated="false">
|
||||||
<a-tab-pane tab="INT.SPC<=>.IMS" key="1">
|
<a-tab-pane tab="INT.SPC<=>.IMS" key="1">
|
||||||
<int-spc-ims-transfer />
|
<int-spc-ims-transfer />
|
||||||
|
|
|
@ -148,6 +148,7 @@
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
import * as XLSX from 'xlsx';
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
@ -183,15 +184,18 @@ const columns = [
|
||||||
const outputColumns = [
|
const outputColumns = [
|
||||||
{
|
{
|
||||||
title: 'Energy',
|
title: 'Energy',
|
||||||
dataIndex: 'energy'
|
dataIndex: 'energy',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Correct Factor',
|
title: 'Correct Factor',
|
||||||
dataIndex: 'correctFactor'
|
dataIndex: 'correctFactor',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Uncertainty(%)',
|
title: 'Uncertainty(%)',
|
||||||
dataIndex: 'uncertainty'
|
dataIndex: 'uncertainty',
|
||||||
|
customRender: (text) => parseFloat(Number(text).toPrecision(6))
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
|
@ -210,7 +214,10 @@ export default {
|
||||||
selectedItem: {}, // output中左侧选中的项
|
selectedItem: {}, // output中左侧选中的项
|
||||||
outputTableList: [], // output中表格列表数据
|
outputTableList: [], // output中表格列表数据
|
||||||
|
|
||||||
filterWord: '' // 筛选
|
filterWord: '', // 筛选
|
||||||
|
|
||||||
|
fileName: '', // save excel name
|
||||||
|
analyseData: {} // 分析结果
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -264,6 +271,7 @@ export default {
|
||||||
...this.efficiency,
|
...this.efficiency,
|
||||||
energys: this.list.map(item => item.energy)
|
energys: this.list.map(item => item.energy)
|
||||||
})
|
})
|
||||||
|
console.log(success);
|
||||||
if (success) {
|
if (success) {
|
||||||
this.list = result
|
this.list = result
|
||||||
} else {
|
} else {
|
||||||
|
@ -275,8 +283,22 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 分析
|
// 分析
|
||||||
handleAnalyze() {
|
async handleAnalyze() {
|
||||||
console.log('%c [ 分析 ]-178', 'font-size:13px; background:pink; color:#bf2c9f;')
|
console.log('%c [ 分析 ]-178', 'font-size:13px; background:pink; color:#bf2c9f;')
|
||||||
|
try {
|
||||||
|
this.isLoading = true
|
||||||
|
const { success, result, message } = await postAction('/gamma/KorSumAnalyse', this.list)
|
||||||
|
this.isLoading = false
|
||||||
|
if (success) {
|
||||||
|
this.analyseData = result
|
||||||
|
console.log(result);
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.isLoading = false;
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 退出
|
// 退出
|
||||||
|
@ -286,12 +308,66 @@ export default {
|
||||||
|
|
||||||
// output栏点击左侧列表
|
// output栏点击左侧列表
|
||||||
handleOutputItemClick(item) {
|
handleOutputItemClick(item) {
|
||||||
|
if(!this.analyseData) {
|
||||||
|
this.$message.error("Analyse Fail!")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
this.selectedItem = item
|
this.selectedItem = item
|
||||||
|
this.outputTableList = [];
|
||||||
|
|
||||||
|
// 根据核素名获取结果集
|
||||||
|
let data = this.analyseData[this.selectedItem]
|
||||||
|
if(!data || data.energy.length < 1) {
|
||||||
|
this.$message.error("Analyse Fail!")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let result = [];
|
||||||
|
for(let i = 0; i < data.energy.length; i++ ) {
|
||||||
|
// 将数据进行填充并
|
||||||
|
let obj = {
|
||||||
|
"energy": data.energy[i],
|
||||||
|
"correctFactor" : data.factor[i],
|
||||||
|
"uncertainty" : (data.factor[i] - 1) / 10 * 100
|
||||||
|
}
|
||||||
|
result.push(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.outputTableList = result;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导出到excel
|
// 导出到excel
|
||||||
handleExport() {
|
handleExport() {
|
||||||
console.log('%c [ 导出到excel ]-246', 'font-size:13px; background:pink; color:#bf2c9f;')
|
console.log('%c [ 导出到excel ]-246', 'font-size:13px; background:pink; color:#bf2c9f;')
|
||||||
|
let _this = this
|
||||||
|
this.$confirm({
|
||||||
|
title: 'Please enter file name',
|
||||||
|
content: (h) => <a-input v-model={_this.fileName} />,
|
||||||
|
okText: 'Cancle',
|
||||||
|
cancelText: 'Save',
|
||||||
|
okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
|
||||||
|
cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
|
||||||
|
onOk() {
|
||||||
|
console.log('Cancel')
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
console.log(_this.fileName);
|
||||||
|
if (_this.fileName) {
|
||||||
|
// saveAs(blob, `${_this.fileName}`)
|
||||||
|
// 创建工作簿
|
||||||
|
const workbook = XLSX.utils.book_new();
|
||||||
|
|
||||||
|
// 创建工作表
|
||||||
|
const worksheet = XLSX.utils.json_to_sheet(_this.outputTableList);
|
||||||
|
|
||||||
|
// 将工作表添加到工作簿
|
||||||
|
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
|
||||||
|
|
||||||
|
// 导出Excel文件
|
||||||
|
XLSX.writeFile(workbook, _this.fileName + ".xlsx");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -631,14 +631,27 @@ export default {
|
||||||
// 如果文件系统可用
|
// 如果文件系统可用
|
||||||
if (this.canUseFilePicker) {
|
if (this.canUseFilePicker) {
|
||||||
const propNames = ['sampleFileName', 'gasFileName', 'detFileName', 'qcFileName']
|
const propNames = ['sampleFileName', 'gasFileName', 'detFileName', 'qcFileName']
|
||||||
|
const propStatus = ['sampleFileStatus', 'gasFileStatus', 'detFileStatus', 'qcFileStatus']
|
||||||
const files = []
|
const files = []
|
||||||
|
const allFiles = []
|
||||||
for (const item of this.list) {
|
for (const item of this.list) {
|
||||||
propNames.forEach((propName) => {
|
if (item.fileType) {
|
||||||
|
let fileObj = {
|
||||||
|
files: [],
|
||||||
|
fileType: item.fileType,
|
||||||
|
}
|
||||||
|
propNames.forEach((propName, index) => {
|
||||||
const value = item[propName]
|
const value = item[propName]
|
||||||
if (value && value.file) {
|
if (value && value.file) {
|
||||||
|
fileObj[propStatus[index]] = true
|
||||||
files.push(value.file)
|
files.push(value.file)
|
||||||
|
fileObj.files.push(value.fileName)
|
||||||
|
} else {
|
||||||
|
fileObj[propStatus[index]] = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
allFiles.push(fileObj)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!files.length) {
|
if (!files.length) {
|
||||||
this.$message.warn('File is Empty ')
|
this.$message.warn('File is Empty ')
|
||||||
|
@ -649,24 +662,47 @@ export default {
|
||||||
try {
|
try {
|
||||||
const { success, message } = await this.uploadZipFile(zipedFiles)
|
const { success, message } = await this.uploadZipFile(zipedFiles)
|
||||||
if (success) {
|
if (success) {
|
||||||
try {
|
let result = []
|
||||||
const { success, result, message } = await getAction('/spectrumAnalysis/getFilesBySampleFile', {
|
console.log('allFiles', allFiles)
|
||||||
fileName: this.list
|
allFiles.forEach((el) => {
|
||||||
.filter((item) => item.sampleFileName)
|
let obj = {}
|
||||||
.map((item) => item.sampleFileName.file.name)
|
if (el.fileType == 'B') {
|
||||||
.join(','),
|
obj.sampleSystemType = el.fileType
|
||||||
|
el.files.forEach((item) => {
|
||||||
|
if (item.includes('_S_')) {
|
||||||
|
obj.sampleFileName = item
|
||||||
|
}
|
||||||
|
if (item.includes('_G_')) {
|
||||||
|
obj.gasFileName = item
|
||||||
|
obj.gasFileStatus = el.gasFileStatus
|
||||||
|
}
|
||||||
|
if (item.includes('_D_')) {
|
||||||
|
obj.detFileName = item
|
||||||
|
obj.detFileStatus = el.detFileStatus
|
||||||
|
}
|
||||||
|
if (item.includes('_Q_')) {
|
||||||
|
obj.qcFileName = item
|
||||||
|
obj.qcFileStatus = el.qcFileStatus
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if (success) {
|
|
||||||
this.visible = false
|
|
||||||
this.$emit('loadFormFile', result)
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
el.files.forEach((item) => {
|
||||||
|
if (item.includes('_S_')) {
|
||||||
|
obj.sampleSystemType = el.fileType
|
||||||
|
obj.sampleFileName = item
|
||||||
|
obj.gasFileName = ''
|
||||||
|
obj.detFileName = ''
|
||||||
|
obj.qcFileName = ''
|
||||||
}
|
}
|
||||||
} catch (error) {
|
})
|
||||||
console.error(error)
|
}
|
||||||
} finally {
|
result.push(obj)
|
||||||
|
})
|
||||||
|
console.log(result)
|
||||||
|
this.$emit('loadFormFile', result)
|
||||||
|
this.visible = false
|
||||||
this.isUploadingZip = false
|
this.isUploadingZip = false
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
this.isUploadingZip = false
|
this.isUploadingZip = false
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { clearSampleCache } from '../clearSampleCache'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
list: {
|
list: {
|
||||||
|
@ -43,7 +45,8 @@ export default {
|
||||||
this.handleClick(this.list[index + 1])
|
this.handleClick(this.list[index + 1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.list.splice(index, 1)
|
const deleted = this.list.splice(index, 1)
|
||||||
|
clearSampleCache(deleted)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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() {
|
||||||
|
@ -303,7 +313,7 @@ export default {
|
||||||
)
|
)
|
||||||
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||||
if (success) {
|
if (success) {
|
||||||
this.dataProsess(result, 'db')
|
this.dataProcess(result, 'db')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
@ -333,7 +343,7 @@ export default {
|
||||||
)
|
)
|
||||||
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||||
if (success) {
|
if (success) {
|
||||||
this.dataProsess(result, 'file')
|
this.dataProcess(result, 'file')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
@ -357,7 +367,7 @@ export default {
|
||||||
return cancelToken
|
return cancelToken
|
||||||
},
|
},
|
||||||
|
|
||||||
dataProsess(result, flag) {
|
dataProcess(result, flag) {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -379,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)
|
||||||
|
@ -516,7 +527,12 @@ export default {
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
this.opts.notMerge = true
|
||||||
this.option.series = series
|
this.option.series = series
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetChartOpts()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// chart 的 tooltip
|
// chart 的 tooltip
|
||||||
|
@ -777,7 +793,7 @@ export default {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.list = []
|
this.nuclideLibraryList = []
|
||||||
console.error(error)
|
console.error(error)
|
||||||
} finally {
|
} finally {
|
||||||
this.isLoadingNuclide = false
|
this.isLoadingNuclide = false
|
||||||
|
@ -1158,7 +1174,7 @@ export default {
|
||||||
this.handleResetState()
|
this.handleResetState()
|
||||||
data.DetailedInformation = this.detailedInfomation
|
data.DetailedInformation = this.detailedInfomation
|
||||||
this.clearCompareLine()
|
this.clearCompareLine()
|
||||||
this.dataProsess(data)
|
this.dataProcess(data)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 分析工具Accept时刷新部分数据
|
// 分析工具Accept时刷新部分数据
|
||||||
|
@ -1196,7 +1212,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 显示比较弹窗
|
// 显示比较弹窗
|
||||||
showCompareModal() {
|
showCompareModal(isStrip) {
|
||||||
if (this.isLoading) {
|
if (this.isLoading) {
|
||||||
this.$message.warn('Sample is Loading')
|
this.$message.warn('Sample is Loading')
|
||||||
return
|
return
|
||||||
|
@ -1204,10 +1220,36 @@ 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) {
|
||||||
|
const { inputFileName: fileName } = this.sample
|
||||||
|
|
||||||
|
try {
|
||||||
|
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.channelCompareLine = channelData
|
||||||
this.energyCompareLine = energyData
|
this.energyCompareLine = energyData
|
||||||
this.redrawLineBySeriesName('Compare', energyData, channelData, true, channelData.color)
|
this.redrawLineBySeriesName('Compare', energyData, channelData, true, channelData.color)
|
||||||
|
@ -1219,6 +1261,14 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.thumbnailOption.yAxis.max = getAxisMax(this.getChart(), 'yAxis')
|
this.thumbnailOption.yAxis.max = getAxisMax(this.getChart(), 'yAxis')
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 移除 Compare 线
|
// 移除 Compare 线
|
||||||
|
@ -1233,7 +1283,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重新分析
|
// 重新分析
|
||||||
async reProcessing() {
|
async reProcessing(showMessage = true) {
|
||||||
if (this.isProcessing) {
|
if (this.isProcessing) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1248,17 +1298,21 @@ export default {
|
||||||
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()
|
this.handleResetState()
|
||||||
result.DetailedInformation = this.detailedInfomation
|
result.DetailedInformation = this.detailedInfomation
|
||||||
this.dataProsess(result)
|
this.dataProcess(result)
|
||||||
} else {
|
} else {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
if(showMessage) {
|
||||||
const arr = message.split('\n')
|
const arr = message.split('\n')
|
||||||
this.$warning({
|
this.$warning({
|
||||||
title: 'Warning',
|
title: 'Warning',
|
||||||
content: () => arr.map((text) => <div>{text}</div>),
|
content: () => arr.map((text) => <div>{text}</div>),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -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 弹窗结束 -->
|
||||||
|
@ -231,10 +233,10 @@ 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'
|
||||||
|
import { clearSampleCache } from './clearSampleCache'
|
||||||
|
|
||||||
// 分析类型
|
// 分析类型
|
||||||
const ANALYZE_TYPE = {
|
const ANALYZE_TYPE = {
|
||||||
|
@ -277,7 +279,6 @@ export default {
|
||||||
StatisticsParamerHistoryModal,
|
StatisticsParamerHistoryModal,
|
||||||
FtransltModal,
|
FtransltModal,
|
||||||
BetaGammaEnergyCalibrationModal,
|
BetaGammaEnergyCalibrationModal,
|
||||||
StripModal,
|
|
||||||
AutomaticAnalysisLogModal,
|
AutomaticAnalysisLogModal,
|
||||||
BetaGammaExtrapolationModal,
|
BetaGammaExtrapolationModal,
|
||||||
},
|
},
|
||||||
|
@ -303,7 +304,6 @@ export default {
|
||||||
|
|
||||||
loadFromDbModalVisible: false, // 从数据库加载弹窗
|
loadFromDbModalVisible: false, // 从数据库加载弹窗
|
||||||
loadFromFileModalVisible: false, // 从文件加载弹窗
|
loadFromFileModalVisible: false, // 从文件加载弹窗
|
||||||
stripModalVisible: false, // Strip 弹窗
|
|
||||||
ftransltModalVisible: false, // Ftransit 弹窗
|
ftransltModalVisible: false, // Ftransit 弹窗
|
||||||
|
|
||||||
sampleData: {}, // 要分析的谱数据
|
sampleData: {}, // 要分析的谱数据
|
||||||
|
@ -383,6 +383,8 @@ export default {
|
||||||
xe135Flag: null,
|
xe135Flag: null,
|
||||||
},
|
},
|
||||||
updateFlag: '2',
|
updateFlag: '2',
|
||||||
|
isReAnalyed_gamma: false,
|
||||||
|
isReAnalyed_beta: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -400,6 +402,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
|
||||||
|
@ -407,7 +412,7 @@ 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) => {
|
arg.forEach((item) => {
|
||||||
item.conc = item.conc.toFixed(6)
|
item.conc = item.conc.toFixed(6)
|
||||||
item.concErr = item.concErr.toFixed(6)
|
item.concErr = item.concErr.toFixed(6)
|
||||||
|
@ -416,6 +421,7 @@ export default {
|
||||||
})
|
})
|
||||||
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
|
||||||
|
@ -474,6 +480,8 @@ export default {
|
||||||
|
|
||||||
// 清理全部
|
// 清理全部
|
||||||
handleCleanAll() {
|
handleCleanAll() {
|
||||||
|
clearSampleCache(this.sampleList)
|
||||||
|
|
||||||
this.sampleList = []
|
this.sampleList = []
|
||||||
this.analysisType = undefined
|
this.analysisType = undefined
|
||||||
this.sampleData = {}
|
this.sampleData = {}
|
||||||
|
@ -591,7 +599,21 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleReprocessAll() {
|
handleReprocessAll() {
|
||||||
console.log('%c [ handleReprocessAll ]-216', 'font-size:13px; background:pink; color:#bf2c9f;')
|
const { inputFileName, sampleType } = this.sampleData
|
||||||
|
|
||||||
|
// 先排除当前的谱
|
||||||
|
const otherSampleList = this.sampleList.filter((sample) => sample.inputFileName !== inputFileName)
|
||||||
|
|
||||||
|
const betaSamples = otherSampleList.filter((sample) => sample.sampleType == 'B')
|
||||||
|
const gammaSamples = otherSampleList.filter((sample) => sample.sampleType !== 'B')
|
||||||
|
gammaSamples.forEach((gammaSample) => {
|
||||||
|
postAction(`/gamma/Reprocessing?fileName=${gammaSample.inputFileName}`)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 处理当前的谱的reprocessing
|
||||||
|
if(inputFileName && sampleType !== 'B') {
|
||||||
|
this.$refs.gammaAnalysisRef.reProcessing(false)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查看Comments
|
// 查看Comments
|
||||||
|
@ -648,6 +670,7 @@ export default {
|
||||||
}
|
}
|
||||||
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.analyseCurrentSpectrumData = res.result
|
||||||
this.resultDisplayFlag = res.result.XeData
|
this.resultDisplayFlag = res.result.XeData
|
||||||
this.resultDisplayFlag.forEach((item) => {
|
this.resultDisplayFlag.forEach((item) => {
|
||||||
|
@ -723,24 +746,25 @@ 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 || this.isBetaGamma,
|
|
||||||
handler: () => (this.ftransltModalVisible = true),
|
handler: () => (this.ftransltModalVisible = true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Clean All',
|
title: 'Clean All',
|
||||||
handler: this.handleCleanAll,
|
handler: () => {
|
||||||
|
this.handleCleanAll()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -764,7 +788,8 @@ export default {
|
||||||
if (spectra) {
|
if (spectra) {
|
||||||
this.loadSelectedSample(spectra)
|
this.loadSelectedSample(spectra)
|
||||||
} else {
|
} else {
|
||||||
this.handleCleanAll()
|
this.analysisType = undefined
|
||||||
|
this.sampleData = {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -794,6 +819,7 @@ export default {
|
||||||
key: 'all',
|
key: 'all',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
key: 'resultsToDB',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Save PHD to File',
|
title: 'Save PHD to File',
|
||||||
|
@ -807,6 +833,7 @@ export default {
|
||||||
key: 'all',
|
key: 'all',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
key: 'phdToFile',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
width: '170px',
|
width: '170px',
|
||||||
|
@ -817,9 +844,9 @@ export default {
|
||||||
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)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -931,6 +958,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'NUCLIDELIBRARY',
|
title: 'NUCLIDELIBRARY',
|
||||||
|
show: !this.isBetaGamma,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: 'a-menu',
|
type: 'a-menu',
|
||||||
|
@ -938,13 +966,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),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -1032,9 +1058,13 @@ export default {
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'RRR',
|
title: 'RRR',
|
||||||
handler: () => {
|
handler: () => {
|
||||||
|
if (this.isReAnalyed_gamma) {
|
||||||
this.arrOrRRRModalVisible = true
|
this.arrOrRRRModalVisible = true
|
||||||
this.arrOrRRRModalExtraData = {}
|
this.arrOrRRRModalExtraData = {}
|
||||||
this.arrOrRRRModalType = 2
|
this.arrOrRRRModalType = 2
|
||||||
|
} else {
|
||||||
|
this.$message.warning('Please analyze the spectrum first!')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
},
|
},
|
||||||
|
@ -1075,17 +1105,22 @@ export default {
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'View ARR',
|
title: 'View ARR',
|
||||||
|
show: this.isBetaGamma,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
|
if (this.newSampleData.sampleId) {
|
||||||
this.arrOrRRRModalVisible = true
|
this.arrOrRRRModalVisible = true
|
||||||
this.arrOrRRRModalExtraData = {}
|
this.arrOrRRRModalExtraData = {}
|
||||||
this.arrOrRRRModalType = 3
|
this.arrOrRRRModalType = 3
|
||||||
|
} else {
|
||||||
|
this.$message.warning("The file isn't existed.")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
show: this.isBetaGamma,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'View RRR',
|
title: 'View RRR',
|
||||||
handler: () => {
|
handler: () => {
|
||||||
|
if (this.isReAnalyed_beta) {
|
||||||
this.arrOrRRRModalVisible = true
|
this.arrOrRRRModalVisible = true
|
||||||
this.arrOrRRRModalExtraData = {
|
this.arrOrRRRModalExtraData = {
|
||||||
dbName: this.sampleData.dbName,
|
dbName: this.sampleData.dbName,
|
||||||
|
@ -1097,6 +1132,9 @@ export default {
|
||||||
bBetaEnergyValid: false,
|
bBetaEnergyValid: false,
|
||||||
}
|
}
|
||||||
this.arrOrRRRModalType = 4
|
this.arrOrRRRModalType = 4
|
||||||
|
} else {
|
||||||
|
this.$message.warning('Please analyze the spectrum first!')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
show: this.isBetaGamma,
|
show: this.isBetaGamma,
|
||||||
},
|
},
|
||||||
|
@ -1139,16 +1177,13 @@ export default {
|
||||||
title: 'Automatic Analysis Log',
|
title: 'Automatic Analysis Log',
|
||||||
show: this.isBetaGamma || this.isGamma,
|
show: this.isBetaGamma || this.isGamma,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (this.isGamma) {
|
if (this.isBetaGamma || this.isGamma) {
|
||||||
if (this.newSampleData.sampleId) {
|
if (this.newSampleData.sampleId) {
|
||||||
this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1
|
this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1
|
||||||
this.autoAnalysisMogModalVisible = true
|
this.autoAnalysisMogModalVisible = true
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("The file isn't existed.")
|
this.$message.warning("The file isn't existed.")
|
||||||
}
|
}
|
||||||
} else if (this.isBetaGamma) {
|
|
||||||
this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1
|
|
||||||
this.autoAnalysisMogModalVisible = true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user