Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
28a5c15d03
|
@ -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']
|
const zrEvents = ['mousemove', 'mousedown', 'mouseup', 'click', 'dblclick']
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
option: {
|
option: {
|
||||||
|
|
|
@ -63,8 +63,10 @@ export default {
|
||||||
if (this.okHandler instanceof Function) {
|
if (this.okHandler instanceof Function) {
|
||||||
try {
|
try {
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
await this.okHandler()
|
const success = await this.okHandler()
|
||||||
this.visible = false
|
if(success !== false) {
|
||||||
|
this.visible = false
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -104,4 +104,14 @@ export function rangeNumber(min, max) {
|
||||||
return num => {
|
return num => {
|
||||||
return num > max ? max : num < min ? min : num
|
return num > max ? max : num < min ? min : num
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图表某条轴线的最大值
|
||||||
|
* @param {import("echarts").ECharts} chartInstance
|
||||||
|
* @param {'xAxis' | 'yAxis'} axis
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getAxisMax(chartInstance, axis) {
|
||||||
|
return chartInstance.getModel().getComponent(axis).axis.scale._extent[1]
|
||||||
}
|
}
|
10
src/utils/number.js
Normal file
10
src/utils/number.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import { isNullOrUndefined } from './util'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保留小数
|
||||||
|
* @param { string | number } num 数字
|
||||||
|
* @param { number } digit 保留位数
|
||||||
|
*/
|
||||||
|
export const toFixed = (num, digit) => {
|
||||||
|
return isNullOrUndefined(num) ? '' : Number(num).toFixed(digit)
|
||||||
|
}
|
|
@ -16,6 +16,7 @@
|
||||||
:options="SampleType"
|
:options="SampleType"
|
||||||
@change="changeChartByType"
|
@change="changeChartByType"
|
||||||
style="width: 246px"
|
style="width: 246px"
|
||||||
|
class="sample-select"
|
||||||
></custom-select>
|
></custom-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -437,6 +438,15 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sample-select {
|
||||||
|
::v-deep {
|
||||||
|
.ant-select-selection {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: #ade6ee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&-main {
|
&-main {
|
||||||
height: calc(100% - 51px);
|
height: calc(100% - 51px);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -358,6 +358,8 @@ export default {
|
||||||
|
|
||||||
this.emitRangeChange([0, 256, 0, 256])
|
this.emitRangeChange([0, 256, 0, 256])
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
|
||||||
|
this.rangeScatter()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击ROI
|
// 点击ROI
|
||||||
|
@ -409,7 +411,8 @@ export default {
|
||||||
|
|
||||||
// 改为不可刷选状态
|
// 改为不可刷选状态
|
||||||
chart.dispatchAction({
|
chart.dispatchAction({
|
||||||
type: 'takeGlobalCursor'
|
type: 'takeGlobalCursor',
|
||||||
|
rushOption: false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -436,11 +439,29 @@ export default {
|
||||||
this.emitRangeChange([x1, x2, y1, y2])
|
this.emitRangeChange([x1, x2, y1, y2])
|
||||||
|
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
|
||||||
|
this.rangeScatter()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearBrush(chart)
|
this.clearBrush(chart)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 因scatterGL 不受axis中max和min的控制,手动处理溢出部分
|
||||||
|
*/
|
||||||
|
rangeScatter() {
|
||||||
|
const {
|
||||||
|
xAxis: { min: minX, max: maxX },
|
||||||
|
yAxis: { min: minY, max: maxY }
|
||||||
|
} = this.twoDOption
|
||||||
|
|
||||||
|
const data = this.histogramDataList
|
||||||
|
.filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY)
|
||||||
|
.map(({ b, g, c }) => [b, g, c])
|
||||||
|
|
||||||
|
this.twoDOption.series.data = data
|
||||||
|
},
|
||||||
|
|
||||||
// 通知上层范围改变
|
// 通知上层范围改变
|
||||||
emitRangeChange(range) {
|
emitRangeChange(range) {
|
||||||
this.$emit('rangeChange', range)
|
this.$emit('rangeChange', range)
|
||||||
|
@ -462,6 +483,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
this.rangeScatter()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重绘矩形框区域
|
// 重绘矩形框区域
|
||||||
|
@ -705,6 +727,7 @@ export default {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
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.twoDOption.series.data = newVal.filter(item => item.c).map(item => [item.b, item.g, item.c]) // 设置2D Scatter数据
|
||||||
|
this.rangeScatter()
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
},
|
},
|
||||||
|
|
|
@ -407,6 +407,12 @@ const thumbnailOption = {
|
||||||
series: null
|
series: null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const nuclideIdentifyModal = {
|
||||||
|
possibleNuclide: '',
|
||||||
|
tolerance: 0.5,
|
||||||
|
identifiedNuclide: ''
|
||||||
|
}
|
||||||
|
|
||||||
// 操作类型
|
// 操作类型
|
||||||
export const Operators = {
|
export const Operators = {
|
||||||
ADD: 1, // 新增
|
ADD: 1, // 新增
|
||||||
|
@ -442,6 +448,7 @@ export default {
|
||||||
energy: [],
|
energy: [],
|
||||||
list: [],
|
list: [],
|
||||||
BaseCtrls: {},
|
BaseCtrls: {},
|
||||||
|
FitBaseLine: '#fff',
|
||||||
sampleId: -1,
|
sampleId: -1,
|
||||||
|
|
||||||
peakCommentModalVisible: false, // Comment 弹窗是否显示
|
peakCommentModalVisible: false, // Comment 弹窗是否显示
|
||||||
|
@ -454,11 +461,7 @@ export default {
|
||||||
fitPeaksAndBaselineModalVisible: false, // Fit Peaks And Base Line 弹窗
|
fitPeaksAndBaselineModalVisible: false, // Fit Peaks And Base Line 弹窗
|
||||||
nuclideReviewModalVisible: false, // Nuclide Review 弹窗
|
nuclideReviewModalVisible: false, // Nuclide Review 弹窗
|
||||||
|
|
||||||
model: {
|
model: cloneDeep(nuclideIdentifyModal),
|
||||||
possibleNuclide: '',
|
|
||||||
tolerance: 0.5,
|
|
||||||
identifiedNuclide: ''
|
|
||||||
},
|
|
||||||
|
|
||||||
currChannel: undefined, // 当currChannel前选中的channel
|
currChannel: undefined, // 当currChannel前选中的channel
|
||||||
selectedTableItem: undefined, // 当前选中的表格项
|
selectedTableItem: undefined, // 当前选中的表格项
|
||||||
|
@ -483,6 +486,9 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
this.option.series = []
|
this.option.series = []
|
||||||
|
this.thumbnailOption.series = []
|
||||||
|
this.list = []
|
||||||
|
this.model = cloneDeep(nuclideIdentifyModal)
|
||||||
|
|
||||||
const { success, result, message } = await getAction('/gamma/InteractiveTool', {
|
const { success, result, message } = await getAction('/gamma/InteractiveTool', {
|
||||||
sampleId: this.sampleId,
|
sampleId: this.sampleId,
|
||||||
|
@ -501,7 +507,8 @@ export default {
|
||||||
channelPeakChart,
|
channelPeakChart,
|
||||||
energy,
|
energy,
|
||||||
table,
|
table,
|
||||||
BaseCtrls
|
BaseCtrls,
|
||||||
|
FitBaseLine
|
||||||
} = result
|
} = result
|
||||||
|
|
||||||
console.log('%c [ ]-374', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
console.log('%c [ ]-374', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||||
|
@ -512,6 +519,7 @@ export default {
|
||||||
this.channelPeakChart = channelPeakChart
|
this.channelPeakChart = channelPeakChart
|
||||||
this.energy = energy
|
this.energy = energy
|
||||||
this.BaseCtrls = BaseCtrls
|
this.BaseCtrls = BaseCtrls
|
||||||
|
this.FitBaseLine = FitBaseLine
|
||||||
|
|
||||||
const series = []
|
const series = []
|
||||||
|
|
||||||
|
@ -1246,7 +1254,7 @@ export default {
|
||||||
const baseLineEditSeries = buildLineSeries(
|
const baseLineEditSeries = buildLineSeries(
|
||||||
'BaseLine_Edit',
|
'BaseLine_Edit',
|
||||||
this._channelBaseLineChart.pointlist.map(({ x, y }) => [x, y]),
|
this._channelBaseLineChart.pointlist.map(({ x, y }) => [x, y]),
|
||||||
'#fff',
|
this.FitBaseLine,
|
||||||
{
|
{
|
||||||
zlevel: 21
|
zlevel: 21
|
||||||
}
|
}
|
||||||
|
@ -1296,6 +1304,8 @@ export default {
|
||||||
buildGraphicRect(xAxis, yAxis) {
|
buildGraphicRect(xAxis, yAxis) {
|
||||||
const chart = this.$refs.chartRef.getChartInstance()
|
const chart = this.$refs.chartRef.getChartInstance()
|
||||||
const [xPix, yPix] = chart.convertToPixel('grid', [xAxis, yAxis])
|
const [xPix, yPix] = chart.convertToPixel('grid', [xAxis, yAxis])
|
||||||
|
const that = this
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: 'rect',
|
type: 'rect',
|
||||||
id: Math.random().toString(),
|
id: Math.random().toString(),
|
||||||
|
@ -1312,12 +1322,12 @@ export default {
|
||||||
fill: 'transparent',
|
fill: 'transparent',
|
||||||
lineWidth: 2
|
lineWidth: 2
|
||||||
},
|
},
|
||||||
draggable: false,
|
draggable: this.isModifying,
|
||||||
ondrag: function() {
|
ondrag: function() {
|
||||||
const [xPixel] = chart.convertToPixel('grid', [xAxis, yAxis])
|
const [xPixel] = chart.convertToPixel('grid', [xAxis, yAxis])
|
||||||
// 保持x轴不变
|
// 保持x轴不变
|
||||||
this.position[0] = xPixel
|
this.position[0] = xPixel
|
||||||
this.redrawBaseLine()
|
that.redrawBaseLine()
|
||||||
},
|
},
|
||||||
ondragend: ({ offsetY }) => {
|
ondragend: ({ offsetY }) => {
|
||||||
this.setGraphicDraggable(false)
|
this.setGraphicDraggable(false)
|
||||||
|
@ -1351,7 +1361,7 @@ export default {
|
||||||
|
|
||||||
// 重新生成基线
|
// 重新生成基线
|
||||||
redrawBaseLine() {
|
redrawBaseLine() {
|
||||||
console.log('%c [ 重新生成基线 ]-1355', 'font-size:13px; background:pink; color:#bf2c9f;', )
|
console.log('%c [ 重新生成基线 ]-1355', 'font-size:13px; background:pink; color:#bf2c9f;')
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据数据绘制 + 号
|
// 根据数据绘制 + 号
|
||||||
|
@ -1472,7 +1482,7 @@ export default {
|
||||||
|
|
||||||
// 修改控制点
|
// 修改控制点
|
||||||
handleModifyCP() {
|
handleModifyCP() {
|
||||||
this.setGraphicDraggable(true)
|
this.setGraphicDraggable(!this.isModifying)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 编辑斜率
|
// 编辑斜率
|
||||||
|
@ -1560,7 +1570,7 @@ export default {
|
||||||
this.channelBaseCPChart = this._channelBaseCPChart
|
this.channelBaseCPChart = this._channelBaseCPChart
|
||||||
|
|
||||||
this.handleSwitchOperation()
|
this.handleSwitchOperation()
|
||||||
|
|
||||||
this.$bus.$emit('accept')
|
this.$bus.$emit('accept')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -13,44 +13,40 @@
|
||||||
<a-form-model :colon="false" :labelCol="{ style: { width: '160px' } }">
|
<a-form-model :colon="false" :labelCol="{ style: { width: '160px' } }">
|
||||||
<a-form-model-item label="ECutAnalysis_Low">
|
<a-form-model-item label="ECutAnalysis_Low">
|
||||||
<div class="input-with-unit">
|
<div class="input-with-unit">
|
||||||
<a-input-number v-model="model.edit_ps_low"></a-input-number>
|
<a-input v-model="model.edit_ps_low"></a-input>
|
||||||
KeV
|
KeV
|
||||||
</div>
|
</div>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="ECutAnalysis_High">
|
<a-form-model-item label="ECutAnalysis_High">
|
||||||
<div class="input-with-unit">
|
<div class="input-with-unit">
|
||||||
<a-input-number v-model="model.edit_ps_high"></a-input-number>
|
<a-input v-model="model.edit_ps_high"></a-input>
|
||||||
KeV
|
KeV
|
||||||
</div>
|
</div>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="EnergyTolerance">
|
<a-form-model-item label="EnergyTolerance">
|
||||||
<div class="input-with-unit">
|
<div class="input-with-unit">
|
||||||
<a-input-number v-model="model.edit_energy"></a-input-number>
|
<a-input v-model="model.edit_energy"></a-input>
|
||||||
KeV
|
KeV
|
||||||
</div>
|
</div>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="PSS_low">
|
<a-form-model-item label="PSS_low">
|
||||||
<a-input-number v-model="model.edit_pss_low"></a-input-number>
|
<a-input v-model="model.edit_pss_low"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Calibration Peak Searching">
|
<title-over-border title="Calibration Peak Searching">
|
||||||
<a-form-model :colon="false" :labelCol="{ style: { width: '170px' } }">
|
<a-form-model :colon="false" :labelCol="{ style: { width: '170px' } }">
|
||||||
<a-form-model-item label="CalibrationPSS_low">
|
<a-form-model-item label="CalibrationPSS_low">
|
||||||
<a-input-number v-model="model.edit_cal_low" disabled></a-input-number>
|
<a-input v-model="model.edit_cal_low" disabled></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="CalibrationPSS_high">
|
<a-form-model-item label="CalibrationPSS_high">
|
||||||
<a-input-number v-model="model.edit_cal_high" disabled></a-input-number>
|
<a-input v-model="model.edit_cal_high" disabled></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item>
|
<a-form-model-item>
|
||||||
<a-checkbox v-model="model.checkBox_updateCal" disabled>
|
<a-checkbox v-model="model.checkBox_updateCal" disabled> Update Calibration </a-checkbox>
|
||||||
Update Calibration
|
|
||||||
</a-checkbox>
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item>
|
<a-form-model-item>
|
||||||
<a-checkbox v-model="model.checkBox_keepPeak" disabled>
|
<a-checkbox v-model="model.checkBox_keepPeak" disabled> Keep Calibration Peak Search Peaks </a-checkbox>
|
||||||
Keep Calibration Peak Search Peaks
|
|
||||||
</a-checkbox>
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
|
@ -61,13 +57,13 @@
|
||||||
<title-over-border title="Baseline Param">
|
<title-over-border title="Baseline Param">
|
||||||
<a-form-model :colon="false" :labelCol="{ style: { width: '90px' } }">
|
<a-form-model :colon="false" :labelCol="{ style: { width: '90px' } }">
|
||||||
<a-form-model-item label="k_back">
|
<a-form-model-item label="k_back">
|
||||||
<a-input-number v-model="model.edit_k_back"></a-input-number>
|
<a-input v-model="model.edit_k_back"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="k_alpha">
|
<a-form-model-item label="k_alpha">
|
||||||
<a-input-number v-model="model.edit_k_alpha"></a-input-number>
|
<a-input v-model="model.edit_k_alpha"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="k_beta">
|
<a-form-model-item label="k_beta">
|
||||||
<a-input-number v-model="model.edit_k_beta"></a-input-number>
|
<a-input v-model="model.edit_k_beta"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
|
@ -75,12 +71,12 @@
|
||||||
<a-form-model :colon="false" :labelCol="{ style: { width: '150px' } }">
|
<a-form-model :colon="false" :labelCol="{ style: { width: '150px' } }">
|
||||||
<title-over-border title="BaseImprove">
|
<title-over-border title="BaseImprove">
|
||||||
<a-form-model-item label="BaseImprovePSS">
|
<a-form-model-item label="BaseImprovePSS">
|
||||||
<a-input-number v-model="model.edit_bi_pss"></a-input-number>
|
<a-input v-model="model.edit_bi_pss"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="LC Computing" style="margin-top: 20px">
|
<title-over-border title="LC Computing" style="margin-top: 20px">
|
||||||
<a-form-model-item label="RiskLevelK">
|
<a-form-model-item label="RiskLevelK">
|
||||||
<a-input-number v-model="model.edit_riskLevelK"></a-input-number>
|
<a-input v-model="model.edit_riskLevelK"></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
|
@ -90,10 +86,20 @@
|
||||||
<!-- 第三行 -->
|
<!-- 第三行 -->
|
||||||
<div class="analysis-settings-item">
|
<div class="analysis-settings-item">
|
||||||
<title-over-border title="Activity Reference Time">
|
<title-over-border title="Activity Reference Time">
|
||||||
<custom-date-picker show-time v-model="model.dateTime_Act"></custom-date-picker>
|
<custom-date-picker
|
||||||
|
show-time
|
||||||
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
|
v-model="model.dateTime_Act"
|
||||||
|
></custom-date-picker>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Concentration Reference Time">
|
<title-over-border title="Concentration Reference Time">
|
||||||
<custom-date-picker show-time v-model="model.dateTime_Conc"></custom-date-picker>
|
<custom-date-picker
|
||||||
|
show-time
|
||||||
|
format="YYYY/MM/DD HH:mm:ss"
|
||||||
|
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||||
|
v-model="model.dateTime_Conc"
|
||||||
|
></custom-date-picker>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -106,10 +112,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import SampleDataMixin from '../../SampleDataMixin'
|
import SampleDataMixin from '../../SampleDataMixin'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { TitleOverBorder },
|
components: { TitleOverBorder },
|
||||||
|
@ -117,7 +124,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
model: {}
|
model: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -127,13 +134,18 @@ export default {
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await getAction('/gamma/configure', {
|
const { success, result, message } = await getAction('/gamma/configure', {
|
||||||
sampleId,
|
sampleId,
|
||||||
fileName
|
fileName,
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (success) {
|
if (success) {
|
||||||
this.model = result
|
if (result.edit_ps_high == -9999) {
|
||||||
|
result.edit_ps_high = 'inf'
|
||||||
|
}
|
||||||
|
|
||||||
console.log('%c [ ]-137', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
result.dateTime_Act = moment(result.dateTime_Act).format('YYYY/MM/DD HH:mm:ss')
|
||||||
|
result.dateTime_Conc = moment(result.dateTime_Conc).format('YYYY/MM/DD HH:mm:ss')
|
||||||
|
|
||||||
|
this.model = result
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -145,10 +157,56 @@ export default {
|
||||||
beforeModalOpen() {
|
beforeModalOpen() {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
},
|
},
|
||||||
handleOk() {
|
async handleOk() {
|
||||||
console.log('%c [ handleOk ]-121', 'font-size:13px; background:pink; color:#bf2c9f;')
|
try {
|
||||||
}
|
const { inputFileName: fileName } = this.sampleData
|
||||||
}
|
|
||||||
|
const {
|
||||||
|
edit_ps_low,
|
||||||
|
edit_ps_high,
|
||||||
|
edit_energy,
|
||||||
|
edit_pss_low,
|
||||||
|
edit_cal_low,
|
||||||
|
edit_cal_high,
|
||||||
|
edit_k_back,
|
||||||
|
edit_k_alpha,
|
||||||
|
edit_k_beta,
|
||||||
|
edit_bi_pss,
|
||||||
|
edit_riskLevelK,
|
||||||
|
dateTime_Act,
|
||||||
|
dateTime_Conc,
|
||||||
|
} = this.model
|
||||||
|
|
||||||
|
const param = {
|
||||||
|
fileName,
|
||||||
|
ecutAnalysis_Low: edit_ps_low,
|
||||||
|
ecutAnalysis_High: edit_ps_high == 'inf' ? -9999 : edit_ps_high,
|
||||||
|
energyTolerance: edit_energy,
|
||||||
|
pss_low: edit_pss_low,
|
||||||
|
calibrationPSS_low: edit_cal_low,
|
||||||
|
calibrationPSS_high: edit_cal_high,
|
||||||
|
k_back: edit_k_back,
|
||||||
|
k_alpha: edit_k_alpha,
|
||||||
|
k_beta: edit_k_beta,
|
||||||
|
baseImprovePSS: edit_bi_pss,
|
||||||
|
riskLevelK: edit_riskLevelK,
|
||||||
|
refTime_act: dateTime_Act,
|
||||||
|
refTime_conc: dateTime_Conc,
|
||||||
|
}
|
||||||
|
|
||||||
|
const { success, message } = await postAction('/gamma/configureSave', param)
|
||||||
|
if (success) {
|
||||||
|
this.$message.success('Save Success')
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -198,7 +256,7 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.ant-input-number {
|
.ant-input {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<custom-modal v-model="visible" :width="1000" :title="type == 1 || type == 3 ? 'ARR' : 'RRR'">
|
<custom-modal v-model="visible" :width="1200" :title="type == 1 || type == 3 ? 'ARR' : 'RRR'">
|
||||||
<a-spin :spinning="isLoading">
|
<a-spin :spinning="isLoading">
|
||||||
<pre>{{ content }}</pre>
|
<pre>{{ content }}</pre>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
@ -112,7 +112,7 @@ export default {
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
pre {
|
pre {
|
||||||
height: 450px;
|
height: calc(100vh - 350px);
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: #285367;
|
background-color: #285367;
|
||||||
|
|
|
@ -0,0 +1,138 @@
|
||||||
|
<template>
|
||||||
|
<custom-modal v-model="visible" :width="1200" title="File List">
|
||||||
|
<search-form :items="formItems" v-model="queryParam" @search="searchQuery"></search-form>
|
||||||
|
<custom-table
|
||||||
|
:columns="columns"
|
||||||
|
:list="dataSource"
|
||||||
|
:loading="loading"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:selectedRowKeys.sync="selectedRowKeys"
|
||||||
|
:selectionRows.sync="selectionRows"
|
||||||
|
:scroll="{ y: 440 }"
|
||||||
|
@change="handleTableChange"
|
||||||
|
></custom-table>
|
||||||
|
<div slot="custom-footer">
|
||||||
|
<a-button type="primary" :loading="isComparing" @click="handleOk">Compare</a-button>
|
||||||
|
<a-button @click="visible = false">Cancel</a-button>
|
||||||
|
</div>
|
||||||
|
</custom-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction } from '@/api/manage'
|
||||||
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
|
import SampleDataMixin from '../../SampleDataMixin'
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'Name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
width: '45%',
|
||||||
|
align: 'left',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'UpdateDate',
|
||||||
|
dataIndex: 'updateDate',
|
||||||
|
align: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Size',
|
||||||
|
dataIndex: 'size',
|
||||||
|
align: 'left'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const formItems = [
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
type: 'a-input',
|
||||||
|
name: 'searchName',
|
||||||
|
props: {
|
||||||
|
placeholder: 'search...'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [ModalMixin, JeecgListMixin, SampleDataMixin],
|
||||||
|
data() {
|
||||||
|
this.columns = columns
|
||||||
|
this.formItems = formItems
|
||||||
|
|
||||||
|
return {
|
||||||
|
queryParam: {},
|
||||||
|
selectedRowKeys: [],
|
||||||
|
selectionRows: [],
|
||||||
|
isComparing: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
beforeModalOpen() {
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
},
|
||||||
|
|
||||||
|
loadData(arg) {
|
||||||
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
|
if (arg === 1) {
|
||||||
|
this.ipagination.current = 1
|
||||||
|
}
|
||||||
|
this.onClearSelected()
|
||||||
|
|
||||||
|
const params = this.getQueryParams() //查询条件
|
||||||
|
const searchName = this.queryParam.searchName
|
||||||
|
params.name = `${searchName ? `${searchName},` : ''}_S_`
|
||||||
|
this.loading = true
|
||||||
|
getAction('/spectrumFile/get', params)
|
||||||
|
.then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataSource = res.result.records
|
||||||
|
this.dataSource.forEach((item, index) => {
|
||||||
|
item.id = index
|
||||||
|
})
|
||||||
|
if (res.result.total) {
|
||||||
|
this.ipagination.total = res.result.total
|
||||||
|
} else {
|
||||||
|
this.ipagination.total = 0
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async handleOk() {
|
||||||
|
if (!this.selectedRowKeys.length) {
|
||||||
|
this.$message.warn('Please Select A File to Compare')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
const compareFileName = this.selectionRows[0].name
|
||||||
|
|
||||||
|
this.isComparing = true
|
||||||
|
|
||||||
|
const { success, result, message } = await getAction('/gamma/Compare', {
|
||||||
|
fileName,
|
||||||
|
compareFileName
|
||||||
|
})
|
||||||
|
if (success) {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('compareWithFile', result)
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isComparing = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
|
@ -44,7 +44,7 @@
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
size="small"
|
size="small"
|
||||||
:class="list.length ? 'has-data' : ''"
|
:class="list.length ? 'has-data' : ''"
|
||||||
:scroll="{ y: 182 }"
|
:scroll="{ y: 193 }"
|
||||||
:selectedRowKeys.sync="selectedRowKeys"
|
:selectedRowKeys.sync="selectedRowKeys"
|
||||||
:canDeselect="false"
|
:canDeselect="false"
|
||||||
@rowClick="handleRowClick"
|
@rowClick="handleRowClick"
|
||||||
|
@ -52,7 +52,16 @@
|
||||||
<!-- 表格结束 -->
|
<!-- 表格结束 -->
|
||||||
<div class="operators">
|
<div class="operators">
|
||||||
<div>
|
<div>
|
||||||
<a-button type="primary">Call</a-button>
|
<label>
|
||||||
|
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
||||||
|
<input
|
||||||
|
ref="fileInput"
|
||||||
|
type="file"
|
||||||
|
accept=".ent"
|
||||||
|
style="display: none;"
|
||||||
|
@change="handleFileChange"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -107,7 +116,7 @@
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||||
import CustomChart from '@/components/CustomChart/index.vue'
|
import CustomChart from '@/components/CustomChart/index.vue'
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction, putAction } from '@/api/manage'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { buildLineSeries } from '@/utils/chartHelper'
|
import { buildLineSeries } from '@/utils/chartHelper'
|
||||||
import SampleDataMixin from '../../SampleDataMixin'
|
import SampleDataMixin from '../../SampleDataMixin'
|
||||||
|
@ -241,6 +250,7 @@ export default {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isCalling: false,
|
||||||
isSaving: false,
|
isSaving: false,
|
||||||
|
|
||||||
equation: '',
|
equation: '',
|
||||||
|
@ -491,6 +501,43 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 点击call按钮
|
||||||
|
handleCall() {
|
||||||
|
this.$refs.fileInput.click()
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleFileChange(event) {
|
||||||
|
const { files } = event.target
|
||||||
|
if (files.length) {
|
||||||
|
const file = files[0]
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file)
|
||||||
|
formData.append('sampleFileName', fileName)
|
||||||
|
formData.append('width', 922)
|
||||||
|
formData.append('currentText', this.currSelectedDataSource)
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.isCalling = true
|
||||||
|
const { success, result, message } = await postAction('/gamma/callDataEfficiency', formData)
|
||||||
|
if (success) {
|
||||||
|
const { ECutAnalysis_Low, G_energy_span } = result
|
||||||
|
this.ECutAnalysis_Low = ECutAnalysis_Low
|
||||||
|
this.G_energy_span = G_energy_span
|
||||||
|
|
||||||
|
this.handleResult(result)
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isCalling = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
event.target.value = ''
|
||||||
|
},
|
||||||
|
|
||||||
// 应用
|
// 应用
|
||||||
async handleApply() {
|
async handleApply() {
|
||||||
try {
|
try {
|
||||||
|
@ -526,8 +573,20 @@ export default {
|
||||||
this.getData(item)
|
this.getData(item)
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSetToCurrent() {
|
async handleSetToCurrent() {
|
||||||
this.appliedDataSource = this.currSelectedDataSource
|
this.appliedDataSource = this.currSelectedDataSource
|
||||||
|
try {
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
|
const { success, message } = await putAction(
|
||||||
|
`/gamma/setCurrentEfficiency?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||||
|
)
|
||||||
|
if (!success) {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -574,7 +633,7 @@ export default {
|
||||||
&.has-data {
|
&.has-data {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table-body {
|
.ant-table-body {
|
||||||
height: 182px;
|
height: 193px;
|
||||||
background-color: #06282a;
|
background-color: #06282a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -582,7 +641,7 @@ export default {
|
||||||
|
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table-placeholder {
|
.ant-table-placeholder {
|
||||||
height: 183px;
|
height: 194px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
size="small"
|
size="small"
|
||||||
:class="list.length ? 'has-data' : ''"
|
:class="list.length ? 'has-data' : ''"
|
||||||
:scroll="{ y: 182 }"
|
:scroll="{ y: 193 }"
|
||||||
:selectedRowKeys.sync="selectedRowKeys"
|
:selectedRowKeys.sync="selectedRowKeys"
|
||||||
:canDeselect="false"
|
:canDeselect="false"
|
||||||
@rowClick="handleRowClick"
|
@rowClick="handleRowClick"
|
||||||
|
@ -52,7 +52,16 @@
|
||||||
<!-- 表格结束 -->
|
<!-- 表格结束 -->
|
||||||
<div class="operators">
|
<div class="operators">
|
||||||
<div>
|
<div>
|
||||||
<a-button type="primary">Call</a-button>
|
<label>
|
||||||
|
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
||||||
|
<input
|
||||||
|
ref="fileInput"
|
||||||
|
type="file"
|
||||||
|
accept=".ent"
|
||||||
|
style="display: none;"
|
||||||
|
@change="handleFileChange"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -102,7 +111,7 @@
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||||
import CustomChart from '@/components/CustomChart/index.vue'
|
import CustomChart from '@/components/CustomChart/index.vue'
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction, putAction } from '@/api/manage'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { buildLineSeries } from '@/utils/chartHelper'
|
import { buildLineSeries } from '@/utils/chartHelper'
|
||||||
import SampleDataMixin from '../../SampleDataMixin'
|
import SampleDataMixin from '../../SampleDataMixin'
|
||||||
|
@ -203,6 +212,7 @@ export default {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isCalling: false,
|
||||||
isSaving: false,
|
isSaving: false,
|
||||||
|
|
||||||
equation: '',
|
equation: '',
|
||||||
|
@ -450,6 +460,43 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 点击call按钮
|
||||||
|
handleCall() {
|
||||||
|
this.$refs.fileInput.click()
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleFileChange(event) {
|
||||||
|
const { files } = event.target
|
||||||
|
if (files.length) {
|
||||||
|
const file = files[0]
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file)
|
||||||
|
formData.append('sampleFileName', fileName)
|
||||||
|
formData.append('width', 922)
|
||||||
|
formData.append('currentText', this.currSelectedDataSource)
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.isCalling = true
|
||||||
|
const { success, result, message } = await postAction('/gamma/callDataEnergy', formData)
|
||||||
|
if (success) {
|
||||||
|
const { rg_high, rg_low } = result
|
||||||
|
this.rg_high = rg_high
|
||||||
|
this.rg_low = rg_low
|
||||||
|
|
||||||
|
this.handleResult(result)
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isCalling = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
event.target.value = ''
|
||||||
|
},
|
||||||
|
|
||||||
// 应用
|
// 应用
|
||||||
async handleApply() {
|
async handleApply() {
|
||||||
try {
|
try {
|
||||||
|
@ -485,8 +532,20 @@ export default {
|
||||||
this.getData(item)
|
this.getData(item)
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSetToCurrent() {
|
async handleSetToCurrent() {
|
||||||
this.appliedDataSource = this.currSelectedDataSource
|
this.appliedDataSource = this.currSelectedDataSource
|
||||||
|
try {
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
|
const { success, message } = await putAction(
|
||||||
|
`/gamma/setCurrentEnergy?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||||
|
)
|
||||||
|
if (!success) {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -533,7 +592,7 @@ export default {
|
||||||
&.has-data {
|
&.has-data {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table-body {
|
.ant-table-body {
|
||||||
height: 182px;
|
height: 193px;
|
||||||
background-color: #06282a;
|
background-color: #06282a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -541,7 +600,7 @@ export default {
|
||||||
|
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table-placeholder {
|
.ant-table-placeholder {
|
||||||
height: 183px;
|
height: 194px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
:selectedRowKeys.sync="selectedRowKeys"
|
:selectedRowKeys.sync="selectedRowKeys"
|
||||||
:selectionRows.sync="selectionRows"
|
:selectionRows.sync="selectionRows"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
|
:scroll="{ y: 'calc(100vh - 550px)' }"
|
||||||
>
|
>
|
||||||
</custom-table>
|
</custom-table>
|
||||||
<!-- 底部操作栏 -->
|
<!-- 底部操作栏 -->
|
||||||
|
@ -51,7 +52,8 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'Detector',
|
title: 'Detector',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'detectorsName'
|
dataIndex: 'detectorsName',
|
||||||
|
width: 130
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Sample',
|
title: 'Sample',
|
||||||
|
@ -71,12 +73,14 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'Col.Stop',
|
title: 'Col.Stop',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'collectStop'
|
dataIndex: 'collectStop',
|
||||||
|
width: 170
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Acq.Start',
|
title: 'Acq.Start',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'acquisitionStart'
|
dataIndex: 'acquisitionStart',
|
||||||
|
width: 170
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Acq.real',
|
title: 'Acq.real',
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
:columns="daughterColumns"
|
:columns="daughterColumns"
|
||||||
:list="daughterList"
|
:list="daughterList"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ y: 123 }"
|
:scroll="{ y: 84 }"
|
||||||
rowKey="daughters"
|
rowKey="daughters"
|
||||||
@rowDblClick="handleParentDBClick($event.daughters)"
|
@rowDblClick="handleParentDBClick($event.daughters)"
|
||||||
></custom-table>
|
></custom-table>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
:columns="mainColumns"
|
:columns="mainColumns"
|
||||||
:dataSource="nuclLinesLibs"
|
:dataSource="nuclLinesLibs"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ y: 175 }"
|
:scroll="{ y: 330 }"
|
||||||
>
|
>
|
||||||
<template slot="keyLine" slot-scope="text">
|
<template slot="keyLine" slot-scope="text">
|
||||||
<span v-if="text == 1" class="green-check-mark"> </span>
|
<span v-if="text == 1" class="green-check-mark"> </span>
|
||||||
|
@ -115,6 +115,7 @@ import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import SampleDataMixin from '../../SampleDataMixin'
|
import SampleDataMixin from '../../SampleDataMixin'
|
||||||
|
import { toFixed } from '@/utils/number'
|
||||||
|
|
||||||
// 右上角表格配置
|
// 右上角表格配置
|
||||||
const daughterColumns = [
|
const daughterColumns = [
|
||||||
|
@ -151,22 +152,34 @@ const mainColumns = [
|
||||||
{
|
{
|
||||||
title: 'Energy(keV)',
|
title: 'Energy(keV)',
|
||||||
dataIndex: 'energy',
|
dataIndex: 'energy',
|
||||||
width: 100
|
width: 100,
|
||||||
|
customRender: text => {
|
||||||
|
return toFixed(text, 3)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Energy Uncert(%)',
|
title: 'Energy Uncert(%)',
|
||||||
dataIndex: 'energyUncert',
|
dataIndex: 'energyUncert',
|
||||||
width: 120
|
width: 120,
|
||||||
|
customRender: text => {
|
||||||
|
return text ? toFixed(text * 100, 6) : ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Yield',
|
title: 'Yield',
|
||||||
dataIndex: 'yield',
|
dataIndex: 'yield',
|
||||||
width: 80
|
width: 80,
|
||||||
|
customRender: text => {
|
||||||
|
return toFixed(text, 3)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Yield Uncert(%)',
|
title: 'Yield Uncert(%)',
|
||||||
dataIndex: 'yieldUncert',
|
dataIndex: 'yieldUncert',
|
||||||
width: 120
|
width: 120,
|
||||||
|
customRender: text => {
|
||||||
|
return toFixed(text, 3)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'KeyLine',
|
title: 'KeyLine',
|
||||||
|
@ -295,7 +308,7 @@ export default {
|
||||||
&-list {
|
&-list {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 516px;
|
height: 632px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: #275466;
|
background-color: #275466;
|
||||||
|
|
||||||
|
@ -339,7 +352,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
height: 150px;
|
height: 111px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.parents {
|
.parents {
|
||||||
|
@ -364,7 +377,7 @@ export default {
|
||||||
&.has-data {
|
&.has-data {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table-body {
|
.ant-table-body {
|
||||||
height: 123px;
|
height: 84px;
|
||||||
background-color: #06282a;
|
background-color: #06282a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,7 +386,7 @@ export default {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table {
|
.ant-table {
|
||||||
&-placeholder {
|
&-placeholder {
|
||||||
height: 124px;
|
height: 85px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -400,7 +413,7 @@ export default {
|
||||||
&.has-data {
|
&.has-data {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table-body {
|
.ant-table-body {
|
||||||
height: 175px;
|
height: 330px;
|
||||||
background-color: #06282a;
|
background-color: #06282a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -409,7 +422,7 @@ export default {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table {
|
.ant-table {
|
||||||
&-placeholder {
|
&-placeholder {
|
||||||
height: 176px;
|
height: 331px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
size="small"
|
size="small"
|
||||||
:class="list.length ? 'has-data' : ''"
|
:class="list.length ? 'has-data' : ''"
|
||||||
:scroll="{ y: 182 }"
|
:scroll="{ y: 193 }"
|
||||||
:selectedRowKeys.sync="selectedRowKeys"
|
:selectedRowKeys.sync="selectedRowKeys"
|
||||||
:canDeselect="false"
|
:canDeselect="false"
|
||||||
@rowClick="handleRowClick"
|
@rowClick="handleRowClick"
|
||||||
|
@ -52,7 +52,16 @@
|
||||||
<!-- 表格结束 -->
|
<!-- 表格结束 -->
|
||||||
<div class="operators">
|
<div class="operators">
|
||||||
<div>
|
<div>
|
||||||
<a-button type="primary">Call</a-button>
|
<label>
|
||||||
|
<a-button type="primary" :loading="isCalling" @click="handleCall">Call</a-button>
|
||||||
|
<input
|
||||||
|
ref="fileInput"
|
||||||
|
type="file"
|
||||||
|
accept=".ent"
|
||||||
|
style="display: none;"
|
||||||
|
@change="handleFileChange"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -102,7 +111,7 @@
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import TitleOverBorder from '../TitleOverBorder.vue'
|
import TitleOverBorder from '../TitleOverBorder.vue'
|
||||||
import CustomChart from '@/components/CustomChart/index.vue'
|
import CustomChart from '@/components/CustomChart/index.vue'
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction, putAction } from '@/api/manage'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { buildLineSeries } from '@/utils/chartHelper'
|
import { buildLineSeries } from '@/utils/chartHelper'
|
||||||
import SampleDataMixin from '../../SampleDataMixin'
|
import SampleDataMixin from '../../SampleDataMixin'
|
||||||
|
@ -203,6 +212,7 @@ export default {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isCalling: false,
|
||||||
isSaving: false,
|
isSaving: false,
|
||||||
|
|
||||||
equation: '',
|
equation: '',
|
||||||
|
@ -448,6 +458,43 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 点击call按钮
|
||||||
|
handleCall() {
|
||||||
|
this.$refs.fileInput.click()
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleFileChange(event) {
|
||||||
|
const { files } = event.target
|
||||||
|
if (files.length) {
|
||||||
|
const file = files[0]
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file)
|
||||||
|
formData.append('sampleFileName', fileName)
|
||||||
|
formData.append('width', 922)
|
||||||
|
formData.append('currentText', this.currSelectedDataSource)
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.isCalling = true
|
||||||
|
const { success, result, message } = await postAction('/gamma/callDataResolution', formData)
|
||||||
|
if (success) {
|
||||||
|
const { ECutAnalysis_Low, G_energy_span } = result
|
||||||
|
this.ECutAnalysis_Low = ECutAnalysis_Low
|
||||||
|
this.G_energy_span = G_energy_span
|
||||||
|
|
||||||
|
this.handleResult(result)
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isCalling = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
event.target.value = ''
|
||||||
|
},
|
||||||
|
|
||||||
// 应用
|
// 应用
|
||||||
async handleApply() {
|
async handleApply() {
|
||||||
try {
|
try {
|
||||||
|
@ -483,8 +530,20 @@ export default {
|
||||||
this.getData(item)
|
this.getData(item)
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSetToCurrent() {
|
async handleSetToCurrent() {
|
||||||
this.appliedDataSource = this.currSelectedDataSource
|
this.appliedDataSource = this.currSelectedDataSource
|
||||||
|
try {
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
|
const { success, message } = await putAction(
|
||||||
|
`/gamma/setCurrentResolution?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
|
||||||
|
)
|
||||||
|
if (!success) {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -531,7 +590,7 @@ export default {
|
||||||
&.has-data {
|
&.has-data {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table-body {
|
.ant-table-body {
|
||||||
height: 182px;
|
height: 193px;
|
||||||
background-color: #06282a;
|
background-color: #06282a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,7 +598,7 @@ export default {
|
||||||
|
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.ant-table-placeholder {
|
.ant-table-placeholder {
|
||||||
height: 183px;
|
height: 194px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -2,15 +2,12 @@
|
||||||
<custom-modal v-model="visible" :width="750" title="Sample Infomation">
|
<custom-modal v-model="visible" :width="750" title="Sample Infomation">
|
||||||
<a-spin :spinning="isLoading">
|
<a-spin :spinning="isLoading">
|
||||||
<div class="sample-infomation">
|
<div class="sample-infomation">
|
||||||
<a-form-model :labelCol="{ style: { width: '150px', textAlign: 'left' } }">
|
<a-row>
|
||||||
<a-row>
|
<a-col class="sample-infomation-item" :span="12" v-for="(item, index) in columns" :key="index">
|
||||||
<a-col :span="12" v-for="(item, index) in columns" :key="index">
|
<div class="label">{{ item.title }}:</div>
|
||||||
<a-form-model-item :label="item.title">
|
<div class="value">{{ data[item.key] }}</div>
|
||||||
{{ data[item.key] }}
|
</a-col>
|
||||||
</a-form-model-item>
|
</a-row>
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form-model>
|
|
||||||
</div>
|
</div>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<div slot="custom-footer" style="text-align: center;">
|
<div slot="custom-footer" style="text-align: center;">
|
||||||
|
@ -25,7 +22,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { getAction, getFileAction } from '@/api/manage'
|
import { getAction, getFileAction } from '@/api/manage'
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from 'file-saver'
|
||||||
import SampleDataMixin from '../../SampleDataMixin'
|
import SampleDataMixin from '../../SampleDataMixin'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
@ -125,19 +122,19 @@ export default {
|
||||||
},
|
},
|
||||||
// 导出到Excel
|
// 导出到Excel
|
||||||
handleExportToExcel() {
|
handleExportToExcel() {
|
||||||
this.fileName = ""
|
this.fileName = ''
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
if (Object.keys(this.data).length > 0) {
|
if (Object.keys(this.data).length > 0) {
|
||||||
let _this = this
|
let _this = this
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: 'Please enter file name',
|
title: 'Please enter file name',
|
||||||
content: h => <a-input v-model={_this.fileName} />,
|
content: h => <a-input v-model={_this.fileName} />,
|
||||||
okText: 'Cancle',
|
okText: 'Cancle',
|
||||||
cancelText: 'Save',
|
cancelText: 'Save',
|
||||||
okButtonProps: {style: {backgroundColor: "#b98326", color: "#fff", borderColor: "transparent"}},
|
okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
|
||||||
cancelButtonProps: {style: {color: "#fff", backgroundColor: "#31aab0", borderColor: "transparent"}},
|
cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
|
||||||
onOk() {
|
onOk() {
|
||||||
console.log('Cancel');
|
console.log('Cancel')
|
||||||
},
|
},
|
||||||
onCancel() {
|
onCancel() {
|
||||||
if (_this.fileName) {
|
if (_this.fileName) {
|
||||||
|
@ -147,17 +144,17 @@ export default {
|
||||||
}
|
}
|
||||||
getFileAction('/gamma/exportSampleInformation', params).then(res => {
|
getFileAction('/gamma/exportSampleInformation', params).then(res => {
|
||||||
if (res.code && res.code == 500) {
|
if (res.code && res.code == 500) {
|
||||||
this.$message.warning("This operation fails. Contact your system administrator")
|
this.$message.warning('This operation fails. Contact your system administrator')
|
||||||
} else {
|
} else {
|
||||||
const blob = new Blob([res], { type: "application/vnd.ms-excel" })
|
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||||
saveAs(blob, `${_this.fileName}`)
|
saveAs(blob, `${_this.fileName}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("No downloadable data")
|
this.$message.warning('No downloadable data')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,8 +166,14 @@ export default {
|
||||||
background-color: #143644;
|
background-color: #143644;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
||||||
.ant-form-item {
|
&-item {
|
||||||
margin-bottom: 0;
|
display: flex;
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
width: 150px;
|
||||||
|
color: #5b9cba;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction, putAction } from '@/api/manage'
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import SampleDataMixin from '../../SampleDataMixin'
|
import SampleDataMixin from '../../SampleDataMixin'
|
||||||
|
|
||||||
|
@ -16,13 +16,13 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
isAdd: {
|
isAdd: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
comments: ''
|
comments: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -30,18 +30,20 @@ export default {
|
||||||
beforeModalOpen() {
|
beforeModalOpen() {
|
||||||
if (this.isAdd) {
|
if (this.isAdd) {
|
||||||
this.comments = ''
|
this.comments = ''
|
||||||
|
this.getTotalComment()
|
||||||
} else {
|
} else {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// View接口
|
||||||
async getInfo() {
|
async getInfo() {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await getAction('/gamma/viewComment', {
|
const { success, result, message } = await getAction('/gamma/viewComment', {
|
||||||
sampleId,
|
sampleId,
|
||||||
fileName
|
fileName,
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -53,10 +55,35 @@ export default {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleOk() {
|
|
||||||
console.log('%c [ ]-26', 'font-size:13px; background:pink; color:#bf2c9f;', this.comments)
|
// Add 获取 Comment 接口
|
||||||
}
|
async getTotalComment() {
|
||||||
}
|
try {
|
||||||
|
this.isLoading = true
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
const { success, result, message } = await getAction('/gamma/viewGeneralComment', {
|
||||||
|
fileName,
|
||||||
|
})
|
||||||
|
this.isLoading = false
|
||||||
|
if (success) {
|
||||||
|
this.comments = result
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleOk() {
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
const { success, message } = await putAction(`/gamma/addComment?fileName=${fileName}&comment=${this.comments}`)
|
||||||
|
if (!success) {
|
||||||
|
this.$message.error(message)
|
||||||
|
throw new Error(message)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
v-if="!isLoading"
|
v-if="!isLoading"
|
||||||
slot="content"
|
slot="content"
|
||||||
@change="handleGraphAssistanceChange"
|
@change="handleGraphAssistanceChange"
|
||||||
@reset="handleReset"
|
@reset="handleResetChart"
|
||||||
/>
|
/>
|
||||||
</pop-over-with-icon>
|
</pop-over-with-icon>
|
||||||
<a-popover
|
<a-popover
|
||||||
|
@ -48,6 +48,7 @@
|
||||||
:option="option"
|
:option="option"
|
||||||
:opts="opts"
|
:opts="opts"
|
||||||
@zr:click="handleChartClick"
|
@zr:click="handleChartClick"
|
||||||
|
@zr:dblclick="handleChartDblClick"
|
||||||
@zr:mousedown="handleMouseDown"
|
@zr:mousedown="handleMouseDown"
|
||||||
@zr:mouseup="handleMouseUp"
|
@zr:mouseup="handleMouseUp"
|
||||||
@brushEnd="handleBrushEnd"
|
@brushEnd="handleBrushEnd"
|
||||||
|
@ -87,6 +88,11 @@
|
||||||
:channel="currChannel"
|
:channel="currChannel"
|
||||||
:nuclide="nuclideReview.nuclide"
|
:nuclide="nuclideReview.nuclide"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<compare-file-list-modal v-model="compareFileListModalVisible" @compareWithFile="handleCompareWithFile" />
|
||||||
|
<!-- ReProcessing 弹窗开始 -->
|
||||||
|
<re-processing-modal v-model="reprocessingModalVisible" />
|
||||||
|
<!-- ReProcessing 弹窗结束 -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -98,12 +104,20 @@ import QcFlags from './components/SubOperators/QcFlags.vue'
|
||||||
import GraphAssistance from './components/SubOperators/GraphAssistance.vue'
|
import GraphAssistance from './components/SubOperators/GraphAssistance.vue'
|
||||||
import NuclideLibrary from './components/SubOperators/NuclideLibrary.vue'
|
import NuclideLibrary from './components/SubOperators/NuclideLibrary.vue'
|
||||||
import ButtonWithSwitchIcon from './components/SubOperators/ButtonWithSwitchIcon.vue'
|
import ButtonWithSwitchIcon from './components/SubOperators/ButtonWithSwitchIcon.vue'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import Response from './response.json'
|
import Response from './response.json'
|
||||||
import { buildLineSeries, findSeriesByName, getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper'
|
import {
|
||||||
|
buildLineSeries,
|
||||||
|
findSeriesByName,
|
||||||
|
getAxisMax,
|
||||||
|
getXAxisAndYAxisByPosition,
|
||||||
|
rangeNumber,
|
||||||
|
} from '@/utils/chartHelper'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import NuclideReviewModal from './components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue'
|
import NuclideReviewModal from './components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue'
|
||||||
|
import CompareFileListModal from './components/Modals/CompareFileListModal.vue'
|
||||||
|
import ReProcessingModal from './components/Modals/ReProcessingModal/index.vue'
|
||||||
|
|
||||||
// 初始配置
|
// 初始配置
|
||||||
const initialOption = {
|
const initialOption = {
|
||||||
|
@ -248,6 +262,7 @@ const thumbnailOption = {
|
||||||
|
|
||||||
const graphAssistance = {
|
const graphAssistance = {
|
||||||
axisType: 'Channel',
|
axisType: 'Channel',
|
||||||
|
spectrumType: 'Lines',
|
||||||
Baseline: true,
|
Baseline: true,
|
||||||
SCAC: true,
|
SCAC: true,
|
||||||
Lc: true,
|
Lc: true,
|
||||||
|
@ -268,6 +283,8 @@ export default {
|
||||||
NuclideLibrary,
|
NuclideLibrary,
|
||||||
ButtonWithSwitchIcon,
|
ButtonWithSwitchIcon,
|
||||||
NuclideReviewModal,
|
NuclideReviewModal,
|
||||||
|
CompareFileListModal,
|
||||||
|
ReProcessingModal,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -301,6 +318,10 @@ export default {
|
||||||
nuclide: '',
|
nuclide: '',
|
||||||
},
|
},
|
||||||
currChannel: -1,
|
currChannel: -1,
|
||||||
|
|
||||||
|
compareFileListModalVisible: false, // Compare 弹窗
|
||||||
|
reprocessingModalVisible: false, // 重新分析弹窗
|
||||||
|
isProcessing: false, // 正在处理
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -323,7 +344,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
|
|
||||||
this.reset()
|
this.handleResetState()
|
||||||
|
|
||||||
// const { success, result, message } = Response
|
// const { success, result, message } = Response
|
||||||
|
|
||||||
|
@ -358,8 +379,7 @@ export default {
|
||||||
const { inputFileName: fileName } = this.sample
|
const { inputFileName: fileName } = this.sample
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
this.option.series = []
|
this.handleResetState()
|
||||||
this.thumbnailOption.series = []
|
|
||||||
// const { success, result, message } = Response
|
// const { success, result, message } = Response
|
||||||
const { success, result, message } = await getAction('/gamma/gammaByFile', {
|
const { success, result, message } = await getAction('/gamma/gammaByFile', {
|
||||||
fileName,
|
fileName,
|
||||||
|
@ -438,11 +458,7 @@ export default {
|
||||||
this.shapeChannelData = shapeChannelData
|
this.shapeChannelData = shapeChannelData
|
||||||
this.shapeEnergyData = shapeEnergyData
|
this.shapeEnergyData = shapeEnergyData
|
||||||
|
|
||||||
this.option.yAxis.max =
|
this.resetThumbnailChartDataMax()
|
||||||
shadowChannelChart.pointlist && Math.ceil(Math.max(...shadowChannelChart.pointlist.map((item) => item.y)) * 1.1)
|
|
||||||
this.thumbnailOption.yAxis.max =
|
|
||||||
shadowChannelChart.pointlist && Math.ceil(Math.max(...shadowChannelChart.pointlist.map((item) => item.y)) * 1.1)
|
|
||||||
|
|
||||||
const series = []
|
const series = []
|
||||||
|
|
||||||
// 推入Spectrum Line
|
// 推入Spectrum Line
|
||||||
|
@ -452,6 +468,7 @@ export default {
|
||||||
shadowChannelChart.pointlist && shadowChannelChart.pointlist.map(({ x, y }) => [x, y]),
|
shadowChannelChart.pointlist && shadowChannelChart.pointlist.map(({ x, y }) => [x, y]),
|
||||||
shadowChannelChart.color,
|
shadowChannelChart.color,
|
||||||
{
|
{
|
||||||
|
symbolSize: 2,
|
||||||
markLine: {
|
markLine: {
|
||||||
silent: true,
|
silent: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
|
@ -565,6 +582,14 @@ export default {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
series.push(...peakLines)
|
series.push(...peakLines)
|
||||||
|
|
||||||
|
// 推入Compare Line
|
||||||
|
series.push(
|
||||||
|
buildLineSeries('Compare', [], '#fff', {
|
||||||
|
symbolSize: 2,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
this.option.series = series
|
this.option.series = series
|
||||||
|
|
||||||
this.option.tooltip.formatter = this.tooltipFormatter
|
this.option.tooltip.formatter = this.tooltipFormatter
|
||||||
|
@ -589,25 +614,29 @@ export default {
|
||||||
|
|
||||||
// Graph Assistance 操作
|
// Graph Assistance 操作
|
||||||
handleGraphAssistanceChange({ type, label, value }) {
|
handleGraphAssistanceChange({ type, label, value }) {
|
||||||
|
const spectrumLineSeries = findSeriesByName(this.option.series, 'Spectrum')
|
||||||
|
const thumbnailSpectrumLineSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
||||||
|
const compareLineSeries = findSeriesByName(this.option.series, 'Compare')
|
||||||
|
|
||||||
// 类型变化
|
// 类型变化
|
||||||
if (type == 'labelChange') {
|
if (type == 'labelChange') {
|
||||||
switch (label) {
|
switch (label) {
|
||||||
case 'Linear':
|
case 'Linear':
|
||||||
this.option.yAxis.type = 'value'
|
this.option.yAxis.type = 'value'
|
||||||
this.thumbnailOption.yAxis.type = 'value'
|
this.thumbnailOption.yAxis.type = 'value'
|
||||||
this.handleReset()
|
this.handleResetChart()
|
||||||
break
|
break
|
||||||
case 'Log10':
|
case 'Log10':
|
||||||
this.option.yAxis.type = 'log'
|
this.option.yAxis.type = 'log'
|
||||||
this.thumbnailOption.yAxis.type = 'log'
|
this.thumbnailOption.yAxis.type = 'log'
|
||||||
this.handleReset()
|
this.handleResetChart()
|
||||||
break
|
break
|
||||||
case 'Channel':
|
case 'Channel':
|
||||||
case 'Energy':
|
case 'Energy':
|
||||||
this.graphAssistance.axisType = label
|
this.graphAssistance.axisType = label
|
||||||
this.option.xAxis.name = label
|
this.option.xAxis.name = label
|
||||||
|
|
||||||
this.handleReset()
|
this.handleResetChart()
|
||||||
|
|
||||||
this.redrawLineBySeriesName(
|
this.redrawLineBySeriesName(
|
||||||
'BaseLine',
|
'BaseLine',
|
||||||
|
@ -628,20 +657,44 @@ export default {
|
||||||
this.redrawPeakLine()
|
this.redrawPeakLine()
|
||||||
|
|
||||||
this.redrawThumbnailChart()
|
this.redrawThumbnailChart()
|
||||||
|
|
||||||
|
if (this.channelCompareLine) {
|
||||||
|
this.redrawLineBySeriesName('Compare', this.energyCompareLine, this.channelCompareLine)
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case 'Lines':
|
case 'Lines':
|
||||||
this.option.series[0].type = 'line'
|
this.graphAssistance.spectrumType = 'Lines'
|
||||||
this.option.series[0].symbol = 'none'
|
|
||||||
|
|
||||||
this.thumbnailOption.series[0].type = 'line'
|
spectrumLineSeries.type = 'line'
|
||||||
this.thumbnailOption.series[0].symbol = 'none'
|
spectrumLineSeries.symbol = 'none'
|
||||||
|
|
||||||
|
thumbnailSpectrumLineSeries.type = 'line'
|
||||||
|
thumbnailSpectrumLineSeries.symbol = 'none'
|
||||||
|
|
||||||
|
compareLineSeries.type = 'line'
|
||||||
|
compareLineSeries.symbol = 'none'
|
||||||
|
|
||||||
|
this.redrawLineBySeriesName('Spectrum', this.shadowEnergyChart, this.shadowChannelChart)
|
||||||
|
|
||||||
|
if (this.channelCompareLine) {
|
||||||
|
this.redrawLineBySeriesName('Compare', this.energyCompareLine, this.channelCompareLine)
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case 'Scatter':
|
case 'Scatter':
|
||||||
this.option.series[0].type = 'scatter'
|
this.graphAssistance.spectrumType = 'Scatter'
|
||||||
this.option.series[0].symbol = 'circle'
|
|
||||||
|
|
||||||
this.thumbnailOption.series[0].type = 'scatter'
|
spectrumLineSeries.type = 'scatterGL'
|
||||||
this.thumbnailOption.series[0].symbol = 'circle'
|
spectrumLineSeries.symbol = 'circle'
|
||||||
|
|
||||||
|
thumbnailSpectrumLineSeries.type = 'scatterGL'
|
||||||
|
thumbnailSpectrumLineSeries.symbol = 'circle'
|
||||||
|
|
||||||
|
compareLineSeries.type = 'scatterGL'
|
||||||
|
compareLineSeries.symbol = 'circle'
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.rangeScatter()
|
||||||
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -653,9 +706,9 @@ export default {
|
||||||
case 'Cursor':
|
case 'Cursor':
|
||||||
// 显示红色竖线
|
// 显示红色竖线
|
||||||
if (value) {
|
if (value) {
|
||||||
this.option.series[0].markLine.lineStyle.width = 2
|
spectrumLineSeries.markLine.lineStyle.width = 2
|
||||||
} else {
|
} else {
|
||||||
this.option.series[0].markLine.lineStyle.width = 0
|
spectrumLineSeries.markLine.lineStyle.width = 0
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'Baseline':
|
case 'Baseline':
|
||||||
|
@ -676,7 +729,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据seriesName重绘线
|
// 根据seriesName重绘线
|
||||||
redrawLineBySeriesName(seriesName, energyData, channelData, isShow = true) {
|
redrawLineBySeriesName(seriesName, energyData, channelData, isShow = true, color) {
|
||||||
const series = findSeriesByName(this.option.series, seriesName)
|
const series = findSeriesByName(this.option.series, seriesName)
|
||||||
if (isShow) {
|
if (isShow) {
|
||||||
const data = this.isEnergy() ? energyData : channelData
|
const data = this.isEnergy() ? energyData : channelData
|
||||||
|
@ -684,6 +737,9 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
series.data = []
|
series.data = []
|
||||||
}
|
}
|
||||||
|
if (color) {
|
||||||
|
series.itemStyle.color = color
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重绘控制点
|
// 重绘控制点
|
||||||
|
@ -728,7 +784,7 @@ export default {
|
||||||
|
|
||||||
// 重绘右上角的缩略图
|
// 重绘右上角的缩略图
|
||||||
redrawThumbnailChart() {
|
redrawThumbnailChart() {
|
||||||
const series = this.thumbnailOption.series[0]
|
const series = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
||||||
const data = this.isEnergy() ? this.shadowEnergyChart : this.shadowChannelChart
|
const data = this.isEnergy() ? this.shadowEnergyChart : this.shadowChannelChart
|
||||||
series.data = data.pointlist.map(({ x, y }) => [x, y])
|
series.data = data.pointlist.map(({ x, y }) => [x, y])
|
||||||
},
|
},
|
||||||
|
@ -736,10 +792,11 @@ export default {
|
||||||
// 点击图表,设置红线
|
// 点击图表,设置红线
|
||||||
handleChartClick(param) {
|
handleChartClick(param) {
|
||||||
const { offsetX, offsetY } = param
|
const { offsetX, offsetY } = param
|
||||||
const point = getXAxisAndYAxisByPosition(this.$refs.chartRef.getChartInstance(), offsetX, offsetY)
|
const point = getXAxisAndYAxisByPosition(this.getChart(), offsetX, offsetY)
|
||||||
if (point) {
|
if (point) {
|
||||||
const xAxis = point[0]
|
const xAxis = point[0]
|
||||||
this.option.series[0].markLine.data[0].xAxis = xAxis
|
const spectrumLineSeries = findSeriesByName(this.option.series, 'Spectrum')
|
||||||
|
spectrumLineSeries.markLine.data[0].xAxis = xAxis
|
||||||
|
|
||||||
const channel = this.isEnergy() ? this.getChannelByEnergy(xAxis) : parseInt(xAxis.toFixed())
|
const channel = this.isEnergy() ? this.getChannelByEnergy(xAxis) : parseInt(xAxis.toFixed())
|
||||||
const energy = this.isEnergy()
|
const energy = this.isEnergy()
|
||||||
|
@ -752,6 +809,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 双击还原
|
||||||
|
handleChartDblClick() {
|
||||||
|
this.handleResetChart()
|
||||||
|
},
|
||||||
|
|
||||||
// 获取 Nuclide Library 数据
|
// 获取 Nuclide Library 数据
|
||||||
async getSelPosNuclide(channel) {
|
async getSelPosNuclide(channel) {
|
||||||
this.currChannel = channel
|
this.currChannel = channel
|
||||||
|
@ -799,7 +861,8 @@ export default {
|
||||||
|
|
||||||
// 触发Peak Infomation
|
// 触发Peak Infomation
|
||||||
handleTogglePeak() {
|
handleTogglePeak() {
|
||||||
const xAxis = this.option.series[0].markLine.data[0].xAxis
|
const spectrumLineSeries = findSeriesByName(this.option.series, 'Spectrum')
|
||||||
|
const xAxis = spectrumLineSeries.markLine.data[0].xAxis
|
||||||
const channel = this.isEnergy() ? this.getChannelByEnergy(xAxis) : parseInt(xAxis.toFixed())
|
const channel = this.isEnergy() ? this.getChannelByEnergy(xAxis) : parseInt(xAxis.toFixed())
|
||||||
const index = this.channelPeakGroup.findIndex((peakItem) => {
|
const index = this.channelPeakGroup.findIndex((peakItem) => {
|
||||||
const allX = peakItem.pointlist.map((item) => item.x)
|
const allX = peakItem.pointlist.map((item) => item.x)
|
||||||
|
@ -829,9 +892,7 @@ export default {
|
||||||
return prev && prev.y > curr.y ? prev : curr
|
return prev && prev.y > curr.y ? prev : curr
|
||||||
})
|
})
|
||||||
|
|
||||||
const chart = this.$refs.chartRef.getChartInstance()
|
const [xPix, yPix] = this.getChart().convertToPixel({ seriesIndex: 0 }, [x, y])
|
||||||
|
|
||||||
const [xPix, yPix] = chart.convertToPixel({ seriesIndex: 0 }, [x, y])
|
|
||||||
this.peakInfomationTooltip.content = html
|
this.peakInfomationTooltip.content = html
|
||||||
this.peakInfomationTooltip.visible = true
|
this.peakInfomationTooltip.visible = true
|
||||||
this.peakInfomationTooltip.left = xPix
|
this.peakInfomationTooltip.left = xPix
|
||||||
|
@ -854,7 +915,8 @@ export default {
|
||||||
* @param { 'left'| 'right' } direction
|
* @param { 'left'| 'right' } direction
|
||||||
*/
|
*/
|
||||||
moveMarkLine(direction) {
|
moveMarkLine(direction) {
|
||||||
const prevAxis = this.option.series[0].markLine.data[0].xAxis
|
const spectrumLineSeries = findSeriesByName(this.option.series, 'Spectrum')
|
||||||
|
const prevAxis = spectrumLineSeries.markLine.data[0].xAxis
|
||||||
|
|
||||||
// 获取每一段 Channel 中的最大值
|
// 获取每一段 Channel 中的最大值
|
||||||
const maxXAxises = this.channelPeakGroup.map((item) => {
|
const maxXAxises = this.channelPeakGroup.map((item) => {
|
||||||
|
@ -868,13 +930,13 @@ export default {
|
||||||
// 找到第一个比prevAxis大的xAxis
|
// 找到第一个比prevAxis大的xAxis
|
||||||
find = maxXAxises.find((xAxis) => xAxis > prevAxis)
|
find = maxXAxises.find((xAxis) => xAxis > prevAxis)
|
||||||
if (find) {
|
if (find) {
|
||||||
this.option.series[0].markLine.data[0].xAxis = find
|
spectrumLineSeries.markLine.data[0].xAxis = find
|
||||||
}
|
}
|
||||||
} else if (direction == 'left') {
|
} else if (direction == 'left') {
|
||||||
// 找到第一个比prevAxis小的xAxis
|
// 找到第一个比prevAxis小的xAxis
|
||||||
find = maxXAxises.reverse().find((xAxis) => xAxis < prevAxis)
|
find = maxXAxises.reverse().find((xAxis) => xAxis < prevAxis)
|
||||||
if (find) {
|
if (find) {
|
||||||
this.option.series[0].markLine.data[0].xAxis = find
|
spectrumLineSeries.markLine.data[0].xAxis = find
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,8 +947,7 @@ export default {
|
||||||
|
|
||||||
// 鼠标按下时开启可刷选状态
|
// 鼠标按下时开启可刷选状态
|
||||||
handleMouseDown() {
|
handleMouseDown() {
|
||||||
const chart = this.$refs.chartRef.getChartInstance()
|
this.getChart().dispatchAction({
|
||||||
chart.dispatchAction({
|
|
||||||
type: 'takeGlobalCursor',
|
type: 'takeGlobalCursor',
|
||||||
// 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
|
// 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
|
||||||
key: 'brush',
|
key: 'brush',
|
||||||
|
@ -898,13 +959,16 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleMouseUp() {
|
handleMouseUp() {
|
||||||
setTimeout(() => {
|
if (this.timer) {
|
||||||
const chart = this.$refs.chartRef.getChartInstance()
|
window.clearTimeout(this.timer)
|
||||||
this.clearBrush(chart)
|
}
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
this.clearBrush()
|
||||||
}, 0)
|
}, 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
clearBrush(chart) {
|
clearBrush() {
|
||||||
|
const chart = this.getChart()
|
||||||
// 清理刷选的范围
|
// 清理刷选的范围
|
||||||
chart.dispatchAction({
|
chart.dispatchAction({
|
||||||
type: 'brush',
|
type: 'brush',
|
||||||
|
@ -914,6 +978,7 @@ export default {
|
||||||
// 改为不可刷选状态
|
// 改为不可刷选状态
|
||||||
chart.dispatchAction({
|
chart.dispatchAction({
|
||||||
type: 'takeGlobalCursor',
|
type: 'takeGlobalCursor',
|
||||||
|
brushOption: false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -930,13 +995,18 @@ export default {
|
||||||
const point1 = chart.convertFromPixel({ seriesIndex: 0 }, [minX, minY]).map((num) => parseInt(num.toFixed()))
|
const point1 = chart.convertFromPixel({ seriesIndex: 0 }, [minX, minY]).map((num) => parseInt(num.toFixed()))
|
||||||
const point2 = chart.convertFromPixel({ seriesIndex: 0 }, [maxX, maxY]).map((num) => parseInt(num.toFixed()))
|
const point2 = chart.convertFromPixel({ seriesIndex: 0 }, [maxX, maxY]).map((num) => parseInt(num.toFixed()))
|
||||||
|
|
||||||
const xAxisMax = chart.getModel().getComponent('xAxis').axis.scale._extent[1]
|
// 拿到之前的最大值
|
||||||
const yAxisMax = this.option.yAxis.max
|
const xAxisMax = getAxisMax(chart, 'xAxis')
|
||||||
|
const yAxisMax = getAxisMax(chart, 'yAxis')
|
||||||
|
|
||||||
|
// 拿到之前的最小值
|
||||||
|
const xAxisMin = this.option.xAxis.min
|
||||||
|
const yAxisMin = this.option.yAxis.min
|
||||||
|
|
||||||
let [x1, y2, x2, y1] = [...point1, ...point2] // 根据解析出的数据确定真实的范围
|
let [x1, y2, x2, y1] = [...point1, ...point2] // 根据解析出的数据确定真实的范围
|
||||||
|
|
||||||
const xAxisLimit = rangeNumber(1, xAxisMax)
|
const xAxisLimit = rangeNumber(xAxisMin, xAxisMax)
|
||||||
const yAxisLimit = rangeNumber(1, yAxisMax)
|
const yAxisLimit = rangeNumber(yAxisMin, yAxisMax)
|
||||||
|
|
||||||
x1 = xAxisLimit(x1)
|
x1 = xAxisLimit(x1)
|
||||||
x2 = xAxisLimit(x2)
|
x2 = xAxisLimit(x2)
|
||||||
|
@ -957,21 +1027,89 @@ export default {
|
||||||
this.setThumbnailChartRect(x1, y2, x2, y1)
|
this.setThumbnailChartRect(x1, y2, x2, y1)
|
||||||
}
|
}
|
||||||
|
|
||||||
const thumbnailChart = this.$refs.thumbnailChartRef.getChartInstance()
|
const thumbnailChart = this.getThumbnailChart()
|
||||||
const [, maxYPixel] = thumbnailChart.convertToPixel({ seriesIndex: 0 }, [0, y1]) // 方框的上下两条边的yAxis转为pix
|
const [, maxYPixel] = thumbnailChart.convertToPixel({ seriesIndex: 0 }, [0, y1]) // 方框的上下两条边的yAxis转为pix
|
||||||
const [, minYPixel] = thumbnailChart.convertToPixel({ seriesIndex: 0 }, [0, y2])
|
const [, minYPixel] = thumbnailChart.convertToPixel({ seriesIndex: 0 }, [0, y2])
|
||||||
const rectHeightPixel = maxYPixel - minYPixel // 计算方框的左右边长(pix)
|
const rectHeightPixel = maxYPixel - minYPixel // 计算方框的左右边长(pix)
|
||||||
this.halfHeightPixel = rectHeightPixel / 2
|
this.halfHeightPixel = rectHeightPixel / 2
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearBrush(chart)
|
this.$nextTick(() => {
|
||||||
|
this.rangeScatter()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 因scatterGL 不受axis中max和min的控制,手动处理溢出部分
|
||||||
|
* @param {Boolean} isReset 是否重置到初始状态
|
||||||
|
*/
|
||||||
|
rangeScatter(isReset) {
|
||||||
|
if (!this.isScatter()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
|
xAxis: { min: x1 },
|
||||||
|
yAxis: { min: y1 },
|
||||||
|
} = this.option
|
||||||
|
|
||||||
|
const chart = this.getChart()
|
||||||
|
const x2 = getAxisMax(chart, 'xAxis')
|
||||||
|
const y2 = getAxisMax(chart, 'yAxis')
|
||||||
|
|
||||||
|
const channelSpectrumData = {
|
||||||
|
...this.shadowChannelChart,
|
||||||
|
pointlist: isReset
|
||||||
|
? this.pointlistLimitY(this.shadowChannelChart.pointlist)
|
||||||
|
: this.pointlistLimit(this.shadowChannelChart.pointlist, x1, x2, y1, y2),
|
||||||
|
}
|
||||||
|
const energySpectrumData = {
|
||||||
|
...this.shadowEnergyChart,
|
||||||
|
pointlist: isReset
|
||||||
|
? this.pointlistLimitY(this.shadowEnergyChart.pointlist)
|
||||||
|
: this.pointlistLimit(this.shadowEnergyChart.pointlist, x1, x2, y1, y2),
|
||||||
|
}
|
||||||
|
this.redrawLineBySeriesName('Spectrum', energySpectrumData, channelSpectrumData)
|
||||||
|
|
||||||
|
if (this.channelCompareLine) {
|
||||||
|
const channelCompareLine = {
|
||||||
|
...this.channelCompareLine,
|
||||||
|
pointlist: isReset
|
||||||
|
? this.pointlistLimitY(this.channelCompareLine.pointlist)
|
||||||
|
: this.pointlistLimit(this.channelCompareLine.pointlist, x1, x2, y1, y2),
|
||||||
|
}
|
||||||
|
const energyCompareLine = {
|
||||||
|
...this.energyCompareLine,
|
||||||
|
pointlist: isReset
|
||||||
|
? this.pointlistLimitY(this.energyCompareLine.pointlist)
|
||||||
|
: this.pointlistLimit(this.energyCompareLine.pointlist, x1, x2, y1, y2),
|
||||||
|
}
|
||||||
|
this.redrawLineBySeriesName('Compare', energyCompareLine, channelCompareLine)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 筛选范围内的点
|
||||||
|
* @param {*} pointlist
|
||||||
|
* @param {*} x1
|
||||||
|
* @param {*} x2
|
||||||
|
* @param {*} y1
|
||||||
|
* @param {*} y2
|
||||||
|
*/
|
||||||
|
pointlistLimit(pointlist, x1, x2, y1, y2) {
|
||||||
|
return pointlist.filter(({ x, y }) => x >= x1 && x <= x2 && y >= y1 && y <= y2)
|
||||||
|
},
|
||||||
|
|
||||||
|
pointlistLimitY(pointlist) {
|
||||||
|
return pointlist.filter(({ y }) => y >= 1)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 在右上角缩略图中设置范围
|
// 在右上角缩略图中设置范围
|
||||||
setThumbnailChartRect(x1, y2, x2, y1) {
|
setThumbnailChartRect(x1, y2, x2, y1) {
|
||||||
this.thumbnailChartRect = [x1, y2, x2, y1]
|
this.thumbnailChartRect = [x1, y2, x2, y1]
|
||||||
|
|
||||||
const { markLine } = this.thumbnailOption.series[0]
|
const thumbnailSpectrumLineSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
||||||
|
const { markLine } = thumbnailSpectrumLineSeries
|
||||||
const pointList = [
|
const pointList = [
|
||||||
[
|
[
|
||||||
[x1, y1],
|
[x1, y1],
|
||||||
|
@ -999,19 +1137,23 @@ export default {
|
||||||
// 缩略图点击
|
// 缩略图点击
|
||||||
handleThumbnailChartClick(param) {
|
handleThumbnailChartClick(param) {
|
||||||
const { offsetX, offsetY } = param
|
const { offsetX, offsetY } = param
|
||||||
const thumbnailChart = this.$refs.thumbnailChartRef.getChartInstance()
|
const thumbnailChart = this.getThumbnailChart()
|
||||||
|
|
||||||
const point = getXAxisAndYAxisByPosition(thumbnailChart, offsetX, offsetY)
|
const point = getXAxisAndYAxisByPosition(thumbnailChart, offsetX, offsetY)
|
||||||
if (point && this.thumbnailChartRect && this.thumbnailChartRect.length) {
|
if (point && this.thumbnailChartRect && this.thumbnailChartRect.length) {
|
||||||
const [x1, y2, x2, y1] = this.thumbnailChartRect
|
const [x1, y2, x2, y1] = this.thumbnailChartRect
|
||||||
const halfWidth = Math.ceil((x2 - x1) / 2)
|
const halfWidth = Math.ceil((x2 - x1) / 2)
|
||||||
|
|
||||||
const [, maxYAxisPixel] = thumbnailChart.convertToPixel({ seriesIndex: 0 }, [0, this.thumbnailOption.yAxis.max]) // 缩略图最大值转为pix
|
// 缩略图最大值转为pix
|
||||||
|
const [, maxYAxisPixel] = thumbnailChart.convertToPixel({ seriesIndex: 0 }, [
|
||||||
|
0,
|
||||||
|
getAxisMax(thumbnailChart, 'yAxis'),
|
||||||
|
])
|
||||||
const [, minYAxisPixel] = thumbnailChart.convertToPixel({ seriesIndex: 0 }, [0, 1])
|
const [, minYAxisPixel] = thumbnailChart.convertToPixel({ seriesIndex: 0 }, [0, 1])
|
||||||
|
|
||||||
let [xAxis, yAxis] = point
|
let [xAxis, yAxis] = point
|
||||||
|
|
||||||
const xAxisMax = thumbnailChart.getModel().getComponent('xAxis').axis.scale._extent[1]
|
const xAxisMax = getAxisMax(thumbnailChart, 'xAxis')
|
||||||
|
|
||||||
const xAxisLimit = rangeNumber(1 + halfWidth, xAxisMax - halfWidth)
|
const xAxisLimit = rangeNumber(1 + halfWidth, xAxisMax - halfWidth)
|
||||||
|
|
||||||
|
@ -1041,82 +1183,117 @@ export default {
|
||||||
|
|
||||||
this.option.yAxis.min = minYAxis
|
this.option.yAxis.min = minYAxis
|
||||||
this.option.yAxis.max = maxYAxis
|
this.option.yAxis.max = maxYAxis
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.rangeScatter()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重置
|
// 重置
|
||||||
handleReset() {
|
handleResetChart() {
|
||||||
this.option.xAxis.min = 1
|
this.option.xAxis.min = 1
|
||||||
this.option.xAxis.max = 'dataMax'
|
this.option.xAxis.max = 'dataMax'
|
||||||
this.option.yAxis.min = 1
|
this.option.yAxis.min = 1
|
||||||
this.option.yAxis.max = Math.ceil(Math.max(...this.shadowChannelChart.pointlist.map((item) => item.y)) * 1.1)
|
this.option.yAxis.max = 'dataMax'
|
||||||
|
|
||||||
this.thumbnailOption.series[0].markLine.data = []
|
const thumbnailSpectrumLineSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
||||||
|
thumbnailSpectrumLineSeries.markLine.data = []
|
||||||
this.thumbnailChartRect = []
|
this.thumbnailChartRect = []
|
||||||
this.closePeakInfomationTooltip()
|
this.closePeakInfomationTooltip()
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.rangeScatter(true)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 从分析工具刷新部分数据
|
// 从分析工具刷新部分数据
|
||||||
handleRefresh(data) {
|
handleRefresh(data) {
|
||||||
const { allData, shadowChannelChart, shadowEnergyChart, shapeChannelData, shapeEnergyData } = data
|
this.handleResetState()
|
||||||
|
data.DetailedInformation = this.detailedInfomation
|
||||||
const channelPeakGroup = allData.filter((item) => item.name == 'Peak' && item.group == 'channel')
|
this.dataProsess(data)
|
||||||
const energyPeakGroup = allData.filter((item) => item.name == 'Peak' && item.group == 'energy')
|
|
||||||
|
|
||||||
const channelBaseLine = allData.find((item) => item.name == 'BaseLine' && item.group == 'channel')
|
|
||||||
const energyBaseLine = allData.find((item) => item.name == 'BaseLine' && item.group == 'energy')
|
|
||||||
|
|
||||||
const channelLcLine = allData.find((item) => item.name == 'Lc' && item.group == 'channel')
|
|
||||||
const energyLcLine = allData.find((item) => item.name == 'Lc' && item.group == 'energy')
|
|
||||||
|
|
||||||
const channelScacLine = allData.find((item) => item.name == 'Scac' && item.group == 'channel')
|
|
||||||
const energyScacLine = allData.find((item) => item.name == 'Scac' && item.group == 'energy')
|
|
||||||
|
|
||||||
this.allEnergy = allData.find((item) => item.name == 'Energy' && item.group == 'energy')
|
|
||||||
this.allChannel = allData.find((item) => item.name == 'Count' && item.group == 'channel')
|
|
||||||
|
|
||||||
// 保存Peak Line
|
|
||||||
this.channelPeakGroup = channelPeakGroup
|
|
||||||
this.energyPeakGroup = energyPeakGroup
|
|
||||||
|
|
||||||
// 保存 Spectrum Line
|
|
||||||
this.shadowChannelChart = shadowChannelChart
|
|
||||||
this.shadowEnergyChart = shadowEnergyChart
|
|
||||||
|
|
||||||
// 保存基线
|
|
||||||
this.channelBaseLine = channelBaseLine
|
|
||||||
this.energyBaseLine = energyBaseLine
|
|
||||||
|
|
||||||
// 保存Lc
|
|
||||||
this.channelLcLine = channelLcLine
|
|
||||||
this.energyLcLine = energyLcLine
|
|
||||||
|
|
||||||
// 保存Scac
|
|
||||||
this.channelScacLine = channelScacLine
|
|
||||||
this.energyScacLine = energyScacLine
|
|
||||||
|
|
||||||
// 保存 基线控制点
|
|
||||||
this.shapeChannelData = shapeChannelData
|
|
||||||
this.shapeEnergyData = shapeEnergyData
|
|
||||||
|
|
||||||
this.opts.notMerge = true
|
|
||||||
this.redrawPeakLine()
|
|
||||||
this.redrawCtrlPointBySeriesName()
|
|
||||||
|
|
||||||
this.redrawLineBySeriesName('BaseLine', this.energyBaseLine, this.channelBaseLine, this.graphAssistance.Baseline)
|
|
||||||
this.redrawLineBySeriesName('LcLine', this.energyLcLine, this.channelLcLine, this.graphAssistance.Lc)
|
|
||||||
this.redrawLineBySeriesName('ScacLine', this.energyScacLine, this.channelScacLine, this.graphAssistance.SCAC)
|
|
||||||
this.redrawLineBySeriesName('Spectrum', this.shadowEnergyChart, this.shadowChannelChart)
|
|
||||||
|
|
||||||
this.redrawThumbnailChart()
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.resetChartOpts()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 分析工具Accept时刷新部分数据
|
// 分析工具Accept时刷新部分数据
|
||||||
handleAccept() {
|
handleAccept() {
|
||||||
console.log('%c [ 分析工具Accept时刷新部分数据 ]-1046', 'font-size:13px; background:pink; color:#bf2c9f;')
|
console.log('%c [ 分析工具Accept时刷新部分数据 ]-1046', 'font-size:13px; background:pink; color:#bf2c9f;')
|
||||||
|
this.clearCompareLine()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 显示比较弹窗
|
||||||
|
showCompareModal() {
|
||||||
|
if (this.isLoading) {
|
||||||
|
this.$message.warn('Sample is Loading')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.handleResetChart()
|
||||||
|
this.clearCompareLine()
|
||||||
|
this.compareFileListModalVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 文件之间对比
|
||||||
|
handleCompareWithFile([channelData, energyData]) {
|
||||||
|
this.channelCompareLine = channelData
|
||||||
|
this.energyCompareLine = energyData
|
||||||
|
this.redrawLineBySeriesName('Compare', energyData, channelData, true, channelData.color)
|
||||||
|
|
||||||
|
if (this.isScatter()) {
|
||||||
|
lineSeries.type = 'scatterGL'
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.thumbnailOption.yAxis.max = getAxisMax(this.getChart(), 'yAxis')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 移除 Compare 线
|
||||||
|
clearCompareLine() {
|
||||||
|
const compareLine = findSeriesByName(this.option.series, 'Compare')
|
||||||
|
if (compareLine) {
|
||||||
|
compareLine.data = []
|
||||||
|
this.resetThumbnailChartDataMax()
|
||||||
|
}
|
||||||
|
this.channelCompareLine = undefined
|
||||||
|
this.energyCompareLine = undefined
|
||||||
|
},
|
||||||
|
|
||||||
|
// 重新分析
|
||||||
|
async reProcessing() {
|
||||||
|
if (this.isProcessing) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.isLoading) {
|
||||||
|
this.$message.warn('Sample is Loading')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.isLoading = true
|
||||||
|
this.handleResetState()
|
||||||
|
|
||||||
|
const { inputFileName: fileName } = this.sample
|
||||||
|
const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileName}`)
|
||||||
|
if (success) {
|
||||||
|
result.DetailedInformation = this.detailedInfomation
|
||||||
|
this.dataProsess(result)
|
||||||
|
} else {
|
||||||
|
this.isLoading = false
|
||||||
|
const arr = message.split('\n')
|
||||||
|
this.$warning({
|
||||||
|
title: 'Warning',
|
||||||
|
content: () => arr.map((text) => <div>{text}</div>),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
// this.reprocessingModalVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 重置缩略图表y轴最大值
|
||||||
|
resetThumbnailChartDataMax() {
|
||||||
|
this.thumbnailOption.yAxis.max = 'dataMax'
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重置图表配置
|
// 重置图表配置
|
||||||
|
@ -1159,7 +1336,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重置页面信息
|
// 重置页面信息
|
||||||
reset() {
|
handleResetState() {
|
||||||
this.selectedChannel = -1
|
this.selectedChannel = -1
|
||||||
this.nuclideLibraryList = []
|
this.nuclideLibraryList = []
|
||||||
this.closePeakInfomationTooltip()
|
this.closePeakInfomationTooltip()
|
||||||
|
@ -1169,14 +1346,16 @@ export default {
|
||||||
this.option.yAxis.type = 'value'
|
this.option.yAxis.type = 'value'
|
||||||
|
|
||||||
if (this.option.series.length) {
|
if (this.option.series.length) {
|
||||||
this.option.series[0].type = 'line'
|
const spectrumLineSeries = findSeriesByName(this.option.series, 'Spectrum')
|
||||||
this.option.series[0].symbol = 'none'
|
spectrumLineSeries.type = 'line'
|
||||||
this.option.series[0].markLine.lineStyle.width = 2
|
spectrumLineSeries.symbol = 'none'
|
||||||
|
spectrumLineSeries.markLine.lineStyle.width = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.thumbnailOption.series.length) {
|
if (this.thumbnailOption.series.length) {
|
||||||
this.thumbnailOption.series[0].type = 'line'
|
const thumbnailSpectrumLineSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
||||||
this.thumbnailOption.series[0].symbol = 'none'
|
thumbnailSpectrumLineSeries.type = 'line'
|
||||||
|
thumbnailSpectrumLineSeries.symbol = 'none'
|
||||||
}
|
}
|
||||||
this.graphAssistance = cloneDeep(graphAssistance)
|
this.graphAssistance = cloneDeep(graphAssistance)
|
||||||
},
|
},
|
||||||
|
@ -1214,11 +1393,17 @@ export default {
|
||||||
this.channelScacLine.color = Color_Scac
|
this.channelScacLine.color = Color_Scac
|
||||||
this.energyScacLine.color = Color_Scac
|
this.energyScacLine.color = Color_Scac
|
||||||
|
|
||||||
|
if (this.channelCompareLine) {
|
||||||
|
this.channelCompareLine.color = Color_Compare
|
||||||
|
this.energyCompareLine.color = Color_Compare
|
||||||
|
}
|
||||||
|
|
||||||
this.changeColorBySeriesName('Spectrum', Color_Spec)
|
this.changeColorBySeriesName('Spectrum', Color_Spec)
|
||||||
this.changePeakLineColor(Color_Peak)
|
this.changePeakLineColor(Color_Peak)
|
||||||
this.changeColorBySeriesName('LcLine', Color_Lc)
|
this.changeColorBySeriesName('LcLine', Color_Lc)
|
||||||
this.changeColorBySeriesName('BaseLine', Color_Base)
|
this.changeColorBySeriesName('BaseLine', Color_Base)
|
||||||
this.changeColorBySeriesName('ScacLine', Color_Scac)
|
this.changeColorBySeriesName('ScacLine', Color_Scac)
|
||||||
|
this.changeColorBySeriesName('Compare', Color_Compare)
|
||||||
|
|
||||||
const thumbnailChartSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
const thumbnailChartSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
||||||
thumbnailChartSeries.itemStyle.color = Color_Spec
|
thumbnailChartSeries.itemStyle.color = Color_Spec
|
||||||
|
@ -1242,6 +1427,18 @@ export default {
|
||||||
isEnergy() {
|
isEnergy() {
|
||||||
return this.graphAssistance.axisType == 'Energy'
|
return this.graphAssistance.axisType == 'Energy'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isScatter() {
|
||||||
|
return this.graphAssistance.spectrumType == 'Scatter'
|
||||||
|
},
|
||||||
|
|
||||||
|
getChart() {
|
||||||
|
return this.$refs.chartRef.getChartInstance()
|
||||||
|
},
|
||||||
|
|
||||||
|
getThumbnailChart() {
|
||||||
|
return this.$refs.thumbnailChartRef.getChartInstance()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
sample: {
|
sample: {
|
||||||
|
|
|
@ -89,10 +89,6 @@
|
||||||
<korsum-modal v-model="korsumModalShow" />
|
<korsum-modal v-model="korsumModalShow" />
|
||||||
<!-- Korsum 弹窗结束 -->
|
<!-- Korsum 弹窗结束 -->
|
||||||
|
|
||||||
<!-- ReProcessing 弹窗开始 -->
|
|
||||||
<re-processing-modal v-model="reprocessingModalVisible" />
|
|
||||||
<!-- ReProcessing 弹窗结束 -->
|
|
||||||
|
|
||||||
<!-- Zero Time 弹窗开始 -->
|
<!-- Zero Time 弹窗开始 -->
|
||||||
<zero-time-modal v-model="zeroTimeModalVisible" :sampleId="sampleData.sampleId" />
|
<zero-time-modal v-model="zeroTimeModalVisible" :sampleId="sampleData.sampleId" />
|
||||||
<!-- Zero Time 弹窗结束 -->
|
<!-- Zero Time 弹窗结束 -->
|
||||||
|
@ -209,7 +205,6 @@ import SaveSettingModal from './components/Modals/SaveSettingModal.vue'
|
||||||
import AnalyzeSettingModal from './components/Modals/AnalyzeSettingModal.vue'
|
import AnalyzeSettingModal from './components/Modals/AnalyzeSettingModal.vue'
|
||||||
import AnalyzeInteractiveToolModal from './components/Modals/AnalyzeInteractiveToolModal/index.vue'
|
import AnalyzeInteractiveToolModal from './components/Modals/AnalyzeInteractiveToolModal/index.vue'
|
||||||
import KorsumModal from './components/Modals/KorsumModal.vue'
|
import KorsumModal from './components/Modals/KorsumModal.vue'
|
||||||
import ReProcessingModal from './components/Modals/ReProcessingModal/index.vue'
|
|
||||||
import ZeroTimeModal from './components/Modals/ZeroTimeModal.vue'
|
import ZeroTimeModal from './components/Modals/ZeroTimeModal.vue'
|
||||||
import EfficiencyCalibrationModal from './components/Modals/EfficiencyCalibrationModal.vue'
|
import EfficiencyCalibrationModal from './components/Modals/EfficiencyCalibrationModal.vue'
|
||||||
import EnergyCalibrationModal from './components/Modals/EnergyCalibrationModal.vue'
|
import EnergyCalibrationModal from './components/Modals/EnergyCalibrationModal.vue'
|
||||||
|
@ -235,6 +230,7 @@ import BetaGammaEnergyCalibrationModal from './components/Modals/BetaGammaModals
|
||||||
import StripModal from './components/Modals/StripModal.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'
|
||||||
|
|
||||||
// 分析类型
|
// 分析类型
|
||||||
const ANALYZE_TYPE = {
|
const ANALYZE_TYPE = {
|
||||||
|
@ -255,7 +251,6 @@ export default {
|
||||||
AnalyzeSettingModal,
|
AnalyzeSettingModal,
|
||||||
AnalyzeInteractiveToolModal,
|
AnalyzeInteractiveToolModal,
|
||||||
KorsumModal,
|
KorsumModal,
|
||||||
ReProcessingModal,
|
|
||||||
ZeroTimeModal,
|
ZeroTimeModal,
|
||||||
EfficiencyCalibrationModal,
|
EfficiencyCalibrationModal,
|
||||||
EnergyCalibrationModal,
|
EnergyCalibrationModal,
|
||||||
|
@ -313,7 +308,6 @@ export default {
|
||||||
saveSettingModalVisible: false, // 保存设置弹窗
|
saveSettingModalVisible: false, // 保存设置弹窗
|
||||||
|
|
||||||
analyzeConfigureModalVisible: false, // 分析设置弹窗
|
analyzeConfigureModalVisible: false, // 分析设置弹窗
|
||||||
reprocessingModalVisible: false, // 重新分析弹窗
|
|
||||||
analyzeInteractiveToolModalVisible: false, // 分析工具弹窗
|
analyzeInteractiveToolModalVisible: false, // 分析工具弹窗
|
||||||
zeroTimeModalVisible: false, // Zero Time 弹窗
|
zeroTimeModalVisible: false, // Zero Time 弹窗
|
||||||
korsumModalShow: false, // Korsum 弹窗
|
korsumModalShow: false, // Korsum 弹窗
|
||||||
|
@ -475,10 +469,29 @@ export default {
|
||||||
* 保存结果到数据库
|
* 保存结果到数据库
|
||||||
* @param { 'all' | 'current' } type
|
* @param { 'all' | 'current' } type
|
||||||
*/
|
*/
|
||||||
handleSaveResultsToDB(type) {
|
async handleSaveResultsToDB(type) {
|
||||||
console.log('%c [ saveResultsToDB ]-157', 'font-size:13px; background:pink; color:#bf2c9f;', type)
|
if (this.isBetaGamma) {
|
||||||
if (type === 'current') {
|
if (type === 'current') {
|
||||||
this.handleSaveResultsToDB_Cuurrent()
|
this.handleSaveResultsToDB_Cuurrent()
|
||||||
|
}
|
||||||
|
} else if (this.isGamma) {
|
||||||
|
if (type == 'current') {
|
||||||
|
const hideLoading = this.$message.loading('Saving...', 0)
|
||||||
|
try {
|
||||||
|
const { success, message } = await getAction('/gamma/saveToDB', {
|
||||||
|
fileName: this.sampleData.inputFileName
|
||||||
|
})
|
||||||
|
if (success) {
|
||||||
|
this.$message.success('Save Success')
|
||||||
|
} else {
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
hideLoading()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSaveResultsToDB_Cuurrent() {
|
handleSaveResultsToDB_Cuurrent() {
|
||||||
|
@ -623,8 +636,9 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Clean All',
|
title: 'Compare',
|
||||||
handler: this.handleCleanAll,
|
show: this.isGamma,
|
||||||
|
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
|
@ -638,6 +652,11 @@ export default {
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
handler: () => (this.ftransltModalVisible = true),
|
handler: () => (this.ftransltModalVisible = true),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'a-menu-item',
|
||||||
|
title: 'Clean All',
|
||||||
|
handler: this.handleCleanAll,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -736,9 +755,9 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'ReProcessing',
|
title: 'Reprocessing',
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
handler: () => (this.reprocessingModalVisible = true),
|
handler: () => this.$refs.gammaAnalysisRef.reProcessing(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user