master
parent
622a29616c
commit
81e639336a
|
@ -7,6 +7,8 @@ export {}
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
|
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||||
|
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
||||||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
||||||
|
@ -15,12 +17,15 @@ declare module 'vue' {
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
ElTimeSelect: typeof import('element-plus/es')['ElTimeSelect']
|
ElTimeSelect: typeof import('element-plus/es')['ElTimeSelect']
|
||||||
|
|
|
@ -1,111 +1,128 @@
|
||||||
// 处理一些常用的方法
|
// 处理一些常用的方法
|
||||||
|
|
||||||
|
|
||||||
// 处理单位换算
|
// 处理单位换算
|
||||||
export function handleUnit(data) {
|
export function handleUnit(data) {
|
||||||
if (Number(data) > 10000) {
|
if (Number(data) > 10000) {
|
||||||
return (data / 1000).toFixed(2)
|
return (data / 1000).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
return data
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 处理echarts数据
|
// 处理echarts数据
|
||||||
export function handleEchartsData(data, value) {
|
export function handleEchartsData(data, value) {
|
||||||
// 间隔可以设置成动态的
|
// 间隔可以设置成动态的
|
||||||
let timeArray_1 = [];
|
let timeArray_1 = [];
|
||||||
for (let hour = 0; hour < 24; hour++) {
|
for (let hour = 0; hour < 24; hour++) {
|
||||||
for (let minute = 0; minute < 60; minute += value) {
|
for (let minute = 0; minute < 60; minute += value) {
|
||||||
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
|
let timeString =
|
||||||
timeArray_1.push(
|
(hour < 10 ? "0" + hour : hour) +
|
||||||
{ datetime: timeString, measValue: '-' }
|
":" +
|
||||||
);
|
(minute < 10 ? "0" + minute : minute);
|
||||||
|
timeArray_1.push({ datetime: timeString, measValue: "-" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(timeArray_1)
|
console.log(timeArray_1);
|
||||||
timeArray_1.forEach(item => {
|
timeArray_1.forEach((item) => {
|
||||||
data.forEach(ite => {
|
data.forEach((ite) => {
|
||||||
let iteTime = ite.datetime.split(' ')[1].split(':')[0] + ':' + ite.datetime.split(' ')[1].split(':')[1]
|
let iteTime =
|
||||||
|
ite.datetime.split(" ")[1].split(":")[0] +
|
||||||
|
":" +
|
||||||
|
ite.datetime.split(" ")[1].split(":")[1];
|
||||||
if (iteTime === item.datetime) {
|
if (iteTime === item.datetime) {
|
||||||
item.measValue =ite.measValue
|
item.measValue = ite.measValue;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
return timeArray_1
|
return timeArray_1;
|
||||||
}
|
}
|
||||||
export function handleEchartsData_datatime_measValue(data, value) {
|
export function handleEchartsData_datatime_measValue(data, value) {
|
||||||
// 间隔可以设置成动态的
|
// 间隔可以设置成动态的
|
||||||
let timeArray_1 = [];
|
let timeArray_1 = [];
|
||||||
for (let hour = 0; hour < 24; hour++) {
|
for (let hour = 0; hour < 24; hour++) {
|
||||||
for (let minute = 0; minute < 60; minute += value) {
|
for (let minute = 0; minute < 60; minute += value) {
|
||||||
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
|
let timeString =
|
||||||
timeArray_1.push(
|
(hour < 10 ? "0" + hour : hour) +
|
||||||
{ datetime: timeString, measValue: '-' }
|
":" +
|
||||||
);
|
(minute < 10 ? "0" + minute : minute);
|
||||||
|
timeArray_1.push({ datetime: timeString, measValue: "-" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(timeArray_1)
|
console.log(timeArray_1);
|
||||||
timeArray_1.forEach(item => {
|
timeArray_1.forEach((item) => {
|
||||||
data.forEach(ite => {
|
data.forEach((ite) => {
|
||||||
let iteTime = ite.datetime.split(' ')[1].split(':')[0] + ':' + ite.datetime.split(' ')[1].split(':')[1]
|
let iteTime =
|
||||||
|
ite.datetime.split(" ")[1].split(":")[0] +
|
||||||
|
":" +
|
||||||
|
ite.datetime.split(" ")[1].split(":")[1];
|
||||||
if (iteTime === item.datetime) {
|
if (iteTime === item.datetime) {
|
||||||
item.measValue =ite.measValue
|
item.measValue = ite.measValue;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
return timeArray_1
|
return timeArray_1;
|
||||||
}
|
}
|
||||||
export function handleEchartsData_timeStamp_p(data, value) {
|
export function handleEchartsData_timeStamp_p(data, value) {
|
||||||
// 间隔可以设置成动态的
|
// 间隔可以设置成动态的
|
||||||
let timeArray_1 = [];
|
let timeArray_1 = [];
|
||||||
for (let hour = 0; hour < 24; hour++) {
|
for (let hour = 0; hour < 24; hour++) {
|
||||||
for (let minute = 0; minute < 60; minute += value) {
|
for (let minute = 0; minute < 60; minute += value) {
|
||||||
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
|
let timeString =
|
||||||
timeArray_1.push(
|
(hour < 10 ? "0" + hour : hour) +
|
||||||
{ timeStamp: timeString, p: '-' }
|
":" +
|
||||||
);
|
(minute < 10 ? "0" + minute : minute);
|
||||||
|
timeArray_1.push({ timeStamp: timeString, p: "-" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(timeArray_1)
|
console.log(timeArray_1);
|
||||||
timeArray_1.forEach(item => {
|
timeArray_1.forEach((item) => {
|
||||||
data.forEach(ite => {
|
data.forEach((ite) => {
|
||||||
let iteTime = ite.timeStamp.split(' ')[1].split(':')[0] + ':' + ite.timeStamp.split(' ')[1].split(':')[1]
|
let iteTime =
|
||||||
|
ite.timeStamp.split(" ")[1].split(":")[0] +
|
||||||
|
":" +
|
||||||
|
ite.timeStamp.split(" ")[1].split(":")[1];
|
||||||
if (iteTime === item.timeStamp) {
|
if (iteTime === item.timeStamp) {
|
||||||
item.p =ite.p
|
item.p = ite.p;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
return timeArray_1
|
return timeArray_1;
|
||||||
}
|
}
|
||||||
export function handleEchartsData_timeStamp_p_u_i(data, value) {
|
export function handleEchartsData_timeStamp_p_u_i(data, value) {
|
||||||
// 间隔可以设置成动态的
|
// 间隔可以设置成动态的
|
||||||
let timeArray_1 = [];
|
let timeArray_1 = [];
|
||||||
for (let hour = 0; hour < 24; hour++) {
|
for (let hour = 0; hour < 24; hour++) {
|
||||||
for (let minute = 0; minute < 60; minute += value) {
|
for (let minute = 0; minute < 60; minute += value) {
|
||||||
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
|
let timeString =
|
||||||
timeArray_1.push(
|
(hour < 10 ? "0" + hour : hour) +
|
||||||
{ timeStamp: timeString, p: '-',u:'',i:''}
|
":" +
|
||||||
);
|
(minute < 10 ? "0" + minute : minute);
|
||||||
|
timeArray_1.push({ timeStamp: timeString, p: "-", u: "", i: "" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(timeArray_1)
|
console.log(timeArray_1);
|
||||||
timeArray_1.forEach(item => {
|
timeArray_1.forEach((item) => {
|
||||||
data.forEach(ite => {
|
data.forEach((ite) => {
|
||||||
let iteTime = ite.timeStamp.split(' ')[1].split(':')[0] + ':' + ite.timeStamp.split(' ')[1].split(':')[1]
|
let iteTime =
|
||||||
|
ite.timeStamp.split(" ")[1].split(":")[0] +
|
||||||
|
":" +
|
||||||
|
ite.timeStamp.split(" ")[1].split(":")[1];
|
||||||
if (iteTime === item.timeStamp) {
|
if (iteTime === item.timeStamp) {
|
||||||
item.p =ite.p
|
item.p = ite.p;
|
||||||
item.u =ite.u
|
item.u = ite.u;
|
||||||
item.i =ite.i
|
item.i = ite.i;
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
return timeArray_1
|
return timeArray_1;
|
||||||
|
}
|
||||||
|
// 处理取随机数
|
||||||
|
export function getRandomInt(min, max) {
|
||||||
|
min = Math.ceil(min);
|
||||||
|
max = Math.floor(max);
|
||||||
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||||
}
|
}
|
|
@ -489,6 +489,7 @@ import {
|
||||||
} from "@/api/carPage/index";
|
} from "@/api/carPage/index";
|
||||||
import {
|
import {
|
||||||
handleEchartsData,
|
handleEchartsData,
|
||||||
|
getRandomInt,
|
||||||
handleEchartsData_timeStamp_p,
|
handleEchartsData_timeStamp_p,
|
||||||
} from "@/hooks/handleFun";
|
} from "@/hooks/handleFun";
|
||||||
import { usrzApi } from "@/api/Osp/svgApi";
|
import { usrzApi } from "@/api/Osp/svgApi";
|
||||||
|
@ -784,25 +785,29 @@ const submitForm = () => {
|
||||||
);
|
);
|
||||||
// console.log(datat_start,datat_end,"3---------");
|
// console.log(datat_start,datat_end,"3---------");
|
||||||
let datainput = {
|
let datainput = {
|
||||||
chargingStationID: currentData.id,
|
chargingStationID: currentData.id.replace("@", ""),
|
||||||
type: parseInt(formData.value.type),
|
type: parseInt(formData.value.type),
|
||||||
isForce: parseInt(formData.value.whether),
|
isForce: parseInt(formData.value.whether),
|
||||||
targetValue: parseInt(formData.value.number),
|
targetValue: parseInt(formData.value.number),
|
||||||
startTime: datat_start,
|
startTime: datat_start,
|
||||||
endTime: datat_end,
|
endTime: datat_end,
|
||||||
};
|
};
|
||||||
|
const randomDelay=getRandomInt(2000,5000)//取2000-5000ms之间的随机数
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
send_Status.value=false
|
send_Status.value=false
|
||||||
|
|
||||||
ajustCarPageFlag.value=false
|
ajustCarPageFlag.value=false
|
||||||
}, 2000);
|
|
||||||
setTimeout(() => {
|
|
||||||
ElMessage({
|
ElMessage({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
message: "指令下发成功",
|
message: "指令下发成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
}, 3000);
|
}, randomDelay);
|
||||||
|
|
||||||
|
// setTimeout(() => {
|
||||||
|
|
||||||
|
// }, 3000);
|
||||||
// send_Status.value=false
|
// send_Status.value=false
|
||||||
ajustInfo_api(datainput).then((res: any) => {
|
ajustInfo_api(datainput).then((res: any) => {
|
||||||
console.log(res, "1-------car");
|
console.log(res, "1-------car");
|
||||||
|
|
|
@ -88,7 +88,7 @@ const drawOneLine = () => {
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: '25%',
|
top: '25%',
|
||||||
left: '8%',
|
left: '18%',
|
||||||
right: '12%',
|
right: '12%',
|
||||||
bottom: '13%'
|
bottom: '13%'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue