|
@ -18,8 +18,15 @@ export type TrackRecordSig = { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
export const defaultContext: ContextMessage["data"] = { |
|
|
export const defaultContext: ContextMessage["data"] = { |
|
|
loginFlag: false, |
|
|
|
|
|
loginUser: {}, |
|
|
|
|
|
|
|
|
loginFlag: true, |
|
|
|
|
|
loginUser: { |
|
|
|
|
|
id: 3, //数据主键id
|
|
|
|
|
|
account: "test001", //用户账户
|
|
|
|
|
|
nickname: "测试账户001", //用户昵称
|
|
|
|
|
|
userRole: "User", //用户角色,可用值:User,Admin,Dev
|
|
|
|
|
|
isBuiltInUser: false, //是否内置用户(内置用户不可删除)
|
|
|
|
|
|
}, |
|
|
|
|
|
newMeasureAfterSave: false, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
export type ContextMessage = { |
|
|
export type ContextMessage = { |
|
@ -34,8 +41,23 @@ export type ContextMessage = { |
|
|
userRole: "Admin" | "User" | "Dev"; |
|
|
userRole: "Admin" | "User" | "Dev"; |
|
|
isBuiltInUser: boolean; |
|
|
isBuiltInUser: boolean; |
|
|
}>; |
|
|
}>; |
|
|
|
|
|
newMeasureAfterSave: boolean; |
|
|
}; |
|
|
}; |
|
|
path: "/deviceContext"; |
|
|
path: "/deviceContext"; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export type MeasureState = { |
|
|
|
|
|
messageType: "EVENT"; |
|
|
|
|
|
data: { |
|
|
|
|
|
taskStatus: "IDLE" | "MEASURING" | "WAITING_FOR_MEASURING" | "FINISHED"; |
|
|
|
|
|
measureSideCnt: 0 | 1 | 2; //已测量数量,0,1,2 最多两边(左边和右边)
|
|
|
|
|
|
isMeasuringLeftEnd: boolean; //测量左侧完成
|
|
|
|
|
|
isMeasuringRightEnd: boolean; //测量右侧完成
|
|
|
|
|
|
motionlessSigFlag: boolean; //滑轮质心是否静止
|
|
|
|
|
|
inStartMeasuringPos: boolean; //是否在允许开始测量的位置
|
|
|
|
|
|
// profileRecordDescription: null; //用户填写的新测量信息
|
|
|
|
|
|
}; |
|
|
|
|
|
path: "/measurement-task/get-task-state"; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
export type Datagram = TrackRecordSig | TaskState | ContextMessage; |
|
|
export type Datagram = TrackRecordSig | TaskState | ContextMessage; |