@zgfe/business-lib 1.1.34-alpha.21 → 1.1.34-alpha.23

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.
@@ -16,10 +16,13 @@ import { Dropdown, notification, Space } from 'antd';
16
16
  import TimeDimension from './timeDimension';
17
17
  import { Tooltip } from 'antd';
18
18
  import IconFont from '../../icon/iconFont';
19
+ import BizGlobalDataContext from '../../context';
19
20
  var EventCondition = function EventCondition(props) {
20
21
  var _condition$timeDimens2, _condition$timeDimens3;
21
22
  var _useContext = useContext(BizUserConditionContext),
22
23
  isRealTime = _useContext.isRealTime;
24
+ var _useContext2 = useContext(BizGlobalDataContext),
25
+ currentUser = _useContext2.currentUser;
23
26
  var condition = props.condition,
24
27
  dataId = props.dataId;
25
28
  function onChange(data) {
@@ -167,7 +170,7 @@ var EventCondition = function EventCondition(props) {
167
170
  }, /*#__PURE__*/React.createElement(IconFont, {
168
171
  type: "qingchu"
169
172
  }))));
170
- }), ((_condition$timeDimens3 = condition.timeDimensions) === null || _condition$timeDimens3 === void 0 ? void 0 : _condition$timeDimens3.length) < 3 ? /*#__PURE__*/React.createElement("div", {
173
+ }), ((_condition$timeDimens3 = condition.timeDimensions) === null || _condition$timeDimens3 === void 0 ? void 0 : _condition$timeDimens3.length) < 3 && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType) === 0 || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType) === 2) ? /*#__PURE__*/React.createElement("div", {
171
174
  style: {
172
175
  margin: '2px 0 0 38px',
173
176
  color: '#4075fd',
package/es/utils/ajax.js CHANGED
@@ -63,6 +63,7 @@ function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
63
63
  flag = true;
64
64
  } else if (new RegExp("".concat(ResponseStatus.notLogin)).test(apiResult.code)) {
65
65
  message = '账户未登录或登录已失效';
66
+ window.location.href = '/webapp/app/login?destination=' + window.location.href;
66
67
  } else if (new RegExp("".concat(ResponseStatus.noPermission)).test(apiResult.code)) {
67
68
  window.location.href = '/webapp/app/noPermission';
68
69
  throw new Error(apiResult.msg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.34-alpha.21",
3
+ "version": "1.1.34-alpha.23",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",