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({ return request({
url: `/GetAdjustableload`, url: `/api/GetAdjustableload`,
method: 'GET' method: "GET",
}) });
} }
// 可调负荷策略 // 可调负荷策略
export function GetKdfhcl() { export function GetKdfhcl() {
return request({ return request({
url: `/GetLoadControlStrategy`, url: `/GetLoadControlStrategy`,
method: 'GET' method: "GET",
}) });
} }
// 可调负荷分析 // 可调负荷分析
export function GetKdfhfx() { export function GetKdfhfx() {
return request({ return request({
url: `//GetAdjustableLoadAnalysis`, url: `//GetAdjustableLoadAnalysis`,
method: 'GET' method: "GET",
}) });
} }
// 刚性可调负荷 // 刚性可调负荷
export function GetGang() { export function GetGang() {
return request({ return request({
url: `//GetRigidAdjustableLoads`, url: `//GetRigidAdjustableLoads`,
method: 'GET' method: "GET",
}) });
} }
// 柔性可调负荷 // 柔性可调负荷
export function GetRou() { export function GetRou() {
return request({ return request({
url: `//GetFlexibleAdjustableLoad`, url: `//GetFlexibleAdjustableLoad`,
method: 'GET' method: "GET",
}) });
} }

View File

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

View File

@ -61,7 +61,10 @@
<p>可调负荷分析</p> <p>可调负荷分析</p>
</div> </div>
<div class="fenxi"> <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="one">
<div class="first_left"> <div class="first_left">
<h3>{{ kdfhfxlist.PeakClipping }}<span>kW</span></h3> <h3>{{ kdfhfxlist.PeakClipping }}<span>kW</span></h3>
@ -1195,7 +1198,7 @@ export default {
this.xf(); this.xf();
this.tg(); this.tg();
this.kdfhzy(); this.kdfhzy();
// this.getkdfhzy(); this.getkdfhzy();
}, },
}; };
</script> </script>

View File

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