@zgfe/modules-page 1.0.3 → 1.0.4-heyh.1
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.
|
@@ -4,9 +4,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useEffect, useState } from 'react';
|
|
7
|
+
import React, { useEffect, useState, useContext } from 'react';
|
|
8
8
|
import "./index.less";
|
|
9
|
-
import { BizDatePicker, IconFont } from '@zgfe/business-lib';
|
|
9
|
+
import { BizDatePicker, IconFont, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
10
10
|
import { Button } from 'antd';
|
|
11
11
|
import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
|
|
12
12
|
import moment from 'moment';
|
|
@@ -15,6 +15,8 @@ var TopContent = function TopContent(props) {
|
|
|
15
15
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16
16
|
time = _useState2[0],
|
|
17
17
|
setTime = _useState2[1];
|
|
18
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
19
|
+
authority = _useContext.authority;
|
|
18
20
|
useEffect(function () {
|
|
19
21
|
// 初始为最新一天
|
|
20
22
|
var initValue = {
|
|
@@ -42,7 +44,7 @@ var TopContent = function TopContent(props) {
|
|
|
42
44
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
43
45
|
type: "tianjia1"
|
|
44
46
|
}), " \u65B0\u5EFA\u5206\u7EC4") : /*#__PURE__*/React.createElement(Button, {
|
|
45
|
-
disabled: props.disabled,
|
|
47
|
+
disabled: props.disabled || !authority[100068],
|
|
46
48
|
onClick: props.onDownload
|
|
47
49
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
48
50
|
type: "xiazai1"
|
|
@@ -97,7 +97,8 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
97
97
|
var selectRef = useRef(null);
|
|
98
98
|
var _useContext = useContext(BizGlobalDataContext),
|
|
99
99
|
eventGroupList = _useContext.eventGroupList,
|
|
100
|
-
currentApp = _useContext.currentApp
|
|
100
|
+
currentApp = _useContext.currentApp,
|
|
101
|
+
authority = _useContext.authority;
|
|
101
102
|
// 是否是没进行埋点分析
|
|
102
103
|
var isEmpty = useMemo(function () {
|
|
103
104
|
var flag = true;
|
|
@@ -214,7 +215,7 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
214
215
|
className: "".concat(classPrefix, "-top-render")
|
|
215
216
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
216
217
|
type: "primary",
|
|
217
|
-
disabled: loading || !result || !result.length,
|
|
218
|
+
disabled: loading || !result || !result.length || !authority[100144],
|
|
218
219
|
onClick: props.onClickWarn
|
|
219
220
|
}, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66"));
|
|
220
221
|
if (isEmpty) return /*#__PURE__*/React.createElement(EmptyPanel, null);
|
|
@@ -41,6 +41,6 @@ export declare namespace ModulesPageTypes {
|
|
|
41
41
|
export declare const ModulesPageContext: import("react").Context<{
|
|
42
42
|
pageList: ModulesPageTypes.Page[];
|
|
43
43
|
pageGroupList: ModulesPageTypes.PageGroup[];
|
|
44
|
-
currentClickPage?: ModulesPageTypes.
|
|
44
|
+
currentClickPage?: ModulesPageTypes.Page | ModulesPageTypes.PageGroup | undefined;
|
|
45
45
|
setCurrentClickPage?: ((data: ModulesPageTypes.Page) => void) | undefined;
|
|
46
46
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-page",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4-heyh.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/lodash": "^4.14.197",
|
|
40
40
|
"@umijs/fabric": "^2.8.1",
|
|
41
41
|
"@umijs/test": "^3.0.5",
|
|
42
|
-
"@zgfe/business-lib": "1.1.
|
|
42
|
+
"@zgfe/business-lib": "1.1.87-auth.7",
|
|
43
43
|
"antd": "^4.22.6",
|
|
44
44
|
"dumi": "^1.1.0",
|
|
45
45
|
"father": "^4.0.0-rc.2",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"prettier": "^2.2.1",
|
|
51
51
|
"yorkie": "^2.0.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "a57272c0d8a38bcc1e278751c81542d35bc24a51"
|
|
54
54
|
}
|