🔨 工作台.
This commit is contained in:
@@ -72,6 +72,11 @@ body {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex-content-end {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
// -- click-icon
|
||||
.click-icon-wrapper {
|
||||
display: flex;
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { EChartsOption } from 'echarts';
|
||||
import { computed, nextTick, ref } from 'vue';
|
||||
import { nextTick, ref } from 'vue';
|
||||
import { useAppStore } from '@/store';
|
||||
import VCharts from 'vue-echarts';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
const props = withDefaults(defineProps<Partial<{
|
||||
options: EChartsOption,
|
||||
autoResize: boolean,
|
||||
width: string,
|
||||
height: string,
|
||||
}>(), {
|
||||
}>>(), {
|
||||
options: () => {
|
||||
return {};
|
||||
},
|
||||
@@ -27,12 +27,6 @@
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
// 监听暗色模式
|
||||
const theme = computed(() => {
|
||||
if (appStore.theme === 'dark') return 'dark';
|
||||
return '';
|
||||
});
|
||||
|
||||
const renderChart = ref(false);
|
||||
|
||||
nextTick(() => {
|
||||
|
||||
@@ -142,6 +142,7 @@
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: props.data.asset?.terminalConnectChart?.x || [],
|
||||
show: false,
|
||||
},
|
||||
yAxis: {
|
||||
@@ -150,18 +151,13 @@
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
formatter: (p: any) => {
|
||||
return p[0].data.x + ' ' + p[0].data.value + ' 次';
|
||||
}
|
||||
},
|
||||
series: {
|
||||
name: '连接次数',
|
||||
data: !props.data.asset?.terminalConnectChart
|
||||
? []
|
||||
: props.data.asset?.terminalConnectChart.data.map((s, index) => {
|
||||
const x = props.data.asset?.terminalConnectChart.x;
|
||||
: props.data.asset?.terminalConnectChart.data.map(s => {
|
||||
return {
|
||||
x: x[index],
|
||||
value: s,
|
||||
};
|
||||
}),
|
||||
@@ -187,6 +183,7 @@
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: props.data.asset?.execCommandChart?.x || [],
|
||||
show: false,
|
||||
},
|
||||
yAxis: {
|
||||
@@ -195,9 +192,6 @@
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
formatter: (p: any) => {
|
||||
return p[0].data.x + ' ' + p[0].data.value + '次';
|
||||
}
|
||||
},
|
||||
series: {
|
||||
name: '执行次数',
|
||||
|
||||
Reference in New Issue
Block a user