@zgfe/modules-dm 1.0.56-zhongyuan.6 → 1.0.56-zhongyuan.8
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/es/modules/CutsModal.d.ts +34 -0
- package/es/modules/dataMap/component/leftTree.d.ts +1 -0
- package/es/modules/dataMap/component/leftTree.js +32 -13
- package/es/modules/dataMap/component/rightDetail.d.ts +2 -1
- package/es/modules/dataMap/component/rightDetail.js +104 -141
- package/es/modules/dataMap/component/rightDetail1.d.ts +7 -0
- package/es/modules/dataMap/component/rightDetail1.js +643 -0
- package/es/modules/dataMap/css/index.css +11 -6
- package/es/modules/dataMap/css/index.less +9 -1
- package/es/modules/dataMap/mapDetail.js +11 -2
- package/es/modules/dataReal/index1.js +13 -6
- package/es/modules/dataReal/table.js +1 -0
- package/package.json +2 -2
- package/es/modules/dataMap/component/selectAttr.d.ts +0 -7
- package/es/modules/dataMap/component/selectAttr.js +0 -92
|
@@ -28,6 +28,40 @@ 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
|
+
}
|
|
31
65
|
export declare const mapContext: React.Context<{
|
|
32
66
|
setMapViewFlg?: Function | undefined;
|
|
33
67
|
mapData?: mapDataType[] | undefined;
|
|
@@ -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(
|
|
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(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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,12 +121,13 @@ 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
|
-
},
|
|
130
|
+
}, searchJson)
|
|
116
131
|
}).then(function (res) {
|
|
117
132
|
var _newArr$, _newArr$$children;
|
|
118
133
|
setLoadingSearch(false);
|
|
@@ -147,7 +162,11 @@ 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",
|
|
165
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: "".concat(pageClassName)
|
|
167
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
className: "".concat(pageClassName, "-top")
|
|
169
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
151
170
|
name: "basic",
|
|
152
171
|
form: viewForm,
|
|
153
172
|
labelAlign: "left",
|
|
@@ -165,8 +184,7 @@ var LeftTree = function LeftTree(props) {
|
|
|
165
184
|
},
|
|
166
185
|
onPointerEnterCapture: undefined,
|
|
167
186
|
onPointerLeaveCapture: undefined
|
|
168
|
-
}), "\u57CB\u70B9\u5730\u56FE")
|
|
169
|
-
name: "map"
|
|
187
|
+
}), "\u57CB\u70B9\u5730\u56FE")
|
|
170
188
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
171
189
|
placeholder: "\u8BF7\u9009\u62E9\u5730\u56FE",
|
|
172
190
|
allowClear: true,
|
|
@@ -199,7 +217,9 @@ var LeftTree = function LeftTree(props) {
|
|
|
199
217
|
})), /*#__PURE__*/React.createElement("button", {
|
|
200
218
|
className: "".concat(pageClassName, "_searchBtn"),
|
|
201
219
|
onClick: handleModelList
|
|
202
|
-
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Divider, null),
|
|
220
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Divider, null)), /*#__PURE__*/React.createElement("div", {
|
|
221
|
+
className: "".concat(pageClassName, "-tree")
|
|
222
|
+
}, (treeData === null || treeData === void 0 ? void 0 : treeData.length) == 0 && !loadingSearch && /*#__PURE__*/React.createElement(Empty, {
|
|
203
223
|
style: {
|
|
204
224
|
margin: '70px 8px 0px'
|
|
205
225
|
}
|
|
@@ -225,8 +245,7 @@ var LeftTree = function LeftTree(props) {
|
|
|
225
245
|
title: 'pageAttrName'
|
|
226
246
|
},
|
|
227
247
|
treeData: treeData,
|
|
228
|
-
rootClassName: "ziBackground"
|
|
229
|
-
|
|
230
|
-
})));
|
|
248
|
+
rootClassName: "ziBackground"
|
|
249
|
+
}))));
|
|
231
250
|
};
|
|
232
251
|
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,
|
|
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],
|
|
@@ -276,64 +254,100 @@ var RightDetail = function RightDetail(props) {
|
|
|
276
254
|
}();
|
|
277
255
|
var handleButtonPage = /*#__PURE__*/function () {
|
|
278
256
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(flag) {
|
|
279
|
-
var
|
|
257
|
+
var filterJsonList, obj, xifenList, attrFilterJsonList, modulePageJsonList, _eventNameMap$current, _eventNameMap$current2, _eventNameMap$current3, _eventNameMap$current4, moduleAttrObj, pageAttrObj, _obj, obj1, allFilterObj, resultParams;
|
|
280
258
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
281
259
|
while (1) switch (_context3.prev = _context3.next) {
|
|
282
260
|
case 0:
|
|
283
|
-
//
|
|
284
|
-
//
|
|
285
|
-
//
|
|
286
|
-
//
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
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
|
+
modulePageJsonList = [];
|
|
292
|
+
if (eventNameMap && (currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName)) {
|
|
293
|
+
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) {
|
|
294
|
+
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName);
|
|
295
|
+
})) === null || _eventNameMap$current2 === void 0 ? void 0 : _eventNameMap$current2[0];
|
|
296
|
+
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) {
|
|
297
|
+
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.pageAttrName);
|
|
298
|
+
})) === null || _eventNameMap$current4 === void 0 ? void 0 : _eventNameMap$current4[0];
|
|
299
|
+
if (moduleAttrObj) {
|
|
300
|
+
_obj = {
|
|
301
|
+
attrId: moduleAttrObj.id,
|
|
302
|
+
attrName: moduleAttrObj.label,
|
|
303
|
+
dimensionSub: moduleAttrObj.dimensionSub,
|
|
304
|
+
label: moduleAttrObj.label,
|
|
305
|
+
operator: 'equal',
|
|
306
|
+
propCategory: 'eventProp',
|
|
307
|
+
type: moduleAttrObj.type,
|
|
308
|
+
values: moduleAttrObj === null || moduleAttrObj === void 0 ? void 0 : moduleAttrObj.values
|
|
309
|
+
};
|
|
310
|
+
modulePageJsonList.push(_obj);
|
|
311
|
+
}
|
|
312
|
+
if (pageAttrObj) {
|
|
313
|
+
obj1 = {
|
|
314
|
+
attrId: pageAttrObj.id,
|
|
315
|
+
attrName: pageAttrObj.label,
|
|
316
|
+
dimensionSub: pageAttrObj.dimensionSub,
|
|
317
|
+
label: pageAttrObj.label,
|
|
318
|
+
operator: 'equal',
|
|
319
|
+
propCategory: 'eventProp',
|
|
320
|
+
type: pageAttrObj.type,
|
|
321
|
+
values: pageAttrObj === null || pageAttrObj === void 0 ? void 0 : pageAttrObj.values
|
|
322
|
+
};
|
|
323
|
+
modulePageJsonList.push(obj1);
|
|
324
|
+
}
|
|
332
325
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
326
|
+
allFilterObj = {
|
|
327
|
+
relation: 'and',
|
|
328
|
+
conditions: [].concat(_toConsumableArray(filterJsonList), attrFilterJsonList, modulePageJsonList)
|
|
329
|
+
};
|
|
330
|
+
console.log(allFilterObj, 'allFilterObj');
|
|
331
|
+
resultParams = {
|
|
332
|
+
data: {
|
|
333
|
+
chartType: 'line',
|
|
334
|
+
module: 'insight',
|
|
335
|
+
userGroup: [0],
|
|
336
|
+
globalDimensions: xifenList,
|
|
337
|
+
targets: [{
|
|
338
|
+
alias: currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName,
|
|
339
|
+
filters: (currentMap === null || currentMap === void 0 ? void 0 : currentMap.filterJson) && JSON.parse(currentMap === null || currentMap === void 0 ? void 0 : currentMap.filterJson),
|
|
340
|
+
analysisDimension: {
|
|
341
|
+
analysisIndex: 'number'
|
|
342
|
+
},
|
|
343
|
+
eventGroupId: 0,
|
|
344
|
+
eventId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventId,
|
|
345
|
+
eventName: currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName,
|
|
346
|
+
type: 'event'
|
|
347
|
+
}]
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
getShortKey(JSON.stringify(resultParams)).then(function (key) {
|
|
337
351
|
router === null || router === void 0 ? void 0 : router.push({
|
|
338
352
|
name: routes.insight,
|
|
339
353
|
query: {
|
|
@@ -341,7 +355,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
341
355
|
}
|
|
342
356
|
});
|
|
343
357
|
});
|
|
344
|
-
case
|
|
358
|
+
case 11:
|
|
345
359
|
case "end":
|
|
346
360
|
return _context3.stop();
|
|
347
361
|
}
|
|
@@ -365,7 +379,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
365
379
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
366
380
|
while (1) switch (_context4.prev = _context4.next) {
|
|
367
381
|
case 0:
|
|
368
|
-
// console.log(currentTreeData, currentMap, eventGroupList, 'currentTreeData');
|
|
382
|
+
// console.log(currentTreeData, currentMap, eventGroupList,eventNameMap, 'currentTreeData');
|
|
369
383
|
haveEventName = eventNameMap === null || eventNameMap === void 0 ? void 0 : eventNameMap[currentTreeData.eventName]; // 查找事件
|
|
370
384
|
haveModuleAttr = haveEventName === null || haveEventName === void 0 ? void 0 : haveEventName.attrList.find(function (o) {
|
|
371
385
|
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName);
|
|
@@ -400,7 +414,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
400
414
|
propCategory: 'eventProp',
|
|
401
415
|
type: 1,
|
|
402
416
|
operator: 'equal',
|
|
403
|
-
values: havePageAttr.values,
|
|
417
|
+
values: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.values,
|
|
404
418
|
dimensionSub: 'event_attr',
|
|
405
419
|
label: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label,
|
|
406
420
|
attrName: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label
|
|
@@ -636,57 +650,6 @@ var RightDetail = function RightDetail(props) {
|
|
|
636
650
|
onClick: function onClick() {
|
|
637
651
|
return handleButtonPage('buttonAnalyzeParams');
|
|
638
652
|
}
|
|
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
|
-
}
|
|
690
653
|
}, "\u67E5\u770B"))))))) : (/*#__PURE__*/React.createElement(Empty, {
|
|
691
654
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
692
655
|
})));
|