@zgfe/modules-page 1.0.17-zhongyuan.0 → 1.0.17-zhongyuan.14
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.
- package/README.md +35 -35
- package/dist/esm/components/content/index.js +8 -2
- package/dist/esm/components/content/index.less +6 -0
- package/dist/esm/components/content/utils.js +4 -4
- package/dist/esm/components/detail/index.js +6 -6
- package/dist/esm/components/detail/index.less +80 -80
- package/dist/esm/components/groupModal/demo.js +1 -1
- package/dist/esm/components/groupModal/index.js +8 -8
- package/dist/esm/components/groupModal/index.less +198 -198
- package/dist/esm/components/groupModal/inputSelect.js +1 -1
- package/dist/esm/components/groupModal/pageItem.js +6 -6
- package/dist/esm/components/groupModal/types.js +1 -2
- package/dist/esm/components/pageSelect/index.js +6 -6
- package/dist/esm/components/pageSelect/index.less +109 -109
- package/dist/esm/components/pageSelect/types.js +1 -2
- package/dist/esm/components/searchPanel/index.js +11 -2
- package/dist/esm/components/searchPanel/index.less +33 -33
- package/dist/esm/components/searchPanel/util.js +4 -4
- package/dist/esm/components/topContent/index.js +1 -1
- package/dist/esm/components/topContent/index.less +10 -10
- package/dist/esm/modules/empty/index.js +2 -2
- package/dist/esm/modules/empty/index.less +95 -95
- package/dist/esm/modules/home/demo/index.js +22 -2
- package/dist/esm/modules/home/index.d.ts +4 -1
- package/dist/esm/modules/home/index.js +49 -16
- package/dist/esm/modules/home/style/index.less +59 -59
- package/dist/esm/modules/home/types.d.ts +2 -0
- package/dist/esm/modules/home/types.js +2 -2
- package/dist/esm/modules/home/utils.js +5 -5
- package/package.json +5 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
10
|
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; }
|
|
11
|
-
function _iterableToArrayLimit(
|
|
11
|
+
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
13
|
+
import React, { useContext, useEffect, useMemo, useRef, useState, useImperativeHandle } from 'react';
|
|
14
14
|
import EmptyPanel from "../empty";
|
|
15
15
|
import { BizGlobalDataContext, BizLayout, BizLoading } from '@zgfe/business-lib';
|
|
16
16
|
import { Button, Skeleton, Spin } from 'antd';
|
|
@@ -24,7 +24,7 @@ import { getPageGroupList, getPageList, getPageResult, onDownload as _onDownload
|
|
|
24
24
|
import DetailContent from "../../components/detail";
|
|
25
25
|
import _ from 'lodash';
|
|
26
26
|
var classPrefix = 'modules-page';
|
|
27
|
-
var ModulesPage = function
|
|
27
|
+
var ModulesPage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
28
28
|
// 页面类型
|
|
29
29
|
var _useState = useState('page'),
|
|
30
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -93,16 +93,23 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
93
93
|
controller = _React$useState2[0],
|
|
94
94
|
setController = _React$useState2[1];
|
|
95
95
|
|
|
96
|
+
// 是否是下级分析页
|
|
97
|
+
var _useState27 = useState(props.isAppAnalysis || false),
|
|
98
|
+
_useState28 = _slicedToArray(_useState27, 1),
|
|
99
|
+
isAppAnalysis = _useState28[0];
|
|
100
|
+
|
|
96
101
|
// 查询条件ref
|
|
97
102
|
var selectRef = useRef(null);
|
|
98
103
|
var _useContext = useContext(BizGlobalDataContext),
|
|
99
104
|
eventGroupList = _useContext.eventGroupList,
|
|
100
105
|
currentApp = _useContext.currentApp,
|
|
101
|
-
authority = _useContext.authority
|
|
106
|
+
authority = _useContext.authority,
|
|
107
|
+
router = _useContext.router,
|
|
108
|
+
routes = _useContext.routes;
|
|
102
109
|
// 是否是没进行埋点分析
|
|
103
110
|
var isEmpty = useMemo(function () {
|
|
104
111
|
var flag = true;
|
|
105
|
-
eventGroupList === null || eventGroupList === void 0
|
|
112
|
+
eventGroupList === null || eventGroupList === void 0 || eventGroupList.forEach(function (group) {
|
|
106
113
|
group.eventList.forEach(function (event) {
|
|
107
114
|
if ((event.name === 'click' || event.name === 'pv') && event !== null && event !== void 0 && event.clickAnalysis) {
|
|
108
115
|
flag = false;
|
|
@@ -169,7 +176,7 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
169
176
|
setOriginSearchValue(_.cloneDeep(searchValue));
|
|
170
177
|
var control = new AbortController();
|
|
171
178
|
var signal = control.signal;
|
|
172
|
-
controller === null || controller === void 0
|
|
179
|
+
controller === null || controller === void 0 || controller.abort();
|
|
173
180
|
setController(control);
|
|
174
181
|
getPageResult(param, setResult, setLoading, signal);
|
|
175
182
|
}, 500));
|
|
@@ -211,6 +218,22 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
211
218
|
setEditGroup(data);
|
|
212
219
|
setShowGroup(true);
|
|
213
220
|
};
|
|
221
|
+
// app页面分析
|
|
222
|
+
var handleAppPageAnalysis = function handleAppPageAnalysis() {
|
|
223
|
+
router === null || router === void 0 || router.push({
|
|
224
|
+
name: "".concat(routes.appAnalyseVisual),
|
|
225
|
+
query: {
|
|
226
|
+
// tab: key,
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
// 定义通过ref暴露给父组件的内容
|
|
232
|
+
useImperativeHandle(ref, function () {
|
|
233
|
+
return {
|
|
234
|
+
searchFn: setSearchValue
|
|
235
|
+
};
|
|
236
|
+
}, []);
|
|
214
237
|
var render = /*#__PURE__*/React.createElement("div", {
|
|
215
238
|
className: "".concat(classPrefix, "-top-render")
|
|
216
239
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -220,15 +243,25 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
220
243
|
disabled: loading || !result || !result.length || !authority[100144],
|
|
221
244
|
onClick: props.onClickWarn
|
|
222
245
|
}, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66"));
|
|
246
|
+
// 查看App页面分析
|
|
247
|
+
var renderApp = /*#__PURE__*/React.createElement("div", {
|
|
248
|
+
className: "".concat(classPrefix, "-top-render")
|
|
249
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
250
|
+
className: "".concat(classPrefix, "-top-render-title")
|
|
251
|
+
}, "\u9875\u9762\u5206\u6790"), /*#__PURE__*/React.createElement(Button, {
|
|
252
|
+
type: "primary",
|
|
253
|
+
onClick: handleAppPageAnalysis
|
|
254
|
+
}, "App\u9875\u9762\u5206\u6790"));
|
|
223
255
|
if (isEmpty) return /*#__PURE__*/React.createElement(EmptyPanel, null);
|
|
224
256
|
return /*#__PURE__*/React.createElement(ModulesPageContext.Provider, {
|
|
225
257
|
value: {
|
|
226
258
|
pageList: pageList,
|
|
227
259
|
pageGroupList: pageGroupList,
|
|
228
260
|
currentClickPage: currentClickPage,
|
|
229
|
-
setCurrentClickPage: setCurrentClickPage
|
|
261
|
+
setCurrentClickPage: setCurrentClickPage,
|
|
262
|
+
isAppAnalysis: isAppAnalysis
|
|
230
263
|
}
|
|
231
|
-
}, /*#__PURE__*/React.createElement(BizLayout, {
|
|
264
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizLayout, {
|
|
232
265
|
className: classPrefix
|
|
233
266
|
// title="页面分析"
|
|
234
267
|
,
|
|
@@ -244,7 +277,7 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
244
277
|
value: searchValue,
|
|
245
278
|
onChange: onChange
|
|
246
279
|
})),
|
|
247
|
-
topRender: props.onClickWarn ? render :
|
|
280
|
+
topRender: props.onClickWarn ? render : props.isAppAnalysis || renderApp,
|
|
248
281
|
collapseRef: selectRef
|
|
249
282
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
250
283
|
spinning: pageLoading
|
|
@@ -281,6 +314,6 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
281
314
|
return setShowGroup(false);
|
|
282
315
|
},
|
|
283
316
|
onOk: onOk
|
|
284
|
-
}) : null)));
|
|
285
|
-
};
|
|
317
|
+
}) : null))));
|
|
318
|
+
});
|
|
286
319
|
export default ModulesPage;
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
.modules-page {
|
|
2
|
-
&-top-render {
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: space-between;
|
|
6
|
-
height: 38px;
|
|
7
|
-
margin-top: -8px;
|
|
8
|
-
margin-bottom: 8px;
|
|
9
|
-
line-height: 38px;
|
|
10
|
-
.ant-btn {
|
|
11
|
-
padding: 4px 16px;
|
|
12
|
-
}
|
|
13
|
-
&-title {
|
|
14
|
-
color: var(--io-N-, #021429);
|
|
15
|
-
font-weight: 500;
|
|
16
|
-
font-size: 16px;
|
|
17
|
-
font-family: 'PingFang SC';
|
|
18
|
-
font-style: normal;
|
|
19
|
-
line-height: 20px; /* 125% */
|
|
20
|
-
letter-spacing: 0.016px;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
.ant-btn-primary[disabled] {
|
|
24
|
-
color: #fff;
|
|
25
|
-
background: #d0dfff;
|
|
26
|
-
border-color: #d0dfff;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&-spin {
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
justify-content: center;
|
|
33
|
-
min-height: 400px;
|
|
34
|
-
margin-top: 24px;
|
|
35
|
-
border: 1px solid #ecedf0;
|
|
36
|
-
border-radius: 8px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&-content {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
width: 100%;
|
|
44
|
-
min-height: 300px;
|
|
45
|
-
margin-top: 60px;
|
|
46
|
-
background-color: #fff;
|
|
47
|
-
}
|
|
48
|
-
.ant-btn {
|
|
49
|
-
display: flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
.bsicon {
|
|
52
|
-
font-size: 16px !important;
|
|
53
|
-
line-height: 1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
.biz-layout-top {
|
|
57
|
-
padding: 16px;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
.modules-page {
|
|
2
|
+
&-top-render {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
height: 38px;
|
|
7
|
+
margin-top: -8px;
|
|
8
|
+
margin-bottom: 8px;
|
|
9
|
+
line-height: 38px;
|
|
10
|
+
.ant-btn {
|
|
11
|
+
padding: 4px 16px;
|
|
12
|
+
}
|
|
13
|
+
&-title {
|
|
14
|
+
color: var(--io-N-, #021429);
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
font-family: 'PingFang SC';
|
|
18
|
+
font-style: normal;
|
|
19
|
+
line-height: 20px; /* 125% */
|
|
20
|
+
letter-spacing: 0.016px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
.ant-btn-primary[disabled] {
|
|
24
|
+
color: #fff;
|
|
25
|
+
background: #d0dfff;
|
|
26
|
+
border-color: #d0dfff;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-spin {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
min-height: 400px;
|
|
34
|
+
margin-top: 24px;
|
|
35
|
+
border: 1px solid #ecedf0;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-content {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
width: 100%;
|
|
44
|
+
min-height: 300px;
|
|
45
|
+
margin-top: 60px;
|
|
46
|
+
background-color: #fff;
|
|
47
|
+
}
|
|
48
|
+
.ant-btn {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
.bsicon {
|
|
52
|
+
font-size: 16px !important;
|
|
53
|
+
line-height: 1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.biz-layout-top {
|
|
57
|
+
padding: 16px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -6,6 +6,7 @@ export declare namespace ModulesPageTypes {
|
|
|
6
6
|
value?: Value;
|
|
7
7
|
onClickWarn?: () => void;
|
|
8
8
|
onChange?: (data: Value) => void;
|
|
9
|
+
isAppAnalysis?: boolean;
|
|
9
10
|
}
|
|
10
11
|
interface Value extends SearchValue {
|
|
11
12
|
time?: DatePickerTypes.Value;
|
|
@@ -43,4 +44,5 @@ export declare const ModulesPageContext: import("react").Context<{
|
|
|
43
44
|
pageGroupList: ModulesPageTypes.PageGroup[];
|
|
44
45
|
currentClickPage?: ModulesPageTypes.Page | ModulesPageTypes.PageGroup | undefined;
|
|
45
46
|
setCurrentClickPage?: ((data: ModulesPageTypes.Page) => void) | undefined;
|
|
47
|
+
isAppAnalysis: boolean;
|
|
46
48
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
2
|
export var ModulesPageTypes;
|
|
3
|
-
(function (_ModulesPageTypes) {})(ModulesPageTypes || (ModulesPageTypes = {}));
|
|
4
3
|
export var ModulesPageContext = /*#__PURE__*/createContext({
|
|
5
4
|
pageList: [],
|
|
6
|
-
pageGroupList: []
|
|
5
|
+
pageGroupList: [],
|
|
6
|
+
isAppAnalysis: false
|
|
7
7
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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 { ajax, util, base64 } from '@zgfe/business-lib';
|
|
8
8
|
import api from "../../constants/api";
|
|
9
9
|
// 获取页面列表
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-page",
|
|
3
|
-
"version": "1.0.17-zhongyuan.
|
|
3
|
+
"version": "1.0.17-zhongyuan.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
+
"echarts": "^5.6.0",
|
|
38
|
+
"echarts-for-react": "^3.0.2",
|
|
37
39
|
"react": "^17.0.0"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
"@types/lodash": "^4.14.197",
|
|
44
46
|
"@umijs/fabric": "^2.8.1",
|
|
45
47
|
"@umijs/test": "^3.0.5",
|
|
48
|
+
"@zgfe/business-lib": "1.2.70-hxd.1",
|
|
46
49
|
"antd": "^4.22.6",
|
|
47
50
|
"dumi": "^1.1.0",
|
|
48
51
|
"father": "^4.0.0-rc.2",
|
|
@@ -54,5 +57,5 @@
|
|
|
54
57
|
"rc-virtual-list": "^3.14.2",
|
|
55
58
|
"yorkie": "^2.0.0"
|
|
56
59
|
},
|
|
57
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "052c30d1c78ba4f0e47241180e9b26e195a291b4"
|
|
58
61
|
}
|