@zgfe/modules-dm 1.0.56-zhongyuan.1 → 1.0.56-zhongyuan.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 (47) hide show
  1. package/es/modules/CutsModal.d.ts +34 -0
  2. package/es/modules/dataManage/collectionAttributeList.js +9 -0
  3. package/es/modules/dataManage/collectionEventList.js +4 -1
  4. package/es/modules/dataManage/components/creditPop/index.d.ts +2 -1
  5. package/es/modules/dataManage/components/creditPop/index.less +121 -121
  6. package/es/modules/dataManage/components/depositPop/index.d.ts +2 -1
  7. package/es/modules/dataManage/components/depositPop/index.less +115 -115
  8. package/es/modules/dataManage/components/developModal/index.css +36 -36
  9. package/es/modules/dataManage/components/developModal/index.d.ts +2 -1
  10. package/es/modules/dataManage/components/developModal/index.less +36 -36
  11. package/es/modules/dataManage/components/editTxt/index.d.ts +1 -3
  12. package/es/modules/dataManage/components/editTxt/index.less +44 -44
  13. package/es/modules/dataManage/components/eventFilter/styles/index.less +72 -72
  14. package/es/modules/dataManage/components/importAttrDialog/demo/index.d.ts +2 -1
  15. package/es/modules/dataManage/components/importAttrDialog/index.js +3 -1
  16. package/es/modules/dataManage/components/importAttrDialog/styles/index.less +90 -90
  17. package/es/modules/dataManage/components/importMetaDialog/demo/index.d.ts +2 -1
  18. package/es/modules/dataManage/components/importMetaDialog/index.js +3 -1
  19. package/es/modules/dataManage/components/importMetaDialog/styles/index.less +91 -91
  20. package/es/modules/dataManage/components/tablePlus.js +2 -2
  21. package/es/modules/dataManage/demo/index.d.ts +2 -1
  22. package/es/modules/dataManage/detailedData/DetailedDataForm.d.ts +1 -1
  23. package/es/modules/dataManage/detailedData/index.js +1 -1
  24. package/es/modules/dataManage/styles/detailed.less +74 -74
  25. package/es/modules/dataManage/styles/index.less +1195 -1195
  26. package/es/modules/dataMap/component/drawerAdd.js +4 -1
  27. package/es/modules/dataMap/component/leftTree.d.ts +1 -0
  28. package/es/modules/dataMap/component/leftTree.js +44 -16
  29. package/es/modules/dataMap/component/rightDetail.d.ts +2 -1
  30. package/es/modules/dataMap/component/rightDetail.js +125 -137
  31. package/es/modules/dataMap/component/rightDetail1.d.ts +7 -0
  32. package/es/modules/dataMap/component/rightDetail1.js +643 -0
  33. package/es/modules/dataMap/component/viewMapSetting.d.ts +24 -0
  34. package/es/modules/dataMap/component/viewMapSetting.js +161 -0
  35. package/es/modules/dataMap/css/index.css +36 -6
  36. package/es/modules/dataMap/css/index.less +34 -1
  37. package/es/modules/dataMap/demo/index.d.ts +2 -1
  38. package/es/modules/dataMap/index.d.ts +2 -1
  39. package/es/modules/dataMap/mapDetail.js +11 -2
  40. package/es/modules/dataMap/mapSetting.js +23 -3
  41. package/es/modules/dataPlan/styles/index.less +316 -316
  42. package/es/modules/dataReal/demo/index.d.ts +2 -1
  43. package/es/modules/dataReal/index1.js +78 -23
  44. package/es/modules/dataReal/table.js +4 -1
  45. package/package.json +4 -2
  46. package/es/modules/dataMap/component/selectAttr.d.ts +0 -7
  47. package/es/modules/dataMap/component/selectAttr.js +0 -92
@@ -159,7 +159,10 @@ var DrawerAdd = function DrawerAdd(props) {
159
159
  filter = _useState6[0],
160
160
  setFilter = _useState6[1];
161
161
  // 事件的筛选属性
162
- var conditionRef = useRef();
162
+ var conditionRef = useRef({
163
+ add: function add() {},
164
+ deleteAll: function deleteAll() {}
165
+ });
163
166
  // 筛选条件个数
164
167
  var _useState7 = useState(0),
165
168
  _useState8 = _slicedToArray(_useState7, 2),
@@ -2,5 +2,6 @@ import React from 'react';
2
2
  declare const LeftTree: React.FC<{
3
3
  onChangeTree: Function;
4
4
  onCurrentMap?: Function;
5
+ onFilterValue?: Function;
5
6
  }>;
6
7
  export default LeftTree;
@@ -45,7 +45,12 @@ 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(newArr);
48
+ setCurrentMap(function () {
49
+ getTreeList({
50
+ mapId: newArr.id
51
+ });
52
+ return newArr;
53
+ });
49
54
  // 地图下的搜索条件
50
55
  setFilterMapListLabel((newArr === null || newArr === void 0 ? void 0 : newArr.attributeJson) ? JSON.parse(newArr === null || newArr === void 0 ? void 0 : newArr.attributeJson) : []);
51
56
  // 搜索条件重置
@@ -76,10 +81,19 @@ var LeftTree = function LeftTree(props) {
76
81
  values[o] = values[o].join();
77
82
  }
78
83
  });
79
- setSearchData(_objectSpread(_objectSpread({}, values), {}, {
80
- mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
81
- }));
82
- getTreeList();
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);
83
97
  case 6:
84
98
  case "end":
85
99
  return _context.stop();
@@ -107,23 +121,24 @@ var LeftTree = function LeftTree(props) {
107
121
  getTreeList();
108
122
  }, []);
109
123
  var getTreeList = function getTreeList() {
124
+ var searchJson = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : search;
110
125
  setLoadingSearch(true);
111
126
  request(apis.dataMap.getTreeList, {
112
127
  method: 'post',
113
128
  data: _objectSpread({
114
129
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
115
- }, search)
130
+ }, searchJson)
116
131
  }).then(function (res) {
117
132
  var _newArr$, _newArr$$children;
118
133
  setLoadingSearch(false);
119
134
  if (!res) return;
120
- console.log(res.data);
121
135
  var newArr = [];
122
136
  (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;
123
138
  var obj = {
124
139
  pageAttrName: o,
125
140
  key: "".concat(o, "-").concat(fatherIndex),
126
- children: res.data[o].map(function (v, index) {
141
+ children: (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data[o].map(function (v, index) {
127
142
  return _objectSpread(_objectSpread({}, v), {}, {
128
143
  key: "".concat(o, "-").concat(fatherIndex, "-").concat(index)
129
144
  });
@@ -147,7 +162,14 @@ var LeftTree = function LeftTree(props) {
147
162
  var currentTreeData = info.node.children ? info.node.children[0] : info.node;
148
163
  setCurrentTree(currentTreeData);
149
164
  };
150
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form, {
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, {
151
173
  name: "basic",
152
174
  form: viewForm,
153
175
  labelAlign: "left",
@@ -162,9 +184,10 @@ var LeftTree = function LeftTree(props) {
162
184
  label: /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(BorderOuterOutlined, {
163
185
  style: {
164
186
  marginRight: '5px'
165
- }
166
- }), "\u57CB\u70B9\u5730\u56FE"),
167
- name: "map"
187
+ },
188
+ onPointerEnterCapture: undefined,
189
+ onPointerLeaveCapture: undefined
190
+ }), "\u57CB\u70B9\u5730\u56FE")
168
191
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
169
192
  placeholder: "\u8BF7\u9009\u62E9\u5730\u56FE",
170
193
  allowClear: true,
@@ -197,7 +220,9 @@ var LeftTree = function LeftTree(props) {
197
220
  })), /*#__PURE__*/React.createElement("button", {
198
221
  className: "".concat(pageClassName, "_searchBtn"),
199
222
  onClick: handleModelList
200
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Divider, null), (treeData === null || treeData === void 0 ? void 0 : treeData.length) == 0 && !loadingSearch && /*#__PURE__*/React.createElement(Empty, {
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, {
201
226
  style: {
202
227
  margin: '70px 8px 0px'
203
228
  }
@@ -210,7 +235,10 @@ var LeftTree = function LeftTree(props) {
210
235
  }))) : (/*#__PURE__*/React.createElement(Tree, {
211
236
  blockNode: true,
212
237
  showLine: true,
213
- switcherIcon: /*#__PURE__*/React.createElement(CaretDownOutlined, null),
238
+ switcherIcon: /*#__PURE__*/React.createElement(CaretDownOutlined, {
239
+ onPointerEnterCapture: undefined,
240
+ onPointerLeaveCapture: undefined
241
+ }),
214
242
  autoExpandParent: true,
215
243
  selectedKeys: [(currentTree === null || currentTree === void 0 ? void 0 : currentTree.key) || ''],
216
244
  expandedKeys: [(currentTree === null || currentTree === void 0 ? void 0 : currentTree.key) || ''],
@@ -221,7 +249,7 @@ var LeftTree = function LeftTree(props) {
221
249
  },
222
250
  treeData: treeData,
223
251
  rootClassName: "ziBackground",
224
- height: 363
225
- })));
252
+ height: treeHeight()
253
+ }))));
226
254
  };
227
255
  export default LeftTree;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import { mapDataType } from '../../CutsModal';
2
+ import { mapDataType, mapFilterType } from '../../CutsModal';
3
3
  declare const RightDetail: React.FC<{
4
4
  currentTreeData: any;
5
5
  currentMap?: mapDataType;
6
+ filterValue?: mapFilterType;
6
7
  }>;
7
8
  export default RightDetail;
@@ -1,4 +1,13 @@
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); }
2
11
  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; }
3
12
  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); }
4
13
  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); }); }; }
@@ -9,7 +18,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
9
18
  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; } }
10
19
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
11
20
  import { Card, Form, Input, Upload, message, Table, Button, Space, Empty, Spin } from 'antd';
12
- import { LoadingOutlined, PlusOutlined, ProjectTwoTone, FundTwoTone, ControlTwoTone, SlidersTwoTone } from '@ant-design/icons';
21
+ import { LoadingOutlined, PlusOutlined, SlidersTwoTone } from '@ant-design/icons';
13
22
  import React, { useState, useContext, useEffect } from 'react';
14
23
  import { IconFont, BizGlobalDataContext, ajax } from '@zgfe/business-lib';
15
24
  import apis from '../../../constants/api';
@@ -17,6 +26,7 @@ import request from '../../../utils/ajax';
17
26
  import { guid } from '../../../utils/index';
18
27
  import moment from 'moment';
19
28
  import { getImgUrl } from '../../CutsModal';
29
+ import { toNumber } from 'lodash';
20
30
  var TextArea = Input.TextArea;
21
31
  var pageName = 'dataMapDetail';
22
32
  var getBase64 = function getBase64(img, callback) {
@@ -55,38 +65,6 @@ var RightDetail = function RightDetail(props) {
55
65
  _useState10 = _slicedToArray(_useState9, 2),
56
66
  currentTreeDetail = _useState10[0],
57
67
  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
- };
90
68
  var _useState11 = useState(false),
91
69
  _useState12 = _slicedToArray(_useState11, 2),
92
70
  isEdit = _useState12[0],
@@ -156,7 +134,13 @@ var RightDetail = function RightDetail(props) {
156
134
  }
157
135
  });
158
136
  };
159
- var uploadButton = /*#__PURE__*/React.createElement("div", null, loading ? /*#__PURE__*/React.createElement(LoadingOutlined, null) : /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("div", {
137
+ var uploadButton = /*#__PURE__*/React.createElement("div", null, loading ? (/*#__PURE__*/React.createElement(LoadingOutlined, {
138
+ onPointerEnterCapture: undefined,
139
+ onPointerLeaveCapture: undefined
140
+ })) : (/*#__PURE__*/React.createElement(PlusOutlined, {
141
+ onPointerEnterCapture: undefined,
142
+ onPointerLeaveCapture: undefined
143
+ })), /*#__PURE__*/React.createElement("div", {
160
144
  style: {
161
145
  marginTop: 8
162
146
  }
@@ -270,64 +254,111 @@ var RightDetail = function RightDetail(props) {
270
254
  }();
271
255
  var handleButtonPage = /*#__PURE__*/function () {
272
256
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(flag) {
273
- var currentObj, flagEventName;
257
+ var filterJsonList, obj, xifenList, attrFilterJsonList, modulePageJsonList, _eventNameMap$current, _eventNameMap$current2, _eventNameMap$current3, _eventNameMap$current4, moduleAttrObj, pageAttrObj, _obj, obj1, allFilterObj, globalDimensionsList, resultParams;
274
258
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
275
259
  while (1) switch (_context3.prev = _context3.next) {
276
260
  case 0:
277
- // 'buttonAnalyzeParams' // 按钮点击事件
278
- // 'pageAnalyzeParams' // 页面浏览详情事件
279
- // 'pagePracticeParams' // 页面实践浏览分析
280
- // "pageClickParams" // 页面点击实验分析
281
- currentObj = null;
282
- flagEventName = '';
283
- if (!(flag == 'buttonAnalyzeParams')) {
284
- _context3.next = 7;
285
- break;
286
- }
287
- _context3.next = 5;
288
- return getPageView(buttonAnalyze);
289
- case 5:
290
- currentObj = _context3.sent;
291
- flagEventName = buttonAnalyze.name;
292
- case 7:
293
- if (!(flag == 'pageAnalyzeParams')) {
294
- _context3.next = 12;
295
- break;
296
- }
297
- _context3.next = 10;
298
- return getPageView(pageAnalyze);
299
- case 10:
300
- currentObj = _context3.sent;
301
- flagEventName = pageAnalyze.name;
302
- case 12:
303
- if (!(flag == 'pagePracticeParams')) {
304
- _context3.next = 17;
305
- break;
306
- }
307
- _context3.next = 15;
308
- return getPageView(pagePractice);
309
- case 15:
310
- currentObj = _context3.sent;
311
- flagEventName = pagePractice.name;
312
- case 17:
313
- if (!(flag == 'pageClickParams')) {
314
- _context3.next = 22;
315
- break;
316
- }
317
- _context3.next = 20;
318
- return getPageView(pageClick);
319
- case 20:
320
- currentObj = _context3.sent;
321
- flagEventName = pageClick.name;
322
- case 22:
323
- if (currentObj) {
324
- _context3.next = 25;
325
- break;
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
+ }
326
326
  }
327
- message.warning("\u5F53\u524D\u6CA1\u6709\u8FD9\u4E2A\u4E8B\u4EF6----".concat(flagEventName));
328
- return _context3.abrupt("return");
329
- case 25:
330
- getShortKey(JSON.stringify(currentObj)).then(function (key) {
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) {
331
362
  router === null || router === void 0 ? void 0 : router.push({
332
363
  name: routes.insight,
333
364
  query: {
@@ -335,7 +366,7 @@ var RightDetail = function RightDetail(props) {
335
366
  }
336
367
  });
337
368
  });
338
- case 26:
369
+ case 12:
339
370
  case "end":
340
371
  return _context3.stop();
341
372
  }
@@ -359,7 +390,7 @@ var RightDetail = function RightDetail(props) {
359
390
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
360
391
  while (1) switch (_context4.prev = _context4.next) {
361
392
  case 0:
362
- // console.log(currentTreeData, currentMap, eventGroupList, 'currentTreeData');
393
+ // console.log(currentTreeData, currentMap, eventGroupList,eventNameMap, 'currentTreeData');
363
394
  haveEventName = eventNameMap === null || eventNameMap === void 0 ? void 0 : eventNameMap[currentTreeData.eventName]; // 查找事件
364
395
  haveModuleAttr = haveEventName === null || haveEventName === void 0 ? void 0 : haveEventName.attrList.find(function (o) {
365
396
  return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName);
@@ -394,7 +425,7 @@ var RightDetail = function RightDetail(props) {
394
425
  propCategory: 'eventProp',
395
426
  type: 1,
396
427
  operator: 'equal',
397
- values: havePageAttr.values,
428
+ values: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.values,
398
429
  dimensionSub: 'event_attr',
399
430
  label: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label,
400
431
  attrName: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label
@@ -620,7 +651,9 @@ var RightDetail = function RightDetail(props) {
620
651
  }, /*#__PURE__*/React.createElement(SlidersTwoTone, {
621
652
  style: {
622
653
  fontSize: '20px'
623
- }
654
+ },
655
+ onPointerEnterCapture: undefined,
656
+ onPointerLeaveCapture: undefined
624
657
  }), /*#__PURE__*/React.createElement("div", {
625
658
  className: "".concat(pageName, "_echartDiv_leftText")
626
659
  }, "\u6309\u94AE\u70B9\u51FB\u4E8B\u4EF6\u5206\u6790")), /*#__PURE__*/React.createElement("a", {
@@ -628,51 +661,6 @@ var RightDetail = function RightDetail(props) {
628
661
  onClick: function onClick() {
629
662
  return handleButtonPage('buttonAnalyzeParams');
630
663
  }
631
- }, "\u67E5\u770B")), /*#__PURE__*/React.createElement("div", {
632
- className: "".concat(pageName, "_echartDiv_item")
633
- }, /*#__PURE__*/React.createElement("div", {
634
- className: "".concat(pageName, "_echartDiv_left")
635
- }, /*#__PURE__*/React.createElement(ControlTwoTone, {
636
- style: {
637
- fontSize: '20px'
638
- }
639
- }), /*#__PURE__*/React.createElement("div", {
640
- className: "".concat(pageName, "_echartDiv_leftText")
641
- }, "\u9875\u9762\u6D4F\u89C8\u8BE6\u60C5\u5206\u6790")), /*#__PURE__*/React.createElement("a", {
642
- className: "".concat(pageName, "_echartDiv_view"),
643
- onClick: function onClick() {
644
- return handleButtonPage('pageAnalyzeParams');
645
- }
646
- }, "\u67E5\u770B")), /*#__PURE__*/React.createElement("div", {
647
- className: "".concat(pageName, "_echartDiv_item")
648
- }, /*#__PURE__*/React.createElement("div", {
649
- className: "".concat(pageName, "_echartDiv_left")
650
- }, /*#__PURE__*/React.createElement(FundTwoTone, {
651
- style: {
652
- fontSize: '20px'
653
- }
654
- }), /*#__PURE__*/React.createElement("div", {
655
- className: "".concat(pageName, "_echartDiv_leftText")
656
- }, "\u9875\u9762\u5B9E\u8DF5\u6D4F\u89C8\u5206\u6790")), /*#__PURE__*/React.createElement("a", {
657
- className: "".concat(pageName, "_echartDiv_view"),
658
- onClick: function onClick() {
659
- return handleButtonPage('pagePracticeParams');
660
- }
661
- }, "\u67E5\u770B")), /*#__PURE__*/React.createElement("div", {
662
- className: "".concat(pageName, "_echartDiv_item")
663
- }, /*#__PURE__*/React.createElement("div", {
664
- className: "".concat(pageName, "_echartDiv_left")
665
- }, /*#__PURE__*/React.createElement(ProjectTwoTone, {
666
- style: {
667
- fontSize: '20px'
668
- }
669
- }), /*#__PURE__*/React.createElement("div", {
670
- className: "".concat(pageName, "_echartDiv_leftText")
671
- }, "\u9875\u9762\u70B9\u51FB\u5B9E\u9A8C\u5206\u6790")), /*#__PURE__*/React.createElement("a", {
672
- className: "".concat(pageName, "_echartDiv_view"),
673
- onClick: function onClick() {
674
- return handleButtonPage('pageClickParams');
675
- }
676
664
  }, "\u67E5\u770B"))))))) : (/*#__PURE__*/React.createElement(Empty, {
677
665
  image: Empty.PRESENTED_IMAGE_SIMPLE
678
666
  })));
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { mapDataType } from '../../CutsModal';
3
+ declare const RightDetail: React.FC<{
4
+ currentTreeData: any;
5
+ currentMap?: mapDataType;
6
+ }>;
7
+ export default RightDetail;