Compare commits
10 Commits
f6852212d8
...
4b02850488
Author | SHA1 | Date | |
---|---|---|---|
|
4b02850488 | ||
|
c26f35e008 | ||
|
7c8bd92030 | ||
|
bdcd3ac6b2 | ||
|
1c99ed9b50 | ||
|
be50562f0e | ||
|
2517ab5e8d | ||
|
f4ed04eed3 | ||
|
bd73f65860 | ||
|
e894f02e38 |
@ -1 +1 @@
|
||||
Subproject commit 5dd8f8963e28e79012656f95999016ad503ae43a
|
||||
Subproject commit 208bcaedccf71e7bfd2535e2889ca4cf7c4bdbb6
|
@ -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"
|
||||
|
@ -99,7 +99,6 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
function getNameFormat() {
|
||||
console.log(code.value, '1111111');
|
||||
return code.value;
|
||||
}
|
||||
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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'; // 测试
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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>();
|
||||
}
|
||||
|
@ -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>();
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user