8. 去掉滚动条 5.2 X轴 时分秒换行, 左右两端不要超出范围导致显示不全 4.4 切换 type 之后,应该都删掉而不是只删一个 4.3 先选择两个台站,切换类型之后还能继续选择的问题

This commit is contained in:
任珮宇 2024-01-23 11:58:27 +08:00
parent a7b86dd469
commit 2e8795ccb3

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="height: 100%"> <div style="height: 100%; overflow: hidden">
<a-card :bordered="false" style="margin-left: 20px; height: 100%"> <a-card :bordered="false" style="margin-left: 20px; height: 100%">
<div class="layout-header"> <div class="layout-header">
<a-row type="flex" :gutter="20" style="margin-bottom: 20px"> <a-row type="flex" :gutter="20" style="margin-bottom: 20px">
@ -134,7 +134,7 @@ const commonOptions = {
trigger: 'axis', trigger: 'axis',
}, },
legend: { legend: {
inactiveColor: '#5f5f5f', inactiveColor: 'rgba(153, 177, 189,.5)',
lineStyle: { lineStyle: {
inactiveColor: '#333', inactiveColor: '#333',
}, },
@ -181,12 +181,15 @@ const commonOptions = {
}, },
axisLabel: { axisLabel: {
color: '#ade6ee', color: '#ade6ee',
// color: '#5b9cba',
formatter: (value, index) => { formatter: (value, index) => {
let val = value.split(' ').join('\n') let val = value.split(' ').join('\n')
// if (index === 0) { if (index === 0) {
// return ' ' + val let arr = value.split(' ')
// } arr[0] = ' ' + arr[0]
arr[1] = ' ' + arr[1]
let str = arr.join('\n')
return str
}
if (index === xDataLength - 1) { if (index === xDataLength - 1) {
let arr = value.split(' ') let arr = value.split(' ')
arr[0] = arr[0] + ' ' arr[0] = arr[0] + ' '
@ -283,7 +286,10 @@ export default {
methods: { methods: {
moment, moment,
typeChange(val) { typeChange(val) {
this.disposeCharts()
this.stationIds = [] this.stationIds = []
// this.queryParams.dbName = undefined
this.queryParams.nuclideNames = []
this.queryParams.systemType = val this.queryParams.systemType = val
if (val == 'Particulate') this.menuName = 'Particulate' if (val == 'Particulate') this.menuName = 'Particulate'
if (val == 'gamma') this.menuName = 'Noble Gas HPGe' if (val == 'gamma') this.menuName = 'Noble Gas HPGe'
@ -435,6 +441,13 @@ export default {
this.$message.warning('No downloadable data') this.$message.warning('No downloadable data')
} }
}, },
//
disposeCharts() {
if (this.chartOne) this.chartOne.dispose()
if (this.chartLeft) this.chartLeft.dispose()
if (this.chartRight) this.chartRight.dispose()
this.titleOne = this.titleLeft = this.titleRight = 'Nuclide History'
},
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