diff --git a/package.json b/package.json index 2702f71..3d4b0ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "media_player_client", - "version": "1.5.1", + "version": "1.5.2", "description": "A Quasar Framework app", "productName": "MediaPlayerClient", "author": "fangxiang ", diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 7f4a46a..7e5edda 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -1,5 +1,5 @@ -import { ConnectTableEntity } from "./../entities/ConnectTableEntity"; -import { PollingEntity } from "./../entities/PollingEntity"; +import { ConnectTableEntity } from "src/entities/ConnectTableEntity"; +import { PollingEntity } from "src/entities/PollingEntity"; import ReconnectingWebSocket from "reconnecting-websocket"; import NormalWindowRequestEntity from "src/entities/NormalWindowRequestEntity"; import { PlanEntity } from "src/entities/PlanEntity"; @@ -12,6 +12,7 @@ import { EdgeBlendingPoint } from "src/entities/EdgeBlendingEntities"; import { ExternalControlTableEntity } from "src/entities/ExternalControlTableEntity"; import { SerialPortConfigEntity } from "src/entities/SerialPortConfigEntity"; import TimingTaskEntity from "src/entities/TimingTaskEntity"; +import JointActionEquipmentTableEntity from "src/entities/JointActionEquipmentTableEntity"; class _RpcInfo { send_timestamp: number; @@ -494,10 +495,21 @@ export default class ClientConnection { } } - public async addMode(group_uuid?: string, name?: string, index?: number) { + public async addMode( + group_uuid?: string, + name?: string, + index?: number, + joint_action_equipments?: StringKeyValueEntity[] + ) { try { return await this.doRpc( - new Protocol.AddModeRequestEntity(0, name, group_uuid, index) + new Protocol.AddModeRequestEntity( + 0, + name, + group_uuid, + index, + joint_action_equipments + ) ); } catch (e) { console.error(e); @@ -508,11 +520,19 @@ export default class ClientConnection { uuid?: string, name?: string, index?: number, - group_uuid?: string + group_uuid?: string, + joint_action_equipments?: StringKeyValueEntity[] ) { try { return await this.doRpc( - new Protocol.EditModeRequestEntity(0, name, uuid, index, group_uuid) + new Protocol.EditModeRequestEntity( + 0, + name, + uuid, + index, + group_uuid, + joint_action_equipments + ) ); } catch (e) { console.error(e); @@ -1148,6 +1168,26 @@ export default class ClientConnection { } } + public async getJointActionEquipments() { + return await this.doRpc( + new Protocol.GetJointActionEquipmentRequestEntity() + ); + } + + public async setJointActionEquipment( + entity: JointActionEquipmentTableEntity + ) { + return await this.doRpc( + new Protocol.SetJointActionEquipmentRequestEntity(entity) + ); + } + + public async deleteJointActionEquipment(uuid: string) { + return await this.doRpc( + new Protocol.DeleteJointActionEquipmentRequestEntity(uuid) + ); + } + public destory() { this.ws?.close(); if (this.ws) { diff --git a/src/common/EventBus.ts b/src/common/EventBus.ts index aef7b75..9f40088 100644 --- a/src/common/EventBus.ts +++ b/src/common/EventBus.ts @@ -33,4 +33,6 @@ export namespace EventNamesDefine { export const CurrentConnectConnected = "onCurrentConnectConnected"; export const CurrentClientChanged = "onCurrentClientChanged"; export const DropToWall = "onDropToWall"; + export const RefreshJointActionEquipmentList = + "onRefreshJointActionEquipmentList"; } diff --git a/src/common/RemoteDataExangeProcesser.ts b/src/common/RemoteDataExangeProcesser.ts index e47783b..3eda68c 100644 --- a/src/common/RemoteDataExangeProcesser.ts +++ b/src/common/RemoteDataExangeProcesser.ts @@ -174,12 +174,13 @@ export default class RemoteDataExangeProcesser { let pos = GlobalData.getInstance().modes.findIndex( (element) => element && element.uuid == temp.mode.uuid ); - let refresh_flag = false; if (pos != -1) { refresh_flag = GlobalData.getInstance().modes[pos].group_uuid != - temp.mode.group_uuid; + temp.mode.group_uuid || + GlobalData.getInstance().modes[pos].joint_action_equipments != + temp.mode.joint_action_equipments; GlobalData.getInstance().modes[pos] = temp.mode; } $store.commit("setArrayValue", { diff --git a/src/components/EditJointActionEquipmentDialog.vue b/src/components/EditJointActionEquipmentDialog.vue new file mode 100644 index 0000000..2fe3057 --- /dev/null +++ b/src/components/EditJointActionEquipmentDialog.vue @@ -0,0 +1,331 @@ + + + + + diff --git a/src/components/ListJointActionEquipmentDialog.vue b/src/components/ListJointActionEquipmentDialog.vue new file mode 100644 index 0000000..107b8f6 --- /dev/null +++ b/src/components/ListJointActionEquipmentDialog.vue @@ -0,0 +1,205 @@ + + + + + diff --git a/src/components/ModeDialog.vue b/src/components/ModeDialog.vue index 818843f..f5dcbae 100644 --- a/src/components/ModeDialog.vue +++ b/src/components/ModeDialog.vue @@ -147,6 +147,63 @@ + + + {{ $t("joint action equipment") }} + + {{ $t("add") }} + + + + + + + + {{ $t("equipment") }}: + + + + + + + {{ $t("mode") }}: + + + + + + + + {{ $t("delete") }} + + + + + + + @@ -174,6 +231,9 @@ +