This commit is contained in:
刘龙龙 2023-12-15 14:00:15 +08:00
parent d12dd164c5
commit 5493f8d2ed
4 changed files with 66 additions and 53 deletions

View File

@ -1,37 +1,37 @@
import request from '@/utils/request'
import request from "@/utils/request";
// 可调负荷资源
export function GetKdfhzy () {
export function GetKdfhzy() {
return request({
url: `/GetAdjustableload`,
method: 'GET'
})
url: `/api/GetAdjustableload`,
method: "GET",
});
}
// 可调负荷策略
export function GetKdfhcl () {
export function GetKdfhcl() {
return request({
url: `/GetLoadControlStrategy`,
method: 'GET'
})
}
method: "GET",
});
}
// 可调负荷分析
export function GetKdfhfx () {
export function GetKdfhfx() {
return request({
url: `//GetAdjustableLoadAnalysis`,
method: 'GET'
})
}
method: "GET",
});
}
// 刚性可调负荷
export function GetGang () {
export function GetGang() {
return request({
url: `//GetRigidAdjustableLoads`,
method: 'GET'
})
}
method: "GET",
});
}
// 柔性可调负荷
export function GetRou () {
export function GetRou() {
return request({
url: `//GetFlexibleAdjustableLoad`,
method: 'GET'
})
}
method: "GET",
});
}

View File

@ -2,8 +2,7 @@
import axios from "axios";
import { Message } from "element-ui"; // 请确保你的项目中已经安装了 Element UI
const request = axios.create({
baseURL: "https://localhost:44352/api/", // 设置基地址,博主这个请求跨域了因此我设置了代理服务器,因此基地址才这么短
timeout: 5000, // 请求超时当5s没有响应就会结束请求
timeout: 50000, // 请求超时当5s没有响应就会结束请求
});
// 添加请求拦截器一下内容是axios的拦截器可以不用写

View File

@ -61,10 +61,13 @@
<p>可调负荷分析</p>
</div>
<div class="fenxi">
<h2>基线负荷:<span class="title">{{kdfhfxlist.BaseLoad}}</span>kW</h2>
<h2>
基线负荷:<span class="title">{{ kdfhfxlist.BaseLoad }}</span
>kW
</h2>
<div class="one">
<div class="first_left">
<h3>{{kdfhfxlist.PeakClipping}}<span>kW</span></h3>
<h3>{{ kdfhfxlist.PeakClipping }}<span>kW</span></h3>
<p>可参与削锋负荷</p>
</div>
<div class="first_center"></div>
@ -75,7 +78,7 @@
</div>
<div class="two">
<div class="first_left">
<h3>{{kdfhfxlist.ValleyFilling}}<span>kW</span></h3>
<h3>{{ kdfhfxlist.ValleyFilling }}<span>kW</span></h3>
<p>可参与填谷负荷</p>
</div>
<div class="first_center"></div>
@ -138,7 +141,7 @@
<div class="g_two">
<span class="gang_two"></span>
<span>刚性可调负荷</span>
<span class="gang_count">{{ganglist.Rigidity}}</span>
<span class="gang_count">{{ ganglist.Rigidity }}</span>
<span>kW</span>
</div>
<div class="g_three">
@ -161,7 +164,7 @@
<div class="g_one">
<span class="gang_one"></span>
<span>设备数量</span>
<span class="gang_count">{{roulist.QuantityFacility}}</span>
<span class="gang_count">{{ roulist.QuantityFacility }}</span>
<span></span>
</div>
<div class="g_two">
@ -173,7 +176,7 @@
<div class="g_three">
<span class="gang_three"></span>
<span>总可调负荷</span>
<span class="gang_count">{{ roulist.GrossValue}}</span>
<span class="gang_count">{{ roulist.GrossValue }}</span>
<span>kW</span>
</div>
</div>
@ -249,7 +252,7 @@ export default {
data: [
{
value: 0.6,
all:100,
all: 100,
direction: "left", //
},
], // data
@ -281,9 +284,9 @@ export default {
],
label: {
normal: {
formatter: function(params){
formatter: function (params) {
console.log(params);
return params.value * 100+ "{d|%}";
return params.value * 100 + "{d|%}";
},
rich: {
d: {
@ -388,9 +391,9 @@ export default {
],
label: {
normal: {
formatter: function(params){
formatter: function (params) {
console.log(params);
return params.value * 100+ "{d|%}";
return params.value * 100 + "{d|%}";
},
rich: {
d: {
@ -469,9 +472,9 @@ export default {
ValleyFillingAmount: 19254.84, //
},
//
ganglist:[],
ganglist: [],
//
roulist:[],
roulist: [],
};
},
methods: {
@ -1161,16 +1164,16 @@ export default {
console.log(res);
this.ganglist = res.data[0];
let percent = (res.data[0].Rigidity / res.data[0].GrossValue).toFixed(2);
this.option.series[0].data[0].value =percent;
this.ganglist=res.data[0];
this.option.series[0].data[0].value = percent;
this.ganglist = res.data[0];
},
async getrou() {
let res = await GetRou();
console.log(res);
this.ganglist = res.data[0];
let percent = (res.data[0].Flexible / res.data[0].GrossValue).toFixed(2);
this.option.series[0].data[0].value =percent;
this.roulist=res.data[0];
this.option.series[0].data[0].value = percent;
this.roulist = res.data[0];
},
},
created() {
@ -1195,7 +1198,7 @@ export default {
this.xf();
this.tg();
this.kdfhzy();
// this.getkdfhzy();
this.getkdfhzy();
},
};
</script>

View File

@ -3,5 +3,16 @@ const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
publicPath: './',
publicPath: "./",
devServer: {
proxy: {
"/api": {
target: "http://111.229.30.246:32761",
changeOrigin: true,
pathRewrite: {
"^/api": "/api",
},
},
},
},
});