|
@@ -704,9 +704,9 @@ BaseFormatPanel.prototype.installInputHandler = function ( |
|
@@ -704,9 +704,9 @@ BaseFormatPanel.prototype.installInputHandler = function ( |
704
|
new mxEventObject(
|
704
|
new mxEventObject(
|
705
|
"styleChanged",
|
705
|
"styleChanged",
|
706
|
"keys",
|
706
|
"keys",
|
707
|
- [ key ],
|
707
|
+ [key],
|
708
|
"values",
|
708
|
"values",
|
709
|
- [ value ],
|
709
|
+ [value],
|
710
|
"cells",
|
710
|
"cells",
|
711
|
cells,
|
711
|
cells,
|
712
|
),
|
712
|
),
|
|
@@ -1087,9 +1087,9 @@ BaseFormatPanel.prototype.createCellOption = function ( |
|
@@ -1087,9 +1087,9 @@ BaseFormatPanel.prototype.createCellOption = function ( |
1087
|
new mxEventObject(
|
1087
|
new mxEventObject(
|
1088
|
"styleChanged",
|
1088
|
"styleChanged",
|
1089
|
"keys",
|
1089
|
"keys",
|
1090
|
- [ key ],
|
1090
|
+ [key],
|
1091
|
"values",
|
1091
|
"values",
|
1092
|
- [ value ],
|
1092
|
+ [value],
|
1093
|
"cells",
|
1093
|
"cells",
|
1094
|
temp,
|
1094
|
temp,
|
1095
|
),
|
1095
|
),
|
|
@@ -1344,9 +1344,9 @@ BaseFormatPanel.prototype.createCellColorOption = function ( |
|
@@ -1344,9 +1344,9 @@ BaseFormatPanel.prototype.createCellColorOption = function ( |
1344
|
new mxEventObject(
|
1344
|
new mxEventObject(
|
1345
|
"styleChanged",
|
1345
|
"styleChanged",
|
1346
|
"keys",
|
1346
|
"keys",
|
1347
|
- [ colorKey ],
|
1347
|
+ [colorKey],
|
1348
|
"values",
|
1348
|
"values",
|
1349
|
- [ color ],
|
1349
|
+ [color],
|
1350
|
"cells",
|
1350
|
"cells",
|
1351
|
cells,
|
1351
|
cells,
|
1352
|
),
|
1352
|
),
|
|
@@ -1523,9 +1523,9 @@ BaseFormatPanel.prototype.createRelativeOption = function ( |
|
@@ -1523,9 +1523,9 @@ BaseFormatPanel.prototype.createRelativeOption = function ( |
1523
|
new mxEventObject(
|
1523
|
new mxEventObject(
|
1524
|
"styleChanged",
|
1524
|
"styleChanged",
|
1525
|
"keys",
|
1525
|
"keys",
|
1526
|
- [ key ],
|
1526
|
+ [key],
|
1527
|
"values",
|
1527
|
"values",
|
1528
|
- [ value ],
|
1528
|
+ [value],
|
1529
|
"cells",
|
1529
|
"cells",
|
1530
|
cells,
|
1530
|
cells,
|
1531
|
),
|
1531
|
),
|
|
@@ -1885,9 +1885,9 @@ ArrangePanel.prototype.addTable = function (div) { |
|
@@ -1885,9 +1885,9 @@ ArrangePanel.prototype.addTable = function (div) { |
1885
|
var count = 0;
|
1885
|
var count = 0;
|
1886
|
|
1886
|
|
1887
|
if (ss.mergeCell != null) {
|
1887
|
if (ss.mergeCell != null) {
|
1888
|
- count += this.addActions(div, [ "mergeCells" ]);
|
1888
|
+ count += this.addActions(div, ["mergeCells"]);
|
1889
|
} else if (ss.style["colspan"] > 1 || ss.style["rowspan"] > 1) {
|
1889
|
} else if (ss.style["colspan"] > 1 || ss.style["rowspan"] > 1) {
|
1890
|
- count += this.addActions(div, [ "unmergeCells" ]);
|
1890
|
+ count += this.addActions(div, ["unmergeCells"]);
|
1891
|
}
|
1891
|
}
|
1892
|
|
1892
|
|
1893
|
if (count > 0) {
|
1893
|
if (count > 0) {
|
|
@@ -1904,8 +1904,8 @@ ArrangePanel.prototype.addTable = function (div) { |
|
@@ -1904,8 +1904,8 @@ ArrangePanel.prototype.addTable = function (div) { |
1904
|
*
|
1904
|
*
|
1905
|
*/
|
1905
|
*/
|
1906
|
ArrangePanel.prototype.addLayerOps = function (div) {
|
1906
|
ArrangePanel.prototype.addLayerOps = function (div) {
|
1907
|
- this.addActions(div, [ "toFront", "toBack" ]);
|
|
|
1908
|
- this.addActions(div, [ "bringForward", "sendBackward" ]);
|
1907
|
+ this.addActions(div, ["toFront", "toBack"]);
|
|
|
1908
|
+ this.addActions(div, ["bringForward", "sendBackward"]);
|
1909
|
|
1909
|
|
1910
|
return div;
|
1910
|
return div;
|
1911
|
};
|
1911
|
};
|
|
@@ -1925,8 +1925,8 @@ ArrangePanel.prototype.addGroupOps = function (div) { |
|
@@ -1925,8 +1925,8 @@ ArrangePanel.prototype.addGroupOps = function (div) { |
1925
|
|
1925
|
|
1926
|
if (!ss.cell && !ss.row) {
|
1926
|
if (!ss.cell && !ss.row) {
|
1927
|
count +=
|
1927
|
count +=
|
1928
|
- this.addActions(div, [ "group", "ungroup", "copySize", "pasteSize" ]) +
|
|
|
1929
|
- this.addActions(div, [ "removeFromGroup" ]);
|
1928
|
+ this.addActions(div, ["group", "ungroup", "copySize", "pasteSize"]) +
|
|
|
1929
|
+ this.addActions(div, ["removeFromGroup"]);
|
1930
|
}
|
1930
|
}
|
1931
|
|
1931
|
|
1932
|
var copyBtn = null;
|
1932
|
var copyBtn = null;
|
|
@@ -2023,7 +2023,7 @@ ArrangePanel.prototype.addGroupOps = function (div) { |
|
@@ -2023,7 +2023,7 @@ ArrangePanel.prototype.addGroupOps = function (div) { |
2023
|
}
|
2023
|
}
|
2024
|
|
2024
|
|
2025
|
if (graph.getSelectionCount() == 1) {
|
2025
|
if (graph.getSelectionCount() == 1) {
|
2026
|
- count += this.addActions(div, [ "editData", "editLink" ]);
|
2026
|
+ count += this.addActions(div, ["editData", "editLink"]);
|
2027
|
}
|
2027
|
}
|
2028
|
|
2028
|
|
2029
|
if (count == 0) {
|
2029
|
if (count == 0) {
|
|
@@ -2103,12 +2103,12 @@ ArrangePanel.prototype.addAlign = function (div) { |
|
@@ -2103,12 +2103,12 @@ ArrangePanel.prototype.addAlign = function (div) { |
2103
|
stylePanel,
|
2103
|
stylePanel,
|
2104
|
);
|
2104
|
);
|
2105
|
|
2105
|
|
2106
|
- this.styleButtons([ left, center, right, top, middle, bottom ]);
|
2106
|
+ this.styleButtons([left, center, right, top, middle, bottom]);
|
2107
|
right.style.marginRight = "10px";
|
2107
|
right.style.marginRight = "10px";
|
2108
|
}
|
2108
|
}
|
2109
|
|
2109
|
|
2110
|
div.appendChild(stylePanel);
|
2110
|
div.appendChild(stylePanel);
|
2111
|
- this.addActions(div, [ "snapToGrid" ]);
|
2111
|
+ this.addActions(div, ["snapToGrid"]);
|
2112
|
|
2112
|
|
2113
|
return div;
|
2113
|
return div;
|
2114
|
};
|
2114
|
};
|
|
@@ -2797,9 +2797,9 @@ ArrangePanel.prototype.addEdgeGeometry = function (container) { |
|
@@ -2797,9 +2797,9 @@ ArrangePanel.prototype.addEdgeGeometry = function (container) { |
2797
|
new mxEventObject(
|
2797
|
new mxEventObject(
|
2798
|
"styleChanged",
|
2798
|
"styleChanged",
|
2799
|
"keys",
|
2799
|
"keys",
|
2800
|
- [ "width" ],
|
2800
|
+ ["width"],
|
2801
|
"values",
|
2801
|
"values",
|
2802
|
- [ value ],
|
2802
|
+ [value],
|
2803
|
"cells",
|
2803
|
"cells",
|
2804
|
cells,
|
2804
|
cells,
|
2805
|
),
|
2805
|
),
|
|
@@ -3030,7 +3030,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3030,7 +3030,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
3030
|
var stylePanel2 = stylePanel.cloneNode(false);
|
3030
|
var stylePanel2 = stylePanel.cloneNode(false);
|
3031
|
stylePanel2.style.marginLeft = "-3px";
|
3031
|
stylePanel2.style.marginLeft = "-3px";
|
3032
|
var fontStyleItems = this.editorUi.toolbar.addItems(
|
3032
|
var fontStyleItems = this.editorUi.toolbar.addItems(
|
3033
|
- [ "bold", "italic", "underline" ],
|
3033
|
+ ["bold", "italic", "underline"],
|
3034
|
stylePanel2,
|
3034
|
stylePanel2,
|
3035
|
true,
|
3035
|
true,
|
3036
|
);
|
3036
|
);
|
|
@@ -3057,7 +3057,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3057,7 +3057,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
3057
|
);
|
3057
|
);
|
3058
|
|
3058
|
|
3059
|
var verticalItem = this.editorUi.toolbar.addItems(
|
3059
|
var verticalItem = this.editorUi.toolbar.addItems(
|
3060
|
- [ "vertical" ],
|
3060
|
+ ["vertical"],
|
3061
|
stylePanel2,
|
3061
|
stylePanel2,
|
3062
|
true,
|
3062
|
true,
|
3063
|
)[0];
|
3063
|
)[0];
|
|
@@ -3065,7 +3065,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3065,7 +3065,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
3065
|
container.appendChild(stylePanel2);
|
3065
|
container.appendChild(stylePanel2);
|
3066
|
|
3066
|
|
3067
|
this.styleButtons(fontStyleItems);
|
3067
|
this.styleButtons(fontStyleItems);
|
3068
|
- this.styleButtons([ verticalItem ]);
|
3068
|
+ this.styleButtons([verticalItem]);
|
3069
|
|
3069
|
|
3070
|
var stylePanel3 = stylePanel.cloneNode(false);
|
3070
|
var stylePanel3 = stylePanel.cloneNode(false);
|
3071
|
stylePanel3.style.marginLeft = "-3px";
|
3071
|
stylePanel3.style.marginLeft = "-3px";
|
|
@@ -3088,9 +3088,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3088,9 +3088,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
3088
|
new mxEventObject(
|
3088
|
new mxEventObject(
|
3089
|
"styleChanged",
|
3089
|
"styleChanged",
|
3090
|
"keys",
|
3090
|
"keys",
|
3091
|
- [ mxConstants.STYLE_ALIGN ],
|
3091
|
+ [mxConstants.STYLE_ALIGN],
|
3092
|
"values",
|
3092
|
"values",
|
3093
|
- [ mxConstants.ALIGN_LEFT ],
|
3093
|
+ [mxConstants.ALIGN_LEFT],
|
3094
|
"cells",
|
3094
|
"cells",
|
3095
|
ss.cells,
|
3095
|
ss.cells,
|
3096
|
),
|
3096
|
),
|
|
@@ -3098,8 +3098,8 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3098,8 +3098,8 @@ TextFormatPanel.prototype.addFont = function (container) { |
3098
|
}
|
3098
|
}
|
3099
|
: callFn(
|
3099
|
: callFn(
|
3100
|
this.editorUi.menus.createStyleChangeFunction(
|
3100
|
this.editorUi.menus.createStyleChangeFunction(
|
3101
|
- [ mxConstants.STYLE_ALIGN ],
|
|
|
3102
|
- [ mxConstants.ALIGN_LEFT ],
|
3101
|
+ [mxConstants.STYLE_ALIGN],
|
|
|
3102
|
+ [mxConstants.ALIGN_LEFT],
|
3103
|
),
|
3103
|
),
|
3104
|
),
|
3104
|
),
|
3105
|
stylePanel3,
|
3105
|
stylePanel3,
|
|
@@ -3114,9 +3114,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3114,9 +3114,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
3114
|
new mxEventObject(
|
3114
|
new mxEventObject(
|
3115
|
"styleChanged",
|
3115
|
"styleChanged",
|
3116
|
"keys",
|
3116
|
"keys",
|
3117
|
- [ mxConstants.STYLE_ALIGN ],
|
3117
|
+ [mxConstants.STYLE_ALIGN],
|
3118
|
"values",
|
3118
|
"values",
|
3119
|
- [ mxConstants.ALIGN_CENTER ],
|
3119
|
+ [mxConstants.ALIGN_CENTER],
|
3120
|
"cells",
|
3120
|
"cells",
|
3121
|
ss.cells,
|
3121
|
ss.cells,
|
3122
|
),
|
3122
|
),
|
|
@@ -3124,8 +3124,8 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3124,8 +3124,8 @@ TextFormatPanel.prototype.addFont = function (container) { |
3124
|
}
|
3124
|
}
|
3125
|
: callFn(
|
3125
|
: callFn(
|
3126
|
this.editorUi.menus.createStyleChangeFunction(
|
3126
|
this.editorUi.menus.createStyleChangeFunction(
|
3127
|
- [ mxConstants.STYLE_ALIGN ],
|
|
|
3128
|
- [ mxConstants.ALIGN_CENTER ],
|
3127
|
+ [mxConstants.STYLE_ALIGN],
|
|
|
3128
|
+ [mxConstants.ALIGN_CENTER],
|
3129
|
),
|
3129
|
),
|
3130
|
),
|
3130
|
),
|
3131
|
stylePanel3,
|
3131
|
stylePanel3,
|
|
@@ -3140,9 +3140,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3140,9 +3140,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
3140
|
new mxEventObject(
|
3140
|
new mxEventObject(
|
3141
|
"styleChanged",
|
3141
|
"styleChanged",
|
3142
|
"keys",
|
3142
|
"keys",
|
3143
|
- [ mxConstants.STYLE_ALIGN ],
|
3143
|
+ [mxConstants.STYLE_ALIGN],
|
3144
|
"values",
|
3144
|
"values",
|
3145
|
- [ mxConstants.ALIGN_RIGHT ],
|
3145
|
+ [mxConstants.ALIGN_RIGHT],
|
3146
|
"cells",
|
3146
|
"cells",
|
3147
|
ss.cells,
|
3147
|
ss.cells,
|
3148
|
),
|
3148
|
),
|
|
@@ -3150,14 +3150,14 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3150,14 +3150,14 @@ TextFormatPanel.prototype.addFont = function (container) { |
3150
|
}
|
3150
|
}
|
3151
|
: callFn(
|
3151
|
: callFn(
|
3152
|
this.editorUi.menus.createStyleChangeFunction(
|
3152
|
this.editorUi.menus.createStyleChangeFunction(
|
3153
|
- [ mxConstants.STYLE_ALIGN ],
|
|
|
3154
|
- [ mxConstants.ALIGN_RIGHT ],
|
3153
|
+ [mxConstants.STYLE_ALIGN],
|
|
|
3154
|
+ [mxConstants.ALIGN_RIGHT],
|
3155
|
),
|
3155
|
),
|
3156
|
),
|
3156
|
),
|
3157
|
stylePanel3,
|
3157
|
stylePanel3,
|
3158
|
);
|
3158
|
);
|
3159
|
|
3159
|
|
3160
|
- this.styleButtons([ left, center, right ]);
|
3160
|
+ this.styleButtons([left, center, right]);
|
3161
|
|
3161
|
|
3162
|
// Quick hack for strikethrough
|
3162
|
// Quick hack for strikethrough
|
3163
|
// TODO: Add translations and toggle state
|
3163
|
// TODO: Add translations and toggle state
|
|
@@ -3170,14 +3170,14 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3170,14 +3170,14 @@ TextFormatPanel.prototype.addFont = function (container) { |
3170
|
},
|
3170
|
},
|
3171
|
stylePanel2,
|
3171
|
stylePanel2,
|
3172
|
);
|
3172
|
);
|
3173
|
- this.styleButtons([ strike ]);
|
3173
|
+ this.styleButtons([strike]);
|
3174
|
|
3174
|
|
3175
|
strike.firstChild.style.background =
|
3175
|
strike.firstChild.style.background =
|
3176
|
"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
|
3176
|
"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
|
3177
|
strike.firstChild.style.backgroundPosition = "2px 2px";
|
3177
|
strike.firstChild.style.backgroundPosition = "2px 2px";
|
3178
|
strike.firstChild.style.backgroundSize = "18px 18px";
|
3178
|
strike.firstChild.style.backgroundSize = "18px 18px";
|
3179
|
|
3179
|
|
3180
|
- this.styleButtons([ strike ]);
|
3180
|
+ this.styleButtons([strike]);
|
3181
|
}
|
3181
|
}
|
3182
|
|
3182
|
|
3183
|
var top = this.editorUi.toolbar.addButton(
|
3183
|
var top = this.editorUi.toolbar.addButton(
|
|
@@ -3185,8 +3185,8 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3185,8 +3185,8 @@ TextFormatPanel.prototype.addFont = function (container) { |
3185
|
mxResources.get("top"),
|
3185
|
mxResources.get("top"),
|
3186
|
callFn(
|
3186
|
callFn(
|
3187
|
this.editorUi.menus.createStyleChangeFunction(
|
3187
|
this.editorUi.menus.createStyleChangeFunction(
|
3188
|
- [ mxConstants.STYLE_VERTICAL_ALIGN ],
|
|
|
3189
|
- [ mxConstants.ALIGN_TOP ],
|
3188
|
+ [mxConstants.STYLE_VERTICAL_ALIGN],
|
|
|
3189
|
+ [mxConstants.ALIGN_TOP],
|
3190
|
),
|
3190
|
),
|
3191
|
),
|
3191
|
),
|
3192
|
stylePanel3,
|
3192
|
stylePanel3,
|
|
@@ -3196,8 +3196,8 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3196,8 +3196,8 @@ TextFormatPanel.prototype.addFont = function (container) { |
3196
|
mxResources.get("middle"),
|
3196
|
mxResources.get("middle"),
|
3197
|
callFn(
|
3197
|
callFn(
|
3198
|
this.editorUi.menus.createStyleChangeFunction(
|
3198
|
this.editorUi.menus.createStyleChangeFunction(
|
3199
|
- [ mxConstants.STYLE_VERTICAL_ALIGN ],
|
|
|
3200
|
- [ mxConstants.ALIGN_MIDDLE ],
|
3199
|
+ [mxConstants.STYLE_VERTICAL_ALIGN],
|
|
|
3200
|
+ [mxConstants.ALIGN_MIDDLE],
|
3201
|
),
|
3201
|
),
|
3202
|
),
|
3202
|
),
|
3203
|
stylePanel3,
|
3203
|
stylePanel3,
|
|
@@ -3207,14 +3207,14 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3207,14 +3207,14 @@ TextFormatPanel.prototype.addFont = function (container) { |
3207
|
mxResources.get("bottom"),
|
3207
|
mxResources.get("bottom"),
|
3208
|
callFn(
|
3208
|
callFn(
|
3209
|
this.editorUi.menus.createStyleChangeFunction(
|
3209
|
this.editorUi.menus.createStyleChangeFunction(
|
3210
|
- [ mxConstants.STYLE_VERTICAL_ALIGN ],
|
|
|
3211
|
- [ mxConstants.ALIGN_BOTTOM ],
|
3210
|
+ [mxConstants.STYLE_VERTICAL_ALIGN],
|
|
|
3211
|
+ [mxConstants.ALIGN_BOTTOM],
|
3212
|
),
|
3212
|
),
|
3213
|
),
|
3213
|
),
|
3214
|
stylePanel3,
|
3214
|
stylePanel3,
|
3215
|
);
|
3215
|
);
|
3216
|
|
3216
|
|
3217
|
- this.styleButtons([ top, middle, bottom ]);
|
3217
|
+ this.styleButtons([top, middle, bottom]);
|
3218
|
|
3218
|
|
3219
|
container.appendChild(stylePanel3);
|
3219
|
container.appendChild(stylePanel3);
|
3220
|
|
3220
|
|
|
@@ -3441,7 +3441,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3441,7 +3441,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
3441
|
|
3441
|
|
3442
|
// NOTE: For automatic we use the value null since automatic
|
3442
|
// NOTE: For automatic we use the value null since automatic
|
3443
|
// requires the text to be non formatted and non-wrapped
|
3443
|
// requires the text to be non formatted and non-wrapped
|
3444
|
- var dirs = [ "automatic", "leftToRight", "rightToLeft" ];
|
3444
|
+ var dirs = ["automatic", "leftToRight", "rightToLeft"];
|
3445
|
var dirSet = {
|
3445
|
var dirSet = {
|
3446
|
automatic: null,
|
3446
|
automatic: null,
|
3447
|
leftToRight: mxConstants.TEXT_DIRECTION_LTR,
|
3447
|
leftToRight: mxConstants.TEXT_DIRECTION_LTR,
|
|
@@ -3568,9 +3568,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3568,9 +3568,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
3568
|
new mxEventObject(
|
3568
|
new mxEventObject(
|
3569
|
"styleChanged",
|
3569
|
"styleChanged",
|
3570
|
"keys",
|
3570
|
"keys",
|
3571
|
- [ mxConstants.STYLE_FONTSIZE ],
|
3571
|
+ [mxConstants.STYLE_FONTSIZE],
|
3572
|
"values",
|
3572
|
"values",
|
3573
|
- [ fontSize ],
|
3573
|
+ [fontSize],
|
3574
|
"cells",
|
3574
|
"cells",
|
3575
|
ss.cells,
|
3575
|
ss.cells,
|
3576
|
),
|
3576
|
),
|
|
@@ -3696,9 +3696,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3696,9 +3696,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
3696
|
new mxEventObject(
|
3696
|
new mxEventObject(
|
3697
|
"styleChanged",
|
3697
|
"styleChanged",
|
3698
|
"keys",
|
3698
|
"keys",
|
3699
|
- [ mxConstants.STYLE_LABEL_BACKGROUNDCOLOR ],
|
3699
|
+ [mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],
|
3700
|
"values",
|
3700
|
"values",
|
3701
|
- [ color ],
|
3701
|
+ [color],
|
3702
|
"cells",
|
3702
|
"cells",
|
3703
|
ss.cells,
|
3703
|
ss.cells,
|
3704
|
),
|
3704
|
),
|
|
@@ -3775,9 +3775,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3775,9 +3775,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
3775
|
new mxEventObject(
|
3775
|
new mxEventObject(
|
3776
|
"styleChanged",
|
3776
|
"styleChanged",
|
3777
|
"keys",
|
3777
|
"keys",
|
3778
|
- [ mxConstants.STYLE_FONTCOLOR ],
|
3778
|
+ [mxConstants.STYLE_FONTCOLOR],
|
3779
|
"values",
|
3779
|
"values",
|
3780
|
- [ color ],
|
3780
|
+ [color],
|
3781
|
"cells",
|
3781
|
"cells",
|
3782
|
ss.cells,
|
3782
|
ss.cells,
|
3783
|
),
|
3783
|
),
|
|
@@ -3829,9 +3829,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -3829,9 +3829,9 @@ TextFormatPanel.prototype.addFont = function (container) { |
3829
|
new mxEventObject(
|
3829
|
new mxEventObject(
|
3830
|
"styleChanged",
|
3830
|
"styleChanged",
|
3831
|
"keys",
|
3831
|
"keys",
|
3832
|
- [ mxConstants.STYLE_FONTCOLOR ],
|
3832
|
+ [mxConstants.STYLE_FONTCOLOR],
|
3833
|
"values",
|
3833
|
"values",
|
3834
|
- [ color ],
|
3834
|
+ [color],
|
3835
|
"cells",
|
3835
|
"cells",
|
3836
|
ss.cells,
|
3836
|
ss.cells,
|
3837
|
),
|
3837
|
),
|
|
@@ -4029,7 +4029,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -4029,7 +4029,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
4029
|
while (
|
4029
|
while (
|
4030
|
node != null &&
|
4030
|
node != null &&
|
4031
|
node.nodeType != mxConstants.NODETYPE_ELEMENT
|
4031
|
node.nodeType != mxConstants.NODETYPE_ELEMENT
|
4032
|
- ) {
|
4032
|
+ ) {
|
4033
|
node = node.parentNode;
|
4033
|
node = node.parentNode;
|
4034
|
}
|
4034
|
}
|
4035
|
|
4035
|
|
|
@@ -4083,7 +4083,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -4083,7 +4083,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
4083
|
var insertPanel = stylePanel.cloneNode(false);
|
4083
|
var insertPanel = stylePanel.cloneNode(false);
|
4084
|
insertPanel.style.paddingLeft = "0px";
|
4084
|
insertPanel.style.paddingLeft = "0px";
|
4085
|
var insertBtns = this.editorUi.toolbar.addItems(
|
4085
|
var insertBtns = this.editorUi.toolbar.addItems(
|
4086
|
- [ "link", "image" ],
|
4086
|
+ ["link", "image"],
|
4087
|
insertPanel,
|
4087
|
insertPanel,
|
4088
|
true,
|
4088
|
true,
|
4089
|
);
|
4089
|
);
|
|
@@ -4754,7 +4754,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
|
@@ -4754,7 +4754,7 @@ TextFormatPanel.prototype.addFont = function (container) { |
4754
|
tableCell =
|
4754
|
tableCell =
|
4755
|
currentTable == null
|
4755
|
currentTable == null
|
4756
|
? null
|
4756
|
? null
|
4757
|
- : graph.getParentByNames(node, [ "TD", "TH" ], currentTable);
|
4757
|
+ : graph.getParentByNames(node, ["TD", "TH"], currentTable);
|
4758
|
tableWrapper.style.display = currentTable != null ? "" : "none";
|
4758
|
tableWrapper.style.display = currentTable != null ? "" : "none";
|
4759
|
|
4759
|
|
4760
|
if (document.activeElement != input) {
|
4760
|
if (document.activeElement != input) {
|
|
@@ -4878,10 +4878,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -4878,10 +4878,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
4878
|
const graph = editor.graph;
|
4878
|
const graph = editor.graph;
|
4879
|
const ss = ui.getSelectionState();
|
4879
|
const ss = ui.getSelectionState();
|
4880
|
const vertices = ss.vertices || []
|
4880
|
const vertices = ss.vertices || []
|
4881
|
-
|
|
|
4882
|
- console.log(Sidebar.prototype)
|
4881
|
+ const sidebarInstance = ui.sidebar
|
4883
|
// console.log(this.editorUi)
|
4882
|
// console.log(this.editorUi)
|
4884
|
console.log(vertices)
|
4883
|
console.log(vertices)
|
|
|
4884
|
+ console.log(this)
|
4885
|
|
4885
|
|
4886
|
|
4886
|
|
4887
|
// console.log(vertices[0]?.get('bindType'))
|
4887
|
// console.log(vertices[0]?.get('bindType'))
|
|
@@ -4899,7 +4899,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -4899,7 +4899,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
4899
|
const graphId = vertices[0].id;
|
4899
|
const graphId = vertices[0].id;
|
4900
|
|
4900
|
|
4901
|
// 解构全局属性layui要用到的模块
|
4901
|
// 解构全局属性layui要用到的模块
|
4902
|
- const { layer, form, jquery: $ } = layui;
|
4902
|
+ const { layer, form, jquery: $, colorpicker, upload, element } = layui;
|
4903
|
|
4903
|
|
4904
|
const CONTAINER_FILTER = 'containerFilter'
|
4904
|
const CONTAINER_FILTER = 'containerFilter'
|
4905
|
$(container).addClass('layui-form').attr('lay-filter', CONTAINER_FILTER)
|
4905
|
$(container).addClass('layui-form').attr('lay-filter', CONTAINER_FILTER)
|
|
@@ -4942,7 +4942,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -4942,7 +4942,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
4942
|
|
4942
|
|
4943
|
/**
|
4943
|
/**
|
4944
|
* @description 获取弹出层绑定信息
|
4944
|
* @description 获取弹出层绑定信息
|
4945
|
- * @param {'DOWN' | 'UP' | 'SINGLE' | 'DOUBLE' | 'DISPLAY' | 'FLASH' | 'ROTATE'} type - 类型
|
4945
|
+ * @param {'DOWN' | 'UP' | 'SINGLE' | 'DOUBLE' | 'DISPLAY' | 'FLASH' | 'ROTATE' | 'IMAGE'} type - 类型
|
4946
|
* @param {'event' | 'act' } category - 类别
|
4946
|
* @param {'event' | 'act' } category - 类别
|
4947
|
*/
|
4947
|
*/
|
4948
|
function getLayerBindInfo(category, type) {
|
4948
|
function getLayerBindInfo(category, type) {
|
|
@@ -4956,6 +4956,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -4956,6 +4956,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
4956
|
ACT: 'act',
|
4956
|
ACT: 'act',
|
4957
|
EVENT: 'event',
|
4957
|
EVENT: 'event',
|
4958
|
DATA_SOURCE: 'dataSources',
|
4958
|
DATA_SOURCE: 'dataSources',
|
|
|
4959
|
+ FUNCTION: 'function',
|
4959
|
}
|
4960
|
}
|
4960
|
|
4961
|
|
4961
|
const enumInteractionType = {
|
4962
|
const enumInteractionType = {
|
|
@@ -4969,6 +4970,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -4969,6 +4970,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
4969
|
DISPLAY: 'DISPLAY',
|
4970
|
DISPLAY: 'DISPLAY',
|
4970
|
FLASH: 'FLASH',
|
4971
|
FLASH: 'FLASH',
|
4971
|
ROTATE: 'ROTATE',
|
4972
|
ROTATE: 'ROTATE',
|
|
|
4973
|
+ IMAGE: 'IMAGE',
|
4972
|
}
|
4974
|
}
|
4973
|
|
4975
|
|
4974
|
|
4976
|
|
|
@@ -5011,8 +5013,21 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5011,8 +5013,21 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5011
|
type: enumDynamicEffectType.ROTATE,
|
5013
|
type: enumDynamicEffectType.ROTATE,
|
5012
|
category: enumCategory.ACT,
|
5014
|
category: enumCategory.ACT,
|
5013
|
},
|
5015
|
},
|
|
|
5016
|
+ {
|
|
|
5017
|
+ label: '设置变量值图片',
|
|
|
5018
|
+ type: enumDynamicEffectType.IMAGE,
|
|
|
5019
|
+ category: enumCategory.ACT,
|
|
|
5020
|
+ },
|
5014
|
];
|
5021
|
];
|
5015
|
|
5022
|
|
|
|
5023
|
+ // const functionList = [
|
|
|
5024
|
+ // {
|
|
|
5025
|
+ // label: '设置变量值图片',
|
|
|
5026
|
+ // type: enumFunctionType.VAR_IMAGE,
|
|
|
5027
|
+ // category: enumCategory.FUNCTION,
|
|
|
5028
|
+ // },
|
|
|
5029
|
+ // ]
|
|
|
5030
|
+
|
5016
|
const enumDataSourceConst = {
|
5031
|
const enumDataSourceConst = {
|
5017
|
ORG_ID: 'orgId',
|
5032
|
ORG_ID: 'orgId',
|
5018
|
DEVICE_ID: 'deviceId',
|
5033
|
DEVICE_ID: 'deviceId',
|
|
@@ -5021,7 +5036,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5021,7 +5036,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5021
|
GATEWAY: 'GATEWAY',
|
5036
|
GATEWAY: 'GATEWAY',
|
5022
|
}
|
5037
|
}
|
5023
|
|
5038
|
|
5024
|
- let echoRefreshFn = null
|
5039
|
+ function echoRefreshFn() {
|
|
|
5040
|
+ }
|
5025
|
|
5041
|
|
5026
|
|
5042
|
|
5027
|
// 获取url的请求参数函数
|
5043
|
// 获取url的请求参数函数
|
|
@@ -5064,6 +5080,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5064,6 +5080,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5064
|
createInteractionPanel()
|
5080
|
createInteractionPanel()
|
5065
|
createDynamicEffectPanel()
|
5081
|
createDynamicEffectPanel()
|
5066
|
createSubmitPanel()
|
5082
|
createSubmitPanel()
|
|
|
5083
|
+ UseLayUi.nextTick(() => form.render())
|
5067
|
}
|
5084
|
}
|
5068
|
|
5085
|
|
5069
|
initNode();
|
5086
|
initNode();
|
|
@@ -5074,36 +5091,11 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5074,36 +5091,11 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5074
|
*/
|
5091
|
*/
|
5075
|
async function getNodeBindInfo() {
|
5092
|
async function getNodeBindInfo() {
|
5076
|
const { id } = nodeInfo
|
5093
|
const { id } = nodeInfo
|
5077
|
- const [ err, res ] = await to(ConfigurationNodeApi.getConfigurationInfo('NODE', id))
|
5094
|
+ const [err, res] = await to(ConfigurationNodeApi.getConfigurationInfo('NODE', id))
|
5078
|
currentNodeData = res
|
5095
|
currentNodeData = res
|
5079
|
if (echoRefreshFn && typeof echoRefreshFn === 'function') echoRefreshFn()
|
5096
|
if (echoRefreshFn && typeof echoRefreshFn === 'function') echoRefreshFn()
|
5080
|
}
|
5097
|
}
|
5081
|
|
5098
|
|
5082
|
-
|
|
|
5083
|
- /**
|
|
|
5084
|
- * @description 生成数据交互面板
|
|
|
5085
|
- * @returns {Array}
|
|
|
5086
|
- */
|
|
|
5087
|
- function generateDataEventNode() {
|
|
|
5088
|
- const eventList = []
|
|
|
5089
|
- const eventNodeCls = 'interaction__container'
|
|
|
5090
|
- for (const item of interactionList) {
|
|
|
5091
|
- const checkbox = UseLayUi.createCheckBox({
|
|
|
5092
|
- dataSource: item,
|
|
|
5093
|
- layFilter: item.type,
|
|
|
5094
|
- valueField: 'type',
|
|
|
5095
|
- labelField: 'label',
|
|
|
5096
|
- })
|
|
|
5097
|
- const template = `
|
|
|
5098
|
- <div class="${ eventNodeCls }">
|
|
|
5099
|
- ${ checkbox }
|
|
|
5100
|
- <i id="${ item.type }"></i>
|
|
|
5101
|
- </div>`
|
|
|
5102
|
- eventList.push(template)
|
|
|
5103
|
- }
|
|
|
5104
|
- return eventList
|
|
|
5105
|
- }
|
|
|
5106
|
-
|
|
|
5107
|
/**
|
5099
|
/**
|
5108
|
* @description 生成操作节点
|
5100
|
* @description 生成操作节点
|
5109
|
* @param {object[]} list
|
5101
|
* @param {object[]} list
|
|
@@ -5114,14 +5106,14 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5114,14 +5106,14 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5114
|
for (const item of list) {
|
5106
|
for (const item of list) {
|
5115
|
const checkbox = UseLayUi.createCheckBox({
|
5107
|
const checkbox = UseLayUi.createCheckBox({
|
5116
|
dataSource: item,
|
5108
|
dataSource: item,
|
5117
|
- layFilter: item.checkboxName,
|
5109
|
+ layFilter: item.type,
|
5118
|
valueField: 'type',
|
5110
|
valueField: 'type',
|
5119
|
labelField: 'label',
|
5111
|
labelField: 'label',
|
5120
|
})
|
5112
|
})
|
5121
|
const template = `
|
5113
|
const template = `
|
5122
|
- <div class="${ eventNodeCls }">
|
|
|
5123
|
- ${ checkbox }
|
|
|
5124
|
- <i id="${ item.type }"></i>
|
5114
|
+ <div class="${eventNodeCls}">
|
|
|
5115
|
+ <div>${checkbox}</div>
|
|
|
5116
|
+ <i id="${item.type}"></i>
|
5125
|
</div>`
|
5117
|
</div>`
|
5126
|
eventList.push(template)
|
5118
|
eventList.push(template)
|
5127
|
}
|
5119
|
}
|
|
@@ -5132,230 +5124,290 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5132,230 +5124,290 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5132
|
/**
|
5124
|
/**
|
5133
|
* @description 创建数据源模块
|
5125
|
* @description 创建数据源模块
|
5134
|
*/
|
5126
|
*/
|
5135
|
- function createDataSourcePanel() {
|
|
|
5136
|
- const enumActionEl = {
|
|
|
5137
|
- ORG_EL: 'dataSourceOrg',
|
|
|
5138
|
- DEVICE_EL: 'dataSourceDevice',
|
|
|
5139
|
- SLAVE_DEVICE_EL: 'dataSourceSlaveDevice',
|
|
|
5140
|
- ATTR_EL: 'dataSourceAttr',
|
|
|
5141
|
- }
|
5127
|
+ // function createDataSourcePanel() {
|
|
|
5128
|
+ // const enumActionEl = {
|
|
|
5129
|
+ // ORG_EL: 'dataSourceOrg',
|
|
|
5130
|
+ // DEVICE_EL: 'dataSourceDevice',
|
|
|
5131
|
+ // SLAVE_DEVICE_EL: 'dataSourceSlaveDevice',
|
|
|
5132
|
+ // ATTR_EL: 'dataSourceAttr',
|
|
|
5133
|
+ // }
|
|
|
5134
|
+ //
|
|
|
5135
|
+ // const fragment = document.createDocumentFragment()
|
|
|
5136
|
+ // const defaultPanel = createPanel()
|
|
|
5137
|
+ // const title = createTitle('数据源')
|
|
|
5138
|
+ // let orgPanel, devicePanel, slaveDevicePanel, attrsPanel;
|
|
|
5139
|
+ // $(title).addClass('override__title--default')
|
|
|
5140
|
+ // $(defaultPanel).addClass('override__panel--default')
|
|
|
5141
|
+ //
|
|
|
5142
|
+ // /**
|
|
|
5143
|
+ // * @description 设备列表
|
|
|
5144
|
+ // */
|
|
|
5145
|
+ // let deviceList = []
|
|
|
5146
|
+ //
|
|
|
5147
|
+ //
|
|
|
5148
|
+ // /**
|
|
|
5149
|
+ // * @description 生成组织选择
|
|
|
5150
|
+ // */
|
|
|
5151
|
+ // async function generatorOrgTres() {
|
|
|
5152
|
+ // orgPanel = defaultPanel.cloneNode(false)
|
|
|
5153
|
+ // const orgContainer = `<div id="${ enumActionEl.ORG_EL }"></div>`
|
|
|
5154
|
+ // $(orgPanel).append(orgContainer)
|
|
|
5155
|
+ //
|
|
|
5156
|
+ // const [ err, res ] = await to(ConfigurationNodeApi.getOrgTree())
|
|
|
5157
|
+ // if (err) return
|
|
|
5158
|
+ // treeList = res
|
|
|
5159
|
+ //
|
|
|
5160
|
+ // UseLayUi.createTreeSelect({
|
|
|
5161
|
+ // elem: `#${ enumActionEl.ORG_EL }`,
|
|
|
5162
|
+ // layFilter: enumDataSourceConst.ORG_ID,
|
|
|
5163
|
+ // className: 'data-source__org--override',
|
|
|
5164
|
+ // label: '组织',
|
|
|
5165
|
+ // singleUsage: false,
|
|
|
5166
|
+ // treeProps: {
|
|
|
5167
|
+ // data: treeList,
|
|
|
5168
|
+ // onlyIconControl: true,
|
|
|
5169
|
+ // click(node) {
|
|
|
5170
|
+ // currentCheckedOrgNode = node.data.id
|
|
|
5171
|
+ // getDevicesByOrgId(node.data.id)
|
|
|
5172
|
+ // },
|
|
|
5173
|
+ // },
|
|
|
5174
|
+ // })
|
|
|
5175
|
+ // }
|
|
|
5176
|
+ //
|
|
|
5177
|
+ //
|
|
|
5178
|
+ // /**
|
|
|
5179
|
+ // * @description 生成设备选择器
|
|
|
5180
|
+ // */
|
|
|
5181
|
+ // function generatorDeviceSelect() {
|
|
|
5182
|
+ // devicePanel = defaultPanel.cloneNode(false)
|
|
|
5183
|
+ // const deviceSelect = UseLayUi.createSelect({
|
|
|
5184
|
+ // label: '设备',
|
|
|
5185
|
+ // layFilter: enumDataSourceConst.DEVICE_ID,
|
|
|
5186
|
+ // className: 'data-panel__select',
|
|
|
5187
|
+ // })
|
|
|
5188
|
+ // $(devicePanel).attr('id', enumActionEl.DEVICE_EL).append(deviceSelect)
|
|
|
5189
|
+ // }
|
|
|
5190
|
+ //
|
|
|
5191
|
+ // /**
|
|
|
5192
|
+ // * @description 生成从设备选择器
|
|
|
5193
|
+ // */
|
|
|
5194
|
+ // function generatorSlaveDevice() {
|
|
|
5195
|
+ // slaveDevicePanel = defaultPanel.cloneNode(false)
|
|
|
5196
|
+ // const slaveDeviceSelect = UseLayUi.createSelect({
|
|
|
5197
|
+ // label: '子设备',
|
|
|
5198
|
+ // layFilter: enumDataSourceConst.SLAVE_DEVICE_ID,
|
|
|
5199
|
+ // className: 'data-panel__select',
|
|
|
5200
|
+ // onClick(data) {
|
|
|
5201
|
+ // const { value } = data
|
|
|
5202
|
+ // getAttrByDeviceId(value)
|
|
|
5203
|
+ // },
|
|
|
5204
|
+ // })
|
|
|
5205
|
+ // $(slaveDevicePanel).css({ display: 'none' }).attr('id', enumActionEl.SLAVE_DEVICE_EL).append(slaveDeviceSelect)
|
|
|
5206
|
+ // }
|
|
|
5207
|
+ //
|
|
|
5208
|
+ // /**
|
|
|
5209
|
+ // * @description 生成属性选择器
|
|
|
5210
|
+ // */
|
|
|
5211
|
+ // function generatorAttrSelect() {
|
|
|
5212
|
+ // attrsPanel = defaultPanel.cloneNode(false)
|
|
|
5213
|
+ // const attrsSelect = UseLayUi.createSelect({
|
|
|
5214
|
+ // label: '属性',
|
|
|
5215
|
+ // layFilter: enumDataSourceConst.ATTR,
|
|
|
5216
|
+ // className: 'data-panel__select',
|
|
|
5217
|
+ // })
|
|
|
5218
|
+ // $(attrsPanel).attr('id', enumActionEl.ATTR_EL).append(attrsSelect)
|
|
|
5219
|
+ //
|
|
|
5220
|
+ // }
|
|
|
5221
|
+ //
|
|
|
5222
|
+ //
|
|
|
5223
|
+ // /**
|
|
|
5224
|
+ // * @description 根据组织ID获取设备
|
|
|
5225
|
+ // */
|
|
|
5226
|
+ // async function getDevicesByOrgId(organizationId) {
|
|
|
5227
|
+ // if (organizationId) {
|
|
|
5228
|
+ // const items = deviceList = await ConfigurationNodeApi.getMasterDevice(organizationId);
|
|
|
5229
|
+ // $(`#${ enumActionEl.DEVICE_EL }`).find('select').html(UseLayUi.generateOptionTemplate({ dataSource: items }))
|
|
|
5230
|
+ // form.render('select', CONTAINER_FILTER)
|
|
|
5231
|
+ // }
|
|
|
5232
|
+ // }
|
|
|
5233
|
+ //
|
|
|
5234
|
+ // /**
|
|
|
5235
|
+ // * @description 通过主设备ID获取从设备
|
|
|
5236
|
+ // */
|
|
|
5237
|
+ // async function getSlaveDeviceByMasterDeviceId(orgId, deviceId) {
|
|
|
5238
|
+ // if (deviceId && currentCheckedOrgNode) {
|
|
|
5239
|
+ // const items = await ConfigurationNodeApi.getSlaveDevice(orgId, deviceId);
|
|
|
5240
|
+ // $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).find('select').html(UseLayUi.generateOptionTemplate({ dataSource: items }))
|
|
|
5241
|
+ // form.render('select', CONTAINER_FILTER)
|
|
|
5242
|
+ // }
|
|
|
5243
|
+ // }
|
|
|
5244
|
+ //
|
|
|
5245
|
+ // /**
|
|
|
5246
|
+ // * @description 根据设备ID获取属性
|
|
|
5247
|
+ // */
|
|
|
5248
|
+ // async function getAttrByDeviceId(tbDeviceId) {
|
|
|
5249
|
+ // if (tbDeviceId) {
|
|
|
5250
|
+ // const [ err, res ] = await to(ConfigurationNodeApi.getDeviceAttr(tbDeviceId))
|
|
|
5251
|
+ // $(`#${ enumActionEl.ATTR_EL }`).find('select').html(UseLayUi.generateOptionTemplate({ dataSource: res }))
|
|
|
5252
|
+ // form.render('select', CONTAINER_FILTER)
|
|
|
5253
|
+ // }
|
|
|
5254
|
+ // }
|
|
|
5255
|
+ //
|
|
|
5256
|
+ //
|
|
|
5257
|
+ // /**
|
|
|
5258
|
+ // * @description 数据回显
|
|
|
5259
|
+ // */
|
|
|
5260
|
+ // async function echoData() {
|
|
|
5261
|
+ //
|
|
|
5262
|
+ // echoRefreshFn = () => {
|
|
|
5263
|
+ // echoDataSource()
|
|
|
5264
|
+ // echoActionType()
|
|
|
5265
|
+ // form.render(null, CONTAINER_FILTER)
|
|
|
5266
|
+ // }
|
|
|
5267
|
+ //
|
|
|
5268
|
+ // await getNodeBindInfo()
|
|
|
5269
|
+ //
|
|
|
5270
|
+ //
|
|
|
5271
|
+ // function echoDataSource() {
|
|
|
5272
|
+ // const { dataSources = [] } = currentNodeData || {}
|
|
|
5273
|
+ // const [ dataSource = {} ] = dataSources
|
|
|
5274
|
+ // const { orgId, deviceId, slaveDeviceId, attr } = dataSource
|
|
|
5275
|
+ // const queue = []
|
|
|
5276
|
+ // if (orgId) {
|
|
|
5277
|
+ // currentCheckedOrgNode = orgId
|
|
|
5278
|
+ // queue.push(getDevicesByOrgId(orgId))
|
|
|
5279
|
+ // }
|
|
|
5280
|
+ // if (slaveDeviceId) {
|
|
|
5281
|
+ // queue.push(getSlaveDeviceByMasterDeviceId(orgId, deviceId))
|
|
|
5282
|
+ // $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).css({ display: 'block' })
|
|
|
5283
|
+ // queue.push(getAttrByDeviceId(slaveDeviceId))
|
|
|
5284
|
+ // } else {
|
|
|
5285
|
+ // queue.push(getAttrByDeviceId(deviceId))
|
|
|
5286
|
+ // }
|
|
|
5287
|
+ // Promise.all(queue)
|
|
|
5288
|
+ // .finally(() => {
|
|
|
5289
|
+ // const orgNode = UseLayUi.findTreeObjectByField(treeList, currentCheckedOrgNode)
|
|
|
5290
|
+ // $(`#${ enumActionEl.ORG_EL } input[name="${ enumDataSourceConst.ORG_ID }"]`).parent().find('span').html(orgNode?.name)
|
|
|
5291
|
+ // form.val(CONTAINER_FILTER, {
|
|
|
5292
|
+ // orgId,
|
|
|
5293
|
+ // deviceId,
|
|
|
5294
|
+ // slaveDeviceId,
|
|
|
5295
|
+ // attr,
|
|
|
5296
|
+ // })
|
|
|
5297
|
+ // })
|
|
|
5298
|
+ // }
|
|
|
5299
|
+ //
|
|
|
5300
|
+ // async function echoActionType() {
|
|
|
5301
|
+ // const act = currentNodeData.act ?? []
|
|
|
5302
|
+ // const event = currentNodeData.event ?? []
|
|
|
5303
|
+ // const actionType = {}
|
|
|
5304
|
+ // for (const item of act) {
|
|
|
5305
|
+ // if (!item.condition || !item.condition?.length) {
|
|
|
5306
|
+ // $(`.interaction__container input[name="${ item.type }"]`).attr('disabled', true)
|
|
|
5307
|
+ // } else {
|
|
|
5308
|
+ // $(`.interaction__container input[name="${ item.type }"]`).attr('disabled', false)
|
|
|
5309
|
+ // }
|
|
|
5310
|
+ // actionType[item.type] = item.enabled
|
|
|
5311
|
+ // }
|
|
|
5312
|
+ // for (const item of event) {
|
|
|
5313
|
+ // if (!item.content) {
|
|
|
5314
|
+ // $(`.interaction__container input[name="${ item.type }"]`).attr('disabled', true)
|
|
|
5315
|
+ // } else {
|
|
|
5316
|
+ // $(`.interaction__container input[name="${ item.type }"]`).attr('disabled', false)
|
|
|
5317
|
+ // }
|
|
|
5318
|
+ // actionType[item.type] = item.enabled
|
|
|
5319
|
+ // }
|
|
|
5320
|
+ // form.val(CONTAINER_FILTER, actionType)
|
|
|
5321
|
+ // }
|
|
|
5322
|
+ // }
|
|
|
5323
|
+ //
|
|
|
5324
|
+ // function mount() {
|
|
|
5325
|
+ // generatorOrgTres()
|
|
|
5326
|
+ // generatorDeviceSelect()
|
|
|
5327
|
+ // generatorSlaveDevice()
|
|
|
5328
|
+ // generatorAttrSelect()
|
|
|
5329
|
+ // echoData()
|
|
|
5330
|
+ //
|
|
|
5331
|
+ // $(fragment).append(title).append(orgPanel).append(devicePanel).append(slaveDevicePanel).append(attrsPanel)
|
|
|
5332
|
+ //
|
|
|
5333
|
+ // $(container).append(fragment)
|
|
|
5334
|
+ //
|
|
|
5335
|
+ // }
|
|
|
5336
|
+ //
|
|
|
5337
|
+ // mount()
|
|
|
5338
|
+ //
|
|
|
5339
|
+ // }
|
5142
|
|
5340
|
|
|
|
5341
|
+ function createDataSourcePanel() {
|
5143
|
const fragment = document.createDocumentFragment()
|
5342
|
const fragment = document.createDocumentFragment()
|
5144
|
const defaultPanel = createPanel()
|
5343
|
const defaultPanel = createPanel()
|
5145
|
const title = createTitle('数据源')
|
5344
|
const title = createTitle('数据源')
|
5146
|
- let orgPanel, devicePanel, slaveDevicePanel, attrsPanel;
|
|
|
5147
|
- $(title).addClass('override__title--default')
|
|
|
5148
|
$(defaultPanel).addClass('override__panel--default')
|
5345
|
$(defaultPanel).addClass('override__panel--default')
|
5149
|
-
|
|
|
5150
|
- /**
|
|
|
5151
|
- * @description 设备列表
|
|
|
5152
|
- */
|
|
|
5153
|
- let deviceList = []
|
|
|
5154
|
-
|
|
|
5155
|
-
|
|
|
5156
|
- /**
|
|
|
5157
|
- * @description 生成组织选择
|
|
|
5158
|
- */
|
|
|
5159
|
- async function generatorOrgTres() {
|
|
|
5160
|
- orgPanel = defaultPanel.cloneNode(false)
|
|
|
5161
|
- const orgContainer = `<div id="${ enumActionEl.ORG_EL }"></div>`
|
|
|
5162
|
- $(orgPanel).append(orgContainer)
|
|
|
5163
|
-
|
|
|
5164
|
- const [ err, res ] = await to(ConfigurationNodeApi.getOrgTree())
|
|
|
5165
|
- if (err) return
|
|
|
5166
|
- treeList = res
|
|
|
5167
|
-
|
|
|
5168
|
- UseLayUi.createTreeSelect({
|
|
|
5169
|
- elem: `#${ enumActionEl.ORG_EL }`,
|
|
|
5170
|
- layFilter: enumDataSourceConst.ORG_ID,
|
|
|
5171
|
- className: 'data-source__org--override',
|
|
|
5172
|
- label: '组织',
|
|
|
5173
|
- singleUsage: false,
|
|
|
5174
|
- treeProps: {
|
|
|
5175
|
- data: treeList,
|
|
|
5176
|
- onlyIconControl: true,
|
|
|
5177
|
- click(node) {
|
|
|
5178
|
- currentCheckedOrgNode = node.data.id
|
|
|
5179
|
- getDevicesByOrgId(node.data.id)
|
|
|
5180
|
- },
|
|
|
5181
|
- },
|
|
|
5182
|
- })
|
|
|
5183
|
- }
|
|
|
5184
|
-
|
|
|
5185
|
- /**
|
|
|
5186
|
- * @description 生成设备选择器
|
|
|
5187
|
- */
|
|
|
5188
|
- function generatorDeviceSelect() {
|
|
|
5189
|
- devicePanel = defaultPanel.cloneNode(false)
|
|
|
5190
|
- const deviceSelect = UseLayUi.createSelect({
|
|
|
5191
|
- label: '设备',
|
|
|
5192
|
- layFilter: enumDataSourceConst.DEVICE_ID,
|
|
|
5193
|
- className: 'data-panel__select',
|
|
|
5194
|
- onClick(data) {
|
|
|
5195
|
- const { value } = data
|
|
|
5196
|
- const selected = deviceList.find(item => item.id === value)
|
|
|
5197
|
- if (selected.deviceType === enumDataSourceConst.GATEWAY) {
|
|
|
5198
|
- $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).css({ display: 'block' })
|
|
|
5199
|
- getSlaveDeviceByMasterDeviceId(currentCheckedOrgNode, selected.id)
|
|
|
5200
|
- } else {
|
|
|
5201
|
- $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).css({ display: 'none' })
|
|
|
5202
|
- getAttrByDeviceId(selected.id)
|
|
|
5203
|
- }
|
|
|
5204
|
- },
|
|
|
5205
|
- })
|
|
|
5206
|
- $(devicePanel).attr('id', enumActionEl.DEVICE_EL).append(deviceSelect)
|
|
|
5207
|
- }
|
|
|
5208
|
-
|
|
|
5209
|
- /**
|
|
|
5210
|
- * @description 生成从设备选择器
|
|
|
5211
|
- */
|
|
|
5212
|
- function generatorSlaveDevice() {
|
|
|
5213
|
- slaveDevicePanel = defaultPanel.cloneNode(false)
|
|
|
5214
|
- const slaveDeviceSelect = UseLayUi.createSelect({
|
|
|
5215
|
- label: '子设备',
|
|
|
5216
|
- layFilter: enumDataSourceConst.SLAVE_DEVICE_ID,
|
|
|
5217
|
- className: 'data-panel__select',
|
|
|
5218
|
- onClick(data) {
|
|
|
5219
|
- const { value } = data
|
|
|
5220
|
- getAttrByDeviceId(value)
|
|
|
5221
|
- },
|
|
|
5222
|
- })
|
|
|
5223
|
- $(slaveDevicePanel).css({ display: 'none' }).attr('id', enumActionEl.SLAVE_DEVICE_EL).append(slaveDeviceSelect)
|
|
|
5224
|
- }
|
|
|
5225
|
-
|
|
|
5226
|
- /**
|
|
|
5227
|
- * @description 生成属性选择器
|
|
|
5228
|
- */
|
|
|
5229
|
- function generatorAttrSelect() {
|
|
|
5230
|
- attrsPanel = defaultPanel.cloneNode(false)
|
|
|
5231
|
- const attrsSelect = UseLayUi.createSelect({
|
|
|
5232
|
- label: '属性',
|
|
|
5233
|
- layFilter: enumDataSourceConst.ATTR,
|
|
|
5234
|
- className: 'data-panel__select',
|
|
|
5235
|
- })
|
|
|
5236
|
- $(attrsPanel).attr('id', enumActionEl.ATTR_EL).append(attrsSelect)
|
|
|
5237
|
-
|
|
|
5238
|
- }
|
|
|
5239
|
-
|
|
|
5240
|
-
|
|
|
5241
|
- /**
|
|
|
5242
|
- * @description 根据组织ID获取设备
|
|
|
5243
|
- */
|
|
|
5244
|
- async function getDevicesByOrgId(organizationId) {
|
|
|
5245
|
- if (organizationId) {
|
|
|
5246
|
- const items = deviceList = await ConfigurationNodeApi.getMasterDevice(organizationId);
|
|
|
5247
|
- $(`#${ enumActionEl.DEVICE_EL }`).find('select').html(UseLayUi.generateOptionTemplate({ dataSource: items }))
|
|
|
5248
|
- form.render('select', CONTAINER_FILTER)
|
|
|
5249
|
- }
|
|
|
5250
|
- }
|
|
|
5251
|
-
|
|
|
5252
|
- /**
|
|
|
5253
|
- * @description 通过主设备ID获取从设备
|
|
|
5254
|
- */
|
|
|
5255
|
- async function getSlaveDeviceByMasterDeviceId(orgId, deviceId) {
|
|
|
5256
|
- if (deviceId && currentCheckedOrgNode) {
|
|
|
5257
|
- const items = await ConfigurationNodeApi.getSlaveDevice(orgId, deviceId);
|
|
|
5258
|
- $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).find('select').html(UseLayUi.generateOptionTemplate({ dataSource: items }))
|
|
|
5259
|
- form.render('select', CONTAINER_FILTER)
|
|
|
5260
|
- }
|
|
|
5261
|
- }
|
|
|
5262
|
-
|
|
|
5263
|
- /**
|
|
|
5264
|
- * @description 根据设备ID获取属性
|
|
|
5265
|
- */
|
|
|
5266
|
- async function getAttrByDeviceId(tbDeviceId) {
|
|
|
5267
|
- if (tbDeviceId) {
|
|
|
5268
|
- const [ err, res ] = await to(ConfigurationNodeApi.getDeviceAttr(tbDeviceId))
|
|
|
5269
|
- $(`#${ enumActionEl.ATTR_EL }`).find('select').html(UseLayUi.generateOptionTemplate({ dataSource: res }))
|
|
|
5270
|
- form.render('select', CONTAINER_FILTER)
|
|
|
5271
|
- }
|
|
|
5272
|
- }
|
5346
|
+ $(title).css({ padding: '6px 0 6px 6px' })
|
5273
|
|
5347
|
|
5274
|
|
5348
|
|
5275
|
- /**
|
|
|
5276
|
- * @description 数据回显
|
|
|
5277
|
- */
|
|
|
5278
|
- async function echoData() {
|
5349
|
+ async function mount() {
|
|
|
5350
|
+ const { component, echoDataSource } = generatorDataSourceComponent({ validate: false })
|
|
|
5351
|
+ $(fragment).append(title).append(component)
|
|
|
5352
|
+ $(container).append(fragment)
|
5279
|
|
5353
|
|
5280
|
- echoRefreshFn = () => {
|
|
|
5281
|
- echoDataSource()
|
5354
|
+ /**
|
|
|
5355
|
+ * @description 回显数据
|
|
|
5356
|
+ * @type {Function}
|
|
|
5357
|
+ */
|
|
|
5358
|
+ const refreshFn = echoRefreshFn
|
|
|
5359
|
+ echoRefreshFn = function () {
|
|
|
5360
|
+ refreshFn.apply(this)
|
|
|
5361
|
+ const { dataSources: [dataSource] = [] } = currentNodeData || {}
|
|
|
5362
|
+ echoDataSource(dataSource)
|
5282
|
echoActionType()
|
5363
|
echoActionType()
|
5283
|
form.render(null, CONTAINER_FILTER)
|
5364
|
form.render(null, CONTAINER_FILTER)
|
5284
|
}
|
5365
|
}
|
5285
|
|
5366
|
|
5286
|
await getNodeBindInfo()
|
5367
|
await getNodeBindInfo()
|
|
|
5368
|
+ }
|
5287
|
|
5369
|
|
5288
|
-
|
|
|
5289
|
- function echoDataSource() {
|
|
|
5290
|
- const { dataSources = [] } = currentNodeData || {}
|
|
|
5291
|
- const [ dataSource = {} ] = dataSources
|
|
|
5292
|
- const { orgId, deviceId, slaveDeviceId, attr } = dataSource
|
|
|
5293
|
- const queue = []
|
|
|
5294
|
- if (orgId) {
|
|
|
5295
|
- currentCheckedOrgNode = orgId
|
|
|
5296
|
- queue.push(getDevicesByOrgId(orgId))
|
|
|
5297
|
- }
|
|
|
5298
|
- if (slaveDeviceId) {
|
|
|
5299
|
- queue.push(getSlaveDeviceByMasterDeviceId(orgId, deviceId))
|
|
|
5300
|
- $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).css({ display: 'block' })
|
|
|
5301
|
- queue.push(getAttrByDeviceId(slaveDeviceId))
|
5370
|
+ async function echoActionType() {
|
|
|
5371
|
+ const act = currentNodeData.act ?? []
|
|
|
5372
|
+ const event = currentNodeData.event ?? []
|
|
|
5373
|
+ const actionType = {}
|
|
|
5374
|
+ for (const item of act) {
|
|
|
5375
|
+ if (!item.condition || !item.condition?.length) {
|
|
|
5376
|
+ $(`.interaction__container input[name="${item.type}"]`).attr('disabled', true)
|
5302
|
} else {
|
5377
|
} else {
|
5303
|
- queue.push(getAttrByDeviceId(deviceId))
|
5378
|
+ $(`.interaction__container input[name="${item.type}"]`).attr('disabled', false)
|
5304
|
}
|
5379
|
}
|
5305
|
- Promise.all(queue)
|
|
|
5306
|
- .finally(() => {
|
|
|
5307
|
- const orgNode = UseLayUi.findTreeObjectByField(treeList, currentCheckedOrgNode)
|
|
|
5308
|
- $(`#${ enumActionEl.ORG_EL } input[name="${ enumDataSourceConst.ORG_ID }"]`).parent().find('span').html(orgNode?.name)
|
|
|
5309
|
- form.val(CONTAINER_FILTER, {
|
|
|
5310
|
- orgId,
|
|
|
5311
|
- deviceId,
|
|
|
5312
|
- slaveDeviceId,
|
|
|
5313
|
- attr,
|
|
|
5314
|
- })
|
|
|
5315
|
- })
|
5380
|
+ actionType[item.type] = item.enabled
|
5316
|
}
|
5381
|
}
|
5317
|
-
|
|
|
5318
|
- async function echoActionType() {
|
|
|
5319
|
- const act = currentNodeData.act ?? []
|
|
|
5320
|
- const event = currentNodeData.event ?? []
|
|
|
5321
|
- const actionType = {}
|
|
|
5322
|
- for (const item of act) {
|
|
|
5323
|
- if (!item.condition || !item.condition?.length) {
|
|
|
5324
|
- $(`.interaction__container input[name="${ item.type }"]`).attr('disabled', true)
|
|
|
5325
|
- } else {
|
|
|
5326
|
- $(`.interaction__container input[name="${ item.type }"]`).attr('disabled', false)
|
|
|
5327
|
- }
|
|
|
5328
|
- actionType[item.type] = item.enabled
|
|
|
5329
|
- }
|
|
|
5330
|
- for (const item of event) {
|
|
|
5331
|
- if (!item.content) {
|
|
|
5332
|
- $(`.interaction__container input[name="${ item.type }"]`).attr('disabled', true)
|
|
|
5333
|
- } else {
|
|
|
5334
|
- $(`.interaction__container input[name="${ item.type }"]`).attr('disabled', false)
|
|
|
5335
|
- }
|
|
|
5336
|
- actionType[item.type] = item.enabled
|
5382
|
+ for (const item of event) {
|
|
|
5383
|
+ if (!item.content) {
|
|
|
5384
|
+ $(`.interaction__container input[name="${item.type}"]`).attr('disabled', true)
|
|
|
5385
|
+ } else {
|
|
|
5386
|
+ $(`.interaction__container input[name="${item.type}"]`).attr('disabled', false)
|
5337
|
}
|
5387
|
}
|
5338
|
- form.val(CONTAINER_FILTER, actionType)
|
5388
|
+ actionType[item.type] = item.enabled
|
5339
|
}
|
5389
|
}
|
5340
|
- }
|
|
|
5341
|
-
|
|
|
5342
|
- function mount() {
|
|
|
5343
|
- generatorOrgTres()
|
|
|
5344
|
- generatorDeviceSelect()
|
|
|
5345
|
- generatorSlaveDevice()
|
|
|
5346
|
- generatorAttrSelect()
|
|
|
5347
|
- echoData()
|
|
|
5348
|
-
|
|
|
5349
|
- $(fragment).append(title).append(orgPanel).append(devicePanel).append(slaveDevicePanel).append(attrsPanel)
|
|
|
5350
|
-
|
|
|
5351
|
- $(container).append(fragment)
|
|
|
5352
|
-
|
5390
|
+ form.val(CONTAINER_FILTER, actionType)
|
5353
|
}
|
5391
|
}
|
5354
|
|
5392
|
|
5355
|
mount()
|
5393
|
mount()
|
5356
|
-
|
|
|
5357
|
}
|
5394
|
}
|
5358
|
|
5395
|
|
|
|
5396
|
+ // /**
|
|
|
5397
|
+ // * @description 创建功能模块
|
|
|
5398
|
+ // */
|
|
|
5399
|
+ // function createFunctionPanel() {
|
|
|
5400
|
+ // const fragment = document.createDocumentFragment()
|
|
|
5401
|
+ // const title = createTitle('功能')
|
|
|
5402
|
+ // $(title).addClass('override__title--default')
|
|
|
5403
|
+ // fragment.append(title)
|
|
|
5404
|
+ // generateActionEventNode(functionList).forEach(item => {
|
|
|
5405
|
+ // const panel = createPanel()
|
|
|
5406
|
+ // $(panel).addClass('override__panel--default').append(item)
|
|
|
5407
|
+ // $(fragment).append(panel)
|
|
|
5408
|
+ // })
|
|
|
5409
|
+ // $(container).append(fragment)
|
|
|
5410
|
+ // }
|
5359
|
|
5411
|
|
5360
|
/**
|
5412
|
/**
|
5361
|
* @description 创建数据交互模块
|
5413
|
* @description 创建数据交互模块
|
|
@@ -5365,16 +5417,11 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5365,16 +5417,11 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5365
|
const title = createTitle('数据交互')
|
5417
|
const title = createTitle('数据交互')
|
5366
|
$(title).addClass('override__title--default')
|
5418
|
$(title).addClass('override__title--default')
|
5367
|
fragment.append(title)
|
5419
|
fragment.append(title)
|
5368
|
- generateDataEventNode().forEach(item => {
|
5420
|
+ generateActionEventNode(interactionList).forEach(item => {
|
5369
|
const panel = createPanel()
|
5421
|
const panel = createPanel()
|
5370
|
$(panel).addClass('override__panel--default').append(item)
|
5422
|
$(panel).addClass('override__panel--default').append(item)
|
5371
|
$(fragment).append(panel)
|
5423
|
$(fragment).append(panel)
|
5372
|
})
|
5424
|
})
|
5373
|
- // Object.keys(enumInteractionType).forEach(key => {
|
|
|
5374
|
- // form.on(`checkbox(${ key })`, event => {
|
|
|
5375
|
- // const isChecked = $(event.othis).hasClass('layui-form-checked')
|
|
|
5376
|
- // })
|
|
|
5377
|
- // })
|
|
|
5378
|
$(container).append(fragment)
|
5425
|
$(container).append(fragment)
|
5379
|
}
|
5426
|
}
|
5380
|
|
5427
|
|
|
@@ -5419,7 +5466,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5419,7 +5466,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5419
|
[enumDataSourceConst.ATTR]: field[enumDataSourceConst.ATTR],
|
5466
|
[enumDataSourceConst.ATTR]: field[enumDataSourceConst.ATTR],
|
5420
|
},
|
5467
|
},
|
5421
|
}
|
5468
|
}
|
5422
|
- const allType = [ ...interactionList, ...dynamicEffectList ]
|
5469
|
+ const allType = [...interactionList, ...dynamicEffectList]
|
5423
|
for (const item of allType) {
|
5470
|
for (const item of allType) {
|
5424
|
if (field[item.type] === ENABLED_FLAG) {
|
5471
|
if (field[item.type] === ENABLED_FLAG) {
|
5425
|
const enableItem = currentNodeData[item.category].find(each => each.type === item.type)
|
5472
|
const enableItem = currentNodeData[item.category].find(each => each.type === item.type)
|
|
@@ -5435,7 +5482,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5435,7 +5482,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5435
|
})
|
5482
|
})
|
5436
|
}
|
5483
|
}
|
5437
|
}
|
5484
|
}
|
5438
|
- const [ err, res ] = await to(ConfigurationNodeApi.updateNodeInfo(value))
|
5485
|
+ const [err, res] = await to(ConfigurationNodeApi.updateNodeInfo(value))
|
5439
|
if (err) return
|
5486
|
if (err) return
|
5440
|
UseLayUi.successMsg()
|
5487
|
UseLayUi.successMsg()
|
5441
|
await getNodeBindInfo()
|
5488
|
await getNodeBindInfo()
|
|
@@ -5444,96 +5491,767 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5444,96 +5491,767 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5444
|
}
|
5491
|
}
|
5445
|
|
5492
|
|
5446
|
/**
|
5493
|
/**
|
5447
|
- * @description 处理数据交互 - down || up 按下与抬起
|
5494
|
+ * @description
|
5448
|
*/
|
5495
|
*/
|
5449
|
- function handleDownOrUpEvent(event) {
|
|
|
5450
|
-
|
|
|
5451
|
- if (!currentCheckedOrgNode) {
|
|
|
5452
|
- layer.msg('请先选择组织')
|
|
|
5453
|
- return
|
|
|
5454
|
- }
|
|
|
5455
|
- // 事件类型
|
|
|
5456
|
- const enumEventType = {
|
|
|
5457
|
- DOWN: "按下",
|
|
|
5458
|
- UP: "抬起",
|
|
|
5459
|
- SINGLE: "单击",
|
|
|
5460
|
- DOUBLE: "双击",
|
|
|
5461
|
- };
|
5496
|
+ function handleSettingVarImage(event) {
|
5462
|
|
5497
|
|
5463
|
const enumActionEl = {
|
5498
|
const enumActionEl = {
|
5464
|
/**
|
5499
|
/**
|
5465
|
- * @description 表体节点
|
5500
|
+ * @description layer 保存按钮
|
5466
|
*/
|
5501
|
*/
|
5467
|
- DEVICE_DATA_BODY_EL: 'deviceDataTbody',
|
5502
|
+ LAYER_SUBMIT_FILTER: 'varImageLayerFilter',
|
5468
|
|
5503
|
|
5469
|
/**
|
5504
|
/**
|
5470
|
- * @description 删除行节点
|
5505
|
+ * @description 上传图片layer 按钮控制
|
5471
|
*/
|
5506
|
*/
|
5472
|
- DEL_ROW_EL: 'deleteRow',
|
5507
|
+ IMAGE_LAYER_FILTER: 'uploadImageLayerFilter',
|
5473
|
|
5508
|
|
5474
|
/**
|
5509
|
/**
|
5475
|
- * @description 增加行节点
|
5510
|
+ * @description 行控制
|
5476
|
*/
|
5511
|
*/
|
5477
|
- ADD_ROW_EL: 'addRow',
|
5512
|
+ ROW_FILTER: 'varImageTableRowFilter',
|
5478
|
|
5513
|
|
5479
|
/**
|
5514
|
/**
|
5480
|
- * @descripton
|
5515
|
+ * @description 颜色控制
|
5481
|
*/
|
5516
|
*/
|
5482
|
- ROW_FILTER: 'interactionRowFilter',
|
5517
|
+ COLOR_PICKER_FILTER: 'varImageTableColorPickerFilter',
|
5483
|
|
5518
|
|
5484
|
/**
|
5519
|
/**
|
5485
|
- * @description json editor
|
5520
|
+ * @description 最小值控制
|
5486
|
*/
|
5521
|
*/
|
5487
|
- EDITOR_JSON: 'editor__json-',
|
5522
|
+ MIN_FILTER: 'varImageTableMinFilter',
|
5488
|
|
5523
|
|
5489
|
/**
|
5524
|
/**
|
5490
|
- * @description 弹出层保存 filter
|
5525
|
+ * @description 最大值控制
|
5491
|
*/
|
5526
|
*/
|
5492
|
- LAYER_SUBMIT_FILTER: 'interactionLayerSubmit',
|
5527
|
+ MAX_FILTER: 'varImageTableMaxFilter',
|
5493
|
|
5528
|
|
5494
|
/**
|
5529
|
/**
|
5495
|
- * @description ace builder
|
5530
|
+ * @description 表体
|
5496
|
*/
|
5531
|
*/
|
5497
|
- JSON: 'ace__builder-json',
|
|
|
5498
|
- }
|
5532
|
+ TABLE_BODY_EL: 'variableImageTable',
|
5499
|
|
5533
|
|
|
|
5534
|
+ /**
|
|
|
5535
|
+ * @description 添加行控制
|
|
|
5536
|
+ */
|
|
|
5537
|
+ ADD_ROW_EL: 'variableImageTableAddRow',
|
5500
|
|
5538
|
|
5501
|
- /**
|
|
|
5502
|
- * @description 所有设备选项
|
|
|
5503
|
- * @type {*[]}
|
|
|
5504
|
- */
|
|
|
5505
|
- let allDeviceOptions = []
|
5539
|
+ /**
|
|
|
5540
|
+ * @description 设置图片控制
|
|
|
5541
|
+ */
|
|
|
5542
|
+ SET_IMG_EL: 'variableImageTableSetImgEl',
|
5506
|
|
5543
|
|
5507
|
- let addRowNumber = 0
|
5544
|
+ /**
|
|
|
5545
|
+ * @description 预览区域控制
|
|
|
5546
|
+ */
|
|
|
5547
|
+ PREVIEW_IMG_CONTAINER: 'img__container',
|
5508
|
|
5548
|
|
5509
|
- const getRowFilter = (rowNumber) => `${ enumActionEl.ROW_FILTER }${ rowNumber }`
|
5549
|
+ /**
|
|
|
5550
|
+ * @description 删除图片控制
|
|
|
5551
|
+ */
|
|
|
5552
|
+ DEL_PREVIEW_IMG: 'img__delete',
|
5510
|
|
5553
|
|
5511
|
- /**
|
|
|
5512
|
- * @description 枚举常量
|
|
|
5513
|
- * @enum DEVICE
|
|
|
5514
|
- */
|
|
|
5515
|
- const enumConst = {
|
|
|
5516
|
/**
|
5554
|
/**
|
5517
|
- * @description 设备
|
5555
|
+ * @description 删除行控制
|
5518
|
*/
|
5556
|
*/
|
5519
|
- DEVICE: 'deviceId',
|
5557
|
+ DEL_ROW_EL: 'variableImageTableDelRow',
|
|
|
5558
|
+
|
5520
|
/**
|
5559
|
/**
|
5521
|
- * @description 子设备
|
5560
|
+ * @description 图片选中区域节点
|
5522
|
*/
|
5561
|
*/
|
5523
|
- SLAVE_DEVICE: 'slaveDeviceId',
|
5562
|
+ IMG_SELECT_CONTAINER_EL: 'imgSelectContainerEl',
|
|
|
5563
|
+
|
5524
|
/**
|
5564
|
/**
|
5525
|
- * @description 变量
|
5565
|
+ * @description 切换图片来源控制
|
5526
|
*/
|
5566
|
*/
|
5527
|
- ATTR: 'attr',
|
5567
|
+ SWITCH_IMG_ORIGIN_FILTER: 'switchImgOriginFilter',
|
|
|
5568
|
+
|
5528
|
/**
|
5569
|
/**
|
5529
|
- * @description 下发值
|
5570
|
+ * @description 图片选中侧边栏节点
|
5530
|
*/
|
5571
|
*/
|
5531
|
- VALUE: 'value',
|
5572
|
+ VAR_IMG_CONTAINER_SIDEBAR: 'var-image__container-sidebar',
|
5532
|
|
5573
|
|
5533
|
/**
|
5574
|
/**
|
5534
|
- * @description 方式
|
5575
|
+ * @description 图库图形选择区域
|
5535
|
*/
|
5576
|
*/
|
5536
|
- WAY: 'way',
|
5577
|
+ VAR_IMG_CONTAINER_CONTENT: 'var-image__container-content',
|
|
|
5578
|
+
|
|
|
5579
|
+ /**
|
|
|
5580
|
+ * @description 图库图形项
|
|
|
5581
|
+ */
|
|
|
5582
|
+ VAR_IMG_ITEM: 'var-image__img-item',
|
|
|
5583
|
+
|
|
|
5584
|
+ /**
|
|
|
5585
|
+ * @description 图库图形选中控制
|
|
|
5586
|
+ */
|
|
|
5587
|
+ VAR_IMG_ITEM_CHECKED: 'var-image__img-item--checked',
|
|
|
5588
|
+
|
|
|
5589
|
+ /**
|
|
|
5590
|
+ * @description 图库图形类别节点
|
|
|
5591
|
+ */
|
|
|
5592
|
+ VAR_IMG_CATEGORY: 'var-image__category',
|
|
|
5593
|
+
|
|
|
5594
|
+ /**
|
|
|
5595
|
+ * @description 图库图形类别选择状态
|
|
|
5596
|
+ */
|
|
|
5597
|
+ VAR_IMG_CATEGORY_CHECKED: 'var-image__category--checked',
|
|
|
5598
|
+
|
|
|
5599
|
+ /**
|
|
|
5600
|
+ * @description 本地上传图片节点
|
|
|
5601
|
+ */
|
|
|
5602
|
+ UPLOAD_LOCAL_FILE_EL: 'var-image__container--local',
|
|
|
5603
|
+
|
|
|
5604
|
+ /**
|
|
|
5605
|
+ * @description 本地上传图片状态
|
|
|
5606
|
+ */
|
|
|
5607
|
+ IMAGE_UPLOAD_STATE_EL: 'var-image__upload-state',
|
|
|
5608
|
+
|
|
|
5609
|
+ /**
|
|
|
5610
|
+ * @description 预览图片状态
|
|
|
5611
|
+ */
|
|
|
5612
|
+ IMAGE_PREVIEW_EL: 'preview__img--preview',
|
|
|
5613
|
+
|
|
|
5614
|
+ /**
|
|
|
5615
|
+ * @description 本地图片上传删除按钮
|
|
|
5616
|
+ */
|
|
|
5617
|
+ IMAGE_DEL_PREVIEW_EL: 'var-image__del-icon',
|
|
|
5618
|
+
|
|
|
5619
|
+ /**
|
|
|
5620
|
+ * @description
|
|
|
5621
|
+ */
|
|
|
5622
|
+ DATA_SOURCE_COMP_EL: 'varImgDataSourceEl',
|
|
|
5623
|
+ }
|
|
|
5624
|
+
|
|
|
5625
|
+ const enumConst = {
|
|
|
5626
|
+
|
|
|
5627
|
+ /**
|
|
|
5628
|
+ * @description 最小值
|
|
|
5629
|
+ */
|
|
|
5630
|
+ MIN: 'min',
|
|
|
5631
|
+
|
|
|
5632
|
+ /**
|
|
|
5633
|
+ * @description 最大值
|
|
|
5634
|
+ */
|
|
|
5635
|
+ MAX: 'max',
|
|
|
5636
|
+
|
|
|
5637
|
+ /**
|
|
|
5638
|
+ * @description 图片字段 key
|
|
|
5639
|
+ */
|
|
|
5640
|
+ IMAGE: 'image',
|
|
|
5641
|
+
|
|
|
5642
|
+ /**
|
|
|
5643
|
+ * @description 颜色
|
|
|
5644
|
+ */
|
|
|
5645
|
+ COLOR: 'color',
|
|
|
5646
|
+
|
|
|
5647
|
+ /**
|
|
|
5648
|
+ * @description 图片来源
|
|
|
5649
|
+ */
|
|
|
5650
|
+ IMAGE_ORIGIN: 'imageOrigin',
|
|
|
5651
|
+
|
|
|
5652
|
+ /**
|
|
|
5653
|
+ * @description 图库图形类别
|
|
|
5654
|
+ */
|
|
|
5655
|
+ IMAGE_GALLERY_CATEGORY: 'category',
|
|
|
5656
|
+
|
|
|
5657
|
+ /**
|
|
|
5658
|
+ * @description 图表图形路径
|
|
|
5659
|
+ */
|
|
|
5660
|
+ IMAGE_GALLERY_IMG_PATH: 'imgPath',
|
|
|
5661
|
+ }
|
|
|
5662
|
+
|
|
|
5663
|
+ const enumImageOriginType = {
|
|
|
5664
|
+ LOCAL: 'local',
|
|
|
5665
|
+ GALLERY: 'gallery',
|
|
|
5666
|
+ }
|
|
|
5667
|
+
|
|
|
5668
|
+ /**
|
|
|
5669
|
+ * @description 图片状态保存
|
|
|
5670
|
+ */
|
|
|
5671
|
+ let imageState = {}
|
|
|
5672
|
+
|
|
|
5673
|
+ let addRowNumber = 0
|
|
|
5674
|
+
|
|
|
5675
|
+ let getDataSourceValue = () => {
|
|
|
5676
|
+ }
|
|
|
5677
|
+
|
|
|
5678
|
+ const getRowFilter = (rowNumber) => `${enumActionEl.ROW_FILTER}${rowNumber}`
|
|
|
5679
|
+
|
|
|
5680
|
+ const getColorPickerFilter = (rowNumber) => `${enumActionEl.COLOR_PICKER_FILTER}${rowNumber}`
|
|
|
5681
|
+
|
|
|
5682
|
+ /**
|
|
|
5683
|
+ * @description 监听表格中的事件
|
|
|
5684
|
+ */
|
|
|
5685
|
+ function generatorEventListen() {
|
|
|
5686
|
+ createInputListener()
|
|
|
5687
|
+ createAddRowEvent()
|
|
|
5688
|
+ createDelRowEvent()
|
|
|
5689
|
+ createSetImgEvent()
|
|
|
5690
|
+ createDelPreviewImgEvent()
|
|
|
5691
|
+ }
|
|
|
5692
|
+
|
|
|
5693
|
+ /**
|
|
|
5694
|
+ * @description 删除行
|
|
|
5695
|
+ */
|
|
|
5696
|
+ function createDelRowEvent() {
|
|
|
5697
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`).on('click', `.${enumActionEl.DEL_ROW_EL}`, (event) => {
|
|
|
5698
|
+ $(event.target).parents('tr').remove()
|
|
|
5699
|
+ })
|
|
|
5700
|
+ }
|
|
|
5701
|
+
|
|
|
5702
|
+ /**
|
|
|
5703
|
+ * @description 添加行事件
|
|
|
5704
|
+ */
|
|
|
5705
|
+ function createAddRowEvent() {
|
|
|
5706
|
+ $(`#${enumActionEl.ADD_ROW_EL}`).on('click', () => {
|
|
|
5707
|
+ addRecord()
|
|
|
5708
|
+ })
|
|
|
5709
|
+ }
|
|
|
5710
|
+
|
|
|
5711
|
+ /**
|
|
|
5712
|
+ * @description 删除已选择的变量图片
|
|
|
5713
|
+ */
|
|
|
5714
|
+ function createDelPreviewImgEvent() {
|
|
|
5715
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`).on('click', `.${enumActionEl.DEL_PREVIEW_IMG}`, (event) => {
|
|
|
5716
|
+ $(event.target)
|
|
|
5717
|
+ .parents(`div.${enumActionEl.PREVIEW_IMG_CONTAINER}`).find('img').attr('src', '')
|
|
|
5718
|
+ const rowFilter = $(event.target).parents(`tr`).attr('lay-filter')
|
|
|
5719
|
+ form.val(rowFilter, {
|
|
|
5720
|
+ [enumConst.IMAGE_ORIGIN]: null,
|
|
|
5721
|
+ [enumConst.IMAGE_GALLERY_CATEGORY]: null,
|
|
|
5722
|
+ [enumConst.IMAGE_GALLERY_IMG_PATH]: null,
|
|
|
5723
|
+ })
|
|
|
5724
|
+ })
|
|
|
5725
|
+ }
|
|
|
5726
|
+
|
|
|
5727
|
+ /**
|
|
|
5728
|
+ * @description 选择图片
|
|
|
5729
|
+ */
|
|
|
5730
|
+ function createSetImgEvent() {
|
|
|
5731
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`).on('click', `.${enumActionEl.SET_IMG_EL}`, (event) => {
|
|
|
5732
|
+ if ($(event.target).hasClass(enumActionEl.DEL_PREVIEW_IMG)) return
|
|
|
5733
|
+ const rowFilter = $(event.target).parents('tr').attr('lay-filter')
|
|
|
5734
|
+ createUploadImgLayer(rowFilter)
|
|
|
5735
|
+ })
|
|
|
5736
|
+ }
|
|
|
5737
|
+
|
|
|
5738
|
+ /**
|
|
|
5739
|
+ * @description 创建本地图片上传区域
|
|
|
5740
|
+ */
|
|
|
5741
|
+ function createLocalFileContainer() {
|
|
|
5742
|
+ return `
|
|
|
5743
|
+ <div id="${enumActionEl.UPLOAD_LOCAL_FILE_EL}" class="layui-upload">
|
|
|
5744
|
+ <div class="preview__img">
|
|
|
5745
|
+ <img src="" class="layui-upload-img" id="${enumActionEl.IMAGE_PREVIEW_EL}">
|
|
|
5746
|
+ <div class="var_image__add-icon">+</div>
|
|
|
5747
|
+ <div class="var-image__del-icon">x</div>
|
|
|
5748
|
+ </div>
|
|
|
5749
|
+ <div class="layui-upload-list"></div>
|
|
|
5750
|
+ </div>
|
|
|
5751
|
+ <div id="${enumActionEl.IMAGE_UPLOAD_STATE_EL}"></div>
|
|
|
5752
|
+ <div style="margin-top: 30px;">图片格式支持png、jpg(jpeg)、gif,大小不能超过5M</div>
|
|
|
5753
|
+ `
|
|
|
5754
|
+ }
|
|
|
5755
|
+
|
|
|
5756
|
+ /**
|
|
|
5757
|
+ * @description 上传
|
|
|
5758
|
+ */
|
|
|
5759
|
+ function uploadFileEvent() {
|
|
|
5760
|
+ $(`.${enumActionEl.IMAGE_DEL_PREVIEW_EL}`).on('click', (event) => {
|
|
|
5761
|
+ event.stopPropagation()
|
|
|
5762
|
+ $(`#${enumActionEl.IMAGE_PREVIEW_EL}`).attr('src', '')
|
|
|
5763
|
+ imageState[enumConst.IMAGE_GALLERY_IMG_PATH] = null
|
|
|
5764
|
+ })
|
|
|
5765
|
+ const uploadInst = upload.render({
|
|
|
5766
|
+ elem: `#${enumActionEl.UPLOAD_LOCAL_FILE_EL}`,
|
|
|
5767
|
+ auto: false,
|
|
|
5768
|
+ size: 1024 * 5,
|
|
|
5769
|
+ url: '/yt/oss/upload',
|
|
|
5770
|
+ method: 'post',
|
|
|
5771
|
+ choose(obj) {
|
|
|
5772
|
+ obj.preview(async function (index, file, result) {
|
|
|
5773
|
+ const formData = new FormData()
|
|
|
5774
|
+ formData.set('file', file)
|
|
|
5775
|
+ const [err, res] = await to(ConfigurationNodeApi.uploadImg(formData))
|
|
|
5776
|
+ if (!err) {
|
|
|
5777
|
+ $(`#${enumActionEl.IMAGE_PREVIEW_EL}`).attr('src', result)
|
|
|
5778
|
+ const { fileStaticUri = '' } = res
|
|
|
5779
|
+ imageState[enumConst.IMAGE_GALLERY_IMG_PATH] = fileStaticUri
|
|
|
5780
|
+ }
|
|
|
5781
|
+ });
|
|
|
5782
|
+ },
|
|
|
5783
|
+ });
|
|
|
5784
|
+ }
|
|
|
5785
|
+
|
|
|
5786
|
+ /**
|
|
|
5787
|
+ * @description 设置选中样式
|
|
|
5788
|
+ * @param event
|
|
|
5789
|
+ * @param nodeClass
|
|
|
5790
|
+ * @param styleClass
|
|
|
5791
|
+ */
|
|
|
5792
|
+ function setImageSelectedStyle(event, nodeClass, styleClass) {
|
|
|
5793
|
+ if (!$(event.target).hasClass(nodeClass)) return
|
|
|
5794
|
+ $(`.${nodeClass}`).each(function () {
|
|
|
5795
|
+ $(this).removeClass(styleClass)
|
|
|
5796
|
+ })
|
|
|
5797
|
+ $(event.target).addClass(styleClass)
|
|
|
5798
|
+ }
|
|
|
5799
|
+
|
|
|
5800
|
+ /**
|
|
|
5801
|
+ * @description 切换图库图形
|
|
|
5802
|
+ * @param event
|
|
|
5803
|
+ */
|
|
|
5804
|
+ function switchGalleryLib(event) {
|
|
|
5805
|
+ const key = $(event.target).attr(enumConst.IMAGE_GALLERY_CATEGORY)
|
|
|
5806
|
+ const category = sidebarInstance.getVariableImageLib(key)
|
|
|
5807
|
+ if (key && category) {
|
|
|
5808
|
+ $(`#${enumActionEl.VAR_IMG_CONTAINER_CONTENT}`).html(
|
|
|
5809
|
+ category.lib.reduce((prev, next) => prev + `<div class="${enumActionEl.VAR_IMG_ITEM}" title="${next.name}"><img src="${next.staticPath}" alt=""></div>`, ''),
|
|
|
5810
|
+ )
|
|
|
5811
|
+ }
|
|
|
5812
|
+ }
|
|
|
5813
|
+
|
|
|
5814
|
+ /**
|
|
|
5815
|
+ * @description 图片来源事件监听
|
|
|
5816
|
+ */
|
|
|
5817
|
+ function generatorSelectImgEventListener() {
|
|
|
5818
|
+ $(`#${enumActionEl.VAR_IMG_CONTAINER_CONTENT}`).on('click', event => {
|
|
|
5819
|
+ setImageSelectedStyle(event, enumActionEl.VAR_IMG_ITEM, enumActionEl.VAR_IMG_ITEM_CHECKED)
|
|
|
5820
|
+ imageState[enumConst.IMAGE_GALLERY_IMG_PATH] = $(event.target).find('img').attr('src')
|
|
|
5821
|
+ })
|
|
|
5822
|
+ $(`#${enumActionEl.VAR_IMG_CONTAINER_SIDEBAR}`).on('click', event => {
|
|
|
5823
|
+ setImageSelectedStyle(event, enumActionEl.VAR_IMG_CATEGORY, enumActionEl.VAR_IMG_CATEGORY_CHECKED)
|
|
|
5824
|
+ imageState[enumConst.IMAGE_GALLERY_CATEGORY] = $(event.target).attr(enumConst.IMAGE_GALLERY_CATEGORY)
|
|
|
5825
|
+ imageState[enumConst.IMAGE_GALLERY_IMG_PATH] = null
|
|
|
5826
|
+ switchGalleryLib(event)
|
|
|
5827
|
+ })
|
|
|
5828
|
+ }
|
|
|
5829
|
+
|
|
|
5830
|
+ /**
|
|
|
5831
|
+ * @description 创建图库图形上传区域
|
|
|
5832
|
+ */
|
|
|
5833
|
+ function createGalleryFileContainer() {
|
|
|
5834
|
+ const category = sidebarInstance.getAllVariableImageLib()
|
|
|
5835
|
+ const defaultShow = category[0] || { lib: [] }
|
|
|
5836
|
+ return `
|
|
|
5837
|
+ <div class="var-image__container--gallery">
|
|
|
5838
|
+ <div id="${enumActionEl.VAR_IMG_CONTAINER_SIDEBAR}">
|
|
|
5839
|
+ ${category.reduce((prev, next) => prev + `<div class="${enumActionEl.VAR_IMG_CATEGORY}" ${enumConst.IMAGE_GALLERY_CATEGORY}="${next.key}">${next.label}</div>`, '')}
|
|
|
5840
|
+ </div>
|
|
|
5841
|
+ <div id="${enumActionEl.VAR_IMG_CONTAINER_CONTENT}">
|
|
|
5842
|
+ ${defaultShow.lib.reduce((prev, next) => prev + `<div class="${enumActionEl.VAR_IMG_ITEM}" title="${next.name}"><img src="${next.staticPath}" alt=""></div>`, '')}
|
|
|
5843
|
+ </div>
|
|
|
5844
|
+ </div>
|
|
|
5845
|
+ `
|
|
|
5846
|
+ }
|
|
|
5847
|
+
|
|
|
5848
|
+ /**
|
|
|
5849
|
+ * @description 切换
|
|
|
5850
|
+ */
|
|
|
5851
|
+ function switchUploadImgTypeEventListener() {
|
|
|
5852
|
+ form.on(`radio(${enumActionEl.SWITCH_IMG_ORIGIN_FILTER})`, event => {
|
|
|
5853
|
+ const { value } = event
|
|
|
5854
|
+ imageState = {}
|
|
|
5855
|
+ if (value === enumImageOriginType.LOCAL) {
|
|
|
5856
|
+ $(`#${enumActionEl.IMG_SELECT_CONTAINER_EL}`).html(createLocalFileContainer())
|
|
|
5857
|
+ imageState[enumConst.IMAGE_ORIGIN] = enumImageOriginType.LOCAL
|
|
|
5858
|
+ uploadFileEvent()
|
|
|
5859
|
+ } else if (value === enumImageOriginType.GALLERY) {
|
|
|
5860
|
+ $(`#${enumActionEl.IMG_SELECT_CONTAINER_EL}`).html(createGalleryFileContainer())
|
|
|
5861
|
+ const defaultChecked = $(`.${enumActionEl.VAR_IMG_CATEGORY}`).eq(0)
|
|
|
5862
|
+ defaultChecked.addClass(enumActionEl.VAR_IMG_CATEGORY_CHECKED)
|
|
|
5863
|
+ imageState[enumConst.IMAGE_GALLERY_CATEGORY] = defaultChecked.attr(enumConst.IMAGE_GALLERY_CATEGORY)
|
|
|
5864
|
+ imageState[enumConst.IMAGE_ORIGIN] = enumImageOriginType.GALLERY
|
|
|
5865
|
+ generatorSelectImgEventListener()
|
|
|
5866
|
+ }
|
|
|
5867
|
+ })
|
|
|
5868
|
+ }
|
|
|
5869
|
+
|
|
|
5870
|
+ /**
|
|
|
5871
|
+ * @description 设置选中图片及绑定参数
|
|
|
5872
|
+ * @param rowFilter
|
|
|
5873
|
+ */
|
|
|
5874
|
+ function setCheckedImg(rowFilter) {
|
|
|
5875
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`)
|
|
|
5876
|
+ .find(`tr[lay-filter="${rowFilter}"]`)
|
|
|
5877
|
+ .find('img').attr('src', imageState[enumConst.IMAGE_GALLERY_IMG_PATH])
|
|
|
5878
|
+
|
|
|
5879
|
+ form.val(rowFilter, {
|
|
|
5880
|
+ [enumConst.IMAGE_ORIGIN]: imageState[enumConst.IMAGE_ORIGIN],
|
|
|
5881
|
+ [enumConst.IMAGE_GALLERY_CATEGORY]: imageState[enumConst.IMAGE_GALLERY_CATEGORY],
|
|
|
5882
|
+ [enumConst.IMAGE_GALLERY_IMG_PATH]: imageState[enumConst.IMAGE_GALLERY_IMG_PATH],
|
|
|
5883
|
+ })
|
|
|
5884
|
+ }
|
|
|
5885
|
+
|
|
|
5886
|
+ /**
|
|
|
5887
|
+ * @description 初始化并设置默认值
|
|
|
5888
|
+ */
|
|
|
5889
|
+ function initSelectImg() {
|
|
|
5890
|
+ switchUploadImgTypeEventListener()
|
|
|
5891
|
+ uploadFileEvent()
|
|
|
5892
|
+ imageState[enumConst.IMAGE_ORIGIN] = enumImageOriginType.LOCAL
|
|
|
5893
|
+ form.render()
|
|
|
5894
|
+ }
|
|
|
5895
|
+
|
|
|
5896
|
+ /**
|
|
|
5897
|
+ * @description 创建上传图片layer
|
|
|
5898
|
+ */
|
|
|
5899
|
+ function createUploadImgLayer(rowFilter) {
|
|
|
5900
|
+ const content = `
|
|
|
5901
|
+ <div class="layui-form">
|
|
|
5902
|
+ <div class="layui-form-item">
|
|
|
5903
|
+ <div class="var-image__radio">
|
|
|
5904
|
+ <input type="radio" lay-filter="${enumActionEl.SWITCH_IMG_ORIGIN_FILTER}" name="${enumConst.IMAGE}" value="${enumImageOriginType.LOCAL}" title="本地图片" checked="">
|
|
|
5905
|
+ <input type="radio" lay-filter="${enumActionEl.SWITCH_IMG_ORIGIN_FILTER}" name="${enumConst.IMAGE}" value="${enumImageOriginType.GALLERY}" title="图库图形">
|
|
|
5906
|
+ </div>
|
|
|
5907
|
+ </div>
|
|
|
5908
|
+ </div>
|
|
|
5909
|
+ <div id="${enumActionEl.IMG_SELECT_CONTAINER_EL}">
|
|
|
5910
|
+ ${createLocalFileContainer()}
|
|
|
5911
|
+ </div>
|
|
|
5912
|
+ `
|
|
|
5913
|
+
|
|
|
5914
|
+ layer.open({
|
|
|
5915
|
+ title: '图片',
|
|
|
5916
|
+ type: 1,
|
|
|
5917
|
+ content,
|
|
|
5918
|
+ skin: 'event-layer__override',
|
|
|
5919
|
+ area: '600px',
|
|
|
5920
|
+ btn: ["应用", "取消"],
|
|
|
5921
|
+ shade: ["0.7", "#fafafa"],
|
|
|
5922
|
+ yes(index) {
|
|
|
5923
|
+ layer.close(index)
|
|
|
5924
|
+ setCheckedImg(rowFilter)
|
|
|
5925
|
+ },
|
|
|
5926
|
+ but2(index, layero) {
|
|
|
5927
|
+ imageState = {}
|
|
|
5928
|
+ layer.close(index)
|
|
|
5929
|
+ },
|
|
|
5930
|
+ zIndex: layer.zIndex,
|
|
|
5931
|
+ async success(layero, index) {
|
|
|
5932
|
+ layer.setTop(layero);
|
|
|
5933
|
+ $(layero).addClass('layui-form').find('.layui-layer-btn0').attr({
|
|
|
5934
|
+ 'lay-submit': '',
|
|
|
5935
|
+ 'lay-filter': enumActionEl.IMAGE_LAYER_FILTER,
|
|
|
5936
|
+ })
|
|
|
5937
|
+ initSelectImg()
|
|
|
5938
|
+ },
|
|
|
5939
|
+ })
|
|
|
5940
|
+ }
|
|
|
5941
|
+
|
|
|
5942
|
+ /**
|
|
|
5943
|
+ * @description 创建输入验证
|
|
|
5944
|
+ */
|
|
|
5945
|
+ function createInputListener() {
|
|
|
5946
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`)
|
|
|
5947
|
+ .on('input', `.${enumActionEl.MIN_FILTER}`, event => {
|
|
|
5948
|
+ const minVal = $(event.target).val()
|
|
|
5949
|
+ const maxVal = $(event.target).parents('tr').find(`input.${enumActionEl.MAX_FILTER}`).val()
|
|
|
5950
|
+ if (maxVal !== '' && Number(minVal) > Number(maxVal)) {
|
|
|
5951
|
+ layer.tips('输入值大于最大值', $(event.target), {
|
|
|
5952
|
+ tips: 1,
|
|
|
5953
|
+ });
|
|
|
5954
|
+ }
|
|
|
5955
|
+ })
|
|
|
5956
|
+ .on('input', `.${enumActionEl.MAX_FILTER}`, event => {
|
|
|
5957
|
+ const maxVal = $(event.target).val()
|
|
|
5958
|
+ const minVal = $(event.target).parents('tr').find(`input.${enumActionEl.MIN_FILTER}`).val()
|
|
|
5959
|
+ if (minVal !== '' && Number(maxVal) < Number(minVal)) {
|
|
|
5960
|
+ layer.tips('输入值小于最小值', $(event.target), {
|
|
|
5961
|
+ tips: 1,
|
|
|
5962
|
+ });
|
|
|
5963
|
+ }
|
|
|
5964
|
+ })
|
|
|
5965
|
+ }
|
|
|
5966
|
+
|
|
|
5967
|
+ /**
|
|
|
5968
|
+ * @description 添加记录
|
|
|
5969
|
+ */
|
|
|
5970
|
+ function addRecord() {
|
|
|
5971
|
+ const rowFormFilter = getRowFilter(addRowNumber)
|
|
|
5972
|
+ const content = `
|
|
|
5973
|
+ <tr class="layui-form" lay-filter="${rowFormFilter}">
|
|
|
5974
|
+ <td>
|
|
|
5975
|
+ <div class="layui-form-item">
|
|
|
5976
|
+ <input class="layui-input ${enumActionEl.MIN_FILTER}" autocomplete="off" type="number" name="${enumConst.MIN}" lay-filter="${enumConst.MIN}" lay-verType="tips" lay-verify="required" />
|
|
|
5977
|
+ </div>
|
|
|
5978
|
+ </td>
|
|
|
5979
|
+ <td>
|
|
|
5980
|
+ <div class="layui-form-item">
|
|
|
5981
|
+ <input class="layui-input ${enumActionEl.MAX_FILTER}"" autocomplete="off" type="number" name="${enumConst.MAX}" lay-filter="${enumConst.MAX}" lay-verType="tips" lay-verify="required" />
|
|
|
5982
|
+ </div>
|
|
|
5983
|
+ </td>
|
|
|
5984
|
+ <td>
|
|
|
5985
|
+ <div class="${enumActionEl.SET_IMG_EL}">
|
|
|
5986
|
+ <input name="${enumConst.IMAGE_GALLERY_CATEGORY}" type="text" style="display: none">
|
|
|
5987
|
+ <input name="${enumConst.IMAGE_GALLERY_IMG_PATH}" type="text" style="display: none">
|
|
|
5988
|
+ <input name="${enumConst.IMAGE_ORIGIN}" type="text" style="display: none">
|
|
|
5989
|
+ <div class="${enumActionEl.PREVIEW_IMG_CONTAINER}">
|
|
|
5990
|
+ <img src="" alt="">
|
|
|
5991
|
+ <div class="${enumActionEl.DEL_PREVIEW_IMG}">x</div>
|
|
|
5992
|
+ <div class="add__button">+</div>
|
|
|
5993
|
+ </div>
|
|
|
5994
|
+ </div>
|
|
|
5995
|
+ </td>
|
|
|
5996
|
+<!-- <td>-->
|
|
|
5997
|
+<!-- <div style="display: flex">-->
|
|
|
5998
|
+<!-- <input class="layui-input" style="border-width: 1px; border-right: none;" autocomplete="off" ype="number" name="${enumConst.COLOR}" lay-filter="${enumConst.COLOR}" lay-verType="tips" lay-verify="required" />-->
|
|
|
5999
|
+<!-- <div id="${getColorPickerFilter(addRowNumber)}"></div>-->
|
|
|
6000
|
+<!-- </div>-->
|
|
|
6001
|
+<!-- </td>-->
|
|
|
6002
|
+ <td style="text-align: center">
|
|
|
6003
|
+ <button type="button" class="layui-btn layui-btn-primary layui-border-red ${enumActionEl.DEL_ROW_EL}">删除</button>
|
|
|
6004
|
+ </td>
|
|
|
6005
|
+ </tr>
|
|
|
6006
|
+ `
|
|
|
6007
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`).append(content)
|
|
|
6008
|
+ // colorpicker.render({
|
|
|
6009
|
+ // elem: $(`#${getColorPickerFilter(addRowNumber)}`),
|
|
|
6010
|
+ // done(color) {
|
|
|
6011
|
+ // $(`#${enumActionEl.TABLE_BODY_EL} tr[lay-filter="${rowFormFilter}"]`).find(`input[lay-filter="${enumConst.COLOR}"]`).val(color)
|
|
|
6012
|
+ // },
|
|
|
6013
|
+ // predefine: true,
|
|
|
6014
|
+ // });
|
|
|
6015
|
+ form.render()
|
|
|
6016
|
+ addRowNumber++
|
|
|
6017
|
+ }
|
|
|
6018
|
+
|
|
|
6019
|
+
|
|
|
6020
|
+ /**
|
|
|
6021
|
+ * @description 回显数据
|
|
|
6022
|
+ */
|
|
|
6023
|
+ function echoFormData(info) {
|
|
|
6024
|
+ const { condition = [] } = info
|
|
|
6025
|
+ condition.forEach((item, index) => {
|
|
|
6026
|
+ addRecord()
|
|
|
6027
|
+ const rowFilter = getRowFilter(index)
|
|
|
6028
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`).find(`.${enumActionEl.PREVIEW_IMG_CONTAINER}>img`).attr('src', item[enumConst.IMAGE_GALLERY_IMG_PATH])
|
|
|
6029
|
+ form.val(rowFilter, { ...item })
|
|
|
6030
|
+ })
|
|
|
6031
|
+ }
|
|
|
6032
|
+
|
|
|
6033
|
+ /**
|
|
|
6034
|
+ * @description 验证最大最小值
|
|
|
6035
|
+ * @param tableData
|
|
|
6036
|
+ * @returns {boolean}
|
|
|
6037
|
+ */
|
|
|
6038
|
+ function validate(tableData) {
|
|
|
6039
|
+ let validateFlag = true
|
|
|
6040
|
+ for (let i = 0; i < tableData.length; i++) {
|
|
|
6041
|
+ const { min, max } = tableData[i]
|
|
|
6042
|
+ if (Number(min) > Number(max)) {
|
|
|
6043
|
+ validateFlag = false
|
|
|
6044
|
+ layer.tips('输入值大于最大值', $(`#${enumActionEl.TABLE_BODY_EL} tr`).eq(i).find(`input[name="${enumConst.MIN}"]`))
|
|
|
6045
|
+ break
|
|
|
6046
|
+ } else if (Number(max) < Number(min)) {
|
|
|
6047
|
+ validateFlag = false
|
|
|
6048
|
+ layer.tips('输入值小于最小值', $(`#${enumActionEl.TABLE_BODY_EL} tr`).eq(i).find(`input[name="${enumConst.MAX}"]`))
|
|
|
6049
|
+ break
|
|
|
6050
|
+ }
|
|
|
6051
|
+ }
|
|
|
6052
|
+ return validateFlag
|
|
|
6053
|
+ }
|
|
|
6054
|
+
|
|
|
6055
|
+ /**
|
|
|
6056
|
+ * @description
|
|
|
6057
|
+ */
|
|
|
6058
|
+ async function submit(callback) {
|
|
|
6059
|
+ const data = Array.from({ length: addRowNumber }).map((_, row) => form.val(getRowFilter(row))).filter(item => Object.keys(item).length)
|
|
|
6060
|
+ if (!validate(data)) return
|
|
|
6061
|
+ const formVal = getDataSourceValue()
|
|
|
6062
|
+ const formModel = {
|
|
|
6063
|
+ configurationId,
|
|
|
6064
|
+ contentId: currentPageId.id,
|
|
|
6065
|
+ ...formVal,
|
|
|
6066
|
+ id: graphId,
|
|
|
6067
|
+ condition: data,
|
|
|
6068
|
+ type: event.data.type,
|
|
|
6069
|
+ }
|
|
|
6070
|
+ const [err, res] = await to(ConfigurationNodeApi.updateNodeAct(formModel))
|
|
|
6071
|
+ if (err) return
|
|
|
6072
|
+ UseLayUi.successMsg()
|
|
|
6073
|
+ callback()
|
|
|
6074
|
+ }
|
|
|
6075
|
+
|
|
|
6076
|
+ function createLayerForm(type) {
|
|
|
6077
|
+ const content = `
|
|
|
6078
|
+ <div style="width: 300px; padding: 20px 0 0 20px;" id="${enumActionEl.DATA_SOURCE_COMP_EL}"></div>
|
|
|
6079
|
+ <div class="override__table" style="padding: 0 20px">
|
|
|
6080
|
+ <table class="layui-table" >
|
|
|
6081
|
+ <thead>
|
|
|
6082
|
+ <tr>
|
|
|
6083
|
+ <th style="text-align:center">最小值(<=)</th>
|
|
|
6084
|
+ <th style="text-align:center">最大值(>=)</th>
|
|
|
6085
|
+ <th style="text-align:center">对应图片</th>
|
|
|
6086
|
+<!-- <th style="text-align:center">对应的颜色</th>-->
|
|
|
6087
|
+ <th style="text-align:center">操作</th>
|
|
|
6088
|
+ </tr>
|
|
|
6089
|
+ </thead>
|
|
|
6090
|
+ <tbody id="${enumActionEl.TABLE_BODY_EL}"></tbody>
|
|
|
6091
|
+ </table>
|
|
|
6092
|
+ </div>
|
|
|
6093
|
+ <div style="display:flex;justify-content:center;">
|
|
|
6094
|
+ <button type="button" class="layui-btn layui-btn-primary layui-border-blue" id="${enumActionEl.ADD_ROW_EL}">添加一条</button>
|
|
|
6095
|
+ </div>
|
|
|
6096
|
+ `
|
|
|
6097
|
+
|
|
|
6098
|
+ layer.open({
|
|
|
6099
|
+ title: '变量值图片功能',
|
|
|
6100
|
+ type: 1,
|
|
|
6101
|
+ content,
|
|
|
6102
|
+ skin: 'event-layer__override',
|
|
|
6103
|
+ area: '700px',
|
|
|
6104
|
+ btn: ["保存", "取消"],
|
|
|
6105
|
+ shade: ["0.7", "#fafafa"],
|
|
|
6106
|
+ offset: '100px',
|
|
|
6107
|
+ yes(index) {
|
|
|
6108
|
+ form.on(`submit(${enumActionEl.LAYER_SUBMIT_FILTER})`, data => {
|
|
|
6109
|
+ submit(() => {
|
|
|
6110
|
+ layer.close(index)
|
|
|
6111
|
+ getNodeBindInfo()
|
|
|
6112
|
+ })
|
|
|
6113
|
+ })
|
|
|
6114
|
+ },
|
|
|
6115
|
+ but2(index, layero) {
|
|
|
6116
|
+ return false
|
|
|
6117
|
+ },
|
|
|
6118
|
+ async success(layero, index) {
|
|
|
6119
|
+ $(layero).addClass('layui-form').find('.layui-layer-btn0').attr({
|
|
|
6120
|
+ 'lay-submit': '',
|
|
|
6121
|
+ 'lay-filter': enumActionEl.LAYER_SUBMIT_FILTER,
|
|
|
6122
|
+ })
|
|
|
6123
|
+ const { component, echoDataSource, getValue } = generatorDataSourceComponent()
|
|
|
6124
|
+ getDataSourceValue = getValue
|
|
|
6125
|
+ $(`#${enumActionEl.DATA_SOURCE_COMP_EL}`).append(component)
|
|
|
6126
|
+ const info = getLayerBindInfo('act', type)
|
|
|
6127
|
+ const { condition = [] } = info
|
|
|
6128
|
+ if (!info && !condition.length) {
|
|
|
6129
|
+ addRecord()
|
|
|
6130
|
+ } else {
|
|
|
6131
|
+ echoDataSource(info)
|
|
|
6132
|
+ echoFormData(info)
|
|
|
6133
|
+ }
|
|
|
6134
|
+ generatorEventListen()
|
|
|
6135
|
+ },
|
|
|
6136
|
+ })
|
|
|
6137
|
+ }
|
|
|
6138
|
+
|
|
|
6139
|
+ createLayerForm(event.data.type)
|
|
|
6140
|
+ }
|
|
|
6141
|
+
|
|
|
6142
|
+ /**
|
|
|
6143
|
+ * @description 处理数据交互 - down || up 按下与抬起
|
|
|
6144
|
+ */
|
|
|
6145
|
+ function handleDownOrUpEvent(event) {
|
|
|
6146
|
+
|
|
|
6147
|
+ // if (!currentCheckedOrgNode) {
|
|
|
6148
|
+ // layer.msg('请先选择组织')
|
|
|
6149
|
+ // return
|
|
|
6150
|
+ // }
|
|
|
6151
|
+ // 事件类型
|
|
|
6152
|
+ const enumEventType = {
|
|
|
6153
|
+ DOWN: "按下",
|
|
|
6154
|
+ UP: "抬起",
|
|
|
6155
|
+ SINGLE: "单击",
|
|
|
6156
|
+ DOUBLE: "双击",
|
|
|
6157
|
+ };
|
|
|
6158
|
+
|
|
|
6159
|
+ const enumActionEl = {
|
|
|
6160
|
+
|
|
|
6161
|
+ /**
|
|
|
6162
|
+ * @description 表单控制 filter
|
|
|
6163
|
+ */
|
|
|
6164
|
+ FORM_FILTER: 'interactionFormFilter',
|
|
|
6165
|
+
|
|
|
6166
|
+ /**
|
|
|
6167
|
+ * @description 表体节点
|
|
|
6168
|
+ */
|
|
|
6169
|
+ DEVICE_DATA_BODY_EL: 'deviceDataTbody',
|
|
|
6170
|
+
|
|
|
6171
|
+ /**
|
|
|
6172
|
+ * @description 删除行节点
|
|
|
6173
|
+ */
|
|
|
6174
|
+ DEL_ROW_EL: 'deleteRow',
|
|
|
6175
|
+
|
|
|
6176
|
+ /**
|
|
|
6177
|
+ * @description 增加行节点
|
|
|
6178
|
+ */
|
|
|
6179
|
+ ADD_ROW_EL: 'addRow',
|
|
|
6180
|
+
|
|
|
6181
|
+ /**
|
|
|
6182
|
+ * @descripton
|
|
|
6183
|
+ */
|
|
|
6184
|
+ ROW_FILTER: 'interactionRowFilter',
|
|
|
6185
|
+
|
|
|
6186
|
+ /**
|
|
|
6187
|
+ * @description json editor
|
|
|
6188
|
+ */
|
|
|
6189
|
+ EDITOR_JSON: 'editor__json-',
|
|
|
6190
|
+
|
|
|
6191
|
+ /**
|
|
|
6192
|
+ * @description 弹出层保存 filter
|
|
|
6193
|
+ */
|
|
|
6194
|
+ LAYER_SUBMIT_FILTER: 'interactionLayerSubmit',
|
|
|
6195
|
+
|
|
|
6196
|
+ /**
|
|
|
6197
|
+ * @description ace builder
|
|
|
6198
|
+ */
|
|
|
6199
|
+ JSON: 'ace__builder-json',
|
|
|
6200
|
+
|
|
|
6201
|
+ /**
|
|
|
6202
|
+ * @description 组织树节点
|
|
|
6203
|
+ */
|
|
|
6204
|
+ ORG_EL: 'interactionOrgTree',
|
|
|
6205
|
+ }
|
|
|
6206
|
+
|
|
|
6207
|
+
|
|
|
6208
|
+ /**
|
|
|
6209
|
+ * @description 所有设备选项
|
|
|
6210
|
+ * @type {{id: string, name: string, deviceType: string}[]}
|
|
|
6211
|
+ */
|
|
|
6212
|
+ let allDeviceOptions = []
|
|
|
6213
|
+
|
|
|
6214
|
+ let addRowNumber = 0
|
|
|
6215
|
+
|
|
|
6216
|
+ /**
|
|
|
6217
|
+ * @description 组织id
|
|
|
6218
|
+ * @type {null}
|
|
|
6219
|
+ */
|
|
|
6220
|
+ let orgId = null
|
|
|
6221
|
+
|
|
|
6222
|
+ const getRowFilter = (rowNumber) => `${enumActionEl.ROW_FILTER}${rowNumber}`
|
|
|
6223
|
+
|
|
|
6224
|
+ /**
|
|
|
6225
|
+ * @description 枚举常量
|
|
|
6226
|
+ * @enum DEVICE
|
|
|
6227
|
+ */
|
|
|
6228
|
+ const enumConst = {
|
|
|
6229
|
+ /**
|
|
|
6230
|
+ * @description 设备
|
|
|
6231
|
+ */
|
|
|
6232
|
+ DEVICE: 'deviceId',
|
|
|
6233
|
+ /**
|
|
|
6234
|
+ * @description 子设备
|
|
|
6235
|
+ */
|
|
|
6236
|
+ SLAVE_DEVICE: 'slaveDeviceId',
|
|
|
6237
|
+ /**
|
|
|
6238
|
+ * @description 变量
|
|
|
6239
|
+ */
|
|
|
6240
|
+ ATTR: 'attr',
|
|
|
6241
|
+ /**
|
|
|
6242
|
+ * @description 下发值
|
|
|
6243
|
+ */
|
|
|
6244
|
+ VALUE: 'value',
|
|
|
6245
|
+
|
|
|
6246
|
+ /**
|
|
|
6247
|
+ * @description 方式
|
|
|
6248
|
+ */
|
|
|
6249
|
+ WAY: 'way',
|
|
|
6250
|
+
|
|
|
6251
|
+ /**
|
|
|
6252
|
+ * @description 组织id
|
|
|
6253
|
+ */
|
|
|
6254
|
+ ORG_ID: 'orgId',
|
5537
|
}
|
6255
|
}
|
5538
|
|
6256
|
|
5539
|
const sendInstructionWay = {
|
6257
|
const sendInstructionWay = {
|
|
@@ -5545,11 +6263,19 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5545,11 +6263,19 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5545
|
* @description 创建回显数据 查询出所有网关设备和直连设备
|
6263
|
* @description 创建回显数据 查询出所有网关设备和直连设备
|
5546
|
*/
|
6264
|
*/
|
5547
|
async function getMaterDevice() {
|
6265
|
async function getMaterDevice() {
|
5548
|
- if (!currentCheckedOrgNode) return
|
|
|
5549
|
- const [ err, res ] = await to(ConfigurationNodeApi.getMasterDevice(currentCheckedOrgNode))
|
6266
|
+ if (!orgId) return
|
|
|
6267
|
+ const [err, res] = await to(ConfigurationNodeApi.getMasterDevice(orgId))
|
5550
|
allDeviceOptions = res
|
6268
|
allDeviceOptions = res
|
|
|
6269
|
+ const generateOption = UseLayUi.generateOptionTemplate({ dataSource: res })
|
|
|
6270
|
+ $(`#${enumActionEl.DEVICE_DATA_BODY_EL}`).find(`select[name="${enumConst.DEVICE}"]`).html(generateOption)
|
|
|
6271
|
+ UseLayUi.nextTick(() => form.render('select'))
|
5551
|
}
|
6272
|
}
|
5552
|
|
6273
|
|
|
|
6274
|
+ /**
|
|
|
6275
|
+ * @description 创建JSON编辑器
|
|
|
6276
|
+ * @param el
|
|
|
6277
|
+ * @param datum
|
|
|
6278
|
+ */
|
5553
|
function createEditor(el, datum = {}) {
|
6279
|
function createEditor(el, datum = {}) {
|
5554
|
const editor = ace.edit(el, {
|
6280
|
const editor = ace.edit(el, {
|
5555
|
maxLines: 10, // 最大行数,超过会自动出现滚动条
|
6281
|
maxLines: 10, // 最大行数,超过会自动出现滚动条
|
|
@@ -5559,46 +6285,72 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5559,46 +6285,72 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5559
|
});
|
6285
|
});
|
5560
|
editor.session.setMode("ace/mode/json");
|
6286
|
editor.session.setMode("ace/mode/json");
|
5561
|
editor.getSession().on('change', (event, editor) => {
|
6287
|
editor.getSession().on('change', (event, editor) => {
|
5562
|
- $(`#${ el }`).parent().find(`textarea[name="${ enumConst.VALUE }"]`).val(editor.getValue())
|
6288
|
+ $(`#${el}`).parent().find(`textarea[name="${enumConst.VALUE}"]`).val(editor.getValue())
|
5563
|
})
|
6289
|
})
|
5564
|
editor.setValue(datum[enumConst.VALUE] ? datum[enumConst.VALUE] : "{}")
|
6290
|
editor.setValue(datum[enumConst.VALUE] ? datum[enumConst.VALUE] : "{}")
|
5565
|
}
|
6291
|
}
|
5566
|
|
6292
|
|
|
|
6293
|
+ /**
|
|
|
6294
|
+ * @description 创建组织树
|
|
|
6295
|
+ */
|
|
|
6296
|
+ function createOrgTreeSelect() {
|
|
|
6297
|
+ UseLayUi.createTreeSelect({
|
|
|
6298
|
+ elem: `#${enumActionEl.ORG_EL}`,
|
|
|
6299
|
+ layFilter: enumConst.ORG_ID,
|
|
|
6300
|
+ label: '组织',
|
|
|
6301
|
+ singleUsage: false,
|
|
|
6302
|
+ layVerify: 'required',
|
|
|
6303
|
+ layVerType: 'tips',
|
|
|
6304
|
+ treeProps: {
|
|
|
6305
|
+ data: treeList,
|
|
|
6306
|
+ onlyIconControl: true,
|
|
|
6307
|
+ click(node) {
|
|
|
6308
|
+ orgId = node.data.id
|
|
|
6309
|
+ getMaterDevice()
|
|
|
6310
|
+ },
|
|
|
6311
|
+ },
|
|
|
6312
|
+ })
|
|
|
6313
|
+ }
|
|
|
6314
|
+
|
|
|
6315
|
+ /**
|
|
|
6316
|
+ * @description 添加行
|
|
|
6317
|
+ * @param datum
|
|
|
6318
|
+ */
|
5567
|
function addRecord(datum) {
|
6319
|
function addRecord(datum) {
|
5568
|
const content = `
|
6320
|
const content = `
|
5569
|
- <tr class="layui-form" lay-filter="${ getRowFilter(addRowNumber) }">
|
6321
|
+ <tr class="layui-form" lay-filter="${getRowFilter(addRowNumber)}">
|
5570
|
<td>
|
6322
|
<td>
|
5571
|
- <select name="${ enumConst.DEVICE }" lay-filter="${ enumConst.DEVICE }" lay-verType="tips" lay-verify="required"></select>
|
6323
|
+ <select name="${enumConst.DEVICE}" lay-filter="${enumConst.DEVICE}" lay-verType="tips" lay-verify="required"></select>
|
5572
|
</td>
|
6324
|
</td>
|
5573
|
<td>
|
6325
|
<td>
|
5574
|
- <select name="${ enumConst.SLAVE_DEVICE }" lay-filter="${ enumConst.SLAVE_DEVICE }" lay-verType="tips"></select>
|
6326
|
+ <select name="${enumConst.SLAVE_DEVICE}" lay-filter="${enumConst.SLAVE_DEVICE}" lay-verType="tips"></select>
|
5575
|
</td>
|
6327
|
</td>
|
5576
|
<td>
|
6328
|
<td>
|
5577
|
<form action="" style="display: flex">
|
6329
|
<form action="" style="display: flex">
|
5578
|
<div class="override__radio-default">
|
6330
|
<div class="override__radio-default">
|
5579
|
- <input id="${ getRowFilter(addRowNumber) }${ sendInstructionWay.ONE_WAR }" type="radio" name="${ enumConst.WAY }" lay-ignore value="${ sendInstructionWay.ONE_WAR }" title="单向" checked="">
|
|
|
5580
|
- <label for="${ getRowFilter(addRowNumber) }${ sendInstructionWay.ONE_WAR }" class="override__radio-label">单向</label>
|
6331
|
+ <input id="${getRowFilter(addRowNumber)}${sendInstructionWay.ONE_WAR}" type="radio" name="${enumConst.WAY}" lay-ignore value="${sendInstructionWay.ONE_WAR}" title="单向" checked="">
|
|
|
6332
|
+ <label for="${getRowFilter(addRowNumber)}${sendInstructionWay.ONE_WAR}" class="override__radio-label">单向</label>
|
5581
|
</div>
|
6333
|
</div>
|
5582
|
<div class="override__radio-default">
|
6334
|
<div class="override__radio-default">
|
5583
|
- <input id="${ getRowFilter(addRowNumber) }${ sendInstructionWay.TWO_WAY }" type="radio" name="${ enumConst.WAY }" lay-ignore value="${ sendInstructionWay.TWO_WAY }" title="双向">
|
|
|
5584
|
- <label for="${ getRowFilter(addRowNumber) }${ sendInstructionWay.TWO_WAY }" class="override__radio-label">双向</label>
|
6335
|
+ <input id="${getRowFilter(addRowNumber)}${sendInstructionWay.TWO_WAY}" type="radio" name="${enumConst.WAY}" lay-ignore value="${sendInstructionWay.TWO_WAY}" title="双向">
|
|
|
6336
|
+ <label for="${getRowFilter(addRowNumber)}${sendInstructionWay.TWO_WAY}" class="override__radio-label">双向</label>
|
5585
|
</div>
|
6337
|
</div>
|
5586
|
</form>
|
6338
|
</form>
|
5587
|
</td>
|
6339
|
</td>
|
5588
|
- <td class="${ enumActionEl.JSON }">
|
6340
|
+ <td class="${enumActionEl.JSON}">
|
5589
|
<div style="width: 100%;height: 100%;">
|
6341
|
<div style="width: 100%;height: 100%;">
|
5590
|
- <div id="${ enumActionEl.EDITOR_JSON }${ addRowNumber }"></div>
|
|
|
5591
|
- <textarea style="display: none" name="${ enumConst.VALUE }" placeholder="请输入命令" lay-verType="tips" class="layui-textarea"></textarea>
|
6342
|
+ <div id="${enumActionEl.EDITOR_JSON}${addRowNumber}"></div>
|
|
|
6343
|
+ <textarea style="display: none" name="${enumConst.VALUE}" placeholder="请输入命令" lay-verType="tips" class="layui-textarea"></textarea>
|
5592
|
</div>
|
6344
|
</div>
|
5593
|
</td>
|
6345
|
</td>
|
5594
|
<td>
|
6346
|
<td>
|
5595
|
- <button type="button" class="layui-btn layui-btn-primary layui-border-red ${ enumActionEl.DEL_ROW_EL }">删除</button>
|
6347
|
+ <button type="button" class="layui-btn layui-btn-primary layui-border-red ${enumActionEl.DEL_ROW_EL}">删除</button>
|
5596
|
</td>
|
6348
|
</td>
|
5597
|
</tr>
|
6349
|
</tr>
|
5598
|
`
|
6350
|
`
|
5599
|
- $(`#${ enumActionEl.DEVICE_DATA_BODY_EL }`).append(content)
|
6351
|
+ $(`#${enumActionEl.DEVICE_DATA_BODY_EL}`).append(content)
|
5600
|
setDeviceOptions(addRowNumber)
|
6352
|
setDeviceOptions(addRowNumber)
|
5601
|
- createEditor(`${ enumActionEl.EDITOR_JSON }${ addRowNumber }`, datum)
|
6353
|
+ createEditor(`${enumActionEl.EDITOR_JSON}${addRowNumber}`, datum)
|
5602
|
form.render('select', getRowFilter(addRowNumber))
|
6354
|
form.render('select', getRowFilter(addRowNumber))
|
5603
|
addRowNumber++
|
6355
|
addRowNumber++
|
5604
|
}
|
6356
|
}
|
|
@@ -5608,10 +6360,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5608,10 +6360,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5608
|
*/
|
6360
|
*/
|
5609
|
async function updateVariableOptions(data) {
|
6361
|
async function updateVariableOptions(data) {
|
5610
|
if (!data.value) return
|
6362
|
if (!data.value) return
|
5611
|
- const [ err, res ] = await to(ConfigurationNodeApi.getDeviceAttr(data.value))
|
6363
|
+ const [err, res] = await to(ConfigurationNodeApi.getDeviceAttr(data.value))
|
5612
|
if (!res) return
|
6364
|
if (!res) return
|
5613
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: res })
|
6365
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: res })
|
5614
|
- $(data.elem).parents('tr').find(`select[name="${ enumConst.ATTR }"]`).html(generateOption)
|
6366
|
+ $(data.elem).parents('tr').find(`select[name="${enumConst.ATTR}"]`).html(generateOption)
|
5615
|
form.render('select')
|
6367
|
form.render('select')
|
5616
|
}
|
6368
|
}
|
5617
|
|
6369
|
|
|
@@ -5619,19 +6371,23 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5619,19 +6371,23 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5619
|
* @description 选择设备监听事件
|
6371
|
* @description 选择设备监听事件
|
5620
|
*/
|
6372
|
*/
|
5621
|
function createSelectDeviceListenEvent() {
|
6373
|
function createSelectDeviceListenEvent() {
|
5622
|
- form.on(`select(${ enumConst.DEVICE })`, async (data) => {
|
6374
|
+ form.on(`select(${enumConst.DEVICE})`, async (data) => {
|
|
|
6375
|
+ const filter = $(data.elem).parents('tr').attr('lay-filter')
|
|
|
6376
|
+ form.val(filter, {
|
|
|
6377
|
+ [enumConst.SLAVE_DEVICE]: null,
|
|
|
6378
|
+ })
|
5623
|
const isGATEWAY = allDeviceOptions.find(item => item.id === data.value)?.deviceType === "GATEWAY"
|
6379
|
const isGATEWAY = allDeviceOptions.find(item => item.id === data.value)?.deviceType === "GATEWAY"
|
5624
|
// 网关设备请求子设备
|
6380
|
// 网关设备请求子设备
|
5625
|
- if (isGATEWAY && data.value) {
|
|
|
5626
|
- const [ err, res ] = await to(ConfigurationNodeApi.getSlaveDevice(currentCheckedOrgNode, data.value))
|
6381
|
+ if (orgId && isGATEWAY && data.value) {
|
|
|
6382
|
+ const [err, res] = await to(ConfigurationNodeApi.getSlaveDevice(orgId, data.value))
|
5627
|
if (!res) return
|
6383
|
if (!res) return
|
5628
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: res })
|
6384
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: res })
|
5629
|
- $(data.elem).parents('tr').find(`select[name="${ enumConst.SLAVE_DEVICE }"]`).html(generateOption)
|
6385
|
+ $(data.elem).parents('tr').find(`select[name="${enumConst.SLAVE_DEVICE}"]`).html(generateOption)
|
5630
|
}
|
6386
|
}
|
5631
|
// else {
|
6387
|
// else {
|
5632
|
// updateVariableOptions(data)
|
6388
|
// updateVariableOptions(data)
|
5633
|
// }
|
6389
|
// }
|
5634
|
- form.render('select')
|
6390
|
+ UseLayUi.nextTick(() => form.render(`select`, filter))
|
5635
|
})
|
6391
|
})
|
5636
|
// form.on(`select(${ enumConst.SLAVE_DEVICE })`, (data) => {
|
6392
|
// form.on(`select(${ enumConst.SLAVE_DEVICE })`, (data) => {
|
5637
|
// updateVariableOptions(data)
|
6393
|
// updateVariableOptions(data)
|
|
@@ -5642,7 +6398,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5642,7 +6398,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5642
|
* @description 删除行
|
6398
|
* @description 删除行
|
5643
|
*/
|
6399
|
*/
|
5644
|
function createDeleteRowListenEvent() {
|
6400
|
function createDeleteRowListenEvent() {
|
5645
|
- $(`.${ enumActionEl.DEL_ROW_EL }`).click((event) => {
|
6401
|
+ $(`.${enumActionEl.DEL_ROW_EL}`).on('click', (event) => {
|
5646
|
// $(event.target).parents('tr').find('editor')
|
6402
|
// $(event.target).parents('tr').find('editor')
|
5647
|
$(event.target).parents('tr').remove()
|
6403
|
$(event.target).parents('tr').remove()
|
5648
|
})
|
6404
|
})
|
|
@@ -5652,10 +6408,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5652,10 +6408,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5652
|
* @description 新增行
|
6408
|
* @description 新增行
|
5653
|
*/
|
6409
|
*/
|
5654
|
function createAddRowListenEvent() {
|
6410
|
function createAddRowListenEvent() {
|
5655
|
- $(`#${ enumActionEl.ADD_ROW_EL }`).click(() => {
|
6411
|
+ $(`#${enumActionEl.ADD_ROW_EL}`).on('click', () => {
|
5656
|
addRecord()
|
6412
|
addRecord()
|
5657
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: allDeviceOptions })
|
6413
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: allDeviceOptions })
|
5658
|
- $(`#${ enumActionEl.DEVICE_DATA_BODY_EL } tr`).last().find(`select[name="${ enumConst.DEVICE }"]`).html(generateOption)
|
6414
|
+ $(`#${enumActionEl.DEVICE_DATA_BODY_EL} tr`).last().find(`select[name="${enumConst.DEVICE}"]`).html(generateOption)
|
5659
|
createDeleteRowListenEvent()
|
6415
|
createDeleteRowListenEvent()
|
5660
|
form.render('select')
|
6416
|
form.render('select')
|
5661
|
})
|
6417
|
})
|
|
@@ -5666,7 +6422,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5666,7 +6422,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5666
|
*/
|
6422
|
*/
|
5667
|
function setDeviceOptions(row) {
|
6423
|
function setDeviceOptions(row) {
|
5668
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: allDeviceOptions })
|
6424
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: allDeviceOptions })
|
5669
|
- $(`#${ enumActionEl.DEVICE_DATA_BODY_EL } tr[lay-filter="${ getRowFilter(row) }"]`).find(`select[name="${ enumConst.DEVICE }"]`).html(generateOption)
|
6425
|
+ $(`#${enumActionEl.DEVICE_DATA_BODY_EL} tr[lay-filter="${getRowFilter(row)}"]`).find(`select[name="${enumConst.DEVICE}"]`).html(generateOption)
|
5670
|
}
|
6426
|
}
|
5671
|
|
6427
|
|
5672
|
/**
|
6428
|
/**
|
|
@@ -5686,14 +6442,14 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5686,14 +6442,14 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5686
|
*/
|
6442
|
*/
|
5687
|
function mountSelectOptions(row, key, data) {
|
6443
|
function mountSelectOptions(row, key, data) {
|
5688
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: data })
|
6444
|
const generateOption = UseLayUi.generateOptionTemplate({ dataSource: data })
|
5689
|
- $(`#${ enumActionEl.DEVICE_DATA_BODY_EL }`).find(`tr[lay-filter="${ getRowFilter(row) }"] select[name="${ key }"]`).html(generateOption)
|
6445
|
+ $(`#${enumActionEl.DEVICE_DATA_BODY_EL}`).find(`tr[lay-filter="${getRowFilter(row)}"] select[name="${key}"]`).html(generateOption)
|
5690
|
}
|
6446
|
}
|
5691
|
|
6447
|
|
5692
|
/**
|
6448
|
/**
|
5693
|
* @description 根据主设备ID获取从设备
|
6449
|
* @description 根据主设备ID获取从设备
|
5694
|
*/
|
6450
|
*/
|
5695
|
async function getSlaveDeviceByMasterDevice(deviceId, row) {
|
6451
|
async function getSlaveDeviceByMasterDevice(deviceId, row) {
|
5696
|
- const res = await ConfigurationNodeApi.getSlaveDevice(currentCheckedOrgNode, deviceId)
|
6452
|
+ const res = await ConfigurationNodeApi.getSlaveDevice(orgId, deviceId)
|
5697
|
mountSelectOptions(row, enumConst.SLAVE_DEVICE, res)
|
6453
|
mountSelectOptions(row, enumConst.SLAVE_DEVICE, res)
|
5698
|
}
|
6454
|
}
|
5699
|
|
6455
|
|
|
@@ -5709,11 +6465,20 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5709,11 +6465,20 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5709
|
* @description 回显表单数据
|
6465
|
* @description 回显表单数据
|
5710
|
*/
|
6466
|
*/
|
5711
|
function echoFormData(info) {
|
6467
|
function echoFormData(info) {
|
5712
|
- const { content: { data = [] } = {} } = info
|
6468
|
+ const { content: { data = [] } = {}, orgId } = info
|
|
|
6469
|
+ echoOrgTree(orgId)
|
5713
|
data.forEach((datum, index) => echoEachData(datum, index))
|
6470
|
data.forEach((datum, index) => echoEachData(datum, index))
|
5714
|
}
|
6471
|
}
|
5715
|
|
6472
|
|
5716
|
/**
|
6473
|
/**
|
|
|
6474
|
+ * @description 回显组织树
|
|
|
6475
|
+ */
|
|
|
6476
|
+ function echoOrgTree(id) {
|
|
|
6477
|
+ const node = UseLayUi.findTreeObjectByField(treeList, id)
|
|
|
6478
|
+ $(`#${enumActionEl.ORG_EL}`).find(`input[name="${enumConst.ORG_ID}"]`).parent().find('span').html(node?.name)
|
|
|
6479
|
+ }
|
|
|
6480
|
+
|
|
|
6481
|
+ /**
|
5717
|
* @description 回显每条数据
|
6482
|
* @description 回显每条数据
|
5718
|
*/
|
6483
|
*/
|
5719
|
function echoEachData(datum = {}, row) {
|
6484
|
function echoEachData(datum = {}, row) {
|
|
@@ -5751,13 +6516,22 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5751,13 +6516,22 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5751
|
return false
|
6516
|
return false
|
5752
|
}
|
6517
|
}
|
5753
|
|
6518
|
|
|
|
6519
|
+ /**
|
|
|
6520
|
+ * @description 表单验证
|
|
|
6521
|
+ * @param tableData
|
|
|
6522
|
+ * @returns {boolean}
|
|
|
6523
|
+ */
|
5754
|
function validate(tableData) {
|
6524
|
function validate(tableData) {
|
5755
|
let validateFlag = true
|
6525
|
let validateFlag = true
|
|
|
6526
|
+
|
|
|
6527
|
+ const formModel = form.val(enumActionEl.FORM_FILTER)
|
|
|
6528
|
+ if (!formModel[enumConst.ORG_ID]) return false
|
|
|
6529
|
+
|
5756
|
for (let i = 0; i < tableData.length; i++) {
|
6530
|
for (let i = 0; i < tableData.length; i++) {
|
5757
|
const { value } = tableData[i]
|
6531
|
const { value } = tableData[i]
|
5758
|
if (!isJson(value)) {
|
6532
|
if (!isJson(value)) {
|
5759
|
validateFlag = false
|
6533
|
validateFlag = false
|
5760
|
- layer.tips('下发值不正确', $(`#${ enumActionEl.DEVICE_DATA_BODY_EL } tr`).eq(i).find(`td.${ enumActionEl.JSON }`), { tips: 1 })
|
6534
|
+ layer.tips('下发值不正确', $(`#${enumActionEl.DEVICE_DATA_BODY_EL} tr`).eq(i).find(`td.${enumActionEl.JSON}`), { tips: 1 })
|
5761
|
break
|
6535
|
break
|
5762
|
}
|
6536
|
}
|
5763
|
}
|
6537
|
}
|
|
@@ -5772,6 +6546,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5772,6 +6546,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5772
|
if (!validate(data)) return
|
6546
|
if (!validate(data)) return
|
5773
|
const formModal = {
|
6547
|
const formModal = {
|
5774
|
configurationId,
|
6548
|
configurationId,
|
|
|
6549
|
+ orgId,
|
5775
|
contentId: currentPageId.id,
|
6550
|
contentId: currentPageId.id,
|
5776
|
id: graphId,
|
6551
|
id: graphId,
|
5777
|
content: {
|
6552
|
content: {
|
|
@@ -5779,7 +6554,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5779,7 +6554,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5779
|
},
|
6554
|
},
|
5780
|
type: event.data.type,
|
6555
|
type: event.data.type,
|
5781
|
};
|
6556
|
};
|
5782
|
- const [ err, res ] = await to(ConfigurationNodeApi.updateNodeEvent(formModal))
|
6557
|
+ const [err, res] = await to(ConfigurationNodeApi.updateNodeEvent(formModal))
|
5783
|
if (err) return
|
6558
|
if (err) return
|
5784
|
UseLayUi.successMsg()
|
6559
|
UseLayUi.successMsg()
|
5785
|
callback()
|
6560
|
callback()
|
|
@@ -5791,12 +6566,12 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5791,12 +6566,12 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5791
|
*/
|
6566
|
*/
|
5792
|
function createLayerForm(type) {
|
6567
|
function createLayerForm(type) {
|
5793
|
const content = `
|
6568
|
const content = `
|
5794
|
- <form class="layui-form" lay-filter="formModal">
|
6569
|
+ <form class="layui-form" lay-filter="${enumActionEl.FORM_FILTER}">
|
5795
|
<div style="width:400px">
|
6570
|
<div style="width:400px">
|
5796
|
<div class="layui-form-item">
|
6571
|
<div class="layui-form-item">
|
5797
|
<label class="layui-form-label">事件</label>
|
6572
|
<label class="layui-form-label">事件</label>
|
5798
|
<div class="layui-input-block">
|
6573
|
<div class="layui-input-block">
|
5799
|
- <input type="text" name="event" class="layui-input" value="${ enumEventType[type] }" disabled>
|
6574
|
+ <input type="text" name="event" class="layui-input" value="${enumEventType[type]}" disabled>
|
5800
|
</div>
|
6575
|
</div>
|
5801
|
</div>
|
6576
|
</div>
|
5802
|
<div class="layui-form-item">
|
6577
|
<div class="layui-form-item">
|
|
@@ -5814,6 +6589,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5814,6 +6589,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5814
|
<input type="radio" name="type" value="2" title="产品/场景" disabled>
|
6589
|
<input type="radio" name="type" value="2" title="产品/场景" disabled>
|
5815
|
</div>
|
6590
|
</div>
|
5816
|
</div>
|
6591
|
</div>
|
|
|
6592
|
+ <div id="${enumActionEl.ORG_EL}"></div>
|
5817
|
</div>
|
6593
|
</div>
|
5818
|
</form>
|
6594
|
</form>
|
5819
|
<div class="override__table">
|
6595
|
<div class="override__table">
|
|
@@ -5827,10 +6603,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5827,10 +6603,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5827
|
<th style="text-align:center">操作</th>
|
6603
|
<th style="text-align:center">操作</th>
|
5828
|
</tr>
|
6604
|
</tr>
|
5829
|
</thead>
|
6605
|
</thead>
|
5830
|
- <tbody id="${ enumActionEl.DEVICE_DATA_BODY_EL }"></tbody>
|
6606
|
+ <tbody id="${enumActionEl.DEVICE_DATA_BODY_EL}"></tbody>
|
5831
|
</table>
|
6607
|
</table>
|
5832
|
<div style="display:flex;justify-content:center;">
|
6608
|
<div style="display:flex;justify-content:center;">
|
5833
|
- <button type="button" class="layui-btn layui-btn-primary layui-border-blue" id="${ enumActionEl.ADD_ROW_EL }">添加一条</button>
|
6609
|
+ <button type="button" class="layui-btn layui-btn-primary layui-border-blue" id="${enumActionEl.ADD_ROW_EL}">添加一条</button>
|
5834
|
</div>
|
6610
|
</div>
|
5835
|
</div>`
|
6611
|
</div>`
|
5836
|
|
6612
|
|
|
@@ -5839,11 +6615,12 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5839,11 +6615,12 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5839
|
content,
|
6615
|
content,
|
5840
|
skin: 'event-layer__override',
|
6616
|
skin: 'event-layer__override',
|
5841
|
// area: ["1100px", "700px"],
|
6617
|
// area: ["1100px", "700px"],
|
5842
|
- area: '1200px',
|
|
|
5843
|
- btn: [ "保存", "取消" ],
|
|
|
5844
|
- shade: [ "0.7", "#fafafa" ],
|
6618
|
+ area: '1100px',
|
|
|
6619
|
+ offset: '100px',
|
|
|
6620
|
+ btn: ["保存", "取消"],
|
|
|
6621
|
+ shade: ["0.7", "#fafafa"],
|
5845
|
yes(index) {
|
6622
|
yes(index) {
|
5846
|
- form.on(`submit(${ enumActionEl.LAYER_SUBMIT_FILTER })`, data => {
|
6623
|
+ form.on(`submit(${enumActionEl.LAYER_SUBMIT_FILTER})`, data => {
|
5847
|
submit(() => {
|
6624
|
submit(() => {
|
5848
|
layer.close(index)
|
6625
|
layer.close(index)
|
5849
|
getNodeBindInfo()
|
6626
|
getNodeBindInfo()
|
|
@@ -5858,11 +6635,13 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5858,11 +6635,13 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5858
|
'lay-submit': '',
|
6635
|
'lay-submit': '',
|
5859
|
'lay-filter': enumActionEl.LAYER_SUBMIT_FILTER,
|
6636
|
'lay-filter': enumActionEl.LAYER_SUBMIT_FILTER,
|
5860
|
})
|
6637
|
})
|
5861
|
- await getMaterDevice()
|
6638
|
+ createOrgTreeSelect()
|
5862
|
const info = getLayerBindInfo('event', type)
|
6639
|
const info = getLayerBindInfo('event', type)
|
5863
|
- if (!info) {
|
6640
|
+ const { content: { data = [] } = {} } = info
|
|
|
6641
|
+ if (!info || !data.length) {
|
5864
|
addRecord()
|
6642
|
addRecord()
|
5865
|
} else {
|
6643
|
} else {
|
|
|
6644
|
+ await getMaterDevice()
|
5866
|
echoFormData(info)
|
6645
|
echoFormData(info)
|
5867
|
}
|
6646
|
}
|
5868
|
generatorEventListen()
|
6647
|
generatorEventListen()
|
|
@@ -5947,8 +6726,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5947,8 +6726,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5947
|
[enumGetValue[content.type]]: content.value,
|
6726
|
[enumGetValue[content.type]]: content.value,
|
5948
|
}
|
6727
|
}
|
5949
|
if (content.type === enumActionType.PAGE) {
|
6728
|
if (content.type === enumActionType.PAGE) {
|
5950
|
- $(`#${ enumActionEl.PAGE_EL_ID }`).css({ display: 'block' })
|
|
|
5951
|
- $(`#${ enumActionEl.LINK_EL_ID }`).css({ display: 'none' })
|
6729
|
+ $(`#${enumActionEl.PAGE_EL_ID}`).css({ display: 'block' })
|
|
|
6730
|
+ $(`#${enumActionEl.LINK_EL_ID}`).css({ display: 'none' })
|
5952
|
}
|
6731
|
}
|
5953
|
form.val(enumActionEl.FORM_FILTER, val)
|
6732
|
form.val(enumActionEl.FORM_FILTER, val)
|
5954
|
}
|
6733
|
}
|
|
@@ -5968,7 +6747,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5968,7 +6747,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5968
|
value: formVal[enumGetValue[formVal[enumConst.ACTION]]],
|
6747
|
value: formVal[enumGetValue[formVal[enumConst.ACTION]]],
|
5969
|
},
|
6748
|
},
|
5970
|
}
|
6749
|
}
|
5971
|
- const [ err ] = await to(ConfigurationNodeApi.updateNodeEvent(data))
|
6750
|
+ const [err] = await to(ConfigurationNodeApi.updateNodeEvent(data))
|
5972
|
if (err) return
|
6751
|
if (err) return
|
5973
|
UseLayUi.successMsg()
|
6752
|
UseLayUi.successMsg()
|
5974
|
callback()
|
6753
|
callback()
|
|
@@ -5995,14 +6774,14 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -5995,14 +6774,14 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5995
|
}
|
6774
|
}
|
5996
|
|
6775
|
|
5997
|
function generatorEventListen() {
|
6776
|
function generatorEventListen() {
|
5998
|
- form.on(`select(${ enumActionEl.ACTION_SELECT_FILTER })`, (data) => {
|
6777
|
+ form.on(`select(${enumActionEl.ACTION_SELECT_FILTER})`, (data) => {
|
5999
|
const { value } = data
|
6778
|
const { value } = data
|
6000
|
if (value === enumActionType.PAGE) {
|
6779
|
if (value === enumActionType.PAGE) {
|
6001
|
- $(`#${ enumActionEl.LINK_EL_ID }`).css({ display: 'none' })
|
|
|
6002
|
- $(`#${ enumActionEl.PAGE_EL_ID }`).css({ display: 'block' })
|
6780
|
+ $(`#${enumActionEl.LINK_EL_ID}`).css({ display: 'none' })
|
|
|
6781
|
+ $(`#${enumActionEl.PAGE_EL_ID}`).css({ display: 'block' })
|
6003
|
} else if (value === enumActionType.LINK) {
|
6782
|
} else if (value === enumActionType.LINK) {
|
6004
|
- $(`#${ enumActionEl.PAGE_EL_ID }`).css({ display: 'none' })
|
|
|
6005
|
- $(`#${ enumActionEl.LINK_EL_ID }`).css({ display: 'block' })
|
6783
|
+ $(`#${enumActionEl.PAGE_EL_ID}`).css({ display: 'none' })
|
|
|
6784
|
+ $(`#${enumActionEl.LINK_EL_ID}`).css({ display: 'block' })
|
6006
|
}
|
6785
|
}
|
6007
|
})
|
6786
|
})
|
6008
|
}
|
6787
|
}
|
|
@@ -6013,33 +6792,33 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6013,33 +6792,33 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6013
|
function createLayerForm(type) {
|
6792
|
function createLayerForm(type) {
|
6014
|
|
6793
|
|
6015
|
const content = `
|
6794
|
const content = `
|
6016
|
- <form class="layui-form" lay-filter="${ enumActionEl.FORM_FILTER }">
|
6795
|
+ <form class="layui-form" lay-filter="${enumActionEl.FORM_FILTER}">
|
6017
|
<div style="width:400px">
|
6796
|
<div style="width:400px">
|
6018
|
<div class="layui-form-item">
|
6797
|
<div class="layui-form-item">
|
6019
|
<label class="layui-form-label">事件</label>
|
6798
|
<label class="layui-form-label">事件</label>
|
6020
|
<div class="layui-input-block">
|
6799
|
<div class="layui-input-block">
|
6021
|
- <input type="text" name="${ enumConst.EVENT }" disabled class="layui-input" value="${ enumEventType[type] }">
|
6800
|
+ <input type="text" name="${enumConst.EVENT}" disabled class="layui-input" value="${enumEventType[type]}">
|
6022
|
</div>
|
6801
|
</div>
|
6023
|
</div>
|
6802
|
</div>
|
6024
|
<div class="layui-form-item">
|
6803
|
<div class="layui-form-item">
|
6025
|
<label class="layui-form-label">动作</label>
|
6804
|
<label class="layui-form-label">动作</label>
|
6026
|
<div class="layui-input-block">
|
6805
|
<div class="layui-input-block">
|
6027
|
- <select name="${ enumConst.ACTION }" lay-verType="tips" lay-verify="required" lay-filter="${ enumActionEl.ACTION_SELECT_FILTER }">
|
|
|
6028
|
- ${ generatorActionOptions() }
|
6806
|
+ <select name="${enumConst.ACTION}" lay-verType="tips" lay-verify="required" lay-filter="${enumActionEl.ACTION_SELECT_FILTER}">
|
|
|
6807
|
+ ${generatorActionOptions()}
|
6029
|
</select>
|
6808
|
</select>
|
6030
|
</div>
|
6809
|
</div>
|
6031
|
</div>
|
6810
|
</div>
|
6032
|
- <div class="layui-form-item" id="${ enumActionEl.LINK_EL_ID }">
|
6811
|
+ <div class="layui-form-item" id="${enumActionEl.LINK_EL_ID}">
|
6033
|
<label class="layui-form-label">链接</label>
|
6812
|
<label class="layui-form-label">链接</label>
|
6034
|
<div class="layui-input-block">
|
6813
|
<div class="layui-input-block">
|
6035
|
- <input type="text" lay-verType="tips" name="${ enumConst.LINK_VALUE }" class="layui-input">
|
6814
|
+ <input type="text" lay-verType="tips" name="${enumConst.LINK_VALUE}" class="layui-input">
|
6036
|
</div>
|
6815
|
</div>
|
6037
|
</div>
|
6816
|
</div>
|
6038
|
- <div class="layui-form-item" id="${ enumActionEl.PAGE_EL_ID }" style="display:none">
|
6817
|
+ <div class="layui-form-item" id="${enumActionEl.PAGE_EL_ID}" style="display:none">
|
6039
|
<label class="layui-form-label">页面</label>
|
6818
|
<label class="layui-form-label">页面</label>
|
6040
|
<div class="layui-input-block">
|
6819
|
<div class="layui-input-block">
|
6041
|
- <select name="${ enumConst.PAGE_VALUE }" lay-verType="tips" id="pageSelect">
|
|
|
6042
|
- ${ generatorPageOptions() }
|
6820
|
+ <select name="${enumConst.PAGE_VALUE}" lay-verType="tips" id="pageSelect">
|
|
|
6821
|
+ ${generatorPageOptions()}
|
6043
|
</select>
|
6822
|
</select>
|
6044
|
</div>
|
6823
|
</div>
|
6045
|
</div>
|
6824
|
</div>
|
|
@@ -6050,10 +6829,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6050,10 +6829,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6050
|
layer.open({
|
6829
|
layer.open({
|
6051
|
title: "创建交互",
|
6830
|
title: "创建交互",
|
6052
|
content,
|
6831
|
content,
|
6053
|
- area: [ "800px", "500px" ],
|
|
|
6054
|
- btn: [ "保存", "取消" ],
|
6832
|
+ area: ["800px", "500px"],
|
|
|
6833
|
+ btn: ["保存", "取消"],
|
6055
|
yes(index) {
|
6834
|
yes(index) {
|
6056
|
- form.on(`submit(${ enumActionEl.LAYER_SUBMIT_FILTER })`, data => {
|
6835
|
+ form.on(`submit(${enumActionEl.LAYER_SUBMIT_FILTER})`, data => {
|
6057
|
submit(() => {
|
6836
|
submit(() => {
|
6058
|
layer.close(index)
|
6837
|
layer.close(index)
|
6059
|
getNodeBindInfo()
|
6838
|
getNodeBindInfo()
|
|
@@ -6073,7 +6852,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6073,7 +6852,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6073
|
form.render(null, enumActionEl.FORM_FILTER)
|
6852
|
form.render(null, enumActionEl.FORM_FILTER)
|
6074
|
if (info) echoFormData(info)
|
6853
|
if (info) echoFormData(info)
|
6075
|
},
|
6854
|
},
|
6076
|
- shade: [ "0.7", "#fafafa" ],
|
6855
|
+ shade: ["0.7", "#fafafa"],
|
6077
|
});
|
6856
|
});
|
6078
|
}
|
6857
|
}
|
6079
|
|
6858
|
|
|
@@ -6098,20 +6877,16 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6098,20 +6877,16 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6098
|
FORM_FILTER: 'dataDynamicEffectFormFilter',
|
6877
|
FORM_FILTER: 'dataDynamicEffectFormFilter',
|
6099
|
TABLE_BODY_EL: 'dataDynamicEffectTbody',
|
6878
|
TABLE_BODY_EL: 'dataDynamicEffectTbody',
|
6100
|
TYPE_EL: 'dataDynamicEffectType',
|
6879
|
TYPE_EL: 'dataDynamicEffectType',
|
6101
|
- ORG_EL: 'dataDynamicEffectOrg',
|
|
|
6102
|
- ORG_FILTER: 'dataDynamicEffectOrgFilter',
|
|
|
6103
|
- DEVICE_EL: 'dataDynamicEffectDevice',
|
|
|
6104
|
- SLAVE_DEVICE_EL: 'dataDynamicEffectSlaveDevice',
|
|
|
6105
|
- ATTR_EL: 'dataDynamicEffectAtt',
|
|
|
6106
|
DEL_BTN_EL: 'dataDynamicEffectDelBtn',
|
6880
|
DEL_BTN_EL: 'dataDynamicEffectDelBtn',
|
6107
|
ADD_BTN_EL: 'dataDynamicEffectAddBtn',
|
6881
|
ADD_BTN_EL: 'dataDynamicEffectAddBtn',
|
6108
|
DISPLAY_SWITCH_EL: 'visibleOrHidden',
|
6882
|
DISPLAY_SWITCH_EL: 'visibleOrHidden',
|
6109
|
LAYER_SUBMIT_FILTER: 'dynamicEffectLayerFilter',
|
6883
|
LAYER_SUBMIT_FILTER: 'dynamicEffectLayerFilter',
|
6110
|
MIN_FILTER: 'dynamicEffectMinFilter',
|
6884
|
MIN_FILTER: 'dynamicEffectMinFilter',
|
6111
|
MAX_FILTER: 'dynamicEffectMaxFilter',
|
6885
|
MAX_FILTER: 'dynamicEffectMaxFilter',
|
|
|
6886
|
+ DATA_SOURCE_COMP_EL: 'dynamicDataSourceCompEl',
|
6112
|
}
|
6887
|
}
|
6113
|
|
6888
|
|
6114
|
- const getRowFilter = (rowNumber) => `${ enumActionEl.ROW_FILTER }${ rowNumber }`
|
6889
|
+ const getRowFilter = (rowNumber) => `${enumActionEl.ROW_FILTER}${rowNumber}`
|
6115
|
|
6890
|
|
6116
|
/**
|
6891
|
/**
|
6117
|
* @description
|
6892
|
* @description
|
|
@@ -6130,83 +6905,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6130,83 +6905,10 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6130
|
const enumDisplayType = HandleDynamicEffect.enumDisplayType
|
6905
|
const enumDisplayType = HandleDynamicEffect.enumDisplayType
|
6131
|
|
6906
|
|
6132
|
/**
|
6907
|
/**
|
6133
|
- * @description 设备列表
|
|
|
6134
|
- */
|
|
|
6135
|
- let deviceList = []
|
|
|
6136
|
-
|
|
|
6137
|
- /**
|
|
|
6138
|
- * @description 当前组织ID
|
|
|
6139
|
- * @type {null | string}
|
|
|
6140
|
- */
|
|
|
6141
|
- let currentOrgId = null
|
|
|
6142
|
-
|
|
|
6143
|
- /**
|
|
|
6144
|
* @description
|
6908
|
* @description
|
6145
|
*/
|
6909
|
*/
|
6146
|
let addRowNumber = 0
|
6910
|
let addRowNumber = 0
|
6147
|
|
6911
|
|
6148
|
-
|
|
|
6149
|
- /**
|
|
|
6150
|
- * @description 生成组织下拉树
|
|
|
6151
|
- */
|
|
|
6152
|
- function generatorOrgTreeSelect() {
|
|
|
6153
|
- UseLayUi.createTreeSelect({
|
|
|
6154
|
- elem: `#${ enumActionEl.ORG_EL }`,
|
|
|
6155
|
- layFilter: enumConst.ORG_ID,
|
|
|
6156
|
- label: '组织',
|
|
|
6157
|
- singleUsage: false,
|
|
|
6158
|
- treeProps: {
|
|
|
6159
|
- data: treeList,
|
|
|
6160
|
- onlyIconControl: true,
|
|
|
6161
|
- click(node) {
|
|
|
6162
|
- currentOrgId = node.data.id
|
|
|
6163
|
- getDeviceByOrg(node.data.id)
|
|
|
6164
|
- },
|
|
|
6165
|
- },
|
|
|
6166
|
- })
|
|
|
6167
|
- }
|
|
|
6168
|
-
|
|
|
6169
|
-
|
|
|
6170
|
- /**
|
|
|
6171
|
- * @description 通过组织获取设备
|
|
|
6172
|
- */
|
|
|
6173
|
- async function getDeviceByOrg(id) {
|
|
|
6174
|
- if (!id) return
|
|
|
6175
|
- const [ err, res ] = await to(ConfigurationNodeApi.getMasterDevice(id))
|
|
|
6176
|
- if (!res) return
|
|
|
6177
|
- deviceList = res
|
|
|
6178
|
- const template = UseLayUi.generateOptionTemplate({ dataSource: res })
|
|
|
6179
|
- $(`#${ enumActionEl.DEVICE_EL } select`).html(template)
|
|
|
6180
|
- form.render('select', enumActionEl.FORM_FILTER)
|
|
|
6181
|
- }
|
|
|
6182
|
-
|
|
|
6183
|
- /**
|
|
|
6184
|
- * @description 通过主设备ID获取从设备
|
|
|
6185
|
- */
|
|
|
6186
|
- async function getSlaveDeviceByMasterDevice(orgId, id) {
|
|
|
6187
|
- if (!orgId || !id) return
|
|
|
6188
|
- const [ err, res ] = await to(ConfigurationNodeApi.getSlaveDevice(orgId, id))
|
|
|
6189
|
- if (res) {
|
|
|
6190
|
- const template = UseLayUi.generateOptionTemplate({ dataSource: res })
|
|
|
6191
|
- $(`#${ enumActionEl.SLAVE_DEVICE_EL } select`).html(template)
|
|
|
6192
|
- form.render('select', enumActionEl.FORM_FILTER)
|
|
|
6193
|
- }
|
|
|
6194
|
- }
|
|
|
6195
|
-
|
|
|
6196
|
- /**
|
|
|
6197
|
- * @description 通过设备ID获取设备属性
|
|
|
6198
|
- */
|
|
|
6199
|
- async function getAttrsByDevice(id) {
|
|
|
6200
|
- if (!id) return
|
|
|
6201
|
- const [ err, res ] = await to(ConfigurationNodeApi.getDeviceAttr(id))
|
|
|
6202
|
- if (res) {
|
|
|
6203
|
- const template = UseLayUi.generateOptionTemplate({ dataSource: res })
|
|
|
6204
|
- $(`#${ enumActionEl.ATTR_EL } select`).html(template)
|
|
|
6205
|
- // form.render('select')
|
|
|
6206
|
- form.render('select', enumActionEl.FORM_FILTER)
|
|
|
6207
|
- }
|
|
|
6208
|
- }
|
|
|
6209
|
-
|
|
|
6210
|
function generatorDisplayOptions() {
|
6912
|
function generatorDisplayOptions() {
|
6211
|
const options = [
|
6913
|
const options = [
|
6212
|
{ name: '显示', id: enumDisplayType.SHOW },
|
6914
|
{ name: '显示', id: enumDisplayType.SHOW },
|
|
@@ -6216,7 +6918,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6216,7 +6918,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6216
|
return `
|
6918
|
return `
|
6217
|
<div class="layui-form-item" style="margin-bottom: 0px">
|
6919
|
<div class="layui-form-item" style="margin-bottom: 0px">
|
6218
|
<div class="layui-input-block" style="margin-left: 0px;">
|
6920
|
<div class="layui-input-block" style="margin-left: 0px;">
|
6219
|
- <select name="${ enumConst.TYPE }" lay-verify="required">${ template }</select>
|
6921
|
+ <select name="${enumConst.TYPE}" lay-verType="tips" lay-verify="required">${template}</select>
|
6220
|
</div>
|
6922
|
</div>
|
6221
|
</div>
|
6923
|
</div>
|
6222
|
`
|
6924
|
`
|
|
@@ -6227,23 +6929,22 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6227,23 +6929,22 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6227
|
*/
|
6929
|
*/
|
6228
|
function addRecord() {
|
6930
|
function addRecord() {
|
6229
|
const content = `
|
6931
|
const content = `
|
6230
|
- <tr class="layui-form" lay-filter="${ getRowFilter(addRowNumber) }">
|
|
|
6231
|
- ${ IS_DISPLAY && `<td>${ generatorDisplayOptions() }</td>` }
|
6932
|
+ <tr class="layui-form" lay-filter="${getRowFilter(addRowNumber)}">
|
|
|
6933
|
+ ${IS_DISPLAY && `<td>${generatorDisplayOptions()}</td>`}
|
6232
|
<td>
|
6934
|
<td>
|
6233
|
- <input lay-verType="tips" lay-verify="required" type="number" name="${ enumConst.MIN }" class="layui-input ${ enumActionEl.MIN_FILTER }">
|
6935
|
+ <input autocomplete="off" lay-verType="tips" lay-verify="required" type="number" name="${enumConst.MIN}" class="layui-input ${enumActionEl.MIN_FILTER}">
|
6234
|
</td>
|
6936
|
</td>
|
6235
|
<td>
|
6937
|
<td>
|
6236
|
- <input lay-verType="tips" lay-verify="required" type="number" name="${ enumConst.MAX }" class="layui-input ${ enumActionEl.MAX_FILTER }">
|
6938
|
+ <input autocomplete="off" lay-verType="tips" lay-verify="required" type="number" name="${enumConst.MAX}" class="layui-input ${enumActionEl.MAX_FILTER}">
|
6237
|
</td>
|
6939
|
</td>
|
6238
|
<td style="text-align: center;">
|
6940
|
<td style="text-align: center;">
|
6239
|
- <button type="button" class="layui-btn layui-btn-primary layui-border-red ${ enumActionEl.DEL_BTN_EL }">删除</button>
|
6941
|
+ <button type="button" class="layui-btn layui-btn-primary layui-border-red ${enumActionEl.DEL_BTN_EL}">删除</button>
|
6240
|
</td>
|
6942
|
</td>
|
6241
|
</tr>
|
6943
|
</tr>
|
6242
|
`
|
6944
|
`
|
6243
|
addRowNumber++
|
6945
|
addRowNumber++
|
6244
|
- $(`#${ enumActionEl.TABLE_BODY_EL }`).append(content)
|
6946
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`).append(content)
|
6245
|
if (IS_DISPLAY) {
|
6947
|
if (IS_DISPLAY) {
|
6246
|
- // form.render(null, getRowFilter(addRowNumber))
|
|
|
6247
|
form.render()
|
6948
|
form.render()
|
6248
|
}
|
6949
|
}
|
6249
|
}
|
6950
|
}
|
|
@@ -6252,7 +6953,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6252,7 +6953,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6252
|
* @description 创建添加记录事件
|
6953
|
* @description 创建添加记录事件
|
6253
|
*/
|
6954
|
*/
|
6254
|
function createAddRowListenEvent() {
|
6955
|
function createAddRowListenEvent() {
|
6255
|
- $(`#${ enumActionEl.ADD_BTN_EL }`).click(() => {
|
6956
|
+ $(`#${enumActionEl.ADD_BTN_EL}`).on('click', () => {
|
6256
|
addRecord()
|
6957
|
addRecord()
|
6257
|
createDeleteRowListenEvent()
|
6958
|
createDeleteRowListenEvent()
|
6258
|
})
|
6959
|
})
|
|
@@ -6262,49 +6963,29 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6262,49 +6963,29 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6262
|
* @description 创建删除行事件
|
6963
|
* @description 创建删除行事件
|
6263
|
*/
|
6964
|
*/
|
6264
|
function createDeleteRowListenEvent() {
|
6965
|
function createDeleteRowListenEvent() {
|
6265
|
- $(`.${ enumActionEl.DEL_BTN_EL }`).click((event) => {
|
6966
|
+ $(`.${enumActionEl.DEL_BTN_EL}`).on('click', (event) => {
|
6266
|
$(event.target).parents('tr').remove()
|
6967
|
$(event.target).parents('tr').remove()
|
6267
|
})
|
6968
|
})
|
6268
|
}
|
6969
|
}
|
6269
|
|
6970
|
|
6270
|
- /**
|
|
|
6271
|
- * @description 创建下拉联动事件
|
|
|
6272
|
- */
|
|
|
6273
|
- function createSelectLinkageListenEvent() {
|
|
|
6274
|
- form.on(`select(${ enumActionEl.DEVICE_EL })`, (data) => {
|
|
|
6275
|
- const { value } = data
|
|
|
6276
|
- const selected = deviceList.find(item => item.id === value)
|
|
|
6277
|
- if (selected.deviceType === enumConst.GATEWAY) {
|
|
|
6278
|
- $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).css({ display: 'block' })
|
|
|
6279
|
- getSlaveDeviceByMasterDevice(currentOrgId, selected.id)
|
|
|
6280
|
- } else {
|
|
|
6281
|
- $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).css({ display: 'none' })
|
|
|
6282
|
- getAttrsByDevice(selected.id)
|
|
|
6283
|
- }
|
|
|
6284
|
- })
|
|
|
6285
|
-
|
|
|
6286
|
- form.on(`select(${ enumActionEl.SLAVE_DEVICE_EL })`, (data) => {
|
|
|
6287
|
- getAttrsByDevice(data.value)
|
|
|
6288
|
- })
|
|
|
6289
|
- }
|
|
|
6290
|
|
6971
|
|
6291
|
/**
|
6972
|
/**
|
6292
|
* @description 创建输入监听
|
6973
|
* @description 创建输入监听
|
6293
|
*/
|
6974
|
*/
|
6294
|
function createInputListener() {
|
6975
|
function createInputListener() {
|
6295
|
- $(`#${ enumActionEl.TABLE_BODY_EL }`)
|
|
|
6296
|
- .on('input', `.${ enumActionEl.MIN_FILTER }`, event => {
|
6976
|
+ $(`#${enumActionEl.TABLE_BODY_EL}`)
|
|
|
6977
|
+ .on('input', `.${enumActionEl.MIN_FILTER}`, event => {
|
6297
|
const minVal = $(event.target).val()
|
6978
|
const minVal = $(event.target).val()
|
6298
|
- const maxVal = $(event.target).parents('tr').find(`input.${ enumActionEl.MAX_FILTER }`).val()
|
6979
|
+ const maxVal = $(event.target).parents('tr').find(`input.${enumActionEl.MAX_FILTER}`).val()
|
6299
|
if (maxVal !== '' && Number(minVal) > Number(maxVal)) {
|
6980
|
if (maxVal !== '' && Number(minVal) > Number(maxVal)) {
|
6300
|
layer.tips('输入值大于最大值', $(event.target), {
|
6981
|
layer.tips('输入值大于最大值', $(event.target), {
|
6301
|
tips: 1,
|
6982
|
tips: 1,
|
6302
|
});
|
6983
|
});
|
6303
|
}
|
6984
|
}
|
6304
|
})
|
6985
|
})
|
6305
|
- .on('input', `.${ enumActionEl.MAX_FILTER }`, event => {
|
6986
|
+ .on('input', `.${enumActionEl.MAX_FILTER}`, event => {
|
6306
|
const maxVal = $(event.target).val()
|
6987
|
const maxVal = $(event.target).val()
|
6307
|
- const minVal = $(event.target).parents('tr').find(`input.${ enumActionEl.MIN_FILTER }`).val()
|
6988
|
+ const minVal = $(event.target).parents('tr').find(`input.${enumActionEl.MIN_FILTER}`).val()
|
6308
|
if (minVal !== '' && Number(maxVal) < Number(minVal)) {
|
6989
|
if (minVal !== '' && Number(maxVal) < Number(minVal)) {
|
6309
|
layer.tips('输入值小于最小值', $(event.target), {
|
6990
|
layer.tips('输入值小于最小值', $(event.target), {
|
6310
|
tips: 1,
|
6991
|
tips: 1,
|
|
@@ -6318,7 +6999,6 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6318,7 +6999,6 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6318
|
*/
|
6999
|
*/
|
6319
|
function createEventListen() {
|
7000
|
function createEventListen() {
|
6320
|
createInputListener()
|
7001
|
createInputListener()
|
6321
|
- createSelectLinkageListenEvent()
|
|
|
6322
|
createAddRowListenEvent()
|
7002
|
createAddRowListenEvent()
|
6323
|
createDeleteRowListenEvent()
|
7003
|
createDeleteRowListenEvent()
|
6324
|
}
|
7004
|
}
|
|
@@ -6327,23 +7007,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6327,23 +7007,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6327
|
* @description 回显数据
|
7007
|
* @description 回显数据
|
6328
|
*/
|
7008
|
*/
|
6329
|
function echoData(info) {
|
7009
|
function echoData(info) {
|
6330
|
- const { slaveDeviceId, deviceId, attr, orgId, condition = [] } = info
|
7010
|
+ const { condition = [] } = info
|
6331
|
echoEachData(condition)
|
7011
|
echoEachData(condition)
|
6332
|
- echoOrgTree(orgId)
|
|
|
6333
|
- const queue = []
|
|
|
6334
|
- if (orgId) {
|
|
|
6335
|
- queue.push(getDeviceByOrg(orgId))
|
|
|
6336
|
- }
|
|
|
6337
|
- if (slaveDeviceId) {
|
|
|
6338
|
- $(`#${ enumActionEl.SLAVE_DEVICE_EL }`).css({ display: 'block' })
|
|
|
6339
|
- queue.push(getSlaveDeviceByMasterDevice(orgId, deviceId))
|
|
|
6340
|
- queue.push(getAttrsByDevice(slaveDeviceId))
|
|
|
6341
|
- } else {
|
|
|
6342
|
- queue.push(getAttrsByDevice(deviceId))
|
|
|
6343
|
- }
|
|
|
6344
|
- Promise.all(queue).finally(() => {
|
|
|
6345
|
- form.val(enumActionEl.FORM_FILTER, { slaveDeviceId, deviceId, attr, orgId })
|
|
|
6346
|
- })
|
|
|
6347
|
}
|
7012
|
}
|
6348
|
|
7013
|
|
6349
|
/**
|
7014
|
/**
|
|
@@ -6356,25 +7021,17 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6356,25 +7021,17 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6356
|
})
|
7021
|
})
|
6357
|
}
|
7022
|
}
|
6358
|
|
7023
|
|
6359
|
- /**
|
|
|
6360
|
- * @description 回显组织树
|
|
|
6361
|
- */
|
|
|
6362
|
- function echoOrgTree(id) {
|
|
|
6363
|
- const node = UseLayUi.findTreeObjectByField(treeList, id)
|
|
|
6364
|
- $(`#${ enumActionEl.ORG_EL }`).find(`input[name="${ enumConst.ORG_ID }"]`).parent().find('span').html(node?.name)
|
|
|
6365
|
- }
|
|
|
6366
|
-
|
|
|
6367
|
function validate(tableData) {
|
7024
|
function validate(tableData) {
|
6368
|
let validateFlag = true
|
7025
|
let validateFlag = true
|
6369
|
for (let i = 0; i < tableData.length; i++) {
|
7026
|
for (let i = 0; i < tableData.length; i++) {
|
6370
|
const { min, max } = tableData[i]
|
7027
|
const { min, max } = tableData[i]
|
6371
|
if (Number(min) > Number(max)) {
|
7028
|
if (Number(min) > Number(max)) {
|
6372
|
validateFlag = false
|
7029
|
validateFlag = false
|
6373
|
- layer.tips('输入值大于最大值', $(`#${ enumActionEl.TABLE_BODY_EL } tr`).eq(i).find(`input[name="${ enumConst.MIN }"]`), { tips: 1 })
|
7030
|
+ layer.tips('输入值大于最大值', $(`#${enumActionEl.TABLE_BODY_EL} tr`).eq(i).find(`input[name="${enumConst.MIN}"]`), { tips: 1 })
|
6374
|
break
|
7031
|
break
|
6375
|
} else if (Number(max) < Number(min)) {
|
7032
|
} else if (Number(max) < Number(min)) {
|
6376
|
validateFlag = false
|
7033
|
validateFlag = false
|
6377
|
- layer.tips('输入值小于最小值', $(`#${ enumActionEl.TABLE_BODY_EL } tr`).eq(i).find(`input[name="${ enumConst.MAX }"]`), { tips: 1 })
|
7034
|
+ layer.tips('输入值小于最小值', $(`#${enumActionEl.TABLE_BODY_EL} tr`).eq(i).find(`input[name="${enumConst.MAX}"]`), { tips: 1 })
|
6378
|
break
|
7035
|
break
|
6379
|
}
|
7036
|
}
|
6380
|
}
|
7037
|
}
|
|
@@ -6393,7 +7050,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6393,7 +7050,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6393
|
condition: tableData,
|
7050
|
condition: tableData,
|
6394
|
type: event.data.type,
|
7051
|
type: event.data.type,
|
6395
|
}
|
7052
|
}
|
6396
|
- const [ err, res ] = await to(ConfigurationNodeApi.updateNodeAct(formModel))
|
7053
|
+ const [err, res] = await to(ConfigurationNodeApi.updateNodeAct(formModel))
|
6397
|
if (err) return
|
7054
|
if (err) return
|
6398
|
UseLayUi.successMsg()
|
7055
|
UseLayUi.successMsg()
|
6399
|
callback()
|
7056
|
callback()
|
|
@@ -6403,10 +7060,9 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6403,10 +7060,9 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6403
|
return Number(value) >= Number(min) && Number(value) <= Number(max)
|
7060
|
return Number(value) >= Number(min) && Number(value) <= Number(max)
|
6404
|
}
|
7061
|
}
|
6405
|
|
7062
|
|
6406
|
-
|
|
|
6407
|
function createLayerForm(type) {
|
7063
|
function createLayerForm(type) {
|
6408
|
const content = `
|
7064
|
const content = `
|
6409
|
- <form class="layui-form" lay-filter="${ enumActionEl.FORM_FILTER }">
|
7065
|
+ <form class="layui-form" lay-filter="${enumActionEl.FORM_FILTER}">
|
6410
|
<div style="width:400px">
|
7066
|
<div style="width:400px">
|
6411
|
<div class="layui-form-item">
|
7067
|
<div class="layui-form-item">
|
6412
|
<label class="layui-form-label">类型</label>
|
7068
|
<label class="layui-form-label">类型</label>
|
|
@@ -6415,47 +7071,25 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6415,47 +7071,25 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6415
|
<input type="radio" name="type" value="2" title="产品/场景" disabled>
|
7071
|
<input type="radio" name="type" value="2" title="产品/场景" disabled>
|
6416
|
</div>
|
7072
|
</div>
|
6417
|
</div>
|
7073
|
</div>
|
6418
|
-
|
|
|
6419
|
- <div id="${ enumActionEl.ORG_EL }">组织</div>
|
|
|
6420
|
-
|
|
|
6421
|
- <div class="layui-form-item" id="${ enumActionEl.DEVICE_EL }">
|
|
|
6422
|
- <label class="layui-form-label">设备</label>
|
|
|
6423
|
- <div class="layui-input-block">
|
|
|
6424
|
- <select name="${ enumConst.DEVICE_ID }" lay-verType="tips" lay-verify="required" lay-filter="${ enumActionEl.DEVICE_EL }">
|
|
|
6425
|
- </select>
|
|
|
6426
|
- </div>
|
|
|
6427
|
- </div>
|
|
|
6428
|
-
|
|
|
6429
|
- <div class="layui-form-item" id="${ enumActionEl.SLAVE_DEVICE_EL }" style="display: none">
|
|
|
6430
|
- <label class="layui-form-label">子设备</label>
|
|
|
6431
|
- <div class="layui-input-block">
|
|
|
6432
|
- <select name="${ enumConst.SLAVE_DEVICE_ID }" lay-verType="tips" lay-filter="${ enumActionEl.SLAVE_DEVICE_EL }">
|
|
|
6433
|
- </select>
|
|
|
6434
|
- </div>
|
|
|
6435
|
- </div>
|
|
|
6436
|
-
|
|
|
6437
|
- <div class="layui-form-item" id="${ enumActionEl.ATTR_EL }">
|
|
|
6438
|
- <label class="layui-form-label">属性</label>
|
|
|
6439
|
- <div class="layui-input-block">
|
|
|
6440
|
- <select name="${ enumConst.ATTR }" lay-verType="tips" lay-verify="required" lay-filter="${ enumActionEl.ATTR_EL }"></select>
|
|
|
6441
|
- </div>
|
|
|
6442
|
- </div>
|
7074
|
+
|
|
|
7075
|
+ <div id="${enumActionEl.DATA_SOURCE_COMP_EL}"></div>
|
|
|
7076
|
+
|
6443
|
</div>
|
7077
|
</div>
|
6444
|
</form>
|
7078
|
</form>
|
6445
|
<div class="override__table">
|
7079
|
<div class="override__table">
|
6446
|
<table class="layui-table" >
|
7080
|
<table class="layui-table" >
|
6447
|
<thead>
|
7081
|
<thead>
|
6448
|
<tr>
|
7082
|
<tr>
|
6449
|
- ${ IS_DISPLAY ? '<th style="text-align:center">类型</th>' : '' }
|
7083
|
+ ${IS_DISPLAY ? '<th style="text-align:center">类型</th>' : ''}
|
6450
|
<th style="text-align:center">最小值(<=)</th>
|
7084
|
<th style="text-align:center">最小值(<=)</th>
|
6451
|
<th style="text-align:center">最大值(>=)</th>
|
7085
|
<th style="text-align:center">最大值(>=)</th>
|
6452
|
<th style="text-align:center">操作</th>
|
7086
|
<th style="text-align:center">操作</th>
|
6453
|
</tr>
|
7087
|
</tr>
|
6454
|
</thead>
|
7088
|
</thead>
|
6455
|
- <tbody id="${ enumActionEl.TABLE_BODY_EL }"></tbody>
|
7089
|
+ <tbody id="${enumActionEl.TABLE_BODY_EL}"></tbody>
|
6456
|
</table>
|
7090
|
</table>
|
6457
|
<div style="display:flex;justify-content:center;">
|
7091
|
<div style="display:flex;justify-content:center;">
|
6458
|
- <button type="button" class="layui-btn layui-btn-primary layui-border-blue" id="${ enumActionEl.ADD_BTN_EL }">添加一条</button>
|
7092
|
+ <button type="button" class="layui-btn layui-btn-primary layui-border-blue" id="${enumActionEl.ADD_BTN_EL}">添加一条</button>
|
6459
|
</div>
|
7093
|
</div>
|
6460
|
</div>
|
7094
|
</div>
|
6461
|
`
|
7095
|
`
|
|
@@ -6464,16 +7098,23 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6464,16 +7098,23 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6464
|
title: enumEventType[type],
|
7098
|
title: enumEventType[type],
|
6465
|
content,
|
7099
|
content,
|
6466
|
skin: 'event-layer__override',
|
7100
|
skin: 'event-layer__override',
|
6467
|
- btn: [ '保存', '取消' ],
|
7101
|
+ btn: ['保存', '取消'],
|
|
|
7102
|
+ offset: '100px',
|
6468
|
area: IS_DISPLAY ? '1000px' : '800PX',
|
7103
|
area: IS_DISPLAY ? '1000px' : '800PX',
|
6469
|
success(layero) {
|
7104
|
success(layero) {
|
6470
|
$(layero).addClass('layui-form').find('.layui-layer-btn0').attr({
|
7105
|
$(layero).addClass('layui-form').find('.layui-layer-btn0').attr({
|
6471
|
'lay-submit': '',
|
7106
|
'lay-submit': '',
|
6472
|
'lay-filter': enumActionEl.LAYER_SUBMIT_FILTER,
|
7107
|
'lay-filter': enumActionEl.LAYER_SUBMIT_FILTER,
|
6473
|
})
|
7108
|
})
|
6474
|
- generatorOrgTreeSelect()
|
7109
|
+ const {
|
|
|
7110
|
+ component,
|
|
|
7111
|
+ echoDataSource,
|
|
|
7112
|
+ } = generatorDataSourceComponent({ overrideClass: 'dynamic-effect__data-source-comp--override' })
|
|
|
7113
|
+ $(`#${enumActionEl.DATA_SOURCE_COMP_EL}`).append(component)
|
6475
|
const info = getLayerBindInfo('act', type)
|
7114
|
const info = getLayerBindInfo('act', type)
|
6476
|
- if (info) {
|
7115
|
+ const { condition = [] } = info
|
|
|
7116
|
+ if (info && condition.length) {
|
|
|
7117
|
+ echoDataSource(info)
|
6477
|
echoData(info)
|
7118
|
echoData(info)
|
6478
|
} else {
|
7119
|
} else {
|
6479
|
addRecord()
|
7120
|
addRecord()
|
|
@@ -6482,7 +7123,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6482,7 +7123,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6482
|
form.render()
|
7123
|
form.render()
|
6483
|
},
|
7124
|
},
|
6484
|
yes(index) {
|
7125
|
yes(index) {
|
6485
|
- form.on(`submit(${ enumActionEl.LAYER_SUBMIT_FILTER })`, data => {
|
7126
|
+ form.on(`submit(${enumActionEl.LAYER_SUBMIT_FILTER})`, data => {
|
6486
|
submit(() => {
|
7127
|
submit(() => {
|
6487
|
layer.close(index)
|
7128
|
layer.close(index)
|
6488
|
getNodeBindInfo()
|
7129
|
getNodeBindInfo()
|
|
@@ -6499,18 +7140,239 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
|
@@ -6499,18 +7140,239 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6499
|
|
7140
|
|
6500
|
}
|
7141
|
}
|
6501
|
|
7142
|
|
|
|
7143
|
+ /**
|
|
|
7144
|
+ * @description 生成数据源组件
|
|
|
7145
|
+ * @param {object} options
|
|
|
7146
|
+ * @param {string} [options.overrideClass = ''] options.overrideClass
|
|
|
7147
|
+ * @param {boolean} [options.validate = true ] options.validate
|
|
|
7148
|
+ */
|
|
|
7149
|
+ function generatorDataSourceComponent(options = {}) {
|
|
|
7150
|
+ const { overrideClass = '', validate = true } = options
|
|
|
7151
|
+ const componentFilter = `data-source__component-filter-${Date.now()}`
|
|
|
7152
|
+ const componentId = `data-source__component-${Date.now()}`
|
|
|
7153
|
+
|
|
|
7154
|
+ const validateRule = validate ? { layVerify: 'required', layVerType: 'tips' } : {}
|
|
|
7155
|
+
|
|
|
7156
|
+ const enumDataSourceConst = {
|
|
|
7157
|
+ ORG_ID: 'orgId',
|
|
|
7158
|
+ DEVICE_ID: 'deviceId',
|
|
|
7159
|
+ SLAVE_DEVICE_ID: 'slaveDeviceId',
|
|
|
7160
|
+ ATTR: 'attr',
|
|
|
7161
|
+ GATEWAY: 'GATEWAY',
|
|
|
7162
|
+ }
|
|
|
7163
|
+ /**
|
|
|
7164
|
+ * @description
|
|
|
7165
|
+ * @type {{id: string, deviceType: string, name: string}[]}
|
|
|
7166
|
+ */
|
|
|
7167
|
+ let deviceList = []
|
|
|
7168
|
+
|
|
|
7169
|
+ const component = document.createElement('div')
|
|
|
7170
|
+
|
|
|
7171
|
+ $(component)
|
|
|
7172
|
+ .addClass(`layui-form data-source__component-style ${overrideClass}`)
|
|
|
7173
|
+ .attr({
|
|
|
7174
|
+ id: componentId,
|
|
|
7175
|
+ 'lay-filter': componentFilter,
|
|
|
7176
|
+ })
|
|
|
7177
|
+
|
|
|
7178
|
+ init()
|
|
|
7179
|
+
|
|
|
7180
|
+ function init() {
|
|
|
7181
|
+ generatorOrgTres()
|
|
|
7182
|
+ generatorDeviceSelect()
|
|
|
7183
|
+ generatorSlaveDevice()
|
|
|
7184
|
+ generatorAttrSelect()
|
|
|
7185
|
+ }
|
|
|
7186
|
+
|
|
|
7187
|
+
|
|
|
7188
|
+ /**
|
|
|
7189
|
+ * @description 根据组织ID获取设备
|
|
|
7190
|
+ */
|
|
|
7191
|
+ async function getDevicesByOrgId(organizationId) {
|
|
|
7192
|
+ if (organizationId) {
|
|
|
7193
|
+ const items = deviceList = await ConfigurationNodeApi.getMasterDevice(organizationId);
|
|
|
7194
|
+ $(`#${componentId} `).find(`select[name="${enumDataSourceConst.DEVICE_ID}"]`).html(UseLayUi.generateOptionTemplate({ dataSource: items }))
|
|
|
7195
|
+ form.render('select', componentFilter)
|
|
|
7196
|
+ }
|
|
|
7197
|
+ }
|
|
|
7198
|
+
|
|
|
7199
|
+ /**
|
|
|
7200
|
+ * @description 通过主设备ID获取从设备
|
|
|
7201
|
+ */
|
|
|
7202
|
+ async function getSlaveDeviceByMasterDeviceId(orgId, deviceId) {
|
|
|
7203
|
+ if (deviceId && currentCheckedOrgNode) {
|
|
|
7204
|
+ const items = await ConfigurationNodeApi.getSlaveDevice(orgId, deviceId);
|
|
|
7205
|
+ $(`#${componentId} `).find(`select[name="${enumDataSourceConst.SLAVE_DEVICE_ID}"]`).html(UseLayUi.generateOptionTemplate({ dataSource: items }))
|
|
|
7206
|
+ form.render('select', componentFilter)
|
|
|
7207
|
+ }
|
|
|
7208
|
+ }
|
|
|
7209
|
+
|
|
|
7210
|
+ /**
|
|
|
7211
|
+ * @description 根据设备ID获取属性
|
|
|
7212
|
+ */
|
|
|
7213
|
+ async function getAttrByDeviceId(tbDeviceId) {
|
|
|
7214
|
+ if (tbDeviceId) {
|
|
|
7215
|
+ const [err, res] = await to(ConfigurationNodeApi.getDeviceAttr(tbDeviceId))
|
|
|
7216
|
+ $(`#${componentId} `).find(`select[name="${enumDataSourceConst.ATTR}"]`).html(UseLayUi.generateOptionTemplate({ dataSource: res }))
|
|
|
7217
|
+ form.render('select', componentFilter)
|
|
|
7218
|
+ }
|
|
|
7219
|
+ }
|
|
|
7220
|
+
|
|
|
7221
|
+
|
|
|
7222
|
+ /**
|
|
|
7223
|
+ * @description 生成组织选择
|
|
|
7224
|
+ */
|
|
|
7225
|
+ async function generatorOrgTres() {
|
|
|
7226
|
+ const orgContainerId = `data-source__component--org-${Date.now()}`
|
|
|
7227
|
+ const orgContainer = `<div id="${orgContainerId}"></div>`
|
|
|
7228
|
+ $(component).append(orgContainer)
|
|
|
7229
|
+
|
|
|
7230
|
+ const [err, res] = await to(ConfigurationNodeApi.getOrgTree())
|
|
|
7231
|
+ if (err) return
|
|
|
7232
|
+ treeList = res
|
|
|
7233
|
+
|
|
|
7234
|
+ UseLayUi.createTreeSelect({
|
|
|
7235
|
+ elem: `#${orgContainerId}`,
|
|
|
7236
|
+ layFilter: enumDataSourceConst.ORG_ID,
|
|
|
7237
|
+ label: '组织',
|
|
|
7238
|
+ singleUsage: false,
|
|
|
7239
|
+ className: 'data-source__component-select',
|
|
|
7240
|
+ ...validateRule,
|
|
|
7241
|
+ treeProps: {
|
|
|
7242
|
+ data: treeList,
|
|
|
7243
|
+ onlyIconControl: true,
|
|
|
7244
|
+ click(node) {
|
|
|
7245
|
+ form.val(componentFilter, {
|
|
|
7246
|
+ [enumDataSourceConst.DEVICE_ID]: null,
|
|
|
7247
|
+ [enumDataSourceConst.SLAVE_DEVICE_ID]: null,
|
|
|
7248
|
+ [enumDataSourceConst.ATTR]: null,
|
|
|
7249
|
+ })
|
|
|
7250
|
+ getDevicesByOrgId(node.data.id)
|
|
|
7251
|
+ },
|
|
|
7252
|
+ },
|
|
|
7253
|
+ })
|
|
|
7254
|
+ }
|
|
|
7255
|
+
|
|
|
7256
|
+ /**
|
|
|
7257
|
+ * @description 生成设备选择器
|
|
|
7258
|
+ */
|
|
|
7259
|
+ function generatorDeviceSelect() {
|
|
|
7260
|
+ const deviceSelect = UseLayUi.createSelect({
|
|
|
7261
|
+ label: '设备',
|
|
|
7262
|
+ bindValueFiled: enumDataSourceConst.DEVICE_ID,
|
|
|
7263
|
+ layFilter: `${componentFilter}--${enumDataSourceConst.DEVICE_ID}`,
|
|
|
7264
|
+ className: 'data-source__component-select',
|
|
|
7265
|
+ ...validateRule,
|
|
|
7266
|
+ onClick(data) {
|
|
|
7267
|
+ const { value } = data
|
|
|
7268
|
+ const selected = deviceList.find(item => item.id === value)
|
|
|
7269
|
+ form.val(componentFilter, {
|
|
|
7270
|
+ [enumDataSourceConst.SLAVE_DEVICE_ID]: null,
|
|
|
7271
|
+ [enumDataSourceConst.ATTR]: null,
|
|
|
7272
|
+ })
|
|
|
7273
|
+ if (selected.deviceType === enumDataSourceConst.GATEWAY) {
|
|
|
7274
|
+ $(`#${componentId}`).find(`select[name="${enumDataSourceConst.SLAVE_DEVICE_ID}"]`)
|
|
|
7275
|
+ .attr('lay-verify', 'required').attr('lay-verType', 'tips')
|
|
|
7276
|
+ .parentsUntil(`#${componentId}`).show()
|
|
|
7277
|
+ getSlaveDeviceByMasterDeviceId(currentCheckedOrgNode, selected.id)
|
|
|
7278
|
+ } else {
|
|
|
7279
|
+ $(`#${componentId}`).find(`select[name="${enumDataSourceConst.SLAVE_DEVICE_ID}"]`)
|
|
|
7280
|
+ .attr('lay-verify', '').attr('lay-verType', 'tips')
|
|
|
7281
|
+ .parentsUntil(`#${componentId}`).hide()
|
|
|
7282
|
+ getAttrByDeviceId(selected.id)
|
|
|
7283
|
+ }
|
|
|
7284
|
+ },
|
|
|
7285
|
+ })
|
|
|
7286
|
+ $(component).append(deviceSelect)
|
|
|
7287
|
+ }
|
|
|
7288
|
+
|
|
|
7289
|
+ /**
|
|
|
7290
|
+ * @description 生成从设备选择器
|
|
|
7291
|
+ */
|
|
|
7292
|
+ function generatorSlaveDevice() {
|
|
|
7293
|
+ const slaveDeviceSelect = UseLayUi.createSelect({
|
|
|
7294
|
+ label: '子设备',
|
|
|
7295
|
+ bindValueFiled: enumDataSourceConst.SLAVE_DEVICE_ID,
|
|
|
7296
|
+ layFilter: `${componentFilter}--${enumDataSourceConst.SLAVE_DEVICE_ID}`,
|
|
|
7297
|
+ className: 'data-source__component-select',
|
|
|
7298
|
+ onClick(data) {
|
|
|
7299
|
+ const { value } = data
|
|
|
7300
|
+ form.val(componentFilter, {
|
|
|
7301
|
+ [enumDataSourceConst.ATTR]: null,
|
|
|
7302
|
+ })
|
|
|
7303
|
+ getAttrByDeviceId(value)
|
|
|
7304
|
+ },
|
|
|
7305
|
+ })
|
|
|
7306
|
+ $(component).append(slaveDeviceSelect)
|
|
|
7307
|
+ }
|
|
|
7308
|
+
|
|
|
7309
|
+ /**
|
|
|
7310
|
+ * @description 生成属性选择器
|
|
|
7311
|
+ */
|
|
|
7312
|
+ function generatorAttrSelect() {
|
|
|
7313
|
+ const attrsSelect = UseLayUi.createSelect({
|
|
|
7314
|
+ label: '属性',
|
|
|
7315
|
+ bindValueFiled: enumDataSourceConst.ATTR,
|
|
|
7316
|
+ layFilter: `${componentFilter}--${enumDataSourceConst.ATTR}`,
|
|
|
7317
|
+ className: 'data-source__component-select',
|
|
|
7318
|
+ ...validateRule,
|
|
|
7319
|
+ })
|
|
|
7320
|
+ $(component).append(attrsSelect)
|
|
|
7321
|
+ }
|
|
|
7322
|
+
|
|
|
7323
|
+ /**
|
|
|
7324
|
+ * @description 回显数据
|
|
|
7325
|
+ * @param {{orgId: string, deviceId: string, slaveDeviceId?: string, attr: string}} dataSource
|
|
|
7326
|
+ */
|
|
|
7327
|
+ function echoDataSource(dataSource = {}) {
|
|
|
7328
|
+ const { orgId, deviceId, slaveDeviceId, attr } = dataSource
|
|
|
7329
|
+ const queue = []
|
|
|
7330
|
+ if (orgId) {
|
|
|
7331
|
+ currentCheckedOrgNode = orgId
|
|
|
7332
|
+ queue.push(getDevicesByOrgId(orgId))
|
|
|
7333
|
+ }
|
|
|
7334
|
+ if (slaveDeviceId) {
|
|
|
7335
|
+ queue.push(getSlaveDeviceByMasterDeviceId(orgId, deviceId))
|
|
|
7336
|
+ $(`#${componentId}`).find(`select[name="${enumDataSourceConst.SLAVE_DEVICE_ID}"]`).parentsUntil(`#${componentId}`).show()
|
|
|
7337
|
+ queue.push(getAttrByDeviceId(slaveDeviceId))
|
|
|
7338
|
+ } else {
|
|
|
7339
|
+ $(`#${componentId}`).find(`select[name="${enumDataSourceConst.SLAVE_DEVICE_ID}"]`).parentsUntil(`#${componentId}`).hide()
|
|
|
7340
|
+ queue.push(getAttrByDeviceId(deviceId))
|
|
|
7341
|
+ }
|
|
|
7342
|
+ Promise.all(queue)
|
|
|
7343
|
+ .finally(() => {
|
|
|
7344
|
+ const orgNode = UseLayUi.findTreeObjectByField(treeList, currentCheckedOrgNode)
|
|
|
7345
|
+ $(`#${componentId} input[name="${enumDataSourceConst.ORG_ID}"]`).parent().find('span').html(orgNode?.name)
|
|
|
7346
|
+ form.val(componentFilter, {
|
|
|
7347
|
+ orgId,
|
|
|
7348
|
+ deviceId,
|
|
|
7349
|
+ slaveDeviceId,
|
|
|
7350
|
+ attr,
|
|
|
7351
|
+ })
|
|
|
7352
|
+ })
|
|
|
7353
|
+ }
|
|
|
7354
|
+
|
|
|
7355
|
+ function getValue() {
|
|
|
7356
|
+ return form.val(componentFilter)
|
|
|
7357
|
+ }
|
|
|
7358
|
+
|
|
|
7359
|
+ return { component, getValue, componentId, componentFilter, echoDataSource }
|
|
|
7360
|
+ }
|
|
|
7361
|
+
|
6502
|
// 异步设置此处才能生效 -- 设置默认select和样式和初始化侧边栏生成组件和事件绑定
|
7362
|
// 异步设置此处才能生效 -- 设置默认select和样式和初始化侧边栏生成组件和事件绑定
|
6503
|
setTimeout(() => {
|
7363
|
setTimeout(() => {
|
6504
|
|
7364
|
|
6505
|
// TODO 数据交互事件
|
7365
|
// TODO 数据交互事件
|
6506
|
- $(`#${ enumInteractionType.DOWN }`).click({ type: enumInteractionType.DOWN }, handleDownOrUpEvent);
|
|
|
6507
|
- $(`#${ enumInteractionType.UP }`).click({ type: enumInteractionType.UP }, handleDownOrUpEvent);
|
|
|
6508
|
- $(`#${ enumInteractionType.SINGLE }`).click({ type: enumInteractionType.SINGLE }, handleClickOrDbClick);
|
|
|
6509
|
- $(`#${ enumInteractionType.DOUBLE }`).click({ type: enumInteractionType.DOUBLE }, handleClickOrDbClick);
|
7366
|
+ $(`#${enumDynamicEffectType.IMAGE}`).click({ type: enumDynamicEffectType.IMAGE }, handleSettingVarImage);
|
|
|
7367
|
+
|
|
|
7368
|
+ $(`#${enumInteractionType.DOWN}`).click({ type: enumInteractionType.DOWN }, handleDownOrUpEvent);
|
|
|
7369
|
+ $(`#${enumInteractionType.UP}`).click({ type: enumInteractionType.UP }, handleDownOrUpEvent);
|
|
|
7370
|
+ $(`#${enumInteractionType.SINGLE}`).click({ type: enumInteractionType.SINGLE }, handleClickOrDbClick);
|
|
|
7371
|
+ $(`#${enumInteractionType.DOUBLE}`).click({ type: enumInteractionType.DOUBLE }, handleClickOrDbClick);
|
6510
|
// 数据动效事件
|
7372
|
// 数据动效事件
|
6511
|
- $(`#${ enumDynamicEffectType.FLASH }`).click({ type: enumDynamicEffectType.FLASH }, handleDataDynamicEffect);
|
|
|
6512
|
- $(`#${ enumDynamicEffectType.DISPLAY }`).click({ type: enumDynamicEffectType.DISPLAY }, handleDataDynamicEffect);
|
|
|
6513
|
- $(`#${ enumDynamicEffectType.ROTATE }`).click({ type: enumDynamicEffectType.ROTATE }, handleDataDynamicEffect);
|
7373
|
+ $(`#${enumDynamicEffectType.FLASH}`).click({ type: enumDynamicEffectType.FLASH }, handleDataDynamicEffect);
|
|
|
7374
|
+ $(`#${enumDynamicEffectType.DISPLAY}`).click({ type: enumDynamicEffectType.DISPLAY }, handleDataDynamicEffect);
|
|
|
7375
|
+ $(`#${enumDynamicEffectType.ROTATE}`).click({ type: enumDynamicEffectType.ROTATE }, handleDataDynamicEffect);
|
6514
|
});
|
7376
|
});
|
6515
|
};
|
7377
|
};
|
6516
|
|
7378
|
|
|
@@ -6848,9 +7710,9 @@ StyleFormatPanel.prototype.addFill = function (container) { |
|
@@ -6848,9 +7710,9 @@ StyleFormatPanel.prototype.addFill = function (container) { |
6848
|
var tmpColor = mxUtils.getValue(ss.style, fillKey, null);
|
7710
|
var tmpColor = mxUtils.getValue(ss.style, fillKey, null);
|
6849
|
gradientPanel.style.display =
|
7711
|
gradientPanel.style.display =
|
6850
|
tmpColor != null &&
|
7712
|
tmpColor != null &&
|
6851
|
- tmpColor != mxConstants.NONE &&
|
|
|
6852
|
- ss.fill &&
|
|
|
6853
|
- ss.style.shape != "image"
|
7713
|
+ tmpColor != mxConstants.NONE &&
|
|
|
7714
|
+ ss.fill &&
|
|
|
7715
|
+ ss.style.shape != "image"
|
6854
|
? ""
|
7716
|
? ""
|
6855
|
: "none";
|
7717
|
: "none";
|
6856
|
|
7718
|
|
|
@@ -6912,7 +7774,7 @@ StyleFormatPanel.prototype.addFill = function (container) { |
|
@@ -6912,7 +7774,7 @@ StyleFormatPanel.prototype.addFill = function (container) { |
6912
|
fillStyleSelect.style.display = ss.style.sketch == "1" ? "" : "none";
|
7774
|
fillStyleSelect.style.display = ss.style.sketch == "1" ? "" : "none";
|
6913
|
gradientPanel.style.display =
|
7775
|
gradientPanel.style.display =
|
6914
|
!ss.containsImage &&
|
7776
|
!ss.containsImage &&
|
6915
|
- (ss.style.sketch != "1" || fillStyle == "solid" || fillStyle == "auto")
|
7777
|
+ (ss.style.sketch != "1" || fillStyle == "solid" || fillStyle == "auto")
|
6916
|
? ""
|
7778
|
? ""
|
6917
|
: "none";
|
7779
|
: "none";
|
6918
|
}
|
7780
|
}
|
|
@@ -6936,9 +7798,9 @@ StyleFormatPanel.prototype.addFill = function (container) { |
|
@@ -6936,9 +7798,9 @@ StyleFormatPanel.prototype.addFill = function (container) { |
6936
|
new mxEventObject(
|
7798
|
new mxEventObject(
|
6937
|
"styleChanged",
|
7799
|
"styleChanged",
|
6938
|
"keys",
|
7800
|
"keys",
|
6939
|
- [ mxConstants.STYLE_GRADIENT_DIRECTION ],
|
7801
|
+ [mxConstants.STYLE_GRADIENT_DIRECTION],
|
6940
|
"values",
|
7802
|
"values",
|
6941
|
- [ gradientSelect.value ],
|
7803
|
+ [gradientSelect.value],
|
6942
|
"cells",
|
7804
|
"cells",
|
6943
|
ss.cells,
|
7805
|
ss.cells,
|
6944
|
),
|
7806
|
),
|
|
@@ -6952,9 +7814,9 @@ StyleFormatPanel.prototype.addFill = function (container) { |
|
@@ -6952,9 +7814,9 @@ StyleFormatPanel.prototype.addFill = function (container) { |
6952
|
new mxEventObject(
|
7814
|
new mxEventObject(
|
6953
|
"styleChanged",
|
7815
|
"styleChanged",
|
6954
|
"keys",
|
7816
|
"keys",
|
6955
|
- [ "fillStyle" ],
|
7817
|
+ ["fillStyle"],
|
6956
|
"values",
|
7818
|
"values",
|
6957
|
- [ fillStyleSelect.value ],
|
7819
|
+ [fillStyleSelect.value],
|
6958
|
"cells",
|
7820
|
"cells",
|
6959
|
ss.cells,
|
7821
|
ss.cells,
|
6960
|
),
|
7822
|
),
|
|
@@ -7030,7 +7892,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7030,7 +7892,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7030
|
styleSelect.style.border = "1px solid rgb(160, 160, 160)";
|
7892
|
styleSelect.style.border = "1px solid rgb(160, 160, 160)";
|
7031
|
styleSelect.style.borderRadius = "4px";
|
7893
|
styleSelect.style.borderRadius = "4px";
|
7032
|
|
7894
|
|
7033
|
- var styles = [ "sharp", "rounded", "curved" ];
|
7895
|
+ var styles = ["sharp", "rounded", "curved"];
|
7034
|
|
7896
|
|
7035
|
for (var i = 0; i < styles.length; i++) {
|
7897
|
for (var i = 0; i < styles.length; i++) {
|
7036
|
var styleOption = document.createElement("option");
|
7898
|
var styleOption = document.createElement("option");
|
|
@@ -7042,14 +7904,14 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7042,14 +7904,14 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7042
|
mxEvent.addListener(styleSelect, "change", function (evt) {
|
7904
|
mxEvent.addListener(styleSelect, "change", function (evt) {
|
7043
|
graph.getModel().beginUpdate();
|
7905
|
graph.getModel().beginUpdate();
|
7044
|
try {
|
7906
|
try {
|
7045
|
- var keys = [ mxConstants.STYLE_ROUNDED, mxConstants.STYLE_CURVED ];
|
7907
|
+ var keys = [mxConstants.STYLE_ROUNDED, mxConstants.STYLE_CURVED];
|
7046
|
// Default for rounded is 1
|
7908
|
// Default for rounded is 1
|
7047
|
- var values = [ "0", null ];
|
7909
|
+ var values = ["0", null];
|
7048
|
|
7910
|
|
7049
|
if (styleSelect.value == "rounded") {
|
7911
|
if (styleSelect.value == "rounded") {
|
7050
|
- values = [ "1", null ];
|
7912
|
+ values = ["1", null];
|
7051
|
} else if (styleSelect.value == "curved") {
|
7913
|
} else if (styleSelect.value == "curved") {
|
7052
|
- values = [ null, "1" ];
|
7914
|
+ values = [null, "1"];
|
7053
|
}
|
7915
|
}
|
7054
|
|
7916
|
|
7055
|
for (var i = 0; i < keys.length; i++) {
|
7917
|
for (var i = 0; i < keys.length; i++) {
|
|
@@ -7150,36 +8012,36 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7150,36 +8012,36 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7150
|
menu,
|
8012
|
menu,
|
7151
|
75,
|
8013
|
75,
|
7152
|
"solid",
|
8014
|
"solid",
|
7153
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7154
|
- [ null, null ],
|
8015
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8016
|
+ [null, null],
|
7155
|
).setAttribute("title", mxResources.get("solid"));
|
8017
|
).setAttribute("title", mxResources.get("solid"));
|
7156
|
addItem(
|
8018
|
addItem(
|
7157
|
menu,
|
8019
|
menu,
|
7158
|
75,
|
8020
|
75,
|
7159
|
"dashed",
|
8021
|
"dashed",
|
7160
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7161
|
- [ "1", null ],
|
8022
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8023
|
+ ["1", null],
|
7162
|
).setAttribute("title", mxResources.get("dashed"));
|
8024
|
).setAttribute("title", mxResources.get("dashed"));
|
7163
|
addItem(
|
8025
|
addItem(
|
7164
|
menu,
|
8026
|
menu,
|
7165
|
75,
|
8027
|
75,
|
7166
|
"dotted",
|
8028
|
"dotted",
|
7167
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7168
|
- [ "1", "1 1" ],
|
8029
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8030
|
+ ["1", "1 1"],
|
7169
|
).setAttribute("title", mxResources.get("dotted") + " (1)");
|
8031
|
).setAttribute("title", mxResources.get("dotted") + " (1)");
|
7170
|
addItem(
|
8032
|
addItem(
|
7171
|
menu,
|
8033
|
menu,
|
7172
|
75,
|
8034
|
75,
|
7173
|
"dotted",
|
8035
|
"dotted",
|
7174
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7175
|
- [ "1", "1 2" ],
|
8036
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8037
|
+ ["1", "1 2"],
|
7176
|
).setAttribute("title", mxResources.get("dotted") + " (2)");
|
8038
|
).setAttribute("title", mxResources.get("dotted") + " (2)");
|
7177
|
addItem(
|
8039
|
addItem(
|
7178
|
menu,
|
8040
|
menu,
|
7179
|
75,
|
8041
|
75,
|
7180
|
"dotted",
|
8042
|
"dotted",
|
7181
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7182
|
- [ "1", "1 4" ],
|
8043
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8044
|
+ ["1", "1 4"],
|
7183
|
).setAttribute("title", mxResources.get("dotted") + " (3)");
|
8045
|
).setAttribute("title", mxResources.get("dotted") + " (3)");
|
7184
|
}),
|
8046
|
}),
|
7185
|
);
|
8047
|
);
|
|
@@ -7203,7 +8065,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7203,7 +8065,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7203
|
mxConstants.STYLE_ENDSIZE,
|
8065
|
mxConstants.STYLE_ENDSIZE,
|
7204
|
"width",
|
8066
|
"width",
|
7205
|
],
|
8067
|
],
|
7206
|
- [ null, null, null, null ],
|
8068
|
+ [null, null, null, null],
|
7207
|
"geIcon geSprite geSprite-connection",
|
8069
|
"geIcon geSprite geSprite-connection",
|
7208
|
null,
|
8070
|
null,
|
7209
|
true,
|
8071
|
true,
|
|
@@ -7219,7 +8081,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7219,7 +8081,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7219
|
mxConstants.STYLE_ENDSIZE,
|
8081
|
mxConstants.STYLE_ENDSIZE,
|
7220
|
"width",
|
8082
|
"width",
|
7221
|
],
|
8083
|
],
|
7222
|
- [ "link", null, null, null ],
|
8084
|
+ ["link", null, null, null],
|
7223
|
"geIcon geSprite geSprite-linkedge",
|
8085
|
"geIcon geSprite geSprite-linkedge",
|
7224
|
null,
|
8086
|
null,
|
7225
|
true,
|
8087
|
true,
|
|
@@ -7235,7 +8097,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7235,7 +8097,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7235
|
mxConstants.STYLE_ENDSIZE,
|
8097
|
mxConstants.STYLE_ENDSIZE,
|
7236
|
"width",
|
8098
|
"width",
|
7237
|
],
|
8099
|
],
|
7238
|
- [ "flexArrow", null, null, null ],
|
8100
|
+ ["flexArrow", null, null, null],
|
7239
|
"geIcon geSprite geSprite-arrow",
|
8101
|
"geIcon geSprite geSprite-arrow",
|
7240
|
null,
|
8102
|
null,
|
7241
|
true,
|
8103
|
true,
|
|
@@ -7251,7 +8113,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7251,7 +8113,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7251
|
mxConstants.STYLE_ENDSIZE,
|
8113
|
mxConstants.STYLE_ENDSIZE,
|
7252
|
"width",
|
8114
|
"width",
|
7253
|
],
|
8115
|
],
|
7254
|
- [ "arrow", null, null, null ],
|
8116
|
+ ["arrow", null, null, null],
|
7255
|
"geIcon geSprite geSprite-simplearrow",
|
8117
|
"geIcon geSprite geSprite-simplearrow",
|
7256
|
null,
|
8118
|
null,
|
7257
|
true,
|
8119
|
true,
|
|
@@ -7270,36 +8132,36 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7270,36 +8132,36 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7270
|
menu,
|
8132
|
menu,
|
7271
|
33,
|
8133
|
33,
|
7272
|
"solid",
|
8134
|
"solid",
|
7273
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7274
|
- [ null, null ],
|
8135
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8136
|
+ [null, null],
|
7275
|
).setAttribute("title", mxResources.get("solid"));
|
8137
|
).setAttribute("title", mxResources.get("solid"));
|
7276
|
addItem(
|
8138
|
addItem(
|
7277
|
menu,
|
8139
|
menu,
|
7278
|
33,
|
8140
|
33,
|
7279
|
"dashed",
|
8141
|
"dashed",
|
7280
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7281
|
- [ "1", null ],
|
8142
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8143
|
+ ["1", null],
|
7282
|
).setAttribute("title", mxResources.get("dashed"));
|
8144
|
).setAttribute("title", mxResources.get("dashed"));
|
7283
|
addItem(
|
8145
|
addItem(
|
7284
|
menu,
|
8146
|
menu,
|
7285
|
33,
|
8147
|
33,
|
7286
|
"dotted",
|
8148
|
"dotted",
|
7287
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7288
|
- [ "1", "1 1" ],
|
8149
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8150
|
+ ["1", "1 1"],
|
7289
|
).setAttribute("title", mxResources.get("dotted") + " (1)");
|
8151
|
).setAttribute("title", mxResources.get("dotted") + " (1)");
|
7290
|
addItem(
|
8152
|
addItem(
|
7291
|
menu,
|
8153
|
menu,
|
7292
|
33,
|
8154
|
33,
|
7293
|
"dotted",
|
8155
|
"dotted",
|
7294
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7295
|
- [ "1", "1 2" ],
|
8156
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8157
|
+ ["1", "1 2"],
|
7296
|
).setAttribute("title", mxResources.get("dotted") + " (2)");
|
8158
|
).setAttribute("title", mxResources.get("dotted") + " (2)");
|
7297
|
addItem(
|
8159
|
addItem(
|
7298
|
menu,
|
8160
|
menu,
|
7299
|
33,
|
8161
|
33,
|
7300
|
"dotted",
|
8162
|
"dotted",
|
7301
|
- [ mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN ],
|
|
|
7302
|
- [ "1", "1 4" ],
|
8163
|
+ [mxConstants.STYLE_DASHED, mxConstants.STYLE_DASH_PATTERN],
|
|
|
8164
|
+ ["1", "1 4"],
|
7303
|
).setAttribute("title", mxResources.get("dotted") + " (3)");
|
8165
|
).setAttribute("title", mxResources.get("dotted") + " (3)");
|
7304
|
}),
|
8166
|
}),
|
7305
|
);
|
8167
|
);
|
|
@@ -7335,9 +8197,9 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7335,9 +8197,9 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7335
|
new mxEventObject(
|
8197
|
new mxEventObject(
|
7336
|
"styleChanged",
|
8198
|
"styleChanged",
|
7337
|
"keys",
|
8199
|
"keys",
|
7338
|
- [ mxConstants.STYLE_STROKEWIDTH ],
|
8200
|
+ [mxConstants.STYLE_STROKEWIDTH],
|
7339
|
"values",
|
8201
|
"values",
|
7340
|
- [ value ],
|
8202
|
+ [value],
|
7341
|
"cells",
|
8203
|
"cells",
|
7342
|
ss.cells,
|
8204
|
ss.cells,
|
7343
|
),
|
8205
|
),
|
|
@@ -7359,9 +8221,9 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7359,9 +8221,9 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7359
|
new mxEventObject(
|
8221
|
new mxEventObject(
|
7360
|
"styleChanged",
|
8222
|
"styleChanged",
|
7361
|
"keys",
|
8223
|
"keys",
|
7362
|
- [ mxConstants.STYLE_STROKEWIDTH ],
|
8224
|
+ [mxConstants.STYLE_STROKEWIDTH],
|
7363
|
"values",
|
8225
|
"values",
|
7364
|
- [ value ],
|
8226
|
+ [value],
|
7365
|
"cells",
|
8227
|
"cells",
|
7366
|
ss.cells,
|
8228
|
ss.cells,
|
7367
|
),
|
8229
|
),
|
|
@@ -7407,7 +8269,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7407,7 +8269,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7407
|
mxConstants.STYLE_CURVED,
|
8269
|
mxConstants.STYLE_CURVED,
|
7408
|
mxConstants.STYLE_NOEDGESTYLE,
|
8270
|
mxConstants.STYLE_NOEDGESTYLE,
|
7409
|
],
|
8271
|
],
|
7410
|
- [ null, null, null ],
|
8272
|
+ [null, null, null],
|
7411
|
"geIcon geSprite geSprite-straight",
|
8273
|
"geIcon geSprite geSprite-straight",
|
7412
|
null,
|
8274
|
null,
|
7413
|
true,
|
8275
|
true,
|
|
@@ -7422,7 +8284,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7422,7 +8284,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7422
|
mxConstants.STYLE_CURVED,
|
8284
|
mxConstants.STYLE_CURVED,
|
7423
|
mxConstants.STYLE_NOEDGESTYLE,
|
8285
|
mxConstants.STYLE_NOEDGESTYLE,
|
7424
|
],
|
8286
|
],
|
7425
|
- [ "orthogonalEdgeStyle", null, null ],
|
8287
|
+ ["orthogonalEdgeStyle", null, null],
|
7426
|
"geIcon geSprite geSprite-orthogonal",
|
8288
|
"geIcon geSprite geSprite-orthogonal",
|
7427
|
null,
|
8289
|
null,
|
7428
|
true,
|
8290
|
true,
|
|
@@ -7438,7 +8300,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7438,7 +8300,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7438
|
mxConstants.STYLE_CURVED,
|
8300
|
mxConstants.STYLE_CURVED,
|
7439
|
mxConstants.STYLE_NOEDGESTYLE,
|
8301
|
mxConstants.STYLE_NOEDGESTYLE,
|
7440
|
],
|
8302
|
],
|
7441
|
- [ "elbowEdgeStyle", null, null, null ],
|
8303
|
+ ["elbowEdgeStyle", null, null, null],
|
7442
|
"geIcon geSprite geSprite-horizontalelbow",
|
8304
|
"geIcon geSprite geSprite-horizontalelbow",
|
7443
|
null,
|
8305
|
null,
|
7444
|
true,
|
8306
|
true,
|
|
@@ -7454,7 +8316,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7454,7 +8316,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7454
|
mxConstants.STYLE_CURVED,
|
8316
|
mxConstants.STYLE_CURVED,
|
7455
|
mxConstants.STYLE_NOEDGESTYLE,
|
8317
|
mxConstants.STYLE_NOEDGESTYLE,
|
7456
|
],
|
8318
|
],
|
7457
|
- [ "elbowEdgeStyle", "vertical", null, null ],
|
8319
|
+ ["elbowEdgeStyle", "vertical", null, null],
|
7458
|
"geIcon geSprite geSprite-verticalelbow",
|
8320
|
"geIcon geSprite geSprite-verticalelbow",
|
7459
|
null,
|
8321
|
null,
|
7460
|
true,
|
8322
|
true,
|
|
@@ -7470,7 +8332,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7470,7 +8332,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7470
|
mxConstants.STYLE_CURVED,
|
8332
|
mxConstants.STYLE_CURVED,
|
7471
|
mxConstants.STYLE_NOEDGESTYLE,
|
8333
|
mxConstants.STYLE_NOEDGESTYLE,
|
7472
|
],
|
8334
|
],
|
7473
|
- [ "isometricEdgeStyle", null, null, null ],
|
8335
|
+ ["isometricEdgeStyle", null, null, null],
|
7474
|
"geIcon geSprite geSprite-horizontalisometric",
|
8336
|
"geIcon geSprite geSprite-horizontalisometric",
|
7475
|
null,
|
8337
|
null,
|
7476
|
true,
|
8338
|
true,
|
|
@@ -7486,7 +8348,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7486,7 +8348,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7486
|
mxConstants.STYLE_CURVED,
|
8348
|
mxConstants.STYLE_CURVED,
|
7487
|
mxConstants.STYLE_NOEDGESTYLE,
|
8349
|
mxConstants.STYLE_NOEDGESTYLE,
|
7488
|
],
|
8350
|
],
|
7489
|
- [ "isometricEdgeStyle", "vertical", null, null ],
|
8351
|
+ ["isometricEdgeStyle", "vertical", null, null],
|
7490
|
"geIcon geSprite geSprite-verticalisometric",
|
8352
|
"geIcon geSprite geSprite-verticalisometric",
|
7491
|
null,
|
8353
|
null,
|
7492
|
true,
|
8354
|
true,
|
|
@@ -7503,7 +8365,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7503,7 +8365,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7503
|
mxConstants.STYLE_CURVED,
|
8365
|
mxConstants.STYLE_CURVED,
|
7504
|
mxConstants.STYLE_NOEDGESTYLE,
|
8366
|
mxConstants.STYLE_NOEDGESTYLE,
|
7505
|
],
|
8367
|
],
|
7506
|
- [ "orthogonalEdgeStyle", "1", null ],
|
8368
|
+ ["orthogonalEdgeStyle", "1", null],
|
7507
|
"geIcon geSprite geSprite-curved",
|
8369
|
"geIcon geSprite geSprite-curved",
|
7508
|
null,
|
8370
|
null,
|
7509
|
true,
|
8371
|
true,
|
|
@@ -7520,7 +8382,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7520,7 +8382,7 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7520
|
mxConstants.STYLE_CURVED,
|
8382
|
mxConstants.STYLE_CURVED,
|
7521
|
mxConstants.STYLE_NOEDGESTYLE,
|
8383
|
mxConstants.STYLE_NOEDGESTYLE,
|
7522
|
],
|
8384
|
],
|
7523
|
- [ "entityRelationEdgeStyle", null, null ],
|
8385
|
+ ["entityRelationEdgeStyle", null, null],
|
7524
|
"geIcon geSprite geSprite-entity",
|
8386
|
"geIcon geSprite geSprite-entity",
|
7525
|
null,
|
8387
|
null,
|
7526
|
true,
|
8388
|
true,
|
|
@@ -7544,8 +8406,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7544,8 +8406,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7544
|
var item = this.editorUi.menus.edgeStyleChange(
|
8406
|
var item = this.editorUi.menus.edgeStyleChange(
|
7545
|
menu,
|
8407
|
menu,
|
7546
|
"",
|
8408
|
"",
|
7547
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7548
|
- [ mxConstants.NONE, 0 ],
|
8409
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8410
|
+ [mxConstants.NONE, 0],
|
7549
|
"geIcon",
|
8411
|
"geIcon",
|
7550
|
null,
|
8412
|
null,
|
7551
|
false,
|
8413
|
false,
|
|
@@ -7562,8 +8424,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7562,8 +8424,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7562
|
this.editorUi.menus.edgeStyleChange(
|
8424
|
this.editorUi.menus.edgeStyleChange(
|
7563
|
menu,
|
8425
|
menu,
|
7564
|
"",
|
8426
|
"",
|
7565
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7566
|
- [ mxConstants.ARROW_CLASSIC, 1 ],
|
8427
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8428
|
+ [mxConstants.ARROW_CLASSIC, 1],
|
7567
|
null,
|
8429
|
null,
|
7568
|
null,
|
8430
|
null,
|
7569
|
false,
|
8431
|
false,
|
|
@@ -7574,8 +8436,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7574,8 +8436,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7574
|
this.editorUi.menus.edgeStyleChange(
|
8436
|
this.editorUi.menus.edgeStyleChange(
|
7575
|
menu,
|
8437
|
menu,
|
7576
|
"",
|
8438
|
"",
|
7577
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7578
|
- [ mxConstants.ARROW_CLASSIC_THIN, 1 ],
|
8439
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8440
|
+ [mxConstants.ARROW_CLASSIC_THIN, 1],
|
7579
|
null,
|
8441
|
null,
|
7580
|
null,
|
8442
|
null,
|
7581
|
false,
|
8443
|
false,
|
|
@@ -7586,8 +8448,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7586,8 +8448,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7586
|
this.editorUi.menus.edgeStyleChange(
|
8448
|
this.editorUi.menus.edgeStyleChange(
|
7587
|
menu,
|
8449
|
menu,
|
7588
|
"",
|
8450
|
"",
|
7589
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7590
|
- [ mxConstants.ARROW_OPEN, 0 ],
|
8451
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8452
|
+ [mxConstants.ARROW_OPEN, 0],
|
7591
|
null,
|
8453
|
null,
|
7592
|
null,
|
8454
|
null,
|
7593
|
false,
|
8455
|
false,
|
|
@@ -7598,8 +8460,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7598,8 +8460,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7598
|
this.editorUi.menus.edgeStyleChange(
|
8460
|
this.editorUi.menus.edgeStyleChange(
|
7599
|
menu,
|
8461
|
menu,
|
7600
|
"",
|
8462
|
"",
|
7601
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7602
|
- [ mxConstants.ARROW_OPEN_THIN, 0 ],
|
8463
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8464
|
+ [mxConstants.ARROW_OPEN_THIN, 0],
|
7603
|
null,
|
8465
|
null,
|
7604
|
null,
|
8466
|
null,
|
7605
|
false,
|
8467
|
false,
|
|
@@ -7610,8 +8472,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7610,8 +8472,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7610
|
this.editorUi.menus.edgeStyleChange(
|
8472
|
this.editorUi.menus.edgeStyleChange(
|
7611
|
menu,
|
8473
|
menu,
|
7612
|
"",
|
8474
|
"",
|
7613
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7614
|
- [ "openAsync", 0 ],
|
8475
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8476
|
+ ["openAsync", 0],
|
7615
|
null,
|
8477
|
null,
|
7616
|
null,
|
8478
|
null,
|
7617
|
false,
|
8479
|
false,
|
|
@@ -7622,8 +8484,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7622,8 +8484,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7622
|
this.editorUi.menus.edgeStyleChange(
|
8484
|
this.editorUi.menus.edgeStyleChange(
|
7623
|
menu,
|
8485
|
menu,
|
7624
|
"",
|
8486
|
"",
|
7625
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7626
|
- [ mxConstants.ARROW_BLOCK, 1 ],
|
8487
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8488
|
+ [mxConstants.ARROW_BLOCK, 1],
|
7627
|
null,
|
8489
|
null,
|
7628
|
null,
|
8490
|
null,
|
7629
|
false,
|
8491
|
false,
|
|
@@ -7634,8 +8496,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7634,8 +8496,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7634
|
this.editorUi.menus.edgeStyleChange(
|
8496
|
this.editorUi.menus.edgeStyleChange(
|
7635
|
menu,
|
8497
|
menu,
|
7636
|
"",
|
8498
|
"",
|
7637
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7638
|
- [ mxConstants.ARROW_BLOCK_THIN, 1 ],
|
8499
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8500
|
+ [mxConstants.ARROW_BLOCK_THIN, 1],
|
7639
|
null,
|
8501
|
null,
|
7640
|
null,
|
8502
|
null,
|
7641
|
false,
|
8503
|
false,
|
|
@@ -7646,8 +8508,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7646,8 +8508,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7646
|
this.editorUi.menus.edgeStyleChange(
|
8508
|
this.editorUi.menus.edgeStyleChange(
|
7647
|
menu,
|
8509
|
menu,
|
7648
|
"",
|
8510
|
"",
|
7649
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7650
|
- [ "async", 1 ],
|
8511
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8512
|
+ ["async", 1],
|
7651
|
null,
|
8513
|
null,
|
7652
|
null,
|
8514
|
null,
|
7653
|
false,
|
8515
|
false,
|
|
@@ -7658,8 +8520,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7658,8 +8520,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7658
|
this.editorUi.menus.edgeStyleChange(
|
8520
|
this.editorUi.menus.edgeStyleChange(
|
7659
|
menu,
|
8521
|
menu,
|
7660
|
"",
|
8522
|
"",
|
7661
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7662
|
- [ mxConstants.ARROW_OVAL, 1 ],
|
8523
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8524
|
+ [mxConstants.ARROW_OVAL, 1],
|
7663
|
null,
|
8525
|
null,
|
7664
|
null,
|
8526
|
null,
|
7665
|
false,
|
8527
|
false,
|
|
@@ -7670,8 +8532,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7670,8 +8532,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7670
|
this.editorUi.menus.edgeStyleChange(
|
8532
|
this.editorUi.menus.edgeStyleChange(
|
7671
|
menu,
|
8533
|
menu,
|
7672
|
"",
|
8534
|
"",
|
7673
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7674
|
- [ mxConstants.ARROW_DIAMOND, 1 ],
|
8535
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8536
|
+ [mxConstants.ARROW_DIAMOND, 1],
|
7675
|
null,
|
8537
|
null,
|
7676
|
null,
|
8538
|
null,
|
7677
|
false,
|
8539
|
false,
|
|
@@ -7682,8 +8544,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7682,8 +8544,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7682
|
this.editorUi.menus.edgeStyleChange(
|
8544
|
this.editorUi.menus.edgeStyleChange(
|
7683
|
menu,
|
8545
|
menu,
|
7684
|
"",
|
8546
|
"",
|
7685
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7686
|
- [ mxConstants.ARROW_DIAMOND_THIN, 1 ],
|
8547
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8548
|
+ [mxConstants.ARROW_DIAMOND_THIN, 1],
|
7687
|
null,
|
8549
|
null,
|
7688
|
null,
|
8550
|
null,
|
7689
|
false,
|
8551
|
false,
|
|
@@ -7694,8 +8556,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7694,8 +8556,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7694
|
this.editorUi.menus.edgeStyleChange(
|
8556
|
this.editorUi.menus.edgeStyleChange(
|
7695
|
menu,
|
8557
|
menu,
|
7696
|
"",
|
8558
|
"",
|
7697
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7698
|
- [ mxConstants.ARROW_CLASSIC, 0 ],
|
8559
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8560
|
+ [mxConstants.ARROW_CLASSIC, 0],
|
7699
|
null,
|
8561
|
null,
|
7700
|
null,
|
8562
|
null,
|
7701
|
false,
|
8563
|
false,
|
|
@@ -7706,8 +8568,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7706,8 +8568,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7706
|
this.editorUi.menus.edgeStyleChange(
|
8568
|
this.editorUi.menus.edgeStyleChange(
|
7707
|
menu,
|
8569
|
menu,
|
7708
|
"",
|
8570
|
"",
|
7709
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7710
|
- [ mxConstants.ARROW_CLASSIC_THIN, 0 ],
|
8571
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8572
|
+ [mxConstants.ARROW_CLASSIC_THIN, 0],
|
7711
|
null,
|
8573
|
null,
|
7712
|
null,
|
8574
|
null,
|
7713
|
false,
|
8575
|
false,
|
|
@@ -7718,8 +8580,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7718,8 +8580,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7718
|
this.editorUi.menus.edgeStyleChange(
|
8580
|
this.editorUi.menus.edgeStyleChange(
|
7719
|
menu,
|
8581
|
menu,
|
7720
|
"",
|
8582
|
"",
|
7721
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7722
|
- [ mxConstants.ARROW_BLOCK, 0 ],
|
8583
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8584
|
+ [mxConstants.ARROW_BLOCK, 0],
|
7723
|
null,
|
8585
|
null,
|
7724
|
null,
|
8586
|
null,
|
7725
|
false,
|
8587
|
false,
|
|
@@ -7730,8 +8592,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7730,8 +8592,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7730
|
this.editorUi.menus.edgeStyleChange(
|
8592
|
this.editorUi.menus.edgeStyleChange(
|
7731
|
menu,
|
8593
|
menu,
|
7732
|
"",
|
8594
|
"",
|
7733
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7734
|
- [ mxConstants.ARROW_BLOCK_THIN, 0 ],
|
8595
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8596
|
+ [mxConstants.ARROW_BLOCK_THIN, 0],
|
7735
|
null,
|
8597
|
null,
|
7736
|
null,
|
8598
|
null,
|
7737
|
false,
|
8599
|
false,
|
|
@@ -7742,8 +8604,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7742,8 +8604,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7742
|
this.editorUi.menus.edgeStyleChange(
|
8604
|
this.editorUi.menus.edgeStyleChange(
|
7743
|
menu,
|
8605
|
menu,
|
7744
|
"",
|
8606
|
"",
|
7745
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7746
|
- [ "async", 0 ],
|
8607
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8608
|
+ ["async", 0],
|
7747
|
null,
|
8609
|
null,
|
7748
|
null,
|
8610
|
null,
|
7749
|
false,
|
8611
|
false,
|
|
@@ -7754,8 +8616,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7754,8 +8616,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7754
|
this.editorUi.menus.edgeStyleChange(
|
8616
|
this.editorUi.menus.edgeStyleChange(
|
7755
|
menu,
|
8617
|
menu,
|
7756
|
"",
|
8618
|
"",
|
7757
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7758
|
- [ mxConstants.ARROW_OVAL, 0 ],
|
8619
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8620
|
+ [mxConstants.ARROW_OVAL, 0],
|
7759
|
null,
|
8621
|
null,
|
7760
|
null,
|
8622
|
null,
|
7761
|
false,
|
8623
|
false,
|
|
@@ -7766,8 +8628,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7766,8 +8628,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7766
|
this.editorUi.menus.edgeStyleChange(
|
8628
|
this.editorUi.menus.edgeStyleChange(
|
7767
|
menu,
|
8629
|
menu,
|
7768
|
"",
|
8630
|
"",
|
7769
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7770
|
- [ mxConstants.ARROW_DIAMOND, 0 ],
|
8631
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8632
|
+ [mxConstants.ARROW_DIAMOND, 0],
|
7771
|
null,
|
8633
|
null,
|
7772
|
null,
|
8634
|
null,
|
7773
|
false,
|
8635
|
false,
|
|
@@ -7778,8 +8640,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7778,8 +8640,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7778
|
this.editorUi.menus.edgeStyleChange(
|
8640
|
this.editorUi.menus.edgeStyleChange(
|
7779
|
menu,
|
8641
|
menu,
|
7780
|
"",
|
8642
|
"",
|
7781
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7782
|
- [ mxConstants.ARROW_DIAMOND_THIN, 0 ],
|
8643
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8644
|
+ [mxConstants.ARROW_DIAMOND_THIN, 0],
|
7783
|
null,
|
8645
|
null,
|
7784
|
null,
|
8646
|
null,
|
7785
|
false,
|
8647
|
false,
|
|
@@ -7790,8 +8652,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7790,8 +8652,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7790
|
this.editorUi.menus.edgeStyleChange(
|
8652
|
this.editorUi.menus.edgeStyleChange(
|
7791
|
menu,
|
8653
|
menu,
|
7792
|
"",
|
8654
|
"",
|
7793
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7794
|
- [ "box", 0 ],
|
8655
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8656
|
+ ["box", 0],
|
7795
|
null,
|
8657
|
null,
|
7796
|
null,
|
8658
|
null,
|
7797
|
false,
|
8659
|
false,
|
|
@@ -7802,8 +8664,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7802,8 +8664,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7802
|
this.editorUi.menus.edgeStyleChange(
|
8664
|
this.editorUi.menus.edgeStyleChange(
|
7803
|
menu,
|
8665
|
menu,
|
7804
|
"",
|
8666
|
"",
|
7805
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7806
|
- [ "halfCircle", 0 ],
|
8667
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8668
|
+ ["halfCircle", 0],
|
7807
|
null,
|
8669
|
null,
|
7808
|
null,
|
8670
|
null,
|
7809
|
false,
|
8671
|
false,
|
|
@@ -7814,8 +8676,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7814,8 +8676,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7814
|
this.editorUi.menus.edgeStyleChange(
|
8676
|
this.editorUi.menus.edgeStyleChange(
|
7815
|
menu,
|
8677
|
menu,
|
7816
|
"",
|
8678
|
"",
|
7817
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7818
|
- [ "dash", 0 ],
|
8679
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8680
|
+ ["dash", 0],
|
7819
|
null,
|
8681
|
null,
|
7820
|
null,
|
8682
|
null,
|
7821
|
false,
|
8683
|
false,
|
|
@@ -7826,8 +8688,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7826,8 +8688,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7826
|
this.editorUi.menus.edgeStyleChange(
|
8688
|
this.editorUi.menus.edgeStyleChange(
|
7827
|
menu,
|
8689
|
menu,
|
7828
|
"",
|
8690
|
"",
|
7829
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7830
|
- [ "cross", 0 ],
|
8691
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8692
|
+ ["cross", 0],
|
7831
|
null,
|
8693
|
null,
|
7832
|
null,
|
8694
|
null,
|
7833
|
false,
|
8695
|
false,
|
|
@@ -7838,8 +8700,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7838,8 +8700,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7838
|
this.editorUi.menus.edgeStyleChange(
|
8700
|
this.editorUi.menus.edgeStyleChange(
|
7839
|
menu,
|
8701
|
menu,
|
7840
|
"",
|
8702
|
"",
|
7841
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7842
|
- [ "circlePlus", 0 ],
|
8703
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8704
|
+ ["circlePlus", 0],
|
7843
|
null,
|
8705
|
null,
|
7844
|
null,
|
8706
|
null,
|
7845
|
false,
|
8707
|
false,
|
|
@@ -7850,8 +8712,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7850,8 +8712,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7850
|
this.editorUi.menus.edgeStyleChange(
|
8712
|
this.editorUi.menus.edgeStyleChange(
|
7851
|
menu,
|
8713
|
menu,
|
7852
|
"",
|
8714
|
"",
|
7853
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7854
|
- [ "circle", 1 ],
|
8715
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8716
|
+ ["circle", 1],
|
7855
|
null,
|
8717
|
null,
|
7856
|
null,
|
8718
|
null,
|
7857
|
false,
|
8719
|
false,
|
|
@@ -7862,8 +8724,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7862,8 +8724,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7862
|
this.editorUi.menus.edgeStyleChange(
|
8724
|
this.editorUi.menus.edgeStyleChange(
|
7863
|
menu,
|
8725
|
menu,
|
7864
|
"",
|
8726
|
"",
|
7865
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7866
|
- [ "baseDash", 0 ],
|
8727
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8728
|
+ ["baseDash", 0],
|
7867
|
null,
|
8729
|
null,
|
7868
|
null,
|
8730
|
null,
|
7869
|
false,
|
8731
|
false,
|
|
@@ -7874,8 +8736,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7874,8 +8736,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7874
|
this.editorUi.menus.edgeStyleChange(
|
8736
|
this.editorUi.menus.edgeStyleChange(
|
7875
|
menu,
|
8737
|
menu,
|
7876
|
"",
|
8738
|
"",
|
7877
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7878
|
- [ "ERone", 0 ],
|
8739
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8740
|
+ ["ERone", 0],
|
7879
|
null,
|
8741
|
null,
|
7880
|
null,
|
8742
|
null,
|
7881
|
false,
|
8743
|
false,
|
|
@@ -7886,8 +8748,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7886,8 +8748,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7886
|
this.editorUi.menus.edgeStyleChange(
|
8748
|
this.editorUi.menus.edgeStyleChange(
|
7887
|
menu,
|
8749
|
menu,
|
7888
|
"",
|
8750
|
"",
|
7889
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7890
|
- [ "ERmandOne", 0 ],
|
8751
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8752
|
+ ["ERmandOne", 0],
|
7891
|
null,
|
8753
|
null,
|
7892
|
null,
|
8754
|
null,
|
7893
|
false,
|
8755
|
false,
|
|
@@ -7898,8 +8760,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7898,8 +8760,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7898
|
this.editorUi.menus.edgeStyleChange(
|
8760
|
this.editorUi.menus.edgeStyleChange(
|
7899
|
menu,
|
8761
|
menu,
|
7900
|
"",
|
8762
|
"",
|
7901
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7902
|
- [ "ERmany", 0 ],
|
8763
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8764
|
+ ["ERmany", 0],
|
7903
|
null,
|
8765
|
null,
|
7904
|
null,
|
8766
|
null,
|
7905
|
false,
|
8767
|
false,
|
|
@@ -7910,8 +8772,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7910,8 +8772,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7910
|
this.editorUi.menus.edgeStyleChange(
|
8772
|
this.editorUi.menus.edgeStyleChange(
|
7911
|
menu,
|
8773
|
menu,
|
7912
|
"",
|
8774
|
"",
|
7913
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7914
|
- [ "ERoneToMany", 0 ],
|
8775
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8776
|
+ ["ERoneToMany", 0],
|
7915
|
null,
|
8777
|
null,
|
7916
|
null,
|
8778
|
null,
|
7917
|
false,
|
8779
|
false,
|
|
@@ -7922,8 +8784,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7922,8 +8784,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7922
|
this.editorUi.menus.edgeStyleChange(
|
8784
|
this.editorUi.menus.edgeStyleChange(
|
7923
|
menu,
|
8785
|
menu,
|
7924
|
"",
|
8786
|
"",
|
7925
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7926
|
- [ "ERzeroToOne", 0 ],
|
8787
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8788
|
+ ["ERzeroToOne", 0],
|
7927
|
null,
|
8789
|
null,
|
7928
|
null,
|
8790
|
null,
|
7929
|
false,
|
8791
|
false,
|
|
@@ -7934,8 +8796,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7934,8 +8796,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7934
|
this.editorUi.menus.edgeStyleChange(
|
8796
|
this.editorUi.menus.edgeStyleChange(
|
7935
|
menu,
|
8797
|
menu,
|
7936
|
"",
|
8798
|
"",
|
7937
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7938
|
- [ "ERzeroToMany", 0 ],
|
8799
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8800
|
+ ["ERzeroToMany", 0],
|
7939
|
null,
|
8801
|
null,
|
7940
|
null,
|
8802
|
null,
|
7941
|
false,
|
8803
|
false,
|
|
@@ -7946,8 +8808,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7946,8 +8808,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7946
|
this.editorUi.menus.edgeStyleChange(
|
8808
|
this.editorUi.menus.edgeStyleChange(
|
7947
|
menu,
|
8809
|
menu,
|
7948
|
"",
|
8810
|
"",
|
7949
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7950
|
- [ "doubleBlock", 0 ],
|
8811
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8812
|
+ ["doubleBlock", 0],
|
7951
|
null,
|
8813
|
null,
|
7952
|
null,
|
8814
|
null,
|
7953
|
false,
|
8815
|
false,
|
|
@@ -7958,8 +8820,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7958,8 +8820,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7958
|
this.editorUi.menus.edgeStyleChange(
|
8820
|
this.editorUi.menus.edgeStyleChange(
|
7959
|
menu,
|
8821
|
menu,
|
7960
|
"",
|
8822
|
"",
|
7961
|
- [ mxConstants.STYLE_STARTARROW, "startFill" ],
|
|
|
7962
|
- [ "doubleBlock", 1 ],
|
8823
|
+ [mxConstants.STYLE_STARTARROW, "startFill"],
|
|
|
8824
|
+ ["doubleBlock", 1],
|
7963
|
null,
|
8825
|
null,
|
7964
|
null,
|
8826
|
null,
|
7965
|
false,
|
8827
|
false,
|
|
@@ -7971,8 +8833,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -7971,8 +8833,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
7971
|
.edgeStyleChange(
|
8833
|
.edgeStyleChange(
|
7972
|
menu,
|
8834
|
menu,
|
7973
|
"",
|
8835
|
"",
|
7974
|
- [ mxConstants.STYLE_STARTARROW ],
|
|
|
7975
|
- [ mxConstants.ARROW_BLOCK ],
|
8836
|
+ [mxConstants.STYLE_STARTARROW],
|
|
|
8837
|
+ [mxConstants.ARROW_BLOCK],
|
7976
|
"geIcon geSprite geSprite-startblocktrans",
|
8838
|
"geIcon geSprite geSprite-startblocktrans",
|
7977
|
null,
|
8839
|
null,
|
7978
|
false,
|
8840
|
false,
|
|
@@ -8008,8 +8870,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8008,8 +8870,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8008
|
var item = this.editorUi.menus.edgeStyleChange(
|
8870
|
var item = this.editorUi.menus.edgeStyleChange(
|
8009
|
menu,
|
8871
|
menu,
|
8010
|
"",
|
8872
|
"",
|
8011
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8012
|
- [ mxConstants.NONE, 0 ],
|
8873
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8874
|
+ [mxConstants.NONE, 0],
|
8013
|
"geIcon",
|
8875
|
"geIcon",
|
8014
|
null,
|
8876
|
null,
|
8015
|
false,
|
8877
|
false,
|
|
@@ -8026,8 +8888,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8026,8 +8888,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8026
|
this.editorUi.menus.edgeStyleChange(
|
8888
|
this.editorUi.menus.edgeStyleChange(
|
8027
|
menu,
|
8889
|
menu,
|
8028
|
"",
|
8890
|
"",
|
8029
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8030
|
- [ mxConstants.ARROW_CLASSIC, 1 ],
|
8891
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8892
|
+ [mxConstants.ARROW_CLASSIC, 1],
|
8031
|
null,
|
8893
|
null,
|
8032
|
null,
|
8894
|
null,
|
8033
|
false,
|
8895
|
false,
|
|
@@ -8039,8 +8901,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8039,8 +8901,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8039
|
this.editorUi.menus.edgeStyleChange(
|
8901
|
this.editorUi.menus.edgeStyleChange(
|
8040
|
menu,
|
8902
|
menu,
|
8041
|
"",
|
8903
|
"",
|
8042
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8043
|
- [ mxConstants.ARROW_CLASSIC_THIN, 1 ],
|
8904
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8905
|
+ [mxConstants.ARROW_CLASSIC_THIN, 1],
|
8044
|
null,
|
8906
|
null,
|
8045
|
null,
|
8907
|
null,
|
8046
|
false,
|
8908
|
false,
|
|
@@ -8052,8 +8914,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8052,8 +8914,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8052
|
this.editorUi.menus.edgeStyleChange(
|
8914
|
this.editorUi.menus.edgeStyleChange(
|
8053
|
menu,
|
8915
|
menu,
|
8054
|
"",
|
8916
|
"",
|
8055
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8056
|
- [ mxConstants.ARROW_OPEN, 0 ],
|
8917
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8918
|
+ [mxConstants.ARROW_OPEN, 0],
|
8057
|
null,
|
8919
|
null,
|
8058
|
null,
|
8920
|
null,
|
8059
|
false,
|
8921
|
false,
|
|
@@ -8065,8 +8927,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8065,8 +8927,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8065
|
this.editorUi.menus.edgeStyleChange(
|
8927
|
this.editorUi.menus.edgeStyleChange(
|
8066
|
menu,
|
8928
|
menu,
|
8067
|
"",
|
8929
|
"",
|
8068
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8069
|
- [ mxConstants.ARROW_OPEN_THIN, 0 ],
|
8930
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8931
|
+ [mxConstants.ARROW_OPEN_THIN, 0],
|
8070
|
null,
|
8932
|
null,
|
8071
|
null,
|
8933
|
null,
|
8072
|
false,
|
8934
|
false,
|
|
@@ -8078,8 +8940,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8078,8 +8940,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8078
|
this.editorUi.menus.edgeStyleChange(
|
8940
|
this.editorUi.menus.edgeStyleChange(
|
8079
|
menu,
|
8941
|
menu,
|
8080
|
"",
|
8942
|
"",
|
8081
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8082
|
- [ "openAsync", 0 ],
|
8943
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8944
|
+ ["openAsync", 0],
|
8083
|
null,
|
8945
|
null,
|
8084
|
null,
|
8946
|
null,
|
8085
|
false,
|
8947
|
false,
|
|
@@ -8091,8 +8953,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8091,8 +8953,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8091
|
this.editorUi.menus.edgeStyleChange(
|
8953
|
this.editorUi.menus.edgeStyleChange(
|
8092
|
menu,
|
8954
|
menu,
|
8093
|
"",
|
8955
|
"",
|
8094
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8095
|
- [ mxConstants.ARROW_BLOCK, 1 ],
|
8956
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8957
|
+ [mxConstants.ARROW_BLOCK, 1],
|
8096
|
null,
|
8958
|
null,
|
8097
|
null,
|
8959
|
null,
|
8098
|
false,
|
8960
|
false,
|
|
@@ -8104,8 +8966,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8104,8 +8966,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8104
|
this.editorUi.menus.edgeStyleChange(
|
8966
|
this.editorUi.menus.edgeStyleChange(
|
8105
|
menu,
|
8967
|
menu,
|
8106
|
"",
|
8968
|
"",
|
8107
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8108
|
- [ mxConstants.ARROW_BLOCK_THIN, 1 ],
|
8969
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8970
|
+ [mxConstants.ARROW_BLOCK_THIN, 1],
|
8109
|
null,
|
8971
|
null,
|
8110
|
null,
|
8972
|
null,
|
8111
|
false,
|
8973
|
false,
|
|
@@ -8117,8 +8979,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8117,8 +8979,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8117
|
this.editorUi.menus.edgeStyleChange(
|
8979
|
this.editorUi.menus.edgeStyleChange(
|
8118
|
menu,
|
8980
|
menu,
|
8119
|
"",
|
8981
|
"",
|
8120
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8121
|
- [ "async", 1 ],
|
8982
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8983
|
+ ["async", 1],
|
8122
|
null,
|
8984
|
null,
|
8123
|
null,
|
8985
|
null,
|
8124
|
false,
|
8986
|
false,
|
|
@@ -8130,8 +8992,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8130,8 +8992,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8130
|
this.editorUi.menus.edgeStyleChange(
|
8992
|
this.editorUi.menus.edgeStyleChange(
|
8131
|
menu,
|
8993
|
menu,
|
8132
|
"",
|
8994
|
"",
|
8133
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8134
|
- [ mxConstants.ARROW_OVAL, 1 ],
|
8995
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
8996
|
+ [mxConstants.ARROW_OVAL, 1],
|
8135
|
null,
|
8997
|
null,
|
8136
|
null,
|
8998
|
null,
|
8137
|
false,
|
8999
|
false,
|
|
@@ -8143,8 +9005,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8143,8 +9005,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8143
|
this.editorUi.menus.edgeStyleChange(
|
9005
|
this.editorUi.menus.edgeStyleChange(
|
8144
|
menu,
|
9006
|
menu,
|
8145
|
"",
|
9007
|
"",
|
8146
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8147
|
- [ mxConstants.ARROW_DIAMOND, 1 ],
|
9008
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9009
|
+ [mxConstants.ARROW_DIAMOND, 1],
|
8148
|
null,
|
9010
|
null,
|
8149
|
null,
|
9011
|
null,
|
8150
|
false,
|
9012
|
false,
|
|
@@ -8156,8 +9018,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8156,8 +9018,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8156
|
this.editorUi.menus.edgeStyleChange(
|
9018
|
this.editorUi.menus.edgeStyleChange(
|
8157
|
menu,
|
9019
|
menu,
|
8158
|
"",
|
9020
|
"",
|
8159
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8160
|
- [ mxConstants.ARROW_DIAMOND_THIN, 1 ],
|
9021
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9022
|
+ [mxConstants.ARROW_DIAMOND_THIN, 1],
|
8161
|
null,
|
9023
|
null,
|
8162
|
null,
|
9024
|
null,
|
8163
|
false,
|
9025
|
false,
|
|
@@ -8169,8 +9031,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8169,8 +9031,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8169
|
this.editorUi.menus.edgeStyleChange(
|
9031
|
this.editorUi.menus.edgeStyleChange(
|
8170
|
menu,
|
9032
|
menu,
|
8171
|
"",
|
9033
|
"",
|
8172
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8173
|
- [ mxConstants.ARROW_CLASSIC, 0 ],
|
9034
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9035
|
+ [mxConstants.ARROW_CLASSIC, 0],
|
8174
|
null,
|
9036
|
null,
|
8175
|
null,
|
9037
|
null,
|
8176
|
false,
|
9038
|
false,
|
|
@@ -8182,8 +9044,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8182,8 +9044,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8182
|
this.editorUi.menus.edgeStyleChange(
|
9044
|
this.editorUi.menus.edgeStyleChange(
|
8183
|
menu,
|
9045
|
menu,
|
8184
|
"",
|
9046
|
"",
|
8185
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8186
|
- [ mxConstants.ARROW_CLASSIC_THIN, 0 ],
|
9047
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9048
|
+ [mxConstants.ARROW_CLASSIC_THIN, 0],
|
8187
|
null,
|
9049
|
null,
|
8188
|
null,
|
9050
|
null,
|
8189
|
false,
|
9051
|
false,
|
|
@@ -8195,8 +9057,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8195,8 +9057,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8195
|
this.editorUi.menus.edgeStyleChange(
|
9057
|
this.editorUi.menus.edgeStyleChange(
|
8196
|
menu,
|
9058
|
menu,
|
8197
|
"",
|
9059
|
"",
|
8198
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8199
|
- [ mxConstants.ARROW_BLOCK, 0 ],
|
9060
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9061
|
+ [mxConstants.ARROW_BLOCK, 0],
|
8200
|
null,
|
9062
|
null,
|
8201
|
null,
|
9063
|
null,
|
8202
|
false,
|
9064
|
false,
|
|
@@ -8208,8 +9070,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8208,8 +9070,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8208
|
this.editorUi.menus.edgeStyleChange(
|
9070
|
this.editorUi.menus.edgeStyleChange(
|
8209
|
menu,
|
9071
|
menu,
|
8210
|
"",
|
9072
|
"",
|
8211
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8212
|
- [ mxConstants.ARROW_BLOCK_THIN, 0 ],
|
9073
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9074
|
+ [mxConstants.ARROW_BLOCK_THIN, 0],
|
8213
|
null,
|
9075
|
null,
|
8214
|
null,
|
9076
|
null,
|
8215
|
false,
|
9077
|
false,
|
|
@@ -8221,8 +9083,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8221,8 +9083,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8221
|
this.editorUi.menus.edgeStyleChange(
|
9083
|
this.editorUi.menus.edgeStyleChange(
|
8222
|
menu,
|
9084
|
menu,
|
8223
|
"",
|
9085
|
"",
|
8224
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8225
|
- [ "async", 0 ],
|
9086
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9087
|
+ ["async", 0],
|
8226
|
null,
|
9088
|
null,
|
8227
|
null,
|
9089
|
null,
|
8228
|
false,
|
9090
|
false,
|
|
@@ -8234,8 +9096,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8234,8 +9096,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8234
|
this.editorUi.menus.edgeStyleChange(
|
9096
|
this.editorUi.menus.edgeStyleChange(
|
8235
|
menu,
|
9097
|
menu,
|
8236
|
"",
|
9098
|
"",
|
8237
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8238
|
- [ mxConstants.ARROW_OVAL, 0 ],
|
9099
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9100
|
+ [mxConstants.ARROW_OVAL, 0],
|
8239
|
null,
|
9101
|
null,
|
8240
|
null,
|
9102
|
null,
|
8241
|
false,
|
9103
|
false,
|
|
@@ -8247,8 +9109,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8247,8 +9109,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8247
|
this.editorUi.menus.edgeStyleChange(
|
9109
|
this.editorUi.menus.edgeStyleChange(
|
8248
|
menu,
|
9110
|
menu,
|
8249
|
"",
|
9111
|
"",
|
8250
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8251
|
- [ mxConstants.ARROW_DIAMOND, 0 ],
|
9112
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9113
|
+ [mxConstants.ARROW_DIAMOND, 0],
|
8252
|
null,
|
9114
|
null,
|
8253
|
null,
|
9115
|
null,
|
8254
|
false,
|
9116
|
false,
|
|
@@ -8260,8 +9122,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8260,8 +9122,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8260
|
this.editorUi.menus.edgeStyleChange(
|
9122
|
this.editorUi.menus.edgeStyleChange(
|
8261
|
menu,
|
9123
|
menu,
|
8262
|
"",
|
9124
|
"",
|
8263
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8264
|
- [ mxConstants.ARROW_DIAMOND_THIN, 0 ],
|
9125
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9126
|
+ [mxConstants.ARROW_DIAMOND_THIN, 0],
|
8265
|
null,
|
9127
|
null,
|
8266
|
null,
|
9128
|
null,
|
8267
|
false,
|
9129
|
false,
|
|
@@ -8273,8 +9135,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8273,8 +9135,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8273
|
this.editorUi.menus.edgeStyleChange(
|
9135
|
this.editorUi.menus.edgeStyleChange(
|
8274
|
menu,
|
9136
|
menu,
|
8275
|
"",
|
9137
|
"",
|
8276
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8277
|
- [ "box", 0 ],
|
9138
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9139
|
+ ["box", 0],
|
8278
|
null,
|
9140
|
null,
|
8279
|
null,
|
9141
|
null,
|
8280
|
false,
|
9142
|
false,
|
|
@@ -8286,8 +9148,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8286,8 +9148,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8286
|
this.editorUi.menus.edgeStyleChange(
|
9148
|
this.editorUi.menus.edgeStyleChange(
|
8287
|
menu,
|
9149
|
menu,
|
8288
|
"",
|
9150
|
"",
|
8289
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8290
|
- [ "halfCircle", 0 ],
|
9151
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9152
|
+ ["halfCircle", 0],
|
8291
|
null,
|
9153
|
null,
|
8292
|
null,
|
9154
|
null,
|
8293
|
false,
|
9155
|
false,
|
|
@@ -8299,8 +9161,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8299,8 +9161,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8299
|
this.editorUi.menus.edgeStyleChange(
|
9161
|
this.editorUi.menus.edgeStyleChange(
|
8300
|
menu,
|
9162
|
menu,
|
8301
|
"",
|
9163
|
"",
|
8302
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8303
|
- [ "dash", 0 ],
|
9164
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9165
|
+ ["dash", 0],
|
8304
|
null,
|
9166
|
null,
|
8305
|
null,
|
9167
|
null,
|
8306
|
false,
|
9168
|
false,
|
|
@@ -8312,8 +9174,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8312,8 +9174,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8312
|
this.editorUi.menus.edgeStyleChange(
|
9174
|
this.editorUi.menus.edgeStyleChange(
|
8313
|
menu,
|
9175
|
menu,
|
8314
|
"",
|
9176
|
"",
|
8315
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8316
|
- [ "cross", 0 ],
|
9177
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9178
|
+ ["cross", 0],
|
8317
|
null,
|
9179
|
null,
|
8318
|
null,
|
9180
|
null,
|
8319
|
false,
|
9181
|
false,
|
|
@@ -8325,8 +9187,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8325,8 +9187,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8325
|
this.editorUi.menus.edgeStyleChange(
|
9187
|
this.editorUi.menus.edgeStyleChange(
|
8326
|
menu,
|
9188
|
menu,
|
8327
|
"",
|
9189
|
"",
|
8328
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8329
|
- [ "circlePlus", 0 ],
|
9190
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9191
|
+ ["circlePlus", 0],
|
8330
|
null,
|
9192
|
null,
|
8331
|
null,
|
9193
|
null,
|
8332
|
false,
|
9194
|
false,
|
|
@@ -8338,8 +9200,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8338,8 +9200,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8338
|
this.editorUi.menus.edgeStyleChange(
|
9200
|
this.editorUi.menus.edgeStyleChange(
|
8339
|
menu,
|
9201
|
menu,
|
8340
|
"",
|
9202
|
"",
|
8341
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8342
|
- [ "circle", 0 ],
|
9203
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9204
|
+ ["circle", 0],
|
8343
|
null,
|
9205
|
null,
|
8344
|
null,
|
9206
|
null,
|
8345
|
false,
|
9207
|
false,
|
|
@@ -8351,8 +9213,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8351,8 +9213,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8351
|
this.editorUi.menus.edgeStyleChange(
|
9213
|
this.editorUi.menus.edgeStyleChange(
|
8352
|
menu,
|
9214
|
menu,
|
8353
|
"",
|
9215
|
"",
|
8354
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8355
|
- [ "baseDash", 0 ],
|
9216
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9217
|
+ ["baseDash", 0],
|
8356
|
null,
|
9218
|
null,
|
8357
|
null,
|
9219
|
null,
|
8358
|
false,
|
9220
|
false,
|
|
@@ -8364,8 +9226,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8364,8 +9226,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8364
|
this.editorUi.menus.edgeStyleChange(
|
9226
|
this.editorUi.menus.edgeStyleChange(
|
8365
|
menu,
|
9227
|
menu,
|
8366
|
"",
|
9228
|
"",
|
8367
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8368
|
- [ "ERone", 0 ],
|
9229
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9230
|
+ ["ERone", 0],
|
8369
|
null,
|
9231
|
null,
|
8370
|
null,
|
9232
|
null,
|
8371
|
false,
|
9233
|
false,
|
|
@@ -8377,8 +9239,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8377,8 +9239,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8377
|
this.editorUi.menus.edgeStyleChange(
|
9239
|
this.editorUi.menus.edgeStyleChange(
|
8378
|
menu,
|
9240
|
menu,
|
8379
|
"",
|
9241
|
"",
|
8380
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8381
|
- [ "ERmandOne", 0 ],
|
9242
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9243
|
+ ["ERmandOne", 0],
|
8382
|
null,
|
9244
|
null,
|
8383
|
null,
|
9245
|
null,
|
8384
|
false,
|
9246
|
false,
|
|
@@ -8390,8 +9252,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8390,8 +9252,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8390
|
this.editorUi.menus.edgeStyleChange(
|
9252
|
this.editorUi.menus.edgeStyleChange(
|
8391
|
menu,
|
9253
|
menu,
|
8392
|
"",
|
9254
|
"",
|
8393
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8394
|
- [ "ERmany", 0 ],
|
9255
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9256
|
+ ["ERmany", 0],
|
8395
|
null,
|
9257
|
null,
|
8396
|
null,
|
9258
|
null,
|
8397
|
false,
|
9259
|
false,
|
|
@@ -8403,8 +9265,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8403,8 +9265,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8403
|
this.editorUi.menus.edgeStyleChange(
|
9265
|
this.editorUi.menus.edgeStyleChange(
|
8404
|
menu,
|
9266
|
menu,
|
8405
|
"",
|
9267
|
"",
|
8406
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8407
|
- [ "ERoneToMany", 0 ],
|
9268
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9269
|
+ ["ERoneToMany", 0],
|
8408
|
null,
|
9270
|
null,
|
8409
|
null,
|
9271
|
null,
|
8410
|
false,
|
9272
|
false,
|
|
@@ -8416,8 +9278,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8416,8 +9278,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8416
|
this.editorUi.menus.edgeStyleChange(
|
9278
|
this.editorUi.menus.edgeStyleChange(
|
8417
|
menu,
|
9279
|
menu,
|
8418
|
"",
|
9280
|
"",
|
8419
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8420
|
- [ "ERzeroToOne", 0 ],
|
9281
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9282
|
+ ["ERzeroToOne", 0],
|
8421
|
null,
|
9283
|
null,
|
8422
|
null,
|
9284
|
null,
|
8423
|
false,
|
9285
|
false,
|
|
@@ -8429,8 +9291,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8429,8 +9291,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8429
|
this.editorUi.menus.edgeStyleChange(
|
9291
|
this.editorUi.menus.edgeStyleChange(
|
8430
|
menu,
|
9292
|
menu,
|
8431
|
"",
|
9293
|
"",
|
8432
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8433
|
- [ "ERzeroToMany", 0 ],
|
9294
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9295
|
+ ["ERzeroToMany", 0],
|
8434
|
null,
|
9296
|
null,
|
8435
|
null,
|
9297
|
null,
|
8436
|
false,
|
9298
|
false,
|
|
@@ -8442,8 +9304,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8442,8 +9304,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8442
|
this.editorUi.menus.edgeStyleChange(
|
9304
|
this.editorUi.menus.edgeStyleChange(
|
8443
|
menu,
|
9305
|
menu,
|
8444
|
"",
|
9306
|
"",
|
8445
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8446
|
- [ "doubleBlock", 0 ],
|
9307
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9308
|
+ ["doubleBlock", 0],
|
8447
|
null,
|
9309
|
null,
|
8448
|
null,
|
9310
|
null,
|
8449
|
false,
|
9311
|
false,
|
|
@@ -8455,8 +9317,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8455,8 +9317,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8455
|
this.editorUi.menus.edgeStyleChange(
|
9317
|
this.editorUi.menus.edgeStyleChange(
|
8456
|
menu,
|
9318
|
menu,
|
8457
|
"",
|
9319
|
"",
|
8458
|
- [ mxConstants.STYLE_ENDARROW, "endFill" ],
|
|
|
8459
|
- [ "doubleBlock", 1 ],
|
9320
|
+ [mxConstants.STYLE_ENDARROW, "endFill"],
|
|
|
9321
|
+ ["doubleBlock", 1],
|
8460
|
null,
|
9322
|
null,
|
8461
|
null,
|
9323
|
null,
|
8462
|
false,
|
9324
|
false,
|
|
@@ -8469,8 +9331,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8469,8 +9331,8 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8469
|
.edgeStyleChange(
|
9331
|
.edgeStyleChange(
|
8470
|
menu,
|
9332
|
menu,
|
8471
|
"",
|
9333
|
"",
|
8472
|
- [ mxConstants.STYLE_ENDARROW ],
|
|
|
8473
|
- [ mxConstants.ARROW_BLOCK ],
|
9334
|
+ [mxConstants.STYLE_ENDARROW],
|
|
|
9335
|
+ [mxConstants.ARROW_BLOCK],
|
8474
|
"geIcon geSprite geSprite-endblocktrans",
|
9336
|
"geIcon geSprite geSprite-endblocktrans",
|
8475
|
null,
|
9337
|
null,
|
8476
|
false,
|
9338
|
false,
|
|
@@ -8693,14 +9555,14 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
|
@@ -8693,14 +9555,14 @@ StyleFormatPanel.prototype.addStroke = function (container) { |
8693
|
edgeStyleDiv.className =
|
9555
|
edgeStyleDiv.className =
|
8694
|
"geSprite " +
|
9556
|
"geSprite " +
|
8695
|
(mxUtils.getValue(ss.style, mxConstants.STYLE_ELBOW, null) ==
|
9557
|
(mxUtils.getValue(ss.style, mxConstants.STYLE_ELBOW, null) ==
|
8696
|
- "vertical"
|
9558
|
+ "vertical"
|
8697
|
? "geSprite-verticalelbow"
|
9559
|
? "geSprite-verticalelbow"
|
8698
|
: "geSprite-horizontalelbow");
|
9560
|
: "geSprite-horizontalelbow");
|
8699
|
} else if (es == "isometricEdgeStyle") {
|
9561
|
} else if (es == "isometricEdgeStyle") {
|
8700
|
edgeStyleDiv.className =
|
9562
|
edgeStyleDiv.className =
|
8701
|
"geSprite " +
|
9563
|
"geSprite " +
|
8702
|
(mxUtils.getValue(ss.style, mxConstants.STYLE_ELBOW, null) ==
|
9564
|
(mxUtils.getValue(ss.style, mxConstants.STYLE_ELBOW, null) ==
|
8703
|
- "vertical"
|
9565
|
+ "vertical"
|
8704
|
? "geSprite-verticalisometric"
|
9566
|
? "geSprite-verticalisometric"
|
8705
|
: "geSprite-horizontalisometric");
|
9567
|
: "geSprite-horizontalisometric");
|
8706
|
} else {
|
9568
|
} else {
|
|
@@ -8957,7 +9819,7 @@ StyleFormatPanel.prototype.addLineJumps = function (container) { |
|
@@ -8957,7 +9819,7 @@ StyleFormatPanel.prototype.addLineJumps = function (container) { |
8957
|
styleSelect.style.border = "1px solid rgb(160, 160, 160)";
|
9819
|
styleSelect.style.border = "1px solid rgb(160, 160, 160)";
|
8958
|
styleSelect.style.borderRadius = "4px";
|
9820
|
styleSelect.style.borderRadius = "4px";
|
8959
|
|
9821
|
|
8960
|
- var styles = [ "none", "arc", "gap", "sharp", "line" ];
|
9822
|
+ var styles = ["none", "arc", "gap", "sharp", "line"];
|
8961
|
|
9823
|
|
8962
|
for (var i = 0; i < styles.length; i++) {
|
9824
|
for (var i = 0; i < styles.length; i++) {
|
8963
|
var styleOption = document.createElement("option");
|
9825
|
var styleOption = document.createElement("option");
|
|
@@ -8974,9 +9836,9 @@ StyleFormatPanel.prototype.addLineJumps = function (container) { |
|
@@ -8974,9 +9836,9 @@ StyleFormatPanel.prototype.addLineJumps = function (container) { |
8974
|
new mxEventObject(
|
9836
|
new mxEventObject(
|
8975
|
"styleChanged",
|
9837
|
"styleChanged",
|
8976
|
"keys",
|
9838
|
"keys",
|
8977
|
- [ "jumpStyle" ],
|
9839
|
+ ["jumpStyle"],
|
8978
|
"values",
|
9840
|
"values",
|
8979
|
- [ styleSelect.value ],
|
9841
|
+ [styleSelect.value],
|
8980
|
"cells",
|
9842
|
"cells",
|
8981
|
ss.cells,
|
9843
|
ss.cells,
|
8982
|
),
|
9844
|
),
|
|
@@ -9126,7 +9988,7 @@ StyleFormatPanel.prototype.addStyleOps = function (div) { |
|
@@ -9126,7 +9988,7 @@ StyleFormatPanel.prototype.addStyleOps = function (div) { |
9126
|
div.style.paddingTop = "10px";
|
9988
|
div.style.paddingTop = "10px";
|
9127
|
div.style.paddingBottom = "10px";
|
9989
|
div.style.paddingBottom = "10px";
|
9128
|
|
9990
|
|
9129
|
- this.addActions(div, [ "setAsDefaultStyle" ]);
|
9991
|
+ this.addActions(div, ["setAsDefaultStyle"]);
|
9130
|
|
9992
|
|
9131
|
return div;
|
9993
|
return div;
|
9132
|
};
|
9994
|
};
|
|
@@ -9327,7 +10189,7 @@ DiagramStylePanel.prototype.addView = function (div) { |
|
@@ -9327,7 +10189,7 @@ DiagramStylePanel.prototype.addView = function (div) { |
9327
|
labelBackgroundColor:
|
10189
|
labelBackgroundColor:
|
9328
|
graphStyle != null ? graphStyle.background : null,
|
10190
|
graphStyle != null ? graphStyle.background : null,
|
9329
|
},
|
10191
|
},
|
9330
|
- [ cells[i] ],
|
10192
|
+ [cells[i]],
|
9331
|
);
|
10193
|
);
|
9332
|
}
|
10194
|
}
|
9333
|
|
10195
|
|
|
@@ -9503,7 +10365,7 @@ DiagramStylePanel.prototype.addView = function (div) { |
|
@@ -9503,7 +10365,7 @@ DiagramStylePanel.prototype.addView = function (div) { |
9503
|
v1,
|
10365
|
v1,
|
9504
|
"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;",
|
10366
|
"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;",
|
9505
|
);
|
10367
|
);
|
9506
|
- e1.geometry.points = [ new mxPoint(32, 70) ];
|
10368
|
+ e1.geometry.points = [new mxPoint(32, 70)];
|
9507
|
e1.geometry.offset = new mxPoint(0, 8);
|
10369
|
e1.geometry.offset = new mxPoint(0, 8);
|
9508
|
} finally {
|
10370
|
} finally {
|
9509
|
graph2.model.endUpdate();
|
10371
|
graph2.model.endUpdate();
|
|
@@ -10252,8 +11114,8 @@ DiagramFormatPanel.prototype.addPaperSize = function (div) { |
|
@@ -10252,8 +11114,8 @@ DiagramFormatPanel.prototype.addPaperSize = function (div) { |
10252
|
* Adds the label menu items to the given menu and parent.
|
11114
|
* Adds the label menu items to the given menu and parent.
|
10253
|
*/
|
11115
|
*/
|
10254
|
DiagramFormatPanel.prototype.addStyleOps = function (div) {
|
11116
|
DiagramFormatPanel.prototype.addStyleOps = function (div) {
|
10255
|
- this.addActions(div, [ "editData" ]);
|
|
|
10256
|
- this.addActions(div, [ "clearDefaultStyle" ]);
|
11117
|
+ this.addActions(div, ["editData"]);
|
|
|
11118
|
+ this.addActions(div, ["clearDefaultStyle"]);
|
10257
|
|
11119
|
|
10258
|
return div;
|
11120
|
return div;
|
10259
|
};
|
11121
|
};
|
|
@@ -10281,7 +11143,7 @@ class UseLayUi { |
|
@@ -10281,7 +11143,7 @@ class UseLayUi { |
10281
|
return result === '[object Function]' || result === '[object AsyncFunction]'
|
11143
|
return result === '[object Function]' || result === '[object AsyncFunction]'
|
10282
|
}
|
11144
|
}
|
10283
|
|
11145
|
|
10284
|
- static dynamicAttr = (attr, value) => value ? `${ attr }="${ value }"` : ''
|
11146
|
+ static dynamicAttr = (attr, value) => value ? `${attr}="${value}"` : ''
|
10285
|
|
11147
|
|
10286
|
/**
|
11148
|
/**
|
10287
|
* @description format data source to tree structure
|
11149
|
* @description format data source to tree structure
|
|
@@ -10301,7 +11163,7 @@ class UseLayUi { |
|
@@ -10301,7 +11163,7 @@ class UseLayUi { |
10301
|
if (next[childrenField] && next[childrenField].length) {
|
11163
|
if (next[childrenField] && next[childrenField].length) {
|
10302
|
children = fn(next.children)
|
11164
|
children = fn(next.children)
|
10303
|
}
|
11165
|
}
|
10304
|
- return [ ...prev, { children, ...customSetValue(next) } ]
|
11166
|
+ return [...prev, { children, ...customSetValue(next) }]
|
10305
|
}, [])
|
11167
|
}, [])
|
10306
|
}
|
11168
|
}
|
10307
|
return fn(data)
|
11169
|
return fn(data)
|
|
@@ -10350,9 +11212,9 @@ class UseLayUi { |
|
@@ -10350,9 +11212,9 @@ class UseLayUi { |
10350
|
let { renderFn } = options
|
11212
|
let { renderFn } = options
|
10351
|
renderFn = renderFn || ((record) => {
|
11213
|
renderFn = renderFn || ((record) => {
|
10352
|
if (typeof record === 'object') {
|
11214
|
if (typeof record === 'object') {
|
10353
|
- return `<option value="${ record[valueField] }" ${ record.disabled ? 'disabled=""' : '' }>${ record[labelField] }</option>`
|
11215
|
+ return `<option value="${record[valueField]}" ${record.disabled ? 'disabled=""' : ''}>${record[labelField]}</option>`
|
10354
|
} else {
|
11216
|
} else {
|
10355
|
- return `<option value="${ record }">${ record }</option>`
|
11217
|
+ return `<option value="${record}">${record}</option>`
|
10356
|
}
|
11218
|
}
|
10357
|
})
|
11219
|
})
|
10358
|
const optionsList = dataSource.map(renderFn)
|
11220
|
const optionsList = dataSource.map(renderFn)
|
|
@@ -10366,8 +11228,8 @@ class UseLayUi { |
|
@@ -10366,8 +11228,8 @@ class UseLayUi { |
10366
|
*/
|
11228
|
*/
|
10367
|
static createSingleUseFormItem(content, props = '') {
|
11229
|
static createSingleUseFormItem(content, props = '') {
|
10368
|
return `
|
11230
|
return `
|
10369
|
- <div class="layui-form" ${ props }>
|
|
|
10370
|
- ${ content }
|
11231
|
+ <div class="layui-form" ${props}>
|
|
|
11232
|
+ ${content}
|
10371
|
</div>
|
11233
|
</div>
|
10372
|
`
|
11234
|
`
|
10373
|
}
|
11235
|
}
|
|
@@ -10388,7 +11250,9 @@ class UseLayUi { |
|
@@ -10388,7 +11250,9 @@ class UseLayUi { |
10388
|
/**
|
11250
|
/**
|
10389
|
* @description create layui single select template
|
11251
|
* @description create layui single select template
|
10390
|
* @param {string} [options.layFilter] options.layFilter
|
11252
|
* @param {string} [options.layFilter] options.layFilter
|
|
|
11253
|
+ * @param {string} [options.bindValueFiled] options.bindValueFiled
|
10391
|
* @param {string} [options.layVerify] options.layVerify
|
11254
|
* @param {string} [options.layVerify] options.layVerify
|
|
|
11255
|
+ * @param {string} [options.layVerType] options.layVerType
|
10392
|
* @param {Function} [options.renderFn] options.renderFn
|
11256
|
* @param {Function} [options.renderFn] options.renderFn
|
10393
|
* @param {Array} [options.dataSource = []] options.dataSource
|
11257
|
* @param {Array} [options.dataSource = []] options.dataSource
|
10394
|
* @param {string} [options.valueField = id] options.valueField
|
11258
|
* @param {string} [options.valueField = id] options.valueField
|
|
@@ -10404,7 +11268,9 @@ class UseLayUi { |
|
@@ -10404,7 +11268,9 @@ class UseLayUi { |
10404
|
const {
|
11268
|
const {
|
10405
|
elem,
|
11269
|
elem,
|
10406
|
layFilter,
|
11270
|
layFilter,
|
|
|
11271
|
+ bindValueFiled,
|
10407
|
layVerify,
|
11272
|
layVerify,
|
|
|
11273
|
+ layVerType,
|
10408
|
renderFn,
|
11274
|
renderFn,
|
10409
|
dataSource = [],
|
11275
|
dataSource = [],
|
10410
|
valueField = 'id',
|
11276
|
valueField = 'id',
|
|
@@ -10429,7 +11295,7 @@ class UseLayUi { |
|
@@ -10429,7 +11295,7 @@ class UseLayUi { |
10429
|
return dataSource.map(record => renderFn(record))
|
11295
|
return dataSource.map(record => renderFn(record))
|
10430
|
}
|
11296
|
}
|
10431
|
return formatDataSource(dataSource).map(record => {
|
11297
|
return formatDataSource(dataSource).map(record => {
|
10432
|
- return `<option value="${ record[valueField] }" ${ record.disable ? 'disabled=""' : '' }>${ record[labelField] }</option>`
|
11298
|
+ return `<option value="${record[valueField]}" ${record.disable ? 'disabled=""' : ''}>${record[labelField]}</option>`
|
10433
|
})
|
11299
|
})
|
10434
|
}
|
11300
|
}
|
10435
|
|
11301
|
|
|
@@ -10440,7 +11306,7 @@ class UseLayUi { |
|
@@ -10440,7 +11306,7 @@ class UseLayUi { |
10440
|
}
|
11306
|
}
|
10441
|
|
11307
|
|
10442
|
if (layFilter) {
|
11308
|
if (layFilter) {
|
10443
|
- form.on(`select(${ layFilter })`, (data) => {
|
11309
|
+ form.on(`select(${layFilter})`, (data) => {
|
10444
|
if (onClick && this.isFunction(onClick)) {
|
11310
|
if (onClick && this.isFunction(onClick)) {
|
10445
|
onClick(data)
|
11311
|
onClick(data)
|
10446
|
}
|
11312
|
}
|
|
@@ -10448,11 +11314,11 @@ class UseLayUi { |
|
@@ -10448,11 +11314,11 @@ class UseLayUi { |
10448
|
}
|
11314
|
}
|
10449
|
|
11315
|
|
10450
|
let template = `
|
11316
|
let template = `
|
10451
|
- <div class="layui-form-item ${ className }">
|
|
|
10452
|
- <label class="layui-form-label">${ label }</label>
|
11317
|
+ <div class="layui-form-item ${className}">
|
|
|
11318
|
+ <label class="layui-form-label">${label}</label>
|
10453
|
<div class="layui-input-block">
|
11319
|
<div class="layui-input-block">
|
10454
|
- <select name="${ layFilter }" ${ this.dynamicAttr('lay-filter', layFilter) } ${ this.dynamicAttr('lay-verify', layVerify) }>
|
|
|
10455
|
- ${ generateOptionTemplate(dataSource) }
|
11320
|
+ <select name="${bindValueFiled}" ${this.dynamicAttr('lay-filter', layFilter)} ${this.dynamicAttr('lay-verify', layVerify)} ${this.dynamicAttr('lay-verType', layVerType)}>
|
|
|
11321
|
+ ${generateOptionTemplate(dataSource)}
|
10456
|
</select>
|
11322
|
</select>
|
10457
|
</div>
|
11323
|
</div>
|
10458
|
</div>`
|
11324
|
</div>`
|
|
@@ -10464,7 +11330,7 @@ class UseLayUi { |
|
@@ -10464,7 +11330,7 @@ class UseLayUi { |
10464
|
form.render('select', layFilter)
|
11330
|
form.render('select', layFilter)
|
10465
|
}
|
11331
|
}
|
10466
|
|
11332
|
|
10467
|
- template = singleUsage ? UseLayUi.createSingleUseFormItem(template, this.dynamicAttr('lay-filter', layFilter)) : template
|
11333
|
+ template = singleUsage ? UseLayUi.createSingleUseFormItem(template, '') : template
|
10468
|
|
11334
|
|
10469
|
|
11335
|
|
10470
|
function mount() {
|
11336
|
function mount() {
|
|
@@ -10490,6 +11356,8 @@ class UseLayUi { |
|
@@ -10490,6 +11356,8 @@ class UseLayUi { |
10490
|
* @param {boolean} [options.singleUsage = true] options.singleUsage
|
11356
|
* @param {boolean} [options.singleUsage = true] options.singleUsage
|
10491
|
* @param {Function} [options.customSetTree = ((record) => ({ id: record.id, title: record.name }))] options.customSetTree
|
11357
|
* @param {Function} [options.customSetTree = ((record) => ({ id: record.id, title: record.name }))] options.customSetTree
|
10492
|
* @param {boolean} [options.autoFormatDataSource = true] options.autoFormatDataSource
|
11358
|
* @param {boolean} [options.autoFormatDataSource = true] options.autoFormatDataSource
|
|
|
11359
|
+ * @param {string} [options.layVerify] options.layVerify
|
|
|
11360
|
+ * @param {string} [options.layVerType] options.layVerType
|
10493
|
* @param {Function} [options.treeProps.onReady] options.treeProps.onReady
|
11361
|
* @param {Function} [options.treeProps.onReady] options.treeProps.onReady
|
10494
|
*/
|
11362
|
*/
|
10495
|
static createTreeSelect(options) {
|
11363
|
static createTreeSelect(options) {
|
|
@@ -10509,23 +11377,25 @@ class UseLayUi { |
|
@@ -10509,23 +11377,25 @@ class UseLayUi { |
10509
|
labelField = 'name',
|
11377
|
labelField = 'name',
|
10510
|
valueField = 'id',
|
11378
|
valueField = 'id',
|
10511
|
childrenField = 'children',
|
11379
|
childrenField = 'children',
|
|
|
11380
|
+ layVerify,
|
|
|
11381
|
+ layVerType,
|
10512
|
} = options
|
11382
|
} = options
|
10513
|
|
11383
|
|
10514
|
let { data = [], click, onReady } = treeProps
|
11384
|
let { data = [], click, onReady } = treeProps
|
10515
|
|
11385
|
|
10516
|
let template = `
|
11386
|
let template = `
|
10517
|
- <div class="layui-form-item ${ CLASS_NAME } ${ className }">
|
|
|
10518
|
- <label class="layui-form-label">${ label }</label>
|
11387
|
+ <div class="layui-form-item ${CLASS_NAME} ${className}">
|
|
|
11388
|
+ <label class="layui-form-label">${label}</label>
|
10519
|
<div class="layui-input-block">
|
11389
|
<div class="layui-input-block">
|
10520
|
- <div class="layui-unselect layui-form-select ${ SELECT_CLS }">
|
11390
|
+ <div class="layui-unselect layui-form-select ${SELECT_CLS}">
|
10521
|
<div class="layui-select-title">
|
11391
|
<div class="layui-select-title">
|
10522
|
<span class="layui-input layui-unselect">请选择</span>
|
11392
|
<span class="layui-input layui-unselect">请选择</span>
|
10523
|
- <input type="hidden" name="${ layFilter }">
|
11393
|
+ <input ${this.dynamicAttr('lay-verify', layVerify)} ${this.dynamicAttr('lay-verType', layVerType)} type="text" style="visibility: hidden; position: absolute; top: 0" name="${layFilter}">
|
10524
|
<i class="layui-edge"></i>
|
11394
|
<i class="layui-edge"></i>
|
10525
|
</div>
|
11395
|
</div>
|
10526
|
<dl class="layui-anim layui-anim-upbit">
|
11396
|
<dl class="layui-anim layui-anim-upbit">
|
10527
|
<dd>
|
11397
|
<dd>
|
10528
|
- <ul id="${ layFilter }"></ul>
|
11398
|
+ <ul class="tree-select__tree-mount"></ul>
|
10529
|
</dd>
|
11399
|
</dd>
|
10530
|
</dl>
|
11400
|
</dl>
|
10531
|
</div>
|
11401
|
</div>
|
|
@@ -10543,7 +11413,7 @@ class UseLayUi { |
|
@@ -10543,7 +11413,7 @@ class UseLayUi { |
10543
|
$(elem)
|
11413
|
$(elem)
|
10544
|
.find('.layui-form-select').removeClass('layui-form-selected').end()
|
11414
|
.find('.layui-form-select').removeClass('layui-form-selected').end()
|
10545
|
.find(".layui-select-title span").html(title).end()
|
11415
|
.find(".layui-select-title span").html(title).end()
|
10546
|
- .find(`input:hidden[name='${ layFilter }']`).val(id);
|
11416
|
+ .find(`input[name='${layFilter}']`).val(id);
|
10547
|
}
|
11417
|
}
|
10548
|
|
11418
|
|
10549
|
// init mount
|
11419
|
// init mount
|
|
@@ -10556,7 +11426,7 @@ class UseLayUi { |
|
@@ -10556,7 +11426,7 @@ class UseLayUi { |
10556
|
tree.render({
|
11426
|
tree.render({
|
10557
|
...treeProps,
|
11427
|
...treeProps,
|
10558
|
...(autoFormatDataSource ? { data: UseLayUi.formatTreeDataSource(data, customSetTree, valueField, labelField, childrenField) } : {}),
|
11428
|
...(autoFormatDataSource ? { data: UseLayUi.formatTreeDataSource(data, customSetTree, valueField, labelField, childrenField) } : {}),
|
10559
|
- elem: $(elem).find(`#${ layFilter }`),
|
11429
|
+ elem: $(elem).find('.tree-select__tree-mount'),
|
10560
|
click(node) {
|
11430
|
click(node) {
|
10561
|
setValue(node.data)
|
11431
|
setValue(node.data)
|
10562
|
if (UseLayUi.isFunction(click)) click(node)
|
11432
|
if (UseLayUi.isFunction(click)) click(node)
|
|
@@ -10564,10 +11434,9 @@ class UseLayUi { |
|
@@ -10564,10 +11434,9 @@ class UseLayUi { |
10564
|
})
|
11434
|
})
|
10565
|
|
11435
|
|
10566
|
// focus
|
11436
|
// focus
|
10567
|
- $(`.${ SELECT_CLS }`)
|
11437
|
+ $(`.${SELECT_CLS}`).off('click')
|
10568
|
.on("click", ".layui-select-title", function (e) {
|
11438
|
.on("click", ".layui-select-title", function (e) {
|
10569
|
- $(".layui-form-select").not($(this).parents(".layui-form-select")).removeClass("layui-form-selected");
|
|
|
10570
|
- $(this).parents(`.${ SELECT_CLS }`).toggleClass("layui-form-selected");
|
11439
|
+ $(this).parents(`.${SELECT_CLS}`).toggleClass("layui-form-selected");
|
10571
|
layui.stope(e);
|
11440
|
layui.stope(e);
|
10572
|
})
|
11441
|
})
|
10573
|
.on('click', '.layui-anim', (e) => {
|
11442
|
.on('click', '.layui-anim', (e) => {
|
|
@@ -10578,15 +11447,16 @@ class UseLayUi { |
|
@@ -10578,15 +11447,16 @@ class UseLayUi { |
10578
|
})
|
11447
|
})
|
10579
|
|
11448
|
|
10580
|
// blur
|
11449
|
// blur
|
10581
|
- $(document)
|
|
|
10582
|
- .on("click", function (e) {
|
|
|
10583
|
- const target = e.target
|
|
|
10584
|
- const parentNode = document.getElementById(layFilter)
|
|
|
10585
|
- if (!parentNode) return
|
|
|
10586
|
- const showClose = UseLayUi.isInNode(parentNode, target, true)
|
|
|
10587
|
- if (showClose) return
|
|
|
10588
|
- $(`.${ SELECT_CLS }`).removeClass("layui-form-selected")
|
|
|
10589
|
- });
|
11450
|
+ // $(document)
|
|
|
11451
|
+ // .on("click", function (e) {
|
|
|
11452
|
+ // const target = e.target
|
|
|
11453
|
+ // const parentNode = $(`.${CLASS_NAME} .tree-select__tree-mount`)
|
|
|
11454
|
+ // if (!parentNode) return
|
|
|
11455
|
+ // console.log($.contains(parentNode, target))
|
|
|
11456
|
+ // // const showClose = UseLayUi.isInNode(parentNode, target, true)
|
|
|
11457
|
+ // // if (showClose) return
|
|
|
11458
|
+ // // $(`.${ SELECT_CLS }`).removeClass("layui-form-selected")
|
|
|
11459
|
+ // });
|
10590
|
|
11460
|
|
10591
|
if (UseLayUi.isFunction(onReady)) {
|
11461
|
if (UseLayUi.isFunction(onReady)) {
|
10592
|
onReady(setValue)
|
11462
|
onReady(setValue)
|
|
@@ -10616,27 +11486,27 @@ class UseLayUi { |
|
@@ -10616,27 +11486,27 @@ class UseLayUi { |
10616
|
} = options
|
11486
|
} = options
|
10617
|
customSetValue = customSetValue || ((record) => ({ value: record.id, title: record.name }))
|
11487
|
customSetValue = customSetValue || ((record) => ({ value: record.id, title: record.name }))
|
10618
|
if (!Array.isArray(dataSource)) {
|
11488
|
if (!Array.isArray(dataSource)) {
|
10619
|
- dataSource = [ dataSource ]
|
11489
|
+ dataSource = [dataSource]
|
10620
|
}
|
11490
|
}
|
10621
|
|
11491
|
|
10622
|
function createOptions(dataSource) {
|
11492
|
function createOptions(dataSource) {
|
10623
|
return dataSource.map((record) => {
|
11493
|
return dataSource.map((record) => {
|
10624
|
return `<input
|
11494
|
return `<input
|
10625
|
- type="checkbox" lay-skin="${ laySkin }"
|
|
|
10626
|
- ${ UseLayUi.dynamicAttr('name', record[valueField]) }
|
|
|
10627
|
- ${ UseLayUi.dynamicAttr('title', record[labelField]) }
|
|
|
10628
|
- ${ UseLayUi.dynamicAttr('lay-filter', layFilter) }
|
|
|
10629
|
- ${ UseLayUi.dynamicAttr('lay-verify', layVerify) }
|
|
|
10630
|
- ${ UseLayUi.dynamicAttr('checked', record[checkedField]) }
|
11495
|
+ type="checkbox" lay-skin="${laySkin}"
|
|
|
11496
|
+ ${UseLayUi.dynamicAttr('name', record[valueField])}
|
|
|
11497
|
+ ${UseLayUi.dynamicAttr('title', record[labelField])}
|
|
|
11498
|
+ ${UseLayUi.dynamicAttr('lay-filter', layFilter)}
|
|
|
11499
|
+ ${UseLayUi.dynamicAttr('lay-verify', layVerify)}
|
|
|
11500
|
+ ${UseLayUi.dynamicAttr('checked', record[checkedField])}
|
10631
|
>`
|
11501
|
>`
|
10632
|
})
|
11502
|
})
|
10633
|
}
|
11503
|
}
|
10634
|
|
11504
|
|
10635
|
let template = `
|
11505
|
let template = `
|
10636
|
- <div class="layui-form-item ${ CLASS_NAME }" >
|
|
|
10637
|
- <label class="layui-form-label">${ label }</label>
|
11506
|
+ <div class="layui-form-item ${CLASS_NAME}" >
|
|
|
11507
|
+ <label class="layui-form-label">${label}</label>
|
10638
|
<div class="layui-input-block">
|
11508
|
<div class="layui-input-block">
|
10639
|
- ${ createOptions(dataSource).join('') }
|
11509
|
+ ${createOptions(dataSource).join('')}
|
10640
|
</div>
|
11510
|
</div>
|
10641
|
</div>
|
11511
|
</div>
|
10642
|
`
|
11512
|
`
|
|
@@ -10646,7 +11516,7 @@ class UseLayUi { |
|
@@ -10646,7 +11516,7 @@ class UseLayUi { |
10646
|
if (!elem) return template
|
11516
|
if (!elem) return template
|
10647
|
$(elem).empty()
|
11517
|
$(elem).empty()
|
10648
|
$(elem).append(template)
|
11518
|
$(elem).append(template)
|
10649
|
- form.on(`checkbox(${ layFilter })`, (data) => {
|
11519
|
+ form.on(`checkbox(${layFilter})`, (data) => {
|
10650
|
onChange && (onChange(data))
|
11520
|
onChange && (onChange(data))
|
10651
|
})
|
11521
|
})
|
10652
|
form.render()
|
11522
|
form.render()
|
|
@@ -10721,13 +11591,13 @@ class UseLayUi { |
|
@@ -10721,13 +11591,13 @@ class UseLayUi { |
10721
|
*/
|
11591
|
*/
|
10722
|
function to(promise, errorExt) {
|
11592
|
function to(promise, errorExt) {
|
10723
|
return promise
|
11593
|
return promise
|
10724
|
- .then((data) => [ null, data ])
|
11594
|
+ .then((data) => [null, data])
|
10725
|
.catch((err) => {
|
11595
|
.catch((err) => {
|
10726
|
if (errorExt) {
|
11596
|
if (errorExt) {
|
10727
|
const parsedError = Object.assign({}, err, errorExt)
|
11597
|
const parsedError = Object.assign({}, err, errorExt)
|
10728
|
- return [ parsedError, undefined ]
|
11598
|
+ return [parsedError, undefined]
|
10729
|
}
|
11599
|
}
|
10730
|
- return [ err, undefined ]
|
11600
|
+ return [err, undefined]
|
10731
|
})
|
11601
|
})
|
10732
|
}
|
11602
|
}
|
10733
|
|
11603
|
|
|
@@ -10757,7 +11627,7 @@ class EventCenter { |
|
@@ -10757,7 +11627,7 @@ class EventCenter { |
10757
|
this.eventStack.get(eventName).push(callback)
|
11627
|
this.eventStack.get(eventName).push(callback)
|
10758
|
return
|
11628
|
return
|
10759
|
}
|
11629
|
}
|
10760
|
- this.eventStack.set(eventName, [ callback ])
|
11630
|
+ this.eventStack.set(eventName, [callback])
|
10761
|
}
|
11631
|
}
|
10762
|
|
11632
|
|
10763
|
/**
|
11633
|
/**
|
|
@@ -11218,7 +12088,7 @@ class DispatchCenter { |
|
@@ -11218,7 +12088,7 @@ class DispatchCenter { |
11218
|
async getContentDataNode() {
|
12088
|
async getContentDataNode() {
|
11219
|
const { node: { id } = {} } = this.currentPage
|
12089
|
const { node: { id } = {} } = this.currentPage
|
11220
|
if (!id) return
|
12090
|
if (!id) return
|
11221
|
- const [ err, res ] = await to(ConfigurationNodeApi.getConfigurationInfo('CONTENT', id))
|
12091
|
+ const [err, res] = await to(ConfigurationNodeApi.getConfigurationInfo('CONTENT', id))
|
11222
|
const { dataSources, event, act } = this.contentData = res
|
12092
|
const { dataSources, event, act } = this.contentData = res
|
11223
|
const tsSubCmds = this.generatorDataSourceMapping(dataSources)
|
12093
|
const tsSubCmds = this.generatorDataSourceMapping(dataSources)
|
11224
|
this.sendMessageToGetRealTimeData({ tsSubCmds })
|
12094
|
this.sendMessageToGetRealTimeData({ tsSubCmds })
|
|
@@ -11284,7 +12154,7 @@ class DispatchCenter { |
|
@@ -11284,7 +12154,7 @@ class DispatchCenter { |
11284
|
this.eventBus.on(eventName, (message) => {
|
12154
|
this.eventBus.on(eventName, (message) => {
|
11285
|
this.updatePage(() => {
|
12155
|
this.updatePage(() => {
|
11286
|
const { data } = message
|
12156
|
const { data } = message
|
11287
|
- const [ [ timespan, value ] ] = data[key]
|
12157
|
+ const [[timespan, value]] = data[key]
|
11288
|
node.setValue(value)
|
12158
|
node.setValue(value)
|
11289
|
}, node)
|
12159
|
}, node)
|
11290
|
})
|
12160
|
})
|
|
@@ -11413,7 +12283,7 @@ class HandleDataInteraction { |
|
@@ -11413,7 +12283,7 @@ class HandleDataInteraction { |
11413
|
if (eventName === mxEvent.MOUSE_UP) {
|
12283
|
if (eventName === mxEvent.MOUSE_UP) {
|
11414
|
this.handleMouseUpEvent(eventName, event, sender)
|
12284
|
this.handleMouseUpEvent(eventName, event, sender)
|
11415
|
}
|
12285
|
}
|
11416
|
- graphFireMouseEvent.apply(this.graph, [ eventName, event, sender ]);
|
12286
|
+ graphFireMouseEvent.apply(this.graph, [eventName, event, sender]);
|
11417
|
};
|
12287
|
};
|
11418
|
|
12288
|
|
11419
|
DispatchCenter.eventListenerIsExist = true
|
12289
|
DispatchCenter.eventListenerIsExist = true
|
|
@@ -11494,7 +12364,7 @@ class HandleDataInteraction { |
|
@@ -11494,7 +12364,7 @@ class HandleDataInteraction { |
11494
|
sendInstruction(list = []) {
|
12364
|
sendInstruction(list = []) {
|
11495
|
const queue = []
|
12365
|
const queue = []
|
11496
|
const fn = async (way, deviceId, data) => {
|
12366
|
const fn = async (way, deviceId, data) => {
|
11497
|
- const [ err, res = {} ] = await to(ConfigurationNodeApi.deviceIsOnLine(deviceId))
|
12367
|
+ const [err, res = {}] = await to(ConfigurationNodeApi.deviceIsOnLine(deviceId))
|
11498
|
const { value } = res
|
12368
|
const { value } = res
|
11499
|
if (value) {
|
12369
|
if (value) {
|
11500
|
await to(ConfigurationNodeApi.sendInstruction(way, deviceId, data))
|
12370
|
await to(ConfigurationNodeApi.sendInstruction(way, deviceId, data))
|
|
@@ -11527,7 +12397,7 @@ class HandleDataInteraction { |
|
@@ -11527,7 +12397,7 @@ class HandleDataInteraction { |
11527
|
* @description 跳转页面
|
12397
|
* @description 跳转页面
|
11528
|
*/
|
12398
|
*/
|
11529
|
jumpPage(page) {
|
12399
|
jumpPage(page) {
|
11530
|
- this.editorUi.handleCustomLink(`data:page/id,${ page }`)
|
12400
|
+ this.editorUi.handleCustomLink(`data:page/id,${page}`)
|
11531
|
}
|
12401
|
}
|
11532
|
}
|
12402
|
}
|
11533
|
|
12403
|
|
|
@@ -11716,7 +12586,7 @@ class HandleDynamicEffect { |
|
@@ -11716,7 +12586,7 @@ class HandleDynamicEffect { |
11716
|
deg += 20
|
12586
|
deg += 20
|
11717
|
let style = node.getStyle()
|
12587
|
let style = node.getStyle()
|
11718
|
const reg = /rotation=(-?)\w+(;?)/g
|
12588
|
const reg = /rotation=(-?)\w+(;?)/g
|
11719
|
- style = style.replace(reg, `rotation=${ deg }`)
|
12589
|
+ style = style.replace(reg, `rotation=${deg}`)
|
11720
|
node.setStyle(style)
|
12590
|
node.setStyle(style)
|
11721
|
this.graph.updateCellStyles(style, node)
|
12591
|
this.graph.updateCellStyles(style, node)
|
11722
|
}
|
12592
|
}
|
|
@@ -11788,7 +12658,7 @@ class HandleDynamicEffect { |
|
@@ -11788,7 +12658,7 @@ class HandleDynamicEffect { |
11788
|
const result = { condition: {}, flag: false }
|
12658
|
const result = { condition: {}, flag: false }
|
11789
|
for (let i = 0; i < condition.length; i++) {
|
12659
|
for (let i = 0; i < condition.length; i++) {
|
11790
|
const { min, max } = condition[i]
|
12660
|
const { min, max } = condition[i]
|
11791
|
- const [ timespan, realValue ] = value[attr][0]
|
12661
|
+ const [timespan, realValue] = value[attr][0]
|
11792
|
result.flag = this.isExistInArea(min, max, realValue)
|
12662
|
result.flag = this.isExistInArea(min, max, realValue)
|
11793
|
if (result.flag) {
|
12663
|
if (result.flag) {
|
11794
|
result.condition = condition[i]
|
12664
|
result.condition = condition[i]
|
|
@@ -11880,7 +12750,6 @@ class UpdateQueue { |
|
@@ -11880,7 +12750,6 @@ class UpdateQueue { |
11880
|
this.graph.getModel().endUpdate()
|
12750
|
this.graph.getModel().endUpdate()
|
11881
|
}
|
12751
|
}
|
11882
|
}
|
12752
|
}
|
11883
|
- console.log('enter')
|
|
|
11884
|
const cleanFn = RAFSetInterval(callback, time)
|
12753
|
const cleanFn = RAFSetInterval(callback, time)
|
11885
|
this.timeQueue.set(time, cleanFn)
|
12754
|
this.timeQueue.set(time, cleanFn)
|
11886
|
}
|
12755
|
}
|
|
@@ -12023,10 +12892,10 @@ function globalInit() { |
|
@@ -12023,10 +12892,10 @@ function globalInit() { |
12023
|
const allTimeNode = document.querySelectorAll('.thingKit-component__real-time .real-time__now')
|
12892
|
const allTimeNode = document.querySelectorAll('.thingKit-component__real-time .real-time__now')
|
12024
|
for (const time of allTimeNode) {
|
12893
|
for (const time of allTimeNode) {
|
12025
|
const date = new Date()
|
12894
|
const date = new Date()
|
12026
|
- time.innerHTML = `${ date.getHours() < 10 ? '0' : '' }${ date.getHours() }:${ date.getMinutes() < 10 ? '0' : '' }${ date.getMinutes() }:${ date.getSeconds() < 10 ? '0' : '' }${ date.getSeconds() }`
|
12895
|
+ time.innerHTML = `${date.getHours() < 10 ? '0' : ''}${date.getHours()}:${date.getMinutes() < 10 ? '0' : ''}${date.getMinutes()}:${date.getSeconds() < 10 ? '0' : ''}${date.getSeconds()}`
|
12027
|
}
|
12896
|
}
|
12028
|
}, 1000)
|
12897
|
}, 1000)
|
12029
|
}
|
12898
|
}
|
12030
|
}
|
12899
|
}
|
12031
|
|
12900
|
|
12032
|
-globalInit() |
|
|
|
|
12901
|
+globalInit() |