Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
e105d4c8e0
|
@ -6,6 +6,7 @@ import user from './modules/user'
|
||||||
import permission from './modules/permission'
|
import permission from './modules/permission'
|
||||||
import enhance from './modules/enhance'
|
import enhance from './modules/enhance'
|
||||||
import online from './modules/online'
|
import online from './modules/online'
|
||||||
|
import sample from './modules/sample'
|
||||||
import getters from './getters'
|
import getters from './getters'
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
@ -17,6 +18,7 @@ export default new Vuex.Store({
|
||||||
permission,
|
permission,
|
||||||
enhance,
|
enhance,
|
||||||
online,
|
online,
|
||||||
|
sample
|
||||||
},
|
},
|
||||||
state: {
|
state: {
|
||||||
|
|
||||||
|
|
30
src/store/modules/sample.js
Normal file
30
src/store/modules/sample.js
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
const sample = {
|
||||||
|
state: {
|
||||||
|
sampleList: []
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
SET_SAMPLE_LIST: (state, sampleList) => {
|
||||||
|
state.sampleList = sampleList
|
||||||
|
},
|
||||||
|
|
||||||
|
ADD_SAMPLE_DATA: (state, sampleData) => {
|
||||||
|
state.sampleList.push(sampleData)
|
||||||
|
},
|
||||||
|
|
||||||
|
GET_SAMPLE_DATA: (state, inputFileName) => {
|
||||||
|
const find = state.sampleList.find(item => item.inputFileName == inputFileName)
|
||||||
|
return find
|
||||||
|
},
|
||||||
|
|
||||||
|
REMOVE_SAMPLE_DATA: (state, inputFileName) => {
|
||||||
|
const findIndex = state.sampleList.findIndex(item => item.inputFileName == inputFileName)
|
||||||
|
state.sampleList.splice(findIndex, 1)
|
||||||
|
},
|
||||||
|
|
||||||
|
CLEAR_SAMPLE_DATA: () => {
|
||||||
|
state.sampleList = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default sample
|
|
@ -114,5 +114,5 @@ export function rangeNumber(min, max) {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function getAxisMax(chartInstance, axis) {
|
export function getAxisMax(chartInstance, axis) {
|
||||||
return chartInstance.getModel().getComponent(axis).axis.scale._extent[1]
|
return chartInstance.getModel().getComponent(axis).axis.scale.rawExtentInfo._dataMax
|
||||||
}
|
}
|
|
@ -43,68 +43,68 @@ const columns = [
|
||||||
{
|
{
|
||||||
title: 'SampleID',
|
title: 'SampleID',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'sampleId'
|
dataIndex: 'sampleId',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Station',
|
title: 'Station',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'stationName'
|
dataIndex: 'stationName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Detector',
|
title: 'Detector',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'detectorsName',
|
dataIndex: 'detectorsName',
|
||||||
width: 130
|
width: 130,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Sample',
|
title: 'Sample',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'sampleType'
|
dataIndex: 'sampleType',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'DataType',
|
title: 'DataType',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'dataType'
|
dataIndex: 'dataType',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Qualifier',
|
title: 'Qualifier',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'spectralQualifie'
|
dataIndex: 'spectralQualifie',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Col.Stop',
|
title: 'Col.Stop',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'collectStop',
|
dataIndex: 'collectStop',
|
||||||
width: 170
|
width: 170,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Acq.Start',
|
title: 'Acq.Start',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'acquisitionStart',
|
dataIndex: 'acquisitionStart',
|
||||||
width: 170
|
width: 170,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Acq.real',
|
title: 'Acq.real',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'acquisitionRealSec'
|
dataIndex: 'acquisitionRealSec',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Acq.live',
|
title: 'Acq.live',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'acquisitionLiveSec'
|
dataIndex: 'acquisitionLiveSec',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Status',
|
title: 'Status',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'status'
|
dataIndex: 'status',
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: Boolean
|
type: Boolean,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mixins: [JeecgListMixin],
|
mixins: [JeecgListMixin],
|
||||||
data() {
|
data() {
|
||||||
|
@ -113,11 +113,10 @@ export default {
|
||||||
return {
|
return {
|
||||||
queryParam: {
|
queryParam: {
|
||||||
menuTypes: 'G,B',
|
menuTypes: 'G,B',
|
||||||
startDate: moment()
|
startDate: moment().add(-7, 'd').format('YYYY-MM-DD'),
|
||||||
.add(-7, 'd')
|
|
||||||
.format('YYYY-MM-DD'),
|
|
||||||
endDate: moment().format('YYYY-MM-DD'),
|
endDate: moment().format('YYYY-MM-DD'),
|
||||||
dbName: 'auto'
|
dbName: 'auto',
|
||||||
|
spectralQualifie: 'FULL',
|
||||||
},
|
},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectionRows: [],
|
selectionRows: [],
|
||||||
|
@ -125,8 +124,22 @@ export default {
|
||||||
stationList: [],
|
stationList: [],
|
||||||
detectorList: [],
|
detectorList: [],
|
||||||
url: {
|
url: {
|
||||||
list: '/spectrumAnalysis/getDBSpectrumList'
|
list: '/spectrumAnalysis/getDBSpectrumList',
|
||||||
}
|
},
|
||||||
|
sampleTypeOption: [
|
||||||
|
{
|
||||||
|
label: 'P',
|
||||||
|
value: 'P',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'B',
|
||||||
|
value: 'B',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'G',
|
||||||
|
value: 'G',
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -165,12 +178,12 @@ export default {
|
||||||
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, params)
|
getAction(this.url.list, params)
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const result = res.result.records || res.result
|
const result = res.result.records || res.result
|
||||||
result.forEach(item => {
|
result.forEach((item) => {
|
||||||
const fileName = item.inputFileName
|
const fileName = item.inputFileName
|
||||||
if(fileName) {
|
if (fileName) {
|
||||||
const arr = fileName.split('/')
|
const arr = fileName.split('/')
|
||||||
item.inputFileName = arr[arr.length - 1]
|
item.inputFileName = arr[arr.length - 1]
|
||||||
}
|
}
|
||||||
|
@ -214,11 +227,11 @@ export default {
|
||||||
const { success, result, message } = await getAction('/spectrumAnalysis/getDBSearchList', {
|
const { success, result, message } = await getAction('/spectrumAnalysis/getDBSearchList', {
|
||||||
menuTypes: value,
|
menuTypes: value,
|
||||||
dbName: this.queryParam.dbName,
|
dbName: this.queryParam.dbName,
|
||||||
AllUsers: this.allUsersValue
|
AllUsers: this.allUsersValue,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.stationList = result.stationCode.map(item => ({ label: item, value: item }))
|
this.stationList = result.stationCode.map((item) => ({ label: item, value: item }))
|
||||||
this.detectorList = result.detectorCode.map(item => ({ label: item, value: item }))
|
this.detectorList = result.detectorCode.map((item) => ({ label: item, value: item }))
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -234,7 +247,7 @@ export default {
|
||||||
|
|
||||||
filterOption(input, option) {
|
filterOption(input, option) {
|
||||||
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
visible: {
|
visible: {
|
||||||
|
@ -243,7 +256,7 @@ export default {
|
||||||
},
|
},
|
||||||
set(val) {
|
set(val) {
|
||||||
this.$emit('input', val)
|
this.$emit('input', val)
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
formItems() {
|
formItems() {
|
||||||
return [
|
return [
|
||||||
|
@ -255,32 +268,64 @@ export default {
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: 'All',
|
label: 'All',
|
||||||
value: 'G,B'
|
value: 'G,B',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Gamma',
|
label: 'Gamma',
|
||||||
value: 'G'
|
value: 'G',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Beta',
|
label: 'Beta',
|
||||||
value: 'B'
|
value: 'B',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
allowClear: true
|
allowClear: true,
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '18%'
|
width: '18%',
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
change: event => {
|
change: (event) => {
|
||||||
|
console.log('event', event)
|
||||||
if (!event) {
|
if (!event) {
|
||||||
this.stationList = []
|
this.stationList = []
|
||||||
this.detectorList = []
|
this.detectorList = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
let arr_B = [
|
||||||
|
{
|
||||||
|
label: 'B',
|
||||||
|
value: 'B',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
let arr_G = [
|
||||||
|
{
|
||||||
|
label: 'P',
|
||||||
|
value: 'P',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'G',
|
||||||
|
value: 'G',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
let arr_A = [
|
||||||
|
{
|
||||||
|
label: 'P',
|
||||||
|
value: 'P',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'B',
|
||||||
|
value: 'B',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'G',
|
||||||
|
value: 'G',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
this.sampleTypeOption = event == 'B' ? arr_B : event == 'G' ? arr_G : arr_A
|
||||||
this.getStationAndDetectorList(event)
|
this.getStationAndDetectorList(event)
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Station',
|
label: 'Station',
|
||||||
|
@ -290,11 +335,11 @@ export default {
|
||||||
options: this.stationList,
|
options: this.stationList,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
filterOption: this.filterOption,
|
filterOption: this.filterOption,
|
||||||
allowClear: true
|
allowClear: true,
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '19%'
|
width: '19%',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Detector',
|
label: 'Detector',
|
||||||
|
@ -304,36 +349,23 @@ export default {
|
||||||
options: this.detectorList,
|
options: this.detectorList,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
filterOption: this.filterOption,
|
filterOption: this.filterOption,
|
||||||
allowClear: true
|
allowClear: true,
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '19%'
|
width: '19%',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Sample',
|
label: 'Sample',
|
||||||
type: 'custom-select',
|
type: 'custom-select',
|
||||||
name: 'sampleType',
|
name: 'sampleType',
|
||||||
props: {
|
props: {
|
||||||
options: [
|
options: this.sampleTypeOption,
|
||||||
{
|
allowClear: true,
|
||||||
label: 'P',
|
|
||||||
value: 'P'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'B',
|
|
||||||
value: 'B'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'G',
|
|
||||||
value: 'G'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
allowClear: true
|
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '14%'
|
width: '14%',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'DataType',
|
label: 'DataType',
|
||||||
|
@ -343,34 +375,34 @@ export default {
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: 'S',
|
label: 'S',
|
||||||
value: 'S'
|
value: 'S',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'G',
|
label: 'G',
|
||||||
value: 'G'
|
value: 'G',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'D',
|
label: 'D',
|
||||||
value: 'D'
|
value: 'D',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Q',
|
label: 'Q',
|
||||||
value: 'Q'
|
value: 'Q',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'B',
|
label: 'B',
|
||||||
value: 'B'
|
value: 'B',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'C',
|
label: 'C',
|
||||||
value: 'C'
|
value: 'C',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
allowClear: true
|
allowClear: true,
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '14%'
|
width: '14%',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Qualifier',
|
label: 'Qualifier',
|
||||||
|
@ -380,30 +412,30 @@ export default {
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: 'FULL',
|
label: 'FULL',
|
||||||
value: 'FULL'
|
value: 'FULL',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'PREL',
|
label: 'PREL',
|
||||||
value: 'PREL'
|
value: 'PREL',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
allowClear: true
|
allowClear: true,
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '16%',
|
width: '16%',
|
||||||
paddingRight: 0
|
paddingRight: 0,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'SampleID',
|
label: 'SampleID',
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
name: 'sampleId',
|
name: 'sampleId',
|
||||||
props: {
|
props: {
|
||||||
allowClear: true
|
allowClear: true,
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '264px'
|
width: '264px',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '',
|
label: '',
|
||||||
|
@ -413,13 +445,13 @@ export default {
|
||||||
options: [
|
options: [
|
||||||
{ label: 'All User', value: 'AllUsers' },
|
{ label: 'All User', value: 'AllUsers' },
|
||||||
{ label: 'Collect Stop', value: 'CollectStopB' },
|
{ label: 'Collect Stop', value: 'CollectStopB' },
|
||||||
{ label: 'Acq.Start', value: 'AcqStartB' }
|
{ label: 'Acq.Start', value: 'AcqStartB' },
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '305px',
|
width: '305px',
|
||||||
paddingRight: 0
|
paddingRight: 0,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'From',
|
label: 'From',
|
||||||
|
@ -429,12 +461,12 @@ export default {
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
valueFormat: 'YYYY-MM-DD',
|
valueFormat: 'YYYY-MM-DD',
|
||||||
style: {
|
style: {
|
||||||
minWidth: 'auto'
|
minWidth: 'auto',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: '19%'
|
width: '19%',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'To',
|
label: 'To',
|
||||||
|
@ -444,15 +476,15 @@ export default {
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
valueFormat: 'YYYY-MM-DD',
|
valueFormat: 'YYYY-MM-DD',
|
||||||
style: {
|
style: {
|
||||||
minWidth: 'auto'
|
minWidth: 'auto',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
paddingRight: 0,
|
paddingRight: 0,
|
||||||
marginRight: '22px',
|
marginRight: '22px',
|
||||||
width: '19%'
|
width: '19%',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -469,7 +501,7 @@ export default {
|
||||||
acqStartValue() {
|
acqStartValue() {
|
||||||
const checkboxGroup = this.queryParam.checkboxGroup
|
const checkboxGroup = this.queryParam.checkboxGroup
|
||||||
return !!(checkboxGroup && checkboxGroup.includes('AcqStartB'))
|
return !!(checkboxGroup && checkboxGroup.includes('AcqStartB'))
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// All User 变化时重新获取station 和detector
|
// All User 变化时重新获取station 和detector
|
||||||
|
@ -479,8 +511,8 @@ export default {
|
||||||
this.detectorList = []
|
this.detectorList = []
|
||||||
this.getStationAndDetectorList(this.queryParam.menuTypes)
|
this.getStationAndDetectorList(this.queryParam.menuTypes)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
<div class="graph-assistance-item" v-for="(item, index) in items" :key="index">
|
<div class="graph-assistance-item" v-for="(item, index) in items" :key="index">
|
||||||
<!-- 两个Label来回切换的 -->
|
<!-- 两个Label来回切换的 -->
|
||||||
<template v-if="item.label.length > 1">
|
<template v-if="item.label.length > 1">
|
||||||
<span>{{ item.activeLabel }}</span>
|
<span>{{ value[item.key] }}</span>
|
||||||
<a-switch class="no-change" v-model="item.checked" @change="handleChangeLabel(item)"></a-switch>
|
<two-label-switch :items="item.label" v-model="value[item.key]" @change="handleChange(item.key)" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 只有一个Label,点击改变状态的 -->
|
<!-- 只有一个Label,点击改变状态的 -->
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span>{{ item.label[0] }}</span>
|
<span>{{ item.label[0] }}</span>
|
||||||
<a-switch v-model="item.checked" @change="handleChange(item)"></a-switch>
|
<a-switch v-model="value[item.key]" @change="handleChange(item.key)"></a-switch>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,72 +21,60 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
|
import TwoLabelSwitch from './TwoLabelSwitch.vue'
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
label: ['Linear', 'Log10'],
|
label: ['Linear', 'Log10'],
|
||||||
checked: false,
|
key: 'chartYAxisType',
|
||||||
activeLabel: 'Linear'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: ['Cursor'],
|
label: ['Cursor'],
|
||||||
checked: true
|
key: 'Cursor',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: ['Lc'],
|
label: ['Lc'],
|
||||||
checked: true
|
key: 'Lc',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: ['Baseline'],
|
label: ['Baseline'],
|
||||||
checked: true
|
key: 'Baseline',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: ['Channel', 'Energy'],
|
label: ['Channel', 'Energy'],
|
||||||
checked: false,
|
key: 'axisType',
|
||||||
activeLabel: 'Channel'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: ['Lines', 'Scatter'],
|
label: ['Lines', 'Scatter'],
|
||||||
checked: false,
|
key: 'spectrumType',
|
||||||
activeLabel: 'Lines'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: ['SCAC'],
|
label: ['SCAC'],
|
||||||
checked: true
|
key: 'SCAC',
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
|
components: { TwoLabelSwitch },
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
items: cloneDeep(items)
|
items: cloneDeep(items),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChangeLabel(item) {
|
handleChange(key) {
|
||||||
if (item.activeLabel == item.label[0]) {
|
this.$emit('change', key)
|
||||||
item.activeLabel = item.label[1]
|
|
||||||
} else {
|
|
||||||
item.activeLabel = item.label[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'labelChange',
|
|
||||||
label: item.activeLabel
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
handleChange(item) {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'valueChange',
|
|
||||||
label: item.label[0],
|
|
||||||
value: item.checked
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.$emit('reset')
|
this.$emit('reset')
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -122,10 +110,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-change {
|
|
||||||
background-color: @primary-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-switch {
|
.ant-switch {
|
||||||
&::after {
|
&::after {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
|
@ -0,0 +1,54 @@
|
||||||
|
<template>
|
||||||
|
<div class="two-label-switch">
|
||||||
|
<a-switch class="no-change" v-model="checked" @change="handleChange"> </a-switch>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
items: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (this.items.length !== 2) {
|
||||||
|
throw new Error('此组件需要两个值')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChange() {
|
||||||
|
this.$emit('change')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
checked: {
|
||||||
|
set(val) {
|
||||||
|
this.$emit('input', val == true ? this.items[1] : this.items[0])
|
||||||
|
},
|
||||||
|
get() {
|
||||||
|
return this.value == this.items[1] ? true : false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.two-label-switch {
|
||||||
|
display: inline-block;
|
||||||
|
.no-change {
|
||||||
|
background-color: @primary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-switch {
|
||||||
|
&::after {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -14,8 +14,8 @@
|
||||||
<pop-over-with-icon>
|
<pop-over-with-icon>
|
||||||
Graph Assistance
|
Graph Assistance
|
||||||
<graph-assistance
|
<graph-assistance
|
||||||
v-if="!isLoading"
|
|
||||||
slot="content"
|
slot="content"
|
||||||
|
v-model="graphAssistance"
|
||||||
@change="handleGraphAssistanceChange"
|
@change="handleGraphAssistanceChange"
|
||||||
@reset="handleResetChart"
|
@reset="handleResetChart"
|
||||||
/>
|
/>
|
||||||
|
@ -114,7 +114,7 @@ import CustomChart from '@/components/CustomChart/index.vue'
|
||||||
import PopOverWithIcon from './components/SubOperators/PopOverWithIcon.vue'
|
import PopOverWithIcon from './components/SubOperators/PopOverWithIcon.vue'
|
||||||
import DetailedInfomation from './components/SubOperators/DetailedInfomation.vue'
|
import DetailedInfomation from './components/SubOperators/DetailedInfomation.vue'
|
||||||
import QcFlags from './components/SubOperators/QcFlags.vue'
|
import QcFlags from './components/SubOperators/QcFlags.vue'
|
||||||
import GraphAssistance from './components/SubOperators/GraphAssistance.vue'
|
import GraphAssistance from './components/SubOperators/GraphAssistance/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, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
@ -140,6 +140,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import StripModal from './components/Modals/StripModal.vue'
|
import StripModal from './components/Modals/StripModal.vue'
|
||||||
import { FilePicker } from '@/utils/FilePicker'
|
import { FilePicker } from '@/utils/FilePicker'
|
||||||
import { zipFile } from '@/utils/file'
|
import { zipFile } from '@/utils/file'
|
||||||
|
import { mapMutations } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
@ -298,9 +299,6 @@ export default {
|
||||||
const { dbName, sampleId } = this.sample
|
const { dbName, sampleId } = this.sample
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
|
|
||||||
this.handleResetState()
|
|
||||||
|
|
||||||
// const { success, result, message } = Response
|
// const { success, result, message } = Response
|
||||||
this.cancelLastRequest()
|
this.cancelLastRequest()
|
||||||
const cancelToken = this.createCancelToken()
|
const cancelToken = this.createCancelToken()
|
||||||
|
@ -330,7 +328,6 @@ export default {
|
||||||
const { inputFileName: fileName } = this.sample
|
const { inputFileName: fileName } = this.sample
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
this.handleResetState()
|
|
||||||
// const { success, result, message } = Response
|
// const { success, result, message } = Response
|
||||||
|
|
||||||
this.cancelLastRequest()
|
this.cancelLastRequest()
|
||||||
|
@ -435,107 +432,47 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.resetThumbnailChartDataMax()
|
this.resetThumbnailChartDataMax()
|
||||||
const series = []
|
|
||||||
|
|
||||||
// 推入Spectrum Line
|
// 设置 Spectrum Line
|
||||||
series.push(
|
this.redrawLineBySeriesName('Spectrum', shadowEnergyChart, shadowChannelChart, true, shadowChannelChart.color)
|
||||||
buildLineSeries(
|
|
||||||
'Spectrum',
|
// 设置 BaseLine
|
||||||
this.transformPointListData(shadowChannelChart.pointlist),
|
this.setSeriesData(
|
||||||
shadowChannelChart.color,
|
this.option.series,
|
||||||
{
|
'BaseLine',
|
||||||
symbolSize: 2,
|
this.transformPointListData(channelBaseLine.pointlist),
|
||||||
markLine: {
|
channelBaseLine.color
|
||||||
silent: true,
|
|
||||||
symbol: 'none',
|
|
||||||
label: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
lineStyle: {
|
|
||||||
color: 'red',
|
|
||||||
width: 1,
|
|
||||||
},
|
|
||||||
data: [{ xAxis: -1 }],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 右上角缩略图设置Spectrum Line 数据
|
// 设置 LcLine
|
||||||
|
this.setSeriesData(
|
||||||
|
this.option.series,
|
||||||
|
'LcLine',
|
||||||
|
this.transformPointListData(channelLcLine.pointlist),
|
||||||
|
channelLcLine.color
|
||||||
|
)
|
||||||
|
|
||||||
|
// 设置 ScacLine
|
||||||
|
this.setSeriesData(
|
||||||
|
this.option.series,
|
||||||
|
'ScacLine',
|
||||||
|
this.transformPointListData(channelScacLine.pointlist),
|
||||||
|
channelScacLine.color
|
||||||
|
)
|
||||||
|
|
||||||
|
// 设置 基线控制点
|
||||||
|
this.redrawCtrlPointBySeriesName()
|
||||||
|
|
||||||
|
// 设置 Peak Line
|
||||||
|
this.redrawPeakLine()
|
||||||
|
|
||||||
|
// 设置右上角缩略图 Spectrum Line 数据
|
||||||
this.setSeriesData(
|
this.setSeriesData(
|
||||||
this.thumbnailOption.series,
|
this.thumbnailOption.series,
|
||||||
'Spectrum',
|
'Spectrum',
|
||||||
this.transformPointListData(shadowChannelChart.pointlist),
|
this.transformPointListData(shadowChannelChart.pointlist),
|
||||||
shadowChannelChart.color
|
shadowChannelChart.color
|
||||||
)
|
)
|
||||||
|
|
||||||
// 推入BaseLine
|
|
||||||
series.push(
|
|
||||||
buildLineSeries('BaseLine', this.transformPointListData(channelBaseLine.pointlist), channelBaseLine.color, {
|
|
||||||
z: 2,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
// 推入LcLine线
|
|
||||||
series.push(
|
|
||||||
buildLineSeries('LcLine', this.transformPointListData(channelLcLine.pointlist), channelLcLine.color, {
|
|
||||||
z: 3,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
// 推入Scac线
|
|
||||||
series.push(
|
|
||||||
buildLineSeries('ScacLine', this.transformPointListData(channelScacLine.pointlist), channelScacLine.color, {
|
|
||||||
z: 4,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
// 推入基线控制点
|
|
||||||
series.push({
|
|
||||||
name: 'BaseLine_Ctrl_Point',
|
|
||||||
type: 'scatter',
|
|
||||||
data: shapeChannelData.map(({ size, color, point: { x, y } }) => {
|
|
||||||
return {
|
|
||||||
value: [x, y],
|
|
||||||
itemStyle: {
|
|
||||||
color: 'transparent',
|
|
||||||
borderColor: color,
|
|
||||||
borderWidth: size / 2,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
emphasis: {
|
|
||||||
disabled: true,
|
|
||||||
},
|
|
||||||
animation: false,
|
|
||||||
z: 5,
|
|
||||||
})
|
|
||||||
|
|
||||||
// 推入Peak Line
|
|
||||||
const peakLines = []
|
|
||||||
channelPeakGroup.forEach((item, index) => {
|
|
||||||
peakLines.push(
|
|
||||||
buildLineSeries(`Peak_${index}`, this.transformPointListData(item.pointlist), item.color, {
|
|
||||||
z: 6,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
})
|
|
||||||
series.push(...peakLines)
|
|
||||||
|
|
||||||
// 推入Compare Line
|
|
||||||
series.push(
|
|
||||||
buildLineSeries('Compare', [], '#fff', {
|
|
||||||
symbolSize: 2,
|
|
||||||
z: 7,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
this.opts.notMerge = true
|
|
||||||
this.option.series = series
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.resetChartOpts()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// chart 的 tooltip
|
// chart 的 tooltip
|
||||||
|
@ -559,33 +496,56 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// Graph Assistance 操作
|
// Graph Assistance 操作
|
||||||
handleGraphAssistanceChange({ type, label, value }) {
|
handleGraphAssistanceChange(key) {
|
||||||
|
const value = this.graphAssistance[key]
|
||||||
const spectrumLineSeries = findSeriesByName(this.option.series, 'Spectrum')
|
const spectrumLineSeries = findSeriesByName(this.option.series, 'Spectrum')
|
||||||
const thumbnailSpectrumLineSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
const thumbnailSpectrumLineSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
||||||
const compareLineSeries = findSeriesByName(this.option.series, 'Compare')
|
const compareLineSeries = findSeriesByName(this.option.series, 'Compare')
|
||||||
|
|
||||||
// 类型变化
|
switch (key) {
|
||||||
if (type == 'labelChange') {
|
// 折线y轴类型变化
|
||||||
switch (label) {
|
case 'chartYAxisType':
|
||||||
case 'Linear':
|
if (value == 'Linear') {
|
||||||
this.option.yAxis.type = 'value'
|
this.option.yAxis.type = 'value'
|
||||||
this.thumbnailOption.yAxis.type = 'value'
|
this.thumbnailOption.yAxis.type = 'value'
|
||||||
this.handleResetChart()
|
} else {
|
||||||
break
|
|
||||||
case 'Log10':
|
|
||||||
this.option.yAxis.type = 'log'
|
this.option.yAxis.type = 'log'
|
||||||
this.thumbnailOption.yAxis.type = 'log'
|
this.thumbnailOption.yAxis.type = 'log'
|
||||||
|
}
|
||||||
this.handleResetChart()
|
this.handleResetChart()
|
||||||
break
|
break
|
||||||
case 'Channel':
|
|
||||||
case 'Energy':
|
// 红色竖线是否显示
|
||||||
|
case 'Cursor':
|
||||||
|
if (value) {
|
||||||
|
spectrumLineSeries.markLine.lineStyle.width = 2
|
||||||
|
} else {
|
||||||
|
spectrumLineSeries.markLine.lineStyle.width = 0
|
||||||
|
}
|
||||||
|
break
|
||||||
|
|
||||||
|
// 基线是否显示
|
||||||
|
case 'Baseline':
|
||||||
|
this.redrawLineBySeriesName('BaseLine', this.energyData.baseLine, this.channelData.baseLine, value)
|
||||||
|
break
|
||||||
|
|
||||||
|
// Lc 线是否显示
|
||||||
|
case 'Lc':
|
||||||
|
this.redrawLineBySeriesName('LcLine', this.energyData.lcLine, this.channelData.lcLine, value)
|
||||||
|
break
|
||||||
|
|
||||||
|
// Channel和Energy的切换
|
||||||
|
case 'axisType':
|
||||||
// 如果Energy没有值,则不进行切换
|
// 如果Energy没有值,则不进行切换
|
||||||
if (!this.energyData.all.pointlist) {
|
if (!this.energyData.all.pointlist) {
|
||||||
|
if (value == 'Energy') {
|
||||||
|
this.graphAssistance[key] = 'Channel'
|
||||||
|
}
|
||||||
|
this.$message.warn('Has No Energy Yet')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.graphAssistance.axisType = label
|
this.option.xAxis.name = value
|
||||||
this.option.xAxis.name = label
|
|
||||||
|
|
||||||
this.handleResetChart()
|
this.handleResetChart()
|
||||||
|
|
||||||
|
@ -617,10 +577,12 @@ export default {
|
||||||
if (this.channelCompareLine) {
|
if (this.channelCompareLine) {
|
||||||
this.redrawLineBySeriesName('Compare', this.energyCompareLine, this.channelCompareLine)
|
this.redrawLineBySeriesName('Compare', this.energyCompareLine, this.channelCompareLine)
|
||||||
}
|
}
|
||||||
break
|
|
||||||
case 'Lines':
|
|
||||||
this.graphAssistance.spectrumType = 'Lines'
|
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
|
// Lines 和 Scatter 的切换
|
||||||
|
case 'spectrumType':
|
||||||
|
if (value == 'Lines') {
|
||||||
spectrumLineSeries.type = 'line'
|
spectrumLineSeries.type = 'line'
|
||||||
spectrumLineSeries.symbol = 'none'
|
spectrumLineSeries.symbol = 'none'
|
||||||
|
|
||||||
|
@ -635,10 +597,7 @@ export default {
|
||||||
if (this.channelCompareLine) {
|
if (this.channelCompareLine) {
|
||||||
this.redrawLineBySeriesName('Compare', this.energyCompareLine, this.channelCompareLine)
|
this.redrawLineBySeriesName('Compare', this.energyCompareLine, this.channelCompareLine)
|
||||||
}
|
}
|
||||||
break
|
} else {
|
||||||
case 'Scatter':
|
|
||||||
this.graphAssistance.spectrumType = 'Scatter'
|
|
||||||
|
|
||||||
spectrumLineSeries.type = 'scatterGL'
|
spectrumLineSeries.type = 'scatterGL'
|
||||||
spectrumLineSeries.symbol = 'circle'
|
spectrumLineSeries.symbol = 'circle'
|
||||||
|
|
||||||
|
@ -651,35 +610,18 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.rangeScatter()
|
this.rangeScatter()
|
||||||
})
|
})
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
|
||||||
}
|
|
||||||
// 值变化
|
|
||||||
else if (type == 'valueChange') {
|
|
||||||
this.graphAssistance[label] = value
|
|
||||||
|
|
||||||
switch (label) {
|
// SCAC 线是否显示
|
||||||
case 'Cursor':
|
|
||||||
// 显示红色竖线
|
|
||||||
if (value) {
|
|
||||||
spectrumLineSeries.markLine.lineStyle.width = 2
|
|
||||||
} else {
|
|
||||||
spectrumLineSeries.markLine.lineStyle.width = 0
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case 'Baseline':
|
|
||||||
this.redrawLineBySeriesName('BaseLine', this.energyData.baseLine, this.channelData.baseLine, value)
|
|
||||||
break
|
|
||||||
case 'Lc':
|
|
||||||
this.redrawLineBySeriesName('LcLine', this.energyData.lcLine, this.channelData.lcLine, value)
|
|
||||||
break
|
|
||||||
case 'SCAC':
|
case 'SCAC':
|
||||||
this.redrawLineBySeriesName('ScacLine', this.energyData.scacLine, this.channelData.scacLine, value)
|
this.redrawLineBySeriesName('ScacLine', this.energyData.scacLine, this.channelData.scacLine, value)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
changeSeriesType() {},
|
||||||
|
|
||||||
handleChangeNuclideVisible() {
|
handleChangeNuclideVisible() {
|
||||||
this.nuclideLibraryVisible = !this.nuclideLibraryVisible
|
this.nuclideLibraryVisible = !this.nuclideLibraryVisible
|
||||||
},
|
},
|
||||||
|
@ -710,11 +652,17 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clearPeakLine() {
|
||||||
|
this.opts.notMerge = true
|
||||||
|
this.option.series.splice(6)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetChartOpts()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 重绘Peak Line
|
// 重绘Peak Line
|
||||||
redrawPeakLine() {
|
redrawPeakLine() {
|
||||||
this.option.series = this.option.series.filter((item) => {
|
this.clearPeakLine()
|
||||||
return !item.name.includes('Peak_')
|
|
||||||
})
|
|
||||||
|
|
||||||
const data = this.isEnergy() ? this.energyData.peakGroup : this.channelData.peakGroup
|
const data = this.isEnergy() ? this.energyData.peakGroup : this.channelData.peakGroup
|
||||||
const peakLines = []
|
const peakLines = []
|
||||||
|
@ -1179,9 +1127,9 @@ export default {
|
||||||
|
|
||||||
// 从分析工具刷新部分数据
|
// 从分析工具刷新部分数据
|
||||||
handleRefresh(data) {
|
handleRefresh(data) {
|
||||||
this.handleResetState()
|
|
||||||
data.DetailedInformation = this.detailedInfomation
|
data.DetailedInformation = this.detailedInfomation
|
||||||
this.clearCompareLine()
|
this.clearCompareLine()
|
||||||
|
this.redrawPeakLine()
|
||||||
this.dataProcess(data)
|
this.dataProcess(data)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1416,23 +1364,10 @@ export default {
|
||||||
this.selectedChannel = -1
|
this.selectedChannel = -1
|
||||||
this.nuclideLibraryList = []
|
this.nuclideLibraryList = []
|
||||||
this.closePeakInfomationTooltip()
|
this.closePeakInfomationTooltip()
|
||||||
this.option.series = []
|
this.clearPeakLine()
|
||||||
this.option.xAxis.name = 'Channel'
|
this.option.xAxis.name = 'Channel'
|
||||||
this.option.yAxis.type = 'value'
|
this.option.yAxis.type = 'log'
|
||||||
this.thumbnailOption.yAxis.type = 'value'
|
this.thumbnailOption.yAxis.type = 'log'
|
||||||
|
|
||||||
if (this.option.series.length) {
|
|
||||||
const spectrumLineSeries = findSeriesByName(this.option.series, 'Spectrum')
|
|
||||||
spectrumLineSeries.type = 'line'
|
|
||||||
spectrumLineSeries.symbol = 'none'
|
|
||||||
spectrumLineSeries.markLine.lineStyle.width = 2
|
|
||||||
}
|
|
||||||
|
|
||||||
const thumbnailSpectrumLineSeries = findSeriesByName(this.thumbnailOption.series, 'Spectrum')
|
|
||||||
thumbnailSpectrumLineSeries.type = 'line'
|
|
||||||
thumbnailSpectrumLineSeries.symbol = 'none'
|
|
||||||
|
|
||||||
this.graphAssistance = cloneDeep(graphAssistance)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1554,6 +1489,8 @@ export default {
|
||||||
const arrFunc = isList ? Array.prototype.filter : Array.prototype.find
|
const arrFunc = isList ? Array.prototype.filter : Array.prototype.find
|
||||||
return arrFunc.call(allData, (item) => item.name == name && item.group == group) || {}
|
return arrFunc.call(allData, (item) => item.name == name && item.group == group) || {}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
...mapMutations(['ADD_SAMPLE_DATA', 'GET_SAMPLE_DATA']),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
currStep: {
|
currStep: {
|
||||||
|
@ -1568,11 +1505,18 @@ export default {
|
||||||
sample: {
|
sample: {
|
||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {
|
||||||
console.log('newValnewVal', newVal)
|
console.log('newValnewVal', newVal)
|
||||||
|
this.graphAssistance.axisType = 'Channel'
|
||||||
|
this.handleResetState()
|
||||||
|
const sampleData = this.GET_SAMPLE_DATA(newVal.inputFileName)
|
||||||
|
if (sampleData) {
|
||||||
|
console.log('%c [ ]-1521', 'font-size:13px; background:pink; color:#bf2c9f;', sampleData)
|
||||||
|
} else {
|
||||||
if (newVal.sampleId) {
|
if (newVal.sampleId) {
|
||||||
this.getSampleDetail()
|
this.getSampleDetail()
|
||||||
} else {
|
} else {
|
||||||
this.getSampleDetail_file()
|
this.getSampleDetail_file()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
},
|
},
|
||||||
|
|
46
src/views/spectrumAnalysis/seriesBuilder.js
Normal file
46
src/views/spectrumAnalysis/seriesBuilder.js
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
import { buildLineSeries } from '@/utils/chartHelper'
|
||||||
|
|
||||||
|
export const spectrumSeries = buildLineSeries('Spectrum', [], '#fff', {
|
||||||
|
symbolSize: 2,
|
||||||
|
markLine: {
|
||||||
|
silent: true,
|
||||||
|
symbol: 'none',
|
||||||
|
label: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
color: 'red',
|
||||||
|
width: 1
|
||||||
|
},
|
||||||
|
data: [{ xAxis: -1 }]
|
||||||
|
},
|
||||||
|
z: 1
|
||||||
|
})
|
||||||
|
|
||||||
|
export const baseLineSeries = buildLineSeries('BaseLine', [], '#fff', {
|
||||||
|
z: 2
|
||||||
|
})
|
||||||
|
|
||||||
|
export const lcLineSeries = buildLineSeries('LcLine', [], '#fff', {
|
||||||
|
z: 3
|
||||||
|
})
|
||||||
|
|
||||||
|
export const scacLineSeries = buildLineSeries('ScacLine', [], '#fff', {
|
||||||
|
z: 4
|
||||||
|
})
|
||||||
|
|
||||||
|
export const baseLineCtrlPoint = {
|
||||||
|
name: 'BaseLine_Ctrl_Point',
|
||||||
|
type: 'scatter',
|
||||||
|
data: [],
|
||||||
|
emphasis: {
|
||||||
|
disabled: true
|
||||||
|
},
|
||||||
|
animation: false,
|
||||||
|
z: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
export const compareLineSeries = buildLineSeries('Compare', [], '#fff', {
|
||||||
|
symbolSize: 2,
|
||||||
|
z: 7
|
||||||
|
})
|
|
@ -1,4 +1,5 @@
|
||||||
import { buildLineSeries } from "@/utils/chartHelper"
|
import { buildLineSeries } from "@/utils/chartHelper"
|
||||||
|
import { baseLineCtrlPoint, baseLineSeries, compareLineSeries, lcLineSeries, scacLineSeries, spectrumSeries } from "./seriesBuilder"
|
||||||
|
|
||||||
export const GammaOptions = {
|
export const GammaOptions = {
|
||||||
option: {
|
option: {
|
||||||
|
@ -98,7 +99,7 @@ export const GammaOptions = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: [],
|
series: [spectrumSeries, baseLineSeries, lcLineSeries, scacLineSeries, baseLineCtrlPoint, compareLineSeries],
|
||||||
brush: {}
|
brush: {}
|
||||||
},
|
},
|
||||||
// 缩略图配置
|
// 缩略图配置
|
||||||
|
@ -158,10 +159,14 @@ export const GammaOptions = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('%c [ ]-162', 'font-size:13px; background:pink; color:#bf2c9f;', GammaOptions.option)
|
||||||
|
|
||||||
export const graphAssistance = {
|
export const graphAssistance = {
|
||||||
|
chartYAxisType: 'Log10',
|
||||||
|
Cursor: true,
|
||||||
|
Baseline: true,
|
||||||
|
Lc: true,
|
||||||
axisType: 'Channel',
|
axisType: 'Channel',
|
||||||
spectrumType: 'Lines',
|
spectrumType: 'Lines',
|
||||||
Baseline: true,
|
|
||||||
SCAC: true,
|
SCAC: true,
|
||||||
Lc: true,
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user