master
parent
fef76ad578
commit
19cbcd4765
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -275,7 +275,8 @@
|
|||
style="width: 100%; height: 100%"
|
||||
@cell-click="handleCellEnter"
|
||||
>
|
||||
<el-table-column label="可调资源" align="center" width="285">
|
||||
<!-- width="255" -->
|
||||
<el-table-column label="可调资源" align="center">
|
||||
<template #default="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.name }}</span>
|
||||
</template>
|
||||
|
@ -297,7 +298,7 @@
|
|||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center">
|
||||
<el-table-column label="开始时间" align="center" width="175">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-time-select
|
||||
|
@ -305,7 +306,7 @@
|
|||
v-model="scope.row.start_date"
|
||||
start="00:15"
|
||||
step="00:15"
|
||||
end="18:30"
|
||||
end="24:00"
|
||||
placeholder="开始时间"
|
||||
@change="getStart_time"
|
||||
v-if="scope.row.isEdit"
|
||||
|
@ -316,7 +317,7 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" align="center">
|
||||
<el-table-column label="结束时间" align="center" width="175">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-time-select
|
||||
|
@ -324,7 +325,7 @@
|
|||
v-model="scope.row.end_date"
|
||||
start="00:15"
|
||||
step="00:15"
|
||||
end="18:30"
|
||||
end="24:00"
|
||||
placeholder="结束时间"
|
||||
@change="getend_time"
|
||||
v-if="scope.row.isEdit"
|
||||
|
@ -337,9 +338,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="btn_box">
|
||||
<el-button class="add_bg" @click="handleSaveDate(adjustTableData)"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button class="add_bg" @click="handleSaveDate">保存</el-button>
|
||||
<el-button class="send_bg" @click="adjustFlag = false"
|
||||
>取消</el-button
|
||||
>
|
||||
|
@ -377,7 +376,7 @@ import { number } from "echarts";
|
|||
import rateJSONData from "@/assets/json/Ajust_rate.json";
|
||||
import ajustsource from "@/assets/json/Ajustsoure.json";
|
||||
import Ajust_strategy from "@/assets/json/Ajust_strategy.json";
|
||||
|
||||
import { sourcInfoApi } from "@/api/ajust/ajust.ts";
|
||||
import { getSourceMapRange } from "typescript";
|
||||
import { ITEM_RENDER_EVT } from "element-plus/es/components/virtual-list/src/defaults.mjs";
|
||||
// onMounted(async () => {
|
||||
|
@ -391,12 +390,20 @@ onMounted(() => {
|
|||
// getstrategyDate() //获取策略配置服务
|
||||
// let result = await loadRateApi({});
|
||||
// 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去获取台区负载率
|
||||
// 设备树传来的设备树节点id treeKey是id
|
||||
const getTreeKey = (treeKey: any) => {
|
||||
|
@ -425,7 +432,10 @@ const getTreeSourceList = async (id: string) => {
|
|||
//---- json离线数据
|
||||
//sourceAjustObj = ajustsource.data;
|
||||
//----
|
||||
|
||||
handelSourceTable(sourceAjustObj);
|
||||
};
|
||||
// 处理可调资源数量 功能---
|
||||
const handelSourceTable = (sourceAjustObj: any) => {
|
||||
sourceLArr.forEach((item) => {
|
||||
// 将返回数据的length赋值给数组对象
|
||||
item.number = sourceAjustObj[item.type]?.length || 0;
|
||||
|
@ -467,7 +477,7 @@ interface RateDateInfo {
|
|||
let key2 = ref<number>(2);
|
||||
let rateDate_cur = reactive<RateDateInfo[]>([]); //当前的负载率
|
||||
let rateDate_will = reactive<RateDateInfo[]>([]); //预测负载率
|
||||
let rateDate_curFlag=ref(false)
|
||||
let rateDate_curFlag = ref(false);
|
||||
const getRateDate = (treeAreaId: string) => {
|
||||
// 定时15分钟获取接口数据
|
||||
// console.log(treeAreaId, treeAreaId.value,"treeAreaId==========");
|
||||
|
@ -479,9 +489,9 @@ const getRateDate = (treeAreaId: string) => {
|
|||
}).then((res) => {
|
||||
console.log(res, "res");
|
||||
|
||||
if (res.data.result.length>0) {
|
||||
if (res.data.result.length > 0) {
|
||||
rateDate_cur = res?.data.result;
|
||||
rateDate_curFlag.value=true
|
||||
rateDate_curFlag.value = true;
|
||||
// console.log(res, "res");
|
||||
} else {
|
||||
// ElMessage({
|
||||
|
@ -491,8 +501,7 @@ const getRateDate = (treeAreaId: string) => {
|
|||
// plain: true,
|
||||
// });
|
||||
// alert(1)
|
||||
console.log('暂无数据负载率');
|
||||
|
||||
console.log("暂无数据负载率");
|
||||
}
|
||||
});
|
||||
// let rateDate = rateJSONData as any;
|
||||
|
@ -554,10 +563,10 @@ const haneleprogress = () => {
|
|||
console.log(res, "iiiii");
|
||||
setTimeout(() => {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "指令下发成功",
|
||||
type: "success",
|
||||
});
|
||||
showClose: true,
|
||||
message: "指令下发成功",
|
||||
type: "success",
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
// -------离线
|
||||
|
@ -595,7 +604,7 @@ const haneleprogress = () => {
|
|||
// --------在线
|
||||
|
||||
setTimeout(() => {
|
||||
send_Status.value=false//隐藏 div 为发送中
|
||||
send_Status.value = false; //隐藏 div 为发送中
|
||||
}, 2000);
|
||||
};
|
||||
|
||||
|
@ -770,9 +779,8 @@ let adjustTableData = reactive<User[]>([
|
|||
// 点击策略配置
|
||||
let handleClickPC = () => {
|
||||
adjustFlag.value = true;
|
||||
let newData: any = [];
|
||||
console.log(tablepvData.value, "tablepvData");
|
||||
|
||||
adjustTableData = [];
|
||||
tablepvData.value.forEach((item: any) => {
|
||||
let typeStr = "";
|
||||
if (item.type === "photoVoltaicUnit") {
|
||||
|
@ -794,24 +802,28 @@ let handleClickPC = () => {
|
|||
end_date: "00:00:00",
|
||||
type: typeStr,
|
||||
number: 0,
|
||||
// isEdit:false,
|
||||
};
|
||||
newData.push(obj);
|
||||
|
||||
adjustTableData.push(obj);
|
||||
});
|
||||
console.log(newData, "newData");
|
||||
adjustTableData = newData;
|
||||
};
|
||||
|
||||
/** 鼠标移入cell */
|
||||
const handleCellEnter = (row: any, column: any, cell: any, event: any) => {
|
||||
console.log(row, "row");
|
||||
row.isEdit = true;
|
||||
};
|
||||
// 点击保存时修改成功并将结果传出去
|
||||
const handleSaveDate = (val: any) => {
|
||||
const handleSaveDate = () => {
|
||||
btn_sendFlag.value = true;
|
||||
adjustFlag.value = false;
|
||||
val.forEach((ite: any) => {
|
||||
|
||||
adjustTableData.forEach((ite: any) => {
|
||||
ite.isEdit = false; //所有的编辑状态全部为假
|
||||
});
|
||||
console.log(adjustTableData, "adjustTableData");
|
||||
|
||||
// 赋值给一个数组给下发指令的接口用
|
||||
newAjustTableData = adjustTableData;
|
||||
// console.log(newAjustTableData, "newAjustTableData1-1-1-");
|
||||
|
|
|
@ -392,11 +392,12 @@
|
|||
</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="tip">
|
||||
<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>
|
||||
|
||||
|
@ -405,10 +406,10 @@
|
|||
<img src="@/assets/images/homePage/jinggao.png" alt="" />
|
||||
|
||||
<div class="gaobottom">
|
||||
<span>通知</span>
|
||||
<div class="gao">
|
||||
|
||||
接到10kV线路556调节需求30kW,时间17:00-18:00,待处理
|
||||
<div class="gao">
|
||||
[编号:48776100381]台区55608(10kV 556线路)于2024-07-11 13:43:19发生反向重过载异常,负载率-32%。
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2260,8 +2261,8 @@ const styleVar = computed(() => {
|
|||
box-sizing: border-box;
|
||||
width: changeHeight(938);
|
||||
height: changeHeight(476.7);
|
||||
width:changeHeight(1338.06);
|
||||
height: changeHeight(1218.37);
|
||||
// width:changeHeight(1338.06);
|
||||
// height: changeHeight(1218.37);
|
||||
background: url("@/assets/images/homePage/jinggaobg.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding-top: 1%;
|
||||
|
@ -2290,8 +2291,8 @@ const styleVar = computed(() => {
|
|||
}
|
||||
}
|
||||
.tip {
|
||||
// height: 14%;
|
||||
height: 7%;
|
||||
height: 14%;
|
||||
// height: 7%;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
Loading…
Reference in New Issue