优化监控中心前台样式

This commit is contained in:
fks-yangshouda
2024-08-20 15:40:49 +08:00
parent 7d049151b6
commit e99f441461
11 changed files with 151 additions and 32 deletions

View File

@@ -1,5 +1,21 @@
<template>
<div ref="graphGraphchart" style="width: 100%; height: 100%"></div>
<div
v-show="!haveData"
style="
height: 80%;
width: 96%;
position: absolute;
margin: 0 1% 0 1%;
z-index: 5;
top: 20%;
background: #ffffff;
display: flex;
justify-content: center;
align-items: center;
">
<a-empty />
</div>
</template>
<script lang="ts">
@@ -41,12 +57,19 @@
let chartInstance: echarts.ECharts | null = null;
let haveData = ref(true);
const draw = () => {
data.value = pageData.graphGraphList;
if (data.value && data.value.length > 0) {
haveData.value = true;
} else {
haveData.value = false;
return;
}
if (chartInstance) {
chartInstance.dispose();
}
chartInstance = echarts.init(graphGraphchart.value);
// chartInstance = echarts.init(graphGraphchart.value);
var seriesList = [];
var date = pageData.graphTableColumns;
var legendList: string | any[] = [];
@@ -132,7 +155,7 @@
chartInstance.setOption(option);
};
onMounted(() => {
draw();
// draw();
});
// 下载图表
@@ -152,6 +175,8 @@
return {
graphGraphchart,
downloadChart,
data,
haveData,
};
},
});

View File

@@ -58,7 +58,7 @@
import analysisTable from './analysisTable/index.vue';
import analysisGraph from './analysisGraph/index.vue';
const iconName = ref('biaoge');
const iconName = ref('biaoge1');
const treeRef = ref();
const graphRef = ref();
@@ -95,10 +95,10 @@
function change() {
isGraph.value = !isGraph.value;
if (iconName.value == 'biaoge') {
iconName.value = 'bingtu';
if (iconName.value == 'biaoge1') {
iconName.value = 'zhexiantu';
} else {
iconName.value = 'biaoge';
iconName.value = 'biaoge1';
}
}
</script>

View File

@@ -40,6 +40,7 @@
v-model:expandedKeys="expandedKeys"
v-model:selectedKeys="selectedKeys"
v-model:checkedKeys="checkedKeys"
:show-line="{ showLeafIcon: false }"
checkable
:height="600"
style="width: 100%; overflow-y: auto; margin-bottom: 10px; margin-top: 10px"