coolcare-lite-scada-component 1.0.39 → 1.0.40

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.
@@ -13,8 +13,6 @@ import React from "react";
13
13
  import { useCallback, useEffect, useState } from 'react';
14
14
  import { Modal, Button, Form, Space, message, Select } from 'antd';
15
15
  import { GetDevicePage, GetDevicePoint } from "../../services/gateway/Device";
16
- import { GetColdChainPermissionDevicePage } from "../../services/project/ProjectUserPermission";
17
- import { useModel } from 'umi';
18
16
  var Option = Select.Option;
19
17
  var tailLayout = {
20
18
  wrapperCol: {
@@ -41,15 +39,6 @@ var ModalChoosePoint = function ModalChoosePoint(_ref) {
41
39
  _useState4 = _slicedToArray(_useState3, 2),
42
40
  pointList = _useState4[0],
43
41
  setPointList = _useState4[1];
44
- var _useModel = useModel('@@initialState', function (model) {
45
- var _model$initialState, _model$initialState2;
46
- return {
47
- platform: (_model$initialState = model.initialState) === null || _model$initialState === void 0 ? void 0 : _model$initialState.platform,
48
- currentProject: (_model$initialState2 = model.initialState) === null || _model$initialState2 === void 0 ? void 0 : _model$initialState2.currentProject
49
- };
50
- }),
51
- platform = _useModel.platform,
52
- currentProject = _useModel.currentProject;
53
42
  var closeModal = function closeModal() {
54
43
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
55
44
  };
@@ -98,45 +87,29 @@ var ModalChoosePoint = function ModalChoosePoint(_ref) {
98
87
  while (1) switch (_context2.prev = _context2.next) {
99
88
  case 0:
100
89
  _context2.prev = 0;
101
- if (!(platform === 'project')) {
102
- _context2.next = 7;
103
- break;
104
- }
105
- _context2.next = 4;
106
- return GetColdChainPermissionDevicePage({
107
- companyId: companyId,
108
- projectId: currentProject === null || currentProject === void 0 ? void 0 : currentProject.projectId,
109
- isPermission: true
110
- });
111
- case 4:
112
- res = _context2.sent;
113
- _context2.next = 10;
114
- break;
115
- case 7:
116
- _context2.next = 9;
90
+ _context2.next = 3;
117
91
  return GetDevicePage({
118
92
  companyId: companyId
119
93
  });
120
- case 9:
94
+ case 3:
121
95
  res = _context2.sent;
122
- case 10:
123
96
  if (res.success) {
124
97
  setDeviceList(((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || []);
125
98
  } else {
126
99
  message.error(res.message);
127
100
  }
128
- _context2.next = 16;
101
+ _context2.next = 10;
129
102
  break;
130
- case 13:
131
- _context2.prev = 13;
103
+ case 7:
104
+ _context2.prev = 7;
132
105
  _context2.t0 = _context2["catch"](0);
133
106
  message.error('获取设备列表失败');
134
- case 16:
107
+ case 10:
135
108
  case "end":
136
109
  return _context2.stop();
137
110
  }
138
- }, _callee2, null, [[0, 13]]);
139
- })), [companyId, platform, currentProject]);
111
+ }, _callee2, null, [[0, 7]]);
112
+ })), [companyId]);
140
113
 
141
114
  /** 提交表单且数据验证成功后回调事件 */
142
115
  var onFinish = /*#__PURE__*/function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coolcare-lite-scada-component",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "scripts": {
5
5
  "start": " umi dev",
6
6
  "build:prod": "UMI_ENV=prod umi build",