@zgfe/modules-settings 2.0.0-zhongyuan.34 → 2.0.0-zhongyuan.36
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/constants/api.d.ts +2 -0
- package/es/constants/api.js +4 -0
- package/es/modules/createDemand/constants.d.ts +1 -1
- package/es/modules/createDemand/constants.js +3 -3
- package/es/modules/createDemand/index.js +39 -12
- package/es/modules/pointMap/createMetaDrawer.d.ts +4 -0
- package/es/modules/pointMap/createMetaDrawer.js +654 -0
- package/es/modules/pointMap/pageInfo.js +298 -111
- package/es/modules/pointMap/record.d.ts +7 -0
- package/es/modules/pointMap/record.js +521 -0
- package/es/modules/pointMap/styles/pageInfo.less +420 -244
- package/es/modules/pointMap/types.d.ts +88 -0
- package/es/modules/pointMap/types.js +1 -0
- package/package.json +2 -2
|
@@ -2,15 +2,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
3
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
4
4
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
5
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
6
|
+
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."); }
|
|
7
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
5
9
|
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; }
|
|
6
10
|
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; }
|
|
7
11
|
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; }
|
|
8
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
13
|
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); }
|
|
10
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
11
|
-
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."); }
|
|
12
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
13
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
14
14
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
15
15
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
16
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -18,7 +18,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
18
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; } }
|
|
19
19
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
20
20
|
import { BizDialog, BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
21
|
-
import { Input, message, Button, Table, notification, Upload, Image, Checkbox, Empty, Tooltip, Popover, Modal } from 'antd';
|
|
21
|
+
import { Input, message, Button, Table, notification, Upload, Image, Checkbox, Empty, Tooltip, Popover, Modal, Drawer } from 'antd';
|
|
22
22
|
import React, { useContext, useEffect, useState } from 'react';
|
|
23
23
|
import _ from 'lodash';
|
|
24
24
|
import './styles/pageInfo.less';
|
|
@@ -27,7 +27,9 @@ import util from '../../utils/util';
|
|
|
27
27
|
import request from '../../utils/ajax';
|
|
28
28
|
import apis from '../../constants/api';
|
|
29
29
|
import PicCircleSelect from '../../components/picCircleSelect';
|
|
30
|
+
import CreateMetaDrawer from './createMetaDrawer';
|
|
30
31
|
import { uuid } from '@antv/x6/lib/util/string/uuid';
|
|
32
|
+
import RecordDom from './record';
|
|
31
33
|
var getImgUrl = function getImgUrl(src, pageId) {
|
|
32
34
|
return src.indexOf('data:image') != -1 ? src : "".concat(window.location.origin, "/web/img/report/").concat(pageId, "/").concat(src);
|
|
33
35
|
// return constants.regExp.url.test(src)
|
|
@@ -35,6 +37,7 @@ var getImgUrl = function getImgUrl(src, pageId) {
|
|
|
35
37
|
// : `${'https://test01.zhugeapi.com'}/web/img/report/${pageId}/${src}`;
|
|
36
38
|
};
|
|
37
39
|
var PageInfo = function PageInfo(props) {
|
|
40
|
+
console.log(props, 'props');
|
|
38
41
|
var classPrefix = 'setting-point-map-page';
|
|
39
42
|
var _useContext = useContext(BizGlobalDataContext),
|
|
40
43
|
currentApp = _useContext.currentApp,
|
|
@@ -88,53 +91,93 @@ var PageInfo = function PageInfo(props) {
|
|
|
88
91
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
89
92
|
isEditPicCircle = _useState24[0],
|
|
90
93
|
setIsEditPicCircle = _useState24[1];
|
|
91
|
-
var _useState25 = useState(props.selectPoint),
|
|
94
|
+
var _useState25 = useState(props.isSelect ? [] : props.selectPoint),
|
|
92
95
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
93
96
|
selectPoint = _useState26[0],
|
|
94
97
|
setSelectPoint = _useState26[1];
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
// props.isSelect
|
|
99
|
+
var _useState27 = useState(props.isSelect),
|
|
100
|
+
_useState28 = _slicedToArray(_useState27, 1),
|
|
101
|
+
isSelect = _useState28[0];
|
|
99
102
|
var _useState29 = useState(false),
|
|
100
103
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var _useState31 = useState(),
|
|
104
|
+
isEmpty = _useState30[0],
|
|
105
|
+
setIsEmpty = _useState30[1];
|
|
106
|
+
var _useState31 = useState(false),
|
|
104
107
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
isEdit = _useState32[0],
|
|
109
|
+
setIsEdit = _useState32[1];
|
|
107
110
|
var _useState33 = useState(),
|
|
108
111
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
var _useState35 = useState(
|
|
112
|
+
imgPath = _useState34[0],
|
|
113
|
+
setImgPath = _useState34[1];
|
|
114
|
+
var _useState35 = useState(),
|
|
112
115
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
var _useState37 = useState([]),
|
|
116
|
+
imgUrl = _useState36[0],
|
|
117
|
+
setImgUrl = _useState36[1];
|
|
118
|
+
var _useState37 = useState(false),
|
|
117
119
|
_useState38 = _slicedToArray(_useState37, 2),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
isHasData = _useState38[0],
|
|
121
|
+
setIsHasData = _useState38[1];
|
|
122
|
+
// 记录删除的有id的页面埋点
|
|
123
|
+
var _useState39 = useState([]),
|
|
121
124
|
_useState40 = _slicedToArray(_useState39, 2),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
var _useState41 = useState(),
|
|
125
|
+
deleteEventIds = _useState40[0],
|
|
126
|
+
setDeleteEventIds = _useState40[1];
|
|
127
|
+
var _useState41 = useState(''),
|
|
125
128
|
_useState42 = _slicedToArray(_useState41, 2),
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
eventKey = _useState42[0],
|
|
130
|
+
setEventKey = _useState42[1];
|
|
128
131
|
var _useState43 = useState(),
|
|
129
132
|
_useState44 = _slicedToArray(_useState43, 2),
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
id = _useState44[0],
|
|
134
|
+
setId = _useState44[1];
|
|
135
|
+
var _useState45 = useState(),
|
|
136
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
137
|
+
showIndex = _useState46[0],
|
|
138
|
+
setShowIndex = _useState46[1];
|
|
139
|
+
var _useState47 = useState({}),
|
|
140
|
+
_useState48 = _slicedToArray(_useState47, 2),
|
|
141
|
+
eventData = _useState48[0],
|
|
142
|
+
setEventData = _useState48[1];
|
|
132
143
|
var changeItemInfo = function changeItemInfo(i, key, v) {
|
|
133
144
|
var dealData = _.clone(eventAttrList);
|
|
134
145
|
dealData[i]['isEdit'] = true;
|
|
135
146
|
dealData[i][key] = v;
|
|
136
147
|
setEventAttrList(dealData);
|
|
137
148
|
};
|
|
149
|
+
//埋点筛选
|
|
150
|
+
var _useState49 = useState([{
|
|
151
|
+
label: '在线埋点',
|
|
152
|
+
sum: 0,
|
|
153
|
+
value: 0
|
|
154
|
+
}, {
|
|
155
|
+
label: '下线埋点',
|
|
156
|
+
sum: 0,
|
|
157
|
+
value: 1
|
|
158
|
+
}]),
|
|
159
|
+
_useState50 = _slicedToArray(_useState49, 2),
|
|
160
|
+
navList = _useState50[0],
|
|
161
|
+
setNavList = _useState50[1];
|
|
162
|
+
var _useState51 = useState(0),
|
|
163
|
+
_useState52 = _slicedToArray(_useState51, 2),
|
|
164
|
+
navIndex = _useState52[0],
|
|
165
|
+
setNavIndex = _useState52[1];
|
|
166
|
+
//创建元事件
|
|
167
|
+
var _useState53 = useState(false),
|
|
168
|
+
_useState54 = _slicedToArray(_useState53, 2),
|
|
169
|
+
createMetaShow = _useState54[0],
|
|
170
|
+
setCreateMetaShow = _useState54[1];
|
|
171
|
+
//元事件内容
|
|
172
|
+
var _useState55 = useState(),
|
|
173
|
+
_useState56 = _slicedToArray(_useState55, 2),
|
|
174
|
+
metaData = _useState56[0],
|
|
175
|
+
setMetaData = _useState56[1];
|
|
176
|
+
//日志管理
|
|
177
|
+
var _useState57 = useState(false),
|
|
178
|
+
_useState58 = _slicedToArray(_useState57, 2),
|
|
179
|
+
recordShow = _useState58[0],
|
|
180
|
+
setRecordShow = _useState58[1];
|
|
138
181
|
useEffect(function () {
|
|
139
182
|
// console.log('props.pageData', props.pageData);
|
|
140
183
|
if (!props.pageData) {
|
|
@@ -168,22 +211,37 @@ var PageInfo = function PageInfo(props) {
|
|
|
168
211
|
uuid: res.data.detail.uuid,
|
|
169
212
|
zosFileKey: res.data.detail.zosFileKey
|
|
170
213
|
} : undefined);
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
214
|
+
if (!isSelect) {
|
|
215
|
+
// getPointTree()
|
|
216
|
+
setEventAttrList(res.data.eventInfos ? res.data.eventInfos.map(function (item, index) {
|
|
217
|
+
return {
|
|
218
|
+
id: item.id,
|
|
219
|
+
eventId: item.eventId,
|
|
220
|
+
eventName: item.eventName,
|
|
221
|
+
describe: item.pointDescribe,
|
|
222
|
+
pointSelect: item.pointSelect,
|
|
223
|
+
pv: item.pv,
|
|
224
|
+
imgPath: item.zosImgUrl ? getImgUrl(item.zosImgUrl, props.pageData.id) : '',
|
|
225
|
+
key: uuid(),
|
|
226
|
+
index: index,
|
|
227
|
+
approvalStatus: item.approvalStatus,
|
|
228
|
+
operationType: item.operationType,
|
|
229
|
+
del: item.del || 1
|
|
230
|
+
};
|
|
231
|
+
}) : []);
|
|
232
|
+
//计算出当前上线和下线总合数量
|
|
233
|
+
setNavList(navList.map(function (nav) {
|
|
234
|
+
var sum = 0;
|
|
235
|
+
res.data.eventInfos && res.data.eventInfos.map(function (item, index) {
|
|
236
|
+
if (nav.value == item.del) {
|
|
237
|
+
sum += 1;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
return _objectSpread(_objectSpread({}, nav), {}, {
|
|
241
|
+
sum: sum
|
|
242
|
+
});
|
|
243
|
+
}));
|
|
244
|
+
}
|
|
187
245
|
}
|
|
188
246
|
}).catch(function (err) {
|
|
189
247
|
console.log(err);
|
|
@@ -354,7 +412,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
354
412
|
return false;
|
|
355
413
|
} else {
|
|
356
414
|
return !!selectPoint.filter(function (item) {
|
|
357
|
-
return item.id === record.id;
|
|
415
|
+
return isSelect ? item.eventName === record.eventName : item.id === record.id;
|
|
358
416
|
}).length;
|
|
359
417
|
}
|
|
360
418
|
};
|
|
@@ -408,15 +466,15 @@ var PageInfo = function PageInfo(props) {
|
|
|
408
466
|
props.onChangeSelectObj && props.onChangeSelectObj(_selectPoint);
|
|
409
467
|
};
|
|
410
468
|
// 表格列表筛选项
|
|
411
|
-
var
|
|
412
|
-
|
|
413
|
-
type =
|
|
414
|
-
setType =
|
|
415
|
-
var
|
|
416
|
-
|
|
417
|
-
encryption_type =
|
|
418
|
-
setEncryptionType =
|
|
419
|
-
var columns = [].concat(_toConsumableArray(
|
|
469
|
+
var _useState59 = useState(0),
|
|
470
|
+
_useState60 = _slicedToArray(_useState59, 2),
|
|
471
|
+
type = _useState60[0],
|
|
472
|
+
setType = _useState60[1];
|
|
473
|
+
var _useState61 = useState(-1),
|
|
474
|
+
_useState62 = _slicedToArray(_useState61, 2),
|
|
475
|
+
encryption_type = _useState62[0],
|
|
476
|
+
setEncryptionType = _useState62[1];
|
|
477
|
+
var columns = [].concat(_toConsumableArray(!isEdit ? [{
|
|
420
478
|
title: (/*#__PURE__*/React.createElement(Checkbox, {
|
|
421
479
|
checked: checkedAllHandle(),
|
|
422
480
|
onChange: function onChange(e) {
|
|
@@ -463,17 +521,23 @@ var PageInfo = function PageInfo(props) {
|
|
|
463
521
|
placement: "topLeft"
|
|
464
522
|
}, /*#__PURE__*/React.createElement("a", {
|
|
465
523
|
onClick: function onClick() {
|
|
466
|
-
if (
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
524
|
+
if (!isSelect) {
|
|
525
|
+
if (isEdit) {
|
|
526
|
+
props.setIsShowSelectList && props.setIsShowSelectList(function (data) {
|
|
527
|
+
var item = data.selectEventList[0];
|
|
528
|
+
changeItemInfo(index, 'eventId', item && item.event_id ? item.event_id : undefined);
|
|
529
|
+
changeItemInfo(index, 'eventName', item && item.event_id ? item.event_name : undefined);
|
|
530
|
+
changeItemInfo(index, 'approvalStatus', item && item.event_id ? item.approvalStatus : undefined);
|
|
531
|
+
changeItemInfo(index, 'operationType', item && item.event_id ? item.operationType : undefined);
|
|
532
|
+
changeItemInfo(index, 'pv');
|
|
533
|
+
}, record);
|
|
534
|
+
} else {
|
|
535
|
+
window.open('/webapp/app/' + (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId) + '/plat/0/analytics/dataCollectManage?key=' + eventName, '_blank');
|
|
536
|
+
}
|
|
475
537
|
} else {
|
|
476
|
-
|
|
538
|
+
//打开元事件
|
|
539
|
+
setCreateMetaShow(true);
|
|
540
|
+
setMetaData(record);
|
|
477
541
|
}
|
|
478
542
|
}
|
|
479
543
|
}, eventName ? eventName : '选择元事件', !eventName && /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -514,9 +578,9 @@ var PageInfo = function PageInfo(props) {
|
|
|
514
578
|
ellipsis: true,
|
|
515
579
|
width: 198,
|
|
516
580
|
render: function render(describe, record, index) {
|
|
517
|
-
if (isEdit) {
|
|
581
|
+
if (isEdit || isSelect) {
|
|
518
582
|
return /*#__PURE__*/React.createElement(BizEditText, {
|
|
519
|
-
canEdit: isEdit,
|
|
583
|
+
canEdit: isEdit || isSelect,
|
|
520
584
|
value: describe,
|
|
521
585
|
max: 20,
|
|
522
586
|
isHideIcon: true,
|
|
@@ -550,7 +614,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
550
614
|
}
|
|
551
615
|
})) : (/*#__PURE__*/React.createElement(IconFont, {
|
|
552
616
|
type: "tianjiatupian"
|
|
553
|
-
})), isEdit && (/*#__PURE__*/React.createElement("div", {
|
|
617
|
+
})), (isEdit || isSelect) && (/*#__PURE__*/React.createElement("div", {
|
|
554
618
|
className: "".concat(classPrefix, "-content-img-select-btn"),
|
|
555
619
|
onClick: function onClick() {
|
|
556
620
|
if (!imgPath) {
|
|
@@ -565,17 +629,50 @@ var PageInfo = function PageInfo(props) {
|
|
|
565
629
|
size: 16
|
|
566
630
|
}), "\u5708\u9009")));
|
|
567
631
|
}
|
|
568
|
-
},
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
632
|
+
},
|
|
633
|
+
// {
|
|
634
|
+
// title: '访问量',
|
|
635
|
+
// dataIndex: 'pv',
|
|
636
|
+
// key: 'pv',
|
|
637
|
+
// width: 92,
|
|
638
|
+
// render: (pv) => {
|
|
639
|
+
// return <div className={`${classPrefix}-content-select`}>{pv || pv === 0 ? pv : '-'}</div>;
|
|
640
|
+
// },
|
|
641
|
+
// },
|
|
642
|
+
{
|
|
643
|
+
title: '数据量',
|
|
644
|
+
children: [{
|
|
645
|
+
title: '昨日',
|
|
646
|
+
dataIndex: 'time1',
|
|
647
|
+
key: 'time1',
|
|
648
|
+
width: 80,
|
|
649
|
+
render: function render(value) {
|
|
650
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
651
|
+
className: "".concat(classPrefix, "-content-select")
|
|
652
|
+
}, value || value === 0 ? value : '-');
|
|
653
|
+
}
|
|
654
|
+
}, {
|
|
655
|
+
title: '近7天',
|
|
656
|
+
dataIndex: 'time1',
|
|
657
|
+
key: 'time1',
|
|
658
|
+
width: 80,
|
|
659
|
+
render: function render(value) {
|
|
660
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
661
|
+
className: "".concat(classPrefix, "-content-select")
|
|
662
|
+
}, value || value === 0 ? value : '-');
|
|
663
|
+
}
|
|
664
|
+
}, {
|
|
665
|
+
title: '近30天',
|
|
666
|
+
dataIndex: 'time1',
|
|
667
|
+
key: 'time1',
|
|
668
|
+
width: 80,
|
|
669
|
+
render: function render(value) {
|
|
670
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
671
|
+
className: "".concat(classPrefix, "-content-select")
|
|
672
|
+
}, value || value === 0 ? value : '-');
|
|
673
|
+
}
|
|
674
|
+
}]
|
|
675
|
+
}], _toConsumableArray(isEdit || isSelect ? [{
|
|
579
676
|
title: '操作',
|
|
580
677
|
dataIndex: 'set',
|
|
581
678
|
key: 'set',
|
|
@@ -587,12 +684,26 @@ var PageInfo = function PageInfo(props) {
|
|
|
587
684
|
index: index
|
|
588
685
|
});
|
|
589
686
|
}
|
|
590
|
-
}] : [{
|
|
687
|
+
}] : [{
|
|
688
|
+
title: '操作',
|
|
689
|
+
dataIndex: 'record',
|
|
690
|
+
width: 72,
|
|
691
|
+
fixed: 'right',
|
|
692
|
+
render: function render(_, record, index) {
|
|
693
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
694
|
+
size: 'small',
|
|
695
|
+
type: "link",
|
|
696
|
+
onClick: function onClick() {
|
|
697
|
+
recordOpen(record);
|
|
698
|
+
}
|
|
699
|
+
}, ' ', "\u65E5\u5FD7", ' ');
|
|
700
|
+
}
|
|
701
|
+
}]));
|
|
591
702
|
var DealDom = function DealDom(props) {
|
|
592
|
-
var
|
|
593
|
-
|
|
594
|
-
open =
|
|
595
|
-
setOpen =
|
|
703
|
+
var _useState63 = useState(false),
|
|
704
|
+
_useState64 = _slicedToArray(_useState63, 2),
|
|
705
|
+
open = _useState64[0],
|
|
706
|
+
setOpen = _useState64[1];
|
|
596
707
|
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
597
708
|
setOpen(newOpen);
|
|
598
709
|
};
|
|
@@ -639,10 +750,10 @@ var PageInfo = function PageInfo(props) {
|
|
|
639
750
|
}
|
|
640
751
|
}, "\u79FB\u9664"));
|
|
641
752
|
};
|
|
642
|
-
var
|
|
643
|
-
|
|
644
|
-
scrollY =
|
|
645
|
-
setScrollY =
|
|
753
|
+
var _useState65 = useState(''),
|
|
754
|
+
_useState66 = _slicedToArray(_useState65, 2),
|
|
755
|
+
scrollY = _useState66[0],
|
|
756
|
+
setScrollY = _useState66[1];
|
|
646
757
|
//页面加载完成后才能获取到对应的元素及其位置
|
|
647
758
|
var onClose = function onClose() {
|
|
648
759
|
if (isChange) {
|
|
@@ -745,19 +856,55 @@ var PageInfo = function PageInfo(props) {
|
|
|
745
856
|
setIsShowBack(false);
|
|
746
857
|
};
|
|
747
858
|
var addNewEvent = function addNewEvent() {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
859
|
+
//新埋点管理
|
|
860
|
+
if (isSelect) {
|
|
861
|
+
setMetaData(undefined);
|
|
862
|
+
setCreateMetaShow(true);
|
|
863
|
+
} else {
|
|
864
|
+
//老埋点
|
|
865
|
+
setEventAttrList([{
|
|
866
|
+
eventId: void 0,
|
|
867
|
+
eventName: '',
|
|
868
|
+
describe: '',
|
|
869
|
+
pointSelect: '',
|
|
870
|
+
imgPath: '',
|
|
871
|
+
index: eventAttrList.length,
|
|
872
|
+
key: new Date() * 1
|
|
873
|
+
}].concat(_toConsumableArray(eventAttrList)));
|
|
874
|
+
setShowIndex(eventAttrList.length);
|
|
875
|
+
setTimeout(function () {
|
|
876
|
+
setShowIndex(void 0);
|
|
877
|
+
}, 3000);
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
//设置新添加的元事件
|
|
881
|
+
var onEventSet = function onEventSet(data, type) {
|
|
882
|
+
if (type == 'create') {
|
|
883
|
+
setEventAttrList([{
|
|
884
|
+
eventName: data.eventName,
|
|
885
|
+
triggeringOccasion: data.triggeringOccasion,
|
|
886
|
+
aliasName: data.aliasName,
|
|
887
|
+
describe: '',
|
|
888
|
+
pointSelect: '',
|
|
889
|
+
imgPath: '',
|
|
890
|
+
index: eventAttrList.length,
|
|
891
|
+
key: new Date() * 1,
|
|
892
|
+
eventAttrList: data.eventAttrList
|
|
893
|
+
}].concat(_toConsumableArray(eventAttrList)));
|
|
894
|
+
setShowIndex(eventAttrList.length);
|
|
895
|
+
setTimeout(function () {
|
|
896
|
+
setShowIndex(void 0);
|
|
897
|
+
}, 3000);
|
|
898
|
+
} else {
|
|
899
|
+
setEventAttrList(eventAttrList.map(function (res) {
|
|
900
|
+
return res.eventId == data.eventId ? data : res;
|
|
901
|
+
}));
|
|
902
|
+
}
|
|
903
|
+
};
|
|
904
|
+
//打开日志
|
|
905
|
+
var recordOpen = function recordOpen(row) {
|
|
906
|
+
setRecordShow(true);
|
|
907
|
+
setEventData(row);
|
|
761
908
|
};
|
|
762
909
|
return /*#__PURE__*/React.createElement("div", {
|
|
763
910
|
className: "".concat(classPrefix)
|
|
@@ -788,7 +935,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
788
935
|
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
789
936
|
type: 'primary',
|
|
790
937
|
onClick: submit
|
|
791
|
-
}, "\u786E\u5B9A"))) : props.pageData && props.pageData.currentPointVersion !== '全部' ? null : (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
938
|
+
}, "\u786E\u5B9A"))) : props.pageData && props.pageData.currentPointVersion !== '全部' ? null : (/*#__PURE__*/React.createElement("div", null, !isSelect && (/*#__PURE__*/React.createElement(Button, {
|
|
792
939
|
disabled: !authority[1724922835],
|
|
793
940
|
shape: "round",
|
|
794
941
|
className: "button bianji1-button",
|
|
@@ -800,7 +947,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
800
947
|
style: {
|
|
801
948
|
marginRight: 8
|
|
802
949
|
}
|
|
803
|
-
}), "\u7F16\u8F91")))), /*#__PURE__*/React.createElement("div", {
|
|
950
|
+
}), "\u7F16\u8F91"))))), /*#__PURE__*/React.createElement("div", {
|
|
804
951
|
className: "".concat(classPrefix, "-content")
|
|
805
952
|
}, /*#__PURE__*/React.createElement("div", {
|
|
806
953
|
className: "".concat(classPrefix, "-info")
|
|
@@ -917,8 +1064,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
917
1064
|
return setEventKey(e.target.value);
|
|
918
1065
|
},
|
|
919
1066
|
placeholder: '请输入埋点事件名称搜索'
|
|
920
|
-
}), isEdit && (/*#__PURE__*/React.createElement(Button, {
|
|
921
|
-
disabled: !isEdit,
|
|
1067
|
+
}), (isEdit || isSelect) && (/*#__PURE__*/React.createElement(Button, {
|
|
922
1068
|
shape: "round",
|
|
923
1069
|
className: "button",
|
|
924
1070
|
onClick: addNewEvent
|
|
@@ -927,10 +1073,20 @@ var PageInfo = function PageInfo(props) {
|
|
|
927
1073
|
style: {
|
|
928
1074
|
marginRight: 8
|
|
929
1075
|
}
|
|
930
|
-
}), "\u6DFB\u52A0\u9875\u9762\u57CB\u70B9")))), /*#__PURE__*/React.createElement(
|
|
1076
|
+
}), "\u6DFB\u52A0\u9875\u9762\u57CB\u70B9")))), !isSelect && !isEdit && (/*#__PURE__*/React.createElement("div", {
|
|
1077
|
+
className: "".concat(classPrefix, "-info")
|
|
1078
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1079
|
+
className: "".concat(classPrefix, "-info-nav")
|
|
1080
|
+
}, navList.map(function (res) {
|
|
1081
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1082
|
+
className: "".concat(classPrefix, "-info-nav-item ").concat(navIndex == res.value ? "".concat(classPrefix, "-info-nav-itemActive") : ''),
|
|
1083
|
+
onClick: function onClick() {
|
|
1084
|
+
setNavIndex(res.value);
|
|
1085
|
+
}
|
|
1086
|
+
}, res.label, ": ", res.sum);
|
|
1087
|
+
})))), /*#__PURE__*/React.createElement(Table, {
|
|
931
1088
|
className: "".concat(classPrefix, "-table"),
|
|
932
1089
|
rowClassName: function rowClassName(record) {
|
|
933
|
-
console.log('rowClassName', record);
|
|
934
1090
|
return record.index === showIndex ? 'isShowF2F3F4' : '';
|
|
935
1091
|
},
|
|
936
1092
|
// id="dataManageCreateMetaTable"
|
|
@@ -938,6 +1094,12 @@ var PageInfo = function PageInfo(props) {
|
|
|
938
1094
|
rowKey: 'uuid',
|
|
939
1095
|
dataSource: (eventAttrList || []).filter(function (item) {
|
|
940
1096
|
return new RegExp(_.escapeRegExp(eventKey), 'i').test(item.eventName || '');
|
|
1097
|
+
}).filter(function (res) {
|
|
1098
|
+
if (isEdit || isSelect) {
|
|
1099
|
+
return true;
|
|
1100
|
+
} else {
|
|
1101
|
+
return res.del == navIndex;
|
|
1102
|
+
}
|
|
941
1103
|
}),
|
|
942
1104
|
scroll: {
|
|
943
1105
|
y: window.innerHeight - 380
|
|
@@ -980,6 +1142,31 @@ var PageInfo = function PageInfo(props) {
|
|
|
980
1142
|
imgPath: eventAttrList[selectIndex].imgPath || imgPath,
|
|
981
1143
|
bgImgPath: imgPath,
|
|
982
1144
|
onChange: setCircleImg
|
|
983
|
-
})))
|
|
1145
|
+
}))), /*#__PURE__*/React.createElement(Drawer, {
|
|
1146
|
+
className: "".concat(classPrefix, "-drawer"),
|
|
1147
|
+
width: '65%',
|
|
1148
|
+
title: /*#__PURE__*/React.createElement("div", null, "\u57CB\u70B9\u65E5\u5FD7"),
|
|
1149
|
+
placement: "right",
|
|
1150
|
+
destroyOnClose: true,
|
|
1151
|
+
onClose: function onClose() {
|
|
1152
|
+
return setRecordShow(false);
|
|
1153
|
+
},
|
|
1154
|
+
open: recordShow
|
|
1155
|
+
}, /*#__PURE__*/React.createElement(RecordDom, {
|
|
1156
|
+
id: eventData.id,
|
|
1157
|
+
eventName: eventData.eventName
|
|
1158
|
+
})), /*#__PURE__*/React.createElement(CreateMetaDrawer, {
|
|
1159
|
+
isShow: createMetaShow,
|
|
1160
|
+
data: metaData,
|
|
1161
|
+
isEdit: true,
|
|
1162
|
+
onSubmit: function onSubmit(event, type) {
|
|
1163
|
+
setCreateMetaShow(false);
|
|
1164
|
+
onEventSet(event, type);
|
|
1165
|
+
},
|
|
1166
|
+
// selectTreeName={props.selectTreeName}
|
|
1167
|
+
onClose: function onClose() {
|
|
1168
|
+
return setCreateMetaShow(false);
|
|
1169
|
+
}
|
|
1170
|
+
}));
|
|
984
1171
|
};
|
|
985
1172
|
export default PageInfo;
|