“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) {
return request({
@ -15,4 +15,13 @@ export function sourcInfoApi(data: any) {
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 class="info3">
<rateLine_will
:rateDate="rateDate_will"
:keysv="keyechart"
></rateLine_will>
<!-- <rateLine_will :rateDate="rateDate_will"></rateLine_will> -->
<!-- -->
</div>
</div>
<div class="capAjust_box content_bg" v-else>
@ -216,6 +214,7 @@
:rateDate="rateDate_cur"
:keysv="keyechart"
v-if="rateDate_curFlag"
:key="refreshkey"
></rateLine>
<!-- <rateLine
:rateDate="rateDate_cur"
@ -262,9 +261,12 @@
</div> -->
<div class="info3">
11
<rateLine_will
v-if="rateDate_willFlag"
:rateDate="rateDate_will"
:keysv="keyechart"
:key="refreshkey"
></rateLine_will>
</div>
</div>
@ -474,9 +476,10 @@ 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 { sourcInfoApi, forceRateApi } from "@/api/ajust/ajust.ts";
import { getSourceMapRange } from "typescript";
import { ITEM_RENDER_EVT } from "element-plus/es/components/virtual-list/src/defaults.mjs";
import { deflateRawSync } from "zlib";
// onMounted(async () => {
// getRateDate(); //
@ -502,7 +505,7 @@ const getAllSourceAjust = () => {
sourcInfoApi(datainput).then((res) => {
// handelSourceTable(res.data);
// tablepvData.value=res?.data
let counts=res.data
let counts = res.data;
for (const [type, count] of Object.entries(counts)) {
const item = sourceLArr.find((item) => item.type === type);
if (item) {
@ -524,9 +527,10 @@ const getAllSourceAjust_Line = (mrid: string) => {
});
};
let treeAreaId = ref(""); //id
let treeNodeKey = ref(""); //id
// id treeNode
const getTreeKey = (treeNode: any) => {
treeNodeKey.value = treeNode.key; //线id
allFlag.value = false;
if (treeNode.level === 3) {
console.log(treeNode.level, "3");
@ -607,7 +611,11 @@ let keyechart = ref<number>(2);
let rateDate_cur = reactive<RateDateInfo[]>([]); //
let rateDate_will = reactive<RateDateInfo[]>([]); //
let rateDate_curFlag = ref(false);
let rateDate_willFlag = ref(false);
const getRateDate = (treeAreaId: string) => {
refreshkey.value += 1;
rateDate_cur = [];
// 15
// console.log(treeAreaId, treeAreaId.value,"treeAreaId==========");
@ -617,10 +625,9 @@ const getRateDate = (treeAreaId: string) => {
orgID: "8af8470a47aad8e20147aad92e400335",
}).then((res) => {
console.log(res, "res");
if (res.data.result.length > 0) {
rateDate_cur = res?.data.result;
keyechart.value++;
refreshkey.value += 1;
rateDate_curFlag.value = true;
// console.log(res, "res");
} else {
@ -953,7 +960,20 @@ const handleSaveDate = () => {
ite.isEdit = false; //
});
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;
// console.log(newAjustTableData, "newAjustTableData1-1-1-");
@ -1743,6 +1763,45 @@ const styleVar = computed(() => {
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";
import transformFontSize from "@/hooks/transFormSize.ts";
import "echarts/lib/component/dataZoom";
interface RateDateInfo {
loadRate?: string;
dataTime?: string;
interface RateDateInfo_will {
measValue?: string;
datetime?: string;
}
const props = defineProps<{
rateDate: RateDateInfo[];
rateDate: RateDateInfo_will[];
keysv?: Number;
}>();
onMounted(() => {
@ -112,8 +112,8 @@ const drawOneLine = (rateArr: RateDateInfo[]) => {
// return param.split(' ')[1].split(':')[0] + ':' + param.split(' ')[1].split(':')[1]
// },
},
// data: (rateArr.map((rtime) => rtime?.dataTime.slice(-8))),
data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
data: (rateArr.map((rtime) => rtime?.datetime.slice(-8))),
// data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
},
yAxis: {
splitLine: {
@ -170,7 +170,7 @@ const drawOneLine = (rateArr: RateDateInfo[]) => {
},
},
// data: [20, 32, 35, 26, 24, 20, 8],
// data: rateArr.map((rload) => rload.loadRate),
data: rateArr.map((rload) => rload.measValue),
},
],
};