feat: 新增数据请求接口

This commit is contained in:
MTrun
2022-03-21 20:56:42 +08:00
parent c937555020
commit 62ed00e31c
14 changed files with 177 additions and 73 deletions
+3 -1
View File
@@ -15,7 +15,9 @@ export type ConfigType = {
// 数据请求
interface requestConfig {
data: RequestConfigType
data: RequestConfigType,
// 暂时约定为数据存储区域(未使用)
requestData: any
}
// Echarts 数据类型
+4 -4
View File
@@ -1,9 +1,11 @@
import { getUUID } from '@/utils'
import { PublicConfigType } from '@/packages/index.d'
import { RequestDataTypeEnum, RequestConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
import { RequestHttpEnum } from '@/enums/httpEnum'
const requestConfig: RequestConfigType = {
requestDataType: RequestDataTypeEnum.STATIC,
requestHttpType: RequestHttpEnum.GET
}
export class publicConfig implements PublicConfigType {
@@ -18,11 +20,9 @@ export class publicConfig implements PublicConfigType {
animations: []
}
// 数据
public data = {
requestDataType: RequestDataTypeEnum.STATIC
}
public data = { ...requestConfig }
// 数据获取
public requestData = { ...requestConfig }
public requestData = []
// 设置坐标
public setPosition(x: number, y: number): void {
this.attr.x = x