“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%"
@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 treeKeyid
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;
@ -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-");

View File

@ -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]台区5560810kV 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;