master
parent
9f49493d83
commit
5c7c8268a3
|
@ -50,4 +50,8 @@ export function strategyApi(data: any) {
|
|||
}
|
||||
|
||||
|
||||
// 全部的能量调节页面的接口
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -120,7 +120,11 @@
|
|||
</div>
|
||||
<div class="infotitle"><span>当前负载率</span></div>
|
||||
<div class="info2">
|
||||
<rateLine :rateDate="rateDate_cur" :keysv="key2" v-if="treeAreaId"></rateLine>
|
||||
<rateLine
|
||||
:rateDate="rateDate_cur"
|
||||
:keysv="key2"
|
||||
v-if="treeAreaId"
|
||||
></rateLine>
|
||||
</div>
|
||||
<div class="infotitle_box">
|
||||
<div class="infotitle_short">
|
||||
|
@ -368,17 +372,15 @@ import { ITEM_RENDER_EVT } from "element-plus/es/components/virtual-list/src/def
|
|||
|
||||
// });
|
||||
onMounted(() => {
|
||||
|
||||
// getstrategyDate() //获取策略配置服务
|
||||
// let result = await loadRateApi({});
|
||||
// console.log(result, "负载率");
|
||||
});
|
||||
let treeAreaId=ref('')//点击设备树二级服务获取的台区id去获取台区负载率
|
||||
let treeAreaId = ref(""); //点击设备树二级服务获取的台区id去获取台区负载率
|
||||
// 设备树传来的设备树节点id treeKey是id
|
||||
const getTreeKey = (treeKey: any) => {
|
||||
|
||||
getTreeSourceList(treeKey); //可调资源 先从设备树获取到id 再调用二级服务去获取可调资源列表
|
||||
treeAreaId=treeKey//台区的id
|
||||
treeAreaId = treeKey; //台区的id
|
||||
// console.log(treeAreaId,'treeAreaId----------------------');
|
||||
getRateDate(treeKey); //获取负载率 点击设备树二级服务获取的台区id去获取台区负载率
|
||||
};
|
||||
|
@ -445,29 +447,31 @@ let key2 = ref<number>(2);
|
|||
let rateDate_cur = reactive<RateDateInfo[]>([]); //当前的负载率
|
||||
let rateDate_will = reactive<RateDateInfo[]>([]); //预测负载率
|
||||
|
||||
const getRateDate = (treeAreaId:string) => {
|
||||
const getRateDate = (treeAreaId: string) => {
|
||||
// 定时15分钟获取接口数据
|
||||
// console.log(treeAreaId, treeAreaId.value,"treeAreaId==========");
|
||||
|
||||
|
||||
// setInterval(() => {
|
||||
loadRateApi({mrid:treeAreaId,orgID:"8af8470a47aad8e20147aad92e400335",}).then((res)=>{
|
||||
console.log(res, "res");
|
||||
|
||||
if(res?.data.result.length){
|
||||
rateDate_cur=res?.data.result
|
||||
// console.log(res, "res");
|
||||
|
||||
}else{
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "获取负载率失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
loadRateApi({
|
||||
mrid: treeAreaId,
|
||||
orgID: "8af8470a47aad8e20147aad92e400335",
|
||||
}).then((res) => {
|
||||
console.log(res, "res");
|
||||
|
||||
if (res?.data.result.length) {
|
||||
rateDate_cur = res?.data.result;
|
||||
// console.log(res, "res");
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "获取负载率失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
// let rateDate = rateJSONData as any;
|
||||
// console.log(rateDate, "15分钟一次接口");
|
||||
|
||||
|
||||
// }, 15*60*1000);
|
||||
};
|
||||
// 当前负载率------------
|
||||
|
@ -509,11 +513,51 @@ let sourceAjustObj = reactive<any>({});
|
|||
// 右 -能量调节
|
||||
let adjustContentFlag = ref(true);
|
||||
// 点击下达指令 进入调节进度页面
|
||||
let newAjustTableData = reactive<any>([]);
|
||||
|
||||
const haneleprogress = () => {
|
||||
// adjustContentFlag.value = false
|
||||
// progressContentFlag.value = true
|
||||
console.log(adjustTableData, "adjustTableData");
|
||||
console.log(newAjustTableData, "newAjustTableData2-2-2-");
|
||||
newAjustTableData.forEach((item) => {
|
||||
console.log(item, "item");
|
||||
console.log(YMD,YMD+item.end_date, "item.start+item.end_date");
|
||||
|
||||
//循环发完配置中的可调资源
|
||||
let inputdata = {
|
||||
type: "FEEDER",
|
||||
mrId: "03DKX-555",
|
||||
name: "555",
|
||||
startTime: "2024-07-05 00:00:00",
|
||||
endTime: "2024-07-05 00:00:10",
|
||||
regulatedValue: "60",
|
||||
};
|
||||
strategyApi(inputdata)
|
||||
.then((res) => {
|
||||
console.log(res, "邮箱");
|
||||
})
|
||||
.catch((error) => {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: `接口服务正在计算中${error}`,
|
||||
type: "error",
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
// const getstrategyDate = () => {
|
||||
// let inputdata = {
|
||||
// type: "FEEDER",
|
||||
// mrId: "03DKX-555",
|
||||
// name: "555",
|
||||
// startTime: "2024-07-05 00:00:00",
|
||||
// endTime: "2024-07-05 00:00:10",
|
||||
// regulatedValue: "60",
|
||||
// };
|
||||
|
||||
// let res = Ajust_strategy as any;
|
||||
// console.log(res, "iiiii");
|
||||
// };
|
||||
interface TablepvDate {
|
||||
index?: number;
|
||||
name: string;
|
||||
|
@ -715,30 +759,6 @@ let handleClickPC = () => {
|
|||
console.log(newData, "newData");
|
||||
adjustTableData = newData;
|
||||
};
|
||||
const getstrategyDate = () => {
|
||||
let inputdata = {
|
||||
type: "FEEDER",
|
||||
mrId: "03DKX-555",
|
||||
name: "555",
|
||||
startTime: "2024-07-05 00:00:00",
|
||||
endTime: "2024-07-05 00:00:10",
|
||||
regulatedValue: "60",
|
||||
};
|
||||
// strategyApi(inputdata)
|
||||
// .then((res) => {
|
||||
// console.log(res, "邮箱");
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// ElMessage({
|
||||
// showClose: true,
|
||||
// message: `接口服务正在计算中${error}`,
|
||||
// type: "error",
|
||||
// });
|
||||
// });
|
||||
|
||||
let res = Ajust_strategy as any;
|
||||
console.log(res, "iiiii");
|
||||
};
|
||||
|
||||
/** 鼠标移入cell */
|
||||
const handleCellEnter = (row: any, column: any, cell: any, event: any) => {
|
||||
|
@ -750,7 +770,11 @@ const handleSaveDate = (val: any) => {
|
|||
val.forEach((ite: any) => {
|
||||
ite.isEdit = false; //所有的编辑状态全部为假
|
||||
});
|
||||
// 赋值给一个数组给下发指令的接口用
|
||||
newAjustTableData = adjustTableData;
|
||||
console.log(newAjustTableData, "newAjustTableData1-1-1-");
|
||||
};
|
||||
|
||||
// 点击
|
||||
// 开始时间
|
||||
const getStart_time = () => {};
|
||||
|
|
Loading…
Reference in New Issue