“yu” 2024-07-15 16:14:22 +08:00
parent fef76ad578
commit 19cbcd4765
4 changed files with 72 additions and 49 deletions

18
src/api/ajust/ajust.ts Normal file
View File

@ -0,0 +1,18 @@
import request from "@/utils/http/request";
interface idInfo {
orgID?: string,
}
// 设备树 0 一级服务
// 全部的能量调节页面的接口-统计可调资源
export function sourcInfoApi(data: any) {
return request({
url: '/api/wwpm/biz/v1/device_feeder_or_all',
method: 'POST',
data
})
}

View File

@ -60,14 +60,6 @@ export function strategyApi(data: any) {
} }
// 全部的能量调节页面的接口-统计可调资源
export function sourcIngoApi(data: any) {
return request({
url: '/wwpm/biz/v1/device_all',
method: 'POST',
data
})
}

View File

@ -275,7 +275,8 @@
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
@cell-click="handleCellEnter" @cell-click="handleCellEnter"
> >
<el-table-column label="可调资源" align="center" width="285"> <!-- width="255" -->
<el-table-column label="可调资源" align="center">
<template #default="scope"> <template #default="scope">
<span style="margin-left: 10px">{{ scope.row.name }}</span> <span style="margin-left: 10px">{{ scope.row.name }}</span>
</template> </template>
@ -297,7 +298,7 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center" width="175">
<template #default="scope"> <template #default="scope">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-time-select <el-time-select
@ -305,7 +306,7 @@
v-model="scope.row.start_date" v-model="scope.row.start_date"
start="00:15" start="00:15"
step="00:15" step="00:15"
end="18:30" end="24:00"
placeholder="开始时间" placeholder="开始时间"
@change="getStart_time" @change="getStart_time"
v-if="scope.row.isEdit" v-if="scope.row.isEdit"
@ -316,7 +317,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="结束时间" align="center"> <el-table-column label="结束时间" align="center" width="175">
<template #default="scope"> <template #default="scope">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-time-select <el-time-select
@ -324,7 +325,7 @@
v-model="scope.row.end_date" v-model="scope.row.end_date"
start="00:15" start="00:15"
step="00:15" step="00:15"
end="18:30" end="24:00"
placeholder="结束时间" placeholder="结束时间"
@change="getend_time" @change="getend_time"
v-if="scope.row.isEdit" v-if="scope.row.isEdit"
@ -337,9 +338,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="btn_box"> <div class="btn_box">
<el-button class="add_bg" @click="handleSaveDate(adjustTableData)" <el-button class="add_bg" @click="handleSaveDate"></el-button>
>保存</el-button
>
<el-button class="send_bg" @click="adjustFlag = false" <el-button class="send_bg" @click="adjustFlag = false"
>取消</el-button >取消</el-button
> >
@ -377,7 +376,7 @@ import { number } from "echarts";
import rateJSONData from "@/assets/json/Ajust_rate.json"; import rateJSONData from "@/assets/json/Ajust_rate.json";
import ajustsource from "@/assets/json/Ajustsoure.json"; import ajustsource from "@/assets/json/Ajustsoure.json";
import Ajust_strategy from "@/assets/json/Ajust_strategy.json"; import Ajust_strategy from "@/assets/json/Ajust_strategy.json";
import { sourcInfoApi } from "@/api/ajust/ajust.ts";
import { getSourceMapRange } from "typescript"; import { getSourceMapRange } from "typescript";
import { ITEM_RENDER_EVT } from "element-plus/es/components/virtual-list/src/defaults.mjs"; import { ITEM_RENDER_EVT } from "element-plus/es/components/virtual-list/src/defaults.mjs";
// onMounted(async () => { // onMounted(async () => {
@ -391,12 +390,20 @@ onMounted(() => {
// getstrategyDate() // // getstrategyDate() //
// let result = await loadRateApi({}); // let result = await loadRateApi({});
// console.log(result, ""); // console.log(result, "");
getAllSourceAjust() getAllSourceAjust(); //
}); });
// //
const getAllSourceAjust=()=>{ const getAllSourceAjust = () => {
let datainput = {
orgID: "8af8470a47aad8e20147aad92e400335", //
};
} sourcInfoApi(datainput).then((res) => {
console.log(res, "可调资源");
sourceAjustObj = res.data;
// tablepvData.value=res?.data
});
};
let treeAreaId = ref(""); //id let treeAreaId = ref(""); //id
// id treeKeyid // id treeKeyid
const getTreeKey = (treeKey: any) => { const getTreeKey = (treeKey: any) => {
@ -425,7 +432,10 @@ const getTreeSourceList = async (id: string) => {
//---- json线 //---- json线
//sourceAjustObj = ajustsource.data; //sourceAjustObj = ajustsource.data;
//---- //----
handelSourceTable(sourceAjustObj);
};
// ---
const handelSourceTable = (sourceAjustObj: any) => {
sourceLArr.forEach((item) => { sourceLArr.forEach((item) => {
// length // length
item.number = sourceAjustObj[item.type]?.length || 0; item.number = sourceAjustObj[item.type]?.length || 0;
@ -467,7 +477,7 @@ interface RateDateInfo {
let key2 = ref<number>(2); let key2 = ref<number>(2);
let rateDate_cur = reactive<RateDateInfo[]>([]); // let rateDate_cur = reactive<RateDateInfo[]>([]); //
let rateDate_will = reactive<RateDateInfo[]>([]); // let rateDate_will = reactive<RateDateInfo[]>([]); //
let rateDate_curFlag=ref(false) let rateDate_curFlag = ref(false);
const getRateDate = (treeAreaId: string) => { const getRateDate = (treeAreaId: string) => {
// 15 // 15
// console.log(treeAreaId, treeAreaId.value,"treeAreaId=========="); // console.log(treeAreaId, treeAreaId.value,"treeAreaId==========");
@ -479,9 +489,9 @@ const getRateDate = (treeAreaId: string) => {
}).then((res) => { }).then((res) => {
console.log(res, "res"); console.log(res, "res");
if (res.data.result.length>0) { if (res.data.result.length > 0) {
rateDate_cur = res?.data.result; rateDate_cur = res?.data.result;
rateDate_curFlag.value=true rateDate_curFlag.value = true;
// console.log(res, "res"); // console.log(res, "res");
} else { } else {
// ElMessage({ // ElMessage({
@ -491,8 +501,7 @@ const getRateDate = (treeAreaId: string) => {
// plain: true, // plain: true,
// }); // });
// alert(1) // alert(1)
console.log('暂无数据负载率'); console.log("暂无数据负载率");
} }
}); });
// let rateDate = rateJSONData as any; // let rateDate = rateJSONData as any;
@ -554,10 +563,10 @@ const haneleprogress = () => {
console.log(res, "iiiii"); console.log(res, "iiiii");
setTimeout(() => { setTimeout(() => {
ElMessage({ ElMessage({
showClose: true, showClose: true,
message: "指令下发成功", message: "指令下发成功",
type: "success", type: "success",
}); });
}, 3000); }, 3000);
// -------线 // -------线
@ -595,7 +604,7 @@ const haneleprogress = () => {
// --------线 // --------线
setTimeout(() => { setTimeout(() => {
send_Status.value=false// div send_Status.value = false; // div
}, 2000); }, 2000);
}; };
@ -770,9 +779,8 @@ let adjustTableData = reactive<User[]>([
// //
let handleClickPC = () => { let handleClickPC = () => {
adjustFlag.value = true; adjustFlag.value = true;
let newData: any = [];
console.log(tablepvData.value, "tablepvData"); console.log(tablepvData.value, "tablepvData");
adjustTableData = [];
tablepvData.value.forEach((item: any) => { tablepvData.value.forEach((item: any) => {
let typeStr = ""; let typeStr = "";
if (item.type === "photoVoltaicUnit") { if (item.type === "photoVoltaicUnit") {
@ -794,24 +802,28 @@ let handleClickPC = () => {
end_date: "00:00:00", end_date: "00:00:00",
type: typeStr, type: typeStr,
number: 0, number: 0,
// isEdit:false,
}; };
newData.push(obj);
adjustTableData.push(obj);
}); });
console.log(newData, "newData");
adjustTableData = newData;
}; };
/** 鼠标移入cell */ /** 鼠标移入cell */
const handleCellEnter = (row: any, column: any, cell: any, event: any) => { const handleCellEnter = (row: any, column: any, cell: any, event: any) => {
console.log(row, "row");
row.isEdit = true; row.isEdit = true;
}; };
// //
const handleSaveDate = (val: any) => { const handleSaveDate = () => {
btn_sendFlag.value = true; btn_sendFlag.value = true;
adjustFlag.value = false; adjustFlag.value = false;
val.forEach((ite: any) => {
adjustTableData.forEach((ite: any) => {
ite.isEdit = false; // ite.isEdit = false; //
}); });
console.log(adjustTableData, "adjustTableData");
// //
newAjustTableData = adjustTableData; newAjustTableData = adjustTableData;
// console.log(newAjustTableData, "newAjustTableData1-1-1-"); // console.log(newAjustTableData, "newAjustTableData1-1-1-");

View File

@ -392,11 +392,12 @@
</div> </div>
</div> </div>
<!-- 告警消息 --> <!-- 告警消息 -->
<!-- <div class="content_center_alert" v-if="true">
<!-- <div class="content_center_alert1" v-if="true">
<div class="run_detail" v-if="true"> <div class="run_detail" v-if="true">
<div class="tip"> <div class="tip">
<img src="@/assets/images/mainPage/icon_alert_pv.png" alt="" /> <img src="@/assets/images/mainPage/icon_alert_pv.png" alt="" />
<span class="jianbian">告警信息</span> <span class="jianbian">告警</span>
<div class="closebtn" @click="alert_pvFlag = false"></div> <div class="closebtn" @click="alert_pvFlag = false"></div>
</div> </div>
@ -405,10 +406,10 @@
<img src="@/assets/images/homePage/jinggao.png" alt="" /> <img src="@/assets/images/homePage/jinggao.png" alt="" />
<div class="gaobottom"> <div class="gaobottom">
<span>通知</span>
<div class="gao">
接到10kV线路556调节需求30kW时间17:00-18:00待处理 <div class="gao">
[编号48776100381]台区5560810kV 556线路于2024-07-11 13:43:19发生反向重过载异常负载率-32%
</div> </div>
</div> </div>
</div> </div>
@ -2260,8 +2261,8 @@ const styleVar = computed(() => {
box-sizing: border-box; box-sizing: border-box;
width: changeHeight(938); width: changeHeight(938);
height: changeHeight(476.7); height: changeHeight(476.7);
width:changeHeight(1338.06); // width:changeHeight(1338.06);
height: changeHeight(1218.37); // height: changeHeight(1218.37);
background: url("@/assets/images/homePage/jinggaobg.png") no-repeat; background: url("@/assets/images/homePage/jinggaobg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding-top: 1%; padding-top: 1%;
@ -2290,8 +2291,8 @@ const styleVar = computed(() => {
} }
} }
.tip { .tip {
// height: 14%; height: 14%;
height: 7%; // height: 7%;
display: flex; display: flex;
align-items: center; align-items: center;