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