“yu” 2024-07-16 14:54:24 +08:00
parent 6777ad0953
commit 7a89a54b28
4 changed files with 86 additions and 18 deletions

BIN
dist (2).zip Normal file

Binary file not shown.

View File

@ -6,7 +6,7 @@ interface idInfo {
} }
// 设备树 0 一级服务
// 全部的能量调节页面的接口-统计可调资源 // 全部的能量调节页面的接口-统计可调资源
export function sourcInfoApi(data: any) { export function sourcInfoApi(data: any) {
return request({ return request({
@ -15,4 +15,13 @@ export function sourcInfoApi(data: any) {
data data
}) })
} }
// 负载率预测
export function forceRateApi(data: any) {
return request({
url: '/api/wwpm/biz/v1/load_rate_forecast',
method: 'POST',
data
})
}

View File

@ -153,10 +153,8 @@
</div> </div>
<div class="info3"> <div class="info3">
<rateLine_will <!-- <rateLine_will :rateDate="rateDate_will"></rateLine_will> -->
:rateDate="rateDate_will" <!-- -->
:keysv="keyechart"
></rateLine_will>
</div> </div>
</div> </div>
<div class="capAjust_box content_bg" v-else> <div class="capAjust_box content_bg" v-else>
@ -216,6 +214,7 @@
:rateDate="rateDate_cur" :rateDate="rateDate_cur"
:keysv="keyechart" :keysv="keyechart"
v-if="rateDate_curFlag" v-if="rateDate_curFlag"
:key="refreshkey"
></rateLine> ></rateLine>
<!-- <rateLine <!-- <rateLine
:rateDate="rateDate_cur" :rateDate="rateDate_cur"
@ -262,9 +261,12 @@
</div> --> </div> -->
<div class="info3"> <div class="info3">
11
<rateLine_will <rateLine_will
v-if="rateDate_willFlag"
:rateDate="rateDate_will" :rateDate="rateDate_will"
:keysv="keyechart" :keysv="keyechart"
:key="refreshkey"
></rateLine_will> ></rateLine_will>
</div> </div>
</div> </div>
@ -474,9 +476,10 @@ 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 { sourcInfoApi, forceRateApi } 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";
import { deflateRawSync } from "zlib";
// onMounted(async () => { // onMounted(async () => {
// getRateDate(); // // getRateDate(); //
@ -502,7 +505,7 @@ const getAllSourceAjust = () => {
sourcInfoApi(datainput).then((res) => { sourcInfoApi(datainput).then((res) => {
// handelSourceTable(res.data); // handelSourceTable(res.data);
// tablepvData.value=res?.data // tablepvData.value=res?.data
let counts=res.data let counts = res.data;
for (const [type, count] of Object.entries(counts)) { for (const [type, count] of Object.entries(counts)) {
const item = sourceLArr.find((item) => item.type === type); const item = sourceLArr.find((item) => item.type === type);
if (item) { if (item) {
@ -524,9 +527,10 @@ const getAllSourceAjust_Line = (mrid: string) => {
}); });
}; };
let treeAreaId = ref(""); //id let treeNodeKey = ref(""); //id
// id treeNode // id treeNode
const getTreeKey = (treeNode: any) => { const getTreeKey = (treeNode: any) => {
treeNodeKey.value = treeNode.key; //线id
allFlag.value = false; allFlag.value = false;
if (treeNode.level === 3) { if (treeNode.level === 3) {
console.log(treeNode.level, "3"); console.log(treeNode.level, "3");
@ -607,7 +611,11 @@ let keyechart = 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);
let rateDate_willFlag = ref(false);
const getRateDate = (treeAreaId: string) => { const getRateDate = (treeAreaId: string) => {
refreshkey.value += 1;
rateDate_cur = [];
// 15 // 15
// console.log(treeAreaId, treeAreaId.value,"treeAreaId=========="); // console.log(treeAreaId, treeAreaId.value,"treeAreaId==========");
@ -617,10 +625,9 @@ const getRateDate = (treeAreaId: string) => {
orgID: "8af8470a47aad8e20147aad92e400335", orgID: "8af8470a47aad8e20147aad92e400335",
}).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;
keyechart.value++; refreshkey.value += 1;
rateDate_curFlag.value = true; rateDate_curFlag.value = true;
// console.log(res, "res"); // console.log(res, "res");
} else { } else {
@ -953,7 +960,20 @@ const handleSaveDate = () => {
ite.isEdit = false; // ite.isEdit = false; //
}); });
console.log(adjustTableData, "adjustTableData"); console.log(adjustTableData, "adjustTableData");
refreshkey.value += 1;
rateDate_will=[]
//
forceRateApi({
orgID: "8af8470a47aad8e20147aad92e400335",
mrid: treeNodeKey.value,
regulateNumber: 22,
}).then((res) => {
console.log(res, "1------------res");
rateDate_will = res.data.result;
if(res.data.result.length>0){
rateDate_willFlag.value = true;
}
});
// //
newAjustTableData = adjustTableData; newAjustTableData = adjustTableData;
// console.log(newAjustTableData, "newAjustTableData1-1-1-"); // console.log(newAjustTableData, "newAjustTableData1-1-1-");
@ -1743,6 +1763,45 @@ const styleVar = computed(() => {
border: transparent !important; border: transparent !important;
} }
} }
.table_box {
.tableTitle {
div:nth-child(1) {
width: 23%;
}
div:nth-child(2) {
width: 23%;
}
div:nth-child(3) {
width: 23%;
}
div:nth-child(4) {
width: 30%;
}
}
.el-carousel {
.th {
div:nth-child(1) {
width: 23%;
}
div:nth-child(2) {
width: 23%;
}
div:nth-child(3) {
width: 23%;
}
div:nth-child(4) {
width: 30%;
}
}
}
}
} }
} }

View File

@ -14,12 +14,12 @@ import {
} from "vue"; } from "vue";
import transformFontSize from "@/hooks/transFormSize.ts"; import transformFontSize from "@/hooks/transFormSize.ts";
import "echarts/lib/component/dataZoom"; import "echarts/lib/component/dataZoom";
interface RateDateInfo { interface RateDateInfo_will {
loadRate?: string; measValue?: string;
dataTime?: string; datetime?: string;
} }
const props = defineProps<{ const props = defineProps<{
rateDate: RateDateInfo[]; rateDate: RateDateInfo_will[];
keysv?: Number; keysv?: Number;
}>(); }>();
onMounted(() => { onMounted(() => {
@ -112,8 +112,8 @@ const drawOneLine = (rateArr: RateDateInfo[]) => {
// return param.split(' ')[1].split(':')[0] + ':' + param.split(' ')[1].split(':')[1] // return param.split(' ')[1].split(':')[0] + ':' + param.split(' ')[1].split(':')[1]
// }, // },
}, },
// data: (rateArr.map((rtime) => rtime?.dataTime.slice(-8))), data: (rateArr.map((rtime) => rtime?.datetime.slice(-8))),
data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"], // data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
}, },
yAxis: { yAxis: {
splitLine: { splitLine: {
@ -170,7 +170,7 @@ const drawOneLine = (rateArr: RateDateInfo[]) => {
}, },
}, },
// data: [20, 32, 35, 26, 24, 20, 8], // data: [20, 32, 35, 26, 24, 20, 8],
// data: rateArr.map((rload) => rload.loadRate), data: rateArr.map((rload) => rload.measValue),
}, },
], ],
}; };