Merge branch 'feature-particulate-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into feature-particulate-renpy
This commit is contained in:
commit
b53d2c51b6
|
@ -564,7 +564,7 @@ export default {
|
||||||
this.dataSourceSpectrumX_B = this.allData.bspectrumBlock&&this.allData.bspectrumBlock.bspectrumSubBlock.map((item, index) => {
|
this.dataSourceSpectrumX_B = this.allData.bspectrumBlock&&this.allData.bspectrumBlock.bspectrumSubBlock.map((item, index) => {
|
||||||
return index
|
return index
|
||||||
})
|
})
|
||||||
this.allData.histogramBlock.histogramSubBlock.forEach(item => {
|
this.allData.histogramBlock&&this.allData.histogramBlock.histogramSubBlock.forEach(item => {
|
||||||
if (item.c === 1) {
|
if (item.c === 1) {
|
||||||
this.dataSourceHistogray.level_1.push(item)
|
this.dataSourceHistogray.level_1.push(item)
|
||||||
} else if (item.c <= 5 && item.c > 1) {
|
} else if (item.c <= 5 && item.c > 1) {
|
||||||
|
@ -647,10 +647,37 @@ export default {
|
||||||
getUid() {
|
getUid() {
|
||||||
return (Math.random()+new Date().getTime()).toString(32).slice(0,8)
|
return (Math.random()+new Date().getTime()).toString(32).slice(0,8)
|
||||||
},
|
},
|
||||||
|
changeData(data) {
|
||||||
|
let arr = data.map(item => {
|
||||||
|
if (item==0) {
|
||||||
|
return 1.001
|
||||||
|
} else {
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return arr
|
||||||
|
},
|
||||||
yLogChange(e,str) {
|
yLogChange(e,str) {
|
||||||
let yAxisType = e.target.checked ? "log" : "value"
|
let yAxisType = e.target.checked ? "log" : "value"
|
||||||
str==="G"?this.yAxisType_g = yAxisType:this.yAxisType_b = yAxisType
|
str === "G" ? this.yAxisType_g = yAxisType : this.yAxisType_b = yAxisType
|
||||||
|
let dataArr =[]
|
||||||
|
if (e.target.checked) {
|
||||||
|
|
||||||
|
dataArr = this.changeData(str === "G"?this.dataSourceSpectrum_G:this.dataSourceSpectrum_B)
|
||||||
|
} else {
|
||||||
|
dataArr = str === "G"?this.dataSourceSpectrum_G:this.dataSourceSpectrum_B
|
||||||
|
}
|
||||||
let options = {
|
let options = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
formatter: function (params) {
|
||||||
|
return `<div>${params[0].axisValueLabel}</div>
|
||||||
|
<div style="color:#0656ff">
|
||||||
|
value:${e.target.checked ? params[0].value == 1.001 ? 0 : params[0].value : params[0].value}
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: str==="G"?this.yAxisType_g:this.yAxisType_b,
|
type: str==="G"?this.yAxisType_g:this.yAxisType_b,
|
||||||
splitLine: {
|
splitLine: {
|
||||||
|
@ -658,8 +685,25 @@ export default {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: "rgbA(64, 105, 121, 0.2)"
|
color: "rgbA(64, 105, 121, 0.2)"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: function (value) {
|
||||||
|
if (e.target.checked) {
|
||||||
|
return value == 1 ? 0 : value
|
||||||
|
} else {
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scale: false
|
||||||
},
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
itemStyle: { normal: { color: '#0656ff' } },
|
||||||
|
data: dataArr
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
if (str === "G") {
|
if (str === "G") {
|
||||||
this.spectrumChart_G.setOption(options)
|
this.spectrumChart_G.setOption(options)
|
||||||
|
@ -743,7 +787,7 @@ export default {
|
||||||
dataZoom: [
|
dataZoom: [
|
||||||
{
|
{
|
||||||
start: 0,
|
start: 0,
|
||||||
end: 255
|
end: 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
|
@ -759,14 +803,14 @@ export default {
|
||||||
this.spectrumChart_G = echarts.init(document.getElementById("spectrumChartRef_G"))
|
this.spectrumChart_G = echarts.init(document.getElementById("spectrumChartRef_G"))
|
||||||
this.spectrumChart_G.setOption(this.getOptions("G"))
|
this.spectrumChart_G.setOption(this.getOptions("G"))
|
||||||
window.addEventListener("resize", function () {
|
window.addEventListener("resize", function () {
|
||||||
spectrumChart_G.resize();
|
this,spectrumChart_G.resize();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
drawSpectrumChart_B() {
|
drawSpectrumChart_B() {
|
||||||
this.spectrumChart_B = echarts.init(document.getElementById("spectrumChartRef_B"))
|
this.spectrumChart_B = echarts.init(document.getElementById("spectrumChartRef_B"))
|
||||||
this.spectrumChart_B.setOption(this.getOptions("B"))
|
this.spectrumChart_B.setOption(this.getOptions("B"))
|
||||||
window.addEventListener("resize", function () {
|
window.addEventListener("resize", function () {
|
||||||
spectrumChart_B.resize();
|
this.spectrumChart_B.resize();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
drawHistogramChart() {
|
drawHistogramChart() {
|
||||||
|
@ -832,7 +876,7 @@ export default {
|
||||||
series
|
series
|
||||||
})
|
})
|
||||||
window.addEventListener("resize", function () {
|
window.addEventListener("resize", function () {
|
||||||
histogramChart.resize();
|
this.histogramChart.resize();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user