Merge branch 'develop' of https://gitea.joylink.club/joylink/rtss-simulation-app-client into develop
This commit is contained in:
commit
124c9a2784
@ -1 +1 @@
|
||||
Subproject commit c3ebea56bd46e93f4bd5204bdc3966b5b9fb9d58
|
||||
Subproject commit cf2e52a1e02d3f8c001c05ba6480fc201b016bef
|
@ -177,18 +177,19 @@ function handleSubscribe(app: IDrawApp) {
|
||||
console.log(fasPlatformAlarm, 'fasPlatformAlarm');
|
||||
}
|
||||
}
|
||||
} else if (syncData.submenu === '监控布局图') {
|
||||
} else if (syncData.submenu === 'CCTV设备布局图') {
|
||||
for (
|
||||
let i = 0;
|
||||
i < storage.cctvOfStationControlStorages.length;
|
||||
i < storage.cctvOfEquipmentLayoutStorages.length;
|
||||
i++
|
||||
) {
|
||||
const ctvOfStationControl = storage.cctvOfStationControlStorages[i];
|
||||
if (ctvOfStationControl.stationName == syncData.station) {
|
||||
const cctvOfEquipmentLayout =
|
||||
storage.cctvOfEquipmentLayoutStorages[i];
|
||||
if (cctvOfEquipmentLayout.stationName == syncData.station) {
|
||||
syncData.datas.forEach((data) => {
|
||||
handlerNoEditCommonData(
|
||||
data,
|
||||
ctvOfStationControl,
|
||||
cctvOfEquipmentLayout,
|
||||
syncData.operationType
|
||||
);
|
||||
});
|
||||
@ -274,15 +275,16 @@ export async function loadDrawDatas(): Promise<IGraphicStorage> {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case '监控布局图':
|
||||
for (let i = 0; i < storage.cctvOfStationControlStorages.length; i++) {
|
||||
const ctvOfStationControl = storage.cctvOfStationControlStorages[i];
|
||||
case 'CCTV设备布局图':
|
||||
for (let i = 0; i < storage.cctvOfEquipmentLayoutStorages.length; i++) {
|
||||
const cctvOfEquipmentLayout =
|
||||
storage.cctvOfEquipmentLayoutStorages[i];
|
||||
if (
|
||||
ctvOfStationControl.stationName ==
|
||||
cctvOfEquipmentLayout.stationName ==
|
||||
drawStore.selectSubmenuAndStation.station
|
||||
) {
|
||||
canvasProperty = ctvOfStationControl.canvas;
|
||||
datas = loadCommonDrawDatas(ctvOfStationControl);
|
||||
canvasProperty = cctvOfEquipmentLayout.canvas;
|
||||
datas = loadCommonDrawDatas(cctvOfEquipmentLayout);
|
||||
/* ctvOfStationControl.cctvButtons.forEach((cctvButton) => {
|
||||
datas.push(new CCTVButtonData(cctvButton));
|
||||
}); */
|
||||
@ -323,15 +325,18 @@ export function saveDrawDatas(app: IDrawApp) {
|
||||
)
|
||||
);
|
||||
}
|
||||
if (!storage?.cctvOfStationControlStorages.length) {
|
||||
stationOption.forEach((station) =>
|
||||
storage?.cctvOfStationControlStorages.push(
|
||||
new iscsGraphicData.CCTVOfStationControlStorage({
|
||||
stationName: station,
|
||||
commonGraphicStorage: new iscsGraphicData.CommonGraphicStorage(),
|
||||
})
|
||||
)
|
||||
);
|
||||
if (!storage?.cctvOfEquipmentLayoutStorages.length) {
|
||||
stationOption.forEach((station) => {
|
||||
for (let layer = 0; layer < 3; layer++) {
|
||||
storage?.cctvOfEquipmentLayoutStorages.push(
|
||||
new iscsGraphicData.CCTVOfEquipmentLayoutStorage({
|
||||
stationName: station,
|
||||
commonGraphicStorage: new iscsGraphicData.CommonGraphicStorage(),
|
||||
layer,
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
const graphics = app.queryStore.getAllGraphics();
|
||||
switch (drawStore.selectSubmenuAndStation.submenu) {
|
||||
@ -377,22 +382,22 @@ export function saveDrawDatas(app: IDrawApp) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case '监控布局图':
|
||||
for (let i = 0; i < storage.cctvOfStationControlStorages.length; i++) {
|
||||
let cctvOfStationControl = storage.cctvOfStationControlStorages[i];
|
||||
case 'CCTV设备布局图':
|
||||
for (let i = 0; i < storage.cctvOfEquipmentLayoutStorages.length; i++) {
|
||||
let cctvOfEquipmentLayout = storage.cctvOfEquipmentLayoutStorages[i];
|
||||
if (
|
||||
cctvOfStationControl.stationName ==
|
||||
cctvOfEquipmentLayout.stationName ==
|
||||
drawStore.selectSubmenuAndStation.station
|
||||
) {
|
||||
cctvOfStationControl =
|
||||
new iscsGraphicData.CCTVOfStationControlStorage({
|
||||
cctvOfEquipmentLayout =
|
||||
new iscsGraphicData.CCTVOfEquipmentLayoutStorage({
|
||||
stationName: drawStore.selectSubmenuAndStation.station,
|
||||
commonGraphicStorage: new iscsGraphicData.CommonGraphicStorage(),
|
||||
});
|
||||
const cctvStorage = saveCommonDrawDatas(
|
||||
app,
|
||||
cctvOfStationControl
|
||||
) as iscsGraphicData.CCTVOfStationControlStorage;
|
||||
cctvOfEquipmentLayout
|
||||
) as iscsGraphicData.CCTVOfEquipmentLayoutStorage;
|
||||
|
||||
/* graphics.forEach((g) => {
|
||||
if (g instanceof CCTVButton) {
|
||||
@ -402,7 +407,7 @@ export function saveDrawDatas(app: IDrawApp) {
|
||||
);
|
||||
}
|
||||
}); */
|
||||
storage.cctvOfStationControlStorages[i] = cctvStorage;
|
||||
storage.cctvOfEquipmentLayoutStorages[i] = cctvStorage;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ function handleUtilsOption() {
|
||||
Button.Type,
|
||||
];
|
||||
switch (drawStore.selectSubmenuAndStation.submenu) {
|
||||
case '监控布局图':
|
||||
case 'CCTV设备布局图':
|
||||
//drawAssistantsTypes.push(CCTVButton.Type);
|
||||
break;
|
||||
case '火灾报警平面图':
|
||||
|
@ -9,24 +9,24 @@ export namespace iscsGraphicData {
|
||||
export class IscsGraphicStorage extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
cctvOfStationControlStorages?: CCTVOfStationControlStorage[];
|
||||
cctvOfEquipmentLayoutStorages?: CCTVOfEquipmentLayoutStorage[];
|
||||
fasOfPlatformAlarmStorages?: FASOfPlatformAlarmStorage[];
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("cctvOfStationControlStorages" in data && data.cctvOfStationControlStorages != undefined) {
|
||||
this.cctvOfStationControlStorages = data.cctvOfStationControlStorages;
|
||||
if ("cctvOfEquipmentLayoutStorages" in data && data.cctvOfEquipmentLayoutStorages != undefined) {
|
||||
this.cctvOfEquipmentLayoutStorages = data.cctvOfEquipmentLayoutStorages;
|
||||
}
|
||||
if ("fasOfPlatformAlarmStorages" in data && data.fasOfPlatformAlarmStorages != undefined) {
|
||||
this.fasOfPlatformAlarmStorages = data.fasOfPlatformAlarmStorages;
|
||||
}
|
||||
}
|
||||
}
|
||||
get cctvOfStationControlStorages() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, CCTVOfStationControlStorage, 1) as CCTVOfStationControlStorage[];
|
||||
get cctvOfEquipmentLayoutStorages() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, CCTVOfEquipmentLayoutStorage, 1) as CCTVOfEquipmentLayoutStorage[];
|
||||
}
|
||||
set cctvOfStationControlStorages(value: CCTVOfStationControlStorage[]) {
|
||||
set cctvOfEquipmentLayoutStorages(value: CCTVOfEquipmentLayoutStorage[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||
}
|
||||
get fasOfPlatformAlarmStorages() {
|
||||
@ -36,12 +36,12 @@ export namespace iscsGraphicData {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
cctvOfStationControlStorages?: ReturnType<typeof CCTVOfStationControlStorage.prototype.toObject>[];
|
||||
cctvOfEquipmentLayoutStorages?: ReturnType<typeof CCTVOfEquipmentLayoutStorage.prototype.toObject>[];
|
||||
fasOfPlatformAlarmStorages?: ReturnType<typeof FASOfPlatformAlarmStorage.prototype.toObject>[];
|
||||
}): IscsGraphicStorage {
|
||||
const message = new IscsGraphicStorage({});
|
||||
if (data.cctvOfStationControlStorages != null) {
|
||||
message.cctvOfStationControlStorages = data.cctvOfStationControlStorages.map(item => CCTVOfStationControlStorage.fromObject(item));
|
||||
if (data.cctvOfEquipmentLayoutStorages != null) {
|
||||
message.cctvOfEquipmentLayoutStorages = data.cctvOfEquipmentLayoutStorages.map(item => CCTVOfEquipmentLayoutStorage.fromObject(item));
|
||||
}
|
||||
if (data.fasOfPlatformAlarmStorages != null) {
|
||||
message.fasOfPlatformAlarmStorages = data.fasOfPlatformAlarmStorages.map(item => FASOfPlatformAlarmStorage.fromObject(item));
|
||||
@ -50,11 +50,11 @@ export namespace iscsGraphicData {
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
cctvOfStationControlStorages?: ReturnType<typeof CCTVOfStationControlStorage.prototype.toObject>[];
|
||||
cctvOfEquipmentLayoutStorages?: ReturnType<typeof CCTVOfEquipmentLayoutStorage.prototype.toObject>[];
|
||||
fasOfPlatformAlarmStorages?: ReturnType<typeof FASOfPlatformAlarmStorage.prototype.toObject>[];
|
||||
} = {};
|
||||
if (this.cctvOfStationControlStorages != null) {
|
||||
data.cctvOfStationControlStorages = this.cctvOfStationControlStorages.map((item: CCTVOfStationControlStorage) => item.toObject());
|
||||
if (this.cctvOfEquipmentLayoutStorages != null) {
|
||||
data.cctvOfEquipmentLayoutStorages = this.cctvOfEquipmentLayoutStorages.map((item: CCTVOfEquipmentLayoutStorage) => item.toObject());
|
||||
}
|
||||
if (this.fasOfPlatformAlarmStorages != null) {
|
||||
data.fasOfPlatformAlarmStorages = this.fasOfPlatformAlarmStorages.map((item: FASOfPlatformAlarmStorage) => item.toObject());
|
||||
@ -65,8 +65,8 @@ export namespace iscsGraphicData {
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.cctvOfStationControlStorages.length)
|
||||
writer.writeRepeatedMessage(1, this.cctvOfStationControlStorages, (item: CCTVOfStationControlStorage) => item.serialize(writer));
|
||||
if (this.cctvOfEquipmentLayoutStorages.length)
|
||||
writer.writeRepeatedMessage(1, this.cctvOfEquipmentLayoutStorages, (item: CCTVOfEquipmentLayoutStorage) => item.serialize(writer));
|
||||
if (this.fasOfPlatformAlarmStorages.length)
|
||||
writer.writeRepeatedMessage(2, this.fasOfPlatformAlarmStorages, (item: FASOfPlatformAlarmStorage) => item.serialize(writer));
|
||||
if (!w)
|
||||
@ -79,7 +79,7 @@ export namespace iscsGraphicData {
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.cctvOfStationControlStorages, () => pb_1.Message.addToRepeatedWrapperField(message, 1, CCTVOfStationControlStorage.deserialize(reader), CCTVOfStationControlStorage));
|
||||
reader.readMessage(message.cctvOfEquipmentLayoutStorages, () => pb_1.Message.addToRepeatedWrapperField(message, 1, CCTVOfEquipmentLayoutStorage.deserialize(reader), CCTVOfEquipmentLayoutStorage));
|
||||
break;
|
||||
case 2:
|
||||
reader.readMessage(message.fasOfPlatformAlarmStorages, () => pb_1.Message.addToRepeatedWrapperField(message, 2, FASOfPlatformAlarmStorage.deserialize(reader), FASOfPlatformAlarmStorage));
|
||||
@ -2164,12 +2164,13 @@ export namespace iscsGraphicData {
|
||||
return TemperatureDetector.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class CCTVOfStationControlStorage extends pb_1.Message {
|
||||
export class CCTVOfEquipmentLayoutStorage extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
stationName?: string;
|
||||
canvas?: dependency_1.common.Canvas;
|
||||
commonGraphicStorage?: CommonGraphicStorage;
|
||||
layer?: CCTVOfEquipmentLayoutStorage.LayerType;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -2183,6 +2184,9 @@ export namespace iscsGraphicData {
|
||||
if ("commonGraphicStorage" in data && data.commonGraphicStorage != undefined) {
|
||||
this.commonGraphicStorage = data.commonGraphicStorage;
|
||||
}
|
||||
if ("layer" in data && data.layer != undefined) {
|
||||
this.layer = data.layer;
|
||||
}
|
||||
}
|
||||
}
|
||||
get stationName() {
|
||||
@ -2209,12 +2213,19 @@ export namespace iscsGraphicData {
|
||||
get has_commonGraphicStorage() {
|
||||
return pb_1.Message.getField(this, 3) != null;
|
||||
}
|
||||
get layer() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 4, CCTVOfEquipmentLayoutStorage.LayerType.StationHall) as CCTVOfEquipmentLayoutStorage.LayerType;
|
||||
}
|
||||
set layer(value: CCTVOfEquipmentLayoutStorage.LayerType) {
|
||||
pb_1.Message.setField(this, 4, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
stationName?: string;
|
||||
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
||||
commonGraphicStorage?: ReturnType<typeof CommonGraphicStorage.prototype.toObject>;
|
||||
}): CCTVOfStationControlStorage {
|
||||
const message = new CCTVOfStationControlStorage({});
|
||||
layer?: CCTVOfEquipmentLayoutStorage.LayerType;
|
||||
}): CCTVOfEquipmentLayoutStorage {
|
||||
const message = new CCTVOfEquipmentLayoutStorage({});
|
||||
if (data.stationName != null) {
|
||||
message.stationName = data.stationName;
|
||||
}
|
||||
@ -2224,6 +2235,9 @@ export namespace iscsGraphicData {
|
||||
if (data.commonGraphicStorage != null) {
|
||||
message.commonGraphicStorage = CommonGraphicStorage.fromObject(data.commonGraphicStorage);
|
||||
}
|
||||
if (data.layer != null) {
|
||||
message.layer = data.layer;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -2231,6 +2245,7 @@ export namespace iscsGraphicData {
|
||||
stationName?: string;
|
||||
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
||||
commonGraphicStorage?: ReturnType<typeof CommonGraphicStorage.prototype.toObject>;
|
||||
layer?: CCTVOfEquipmentLayoutStorage.LayerType;
|
||||
} = {};
|
||||
if (this.stationName != null) {
|
||||
data.stationName = this.stationName;
|
||||
@ -2241,6 +2256,9 @@ export namespace iscsGraphicData {
|
||||
if (this.commonGraphicStorage != null) {
|
||||
data.commonGraphicStorage = this.commonGraphicStorage.toObject();
|
||||
}
|
||||
if (this.layer != null) {
|
||||
data.layer = this.layer;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -2253,11 +2271,13 @@ export namespace iscsGraphicData {
|
||||
writer.writeMessage(2, this.canvas, () => this.canvas.serialize(writer));
|
||||
if (this.has_commonGraphicStorage)
|
||||
writer.writeMessage(3, this.commonGraphicStorage, () => this.commonGraphicStorage.serialize(writer));
|
||||
if (this.layer != CCTVOfEquipmentLayoutStorage.LayerType.StationHall)
|
||||
writer.writeEnum(4, this.layer);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CCTVOfStationControlStorage {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CCTVOfStationControlStorage();
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CCTVOfEquipmentLayoutStorage {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CCTVOfEquipmentLayoutStorage();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
@ -2271,6 +2291,9 @@ export namespace iscsGraphicData {
|
||||
case 3:
|
||||
reader.readMessage(message.commonGraphicStorage, () => message.commonGraphicStorage = CommonGraphicStorage.deserialize(reader));
|
||||
break;
|
||||
case 4:
|
||||
message.layer = reader.readEnum();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
@ -2279,8 +2302,15 @@ export namespace iscsGraphicData {
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): CCTVOfStationControlStorage {
|
||||
return CCTVOfStationControlStorage.deserialize(bytes);
|
||||
static deserializeBinary(bytes: Uint8Array): CCTVOfEquipmentLayoutStorage {
|
||||
return CCTVOfEquipmentLayoutStorage.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export namespace CCTVOfEquipmentLayoutStorage {
|
||||
export enum LayerType {
|
||||
StationHall = 0,
|
||||
platform = 1,
|
||||
PTZ = 2
|
||||
}
|
||||
}
|
||||
export class FASOfPlatformAlarmStorage extends pb_1.Message {
|
||||
|
Loading…
Reference in New Issue
Block a user