coolcare-lite-scada-component 4.1.1 → 4.1.2
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/es/components/BoxShadowPicker/index.less.d.ts +9 -9
- package/es/components/ColorPicker/util.js +4 -4
- package/es/components/DialogHistory/index.js +26 -7
- package/es/components/Icon/index.js +1 -1
- package/es/components/IconFont/index.js +1 -1
- package/es/components/ImageUploader/index.js +7 -15
- package/es/constant.js +2 -2
- package/es/element/BorderBox/util/typings.d.ts +9 -9
- package/es/element/Decoration/util/typings.d.ts +9 -9
- package/es/element/EleFan/Component.js +1 -1
- package/es/element/EleState/index.js +1 -1
- package/es/element/PipeNodes/NodeBL/index.js +1 -1
- package/es/element/PipeNodes/NodeBR/index.js +1 -1
- package/es/element/PipeNodes/NodeBottom/index.js +1 -1
- package/es/element/PipeNodes/NodeCenter/index.js +1 -1
- package/es/element/PipeNodes/NodeHorizontal/index.js +1 -1
- package/es/element/PipeNodes/NodeLeft/index.js +1 -1
- package/es/element/PipeNodes/NodeRight/index.js +1 -1
- package/es/element/PipeNodes/NodeTL/index.js +1 -1
- package/es/element/PipeNodes/NodeTR/index.js +1 -1
- package/es/element/PipeNodes/NodeTop/index.js +1 -1
- package/es/element/PipeNodes/NodeVertical/index.js +1 -1
- package/es/pages/document.ejs +1 -1
- package/es/pages/editor/PanelLeft/BasicShapeList/listData.js +8 -8
- package/es/pages/editor/PanelLeft/BorderBoxEleList/index.less.d.ts +7 -7
- package/es/pages/editor/PanelLeft/DecorationEleList/index.less.d.ts +7 -7
- package/es/pages/editor/PanelLeft/GroupManageDialog/index.js +4 -4
- package/es/pages/editor/PanelLeft/MetaEleList/listData.js +11 -11
- package/es/pages/editor/PanelLeft/PipeEleList/listData.js +11 -11
- package/es/pages/editor/PanelLeft/PointCardEleList/listData.js +6 -6
- package/es/pages/editor/PanelLeft/RecommendEleList/listData.js +3 -3
- package/es/pages/editor/PanelLeft/index.js +3 -3
- package/es/pages/editor/PanelRight/index.less.d.ts +7 -7
- package/es/services/common/Uploader.js +3 -2
- package/es/services/common/typings.d.ts +15 -15
- package/es/services/master/typings.d.ts +362 -362
- package/es/services/product/typings.d.ts +1045 -1045
- package/es/services/project/typings.d.ts +1609 -1609
- package/es/services/request.js +8 -9
- package/es/shims.x6.d.ts +15 -15
- package/es/utils/cssStyle.js +4 -4
- package/es/utils/decomposeMatrix.js +5 -5
- package/es/utils/events.js +3 -3
- package/es/utils/index.js +34 -34
- package/package.json +1 -1
package/es/services/request.js
CHANGED
|
@@ -34,8 +34,8 @@ var codeMessage = {
|
|
|
34
34
|
|
|
35
35
|
/** 判断是否已显示登录过期 Modal ,防止同时多个请求,显示多个 Modal 的情况 */
|
|
36
36
|
var isShowLoginOverdueModal = false;
|
|
37
|
-
/**
|
|
38
|
-
* 异常处理程序
|
|
37
|
+
/**
|
|
38
|
+
* 异常处理程序
|
|
39
39
|
*/
|
|
40
40
|
var errorHandler = function errorHandler(error) {
|
|
41
41
|
var data = error.data,
|
|
@@ -93,10 +93,10 @@ export function setRequrl(val) {
|
|
|
93
93
|
reqUrl = val;
|
|
94
94
|
}
|
|
95
95
|
var requestPrefixMap = {
|
|
96
|
-
dev: '',
|
|
97
|
-
prod: '',
|
|
98
|
-
staging: '',
|
|
99
|
-
generalfushi: ''
|
|
96
|
+
dev: 'https://dev.sinocold.com:30443',
|
|
97
|
+
prod: 'https://iot.sinocold.net',
|
|
98
|
+
staging: 'https://dev.sinocold.com:30443',
|
|
99
|
+
generalfushi: 'https://iot.generalfushi.com'
|
|
100
100
|
};
|
|
101
101
|
var REPEAT_WRITE_REQUEST_INTERVAL = 800;
|
|
102
102
|
var WRITE_REQUEST_METHODS_WITHOUT_POST = ['PUT', 'PATCH', 'DELETE'];
|
|
@@ -216,7 +216,7 @@ requestClient.interceptors.request.use(function (url, options) {
|
|
|
216
216
|
/** 响应拦截器 */
|
|
217
217
|
requestClient.interceptors.response.use(/*#__PURE__*/function () {
|
|
218
218
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(response, options) {
|
|
219
|
-
var _response$headers, _response$headers2,
|
|
219
|
+
var _response$headers, _response$headers2, xAccessToken, accessToken, data, _data$code, errorText;
|
|
220
220
|
return _regenerator().w(function (_context2) {
|
|
221
221
|
while (1) switch (_context2.n) {
|
|
222
222
|
case 0:
|
|
@@ -249,8 +249,7 @@ requestClient.interceptors.response.use(/*#__PURE__*/function () {
|
|
|
249
249
|
return response.clone().json();
|
|
250
250
|
case 4:
|
|
251
251
|
data = _context2.v;
|
|
252
|
-
|
|
253
|
-
if (!succeeded) {
|
|
252
|
+
if (!data.success) {
|
|
254
253
|
if (Object.keys(codeMessage).includes((_data$code = data.code) === null || _data$code === void 0 ? void 0 : _data$code.toString())) {
|
|
255
254
|
errorText = codeMessage[data.code];
|
|
256
255
|
notification.error({
|
package/es/shims.x6.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
// import '@antv/x6'
|
|
3
|
-
// import '@antv/x6-react-shape'
|
|
4
|
-
|
|
5
|
-
// declare module '@antv/x6' {
|
|
6
|
-
// interface Cell {
|
|
7
|
-
// /** cell 的 tooltip 内容(React 组件) */
|
|
8
|
-
// tooltipContent?: React.FunctionComponent<any>;
|
|
9
|
-
// /** 是否禁用 resize */
|
|
10
|
-
// disableResize?: boolean;
|
|
11
|
-
// }
|
|
12
|
-
// }
|
|
13
|
-
|
|
14
|
-
// declare module '@antv/x6-react-shape' {
|
|
15
|
-
// }
|
|
1
|
+
// // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
// import '@antv/x6'
|
|
3
|
+
// import '@antv/x6-react-shape'
|
|
4
|
+
|
|
5
|
+
// declare module '@antv/x6' {
|
|
6
|
+
// interface Cell {
|
|
7
|
+
// /** cell 的 tooltip 内容(React 组件) */
|
|
8
|
+
// tooltipContent?: React.FunctionComponent<any>;
|
|
9
|
+
// /** 是否禁用 resize */
|
|
10
|
+
// disableResize?: boolean;
|
|
11
|
+
// }
|
|
12
|
+
// }
|
|
13
|
+
|
|
14
|
+
// declare module '@antv/x6-react-shape' {
|
|
15
|
+
// }
|
package/es/utils/cssStyle.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var degrees = 180 / Math.PI;
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* 将 matrix 分解成 translate scale skew rotate
|
|
5
|
-
* https:// github.com/d3/d3-interpolate/blob/main/src/transform/decompose.js#L12-L25
|
|
6
|
-
* @param matrix
|
|
7
|
-
* @returns
|
|
3
|
+
/**
|
|
4
|
+
* 将 matrix 分解成 translate scale skew rotate
|
|
5
|
+
* https:// github.com/d3/d3-interpolate/blob/main/src/transform/decompose.js#L12-L25
|
|
6
|
+
* @param matrix
|
|
7
|
+
* @returns
|
|
8
8
|
*/
|
|
9
9
|
export default function decompose(matrix) {
|
|
10
10
|
var a = matrix.a,
|
package/es/utils/events.js
CHANGED
package/es/utils/index.js
CHANGED
|
@@ -7,11 +7,11 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
7
7
|
export * from "./type";
|
|
8
8
|
export * from "./getMittMeta";
|
|
9
9
|
export { default as queryToObject } from "./queryToObject";
|
|
10
|
-
/**
|
|
11
|
-
* 交换数组元素
|
|
12
|
-
* @param arr 数组
|
|
13
|
-
* @param index1 元素下标1
|
|
14
|
-
* @param index2 元素下标2
|
|
10
|
+
/**
|
|
11
|
+
* 交换数组元素
|
|
12
|
+
* @param arr 数组
|
|
13
|
+
* @param index1 元素下标1
|
|
14
|
+
* @param index2 元素下标2
|
|
15
15
|
*/
|
|
16
16
|
export function arrayEleSwap(arr, index1, index2) {
|
|
17
17
|
var temp = arr[index1];
|
|
@@ -19,10 +19,10 @@ export function arrayEleSwap(arr, index1, index2) {
|
|
|
19
19
|
arr[index2] = temp;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* 计算鼠标相对事件触发的 currentTarget 元素的相对位置
|
|
24
|
-
* @param e
|
|
25
|
-
* @returns { x: number; y: number }
|
|
22
|
+
/**
|
|
23
|
+
* 计算鼠标相对事件触发的 currentTarget 元素的相对位置
|
|
24
|
+
* @param e
|
|
25
|
+
* @returns { x: number; y: number }
|
|
26
26
|
*/
|
|
27
27
|
export function calculateMousePosition(e) {
|
|
28
28
|
var currentTarget = e.currentTarget;
|
|
@@ -33,17 +33,17 @@ export function calculateMousePosition(e) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* 特殊字符转义,防止特殊字符导致json字符串转换成json对象出错
|
|
38
|
-
* @param {*} string
|
|
39
|
-
* @returns string
|
|
36
|
+
/**
|
|
37
|
+
* 特殊字符转义,防止特殊字符导致json字符串转换成json对象出错
|
|
38
|
+
* @param {*} string
|
|
39
|
+
* @returns string
|
|
40
40
|
*/
|
|
41
41
|
export var transSpecialChar = function transSpecialChar(string) {
|
|
42
42
|
return string.replace(/>/g, '>').replace(/</g, '<').replace(/ /g, ' ').replace(/(")+/g, '"').replace(/'/g, ''').replace(/\r/g, '\\r').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\\/g, '\\\\');
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* 判断电脑是 window 还是 mac
|
|
45
|
+
/**
|
|
46
|
+
* 判断电脑是 window 还是 mac
|
|
47
47
|
*/
|
|
48
48
|
export function getOS() {
|
|
49
49
|
var agent = navigator.userAgent.toLowerCase();
|
|
@@ -60,12 +60,12 @@ export function getOS() {
|
|
|
60
60
|
return 'window';
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* 生成随机字符串
|
|
65
|
-
*
|
|
66
|
-
* @param {*} length 指定长度
|
|
67
|
-
* @param {*} chars 字符集
|
|
68
|
-
* @returns
|
|
63
|
+
/**
|
|
64
|
+
* 生成随机字符串
|
|
65
|
+
*
|
|
66
|
+
* @param {*} length 指定长度
|
|
67
|
+
* @param {*} chars 字符集
|
|
68
|
+
* @returns
|
|
69
69
|
*/
|
|
70
70
|
export function randomString(length) {
|
|
71
71
|
var chars = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
@@ -76,11 +76,11 @@ export function randomString(length) {
|
|
|
76
76
|
return result;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
/**
|
|
80
|
-
* 生成指定范围的随机数
|
|
81
|
-
* @param minNum 最小值
|
|
82
|
-
* @param maxNum 最大值
|
|
83
|
-
* @returns
|
|
79
|
+
/**
|
|
80
|
+
* 生成指定范围的随机数
|
|
81
|
+
* @param minNum 最小值
|
|
82
|
+
* @param maxNum 最大值
|
|
83
|
+
* @returns
|
|
84
84
|
*/
|
|
85
85
|
export function randomExtend(minNum, maxNum) {
|
|
86
86
|
if (maxNum === undefined) {
|
|
@@ -89,11 +89,11 @@ export function randomExtend(minNum, maxNum) {
|
|
|
89
89
|
return Math.floor(Math.random() * (maxNum - minNum + 1) + minNum);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
/**
|
|
93
|
-
* 给 canvas 添加水印
|
|
94
|
-
* @param canvas canvas 对象
|
|
95
|
-
* @param text 水印字体
|
|
96
|
-
* @returns canvas
|
|
92
|
+
/**
|
|
93
|
+
* 给 canvas 添加水印
|
|
94
|
+
* @param canvas canvas 对象
|
|
95
|
+
* @param text 水印字体
|
|
96
|
+
* @returns canvas
|
|
97
97
|
*/
|
|
98
98
|
export function waterMark(canvas, text) {
|
|
99
99
|
var ctx = canvas.getContext('2d');
|
|
@@ -139,9 +139,9 @@ export function pointValueFormat(expressions, value) {
|
|
|
139
139
|
return '-';
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
/**
|
|
143
|
-
* 从点位 id 中获取产品编号、设备编号、标识符
|
|
144
|
-
* @param {string} pointId - The point ID of the point you want to get the info from.
|
|
142
|
+
/**
|
|
143
|
+
* 从点位 id 中获取产品编号、设备编号、标识符
|
|
144
|
+
* @param {string} pointId - The point ID of the point you want to get the info from.
|
|
145
145
|
*/
|
|
146
146
|
export function getInfoFromPointId(pointId) {
|
|
147
147
|
if (!pointId) {
|