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