信号源、模式、预案增加父节点修改接口
This commit is contained in:
parent
5ee06b380c
commit
a26ed41c34
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "media_player_client",
|
"name": "media_player_client",
|
||||||
"version": "1.4.17",
|
"version": "1.4.18",
|
||||||
"description": "A Quasar Framework app",
|
"description": "A Quasar Framework app",
|
||||||
"productName": "MediaPlayerClient",
|
"productName": "MediaPlayerClient",
|
||||||
"author": "fangxiang <fangxiang@cloudview.work>",
|
"author": "fangxiang <fangxiang@cloudview.work>",
|
||||||
|
|
|
@ -251,10 +251,19 @@ export default class ClientConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async editSignalSourceGroup(uuid: string, name: string) {
|
public async editSignalSourceGroup(
|
||||||
|
uuid: string,
|
||||||
|
name: string,
|
||||||
|
parent_uuid: string
|
||||||
|
) {
|
||||||
try {
|
try {
|
||||||
return await this.doRpc<Protocol.EditSignalSourceGroupResponseEntity>(
|
return await this.doRpc<Protocol.EditSignalSourceGroupResponseEntity>(
|
||||||
new Protocol.EditSignalSourceGroupRequestEntity(0, uuid, name)
|
new Protocol.EditSignalSourceGroupRequestEntity(
|
||||||
|
0,
|
||||||
|
uuid,
|
||||||
|
name,
|
||||||
|
parent_uuid
|
||||||
|
)
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -321,10 +330,10 @@ export default class ClientConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async editPlanGroup(uuid: string, name: string) {
|
public async editPlanGroup(uuid: string, name: string, parent_uuid: string) {
|
||||||
try {
|
try {
|
||||||
return await this.doRpc<Protocol.EditPlanGroupResponseEntity>(
|
return await this.doRpc<Protocol.EditPlanGroupResponseEntity>(
|
||||||
new Protocol.EditPlanGroupRequestEntity(0, uuid, name)
|
new Protocol.EditPlanGroupRequestEntity(0, uuid, name, parent_uuid)
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -455,10 +464,10 @@ export default class ClientConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async editModeGroup(uuid: string, name: string) {
|
public async editModeGroup(uuid: string, name: string, parent_uuid: string) {
|
||||||
try {
|
try {
|
||||||
return await this.doRpc<Protocol.EditModeGroupResponseEntity>(
|
return await this.doRpc<Protocol.EditModeGroupResponseEntity>(
|
||||||
new Protocol.EditModeGroupRequestEntity(0, uuid, name)
|
new Protocol.EditModeGroupRequestEntity(0, uuid, name, parent_uuid)
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -495,10 +504,15 @@ export default class ClientConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async editMode(uuid?: string, name?: string, index?: number) {
|
public async editMode(
|
||||||
|
uuid?: string,
|
||||||
|
name?: string,
|
||||||
|
index?: number,
|
||||||
|
group_uuid?: string
|
||||||
|
) {
|
||||||
try {
|
try {
|
||||||
return await this.doRpc<Protocol.EditModeResponseEntity>(
|
return await this.doRpc<Protocol.EditModeResponseEntity>(
|
||||||
new Protocol.EditModeRequestEntity(0, name, uuid, index)
|
new Protocol.EditModeRequestEntity(0, name, uuid, index, group_uuid)
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
|
@ -54,6 +54,16 @@ export default class GlobalData {
|
||||||
|
|
||||||
clients: Map<string, ClientConnection> = new Map<string, ClientConnection>();
|
clients: Map<string, ClientConnection> = new Map<string, ClientConnection>();
|
||||||
|
|
||||||
|
_signal_source_groups: any[] = [];
|
||||||
|
|
||||||
|
public get signal_source_groups() {
|
||||||
|
return this._signal_source_groups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set signal_source_groups(signal_source_groups: any[]) {
|
||||||
|
this._signal_source_groups = signal_source_groups;
|
||||||
|
}
|
||||||
|
|
||||||
_signal_sources: SignalSourceEntity[] = [];
|
_signal_sources: SignalSourceEntity[] = [];
|
||||||
|
|
||||||
public get signal_source() {
|
public get signal_source() {
|
||||||
|
@ -64,6 +74,16 @@ export default class GlobalData {
|
||||||
this._signal_sources = sources;
|
this._signal_sources = sources;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_mode_groups: any[] = [];
|
||||||
|
|
||||||
|
public get mode_groups() {
|
||||||
|
return this._mode_groups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set mode_groups(mode_groups: any[]) {
|
||||||
|
this._mode_groups = mode_groups;
|
||||||
|
}
|
||||||
|
|
||||||
_modes: ModeEntity[] = [];
|
_modes: ModeEntity[] = [];
|
||||||
|
|
||||||
public get modes() {
|
public get modes() {
|
||||||
|
@ -74,6 +94,16 @@ export default class GlobalData {
|
||||||
this._modes = modes;
|
this._modes = modes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_plan_groups: any[] = [];
|
||||||
|
|
||||||
|
public get plan_groups() {
|
||||||
|
return this._plan_groups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set plan_groups(plan_groups: any[]) {
|
||||||
|
this._plan_groups = plan_groups;
|
||||||
|
}
|
||||||
|
|
||||||
_plans: PlanEntity[] = [];
|
_plans: PlanEntity[] = [];
|
||||||
|
|
||||||
public get plans() {
|
public get plans() {
|
||||||
|
|
|
@ -51,6 +51,8 @@ export default class Initializer {
|
||||||
value: response.signal_sources,
|
value: response.signal_sources,
|
||||||
});
|
});
|
||||||
GlobalData.getInstance().signal_source = response.signal_sources;
|
GlobalData.getInstance().signal_source = response.signal_sources;
|
||||||
|
GlobalData.getInstance().signal_source_groups =
|
||||||
|
response.signal_source_groups;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -73,6 +75,7 @@ export default class Initializer {
|
||||||
});
|
});
|
||||||
|
|
||||||
GlobalData.getInstance().modes = response.modes;
|
GlobalData.getInstance().modes = response.modes;
|
||||||
|
GlobalData.getInstance().mode_groups = response.mode_groups;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -93,6 +96,7 @@ export default class Initializer {
|
||||||
value: response.plans,
|
value: response.plans,
|
||||||
});
|
});
|
||||||
GlobalData.getInstance().plans = response.plans;
|
GlobalData.getInstance().plans = response.plans;
|
||||||
|
GlobalData.getInstance().plan_groups = response.plan_groups;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
|
@ -174,19 +174,39 @@ export default class RemoteDataExangeProcesser {
|
||||||
let pos = GlobalData.getInstance().modes.findIndex(
|
let pos = GlobalData.getInstance().modes.findIndex(
|
||||||
(element) => element && element.uuid == temp.mode.uuid
|
(element) => element && element.uuid == temp.mode.uuid
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let refresh_flag = false;
|
||||||
if (pos != -1) {
|
if (pos != -1) {
|
||||||
|
refresh_flag =
|
||||||
|
GlobalData.getInstance().modes[pos].group_uuid !=
|
||||||
|
temp.mode.group_uuid;
|
||||||
GlobalData.getInstance().modes[pos] = temp.mode;
|
GlobalData.getInstance().modes[pos] = temp.mode;
|
||||||
}
|
}
|
||||||
$store.commit("setArrayValue", {
|
$store.commit("setArrayValue", {
|
||||||
name: "modes",
|
name: "modes",
|
||||||
value: GlobalData.getInstance().modes,
|
value: GlobalData.getInstance().modes,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (refresh_flag) {
|
||||||
|
$store.commit("buildModeTree", {
|
||||||
|
options: {
|
||||||
|
$t,
|
||||||
|
$store,
|
||||||
|
$q,
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
mode_groups: GlobalData.getInstance().mode_groups,
|
||||||
|
modes: GlobalData.getInstance().modes,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$store.commit("setModeTreeItem", {
|
$store.commit("setModeTreeItem", {
|
||||||
is_group: false,
|
is_group: false,
|
||||||
item_data: temp.mode,
|
item_data: temp.mode,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Protocol.Commands.kRpcAddModeGroup:
|
case Protocol.Commands.kRpcAddModeGroup:
|
||||||
{
|
{
|
||||||
|
@ -194,6 +214,12 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.ModeGroupAddNotifyEntity;
|
) as Protocol.ModeGroupAddNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
GlobalData.getInstance().mode_groups.push(temp.mode_group);
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "mode_groups",
|
||||||
|
value: GlobalData.getInstance().mode_groups,
|
||||||
|
});
|
||||||
|
|
||||||
$store.commit("addModeTreeItem", {
|
$store.commit("addModeTreeItem", {
|
||||||
parent: temp.mode_group.parent_uuid,
|
parent: temp.mode_group.parent_uuid,
|
||||||
is_group: true,
|
is_group: true,
|
||||||
|
@ -208,6 +234,16 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.ModeGroupDeleteNotifyEntity;
|
) as Protocol.ModeGroupDeleteNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
let pos = GlobalData.getInstance().mode_groups.findIndex(
|
||||||
|
(element) => element && element.uuid == temp.uuid
|
||||||
|
);
|
||||||
|
if (pos != -1) {
|
||||||
|
GlobalData.getInstance().mode_groups.splice(pos, 1);
|
||||||
|
}
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "mode_groups",
|
||||||
|
value: GlobalData.getInstance().mode_groups,
|
||||||
|
});
|
||||||
$store.commit("deleteModeTreeItem", {
|
$store.commit("deleteModeTreeItem", {
|
||||||
is_group: true,
|
is_group: true,
|
||||||
uuid: temp.uuid,
|
uuid: temp.uuid,
|
||||||
|
@ -221,12 +257,42 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.ModeGroupEditNotifyEntity;
|
) as Protocol.ModeGroupEditNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
let pos = GlobalData.getInstance().mode_groups.findIndex(
|
||||||
|
(element) => element && element.uuid == temp.mode_group.uuid
|
||||||
|
);
|
||||||
|
|
||||||
|
let refresh_flag = false;
|
||||||
|
if (pos != -1) {
|
||||||
|
refresh_flag =
|
||||||
|
GlobalData.getInstance().mode_groups[pos].parent_uuid !=
|
||||||
|
temp.mode_group.parent_uuid;
|
||||||
|
|
||||||
|
GlobalData.getInstance().mode_groups[pos] = temp.mode_group;
|
||||||
|
}
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "mode_groups",
|
||||||
|
value: GlobalData.getInstance().mode_groups,
|
||||||
|
});
|
||||||
|
if (refresh_flag) {
|
||||||
|
$store.commit("buildModeTree", {
|
||||||
|
options: {
|
||||||
|
$t,
|
||||||
|
$store,
|
||||||
|
$q,
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
mode_groups: GlobalData.getInstance().mode_groups,
|
||||||
|
modes: GlobalData.getInstance().modes,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$store.commit("setModeTreeItem", {
|
$store.commit("setModeTreeItem", {
|
||||||
is_group: true,
|
is_group: true,
|
||||||
item_data: temp.mode_group,
|
item_data: temp.mode_group,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Protocol.Commands.kRpcAddPlan:
|
case Protocol.Commands.kRpcAddPlan:
|
||||||
{
|
{
|
||||||
|
@ -279,19 +345,37 @@ export default class RemoteDataExangeProcesser {
|
||||||
let pos = GlobalData.getInstance().plans.findIndex(
|
let pos = GlobalData.getInstance().plans.findIndex(
|
||||||
(element) => element && element.uuid == temp.plan.uuid
|
(element) => element && element.uuid == temp.plan.uuid
|
||||||
);
|
);
|
||||||
|
let refresh_flag = false;
|
||||||
if (pos != -1) {
|
if (pos != -1) {
|
||||||
|
refresh_flag =
|
||||||
|
GlobalData.getInstance().plans[pos].group_uuid !=
|
||||||
|
temp.plan.group_uuid;
|
||||||
GlobalData.getInstance().plans[pos] = temp.plan;
|
GlobalData.getInstance().plans[pos] = temp.plan;
|
||||||
}
|
}
|
||||||
$store.commit("setArrayValue", {
|
$store.commit("setArrayValue", {
|
||||||
name: "plans",
|
name: "plans",
|
||||||
value: GlobalData.getInstance().plans,
|
value: GlobalData.getInstance().plans,
|
||||||
});
|
});
|
||||||
|
if (refresh_flag) {
|
||||||
|
$store.commit("buildPlanTree", {
|
||||||
|
options: {
|
||||||
|
$t,
|
||||||
|
$store,
|
||||||
|
$q,
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
plan_groups: GlobalData.getInstance().plan_groups,
|
||||||
|
plans: GlobalData.getInstance().plans,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$store.commit("setPlanTreeItem", {
|
$store.commit("setPlanTreeItem", {
|
||||||
is_group: false,
|
is_group: false,
|
||||||
item_data: temp.plan,
|
item_data: temp.plan,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Protocol.Commands.kRpcAddPlanGroup:
|
case Protocol.Commands.kRpcAddPlanGroup:
|
||||||
{
|
{
|
||||||
|
@ -299,6 +383,11 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.PlanGroupAddNotifyEntity;
|
) as Protocol.PlanGroupAddNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
GlobalData.getInstance().plan_groups.push(temp.plan_group);
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "plan_groups",
|
||||||
|
value: GlobalData.getInstance().plan_groups,
|
||||||
|
});
|
||||||
$store.commit("addPlanTreeItem", {
|
$store.commit("addPlanTreeItem", {
|
||||||
parent: temp.plan_group.parent_uuid,
|
parent: temp.plan_group.parent_uuid,
|
||||||
is_group: true,
|
is_group: true,
|
||||||
|
@ -313,6 +402,16 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.PlanGroupDeleteNotifyEntity;
|
) as Protocol.PlanGroupDeleteNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
let pos = GlobalData.getInstance().plan_groups.findIndex(
|
||||||
|
(element) => element && element.uuid == temp.uuid
|
||||||
|
);
|
||||||
|
if (pos != -1) {
|
||||||
|
GlobalData.getInstance().plan_groups.splice(pos, 1);
|
||||||
|
}
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "plan_groups",
|
||||||
|
value: GlobalData.getInstance().plan_groups,
|
||||||
|
});
|
||||||
$store.commit("deletePlanTreeItem", {
|
$store.commit("deletePlanTreeItem", {
|
||||||
is_group: true,
|
is_group: true,
|
||||||
uuid: temp.uuid,
|
uuid: temp.uuid,
|
||||||
|
@ -326,12 +425,40 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.PlanGroupEditNotifyEntity;
|
) as Protocol.PlanGroupEditNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
let pos = GlobalData.getInstance().plan_groups.findIndex(
|
||||||
|
(element) => element && element.uuid == temp.plan_group.uuid
|
||||||
|
);
|
||||||
|
let refresh_flag = false;
|
||||||
|
if (pos != -1) {
|
||||||
|
refresh_flag =
|
||||||
|
GlobalData.getInstance().plan_groups[pos].parent_uuid !=
|
||||||
|
temp.plan_group.parent_uuid;
|
||||||
|
GlobalData.getInstance().plan_groups[pos] = temp.plan_group;
|
||||||
|
}
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "plan_groups",
|
||||||
|
value: GlobalData.getInstance().plan_groups,
|
||||||
|
});
|
||||||
|
if (refresh_flag) {
|
||||||
|
$store.commit("buildPlanTree", {
|
||||||
|
options: {
|
||||||
|
$t,
|
||||||
|
$store,
|
||||||
|
$q,
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
plan_groups: GlobalData.getInstance().plan_groups,
|
||||||
|
plans: GlobalData.getInstance().plans,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$store.commit("setPlanTreeItem", {
|
$store.commit("setPlanTreeItem", {
|
||||||
is_group: true,
|
is_group: true,
|
||||||
item_data: temp.plan_group,
|
item_data: temp.plan_group,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Protocol.Commands.kRpcAddPolling:
|
case Protocol.Commands.kRpcAddPolling:
|
||||||
|
@ -491,7 +618,12 @@ export default class RemoteDataExangeProcesser {
|
||||||
let pos = GlobalData.getInstance().signal_source.findIndex(
|
let pos = GlobalData.getInstance().signal_source.findIndex(
|
||||||
(element) => element && element.uuid == temp.signal_source.uuid
|
(element) => element && element.uuid == temp.signal_source.uuid
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let refresh_flag = false;
|
||||||
if (pos != -1) {
|
if (pos != -1) {
|
||||||
|
refresh_flag =
|
||||||
|
GlobalData.getInstance().signal_source[pos].group_uuid !=
|
||||||
|
temp.signal_source.group_uuid;
|
||||||
GlobalData.getInstance().signal_source[pos] =
|
GlobalData.getInstance().signal_source[pos] =
|
||||||
temp.signal_source;
|
temp.signal_source;
|
||||||
}
|
}
|
||||||
|
@ -499,12 +631,27 @@ export default class RemoteDataExangeProcesser {
|
||||||
name: "signal_sources",
|
name: "signal_sources",
|
||||||
value: GlobalData.getInstance().signal_source,
|
value: GlobalData.getInstance().signal_source,
|
||||||
});
|
});
|
||||||
|
if (refresh_flag) {
|
||||||
|
$store.commit("buildSignalSourceTree", {
|
||||||
|
options: {
|
||||||
|
$t,
|
||||||
|
$store,
|
||||||
|
$q,
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
signal_source_groups:
|
||||||
|
GlobalData.getInstance().signal_source_groups,
|
||||||
|
signal_sources: GlobalData.getInstance().signal_source,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$store.commit("setSignalSourceTreeItem", {
|
$store.commit("setSignalSourceTreeItem", {
|
||||||
is_group: false,
|
is_group: false,
|
||||||
item_data: temp.signal_source,
|
item_data: temp.signal_source,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Protocol.Commands.kRpcAddSignalSourceGroup:
|
case Protocol.Commands.kRpcAddSignalSourceGroup:
|
||||||
{
|
{
|
||||||
|
@ -512,6 +659,13 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.SignalSourceGroupAddNotifyEntity;
|
) as Protocol.SignalSourceGroupAddNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
GlobalData.getInstance().signal_source_groups.push(
|
||||||
|
temp.signal_source_group
|
||||||
|
);
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "signal_source_groups",
|
||||||
|
value: GlobalData.getInstance().signal_source_groups,
|
||||||
|
});
|
||||||
$store.commit("addSignalSourceTreeItem", {
|
$store.commit("addSignalSourceTreeItem", {
|
||||||
parent: temp.signal_source_group.parent_uuid,
|
parent: temp.signal_source_group.parent_uuid,
|
||||||
is_group: true,
|
is_group: true,
|
||||||
|
@ -526,6 +680,16 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.SignalSourceGroupDeleteNotifyEntity;
|
) as Protocol.SignalSourceGroupDeleteNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
let pos = GlobalData.getInstance().signal_source_groups.findIndex(
|
||||||
|
(element) => element && element.uuid == temp.uuid
|
||||||
|
);
|
||||||
|
if (pos != -1) {
|
||||||
|
GlobalData.getInstance().signal_source_groups.splice(pos, 1);
|
||||||
|
}
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "signal_source_groups",
|
||||||
|
value: GlobalData.getInstance().signal_source_groups,
|
||||||
|
});
|
||||||
$store.commit("deleteSignalSourceTreeItem", {
|
$store.commit("deleteSignalSourceTreeItem", {
|
||||||
is_group: true,
|
is_group: true,
|
||||||
uuid: temp.uuid,
|
uuid: temp.uuid,
|
||||||
|
@ -539,12 +703,45 @@ export default class RemoteDataExangeProcesser {
|
||||||
notify.data
|
notify.data
|
||||||
) as Protocol.SignalSourceGroupEditNotifyEntity;
|
) as Protocol.SignalSourceGroupEditNotifyEntity;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
|
let pos = GlobalData.getInstance().signal_source_groups.findIndex(
|
||||||
|
(element) =>
|
||||||
|
element && element.uuid == temp.signal_source_group.uuid
|
||||||
|
);
|
||||||
|
|
||||||
|
let refresh_flag = false;
|
||||||
|
|
||||||
|
if (pos != -1) {
|
||||||
|
refresh_flag =
|
||||||
|
GlobalData.getInstance().signal_source_groups[pos]
|
||||||
|
.parent_uuid != temp.signal_source_group.parent_uuid;
|
||||||
|
GlobalData.getInstance().signal_source_groups[pos] =
|
||||||
|
temp.signal_source_group;
|
||||||
|
}
|
||||||
|
$store.commit("setArrayValue", {
|
||||||
|
name: "signal_source_groups",
|
||||||
|
value: GlobalData.getInstance().signal_source_groups,
|
||||||
|
});
|
||||||
|
if (refresh_flag) {
|
||||||
|
$store.commit("buildSignalSourceTree", {
|
||||||
|
options: {
|
||||||
|
$t,
|
||||||
|
$store,
|
||||||
|
$q,
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
signal_source_groups:
|
||||||
|
GlobalData.getInstance().signal_source_groups,
|
||||||
|
signal_sources: GlobalData.getInstance().signal_source,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$store.commit("setSignalSourceTreeItem", {
|
$store.commit("setSignalSourceTreeItem", {
|
||||||
is_group: true,
|
is_group: true,
|
||||||
item_data: temp.signal_source_group,
|
item_data: temp.signal_source_group,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Protocol.Commands.kFanTemperature:
|
case Protocol.Commands.kFanTemperature:
|
||||||
{
|
{
|
||||||
|
|
|
@ -245,7 +245,7 @@ export default defineComponent({
|
||||||
const requestEditMode = async () => {
|
const requestEditMode = async () => {
|
||||||
let response = await GlobalData.getInstance()
|
let response = await GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.editMode(uuid.value, name.value ?? "", index.value);
|
?.editMode(uuid.value, name.value ?? "", index.value, selected.value);
|
||||||
if (response) {
|
if (response) {
|
||||||
$q.notify({
|
$q.notify({
|
||||||
color: response.success ? "positive" : "negative",
|
color: response.success ? "positive" : "negative",
|
||||||
|
|
|
@ -46,10 +46,10 @@
|
||||||
|
|
||||||
<q-card-section style="max-height: 50vh; width: 45vw" class="scroll">
|
<q-card-section style="max-height: 50vh; width: 45vw" class="scroll">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item v-if="type != 2">
|
<q-item v-if="/*type != 2*/ true">
|
||||||
<q-item-label>{{ $t("parent group") }}:</q-item-label>
|
<q-item-label>{{ $t("parent group") }}:</q-item-label>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item v-if="type != 2" class="q-pa-none q-ma-none">
|
<q-item v-if="/*type != 2*/ true" class="q-pa-none q-ma-none">
|
||||||
<q-item-section style="padding-right: 10px">
|
<q-item-section style="padding-right: 10px">
|
||||||
<q-tree
|
<q-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
|
@ -215,7 +215,7 @@ export default defineComponent({
|
||||||
const requestEditModeGroup = async () => {
|
const requestEditModeGroup = async () => {
|
||||||
let response = await GlobalData.getInstance()
|
let response = await GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.editModeGroup(uuid.value, name.value ?? "");
|
?.editModeGroup(uuid.value, name.value ?? "", selected.value ?? "");
|
||||||
if (response) {
|
if (response) {
|
||||||
$q.notify({
|
$q.notify({
|
||||||
color: response.success ? "positive" : "negative",
|
color: response.success ? "positive" : "negative",
|
||||||
|
@ -244,7 +244,15 @@ export default defineComponent({
|
||||||
if (type.value == 2) {
|
if (type.value == 2) {
|
||||||
name.value = options.data?.name ?? null;
|
name.value = options.data?.name ?? null;
|
||||||
}
|
}
|
||||||
selected.value = options.data?.uuid ?? null;
|
|
||||||
|
const mode_item_data_ = GlobalData.getInstance().mode_groups.find(
|
||||||
|
(e) => e && e.uuid == options.data?.uuid
|
||||||
|
);
|
||||||
|
if (mode_item_data_) {
|
||||||
|
selected.value = mode_item_data_.parent_uuid;
|
||||||
|
} else {
|
||||||
|
selected.value = "";
|
||||||
|
}
|
||||||
uuid.value = options.data?.uuid ?? null;
|
uuid.value = options.data?.uuid ?? null;
|
||||||
}
|
}
|
||||||
show_dialog.value = true;
|
show_dialog.value = true;
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
if (!$store.state.power_state) {
|
if (!$store.state.power_state) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (prop.node.is_group) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
$store.state.current_running_plan.trim() == '' &&
|
$store.state.current_running_plan.trim() == '' &&
|
||||||
!prop.node.is_group
|
!prop.node.is_group
|
||||||
|
|
|
@ -443,7 +443,7 @@ export default defineComponent({
|
||||||
align: "left",
|
align: "left",
|
||||||
name: "uuid",
|
name: "uuid",
|
||||||
required: true,
|
required: true,
|
||||||
label: $t.t("signal source"),
|
label: $t.t("mode"),
|
||||||
field: "uuid",
|
field: "uuid",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,10 +46,10 @@
|
||||||
|
|
||||||
<q-card-section style="max-height: 50vh; width: 45vw" class="scroll">
|
<q-card-section style="max-height: 50vh; width: 45vw" class="scroll">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item v-if="type != 2">
|
<q-item v-if="/*type != 2*/ true">
|
||||||
<q-item-label>{{ $t("parent group") }}:</q-item-label>
|
<q-item-label>{{ $t("parent group") }}:</q-item-label>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item v-if="type != 2" class="q-pa-none q-ma-none">
|
<q-item v-if="/*type != 2*/ true" class="q-pa-none q-ma-none">
|
||||||
<q-item-section style="padding-right: 10px">
|
<q-item-section style="padding-right: 10px">
|
||||||
<q-tree
|
<q-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
|
@ -215,7 +215,7 @@ export default defineComponent({
|
||||||
const requestEditPlanGroup = async () => {
|
const requestEditPlanGroup = async () => {
|
||||||
let response = await GlobalData.getInstance()
|
let response = await GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.editPlanGroup(uuid.value, name.value ?? "");
|
?.editPlanGroup(uuid.value, name.value ?? "", selected.value ?? "");
|
||||||
if (response) {
|
if (response) {
|
||||||
$q.notify({
|
$q.notify({
|
||||||
color: response.success ? "positive" : "negative",
|
color: response.success ? "positive" : "negative",
|
||||||
|
@ -244,7 +244,14 @@ export default defineComponent({
|
||||||
if (type.value == 2) {
|
if (type.value == 2) {
|
||||||
name.value = options.data?.name ?? null;
|
name.value = options.data?.name ?? null;
|
||||||
}
|
}
|
||||||
selected.value = options.data?.uuid ?? null;
|
const plan_item_data_ = GlobalData.getInstance().plan_groups.find(
|
||||||
|
(e) => e && e.uuid == options.data?.uuid
|
||||||
|
);
|
||||||
|
if (plan_item_data_) {
|
||||||
|
selected.value = plan_item_data_.parent_uuid;
|
||||||
|
} else {
|
||||||
|
selected.value = "";
|
||||||
|
}
|
||||||
uuid.value = options.data?.uuid ?? null;
|
uuid.value = options.data?.uuid ?? null;
|
||||||
}
|
}
|
||||||
show_dialog.value = true;
|
show_dialog.value = true;
|
||||||
|
|
|
@ -46,10 +46,10 @@
|
||||||
|
|
||||||
<q-card-section style="max-height: 50vh; width: 45vw" class="scroll">
|
<q-card-section style="max-height: 50vh; width: 45vw" class="scroll">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item v-if="type != 2">
|
<q-item v-if="/*type != 2*/ true">
|
||||||
<q-item-label>{{ $t("parent group") }}:</q-item-label>
|
<q-item-label>{{ $t("parent group") }}:</q-item-label>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item v-if="type != 2" class="q-pa-none q-ma-none">
|
<q-item v-if="/*type != 2*/ true" class="q-pa-none q-ma-none">
|
||||||
<q-item-section style="padding-right: 10px">
|
<q-item-section style="padding-right: 10px">
|
||||||
<q-tree
|
<q-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
|
|
|
@ -46,10 +46,10 @@
|
||||||
|
|
||||||
<q-card-section style="max-height: 50vh; width: 45vw" class="scroll">
|
<q-card-section style="max-height: 50vh; width: 45vw" class="scroll">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item v-if="type != 2">
|
<q-item v-if="/*type != 2*/ true">
|
||||||
<q-item-label>{{ $t("parent group") }}:</q-item-label>
|
<q-item-label>{{ $t("parent group") }}:</q-item-label>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item v-if="type != 2" class="q-pa-none q-ma-none">
|
<q-item v-if="/*type != 2*/ true" class="q-pa-none q-ma-none">
|
||||||
<q-item-section style="padding-right: 10px">
|
<q-item-section style="padding-right: 10px">
|
||||||
<q-tree
|
<q-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
|
@ -215,7 +215,11 @@ export default defineComponent({
|
||||||
const requestEditSignalSourceGroup = async () => {
|
const requestEditSignalSourceGroup = async () => {
|
||||||
let response = await GlobalData.getInstance()
|
let response = await GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.editSignalSourceGroup(uuid.value, name.value ?? "");
|
?.editSignalSourceGroup(
|
||||||
|
uuid.value,
|
||||||
|
name.value ?? "",
|
||||||
|
selected.value ?? ""
|
||||||
|
);
|
||||||
if (response) {
|
if (response) {
|
||||||
$q.notify({
|
$q.notify({
|
||||||
color: response.success ? "positive" : "negative",
|
color: response.success ? "positive" : "negative",
|
||||||
|
@ -244,7 +248,16 @@ export default defineComponent({
|
||||||
if (type.value == 2) {
|
if (type.value == 2) {
|
||||||
name.value = options.data?.name ?? null;
|
name.value = options.data?.name ?? null;
|
||||||
}
|
}
|
||||||
selected.value = options.data?.uuid ?? null;
|
|
||||||
|
const signal_item_data_ =
|
||||||
|
GlobalData.getInstance().signal_source_groups.find(
|
||||||
|
(e) => e && e.uuid == options.data?.uuid
|
||||||
|
);
|
||||||
|
if (signal_item_data_) {
|
||||||
|
selected.value = signal_item_data_.parent_uuid;
|
||||||
|
} else {
|
||||||
|
selected.value = "";
|
||||||
|
}
|
||||||
uuid.value = options.data?.uuid ?? null;
|
uuid.value = options.data?.uuid ?? null;
|
||||||
}
|
}
|
||||||
show_dialog.value = true;
|
show_dialog.value = true;
|
||||||
|
|
|
@ -889,13 +889,20 @@ export namespace Protocol {
|
||||||
export class EditSignalSourceGroupRequestEntity extends Protocol.PacketEntity {
|
export class EditSignalSourceGroupRequestEntity extends Protocol.PacketEntity {
|
||||||
uuid = "";
|
uuid = "";
|
||||||
name = "";
|
name = "";
|
||||||
|
parent_uuid = "";
|
||||||
|
|
||||||
constructor(rcp_id?: number, uuid?: string, name?: string) {
|
constructor(
|
||||||
|
rcp_id?: number,
|
||||||
|
uuid?: string,
|
||||||
|
name?: string,
|
||||||
|
parent_uuid?: string
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
this.rpc_id = rcp_id ?? 0;
|
this.rpc_id = rcp_id ?? 0;
|
||||||
this.command = Protocol.Commands.kRpcEditSignalSourceGroup;
|
this.command = Protocol.Commands.kRpcEditSignalSourceGroup;
|
||||||
this.uuid = uuid ?? "";
|
this.uuid = uuid ?? "";
|
||||||
this.name = name ?? "";
|
this.name = name ?? "";
|
||||||
|
this.parent_uuid = parent_uuid ?? "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -994,6 +1001,7 @@ export namespace Protocol {
|
||||||
export class SignalSourceGroupEntity extends Protocol.PacketEntity {
|
export class SignalSourceGroupEntity extends Protocol.PacketEntity {
|
||||||
parent_uuid: string = "";
|
parent_uuid: string = "";
|
||||||
name: string = "";
|
name: string = "";
|
||||||
|
uuid: string = "";
|
||||||
system_default: boolean = false;
|
system_default: boolean = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1048,13 +1056,20 @@ export namespace Protocol {
|
||||||
export class EditModeGroupRequestEntity extends Protocol.PacketEntity {
|
export class EditModeGroupRequestEntity extends Protocol.PacketEntity {
|
||||||
uuid = "";
|
uuid = "";
|
||||||
name = "";
|
name = "";
|
||||||
|
parent_uuid = "";
|
||||||
|
|
||||||
constructor(rcp_id?: number, uuid?: string, name?: string) {
|
constructor(
|
||||||
|
rcp_id?: number,
|
||||||
|
uuid?: string,
|
||||||
|
name?: string,
|
||||||
|
parent_uuid?: string
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
this.rpc_id = rcp_id ?? 0;
|
this.rpc_id = rcp_id ?? 0;
|
||||||
this.command = Protocol.Commands.kRpcEditModeGroup;
|
this.command = Protocol.Commands.kRpcEditModeGroup;
|
||||||
this.uuid = uuid ?? "";
|
this.uuid = uuid ?? "";
|
||||||
this.name = name ?? "";
|
this.name = name ?? "";
|
||||||
|
this.parent_uuid = parent_uuid ?? "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1139,11 +1154,14 @@ export namespace Protocol {
|
||||||
name: string;
|
name: string;
|
||||||
uuid: string;
|
uuid: string;
|
||||||
number: number;
|
number: number;
|
||||||
|
group_uuid: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
rcp_id?: number,
|
rcp_id?: number,
|
||||||
name?: string,
|
name?: string,
|
||||||
uuid?: string,
|
uuid?: string,
|
||||||
number?: number
|
number?: number,
|
||||||
|
group_uuid?: string
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.rpc_id = rcp_id ?? 0;
|
this.rpc_id = rcp_id ?? 0;
|
||||||
|
@ -1151,6 +1169,7 @@ export namespace Protocol {
|
||||||
this.name = name ?? "";
|
this.name = name ?? "";
|
||||||
this.uuid = uuid ?? "";
|
this.uuid = uuid ?? "";
|
||||||
this.number = number ?? 0;
|
this.number = number ?? 0;
|
||||||
|
this.group_uuid = group_uuid ?? "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1196,6 +1215,7 @@ export namespace Protocol {
|
||||||
export class ModeGroupEntity extends Protocol.PacketEntity {
|
export class ModeGroupEntity extends Protocol.PacketEntity {
|
||||||
parent_uuid: string = "";
|
parent_uuid: string = "";
|
||||||
name: string = "";
|
name: string = "";
|
||||||
|
uuid: string = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ModeAddNotifyEntity extends Protocol.PacketEntity {
|
export class ModeAddNotifyEntity extends Protocol.PacketEntity {
|
||||||
|
@ -1247,13 +1267,20 @@ export namespace Protocol {
|
||||||
export class EditPlanGroupRequestEntity extends Protocol.PacketEntity {
|
export class EditPlanGroupRequestEntity extends Protocol.PacketEntity {
|
||||||
uuid = "";
|
uuid = "";
|
||||||
name = "";
|
name = "";
|
||||||
|
parent_uuid = "";
|
||||||
|
|
||||||
constructor(rcp_id?: number, uuid?: string, name?: string) {
|
constructor(
|
||||||
|
rcp_id?: number,
|
||||||
|
uuid?: string,
|
||||||
|
name?: string,
|
||||||
|
parent_uuid?: string
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
this.rpc_id = rcp_id ?? 0;
|
this.rpc_id = rcp_id ?? 0;
|
||||||
this.command = Protocol.Commands.kRpcEditPlanGroup;
|
this.command = Protocol.Commands.kRpcEditPlanGroup;
|
||||||
this.uuid = uuid ?? "";
|
this.uuid = uuid ?? "";
|
||||||
this.name = name ?? "";
|
this.name = name ?? "";
|
||||||
|
this.parent_uuid = parent_uuid ?? "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1461,6 +1488,7 @@ export namespace Protocol {
|
||||||
export class PlanGroupEntity extends Protocol.PacketEntity {
|
export class PlanGroupEntity extends Protocol.PacketEntity {
|
||||||
parent_uuid: string = "";
|
parent_uuid: string = "";
|
||||||
name: string = "";
|
name: string = "";
|
||||||
|
uuid: string = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RunPlanRequestEntity extends Protocol.PacketEntity {
|
export class RunPlanRequestEntity extends Protocol.PacketEntity {
|
||||||
|
|
|
@ -288,4 +288,6 @@ export default {
|
||||||
click: "Click",
|
click: "Click",
|
||||||
"lossless ": "Lossless ",
|
"lossless ": "Lossless ",
|
||||||
"picture quality": "Picture Quality",
|
"picture quality": "Picture Quality",
|
||||||
|
"open left tool bar": "Open Left Tool Bar",
|
||||||
|
"open right tool bar": "Open Right Tool Bar",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue