@zgfe/modules-dm 1.0.56-zhongyuan.12 → 1.0.56-zhongyuan.13
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 +17 -0
- package/es/modules/dataManage/components/tablePlus.js +0 -1
- package/es/modules/dataManage/demo/index.js +1 -2
- package/es/modules/dataMap/component/leftTree.d.ts +1 -0
- package/es/modules/dataMap/component/leftTree.js +37 -14
- package/es/modules/dataMap/component/rightDetail.d.ts +2 -1
- package/es/modules/dataMap/component/rightDetail.js +115 -141
- package/es/modules/dataMap/component/rightDetail1.d.ts +7 -0
- package/es/modules/dataMap/component/rightDetail1.js +643 -0
- package/es/modules/dataMap/component/viewMapSetting.d.ts +24 -0
- package/es/modules/dataMap/component/viewMapSetting.js +161 -0
- package/es/modules/dataMap/css/index.css +193 -163
- package/es/modules/dataMap/css/index.less +210 -177
- package/es/modules/dataMap/mapDetail.js +11 -2
- package/es/modules/dataMap/mapSetting.js +15 -3
- package/es/modules/dataReal/index1.js +13 -0
- package/package.json +64 -64
|
@@ -64,3 +64,20 @@ export interface FiltersType {
|
|
|
64
64
|
label: string;
|
|
65
65
|
attrName: string;
|
|
66
66
|
}
|
|
67
|
+
export interface mapFilterType {
|
|
68
|
+
mapId: number;
|
|
69
|
+
}
|
|
70
|
+
export interface andFilterConditionsType {
|
|
71
|
+
attrId: number;
|
|
72
|
+
propCategory: string;
|
|
73
|
+
type: number;
|
|
74
|
+
operator: string;
|
|
75
|
+
values: any;
|
|
76
|
+
dimensionSub: string;
|
|
77
|
+
label: string;
|
|
78
|
+
attrName: string;
|
|
79
|
+
}
|
|
80
|
+
export interface andFilterType {
|
|
81
|
+
relation: string;
|
|
82
|
+
conditions: andFilterConditionsType[];
|
|
83
|
+
}
|
|
@@ -28,7 +28,6 @@ import { getAppID, getTableScroll } from '../../../utils';
|
|
|
28
28
|
import { DmContext } from '../../../store';
|
|
29
29
|
var Text = Typography.Text;
|
|
30
30
|
var TablePlus = function TablePlus(props) {
|
|
31
|
-
console.log(props, 'kkk');
|
|
32
31
|
var classPrefix = 'table-plus';
|
|
33
32
|
var tableHandleData = props.tableHandleData,
|
|
34
33
|
queryPlanData = props.queryPlanData,
|
|
@@ -80,11 +80,10 @@ export default (function () {
|
|
|
80
80
|
return /*#__PURE__*/React.createElement(DemoWrapper, null, /*#__PURE__*/React.createElement(DataManage
|
|
81
81
|
// isSelect={true}
|
|
82
82
|
// isSelectTab={'1'}
|
|
83
|
-
// selectTreeName="新页面_点击"
|
|
84
83
|
, {
|
|
85
84
|
// isSelect={true}
|
|
86
85
|
// isSelectTab={'1'}
|
|
87
|
-
|
|
86
|
+
selectTreeName: "\u65B0\u9875\u9762_\u70B9\u51FB",
|
|
88
87
|
onChangeSelectObj: setSelectObj,
|
|
89
88
|
selectObj: selectObj
|
|
90
89
|
}));
|
|
@@ -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,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
|
-
},
|
|
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
|
-
|
|
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",
|
|
@@ -165,8 +187,7 @@ var LeftTree = function LeftTree(props) {
|
|
|
165
187
|
},
|
|
166
188
|
onPointerEnterCapture: undefined,
|
|
167
189
|
onPointerLeaveCapture: undefined
|
|
168
|
-
}), "\u57CB\u70B9\u5730\u56FE")
|
|
169
|
-
name: "map"
|
|
190
|
+
}), "\u57CB\u70B9\u5730\u56FE")
|
|
170
191
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
171
192
|
placeholder: "\u8BF7\u9009\u62E9\u5730\u56FE",
|
|
172
193
|
allowClear: true,
|
|
@@ -199,7 +220,9 @@ var LeftTree = function LeftTree(props) {
|
|
|
199
220
|
})), /*#__PURE__*/React.createElement("button", {
|
|
200
221
|
className: "".concat(pageClassName, "_searchBtn"),
|
|
201
222
|
onClick: handleModelList
|
|
202
|
-
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Divider, null),
|
|
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, {
|
|
203
226
|
style: {
|
|
204
227
|
margin: '70px 8px 0px'
|
|
205
228
|
}
|
|
@@ -226,7 +249,7 @@ var LeftTree = function LeftTree(props) {
|
|
|
226
249
|
},
|
|
227
250
|
treeData: treeData,
|
|
228
251
|
rootClassName: "ziBackground",
|
|
229
|
-
height:
|
|
230
|
-
})));
|
|
252
|
+
height: treeHeight()
|
|
253
|
+
}))));
|
|
231
254
|
};
|
|
232
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,
|
|
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,111 @@ 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, globalDimensionsList, 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
|
+
// 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
|
+
}
|
|
332
326
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
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) {
|
|
337
362
|
router === null || router === void 0 ? void 0 : router.push({
|
|
338
363
|
name: routes.insight,
|
|
339
364
|
query: {
|
|
@@ -341,7 +366,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
341
366
|
}
|
|
342
367
|
});
|
|
343
368
|
});
|
|
344
|
-
case
|
|
369
|
+
case 12:
|
|
345
370
|
case "end":
|
|
346
371
|
return _context3.stop();
|
|
347
372
|
}
|
|
@@ -365,7 +390,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
365
390
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
366
391
|
while (1) switch (_context4.prev = _context4.next) {
|
|
367
392
|
case 0:
|
|
368
|
-
// console.log(currentTreeData, currentMap, eventGroupList, 'currentTreeData');
|
|
393
|
+
// console.log(currentTreeData, currentMap, eventGroupList,eventNameMap, 'currentTreeData');
|
|
369
394
|
haveEventName = eventNameMap === null || eventNameMap === void 0 ? void 0 : eventNameMap[currentTreeData.eventName]; // 查找事件
|
|
370
395
|
haveModuleAttr = haveEventName === null || haveEventName === void 0 ? void 0 : haveEventName.attrList.find(function (o) {
|
|
371
396
|
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName);
|
|
@@ -400,7 +425,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
400
425
|
propCategory: 'eventProp',
|
|
401
426
|
type: 1,
|
|
402
427
|
operator: 'equal',
|
|
403
|
-
values: havePageAttr.values,
|
|
428
|
+
values: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.values,
|
|
404
429
|
dimensionSub: 'event_attr',
|
|
405
430
|
label: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label,
|
|
406
431
|
attrName: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label
|
|
@@ -636,57 +661,6 @@ var RightDetail = function RightDetail(props) {
|
|
|
636
661
|
onClick: function onClick() {
|
|
637
662
|
return handleButtonPage('buttonAnalyzeParams');
|
|
638
663
|
}
|
|
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
664
|
}, "\u67E5\u770B"))))))) : (/*#__PURE__*/React.createElement(Empty, {
|
|
691
665
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
692
666
|
})));
|