修改protoc

This commit is contained in:
joylink_zhaoerwei 2024-09-19 10:42:56 +08:00
parent 2d73321e06
commit 0709b1392d
9 changed files with 858 additions and 847 deletions

View File

@ -19,6 +19,7 @@ import { useDrawStore } from 'src/stores/draw-store';
import { Rect, RectTemplate } from 'src/graphics/rect/Rect'; import { Rect, RectTemplate } from 'src/graphics/rect/Rect';
import { RectDraw } from 'src/graphics/rect/RectDrawAssistant'; import { RectDraw } from 'src/graphics/rect/RectDrawAssistant';
import { RectData } from './graphics/RectInteraction'; import { RectData } from './graphics/RectInteraction';
import { common } from 'src/protos/common';
const UndoOptions: MenuItemOptions = { const UndoOptions: MenuItemOptions = {
name: '撤销', name: '撤销',
@ -69,7 +70,7 @@ export function initCommonDrawApp(app: IDrawApp) {
} }
interface ICommonStorage { interface ICommonStorage {
canvas: iscsGraphicData.Canvas; canvas: common.Canvas;
arrows: iscsGraphicData.Arrow[]; arrows: iscsGraphicData.Arrow[];
iscsTexts: iscsGraphicData.IscsText[]; iscsTexts: iscsGraphicData.IscsText[];
rects: iscsGraphicData.Rect[]; rects: iscsGraphicData.Rect[];
@ -91,7 +92,7 @@ export function loadCommonDrawDatas(storage: ICommonStorage): GraphicData[] {
export function saveCommonDrawDatas(app: IDrawApp, storage: ICommonStorage) { export function saveCommonDrawDatas(app: IDrawApp, storage: ICommonStorage) {
const canvasData = app.canvas.saveData(); const canvasData = app.canvas.saveData();
storage.canvas = new iscsGraphicData.Canvas({ storage.canvas = new common.Canvas({
width: canvasData.width, width: canvasData.width,
height: canvasData.height, height: canvasData.height,
backgroundColor: canvasData.backgroundColor, backgroundColor: canvasData.backgroundColor,

View File

@ -4,6 +4,7 @@ import { iscsGraphicData } from 'src/protos/iscs_graphic_data';
import { IArrowData, Arrow } from 'src/graphics/arrow/Arrow'; import { IArrowData, Arrow } from 'src/graphics/arrow/Arrow';
import { GraphicDataBase } from './GraphicDataBase'; import { GraphicDataBase } from './GraphicDataBase';
import { IPointData } from 'pixi.js'; import { IPointData } from 'pixi.js';
import { common } from 'src/protos/common';
export class ArrowData extends GraphicDataBase implements IArrowData { export class ArrowData extends GraphicDataBase implements IArrowData {
constructor(data?: iscsGraphicData.Arrow) { constructor(data?: iscsGraphicData.Arrow) {
@ -33,7 +34,7 @@ export class ArrowData extends GraphicDataBase implements IArrowData {
} }
set points(points: IPointData[]) { set points(points: IPointData[]) {
this.data.points = points.map( this.data.points = points.map(
(p) => new iscsGraphicData.Point({ x: p.x, y: p.y }) (p) => new common.Point({ x: p.x, y: p.y })
); );
} }
clone(): ArrowData { clone(): ArrowData {

View File

@ -8,8 +8,8 @@ import {
IGraphicTransform, IGraphicTransform,
} from 'jl-graphic'; } from 'jl-graphic';
// import { toStorageTransform } from '..'; // import { toStorageTransform } from '..';
import { iscsGraphicData } from 'src/protos/iscs_graphic_data';
import { IPointData, Point } from 'pixi.js'; import { IPointData, Point } from 'pixi.js';
import { common } from 'src/protos/common';
export interface ICommonInfo { export interface ICommonInfo {
id: number; id: number;
@ -17,15 +17,15 @@ export interface ICommonInfo {
transform: IGraphicTransform; transform: IGraphicTransform;
childTransforms: IChildTransform[]; childTransforms: IChildTransform[];
} }
export function fromStoragePoint(p: iscsGraphicData.Point): Point { export function fromStoragePoint(p: common.Point): Point {
return new Point(p.x, p.y); return new Point(p.x, p.y);
} }
export function toStoragePoint(p: IPointData): iscsGraphicData.Point { export function toStoragePoint(p: IPointData): common.Point {
return new iscsGraphicData.Point({ x: p.x, y: p.y }); return new common.Point({ x: p.x, y: p.y });
} }
export function fromStorageTransfrom( export function fromStorageTransfrom(
transfrom: iscsGraphicData.Transform transfrom: common.Transform
): GraphicTransform { ): GraphicTransform {
return new GraphicTransform( return new GraphicTransform(
fromStoragePoint(transfrom.position), fromStoragePoint(transfrom.position),
@ -37,8 +37,8 @@ export function fromStorageTransfrom(
export function toStorageTransform( export function toStorageTransform(
transform: GraphicTransform transform: GraphicTransform
): iscsGraphicData.Transform { ): common.Transform {
return new iscsGraphicData.Transform({ return new common.Transform({
position: toStoragePoint(transform.position), position: toStoragePoint(transform.position),
scale: toStoragePoint(transform.scale), scale: toStoragePoint(transform.scale),
rotation: transform.rotation, rotation: transform.rotation,
@ -57,15 +57,15 @@ export abstract class GraphicDataBase implements GraphicData {
this._data = data; this._data = data;
} }
static defaultCommonInfo(graphicType: string): iscsGraphicData.CommonInfo { static defaultCommonInfo(graphicType: string): common.CommonInfo {
return new iscsGraphicData.CommonInfo({ return new common.CommonInfo({
id: 0, id: 0,
graphicType: graphicType, graphicType: graphicType,
transform: new iscsGraphicData.Transform({ transform: new common.Transform({
position: new iscsGraphicData.Point({ x: 0, y: 0 }), position: new common.Point({ x: 0, y: 0 }),
scale: new iscsGraphicData.Point({ x: 1, y: 1 }), scale: new common.Point({ x: 1, y: 1 }),
rotation: 0, rotation: 0,
skew: new iscsGraphicData.Point({ x: 0, y: 0 }), skew: new common.Point({ x: 0, y: 0 }),
}), }),
childTransforms: [], childTransforms: [],
}); });
@ -104,10 +104,10 @@ export abstract class GraphicDataBase implements GraphicData {
} }
set childTransforms(v: ChildTransform[] | undefined) { set childTransforms(v: ChildTransform[] | undefined) {
if (v) { if (v) {
const cts: iscsGraphicData.ChildTransform[] = []; const cts: common.ChildTransform[] = [];
v.forEach((ct) => v.forEach((ct) =>
cts.push( cts.push(
new iscsGraphicData.ChildTransform({ new common.ChildTransform({
...ct, ...ct,
transform: toStorageTransform(ct.transform), transform: toStorageTransform(ct.transform),
}) })

View File

@ -3,6 +3,7 @@ import { IPointData } from 'pixi.js';
import { IRectData, Rect } from 'src/graphics/rect/Rect'; import { IRectData, Rect } from 'src/graphics/rect/Rect';
import { iscsGraphicData } from 'src/protos/iscs_graphic_data'; import { iscsGraphicData } from 'src/protos/iscs_graphic_data';
import { GraphicDataBase } from './GraphicDataBase'; import { GraphicDataBase } from './GraphicDataBase';
import { common } from 'src/protos/common';
export class RectData extends GraphicDataBase implements IRectData { export class RectData extends GraphicDataBase implements IRectData {
constructor(data?: iscsGraphicData.Rect) { constructor(data?: iscsGraphicData.Rect) {
@ -43,7 +44,7 @@ export class RectData extends GraphicDataBase implements IRectData {
return this.data.point; return this.data.point;
} }
set point(point: IPointData) { set point(point: IPointData) {
this.data.point = new iscsGraphicData.Point({ x: point.x, y: point.y }); this.data.point = new common.Point({ x: point.x, y: point.y });
} }
get width(): number { get width(): number {
return this.data.width; return this.data.width;

View File

@ -139,9 +139,10 @@ import {
IscsStyle, IscsStyle,
} from '../api/DraftApi'; } from '../api/DraftApi';
import { ApiError } from 'src/boot/axios'; import { ApiError } from 'src/boot/axios';
import { useRouter } from 'vue-router';
const $q = useQuasar(); const $q = useQuasar();
const router = useRouter();
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
sizeHeight: number; sizeHeight: number;
@ -310,4 +311,9 @@ async function deleteData(row: DraftItem) {
operateDisabled.value = false; operateDisabled.value = false;
}); });
} }
function goToPath(row: DraftItem) {
let path = `/iscsPainting/${row.id}`;
router.push({ path: path });
}
</script> </script>

View File

@ -12,6 +12,10 @@ export namespace common {
DataType_Psl = 3, DataType_Psl = 3,
DataType_Iscs = 4 DataType_Iscs = 4
} }
export enum IscsStyle {
IscsStyle_Unknown = 0,
DaShiZhiNeng = 1
}
export enum FeatureType { export enum FeatureType {
FeatureType_Unknown = 0, FeatureType_Unknown = 0,
FeatureType_Simulation = 1, FeatureType_Simulation = 1,
@ -22,9 +26,9 @@ export namespace common {
constructor(data?: any[] | { constructor(data?: any[] | {
width?: number; width?: number;
height?: number; height?: number;
background_color?: string; backgroundColor?: string;
viewport_transform?: Transform; viewportTransform?: Transform;
grid_background?: Grid; gridBackground?: Grid;
}) { }) {
super(); super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -35,14 +39,14 @@ export namespace common {
if ("height" in data && data.height != undefined) { if ("height" in data && data.height != undefined) {
this.height = data.height; this.height = data.height;
} }
if ("background_color" in data && data.background_color != undefined) { if ("backgroundColor" in data && data.backgroundColor != undefined) {
this.background_color = data.background_color; this.backgroundColor = data.backgroundColor;
} }
if ("viewport_transform" in data && data.viewport_transform != undefined) { if ("viewportTransform" in data && data.viewportTransform != undefined) {
this.viewport_transform = data.viewport_transform; this.viewportTransform = data.viewportTransform;
} }
if ("grid_background" in data && data.grid_background != undefined) { if ("gridBackground" in data && data.gridBackground != undefined) {
this.grid_background = data.grid_background; this.gridBackground = data.gridBackground;
} }
} }
} }
@ -58,36 +62,36 @@ export namespace common {
set height(value: number) { set height(value: number) {
pb_1.Message.setField(this, 2, value); pb_1.Message.setField(this, 2, value);
} }
get background_color() { get backgroundColor() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string; return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
} }
set background_color(value: string) { set backgroundColor(value: string) {
pb_1.Message.setField(this, 3, value); pb_1.Message.setField(this, 3, value);
} }
get viewport_transform() { get viewportTransform() {
return pb_1.Message.getWrapperField(this, Transform, 4) as Transform; return pb_1.Message.getWrapperField(this, Transform, 4) as Transform;
} }
set viewport_transform(value: Transform) { set viewportTransform(value: Transform) {
pb_1.Message.setWrapperField(this, 4, value); pb_1.Message.setWrapperField(this, 4, value);
} }
get has_viewport_transform() { get has_viewportTransform() {
return pb_1.Message.getField(this, 4) != null; return pb_1.Message.getField(this, 4) != null;
} }
get grid_background() { get gridBackground() {
return pb_1.Message.getWrapperField(this, Grid, 5) as Grid; return pb_1.Message.getWrapperField(this, Grid, 5) as Grid;
} }
set grid_background(value: Grid) { set gridBackground(value: Grid) {
pb_1.Message.setWrapperField(this, 5, value); pb_1.Message.setWrapperField(this, 5, value);
} }
get has_grid_background() { get has_gridBackground() {
return pb_1.Message.getField(this, 5) != null; return pb_1.Message.getField(this, 5) != null;
} }
static fromObject(data: { static fromObject(data: {
width?: number; width?: number;
height?: number; height?: number;
background_color?: string; backgroundColor?: string;
viewport_transform?: ReturnType<typeof Transform.prototype.toObject>; viewportTransform?: ReturnType<typeof Transform.prototype.toObject>;
grid_background?: ReturnType<typeof Grid.prototype.toObject>; gridBackground?: ReturnType<typeof Grid.prototype.toObject>;
}): Canvas { }): Canvas {
const message = new Canvas({}); const message = new Canvas({});
if (data.width != null) { if (data.width != null) {
@ -96,14 +100,14 @@ export namespace common {
if (data.height != null) { if (data.height != null) {
message.height = data.height; message.height = data.height;
} }
if (data.background_color != null) { if (data.backgroundColor != null) {
message.background_color = data.background_color; message.backgroundColor = data.backgroundColor;
} }
if (data.viewport_transform != null) { if (data.viewportTransform != null) {
message.viewport_transform = Transform.fromObject(data.viewport_transform); message.viewportTransform = Transform.fromObject(data.viewportTransform);
} }
if (data.grid_background != null) { if (data.gridBackground != null) {
message.grid_background = Grid.fromObject(data.grid_background); message.gridBackground = Grid.fromObject(data.gridBackground);
} }
return message; return message;
} }
@ -111,9 +115,9 @@ export namespace common {
const data: { const data: {
width?: number; width?: number;
height?: number; height?: number;
background_color?: string; backgroundColor?: string;
viewport_transform?: ReturnType<typeof Transform.prototype.toObject>; viewportTransform?: ReturnType<typeof Transform.prototype.toObject>;
grid_background?: ReturnType<typeof Grid.prototype.toObject>; gridBackground?: ReturnType<typeof Grid.prototype.toObject>;
} = {}; } = {};
if (this.width != null) { if (this.width != null) {
data.width = this.width; data.width = this.width;
@ -121,14 +125,14 @@ export namespace common {
if (this.height != null) { if (this.height != null) {
data.height = this.height; data.height = this.height;
} }
if (this.background_color != null) { if (this.backgroundColor != null) {
data.background_color = this.background_color; data.backgroundColor = this.backgroundColor;
} }
if (this.viewport_transform != null) { if (this.viewportTransform != null) {
data.viewport_transform = this.viewport_transform.toObject(); data.viewportTransform = this.viewportTransform.toObject();
} }
if (this.grid_background != null) { if (this.gridBackground != null) {
data.grid_background = this.grid_background.toObject(); data.gridBackground = this.gridBackground.toObject();
} }
return data; return data;
} }
@ -140,12 +144,12 @@ export namespace common {
writer.writeInt32(1, this.width); writer.writeInt32(1, this.width);
if (this.height != 0) if (this.height != 0)
writer.writeInt32(2, this.height); writer.writeInt32(2, this.height);
if (this.background_color.length) if (this.backgroundColor.length)
writer.writeString(3, this.background_color); writer.writeString(3, this.backgroundColor);
if (this.has_viewport_transform) if (this.has_viewportTransform)
writer.writeMessage(4, this.viewport_transform, () => this.viewport_transform.serialize(writer)); writer.writeMessage(4, this.viewportTransform, () => this.viewportTransform.serialize(writer));
if (this.has_grid_background) if (this.has_gridBackground)
writer.writeMessage(5, this.grid_background, () => this.grid_background.serialize(writer)); writer.writeMessage(5, this.gridBackground, () => this.gridBackground.serialize(writer));
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -162,13 +166,13 @@ export namespace common {
message.height = reader.readInt32(); message.height = reader.readInt32();
break; break;
case 3: case 3:
message.background_color = reader.readString(); message.backgroundColor = reader.readString();
break; break;
case 4: case 4:
reader.readMessage(message.viewport_transform, () => message.viewport_transform = Transform.deserialize(reader)); reader.readMessage(message.viewportTransform, () => message.viewportTransform = Transform.deserialize(reader));
break; break;
case 5: case 5:
reader.readMessage(message.grid_background, () => message.grid_background = Grid.deserialize(reader)); reader.readMessage(message.gridBackground, () => message.gridBackground = Grid.deserialize(reader));
break; break;
default: reader.skipField(); default: reader.skipField();
} }
@ -185,34 +189,34 @@ export namespace common {
export class Grid extends pb_1.Message { export class Grid extends pb_1.Message {
#one_of_decls: number[][] = []; #one_of_decls: number[][] = [];
constructor(data?: any[] | { constructor(data?: any[] | {
has_grid?: boolean; hasGrid?: boolean;
line_color?: string; lineColor?: string;
space?: number; space?: number;
}) { }) {
super(); super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { if (!Array.isArray(data) && typeof data == "object") {
if ("has_grid" in data && data.has_grid != undefined) { if ("hasGrid" in data && data.hasGrid != undefined) {
this.has_grid = data.has_grid; this.hasGrid = data.hasGrid;
} }
if ("line_color" in data && data.line_color != undefined) { if ("lineColor" in data && data.lineColor != undefined) {
this.line_color = data.line_color; this.lineColor = data.lineColor;
} }
if ("space" in data && data.space != undefined) { if ("space" in data && data.space != undefined) {
this.space = data.space; this.space = data.space;
} }
} }
} }
get has_grid() { get hasGrid() {
return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean;
} }
set has_grid(value: boolean) { set hasGrid(value: boolean) {
pb_1.Message.setField(this, 1, value); pb_1.Message.setField(this, 1, value);
} }
get line_color() { get lineColor() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string; return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
} }
set line_color(value: string) { set lineColor(value: string) {
pb_1.Message.setField(this, 2, value); pb_1.Message.setField(this, 2, value);
} }
get space() { get space() {
@ -222,16 +226,16 @@ export namespace common {
pb_1.Message.setField(this, 3, value); pb_1.Message.setField(this, 3, value);
} }
static fromObject(data: { static fromObject(data: {
has_grid?: boolean; hasGrid?: boolean;
line_color?: string; lineColor?: string;
space?: number; space?: number;
}): Grid { }): Grid {
const message = new Grid({}); const message = new Grid({});
if (data.has_grid != null) { if (data.hasGrid != null) {
message.has_grid = data.has_grid; message.hasGrid = data.hasGrid;
} }
if (data.line_color != null) { if (data.lineColor != null) {
message.line_color = data.line_color; message.lineColor = data.lineColor;
} }
if (data.space != null) { if (data.space != null) {
message.space = data.space; message.space = data.space;
@ -240,15 +244,15 @@ export namespace common {
} }
toObject() { toObject() {
const data: { const data: {
has_grid?: boolean; hasGrid?: boolean;
line_color?: string; lineColor?: string;
space?: number; space?: number;
} = {}; } = {};
if (this.has_grid != null) { if (this.hasGrid != null) {
data.has_grid = this.has_grid; data.hasGrid = this.hasGrid;
} }
if (this.line_color != null) { if (this.lineColor != null) {
data.line_color = this.line_color; data.lineColor = this.lineColor;
} }
if (this.space != null) { if (this.space != null) {
data.space = this.space; data.space = this.space;
@ -259,10 +263,10 @@ export namespace common {
serialize(w: pb_1.BinaryWriter): void; serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter(); const writer = w || new pb_1.BinaryWriter();
if (this.has_grid != false) if (this.hasGrid != false)
writer.writeBool(1, this.has_grid); writer.writeBool(1, this.hasGrid);
if (this.line_color.length) if (this.lineColor.length)
writer.writeString(2, this.line_color); writer.writeString(2, this.lineColor);
if (this.space != 0) if (this.space != 0)
writer.writeInt32(3, this.space); writer.writeInt32(3, this.space);
if (!w) if (!w)
@ -275,10 +279,10 @@ export namespace common {
break; break;
switch (reader.getFieldNumber()) { switch (reader.getFieldNumber()) {
case 1: case 1:
message.has_grid = reader.readBool(); message.hasGrid = reader.readBool();
break; break;
case 2: case 2:
message.line_color = reader.readString(); message.lineColor = reader.readString();
break; break;
case 3: case 3:
message.space = reader.readInt32(); message.space = reader.readInt32();
@ -627,9 +631,9 @@ export namespace common {
#one_of_decls: number[][] = []; #one_of_decls: number[][] = [];
constructor(data?: any[] | { constructor(data?: any[] | {
id?: number; id?: number;
graphic_type?: string; graphicType?: string;
transform?: Transform; transform?: Transform;
children_transform?: ChildTransform[]; childTransforms?: ChildTransform[];
}) { }) {
super(); super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls);
@ -637,14 +641,14 @@ export namespace common {
if ("id" in data && data.id != undefined) { if ("id" in data && data.id != undefined) {
this.id = data.id; this.id = data.id;
} }
if ("graphic_type" in data && data.graphic_type != undefined) { if ("graphicType" in data && data.graphicType != undefined) {
this.graphic_type = data.graphic_type; this.graphicType = data.graphicType;
} }
if ("transform" in data && data.transform != undefined) { if ("transform" in data && data.transform != undefined) {
this.transform = data.transform; this.transform = data.transform;
} }
if ("children_transform" in data && data.children_transform != undefined) { if ("childTransforms" in data && data.childTransforms != undefined) {
this.children_transform = data.children_transform; this.childTransforms = data.childTransforms;
} }
} }
} }
@ -654,10 +658,10 @@ export namespace common {
set id(value: number) { set id(value: number) {
pb_1.Message.setField(this, 1, value); pb_1.Message.setField(this, 1, value);
} }
get graphic_type() { get graphicType() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string; return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
} }
set graphic_type(value: string) { set graphicType(value: string) {
pb_1.Message.setField(this, 2, value); pb_1.Message.setField(this, 2, value);
} }
get transform() { get transform() {
@ -669,51 +673,51 @@ export namespace common {
get has_transform() { get has_transform() {
return pb_1.Message.getField(this, 3) != null; return pb_1.Message.getField(this, 3) != null;
} }
get children_transform() { get childTransforms() {
return pb_1.Message.getRepeatedWrapperField(this, ChildTransform, 4) as ChildTransform[]; return pb_1.Message.getRepeatedWrapperField(this, ChildTransform, 4) as ChildTransform[];
} }
set children_transform(value: ChildTransform[]) { set childTransforms(value: ChildTransform[]) {
pb_1.Message.setRepeatedWrapperField(this, 4, value); pb_1.Message.setRepeatedWrapperField(this, 4, value);
} }
static fromObject(data: { static fromObject(data: {
id?: number; id?: number;
graphic_type?: string; graphicType?: string;
transform?: ReturnType<typeof Transform.prototype.toObject>; transform?: ReturnType<typeof Transform.prototype.toObject>;
children_transform?: ReturnType<typeof ChildTransform.prototype.toObject>[]; childTransforms?: ReturnType<typeof ChildTransform.prototype.toObject>[];
}): CommonInfo { }): CommonInfo {
const message = new CommonInfo({}); const message = new CommonInfo({});
if (data.id != null) { if (data.id != null) {
message.id = data.id; message.id = data.id;
} }
if (data.graphic_type != null) { if (data.graphicType != null) {
message.graphic_type = data.graphic_type; message.graphicType = data.graphicType;
} }
if (data.transform != null) { if (data.transform != null) {
message.transform = Transform.fromObject(data.transform); message.transform = Transform.fromObject(data.transform);
} }
if (data.children_transform != null) { if (data.childTransforms != null) {
message.children_transform = data.children_transform.map(item => ChildTransform.fromObject(item)); message.childTransforms = data.childTransforms.map(item => ChildTransform.fromObject(item));
} }
return message; return message;
} }
toObject() { toObject() {
const data: { const data: {
id?: number; id?: number;
graphic_type?: string; graphicType?: string;
transform?: ReturnType<typeof Transform.prototype.toObject>; transform?: ReturnType<typeof Transform.prototype.toObject>;
children_transform?: ReturnType<typeof ChildTransform.prototype.toObject>[]; childTransforms?: ReturnType<typeof ChildTransform.prototype.toObject>[];
} = {}; } = {};
if (this.id != null) { if (this.id != null) {
data.id = this.id; data.id = this.id;
} }
if (this.graphic_type != null) { if (this.graphicType != null) {
data.graphic_type = this.graphic_type; data.graphicType = this.graphicType;
} }
if (this.transform != null) { if (this.transform != null) {
data.transform = this.transform.toObject(); data.transform = this.transform.toObject();
} }
if (this.children_transform != null) { if (this.childTransforms != null) {
data.children_transform = this.children_transform.map((item: ChildTransform) => item.toObject()); data.childTransforms = this.childTransforms.map((item: ChildTransform) => item.toObject());
} }
return data; return data;
} }
@ -723,12 +727,12 @@ export namespace common {
const writer = w || new pb_1.BinaryWriter(); const writer = w || new pb_1.BinaryWriter();
if (this.id != 0) if (this.id != 0)
writer.writeUint32(1, this.id); writer.writeUint32(1, this.id);
if (this.graphic_type.length) if (this.graphicType.length)
writer.writeString(2, this.graphic_type); writer.writeString(2, this.graphicType);
if (this.has_transform) if (this.has_transform)
writer.writeMessage(3, this.transform, () => this.transform.serialize(writer)); writer.writeMessage(3, this.transform, () => this.transform.serialize(writer));
if (this.children_transform.length) if (this.childTransforms.length)
writer.writeRepeatedMessage(4, this.children_transform, (item: ChildTransform) => item.serialize(writer)); writer.writeRepeatedMessage(4, this.childTransforms, (item: ChildTransform) => item.serialize(writer));
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -742,13 +746,13 @@ export namespace common {
message.id = reader.readUint32(); message.id = reader.readUint32();
break; break;
case 2: case 2:
message.graphic_type = reader.readString(); message.graphicType = reader.readString();
break; break;
case 3: case 3:
reader.readMessage(message.transform, () => message.transform = Transform.deserialize(reader)); reader.readMessage(message.transform, () => message.transform = Transform.deserialize(reader));
break; break;
case 4: case 4:
reader.readMessage(message.children_transform, () => pb_1.Message.addToRepeatedWrapperField(message, 4, ChildTransform.deserialize(reader), ChildTransform)); reader.readMessage(message.childTransforms, () => pb_1.Message.addToRepeatedWrapperField(message, 4, ChildTransform.deserialize(reader), ChildTransform));
break; break;
default: reader.skipField(); default: reader.skipField();
} }

File diff suppressed because it is too large Load Diff

View File

@ -46,6 +46,14 @@ const routes: RouteRecordRaw[] = [
}, },
], ],
}, },
{
path: '/iscsPainting/:id',
name: 'iscsPainting',
component: () => import('layouts/IscsDrawLayout.vue'),
meta: {
hidden: true,
},
},
{ {
path: '/:catchAll(.*)*', path: '/:catchAll(.*)*',
meta: { meta: {
@ -53,22 +61,6 @@ const routes: RouteRecordRaw[] = [
}, },
component: () => import('pages/ErrorNotFound.vue'), component: () => import('pages/ErrorNotFound.vue'),
}, },
{
path: '/cctvPainting',
name: 'cctvPainting',
meta: {
label: 'CCTV绘制',
},
component: () => import('layouts/CCTVDrawLayout.vue'),
},
{
path: '/fasPaint',
name: 'fasPaint',
meta: {
label: '火灾报警绘制',
},
component: () => import('layouts/FASDrawLayout.vue'),
},
]; ];
export default routes; export default routes;