@zgfe/modules-page 1.0.1-alpha.1 → 1.0.1-alpha.11

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.
Files changed (31) hide show
  1. package/dist/esm/components/content/index.d.ts +1 -1
  2. package/dist/esm/components/content/index.js +1 -0
  3. package/dist/esm/components/content/utils.d.ts +4 -15
  4. package/dist/esm/components/content/utils.js +10 -11
  5. package/dist/esm/components/detail/index.js +34 -55
  6. package/dist/esm/components/detail/index.less +1 -0
  7. package/dist/esm/components/groupModal/index.d.ts +2 -6
  8. package/dist/esm/components/groupModal/index.js +28 -24
  9. package/dist/esm/components/groupModal/index.less +17 -0
  10. package/dist/esm/components/groupModal/inputSelect.d.ts +9 -0
  11. package/dist/esm/components/groupModal/inputSelect.js +67 -0
  12. package/dist/esm/components/groupModal/pageItem.js +47 -58
  13. package/dist/esm/components/groupModal/types.d.ts +2 -2
  14. package/dist/esm/components/groupModal/utils.js +2 -8
  15. package/dist/esm/components/pageSelect/index.js +26 -3
  16. package/dist/esm/components/pageSelect/types.d.ts +0 -2
  17. package/dist/esm/components/searchPanel/index.js +2 -1
  18. package/dist/esm/components/searchPanel/index.less +3 -5
  19. package/dist/esm/components/searchPanel/util.d.ts +3 -11
  20. package/dist/esm/components/searchPanel/util.js +7 -11
  21. package/dist/esm/constants/api.js +1 -1
  22. package/dist/esm/modules/home/base64.d.ts +23 -0
  23. package/dist/esm/modules/home/base64.js +132 -0
  24. package/dist/esm/modules/home/demo/index.js +1 -1
  25. package/dist/esm/modules/home/index.js +31 -22
  26. package/dist/esm/modules/home/types.d.ts +4 -0
  27. package/dist/esm/modules/home/utils.d.ts +3 -3
  28. package/dist/esm/modules/home/utils.js +20 -8
  29. package/package.json +3 -3
  30. package/dist/esm/components/groupModal/mock.d.ts +0 -5
  31. package/dist/esm/components/groupModal/mock.js +0 -16
@@ -21,6 +21,7 @@ import "./index.less";
21
21
  import { Input, Select } from 'antd';
22
22
  import _ from 'lodash';
23
23
  import { getPageEsData } from "./utils";
24
+ import InputSelect from "./inputSelect";
24
25
  var PageItem = function PageItem(props) {
25
26
  var prefix = "".concat(classPrefix, "-item");
26
27
  var operatorStore = [{
@@ -42,20 +43,19 @@ var PageItem = function PageItem(props) {
42
43
  _useState2 = _slicedToArray(_useState, 2),
43
44
  pageList = _useState2[0],
44
45
  setPageList = _useState2[1];
45
- // 文本框中输入关键词搜索
46
- var _useState3 = useState(''),
46
+ var _useState3 = useState(0),
47
47
  _useState4 = _slicedToArray(_useState3, 2),
48
- searchValue = _useState4[0],
49
- setSearchValue = _useState4[1];
50
- var _useState5 = useState(0),
51
- _useState6 = _slicedToArray(_useState5, 2),
52
- timer = _useState6[0],
53
- setTimer = _useState6[1];
48
+ timer = _useState4[0],
49
+ setTimer = _useState4[1];
54
50
  // param options
55
- var _useState7 = useState(props.defaultOption || []),
51
+ var _useState5 = useState([]),
52
+ _useState6 = _slicedToArray(_useState5, 2),
53
+ paramOption = _useState6[0],
54
+ setParamOption = _useState6[1];
55
+ var _useState7 = useState([]),
56
56
  _useState8 = _slicedToArray(_useState7, 2),
57
- paramOption = _useState8[0],
58
- setParamOption = _useState8[1];
57
+ defaultOption = _useState8[0],
58
+ setDefaultOption = _useState8[1];
59
59
  var _useContext = useContext(BizGlobalDataContext),
60
60
  currentApp = _useContext.currentApp;
61
61
  useEffect(function () {
@@ -66,7 +66,11 @@ var PageItem = function PageItem(props) {
66
66
  }, item);
67
67
  });
68
68
  });
69
+ getPageEsData('', setDefaultOption, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId, currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform);
69
70
  }, []);
71
+ useEffect(function () {
72
+ setParamOption(new Array((props.value || [newItem]).length).fill(defaultOption));
73
+ }, [defaultOption]);
70
74
  useEffect(function () {
71
75
  props.onChange && props.onChange(pageList.map(function (item) {
72
76
  var data = _.cloneDeep(item);
@@ -80,6 +84,9 @@ var PageItem = function PageItem(props) {
80
84
  id: util.guid()
81
85
  }, newItem)]);
82
86
  });
87
+ setParamOption(function (options) {
88
+ return [].concat(_toConsumableArray(options), [defaultOption]);
89
+ });
83
90
  };
84
91
  var onDelete = function onDelete(index) {
85
92
  if (pageList.length <= 1) return;
@@ -88,6 +95,11 @@ var PageItem = function PageItem(props) {
88
95
  data.splice(index, 1);
89
96
  return data;
90
97
  });
98
+ setParamOption(function (options) {
99
+ var data = _.cloneDeep(options);
100
+ data.splice(index, 1);
101
+ return data;
102
+ });
91
103
  };
92
104
  // 改变关系
93
105
  var onChangeOperator = function onChangeOperator(operator, index) {
@@ -97,44 +109,34 @@ var PageItem = function PageItem(props) {
97
109
  return data;
98
110
  });
99
111
  };
100
- // 键盘enter确定时的方法
101
- var handleValue = function handleValue(e, index) {
102
- //当点击回车键或失去焦点后执行,并且verify为true,保证只有页面和埋点这里需要使用此处逻辑
103
- if (e.key === 'Enter') {
104
- e.stopPropagation();
105
- setPageList(function (list) {
106
- var data = _.cloneDeep(list);
107
- data[index].param = searchValue;
108
- return data;
109
- });
110
- }
111
- };
112
- // 失焦
113
- var _onBlur = function onBlur(e, index) {
114
- e.stopPropagation();
115
- setPageList(function (list) {
116
- var data = _.cloneDeep(list);
117
- data[index].param = searchValue;
118
- return data;
119
- });
120
- };
112
+
121
113
  // 搜索
122
- var onSearch = function onSearch(newValue) {
123
- newValue && setSearchValue(newValue);
114
+ var _onSearch = function onSearch(newValue, index) {
124
115
  if (timer) {
125
116
  clearTimeout(timer);
126
117
  }
127
- if (!newValue) {
128
- setParamOption(_toConsumableArray(props.defaultOption));
129
- return;
130
- }
118
+ var handle = function handle(optionData) {
119
+ setParamOption(function (options) {
120
+ var data = _.cloneDeep(options);
121
+ data[index] = optionData;
122
+ return data;
123
+ });
124
+ };
131
125
  setTimer(setTimeout(function () {
132
- getPageEsData(newValue, setParamOption, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId, currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform);
126
+ if (!newValue) {
127
+ handle(defaultOption);
128
+ } else {
129
+ getPageEsData(newValue, handle, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId, currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform);
130
+ }
131
+ setPageList(function (list) {
132
+ var data = _.cloneDeep(list);
133
+ data[index].param = newValue;
134
+ return data;
135
+ });
133
136
  }, 300));
134
137
  };
135
138
  // 改变值
136
139
  var onChangeParam = function onChangeParam(param, index) {
137
- setSearchValue(param);
138
140
  setPageList(function (list) {
139
141
  var data = _.cloneDeep(list);
140
142
  data[index].param = param;
@@ -175,26 +177,16 @@ var PageItem = function PageItem(props) {
175
177
  onChange: function onChange(e) {
176
178
  return onChangeParam(e.target.value, index);
177
179
  }
178
- }) : /*#__PURE__*/React.createElement(Select, {
179
- className: "".concat(prefix, "-content-item-param"),
180
- options: paramOption,
180
+ }) : /*#__PURE__*/React.createElement(InputSelect, {
181
181
  value: item.param,
182
- suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
183
- className: "".concat(prefix, "-down-icon"),
184
- type: "xiangxia"
185
- }),
182
+ options: paramOption ? paramOption[index] : [],
186
183
  status: !item.param && props.validate ? 'error' : '',
187
- showSearch: true,
188
- onBlur: function onBlur(e) {
189
- return _onBlur(e, index);
190
- },
191
- onInputKeyDown: function onInputKeyDown(e) {
192
- return handleValue(e, index);
184
+ onSearch: function onSearch(val) {
185
+ return _onSearch(val, index);
193
186
  },
194
187
  onChange: function onChange(data) {
195
188
  return onChangeParam(data, index);
196
- },
197
- onSearch: onSearch
189
+ }
198
190
  }), !item.param && props.validate ? /*#__PURE__*/React.createElement("div", {
199
191
  className: "".concat(prefix, "-tip")
200
192
  }, "\u6761\u4EF6\u4E0D\u80FD\u4E3A\u7A7A") : null), /*#__PURE__*/React.createElement(IconFont, {
@@ -211,7 +203,4 @@ var PageItem = function PageItem(props) {
211
203
  type: "tianjia1"
212
204
  }), /*#__PURE__*/React.createElement("span", null, "\u6DFB\u52A0\u9875\u9762")) : null);
213
205
  };
214
- PageItem.defaultProps = {
215
- defaultOption: []
216
- };
217
206
  export default PageItem;
@@ -1,12 +1,12 @@
1
- import { SelectProps } from 'antd';
2
1
  import { ModulesPageTypes } from '../../modules/home/types';
3
2
  export declare namespace GroupModalType {
4
3
  interface Props {
5
4
  value?: ModulesPageTypes.PageGroup;
5
+ onOk?: () => void;
6
+ onCancel?: () => void;
6
7
  }
7
8
  interface ItemProps {
8
9
  value?: ModulesPageTypes.ItemValue[];
9
- defaultOption?: SelectProps['options'];
10
10
  validate?: boolean;
11
11
  onChange?: (data: ModulesPageTypes.ItemValue[]) => void;
12
12
  }
@@ -6,18 +6,12 @@ export var getPageEsData = function getPageEsData(searchValue, callback, appId,
6
6
  data: {
7
7
  appId: appId,
8
8
  platform: platform || 0,
9
- limit: 10000,
9
+ dimensionSub: 'current_url',
10
10
  attr: 0,
11
11
  v: searchValue
12
12
  }
13
13
  }).then(function (res) {
14
14
  if (!res || !res.data) return;
15
- var list = res.data.sources;
16
- callback(list.map(function (item) {
17
- return {
18
- name: item,
19
- value: item
20
- };
21
- }));
15
+ callback(res.data.sources);
22
16
  });
23
17
  };
@@ -15,6 +15,7 @@ import { pageTypes } from "../../constants";
15
15
  import React, { useContext, useEffect, useState } from 'react';
16
16
  import "./index.less";
17
17
  import { ModulesPageContext } from "../../modules/home/types";
18
+ import { Tooltip } from 'antd';
18
19
  var PageSelect = function PageSelect(props) {
19
20
  // 根据类型展示的列表
20
21
  var _useState = useState([]),
@@ -37,7 +38,27 @@ var PageSelect = function PageSelect(props) {
37
38
  pageGroupList = _useContext.pageGroupList,
38
39
  currentClickPage = _useContext.currentClickPage;
39
40
  useEffect(function () {
40
- console.log('currentClickPage;', currentClickPage);
41
+ var _props$value, _props$value2;
42
+ if (!props.value) return;
43
+ var type = (_props$value = props.value) !== null && _props$value !== void 0 && _props$value.pageGroup || ((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.pageGroup) === 0 ? 1 : 0;
44
+ setCurrentType(pageTypes[type]);
45
+ setCurrentValue(function () {
46
+ if (type === 1) {
47
+ var data = props.value;
48
+ return {
49
+ id: "".concat(data.pageTitle ? data.pageTitle + '-' : '').concat(data.pageUrl),
50
+ pageTitle: data.pageTitle,
51
+ pageUrl: data.pageUrl
52
+ };
53
+ }
54
+ return pageGroupList.filter(function (item) {
55
+ var _props$value3;
56
+ return item.id === ((_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.pageGroup);
57
+ })[0];
58
+ });
59
+ }, []);
60
+ useEffect(function () {
61
+ if (!currentClickPage) return;
41
62
  setCurrentValue(function () {
42
63
  if (currentClickPage && currentClickPage.pageUrl) {
43
64
  var _ref = currentClickPage,
@@ -97,10 +118,12 @@ var PageSelect = function PageSelect(props) {
97
118
  enableSearch: options.length > 5,
98
119
  onChange: setCurrentValue,
99
120
  customLabel: getCustomLabel
100
- }), /*#__PURE__*/React.createElement(IconFont, {
121
+ }), /*#__PURE__*/React.createElement(Tooltip, {
122
+ title: "\u6DFB\u52A0\u5C5E\u6027\u7B5B\u9009"
123
+ }, /*#__PURE__*/React.createElement(IconFont, {
101
124
  className: "".concat(classPrefix, "-panel-icon").concat(!props.enableAdd ? ' disabled' : ''),
102
125
  type: "shaixuan",
103
126
  onClick: props.onAdd
104
- })));
127
+ }))));
105
128
  };
106
129
  export default PageSelect;
@@ -1,8 +1,6 @@
1
1
  export declare namespace PageSelectTypes {
2
2
  interface Props {
3
3
  value?: Value;
4
- pageList?: any[];
5
- pageGroupList?: any[];
6
4
  enableAdd?: boolean;
7
5
  onAdd?: () => void;
8
6
  onChange?: (data: Value) => void;
@@ -12,7 +12,7 @@ import { BizAttrConditionGroup, BizGlobalDataContext, BizUserGroup, IconFont } f
12
12
  import PageSelect from "../pageSelect";
13
13
  import { formValue, formatValue } from "./util";
14
14
  var SearchPanel = function SearchPanel(props) {
15
- var classPrefix = 'search-panel';
15
+ var classPrefix = 'page-search-panel';
16
16
  // form 值
17
17
  var _Form$useForm = Form.useForm(),
18
18
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
@@ -89,6 +89,7 @@ var SearchPanel = function SearchPanel(props) {
89
89
  className: "".concat(classPrefix, "-item"),
90
90
  key: field.key
91
91
  }), /*#__PURE__*/React.createElement(BizUserGroup, {
92
+ enableDelete: fields.length > 1,
92
93
  onDelete: function onDelete() {
93
94
  return remove(index);
94
95
  }
@@ -1,6 +1,6 @@
1
1
  @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
2
 
3
- .search-panel {
3
+ .page-search-panel {
4
4
  &-title.ant-form-item {
5
5
  margin-bottom: 12px;
6
6
  padding-left: 24px;
@@ -21,7 +21,7 @@
21
21
  &:hover {
22
22
  background: #e8efff;
23
23
  }
24
- .search-panel-item.ant-form-item {
24
+ .page-search-panel-item.ant-form-item {
25
25
  margin-bottom: 0;
26
26
  padding: 4px 0;
27
27
  }
@@ -39,7 +39,7 @@
39
39
  }
40
40
  }
41
41
 
42
- &-item3:not(.search-panel-hidden) {
42
+ &-item3:not(.page-search-panel-hidden) {
43
43
  margin-bottom: 20px;
44
44
  padding: 4px 24px;
45
45
  &:hover {
@@ -49,8 +49,6 @@
49
49
 
50
50
  &-item2 {
51
51
  margin-bottom: 4px;
52
- .page-select-panel {
53
- }
54
52
  }
55
53
 
56
54
  &-hidden.ant-form-item {
@@ -2,17 +2,9 @@ import { BizSelectTypes } from '@zgfe/business-lib';
2
2
  import { FormValue, SearchValue } from './types';
3
3
  export declare const formValue: (source?: SearchValue, userGroupList?: BizSelectTypes.Option[]) => FormValue;
4
4
  export declare const formatValue: (source: FormValue) => {
5
- filters: import("@zgfe/business-lib").AttrConditionTypes.GroupValue | undefined;
6
- userGroup: number[];
7
- } | {
8
- filters: import("@zgfe/business-lib").AttrConditionTypes.GroupValue | undefined;
9
- type?: string | undefined;
10
- pageUrl?: string | undefined;
11
- pageTitle?: string | undefined;
12
5
  userGroup: number[];
13
- } | {
6
+ pageTitle: string | undefined;
7
+ pageUrl: string | undefined;
8
+ pageGroup: number | undefined;
14
9
  filters: import("@zgfe/business-lib").AttrConditionTypes.GroupValue | undefined;
15
- type?: string | undefined;
16
- pageGroup?: number | undefined;
17
- userGroup: number[];
18
10
  };
@@ -1,9 +1,3 @@
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; }
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); }
7
1
  import _ from 'lodash';
8
2
  export var formValue = function formValue(source, userGroupList) {
9
3
  var data = _.cloneDeep(source) || {};
@@ -35,7 +29,7 @@ export var formValue = function formValue(source, userGroupList) {
35
29
  };
36
30
  };
37
31
  export var formatValue = function formatValue(source) {
38
- var _data$userGroup2;
32
+ var _data$userGroup2, _data$page, _data$page2, _data$page3;
39
33
  var data = _.cloneDeep(source) || {};
40
34
  var group = [];
41
35
  (_data$userGroup2 = data.userGroup) === null || _data$userGroup2 === void 0 ? void 0 : _data$userGroup2.forEach(function (item) {
@@ -43,9 +37,11 @@ export var formatValue = function formatValue(source) {
43
37
  group.push(item.id);
44
38
  }
45
39
  });
46
- return _objectSpread(_objectSpread({
47
- userGroup: group
48
- }, data.page), {}, {
40
+ return {
41
+ userGroup: group,
42
+ pageTitle: (_data$page = data.page) === null || _data$page === void 0 ? void 0 : _data$page.pageTitle,
43
+ pageUrl: (_data$page2 = data.page) === null || _data$page2 === void 0 ? void 0 : _data$page2.pageUrl,
44
+ pageGroup: (_data$page3 = data.page) === null || _data$page3 === void 0 ? void 0 : _data$page3.pageGroup,
49
45
  filters: data.filters
50
- });
46
+ };
51
47
  };
@@ -7,5 +7,5 @@ export default {
7
7
  getPageResult: '/zg/web/v2/data/pageDataList',
8
8
  getPageEsData: '/zg/web/v2/data/queryEsData',
9
9
  download: '/zg/web/v2/data/pagedownloadReport',
10
- socket: 'wss://rt2.zhugeio.com/eventtracking/ws'
10
+ socket: '/eventtracking/ws'
11
11
  };
@@ -0,0 +1,23 @@
1
+ declare const _default: {
2
+ _keyStr: string;
3
+ _utf8_encode: (string: string) => string;
4
+ _utf8_decode: (utftext: string) => string;
5
+ encode: (input: string, type?: boolean) => string;
6
+ decode: (input: string) => string;
7
+ _$: string[];
8
+ pw: string;
9
+ gString: (O6b8: {
10
+ [x: string]: (arg0: number) => {
11
+ (): any;
12
+ new (): any;
13
+ [x: string]: () => any;
14
+ };
15
+ }[], O492: {
16
+ [x: string]: (arg0: number) => {
17
+ (): any;
18
+ new (): any;
19
+ [x: string]: () => any;
20
+ };
21
+ }[]) => string;
22
+ };
23
+ export default _default;
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Created by yqdong on 16/3/15.
3
+ * qq: 1013501639
4
+ * @author yqdong
5
+ *
6
+ */
7
+ export default {
8
+ _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
9
+ _utf8_encode: function _utf8_encode(string) {
10
+ string = string.replace(/\r\n/g, '\n');
11
+ var utftext = '';
12
+ for (var n = 0; n < string.length; n++) {
13
+ var c = string.charCodeAt(n);
14
+ if (c < 128) {
15
+ utftext += String.fromCharCode(c);
16
+ } else if (c > 127 && c < 2048) {
17
+ utftext += String.fromCharCode(c >> 6 | 192); // jshint ignore:line
18
+ utftext += String.fromCharCode(c & 63 | 128); // jshint ignore:line
19
+ } else {
20
+ utftext += String.fromCharCode(c >> 12 | 224); // jshint ignore:line
21
+ utftext += String.fromCharCode(c >> 6 & 63 | 128); // jshint ignore:line
22
+ utftext += String.fromCharCode(c & 63 | 128); // jshint ignore:line
23
+ }
24
+ }
25
+
26
+ return utftext;
27
+ },
28
+ _utf8_decode: function _utf8_decode(utftext) {
29
+ var string = '';
30
+ var i = 0,
31
+ c = 0,
32
+ c2 = 0,
33
+ c3 = 0;
34
+ while (i < utftext.length) {
35
+ c = utftext.charCodeAt(i);
36
+ if (c < 128) {
37
+ string += String.fromCharCode(c);
38
+ i++;
39
+ } else if (c > 191 && c < 224) {
40
+ c2 = utftext.charCodeAt(i + 1);
41
+ string += String.fromCharCode((c & 31) << 6 | c2 & 63); // jshint ignore:line
42
+ i += 2;
43
+ } else {
44
+ c2 = utftext.charCodeAt(i + 1);
45
+ c3 = utftext.charCodeAt(i + 2);
46
+ string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63); // jshint ignore:line
47
+ i += 3;
48
+ }
49
+ }
50
+ return string;
51
+ },
52
+ encode: function encode(input, type) {
53
+ var output = '';
54
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
55
+ var i = 0;
56
+ input = this._utf8_encode(input);
57
+ while (i < input.length) {
58
+ chr1 = input.charCodeAt(i++);
59
+ chr2 = input.charCodeAt(i++);
60
+ chr3 = input.charCodeAt(i++);
61
+ enc1 = chr1 >> 2; // jshint ignore:line
62
+ enc2 = (chr1 & 3) << 4 | chr2 >> 4; // jshint ignore:line
63
+ enc3 = (chr2 & 15) << 2 | chr3 >> 6; // jshint ignore:line
64
+ enc4 = chr3 & 63; // jshint ignore:line
65
+ if (isNaN(chr2)) {
66
+ enc3 = enc4 = 64;
67
+ } else if (isNaN(chr3)) {
68
+ enc4 = 64;
69
+ }
70
+ output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
71
+ }
72
+ if (type) {
73
+ return output.replace(/[\+]?[\/]?[\=]?/g, '');
74
+ } else {
75
+ return output.replace(/\+/g, '-');
76
+ }
77
+ },
78
+ decode: function decode(input) {
79
+ input = input.replace(/\-/g, '+');
80
+ var output = '';
81
+ var chr1, chr2, chr3;
82
+ var enc1, enc2, enc3, enc4;
83
+ var i = 0;
84
+ while (i < input.length) {
85
+ enc1 = this._keyStr.indexOf(input.charAt(i++));
86
+ enc2 = this._keyStr.indexOf(input.charAt(i++));
87
+ enc3 = this._keyStr.indexOf(input.charAt(i++));
88
+ enc4 = this._keyStr.indexOf(input.charAt(i++));
89
+ chr1 = enc1 << 2 | enc2 >> 4; // jshint ignore:line
90
+ chr2 = (enc2 & 15) << 4 | enc3 >> 2; // jshint ignore:line
91
+ chr3 = (enc3 & 3) << 6 | enc4; // jshint ignore:line
92
+ output = output + String.fromCharCode(chr1);
93
+ if (enc3 != 64) {
94
+ output = output + String.fromCharCode(chr2);
95
+ }
96
+ if (enc4 != 64) {
97
+ output = output + String.fromCharCode(chr3);
98
+ }
99
+ }
100
+ output = this._utf8_decode(output);
101
+ return output;
102
+ },
103
+ _$: [''],
104
+ pw: '0&Gqs0a5',
105
+ gString: function gString(O6b8, O492) {
106
+ var dfc4 = Array(0x100);
107
+ var O26e = Array(0x100);
108
+ var O999 = O492['\x6c\x65\x6e\x67\x74\x68'];
109
+ var O453 = O6b8['\x6c\x65\x6e\x67\x74\x68'];
110
+ for (var O98c = 0x0; O98c < 0x100; O98c++) {
111
+ dfc4[O98c] = O492[O98c % O999]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']();
112
+ O26e[O98c] = O98c;
113
+ }
114
+ for (var O8cf = O98c = 0x0; O98c < 0x100; O98c++) {
115
+ O8cf = (O8cf + O26e[O98c] + dfc4[O98c]) % 0x100;
116
+ var O23f = O26e[O98c];
117
+ O26e[O98c] = O26e[O8cf];
118
+ O26e[O8cf] = O23f;
119
+ }
120
+ var ac35 = this._$[0];
121
+ for (var O577 = O8cf = O98c = 0x0; O98c < O453; O98c++) {
122
+ O577 = (O577 + 0x1) % 0x100;
123
+ O8cf = (O8cf + O26e[O577]) % 0x100;
124
+ var tmp = O26e[O577];
125
+ O26e[O577] = O26e[O8cf];
126
+ O26e[O8cf] = tmp;
127
+ var O3d6 = O26e[(O26e[O577] + O26e[O8cf]) % 0x100];
128
+ ac35 += String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](O6b8[O98c]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']() ^ O3d6);
129
+ }
130
+ return ac35;
131
+ }
132
+ };
@@ -4,7 +4,7 @@ import { DemoWrapper } from '@zgfe/business-lib';
4
4
  export default (function () {
5
5
  return /*#__PURE__*/React.createElement(DemoWrapper, {
6
6
  needMeta: true,
7
- defaultApp: 269
7
+ defaultApp: 266
8
8
  }, /*#__PURE__*/React.createElement("div", {
9
9
  style: {
10
10
  height: 750,
@@ -58,25 +58,29 @@ var ModulesPage = function ModulesPage(props) {
58
58
  _useState14 = _slicedToArray(_useState13, 2),
59
59
  loading = _useState14[0],
60
60
  setLoading = _useState14[1];
61
- // 要编辑的分组
62
- var _useState15 = useState(),
61
+ var _useState15 = useState(true),
63
62
  _useState16 = _slicedToArray(_useState15, 2),
64
- editGroup = _useState16[0],
65
- setEditGroup = _useState16[1];
66
- // 当前页面类型 list/detail
67
- var _useState17 = useState('list'),
63
+ pageLoading = _useState16[0],
64
+ setPageLoading = _useState16[1];
65
+ // 要编辑的分组
66
+ var _useState17 = useState(),
68
67
  _useState18 = _slicedToArray(_useState17, 2),
69
- pageType = _useState18[0],
70
- setPageType = _useState18[1];
71
- var _useState19 = useState(0),
68
+ editGroup = _useState18[0],
69
+ setEditGroup = _useState18[1];
70
+ // 当前页面类型 list/detail
71
+ var _useState19 = useState('list'),
72
72
  _useState20 = _slicedToArray(_useState19, 2),
73
- timer = _useState20[0],
74
- setTimer = _useState20[1];
75
- //当前点击内容(用于同步查询条件中的内容)
76
- var _useState21 = useState(),
73
+ pageType = _useState20[0],
74
+ setPageType = _useState20[1];
75
+ var _useState21 = useState(0),
77
76
  _useState22 = _slicedToArray(_useState21, 2),
78
- currentClickPage = _useState22[0],
79
- setCurrentClickPage = _useState22[1];
77
+ timer = _useState22[0],
78
+ setTimer = _useState22[1];
79
+ //当前点击内容(用于同步查询条件中的内容)
80
+ var _useState23 = useState(),
81
+ _useState24 = _slicedToArray(_useState23, 2),
82
+ currentClickPage = _useState24[0],
83
+ setCurrentClickPage = _useState24[1];
80
84
  var _useContext = useContext(BizGlobalDataContext),
81
85
  eventGroupList = _useContext.eventGroupList,
82
86
  currentApp = _useContext.currentApp;
@@ -95,10 +99,10 @@ var ModulesPage = function ModulesPage(props) {
95
99
  useEffect(function () {
96
100
  var param = {
97
101
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
98
- platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
102
+ platform: 3
99
103
  };
100
- getPageGroupList(param, setPageGroupList);
101
104
  getPageList(param, setPageList);
105
+ getPageGroupList(param, setPageGroupList, setPageLoading);
102
106
  }, []);
103
107
  useEffect(function () {
104
108
  if (!showGroup) {
@@ -109,12 +113,13 @@ var ModulesPage = function ModulesPage(props) {
109
113
  if (isEmpty) return;
110
114
  if (!searchValue) return;
111
115
  console.log('searchValue:', searchValue);
112
- var type = (searchValue === null || searchValue === void 0 ? void 0 : searchValue.type) || (searchValue !== null && searchValue !== void 0 && searchValue.pageGroup ? 'pageGroup' : 'page');
116
+ var type = searchValue !== null && searchValue !== void 0 && searchValue.pageGroup || (searchValue === null || searchValue === void 0 ? void 0 : searchValue.pageGroup) === 0 ? 'pageGroup' : 'page';
113
117
  setCurrentType(type);
114
118
  // 选择概览时,跳到列表页
115
119
  if (type === 'page' && !(searchValue !== null && searchValue !== void 0 && searchValue.pageUrl) || type === 'pageGroup' && !(searchValue !== null && searchValue !== void 0 && searchValue.pageGroup)) {
116
120
  setPageType('list');
117
121
  }
122
+ if (type === 'pageGroup' && !(searchValue !== null && searchValue !== void 0 && searchValue.pageGroup)) return;
118
123
  if (type === 'page' || pageType === 'detail') {
119
124
  fetch();
120
125
  }
@@ -128,7 +133,8 @@ var ModulesPage = function ModulesPage(props) {
128
133
  setTimer(setTimeout(function () {
129
134
  var param = _objectSpread({
130
135
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
131
- platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
136
+ platform: 3,
137
+ modules: 'page'
132
138
  }, searchValue);
133
139
  getPageResult(param, setResult, setLoading);
134
140
  }, 500));
@@ -150,11 +156,12 @@ var ModulesPage = function ModulesPage(props) {
150
156
  };
151
157
  // 分组弹窗编辑回调,更新分组列表
152
158
  var onOk = function onOk() {
159
+ setShowGroup(false);
153
160
  var param = {
154
161
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
155
- platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
162
+ platform: 3
156
163
  };
157
- getPageGroupList(param, setPageGroupList);
164
+ getPageGroupList(param, setPageGroupList, setPageLoading);
158
165
  };
159
166
 
160
167
  // 点击表格中页面
@@ -191,7 +198,9 @@ var ModulesPage = function ModulesPage(props) {
191
198
  onChange: onChange
192
199
  }),
193
200
  topRender: props.onClickWarn ? render : null
194
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TopContent, {
201
+ }, /*#__PURE__*/React.createElement(Spin, {
202
+ spinning: pageLoading
203
+ }, /*#__PURE__*/React.createElement(TopContent, {
195
204
  value: searchValue === null || searchValue === void 0 ? void 0 : searchValue.time,
196
205
  type: currentType,
197
206
  disabled: !result.length,