coolcare-lite-scada-component 2.0.37 → 3.0.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.
Files changed (38) hide show
  1. package/es/components/DialogHistory/index.css +22 -0
  2. package/es/components/DialogHistory/index.js +136 -20
  3. package/es/components/DialogImagePicker/GroupPanel/index.js +1 -1
  4. package/es/components/ECharts/index.js +31 -23
  5. package/es/components/Icon/index.js +1 -1
  6. package/es/element/EleFan/Component.js +1 -1
  7. package/es/element/EleFanBySvg/index.js +3 -3
  8. package/es/element/EleImage/index.js +1 -1
  9. package/es/element/ElePointImage/index.js +1 -1
  10. package/es/element/EleState/index.js +1 -1
  11. package/es/element/EleSwitch/Component.js +3 -3
  12. package/es/element/PipeNodes/NodeBL/index.js +1 -1
  13. package/es/element/PipeNodes/NodeBR/index.js +1 -1
  14. package/es/element/PipeNodes/NodeBottom/index.js +1 -1
  15. package/es/element/PipeNodes/NodeCenter/index.js +1 -1
  16. package/es/element/PipeNodes/NodeHorizontal/index.js +1 -1
  17. package/es/element/PipeNodes/NodeLeft/index.js +1 -1
  18. package/es/element/PipeNodes/NodeRight/index.js +1 -1
  19. package/es/element/PipeNodes/NodeTL/index.js +1 -1
  20. package/es/element/PipeNodes/NodeTR/index.js +1 -1
  21. package/es/element/PipeNodes/NodeTop/index.js +1 -1
  22. package/es/element/PipeNodes/NodeVertical/index.js +1 -1
  23. package/es/element/type.d.ts +1 -0
  24. package/es/element/utils/pointWrite.js +6 -7
  25. package/es/pages/display/Player/index.js +3 -3
  26. package/es/pages/display/index.js +2 -2
  27. package/es/pages/editor/PanelLeft/BasicShapeList/listData.js +8 -8
  28. package/es/pages/editor/PanelLeft/ImgGroup/index.js +1 -1
  29. package/es/pages/editor/PanelLeft/MetaEleList/listData.js +14 -14
  30. package/es/pages/editor/PanelLeft/PipeEleList/listData.js +11 -11
  31. package/es/pages/editor/PanelLeft/PointCardEleList/listData.js +6 -6
  32. package/es/pages/editor/PanelLeft/RecommendEleList/listData.js +4 -4
  33. package/es/pages/editor/index.js +15 -2
  34. package/es/services/request.js +1 -1
  35. package/es/typings.d.ts +6 -0
  36. package/es/utils/auth.js +2 -2
  37. package/es/utils/date.js +7 -0
  38. package/package.json +3 -3
@@ -8,3 +8,25 @@
8
8
  left: 50%;
9
9
  transform: translate(-50%, -50%);
10
10
  }
11
+ .totalBox {
12
+ display: flex;
13
+ flex-direction: column;
14
+ width: 300px;
15
+ padding-left: 16px;
16
+ border-left: 1px solid #e8e8e8;
17
+ }
18
+ .totalBox .totalItem {
19
+ display: flex;
20
+ }
21
+ .totalBox .totalItem:not(:last-child) {
22
+ margin-bottom: 8px;
23
+ padding-bottom: 8px;
24
+ border-bottom: 1px solid #e8e8e8;
25
+ }
26
+ .totalBox .totalItem .totalItemTitle {
27
+ width: 80px;
28
+ font-weight: 600;
29
+ }
30
+ .totalBox .totalItem .totalItemContent {
31
+ flex: 1;
32
+ }
@@ -18,11 +18,12 @@ import { Modal, Form, message, InputNumber, DatePicker, Empty, Typography, Butto
18
18
  import moment from 'moment';
19
19
  import { useDebounceFn } from 'ahooks';
20
20
  import { GetPointHistoryData } from "../../services/gateway/Point";
21
- import ModalChoosePoint from "../ModalChoosePoint";
22
21
  import Echarts from "../ECharts";
23
22
  // @ts-ignore
24
23
 
25
24
  import styles from "./index.css";
25
+ import ModalChoosePoint from "../ModalChoosePoint";
26
+ import { dateDiff } from "../../utils/date";
26
27
  var Link = Typography.Link;
27
28
  var RangePicker = DatePicker.RangePicker;
28
29
  var defaultInterval = 2;
@@ -72,26 +73,28 @@ var DialogPointHistory = function DialogPointHistory(_ref) {
72
73
  _useState10 = _slicedToArray(_useState9, 2),
73
74
  pointIdList = _useState10[0],
74
75
  setPointIdList = _useState10[1];
75
- /** 当前点位时间段内是否有报警 */
76
- var _useState11 = useState(false),
76
+ var _useState11 = useState(undefined),
77
77
  _useState12 = _slicedToArray(_useState11, 2),
78
- haveAlarm = _useState12[0],
79
- setHaveAlarm = _useState12[1];
80
- var _useState13 = useState(undefined),
78
+ deviceId = _useState12[0],
79
+ setDeviceId = _useState12[1];
80
+ var _useState13 = useState([]),
81
81
  _useState14 = _slicedToArray(_useState13, 2),
82
- deviceId = _useState14[0],
83
- setDeviceId = _useState14[1];
84
- var _useState15 = useState([]),
82
+ tagList = _useState14[0],
83
+ setTagList = _useState14[1];
84
+ var _useState15 = useState(false),
85
85
  _useState16 = _slicedToArray(_useState15, 2),
86
- tagList = _useState16[0],
87
- setTagList = _useState16[1];
86
+ dataZoom = _useState16[0],
87
+ setDataZoom = _useState16[1];
88
+ var _useState17 = useState([]),
89
+ _useState18 = _slicedToArray(_useState17, 2),
90
+ dataZoomData = _useState18[0],
91
+ setDataZoomData = _useState18[1];
88
92
  var closeModal = function closeModal() {
89
93
  form.resetFields();
90
94
  setLoading(false);
91
95
  setChartOptions(undefined);
92
96
  setIsNoData(false);
93
97
  setVisiblePointSet(false);
94
- setHaveAlarm(false);
95
98
  setPointIdList([]);
96
99
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
97
100
  };
@@ -165,17 +168,13 @@ var DialogPointHistory = function DialogPointHistory(_ref) {
165
168
  setIsNoData(false);
166
169
  }
167
170
  data.forEach(function (item) {
168
- var _item$pointAlarmTimeF, _item$pointDataList;
171
+ var _item$pointDataList;
169
172
  setTagList(function (old) {
170
173
  return [].concat(_toConsumableArray(old), [{
171
174
  name: "".concat(item.deviceName, "-").concat(item.pointName),
172
175
  key: item.pointId
173
176
  }]);
174
177
  });
175
- // @ts-ignore
176
- if ((_item$pointAlarmTimeF = item.pointAlarmTimeFrameList) === null || _item$pointAlarmTimeF === void 0 ? void 0 : _item$pointAlarmTimeF.length) {
177
- setHaveAlarm(true);
178
- }
179
178
  var pointEnumId = item.pointEnumId,
180
179
  pointEnumItemList = item.pointEnumItemList;
181
180
  var unit = item.unit;
@@ -260,7 +259,7 @@ var DialogPointHistory = function DialogPointHistory(_ref) {
260
259
  }
261
260
  });
262
261
  });
263
-
262
+ chart.current.getEchartsInstance().resize();
264
263
  // 应用图形配置
265
264
  setChartOptions({
266
265
  color: ['#2297E8', '#48CE38', '#F8D156', '#FD9827', '#9764DC', '#1FCA6A'],
@@ -392,12 +391,16 @@ var DialogPointHistory = function DialogPointHistory(_ref) {
392
391
  title: "\u5386\u53F2\u6570\u636E\u66F2\u7EBF",
393
392
  open: visible,
394
393
  closable: true,
395
- width: 1300,
394
+ width: 1600,
396
395
  zIndex: 42000,
397
396
  footer: null,
398
397
  onCancel: closeModal,
399
398
  afterClose: closeModal,
400
399
  getContainer: false
400
+ }, /*#__PURE__*/React.createElement("div", {
401
+ className: "row"
402
+ }, /*#__PURE__*/React.createElement("div", {
403
+ className: "flex1"
401
404
  }, /*#__PURE__*/React.createElement(Form, {
402
405
  requiredMark: false,
403
406
  form: form,
@@ -479,12 +482,125 @@ var DialogPointHistory = function DialogPointHistory(_ref) {
479
482
  loading: loading,
480
483
  style: {
481
484
  height: '500px'
485
+ },
486
+ onEvents: {
487
+ datazoom: function datazoom(params) {
488
+ var _chart$current, _chart$current$getEch;
489
+ // 获取当前 echarts 实例
490
+ var myChart = chart === null || chart === void 0 ? void 0 : (_chart$current = chart.current) === null || _chart$current === void 0 ? void 0 : (_chart$current$getEch = _chart$current.getEchartsInstance) === null || _chart$current$getEch === void 0 ? void 0 : _chart$current$getEch.call(_chart$current);
491
+ if (!myChart) return;
492
+
493
+ // 获取当前配置
494
+ var option = myChart.getOption();
495
+ // 获取缩放范围
496
+ var startValue = params.start;
497
+ var endValue = params.end;
498
+ if (startValue === 0 && endValue === 100) {
499
+ setDataZoom(false);
500
+ return;
501
+ }
502
+ // 获取所有系列的数据
503
+ var visibleData = option.series.filter(function (item) {
504
+ return ['totalenergy', 'tlwatercs', 'tlhgscs'].includes(item.identifierName);
505
+ }).map(function (series) {
506
+ // 获取当前显示范围的数据
507
+ var data = series.data.filter(function (_, index) {
508
+ var percent = index / series.data.length * 100;
509
+ return percent >= startValue && percent <= endValue;
510
+ });
511
+ return {
512
+ name: series.name,
513
+ data: data
514
+ };
515
+ });
516
+ if (visibleData.length) {
517
+ setDataZoomData(visibleData);
518
+ setDataZoom(true);
519
+ } else {
520
+ setDataZoom(false);
521
+ }
522
+ console.log('当前显示的数据集合:', visibleData);
523
+ }
482
524
  }
483
525
  }), isNoData && /*#__PURE__*/React.createElement(Empty, {
484
526
  className: styles['chart-empty'],
485
527
  image: Empty.PRESENTED_IMAGE_SIMPLE,
486
528
  description: "\u6682\u65E0\u70B9\u4F4D\u5386\u53F2\u6570\u636E"
487
- })), /*#__PURE__*/React.createElement(ModalChoosePoint, {
529
+ }))), pointIdList.some(function (item) {
530
+ return ['totalenergy', 'tlwatercs', 'tlhgscs'].some(function (_item) {
531
+ return item.includes(_item);
532
+ });
533
+ }) ? /*#__PURE__*/React.createElement("div", {
534
+ className: styles.totalBox
535
+ }, /*#__PURE__*/React.createElement("div", {
536
+ className: styles.totalItem
537
+ }, /*#__PURE__*/React.createElement("div", {
538
+ className: styles.totalItemTitle
539
+ }, /*#__PURE__*/React.createElement("span", null, "\u65F6\u95F4\u8DE8\u5EA6\uFF1A")), /*#__PURE__*/React.createElement("div", {
540
+ className: styles.totalItemContent
541
+ }, /*#__PURE__*/React.createElement("span", null, dataZoom && dataZoomData.length ? function (_longestSeries$data) {
542
+ var longestSeries = dataZoomData.reduce(function (prev, curr) {
543
+ var _prev$data, _curr$data;
544
+ return ((prev === null || prev === void 0 ? void 0 : (_prev$data = prev.data) === null || _prev$data === void 0 ? void 0 : _prev$data.length) || 0) > ((curr === null || curr === void 0 ? void 0 : (_curr$data = curr.data) === null || _curr$data === void 0 ? void 0 : _curr$data.length) || 0) ? prev : curr;
545
+ });
546
+ if (!(longestSeries === null || longestSeries === void 0 ? void 0 : (_longestSeries$data = longestSeries.data) === null || _longestSeries$data === void 0 ? void 0 : _longestSeries$data.length)) return '-';
547
+ var firstPoint = longestSeries.data[0];
548
+ var lastPoint = longestSeries.data[longestSeries.data.length - 1];
549
+ return firstPoint && lastPoint ? dateDiff(firstPoint[0], lastPoint[0]) : '-';
550
+ }() : function () {
551
+ var dateRange = form.getFieldValue('dateRange');
552
+ return (dateRange === null || dateRange === void 0 ? void 0 : dateRange[0]) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange[1]) ? dateDiff(dateRange[0], dateRange[1]) : '-';
553
+ }()))), /*#__PURE__*/React.createElement("div", {
554
+ className: styles.totalItem
555
+ }, /*#__PURE__*/React.createElement("div", {
556
+ className: styles.totalItemTitle
557
+ }, /*#__PURE__*/React.createElement("span", null, "\u8017", ['电', '水', '气'][['totalenergy', 'tlwatercs', 'tlhgscs'].findIndex(function (item) {
558
+ return pointIdList[0].includes(item);
559
+ })], "\u91CF\uFF1A")), /*#__PURE__*/React.createElement("div", {
560
+ className: styles.totalItemContent
561
+ }, (dataZoom ? dataZoomData : ((chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.series) || []).filter(function (item) {
562
+ return ['totalenergy', 'tlwatercs', 'tlhgscs'].includes(item.identifierName);
563
+ })).map(function (item) {
564
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, item.name, ": "), /*#__PURE__*/React.createElement("span", null, parseFloat((Math.max.apply(Math, _toConsumableArray(item.data.map(function (_item) {
565
+ return _item[1];
566
+ }))) - Math.min.apply(Math, _toConsumableArray(item.data.map(function (_item) {
567
+ return _item[1];
568
+ })))).toFixed(2))));
569
+ }))), /*#__PURE__*/React.createElement("div", {
570
+ className: styles.totalItem
571
+ }, /*#__PURE__*/React.createElement("div", {
572
+ className: styles.totalItemTitle
573
+ }, /*#__PURE__*/React.createElement("span", null, "\u671F\u672B\u503C\uFF1A")), /*#__PURE__*/React.createElement("div", {
574
+ className: styles.totalItemContent
575
+ }, ((dataZoom ? dataZoomData : chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.series.filter(function (item) {
576
+ return ['totalenergy', 'tlwatercs', 'tlhgscs'].includes(item.identifierName);
577
+ })) || []).map(function (item) {
578
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, item.name, ": "), /*#__PURE__*/React.createElement("span", null, Math.max.apply(Math, _toConsumableArray(item.data.map(function (_item) {
579
+ return _item[1];
580
+ })))));
581
+ }))), /*#__PURE__*/React.createElement("div", {
582
+ className: styles.totalItem
583
+ }, /*#__PURE__*/React.createElement("div", {
584
+ className: styles.totalItemTitle
585
+ }, /*#__PURE__*/React.createElement("span", null, "\u671F\u521D\u503C\uFF1A")), /*#__PURE__*/React.createElement("div", {
586
+ className: styles.totalItemContent
587
+ }, ((dataZoom ? dataZoomData : chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.series.filter(function (item) {
588
+ return ['totalenergy', 'tlwatercs', 'tlhgscs'].includes(item.identifierName);
589
+ })) || []).map(function (item) {
590
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, item.name, ": "), /*#__PURE__*/React.createElement("span", null, Math.min.apply(Math, _toConsumableArray(item.data.map(function (_item) {
591
+ return _item[1];
592
+ })))));
593
+ }))), /*#__PURE__*/React.createElement("div", {
594
+ className: styles.totalItem
595
+ }, /*#__PURE__*/React.createElement("div", {
596
+ className: styles.totalItemTitle
597
+ }, /*#__PURE__*/React.createElement("span", null, "\u8BA1\u91CF\u5355\u4F4D\uFF1A")), /*#__PURE__*/React.createElement("div", {
598
+ className: styles.totalItemContent
599
+ }, ((chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.series.filter(function (item) {
600
+ return ['totalenergy', 'tlwatercs', 'tlhgscs'].includes(item.identifierName);
601
+ })[0]) || {
602
+ unit: ''
603
+ }).unit))) : null), /*#__PURE__*/React.createElement(ModalChoosePoint, {
488
604
  visible: visiblePointSet,
489
605
  onSubmit: function onSubmit(val) {
490
606
  setPointIdList(function (pre) {
@@ -46,7 +46,7 @@ var GroupItemPanel = function GroupItemPanel(_ref) {
46
46
  setImgList(((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list.map(function (item) {
47
47
  var _item$img;
48
48
  return _objectSpread(_objectSpread({}, item), {}, {
49
- img: (_item$img = item.img) === null || _item$img === void 0 ? void 0 : _item$img.replace('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com', 'http://10.189.40.132:9000/iot')
49
+ img: (_item$img = item.img) === null || _item$img === void 0 ? void 0 : _item$img.replace('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com', '/imgfile/iot')
50
50
  });
51
51
  })) || []);
52
52
  } else {
@@ -6,6 +6,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import React from "react";
8
8
  import { useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
9
+ import { Spin } from 'antd';
9
10
  import { useSize } from 'ahooks';
10
11
  // 引入 echarts 核心模块,核心模块提供了 echarts 使用必须要的接口。
11
12
 
@@ -14,12 +15,14 @@ import styles from "./index.css";
14
15
  /** 默认的颜色组 */
15
16
  export var defaultColors = ['#1890FF', '#04C74C', '#FFCD00', '#253076', '#8F30E9', '#03C7C3'];
16
17
  var EChartsComponent = function EChartsComponent(_ref, ref) {
17
- var option = _ref.option,
18
+ var id = _ref.id,
19
+ option = _ref.option,
18
20
  style = _ref.style,
19
21
  className = _ref.className,
20
22
  _ref$loading = _ref.loading,
21
- loading = _ref$loading === void 0 ? false : _ref$loading;
22
- var echartLoaderStatus = useExternal('http://10.189.40.132:9000/iot/package/echarts/5.2.2/echarts.min.js', {
23
+ loading = _ref$loading === void 0 ? false : _ref$loading,
24
+ onEvents = _ref.onEvents;
25
+ var echartLoaderStatus = useExternal('/imgfile/iot/package/echarts/5.2.2/echarts.min.js', {
23
26
  type: 'js',
24
27
  js: {
25
28
  async: true
@@ -41,34 +44,33 @@ var EChartsComponent = function EChartsComponent(_ref, ref) {
41
44
  useEffect(function () {
42
45
  if (wrapRef.current && echartLoaderStatus === 'ready') {
43
46
  // 初始化图表
47
+ // @ts-ignore
44
48
  chartInstance.current = window.echarts.init(wrapRef.current);
49
+ // 绑定事件
50
+ if (onEvents && chartInstance.current) {
51
+ Object.keys(onEvents).forEach(function (eventName) {
52
+ var _chartInstance$curren;
53
+ (_chartInstance$curren = chartInstance.current) === null || _chartInstance$curren === void 0 ? void 0 : _chartInstance$curren.on(eventName, onEvents[eventName]);
54
+ });
55
+ }
45
56
  // wrapRef.current.style.removeProperty('position')
46
57
  return function () {
47
- var _chartInstance$curren;
58
+ var _chartInstance$curren3;
48
59
  // 组件卸载时,调用 ECharts 的销毁函数
49
- (_chartInstance$curren = chartInstance.current) === null || _chartInstance$curren === void 0 ? void 0 : _chartInstance$curren.dispose();
60
+ Object.keys(onEvents).forEach(function (eventName) {
61
+ var _chartInstance$curren2;
62
+ (_chartInstance$curren2 = chartInstance.current) === null || _chartInstance$curren2 === void 0 ? void 0 : _chartInstance$curren2.off(eventName);
63
+ });
64
+ (_chartInstance$curren3 = chartInstance.current) === null || _chartInstance$curren3 === void 0 ? void 0 : _chartInstance$curren3.dispose();
50
65
  };
51
66
  }
52
67
  return function () {};
53
68
  }, [echartLoaderStatus]);
54
69
  useEffect(function () {
55
- var _chartInstance$curren2;
70
+ var _chartInstance$curren4;
56
71
  // 在 wrap 大小改变后,resize 图表
57
- (_chartInstance$curren2 = chartInstance.current) === null || _chartInstance$curren2 === void 0 ? void 0 : _chartInstance$curren2.resize();
72
+ (_chartInstance$curren4 = chartInstance.current) === null || _chartInstance$curren4 === void 0 ? void 0 : _chartInstance$curren4.resize();
58
73
  }, [size]);
59
- useEffect(function () {
60
- if (loading) {
61
- var _chartInstance$curren3;
62
- (_chartInstance$curren3 = chartInstance.current) === null || _chartInstance$curren3 === void 0 ? void 0 : _chartInstance$curren3.showLoading({
63
- color: '#40a9ff',
64
- lineWidth: 2,
65
- text: '加载中...'
66
- });
67
- } else {
68
- var _chartInstance$curren4;
69
- (_chartInstance$curren4 = chartInstance.current) === null || _chartInstance$curren4 === void 0 ? void 0 : _chartInstance$curren4.hideLoading();
70
- }
71
- }, [loading]);
72
74
  useEffect(function () {
73
75
  // 监听 props.option, 变更后重新渲染图表
74
76
  if (!option) {
@@ -84,11 +86,17 @@ var EChartsComponent = function EChartsComponent(_ref, ref) {
84
86
  }, option));
85
87
  }
86
88
  }, [option, echartLoaderStatus]);
87
- return /*#__PURE__*/React.createElement("div", {
88
- style: style
89
+ return /*#__PURE__*/React.createElement(Spin, {
90
+ spinning: loading || echartLoaderStatus === 'loading',
91
+ delay: 200
89
92
  }, /*#__PURE__*/React.createElement("div", {
93
+ id: id,
90
94
  ref: wrapRef,
91
- className: "".concat(styles.echarts, " ").concat(className)
95
+ className: "".concat(styles.echarts, " ").concat(className),
96
+ style: style || {
97
+ height: '220px',
98
+ width: '100%'
99
+ }
92
100
  }));
93
101
  };
94
102
  export default /*#__PURE__*/forwardRef(EChartsComponent);
@@ -1,5 +1,5 @@
1
1
  import { createFromIconfontCN } from '@ant-design/icons';
2
2
  var MyIcon = createFromIconfontCN({
3
- scriptUrl: 'http://10.189.40.132:9000/iot/iconfont/scada.js' // 在 iconfont.cn 上生成
3
+ scriptUrl: '/imgfile/iot/iconfont/scada.js' // 在 iconfont.cn 上生成
4
4
  });
5
5
  export default MyIcon;
@@ -98,7 +98,7 @@ var EleFanComponent = function EleFanComponent(_ref) {
98
98
  className: styles.wrap
99
99
  }, /*#__PURE__*/React.createElement("img", {
100
100
  className: "".concat(styles['fan-img'], " ").concat(fanIsOn ? styles.on : ''),
101
- src: "http://10.189.40.132:9000/iot/fan.png"
101
+ src: "/imgfile/iot/fan.png"
102
102
  })));
103
103
  };
104
104
  export default /*#__PURE__*/memo(EleFanComponent, reactShapeNodeAreEqual);
@@ -145,9 +145,9 @@ var EleFan = /*#__PURE__*/function (_NodeBase) {
145
145
  // 开关点位
146
146
  var _eventHandler3 = function _eventHandler3(pointData) {
147
147
  var _data$key7;
148
- var imgUrl = 'http://10.189.40.132:9000/iot/elements/fan-off.jpg';
148
+ var imgUrl = '/imgfile/iot/elements/fan-off.jpg';
149
149
  if (getValueByExpression(pointData.value, (_data$key7 = data[key]) === null || _data$key7 === void 0 ? void 0 : _data$key7.expressions) === '风机开') {
150
- imgUrl = 'http://10.189.40.132:9000/iot/elements/fan.gif';
150
+ imgUrl = '/imgfile/iot/elements/fan.gif';
151
151
  }
152
152
  _this2.attr('image/xlinkHref', imgUrl);
153
153
  };
@@ -241,7 +241,7 @@ export var defaultConfig = {
241
241
  refY: '20%',
242
242
  refWidth: '60%',
243
243
  refHeight: '60%',
244
- xlinkHref: 'http://10.189.40.132:9000/iot/elements/fan.gif'
244
+ xlinkHref: '/imgfile/iot/elements/fan.gif'
245
245
  }
246
246
  },
247
247
  tools: [{
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  // https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/preserveAspectRatio
43
43
  refWidth: '100%',
44
44
  refHeight: '100%',
45
- xlinkHref: 'http://10.189.40.132:9000/iot/%E5%9B%BE%E7%89%87.svg'
45
+ xlinkHref: '/imgfile/iot/%E5%9B%BE%E7%89%87.svg'
46
46
  }
47
47
  },
48
48
  data: {
@@ -38,7 +38,7 @@ export var defaultConfig = {
38
38
  width: 36,
39
39
  height: 29,
40
40
  data: {
41
- imgSrc: 'http://10.189.40.132:9000/iot/平面图/元素图片/图片.svg',
41
+ imgSrc: '/imgfile/iot/平面图/元素图片/图片.svg',
42
42
  pointList: [],
43
43
  pointListLimit: 1,
44
44
  keepRatio: true,
@@ -89,7 +89,7 @@ export var defaultConfig = {
89
89
  refWidth: '60%',
90
90
  refHeight: '60%',
91
91
  fill: 'red',
92
- xlinkHref: 'http://10.189.40.132:9000/iot/img-bed/202111021014940.svg'
92
+ xlinkHref: '/imgfile/iot/img-bed/202111021014940.svg'
93
93
  },
94
94
  label: {
95
95
  text: '温度',
@@ -11,6 +11,7 @@ import Switch from "../../components/Switch";
11
11
  import { usePointWatch } from "../../hooks";
12
12
  import { isNumber } from "../../utils";
13
13
  import { pointWrite } from "../utils";
14
+ import "../../elementCss.css";
14
15
  import styles from "./index.css";
15
16
  import { ExclamationCircleOutlined } from '@ant-design/icons';
16
17
  var confirm = Modal.confirm;
@@ -37,6 +38,7 @@ var EleSwitchComponent = function EleSwitchComponent(_ref) {
37
38
  title: "操作警告",
38
39
  icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
39
40
  content: "确定执行操作吗?",
41
+ className: "big",
40
42
  getContainer: function getContainer() {
41
43
  return document.getElementById("scada-body");
42
44
  },
@@ -73,9 +75,7 @@ var EleSwitchComponent = function EleSwitchComponent(_ref) {
73
75
  }, [pointData === null || pointData === void 0 ? void 0 : pointData.value, payload === null || payload === void 0 ? void 0 : payload.checkedValue]);
74
76
  return /*#__PURE__*/React.createElement("div", {
75
77
  className: "".concat(styles.wrap, " ").concat(premission.includes("49") ? "" : styles.hide),
76
- onClick: function onClick(e) {
77
- return e.stopPropagation();
78
- }
78
+ id: "switch-".concat(pointData === null || pointData === void 0 ? void 0 : pointData.deviceId)
79
79
  }, /*#__PURE__*/React.createElement(Tooltip, {
80
80
  title: tooltipTitle
81
81
  }, /*#__PURE__*/React.createElement(Switch, {
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  }],
43
43
  attrs: {
44
44
  body: {
45
- xlinkHref: 'http://10.189.40.132:9000/iot/生产/组态图片/图片元素/be42df157707426fb53360693eae8094.svg',
45
+ xlinkHref: '/imgfile/iot/生产/组态图片/图片元素/be42df157707426fb53360693eae8094.svg',
46
46
  refWidth: '100%',
47
47
  refHeight: '100%'
48
48
  }
@@ -43,7 +43,7 @@ export var defaultConfig = {
43
43
  }],
44
44
  attrs: {
45
45
  body: {
46
- xlinkHref: 'http://10.189.40.132:9000/iot/生产/组态图片/图片元素/7cdce2491ce3468aae034f531bf149d5.svg',
46
+ xlinkHref: '/imgfile/iot/生产/组态图片/图片元素/7cdce2491ce3468aae034f531bf149d5.svg',
47
47
  refWidth: '100%',
48
48
  refHeight: '100%'
49
49
  }
@@ -43,7 +43,7 @@ export var defaultConfig = {
43
43
  }],
44
44
  attrs: {
45
45
  body: {
46
- xlinkHref: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/2358402046b8439b9bee49814e5d94e3.svg',
46
+ xlinkHref: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/2358402046b8439b9bee49814e5d94e3.svg',
47
47
  refWidth: '100%',
48
48
  refHeight: '100%'
49
49
  }
@@ -43,7 +43,7 @@ export var defaultConfig = {
43
43
  }],
44
44
  attrs: {
45
45
  body: {
46
- xlinkHref: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/58225b888f6a48b9af4b21444700c6ba.svg',
46
+ xlinkHref: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/58225b888f6a48b9af4b21444700c6ba.svg',
47
47
  refWidth: '100%',
48
48
  refHeight: '100%'
49
49
  }
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  }],
43
43
  attrs: {
44
44
  body: {
45
- xlinkHref: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/dd03192a3abc487aa7b91ad75d1be533.svg',
45
+ xlinkHref: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/dd03192a3abc487aa7b91ad75d1be533.svg',
46
46
  refWidth: '100%',
47
47
  refHeight: '100%'
48
48
  }
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  }],
43
43
  attrs: {
44
44
  body: {
45
- xlinkHref: 'http://10.189.40.132:9000/iot/生产/组态图片/图片元素/834835fb0d60434d934eee07d18cfafc.svg',
45
+ xlinkHref: '/imgfile/iot/生产/组态图片/图片元素/834835fb0d60434d934eee07d18cfafc.svg',
46
46
  refWidth: '100%',
47
47
  refHeight: '100%'
48
48
  }
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  }],
43
43
  attrs: {
44
44
  body: {
45
- xlinkHref: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/40a74ebbf068410593fbc92442088fc7.svg',
45
+ xlinkHref: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/40a74ebbf068410593fbc92442088fc7.svg',
46
46
  refWidth: '100%',
47
47
  refHeight: '100%'
48
48
  }
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  }],
43
43
  attrs: {
44
44
  body: {
45
- xlinkHref: 'http://10.189.40.132:9000/iot/生产/组态图片/图片元素/ad1218665b854070b21f5572e452c6ef.svg',
45
+ xlinkHref: '/imgfile/iot/生产/组态图片/图片元素/ad1218665b854070b21f5572e452c6ef.svg',
46
46
  refWidth: '100%',
47
47
  refHeight: '100%'
48
48
  }
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  }],
43
43
  attrs: {
44
44
  body: {
45
- xlinkHref: 'http://10.189.40.132:9000/iot/生产/组态图片/图片元素/fe66d6f5586742e3a9aad2782fb45d86.svg',
45
+ xlinkHref: '/imgfile/iot/生产/组态图片/图片元素/fe66d6f5586742e3a9aad2782fb45d86.svg',
46
46
  refWidth: '100%',
47
47
  refHeight: '100%'
48
48
  }
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  }],
43
43
  attrs: {
44
44
  body: {
45
- xlinkHref: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/63831cb71bd24c47bb11b6e02d9e4c77.svg',
45
+ xlinkHref: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/63831cb71bd24c47bb11b6e02d9e4c77.svg',
46
46
  refWidth: '100%',
47
47
  refHeight: '100%'
48
48
  }
@@ -42,7 +42,7 @@ export var defaultConfig = {
42
42
  }],
43
43
  attrs: {
44
44
  body: {
45
- xlinkHref: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/8e5f1deaf3a8466fa168588eaac664bc.svg',
45
+ xlinkHref: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/8e5f1deaf3a8466fa168588eaac664bc.svg',
46
46
  refWidth: '100%',
47
47
  refHeight: '100%'
48
48
  }
@@ -131,6 +131,7 @@ declare namespace Ele {
131
131
  /** 点击选择器-是否禁止选择不可写的点位 */
132
132
  pointSelect_disabledUnWriteable?: boolean;
133
133
  mittMeta?: MittMeta;
134
+ payload?: string[];
134
135
  };
135
136
 
136
137
  export type Size = {
@@ -104,20 +104,19 @@ export function pointWrite(_x4) {
104
104
  }
105
105
  function _pointWrite() {
106
106
  _pointWrite = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
107
- var deviceId, value, pointId, query, deviceInfo, pointInfo, writeFunction, res;
107
+ var query, deviceId, value, pointId, deviceInfo, pointInfo, writeFunction, res;
108
108
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
109
109
  while (1) switch (_context3.prev = _context3.next) {
110
110
  case 0:
111
- // eslint-disable-next-line prefer-const
112
- deviceId = params.deviceId, value = params.value, pointId = params.pointId;
113
- query = queryToObject(window.location.href); // 产品组态不能点位写入
111
+ query = queryToObject(window.location.href);
114
112
  if (!(query.scene === 'product')) {
115
- _context3.next = 4;
113
+ _context3.next = 3;
116
114
  break;
117
115
  }
118
116
  return _context3.abrupt("return");
119
- case 4:
120
- // 如果没有 deviceId(device 场景下),则从 url query 里获取
117
+ case 3:
118
+ // eslint-disable-next-line prefer-const
119
+ deviceId = params.deviceId, value = params.value, pointId = params.pointId; // 如果没有 deviceId(device 场景下),则从 url query 里获取
121
120
  if (!deviceId) {
122
121
  if (query.scene === 'device') {
123
122
  deviceId = parseInt(query.deviceId, 10);
@@ -441,9 +441,9 @@ var Player = function Player(_ref) {
441
441
  _context7.next = 2;
442
442
  return GetTdIndicatorAggregateData(ids.map(function (v) {
443
443
  var productNo = {
444
- r5onwf: 'energy',
445
- p4snlw: 'steamc',
446
- rommzw: 'waterc'
444
+ emqktt: 'energy',
445
+ mrwtn4: 'steamc',
446
+ kf78l3: 'waterc'
447
447
  };
448
448
  var str = v.split('_');
449
449
  return {
@@ -83,7 +83,7 @@ var Display = function Display(_ref) {
83
83
  return v.productConfigurationType === Number(query.scadaType);
84
84
  });
85
85
  if (activeConfig) {
86
- setJsonConfig(JSON.parse((activeConfig.config || '{}').replaceAll('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com/', 'http://10.189.40.132:9000/iot/').replaceAll('https://front-end-assets.oss-cn-shanghai.aliyuncs.com/', 'http://10.189.40.132:9000/iot/')));
86
+ setJsonConfig(JSON.parse((activeConfig.config || '{}').replaceAll('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com/', '/imgfile/iot/').replaceAll('https://front-end-assets.oss-cn-shanghai.aliyuncs.com/', '/imgfile/iot/')));
87
87
  }
88
88
  }
89
89
  _context.next = 17;
@@ -209,7 +209,7 @@ var Display = function Display(_ref) {
209
209
  });
210
210
  }
211
211
  if (scadaConfig) {
212
- setJsonConfig(JSON.parse((scadaConfig || '{}').replaceAll('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com/', 'http://10.189.40.132:9000/iot/').replaceAll('https://front-end-assets.oss-cn-shanghai.aliyuncs.com/', 'http://10.189.40.132:9000/iot/')));
212
+ setJsonConfig(JSON.parse((scadaConfig || '{}').replaceAll('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com/', '/imgfile/iot/').replaceAll('https://front-end-assets.oss-cn-shanghai.aliyuncs.com/', '/imgfile/iot/')));
213
213
  }
214
214
  _context3.next = 20;
215
215
  break;
@@ -9,54 +9,54 @@ import { defaultConfig as defaultConfigLightning } from "../../../../element/Bas
9
9
  export var elementList = [
10
10
  // 矩形
11
11
  {
12
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E7%9F%A9%E5%BD%A2.svg',
12
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E7%9F%A9%E5%BD%A2.svg',
13
13
  label: '',
14
14
  width: 30,
15
15
  payload: defaultConfigRectangle
16
16
  },
17
17
  // 圆形
18
18
  {
19
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E5%9C%86%E5%BD%A2.svg',
19
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E5%9C%86%E5%BD%A2.svg',
20
20
  label: '',
21
21
  width: 30,
22
22
  payload: defaultConfigCircle
23
23
  },
24
24
  // 椭圆形
25
25
  {
26
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E6%A4%AD%E5%9C%86%E5%BD%A2.svg',
26
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E6%A4%AD%E5%9C%86%E5%BD%A2.svg',
27
27
  label: '',
28
28
  width: 34,
29
29
  payload: defaultConfigEllipse
30
30
  },
31
31
  // 评论框
32
32
  {
33
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E5%AF%B9%E8%AF%9D%E6%A1%86.svg',
33
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E5%AF%B9%E8%AF%9D%E6%A1%86.svg',
34
34
  label: '',
35
35
  width: 30,
36
36
  payload: defaultConfigCommentBox
37
37
  }, {
38
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/comment-box2.svg',
38
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/comment-box2.svg',
39
39
  label: '',
40
40
  width: 38,
41
41
  payload: defaultConfigCommentBox2
42
42
  },
43
43
  // 心形
44
44
  {
45
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/heart.svg',
45
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/heart.svg',
46
46
  label: '',
47
47
  width: 30,
48
48
  payload: defaultConfigHeart
49
49
  },
50
50
  // 星星
51
51
  {
52
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E6%98%9F%E6%98%9F.svg',
52
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E6%98%9F%E6%98%9F.svg',
53
53
  label: '',
54
54
  width: 30,
55
55
  payload: defaultConfigStar
56
56
  },
57
57
  // 闪电
58
58
  {
59
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/lightning.svg',
59
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/lightning.svg',
60
60
  label: '',
61
61
  width: 28,
62
62
  payload: defaultConfigLightning
@@ -83,7 +83,7 @@ var ImgGroup = function ImgGroup(_ref) {
83
83
  setImgList(((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list.map(function (item) {
84
84
  var _item$img;
85
85
  return _objectSpread(_objectSpread({}, item), {}, {
86
- img: (_item$img = item.img) === null || _item$img === void 0 ? void 0 : _item$img.replace('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com', 'http://10.189.40.132:9000/iot').replace('https://front-end-assets.oss-cn-shanghai.aliyuncs.com', 'http://10.189.40.132:9000/iot')
86
+ img: (_item$img = item.img) === null || _item$img === void 0 ? void 0 : _item$img.replace('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com', '/imgfile/iot').replace('https://front-end-assets.oss-cn-shanghai.aliyuncs.com', '/imgfile/iot')
87
87
  });
88
88
  })) || []);
89
89
  } else {
@@ -13,75 +13,75 @@ import { defaultConfig as defaultConfigEleShine } from "../../../../element/EleS
13
13
  import { defaultConfig as defaultConfigEleIcon } from "../../../../element/EleIcon";
14
14
  import { defaultConfig as defaultConfigEdgeLinePort } from "../../../../edge/EdgeLinePort";
15
15
  export var elementList = [{
16
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E6%95%B0%E5%80%BC%E6%A1%86.svg',
16
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E6%95%B0%E5%80%BC%E6%A1%86.svg',
17
17
  label: '点位值',
18
18
  payload: defaultConfigElePointValue,
19
19
  width: 25,
20
20
  tooltipTitle: '显示功能名称及数值'
21
21
  }, {
22
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87.svg',
22
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87.svg',
23
23
  label: '点位值图片',
24
24
  width: 26,
25
25
  payload: defaultConfigElePointImage,
26
26
  tooltipTitle: '适用于图片/动图表示功能状态'
27
27
  }, {
28
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E7%82%B9%E4%BD%8D%E7%8A%B6%E6%80%81.svg',
28
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E7%82%B9%E4%BD%8D%E7%8A%B6%E6%80%81.svg',
29
29
  label: '状态点位',
30
30
  width: 25,
31
31
  payload: defaultConfigElePointState,
32
32
  tooltipTitle: '适用于图标颜色变化表示功能状态'
33
33
  }, {
34
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E7%82%B9%E4%BD%8D%E9%9D%A2%E6%9D%BF.svg',
34
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E7%82%B9%E4%BD%8D%E9%9D%A2%E6%9D%BF.svg',
35
35
  label: '点位列表',
36
36
  width: 25,
37
37
  payload: defaultConfigElePointList
38
38
  }, {
39
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E4%BB%AA%E8%A1%A8%E7%9B%98.svg',
39
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E4%BB%AA%E8%A1%A8%E7%9B%98.svg',
40
40
  label: '仪表盘',
41
41
  payload: defaultConfigGauge,
42
42
  width: 28
43
43
  }, {
44
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E9%A3%8E%E6%89%87.svg',
44
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E9%A3%8E%E6%89%87.svg',
45
45
  label: '风机',
46
46
  payload: defaultConfigEleFan,
47
47
  width: 26
48
48
  }, {
49
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/6.svg',
49
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/6.svg',
50
50
  label: '文字',
51
51
  width: 30,
52
52
  payload: defaultConfigEleText
53
53
  }, {
54
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E6%8C%89%E9%92%AE.svg',
54
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E6%8C%89%E9%92%AE.svg',
55
55
  label: '按钮',
56
56
  width: 30,
57
57
  payload: defaultConfigEleButton
58
58
  }, {
59
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/switch.svg',
59
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/switch.svg',
60
60
  label: '开关',
61
61
  width: 30,
62
62
  payload: defaultConfigEleSwitch
63
63
  }, {
64
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E6%8C%87%E7%A4%BA%E7%81%AF.svg',
64
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E6%8C%87%E7%A4%BA%E7%81%AF.svg',
65
65
  label: '指示灯',
66
66
  width: 25,
67
67
  payload: defaultConfigEleIndicatorLight
68
68
  }, {
69
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E9%97%AA%E7%83%81%E5%91%8A%E8%AD%A6.svg',
69
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E9%97%AA%E7%83%81%E5%91%8A%E8%AD%A6.svg',
70
70
  label: '闪烁告警',
71
71
  width: 22,
72
72
  payload: defaultConfigEleShine
73
73
  }, {
74
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E5%9B%BE%E6%A0%87.svg',
74
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E5%9B%BE%E6%A0%87.svg',
75
75
  label: '图标',
76
76
  width: 25,
77
77
  payload: defaultConfigEleIcon
78
78
  }, {
79
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/time-circle.svg',
79
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/time-circle.svg',
80
80
  label: '时间',
81
81
  width: 28,
82
82
  payload: defaultConfigClock
83
83
  }, {
84
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E8%BF%9E%E7%BA%BF.svg',
84
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E8%BF%9E%E7%BA%BF.svg',
85
85
  label: '连接线',
86
86
  width: 28,
87
87
  payload: defaultConfigEdgeLinePort
@@ -10,58 +10,58 @@ import { defaultConfig as defaultConfigElePipeVertical } from "../../../../eleme
10
10
  import { defaultConfig as defaultConfigElePipeHorizontal } from "../../../../element/PipeNodes/NodeHorizontal";
11
11
  import { defaultConfig as defaultConfigElePipeCenter } from "../../../../element/PipeNodes/NodeCenter";
12
12
  export var elementList = [{
13
- url: 'http://10.189.40.132:9000/iot/生产/组态图片/图片元素/ad1218665b854070b21f5572e452c6ef.svg',
13
+ url: '/imgfile/iot/生产/组态图片/图片元素/ad1218665b854070b21f5572e452c6ef.svg',
14
14
  label: '',
15
15
  width: 30,
16
16
  payload: defaultConfigElePipeTL
17
17
  }, {
18
- url: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/63831cb71bd24c47bb11b6e02d9e4c77.svg',
18
+ url: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/63831cb71bd24c47bb11b6e02d9e4c77.svg',
19
19
  label: '',
20
20
  width: 30,
21
21
  payload: defaultConfigElePipeTop
22
22
  }, {
23
- url: 'http://10.189.40.132:9000/iot/生产/组态图片/图片元素/fe66d6f5586742e3a9aad2782fb45d86.svg',
23
+ url: '/imgfile/iot/生产/组态图片/图片元素/fe66d6f5586742e3a9aad2782fb45d86.svg',
24
24
  label: '',
25
25
  width: 30,
26
26
  payload: defaultConfigElePipeTR
27
27
  }, {
28
- url: 'http://10.189.40.132:9000/iot/生产/组态图片/图片元素/834835fb0d60434d934eee07d18cfafc.svg',
28
+ url: '/imgfile/iot/生产/组态图片/图片元素/834835fb0d60434d934eee07d18cfafc.svg',
29
29
  label: '',
30
30
  width: 25,
31
31
  payload: defaultConfigElePipeLeft
32
32
  }, {
33
- url: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/58225b888f6a48b9af4b21444700c6ba.svg',
33
+ url: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/58225b888f6a48b9af4b21444700c6ba.svg',
34
34
  label: '',
35
35
  width: 25,
36
36
  payload: defaultConfigElePipeCenter
37
37
  }, {
38
- url: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/40a74ebbf068410593fbc92442088fc7.svg',
38
+ url: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/40a74ebbf068410593fbc92442088fc7.svg',
39
39
  label: '',
40
40
  width: 25,
41
41
  payload: defaultConfigElePipeRight
42
42
  }, {
43
- url: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/be42df157707426fb53360693eae8094.svg',
43
+ url: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/be42df157707426fb53360693eae8094.svg',
44
44
  label: '',
45
45
  width: 25,
46
46
  payload: defaultConfigElePipeBL
47
47
  }, {
48
- url: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/2358402046b8439b9bee49814e5d94e3.svg',
48
+ url: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/2358402046b8439b9bee49814e5d94e3.svg',
49
49
  label: '',
50
50
  width: 25,
51
51
  payload: defaultConfigElePipeBottom
52
52
  }, {
53
- url: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/7cdce2491ce3468aae034f531bf149d5.svg',
53
+ url: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/7cdce2491ce3468aae034f531bf149d5.svg',
54
54
  label: '',
55
55
  width: 25,
56
56
  payload: defaultConfigElePipeBR
57
57
  }, {
58
- url: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/dd03192a3abc487aa7b91ad75d1be533.svg',
58
+ url: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/dd03192a3abc487aa7b91ad75d1be533.svg',
59
59
  label: '',
60
60
  width: 30,
61
61
  height: 10,
62
62
  payload: defaultConfigElePipeHorizontal
63
63
  }, {
64
- url: 'http://10.189.40.132:9000/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/8e5f1deaf3a8466fa168588eaac664bc.svg',
64
+ url: '/imgfile/iot/%E7%94%9F%E4%BA%A7/%E7%BB%84%E6%80%81%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87%E5%85%83%E7%B4%A0/8e5f1deaf3a8466fa168588eaac664bc.svg',
65
65
  label: '',
66
66
  width: 10,
67
67
  height: 30,
@@ -5,32 +5,32 @@ import { defaultConfig as defaultConfigElePointCard3 } from "../../../../element
5
5
  import { defaultConfig as defaultConfigElePointControl1 } from "../../../../element/PointControl/PointControl1";
6
6
  import { defaultConfig as defaultConfigElePointControl3 } from "../../../../element/PointControl/PointControl3";
7
7
  export var elementList = [{
8
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointListCard.png',
8
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointListCard.png',
9
9
  label: '点位列表',
10
10
  width: '100%',
11
11
  payload: defaultConfigElePointListCard
12
12
  }, {
13
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointCard1.png',
13
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointCard1.png',
14
14
  label: '点位卡片1',
15
15
  width: '100%',
16
16
  payload: defaultConfigElePointCard1
17
17
  }, {
18
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointCard2.png',
18
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointCard2.png',
19
19
  label: '点位卡片2',
20
20
  width: '100%',
21
21
  payload: defaultConfigElePointCard2
22
22
  }, {
23
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointCard3.png',
23
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointCard3.png',
24
24
  label: '点位卡片3',
25
25
  width: '30%',
26
26
  payload: defaultConfigElePointCard3
27
27
  }, {
28
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointControl1.png',
28
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointControl1.png',
29
29
  label: '点位卡片4',
30
30
  width: '100%',
31
31
  payload: defaultConfigElePointControl1
32
32
  }, {
33
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointControl3.webp',
33
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/pointControl3.webp',
34
34
  label: '点位卡片5',
35
35
  width: '100%',
36
36
  payload: defaultConfigElePointControl3
@@ -3,23 +3,23 @@ import { defaultConfig as defaultConfigEleDeviceUpdateTime } from "../../../../e
3
3
  import { defaultConfig as defaultConfigEleDeviceState } from "../../../../element/EleDeviceState";
4
4
  import { defaultConfig as defaultConfigEleImage } from "../../../../element/EleImage";
5
5
  export var elementList = [{
6
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E8%AE%BE%E5%A4%87%E5%90%8D%E7%A7%B0.svg',
6
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E8%AE%BE%E5%A4%87%E5%90%8D%E7%A7%B0.svg',
7
7
  label: '设备名称',
8
8
  width: 25,
9
9
  payload: defaultConfigEleDeviceName
10
10
  }, {
11
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E8%AE%BE%E5%A4%87%E7%8A%B6%E6%80%81.svg',
11
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E8%AE%BE%E5%A4%87%E7%8A%B6%E6%80%81.svg',
12
12
  label: '设备状态',
13
13
  width: 38,
14
14
  payload: defaultConfigEleDeviceState,
15
15
  tooltipTitle: '显示设备的状态标签(未上线、离线、报警、在线)'
16
16
  }, {
17
- url: 'http://10.189.40.132:9000/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E8%AE%BE%E5%A4%87%E6%9B%B4%E6%96%B0%E6%97%B6%E9%97%B4.svg',
17
+ url: '/imgfile/iot/%E5%AE%98%E6%96%B9%E5%9B%BE%E5%BA%93/%E8%AE%BE%E5%A4%87%E6%9B%B4%E6%96%B0%E6%97%B6%E9%97%B4.svg',
18
18
  label: '设备更新时间',
19
19
  width: 24,
20
20
  payload: defaultConfigEleDeviceUpdateTime
21
21
  }, {
22
- url: 'http://10.189.40.132:9000/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87.svg',
22
+ url: '/imgfile/iot/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87.svg',
23
23
  label: '图片',
24
24
  width: 26,
25
25
  payload: defaultConfigEleImage,
@@ -182,7 +182,7 @@ export default (function () {
182
182
  if (query.scene === 'freedom') {
183
183
  var fetchScadaConfig = /*#__PURE__*/function () {
184
184
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
185
- var hideMsg, _data$list, _yield$GetCompanyConf, success, data, scadaConfig, configJSON, width, height;
185
+ var hideMsg, _data$list, _yield$GetCompanyConf, success, data, scadaConfig, _configJSON$cells, configJSON, width, height;
186
186
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
187
187
  while (1) switch (_context2.prev = _context2.next) {
188
188
  case 0:
@@ -207,7 +207,20 @@ export default (function () {
207
207
  case 10:
208
208
  scadaConfig = data.list[0].config;
209
209
  if (scadaConfig) {
210
- configJSON = JSON.parse((scadaConfig || '{}').replaceAll('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com/', 'http://10.189.40.132:9000/iot/').replaceAll('https://front-end-assets.oss-cn-shanghai.aliyuncs.com/', 'http://10.189.40.132:9000/iot/'));
210
+ configJSON = JSON.parse((scadaConfig || '{}').replaceAll('https://coolcare-scada.oss-cn-shanghai.aliyuncs.com/', '/imgfile/iot/').replaceAll('https://front-end-assets.oss-cn-shanghai.aliyuncs.com/', '/imgfile/iot/')); // 修复后端保存数据时,因json数据种存在"%"而导致的"%"数据丢失问题
211
+ if (configJSON === null || configJSON === void 0 ? void 0 : (_configJSON$cells = configJSON.cells) === null || _configJSON$cells === void 0 ? void 0 : _configJSON$cells.length) {
212
+ configJSON === null || configJSON === void 0 ? void 0 : configJSON.cells.forEach(function (item) {
213
+ var _item$attrs, _item$attrs$body, _item$attrs2, _item$attrs2$body, _item$attrs2$body$ref, _item$attrs3, _item$attrs3$body, _item$attrs5, _item$attrs5$body, _item$attrs6, _item$attrs6$body, _item$attrs6$body$ref, _item$attrs7, _item$attrs7$body;
214
+ if ((item === null || item === void 0 ? void 0 : (_item$attrs = item.attrs) === null || _item$attrs === void 0 ? void 0 : (_item$attrs$body = _item$attrs.body) === null || _item$attrs$body === void 0 ? void 0 : _item$attrs$body.refWidth) && (item === null || item === void 0 ? void 0 : (_item$attrs2 = item.attrs) === null || _item$attrs2 === void 0 ? void 0 : (_item$attrs2$body = _item$attrs2.body) === null || _item$attrs2$body === void 0 ? void 0 : (_item$attrs2$body$ref = _item$attrs2$body.refWidth) === null || _item$attrs2$body$ref === void 0 ? void 0 : _item$attrs2$body$ref.indexOf('%')) === -1 && !isNaN(Number(item === null || item === void 0 ? void 0 : (_item$attrs3 = item.attrs) === null || _item$attrs3 === void 0 ? void 0 : (_item$attrs3$body = _item$attrs3.body) === null || _item$attrs3$body === void 0 ? void 0 : _item$attrs3$body.refWidth))) {
215
+ var _item$attrs4, _item$attrs4$body;
216
+ item.attrs.body.refWidth = "".concat(item === null || item === void 0 ? void 0 : (_item$attrs4 = item.attrs) === null || _item$attrs4 === void 0 ? void 0 : (_item$attrs4$body = _item$attrs4.body) === null || _item$attrs4$body === void 0 ? void 0 : _item$attrs4$body.refWidth, "%");
217
+ }
218
+ if ((item === null || item === void 0 ? void 0 : (_item$attrs5 = item.attrs) === null || _item$attrs5 === void 0 ? void 0 : (_item$attrs5$body = _item$attrs5.body) === null || _item$attrs5$body === void 0 ? void 0 : _item$attrs5$body.refHeight) && (item === null || item === void 0 ? void 0 : (_item$attrs6 = item.attrs) === null || _item$attrs6 === void 0 ? void 0 : (_item$attrs6$body = _item$attrs6.body) === null || _item$attrs6$body === void 0 ? void 0 : (_item$attrs6$body$ref = _item$attrs6$body.refHeight) === null || _item$attrs6$body$ref === void 0 ? void 0 : _item$attrs6$body$ref.indexOf('%')) === -1 && !isNaN(Number(item === null || item === void 0 ? void 0 : (_item$attrs7 = item.attrs) === null || _item$attrs7 === void 0 ? void 0 : (_item$attrs7$body = _item$attrs7.body) === null || _item$attrs7$body === void 0 ? void 0 : _item$attrs7$body.refHeight))) {
219
+ var _item$attrs8, _item$attrs8$body;
220
+ item.attrs.body.refHeight = "".concat(item === null || item === void 0 ? void 0 : (_item$attrs8 = item.attrs) === null || _item$attrs8 === void 0 ? void 0 : (_item$attrs8$body = _item$attrs8.body) === null || _item$attrs8$body === void 0 ? void 0 : _item$attrs8$body.refHeight, "%");
221
+ }
222
+ });
223
+ }
211
224
  graphCore.graph.fromJSON(configJSON);
212
225
  if (configJSON.pageConfig) {
213
226
  setPageConfig(configJSON.pageConfig);
@@ -84,7 +84,7 @@ requestClient.use(/*#__PURE__*/function () {
84
84
  case 0:
85
85
  req = ctx.req;
86
86
  url = req.url;
87
- ctx.req.url = "http://das-sc.brighticecream.com".concat(url);
87
+ ctx.req.url = "".concat(window.location.origin, ".nip.io").concat(url);
88
88
  _context.next = 5;
89
89
  return next();
90
90
  case 5:
package/es/typings.d.ts CHANGED
@@ -59,6 +59,8 @@ type EditorQuery =
59
59
  companyId: string;
60
60
  /** 项目 id */
61
61
  projectId?: string;
62
+ // 权限
63
+ premission?: string;
62
64
  };
63
65
 
64
66
  type PlayerQuery =
@@ -142,6 +144,10 @@ type PlayerQuery =
142
144
  token?: string;
143
145
  /** 刷新token */
144
146
  xToken?: string;
147
+ /** 项目 id */
148
+ projectId?: string;
149
+ /** 权限 */
150
+ premission: string
145
151
  };
146
152
 
147
153
  type WindowCommunicateMsg =
package/es/utils/auth.js CHANGED
@@ -45,12 +45,12 @@ export function parseAccessToken(token) {
45
45
  export function storeToken(accessToken, xAccessToken) {
46
46
  // 将 access-token 保存到 cookie
47
47
  Cookies.set(accessTokenCookieName, accessToken || '', {
48
- domain: 'das-sc.brighticecream.com'
48
+ domain: '192.168.6.21.nip.io'
49
49
  });
50
50
 
51
51
  // 将 x-access-token 保存到 cookie
52
52
  Cookies.set(xAccessTokenCookieName, xAccessToken || '', {
53
- domain: 'das-sc.brighticecream.com'
53
+ domain: '192.168.6.21.nip.io'
54
54
  });
55
55
  }
56
56
  export function storeAccessToken(token) {
@@ -0,0 +1,7 @@
1
+ export function dateDiff(str, end) {
2
+ var diff = (new Date(end).getTime() - new Date(str).getTime()) / 1000;
3
+ var d = Math.floor(diff / (60 * 60 * 24));
4
+ var h = Math.floor(diff % (60 * 60 * 24) / 60 / 60);
5
+ var m = Math.floor(diff % (60 * 60) / 60);
6
+ return "".concat(d ? "".concat(d, "\u5929") : '').concat(h ? "".concat(h, "\u5C0F\u65F6") : '', "".concat(m, "\u5206\u949F"));
7
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "coolcare-lite-scada-component",
3
- "version": "2.0.37",
3
+ "version": "3.0.2",
4
4
  "scripts": {
5
5
  "start": " umi dev",
6
6
  "build:prod": "UMI_ENV=prod umi build",
7
7
  "build:generalfushi": "UMI_ENV=prod REACT_APP_PLATFORM=generalfushi umi build",
8
- "build:yimin": "export NODE_OPTIONS=--openssl-legacy-provider && UMI_ENV=prod REACT_APP_PLATFORM=yimin umi build",
8
+ "build:ruijin": "UMI_ENV=prod REACT_APP_PLATFORM=ruijin umi build",
9
9
  "build:staging": "UMI_ENV=staging umi build",
10
10
  "build:component": "father build",
11
11
  "postinstall": "umi generate tmp",
@@ -13,7 +13,7 @@
13
13
  "test": "umi-test",
14
14
  "test:coverage": "umi-test --coverage",
15
15
  "analyze": "ANALYZE=1 umi build",
16
- "deploy:prod": "docker build -t xiiman-docker.pkg.coding.net/coolcare-lite/coolcare-scada/yimin:master-2025-3-31 . && docker push xiiman-docker.pkg.coding.net/coolcare-lite/coolcare-scada/yimin:master-2025-3-31"
16
+ "deploy:prod": "docker build -t xiiman-docker.pkg.coding.net/coolcare-lite/coolcare-scada/ruijin:master-2025-4-14 . && docker push xiiman-docker.pkg.coding.net/coolcare-lite/coolcare-scada/ruijin:master-2025-4-14"
17
17
  },
18
18
  "main": "./es/componentIndex.js",
19
19
  "module": "./es/componentIndex.js",