@zgfe/modules-page 1.0.17-zhongyuan.16 → 1.0.17-zhongyuan.19
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/dist/esm/components/content/index.js +2 -8
- package/dist/esm/components/pageSelect/index.js +1 -2
- package/dist/esm/components/searchPanel/index.js +1 -8
- package/dist/esm/modules/home/demo/index.js +1 -16
- package/dist/esm/modules/home/index.d.ts +1 -4
- package/dist/esm/modules/home/index.js +7 -19
- package/dist/esm/modules/home/types.d.ts +1 -3
- package/dist/esm/modules/home/types.js +1 -2
- package/package.json +2 -2
|
@@ -9,8 +9,7 @@ import emptyImg from "../detail/images/empty.png";
|
|
|
9
9
|
var PageContent = function PageContent(props) {
|
|
10
10
|
var classPrefix = 'page-content';
|
|
11
11
|
var _useContext = useContext(ModulesPageContext),
|
|
12
|
-
pageGroupList = _useContext.pageGroupList
|
|
13
|
-
isAppAnalysis = _useContext.isAppAnalysis;
|
|
12
|
+
pageGroupList = _useContext.pageGroupList;
|
|
14
13
|
var groupList = useMemo(function () {
|
|
15
14
|
if (!pageGroupList) return [];
|
|
16
15
|
var data = _.cloneDeep(pageGroupList);
|
|
@@ -46,12 +45,7 @@ var PageContent = function PageContent(props) {
|
|
|
46
45
|
}
|
|
47
46
|
return /*#__PURE__*/React.createElement("div", {
|
|
48
47
|
className: classPrefix
|
|
49
|
-
},
|
|
50
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
key: index,
|
|
52
|
-
className: "anslysis-tip"
|
|
53
|
-
}, /*#__PURE__*/React.createElement("span", null, "\u6240\u6709\u7528\u6237 >"), /*#__PURE__*/React.createElement("span", null, "\u6D4F\u89C8\u6B21\u6570\uFF1A159", o), /*#__PURE__*/React.createElement("span", null, "\u6D4F\u89C8\u4EBA\u6570\uFF1A159"), /*#__PURE__*/React.createElement("span", null, "\u70B9\u51FB\u6B21\u6570\uFF1A159"), /*#__PURE__*/React.createElement("span", null, "\u70B9\u51FB\u4EBA\u6570\uFF1A159"));
|
|
54
|
-
})), /*#__PURE__*/React.createElement(BizTable, {
|
|
48
|
+
}, /*#__PURE__*/React.createElement(BizTable, {
|
|
55
49
|
rowKey: "id",
|
|
56
50
|
dataSource: props.type === 'pageGroup' ? groupList : props.value,
|
|
57
51
|
columns: columns
|
|
@@ -19,7 +19,6 @@ import { Dropdown, Tooltip } from 'antd';
|
|
|
19
19
|
import VirtualList from 'rc-virtual-list';
|
|
20
20
|
import _ from 'lodash';
|
|
21
21
|
var PageSelect = function PageSelect(props) {
|
|
22
|
-
var _props$value4, _props$value5;
|
|
23
22
|
// 当前类型
|
|
24
23
|
var _useState = useState(pageTypes[0]),
|
|
25
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -76,7 +75,7 @@ var PageSelect = function PageSelect(props) {
|
|
|
76
75
|
setTimeout(function () {
|
|
77
76
|
setIsFirst(false);
|
|
78
77
|
}, 0);
|
|
79
|
-
}, [
|
|
78
|
+
}, []);
|
|
80
79
|
useEffect(function () {
|
|
81
80
|
if (!currentClickPage || isFirst) return;
|
|
82
81
|
setCurrentValue(function () {
|
|
@@ -1,9 +1,3 @@
|
|
|
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
|
-
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(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
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
2
|
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
3
|
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); }
|
|
@@ -45,11 +39,10 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
45
39
|
var data = formValue(props.value);
|
|
46
40
|
setCount(((_data$filters = data.filters) === null || _data$filters === void 0 ? void 0 : _data$filters.conditions.length) || 0);
|
|
47
41
|
setFormData(data);
|
|
48
|
-
form.setFieldsValue(_objectSpread({}, data));
|
|
49
42
|
setTimeout(function () {
|
|
50
43
|
setLoading(false);
|
|
51
44
|
}, 0);
|
|
52
|
-
}, [
|
|
45
|
+
}, []);
|
|
53
46
|
|
|
54
47
|
/**
|
|
55
48
|
* 筛选值发生改变
|
|
@@ -92,21 +92,6 @@ export default (function () {
|
|
|
92
92
|
}, "\u53D8\u5316"), /*#__PURE__*/React.createElement(ModulesPage, {
|
|
93
93
|
ref: pageDeta,
|
|
94
94
|
onClickWarn: onClickWarn,
|
|
95
|
-
onChange: onChange
|
|
96
|
-
value: {
|
|
97
|
-
appId: 1,
|
|
98
|
-
module: 'page',
|
|
99
|
-
pageTitle: '数据分析',
|
|
100
|
-
pageUrl: 'file:///C:/Users/Administrator/Desktop/index.html',
|
|
101
|
-
platform: 3,
|
|
102
|
-
time: {
|
|
103
|
-
unit: 'day',
|
|
104
|
-
end: '2025-09-19',
|
|
105
|
-
begin: '2025-09-16'
|
|
106
|
-
},
|
|
107
|
-
userGroup: [0],
|
|
108
|
-
type: 'page'
|
|
109
|
-
},
|
|
110
|
-
isAppAnalysis: true
|
|
95
|
+
onChange: onChange
|
|
111
96
|
})));
|
|
112
97
|
});
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './style/index.less';
|
|
3
3
|
import { ModulesPageTypes } from './types';
|
|
4
|
-
|
|
5
|
-
searchFn: Function | null;
|
|
6
|
-
};
|
|
7
|
-
declare const ModulesPage: React.ForwardRefExoticComponent<ModulesPageTypes.Props & React.RefAttributes<MyRefType>>;
|
|
4
|
+
declare const ModulesPage: React.FC<ModulesPageTypes.Props>;
|
|
8
5
|
export default ModulesPage;
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
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
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
|
|
13
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } 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 =
|
|
27
|
+
var ModulesPage = function ModulesPage(props) {
|
|
28
28
|
// 页面类型
|
|
29
29
|
var _useState = useState('page'),
|
|
30
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -93,11 +93,6 @@ var ModulesPage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
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
|
-
|
|
101
96
|
// 查询条件ref
|
|
102
97
|
var selectRef = useRef(null);
|
|
103
98
|
var _useContext = useContext(BizGlobalDataContext),
|
|
@@ -108,10 +103,11 @@ var ModulesPage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
108
103
|
routes = _useContext.routes;
|
|
109
104
|
// 是否是没进行埋点分析
|
|
110
105
|
var isEmpty = useMemo(function () {
|
|
106
|
+
// && event?.click_analysis
|
|
111
107
|
var flag = true;
|
|
112
108
|
eventGroupList === null || eventGroupList === void 0 || eventGroupList.forEach(function (group) {
|
|
113
109
|
group.eventList.forEach(function (event) {
|
|
114
|
-
if (
|
|
110
|
+
if (event.event_name === 'click' || event.event_name === 'pv') {
|
|
115
111
|
flag = false;
|
|
116
112
|
}
|
|
117
113
|
});
|
|
@@ -227,13 +223,6 @@ var ModulesPage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
227
223
|
}
|
|
228
224
|
});
|
|
229
225
|
};
|
|
230
|
-
|
|
231
|
-
// 定义通过ref暴露给父组件的内容
|
|
232
|
-
useImperativeHandle(ref, function () {
|
|
233
|
-
return {
|
|
234
|
-
searchFn: setSearchValue
|
|
235
|
-
};
|
|
236
|
-
}, []);
|
|
237
226
|
var render = /*#__PURE__*/React.createElement("div", {
|
|
238
227
|
className: "".concat(classPrefix, "-top-render")
|
|
239
228
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -258,8 +247,7 @@ var ModulesPage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
258
247
|
pageList: pageList,
|
|
259
248
|
pageGroupList: pageGroupList,
|
|
260
249
|
currentClickPage: currentClickPage,
|
|
261
|
-
setCurrentClickPage: setCurrentClickPage
|
|
262
|
-
isAppAnalysis: isAppAnalysis
|
|
250
|
+
setCurrentClickPage: setCurrentClickPage
|
|
263
251
|
}
|
|
264
252
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizLayout, {
|
|
265
253
|
className: classPrefix
|
|
@@ -277,7 +265,7 @@ var ModulesPage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
277
265
|
value: searchValue,
|
|
278
266
|
onChange: onChange
|
|
279
267
|
})),
|
|
280
|
-
topRender: props.onClickWarn ? render :
|
|
268
|
+
topRender: props.onClickWarn ? render : renderApp,
|
|
281
269
|
collapseRef: selectRef
|
|
282
270
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
283
271
|
spinning: pageLoading
|
|
@@ -315,5 +303,5 @@ var ModulesPage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
315
303
|
},
|
|
316
304
|
onOk: onOk
|
|
317
305
|
}) : null))));
|
|
318
|
-
}
|
|
306
|
+
};
|
|
319
307
|
export default ModulesPage;
|
|
@@ -6,7 +6,6 @@ export declare namespace ModulesPageTypes {
|
|
|
6
6
|
value?: Value;
|
|
7
7
|
onClickWarn?: () => void;
|
|
8
8
|
onChange?: (data: Value) => void;
|
|
9
|
-
isAppAnalysis?: boolean;
|
|
10
9
|
}
|
|
11
10
|
interface Value extends SearchValue {
|
|
12
11
|
time?: DatePickerTypes.Value;
|
|
@@ -42,7 +41,6 @@ export declare namespace ModulesPageTypes {
|
|
|
42
41
|
export declare const ModulesPageContext: import("react").Context<{
|
|
43
42
|
pageList: ModulesPageTypes.Page[];
|
|
44
43
|
pageGroupList: ModulesPageTypes.PageGroup[];
|
|
45
|
-
currentClickPage?: ModulesPageTypes.
|
|
44
|
+
currentClickPage?: ModulesPageTypes.Page | ModulesPageTypes.PageGroup | undefined;
|
|
46
45
|
setCurrentClickPage?: ((data: ModulesPageTypes.Page) => void) | undefined;
|
|
47
|
-
isAppAnalysis: boolean;
|
|
48
46
|
}>;
|
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.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"rc-virtual-list": "^3.14.2",
|
|
58
58
|
"yorkie": "^2.0.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "3ba8f223661df24590fef308e3bb335d36076674"
|
|
61
61
|
}
|