@zgfe/modules-dm 1.0.42-alpha.9 → 1.0.56-zhongyuan.5

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 (115) hide show
  1. package/es/components/demo.js +1 -1
  2. package/es/constants/api.d.ts +37 -0
  3. package/es/constants/api.js +62 -1
  4. package/es/index.d.ts +3 -1
  5. package/es/index.js +3 -1
  6. package/es/modules/CutsModal.d.ts +66 -0
  7. package/es/modules/CutsModal.js +52 -0
  8. package/es/modules/dataManage/collectionAttributeList.d.ts +3 -0
  9. package/es/modules/dataManage/collectionAttributeList.js +524 -80
  10. package/es/modules/dataManage/collectionEventList.d.ts +6 -0
  11. package/es/modules/dataManage/collectionEventList.js +482 -62
  12. package/es/modules/dataManage/components/createAttrDrawer.d.ts +4 -0
  13. package/es/modules/dataManage/components/createAttrDrawer.js +264 -0
  14. package/es/modules/dataManage/components/createMetaDrawer.d.ts +4 -0
  15. package/es/modules/dataManage/components/createMetaDrawer.js +618 -0
  16. package/es/modules/dataManage/components/createVirtualDrawer.js +19 -19
  17. package/es/modules/dataManage/components/creditPop/imgs/link.png +0 -0
  18. package/es/modules/dataManage/components/creditPop/imgs/png01.png +0 -0
  19. package/es/modules/dataManage/components/creditPop/imgs/png02.png +0 -0
  20. package/es/modules/dataManage/components/creditPop/imgs/png03.png +0 -0
  21. package/es/modules/dataManage/components/creditPop/imgs/png04.png +0 -0
  22. package/es/modules/dataManage/components/creditPop/index.d.ts +6 -0
  23. package/es/modules/dataManage/components/creditPop/index.js +89 -0
  24. package/es/modules/dataManage/components/creditPop/index.less +121 -0
  25. package/es/modules/dataManage/components/deleteConfirm.d.ts +9 -0
  26. package/es/modules/dataManage/components/deleteConfirm.js +36 -0
  27. package/es/modules/dataManage/components/deleteUserAttrConfirm.d.ts +9 -0
  28. package/es/modules/dataManage/components/deleteUserAttrConfirm.js +57 -0
  29. package/es/modules/dataManage/components/depositPop/imgs/link.png +0 -0
  30. package/es/modules/dataManage/components/depositPop/imgs/png01.png +0 -0
  31. package/es/modules/dataManage/components/depositPop/imgs/png02.png +0 -0
  32. package/es/modules/dataManage/components/depositPop/index.d.ts +6 -0
  33. package/es/modules/dataManage/components/depositPop/index.js +89 -0
  34. package/es/modules/dataManage/components/depositPop/index.less +115 -0
  35. package/es/modules/dataManage/components/developModal/index.css +36 -0
  36. package/es/modules/dataManage/components/developModal/index.d.ts +6 -0
  37. package/es/modules/dataManage/components/developModal/index.js +224 -0
  38. package/es/modules/dataManage/components/developModal/index.less +36 -0
  39. package/es/modules/dataManage/components/editTxt/index.d.ts +3 -0
  40. package/es/modules/dataManage/components/editTxt/index.js +123 -0
  41. package/es/modules/dataManage/components/editTxt/index.less +44 -0
  42. package/es/modules/dataManage/components/editTxt/types.d.ts +48 -0
  43. package/es/modules/dataManage/components/editTxt/types.js +1 -0
  44. package/es/modules/dataManage/components/eventFilter/index.js +13 -13
  45. package/es/modules/dataManage/components/eventFilter/styles/index.less +72 -72
  46. package/es/modules/dataManage/components/eventGroupingDrawer.js +41 -44
  47. package/es/modules/dataManage/components/importAttrDialog/demo/index.d.ts +3 -0
  48. package/es/modules/dataManage/components/importAttrDialog/demo/index.js +28 -0
  49. package/es/modules/dataManage/components/importAttrDialog/index.d.ts +7 -0
  50. package/es/modules/dataManage/components/importAttrDialog/index.js +159 -0
  51. package/es/modules/dataManage/components/importAttrDialog/styles/index.less +90 -0
  52. package/es/modules/dataManage/components/importMetaDialog/demo/index.d.ts +3 -0
  53. package/es/modules/dataManage/components/importMetaDialog/demo/index.js +28 -0
  54. package/es/modules/dataManage/components/importMetaDialog/index.d.ts +7 -0
  55. package/es/modules/dataManage/components/importMetaDialog/index.js +159 -0
  56. package/es/modules/dataManage/components/importMetaDialog/styles/index.less +91 -0
  57. package/es/modules/dataManage/components/selectAttributes.js +10 -10
  58. package/es/modules/dataManage/components/tablePlus.d.ts +4 -0
  59. package/es/modules/dataManage/components/tablePlus.js +625 -94
  60. package/es/modules/dataManage/components/virtualTablePlus.js +7 -7
  61. package/es/modules/dataManage/demo/index.d.ts +2 -1
  62. package/es/modules/dataManage/demo/index.js +79 -16
  63. package/es/modules/dataManage/detailedData/DetailedDataForm.d.ts +5 -0
  64. package/es/modules/dataManage/detailedData/DetailedDataForm.js +216 -0
  65. package/es/modules/dataManage/detailedData/index.d.ts +24 -0
  66. package/es/modules/dataManage/detailedData/index.js +403 -0
  67. package/es/modules/dataManage/detailedData/useColumns.d.ts +34 -0
  68. package/es/modules/dataManage/detailedData/useColumns.js +135 -0
  69. package/es/modules/dataManage/index.d.ts +9 -4
  70. package/es/modules/dataManage/index.js +142 -50
  71. package/es/modules/dataManage/styles/detailed.less +74 -0
  72. package/es/modules/dataManage/styles/index.less +1195 -841
  73. package/es/modules/dataManage/types.d.ts +8 -0
  74. package/es/modules/dataManage/virtualEventList.js +13 -13
  75. package/es/modules/dataMap/component/data.d.ts +7 -0
  76. package/es/modules/dataMap/component/data.js +257 -0
  77. package/es/modules/dataMap/component/drawerAdd.d.ts +6 -0
  78. package/es/modules/dataMap/component/drawerAdd.js +379 -0
  79. package/es/modules/dataMap/component/leftTree.d.ts +6 -0
  80. package/es/modules/dataMap/component/leftTree.js +232 -0
  81. package/es/modules/dataMap/component/rightDetail.d.ts +7 -0
  82. package/es/modules/dataMap/component/rightDetail.js +694 -0
  83. package/es/modules/dataMap/component/selectAttr.d.ts +7 -0
  84. package/es/modules/dataMap/component/selectAttr.js +92 -0
  85. package/es/modules/dataMap/css/index.css +163 -0
  86. package/es/modules/dataMap/css/index.less +177 -0
  87. package/es/modules/dataMap/demo/index.d.ts +3 -0
  88. package/es/modules/dataMap/demo/index.js +6 -0
  89. package/es/modules/dataMap/img/empty-data.png +0 -0
  90. package/es/modules/dataMap/index.d.ts +3 -0
  91. package/es/modules/dataMap/index.js +80 -0
  92. package/es/modules/dataMap/mapDetail.d.ts +3 -0
  93. package/es/modules/dataMap/mapDetail.js +44 -0
  94. package/es/modules/dataMap/mapSetting.d.ts +6 -0
  95. package/es/modules/dataMap/mapSetting.js +156 -0
  96. package/es/modules/dataPlan/addEventOrUser.js +31 -30
  97. package/es/modules/dataPlan/addPlan.js +29 -27
  98. package/es/modules/dataPlan/eventList.js +2 -2
  99. package/es/modules/dataPlan/index.js +10 -10
  100. package/es/modules/dataPlan/search.js +6 -5
  101. package/es/modules/dataPlan/styles/index.less +316 -316
  102. package/es/modules/dataPlan/tablePlus.js +3 -3
  103. package/es/modules/dataPlan/userAttributeList.js +5 -5
  104. package/es/modules/dataReal/css/index.css +48 -0
  105. package/es/modules/dataReal/css/index.less +51 -0
  106. package/es/modules/dataReal/demo/index.d.ts +3 -0
  107. package/es/modules/dataReal/demo/index.js +6 -0
  108. package/es/modules/dataReal/index1.d.ts +28 -0
  109. package/es/modules/dataReal/index1.js +247 -0
  110. package/es/modules/dataReal/table.d.ts +5 -0
  111. package/es/modules/dataReal/table.js +260 -0
  112. package/es/store/index.js +11 -11
  113. package/es/utils/index.d.ts +1 -0
  114. package/es/utils/index.js +9 -1
  115. package/package.json +64 -58
@@ -0,0 +1,618 @@
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 _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; }
7
+ 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); }
8
+ 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
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
10
+ 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."); }
11
+ 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; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ 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; } }
14
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
15
+ import { BizGlobalDataContext, IconFont, BizDialog } from '@zgfe/business-lib';
16
+ import { Input, message, Drawer, Select, Button, Table, notification, Form } from 'antd';
17
+ import React, { Fragment, useContext, useEffect, useState } from 'react';
18
+ import _ from 'lodash';
19
+ import BizEditText from './editTxt';
20
+ import DelConfirm from './deleteConfirm';
21
+ import request from '../../../utils/ajax';
22
+ import apis from '../../../constants/api';
23
+ import { getTableScroll } from '../../../utils';
24
+ var CreateMeta = function CreateMeta(props) {
25
+ var classPrefix = 'create-meta-drawer';
26
+ var _useContext = useContext(BizGlobalDataContext),
27
+ currentApp = _useContext.currentApp,
28
+ isDemo = _useContext.isDemo;
29
+ var _useState = useState(false),
30
+ _useState2 = _slicedToArray(_useState, 2),
31
+ isShowDel = _useState2[0],
32
+ setIsShowDel = _useState2[1];
33
+ var _useState3 = useState([]),
34
+ _useState4 = _slicedToArray(_useState3, 2),
35
+ eventAttrList = _useState4[0],
36
+ setEventAttrList = _useState4[1];
37
+ var _useState5 = useState(),
38
+ _useState6 = _slicedToArray(_useState5, 2),
39
+ currentEventAttr = _useState6[0],
40
+ setCurrentEventAttr = _useState6[1];
41
+ var _useState7 = useState(false),
42
+ _useState8 = _slicedToArray(_useState7, 2),
43
+ isShowBack = _useState8[0],
44
+ setIsShowBack = _useState8[1];
45
+ var _useState9 = useState(false),
46
+ _useState10 = _slicedToArray(_useState9, 2),
47
+ isChange = _useState10[0],
48
+ setIsChange = _useState10[1];
49
+ var _Form$useForm = Form.useForm(),
50
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
51
+ form = _Form$useForm2[0];
52
+ var changeItemInfo = function changeItemInfo(i, key, v) {
53
+ var dealData = _.clone(eventAttrList);
54
+ dealData[i][key] = v;
55
+ setEventAttrList(dealData);
56
+ };
57
+ useEffect(function () {
58
+ if (props.isShow) {
59
+ form.resetFields(); // 重置表单数据
60
+ setEventAttrList([]);
61
+ setIsChange(false);
62
+ }
63
+ }, [props.isShow]);
64
+ var submit = /*#__PURE__*/function () {
65
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
66
+ var values;
67
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
68
+ while (1) switch (_context.prev = _context.next) {
69
+ case 0:
70
+ setIsChange(true);
71
+ _context.prev = 1;
72
+ _context.next = 4;
73
+ return form.validateFields();
74
+ case 4:
75
+ values = _context.sent;
76
+ if (!isDemo) {
77
+ _context.next = 8;
78
+ break;
79
+ }
80
+ message.error('demo环境,无法创建');
81
+ return _context.abrupt("return");
82
+ case 8:
83
+ if (!eventAttrList.filter(function (item) {
84
+ return !item.name;
85
+ }).length) {
86
+ _context.next = 11;
87
+ break;
88
+ }
89
+ notification.warning({
90
+ message: '请输入事件属性名称'
91
+ });
92
+ return _context.abrupt("return");
93
+ case 11:
94
+ request(apis.addEvent, {
95
+ method: 'POST',
96
+ data: {
97
+ app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
98
+ eventName: values.eventName,
99
+ aliasName: values.aliasName,
100
+ demandId: values.demandId,
101
+ triggeringOccasion: values.triggeringOccasion,
102
+ eventAttrList: eventAttrList,
103
+ platformStr: values === null || values === void 0 ? void 0 : values.maidianID.join(),
104
+ remark: values === null || values === void 0 ? void 0 : values.remark
105
+ }
106
+ }).then(function (res) {
107
+ if ((res === null || res === void 0 ? void 0 : res.code) === '100000') {
108
+ notification.success({
109
+ message: '保存成功'
110
+ });
111
+ props.onSubmit && props.onSubmit();
112
+ } else {
113
+ notification.error({
114
+ message: '保存失败'
115
+ });
116
+ }
117
+ });
118
+ _context.next = 17;
119
+ break;
120
+ case 14:
121
+ _context.prev = 14;
122
+ _context.t0 = _context["catch"](1);
123
+ console.log('表单验证失败:', _context.t0);
124
+ case 17:
125
+ case "end":
126
+ return _context.stop();
127
+ }
128
+ }, _callee, null, [[1, 14]]);
129
+ }));
130
+ return function submit() {
131
+ return _ref.apply(this, arguments);
132
+ };
133
+ }();
134
+ var dealEventAttr = function dealEventAttr(index) {
135
+ var dealData = _.clone(eventAttrList);
136
+ dealData.splice(index, 1);
137
+ setEventAttrList(dealData);
138
+ setIsChange(true);
139
+ };
140
+ // 表格列表筛选项
141
+ var _useState11 = useState(0),
142
+ _useState12 = _slicedToArray(_useState11, 2),
143
+ type = _useState12[0],
144
+ setType = _useState12[1];
145
+ var _useState13 = useState(-1),
146
+ _useState14 = _slicedToArray(_useState13, 2),
147
+ encryption_type = _useState14[0],
148
+ setEncryptionType = _useState14[1];
149
+ var columns = [{
150
+ title: '序号',
151
+ dataIndex: 'event_name',
152
+ key: 'event_name',
153
+ width: 64,
154
+ render: function render(text, record, index) {
155
+ return /*#__PURE__*/React.createElement("span", null, index + 1);
156
+ }
157
+ }, {
158
+ title: (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
159
+ style: {
160
+ color: '#FB5547',
161
+ marginRight: 8
162
+ }
163
+ }, "*"), "\u4E8B\u4EF6\u5C5E\u6027\u540D\u79F0")),
164
+ dataIndex: 'name',
165
+ key: 'name',
166
+ width: 264,
167
+ render: function render(text, record, index) {
168
+ return /*#__PURE__*/React.createElement("div", {
169
+ style: {
170
+ margin: '-10px 0'
171
+ }
172
+ }, /*#__PURE__*/React.createElement(BizEditText, {
173
+ value: text,
174
+ max: 128,
175
+ placeholder: '请输入事件属性名',
176
+ onChange: function onChange(e) {
177
+ setIsChange(true);
178
+ changeItemInfo(index, 'name', e);
179
+ }
180
+ }));
181
+ }
182
+ }, {
183
+ title: '属性别名',
184
+ dataIndex: 'aliasName',
185
+ key: 'aliasName',
186
+ width: 264,
187
+ render: function render(aliasName, record, index) {
188
+ return /*#__PURE__*/React.createElement("div", {
189
+ style: {
190
+ margin: '-10px 0'
191
+ }
192
+ }, /*#__PURE__*/React.createElement(BizEditText, {
193
+ value: aliasName,
194
+ max: 128,
195
+ placeholder: '请输入属性别名',
196
+ onChange: function onChange(e) {
197
+ setIsChange(true);
198
+ changeItemInfo(index, 'aliasName', e);
199
+ }
200
+ }));
201
+ }
202
+ }, {
203
+ title: (/*#__PURE__*/React.createElement("div", {
204
+ className: "".concat(classPrefix, "-content-select")
205
+ }, /*#__PURE__*/React.createElement("span", {
206
+ style: {
207
+ color: '#FB5547',
208
+ marginRight: 8
209
+ }
210
+ }, "*"), /*#__PURE__*/React.createElement(Select, {
211
+ defaultValue: 0,
212
+ style: {
213
+ width: 120,
214
+ margin: '-10px 0'
215
+ },
216
+ onChange: function onChange(e) {
217
+ return setType(e);
218
+ },
219
+ bordered: false,
220
+ className: "select-style",
221
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
222
+ type: "xiangxia",
223
+ style: {
224
+ color: '#5f6085'
225
+ }
226
+ }),
227
+ // onChange={(e) => props.eventActiveFilter(e, 'event_hidden')}
228
+ options: [{
229
+ value: 0,
230
+ label: '属性类型'
231
+ }, {
232
+ value: 1,
233
+ label: '字符串'
234
+ }, {
235
+ value: 2,
236
+ label: '数值'
237
+ }, {
238
+ value: 3,
239
+ label: '日期'
240
+ }]
241
+ }))),
242
+ dataIndex: 'type',
243
+ key: 'type',
244
+ width: 148,
245
+ render: function render(type, record, index) {
246
+ return /*#__PURE__*/React.createElement("div", {
247
+ className: "".concat(classPrefix, "-content-select")
248
+ }, /*#__PURE__*/React.createElement(Select
249
+ // defaultValue={record.event_hidden}
250
+ , {
251
+ // defaultValue={record.event_hidden}
252
+ style: {
253
+ width: 120,
254
+ margin: '-10px 0'
255
+ },
256
+ value: type,
257
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
258
+ type: "xiangxia",
259
+ style: {
260
+ color: '#5f6085'
261
+ }
262
+ }),
263
+ // disabled={rowClassNameHandle(record) == 'error-row' || isDemo ? true : false}
264
+ onChange: function onChange(e) {
265
+ setIsChange(true);
266
+ changeItemInfo(index, 'type', e);
267
+ },
268
+ options: [{
269
+ value: 1,
270
+ label: '字符串'
271
+ }, {
272
+ value: 2,
273
+ label: '数值'
274
+ }, {
275
+ value: 3,
276
+ label: '日期'
277
+ }]
278
+ }));
279
+ }
280
+ }, {
281
+ title: (/*#__PURE__*/React.createElement("div", {
282
+ className: "".concat(classPrefix, "-content-select")
283
+ }, /*#__PURE__*/React.createElement("span", {
284
+ style: {
285
+ color: '#FB5547',
286
+ marginRight: 8
287
+ }
288
+ }, "*"), /*#__PURE__*/React.createElement(Select, {
289
+ defaultValue: -1,
290
+ bordered: false,
291
+ onChange: function onChange(e) {
292
+ return setEncryptionType(e);
293
+ },
294
+ style: {
295
+ width: 120,
296
+ margin: '-10px 0'
297
+ },
298
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
299
+ type: "xiangxia",
300
+ style: {
301
+ color: '#5f6085'
302
+ }
303
+ }),
304
+ // onChange={(e) => props.eventActiveFilter(e, 'is_stop')}
305
+ options: [{
306
+ value: -1,
307
+ label: '加密方式'
308
+ }, {
309
+ value: 0,
310
+ label: '不加密'
311
+ }, {
312
+ value: 1,
313
+ label: '半加密'
314
+ }, {
315
+ value: 2,
316
+ label: '全加密'
317
+ }]
318
+ }))),
319
+ dataIndex: 'encryptionType',
320
+ key: 'encryptionType',
321
+ width: 148,
322
+ render: function render(encryptionType, record, index) {
323
+ return /*#__PURE__*/React.createElement("div", {
324
+ className: "".concat(classPrefix, "-content-select")
325
+ }, /*#__PURE__*/React.createElement(Select, {
326
+ value: encryptionType,
327
+ style: {
328
+ width: 120,
329
+ margin: '-10px 0'
330
+ },
331
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
332
+ type: "xiangxia",
333
+ style: {
334
+ color: '#5f6085'
335
+ }
336
+ }),
337
+ // disabled={rowClassNameHandle(record) == 'error-row' || isDemo ? true : false}
338
+ onChange: function onChange(e) {
339
+ setIsChange(true);
340
+ changeItemInfo(index, 'encryptionType', e);
341
+ },
342
+ options: [{
343
+ value: 0,
344
+ label: '不加密'
345
+ }, {
346
+ value: 1,
347
+ label: '半加密'
348
+ }, {
349
+ value: 2,
350
+ label: '全加密'
351
+ }]
352
+ }));
353
+ }
354
+ }, {
355
+ title: '操作',
356
+ dataIndex: 'set',
357
+ key: 'set',
358
+ width: 64,
359
+ render: function render(_, record, index) {
360
+ return /*#__PURE__*/React.createElement("a", {
361
+ className: "set ".concat(record.owner == 'zg_abp' ? 'set-error' : ''),
362
+ onClick: function onClick() {
363
+ return dealEventAttr(index);
364
+ }
365
+ }, "\u5220\u9664");
366
+ }
367
+ }];
368
+ var _useState15 = useState(''),
369
+ _useState16 = _slicedToArray(_useState15, 2),
370
+ scrollY = _useState16[0],
371
+ setScrollY = _useState16[1];
372
+ //页面加载完成后才能获取到对应的元素及其位置
373
+ useEffect(function () {
374
+ var _Y = getTableScroll(376, 'dataManageCreateMetaTable');
375
+ setScrollY(_Y);
376
+ }, []);
377
+ var onClose = function onClose() {
378
+ if (isChange) {
379
+ setIsShowBack(true);
380
+ return;
381
+ }
382
+ props.onClose();
383
+ };
384
+ // 自定义验证规则
385
+ var _useState17 = useState(''),
386
+ _useState18 = _slicedToArray(_useState17, 2),
387
+ inputText = _useState18[0],
388
+ setInputText = _useState18[1];
389
+ // true 验证通过
390
+ var validateContainsUnderscore = function validateContainsUnderscore(value) {
391
+ if (!isChange) {
392
+ // 第一次进来不报错
393
+ return true;
394
+ }
395
+ if (value == '' || props.selectTreeName && !value.includes('_')) {
396
+ return false;
397
+ }
398
+ return true;
399
+ };
400
+ // 埋点平台列表
401
+ var _useState19 = useState([{
402
+ label: 'JS',
403
+ value: 206
404
+ }, {
405
+ label: 'Android',
406
+ value: 175
407
+ }, {
408
+ label: 'IOS',
409
+ value: 174
410
+ }, {
411
+ label: '其他',
412
+ value: 99
413
+ }]),
414
+ _useState20 = _slicedToArray(_useState19, 1),
415
+ maidianList = _useState20[0];
416
+ return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
417
+ className: classPrefix,
418
+ width: 1000,
419
+ title: /*#__PURE__*/React.createElement("div", null, "\u521B\u5EFA\u5143\u4E8B\u4EF6"),
420
+ placement: "right",
421
+ onClose: onClose,
422
+ destroyOnClose: true,
423
+ open: props.isShow,
424
+ extra: /*#__PURE__*/React.createElement(IconFont, {
425
+ type: "qingchu",
426
+ onClick: onClose
427
+ })
428
+ }, /*#__PURE__*/React.createElement("div", {
429
+ className: "".concat(classPrefix, "-content")
430
+ }, /*#__PURE__*/React.createElement(Form, {
431
+ form: form,
432
+ labelCol: {
433
+ span: 2
434
+ },
435
+ wrapperCol: {
436
+ span: 22
437
+ },
438
+ initialValues: {
439
+ eventName: '',
440
+ aliasName: '',
441
+ demandId: '',
442
+ triggeringOccasion: '',
443
+ maidianID: []
444
+ }
445
+ }, /*#__PURE__*/React.createElement(Form.Item, {
446
+ name: "eventName",
447
+ label: "\u4E8B\u4EF6\u540D\u79F0",
448
+ rules: [{
449
+ required: true,
450
+ message: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0"
451
+ }],
452
+ validateStatus: validateContainsUnderscore(inputText) ? '' : 'error',
453
+ help: validateContainsUnderscore(inputText) ? '' : inputText == '' ? '请输入事件名称' : "\u8BF7\u6839\u636E\u9875\u9762\u5C42\u7EA7\u547D\u540D\uFF0C\u5982\uFF1A".concat(props.selectTreeName)
454
+ }, /*#__PURE__*/React.createElement(Input, {
455
+ placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0",
456
+ showCount: true,
457
+ maxLength: 128,
458
+ onChange: function onChange(e) {
459
+ setInputText(e.target.value);
460
+ setIsChange(true);
461
+ }
462
+ })), /*#__PURE__*/React.createElement(Form.Item, {
463
+ name: "aliasName",
464
+ label: "\u4E8B\u4EF6\u522B\u540D"
465
+ }, /*#__PURE__*/React.createElement(Input, {
466
+ placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u522B\u540D",
467
+ showCount: true,
468
+ maxLength: 128,
469
+ onChange: function onChange() {
470
+ return setIsChange(true);
471
+ }
472
+ })), /*#__PURE__*/React.createElement(Form.Item, {
473
+ name: "demandId",
474
+ label: "\u9700\u6C42ID",
475
+ rules: [{
476
+ required: true,
477
+ message: "\u8BF7\u8F93\u5165\u9700\u6C42ID"
478
+ }]
479
+ }, /*#__PURE__*/React.createElement(Input, {
480
+ placeholder: "\u8BF7\u8F93\u5165\u9700\u6C42ID",
481
+ showCount: true,
482
+ maxLength: 128,
483
+ onChange: function onChange() {
484
+ return setIsChange(true);
485
+ }
486
+ })), /*#__PURE__*/React.createElement(Form.Item, {
487
+ name: "triggeringOccasion",
488
+ label: "\u89E6\u53D1\u65F6\u673A"
489
+ }, /*#__PURE__*/React.createElement(Input, {
490
+ style: {
491
+ border: 0
492
+ },
493
+ placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u65F6\u673A\uFF0C\u4F8B\u5982\uFF1A\u7528\u6237\u70B9\u51FB\u786E\u8BA4\u6309\u94AE",
494
+ showCount: true,
495
+ maxLength: 128,
496
+ onChange: function onChange(e) {
497
+ setIsChange(true);
498
+ }
499
+ })), /*#__PURE__*/React.createElement(Form.Item, {
500
+ name: "maidianID",
501
+ label: "\u57CB\u70B9\u5E73\u53F0"
502
+ }, /*#__PURE__*/React.createElement(Select, {
503
+ className: "top-select",
504
+ options: maidianList,
505
+ placeholder: "\u8BF7\u9009\u62E9\u57CB\u70B9\u5E73\u53F0",
506
+ mode: "multiple",
507
+ defaultActiveFirstOption: false,
508
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
509
+ type: "xiangxia",
510
+ style: {
511
+ color: '#5f6085'
512
+ }
513
+ })
514
+ })), /*#__PURE__*/React.createElement(Form.Item, {
515
+ name: "remark",
516
+ label: "\u5907\u6CE8"
517
+ }, /*#__PURE__*/React.createElement(Input, {
518
+ placeholder: "\u8BF7\u8F93\u5165\u5907\u6CE8",
519
+ maxLength: 128,
520
+ showCount: true,
521
+ onChange: function onChange() {
522
+ return setIsChange(true);
523
+ }
524
+ }))), /*#__PURE__*/React.createElement("div", {
525
+ className: "".concat(classPrefix, "-info"),
526
+ style: {
527
+ marginBottom: -12
528
+ }
529
+ }, /*#__PURE__*/React.createElement("div", {
530
+ className: "".concat(classPrefix, "-info-title")
531
+ }, "\u4E8B\u4EF6\u5C5E\u6027"), /*#__PURE__*/React.createElement("div", {
532
+ className: "".concat(classPrefix, "-info-input")
533
+ }, /*#__PURE__*/React.createElement(Button, {
534
+ shape: "round",
535
+ className: "button",
536
+ onClick: function onClick() {
537
+ setIsChange(true);
538
+ setEventAttrList([].concat(_toConsumableArray(eventAttrList), [{
539
+ name: '',
540
+ aliasName: '',
541
+ type: 1,
542
+ encryptionType: 0
543
+ }]));
544
+ }
545
+ }, /*#__PURE__*/React.createElement(IconFont, {
546
+ type: "tianjia1",
547
+ style: {
548
+ marginRight: 8
549
+ }
550
+ }), "\u6DFB\u52A0\u4E8B\u4EF6\u5C5E\u6027"))), /*#__PURE__*/React.createElement(Table, {
551
+ className: "".concat(classPrefix, "-table"),
552
+ id: "dataManageCreateMetaTable",
553
+ columns: columns,
554
+ rowKey: "key",
555
+ dataSource: eventAttrList.filter(function (item) {
556
+ return type < 1 || item.type === type;
557
+ }).filter(function (item) {
558
+ return encryption_type < 0 || item.encryption_type === encryption_type;
559
+ }),
560
+ scroll: {
561
+ y: scrollY
562
+ },
563
+ pagination: false,
564
+ sticky: true
565
+ })), /*#__PURE__*/React.createElement("div", {
566
+ className: "".concat(classPrefix, "-footer")
567
+ }, /*#__PURE__*/React.createElement(Button, {
568
+ onClick: onClose
569
+ }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
570
+ type: 'primary',
571
+ onClick: submit
572
+ }, "\u786E\u5B9A")), /*#__PURE__*/React.createElement(BizDialog, {
573
+ closable: true,
574
+ title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconFont, {
575
+ style: {
576
+ color: '#FD9F41',
577
+ marginRight: '8px',
578
+ verticalAlign: 'top',
579
+ fontSize: '24px'
580
+ },
581
+ type: "tishi1"
582
+ }), "\u63D0\u793A"),
583
+ open: isShowBack,
584
+ onOk: function onOk() {
585
+ setIsShowBack(false);
586
+ setInputText('');
587
+ setIsChange(false);
588
+ props.onClose();
589
+ },
590
+ okButtonProps: {
591
+ size: 'middle'
592
+ },
593
+ onCancel: function onCancel() {
594
+ setIsShowBack(false);
595
+ }
596
+ }, /*#__PURE__*/React.createElement("div", {
597
+ style: {
598
+ margin: '-16px 0px 0px 30px'
599
+ }
600
+ }, /*#__PURE__*/React.createElement("div", {
601
+ style: {
602
+ color: '#021429',
603
+ fontSize: 14
604
+ }
605
+ }, "\u5F53\u524D\u4FE1\u606F\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u9000\u51FA\u9875\u9762\uFF1F")))), isShowDel ? (/*#__PURE__*/React.createElement(DelConfirm, {
606
+ onOk: function onOk() {
607
+ var dealData = _.clone(eventAttrList);
608
+ dealData.splice(currentEventAttr, 1);
609
+ setEventAttrList(dealData);
610
+ setIsShowDel(false);
611
+ setIsChange(true);
612
+ },
613
+ onCancel: function onCancel() {
614
+ setIsShowDel(false);
615
+ }
616
+ })) : null);
617
+ };
618
+ export default CreateMeta;