Compare commits

...

10 Commits

Author SHA1 Message Date
joylink_fanyuhong
4b02850488 Merge branch 'local-test' of http://120.46.212.6:3000/joylink/rts-sim-testing-client into local-test
All checks were successful
CI / Docker-Build (push) Successful in 2m23s
2024-04-03 16:47:36 +08:00
joylink_fanyuhong
c26f35e008 Merge remote-tracking branch 'origin/develop' into local-test
# Conflicts:
#	src/protos/stationLayoutGraphics.ts
2024-04-03 16:46:12 +08:00
joylink_fanyuhong
7c8bd92030 删除日志&洗车机调整 2024-04-03 16:43:53 +08:00
joylink_fanyuhong
bdcd3ac6b2 Merge branch 'develop' of http://120.46.212.6:3000/joylink/rts-sim-testing-client into develop 2024-04-03 16:37:14 +08:00
joylink_zhaoerwei
1c99ed9b50 执行protoc 2024-04-03 16:36:39 +08:00
joylink_fanyuhong
be50562f0e 车库门防淹门状态调整 2024-04-03 16:36:01 +08:00
joylink_fanyuhong
2517ab5e8d Merge branch 'develop' of http://120.46.212.6:3000/joylink/rts-sim-testing-client into develop 2024-04-03 15:22:53 +08:00
joylink_fanyuhong
f4ed04eed3 洗车机显示调整 2024-04-03 15:22:50 +08:00
joylink_zhaoerwei
bd73f65860 列车驾驶台交互优化 2024-04-03 14:56:06 +08:00
joylink_zhaoerwei
e894f02e38 列车驾驶台交互调整 2024-04-03 11:17:12 +08:00
14 changed files with 1284 additions and 59 deletions

@ -1 +1 @@
Subproject commit 5dd8f8963e28e79012656f95999016ad503ae43a
Subproject commit 208bcaedccf71e7bfd2535e2889ca4cf7c4bdbb6

View File

@ -17,10 +17,19 @@
<q-input
outlined
class="q-mt-sm"
mask="#"
v-model.number="carWashingModel.duanNum"
@blur="onUpdate"
label="段数"
/>
<q-input
outlined
class="q-mt-sm"
:decimals="0"
v-model.number="carWashingModel.width"
@blur="onUpdate"
label="宽度"
/>
<q-select
outlined
style="margin-top: 10px"

View File

@ -99,7 +99,6 @@ onMounted(() => {
});
function getNameFormat() {
console.log(code.value, '1111111');
return code.value;
}

View File

@ -83,6 +83,7 @@ const list: KeyType[] = [
{ label: '防淹门索引', key: 'id' },
{ label: '防淹门名称', key: 'code', formatFn: getNameFormat },
{ label: '防淹门关闭', key: 'mgj', formatFn: getName },
{ label: '控制端', key: 'local', formatFn: getLocal },
{ label: '防淹门强制', key: 'param', formatFn: getForceName },
{ label: '设置故障', key: 'param', formatFn: getFaultName },
];
@ -117,6 +118,9 @@ function getName(v: boolean) {
if (v) return '是';
return '否';
}
function getLocal(v: boolean) {
return v ? '本地' : '远程';
}
function getForceName() {
return (

View File

@ -83,6 +83,7 @@ const list: KeyType[] = [
{ label: '车库门索引', key: 'id' },
{ label: '车库门名称', key: 'code', formatFn: getNameFormat },
{ label: '车库门关闭', key: 'mgj', formatFn: getName },
{ label: '控制端', key: 'local', formatFn: getLocal },
// { label: '', key: 'stateLoss', formatFn: getName },
{ label: '车库门强制', key: 'param', formatFn: getForceName },
{ label: '设置故障', key: 'param', formatFn: getFaultName },
@ -118,6 +119,9 @@ function getName(v: boolean) {
if (v) return '是';
return '否';
}
function getLocal(v: boolean) {
return v ? '本地' : '远程';
}
function getForceName() {
return (

View File

@ -9,7 +9,7 @@ function getHost(): string {
// return '192.168.3.7:9091';
// return '192.168.3.47:9091';
// return '192.168.3.37:9091';
//return '192.168.33.207:9091'; // 张骞
return '192.168.33.207:9091'; // 张骞
// return '192.168.33.93:9091';
// return '192.168.3.37:9091'; //卫志宏
// return 'test.joylink.club/bjrtsts-service'; // 测试

View File

@ -61,6 +61,12 @@ export class CarWashingData extends GraphicDataBase implements ICarWashingData {
set duanNum(v: number) {
this.data.duanNum = v;
}
get width(): number {
return this.data.width;
}
set width(v: number) {
this.data.width = v;
}
clone(): CarWashingData {
return new CarWashingData(this.data.cloneMessage());
}

View File

@ -108,6 +108,12 @@ export class FloodGateState
set param(param: request.CkmParam) {
this.states.param = param;
}
get local(): boolean {
return this.states.local;
}
set local(v: boolean) {
this.states.local = v;
}
get states(): state.CkmState {
return this.getState<state.CkmState>();
}

View File

@ -108,6 +108,12 @@ export class GarageDoorState
set param(param: request.CkmParam) {
this.states.param = param;
}
get local(): boolean {
return this.states.local;
}
set local(v: boolean) {
this.states.local = v;
}
get states(): state.CkmState {
return this.getState<state.CkmState>();
}

View File

@ -19,6 +19,8 @@ export interface ICarWashingData extends GraphicData {
set centralizedStations(v: number[]);
get duanNum(): number;
set duanNum(v: number);
get width(): number;
set width(v: number);
clone(): ICarWashingData;
copyFrom(data: ICarWashingData): void;
eq(other: ICarWashingData): boolean;
@ -51,19 +53,23 @@ const carWashingConsts = {
codeColor: 0xffffff,
bodyRectLineColor: 0xffffff,
bodyRectLineWidth: 2,
bodyRectWidth: 10,
bodyRectHeight: 20,
bodyColor: 0x000000,
bodyRectWidth: 60,
bodyRectHeight: 40,
bodyColor: 0xffffff,
};
export class CarWashing extends JlGraphic {
static Type = 'carWashing';
codeGraph: VectorText = new VectorText('');
rectBody: Graphics = new Graphics();
stopText: VectorText = new VectorText('');
stateText: VectorText = new VectorText('');
constructor() {
super(CarWashing.Type);
this.addChild(this.codeGraph);
this.addChild(this.rectBody);
this.addChild(this.stopText);
this.addChild(this.stateText);
this.codeGraph.name = 'carw_code';
}
get code(): string {
@ -93,18 +99,49 @@ export class CarWashing extends JlGraphic {
codeGraph.position.set(0, -30);
}
this.rectBody.clear();
this.rectBody.beginFill(carWashingConsts.bodyColor, 0);
this.rectBody.lineStyle(
carWashingConsts.bodyRectLineWidth,
carWashingConsts.bodyRectLineColor
);
this.rectBody.beginFill(carWashingConsts.bodyColor, 1);
const width = this.datas.width || carWashingConsts.bodyRectWidth;
this.rectBody.drawRect(
-carWashingConsts.bodyRectWidth / 2,
-width / 2,
-carWashingConsts.bodyRectHeight / 2,
carWashingConsts.bodyRectWidth,
width,
carWashingConsts.bodyRectHeight
);
this.rectBody.endFill();
if (this.states.jtj) {
this.stopText.text = '紧';
this.stopText.style.fill = carWashingConsts.codeColor;
this.stopText.setVectorFontSize(carWashingConsts.codeFontSize);
this.stopText.anchor.set(0.5);
this.stopText.position.set(width / 2 + 20, -15);
}
let stateText = '';
if (this.states.xcjxj) {
stateText = '就绪';
} else if (this.states.xcyxj) {
stateText = '洗车';
} else if (this.states.tgyxj) {
stateText = '通过';
} else if (this.states.cfjList.length === 2) {
if (this.states.cfjList[0]) {
stateText = '头部';
} else if (this.states.cfjList[1]) {
stateText = '尾部';
}
} else if (this.states.cfjList.length === 3) {
if (this.states.cfjList[1]) {
stateText = '尾部';
} else if (this.states.cfjList[2]) {
stateText = '中部';
} else if (this.states.cfjList[0]) {
stateText = '头部';
}
}
this.stateText.text = stateText;
this.stateText.style.fill = carWashingConsts.codeColor;
this.stateText.setVectorFontSize(carWashingConsts.codeFontSize);
this.stateText.anchor.set(0.5);
this.stateText.position.set(width / 2 + 15, 15);
}
buildRelation() {
const sections = this.queryStore

View File

@ -9,6 +9,7 @@ import {
JlGraphic,
} from 'jl-graphic';
import { CarWashing, CarWashingTemplate, ICarWashingData } from './CarWashing';
import { Section } from '../section/Section';
export interface ICarWashingDataDrawOptions {
newData: () => ICarWashingData;
@ -61,24 +62,15 @@ function buildAbsorbablePositions(
carWashing: CarWashing
): AbsorbablePosition[] {
const aps: AbsorbablePosition[] = [];
const carWashings = carWashing.queryStore.queryByType<CarWashing>(
CarWashing.Type
);
const canvas = carWashing.getCanvas();
carWashings.forEach((item) => {
if (item.id === carWashing.id) {
return;
}
const sections = carWashing.queryStore.queryByType<Section>(Section.Type);
sections.forEach((item) => {
const p1 = item.localToCanvasPoint(item.getStartPoint());
const p2 = item.localToCanvasPoint(item.getEndPoint());
const ala = new AbsorbableLine(
new Point(item.x, 0),
new Point(item.x, canvas.height)
);
const alb = new AbsorbableLine(
new Point(0, item.y),
new Point(canvas.width, item.y)
new Point(p1.x, p1.y),
new Point(p2.x, p2.y)
);
aps.push(ala);
aps.push(alb);
});
return aps;
}

View File

@ -31,6 +31,8 @@ export interface IFloodGateState extends GraphicState {
set mgj(v: boolean);
get param(): request.CkmParam;
set param(v: request.CkmParam);
get local(): boolean;
set local(v: boolean);
}
const garageConsts = {
@ -38,6 +40,7 @@ const garageConsts = {
codeColor: 0xffffff,
bodyLineColor: 0xffffff,
lossStateColor: 0x0000ff,
localStateColor: 0x00ff00,
bodyLineWidth: 2,
bodyColor: 0x000000,
bodyRectWidth: 10,
@ -87,10 +90,13 @@ export class FloodGate extends JlGraphic {
codeGraph.position.set(0, -30);
}
this.lineBody.clear();
const color =
this.states.param?.fault === request.Ckm.Fault.FA_State_Loss
? garageConsts.lossStateColor
: garageConsts.bodyLineColor;
let color = garageConsts.bodyLineColor;
if (this.states.local) {
color = garageConsts.localStateColor;
}
if (this.states.param?.fault === request.Ckm.Fault.FA_State_Loss) {
color = garageConsts.lossStateColor;
}
this.lineBody.lineStyle(garageConsts.bodyLineWidth, color);
this.lineBody.moveTo(
-garageConsts.bodyRectWidth / 2,

View File

@ -31,6 +31,8 @@ export interface IGarageDoorState extends GraphicState {
set mgj(v: boolean);
get param(): request.CkmParam;
set param(v: request.CkmParam);
get local(): boolean;
set local(v: boolean);
}
const garageConsts = {
@ -38,6 +40,7 @@ const garageConsts = {
codeColor: 0xffffff,
bodyLineColor: 0xffffff,
lossStateColor: 0x0000ff,
localStateColor: 0x00ff00,
bodyLineWidth: 2,
bodyColor: 0x000000,
bodyRectWidth: 10,
@ -87,10 +90,13 @@ export class GarageDoor extends JlGraphic {
codeGraph.position.set(0, -30);
}
this.lineBody.clear();
const color =
this.states.param?.fault === request.Ckm.Fault.FA_State_Loss
? garageConsts.lossStateColor
: garageConsts.bodyLineColor;
let color = garageConsts.bodyLineColor;
if (this.states.local) {
color = garageConsts.localStateColor;
}
if (this.states.param?.fault === request.Ckm.Fault.FA_State_Loss) {
color = garageConsts.lossStateColor;
}
this.lineBody.lineStyle(garageConsts.bodyLineWidth, color);
this.lineBody.moveTo(
-garageConsts.bodyRectWidth / 2,

File diff suppressed because it is too large Load Diff