Compare commits

..

No commits in common. "525c9b0572a30bf687dd05c5d5d58b6003e22303" and "7a68b93079af8748bb7468dbc393fdc9c37dbc08" have entirely different histories.

5 changed files with 844 additions and 1113 deletions

View File

@ -16,17 +16,17 @@ export function handleUnit(data) {
// 处理echarts数据
export function handleEchartsData(data, value) {
// 间隔可以设置成动态的
let timeArray_1 = [];
let timeArray = [];
for (let hour = 0; hour < 24; hour++) {
for (let minute = 0; minute < 60; minute += value) {
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
timeArray_1.push(
timeArray.push(
{ datetime: timeString, measValue: '-' }
);
}
}
console.log(timeArray_1)
timeArray_1.forEach(item => {
console.log(timeArray)
timeArray.forEach(item => {
data.forEach(ite => {
let iteTime = ite.datetime.split(' ')[1].split(':')[0] + ':' + ite.datetime.split(' ')[1].split(':')[1]
if (iteTime === item.datetime) {
@ -36,50 +36,4 @@ export function handleEchartsData(data, value) {
})
return timeArray
}
export function handleEchartsData_datatime_measValue(data, value) {
// 间隔可以设置成动态的
let timeArray_1 = [];
for (let hour = 0; hour < 24; hour++) {
for (let minute = 0; minute < 60; minute += value) {
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
timeArray_1.push(
{ datetime: timeString, measValue: '-' }
);
}
}
console.log(timeArray_1)
timeArray_1.forEach(item => {
data.forEach(ite => {
let iteTime = ite.datetime.split(' ')[1].split(':')[0] + ':' + ite.datetime.split(' ')[1].split(':')[1]
if (iteTime === item.datetime) {
item.measValue =ite.measValue
}
})
})
return timeArray
}
export function handleEchartsData_timeStamp_p(data, value) {
// 间隔可以设置成动态的
let timeArray_1 = [];
for (let hour = 0; hour < 24; hour++) {
for (let minute = 0; minute < 60; minute += value) {
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
timeArray_1.push(
{ timeStamp: timeString, p: '-' }
);
}
}
console.log(timeArray_1)
timeArray_1.forEach(item => {
data.forEach(ite => {
let iteTime = ite.timeStamp.split(' ')[1].split(':')[0] + ':' + ite.timeStamp.split(' ')[1].split(':')[1]
if (iteTime === item.timeStamp) {
item.p =ite.p
}
})
})
return timeArray_1
}

File diff suppressed because it is too large Load Diff

View File

@ -265,7 +265,7 @@ import load_info_echart from './load_info_echart.vue'
import cdz_echart from './cdz_echart.vue'
import carTree from '@/views/commonPage/carTree.vue'
import { powerCurve_api, transformerOverloadCount_api, running_api } from '@/api/carPage/index'
import { handleEchartsData ,handleEchartsData_timeStamp_p} from '@/hooks/handleFun'
import { handleEchartsData } from '@/hooks/handleFun'
onMounted(() => {
//
@ -428,9 +428,7 @@ let getPowerCurve_api = () => {
res?.data.forEach((item: any) => {
item.datetime = item.dateTime
})
let result = handleEchartsData(res.data, 60)
carRightData.echartsData = result
console.log(result, 'resresres')
})

View File

@ -393,7 +393,7 @@
</div>
<!-- 告警消息 -->
<!-- <div class="content_center_alert1" v-if="true">
<div class="content_center_alert1" v-if="true">
<div class="run_detail" v-if="true">
<div class="tip">
<img src="@/assets/images/mainPage/icon_alert_pv.png" alt="" />
@ -416,7 +416,7 @@
</div>
</div>
</div>
</div> -->
</div>
<!-- 通知消息 -->
<!-- <div class="content_center_alert" v-if="true">
<div class="run_detail" v-if="true">

View File

@ -101,7 +101,7 @@ const drawOneLine = (arr: any) => {
// },
},
// data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
data: arr.map((rtime) => rtime?.timeStamp),
data: arr.map((rtime) => rtime?.timeStamp.slice(-5)),
},
yAxis: {
splitLine: {