@zgfe/modules-settings 2.1.0-zhongyuan.8 → 3.0.0-zhongyuan-set.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/es/constants/api.d.ts +2 -0
  2. package/es/constants/api.js +5 -1
  3. package/es/modules/appSettings/dataAccessFilter/index.js +2 -1
  4. package/es/modules/companySetting/application/applicationForm.d.ts +1 -0
  5. package/es/modules/companySetting/application/applicationForm.js +34 -4
  6. package/es/modules/companySetting/application/index.js +7 -8
  7. package/es/modules/companySetting/application/index.less +144 -144
  8. package/es/modules/companySetting/index.js +37 -33
  9. package/es/modules/companySetting/operationLog/index.js +22 -5
  10. package/es/modules/companySetting/role/index.less +296 -296
  11. package/es/modules/companySetting/user/index.js +41 -27
  12. package/es/modules/companySetting/user/invite.js +28 -100
  13. package/es/modules/createDemand/demo/selectPoint.js +1 -2
  14. package/es/modules/createDemand/index.js +9 -8
  15. package/es/modules/createDemand/styles/index.less +403 -403
  16. package/es/modules/createDemand_bf/demo/index.js +0 -1
  17. package/es/modules/createDemand_bf/index.js +0 -1
  18. package/es/modules/dealDemand/demo/index.js +0 -1
  19. package/es/modules/dealDemand/demo/selectPoint.js +1 -1
  20. package/es/modules/dealDemand/index.js +0 -2
  21. package/es/modules/demandManage/index.js +2 -2
  22. package/es/modules/demandManage/styles/index.less +155 -155
  23. package/es/modules/personalSetting/securityLog/index.js +1 -1
  24. package/es/modules/pointMap/createMetaDrawer.js +162 -71
  25. package/es/modules/pointMap/index.js +3 -1
  26. package/es/modules/pointMap/pageInfo.js +17 -10
  27. package/es/modules/pointMap/styles/index.less +165 -165
  28. package/es/modules/pointMap/styles/tree.css +164 -145
  29. package/es/modules/pointMap/styles/tree.less +174 -156
  30. package/es/modules/pointMap/tree.js +133 -82
  31. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.js +5 -4
  32. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/css/index.less +48 -48
  33. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.js +2 -1
  34. package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.js +11 -6
  35. package/es/modules/systemSetting/document-setting/index.js +7 -6
  36. package/es/modules/systemSetting/index.js +13 -15
  37. package/es/modules/systemSetting/index.less +175 -169
  38. package/package.json +3 -3
@@ -1,16 +1,17 @@
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 _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
2
3
  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
- 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; }
4
- 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; }
5
- 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; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
7
- 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); }
8
4
  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); }
9
5
  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); }); }; }
10
6
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
11
7
  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
8
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
13
9
  function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
10
+ 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; }
11
+ 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; }
12
+ 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; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); }
14
15
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
15
16
  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
17
  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; } }
@@ -68,6 +69,11 @@ var CreateMeta = function CreateMeta(props) {
68
69
  setHomeType(props.isEdit ? 'update' : 'get');
69
70
  initData(props.data);
70
71
  } else {
72
+ form.resetFields(); // 重置表单数据
73
+ setEventAttrList([]);
74
+ setTriTagInput(undefined);
75
+ setTriTagId(undefined);
76
+ setInputText('');
71
77
  setHomeType('create');
72
78
  }
73
79
  }
@@ -82,12 +88,18 @@ var CreateMeta = function CreateMeta(props) {
82
88
  setTriTagId(data.triggerLabelId);
83
89
  setInputText(data.eventName);
84
90
  if (data.eventAttrList) {
85
- setEventAttrList(_toConsumableArray(data.eventAttrList));
91
+ var arr = data.eventAttrList.map(function (o) {
92
+ return _objectSpread(_objectSpread({}, o), {}, {
93
+ prop_type: o.type,
94
+ encryption_type: o.encryptionType
95
+ });
96
+ });
97
+ setEventAttrList(_toConsumableArray(arr));
86
98
  }
87
99
  };
88
100
  var submit = /*#__PURE__*/function () {
89
101
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
90
- var values;
102
+ var values, resultArr, newArr;
91
103
  return _regeneratorRuntime().wrap(function _callee$(_context) {
92
104
  while (1) switch (_context.prev = _context.next) {
93
105
  case 0:
@@ -115,45 +127,84 @@ var CreateMeta = function CreateMeta(props) {
115
127
  });
116
128
  return _context.abrupt("return");
117
129
  case 11:
130
+ // 先初始没有错误
131
+ resultArr = [];
132
+ newArr = findDuplicateObjects(eventAttrList);
133
+ if (!(newArr.length >= 1)) {
134
+ _context.next = 16;
135
+ break;
136
+ }
137
+ notification.warning({
138
+ message: '有事件属性名称相同'
139
+ });
140
+ // resultArr = eventAttrList.map((j) => {
141
+ // if (newArr.find((k) => j.name == k)) {
142
+ // return { ...j, status: 'error' };
143
+ // }
144
+ // return j;
145
+ // });
146
+ // setEventAttrList(resultArr);
147
+ return _context.abrupt("return");
148
+ case 16:
118
149
  //把参数传递给主页面
119
150
  if (props.onSubmit) {
120
- if (props.data) {
121
- props.onSubmit(_objectSpread(_objectSpread({}, props.data), {}, {
122
- eventAttrList: eventAttrList
123
- }), 'update');
124
- } else {
125
- props.onSubmit({
126
- eventName: values.eventName,
127
- aliasName: values.aliasName,
128
- triggeringOccasion: triTagInput,
129
- eventAttrList: eventAttrList,
130
- businessLabelId: values.businessLabelId,
131
- triggerLabelId: triTagId,
132
- businessLabel: bizTag.filter(function (res) {
133
- return res.id == values.businessLabelId;
134
- })[0],
135
- triggerLabel: triTag.filter(function (res) {
136
- return res.id == values.businessLabelId;
137
- })[0]
138
- }, 'create');
139
- }
151
+ props.onSubmit({
152
+ eventName: values.eventName,
153
+ aliasName: values.aliasName,
154
+ triggeringOccasion: triTagInput,
155
+ businessLabelId: values.businessLabelId,
156
+ triggerLabelId: triTagId,
157
+ businessLabel: values.businessLabelId && bizTag.filter(function (res) {
158
+ return res.id == values.businessLabelId;
159
+ })[0],
160
+ triggerLabel: triTagId && triTag.filter(function (res) {
161
+ return res.id == triTagId;
162
+ })[0],
163
+ eventAttrList: eventAttrList
164
+ }, props.data ? 'update' : 'create');
140
165
  }
141
- _context.next = 17;
166
+ _context.next = 22;
142
167
  break;
143
- case 14:
144
- _context.prev = 14;
168
+ case 19:
169
+ _context.prev = 19;
145
170
  _context.t0 = _context["catch"](1);
146
171
  console.log('表单验证失败:', _context.t0);
147
- case 17:
172
+ case 22:
148
173
  case "end":
149
174
  return _context.stop();
150
175
  }
151
- }, _callee, null, [[1, 14]]);
176
+ }, _callee, null, [[1, 19]]);
152
177
  }));
153
178
  return function submit() {
154
179
  return _ref.apply(this, arguments);
155
180
  };
156
181
  }();
182
+ function findDuplicateObjects(arr) {
183
+ var map = new Map(); // key: name值, value: 对应的对象
184
+ var duplicates = [];
185
+ var _iterator = _createForOfIteratorHelper(arr),
186
+ _step;
187
+ try {
188
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
189
+ var obj = _step.value;
190
+ var name = obj.name || obj.attr_name;
191
+ if (map.has(name)) {
192
+ // 找到重复项,把已存的对象和当前对象加入结果
193
+ duplicates.push(map.get(name), obj);
194
+ break; // 只找第一组重复项,如需全部可去掉break
195
+ } else {
196
+ map.set(name, obj);
197
+ }
198
+ }
199
+ } catch (err) {
200
+ _iterator.e(err);
201
+ } finally {
202
+ _iterator.f();
203
+ }
204
+ return duplicates.map(function (o) {
205
+ return o.name;
206
+ });
207
+ }
157
208
  var dealEventAttr = function dealEventAttr(index) {
158
209
  var dealData = _.clone(eventAttrList);
159
210
  dealData.splice(index, 1);
@@ -192,14 +243,16 @@ var CreateMeta = function CreateMeta(props) {
192
243
  style: {
193
244
  margin: '-10px 0'
194
245
  }
195
- }, /*#__PURE__*/React.createElement(BizEditText, {
196
- canEdit: homeType != 'get',
197
- value: text,
198
- max: 128,
246
+ }, /*#__PURE__*/React.createElement(Input, {
247
+ disabled: homeType == 'get',
199
248
  placeholder: '请输入事件属性名',
249
+ value: text,
250
+ showCount: true,
251
+ status: record === null || record === void 0 ? void 0 : record.status,
252
+ maxLength: 128,
200
253
  onChange: function onChange(e) {
201
254
  setIsChange(true);
202
- changeItemInfo(index, 'name', e);
255
+ changeItemInfo(index, 'name', e.target.value);
203
256
  }
204
257
  }));
205
258
  }
@@ -265,10 +318,10 @@ var CreateMeta = function CreateMeta(props) {
265
318
  label: '日期'
266
319
  }]
267
320
  }))),
268
- dataIndex: 'type',
269
- key: 'type',
321
+ dataIndex: 'prop_type',
322
+ key: 'prop_type',
270
323
  width: 148,
271
- render: function render(type, record, index) {
324
+ render: function render(prop_type, record, index) {
272
325
  return /*#__PURE__*/React.createElement("div", {
273
326
  className: "".concat(classPrefix, "-content-select")
274
327
  }, /*#__PURE__*/React.createElement(Select
@@ -279,7 +332,7 @@ var CreateMeta = function CreateMeta(props) {
279
332
  width: 120,
280
333
  margin: '-10px 0'
281
334
  },
282
- value: type,
335
+ value: prop_type,
283
336
  suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
284
337
  type: "xiangxia",
285
338
  style: {
@@ -289,6 +342,7 @@ var CreateMeta = function CreateMeta(props) {
289
342
  disabled: homeType == 'get',
290
343
  onChange: function onChange(e) {
291
344
  setIsChange(true);
345
+ changeItemInfo(index, 'prop_type', e);
292
346
  changeItemInfo(index, 'type', e);
293
347
  },
294
348
  options: [{
@@ -343,14 +397,14 @@ var CreateMeta = function CreateMeta(props) {
343
397
  label: '全加密'
344
398
  }]
345
399
  }))),
346
- dataIndex: 'encryptionType',
347
- key: 'encryptionType',
400
+ dataIndex: 'encryption_type',
401
+ key: 'encryption_type',
348
402
  width: 148,
349
- render: function render(encryptionType, record, index) {
403
+ render: function render(encryption_type, record, index) {
350
404
  return /*#__PURE__*/React.createElement("div", {
351
405
  className: "".concat(classPrefix, "-content-select")
352
406
  }, /*#__PURE__*/React.createElement(Select, {
353
- value: encryptionType,
407
+ value: encryption_type,
354
408
  style: {
355
409
  width: 120,
356
410
  margin: '-10px 0'
@@ -364,6 +418,7 @@ var CreateMeta = function CreateMeta(props) {
364
418
  disabled: homeType == 'get',
365
419
  onChange: function onChange(e) {
366
420
  setIsChange(true);
421
+ changeItemInfo(index, 'encryption_type', e);
367
422
  changeItemInfo(index, 'encryptionType', e);
368
423
  },
369
424
  options: [{
@@ -435,8 +490,33 @@ var CreateMeta = function CreateMeta(props) {
435
490
  };
436
491
  // 是否复制的开关
437
492
  var changeSwitch = function changeSwitch(event) {
493
+ // 清空其他数据
494
+ form.resetFields(); // 重置表单数据
495
+ setEventAttrList([]);
496
+ setTriTagInput(undefined);
497
+ setTriTagId(undefined);
498
+ setInputText('');
438
499
  setIsCopy(event);
439
500
  };
501
+ // 根据事件id获取属性列表
502
+ function getEventIdAttrList(id) {
503
+ request(apis.getEventAttributes, {
504
+ method: 'post',
505
+ data: {
506
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
507
+ eventId: id
508
+ }
509
+ }).then(function (res) {
510
+ setEventAttrList(_toConsumableArray(res.data.map(function (item) {
511
+ return _objectSpread(_objectSpread({}, item), {}, {
512
+ aliasName: item.alias_name,
513
+ name: item.attr_name,
514
+ type: item.prop_type,
515
+ encryptionType: item.encryption_type
516
+ });
517
+ })));
518
+ });
519
+ }
440
520
  var onChangeEvent = function onChangeEvent(_ref2) {
441
521
  var event = _ref2.event;
442
522
  form.setFieldsValue({
@@ -444,14 +524,7 @@ var CreateMeta = function CreateMeta(props) {
444
524
  eventName: event.name
445
525
  });
446
526
  setInputText(event.name);
447
- if (event.attrList) {
448
- setEventAttrList(_toConsumableArray(event.attrList.map(function (res) {
449
- return _objectSpread(_objectSpread({}, res), {}, {
450
- aliasName: res.alias,
451
- name: res.label
452
- });
453
- })));
454
- }
527
+ getEventIdAttrList(event.id);
455
528
  };
456
529
  //标签列表数据 2:业务标签 3:触发标签
457
530
  var _useState17 = useState([]),
@@ -461,7 +534,7 @@ var CreateMeta = function CreateMeta(props) {
461
534
  var _useState19 = useState(),
462
535
  _useState20 = _slicedToArray(_useState19, 2),
463
536
  triTagInput = _useState20[0],
464
- setTriTagInput = _useState20[1];
537
+ setTriTagInput = _useState20[1]; // 触发时机
465
538
  var _useState21 = useState([]),
466
539
  _useState22 = _slicedToArray(_useState21, 2),
467
540
  triTag = _useState22[0],
@@ -478,21 +551,21 @@ var CreateMeta = function CreateMeta(props) {
478
551
  labelType: type
479
552
  }
480
553
  }).then(function (res) {
481
- if (res.code == '100000') {
554
+ if (res && res.code == '100000') {
482
555
  switch (type) {
483
556
  case 2:
484
557
  setBizTag(res.data.map(function (res) {
485
558
  return {
486
- label: res.labelName,
487
- value: res.id
559
+ labelName: res.labelName,
560
+ id: res.id
488
561
  };
489
562
  }));
490
563
  break;
491
564
  case 3:
492
565
  setTriTag(res.data.map(function (res) {
493
566
  return {
494
- label: res.labelName,
495
- value: res.id
567
+ labelName: res.labelName,
568
+ id: res.id
496
569
  };
497
570
  }));
498
571
  break;
@@ -541,7 +614,7 @@ var CreateMeta = function CreateMeta(props) {
541
614
  initialValues: {
542
615
  eventName: '',
543
616
  aliasName: '',
544
- businessLabelId: undefined,
617
+ businessLabelId: triTagId || undefined,
545
618
  maidianID: []
546
619
  }
547
620
  }, homeType == 'create' && (/*#__PURE__*/React.createElement(Form.Item, {
@@ -565,8 +638,12 @@ var CreateMeta = function CreateMeta(props) {
565
638
  }],
566
639
  validateStatus: validateContainsUnderscore(inputText) ? '' : 'error',
567
640
  help: validateContainsUnderscore(inputText) ? '' : inputText == '' ? '请输入事件名称' : "\u8BF7\u6839\u636E\u9875\u9762\u5C42\u7EA7\u547D\u540D\uFF0C\u5982\uFF1A".concat(props.selectTreeName)
568
- }, isCopy ? (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizEventSelector, {
569
- showAllEvent: true,
641
+ }, isCopy ? (/*#__PURE__*/React.createElement("div", {
642
+ style: {
643
+ width: '100%'
644
+ }
645
+ }, /*#__PURE__*/React.createElement(BizEventSelector, {
646
+ showAllEvent: false,
570
647
  multiple: false,
571
648
  key: "eventProp",
572
649
  showBuiltInTarget: false,
@@ -587,7 +664,7 @@ var CreateMeta = function CreateMeta(props) {
587
664
  name: "aliasName",
588
665
  label: "\u4E8B\u4EF6\u522B\u540D"
589
666
  }, /*#__PURE__*/React.createElement(Input, {
590
- disabled: homeType == 'update' || homeType == 'get',
667
+ disabled: homeType == 'get',
591
668
  placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u522B\u540D",
592
669
  showCount: true,
593
670
  maxLength: 128,
@@ -604,23 +681,29 @@ var CreateMeta = function CreateMeta(props) {
604
681
  width: '160px',
605
682
  marginRight: '10px'
606
683
  },
607
- disabled: homeType == 'update' || homeType == 'get',
684
+ disabled: homeType == 'get',
608
685
  placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u6807\u7B7E",
609
- defaultValue: triTagId,
686
+ // defaultValue={triTagId}
687
+ value: triTagId,
610
688
  options: triTag,
689
+ fieldNames: {
690
+ label: 'labelName',
691
+ value: 'id'
692
+ },
611
693
  onChange: function onChange(value) {
612
694
  setTriTagId(value);
613
695
  setIsChange(true);
614
696
  }
615
697
  }), "\u6216", /*#__PURE__*/React.createElement(Input, {
616
- disabled: homeType == 'update' || homeType == 'get',
698
+ disabled: homeType == 'get',
617
699
  style: {
618
700
  border: 0,
619
701
  width: 'calc(100% - 195px)',
620
702
  marginLeft: '10px'
621
703
  },
622
704
  placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u65F6\u673A\uFF0C\u4F8B\u5982\uFF1A\u7528\u6237\u70B9\u51FB\u786E\u8BA4\u6309\u94AE",
623
- defaultValue: triTagInput,
705
+ // defaultValue={triTagInput}
706
+ value: triTagInput,
624
707
  showCount: true,
625
708
  maxLength: 128,
626
709
  onChange: function onChange(e) {
@@ -632,9 +715,13 @@ var CreateMeta = function CreateMeta(props) {
632
715
  label: "\u4E1A\u52A1\u6807\u7B7E"
633
716
  }, /*#__PURE__*/React.createElement(Select, {
634
717
  allowClear: true,
635
- disabled: homeType == 'update' || homeType == 'get',
718
+ disabled: homeType == 'get',
636
719
  placeholder: "\u8BF7\u8F93\u5165\u4E1A\u52A1\u6807\u7B7E",
637
720
  options: bizTag,
721
+ fieldNames: {
722
+ label: 'labelName',
723
+ value: 'id'
724
+ },
638
725
  onChange: function onChange() {
639
726
  setIsChange(true);
640
727
  }
@@ -652,12 +739,16 @@ var CreateMeta = function CreateMeta(props) {
652
739
  className: "button",
653
740
  onClick: function onClick() {
654
741
  // setIsChange(true);
655
- setEventAttrList([].concat(_toConsumableArray(eventAttrList), [{
742
+ setEventAttrList([{
656
743
  name: '',
657
744
  aliasName: '',
745
+ prop_type: 1,
746
+ encryptionType: 0,
747
+ encryption_type: 0,
658
748
  type: 1,
659
- encryptionType: 0
660
- }]));
749
+ status: '',
750
+ key: eventAttrList.length + 1
751
+ }].concat(_toConsumableArray(eventAttrList)));
661
752
  }
662
753
  }, /*#__PURE__*/React.createElement(IconFont, {
663
754
  type: "tianjia1",
@@ -92,7 +92,9 @@ var pointMap = function pointMap(props) {
92
92
  pageStatusIsEdit: pageStatusIsEdit,
93
93
  onChangePage: function onChangePage(data) {
94
94
  setPageData(data);
95
- props.setTreeData && props.setTreeData(data.treeName + '_点击'); // 树选择发生变化元事件名称一起变化
95
+ if (data) {
96
+ props.setTreeData && props.setTreeData(data.treeName + '_点击'); // 树选择发生变化元事件名称一起变化
97
+ }
96
98
  },
97
99
  refreshPage: function refreshPage() {
98
100
  return setKey(new Date().getTime());
@@ -168,7 +168,6 @@ var PageInfo = function PageInfo(props) {
168
168
  recordShow = _useState52[0],
169
169
  setRecordShow = _useState52[1];
170
170
  useEffect(function () {
171
- // console.log('props.pageData', props.pageData);
172
171
  if (!props.pageData) {
173
172
  setIsEmpty(true);
174
173
  } else {
@@ -176,7 +175,6 @@ var PageInfo = function PageInfo(props) {
176
175
  }
177
176
  }, [props.pageData, props.refreshKey]);
178
177
  useEffect(function () {
179
- // console.log('props.pageData', props.pageData);
180
178
  props.onChangePageStatus && props.onChangePageStatus(isEdit);
181
179
  }, [isEdit]);
182
180
  var getPageConfig = function getPageConfig() {
@@ -252,6 +250,12 @@ var PageInfo = function PageInfo(props) {
252
250
  });
253
251
  return;
254
252
  }
253
+ if (!imgUrl) {
254
+ notification.warning({
255
+ message: '请选择页面图示'
256
+ });
257
+ return;
258
+ }
255
259
  if (eventAttrList.filter(function (item) {
256
260
  return !item.eventId;
257
261
  }).length) {
@@ -291,6 +295,7 @@ var PageInfo = function PageInfo(props) {
291
295
  id: id,
292
296
  pageName: pageName,
293
297
  imgUrl: imgUrl,
298
+ pageId: props.pageData.id,
294
299
  describe: describe
295
300
  }
296
301
  }).then(function (res) {
@@ -902,9 +907,7 @@ var PageInfo = function PageInfo(props) {
902
907
  }, 3000);
903
908
  } else {
904
909
  setEventAttrList(eventAttrList.map(function (res, index) {
905
- return metaDataIndex == index ? _objectSpread(_objectSpread({}, res), {}, {
906
- eventAttrList: data.eventAttrList
907
- }) : res;
910
+ return metaDataIndex == index ? _objectSpread(_objectSpread({}, res), data) : res;
908
911
  }));
909
912
  }
910
913
  };
@@ -916,13 +919,13 @@ var PageInfo = function PageInfo(props) {
916
919
  //拼接名称
917
920
  var sliceName = function sliceName(record) {
918
921
  var _record$businessLabel, _record$triggerLabel;
919
- var point = props.pageData.labels && props.pageData.labels.filter(function (res) {
922
+ var point = props.pageData && props.pageData.labels && props.pageData.labels.filter(function (res) {
920
923
  return res.labelType == 1;
921
924
  }).map(function (res) {
922
- return res.labelName;
925
+ return res.labelName || res.label;
923
926
  }).join('_') || '';
924
- var biz = record.businessLabel && ((_record$businessLabel = record.businessLabel) === null || _record$businessLabel === void 0 ? void 0 : _record$businessLabel.labelName) || '';
925
- var trig = record.triggerLabel && ((_record$triggerLabel = record.triggerLabel) === null || _record$triggerLabel === void 0 ? void 0 : _record$triggerLabel.labelName) || '' || '';
927
+ var biz = (record === null || record === void 0 ? void 0 : record.businessLabel) && ((_record$businessLabel = record.businessLabel) === null || _record$businessLabel === void 0 ? void 0 : _record$businessLabel.labelName) || '';
928
+ var trig = (record === null || record === void 0 ? void 0 : record.triggerLabel) && ((_record$triggerLabel = record.triggerLabel) === null || _record$triggerLabel === void 0 ? void 0 : _record$triggerLabel.labelName) || '' || '';
926
929
  var arr = [biz, point, trig, record.eventName].filter(function (res) {
927
930
  return res;
928
931
  }).join('-');
@@ -1008,7 +1011,11 @@ var PageInfo = function PageInfo(props) {
1008
1011
  }
1009
1012
  }, /*#__PURE__*/React.createElement("div", {
1010
1013
  className: "".concat(classPrefix, "-info-title")
1011
- }, "\u9875\u9762\u56FE\u793A"), /*#__PURE__*/React.createElement("div", {
1014
+ }, /*#__PURE__*/React.createElement("span", {
1015
+ style: {
1016
+ color: '#FB5547'
1017
+ }
1018
+ }, "*"), "\u9875\u9762\u56FE\u793A"), /*#__PURE__*/React.createElement("div", {
1012
1019
  className: "".concat(classPrefix, "-info-input")
1013
1020
  }, !imgPath ? (/*#__PURE__*/React.createElement(Upload, _objectSpread({}, uploadProps), /*#__PURE__*/React.createElement("div", {
1014
1021
  className: "".concat(classPrefix, "-info-upload")