@riil-frontend/component-topology 2.7.0 → 2.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/build/1.js +1 -1
  3. package/build/index.css +1 -1
  4. package/build/index.js +14 -14
  5. package/es/components/ResourceList/ResourceSelect.js +15 -14
  6. package/es/core/editor/components/settings/common/NodeSizeInput/img/icon_/350/247/243/351/224/201.svg +15 -15
  7. package/es/core/editor/components/settings/common/NodeSizeInput/img/icon_/351/224/201.svg +14 -14
  8. package/es/core/editor/components/settings/common/text/img/bold.svg +11 -11
  9. package/es/core/editor/components/settings/common/text/img/italics.svg +9 -9
  10. package/es/core/editor/components/settings/common/text/img/underline.svg +11 -11
  11. package/es/core/editor/components/settings/text/TextPropertyView.js +9 -1
  12. package/es/models/linkDynamicStyle.js +21 -6
  13. package/es/models/topoCreateMod.js +51 -92
  14. package/es/models/topoMod.js +7 -5
  15. package/es/style.js +1 -0
  16. package/es/topoCenter/store/topoTreeMod.js +1 -1
  17. package/es/utils/template.js +1 -1
  18. package/lib/components/ResourceList/ResourceSelect.js +15 -15
  19. package/lib/core/editor/components/settings/common/NodeSizeInput/img/icon_/350/247/243/351/224/201.svg +15 -15
  20. package/lib/core/editor/components/settings/common/NodeSizeInput/img/icon_/351/224/201.svg +14 -14
  21. package/lib/core/editor/components/settings/common/text/img/bold.svg +11 -11
  22. package/lib/core/editor/components/settings/common/text/img/italics.svg +9 -9
  23. package/lib/core/editor/components/settings/common/text/img/underline.svg +11 -11
  24. package/lib/core/editor/components/settings/text/TextPropertyView.js +9 -1
  25. package/lib/models/linkDynamicStyle.js +21 -6
  26. package/lib/models/topoCreateMod.js +51 -92
  27. package/lib/models/topoMod.js +7 -5
  28. package/lib/style.js +1 -0
  29. package/lib/topoCenter/store/topoTreeMod.js +1 -1
  30. package/lib/utils/template.js +1 -1
  31. package/package.json +5 -4
@@ -32,7 +32,7 @@ export var INIT_STATIC_STATE = {
32
32
  */
33
33
 
34
34
  export var DEFAULT_LAYOUT = {
35
- id: 'circular'
35
+ id: 'hierarchical'
36
36
  };
37
37
  /**
38
38
  * 默认容器数据
@@ -46,7 +46,7 @@ var getTableData = /*#__PURE__*/function () {
46
46
  switch (_context.prev = _context.next) {
47
47
  case 0:
48
48
  _params$current = params.current, current = _params$current === void 0 ? 1 : _params$current, _params$pageSize = params.pageSize, pageSize = _params$pageSize === void 0 ? 20 : _params$pageSize, _params$sortBy = params.sortBy, sortBy = _params$sortBy === void 0 ? 'displayName' : _params$sortBy, _params$sortOrder = params.sortOrder, sortOrder = _params$sortOrder === void 0 ? 'asc' : _params$sortOrder, like = params.like, typeCode = params.typeCode;
49
- condition = 'category(\'resource\')';
49
+ condition = 'type(\'common_network\',\'switch\',\'switch_cluster\',\'linux\',\'windows\',\'oracle\',\'oracle.asm_disk_group\',\'tomcat\',\'application\',\'service\') && category(\'resource\')';
50
50
 
51
51
  if (like) {
52
52
  condition = {
@@ -90,7 +90,7 @@ var getTableData = /*#__PURE__*/function () {
90
90
 
91
91
  };
92
92
  });
93
- return _context.abrupt("return", (0, _format.formatDataForTable)(dataSource, data.total, data.page, data.pageSize));
93
+ return _context.abrupt("return", (0, _format.formatDataForTable)(dataSource, data.totalRecord, data.pageIndex, data.pageSize));
94
94
 
95
95
  case 9:
96
96
  case "end":
@@ -172,7 +172,7 @@ var ResourceList = function ResourceList(props, ref) {
172
172
 
173
173
  };
174
174
  var defaultColumns = [{
175
- title: '设备名称',
175
+ title: '资源名称',
176
176
  dataIndex: 'displayName',
177
177
  sortable: true,
178
178
  cell: _table.getTitleCell
@@ -184,7 +184,7 @@ var ResourceList = function ResourceList(props, ref) {
184
184
  return (0, _table.getTitleCell)((0, _format.getIp)(ip));
185
185
  }
186
186
  }, {
187
- title: '类型',
187
+ title: '资源类型',
188
188
  dataIndex: 'typeCode',
189
189
  filters: filters.typeCode,
190
190
  cell: function cell(code) {
@@ -194,17 +194,17 @@ var ResourceList = function ResourceList(props, ref) {
194
194
  var name = dict && dict.label || code;
195
195
  return (0, _table.getTitleCell)(name);
196
196
  }
197
- }, {
198
- title: '厂商',
199
- sortable: true,
200
- dataIndex: 'company',
201
- cell: function cell(code) {
202
- var dict = _storage.DICT.get(code);
203
-
204
- var name = dict && dict.name || code;
205
- return (0, _table.getTitleCell)(name);
206
- }
207
- }];
197
+ } // {
198
+ // title: '厂商',
199
+ // sortable: true,
200
+ // dataIndex: 'company',
201
+ // cell: (code) => {
202
+ // const dict = DICT.get(code);
203
+ // const name = (dict && dict.name) || code;
204
+ // return getTitleCell(name);
205
+ // },
206
+ // }
207
+ ];
208
208
  return /*#__PURE__*/_react["default"].createElement(_FormTable["default"], {
209
209
  className: className || _ResourceSelectModule["default"].table,
210
210
  formProps: formProps,
@@ -1,16 +1,16 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
- <title>topo/source/Icon/解锁</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="topo/source/Icon/解锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
- <g id="Icon-HTSCIT_lianjieduankai" fill-rule="nonzero">
8
- <g id="编组">
9
- <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
10
- <path d="M12.16836,11.80814 L4.69432,4.33403 L5.41203,3.61632 L12.88607,11.09043 L12.16836,11.80814 Z M6.20072,10.5109 L5.48301,9.79326 L6.9976,8.27867 L7.71531,8.99638 L6.20072,10.5109 Z" id="形状" fill="#4D6277"></path>
11
- <polygon id="路径" fill="#4D6277" points="9.79536 5.48126 10.51307 6.19897 8.99848 7.71363 8.28077 6.99592"></polygon>
12
- <path d="M9.729,3.303 L12.704,6.271 L10.128,8.847 L10.842,9.554 L13.775,6.621 L14.132,6.264 L13.775,5.907 L10.086,2.225 L9.729,1.868 L9.379,2.225 L6.439,5.158 L7.16,5.872 L9.729,3.303 Z M6.264,12.711 L3.296,9.743 L5.879,7.16 L5.158,6.439 L2.225,9.372 L1.868,9.729 L2.225,10.086 L5.914,13.775 L6.271,14.132 L6.621,13.775 L9.561,10.842 L8.847,10.128 L6.264,12.711 Z" id="形状" fill="#4D6277"></path>
13
- </g>
14
- </g>
15
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
+ <title>topo/source/Icon/解锁</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="topo/source/Icon/解锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="Icon-HTSCIT_lianjieduankai" fill-rule="nonzero">
8
+ <g id="编组">
9
+ <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
10
+ <path d="M12.16836,11.80814 L4.69432,4.33403 L5.41203,3.61632 L12.88607,11.09043 L12.16836,11.80814 Z M6.20072,10.5109 L5.48301,9.79326 L6.9976,8.27867 L7.71531,8.99638 L6.20072,10.5109 Z" id="形状" fill="#4D6277"></path>
11
+ <polygon id="路径" fill="#4D6277" points="9.79536 5.48126 10.51307 6.19897 8.99848 7.71363 8.28077 6.99592"></polygon>
12
+ <path d="M9.729,3.303 L12.704,6.271 L10.128,8.847 L10.842,9.554 L13.775,6.621 L14.132,6.264 L13.775,5.907 L10.086,2.225 L9.729,1.868 L9.379,2.225 L6.439,5.158 L7.16,5.872 L9.729,3.303 Z M6.264,12.711 L3.296,9.743 L5.879,7.16 L5.158,6.439 L2.225,9.372 L1.868,9.729 L2.225,10.086 L5.914,13.775 L6.271,14.132 L6.621,13.775 L9.561,10.842 L8.847,10.128 L6.264,12.711 Z" id="形状" fill="#4D6277"></path>
13
+ </g>
14
+ </g>
15
+ </g>
16
16
  </svg>
@@ -1,15 +1,15 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
- <title>topo/source/Icon/锁</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="topo/source/Icon/锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
- <g id="Icon-HTSCIT_lianjie" fill-rule="nonzero">
8
- <g id="编组">
9
- <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
10
- <path d="M6.264,12.711 L3.296,9.743 L5.879,7.16 L5.158,6.439 L2.225,9.372 L1.868,9.729 L2.225,10.086 L5.914,13.775 L6.271,14.132 L6.621,13.775 L9.561,10.842 L8.847,10.128 L6.264,12.711 Z M9.729,3.303 L12.704,6.271 L10.128,8.847 L10.842,9.554 L13.775,6.621 L14.132,6.264 L13.775,5.907 L10.086,2.225 L9.729,1.868 L9.379,2.225 L6.439,5.158 L7.16,5.872 L9.729,3.303 Z" id="形状" fill="#4D6277"></path>
11
- <polygon id="路径" fill="#4D6277" points="10.51846 6.20114 6.20226 10.51727 5.48462 9.79956 9.80075 5.48336"></polygon>
12
- </g>
13
- </g>
14
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
+ <title>topo/source/Icon/锁</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="topo/source/Icon/锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="Icon-HTSCIT_lianjie" fill-rule="nonzero">
8
+ <g id="编组">
9
+ <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
10
+ <path d="M6.264,12.711 L3.296,9.743 L5.879,7.16 L5.158,6.439 L2.225,9.372 L1.868,9.729 L2.225,10.086 L5.914,13.775 L6.271,14.132 L6.621,13.775 L9.561,10.842 L8.847,10.128 L6.264,12.711 Z M9.729,3.303 L12.704,6.271 L10.128,8.847 L10.842,9.554 L13.775,6.621 L14.132,6.264 L13.775,5.907 L10.086,2.225 L9.729,1.868 L9.379,2.225 L6.439,5.158 L7.16,5.872 L9.729,3.303 Z" id="形状" fill="#4D6277"></path>
11
+ <polygon id="路径" fill="#4D6277" points="10.51846 6.20114 6.20226 10.51727 5.48462 9.79956 9.80075 5.48336"></polygon>
12
+ </g>
13
+ </g>
14
+ </g>
15
15
  </svg>
@@ -1,12 +1,12 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
- <title>topo/source/Icon/bold</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="topo/source/Icon/bold" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
- <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="16" height="16"></rect>
8
- <g id="Icon-zitijiacu" transform="translate(4.000000, 3.000000)" fill="#4D6277" fill-rule="nonzero">
9
- <path d="M7.01125,5.739125 C6.75175,5.339375 6.368875,5.0735 5.863,4.941875 L5.863,4.916375 C6.131125,4.788875 6.3565,4.646375 6.539125,4.488875 C6.722125,4.34 6.862375,4.1825 6.96025,4.01675 C7.1515,3.668 7.243,3.302375 7.234375,2.9195 C7.234375,2.171 7.002625,1.569125 6.539125,1.113875 C6.07975,0.663125 5.39275,0.433625 4.4785,0.425 L0.52225,0.425 L0.52225,9.7265 L4.79125,9.7265 C5.522875,9.7265 6.133,9.482 6.622375,8.992625 C7.115875,8.524625 7.36675,7.889 7.375,7.085375 C7.375,6.6005 7.253875,6.151625 7.01125,5.739125 Z M2.035,1.681625 L4.319125,1.681625 C4.833625,1.69025 5.212375,1.8155 5.454625,2.058125 C5.701375,2.317625 5.82475,2.6345 5.82475,3.00875 C5.82475,3.383 5.701375,3.6935 5.454625,3.94025 C5.212375,4.208 4.833625,4.34225 4.319125,4.34225 L2.035,4.34225 L2.035,1.681625 Z M5.601625,7.965875 C5.359375,8.24225 4.9765,8.38475 4.453375,8.393375 L2.035,8.393375 L2.035,5.59925 L4.453,5.59925 C4.976125,5.6075 5.359,5.745875 5.60125,6.014 C5.8435,6.28625 5.965,6.613625 5.965,6.9965 C5.965,7.370375 5.843875,7.693625 5.601625,7.965875 L5.601625,7.965875 Z" id="形状"></path>
10
- </g>
11
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
+ <title>topo/source/Icon/bold</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="topo/source/Icon/bold" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="16" height="16"></rect>
8
+ <g id="Icon-zitijiacu" transform="translate(4.000000, 3.000000)" fill="#4D6277" fill-rule="nonzero">
9
+ <path d="M7.01125,5.739125 C6.75175,5.339375 6.368875,5.0735 5.863,4.941875 L5.863,4.916375 C6.131125,4.788875 6.3565,4.646375 6.539125,4.488875 C6.722125,4.34 6.862375,4.1825 6.96025,4.01675 C7.1515,3.668 7.243,3.302375 7.234375,2.9195 C7.234375,2.171 7.002625,1.569125 6.539125,1.113875 C6.07975,0.663125 5.39275,0.433625 4.4785,0.425 L0.52225,0.425 L0.52225,9.7265 L4.79125,9.7265 C5.522875,9.7265 6.133,9.482 6.622375,8.992625 C7.115875,8.524625 7.36675,7.889 7.375,7.085375 C7.375,6.6005 7.253875,6.151625 7.01125,5.739125 Z M2.035,1.681625 L4.319125,1.681625 C4.833625,1.69025 5.212375,1.8155 5.454625,2.058125 C5.701375,2.317625 5.82475,2.6345 5.82475,3.00875 C5.82475,3.383 5.701375,3.6935 5.454625,3.94025 C5.212375,4.208 4.833625,4.34225 4.319125,4.34225 L2.035,4.34225 L2.035,1.681625 Z M5.601625,7.965875 C5.359375,8.24225 4.9765,8.38475 4.453375,8.393375 L2.035,8.393375 L2.035,5.59925 L4.453,5.59925 C4.976125,5.6075 5.359,5.745875 5.60125,6.014 C5.8435,6.28625 5.965,6.613625 5.965,6.9965 C5.965,7.370375 5.843875,7.693625 5.601625,7.965875 L5.601625,7.965875 Z" id="形状"></path>
10
+ </g>
11
+ </g>
12
12
  </svg>
@@ -1,10 +1,10 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
- <title>topo/source/Icon/italics</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="topo/source/Icon/italics" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
- <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="2" y="2" width="12" height="12"></rect>
8
- <polygon id="路径" fill="#4D6277" fill-rule="nonzero" points="8.77666667 4.29166666 7.19333333 12.2083333 8.77666667 12.2083333 8.77666667 13 4.02666667 13 4.02666667 12.2083333 5.60999999 12.2083333 7.19333333 4.29166666 5.60999999 4.29166666 5.60999999 3.5 10.36 3.5 10.36 4.29166666"></polygon>
9
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
+ <title>topo/source/Icon/italics</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="topo/source/Icon/italics" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="2" y="2" width="12" height="12"></rect>
8
+ <polygon id="路径" fill="#4D6277" fill-rule="nonzero" points="8.77666667 4.29166666 7.19333333 12.2083333 8.77666667 12.2083333 8.77666667 13 4.02666667 13 4.02666667 12.2083333 5.60999999 12.2083333 7.19333333 4.29166666 5.60999999 4.29166666 5.60999999 3.5 10.36 3.5 10.36 4.29166666"></polygon>
9
+ </g>
10
10
  </svg>
@@ -1,12 +1,12 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
- <title>topo/source/Icon/underline</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="topo/source/Icon/underline" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
- <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="16" height="16"></rect>
8
- <g id="Icon-zitixiahuaxian" transform="translate(3.000000, 3.000000)" fill="#4D6277" fill-rule="nonzero">
9
- <path d="M5,8.507375 C7.01929112,8.507375 8.65625,6.87041612 8.65625,4.851125 L8.65625,0.05 L7.34375,0.05 L7.34375,4.851125 C7.34375,6.14554238 6.29441738,7.194875 5,7.194875 C3.70558262,7.194875 2.65625,6.14554238 2.65625,4.851125 L2.65625,0.05 L1.34375,0.05 L1.34375,4.851125 C1.34375,6.87041612 2.98070888,8.507375 5,8.507375 Z M9.125,9.380375 L0.875,9.380375 C0.667893219,9.380375 0.5,9.54826822 0.5,9.755375 C0.5,9.96248178 0.667893219,10.130375 0.875,10.130375 L9.125,10.130375 C9.33210678,10.130375 9.5,9.96248178 9.5,9.755375 C9.5,9.54826822 9.33210678,9.380375 9.125,9.380375 Z" id="形状"></path>
10
- </g>
11
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
+ <title>topo/source/Icon/underline</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="topo/source/Icon/underline" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="16" height="16"></rect>
8
+ <g id="Icon-zitixiahuaxian" transform="translate(3.000000, 3.000000)" fill="#4D6277" fill-rule="nonzero">
9
+ <path d="M5,8.507375 C7.01929112,8.507375 8.65625,6.87041612 8.65625,4.851125 L8.65625,0.05 L7.34375,0.05 L7.34375,4.851125 C7.34375,6.14554238 6.29441738,7.194875 5,7.194875 C3.70558262,7.194875 2.65625,6.14554238 2.65625,4.851125 L2.65625,0.05 L1.34375,0.05 L1.34375,4.851125 C1.34375,6.87041612 2.98070888,8.507375 5,8.507375 Z M9.125,9.380375 L0.875,9.380375 C0.667893219,9.380375 0.5,9.54826822 0.5,9.755375 C0.5,9.96248178 0.667893219,10.130375 0.875,10.130375 L9.125,10.130375 C9.33210678,10.130375 9.5,9.96248178 9.5,9.755375 C9.5,9.54826822 9.33210678,9.380375 9.125,9.380375 Z" id="形状"></path>
10
+ </g>
11
+ </g>
12
12
  </svg>
@@ -24,9 +24,11 @@ var _TextStyle = _interopRequireDefault(require("../common/text/TextStyle"));
24
24
  var _fontStyleUtil = _interopRequireDefault(require("../common/text/fontStyleUtil"));
25
25
 
26
26
  var CollapsePanel = _collapse["default"].Panel;
27
+ var DEFAULT_TEXT_VALUE = '文本输入';
27
28
 
28
29
  function parseValues(values) {
29
30
  return (0, _extends2["default"])({}, values, {
31
+ 'styleMap.text': values['styleMap.text'] === DEFAULT_TEXT_VALUE ? '' : values['styleMap.text'],
30
32
  'styleMap.textObj': {
31
33
  color: values.styleMap['text.color'],
32
34
  underline: values.styleMap['text.decoration'] === 'underline',
@@ -62,6 +64,12 @@ function TextPropertyView(props) {
62
64
  }
63
65
 
64
66
  if (values[name] !== value) {
67
+ if (name === 'styleMap.text' && !value) {
68
+ _onChange(name, DEFAULT_TEXT_VALUE, newValues);
69
+
70
+ return;
71
+ }
72
+
65
73
  _onChange(name, value, newValues);
66
74
  }
67
75
  }
@@ -96,7 +104,7 @@ function TextPropertyView(props) {
96
104
  minRows: 4,
97
105
  maxRows: 4
98
106
  },
99
- placeholder: "\u8F93\u5165\u6587\u672C"
107
+ placeholder: "\u6587\u672C\u8F93\u5165"
100
108
  })), /*#__PURE__*/_react["default"].createElement(_form["default"].Item, null, /*#__PURE__*/_react["default"].createElement(_TextStyle["default"], {
101
109
  name: "styleMap.textObj"
102
110
  })))))));
@@ -221,13 +221,28 @@ function _default(engine) {
221
221
 
222
222
  links = [];
223
223
 
224
- if (isEdit && rootState.topoCreateMod.elements.links.length) {
225
- links = rootState.topoCreateMod.elements.links;
226
- } else {
227
- links = rootState.topoMod.topoData.links;
228
- } // 获取属性。无权限的属性为 []
224
+ if (!(isEdit && rootState.topoCreateMod.elements.links.length)) {
225
+ _context3.next = 9;
226
+ break;
227
+ }
228
+
229
+ links = rootState.topoCreateMod.elements.links;
230
+ _context3.next = 12;
231
+ break;
232
+
233
+ case 9:
234
+ if (rootState.topoMod.topoData) {
235
+ _context3.next = 11;
236
+ break;
237
+ }
238
+
239
+ return _context3.abrupt("return");
229
240
 
241
+ case 11:
242
+ links = rootState.topoMod.topoData.links;
230
243
 
244
+ case 12:
245
+ // 获取属性。无权限的属性为 []
231
246
  allLinkAttributes = rootState.topoBizMod.attrsAndMetrics; // 告警
232
247
 
233
248
  alarmMap = rootState.topoBizMod.alarmDoc; // 如果是显示模式,过滤有告警的链路
@@ -281,7 +296,7 @@ function _default(engine) {
281
296
  engine.view.topoClient.batchSetLineStyle(linkStyleMap);
282
297
  }
283
298
 
284
- case 13:
299
+ case 19:
285
300
  case "end":
286
301
  return _context3.stop();
287
302
  }
@@ -278,68 +278,27 @@ function _default(topoApp) {
278
278
  },
279
279
  effects: function effects(dispatch) {
280
280
  return {
281
- getResourceList: function getResourceList(payload) {
281
+ getConditions: function getConditions() {
282
282
  var _this = this;
283
283
 
284
284
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
285
- var _payload$index, index, resources, conditions, data;
286
-
285
+ var data, groupTopo, resources, groups;
287
286
  return _regenerator["default"].wrap(function _callee$(_context) {
288
287
  while (1) {
289
288
  switch (_context.prev = _context.next) {
290
289
  case 0:
291
- _payload$index = payload.index, index = _payload$index === void 0 ? -1 : _payload$index, resources = payload.resources;
292
- conditions = resToConditions(resources) || {};
293
-
294
- if (!(conditions.dynamic || conditions["static"])) {
295
- _context.next = 7;
296
- break;
297
- }
298
-
299
- _context.next = 5;
300
- return _topo["default"].getResourceList(conditions);
301
-
302
- case 5:
303
- data = _context.sent;
304
-
305
- if (index < 0) {
306
- _this.updateResList(data);
307
- } else {
308
- _this.updateGroupResList({
309
- index: index,
310
- data: data
311
- });
312
- }
313
-
314
- case 7:
315
- case "end":
316
- return _context.stop();
317
- }
318
- }
319
- }, _callee);
320
- }))();
321
- },
322
- getConditions: function getConditions() {
323
- var _this2 = this;
324
-
325
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
326
- var data, groupTopo, resources, groups;
327
- return _regenerator["default"].wrap(function _callee2$(_context2) {
328
- while (1) {
329
- switch (_context2.prev = _context2.next) {
330
- case 0:
331
- _context2.next = 2;
290
+ _context.next = 2;
332
291
  return _topo["default"].getConditions(topoApp.id);
333
292
 
334
293
  case 2:
335
- data = _context2.sent;
294
+ data = _context.sent;
336
295
 
337
296
  if ((0, _utils.isAvailableArray)(data)) {
338
- _context2.next = 5;
297
+ _context.next = 5;
339
298
  break;
340
299
  }
341
300
 
342
- return _context2.abrupt("return");
301
+ return _context.abrupt("return");
343
302
 
344
303
  case 5:
345
304
  // 视图
@@ -372,28 +331,28 @@ function _default(topoApp) {
372
331
  };
373
332
  });
374
333
 
375
- _this2.update({
334
+ _this.update({
376
335
  resources: resources,
377
336
  groups: groups
378
337
  });
379
338
 
380
339
  case 9:
381
340
  case "end":
382
- return _context2.stop();
341
+ return _context.stop();
383
342
  }
384
343
  }
385
- }, _callee2);
344
+ }, _callee);
386
345
  }))();
387
346
  },
388
347
  fetchData: function fetchData(params, rootState) {
389
- var _this3 = this;
348
+ var _this2 = this;
390
349
 
391
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
350
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
392
351
  var editState, resources, _editState$groups, groups, query, data;
393
352
 
394
- return _regenerator["default"].wrap(function _callee3$(_context3) {
353
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
395
354
  while (1) {
396
- switch (_context3.prev = _context3.next) {
355
+ switch (_context2.prev = _context2.next) {
397
356
  case 0:
398
357
  editState = rootState.topoCreateMod;
399
358
  resources = editState.resources, _editState$groups = editState.groups, groups = _editState$groups === void 0 ? [] : _editState$groups;
@@ -402,30 +361,30 @@ function _default(topoApp) {
402
361
  resources: resources,
403
362
  groups: groups
404
363
  };
405
- _context3.next = 5;
406
- return _this3.getTopoByConditions(query);
364
+ _context2.next = 5;
365
+ return _this2.getTopoByConditions(query);
407
366
 
408
367
  case 5:
409
- data = _context3.sent;
410
- return _context3.abrupt("return", data);
368
+ data = _context2.sent;
369
+ return _context2.abrupt("return", data);
411
370
 
412
371
  case 7:
413
372
  case "end":
414
- return _context3.stop();
373
+ return _context2.stop();
415
374
  }
416
375
  }
417
- }, _callee3);
376
+ }, _callee2);
418
377
  }))();
419
378
  },
420
379
  getTopoByConditions: function getTopoByConditions(params, state) {
421
- var _this4 = this;
380
+ var _this3 = this;
422
381
 
423
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
382
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
424
383
  var topoId, resources, groups, conditions, groupInfo, data, _yield$Promise$all, ciTypeMap, links, _combTopoData, topoData, resAndMetrics, topoDataTrans;
425
384
 
426
- return _regenerator["default"].wrap(function _callee4$(_context4) {
385
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
427
386
  while (1) {
428
- switch (_context4.prev = _context4.next) {
387
+ switch (_context3.prev = _context3.next) {
429
388
  case 0:
430
389
  _rlog["default"].debug('getTopoByConditions--------', params);
431
390
 
@@ -437,19 +396,19 @@ function _default(topoApp) {
437
396
  resources: resToConditions(group.resources)
438
397
  });
439
398
  });
440
- _context4.next = 6;
399
+ _context3.next = 6;
441
400
  return _topo["default"].getTopoDataByResource(topoId, conditions, groupInfo);
442
401
 
443
402
  case 6:
444
- data = _context4.sent;
403
+ data = _context3.sent;
445
404
 
446
405
  _rlog["default"].debug('getTopoByConditions--------', data, groupInfo);
447
406
 
448
- _context4.next = 10;
407
+ _context3.next = 10;
449
408
  return Promise.all([topoApp.ciTyeCache.getCiTypeMap((0, _topoData.getCiTypes)(data)), (0, _linkUtils.getLinksDetail)(data.links), dispatch.iconManage.getIcons()]);
450
409
 
451
410
  case 10:
452
- _yield$Promise$all = _context4.sent;
411
+ _yield$Promise$all = _context3.sent;
453
412
  ciTypeMap = _yield$Promise$all[0];
454
413
  links = _yield$Promise$all[1];
455
414
  _combTopoData = (0, _topoData.combTopoData)({
@@ -462,13 +421,13 @@ function _default(topoApp) {
462
421
  ciTypeMap: ciTypeMap
463
422
  }), topoData = _combTopoData.topoData, resAndMetrics = _combTopoData.resAndMetrics;
464
423
 
465
- _this4.update({
424
+ _this3.update({
466
425
  elements: topoData
467
426
  });
468
427
 
469
428
  topoDataTrans = (0, _utils2.transformTopoElements)(topoData);
470
429
 
471
- _this4.updateTopo(topoDataTrans); // const allCiSet = state.topoBizMod.allCiSet;
430
+ _this3.updateTopo(topoDataTrans); // const allCiSet = state.topoBizMod.allCiSet;
472
431
  // rlog.debug(
473
432
  // '新添加资源什么情况-topoData-resAndMetrics-allCiSet',
474
433
  // topoData,
@@ -483,41 +442,41 @@ function _default(topoApp) {
483
442
  // });
484
443
  // 返回查询后的数据,便于外部获取到数据后像HT通知更新
485
444
 
486
- return _context4.abrupt("return", topoDataTrans);
445
+ return _context3.abrupt("return", topoDataTrans);
487
446
 
488
447
  case 19:
489
448
  case "end":
490
- return _context4.stop();
449
+ return _context3.stop();
491
450
  }
492
451
  }
493
- }, _callee4);
452
+ }, _callee3);
494
453
  }))();
495
454
  },
496
455
  saveTopo: function saveTopo(data, state) {
497
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
456
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
498
457
  var topoId, template, layout, global, resources, groups, serialize, layoutId, conditions, groupInfo;
499
- return _regenerator["default"].wrap(function _callee5$(_context5) {
458
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
500
459
  while (1) {
501
- switch (_context5.prev = _context5.next) {
460
+ switch (_context4.prev = _context4.next) {
502
461
  case 0:
503
462
  topoId = data.id, template = data.template, layout = data.layout, global = data.global, resources = data.resources, groups = data.groups, serialize = data.serialize; // 保存布局
504
463
 
505
464
  if (!(template && layout)) {
506
- _context5.next = 5;
465
+ _context4.next = 5;
507
466
  break;
508
467
  }
509
468
 
510
469
  layoutId = getLayoutId(layout);
511
- _context5.next = 5;
470
+ _context4.next = 5;
512
471
  return _topo["default"].changeLayout(topoId, template, layoutId);
513
472
 
514
473
  case 5:
515
474
  if (!global) {
516
- _context5.next = 8;
475
+ _context4.next = 8;
517
476
  break;
518
477
  }
519
478
 
520
- _context5.next = 8;
479
+ _context4.next = 8;
521
480
  return _topo["default"].saveTopoSettings(topoId, (0, _topoData.combSaveTopoData)({
522
481
  global: global,
523
482
  ciSetDoc: state.topoBizMod.ciSetDoc,
@@ -526,16 +485,16 @@ function _default(topoApp) {
526
485
 
527
486
  case 8:
528
487
  if (!serialize) {
529
- _context5.next = 11;
488
+ _context4.next = 11;
530
489
  break;
531
490
  }
532
491
 
533
- _context5.next = 11;
492
+ _context4.next = 11;
534
493
  return _topo["default"].saveSerializeData(topoId, serialize);
535
494
 
536
495
  case 11:
537
496
  if (!(resources || groups)) {
538
- _context5.next = 16;
497
+ _context4.next = 16;
539
498
  break;
540
499
  }
541
500
 
@@ -546,34 +505,34 @@ function _default(topoApp) {
546
505
  resources: resToConditions(group.resources, true)
547
506
  });
548
507
  });
549
- _context5.next = 16;
508
+ _context4.next = 16;
550
509
  return _topo["default"].bindResourceToTopo(topoId, conditions, groupInfo);
551
510
 
552
511
  case 16:
553
512
  case "end":
554
- return _context5.stop();
513
+ return _context4.stop();
555
514
  }
556
515
  }
557
- }, _callee5);
516
+ }, _callee4);
558
517
  }))();
559
518
  },
560
519
  addToBlockList: function addToBlockList(data) {
561
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
520
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
562
521
  var topoId, ciIdList;
563
- return _regenerator["default"].wrap(function _callee6$(_context6) {
522
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
564
523
  while (1) {
565
- switch (_context6.prev = _context6.next) {
524
+ switch (_context5.prev = _context5.next) {
566
525
  case 0:
567
526
  topoId = data.id, ciIdList = data.ciIdList;
568
- _context6.next = 3;
527
+ _context5.next = 3;
569
528
  return _topo["default"].addToBlocklist(topoId, ciIdList);
570
529
 
571
530
  case 3:
572
531
  case "end":
573
- return _context6.stop();
532
+ return _context5.stop();
574
533
  }
575
534
  }
576
- }, _callee6);
535
+ }, _callee5);
577
536
  }))();
578
537
  },
579
538
  switchToEditMode: function switchToEditMode() {},
@@ -38,14 +38,13 @@ function _default(topoApp) {
38
38
  urlParams: {},
39
39
  topoLoading: true,
40
40
  topoLoadError: false,
41
- topoId: '',
42
- topoName: '',
43
- topoPermission: undefined,
44
41
  viewState: 'view',
45
42
  // view, create, 2种模式
46
- // lastRefresh: undefined,
43
+ topoId: '',
44
+ topoName: '',
47
45
  topoData: null,
48
46
  currentTopo: undefined,
47
+ topoPermission: undefined,
49
48
  currentNode: {
50
49
  id: '',
51
50
  name: '无数据'
@@ -196,7 +195,10 @@ function _default(topoApp) {
196
195
  },
197
196
  clearData: function clearData() {
198
197
  this.update({
199
- topoData: null
198
+ topoId: '',
199
+ topoName: '',
200
+ topoData: null,
201
+ currentTopo: undefined
200
202
  });
201
203
  },
202
204
  switchToViewMode: function switchToViewMode(playload, rootState) {
package/lib/style.js CHANGED
@@ -27,4 +27,5 @@ require('@alifd/next/lib/list/style');
27
27
  require('@alifd/next/lib/tree-select/style');
28
28
 
29
29
 
30
+
30
31
  require('./index.scss');