@zgfe/modules-dm 1.0.56-zhongyuan.11 → 1.0.56-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.
@@ -28,40 +28,6 @@ export interface mapDataType {
28
28
  remarkAttrName: string;
29
29
  updatedTime: string;
30
30
  }
31
- export interface mapFilterType {
32
- attr1?: string | undefined;
33
- attr2?: string | undefined;
34
- attr3?: string | undefined;
35
- attr4?: string | undefined;
36
- attr5?: string | undefined;
37
- mapId: Number;
38
- }
39
- export interface andFilterType {
40
- relation: string;
41
- conditions: andFilterConditionsType[];
42
- }
43
- export interface andFilterConditionsType {
44
- attrId: number;
45
- attrName: string;
46
- dimensionSub: string;
47
- label: string;
48
- operator: string;
49
- propCategory: string;
50
- type: number;
51
- values: string[];
52
- }
53
- export interface eventAttrListItemType {
54
- alias: string;
55
- dimensionSub: string;
56
- eventId: number;
57
- id: number;
58
- isHidden: number;
59
- key: string;
60
- label: string;
61
- propCategory: string;
62
- realTime: boolean;
63
- type: number;
64
- }
65
31
  export declare const mapContext: React.Context<{
66
32
  setMapViewFlg?: Function | undefined;
67
33
  mapData?: mapDataType[] | undefined;
@@ -2,6 +2,5 @@ import React from 'react';
2
2
  declare const LeftTree: React.FC<{
3
3
  onChangeTree: Function;
4
4
  onCurrentMap?: Function;
5
- onFilterValue?: Function;
6
5
  }>;
7
6
  export default LeftTree;
@@ -45,12 +45,7 @@ var LeftTree = function LeftTree(props) {
45
45
  var newArr = mapData === null || mapData === void 0 ? void 0 : mapData.filter(function (o) {
46
46
  return o.id == value;
47
47
  })[0];
48
- setCurrentMap(function () {
49
- getTreeList({
50
- mapId: newArr.id
51
- });
52
- return newArr;
53
- });
48
+ setCurrentMap(newArr);
54
49
  // 地图下的搜索条件
55
50
  setFilterMapListLabel((newArr === null || newArr === void 0 ? void 0 : newArr.attributeJson) ? JSON.parse(newArr === null || newArr === void 0 ? void 0 : newArr.attributeJson) : []);
56
51
  // 搜索条件重置
@@ -81,19 +76,10 @@ var LeftTree = function LeftTree(props) {
81
76
  values[o] = values[o].join();
82
77
  }
83
78
  });
84
- setSearchData(function () {
85
- getTreeList(_objectSpread(_objectSpread({}, values), {}, {
86
- mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
87
- }));
88
- return _objectSpread(_objectSpread({}, values), {}, {
89
- mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
90
- });
91
- });
92
- setTimeout(function () {
93
- (props === null || props === void 0 ? void 0 : props.onFilterValue) && (props === null || props === void 0 ? void 0 : props.onFilterValue(_objectSpread(_objectSpread({}, values), {}, {
94
- mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
95
- })));
96
- }, 0);
79
+ setSearchData(_objectSpread(_objectSpread({}, values), {}, {
80
+ mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
81
+ }));
82
+ getTreeList();
97
83
  case 6:
98
84
  case "end":
99
85
  return _context.stop();
@@ -121,24 +107,23 @@ var LeftTree = function LeftTree(props) {
121
107
  getTreeList();
122
108
  }, []);
123
109
  var getTreeList = function getTreeList() {
124
- var searchJson = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : search;
125
110
  setLoadingSearch(true);
126
111
  request(apis.dataMap.getTreeList, {
127
112
  method: 'post',
128
113
  data: _objectSpread({
129
114
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
130
- }, searchJson)
115
+ }, search)
131
116
  }).then(function (res) {
132
117
  var _newArr$, _newArr$$children;
133
118
  setLoadingSearch(false);
134
119
  if (!res) return;
120
+ console.log(res.data);
135
121
  var newArr = [];
136
122
  (res === null || res === void 0 ? void 0 : res.data) && Object.keys(res === null || res === void 0 ? void 0 : res.data).forEach(function (o, fatherIndex) {
137
- var _res$data;
138
123
  var obj = {
139
124
  pageAttrName: o,
140
125
  key: "".concat(o, "-").concat(fatherIndex),
141
- children: (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data[o].map(function (v, index) {
126
+ children: res.data[o].map(function (v, index) {
142
127
  return _objectSpread(_objectSpread({}, v), {}, {
143
128
  key: "".concat(o, "-").concat(fatherIndex, "-").concat(index)
144
129
  });
@@ -162,14 +147,7 @@ var LeftTree = function LeftTree(props) {
162
147
  var currentTreeData = info.node.children ? info.node.children[0] : info.node;
163
148
  setCurrentTree(currentTreeData);
164
149
  };
165
- var treeHeight = function treeHeight() {
166
- return filterMapListLabel.length > 0 ? 430 - 58 * (filterMapListLabel.length - 1) : 430;
167
- };
168
- return /*#__PURE__*/React.createElement("div", {
169
- className: "".concat(pageClassName)
170
- }, /*#__PURE__*/React.createElement("div", {
171
- className: "".concat(pageClassName, "-top")
172
- }, /*#__PURE__*/React.createElement(Form, {
150
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form, {
173
151
  name: "basic",
174
152
  form: viewForm,
175
153
  labelAlign: "left",
@@ -187,7 +165,8 @@ var LeftTree = function LeftTree(props) {
187
165
  },
188
166
  onPointerEnterCapture: undefined,
189
167
  onPointerLeaveCapture: undefined
190
- }), "\u57CB\u70B9\u5730\u56FE")
168
+ }), "\u57CB\u70B9\u5730\u56FE"),
169
+ name: "map"
191
170
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
192
171
  placeholder: "\u8BF7\u9009\u62E9\u5730\u56FE",
193
172
  allowClear: true,
@@ -220,9 +199,7 @@ var LeftTree = function LeftTree(props) {
220
199
  })), /*#__PURE__*/React.createElement("button", {
221
200
  className: "".concat(pageClassName, "_searchBtn"),
222
201
  onClick: handleModelList
223
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Divider, null)), /*#__PURE__*/React.createElement("div", {
224
- className: "".concat(pageClassName, "-tree")
225
- }, (treeData === null || treeData === void 0 ? void 0 : treeData.length) == 0 && !loadingSearch && /*#__PURE__*/React.createElement(Empty, {
202
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Divider, null), (treeData === null || treeData === void 0 ? void 0 : treeData.length) == 0 && !loadingSearch && /*#__PURE__*/React.createElement(Empty, {
226
203
  style: {
227
204
  margin: '70px 8px 0px'
228
205
  }
@@ -249,7 +226,7 @@ var LeftTree = function LeftTree(props) {
249
226
  },
250
227
  treeData: treeData,
251
228
  rootClassName: "ziBackground",
252
- height: treeHeight()
253
- }))));
229
+ height: 363
230
+ })));
254
231
  };
255
232
  export default LeftTree;
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- import { mapDataType, mapFilterType } from '../../CutsModal';
2
+ import { mapDataType } from '../../CutsModal';
3
3
  declare const RightDetail: React.FC<{
4
4
  currentTreeData: any;
5
5
  currentMap?: mapDataType;
6
- filterValue?: mapFilterType;
7
6
  }>;
8
7
  export default RightDetail;
@@ -1,13 +1,4 @@
1
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 _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
3
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5
- function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
6
- 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; }
7
- 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; }
8
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
9
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
10
- 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); }
11
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
12
3
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
13
4
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
@@ -18,7 +9,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
18
9
  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; } }
19
10
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
20
11
  import { Card, Form, Input, Upload, message, Table, Button, Space, Empty, Spin } from 'antd';
21
- import { LoadingOutlined, PlusOutlined, SlidersTwoTone } from '@ant-design/icons';
12
+ import { LoadingOutlined, PlusOutlined, ProjectTwoTone, FundTwoTone, ControlTwoTone, SlidersTwoTone } from '@ant-design/icons';
22
13
  import React, { useState, useContext, useEffect } from 'react';
23
14
  import { IconFont, BizGlobalDataContext, ajax } from '@zgfe/business-lib';
24
15
  import apis from '../../../constants/api';
@@ -26,7 +17,6 @@ import request from '../../../utils/ajax';
26
17
  import { guid } from '../../../utils/index';
27
18
  import moment from 'moment';
28
19
  import { getImgUrl } from '../../CutsModal';
29
- import { toNumber } from 'lodash';
30
20
  var TextArea = Input.TextArea;
31
21
  var pageName = 'dataMapDetail';
32
22
  var getBase64 = function getBase64(img, callback) {
@@ -65,6 +55,38 @@ var RightDetail = function RightDetail(props) {
65
55
  _useState10 = _slicedToArray(_useState9, 2),
66
56
  currentTreeDetail = _useState10[0],
67
57
  setCurrentTreeDetail = _useState10[1];
58
+ // 点击事件分析的事件和属性
59
+ var buttonAnalyze = {
60
+ name: '$WebClick',
61
+ attrs: {
62
+ page: 'event_attr',
63
+ filters: ['current_version', 'app_name', 'func_module', 'func_module_id', 'func_module_ver', 'page_name']
64
+ }
65
+ };
66
+ // 页面浏览详情分析
67
+ var pageAnalyze = {
68
+ name: '$pageview',
69
+ attrs: {
70
+ page: 'page_name',
71
+ filters: ['current_version', 'app_name', 'app_version', 'func_module', 'func_module_id', 'func_module_ver']
72
+ }
73
+ };
74
+ // 页面实验浏览分析
75
+ var pagePractice = {
76
+ name: '$pageview',
77
+ attrs: {
78
+ page: 'page_name',
79
+ filters: ['current_version', 'app_name', 'app_version', 'func_module', 'func_module_id', 'func_module_ver']
80
+ }
81
+ };
82
+ // 页面点击浏览分析
83
+ var pageClick = {
84
+ name: '$AppClick',
85
+ attrs: {
86
+ page: 'button_name',
87
+ filters: ['current_version', 'app_name ', 'current_version', 'func_module', 'func_module_id', 'func_module_ver', 'page_name']
88
+ }
89
+ };
68
90
  var _useState11 = useState(false),
69
91
  _useState12 = _slicedToArray(_useState11, 2),
70
92
  isEdit = _useState12[0],
@@ -254,111 +276,64 @@ var RightDetail = function RightDetail(props) {
254
276
  }();
255
277
  var handleButtonPage = /*#__PURE__*/function () {
256
278
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(flag) {
257
- var filterJsonList, obj, xifenList, attrFilterJsonList, modulePageJsonList, _eventNameMap$current, _eventNameMap$current2, _eventNameMap$current3, _eventNameMap$current4, moduleAttrObj, pageAttrObj, _obj, obj1, allFilterObj, globalDimensionsList, resultParams;
279
+ var currentObj, flagEventName;
258
280
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
259
281
  while (1) switch (_context3.prev = _context3.next) {
260
282
  case 0:
261
- // console.log(
262
- // currentMap,
263
- // currentTreeData,
264
- // props.filterValue,
265
- // JSON.parse(currentMap?.filterJson),
266
- // JSON.parse(currentMap?.attributeJson),
267
- // eventNameMap,
268
- // );
269
- filterJsonList = (currentMap === null || currentMap === void 0 ? void 0 : currentMap.filterJson) ? JSON.parse(currentMap === null || currentMap === void 0 ? void 0 : currentMap.filterJson).conditions : []; // 搜索的值 细分的值
270
- obj = _objectSpread({}, props.filterValue); // 查询是的值
271
- xifenList = (currentMap === null || currentMap === void 0 ? void 0 : currentMap.attributeJson) && JSON.parse(currentMap === null || currentMap === void 0 ? void 0 : currentMap.attributeJson);
272
- attrFilterJsonList = [];
273
- Object.keys(obj).forEach(function (o) {
274
- if (o != 'mapId') {
275
- if (obj[o]) {
276
- var indexNum = toNumber(o.substr(o.length - 1, 1));
277
- attrFilterJsonList.push({
278
- attrId: xifenList[indexNum - 1].inquire.id,
279
- attrName: xifenList[indexNum - 1].inquire.label,
280
- dimensionSub: xifenList[indexNum - 1].inquire.dimensionSub,
281
- label: xifenList[indexNum - 1].inquire.label,
282
- operator: 'equal',
283
- propCategory: 'eventProp',
284
- type: xifenList[indexNum - 1].inquire.type,
285
- values: [obj[o]]
286
- });
287
- console.log(attrFilterJsonList, indexNum);
288
- }
289
- }
290
- });
291
- // page module 的值拼接
292
- modulePageJsonList = [];
293
- if (eventNameMap && (currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName)) {
294
- moduleAttrObj = (_eventNameMap$current = eventNameMap[currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName]) === null || _eventNameMap$current === void 0 ? void 0 : (_eventNameMap$current2 = _eventNameMap$current.attrList.filter(function (o) {
295
- return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName);
296
- })) === null || _eventNameMap$current2 === void 0 ? void 0 : _eventNameMap$current2[0];
297
- pageAttrObj = (_eventNameMap$current3 = eventNameMap[currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName]) === null || _eventNameMap$current3 === void 0 ? void 0 : (_eventNameMap$current4 = _eventNameMap$current3.attrList.filter(function (o) {
298
- return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.pageAttrName);
299
- })) === null || _eventNameMap$current4 === void 0 ? void 0 : _eventNameMap$current4[0];
300
- if (moduleAttrObj) {
301
- _obj = {
302
- attrId: moduleAttrObj.id,
303
- attrName: moduleAttrObj.label,
304
- dimensionSub: moduleAttrObj.dimensionSub,
305
- label: moduleAttrObj.label,
306
- operator: 'equal',
307
- propCategory: 'eventProp',
308
- type: moduleAttrObj.type,
309
- values: moduleAttrObj === null || moduleAttrObj === void 0 ? void 0 : moduleAttrObj.values
310
- };
311
- modulePageJsonList.push(_obj);
312
- }
313
- if (pageAttrObj) {
314
- obj1 = {
315
- attrId: pageAttrObj.id,
316
- attrName: pageAttrObj.label,
317
- dimensionSub: pageAttrObj.dimensionSub,
318
- label: pageAttrObj.label,
319
- operator: 'equal',
320
- propCategory: 'eventProp',
321
- type: pageAttrObj.type,
322
- values: pageAttrObj === null || pageAttrObj === void 0 ? void 0 : pageAttrObj.values
323
- };
324
- modulePageJsonList.push(obj1);
325
- }
283
+ // 'buttonAnalyzeParams' // 按钮点击事件
284
+ // 'pageAnalyzeParams' // 页面浏览详情事件
285
+ // 'pagePracticeParams' // 页面实践浏览分析
286
+ // "pageClickParams" // 页面点击实验分析
287
+ currentObj = null;
288
+ flagEventName = '';
289
+ if (!(flag == 'buttonAnalyzeParams')) {
290
+ _context3.next = 7;
291
+ break;
326
292
  }
327
- allFilterObj = {
328
- relation: 'and',
329
- conditions: [].concat(_toConsumableArray(filterJsonList), attrFilterJsonList, modulePageJsonList)
330
- }; // console.log(allFilterObj, 'allFilterObj');
331
- // 细分的 属性值
332
- globalDimensionsList = [];
333
- xifenList.forEach(function (o) {
334
- var obj = {
335
- propCategory: o.inquire.propCategory,
336
- type: o.inquire.type,
337
- attrId: o.inquire.id,
338
- attrName: o.inquire.label
339
- };
340
- globalDimensionsList.push(obj);
341
- });
342
- resultParams = {
343
- data: {
344
- chartType: 'line',
345
- module: 'insight',
346
- userGroup: [0],
347
- globalDimensions: globalDimensionsList,
348
- targets: [{
349
- alias: currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName,
350
- filters: allFilterObj,
351
- analysisDimension: {
352
- analysisIndex: 'number'
353
- },
354
- eventGroupId: 0,
355
- eventId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventId,
356
- eventName: currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName,
357
- type: 'event'
358
- }]
359
- }
360
- };
361
- getShortKey(JSON.stringify(resultParams)).then(function (key) {
293
+ _context3.next = 5;
294
+ return getPageView(buttonAnalyze);
295
+ case 5:
296
+ currentObj = _context3.sent;
297
+ flagEventName = buttonAnalyze.name;
298
+ case 7:
299
+ if (!(flag == 'pageAnalyzeParams')) {
300
+ _context3.next = 12;
301
+ break;
302
+ }
303
+ _context3.next = 10;
304
+ return getPageView(pageAnalyze);
305
+ case 10:
306
+ currentObj = _context3.sent;
307
+ flagEventName = pageAnalyze.name;
308
+ case 12:
309
+ if (!(flag == 'pagePracticeParams')) {
310
+ _context3.next = 17;
311
+ break;
312
+ }
313
+ _context3.next = 15;
314
+ return getPageView(pagePractice);
315
+ case 15:
316
+ currentObj = _context3.sent;
317
+ flagEventName = pagePractice.name;
318
+ case 17:
319
+ if (!(flag == 'pageClickParams')) {
320
+ _context3.next = 22;
321
+ break;
322
+ }
323
+ _context3.next = 20;
324
+ return getPageView(pageClick);
325
+ case 20:
326
+ currentObj = _context3.sent;
327
+ flagEventName = pageClick.name;
328
+ case 22:
329
+ if (currentObj) {
330
+ _context3.next = 25;
331
+ break;
332
+ }
333
+ message.warning("\u5F53\u524D\u6CA1\u6709\u8FD9\u4E2A\u4E8B\u4EF6----".concat(flagEventName));
334
+ return _context3.abrupt("return");
335
+ case 25:
336
+ getShortKey(JSON.stringify(currentObj)).then(function (key) {
362
337
  router === null || router === void 0 ? void 0 : router.push({
363
338
  name: routes.insight,
364
339
  query: {
@@ -366,7 +341,7 @@ var RightDetail = function RightDetail(props) {
366
341
  }
367
342
  });
368
343
  });
369
- case 12:
344
+ case 26:
370
345
  case "end":
371
346
  return _context3.stop();
372
347
  }
@@ -390,7 +365,7 @@ var RightDetail = function RightDetail(props) {
390
365
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
391
366
  while (1) switch (_context4.prev = _context4.next) {
392
367
  case 0:
393
- // console.log(currentTreeData, currentMap, eventGroupList,eventNameMap, 'currentTreeData');
368
+ // console.log(currentTreeData, currentMap, eventGroupList, 'currentTreeData');
394
369
  haveEventName = eventNameMap === null || eventNameMap === void 0 ? void 0 : eventNameMap[currentTreeData.eventName]; // 查找事件
395
370
  haveModuleAttr = haveEventName === null || haveEventName === void 0 ? void 0 : haveEventName.attrList.find(function (o) {
396
371
  return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName);
@@ -425,7 +400,7 @@ var RightDetail = function RightDetail(props) {
425
400
  propCategory: 'eventProp',
426
401
  type: 1,
427
402
  operator: 'equal',
428
- values: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.values,
403
+ values: havePageAttr.values,
429
404
  dimensionSub: 'event_attr',
430
405
  label: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label,
431
406
  attrName: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label
@@ -661,6 +636,57 @@ var RightDetail = function RightDetail(props) {
661
636
  onClick: function onClick() {
662
637
  return handleButtonPage('buttonAnalyzeParams');
663
638
  }
639
+ }, "\u67E5\u770B")), /*#__PURE__*/React.createElement("div", {
640
+ className: "".concat(pageName, "_echartDiv_item")
641
+ }, /*#__PURE__*/React.createElement("div", {
642
+ className: "".concat(pageName, "_echartDiv_left")
643
+ }, /*#__PURE__*/React.createElement(ControlTwoTone, {
644
+ style: {
645
+ fontSize: '20px'
646
+ },
647
+ onPointerEnterCapture: undefined,
648
+ onPointerLeaveCapture: undefined
649
+ }), /*#__PURE__*/React.createElement("div", {
650
+ className: "".concat(pageName, "_echartDiv_leftText")
651
+ }, "\u9875\u9762\u6D4F\u89C8\u8BE6\u60C5\u5206\u6790")), /*#__PURE__*/React.createElement("a", {
652
+ className: "".concat(pageName, "_echartDiv_view"),
653
+ onClick: function onClick() {
654
+ return handleButtonPage('pageAnalyzeParams');
655
+ }
656
+ }, "\u67E5\u770B")), /*#__PURE__*/React.createElement("div", {
657
+ className: "".concat(pageName, "_echartDiv_item")
658
+ }, /*#__PURE__*/React.createElement("div", {
659
+ className: "".concat(pageName, "_echartDiv_left")
660
+ }, /*#__PURE__*/React.createElement(FundTwoTone, {
661
+ style: {
662
+ fontSize: '20px'
663
+ },
664
+ onPointerEnterCapture: undefined,
665
+ onPointerLeaveCapture: undefined
666
+ }), /*#__PURE__*/React.createElement("div", {
667
+ className: "".concat(pageName, "_echartDiv_leftText")
668
+ }, "\u9875\u9762\u5B9E\u8DF5\u6D4F\u89C8\u5206\u6790")), /*#__PURE__*/React.createElement("a", {
669
+ className: "".concat(pageName, "_echartDiv_view"),
670
+ onClick: function onClick() {
671
+ return handleButtonPage('pagePracticeParams');
672
+ }
673
+ }, "\u67E5\u770B")), /*#__PURE__*/React.createElement("div", {
674
+ className: "".concat(pageName, "_echartDiv_item")
675
+ }, /*#__PURE__*/React.createElement("div", {
676
+ className: "".concat(pageName, "_echartDiv_left")
677
+ }, /*#__PURE__*/React.createElement(ProjectTwoTone, {
678
+ style: {
679
+ fontSize: '20px'
680
+ },
681
+ onPointerEnterCapture: undefined,
682
+ onPointerLeaveCapture: undefined
683
+ }), /*#__PURE__*/React.createElement("div", {
684
+ className: "".concat(pageName, "_echartDiv_leftText")
685
+ }, "\u9875\u9762\u70B9\u51FB\u5B9E\u9A8C\u5206\u6790")), /*#__PURE__*/React.createElement("a", {
686
+ className: "".concat(pageName, "_echartDiv_view"),
687
+ onClick: function onClick() {
688
+ return handleButtonPage('pageClickParams');
689
+ }
664
690
  }, "\u67E5\u770B"))))))) : (/*#__PURE__*/React.createElement(Empty, {
665
691
  image: Empty.PRESENTED_IMAGE_SIMPLE
666
692
  })));
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const SelectAttr: React.FC<{
3
+ event: any;
4
+ onChange: Function;
5
+ onDelete: Function;
6
+ }>;
7
+ export default SelectAttr;
@@ -0,0 +1,92 @@
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 _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
6
+ 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; }
7
+ 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; }
8
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
9
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
10
+ 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); }
11
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
12
+ 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."); }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ 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; } }
16
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
17
+ import React, { useEffect, useState } from 'react';
18
+ import { BizAttributeSelector, ValuesList } from '@zgfe/business-lib';
19
+ var SelectAttr = function SelectAttr(_ref) {
20
+ var event = _ref.event,
21
+ onChange = _ref.onChange,
22
+ onDelete = _ref.onDelete;
23
+ console.log(event, 'event');
24
+ var _useState = useState(),
25
+ _useState2 = _slicedToArray(_useState, 2),
26
+ attrArr = _useState2[0],
27
+ setAttrArr = _useState2[1];
28
+ var _useState3 = useState(),
29
+ _useState4 = _slicedToArray(_useState3, 2),
30
+ currentData = _useState4[0],
31
+ setCurrentData = _useState4[1];
32
+ var _useState5 = useState(),
33
+ _useState6 = _slicedToArray(_useState5, 2),
34
+ a = _useState6[0],
35
+ setA = _useState6[1];
36
+ var handleFlex = function handleFlex(value) {
37
+ setA(_objectSpread(_objectSpread({}, value), {}, {
38
+ operator: 'equal'
39
+ }));
40
+ };
41
+ var handleSelectFlexValues = function handleSelectFlexValues(value) {
42
+ console.log(value, 'ss');
43
+ value[0] && setCurrentData(function (pre) {
44
+ return _objectSpread(_objectSpread({}, a), {}, {
45
+ values: value
46
+ });
47
+ });
48
+ };
49
+ var deleteFlex = function deleteFlex() {
50
+ console.log(currentData, attrArr, 'current');
51
+ // onChange();
52
+ };
53
+ useEffect(function () {
54
+ console.log(currentData, attrArr);
55
+ // setAttrArr((pre) => [...pre, currentData]);
56
+ }, [currentData]);
57
+ var add = function add() {
58
+ attrArr ? setAttrArr(function (pre) {
59
+ return [].concat(_toConsumableArray(pre), [currentData]);
60
+ }) : setAttrArr([currentData]);
61
+ };
62
+ return /*#__PURE__*/React.createElement(React.Fragment, null, attrArr && attrArr.map(function (o, index) {
63
+ return /*#__PURE__*/React.createElement("div", {
64
+ key: index
65
+ }, /*#__PURE__*/React.createElement(BizAttributeSelector, {
66
+ eventIdList: [event.id],
67
+ enableDelete: false,
68
+ enableEventProp: true,
69
+ enableEnvProp: true,
70
+ value: a,
71
+ enableUserProp: false,
72
+ placeholder: "\u8BF7\u9009\u62E9\u5C5E\u6027",
73
+ onChange: function onChange(e) {
74
+ handleFlex(e);
75
+ }
76
+ }), /*#__PURE__*/React.createElement("div", null, "\u662F"), /*#__PURE__*/React.createElement(ValuesList, {
77
+ theme: "secondary",
78
+ attr: a && a,
79
+ operate: "equal",
80
+ onChange: function onChange(value) {
81
+ handleSelectFlexValues(value);
82
+ }
83
+ }), /*#__PURE__*/React.createElement("a", {
84
+ onClick: deleteFlex
85
+ }, "\u5220\u9664"));
86
+ }), /*#__PURE__*/React.createElement("button", {
87
+ onClick: function onClick() {
88
+ return add();
89
+ }
90
+ }, "\u6DFB\u52A0"));
91
+ };
92
+ export default SelectAttr;