feat(tools): 新增台账管理功能模块
- 添加 addLedger API 接口定义和实现 - 创建工程配置表单组件 (EngineeringForm) - 创建设备配置表单组件 (EquipmentForm) - 创建项目和测点表单组件 (ProjectForm, LineForm) - 实现台账树形结构面板 (LedgerTreePanel) - 添加台账数据验证契约检查脚本 - 集成字典选项和动态表单验证功能 - 实现台账节点增删改查完整流程 - 优化 Echarts 图表组件分组渲染性能
This commit is contained in:
110
frontend/src/api/tools/addLedger/interface/index.ts
Normal file
110
frontend/src/api/tools/addLedger/interface/index.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
export namespace AddLedger {
|
||||
export type NodeLevel = 0 | 1 | 2 | 3
|
||||
|
||||
export interface LedgerTreeNode {
|
||||
id?: string
|
||||
Id?: string
|
||||
pid?: string
|
||||
Pid?: string
|
||||
pids?: string
|
||||
Pids?: string
|
||||
parentId?: string
|
||||
parentIds?: string
|
||||
name?: string
|
||||
Name?: string
|
||||
level?: NodeLevel
|
||||
Level?: NodeLevel
|
||||
state?: number
|
||||
State?: number
|
||||
children?: LedgerTreeNode[]
|
||||
}
|
||||
|
||||
export interface NormalizedTreeNode {
|
||||
id: string
|
||||
pid: string
|
||||
pids: string
|
||||
name: string
|
||||
level: NodeLevel
|
||||
children: NormalizedTreeNode[]
|
||||
raw: LedgerTreeNode
|
||||
}
|
||||
|
||||
export interface DetailParams {
|
||||
id: string
|
||||
level: NodeLevel
|
||||
}
|
||||
|
||||
export interface EngineeringForm {
|
||||
id?: string
|
||||
name: string
|
||||
province?: string
|
||||
city?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface ProjectForm {
|
||||
id?: string
|
||||
engineeringId?: string
|
||||
parentId?: string
|
||||
name: string
|
||||
area?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface EquipmentForm {
|
||||
id?: string
|
||||
engineeringId?: string
|
||||
projectId?: string
|
||||
parentId?: string
|
||||
name: string
|
||||
ndid: string
|
||||
mac: string
|
||||
dev_type?: string
|
||||
dev_model: string
|
||||
dev_access_method?: string
|
||||
node_id?: string
|
||||
node_process?: string
|
||||
upgrade?: number
|
||||
}
|
||||
|
||||
export interface LineForm {
|
||||
id?: string
|
||||
line_id?: string
|
||||
deviceId?: string
|
||||
parentId?: string
|
||||
name: string
|
||||
line_no?: number
|
||||
conType?: number
|
||||
vol_grade?: number
|
||||
position?: string
|
||||
ct_ratio?: number
|
||||
ct2_ratio?: number
|
||||
pt_ratio?: number
|
||||
pt2_ratio?: number
|
||||
short_circuit_capacity?: number
|
||||
basic_capacity?: number
|
||||
protocol_capacity?: number
|
||||
dev_capacity?: number
|
||||
monitor_obj?: string
|
||||
is_govern?: number
|
||||
monitor_user?: string
|
||||
is_important?: number
|
||||
}
|
||||
|
||||
export type NodeDetail = EngineeringForm | ProjectForm | EquipmentForm | LineForm
|
||||
|
||||
export interface AvailableLineNoParams {
|
||||
deviceId: string
|
||||
lineId?: string
|
||||
}
|
||||
|
||||
export interface DeleteNodeParams {
|
||||
id: string
|
||||
level: NodeLevel
|
||||
}
|
||||
|
||||
export interface SelectOption<T = string | number> {
|
||||
label: string
|
||||
value: T
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user