From 5cb6cc9a22da0aa46e97ae494b6bd07968149422 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 16:56:51 +0800 Subject: [PATCH] u --- .../pages/CapacityAdjustmentPage/index.vue | 71 +++++++++++-------- src/views/pages/homePage/index.vue | 2 +- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/views/pages/CapacityAdjustmentPage/index.vue b/src/views/pages/CapacityAdjustmentPage/index.vue index 1766e5b..8812cb1 100644 --- a/src/views/pages/CapacityAdjustmentPage/index.vue +++ b/src/views/pages/CapacityAdjustmentPage/index.vue @@ -137,9 +137,14 @@ 负载率预测
策略配置
-
+
下发指令
+
发送中。。。
@@ -209,6 +214,8 @@
已下发指令
+ +
([]); +let send_Status=ref(false);//发送中。。的状态 +let btn_sendFlag = ref(false); //发送按钮的状态 + const haneleprogress = () => { - // adjustContentFlag.value = false - // progressContentFlag.value = true - console.log(newAjustTableData, "newAjustTableData2-2-2-"); + 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) => { - console.log(item, "item"); - console.log(YMD,YMD+item.end_date, "item.start+item.end_date"); - //循环发完配置中的可调资源 let inputdata = { - type: "FEEDER", - mrId: "03DKX-555", - name: "555", - startTime: "2024-07-05 00:00:00", - endTime: "2024-07-05 00:00:10", - regulatedValue: "60", + 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, "邮箱"); @@ -543,21 +555,13 @@ const haneleprogress = () => { type: "error", }); }); - }); -}; -// const getstrategyDate = () => { -// let inputdata = { -// type: "FEEDER", -// mrId: "03DKX-555", -// name: "555", -// startTime: "2024-07-05 00:00:00", -// endTime: "2024-07-05 00:00:10", -// regulatedValue: "60", -// }; + // .finally(() => { + + // }); + }); + // send_Status.value=false//隐藏 div 为发送中 +}; -// let res = Ajust_strategy as any; -// console.log(res, "iiiii"); -// }; interface TablepvDate { index?: number; name: string; @@ -766,13 +770,14 @@ const handleCellEnter = (row: any, column: any, cell: any, event: any) => { }; // 点击保存时修改成功并将结果传出去 const handleSaveDate = (val: any) => { + btn_sendFlag.value = true; adjustFlag.value = false; val.forEach((ite: any) => { ite.isEdit = false; //所有的编辑状态全部为假 }); // 赋值给一个数组给下发指令的接口用 newAjustTableData = adjustTableData; - console.log(newAjustTableData, "newAjustTableData1-1-1-"); + // console.log(newAjustTableData, "newAjustTableData1-1-1-"); }; // 点击 @@ -922,7 +927,9 @@ const styleVar = computed(() => { ); mix-blend-mode: normal; border: 1px solid #00c2ff; - width: changeHeight(190); + width: changeHeight(230); + // width: changeHeight(290); + height: changeHeight(50); line-height: changeHeight(50); } @@ -1261,7 +1268,7 @@ const styleVar = computed(() => { .btns { cursor: pointer; display: flex; - width: changeHeight(400); + width: changeHeight(550); justify-content: space-between; } } @@ -1546,6 +1553,10 @@ const styleVar = computed(() => { } } } + .send_drp { + cursor: no-drop; //禁用状态 + color: #cccccc; + } .progress_info2 { width: 100%; box-sizing: border-box; diff --git a/src/views/pages/homePage/index.vue b/src/views/pages/homePage/index.vue index 24c12d7..a987e60 100644 --- a/src/views/pages/homePage/index.vue +++ b/src/views/pages/homePage/index.vue @@ -1058,7 +1058,7 @@ const getStatInfo = async () => { unit380lowarr.push(item); //220v数据 } unit380lowarrLength.value = - unit380lowarr[0]?.length + unit380lowarr[1]?.length; //380v及其以下长度 + unit380lowarr[0]?.ratedS + unit380lowarr[1]?.ratedS; //380v及其以下kw unit380lowarrCount.value = unit380lowarr[0]?.count + unit380lowarr[1]?.count; //380v及其以下户数 }