new-map
parent
ffb6b24162
commit
1f61363e60
|
|
@ -2,7 +2,7 @@ export enum PageEnum {
|
||||||
// basic login path
|
// basic login path
|
||||||
BASE_LOGIN = '/login',
|
BASE_LOGIN = '/login',
|
||||||
// basic home path
|
// basic home path
|
||||||
BASE_HOME = '/dashboard',
|
BASE_HOME = '/main/meteorological',
|
||||||
// error page path
|
// error page path
|
||||||
ERROR_PAGE = '/exception',
|
ERROR_PAGE = '/exception',
|
||||||
// error log page path
|
// error log page path
|
||||||
|
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
import type { AppRouteModule } from '/@/router/types'
|
|
||||||
|
|
||||||
import { LAYOUT } from '/@/router/constant'
|
|
||||||
import { t } from '/@/hooks/web/useI18n'
|
|
||||||
|
|
||||||
const dashboard: AppRouteModule = {
|
|
||||||
path: '/dashboard',
|
|
||||||
name: 'Dashboard',
|
|
||||||
component: LAYOUT,
|
|
||||||
redirect: '/dashboard/workbench',
|
|
||||||
meta: {
|
|
||||||
orderNo: 10,
|
|
||||||
icon: 'ion:grid-outline',
|
|
||||||
title: t('routes.dashboard.dashboard'),
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
// {
|
|
||||||
// path: 'analysis',
|
|
||||||
// name: 'Analysis',
|
|
||||||
// component: () => import('/@/views/dashboard/analysis/index.vue'),
|
|
||||||
// meta: {
|
|
||||||
// // affix: true,
|
|
||||||
// title: t('routes.dashboard.analysis'),
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
path: 'workbench',
|
|
||||||
name: 'Workbench',
|
|
||||||
component: () => import('/@/views/dashboard/workbench/index.vue'),
|
|
||||||
meta: {
|
|
||||||
title: t('routes.dashboard.workbench'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
export default dashboard
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -86,8 +91,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -35,6 +39,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -47,7 +52,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -99,8 +104,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -85,8 +90,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -83,8 +88,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -85,8 +90,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -85,8 +90,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -85,8 +90,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -85,8 +90,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -83,8 +88,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -34,6 +38,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -46,7 +51,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -83,8 +88,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@
|
||||||
type: Object as PropType<object>,
|
type: Object as PropType<object>,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
company: {
|
||||||
|
type: String as PropType<string>,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||||
|
|
@ -35,6 +39,7 @@
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
const format = props.company === 'day' ? 'HH:mm' : 'YYYY-MM-DD'
|
||||||
setOptions({
|
setOptions({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
@ -47,7 +52,7 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.keys(e).map((e) => dayjs(e).format('YYYY-MM-DD HH:mm')),
|
data: Object.keys(e).map((e) => dayjs(e).format(format)),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
|
@ -99,8 +104,6 @@
|
||||||
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
type: 'inside', //slider表示有滑动块的,inside表示内置的
|
||||||
show: false,
|
show: false,
|
||||||
xAxisIndex: 0,
|
xAxisIndex: 0,
|
||||||
start: 50,
|
|
||||||
end: 100,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@
|
||||||
:extra="name"
|
:extra="name"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- 空气湿度 -->
|
<!-- 空气湿度 -->
|
||||||
<AirHumidity
|
<AirHumidity
|
||||||
|
|
@ -92,6 +93,7 @@
|
||||||
:data="statisData.air_humidity"
|
:data="statisData.air_humidity"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- 光照强度 -->
|
<!-- 光照强度 -->
|
||||||
<LightIntensity
|
<LightIntensity
|
||||||
|
|
@ -99,6 +101,7 @@
|
||||||
:data="statisData.illumination"
|
:data="statisData.illumination"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- 降雨量 -->
|
<!-- 降雨量 -->
|
||||||
<Rainfall
|
<Rainfall
|
||||||
|
|
@ -106,6 +109,7 @@
|
||||||
:data="statisData.daily_rainfall"
|
:data="statisData.daily_rainfall"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- 风速 -->
|
<!-- 风速 -->
|
||||||
<WindSpeed
|
<WindSpeed
|
||||||
|
|
@ -113,6 +117,7 @@
|
||||||
:data="statisData.wind_speed"
|
:data="statisData.wind_speed"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- 风力 -->
|
<!-- 风力 -->
|
||||||
<Pressure
|
<Pressure
|
||||||
|
|
@ -120,6 +125,7 @@
|
||||||
:data="statisData.wind_degree"
|
:data="statisData.wind_degree"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- 风向 -->
|
<!-- 风向 -->
|
||||||
<WindDirection
|
<WindDirection
|
||||||
|
|
@ -127,6 +133,7 @@
|
||||||
:data="statisData.wind_direction"
|
:data="statisData.wind_direction"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- 噪声 -->
|
<!-- 噪声 -->
|
||||||
<Noise
|
<Noise
|
||||||
|
|
@ -134,6 +141,7 @@
|
||||||
:data="statisData.noise"
|
:data="statisData.noise"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- PM10 -->
|
<!-- PM10 -->
|
||||||
<PM10
|
<PM10
|
||||||
|
|
@ -141,6 +149,7 @@
|
||||||
:data="statisData.pm10"
|
:data="statisData.pm10"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- PM25 -->
|
<!-- PM25 -->
|
||||||
<PM25
|
<PM25
|
||||||
|
|
@ -148,6 +157,7 @@
|
||||||
:data="statisData.pm25"
|
:data="statisData.pm25"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
<!-- CO2 -->
|
<!-- CO2 -->
|
||||||
<CO2
|
<CO2
|
||||||
|
|
@ -155,6 +165,7 @@
|
||||||
:data="statisData.co2"
|
:data="statisData.co2"
|
||||||
class="md:w-386px w-full !mr-4 !mb-4"
|
class="md:w-386px w-full !mr-4 !mb-4"
|
||||||
:loading="false"
|
:loading="false"
|
||||||
|
:company="formState.time_interval"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue