mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
feat(web): 新增预测管理和策略表单功能
- 添加预测管理页面和相关组件 - 实现策略表单组件,支持创建和编辑策略 - 优化表格组件,增加分页和数据加载功能 - 调整视频监控组件布局 - 修复部分组件样式问题
This commit is contained in:
@@ -1,16 +1,26 @@
|
||||
import request from "@/request/index.js";
|
||||
export function postReq(data, url) {
|
||||
import request from '@/request/index.js'
|
||||
import qs from 'qs'
|
||||
export function postReq(url, data) {
|
||||
return request({
|
||||
method: "post",
|
||||
method: 'post',
|
||||
url,
|
||||
data,
|
||||
});
|
||||
data: {
|
||||
...data,
|
||||
token: localStorage.getItem('token')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getReq(data, url) {
|
||||
// const query = qs.stringify(data, { indices: false })
|
||||
export function getReq(url, data) {
|
||||
const query = qs.stringify(
|
||||
{
|
||||
...data,
|
||||
token: localStorage.getItem('token')
|
||||
},
|
||||
{ indices: false }
|
||||
)
|
||||
return request({
|
||||
method: "get",
|
||||
url: url + "?" + data,
|
||||
});
|
||||
method: 'get',
|
||||
url: url + '?' + query
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user