gaoshp
2024-06-21 bb3b85e8bb9304f0afba37063857e691c97f5c21
update
已修改2个文件
16 ■■■■ 文件已修改
src/views/mdc/components/Time.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/processParam/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/components/Time.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 21:52:18
 * @LastEditors: Sneed
 * @LastEditTime: 2024-06-20 22:54:35
 * @LastEditTime: 2024-06-21 00:15:44
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Time.vue
-->
<template>
@@ -159,6 +159,14 @@
                                endDate: moment(v.id).endOf('month').format('YYYY-MM-DD')
                            }
                        })
                    } else if (data.statisticalMethod === 'DAY') {
                        return res?.data?.map(v => {
                            return {
                                ...v,
                                startDate: v.id,
                                endDate: v.id
                            }
                        })
                    } else {
                        return res.data
                    }
src/views/mdc/processParam/index.vue
@@ -287,7 +287,7 @@
                    {
                        data: yAxisData,
                        type: 'line',
                        step: 'start',
                    }
                ],
                xAxis: {
@@ -313,8 +313,8 @@
        setDeviceStatusOptions(data, myname) {
            let total = Math.abs(moment(this.timeRange.startTime).diff(moment(this.timeRange.endTime)))
            let start = this.timeRange.startTime
            let len = data.data.length
            if (moment(data.data[len - 1].time).unix() < moment(this.timeRange.endTime).unix()) {
            let len = data?.data?.length
            if (len > 0 && moment(data.data[len - 1].time).unix() < moment(this.timeRange.endTime).unix()) {
                let addItem = {
                    time: this.timeRange.endTime,
                    value: data.data[len - 1].value