@zgfe/modules-page 1.0.17-zhongyuan.20 → 1.0.17-zhongyuan.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.
@@ -39,7 +39,7 @@ var DetailContent = function DetailContent(props) {
39
39
  setPageUrl = _useState4[1];
40
40
  useEffect(function () {
41
41
  var secret = getSocketSecret();
42
- var url = "wss://".concat(location.host).concat(api.socket);
42
+ var url = "ws://".concat(location.host).concat(api.socket);
43
43
  var socket = new SocketClient(url, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appKey, {
44
44
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
45
45
  origin: 4,
@@ -5,12 +5,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
5
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { Form, Skeleton } from 'antd';
8
- import React, { useEffect, useRef, useState } from 'react';
8
+ import React, { useEffect, useRef, useState, useContext } from 'react';
9
9
  import "./index.less";
10
- import { BizAttrConditionGroup, BizUserGroupHeader } from '@zgfe/business-lib';
10
+ import { BizAttrConditionGroup, BizUserGroupHeader, BizGlobalDataContext } from '@zgfe/business-lib';
11
11
  import PageSelect from "../pageSelect";
12
12
  import { formValue, formatValue } from "./util";
13
13
  var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
14
+ var _useContext = useContext(BizGlobalDataContext),
15
+ envs = _useContext.envs;
14
16
  var classPrefix = 'page-search-panel';
15
17
  // form 值
16
18
  var _Form$useForm = Form.useForm(),
@@ -55,7 +57,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
55
57
  props.onChange && props.onChange(formatValue(allValues));
56
58
  };
57
59
  var onAdd = function onAdd() {
58
- if (count >= 5) return;
60
+ if (count >= ((envs === null || envs === void 0 ? void 0 : envs.propertyNum) || 5)) return;
59
61
  setTimeout(function () {
60
62
  groupRef.current.add(true);
61
63
  }, 0);
@@ -88,7 +90,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
88
90
  name: "page"
89
91
  }, /*#__PURE__*/React.createElement(PageSelect, {
90
92
  onAdd: onAdd,
91
- enableAdd: count < 5
93
+ enableAdd: count < ((envs === null || envs === void 0 ? void 0 : envs.propertyNum) || 5)
92
94
  })), /*#__PURE__*/React.createElement(Form.Item, {
93
95
  className: "".concat(classPrefix, "-item3 ").concat(!count ? classPrefix + '-hidden' : ''),
94
96
  name: "filters"
@@ -16,7 +16,9 @@ var TopContent = function TopContent(props) {
16
16
  time = _useState2[0],
17
17
  setTime = _useState2[1];
18
18
  var _useContext = useContext(BizGlobalDataContext),
19
- authority = _useContext.authority;
19
+ authority = _useContext.authority,
20
+ showProdDownload = _useContext.showProdDownload,
21
+ envs = _useContext.envs;
20
22
  useEffect(function () {
21
23
  // 初始为最新一天
22
24
  var initValue = {
@@ -35,6 +37,8 @@ var TopContent = function TopContent(props) {
35
37
  }, /*#__PURE__*/React.createElement(BizDatePickerV2, {
36
38
  includeToday: true,
37
39
  dateTypeList: [DatePickerTypes.Unit.day],
40
+ selectRange: envs && envs.timeRangeOpen ? envs.timeRangeOpen : 36,
41
+ timeRangeOpen: envs && envs.timeRangeOpen ? envs.timeRangeOpen : 36,
38
42
  value: time,
39
43
  onChange: setTime
40
44
  }), props.hidden ? null : props.type === 'pageGroup' ? /*#__PURE__*/React.createElement(Button, {
@@ -42,7 +46,7 @@ var TopContent = function TopContent(props) {
42
46
  onClick: props.onCreate
43
47
  }, /*#__PURE__*/React.createElement(IconFont, {
44
48
  type: "tianjia1"
45
- }), " \u65B0\u5EFA\u5206\u7EC4") : /*#__PURE__*/React.createElement(Button, {
49
+ }), " \u65B0\u5EFA\u5206\u7EC4") : showProdDownload && /*#__PURE__*/React.createElement(Button, {
46
50
  disabled: props.disabled || !authority[100068],
47
51
  onClick: props.onDownload
48
52
  }, /*#__PURE__*/React.createElement(IconFont, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-page",
3
- "version": "1.0.17-zhongyuan.20",
3
+ "version": "1.0.17-zhongyuan.23",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -45,7 +45,7 @@
45
45
  "@types/lodash": "^4.14.197",
46
46
  "@umijs/fabric": "^2.8.1",
47
47
  "@umijs/test": "^3.0.5",
48
- "@zgfe/business-lib": "1.2.70-hxd.1",
48
+ "@zgfe/business-lib": "1.2.70-hxd.31",
49
49
  "antd": "^4.22.6",
50
50
  "dumi": "^1.1.0",
51
51
  "father": "^4.0.0-rc.2",
@@ -57,5 +57,12 @@
57
57
  "rc-virtual-list": "^3.14.2",
58
58
  "yorkie": "^2.0.0"
59
59
  },
60
- "gitHead": "0eafa4a47a097ffcfd449a48eb6ff42ec2e986a4"
60
+ "gitHead": "7598016ed726c03c15e8100200a41981f8825c8f",
61
+ "resolutions": {
62
+ "pretty-format": "26.6.2",
63
+ "expect": "26.6.2",
64
+ "minimatch": "3.1.2",
65
+ "less-loader": "10.0.0",
66
+ "commander": "2.20.3"
67
+ }
61
68
  }