NEZ-1036 fix:group chart 配置折叠,显示时展开样式错误
This commit is contained in:
@@ -98,7 +98,7 @@ import * as echarts from 'echarts'
|
||||
import { getChart, setChart, getMousePoint } from '../common/js/common'
|
||||
import chartConfig from '../page/dashboard/overview/chartConfig'
|
||||
import { randomcolor } from '../common/js/radomcolor/randomcolor'
|
||||
import {formatScientificNotation} from "@/components/common/js/tools";
|
||||
import {chartResizeTool, formatScientificNotation} from "@/components/common/js/tools";
|
||||
import chartDataList from '@/components/common/mixin/chartDataList'
|
||||
export default {
|
||||
name: 'pieChart', // 饼图 或者 柱状图的统计
|
||||
@@ -301,7 +301,8 @@ export default {
|
||||
},
|
||||
resize (chartItem) {
|
||||
if (getChart(this.chartIndex)) {
|
||||
getChart(this.chartIndex).resize()
|
||||
const divHeight = this.$refs.legendArea.offsetHeight
|
||||
getChart(this.chartIndex).resize({ height: (this.data.height * this.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
|
||||
}
|
||||
},
|
||||
// 设置数据, filter区分
|
||||
|
||||
@@ -1569,8 +1569,9 @@ export default {
|
||||
const that = this
|
||||
setTimeout(function () {
|
||||
const itemHeight = item.height
|
||||
// 1.元素距离页面顶部的距离
|
||||
const mainOffsetTop = ele.offsetTop// offsetTop: 当前元素顶部距离最近父元素顶部的距离,和有没有滚动条没有关系。单位px,只读元素。
|
||||
// 1.元素距离页面顶部的距离 + group的高度
|
||||
const groupHeight = item.groupId ? document.getElementById('chart-' + item.groupId).offsetTop : 0
|
||||
const mainOffsetTop = ele.offsetTop + groupHeight// offsetTop: 当前元素顶部距离最近父元素顶部的距离,和有没有滚动条没有关系。单位px,只读元素。
|
||||
// 2.元素的高度
|
||||
const mainHeight = itemHeight// ele.offsetHeight;//itemHeight;
|
||||
// 3.页面滚动的距离
|
||||
|
||||
@@ -99,6 +99,7 @@ import { getChart, setChart, getMousePoint } from '../common/js/common'
|
||||
import chartConfig from '../page/dashboard/overview/chartConfig'
|
||||
import { randomcolor } from '../common/js/radomcolor/randomcolor'
|
||||
import chartDataList from '@/components/common/mixin/chartDataList'
|
||||
import {chartResizeTool} from "@/components/common/js/tools";
|
||||
export default {
|
||||
name: 'pieChart',
|
||||
components: {
|
||||
@@ -296,7 +297,8 @@ export default {
|
||||
},
|
||||
resize (chartItem) {
|
||||
if (getChart(this.chartIndex)) {
|
||||
getChart(this.chartIndex).resize()
|
||||
const divHeight = this.$refs.legendArea.offsetHeight
|
||||
getChart(this.chartIndex).resize({ height: (this.data.height * this.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
|
||||
}
|
||||
},
|
||||
// 设置数据, filter区分
|
||||
|
||||
@@ -1983,7 +1983,8 @@ export default {
|
||||
},
|
||||
chartResize () {
|
||||
if (getChart(this.chartIndex)) {
|
||||
getChart(this.chartIndex).resize()
|
||||
const divHeight = this.$refs.legendArea.offsetHeight
|
||||
getChart(this.chartIndex).resize({ height: (this.data.height * this.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -74,8 +74,9 @@
|
||||
<!-- <el-input v-model="monitor.alert_api" id="monitor-alert-api"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('config.system.monitor.prometheusFederation')" prop="prometheus_federation_enabled">
|
||||
<el-switch v-model="monitor.prometheus_federation_enabled " active-color="rgb(238, 157, 63)" active-value='1' inactive-value='0' id="system-monitor-prometheus_federation_enabled">
|
||||
</el-switch>
|
||||
<!-- <el-switch v-model="monitor.prometheus_federation_enabled" active-color="rgb(238, 157, 63)" active-value='1' inactive-value='0' id="system-monitor-prometheus_federation_enabled">-->
|
||||
<!-- </el-switch>-->
|
||||
<el-checkbox v-model="monitor.prometheus_federation_enabled" true-label="1" false-label="0" id="system-monitor-prometheus_federation_enabled"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.basic.scrapeInterval')" prop="default_scrape_interval">
|
||||
<el-input v-model.number="monitor.default_scrape_interval" >
|
||||
|
||||
Reference in New Issue
Block a user