增加空的枚举,生成的时候是空
This commit is contained in:
parent
9bbbe7b3e2
commit
71f0346bf0
@ -99,5 +99,9 @@ const defaultInitialPositionModel = [
|
|||||||
label: 'H',
|
label: 'H',
|
||||||
value: relayCabinetGraphicData.CjDataItem.PostionType.H,
|
value: relayCabinetGraphicData.CjDataItem.PostionType.H,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'NONE',
|
||||||
|
value: relayCabinetGraphicData.CjDataItem.PostionType.NONE,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
|
@ -9,6 +9,7 @@ import {
|
|||||||
} from 'jl-graphic';
|
} from 'jl-graphic';
|
||||||
|
|
||||||
import { IRelayData, Relay, RelayTemplate } from './Relay';
|
import { IRelayData, Relay, RelayTemplate } from './Relay';
|
||||||
|
import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics';
|
||||||
|
|
||||||
export interface IRelayDrawOptions {
|
export interface IRelayDrawOptions {
|
||||||
newData: () => IRelayData;
|
newData: () => IRelayData;
|
||||||
@ -39,6 +40,8 @@ export class RelayDraw extends GraphicDrawAssistant<RelayTemplate, IRelayData> {
|
|||||||
}
|
}
|
||||||
prepareData(data: IRelayData): boolean {
|
prepareData(data: IRelayData): boolean {
|
||||||
data.transform = this.container.saveTransform();
|
data.transform = this.container.saveTransform();
|
||||||
|
data.defaultInitialPosition =
|
||||||
|
relayCabinetGraphicData.CjDataItem.PostionType.NONE;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,8 @@ export function generateRelays(
|
|||||||
if (relaysInfo.showCode) {
|
if (relaysInfo.showCode) {
|
||||||
generateDevice.datas.showCode = relaysInfo.showCode;
|
generateDevice.datas.showCode = relaysInfo.showCode;
|
||||||
}
|
}
|
||||||
|
generateDevice.datas.defaultInitialPosition =
|
||||||
|
relayCabinetGraphicData.CjDataItem.PostionType.NONE;
|
||||||
relaysInfos.shift();
|
relaysInfos.shift();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -129,6 +131,8 @@ function generateRelaysFormat(
|
|||||||
if (relaysInfo.showCode) {
|
if (relaysInfo.showCode) {
|
||||||
generateDevice.datas.showCode = relaysInfo.showCode;
|
generateDevice.datas.showCode = relaysInfo.showCode;
|
||||||
}
|
}
|
||||||
|
generateDevice.datas.defaultInitialPosition =
|
||||||
|
relayCabinetGraphicData.CjDataItem.PostionType.NONE;
|
||||||
}
|
}
|
||||||
generateDevice.position.set(
|
generateDevice.position.set(
|
||||||
relayCabinet.x -
|
relayCabinet.x -
|
||||||
|
@ -1379,7 +1379,8 @@ export namespace relayCabinetGraphicData {
|
|||||||
export namespace CjDataItem {
|
export namespace CjDataItem {
|
||||||
export enum PostionType {
|
export enum PostionType {
|
||||||
Q = 0,
|
Q = 0,
|
||||||
H = 1
|
H = 1,
|
||||||
|
NONE = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class CiQd extends pb_1.Message {
|
export class CiQd extends pb_1.Message {
|
||||||
|
Loading…
Reference in New Issue
Block a user