9 changed files with 157 additions and 50 deletions
-
8src/apis/system.ts
-
2src/components/common/FTStream/index.vue
-
2src/libs/utils.ts
-
40src/stores/debugStore.ts
-
5src/stores/systemStore.ts
-
8src/types/System.d.ts
-
74src/types/debug.d.ts
-
25src/types/socket.d.ts
-
43src/views/debug/index.vue
@ -1,9 +1,9 @@ |
|||
import http from 'libs/http' |
|||
|
|||
export interface Params { |
|||
export interface Params<T> { |
|||
commandId: string |
|||
command: string |
|||
params: any |
|||
params: T |
|||
} |
|||
export const debugControl = (params: Params): Promise<any> => http.post('/debug/cmd', params) |
|||
export const control = (params: Params): Promise<any> => http.post('/cmd', params) |
|||
export const debugControl = <T>(params: Params<T>): Promise<any> => http.post('/debug/cmd', params) |
|||
export const control = <T>(params: Params<T>): Promise<any> => http.post('/cmd', params) |
@ -0,0 +1,8 @@ |
|||
declare namespace System { |
|||
interface SystemStore { |
|||
systemStatus: any |
|||
systemList: Socket.NotificationData[] |
|||
streamVisible: boolean |
|||
isDebug: boolean |
|||
} |
|||
} |
@ -0,0 +1,74 @@ |
|||
declare namespace Debug { |
|||
interface DebugStore { |
|||
formData: FormData |
|||
} |
|||
interface FormData { |
|||
liquidArmData: LiquidArmData |
|||
liquidPumpData: LiquidPumpData |
|||
shakeSpeed: ShakeSpeed |
|||
heatArea: HeatArea |
|||
transferModule: TransferModule |
|||
lidData: LidData |
|||
} |
|||
interface LiquidArmData { |
|||
largeArmAngle: number | undefined |
|||
smallArmAngle: number | undefined |
|||
largeArmRotationRate: number | undefined |
|||
smallArmRotationRate: number | undefined |
|||
} |
|||
|
|||
interface LiquidPumpData { |
|||
index: number | undefined |
|||
rate: number | undefined |
|||
} |
|||
|
|||
interface ShakeSpeed { |
|||
rate: number | undefined |
|||
} |
|||
|
|||
interface HeatMotorData { |
|||
distance: number | undefined |
|||
rate: number | undefined |
|||
} |
|||
|
|||
interface HeatTemperature { |
|||
temperature: number | undefined |
|||
} |
|||
|
|||
interface HeatArea { |
|||
index: number | undefined |
|||
heatMotorData: HeatMotorData |
|||
heatTemperature: HeatTemperature |
|||
} |
|||
|
|||
interface XMotorData { |
|||
xDimDistance: number | undefined |
|||
xDimRate: number | undefined |
|||
} |
|||
|
|||
interface YMotorData { |
|||
yDimDistance: number | undefined |
|||
yDimRate: number | undefined |
|||
} |
|||
|
|||
interface ZMotorData { |
|||
zDimDistance: number | undefined |
|||
zDimRate: number | undefined |
|||
} |
|||
|
|||
interface JawData { |
|||
rate: number | undefined |
|||
} |
|||
|
|||
interface TransferModule { |
|||
xMotorData: XMotorData |
|||
yMotorData: YMotorData |
|||
zMotorData: ZMotorData |
|||
JawData: JawData |
|||
} |
|||
|
|||
interface LidData { |
|||
rate: number | undefined |
|||
distance: number | undefined |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
declare namespace Socket { |
|||
type Response = NotificationResponse | MachineStateResponse |
|||
|
|||
interface NotificationResponse { |
|||
type: 'notification' |
|||
data: NotificationData |
|||
} |
|||
|
|||
interface MachineStateResponse { |
|||
type: 'machineState' |
|||
data: MachineStateData |
|||
} |
|||
interface NotificationData { |
|||
commandId: string |
|||
command: string |
|||
level: string |
|||
title: string |
|||
content: string |
|||
dateTime: string |
|||
} |
|||
|
|||
type MachineStateData = MachineStateBase & { |
|||
[key: string]: any |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue