@zgfe/modules-page 1.0.17-zhongyuan.0 → 1.0.17-zhongyuan.3

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.
@@ -1,14 +1,14 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
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(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; } }
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
13
  import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
14
14
  import EmptyPanel from "../empty";
@@ -98,11 +98,13 @@ var ModulesPage = function ModulesPage(props) {
98
98
  var _useContext = useContext(BizGlobalDataContext),
99
99
  eventGroupList = _useContext.eventGroupList,
100
100
  currentApp = _useContext.currentApp,
101
- authority = _useContext.authority;
101
+ authority = _useContext.authority,
102
+ router = _useContext.router,
103
+ routes = _useContext.routes;
102
104
  // 是否是没进行埋点分析
103
105
  var isEmpty = useMemo(function () {
104
106
  var flag = true;
105
- eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
107
+ eventGroupList === null || eventGroupList === void 0 || eventGroupList.forEach(function (group) {
106
108
  group.eventList.forEach(function (event) {
107
109
  if ((event.name === 'click' || event.name === 'pv') && event !== null && event !== void 0 && event.clickAnalysis) {
108
110
  flag = false;
@@ -169,7 +171,7 @@ var ModulesPage = function ModulesPage(props) {
169
171
  setOriginSearchValue(_.cloneDeep(searchValue));
170
172
  var control = new AbortController();
171
173
  var signal = control.signal;
172
- controller === null || controller === void 0 ? void 0 : controller.abort();
174
+ controller === null || controller === void 0 || controller.abort();
173
175
  setController(control);
174
176
  getPageResult(param, setResult, setLoading, signal);
175
177
  }, 500));
@@ -211,6 +213,15 @@ var ModulesPage = function ModulesPage(props) {
211
213
  setEditGroup(data);
212
214
  setShowGroup(true);
213
215
  };
216
+ // app页面分析
217
+ var handleAppPageAnalysis = function handleAppPageAnalysis() {
218
+ router === null || router === void 0 || router.push({
219
+ name: "".concat(routes.appAnalyseVisual, "/2"),
220
+ query: {
221
+ // tab: key,
222
+ }
223
+ });
224
+ };
214
225
  var render = /*#__PURE__*/React.createElement("div", {
215
226
  className: "".concat(classPrefix, "-top-render")
216
227
  }, /*#__PURE__*/React.createElement("div", {
@@ -220,6 +231,15 @@ var ModulesPage = function ModulesPage(props) {
220
231
  disabled: loading || !result || !result.length || !authority[100144],
221
232
  onClick: props.onClickWarn
222
233
  }, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66"));
234
+ // 查看App页面分析
235
+ var renderApp = /*#__PURE__*/React.createElement("div", {
236
+ className: "".concat(classPrefix, "-top-render")
237
+ }, /*#__PURE__*/React.createElement("div", {
238
+ className: "".concat(classPrefix, "-top-render-title")
239
+ }, "\u9875\u9762\u5206\u6790"), /*#__PURE__*/React.createElement(Button, {
240
+ type: "primary",
241
+ onClick: handleAppPageAnalysis
242
+ }, "App\u9875\u9762\u5206\u6790"));
223
243
  if (isEmpty) return /*#__PURE__*/React.createElement(EmptyPanel, null);
224
244
  return /*#__PURE__*/React.createElement(ModulesPageContext.Provider, {
225
245
  value: {
@@ -244,7 +264,7 @@ var ModulesPage = function ModulesPage(props) {
244
264
  value: searchValue,
245
265
  onChange: onChange
246
266
  })),
247
- topRender: props.onClickWarn ? render : null,
267
+ topRender: props.onClickWarn ? render : renderApp,
248
268
  collapseRef: selectRef
249
269
  }, /*#__PURE__*/React.createElement(Spin, {
250
270
  spinning: pageLoading
@@ -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
+ }
@@ -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.Page | ModulesPageTypes.PageGroup | undefined;
44
+ currentClickPage?: ModulesPageTypes.PageGroup | ModulesPageTypes.Page | undefined;
45
45
  setCurrentClickPage?: ((data: ModulesPageTypes.Page) => void) | undefined;
46
46
  }>;
@@ -1,6 +1,5 @@
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
5
  pageGroupList: []
@@ -1,9 +1,9 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
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.0",
3
+ "version": "1.0.17-zhongyuan.3",
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": "a443c1e936633cacb9bb29ac417949c40b3b5d6d"
60
+ "gitHead": "ab5b488304d001d07b9f821ce4617452442830e9"
58
61
  }