Merge branch 'master' of https://git.code.tencent.com/xian-ncc-da/xian-ncc-da-client
This commit is contained in:
commit
c71e9086a1
@ -2,7 +2,7 @@
|
||||
import { useDialogPluginComponent } from 'quasar';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const num = ref(3);
|
||||
const num = ref<number>();
|
||||
const dir = ref('ltr');
|
||||
const dirOptions = [
|
||||
{ label: '从左至右', value: 'ltr' },
|
||||
|
@ -67,16 +67,20 @@ enum showSelect {
|
||||
否 = 'false',
|
||||
向上 = 'up',
|
||||
向下 = 'down',
|
||||
上行 = 'upLink',
|
||||
下行 = 'downLink',
|
||||
}
|
||||
enum showUp {
|
||||
上行 = 'true',
|
||||
下行 = 'false',
|
||||
}
|
||||
enum showSelectData {
|
||||
true = '是',
|
||||
false = '否',
|
||||
up = '向上',
|
||||
down = '向下',
|
||||
upLink = '上行',
|
||||
downLink = '下行',
|
||||
}
|
||||
enum showUpData {
|
||||
true = '上行',
|
||||
false = '下行',
|
||||
}
|
||||
|
||||
drawStore.$subscribe;
|
||||
@ -87,7 +91,7 @@ watch(
|
||||
platformModel.copyFrom(val.saveData() as PlatformData);
|
||||
hasDoor.value = (showSelectData as never)[platformModel.hasdoor + ''];
|
||||
direction.value = (showSelectData as never)[platformModel.direction];
|
||||
upAndDown.value = (showSelectData as never)[platformModel.upAndDown];
|
||||
upAndDown.value = (showUpData as never)[platformModel.up + ''];
|
||||
if (platformModel.refStation) {
|
||||
const refStation = val.queryStore.queryById<Station>(
|
||||
platformModel.refStation
|
||||
@ -104,7 +108,7 @@ onMounted(() => {
|
||||
platformModel.copyFrom(platform.saveData());
|
||||
hasDoor.value = (showSelectData as never)[platformModel.hasdoor + ''];
|
||||
direction.value = (showSelectData as never)[platformModel.direction];
|
||||
upAndDown.value = (showSelectData as never)[platformModel.upAndDown];
|
||||
upAndDown.value = (showUpData as never)[platformModel.up + ''];
|
||||
if (platformModel.refStation) {
|
||||
const refStation = platform.queryStore.queryById<Station>(
|
||||
platformModel.refStation
|
||||
@ -117,7 +121,7 @@ onMounted(() => {
|
||||
function onUpdate() {
|
||||
platformModel.hasdoor = JSON.parse((showSelect as never)[hasDoor.value]);
|
||||
platformModel.direction = (showSelect as never)[direction.value];
|
||||
platformModel.upAndDown = (showSelect as never)[upAndDown.value];
|
||||
platformModel.up = JSON.parse((showUp as never)[upAndDown.value]);
|
||||
const platform = drawStore.selectedGraphic as Platform;
|
||||
if (platform) {
|
||||
drawStore.getDrawApp().updateGraphicAndRecord(platform, platformModel);
|
||||
|
@ -57,7 +57,7 @@ import { onMounted, ref, watch } from 'vue';
|
||||
import { queryAlarmInfoById } from 'src/api/DecisionInfo';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
const bgColor = 'yellow';
|
||||
let bgColor = ref('yellow');
|
||||
const dialogWidth = window.screen.width * 0.4;
|
||||
const lineNetStore = useLineNetStore();
|
||||
|
||||
@ -65,6 +65,7 @@ watch(
|
||||
() => lineNetStore.alarmInfo,
|
||||
(val) => {
|
||||
if (val.length) {
|
||||
bgColor.value = 'orange';
|
||||
search();
|
||||
updata();
|
||||
}
|
||||
|
@ -53,11 +53,11 @@ export class PlatformData extends GraphicDataBase implements IPlatformData {
|
||||
set direction(v: string) {
|
||||
this.data.direction = v;
|
||||
}
|
||||
get upAndDown(): string {
|
||||
return this.data.upAndDown;
|
||||
get up(): boolean {
|
||||
return this.data.up;
|
||||
}
|
||||
set upAndDown(v: string) {
|
||||
this.data.upAndDown = v;
|
||||
set up(v: boolean) {
|
||||
this.data.up = v;
|
||||
}
|
||||
get refStation(): string {
|
||||
return this.data.refStation;
|
||||
|
@ -17,8 +17,8 @@ export interface IPlatformData extends GraphicData {
|
||||
set hasdoor(v: boolean);
|
||||
get direction(): string; // 屏蔽门上下
|
||||
set direction(v: string);
|
||||
get upAndDown(): string; // 站台上下行
|
||||
set upAndDown(v: string);
|
||||
get up(): boolean; // 站台上下行
|
||||
set up(v: boolean);
|
||||
get refStation(): string; // 关联的车站
|
||||
set refStation(v: string);
|
||||
clone(): IPlatformData;
|
||||
|
@ -173,8 +173,9 @@ export class Station extends JlGraphic {
|
||||
const kilometerGraph = this.kilometerGraph;
|
||||
const controlGraphic = this.controlGraphic;
|
||||
controlGraphic.clear();
|
||||
codeGraph.text =
|
||||
`${this.datas?.name}(${this.datas?.code})` || '车站Station';
|
||||
codeGraph.text = this.datas?.code
|
||||
? `${this.datas?.name}(${this.datas?.code})`
|
||||
: `${this.datas?.name}`;
|
||||
codeGraph.style.fill = stationConsts.codeColor;
|
||||
codeGraph.setVectorFontSize(stationConsts.codeFontSize);
|
||||
codeGraph.anchor.set(0.5);
|
||||
|
@ -19,6 +19,7 @@ import {
|
||||
import { Section, SectionType } from '../section/Section';
|
||||
import { LogicSection } from '../logicSection/LogicSection';
|
||||
import { Platform } from '../platform/Platform';
|
||||
import { Turnout } from '../turnout/Turnout';
|
||||
|
||||
function graphicsOverlap(
|
||||
x1: number,
|
||||
@ -135,13 +136,19 @@ export class TrainWindowDraw extends GraphicDrawAssistant<
|
||||
trainWindow.loadData(this.graphicTemplate.datas);
|
||||
if (section.type == 'LogicSection') {
|
||||
trainWindow.datas.refDeviceId = [section.id];
|
||||
trainWindow.position.set(
|
||||
x,
|
||||
ps.y - direction * TrainWindowConsts.offsetSection
|
||||
);
|
||||
} else {
|
||||
trainWindow.datas.refDeviceId = (section as Section).datas.children;
|
||||
const refTurnout = (section as Section).datas.children;
|
||||
trainWindow.datas.refDeviceId = refTurnout;
|
||||
const turnout = this.app.queryStore.queryById<Turnout>(refTurnout[0]);
|
||||
trainWindow.position.set(
|
||||
x,
|
||||
turnout.y - direction * TrainWindowConsts.offsetSection
|
||||
);
|
||||
}
|
||||
trainWindow.position.set(
|
||||
x,
|
||||
ps.y - direction * TrainWindowConsts.offsetSection
|
||||
);
|
||||
trainWindow.id = GraphicIdGenerator.next();
|
||||
this.storeGraphic(trainWindow);
|
||||
const platforms = this.app.queryStore.queryByType<Platform>(Platform.Type);
|
||||
@ -188,7 +195,7 @@ export class TrainWindowDraw extends GraphicDrawAssistant<
|
||||
);
|
||||
this.app.deleteGraphics(...trainWindowAll);
|
||||
turnoutSections.forEach((section) => {
|
||||
const ps = section.localToCanvasPoint(section.getStartPoint());
|
||||
const ps = section.datas.points[0] as Point;
|
||||
let direction = 1;
|
||||
if (ps.y > height.y) {
|
||||
direction = -1;
|
||||
|
@ -215,7 +215,7 @@ async function onRequest(props: any) {
|
||||
let response = await alarmInfoPageQuery({
|
||||
current: page,
|
||||
size: rowsPerPage,
|
||||
alertType: filter.alertType,
|
||||
alertType: (saveAlertTypeData as never)[filter.alertType],
|
||||
});
|
||||
const pageData = response;
|
||||
pagination.value.rowsNumber = pageData.total;
|
||||
|
@ -66,6 +66,9 @@ function onResize() {
|
||||
|
||||
//报警信息弹框
|
||||
const audio = ref();
|
||||
const $q = useQuasar();
|
||||
const dialogInstance = ref();
|
||||
|
||||
watch(
|
||||
() => lineNetStore.alarmInfo,
|
||||
(val) => {
|
||||
@ -78,15 +81,18 @@ watch(
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
const $q = useQuasar();
|
||||
|
||||
function playAlarmMusic() {
|
||||
audio.value.play();
|
||||
}
|
||||
|
||||
function alarm() {
|
||||
lineNetStore.alarmDialog = true;
|
||||
$q.dialog({ component: errrorMessageBox }).onCancel(() => {
|
||||
lineNetStore.alarmDialog = false;
|
||||
});
|
||||
dialogInstance.value = $q
|
||||
.dialog({ component: errrorMessageBox })
|
||||
.onCancel(() => {
|
||||
lineNetStore.alarmDialog = false;
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@ -100,5 +106,8 @@ onMounted(() => {
|
||||
|
||||
onUnmounted(() => {
|
||||
lineNetStore.destroy();
|
||||
if (dialogInstance.value) {
|
||||
dialogInstance.value.hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -15,6 +15,7 @@ export namespace state {
|
||||
kilometerSystem?: dependency_1.graphicData.KilometerSystem[];
|
||||
convertKilometer?: number[];
|
||||
physicalSectionId?: string;
|
||||
destinationCode?: string;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4, 5], this.#one_of_decls);
|
||||
@ -37,6 +38,9 @@ export namespace state {
|
||||
if ("physicalSectionId" in data && data.physicalSectionId != undefined) {
|
||||
this.physicalSectionId = data.physicalSectionId;
|
||||
}
|
||||
if ("destinationCode" in data && data.destinationCode != undefined) {
|
||||
this.destinationCode = data.destinationCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
get id() {
|
||||
@ -75,6 +79,12 @@ export namespace state {
|
||||
set physicalSectionId(value: string) {
|
||||
pb_1.Message.setField(this, 6, value);
|
||||
}
|
||||
get destinationCode() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
|
||||
}
|
||||
set destinationCode(value: string) {
|
||||
pb_1.Message.setField(this, 7, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
code?: string;
|
||||
@ -82,6 +92,7 @@ export namespace state {
|
||||
kilometerSystem?: ReturnType<typeof dependency_1.graphicData.KilometerSystem.prototype.toObject>[];
|
||||
convertKilometer?: number[];
|
||||
physicalSectionId?: string;
|
||||
destinationCode?: string;
|
||||
}): Section {
|
||||
const message = new Section({});
|
||||
if (data.id != null) {
|
||||
@ -102,6 +113,9 @@ export namespace state {
|
||||
if (data.physicalSectionId != null) {
|
||||
message.physicalSectionId = data.physicalSectionId;
|
||||
}
|
||||
if (data.destinationCode != null) {
|
||||
message.destinationCode = data.destinationCode;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -112,6 +126,7 @@ export namespace state {
|
||||
kilometerSystem?: ReturnType<typeof dependency_1.graphicData.KilometerSystem.prototype.toObject>[];
|
||||
convertKilometer?: number[];
|
||||
physicalSectionId?: string;
|
||||
destinationCode?: string;
|
||||
} = {};
|
||||
if (this.id != null) {
|
||||
data.id = this.id;
|
||||
@ -131,6 +146,9 @@ export namespace state {
|
||||
if (this.physicalSectionId != null) {
|
||||
data.physicalSectionId = this.physicalSectionId;
|
||||
}
|
||||
if (this.destinationCode != null) {
|
||||
data.destinationCode = this.destinationCode;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -149,6 +167,8 @@ export namespace state {
|
||||
writer.writePackedInt64(5, this.convertKilometer);
|
||||
if (this.physicalSectionId.length)
|
||||
writer.writeString(6, this.physicalSectionId);
|
||||
if (this.destinationCode.length)
|
||||
writer.writeString(7, this.destinationCode);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -176,6 +196,9 @@ export namespace state {
|
||||
case 6:
|
||||
message.physicalSectionId = reader.readString();
|
||||
break;
|
||||
case 7:
|
||||
message.destinationCode = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
@ -1706,8 +1706,8 @@ export namespace graphicData {
|
||||
code?: string;
|
||||
hasdoor?: boolean;
|
||||
direction?: string;
|
||||
upAndDown?: string;
|
||||
refStation?: string;
|
||||
up?: boolean;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -1724,12 +1724,12 @@ export namespace graphicData {
|
||||
if ("direction" in data && data.direction != undefined) {
|
||||
this.direction = data.direction;
|
||||
}
|
||||
if ("upAndDown" in data && data.upAndDown != undefined) {
|
||||
this.upAndDown = data.upAndDown;
|
||||
}
|
||||
if ("refStation" in data && data.refStation != undefined) {
|
||||
this.refStation = data.refStation;
|
||||
}
|
||||
if ("up" in data && data.up != undefined) {
|
||||
this.up = data.up;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -1759,25 +1759,25 @@ export namespace graphicData {
|
||||
set direction(value: string) {
|
||||
pb_1.Message.setField(this, 4, value);
|
||||
}
|
||||
get upAndDown() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
|
||||
}
|
||||
set upAndDown(value: string) {
|
||||
pb_1.Message.setField(this, 5, value);
|
||||
}
|
||||
get refStation() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
|
||||
}
|
||||
set refStation(value: string) {
|
||||
pb_1.Message.setField(this, 6, value);
|
||||
}
|
||||
get up() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
|
||||
}
|
||||
set up(value: boolean) {
|
||||
pb_1.Message.setField(this, 7, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
hasdoor?: boolean;
|
||||
direction?: string;
|
||||
upAndDown?: string;
|
||||
refStation?: string;
|
||||
up?: boolean;
|
||||
}): Platform {
|
||||
const message = new Platform({});
|
||||
if (data.common != null) {
|
||||
@ -1792,12 +1792,12 @@ export namespace graphicData {
|
||||
if (data.direction != null) {
|
||||
message.direction = data.direction;
|
||||
}
|
||||
if (data.upAndDown != null) {
|
||||
message.upAndDown = data.upAndDown;
|
||||
}
|
||||
if (data.refStation != null) {
|
||||
message.refStation = data.refStation;
|
||||
}
|
||||
if (data.up != null) {
|
||||
message.up = data.up;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -1806,8 +1806,8 @@ export namespace graphicData {
|
||||
code?: string;
|
||||
hasdoor?: boolean;
|
||||
direction?: string;
|
||||
upAndDown?: string;
|
||||
refStation?: string;
|
||||
up?: boolean;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -1821,12 +1821,12 @@ export namespace graphicData {
|
||||
if (this.direction != null) {
|
||||
data.direction = this.direction;
|
||||
}
|
||||
if (this.upAndDown != null) {
|
||||
data.upAndDown = this.upAndDown;
|
||||
}
|
||||
if (this.refStation != null) {
|
||||
data.refStation = this.refStation;
|
||||
}
|
||||
if (this.up != null) {
|
||||
data.up = this.up;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -1841,10 +1841,10 @@ export namespace graphicData {
|
||||
writer.writeBool(3, this.hasdoor);
|
||||
if (this.direction.length)
|
||||
writer.writeString(4, this.direction);
|
||||
if (this.upAndDown.length)
|
||||
writer.writeString(5, this.upAndDown);
|
||||
if (this.refStation.length)
|
||||
writer.writeString(6, this.refStation);
|
||||
if (this.up != false)
|
||||
writer.writeBool(7, this.up);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -1866,12 +1866,12 @@ export namespace graphicData {
|
||||
case 4:
|
||||
message.direction = reader.readString();
|
||||
break;
|
||||
case 5:
|
||||
message.upAndDown = reader.readString();
|
||||
break;
|
||||
case 6:
|
||||
message.refStation = reader.readString();
|
||||
break;
|
||||
case 7:
|
||||
message.up = reader.readBool();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit bdcbbf2c048dbf70cdd92b25f0012c676ccd9b04
|
||||
Subproject commit 4f27cc3670bcb4071706bb0e66d6fdfd817e27a4
|
Loading…
Reference in New Issue
Block a user