Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
f586af01c5
|
@ -102,7 +102,7 @@
|
||||||
<div class="result-display">
|
<div class="result-display">
|
||||||
<beta-gamma-chart-container>
|
<beta-gamma-chart-container>
|
||||||
<template slot="title"> Result display </template>
|
<template slot="title"> Result display </template>
|
||||||
<result-display :data="resultDisplay" @sendFlag="handleGetFlag"></result-display>
|
<result-display :data="resultDisplay" @sendFlag="handleGetFlag" @zoom="handleZoom"></result-display>
|
||||||
</beta-gamma-chart-container>
|
</beta-gamma-chart-container>
|
||||||
</div>
|
</div>
|
||||||
<!-- 结果显示结束 -->
|
<!-- 结果显示结束 -->
|
||||||
|
@ -506,6 +506,53 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 右下角放大镜
|
||||||
|
handleZoom(nuclideName) {
|
||||||
|
let ROI_nums = []
|
||||||
|
switch (nuclideName) {
|
||||||
|
case 'Xe131m':
|
||||||
|
ROI_nums = [5]
|
||||||
|
break
|
||||||
|
case 'Xe133m':
|
||||||
|
ROI_nums = [6]
|
||||||
|
break
|
||||||
|
case 'Xe133':
|
||||||
|
ROI_nums = [3, 4]
|
||||||
|
break
|
||||||
|
case 'Xe135':
|
||||||
|
ROI_nums = [2]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.boundaryList.length) {
|
||||||
|
let left = 0,
|
||||||
|
right = 0,
|
||||||
|
top = 0,
|
||||||
|
bottom = 0
|
||||||
|
for (let i = 0; i < ROI_nums.length; ++i) {
|
||||||
|
const ROI_line = this.boundaryList[ROI_nums[i]]
|
||||||
|
left = Math.min(left, ROI_line.minX)
|
||||||
|
right = Math.max(right, ROI_line.maxX)
|
||||||
|
top = Math.max(top, ROI_line.maxY)
|
||||||
|
bottom = Math.min(bottom, ROI_line.minY)
|
||||||
|
}
|
||||||
|
|
||||||
|
const minX = left - 10,
|
||||||
|
maxX = right + 10,
|
||||||
|
minY = bottom - 10,
|
||||||
|
maxY = top + 10
|
||||||
|
|
||||||
|
this.$refs.betaGammaChartRef.setRange(minX, maxX, 'x')
|
||||||
|
this.$refs.betaGammaChartRef.setRange(minY, maxY, 'y')
|
||||||
|
|
||||||
|
this.$refs.lineChart1Ref.setRange(minY, maxY)
|
||||||
|
this.$refs.lineChart2Ref.setRange(minY, maxY)
|
||||||
|
|
||||||
|
this.$refs.lineChart3Ref.setRange(minX, maxX)
|
||||||
|
this.$refs.lineChart4Ref.setRange(minX, maxX)
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
sample: {
|
sample: {
|
||||||
|
@ -527,6 +574,7 @@ export default {
|
||||||
this.getSampleDetail_file()
|
this.getSampleDetail_file()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.$refs.betaGammaChartRef.handleUnzoom()
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|
|
@ -48,6 +48,7 @@ import ColorPalette from './ColorPalette.vue'
|
||||||
import { getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper.js'
|
import { getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper.js'
|
||||||
|
|
||||||
const buttons = ['2D', '3D Surface', '3D Scatter']
|
const buttons = ['2D', '3D Surface', '3D Scatter']
|
||||||
|
const rectColorList = ['#99CA53', '#F6A625', '#6D5FD5', '#BF593E', '#1F9DDB']
|
||||||
|
|
||||||
// 2D 配置
|
// 2D 配置
|
||||||
const twoDOption = {
|
const twoDOption = {
|
||||||
|
@ -133,7 +134,7 @@ const twoDOption = {
|
||||||
},
|
},
|
||||||
series: {
|
series: {
|
||||||
type: 'scatterGL',
|
type: 'scatterGL',
|
||||||
symbolSize: 5,
|
symbolSize: 4,
|
||||||
data: [],
|
data: [],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
|
@ -757,8 +758,8 @@ export default {
|
||||||
// 2D 图表 上的 矩形
|
// 2D 图表 上的 矩形
|
||||||
boundary: {
|
boundary: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
newVal.forEach(item => {
|
newVal.forEach((item, index) => {
|
||||||
item.color = this.getRandomColor()
|
item.color = rectColorList[index%5]
|
||||||
})
|
})
|
||||||
this.boundaryData = newVal
|
this.boundaryData = newVal
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template slot="operator">
|
<template slot="operator" slot-scope="text, record">
|
||||||
<div class="search"></div>
|
<div class="search" @click="handleSearch(record.nuclideName)"></div>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<a-table :data-source="source2" rowKey="id" :columns="columns" :pagination="false">
|
<a-table :data-source="source2" rowKey="id" :columns="columns" :pagination="false">
|
||||||
|
@ -38,8 +38,8 @@
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template slot="operator">
|
<template slot="operator" slot-scope="text, record">
|
||||||
<div class="search"></div>
|
<div class="search" @click="handleSearch(record.nuclideName)"></div>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -112,6 +112,10 @@ export default {
|
||||||
handleCheckboxChange(e, obj) {
|
handleCheckboxChange(e, obj) {
|
||||||
this.$emit('sendFlag', e.target.checked, obj)
|
this.$emit('sendFlag', e.target.checked, obj)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleSearch(nuclideName) {
|
||||||
|
this.$emit('zoom', nuclideName)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -480,6 +480,7 @@ export default {
|
||||||
handleLoadSampleFromDB(sampleList) {
|
handleLoadSampleFromDB(sampleList) {
|
||||||
const ids = this.sampleList.map((item) => item.sampleId) // 当前Sample列表中的所有id
|
const ids = this.sampleList.map((item) => item.sampleId) // 当前Sample列表中的所有id
|
||||||
const willAddList = sampleList.filter((item) => !ids.includes(item.sampleId))
|
const willAddList = sampleList.filter((item) => !ids.includes(item.sampleId))
|
||||||
|
this.callInitValue(willAddList)
|
||||||
this.sampleList = this.sampleList.concat(willAddList)
|
this.sampleList = this.sampleList.concat(willAddList)
|
||||||
},
|
},
|
||||||
handleLoadSampleFromFile(sampleList) {
|
handleLoadSampleFromFile(sampleList) {
|
||||||
|
@ -500,9 +501,29 @@ export default {
|
||||||
})
|
})
|
||||||
const names = this.sampleList.map((item) => item.inputFileName) // 当前Sample列表中的所有id
|
const names = this.sampleList.map((item) => item.inputFileName) // 当前Sample列表中的所有id
|
||||||
const willAddList = arr.filter((item) => !names.includes(item.inputFileName))
|
const willAddList = arr.filter((item) => !names.includes(item.inputFileName))
|
||||||
|
this.callInitValue(willAddList)
|
||||||
this.sampleList = this.sampleList.concat(willAddList)
|
this.sampleList = this.sampleList.concat(willAddList)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gamma谱调用initValue先初始化数据
|
||||||
|
* @param {Array<any>} willAddList
|
||||||
|
*/
|
||||||
|
callInitValue(willAddList) {
|
||||||
|
willAddList
|
||||||
|
.filter(
|
||||||
|
({ sampleType, inputFileName }) => sampleType !== 'B' && inputFileName !== this.sampleData.inputFileName
|
||||||
|
)
|
||||||
|
.forEach(({ inputFileName: fileName, dbName, sampleId }) => {
|
||||||
|
const params = {
|
||||||
|
sampleId,
|
||||||
|
dbName,
|
||||||
|
fileName,
|
||||||
|
}
|
||||||
|
getAction('/gamma/initValue', params)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 加载选中的样本
|
// 加载选中的样本
|
||||||
async loadSelectedSample(sample) {
|
async loadSelectedSample(sample) {
|
||||||
console.log('%c [ sample ]-381', 'font-size:13px; background:pink; color:#bf2c9f;', sample)
|
console.log('%c [ sample ]-381', 'font-size:13px; background:pink; color:#bf2c9f;', sample)
|
||||||
|
@ -668,11 +689,21 @@ export default {
|
||||||
handleSavePHDToFile(type) {
|
handleSavePHDToFile(type) {
|
||||||
console.log('%c [ savePHDToFile ]-162', 'font-size:13px; background:pink; color:#bf2c9f;', type)
|
console.log('%c [ savePHDToFile ]-162', 'font-size:13px; background:pink; color:#bf2c9f;', type)
|
||||||
if (this.isGamma) {
|
if (this.isGamma) {
|
||||||
const url = '/gamma/saveToPHD'
|
if (type == 'current') {
|
||||||
let params = {
|
let params = {
|
||||||
fileName: this.newSampleData.inputFileName,
|
fileName: this.newSampleData.inputFileName,
|
||||||
|
}
|
||||||
|
fetchAndDownload('/gamma/saveToPHD', params, 'get')
|
||||||
|
} else {
|
||||||
|
this.sampleList
|
||||||
|
.filter(({ sampleType }) => sampleType !== 'B')
|
||||||
|
.forEach(({ inputFileName: fileName }) => {
|
||||||
|
const params = {
|
||||||
|
fileName,
|
||||||
|
}
|
||||||
|
fetchAndDownload('/gamma/saveToPHD', params, 'get')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
fetchAndDownload(url, params, 'get')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user