@zgfe/modules-page 1.0.8-lijingyu1538.1 → 1.0.17-zhongyuan.12

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,33 +1,33 @@
1
- @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
-
3
- .page-search-panel {
4
- &-title.ant-form-item {
5
- margin-bottom: 8px;
6
- padding-left: 24px;
7
- color: @text-color-secondary;
8
- font-weight: 500;
9
- .ant-form-item-control-input {
10
- min-height: 20px;
11
- .ant-form-item-control-input-content {
12
- height: 20px;
13
- }
14
- }
15
- }
16
-
17
- &-item3.ant-form-item:not(.page-search-panel-hidden) {
18
- margin-bottom: 20px;
19
- }
20
- &-item1.ant-form-item {
21
- margin-bottom: 20px !important;
22
- }
23
- &-item2.ant-form-item {
24
- margin-bottom: 4px !important;
25
- }
26
-
27
- &-hidden.ant-form-item {
28
- margin-bottom: 16px;
29
- .ant-form-item-control-input {
30
- min-height: 0;
31
- }
32
- }
33
- }
1
+ @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
+
3
+ .page-search-panel {
4
+ &-title.ant-form-item {
5
+ margin-bottom: 8px;
6
+ padding-left: 24px;
7
+ color: @text-color-secondary;
8
+ font-weight: 500;
9
+ .ant-form-item-control-input {
10
+ min-height: 20px;
11
+ .ant-form-item-control-input-content {
12
+ height: 20px;
13
+ }
14
+ }
15
+ }
16
+
17
+ &-item3.ant-form-item:not(.page-search-panel-hidden) {
18
+ margin-bottom: 20px;
19
+ }
20
+ &-item1.ant-form-item {
21
+ margin-bottom: 20px !important;
22
+ }
23
+ &-item2.ant-form-item {
24
+ margin-bottom: 4px !important;
25
+ }
26
+
27
+ &-hidden.ant-form-item {
28
+ margin-bottom: 16px;
29
+ .ant-form-item-control-input {
30
+ min-height: 0;
31
+ }
32
+ }
33
+ }
@@ -28,10 +28,10 @@ export var formatValue = function formatValue(source) {
28
28
  };
29
29
  };
30
30
 
31
- /**
32
- * 筛选条件当未选择值时,不查询
33
- * @param filters 筛选条件数组
34
- * @returns
31
+ /**
32
+ * 筛选条件当未选择值时,不查询
33
+ * @param filters 筛选条件数组
34
+ * @returns
35
35
  */
36
36
  function getConditionList(filters) {
37
37
  if (!filters || !filters.conditions) return;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
- import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
3
+ import { DatePickerTypes } from '@zgfe/business-lib/es/datePickerV2/types';
4
4
  declare const TopContent: React.FC<{
5
5
  value?: DatePickerTypes.Value;
6
6
  type?: string;
@@ -6,9 +6,9 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useEffect, useState, useContext } from 'react';
8
8
  import "./index.less";
9
- import { BizDatePicker, IconFont, BizGlobalDataContext } from '@zgfe/business-lib';
9
+ import { IconFont, BizGlobalDataContext, BizDatePickerV2 } from '@zgfe/business-lib';
10
10
  import { Button } from 'antd';
11
- import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
11
+ import { DatePickerTypes } from '@zgfe/business-lib/es/datePickerV2/types';
12
12
  import moment from 'moment';
13
13
  var TopContent = function TopContent(props) {
14
14
  var _useState = useState(),
@@ -32,10 +32,10 @@ var TopContent = function TopContent(props) {
32
32
  }, [time]);
33
33
  return /*#__PURE__*/React.createElement("div", {
34
34
  className: "top-content"
35
- }, /*#__PURE__*/React.createElement(BizDatePicker, {
36
- value: time,
37
- mode: "simple",
35
+ }, /*#__PURE__*/React.createElement(BizDatePickerV2, {
38
36
  includeToday: true,
37
+ dateTypeList: [DatePickerTypes.Unit.day],
38
+ value: time,
39
39
  onChange: setTime
40
40
  }), props.hidden ? null : props.type === 'pageGroup' ? /*#__PURE__*/React.createElement(Button, {
41
41
  type: "primary",
@@ -1,10 +1,10 @@
1
- .top-content {
2
- display: flex;
3
- justify-content: space-between;
4
- font-size: 14px;
5
- .ant-btn {
6
- .bsicon {
7
- margin-right: 8px;
8
- }
9
- }
10
- }
1
+ .top-content {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ font-size: 14px;
5
+ .ant-btn {
6
+ .bsicon {
7
+ margin-right: 8px;
8
+ }
9
+ }
10
+ }
@@ -1,95 +1,95 @@
1
- .empty-panel {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- width: 100%;
6
- min-width: 850px;
7
- height: 100%;
8
- overflow: auto;
9
- background: url(./img/bg.png);
10
- background-size: cover;
11
- &-content {
12
- width: 406px;
13
- margin-left: 136px;
14
- p {
15
- color: #9aa1a9;
16
- font-size: 14px;
17
- }
18
- }
19
- &-content2 {
20
- width: 400px;
21
- p {
22
- margin-bottom: 0;
23
- }
24
- }
25
- &-title {
26
- margin-bottom: 24px;
27
- font-weight: 500;
28
- font-size: 28px;
29
- }
30
- &-title-secondary {
31
- margin-top: 24px;
32
- margin-bottom: 8px;
33
- font-weight: 500;
34
- font-size: 16px;
35
- }
36
-
37
- &-code-container {
38
- position: relative;
39
- height: 200px;
40
- margin: 8px 0;
41
- padding: 16px;
42
- background: #fafafb;
43
- border-radius: 8px;
44
- &:hover {
45
- .empty-panel-code-copy {
46
- display: flex;
47
- }
48
- }
49
-
50
- & > div:not(.empty-panel-code-copy) {
51
- color: #354354;
52
- font-size: 14px;
53
- line-height: 22px;
54
- word-wrap: break-word;
55
- span {
56
- margin-left: 8px;
57
- color: #9aa1a9;
58
- }
59
- }
60
- }
61
- &-code {
62
- margin-left: 16px;
63
- }
64
- &-code-copy {
65
- position: absolute;
66
- top: 16px;
67
- right: 16px;
68
- display: flex;
69
- display: none;
70
- align-items: center;
71
- height: 24px;
72
- padding: 0 8px;
73
- background: #f2f3f4;
74
- border-radius: 4px;
75
- cursor: pointer;
76
- &:hover {
77
- background: #e6e7ea;
78
- }
79
- &:focus {
80
- background-color: #ccd0d4;
81
- }
82
-
83
- span {
84
- margin-right: 8px;
85
- margin-left: 0 !important;
86
- font-size: 16px !important;
87
- line-height: 1;
88
- }
89
- }
90
-
91
- &-img {
92
- height: 100%;
93
- // max-width: 50%;
94
- }
95
- }
1
+ .empty-panel {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+ width: 100%;
6
+ min-width: 850px;
7
+ height: 100%;
8
+ overflow: auto;
9
+ background: url(./img/bg.png);
10
+ background-size: cover;
11
+ &-content {
12
+ width: 406px;
13
+ margin-left: 136px;
14
+ p {
15
+ color: #9aa1a9;
16
+ font-size: 14px;
17
+ }
18
+ }
19
+ &-content2 {
20
+ width: 400px;
21
+ p {
22
+ margin-bottom: 0;
23
+ }
24
+ }
25
+ &-title {
26
+ margin-bottom: 24px;
27
+ font-weight: 500;
28
+ font-size: 28px;
29
+ }
30
+ &-title-secondary {
31
+ margin-top: 24px;
32
+ margin-bottom: 8px;
33
+ font-weight: 500;
34
+ font-size: 16px;
35
+ }
36
+
37
+ &-code-container {
38
+ position: relative;
39
+ height: 200px;
40
+ margin: 8px 0;
41
+ padding: 16px;
42
+ background: #fafafb;
43
+ border-radius: 8px;
44
+ &:hover {
45
+ .empty-panel-code-copy {
46
+ display: flex;
47
+ }
48
+ }
49
+
50
+ & > div:not(.empty-panel-code-copy) {
51
+ color: #354354;
52
+ font-size: 14px;
53
+ line-height: 22px;
54
+ word-wrap: break-word;
55
+ span {
56
+ margin-left: 8px;
57
+ color: #9aa1a9;
58
+ }
59
+ }
60
+ }
61
+ &-code {
62
+ margin-left: 16px;
63
+ }
64
+ &-code-copy {
65
+ position: absolute;
66
+ top: 16px;
67
+ right: 16px;
68
+ display: flex;
69
+ display: none;
70
+ align-items: center;
71
+ height: 24px;
72
+ padding: 0 8px;
73
+ background: #f2f3f4;
74
+ border-radius: 4px;
75
+ cursor: pointer;
76
+ &:hover {
77
+ background: #e6e7ea;
78
+ }
79
+ &:focus {
80
+ background-color: #ccd0d4;
81
+ }
82
+
83
+ span {
84
+ margin-right: 8px;
85
+ margin-left: 0 !important;
86
+ font-size: 16px !important;
87
+ line-height: 1;
88
+ }
89
+ }
90
+
91
+ &-img {
92
+ height: 100%;
93
+ // max-width: 50%;
94
+ }
95
+ }
@@ -1,54 +1,59 @@
1
1
  import React from 'react';
2
2
  import { ModulesPage } from '@zgfe/modules-page';
3
3
  import { DemoWrapper } from '@zgfe/business-lib';
4
- var defaultValue = {
5
- pageTitle: '进入百度首页894854121612',
6
- appId: 225,
7
- module: 'page',
8
- pageUrl: 'http://baidu.com/query/894854121612',
9
- time: {
10
- unit: 'day',
11
- end: '2023-09-14',
12
- begin: '2023-08-31',
13
- relative: [14, 0]
14
- },
15
- filters: {
16
- conditions: [{
17
- attrId: 0,
18
- propCategory: 'userProp',
19
- values: ['实名'],
20
- dimensionSub: 'is_anonymous',
21
- label: '实名/匿名',
22
- type: 1,
23
- category: 'fixed',
24
- operator: 'equal',
25
- attrName: 'is_anonymous'
26
- }, {
27
- attrId: 0,
28
- propCategory: 'userProp',
29
- values: ['30', '1'],
30
- dimensionSub: 'last_visit_time',
31
- label: '最后一次访问时间',
32
- type: 3,
33
- category: 'fixed',
34
- operator: 'relative',
35
- attrName: 'last_visit_time'
36
- }, {
37
- attrId: 0,
38
- propCategory: 'envProp',
39
- type: 1,
40
- operator: 'equal',
41
- values: ['baidu'],
42
- dimensionSub: 'website',
43
- label: '来源域名',
44
- attrName: 'website',
45
- category: 'fixed'
46
- }],
47
- relation: 'and'
48
- },
49
- userGroup: [758, 757],
50
- platform: 3
51
- };
4
+ // const defaultValue = {
5
+ // pageTitle: '进入百度首页894854121612',
6
+ // appId: 225,
7
+ // module: 'page',
8
+ // pageUrl: 'http://baidu.com/query/894854121612',
9
+ // time: {
10
+ // unit: 'day',
11
+ // end: '2023-09-14',
12
+ // begin: '2023-08-31',
13
+ // relative: [14, 0],
14
+ // },
15
+ // filters: {
16
+ // conditions: [
17
+ // {
18
+ // attrId: 0,
19
+ // propCategory: 'userProp',
20
+ // values: ['实名'],
21
+ // dimensionSub: 'is_anonymous',
22
+ // label: '实名/匿名',
23
+ // type: 1,
24
+ // category: 'fixed',
25
+ // operator: 'equal',
26
+ // attrName: 'is_anonymous',
27
+ // },
28
+ // {
29
+ // attrId: 0,
30
+ // propCategory: 'userProp',
31
+ // values: ['30', '1'],
32
+ // dimensionSub: 'last_visit_time',
33
+ // label: '最后一次访问时间',
34
+ // type: 3,
35
+ // category: 'fixed',
36
+ // operator: 'relative',
37
+ // attrName: 'last_visit_time',
38
+ // },
39
+ // {
40
+ // attrId: 0,
41
+ // propCategory: 'envProp',
42
+ // type: 1,
43
+ // operator: 'equal',
44
+ // values: ['baidu'],
45
+ // dimensionSub: 'website',
46
+ // label: '来源域名',
47
+ // attrName: 'website',
48
+ // category: 'fixed',
49
+ // },
50
+ // ],
51
+ // relation: 'and',
52
+ // },
53
+ // userGroup: [758, 757],
54
+ // platform: 3,
55
+ // };
56
+
52
57
  export default (function () {
53
58
  var onClickWarn = function onClickWarn() {
54
59
  console.log('onClickWarn');
@@ -58,15 +63,15 @@ export default (function () {
58
63
  };
59
64
  return /*#__PURE__*/React.createElement(DemoWrapper, {
60
65
  needMeta: true,
61
- defaultApp: 225
66
+ defaultApp: 2
62
67
  }, /*#__PURE__*/React.createElement("div", {
63
68
  style: {
64
69
  height: 750,
65
70
  overflow: 'auto'
66
71
  }
67
72
  }, /*#__PURE__*/React.createElement(ModulesPage, {
68
- value: defaultValue,
69
73
  onClickWarn: onClickWarn,
70
- onChange: onChange
74
+ onChange: onChange,
75
+ isAppAnalysis: true
71
76
  })));
72
77
  });
@@ -93,12 +93,19 @@ 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;
@@ -211,24 +218,46 @@ 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
+ };
214
230
  var render = /*#__PURE__*/React.createElement("div", {
215
231
  className: "".concat(classPrefix, "-top-render")
216
- }, /*#__PURE__*/React.createElement(Button, {
232
+ }, /*#__PURE__*/React.createElement("div", {
233
+ className: "".concat(classPrefix, "-top-render-title")
234
+ }, "\u9875\u9762\u5206\u6790"), /*#__PURE__*/React.createElement(Button, {
217
235
  type: "primary",
218
236
  disabled: loading || !result || !result.length || !authority[100144],
219
237
  onClick: props.onClickWarn
220
238
  }, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66"));
239
+ // 查看App页面分析
240
+ var renderApp = /*#__PURE__*/React.createElement("div", {
241
+ className: "".concat(classPrefix, "-top-render")
242
+ }, /*#__PURE__*/React.createElement("div", {
243
+ className: "".concat(classPrefix, "-top-render-title")
244
+ }, "\u9875\u9762\u5206\u6790"), /*#__PURE__*/React.createElement(Button, {
245
+ type: "primary",
246
+ onClick: handleAppPageAnalysis
247
+ }, "App\u9875\u9762\u5206\u6790"));
221
248
  if (isEmpty) return /*#__PURE__*/React.createElement(EmptyPanel, null);
222
249
  return /*#__PURE__*/React.createElement(ModulesPageContext.Provider, {
223
250
  value: {
224
251
  pageList: pageList,
225
252
  pageGroupList: pageGroupList,
226
253
  currentClickPage: currentClickPage,
227
- setCurrentClickPage: setCurrentClickPage
254
+ setCurrentClickPage: setCurrentClickPage,
255
+ isAppAnalysis: isAppAnalysis
228
256
  }
229
257
  }, /*#__PURE__*/React.createElement(BizLayout, {
230
- className: classPrefix,
231
- title: "\u9875\u9762\u5206\u6790",
258
+ className: classPrefix
259
+ // title="页面分析"
260
+ ,
232
261
  hasCollapse: true,
233
262
  topPanel: /*#__PURE__*/React.createElement(Skeleton, {
234
263
  loading: pageLoading,
@@ -241,7 +270,7 @@ var ModulesPage = function ModulesPage(props) {
241
270
  value: searchValue,
242
271
  onChange: onChange
243
272
  })),
244
- topRender: props.onClickWarn ? render : null,
273
+ topRender: props.onClickWarn ? render : props.isAppAnalysis || renderApp,
245
274
  collapseRef: selectRef
246
275
  }, /*#__PURE__*/React.createElement(Spin, {
247
276
  spinning: pageLoading
@@ -1,45 +1,59 @@
1
- .modules-page {
2
- &-top-render {
3
- display: flex;
4
- justify-content: flex-end;
5
- height: 32px;
6
- margin-top: -8px;
7
- margin-bottom: 8px;
8
- .ant-btn {
9
- padding: 4px 16px;
10
- }
11
- }
12
- .ant-btn-primary[disabled] {
13
- color: #fff;
14
- background: #d0dfff;
15
- border-color: #d0dfff;
16
- }
17
-
18
- &-spin {
19
- display: flex;
20
- align-items: center;
21
- justify-content: center;
22
- min-height: 400px;
23
- margin-top: 24px;
24
- border: 1px solid #ecedf0;
25
- border-radius: 8px;
26
- }
27
-
28
- &-content {
29
- display: flex;
30
- align-items: center;
31
- justify-content: center;
32
- width: 100%;
33
- min-height: 300px;
34
- margin-top: 60px;
35
- background-color: #fff;
36
- }
37
- .ant-btn {
38
- display: flex;
39
- align-items: center;
40
- .bsicon {
41
- font-size: 16px !important;
42
- line-height: 1;
43
- }
44
- }
45
- }
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
  }>;
@@ -2,5 +2,6 @@ import { createContext } from 'react';
2
2
  export var ModulesPageTypes;
3
3
  export var ModulesPageContext = /*#__PURE__*/createContext({
4
4
  pageList: [],
5
- pageGroupList: []
5
+ pageGroupList: [],
6
+ isAppAnalysis: false
6
7
  });