Browse Source

feat: 系数逻辑修改

main
betaqi 1 week ago
parent
commit
46727a4eeb
  1. 44
      src/views/stationData/component/line-dlg.vue
  2. 46
      src/views/stationData/component/newDataChart.vue
  3. 127
      src/views/stationData/topology/components/detailDrawer.vue
  4. 140
      src/views/stationData/transfer/components/deviceDrawer.vue

44
src/views/stationData/component/line-dlg.vue

@ -11,25 +11,11 @@ @@ -11,25 +11,11 @@
<el-row>
<div class="label">设置系数</div>
<div class="box">
<div
class="operator-btn"
:class="{ active: formData.operator === '/' }"
@click="formData.operator = '/'"
>
</div>
<div class="custom-stepper">
<div class="stepper-btn minus" @click="decrease">-</div>
<div class="stepper-input">{{ formData.coefficient }}</div>
<div class="stepper-btn plus" @click="increase">+</div>
</div>
<div
class="operator-btn"
:class="{ active: formData.operator === '*' }"
@click="formData.operator = '*'"
>
</div>
</div>
</el-row>
</div>
@ -46,7 +32,6 @@ const title = ref() @@ -46,7 +32,6 @@ const title = ref()
const createObj = {
id: '',
coefficient: 1,
operator: '*',
}
const formData = ref(cloneDeep(createObj)) as any
@ -63,19 +48,16 @@ async function onSave() { @@ -63,19 +48,16 @@ async function onSave() {
}
const visibility = ref(false)
function open(titleStr: string, id: string, coefficient: string, operator: string) {
function open(titleStr: string, id: string, coefficient: string) {
title.value = titleStr
formData.value.id = id
if (coefficient) {
formData.value.coefficient = Number(coefficient)
}
if (operator) {
formData.value.operator = operator
}
visibility.value = true
}
const ALLOWED_VALUES = [1, 10, 100, 1000]
const ALLOWED_VALUES = [0.001, 0.01, 0.1, 1, 10, 100, 1000]
function decrease() {
const currentIndex = ALLOWED_VALUES.indexOf(formData.value.coefficient)
@ -129,27 +111,7 @@ defineExpose({ @@ -129,27 +111,7 @@ defineExpose({
display: flex;
gap: 10px;
}
.operator-btn {
width: 40px;
height: 32px;
line-height: 32px;
text-align: center;
border: 1px solid var(--el-border-color);
cursor: pointer;
border-radius: var(--el-border-radius-base);
color: var(--el-text-color-regular);
background-color: var(--el-bg-color);
&.active {
background-color: var(--el-color-primary);
color: var(--el-color-white);
border-color: var(--el-color-primary);
}
&:hover:not(.active) {
color: var(--el-color-primary);
border-color: var(--el-color-primary-light-7);
background-color: var(--el-color-primary-light-9);
}
}
.mx-2 {
margin: 0 10px;
}

46
src/views/stationData/component/newDataChart.vue

@ -46,7 +46,6 @@ type Legend = { @@ -46,7 +46,6 @@ type Legend = {
label: string
unit?: string
coefficient?: string | number
operator?: string
}
const autoresize = {
@ -55,17 +54,22 @@ const autoresize = { @@ -55,17 +54,22 @@ const autoresize = {
const LineChartDlgRef = ref()
function onChangeCoefficient(data: { id: string; coefficient: string; operator: string }) {
function onChangeCoefficient(data: { id: string; coefficient: string }) {
emits('on-change-coefficient', data)
}
const onChartClick = (params: any) => {
// 线
const [seriesName, id] = params?.seriesName?.split('|')
if (params.componentType === 'series' && params.seriesType === 'line' && seriesName && id) {
if (
params.componentType === 'series' &&
params.seriesType === 'line' &&
seriesName &&
id
) {
const find = props.legends.find(item => item.addr === id) as any
if (find) {
LineChartDlgRef.value?.open(seriesName, id, find?.coefficient, find?.operator)
LineChartDlgRef.value?.open(seriesName, id, find?.coefficient)
}
}
}
@ -116,13 +120,8 @@ const chartOption = computed<EChartsOption>(() => { @@ -116,13 +120,8 @@ const chartOption = computed<EChartsOption>(() => {
triggerLineEvent: true,
data: entry.map(([ts, val]) => {
const coef = legend?.coefficient ? new Big(legend.coefficient) : new Big(1)
const operator = legend?.operator || '*'
let valBig = new Big(val ?? 0)
if (operator === '/') {
valBig = valBig.div(coef)
} else {
valBig = valBig.times(coef)
}
return [ts, valBig.toNumber()]
}),
sampling: 'lttb',
@ -135,12 +134,13 @@ const chartOption = computed<EChartsOption>(() => { @@ -135,12 +134,13 @@ const chartOption = computed<EChartsOption>(() => {
}
tmpSeries.push(lineData)
}
const dataLength = tmpSeries.length * tmpSeries[0]?.data?.length || 0;
const visibleCount = Math.min(tmpSeries.length * 1000, dataLength);
const dataLength = tmpSeries.length * tmpSeries[0]?.data?.length || 0
const visibleCount = Math.min(tmpSeries.length * 1000, dataLength)
const startPercent = dataLength === 0 ? 0 : ((dataLength - visibleCount) / dataLength) * 100;
const endPercent = 100;
const maxSpanPercent = dataLength === 0 ? 100 : (visibleCount / dataLength) * 100;
const startPercent =
dataLength === 0 ? 0 : ((dataLength - visibleCount) / dataLength) * 100
const endPercent = 100
const maxSpanPercent = dataLength === 0 ? 100 : (visibleCount / dataLength) * 100
const option: EChartsOption = {
grid: {
@ -162,16 +162,17 @@ const chartOption = computed<EChartsOption>(() => { @@ -162,16 +162,17 @@ const chartOption = computed<EChartsOption>(() => {
for (let i = 0; i < params.length; i++) {
const data = props.legends.find(item => item.addr === params[i].seriesId)
const conefficients = data?.coefficient ?? undefined
const coefficient = data?.coefficient ? Number(data.coefficient) : undefined
const unit = data?.unit || ''
relVal += `<div style="display: flex; justify-content: space-between; gap: 30px;">
<div>${params[i].marker}${params[i].seriesName}:</div>
<div>${params[i].value[1]}${conefficients ? `【系数为${conefficients}(${operatorMap[data?.operator] ?? ''
})` : ''}${unit}</div>
<div>${params[i].marker}${params[i].seriesName.split('|')[0]}:</div>
<div>${params[i].value[1]}${
coefficient ? `【系数为${coefficient}` : ''
}${unit}</div>
</div>`
}
return relVal
}
},
},
legend: {
type: 'scroll',
@ -209,7 +210,7 @@ const chartOption = computed<EChartsOption>(() => { @@ -209,7 +210,7 @@ const chartOption = computed<EChartsOption>(() => {
},
axisLabel: {
show: false,
}
},
},
yAxis: {
type: 'value',
@ -262,11 +263,6 @@ const chartOption = computed<EChartsOption>(() => { @@ -262,11 +263,6 @@ const chartOption = computed<EChartsOption>(() => {
const unCheckArr = ref<string[]>([])
const operatorMap = {
'*': '×',
'/': '÷',
}
function changeLegend(data: { name: string; selected: Record<string, boolean> }) {
const { name, selected } = data
if (!selected[name]) {

127
src/views/stationData/topology/components/detailDrawer.vue

@ -7,12 +7,16 @@ @@ -7,12 +7,16 @@
size="100%"
modal-class="model-dev-opn"
:before-close="handleBeforeClose"
@opened="onDrawerOpened">
@opened="onDrawerOpened"
>
<main class="wh-full flex">
<EdfsWrap title="点位选择"
isCollapse :collapsed="collapsed" @collapse="onCollapse"
:style="{width: `${collapsed ? 0 : 340}px`}">
<EdfsWrap
title="点位选择"
isCollapse
:collapsed="collapsed"
@collapse="onCollapse"
:style="{ width: `${collapsed ? 0 : 340}px` }"
>
<el-select
v-if="currentGroup?.customNode"
v-model="selectValue"
@ -35,8 +39,7 @@ @@ -35,8 +39,7 @@
>
</PointCheckbox>
</EdfsWrap>
<div class="flex-1 p-4 h-full overflow-hidden relative"
>
<div class="flex-1 p-4 h-full overflow-hidden relative">
<div class="absolute w-full h-full bg-[#ffffffe5] z-99" v-if="loadingChart">
<div class="w-full h-full flex flex-col justify-center items-center">
<el-progress
@ -47,11 +50,13 @@ @@ -47,11 +50,13 @@
status="success"
/>
<div class="text-center text-gray-700 text-lg leading-relaxed">
正在加载数据请稍等<br>
正在加载数据请稍等<br />
当前已查询
<span class="font-semibold text-green-600">{{ reqPointCount }}</span> /
<span class="font-semibold text-blue-600">{{ pointCount }}</span> 个点位剩余
<span class="font-semibold text-red-500">{{ remainingPointCount }}</span> 个点位
<span class="font-semibold text-blue-600">{{ pointCount }}</span>
个点位剩余
<span class="font-semibold text-red-500">{{ remainingPointCount }}</span>
个点位
</div>
</div>
</div>
@ -70,8 +75,13 @@ @@ -70,8 +75,13 @@
</div>
<el-button type="primary" @click="loadChardData">查询数据</el-button>
查询最近
<el-input-number :key="refreshKey" v-model="num" :min="1" :max="diffHours"
@input="handleInput"/>
<el-input-number
:key="refreshKey"
v-model="num"
:min="1"
:max="diffHours"
@input="handleInput"
/>
小时
</div>
<NewDataChart
@ -100,15 +110,13 @@ import { @@ -100,15 +110,13 @@ import {
} from '@/api/module/transfer'
import { useMessage } from '@/composables/useMessage'
import dayjs from 'dayjs'
import { nextTick } from "vue";
import EdfsWrap from "@/components/Edfs-wrap.vue";
import PointCheckbox from "@/views/stationData/component/pointCheckbox.vue";
import { nextTick } from 'vue'
import EdfsWrap from '@/components/Edfs-wrap.vue'
import PointCheckbox from '@/views/stationData/component/pointCheckbox.vue'
import { debounce } from 'lodash-es'
const env = import.meta.env
const num = ref<number>()
const diffHours = ref<number>()
const refreshKey = ref(0)
@ -125,34 +133,39 @@ const handleInput = debounce(async (val: number) => { @@ -125,34 +133,39 @@ const handleInput = debounce(async (val: number) => {
} else {
num.value = val
}
const endTime =
curDevice.value!.end_time ?
dayjs(curDevice.value!.end_time).valueOf() : dayjs().valueOf()
const endTime = curDevice.value!.end_time
? dayjs(curDevice.value!.end_time).valueOf()
: dayjs().valueOf()
const startTime = dayjs(endTime).subtract(num.value, 'hour').valueOf()
time.value = [dayjs(startTime).format('YYYY-MM-DD HH:mm:ss'), dayjs(endTime).format('YYYY-MM-DD HH:mm:ss')]
time.value = [
dayjs(startTime).format('YYYY-MM-DD HH:mm:ss'),
dayjs(endTime).format('YYYY-MM-DD HH:mm:ss'),
]
}, 300)
const isShowDrawer = defineModel<boolean>()
const title = computed(() =>
(
curDevice.value?.isonLine ?
'数据详情' : env.VITE_APP_ENV === 'local'
? `已导出数据详情` : '已导入数据详情'
)
curDevice.value?.isonLine
? '数据详情'
: env.VITE_APP_ENV === 'local'
? `已导出数据详情`
: '已导入数据详情'
)
const message = useMessage()
const PointCheckboxRef = ref<InstanceType<typeof PointCheckbox>>()
const emit = defineEmits(['on-save'])
const pointList = ref<IMyPoint[]>([])
const curDevice = ref<IDevice & { isonLine: boolean, siteName: string }>()
const curDevice = ref<IDevice & { isonLine: boolean; siteName: string }>()
async function open(device: IDevice & {
isonLine: boolean,
async function open(
device: IDevice & {
isonLine: boolean
siteName: string
}, group: IPointGroupOV) {
},
group: IPointGroupOV
) {
curDevice.value = device
currentGroup.value = group
onCollapse(false)
@ -179,7 +192,7 @@ async function open(device: IDevice & { @@ -179,7 +192,7 @@ async function open(device: IDevice & {
}
const start = dayjs(deviceOff.start_time)
const end = dayjs(deviceOff.end_time)
diffHours.value = end.diff(start, "hour") + 1;
diffHours.value = end.diff(start, 'hour') + 1
}
const selectValue = ref()
@ -188,14 +201,15 @@ function onchangeSelect(value: string) { @@ -188,14 +201,15 @@ function onchangeSelect(value: string) {
PointCheckboxRef.value?.clearCheck()
}
const loadingPoints = ref(false)
const columParams = computed(() => ['ts', ...checkPointList.value.map(i => i.addr)])
const currentGroup = ref<IPointGroupOV & {
const currentGroup = ref<
IPointGroupOV & {
customNode?: boolean
brother?: Array<any>
}>()
}
>()
async function loadPoints() {
if (!currentGroup.value) {
@ -251,25 +265,19 @@ async function loadDeviceDetails() { @@ -251,25 +265,19 @@ async function loadDeviceDetails() {
const chartData = reactive(new Map<string, any[]>())
const axisData = new Set<string>()
const legends = ref<{
addr: string; label: string, unit: string, coefficient?: string | number
operator?: string
}[]>([])
function onChangeCoefficient(
const legends = ref<
{
id,
coefficient,
operator,
}: {
id: string
coefficient: string
operator: string
}) {
addr: string
label: string
unit: string
coefficient?: string | number
}[]
>([])
function onChangeCoefficient({ id, coefficient }: { id: string; coefficient: string }) {
const find = legends.value.findIndex(r => r.addr === id)
if (find !== -1) {
legends.value[find].coefficient = coefficient
legends.value[find].operator = operator
}
}
@ -279,7 +287,6 @@ const chartLimit = ref(1000) @@ -279,7 +287,6 @@ const chartLimit = ref(1000)
const chartOffset = ref(0)
const progress = ref(0)
const pointCount = computed(() => chartAllTotal.value * checkPointList.value.length)
const reqPointCount = ref(0)
@ -303,7 +310,9 @@ async function loadChardData() { @@ -303,7 +310,9 @@ async function loadChardData() {
columns: columParams.value,
isLocal: !curDevice.value?.isonLine,
host: curDevice.value?.isonLine ? (curDevice.value as IOnlineDevice).clientIp : '',
name: currentGroup.value?.customNode ? selectValue.value : currentGroup.value?.name as string,
name: currentGroup.value?.customNode
? selectValue.value
: (currentGroup.value?.name as string),
startTime: time.value[0],
endTime: time.value[1],
}
@ -316,7 +325,7 @@ async function loadChardData() { @@ -316,7 +325,7 @@ async function loadChardData() {
const params: IGetDeviceDataParams = {
...options,
limit,
offset
offset,
}
loadingChart.value = true
@ -352,7 +361,7 @@ async function loadChardData() { @@ -352,7 +361,7 @@ async function loadChardData() {
const params: IGetDeviceDataParams = {
...options,
limit,
offset: i * Number(limit)
offset: i * Number(limit),
}
const res = await getDeviceDetails(params)
chartAllTotal.value = res?.data?.total ?? 0
@ -370,7 +379,6 @@ async function loadChardData() { @@ -370,7 +379,6 @@ async function loadChardData() {
resetChartStatus()
}
function setChartData(pointData: any[]) {
for (const addr of columParams.value.filter(i => i !== 'ts')) {
const label = pointList.value.find(i => i.addr === addr)?.label || addr
@ -399,10 +407,8 @@ function setChartData(pointData: any[]) { @@ -399,10 +407,8 @@ function setChartData(pointData: any[]) {
}
}
})
}
function handleBeforeClose(done: () => void) {
time.value = undefined
isShowDrawer.value = false
@ -470,9 +476,12 @@ const disabledDate = (time: any) => { @@ -470,9 +476,12 @@ const disabledDate = (time: any) => {
console.log('disableDate error', e)
return current.isAfter(dayjs(), 'day')
}
}
const getBeforeMonth = dayjs().startOf('month').subtract(1, 'month').startOf('month').toDate()
const getBeforeMonth = dayjs()
.startOf('month')
.subtract(1, 'month')
.startOf('month')
.toDate()
const collapsed = ref(false)
function onCollapse(value?: boolean) {

140
src/views/stationData/transfer/components/deviceDrawer.vue

@ -1,11 +1,22 @@ @@ -1,11 +1,22 @@
<template>
<div class="fault-rule-drawer">
<el-drawer v-model="isShowDrawer" :title="title" direction="rtl" size="100%"
<el-drawer
v-model="isShowDrawer"
:title="title"
direction="rtl"
size="100%"
modal-class="model-dev-opn"
:before-close="handleBeforeClose" @opened="onDrawerOpened">
:before-close="handleBeforeClose"
@opened="onDrawerOpened"
>
<main class="wh-full flex">
<EdfsWrap title="点位组" isCollapse :collapsed="collapsed" @collapse="onCollapse"
:style="{width: `${collapsed ? 0 : 600}px`}">
<EdfsWrap
title="点位组"
isCollapse
:collapsed="collapsed"
@collapse="onCollapse"
:style="{ width: `${collapsed ? 0 : 600}px` }"
>
<PointGroupTree
v-if="isShowDrawer"
:data="pointGroup"
@ -16,9 +27,12 @@ @@ -16,9 +27,12 @@
:loadingPoints="loadingPoints"
:isTransfer="props.isTransfer"
:siteInfo="props.siteInfo"
ref="pointGroupTreeRef"/>
ref="pointGroupTreeRef"
/>
</EdfsWrap>
<div class="flex-1 p-4 h-full overflow-hidden relative" v-loading="loading"
<div
class="flex-1 p-4 h-full overflow-hidden relative"
v-loading="loading"
element-loading-text="数据加载中请耐心等待..."
>
<div
@ -43,13 +57,14 @@ @@ -43,13 +57,14 @@
:percentage="deviceInfo.progress"
/>
<div class="text-gray-600 text-base">已查询
<div class="text-gray-600 text-base">
已查询
<span class="text-green-600 font-semibold">
{{ deviceInfo.fetchLimit }}
</span>/<span class="text-blue-600 font-semibold">{{
{{ deviceInfo.fetchLimit }} </span
>/<span class="text-blue-600 font-semibold">{{
deviceInfo.total
}}</span>剩余<span
class="text-red-500 font-semibold">{{
}}</span
>剩余<span class="text-red-500 font-semibold">{{
deviceInfo.total - deviceInfo.fetchLimit
}}</span>
</div>
@ -74,13 +89,23 @@ @@ -74,13 +89,23 @@
</div>
<el-button type="primary" @click="loadChardData2">查询数据</el-button>
查询最近
<el-input-number :key="refreshKey" v-model="num" :min="1" :max="diffHours"
@input="handleInput"/>
<el-input-number
:key="refreshKey"
v-model="num"
:min="1"
:max="diffHours"
@input="handleInput"
/>
小时
</div>
<NewDataChart v-if="isShowChart" :chart-datas="chartData" :legends="legends"
:axis-data="Array.from(axisData)" ref="chartRef"
@onChangeCoefficient="onChangeCoefficient"/>
<NewDataChart
v-if="isShowChart"
:chart-datas="chartData"
:legends="legends"
:axis-data="Array.from(axisData)"
ref="chartRef"
@onChangeCoefficient="onChangeCoefficient"
/>
</div>
</main>
</el-drawer>
@ -103,13 +128,13 @@ import { @@ -103,13 +128,13 @@ import {
} from '@/api/module/transfer'
import { useMessage } from '@/composables/useMessage'
import dayjs from 'dayjs'
import EdfsWrap from "@/components/Edfs-wrap.vue";
import { bms_cellRewriteName } from "@/views/stationData/utils";
import EdfsWrap from '@/components/Edfs-wrap.vue'
import { bms_cellRewriteName } from '@/views/stationData/utils'
import { debounce } from 'lodash-es'
import {
type DeviceFetchInfo,
useFetcher
} from "@/views/stationData/transfer/components/useFetcher";
useFetcher,
} from '@/views/stationData/transfer/components/useFetcher'
type ChartParamsMap = {
name: string
@ -138,22 +163,22 @@ const handleInput = debounce(async (val: number) => { @@ -138,22 +163,22 @@ const handleInput = debounce(async (val: number) => {
}
const device = curDevice.value as IOfflineDevice
const endTime =
device.end_time ?
dayjs(device.end_time).valueOf() : dayjs().valueOf()
const endTime = device.end_time ? dayjs(device.end_time).valueOf() : dayjs().valueOf()
const startTime = dayjs(endTime).subtract(num.value, 'hour').valueOf()
time.value = [dayjs(startTime).format('YYYY-MM-DD HH:mm:ss'), dayjs(endTime).format('YYYY-MM-DD HH:mm:ss')]
time.value = [
dayjs(startTime).format('YYYY-MM-DD HH:mm:ss'),
dayjs(endTime).format('YYYY-MM-DD HH:mm:ss'),
]
}, 300)
const isShowDrawer = defineModel<boolean>()
const title = computed(() =>
(
props.isTransfer ?
'数据详情' : env.VITE_APP_ENV === 'local'
? `已导出数据详情` : '已导入数据详情'
)
props.isTransfer
? '数据详情'
: env.VITE_APP_ENV === 'local'
? `已导出数据详情`
: '已导入数据详情'
)
const message = useMessage()
@ -187,10 +212,9 @@ async function open(device: IOfflineDevice | IOnlineDevice) { @@ -187,10 +212,9 @@ async function open(device: IOfflineDevice | IOnlineDevice) {
}
const start = dayjs(deviceOff.start_time)
const end = dayjs(deviceOff.end_time)
diffHours.value = end.diff(start, "hour") + 1;
diffHours.value = end.diff(start, 'hour') + 1
}
const loadingPoints = ref(false)
async function loadPoints() {
@ -244,10 +268,14 @@ async function loadDeviceDetails() { @@ -244,10 +268,14 @@ async function loadDeviceDetails() {
const chartData = reactive(new Map<string, any[]>())
const axisData = new Set<string>()
const legends = ref<{
addr: string; label: string, unit: string, coefficient?: string | number
operator?: string
}[]>([])
const legends = ref<
{
addr: string
label: string
unit: string
coefficient?: string | number
}[]
>([])
const loadingChart = ref(false)
const loading = ref(false)
@ -281,11 +309,15 @@ function buildOptions(groupId: string): Omit<IGetDeviceDataParams, 'limit' | 'of @@ -281,11 +309,15 @@ function buildOptions(groupId: string): Omit<IGetDeviceDataParams, 'limit' | 'of
const pointInfoData = ref<DeviceFetchInfo[]>([])
const { devices, isFetching, startFetching, abortAll } = useFetcher(loadPointChartData)
watch(devices, (newValue) => {
watch(
devices,
newValue => {
if (!newValue) return
pointInfoData.value = newValue
loading.value = false
}, { deep: true })
},
{ deep: true }
)
async function loadChardData2() {
loading.value = true
@ -318,7 +350,7 @@ function setChartData2(groupName: string, data: any[]) { @@ -318,7 +350,7 @@ function setChartData2(groupName: string, data: any[]) {
legends.value.push({
addr: `${groupName}-${column.addr}`,
label: `${groupInfo.cnName}-${column.label}`,
unit: column.unit || ''
unit: column.unit || '',
})
}
@ -337,20 +369,10 @@ function setChartData2(groupName: string, data: any[]) { @@ -337,20 +369,10 @@ function setChartData2(groupName: string, data: any[]) {
})
}
function onChangeCoefficient(
{
id,
coefficient,
operator,
}: {
id: string
coefficient: string
operator: string
}) {
function onChangeCoefficient({ id, coefficient }: { id: string; coefficient: string }) {
const find = legends.value.findIndex(r => r.addr === id)
if (find !== -1) {
legends.value[find].coefficient = coefficient
legends.value[find].operator = operator
}
}
@ -368,9 +390,7 @@ function handleBeforeClose(done: () => void) { @@ -368,9 +390,7 @@ function handleBeforeClose(done: () => void) {
chartGroupMap.clear()
done()
})
.catch(() => {
})
.catch(() => {})
}
function clearData() {
@ -445,17 +465,18 @@ function onGroupChange(item: IPointGroupOV) { @@ -445,17 +465,18 @@ function onGroupChange(item: IPointGroupOV) {
loadDeviceDetails()
}
const chartParamsMap = new Map<string, ChartParamsMap>()
const chartGroupMap = new Map<string, IPointGroupOV>()
function onchangePoints(checkPoints: IMyPoint[]) {
if (!curGroup?.value || !curGroupName?.value) return message.error('请选择设备')
const currentCheckPoints = checkPoints.filter((r: any) => r.parentName === curGroupName.value)
const currentCheckPoints = checkPoints.filter(
(r: any) => r.parentName === curGroupName.value
)
chartParamsMap.set(curGroupName.value, {
name: curGroupName.value,
columns: currentCheckPoints
columns: currentCheckPoints,
})
chartGroupMap.set(curGroupName.value, curGroup.value)
@ -477,7 +498,6 @@ const disabledDate = (time: any) => { @@ -477,7 +498,6 @@ const disabledDate = (time: any) => {
console.log('disableDate error', e)
return current.isAfter(dayjs(), 'day')
}
}
const collapsed = ref(false)
@ -486,7 +506,11 @@ function onCollapse(value?: boolean) { @@ -486,7 +506,11 @@ function onCollapse(value?: boolean) {
collapsed.value = value ?? !collapsed.value
}
const getBeforeMonth = dayjs().startOf('month').subtract(1, 'month').startOf('month').toDate()
const getBeforeMonth = dayjs()
.startOf('month')
.subtract(1, 'month')
.startOf('month')
.toDate()
defineExpose({
open,
openFullScreen,

Loading…
Cancel
Save