ibp钥匙操作接口修改

This commit is contained in:
Yuan 2023-12-07 10:00:57 +08:00
parent b9285d0f65
commit 1a6142861a
3 changed files with 4 additions and 4 deletions

View File

@ -131,7 +131,7 @@ export interface IbpKeyOperationParams {
mapId: number;
stationId: string;
gear: number;
keyCode: string;
keyId: string;
}
export async function ibpKeyOperation(params: IbpKeyOperationParams) {

View File

@ -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);
}
}

View File

@ -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,