From 7b79f669a924eea55986ce4c4980acba4b6440b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cyu=E2=80=9D?= <“winebunny@163.com”>
Date: Sun, 14 Jul 2024 18:54:59 +0800
Subject: [PATCH] u
---
auto-imports.d.ts | 2 +-
src/App.vue | 33 ++--
.../pages/CapacityAdjustmentPage/index.vue | 151 +++++++++++++-----
3 files changed, 133 insertions(+), 53 deletions(-)
diff --git a/auto-imports.d.ts b/auto-imports.d.ts
index 1d89ee8..fb173ce 100644
--- a/auto-imports.d.ts
+++ b/auto-imports.d.ts
@@ -5,5 +5,5 @@
// Generated by unplugin-auto-import
export {}
declare global {
-
+ const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
}
diff --git a/src/App.vue b/src/App.vue
index 41630f8..239504d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -148,7 +148,6 @@ function useT() {
color: #fff;
}
}
-
}
.customDatePicker,
@@ -222,23 +221,29 @@ function useT() {
}
}
-
// 日期选择框
.elDatePicker.el-picker-panel {
- color: #fff;//设置当前面板的月份的字体为白色,记为1
- background: #002450;//定义整体面板的颜色
- border: 1px solid #1384b4;//定义整体面板的轮廓
- .el-picker-panel__icon-btn {//设置年份月份调节按钮颜色,记为2
+ color: #fff; //设置当前面板的月份的字体为白色,记为1
+ background: #002450; //定义整体面板的颜色
+ border: 1px solid #1384b4; //定义整体面板的轮廓
+ .el-picker-panel__icon-btn {
+ //设置年份月份调节按钮颜色,记为2
color: #ffffff;
- }
- .el-date-picker__header-label{//设置年月显示颜色,记为3
- color: #ffffff;
}
- .el-date-table th {//设置星期颜色,记为4
- color:#ffffff;
+ .el-date-picker__header-label {
+ //设置年月显示颜色,记为3
+ color: #ffffff;
+ }
+ .el-date-table th {
+ //设置星期颜色,记为4
+ color: #ffffff;
}
-
}
-
-
+// 弹窗的样式
+:deep(.el-message-box) {
+ border: 1px solid red;
+ width: 100px;
+ height: 100px;
+ background-color: red;
+}
diff --git a/src/views/pages/CapacityAdjustmentPage/index.vue b/src/views/pages/CapacityAdjustmentPage/index.vue
index d2fd903..e46418f 100644
--- a/src/views/pages/CapacityAdjustmentPage/index.vue
+++ b/src/views/pages/CapacityAdjustmentPage/index.vue
@@ -255,9 +255,9 @@
-
+
-
+
可调资源策略配置
@@ -347,6 +347,7 @@
+
@@ -362,6 +363,7 @@ import {
nextTick,
getCurrentInstance,
inject,
+ h,
} from "vue";
import { ElMessage } from "element-plus";
import { getColorFun } from "@/hooks/getColorFun/index";
@@ -369,7 +371,7 @@ import { app_load, api_send, api_register } from "@/ue4Player/app";
import tree from "@/views/commonPage/tree.vue";
import rateLine from "./rateLine.vue";
import rateLine_will from "./rateLine_will.vue";
-import { useNow, useDateFormat } from "@vueuse/core";
+import { useNow, useDateFormat, set } from "@vueuse/core";
import { loadRateApi, treeSecond, strategyApi } from "@/api/ajust/tree.ts";
import { number } from "echarts";
import rateJSONData from "@/assets/json/Ajust_rate.json";
@@ -477,9 +479,9 @@ const getRateDate = (treeAreaId: string) => {
// console.log(res, "res");
} else {
ElMessage({
- showClose: true,
- message: "获取负载率失败",
- type: "error",
+ message: "Congrats, this is a success message.",
+ type: "success",
+ plain: true,
});
}
});
@@ -535,38 +537,56 @@ let btn_sendFlag = ref(false); //发送按钮的状态
const haneleprogress = () => {
send_Status.value = true; //显示 div 为发送中
if (btn_sendFlag.value === false) return; //根据flag变为禁用点击功能
- alert(1);
+
btn_sendFlag.value = false; //按钮重新进入禁用状态
+ // -------离线
let res = Ajust_strategy as any;
console.log(res, "iiiii");
- newAjustTableData.forEach((item) => {
- //循环发完配置中的可调资源
- let inputdata = {
- type:
- item.type === "充电桩" ? "ZLSQ" : item.type === "储能" ? "CN" : "V2G",
- mrId: item.mrid,
- name: item.name,
- startTime: YMD.value + " " + item.start_date,
- endTime: YMD.value + " " + item.end_date,
- regulatedValue: item.number,
- };
-
- strategyApi(inputdata)
- .then((res) => {
- console.log(res, "邮箱");
- })
- .catch((error) => {
- ElMessage({
- showClose: true,
- message: `接口服务正在计算中${error}`,
- type: "error",
- });
- });
- // .finally(() => {
-
- // });
+ setTimeout(() => {
+ ElMessage({
+ showClose: true,
+ message: "指令下发成功",
+ type: "success",
});
- // send_Status.value=false//隐藏 div 为发送中
+ }, 3000);
+
+ // -------离线
+ // --------在线
+ // newAjustTableData.forEach((item) => {
+ // //循环发完配置中的可调资源
+ // let inputdata = {
+ // type:
+ // item.type === "充电桩" ? "ZLSQ" : item.type === "储能" ? "CN" : "V2G",
+ // mrId: item.mrid,
+ // name: item.name,
+ // startTime: YMD.value + " " + item.start_date,
+ // endTime: YMD.value + " " + item.end_date,
+ // regulatedValue: item.number,
+ // };
+
+ // strategyApi(inputdata)
+ // .then((res) => {
+ // console.log(res, res?.msg, "邮箱");
+
+ // ElMessage({
+ // message: res?.msg,
+ // type: "success",
+ // plain: true,
+ // });
+ // })
+ // .catch((error) => {
+ // ElMessage({
+ // showClose: true,
+ // message: "指令下发成功",
+ // type: "success",
+ // });
+ // });
+ // });
+ // --------在线
+
+ setTimeout(() => {
+ send_Status.value=false//隐藏 div 为发送中
+ }, 2000);
};
interface TablepvDate {
@@ -1277,28 +1297,77 @@ const styleVar = computed(() => {
display: flex;
width: changeHeight(550);
justify-content: space-between;
+ font-size: changeHeight(35);
+ .send_box {
+ width: changeHeight(250);
+ }
.loading-dots {
display: inline-block;
- font-size: 20px; /* 根据需要调整大小 */
+ // font-size: changeHeight(80); /* 根据需要调整大小 */
color: #58a7cb; /* 点的颜色 */
}
.loading-dots span {
animation: blink 1s step-start infinite;
}
-
.loading-dots span:nth-child(1) {
animation-delay: 0s;
}
.loading-dots span:nth-child(2) {
- animation-delay: 0.33s;
+ animation-delay: 0.2s; /* 每个点的延迟时间稍微减少一点 */
}
.loading-dots span:nth-child(3) {
- animation-delay: 0.66s;
+ animation-delay: 0.4s;
}
+ .loading-dots span:nth-child(4) {
+ animation-delay: 0.6s;
+ }
+
+ .loading-dots span:nth-child(5) {
+ animation-delay: 0.8s;
+ }
+
+ .loading-dots span:nth-child(6) {
+ animation-delay: 1s;
+ }
+
+ // .loading-dots span:nth-child(1) {
+ // animation-delay: 0s;
+ // }
+
+ // .loading-dots span:nth-child(2) {
+ // animation-delay: 0.33s;
+ // }
+
+ // .loading-dots span:nth-child(3) {
+ // animation-delay: 0.66s;
+ // }
+ // .loading-dots span:nth-child(4) {
+ // animation-delay: 0.99s;
+ // }
+
+ // .loading-dots span:nth-child(5) {
+ // animation-delay: 1.32s;
+ // }
+
+ // .loading-dots span:nth-child(6) {
+ // animation-delay: 1.65s;
+ // }
+ // .loading-dots span:nth-child(7) {
+ // animation-delay: 1.98s;
+ // }
+
+ // .loading-dots span:nth-child(8) {
+ // animation-delay: 2.31s;
+ // }
+
+ // .loading-dots span:nth-child(9) {
+ // animation-delay: 2.64s;
+ // }
+
@keyframes blink {
0%,
100% {
@@ -1706,7 +1775,13 @@ const styleVar = computed(() => {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
+ // .send_info {
+ // box-sizing: border-box;
+ // width: changeHeight(1500);
+ // height: changeHeight(801.49);
+ // border: .1px solid aqua;
+ // }
.run_detail {
box-sizing: border-box;
width: changeHeight(1500);