ibp钥匙操作接口修改
This commit is contained in:
parent
b9285d0f65
commit
1a6142861a
@ -131,7 +131,7 @@ export interface IbpKeyOperationParams {
|
||||
mapId: number;
|
||||
stationId: string;
|
||||
gear: number;
|
||||
keyCode: string;
|
||||
keyId: string;
|
||||
}
|
||||
|
||||
export async function ibpKeyOperation(params: IbpKeyOperationParams) {
|
||||
|
@ -101,6 +101,6 @@ export class IbpKeyInteraction extends GraphicInteractionPlugin<IbpKey> {
|
||||
onClick(e: FederatedMouseEvent): void {
|
||||
const g = e.target as IbpKey;
|
||||
const changeState = useIbpStore().ibpKeyOperation;
|
||||
changeState(g.datas.code, g.state.gear === 0 ? 1 : 0);
|
||||
changeState(g.datas.id, g.state.gear === 0 ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ export const useIbpStore = defineStore('ibp', {
|
||||
stationId: this.stationId,
|
||||
});
|
||||
},
|
||||
async ibpKeyOperation(keyCode: string, gear: number) {
|
||||
async ibpKeyOperation(keyId: string, gear: number) {
|
||||
return await ibpKeyOperation({
|
||||
keyCode,
|
||||
keyId,
|
||||
gear,
|
||||
mapId: Number(this.mapId),
|
||||
simulationId: this.simulationId,
|
||||
|
Loading…
Reference in New Issue
Block a user