@riil-frontend/component-topology 7.0.0-dev.12 → 7.0.0-dev.13
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.
- package/build/index.css +1 -1
- package/build/index.js +1 -1
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +9 -2
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +5 -0
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +28 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +1 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +9 -3
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +5 -0
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +28 -26
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +1 -0
- package/package.json +2 -2
@@ -1,16 +1,23 @@
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
3
3
|
var _excluded = ["color", "background", "opacity", "bold", "italic"];
|
4
|
-
import fontStyleUtil from "../../../../../../settings/common/text/fontStyleUtil";
|
5
4
|
import { formatBackgroundRgbaColor, parseBackground, parseColor } from "../colorUtil";
|
6
5
|
export function getTextStyle(element) {
|
6
|
+
var opacity = element.a('edge.tag.opacity');
|
7
|
+
|
8
|
+
if (opacity === null || opacity === undefined) {
|
9
|
+
opacity = 1;
|
10
|
+
}
|
11
|
+
|
7
12
|
return _extends({
|
8
13
|
color: parseColor(element.a('edge.tag.color')),
|
9
14
|
fontFamily: element.a('edge.tag.fontFamily') || '微软雅黑',
|
10
15
|
fontSize: element.a('edge.tag.fontSize'),
|
11
16
|
bold: !!element.a('edge.tag.fontBold'),
|
12
17
|
italic: !!element.a('edge.tag.fontItalic')
|
13
|
-
}, parseBackground(element.a('edge.tag.background'))
|
18
|
+
}, parseBackground(element.a('edge.tag.background')), {
|
19
|
+
opacity: opacity
|
20
|
+
});
|
14
21
|
}
|
15
22
|
export function setTextStyle(element, style, topo) {
|
16
23
|
var color = style.color,
|
@@ -86,6 +86,11 @@ export function getTextStyle(htSelection, styleNames) {
|
|
86
86
|
|
87
87
|
var val = fieldValueList[0];
|
88
88
|
var different = fieldValueList.filter(function (item) {
|
89
|
+
// 如果是颜色,特殊处理
|
90
|
+
if (item && val && item.rgb) {
|
91
|
+
return item.rgb.r + "," + item.rgb.g + "," + item.rgb.b + "," + item.rgb.a !== val.rgb.r + "," + val.rgb.g + "," + val.rgb.b + "," + val.rgb.a;
|
92
|
+
}
|
93
|
+
|
89
94
|
return item !== val;
|
90
95
|
});
|
91
96
|
|
@@ -23,7 +23,7 @@ import topoFactory from "./topoFactory";
|
|
23
23
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
24
24
|
import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
|
25
25
|
|
26
|
-
var version = typeof "7.0.0-dev.
|
26
|
+
var version = typeof "7.0.0-dev.13" === 'string' ? "7.0.0-dev.13" : null;
|
27
27
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
28
28
|
/**
|
29
29
|
* 拓扑显示和编辑
|
package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import _Message from "@alifd/next/es/message";
|
2
2
|
import _Table from "@alifd/next/es/table";
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
4
|
-
import _Button from "@alifd/next/es/button";
|
5
4
|
import _Icon from "@alifd/next/es/icon";
|
6
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
7
6
|
import React from 'react';
|
@@ -56,30 +55,34 @@ function EventsCard(props) {
|
|
56
55
|
title: moment(value).format('YYYY-MM-DD HH:mm:ss')
|
57
56
|
}, moment(value).format('YYYY-MM-DD HH:mm:ss'));
|
58
57
|
}
|
59
|
-
}
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
58
|
+
} // 临时屏蔽告警操作列,后续版本按权限显示 2023-3-6 20:23:45
|
59
|
+
// {
|
60
|
+
// title: '操作',
|
61
|
+
// dataIndex: 'status',
|
62
|
+
// key: 'status',
|
63
|
+
// width: 64,
|
64
|
+
// cell: (status, index, record) => {
|
65
|
+
// if (record.type === 'alarm') {
|
66
|
+
// return status === 'toDeal' ? (
|
67
|
+
// <Button
|
68
|
+
// text
|
69
|
+
// type="primary"
|
70
|
+
// onClick={() => alarmRiskOperation(record.type, record.params)}
|
71
|
+
// >
|
72
|
+
// 受理
|
73
|
+
// </Button>
|
74
|
+
// ) : (
|
75
|
+
// <Button disabled text type="primary">
|
76
|
+
// 已受理
|
77
|
+
// </Button>
|
78
|
+
// );
|
79
|
+
// } else {
|
80
|
+
// // return <Button text type="primary" onClick={() => alarmRiskOperation(record.type, record)}>受理</Button>
|
81
|
+
// return '';
|
82
|
+
// }
|
83
|
+
// },
|
84
|
+
// },
|
85
|
+
]; // 告警/风险 操作 (受理)
|
83
86
|
|
84
87
|
function alarmRiskOperation(_x, _x2) {
|
85
88
|
return _alarmRiskOperation.apply(this, arguments);
|
@@ -13,20 +13,26 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
13
13
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
15
15
|
|
16
|
-
var _fontStyleUtil = _interopRequireDefault(require("../../../../../../settings/common/text/fontStyleUtil"));
|
17
|
-
|
18
16
|
var _colorUtil = require("../colorUtil");
|
19
17
|
|
20
18
|
var _excluded = ["color", "background", "opacity", "bold", "italic"];
|
21
19
|
|
22
20
|
function getTextStyle(element) {
|
21
|
+
var opacity = element.a('edge.tag.opacity');
|
22
|
+
|
23
|
+
if (opacity === null || opacity === undefined) {
|
24
|
+
opacity = 1;
|
25
|
+
}
|
26
|
+
|
23
27
|
return (0, _extends2["default"])({
|
24
28
|
color: (0, _colorUtil.parseColor)(element.a('edge.tag.color')),
|
25
29
|
fontFamily: element.a('edge.tag.fontFamily') || '微软雅黑',
|
26
30
|
fontSize: element.a('edge.tag.fontSize'),
|
27
31
|
bold: !!element.a('edge.tag.fontBold'),
|
28
32
|
italic: !!element.a('edge.tag.fontItalic')
|
29
|
-
}, (0, _colorUtil.parseBackground)(element.a('edge.tag.background'))
|
33
|
+
}, (0, _colorUtil.parseBackground)(element.a('edge.tag.background')), {
|
34
|
+
opacity: opacity
|
35
|
+
});
|
30
36
|
}
|
31
37
|
|
32
38
|
function setTextStyle(element, style, topo) {
|
@@ -102,6 +102,11 @@ function getTextStyle(htSelection, styleNames) {
|
|
102
102
|
|
103
103
|
var val = fieldValueList[0];
|
104
104
|
var different = fieldValueList.filter(function (item) {
|
105
|
+
// 如果是颜色,特殊处理
|
106
|
+
if (item && val && item.rgb) {
|
107
|
+
return item.rgb.r + "," + item.rgb.g + "," + item.rgb.b + "," + item.rgb.a !== val.rgb.r + "," + val.rgb.g + "," + val.rgb.b + "," + val.rgb.a;
|
108
|
+
}
|
109
|
+
|
105
110
|
return item !== val;
|
106
111
|
});
|
107
112
|
|
@@ -54,7 +54,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
|
|
54
54
|
var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
55
55
|
|
56
56
|
// eslint-disable-next-line no-undef
|
57
|
-
var version = typeof "7.0.0-dev.
|
57
|
+
var version = typeof "7.0.0-dev.13" === 'string' ? "7.0.0-dev.13" : null;
|
58
58
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
59
59
|
/**
|
60
60
|
* 拓扑显示和编辑
|
package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js
CHANGED
@@ -13,8 +13,6 @@ var _table = _interopRequireDefault(require("@alifd/next/lib/table"));
|
|
13
13
|
|
14
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
15
15
|
|
16
|
-
var _button = _interopRequireDefault(require("@alifd/next/lib/button"));
|
17
|
-
|
18
16
|
var _icon = _interopRequireDefault(require("@alifd/next/lib/icon"));
|
19
17
|
|
20
18
|
var _react = _interopRequireDefault(require("react"));
|
@@ -75,30 +73,34 @@ function EventsCard(props) {
|
|
75
73
|
title: (0, _moment["default"])(value).format('YYYY-MM-DD HH:mm:ss')
|
76
74
|
}, (0, _moment["default"])(value).format('YYYY-MM-DD HH:mm:ss'));
|
77
75
|
}
|
78
|
-
}
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
76
|
+
} // 临时屏蔽告警操作列,后续版本按权限显示 2023-3-6 20:23:45
|
77
|
+
// {
|
78
|
+
// title: '操作',
|
79
|
+
// dataIndex: 'status',
|
80
|
+
// key: 'status',
|
81
|
+
// width: 64,
|
82
|
+
// cell: (status, index, record) => {
|
83
|
+
// if (record.type === 'alarm') {
|
84
|
+
// return status === 'toDeal' ? (
|
85
|
+
// <Button
|
86
|
+
// text
|
87
|
+
// type="primary"
|
88
|
+
// onClick={() => alarmRiskOperation(record.type, record.params)}
|
89
|
+
// >
|
90
|
+
// 受理
|
91
|
+
// </Button>
|
92
|
+
// ) : (
|
93
|
+
// <Button disabled text type="primary">
|
94
|
+
// 已受理
|
95
|
+
// </Button>
|
96
|
+
// );
|
97
|
+
// } else {
|
98
|
+
// // return <Button text type="primary" onClick={() => alarmRiskOperation(record.type, record)}>受理</Button>
|
99
|
+
// return '';
|
100
|
+
// }
|
101
|
+
// },
|
102
|
+
// },
|
103
|
+
]; // 告警/风险 操作 (受理)
|
102
104
|
|
103
105
|
function alarmRiskOperation(_x, _x2) {
|
104
106
|
return _alarmRiskOperation.apply(this, arguments);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "7.0.0-dev.
|
3
|
+
"version": "7.0.0-dev.13",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -116,6 +116,6 @@
|
|
116
116
|
"access": "public"
|
117
117
|
},
|
118
118
|
"license": "MIT",
|
119
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@7.0.0-dev.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@7.0.0-dev.13/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|