ato-water-lib 0.0.52 → 0.0.54
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/lib/constants/components-group-const.mjs +290 -28
- package/esm2020/lib/models/default-gojs-editor.model.mjs +401 -72
- package/fesm2015/ato-water-lib.mjs +560 -83
- package/fesm2015/ato-water-lib.mjs.map +1 -1
- package/fesm2020/ato-water-lib.mjs +688 -97
- package/fesm2020/ato-water-lib.mjs.map +1 -1
- package/lib/constants/components-group-const.d.ts +45 -8
- package/package.json +1 -1
@@ -3359,12 +3359,14 @@ class AtoDefaultGojsEditor {
|
|
3359
3359
|
});
|
3360
3360
|
// Remove Node and Node Group
|
3361
3361
|
_.forEach(this.myDiagram.nodeTemplateMap?.Hb, (temp) => {
|
3362
|
-
if (temp?.key &&
|
3362
|
+
if (temp?.key &&
|
3363
|
+
!this.editor.data?.nodeDataArray?.some((node) => node?.type === temp?.key)) {
|
3363
3364
|
this.myDiagram.nodeTemplateMap.remove(temp?.key);
|
3364
3365
|
}
|
3365
3366
|
});
|
3366
3367
|
_.forEach(this.myDiagram.groupTemplateMap?.Hb, (temp) => {
|
3367
|
-
if (temp?.key &&
|
3368
|
+
if (temp?.key &&
|
3369
|
+
!this.editor.data?.nodeDataArray?.some((node) => node?.type === temp?.key)) {
|
3368
3370
|
this.myDiagram.groupTemplateMap.remove(temp?.key);
|
3369
3371
|
}
|
3370
3372
|
});
|
@@ -3394,7 +3396,8 @@ class AtoDefaultGojsEditor {
|
|
3394
3396
|
this.makeGroupZoneTemplate();
|
3395
3397
|
return;
|
3396
3398
|
}
|
3397
|
-
if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
|
3399
|
+
if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
|
3400
|
+
node?.isGroup) {
|
3398
3401
|
this.groupPlantCellTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
|
3399
3402
|
return;
|
3400
3403
|
}
|
@@ -3418,11 +3421,13 @@ class AtoDefaultGojsEditor {
|
|
3418
3421
|
}
|
3419
3422
|
// Not Group
|
3420
3423
|
// Component Water Normal
|
3421
|
-
if (AtoGojsEditorModel.TYPE_TEMPLATE_WATER_NORMAL?.includes(node?.type) &&
|
3424
|
+
if (AtoGojsEditorModel.TYPE_TEMPLATE_WATER_NORMAL?.includes(node?.type) &&
|
3425
|
+
!node?.isGroup) {
|
3422
3426
|
this.makeEntityTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon ?? '', AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name ?? '');
|
3423
3427
|
}
|
3424
3428
|
// Component Water Withdraw Or Discharge
|
3425
|
-
if (AtoGojsEditorModel.TYPE_TEMPLATE_WATER_WITHDRAW_OR_DISCHARGE?.includes(node?.type) &&
|
3429
|
+
if (AtoGojsEditorModel.TYPE_TEMPLATE_WATER_WITHDRAW_OR_DISCHARGE?.includes(node?.type) &&
|
3430
|
+
!node?.isGroup) {
|
3426
3431
|
this.makeEntityWithdrawOrDischarge(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon ?? '', AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name ?? '');
|
3427
3432
|
}
|
3428
3433
|
// Component Energy Normal
|
@@ -3475,7 +3480,8 @@ class AtoDefaultGojsEditor {
|
|
3475
3480
|
this.makeSpecialTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
|
3476
3481
|
}
|
3477
3482
|
// Plant Cell
|
3478
|
-
if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
|
3483
|
+
if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
|
3484
|
+
!node?.isGroup) {
|
3479
3485
|
this.plantCellTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
|
3480
3486
|
}
|
3481
3487
|
}
|
@@ -3503,7 +3509,8 @@ class AtoDefaultGojsEditor {
|
|
3503
3509
|
this.myDiagram.dragSelectingTool = this.initialOptions?.dragSelectingTool;
|
3504
3510
|
this.myDiagram.toolManager.draggingTool.isGridSnapEnabled =
|
3505
3511
|
this.initialOptions?.['draggingTool.isGridSnapEnabled'] ?? false;
|
3506
|
-
if (this.myDiagram.toolManager &&
|
3512
|
+
if (this.myDiagram.toolManager &&
|
3513
|
+
this.myDiagram.toolManager.draggingTool) {
|
3507
3514
|
if (this.initialOptions?.['draggingTool.gridSnapCellSize']) {
|
3508
3515
|
this.myDiagram.toolManager.draggingTool.gridSnapCellSize =
|
3509
3516
|
this.initialOptions?.['draggingTool.gridSnapCellSize'];
|
@@ -3521,7 +3528,8 @@ class AtoDefaultGojsEditor {
|
|
3521
3528
|
this.initialOptions?.['linkingTool.linkValidation'];
|
3522
3529
|
}
|
3523
3530
|
}
|
3524
|
-
this.myDiagram.contentAlignment =
|
3531
|
+
this.myDiagram.contentAlignment =
|
3532
|
+
this.initialOptions?.contentAlignment ?? go.Spot.Center;
|
3525
3533
|
this.myDiagram.layout = this.initialOptions?.layout;
|
3526
3534
|
// this.myDiagram.minViewportBounds = new go.Rect(0, 0, 1200, 1200);
|
3527
3535
|
if (!!this.editor?.data) {
|
@@ -3545,7 +3553,8 @@ class AtoDefaultGojsEditor {
|
|
3545
3553
|
// if (!this.isAddedModelChangedListeners) {
|
3546
3554
|
this.isAddedModelChangedListeners = true;
|
3547
3555
|
this.myDiagram.addModelChangedListener(function (e) {
|
3548
|
-
if (e.change === go.ChangedEvent.Remove &&
|
3556
|
+
if (e.change === go.ChangedEvent.Remove &&
|
3557
|
+
e.propertyName === 'nodeDataArray') {
|
3549
3558
|
const data = e.oldValue;
|
3550
3559
|
self.onDeleteNode.emit(data);
|
3551
3560
|
}
|
@@ -3772,7 +3781,12 @@ class AtoDefaultGojsEditor {
|
|
3772
3781
|
}
|
3773
3782
|
initSolarDiagram() {
|
3774
3783
|
const { SOLAR_POWER, POWER_CONDITIONING_UNIT, BATTERIES: BATTERY, INVERTERS: INVERTER, } = AtoGojsEditorModel.ENUM_TEMPLATES;
|
3775
|
-
const ListItemsCreateEntityTemplate = [
|
3784
|
+
const ListItemsCreateEntityTemplate = [
|
3785
|
+
SOLAR_POWER,
|
3786
|
+
POWER_CONDITIONING_UNIT,
|
3787
|
+
BATTERY,
|
3788
|
+
INVERTER,
|
3789
|
+
];
|
3776
3790
|
ListItemsCreateEntityTemplate.map((e) => {
|
3777
3791
|
if (!!AtoGojsEditorModel.NODE_TEMPLATES[e]) {
|
3778
3792
|
this.makeEntityTemplateEnergy(AtoGojsEditorModel.NODE_TEMPLATES[e].icon, AtoGojsEditorModel.NODE_TEMPLATES[e].name);
|
@@ -3853,10 +3867,16 @@ class AtoDefaultGojsEditor {
|
|
3853
3867
|
toolTip: this.$('ToolTip', this.$(go.TextBlock, {
|
3854
3868
|
margin: 4,
|
3855
3869
|
}, new go.Binding('text', 'textComponent'))),
|
3856
|
-
}, new go.Binding('text', 'textComponent'), new go.Binding('background', 'textComponent', (x) =>
|
3870
|
+
}, new go.Binding('text', 'textComponent'), new go.Binding('background', 'textComponent', (x) => x ? 'white' : 'transparent')
|
3871
|
+
// new go.Binding('margin', 'isFormat', (x) =>
|
3872
|
+
// x ? new go.Margin(5, 0, 5, 5) : new go.Margin(5, 5, 5, 5),
|
3873
|
+
// ),
|
3874
|
+
)));
|
3857
3875
|
// arrow
|
3858
3876
|
elements.push(this.$(go.Shape, // the "from" arrowhead
|
3859
|
-
{
|
3877
|
+
{
|
3878
|
+
...AtoGojsEditorModel.LINK_TEMPLATES[AtoGojsEditorModel.ENUM_LINK_TYPES.SIMPLE]?.arrow,
|
3879
|
+
}, new go.Binding('visible', 'type', (x) => ![
|
3860
3880
|
AtoGojsEditorModel.ENUM_LINK_TYPES.PIPE_ANIMATION,
|
3861
3881
|
AtoGojsEditorModel.ENUM_LINK_TYPES.PIPE,
|
3862
3882
|
AtoGojsEditorModel.ENUM_LINK_TYPES.PIPE_HIDDEN,
|
@@ -3875,7 +3895,7 @@ class AtoDefaultGojsEditor {
|
|
3875
3895
|
toShortLength: AtoGojsEditorModel.LINK_TEMPLATES[AtoGojsEditorModel.ENUM_LINK_TYPES.SIMPLE].toShortLength, // assume arrowhead at "to" end, need to avoid bad appearance when path is thick
|
3876
3896
|
}, new go.Binding('layerName', '', (data) => {
|
3877
3897
|
return data?.textComponent ? 'Background' : '';
|
3878
|
-
}), new go.Binding('zOrder', 'type', (x) =>
|
3898
|
+
}), new go.Binding('zOrder', 'type', (x) => x === AtoGojsEditorModel.ENUM_LINK_TYPES.PIPE_ANIMATION ? 11 : 10), new go.Binding('toShortLength', 'type', (x) => AtoGojsEditorModel.LINK_TEMPLATES[x].toShortLength || 0), new go.Binding('selectable', 'selectable'), new go.Binding('visible', 'visible'),
|
3879
3899
|
// make sure links come in from the proper direction and go out appropriately
|
3880
3900
|
...elements);
|
3881
3901
|
}
|
@@ -3955,7 +3975,10 @@ class AtoDefaultGojsEditor {
|
|
3955
3975
|
}, new go.Binding('stroke', 'color'), new go.Binding('text', 'name'), new go.Binding('visible', 'visible')))));
|
3956
3976
|
this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL, node);
|
3957
3977
|
}
|
3958
|
-
makeTextTemplate(size = {
|
3978
|
+
makeTextTemplate(size = {
|
3979
|
+
w: AtoGojsEditorModel.GRID_SIZE * 5,
|
3980
|
+
h: AtoGojsEditorModel.GRID_SIZE * 2,
|
3981
|
+
}) {
|
3959
3982
|
const self = this;
|
3960
3983
|
const contextMenu = this.$(go.Adornment, 'Vertical', this.$('ContextMenuButton', this.$(go.TextBlock, 'Option 1'), {
|
3961
3984
|
click: function (e, obj) {
|
@@ -3965,7 +3988,9 @@ class AtoDefaultGojsEditor {
|
|
3965
3988
|
click: function (e, obj) {
|
3966
3989
|
alert('Option 2 clicked!');
|
3967
3990
|
},
|
3968
|
-
})
|
3991
|
+
})
|
3992
|
+
// ... add more options as needed ...
|
3993
|
+
);
|
3969
3994
|
const node = this.$(go.Node, 'Spot', {
|
3970
3995
|
// fromSpot: go.Spot.RightSide,
|
3971
3996
|
// toSpot: go.Spot.LeftSide,
|
@@ -4016,7 +4041,8 @@ class AtoDefaultGojsEditor {
|
|
4016
4041
|
},
|
4017
4042
|
doubleClick: (e, obj) => {
|
4018
4043
|
const node = obj.part;
|
4019
|
-
if (node?.ob?.isTypeInflowOfPlantCell &&
|
4044
|
+
if (node?.ob?.isTypeInflowOfPlantCell &&
|
4045
|
+
!this._initialOptions?.isReadOnly) {
|
4020
4046
|
// obj?.data?.onSelected(node?.ob?.nodePlantCellParent);
|
4021
4047
|
// this.isShowNodeInfo
|
4022
4048
|
// ? self.onDoubleClickNode.emit({
|
@@ -4041,7 +4067,11 @@ class AtoDefaultGojsEditor {
|
|
4041
4067
|
},
|
4042
4068
|
selectionAdornmentTemplate: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto',
|
4043
4069
|
// { height: 62 },
|
4044
|
-
this.$(go.Shape, {
|
4070
|
+
this.$(go.Shape, {
|
4071
|
+
fill: null,
|
4072
|
+
stroke: 'dodgerblue',
|
4073
|
+
strokeWidth: 4,
|
4074
|
+
}), this.$(go.Placeholder,
|
4045
4075
|
// { padding: new go.Margin(8, 3, 0, 3) },
|
4046
4076
|
new go.Binding('padding', '', (x) => {
|
4047
4077
|
return x?.isTypeInflowOfPlantCell
|
@@ -4177,7 +4207,10 @@ class AtoDefaultGojsEditor {
|
|
4177
4207
|
}
|
4178
4208
|
return `${data?.shortenedNumber}${data?.unitPrefixes ? ' ' + data?.unitPrefixes : ''}`;
|
4179
4209
|
}
|
4180
|
-
makeDataBoxTemplate(size = {
|
4210
|
+
makeDataBoxTemplate(size = {
|
4211
|
+
w: AtoGojsEditorModel.GRID_SIZE * 5,
|
4212
|
+
h: AtoGojsEditorModel.GRID_SIZE * 5,
|
4213
|
+
}) {
|
4181
4214
|
const self = this;
|
4182
4215
|
let node = this.$(go.Node, 'Spot', {
|
4183
4216
|
locationSpot: go.Spot.Center,
|
@@ -4270,7 +4303,10 @@ class AtoDefaultGojsEditor {
|
|
4270
4303
|
showPoint(loc) {
|
4271
4304
|
const docLoc = this.myDiagram.transformDocToView(loc);
|
4272
4305
|
}
|
4273
|
-
makeEntityTemplate(icon, title, size = {
|
4306
|
+
makeEntityTemplate(icon, title, size = {
|
4307
|
+
w: AtoGojsEditorModel.GRID_SIZE * 5,
|
4308
|
+
h: AtoGojsEditorModel.GRID_SIZE * 5,
|
4309
|
+
}) {
|
4274
4310
|
const self = this;
|
4275
4311
|
let node = this.$(go.Node, 'Spot', {
|
4276
4312
|
locationSpot: go.Spot.Center,
|
@@ -4300,7 +4336,11 @@ class AtoDefaultGojsEditor {
|
|
4300
4336
|
shadowBlur: 6,
|
4301
4337
|
shadowOffset: new go.Point(0, 2),
|
4302
4338
|
shadowColor: '#00000029',
|
4303
|
-
}, this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
4339
|
+
}, this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
4340
|
+
fill: null,
|
4341
|
+
stroke: 'dodgerblue',
|
4342
|
+
strokeWidth: 4,
|
4343
|
+
}), this.$(go.Placeholder, { padding: 3 })), this.$(go.Panel, 'Horizontal', {
|
4304
4344
|
alignment: go.Spot.TopRight,
|
4305
4345
|
alignmentFocus: go.Spot.Bottom,
|
4306
4346
|
background: 'white',
|
@@ -4309,8 +4349,8 @@ class AtoDefaultGojsEditor {
|
|
4309
4349
|
!this._initialOptions.isReadOnly
|
4310
4350
|
? this.generateActionGroup([
|
4311
4351
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.RO_WATER_TREATMENT].name,
|
4312
|
-
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER]
|
4313
|
-
|
4352
|
+
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER].name,
|
4353
|
+
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER].name,
|
4314
4354
|
].includes(title)
|
4315
4355
|
? [
|
4316
4356
|
AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
|
@@ -4357,7 +4397,8 @@ class AtoDefaultGojsEditor {
|
|
4357
4397
|
}, new go.Binding('text', 'name').makeTwoWay(), new go.Binding('editable', '', (data) => {
|
4358
4398
|
return !(AtoGojsEditorModel.TYPE_COMPONENT_WATER?.includes(data?.systemType) &&
|
4359
4399
|
data?.topologyType !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
|
4360
|
-
data?.topologyType !==
|
4400
|
+
data?.topologyType !==
|
4401
|
+
ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
|
4361
4402
|
})))), this.$(go.Panel, 'Vertical', {
|
4362
4403
|
alignment: go.Spot.Left,
|
4363
4404
|
alignmentFocus: new go.Spot(0, 0.5, 8, 0),
|
@@ -4367,7 +4408,10 @@ class AtoDefaultGojsEditor {
|
|
4367
4408
|
}), this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true), this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true), this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false), this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false));
|
4368
4409
|
this.myDiagram.nodeTemplateMap.set(title, node);
|
4369
4410
|
}
|
4370
|
-
makeEntityTemplateEnergy(icon, title, size = {
|
4411
|
+
makeEntityTemplateEnergy(icon, title, size = {
|
4412
|
+
w: AtoGojsEditorModel.GRID_SIZE * 5,
|
4413
|
+
h: AtoGojsEditorModel.GRID_SIZE * 5,
|
4414
|
+
}) {
|
4371
4415
|
const self = this;
|
4372
4416
|
let node = this.$(go.Node, 'Spot', {
|
4373
4417
|
locationSpot: go.Spot.Center,
|
@@ -4391,7 +4435,11 @@ class AtoDefaultGojsEditor {
|
|
4391
4435
|
shadowBlur: 6,
|
4392
4436
|
shadowOffset: new go.Point(0, 2),
|
4393
4437
|
shadowColor: '#00000029',
|
4394
|
-
}, this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
4438
|
+
}, this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
4439
|
+
fill: null,
|
4440
|
+
stroke: 'dodgerblue',
|
4441
|
+
strokeWidth: 4,
|
4442
|
+
}), this.$(go.Placeholder, { padding: 3 })), this.$(go.Panel, 'Horizontal', {
|
4395
4443
|
alignment: go.Spot.TopRight,
|
4396
4444
|
alignmentFocus: go.Spot.Bottom,
|
4397
4445
|
background: 'white',
|
@@ -4448,7 +4496,10 @@ class AtoDefaultGojsEditor {
|
|
4448
4496
|
this.myDiagram.nodeTemplateMap.set(title, node);
|
4449
4497
|
}
|
4450
4498
|
// Plant Cell
|
4451
|
-
plantCellTemplate(icon, title, size = {
|
4499
|
+
plantCellTemplate(icon, title, size = {
|
4500
|
+
w: 260,
|
4501
|
+
h: AtoGojsEditorModel.PLANT_CELL_HEIGHT,
|
4502
|
+
}) {
|
4452
4503
|
const self = this;
|
4453
4504
|
let node = this.$(go.Group, 'Spot', {
|
4454
4505
|
locationSpot: go.Spot.Center,
|
@@ -4513,7 +4564,11 @@ class AtoDefaultGojsEditor {
|
|
4513
4564
|
shadowBlur: 6,
|
4514
4565
|
shadowOffset: new go.Point(0, 2),
|
4515
4566
|
shadowColor: '#00000029',
|
4516
|
-
}, this.$(go.Panel, 'Auto', { width: 170 }, this.$(go.Shape, {
|
4567
|
+
}, this.$(go.Panel, 'Auto', { width: 170 }, this.$(go.Shape, {
|
4568
|
+
fill: null,
|
4569
|
+
stroke: 'dodgerblue',
|
4570
|
+
strokeWidth: 4,
|
4571
|
+
}), this.$(go.Placeholder, { padding: 3 })), this.$(go.Panel, 'Horizontal', { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
|
4517
4572
|
// more
|
4518
4573
|
this.generateActionGroup([
|
4519
4574
|
AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
|
@@ -4521,7 +4576,19 @@ class AtoDefaultGojsEditor {
|
|
4521
4576
|
AtoDefaultGojsEditor.ENUM_ACTIONS.ONLY_DETAILS,
|
4522
4577
|
// DefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
|
4523
4578
|
AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
|
4524
|
-
])
|
4579
|
+
])
|
4580
|
+
// new go.Binding('visible', 'isNotAction', (x) => !x),
|
4581
|
+
)
|
4582
|
+
// this.$(
|
4583
|
+
// go.Panel,
|
4584
|
+
// 'Horizontal',
|
4585
|
+
// { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
|
4586
|
+
// this.generateActionGroup([DefaultGojsEditor.ENUM_ACTIONS.ONLY_DETAILS]),
|
4587
|
+
// new go.Binding('visible', '', (x) => {
|
4588
|
+
// return x?.isOnlyDetails && !x?.isNotAction ? true : false;
|
4589
|
+
// }),
|
4590
|
+
// ),
|
4591
|
+
),
|
4525
4592
|
}, new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), this.$(go.Panel, 'Auto', { width: size.w, height: size.h },
|
4526
4593
|
// this.$(go.Shape, 'RoundedRectangle', {
|
4527
4594
|
// fill: 'white',
|
@@ -4552,7 +4619,8 @@ class AtoDefaultGojsEditor {
|
|
4552
4619
|
alignment: go.Spot.Center,
|
4553
4620
|
desiredSize: new go.Size(size.w - 20, size.h - 65),
|
4554
4621
|
imageStretch: go.GraphObject.Uniform,
|
4555
|
-
}, new go.Binding('source', 'pathImage', (x) => x ??
|
4622
|
+
}, new go.Binding('source', 'pathImage', (x) => x ??
|
4623
|
+
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL].icon)), this.$(go.TextBlock, {
|
4556
4624
|
row: 2,
|
4557
4625
|
margin: new go.Margin(10, 0, 3, 0),
|
4558
4626
|
editable: true,
|
@@ -4571,10 +4639,18 @@ class AtoDefaultGojsEditor {
|
|
4571
4639
|
}), this.$(go.Panel, 'Vertical', {
|
4572
4640
|
alignment: go.Spot.Right,
|
4573
4641
|
alignmentFocus: new go.Spot(1, 0.5, -8, 0),
|
4574
|
-
})
|
4642
|
+
})
|
4643
|
+
// this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true),
|
4644
|
+
// this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true),
|
4645
|
+
// this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false),
|
4646
|
+
// this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false),
|
4647
|
+
);
|
4575
4648
|
this.myDiagram.nodeTemplateMap.set(title, node);
|
4576
4649
|
}
|
4577
|
-
makeEntityWithdrawOrDischarge(icon, title, size = {
|
4650
|
+
makeEntityWithdrawOrDischarge(icon, title, size = {
|
4651
|
+
w: AtoGojsEditorModel.GRID_SIZE * 5,
|
4652
|
+
h: AtoGojsEditorModel.GRID_SIZE * 5,
|
4653
|
+
}) {
|
4578
4654
|
const self = this;
|
4579
4655
|
let node = this.$(go.Node, 'Spot', {
|
4580
4656
|
locationSpot: go.Spot.Center,
|
@@ -4593,7 +4669,11 @@ class AtoDefaultGojsEditor {
|
|
4593
4669
|
},
|
4594
4670
|
selectionAdornmentTemplate: this._initialOptions.isReadOnly
|
4595
4671
|
? null
|
4596
|
-
: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
4672
|
+
: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
4673
|
+
fill: null,
|
4674
|
+
stroke: 'dodgerblue',
|
4675
|
+
strokeWidth: 4,
|
4676
|
+
}), this.$(go.Placeholder, { padding: 3 })), this.$(go.Panel, 'Horizontal', { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom }, this.generateActionGroup([
|
4597
4677
|
AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
|
4598
4678
|
AtoDefaultGojsEditor.ENUM_ACTIONS.DETAILS,
|
4599
4679
|
AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
|
@@ -4632,7 +4712,15 @@ class AtoDefaultGojsEditor {
|
|
4632
4712
|
toolTip: this.$('ToolTip', this.$(go.TextBlock, {
|
4633
4713
|
margin: 4,
|
4634
4714
|
}, new go.Binding('text', 'name').makeTwoWay())),
|
4635
|
-
}, new go.Binding('text', 'name').makeTwoWay()
|
4715
|
+
}, new go.Binding('text', 'name').makeTwoWay()
|
4716
|
+
// {
|
4717
|
+
// // define a tooltip for each node that displays the color as text
|
4718
|
+
// toolTip: this.$(
|
4719
|
+
// 'ToolTip',
|
4720
|
+
// this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name')),
|
4721
|
+
// ), // end of Adornment
|
4722
|
+
// },
|
4723
|
+
))), this.$(go.Panel, 'Vertical', {
|
4636
4724
|
alignment: go.Spot.Left,
|
4637
4725
|
alignmentFocus: new go.Spot(0, 0.5, 8, 0),
|
4638
4726
|
}), this.$(go.Panel, 'Vertical', {
|
@@ -4662,7 +4750,10 @@ class AtoDefaultGojsEditor {
|
|
4662
4750
|
const fromnode = button.part.adornedPart;
|
4663
4751
|
const diagram = fromnode.diagram;
|
4664
4752
|
const model = diagram.model;
|
4665
|
-
const nodedata = {
|
4753
|
+
const nodedata = {
|
4754
|
+
...model.copyNodeData(data),
|
4755
|
+
key: UtilsService.generateUUID(),
|
4756
|
+
};
|
4666
4757
|
model.addNodeData(nodedata);
|
4667
4758
|
const newnode = diagram.findNodeForData(nodedata);
|
4668
4759
|
const linkdata = model.copyLinkData({});
|
@@ -4717,25 +4808,31 @@ class AtoDefaultGojsEditor {
|
|
4717
4808
|
return !!obj.part?.['ob']?.id;
|
4718
4809
|
}
|
4719
4810
|
if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME &&
|
4720
|
-
obj.part?.['ob']?.type !==
|
4811
|
+
obj.part?.['ob']?.type !==
|
4812
|
+
AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
|
4721
4813
|
AtoGojsEditorModel.TYPE_COMPONENT_WATER?.includes(obj.part?.['ob']?.systemType) &&
|
4722
|
-
obj.part?.['ob']?.topologyType !==
|
4723
|
-
|
4814
|
+
obj.part?.['ob']?.topologyType !==
|
4815
|
+
ATO_ECOMPONENT_PLANT_TYPE.WATER &&
|
4816
|
+
obj.part?.['ob']?.topologyType !==
|
4817
|
+
ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL) {
|
4724
4818
|
return false;
|
4725
4819
|
}
|
4726
4820
|
if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW &&
|
4727
4821
|
self.plantSatus === ATO_EPlantType.BASIC_PLANT &&
|
4728
|
-
obj.part?.data?.type ===
|
4822
|
+
obj.part?.data?.type ===
|
4823
|
+
AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
|
4729
4824
|
return false;
|
4730
4825
|
}
|
4731
4826
|
return true;
|
4732
4827
|
}).map((e) => {
|
4733
|
-
if (ATO_ECOMPONENT_PLANT_TYPE.STEAM ===
|
4828
|
+
if (ATO_ECOMPONENT_PLANT_TYPE.STEAM ===
|
4829
|
+
obj.part?.['ob']?.topologyType &&
|
4734
4830
|
e === AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT) {
|
4735
4831
|
return AtoDefaultGojsEditor.ENUM_ACTIONS.DATA_MAPPING;
|
4736
4832
|
}
|
4737
4833
|
if (e === AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS &&
|
4738
|
-
obj?.part?.['ob']?.systemType ===
|
4834
|
+
obj?.part?.['ob']?.systemType ===
|
4835
|
+
AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
|
4739
4836
|
return AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD;
|
4740
4837
|
}
|
4741
4838
|
return e;
|
@@ -4776,7 +4873,8 @@ class AtoDefaultGojsEditor {
|
|
4776
4873
|
break;
|
4777
4874
|
case AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME:
|
4778
4875
|
onClickFn = () => {
|
4779
|
-
if (obj.part?.data?.type ===
|
4876
|
+
if (obj.part?.data?.type ===
|
4877
|
+
AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
|
4780
4878
|
self.onRename.emit({
|
4781
4879
|
left: e?.['Wr']?.x - 50,
|
4782
4880
|
top: e?.['Wr']?.y,
|
@@ -4806,7 +4904,7 @@ class AtoDefaultGojsEditor {
|
|
4806
4904
|
name: `${AtoGojsEditorModel.ACTION_RIGHT_MENU_GROUP.DATA_BOX}_${moment().valueOf()}`,
|
4807
4905
|
color: AtoGojsEditorModel.ENUM_COLORS.BLUE,
|
4808
4906
|
},
|
4809
|
-
...self.setProFOrNewNode(self)
|
4907
|
+
...self.setProFOrNewNode(self),
|
4810
4908
|
},
|
4811
4909
|
}));
|
4812
4910
|
};
|
@@ -4863,7 +4961,10 @@ class AtoDefaultGojsEditor {
|
|
4863
4961
|
const dragData = button._dragData;
|
4864
4962
|
const diagram = fromnode.diagram;
|
4865
4963
|
const model = diagram.model;
|
4866
|
-
const nodedata = {
|
4964
|
+
const nodedata = {
|
4965
|
+
...model.copyNodeData(dragData),
|
4966
|
+
key: UtilsService.generateUUID(),
|
4967
|
+
};
|
4867
4968
|
model.addNodeData({
|
4868
4969
|
...nodedata,
|
4869
4970
|
isEditable: true,
|
@@ -4883,7 +4984,8 @@ class AtoDefaultGojsEditor {
|
|
4883
4984
|
if (nodedata?.movable !== undefined && nodedata?.movable !== null) {
|
4884
4985
|
newnode.movable = nodedata?.movable;
|
4885
4986
|
}
|
4886
|
-
newnode.location = new go.Point(fromnode.location.x + 160, fromnode.location.y +
|
4987
|
+
newnode.location = new go.Point(fromnode.location.x + 160, fromnode.location.y +
|
4988
|
+
this.findLocYFromnode(fromnode) * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT);
|
4887
4989
|
e.diagram.commitTransaction('Create Node and Link');
|
4888
4990
|
}
|
4889
4991
|
findLocYFromnode(fromnode) {
|
@@ -4903,12 +5005,20 @@ class AtoDefaultGojsEditor {
|
|
4903
5005
|
return this.isEmptyYLoc(locYAlreadyExist, i);
|
4904
5006
|
}
|
4905
5007
|
isEmptyYLoc(locYAlreadyExist, i) {
|
4906
|
-
if (!_.some(locYAlreadyExist, (x) => x <
|
4907
|
-
|
5008
|
+
if (!_.some(locYAlreadyExist, (x) => x <
|
5009
|
+
i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT +
|
5010
|
+
AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
|
5011
|
+
x >
|
5012
|
+
i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT -
|
5013
|
+
AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
|
4908
5014
|
return i;
|
4909
5015
|
}
|
4910
|
-
if (!_.some(locYAlreadyExist, (x) => x <
|
4911
|
-
|
5016
|
+
if (!_.some(locYAlreadyExist, (x) => x <
|
5017
|
+
-i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT +
|
5018
|
+
AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
|
5019
|
+
x >
|
5020
|
+
-i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT -
|
5021
|
+
AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
|
4912
5022
|
return -i;
|
4913
5023
|
}
|
4914
5024
|
return null;
|
@@ -4944,7 +5054,9 @@ class AtoDefaultGojsEditor {
|
|
4944
5054
|
width: 40,
|
4945
5055
|
height: 40,
|
4946
5056
|
alignment: align,
|
4947
|
-
stretch: horizontal
|
5057
|
+
stretch: horizontal
|
5058
|
+
? go.GraphObject.Horizontal
|
5059
|
+
: go.GraphObject.Vertical,
|
4948
5060
|
portId: name,
|
4949
5061
|
fromSpot: spot,
|
4950
5062
|
fromLinkable: output,
|
@@ -4991,7 +5103,35 @@ class AtoDefaultGojsEditor {
|
|
4991
5103
|
stroke: '#919CA5',
|
4992
5104
|
width: 40,
|
4993
5105
|
height: 40, // Match the panel's height
|
4994
|
-
})
|
5106
|
+
})
|
5107
|
+
// this.$(
|
5108
|
+
// go.TextBlock,
|
5109
|
+
// {
|
5110
|
+
// name: 'textBlock',
|
5111
|
+
// margin: 4,
|
5112
|
+
// text: '\uf0da', // Mã Unicode tương ứng với fa-caret-left
|
5113
|
+
// font: '900 12px "Font Awesome 6 Pro"',
|
5114
|
+
// stroke: 'white', // Đặt màu chữ thành màu trắng
|
5115
|
+
// cursor: 'pointer',
|
5116
|
+
// visible: false,
|
5117
|
+
// },
|
5118
|
+
// new go.Binding('text', 'name', (_) => {
|
5119
|
+
// switch (name) {
|
5120
|
+
// case 'T':
|
5121
|
+
// case 'B': {
|
5122
|
+
// return '\uf0d7';
|
5123
|
+
// }
|
5124
|
+
// case 'L':
|
5125
|
+
// case 'R': {
|
5126
|
+
// return '\uf0da';
|
5127
|
+
// }
|
5128
|
+
// default: {
|
5129
|
+
// return '\uf0d7';
|
5130
|
+
// }
|
5131
|
+
// }
|
5132
|
+
// }),
|
5133
|
+
// ),
|
5134
|
+
);
|
4995
5135
|
}
|
4996
5136
|
makePort(name, align, spot, output, input) {
|
4997
5137
|
// if (this._initialOptions.isReadOnly) {
|
@@ -5006,7 +5146,9 @@ class AtoDefaultGojsEditor {
|
|
5006
5146
|
width: horizontal ? NaN : 8,
|
5007
5147
|
height: !horizontal ? NaN : 8,
|
5008
5148
|
alignment: align,
|
5009
|
-
stretch: horizontal
|
5149
|
+
stretch: horizontal
|
5150
|
+
? go.GraphObject.Horizontal
|
5151
|
+
: go.GraphObject.Vertical,
|
5010
5152
|
portId: name,
|
5011
5153
|
fromSpot: spot,
|
5012
5154
|
fromLinkable: output,
|
@@ -5055,10 +5197,12 @@ class AtoDefaultGojsEditor {
|
|
5055
5197
|
return false;
|
5056
5198
|
}
|
5057
5199
|
if (data?.flowOfPlantCell) {
|
5058
|
-
if (data?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.INFLOW &&
|
5200
|
+
if (data?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.INFLOW &&
|
5201
|
+
name === 'L') {
|
5059
5202
|
return true;
|
5060
5203
|
}
|
5061
|
-
if (data?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.OUTFLOW &&
|
5204
|
+
if (data?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.OUTFLOW &&
|
5205
|
+
name === 'R') {
|
5062
5206
|
return true;
|
5063
5207
|
}
|
5064
5208
|
return false;
|
@@ -5152,7 +5296,84 @@ class AtoDefaultGojsEditor {
|
|
5152
5296
|
// stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
|
5153
5297
|
strokeWidth: 2,
|
5154
5298
|
// strokeDashArray: [5, 5],
|
5155
|
-
})
|
5299
|
+
})
|
5300
|
+
// this.$(go.Placeholder),
|
5301
|
+
// this.$(go.Placeholder, { padding: new go.Margin(0, 0, 0, 0) }),
|
5302
|
+
)
|
5303
|
+
// this.$(go.TextBlock, title, {
|
5304
|
+
// row: 0,
|
5305
|
+
// margin: new go.Margin(0, 0, 0, 0),
|
5306
|
+
// stroke: '#444444',
|
5307
|
+
// font: 'normal 10pt Arial',
|
5308
|
+
// textAlign: 'center',
|
5309
|
+
// alignment: go.Spot.Left,
|
5310
|
+
// },
|
5311
|
+
// new go.Binding('text', 'key').makeTwoWay(),),
|
5312
|
+
// this.$(
|
5313
|
+
// go.Panel,
|
5314
|
+
// 'Table',
|
5315
|
+
// {
|
5316
|
+
// alignment: go.Spot.TopLeft,
|
5317
|
+
// alignmentFocus: new go.Spot(0, 0, -10, -10),
|
5318
|
+
// // padding: new go.Margin(0, 0, 50, 0),
|
5319
|
+
// },
|
5320
|
+
// this.$(
|
5321
|
+
// go.Panel,
|
5322
|
+
// 'Horizontal',
|
5323
|
+
// {
|
5324
|
+
// row: 0,
|
5325
|
+
// alignment: go.Spot.Left,
|
5326
|
+
// },
|
5327
|
+
// this.$(go.Picture, icon, {
|
5328
|
+
// row: 0,
|
5329
|
+
// // alignment: go.Spot.Center,
|
5330
|
+
// alignment: go.Spot.Left,
|
5331
|
+
// maxSize: new go.Size(40, 40),
|
5332
|
+
// imageStretch: go.GraphObject.Uniform,
|
5333
|
+
// }),
|
5334
|
+
// this.$(
|
5335
|
+
// go.Panel,
|
5336
|
+
// 'Table',
|
5337
|
+
// {
|
5338
|
+
// column: 1,
|
5339
|
+
// defaultAlignment: go.Spot.Left,
|
5340
|
+
// alignmentFocus: new go.Spot(0, 0, 0, 20),
|
5341
|
+
// },
|
5342
|
+
// this.$(go.TextBlock, title, {
|
5343
|
+
// row: 0,
|
5344
|
+
// margin: new go.Margin(3, 3, 5, 10),
|
5345
|
+
// // maxSize: new go.Size(size.w - 20, NaN),
|
5346
|
+
// stroke: '#444444',
|
5347
|
+
// font: 'normal 10pt Arial',
|
5348
|
+
// textAlign: 'center',
|
5349
|
+
// alignment: go.Spot.Left,
|
5350
|
+
// }),
|
5351
|
+
// this.$(
|
5352
|
+
// go.TextBlock,
|
5353
|
+
// {
|
5354
|
+
// row: 1,
|
5355
|
+
// margin: new go.Margin(0, 3, 3, 10),
|
5356
|
+
// editable: true,
|
5357
|
+
// // maxSize: new go.Size(size.w - 20, 40),
|
5358
|
+
// stroke: '#000D42',
|
5359
|
+
// font: 'bold 10pt Arial',
|
5360
|
+
// textAlign: 'center',
|
5361
|
+
// wrap: go.TextBlock.None,
|
5362
|
+
// overflow: go.TextBlock.OverflowEllipsis,
|
5363
|
+
// },
|
5364
|
+
// new go.Binding('text', 'name').makeTwoWay(),
|
5365
|
+
// {
|
5366
|
+
// // define a tooltip for each node that displays the color as text
|
5367
|
+
// toolTip: this.$(
|
5368
|
+
// 'ToolTip',
|
5369
|
+
// this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name')),
|
5370
|
+
// ), // end of Adornment
|
5371
|
+
// },
|
5372
|
+
// ),
|
5373
|
+
// ),
|
5374
|
+
// ),
|
5375
|
+
// ),
|
5376
|
+
);
|
5156
5377
|
this.myDiagram.groupTemplateMap.set(title, node);
|
5157
5378
|
}
|
5158
5379
|
makeGroupTemplate(icon, title, size = { w: 80, h: 80 }) {
|
@@ -5287,7 +5508,9 @@ class AtoDefaultGojsEditor {
|
|
5287
5508
|
// imageStretch: go.GraphObject.Uniform,
|
5288
5509
|
// margin: new go.Margin(130, 0, 0, 0),
|
5289
5510
|
}, new go.Binding('margin', 'margin'), new go.Binding('width', 'width'), new go.Binding('height', 'height'), new go.Binding('source', '', (data) => {
|
5290
|
-
return data?.source
|
5511
|
+
return data?.source
|
5512
|
+
? data?.source
|
5513
|
+
: AtoGojsEditorModel.IMAGE_RO_WATER_TREATMENT_PATH;
|
5291
5514
|
}))));
|
5292
5515
|
this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE, node);
|
5293
5516
|
}
|
@@ -5371,7 +5594,8 @@ class AtoDefaultGojsEditor {
|
|
5371
5594
|
itemTemplate: this.$(go.Panel, 'TableRow', {
|
5372
5595
|
cursor: 'pointer',
|
5373
5596
|
click: (e, obj) => {
|
5374
|
-
if (obj.panel.part.data?.dataTable[obj.row]?.isEditable ===
|
5597
|
+
if (obj.panel.part.data?.dataTable[obj.row]?.isEditable ===
|
5598
|
+
false) {
|
5375
5599
|
return;
|
5376
5600
|
}
|
5377
5601
|
self.onClikParamOfTable.emit({
|
@@ -5379,7 +5603,12 @@ class AtoDefaultGojsEditor {
|
|
5379
5603
|
});
|
5380
5604
|
},
|
5381
5605
|
background: 'transparent',
|
5382
|
-
}, this.$(go.TextBlock, '', {
|
5606
|
+
}, this.$(go.TextBlock, '', {
|
5607
|
+
column: 0,
|
5608
|
+
margin: 2,
|
5609
|
+
textAlign: 'left',
|
5610
|
+
alignment: go.Spot.Left,
|
5611
|
+
}, new go.Binding('text', '', (data, panel) => {
|
5383
5612
|
return data?.name;
|
5384
5613
|
})), this.$(go.Panel, 'Table', {
|
5385
5614
|
column: 1,
|
@@ -5403,7 +5632,8 @@ class AtoDefaultGojsEditor {
|
|
5403
5632
|
? `${data?.tagName || ''} `
|
5404
5633
|
: ''}${data?.value}`;
|
5405
5634
|
}), new go.Binding('visible', '', (data) => {
|
5406
|
-
if (!!this._initialOptions.isReadOnly &&
|
5635
|
+
if (!!this._initialOptions.isReadOnly &&
|
5636
|
+
data?.tagName) {
|
5407
5637
|
return true;
|
5408
5638
|
}
|
5409
5639
|
return !!data?.value;
|
@@ -5421,7 +5651,7 @@ class AtoDefaultGojsEditor {
|
|
5421
5651
|
alignment: go.Spot.Right,
|
5422
5652
|
column: 1,
|
5423
5653
|
margin: new go.Margin(0, 0, 0, 5),
|
5424
|
-
source: ICONS_BASE64[
|
5654
|
+
source: ICONS_BASE64['uf044'],
|
5425
5655
|
cursor: 'pointer',
|
5426
5656
|
visible: false,
|
5427
5657
|
toolTip: this.$('ToolTip', this.$(go.TextBlock, {
|
@@ -5436,7 +5666,9 @@ class AtoDefaultGojsEditor {
|
|
5436
5666
|
}), new go.Binding('opacity', '', (data, panel) => {
|
5437
5667
|
return data?.isEditable === false ? 0.6 : 1;
|
5438
5668
|
})))),
|
5439
|
-
}
|
5669
|
+
}
|
5670
|
+
// new go.Binding('text', 'name')
|
5671
|
+
)));
|
5440
5672
|
this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, node);
|
5441
5673
|
}
|
5442
5674
|
makeMassBalance() {
|
@@ -5700,7 +5932,8 @@ class AtoDefaultGojsEditor {
|
|
5700
5932
|
// : node?.layout;
|
5701
5933
|
if (data?.layoutValue !== data?.layoutValueClone) {
|
5702
5934
|
data.layoutValueClone = data?.layoutValue;
|
5703
|
-
return data?.layoutValue ===
|
5935
|
+
return data?.layoutValue ===
|
5936
|
+
AtoGojsEditorModel.ENUM_LAYOUT_EDITOR.AUTO
|
5704
5937
|
? self.$(go.LayeredDigraphLayout, { direction: 0 })
|
5705
5938
|
: self.$(go.Layout);
|
5706
5939
|
}
|
@@ -5799,10 +6032,16 @@ class AtoDefaultGojsEditor {
|
|
5799
6032
|
})));
|
5800
6033
|
this.myDiagram.groupTemplateMap.set(title, node);
|
5801
6034
|
}
|
5802
|
-
makeGroupZoneTemplate(size = {
|
6035
|
+
makeGroupZoneTemplate(size = {
|
6036
|
+
w: AtoGojsEditorModel.GRID_SIZE * 14,
|
6037
|
+
h: AtoGojsEditorModel.GRID_SIZE * 5,
|
6038
|
+
}) {
|
5803
6039
|
const self = this;
|
5804
6040
|
let node = this.$(go.Group, 'Vertical', {
|
5805
|
-
layout: this.$(go.GridLayout, {
|
6041
|
+
layout: this.$(go.GridLayout, {
|
6042
|
+
wrappingColumn: 1,
|
6043
|
+
spacing: new go.Size(0, 0),
|
6044
|
+
}),
|
5806
6045
|
}, {
|
5807
6046
|
locationSpot: go.Spot.Center,
|
5808
6047
|
mouseOver: function (e, obj) {
|
@@ -5825,7 +6064,11 @@ class AtoDefaultGojsEditor {
|
|
5825
6064
|
shadowBlur: 6,
|
5826
6065
|
shadowOffset: new go.Point(0, 2),
|
5827
6066
|
shadowColor: '#00000029',
|
5828
|
-
}, this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
6067
|
+
}, this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
6068
|
+
fill: null,
|
6069
|
+
stroke: 'dodgerblue',
|
6070
|
+
strokeWidth: 4,
|
6071
|
+
}), this.$(go.Placeholder, { padding: 3 })), this.$(go.Panel, 'Horizontal', {
|
5829
6072
|
alignment: go.Spot.TopRight,
|
5830
6073
|
alignmentFocus: go.Spot.Bottom,
|
5831
6074
|
background: 'white',
|
@@ -5851,7 +6094,82 @@ class AtoDefaultGojsEditor {
|
|
5851
6094
|
AtoDefaultGojsEditor.ENUM_ACTIONS.DETAILS,
|
5852
6095
|
AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
|
5853
6096
|
AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
|
5854
|
-
])
|
6097
|
+
])
|
6098
|
+
// this.$(
|
6099
|
+
// // Edit Text
|
6100
|
+
// 'Button',
|
6101
|
+
// {
|
6102
|
+
// click: self.editTextGroupZone,
|
6103
|
+
// 'ButtonBorder.strokeWidth': 0,
|
6104
|
+
// 'ButtonBorder.fill': 'white',
|
6105
|
+
// },
|
6106
|
+
// this.$(go.TextBlock, {
|
6107
|
+
// margin: 4,
|
6108
|
+
// text: '\ue1bf',
|
6109
|
+
// font: '20px "Font Awesome 6 Pro"',
|
6110
|
+
// cursor: 'pointer',
|
6111
|
+
// stroke: '#2c2c2c',
|
6112
|
+
// }),
|
6113
|
+
// ),
|
6114
|
+
// this.$(
|
6115
|
+
// // Open Detail
|
6116
|
+
// 'Button',
|
6117
|
+
// {
|
6118
|
+
// click: (e, obj: any) => {
|
6119
|
+
// const node = obj.part;
|
6120
|
+
// self.onOpenDetail.emit({
|
6121
|
+
// node,
|
6122
|
+
// });
|
6123
|
+
// },
|
6124
|
+
// 'ButtonBorder.strokeWidth': 0,
|
6125
|
+
// 'ButtonBorder.fill': 'white',
|
6126
|
+
// },
|
6127
|
+
//
|
6128
|
+
// this.$(go.TextBlock, {
|
6129
|
+
// margin: 4,
|
6130
|
+
// text: '\ue49a',
|
6131
|
+
// font: '20px "Font Awesome 6 Pro"',
|
6132
|
+
// cursor: 'pointer',
|
6133
|
+
// }),
|
6134
|
+
// ),
|
6135
|
+
// !this._initialOptions.isReadOnly
|
6136
|
+
// ? this.$(
|
6137
|
+
// 'Button',
|
6138
|
+
// {
|
6139
|
+
// actionMove: self.dragNewNode, // defined below, to support dragging from the button
|
6140
|
+
// _dragData: {
|
6141
|
+
// type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE,
|
6142
|
+
// name: 0,
|
6143
|
+
// color: AtoGojsEditorModel.ENUM_COLORS.BLUE,
|
6144
|
+
// },
|
6145
|
+
// click: self.clickNewNode, // defined below, to support a click on the button
|
6146
|
+
// 'ButtonBorder.strokeWidth': 0,
|
6147
|
+
// 'ButtonBorder.fill': 'white',
|
6148
|
+
// },
|
6149
|
+
// this.$(go.TextBlock, {
|
6150
|
+
// margin: 4,
|
6151
|
+
// text: '\ue157',
|
6152
|
+
// font: '20px "Font Awesome 6 Pro"',
|
6153
|
+
// cursor: 'pointer',
|
6154
|
+
// stroke: '#2c2c2c',
|
6155
|
+
// }),
|
6156
|
+
// )
|
6157
|
+
// : {},
|
6158
|
+
// this.$(
|
6159
|
+
// 'Button',
|
6160
|
+
// {
|
6161
|
+
// click: self.deleteNode,
|
6162
|
+
// 'ButtonBorder.strokeWidth': 0,
|
6163
|
+
// 'ButtonBorder.fill': 'white',
|
6164
|
+
// },
|
6165
|
+
// this.$(go.TextBlock, {
|
6166
|
+
// margin: 4,
|
6167
|
+
// text: '\uf2ed',
|
6168
|
+
// font: '20px "Font Awesome 6 Pro"',
|
6169
|
+
// cursor: 'pointer',
|
6170
|
+
// }),
|
6171
|
+
// ),
|
6172
|
+
)),
|
5855
6173
|
}, this.$(go.Panel, 'Auto', this.$(go.Shape, 'RoundedRectangle', {
|
5856
6174
|
fill: 'transparent',
|
5857
6175
|
stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
|
@@ -5879,7 +6197,10 @@ class AtoDefaultGojsEditor {
|
|
5879
6197
|
})), this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true), this.makePort('L', go.Spot.Left, go.Spot.LeftSide, true, true), this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, true), this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false)), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify));
|
5880
6198
|
this.myDiagram.groupTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.ZONE, node);
|
5881
6199
|
}
|
5882
|
-
makeZoneItemTemplate(size = {
|
6200
|
+
makeZoneItemTemplate(size = {
|
6201
|
+
w: AtoGojsEditorModel.GRID_SIZE * 12,
|
6202
|
+
h: AtoGojsEditorModel.GRID_SIZE * 2,
|
6203
|
+
}) {
|
5883
6204
|
const self = this;
|
5884
6205
|
const node = this.$(go.Node, 'Auto',
|
5885
6206
|
// {
|
@@ -5962,7 +6283,10 @@ class AtoDefaultGojsEditor {
|
|
5962
6283
|
value: x?.quantity,
|
5963
6284
|
unit: x?.unit,
|
5964
6285
|
});
|
5965
|
-
return formatted.shortenedNumber +
|
6286
|
+
return (formatted.shortenedNumber +
|
6287
|
+
' ' +
|
6288
|
+
formatted.unitPrefixes +
|
6289
|
+
x?.unit ?? '');
|
5966
6290
|
}), new go.Binding('visible', 'data', (x) => typeof x?.quantity === 'number')), this.$(go.TextBlock, {
|
5967
6291
|
margin: new go.Margin(0, 5, 10, 0),
|
5968
6292
|
textAlign: 'center',
|
@@ -5973,7 +6297,10 @@ class AtoDefaultGojsEditor {
|
|
5973
6297
|
}, new go.Binding('visible', 'data', (x) => typeof x?.quantity === 'number'))))));
|
5974
6298
|
this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.ZONE_ENERGY_ITEM, node);
|
5975
6299
|
}
|
5976
|
-
makeSpecialTemplate(icon, title, size = {
|
6300
|
+
makeSpecialTemplate(icon, title, size = {
|
6301
|
+
w: AtoGojsEditorModel.GRID_SIZE * 5,
|
6302
|
+
h: AtoGojsEditorModel.GRID_SIZE * 5,
|
6303
|
+
}) {
|
5977
6304
|
let node = null;
|
5978
6305
|
switch (title) {
|
5979
6306
|
case AtoGojsEditorModel.ENUM_TEMPLATES.SPECIAL_PROCESS:
|
@@ -6214,7 +6541,8 @@ class AtoDefaultGojsEditor {
|
|
6214
6541
|
// return;
|
6215
6542
|
// }
|
6216
6543
|
// const newDocument = newWindow?.document;
|
6217
|
-
if (!this.myDiagram?.model?.nodeDataArray?.length &&
|
6544
|
+
if (!this.myDiagram?.model?.nodeDataArray?.length &&
|
6545
|
+
!this.myDiagram?.model?.linkDataArray?.length) {
|
6218
6546
|
return;
|
6219
6547
|
}
|
6220
6548
|
const svg = this.myDiagram.makeSvg({
|
@@ -6235,7 +6563,8 @@ class AtoDefaultGojsEditor {
|
|
6235
6563
|
svgElement.setAttribute('stroke', 'rgba(64, 181, 206, 0.6)');
|
6236
6564
|
}
|
6237
6565
|
// Empty Value
|
6238
|
-
if (graphObject?.name === 'textBlockValue' ||
|
6566
|
+
if (graphObject?.name === 'textBlockValue' ||
|
6567
|
+
graphObject?.name === 'textBlockUnitPrefixes') {
|
6239
6568
|
svgElement.textContent = '';
|
6240
6569
|
}
|
6241
6570
|
if (svgElement.clipPath) {
|
@@ -6585,6 +6914,9 @@ var ENUM_ASSET_PARAMETERS;
|
|
6585
6914
|
// Steam
|
6586
6915
|
ENUM_ASSET_PARAMETERS["PHOSPHATE"] = "Phosphate";
|
6587
6916
|
ENUM_ASSET_PARAMETERS["M_AKALINITY"] = "M-Akalinity";
|
6917
|
+
// For Boiler - view Flow
|
6918
|
+
ENUM_ASSET_PARAMETERS["FLOW"] = "Flow";
|
6919
|
+
ENUM_ASSET_PARAMETERS["FLOW_RATE"] = "Flow Rate";
|
6588
6920
|
})(ENUM_ASSET_PARAMETERS || (ENUM_ASSET_PARAMETERS = {}));
|
6589
6921
|
var WATER_SYSTEMS_NAME;
|
6590
6922
|
(function (WATER_SYSTEMS_NAME) {
|
@@ -6599,9 +6931,19 @@ var WATER_SYSTEMS_NAME;
|
|
6599
6931
|
WATER_SYSTEMS_NAME["SYSTEM_KPIS"] = "System KPI's";
|
6600
6932
|
// For Boiler
|
6601
6933
|
WATER_SYSTEMS_NAME["CONDENSATE_RETURN"] = "Condensate Return";
|
6934
|
+
WATER_SYSTEMS_NAME["CONDENSATE_RETURN__FLOW"] = "Condensate Return Flow";
|
6935
|
+
WATER_SYSTEMS_NAME["CONDENSATE_RETURN__CHEMISTRY"] = "Condensate Return Chemistry";
|
6602
6936
|
WATER_SYSTEMS_NAME["BOILER_FEED_WATER"] = "Boiler Feed Water";
|
6937
|
+
WATER_SYSTEMS_NAME["BOILER_FEED_WATER__FLOW"] = "Boiler Feed Water Flow";
|
6938
|
+
WATER_SYSTEMS_NAME["BOILER_FEED_WATER__CHEMISTRY"] = "Boiler Feed Water Chemistry";
|
6603
6939
|
WATER_SYSTEMS_NAME["STEAM"] = "Steam";
|
6940
|
+
WATER_SYSTEMS_NAME["STEAM__FLOW"] = "Steam Flow";
|
6941
|
+
WATER_SYSTEMS_NAME["STEAM__CHEMISTRY"] = "Steam Chemistry";
|
6604
6942
|
WATER_SYSTEMS_NAME["BOILER_WATER"] = "Boiler Water";
|
6943
|
+
WATER_SYSTEMS_NAME["BOILER_WATER__FLOW"] = "Boiler Water Flow";
|
6944
|
+
WATER_SYSTEMS_NAME["BOILER_WATER__CHEMISTRY"] = "Boiler Water Chemistry";
|
6945
|
+
WATER_SYSTEMS_NAME["STEAM_LOSS"] = "Steam Loss";
|
6946
|
+
WATER_SYSTEMS_NAME["BLOWDOWN"] = "Blowdown";
|
6605
6947
|
})(WATER_SYSTEMS_NAME || (WATER_SYSTEMS_NAME = {}));
|
6606
6948
|
const DATA_ASSET_PARAMETER_FIELDS = {
|
6607
6949
|
[ENUM_ASSET_PARAMETERS.FEED_FLOW_RATE]: {
|
@@ -6773,7 +7115,7 @@ const DATA_ASSET_PARAMETER_FIELDS = {
|
|
6773
7115
|
key: ENUM_ASSET_PARAMETERS.KPI_ATP,
|
6774
7116
|
waterSystem: WATER_SYSTEMS_NAME.SYSTEM_KPIS,
|
6775
7117
|
},
|
6776
|
-
// Boiler
|
7118
|
+
// Boiler for view Chemistry
|
6777
7119
|
[ENUM_ASSET_PARAMETERS.SPECIFIC_CONDUCTIVITY]: {
|
6778
7120
|
name: ENUM_ASSET_PARAMETERS.SPECIFIC_CONDUCTIVITY,
|
6779
7121
|
key: ENUM_ASSET_PARAMETERS.SPECIFIC_CONDUCTIVITY,
|
@@ -6798,6 +7140,15 @@ const DATA_ASSET_PARAMETER_FIELDS = {
|
|
6798
7140
|
name: ENUM_ASSET_PARAMETERS.M_AKALINITY,
|
6799
7141
|
key: ENUM_ASSET_PARAMETERS.M_AKALINITY,
|
6800
7142
|
},
|
7143
|
+
// Boiler for view Flow
|
7144
|
+
[ENUM_ASSET_PARAMETERS.FLOW]: {
|
7145
|
+
name: ENUM_ASSET_PARAMETERS.FLOW,
|
7146
|
+
key: ENUM_ASSET_PARAMETERS.FLOW,
|
7147
|
+
},
|
7148
|
+
[ENUM_ASSET_PARAMETERS.FLOW_RATE]: {
|
7149
|
+
name: ENUM_ASSET_PARAMETERS.FLOW_RATE,
|
7150
|
+
key: ENUM_ASSET_PARAMETERS.FLOW_RATE,
|
7151
|
+
},
|
6801
7152
|
};
|
6802
7153
|
const DATA_WATER_SYSTEMS = {
|
6803
7154
|
[WATER_SYSTEMS_NAME.EVAPORATION_LOSS]: {
|
@@ -6879,6 +7230,18 @@ const DATA_WATER_SYSTEMS = {
|
|
6879
7230
|
borderTable: AtoGojsEditorModel.ENUM_COLORS.REGENT_ST_BLUE,
|
6880
7231
|
bgColor: AtoGojsEditorModel.ENUM_COLORS.AZURE,
|
6881
7232
|
},
|
7233
|
+
[WATER_SYSTEMS_NAME.STEAM_LOSS]: {
|
7234
|
+
title: WATER_SYSTEMS_NAME.STEAM_LOSS,
|
7235
|
+
color: AtoGojsEditorModel.ENUM_COLORS.FLAMINGO,
|
7236
|
+
borderTable: AtoGojsEditorModel.ENUM_COLORS.FLAMINGO,
|
7237
|
+
bgColor: AtoGojsEditorModel.ENUM_COLORS.SNOW,
|
7238
|
+
},
|
7239
|
+
[WATER_SYSTEMS_NAME.BLOWDOWN]: {
|
7240
|
+
title: WATER_SYSTEMS_NAME.BLOWDOWN,
|
7241
|
+
color: AtoGojsEditorModel.ENUM_COLORS.CARROT_ORANGE,
|
7242
|
+
borderTable: AtoGojsEditorModel.ENUM_COLORS.CARROT_ORANGE,
|
7243
|
+
bgColor: AtoGojsEditorModel.ENUM_COLORS.OLD_LACE,
|
7244
|
+
},
|
6882
7245
|
};
|
6883
7246
|
const ASSET_CATEGORY_PARAMS = {
|
6884
7247
|
[WATER_SYSTEMS_NAME.EVAPORATION_LOSS]: [
|
@@ -6922,23 +7285,24 @@ const ASSET_CATEGORY_PARAMS = {
|
|
6922
7285
|
};
|
6923
7286
|
// For Boiler
|
6924
7287
|
const ASSET_CATEGORY_PARAMS__BOILER = {
|
6925
|
-
|
7288
|
+
// For View Chemistry
|
7289
|
+
[WATER_SYSTEMS_NAME.MAKEUP_WATER__CHEMISTRY]: [
|
6926
7290
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.SPECIFIC_CONDUCTIVITY],
|
6927
7291
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PH],
|
6928
7292
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.SILICA],
|
6929
7293
|
],
|
6930
|
-
[WATER_SYSTEMS_NAME.
|
7294
|
+
[WATER_SYSTEMS_NAME.CONDENSATE_RETURN__CHEMISTRY]: [
|
6931
7295
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.SPECIFIC_CONDUCTIVITY],
|
6932
7296
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PH],
|
6933
7297
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TOTAL_IRON],
|
6934
7298
|
],
|
6935
|
-
[WATER_SYSTEMS_NAME.
|
7299
|
+
[WATER_SYSTEMS_NAME.STEAM__CHEMISTRY]: [
|
6936
7300
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.SPECIFIC_CONDUCTIVITY],
|
6937
7301
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PH],
|
6938
7302
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.SILICA],
|
6939
7303
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TOTAL_IRON],
|
6940
7304
|
],
|
6941
|
-
[WATER_SYSTEMS_NAME.
|
7305
|
+
[WATER_SYSTEMS_NAME.BOILER_FEED_WATER__CHEMISTRY]: [
|
6942
7306
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.SPECIFIC_CONDUCTIVITY],
|
6943
7307
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PH],
|
6944
7308
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TOTAL_IRON],
|
@@ -6950,6 +7314,31 @@ const ASSET_CATEGORY_PARAMS__BOILER = {
|
|
6950
7314
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.SILICA],
|
6951
7315
|
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.M_AKALINITY],
|
6952
7316
|
],
|
7317
|
+
// For View Flow
|
7318
|
+
[WATER_SYSTEMS_NAME.MAKEUP_WATER__FLOW]: [
|
7319
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW],
|
7320
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW_RATE],
|
7321
|
+
],
|
7322
|
+
[WATER_SYSTEMS_NAME.CONDENSATE_RETURN__FLOW]: [
|
7323
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW],
|
7324
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW_RATE],
|
7325
|
+
],
|
7326
|
+
[WATER_SYSTEMS_NAME.STEAM__FLOW]: [
|
7327
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW],
|
7328
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW_RATE],
|
7329
|
+
],
|
7330
|
+
[WATER_SYSTEMS_NAME.BOILER_FEED_WATER__FLOW]: [
|
7331
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW],
|
7332
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW_RATE],
|
7333
|
+
],
|
7334
|
+
[WATER_SYSTEMS_NAME.STEAM_LOSS]: [
|
7335
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW],
|
7336
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW_RATE],
|
7337
|
+
],
|
7338
|
+
[WATER_SYSTEMS_NAME.BLOWDOWN]: [
|
7339
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW],
|
7340
|
+
DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.FLOW_RATE],
|
7341
|
+
],
|
6953
7342
|
};
|
6954
7343
|
var COMPONENTS_GROUP_TYPE;
|
6955
7344
|
(function (COMPONENTS_GROUP_TYPE) {
|
@@ -7953,7 +8342,6 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
7953
8342
|
[AtoGojsEditorModel.ENUM_TYPES.BOILER]: {
|
7954
8343
|
nodeDataArray: [
|
7955
8344
|
{
|
7956
|
-
key: 86,
|
7957
8345
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
|
7958
8346
|
group: 100,
|
7959
8347
|
loc: '0 0',
|
@@ -7965,7 +8353,6 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
7965
8353
|
color: '#a8438d',
|
7966
8354
|
},
|
7967
8355
|
{
|
7968
|
-
key: 87,
|
7969
8356
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
|
7970
8357
|
group: 100,
|
7971
8358
|
data: {
|
@@ -7981,8 +8368,8 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
7981
8368
|
loc: '700 300',
|
7982
8369
|
}
|
7983
8370
|
},
|
8371
|
+
// For view Chemistry
|
7984
8372
|
{
|
7985
|
-
key: 88,
|
7986
8373
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
7987
8374
|
group: 100,
|
7988
8375
|
loc: '13 280',
|
@@ -7990,14 +8377,14 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
7990
8377
|
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER],
|
7991
8378
|
minSizeValue: new go.Size(100, NaN),
|
7992
8379
|
selectable: false,
|
7993
|
-
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.
|
8380
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.MAKEUP_WATER__CHEMISTRY].map((e) => ({
|
7994
8381
|
...e,
|
7995
8382
|
value: '',
|
7996
8383
|
isEditable: true,
|
7997
8384
|
maxSizeValue: 140,
|
7998
8385
|
waterSystem: WATER_SYSTEMS_NAME.MAKEUP_WATER
|
7999
8386
|
})),
|
8000
|
-
|
8387
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8001
8388
|
extendedData: {
|
8002
8389
|
visible: true,
|
8003
8390
|
},
|
@@ -8006,7 +8393,6 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8006
8393
|
}
|
8007
8394
|
},
|
8008
8395
|
{
|
8009
|
-
key: 89,
|
8010
8396
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8011
8397
|
group: 100,
|
8012
8398
|
loc: '190 20',
|
@@ -8014,14 +8400,14 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8014
8400
|
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.CONDENSATE_RETURN],
|
8015
8401
|
minSizeValue: new go.Size(100, NaN),
|
8016
8402
|
selectable: false,
|
8017
|
-
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.
|
8403
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.CONDENSATE_RETURN__CHEMISTRY].map((e) => ({
|
8018
8404
|
...e,
|
8019
8405
|
value: '',
|
8020
8406
|
isEditable: true,
|
8021
8407
|
maxSizeValue: 140,
|
8022
8408
|
waterSystem: WATER_SYSTEMS_NAME.CONDENSATE_RETURN
|
8023
8409
|
})),
|
8024
|
-
|
8410
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8025
8411
|
extendedData: {
|
8026
8412
|
visible: true,
|
8027
8413
|
},
|
@@ -8030,7 +8416,6 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8030
8416
|
}
|
8031
8417
|
},
|
8032
8418
|
{
|
8033
|
-
key: 90,
|
8034
8419
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8035
8420
|
group: 100,
|
8036
8421
|
loc: '840 70',
|
@@ -8038,14 +8423,14 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8038
8423
|
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.STEAM],
|
8039
8424
|
minSizeValue: new go.Size(100, NaN),
|
8040
8425
|
selectable: false,
|
8041
|
-
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.
|
8426
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.STEAM__CHEMISTRY].map((e) => ({
|
8042
8427
|
...e,
|
8043
8428
|
value: '',
|
8044
8429
|
isEditable: true,
|
8045
8430
|
maxSizeValue: 140,
|
8046
8431
|
waterSystem: WATER_SYSTEMS_NAME.STEAM
|
8047
8432
|
})),
|
8048
|
-
|
8433
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8049
8434
|
extendedData: {
|
8050
8435
|
visible: true,
|
8051
8436
|
},
|
@@ -8054,7 +8439,6 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8054
8439
|
}
|
8055
8440
|
},
|
8056
8441
|
{
|
8057
|
-
key: 91,
|
8058
8442
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8059
8443
|
group: 100,
|
8060
8444
|
loc: '400 510',
|
@@ -8062,14 +8446,14 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8062
8446
|
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.BOILER_FEED_WATER],
|
8063
8447
|
minSizeValue: new go.Size(100, NaN),
|
8064
8448
|
selectable: false,
|
8065
|
-
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.
|
8449
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.BOILER_FEED_WATER__CHEMISTRY].map((e) => ({
|
8066
8450
|
...e,
|
8067
8451
|
value: '',
|
8068
8452
|
isEditable: true,
|
8069
8453
|
maxSizeValue: 140,
|
8070
8454
|
waterSystem: WATER_SYSTEMS_NAME.BOILER_FEED_WATER
|
8071
8455
|
})),
|
8072
|
-
|
8456
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8073
8457
|
extendedData: {
|
8074
8458
|
visible: true,
|
8075
8459
|
},
|
@@ -8078,7 +8462,6 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8078
8462
|
}
|
8079
8463
|
},
|
8080
8464
|
{
|
8081
|
-
key: 92,
|
8082
8465
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8083
8466
|
group: 100,
|
8084
8467
|
loc: '920 270',
|
@@ -8093,7 +8476,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8093
8476
|
maxSizeValue: 140,
|
8094
8477
|
waterSystem: WATER_SYSTEMS_NAME.BOILER_WATER
|
8095
8478
|
})),
|
8096
|
-
|
8479
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8097
8480
|
extendedData: {
|
8098
8481
|
visible: true,
|
8099
8482
|
},
|
@@ -8102,7 +8485,6 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8102
8485
|
}
|
8103
8486
|
},
|
8104
8487
|
{
|
8105
|
-
key: 94,
|
8106
8488
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE,
|
8107
8489
|
source: AtoGojsEditorModel.IMAGE_BOILER_PATH,
|
8108
8490
|
group: 100,
|
@@ -8116,12 +8498,12 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8116
8498
|
}
|
8117
8499
|
},
|
8118
8500
|
{
|
8119
|
-
key: 95,
|
8120
8501
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8121
8502
|
group: 100,
|
8122
8503
|
loc: '80 280',
|
8123
8504
|
name: WATER_SYSTEMS_NAME.MAKEUP_WATER,
|
8124
8505
|
color: AtoGojsEditorModel.ENUM_COLORS.CERULEAN,
|
8506
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8125
8507
|
extendedData: {
|
8126
8508
|
visible: false,
|
8127
8509
|
},
|
@@ -8130,12 +8512,12 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8130
8512
|
}
|
8131
8513
|
},
|
8132
8514
|
{
|
8133
|
-
key: 96,
|
8134
8515
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8135
8516
|
group: 100,
|
8136
8517
|
loc: '300 17',
|
8137
8518
|
name: WATER_SYSTEMS_NAME.CONDENSATE_RETURN,
|
8138
8519
|
color: AtoGojsEditorModel.ENUM_COLORS.FOUNTAIN_BLUE,
|
8520
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8139
8521
|
extendedData: {
|
8140
8522
|
visible: false,
|
8141
8523
|
},
|
@@ -8144,12 +8526,12 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8144
8526
|
}
|
8145
8527
|
},
|
8146
8528
|
{
|
8147
|
-
key: 97,
|
8148
8529
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8149
8530
|
group: 100,
|
8150
8531
|
loc: '760 17',
|
8151
8532
|
name: WATER_SYSTEMS_NAME.STEAM,
|
8152
8533
|
color: AtoGojsEditorModel.ENUM_COLORS.FLAMINGO,
|
8534
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8153
8535
|
extendedData: {
|
8154
8536
|
visible: false,
|
8155
8537
|
},
|
@@ -8158,12 +8540,12 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8158
8540
|
}
|
8159
8541
|
},
|
8160
8542
|
{
|
8161
|
-
key: 98,
|
8162
8543
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8163
8544
|
group: 100,
|
8164
8545
|
loc: '460 400',
|
8165
8546
|
name: WATER_SYSTEMS_NAME.BOILER_FEED_WATER,
|
8166
8547
|
color: AtoGojsEditorModel.ENUM_COLORS.LIGHT_SKY_BLUE_2,
|
8548
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8167
8549
|
extendedData: {
|
8168
8550
|
visible: false,
|
8169
8551
|
},
|
@@ -8172,12 +8554,221 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
8172
8554
|
}
|
8173
8555
|
},
|
8174
8556
|
{
|
8175
|
-
key: 99,
|
8176
8557
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8177
8558
|
group: 100,
|
8178
8559
|
loc: '920 160',
|
8179
8560
|
name: WATER_SYSTEMS_NAME.BOILER_WATER,
|
8180
8561
|
color: AtoGojsEditorModel.ENUM_COLORS.REGENT_ST_BLUE,
|
8562
|
+
assetLayers: ATO_ASSET_LAYERS.CHEMISTRY,
|
8563
|
+
extendedData: {
|
8564
|
+
visible: false,
|
8565
|
+
},
|
8566
|
+
extendedDataResponsive: {
|
8567
|
+
visible: true,
|
8568
|
+
}
|
8569
|
+
},
|
8570
|
+
// For view Flow
|
8571
|
+
{
|
8572
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8573
|
+
group: 100,
|
8574
|
+
loc: '15 310',
|
8575
|
+
padding: new go.Margin(0, 0, 0, 0),
|
8576
|
+
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER],
|
8577
|
+
minSizeValue: new go.Size(100, NaN),
|
8578
|
+
selectable: false,
|
8579
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.MAKEUP_WATER__FLOW].map((e) => ({
|
8580
|
+
...e,
|
8581
|
+
value: '',
|
8582
|
+
isEditable: true,
|
8583
|
+
maxSizeValue: 140,
|
8584
|
+
waterSystem: WATER_SYSTEMS_NAME.MAKEUP_WATER
|
8585
|
+
})),
|
8586
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8587
|
+
extendedData: {
|
8588
|
+
visible: true,
|
8589
|
+
},
|
8590
|
+
extendedDataResponsive: {
|
8591
|
+
visible: false,
|
8592
|
+
}
|
8593
|
+
},
|
8594
|
+
{
|
8595
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8596
|
+
group: 100,
|
8597
|
+
loc: '190 50',
|
8598
|
+
padding: new go.Margin(0, 0, 0, 0),
|
8599
|
+
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.CONDENSATE_RETURN],
|
8600
|
+
minSizeValue: new go.Size(100, NaN),
|
8601
|
+
selectable: false,
|
8602
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.CONDENSATE_RETURN__FLOW].map((e) => ({
|
8603
|
+
...e,
|
8604
|
+
value: '',
|
8605
|
+
isEditable: true,
|
8606
|
+
maxSizeValue: 140,
|
8607
|
+
waterSystem: WATER_SYSTEMS_NAME.CONDENSATE_RETURN
|
8608
|
+
})),
|
8609
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8610
|
+
extendedData: {
|
8611
|
+
visible: true,
|
8612
|
+
},
|
8613
|
+
extendedDataResponsive: {
|
8614
|
+
visible: false,
|
8615
|
+
}
|
8616
|
+
},
|
8617
|
+
{
|
8618
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8619
|
+
group: 100,
|
8620
|
+
loc: '830 70',
|
8621
|
+
padding: new go.Margin(0, 0, 0, 0),
|
8622
|
+
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.STEAM],
|
8623
|
+
minSizeValue: new go.Size(100, NaN),
|
8624
|
+
selectable: false,
|
8625
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.STEAM__FLOW].map((e) => ({
|
8626
|
+
...e,
|
8627
|
+
value: '',
|
8628
|
+
isEditable: true,
|
8629
|
+
maxSizeValue: 140,
|
8630
|
+
waterSystem: WATER_SYSTEMS_NAME.STEAM
|
8631
|
+
})),
|
8632
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8633
|
+
extendedData: {
|
8634
|
+
visible: true,
|
8635
|
+
},
|
8636
|
+
extendedDataResponsive: {
|
8637
|
+
visible: false,
|
8638
|
+
}
|
8639
|
+
},
|
8640
|
+
{
|
8641
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8642
|
+
group: 100,
|
8643
|
+
loc: '400 510',
|
8644
|
+
padding: new go.Margin(0, 0, 0, 0),
|
8645
|
+
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.BOILER_FEED_WATER],
|
8646
|
+
minSizeValue: new go.Size(100, NaN),
|
8647
|
+
selectable: false,
|
8648
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.BOILER_FEED_WATER__FLOW].map((e) => ({
|
8649
|
+
...e,
|
8650
|
+
value: '',
|
8651
|
+
isEditable: true,
|
8652
|
+
maxSizeValue: 140,
|
8653
|
+
waterSystem: WATER_SYSTEMS_NAME.BOILER_FEED_WATER
|
8654
|
+
})),
|
8655
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8656
|
+
extendedData: {
|
8657
|
+
visible: true,
|
8658
|
+
},
|
8659
|
+
extendedDataResponsive: {
|
8660
|
+
visible: false,
|
8661
|
+
}
|
8662
|
+
},
|
8663
|
+
{
|
8664
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8665
|
+
group: 100,
|
8666
|
+
loc: '330 240',
|
8667
|
+
padding: new go.Margin(0, 0, 0, 0),
|
8668
|
+
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.STEAM_LOSS],
|
8669
|
+
minSizeValue: new go.Size(100, NaN),
|
8670
|
+
selectable: false,
|
8671
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.STEAM_LOSS].map((e) => ({
|
8672
|
+
...e,
|
8673
|
+
value: '',
|
8674
|
+
isEditable: true,
|
8675
|
+
maxSizeValue: 140,
|
8676
|
+
waterSystem: WATER_SYSTEMS_NAME.STEAM_LOSS
|
8677
|
+
})),
|
8678
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8679
|
+
extendedData: {
|
8680
|
+
visible: true,
|
8681
|
+
},
|
8682
|
+
extendedDataResponsive: {
|
8683
|
+
visible: false,
|
8684
|
+
}
|
8685
|
+
},
|
8686
|
+
{
|
8687
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
|
8688
|
+
group: 100,
|
8689
|
+
loc: '900 425',
|
8690
|
+
padding: new go.Margin(0, 0, 0, 0),
|
8691
|
+
...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.BLOWDOWN],
|
8692
|
+
minSizeValue: new go.Size(100, NaN),
|
8693
|
+
selectable: false,
|
8694
|
+
dataTable: ASSET_CATEGORY_PARAMS__BOILER[WATER_SYSTEMS_NAME.BLOWDOWN].map((e) => ({
|
8695
|
+
...e,
|
8696
|
+
value: '',
|
8697
|
+
isEditable: true,
|
8698
|
+
maxSizeValue: 140,
|
8699
|
+
waterSystem: WATER_SYSTEMS_NAME.BLOWDOWN
|
8700
|
+
})),
|
8701
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8702
|
+
extendedData: {
|
8703
|
+
visible: true,
|
8704
|
+
},
|
8705
|
+
extendedDataResponsive: {
|
8706
|
+
visible: false,
|
8707
|
+
}
|
8708
|
+
},
|
8709
|
+
{
|
8710
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8711
|
+
group: 100,
|
8712
|
+
loc: '80 280',
|
8713
|
+
name: WATER_SYSTEMS_NAME.MAKEUP_WATER,
|
8714
|
+
color: AtoGojsEditorModel.ENUM_COLORS.CERULEAN,
|
8715
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8716
|
+
extendedData: {
|
8717
|
+
visible: false,
|
8718
|
+
},
|
8719
|
+
extendedDataResponsive: {
|
8720
|
+
visible: true,
|
8721
|
+
}
|
8722
|
+
},
|
8723
|
+
{
|
8724
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8725
|
+
group: 100,
|
8726
|
+
loc: '300 17',
|
8727
|
+
name: WATER_SYSTEMS_NAME.CONDENSATE_RETURN,
|
8728
|
+
color: AtoGojsEditorModel.ENUM_COLORS.FOUNTAIN_BLUE,
|
8729
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8730
|
+
extendedData: {
|
8731
|
+
visible: false,
|
8732
|
+
},
|
8733
|
+
extendedDataResponsive: {
|
8734
|
+
visible: true,
|
8735
|
+
}
|
8736
|
+
},
|
8737
|
+
{
|
8738
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8739
|
+
group: 100,
|
8740
|
+
loc: '760 17',
|
8741
|
+
name: WATER_SYSTEMS_NAME.STEAM,
|
8742
|
+
color: AtoGojsEditorModel.ENUM_COLORS.FLAMINGO,
|
8743
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8744
|
+
extendedData: {
|
8745
|
+
visible: false,
|
8746
|
+
},
|
8747
|
+
extendedDataResponsive: {
|
8748
|
+
visible: true,
|
8749
|
+
}
|
8750
|
+
},
|
8751
|
+
{
|
8752
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8753
|
+
group: 100,
|
8754
|
+
loc: '460 400',
|
8755
|
+
name: WATER_SYSTEMS_NAME.BOILER_FEED_WATER,
|
8756
|
+
color: AtoGojsEditorModel.ENUM_COLORS.LIGHT_SKY_BLUE_2,
|
8757
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8758
|
+
extendedData: {
|
8759
|
+
visible: false,
|
8760
|
+
},
|
8761
|
+
extendedDataResponsive: {
|
8762
|
+
visible: true,
|
8763
|
+
}
|
8764
|
+
},
|
8765
|
+
{
|
8766
|
+
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
8767
|
+
group: 100,
|
8768
|
+
loc: '325 190',
|
8769
|
+
name: WATER_SYSTEMS_NAME.STEAM_LOSS,
|
8770
|
+
color: AtoGojsEditorModel.ENUM_COLORS.FLAMINGO,
|
8771
|
+
assetLayers: ATO_ASSET_LAYERS.FLOW,
|
8181
8772
|
extendedData: {
|
8182
8773
|
visible: false,
|
8183
8774
|
},
|