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

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 (117) 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 +100 -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 +624 -93
  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 +7 -0
  80. package/es/modules/dataMap/component/leftTree.js +255 -0
  81. package/es/modules/dataMap/component/rightDetail.d.ts +8 -0
  82. package/es/modules/dataMap/component/rightDetail.js +668 -0
  83. package/es/modules/dataMap/component/rightDetail1.d.ts +7 -0
  84. package/es/modules/dataMap/component/rightDetail1.js +643 -0
  85. package/es/modules/dataMap/component/viewMapSetting.d.ts +24 -0
  86. package/es/modules/dataMap/component/viewMapSetting.js +161 -0
  87. package/es/modules/dataMap/css/index.css +193 -0
  88. package/es/modules/dataMap/css/index.less +210 -0
  89. package/es/modules/dataMap/demo/index.d.ts +3 -0
  90. package/es/modules/dataMap/demo/index.js +6 -0
  91. package/es/modules/dataMap/img/empty-data.png +0 -0
  92. package/es/modules/dataMap/index.d.ts +3 -0
  93. package/es/modules/dataMap/index.js +80 -0
  94. package/es/modules/dataMap/mapDetail.d.ts +3 -0
  95. package/es/modules/dataMap/mapDetail.js +53 -0
  96. package/es/modules/dataMap/mapSetting.d.ts +6 -0
  97. package/es/modules/dataMap/mapSetting.js +168 -0
  98. package/es/modules/dataPlan/addEventOrUser.js +31 -30
  99. package/es/modules/dataPlan/addPlan.js +29 -27
  100. package/es/modules/dataPlan/eventList.js +2 -2
  101. package/es/modules/dataPlan/index.js +10 -10
  102. package/es/modules/dataPlan/search.js +6 -5
  103. package/es/modules/dataPlan/styles/index.less +316 -316
  104. package/es/modules/dataPlan/tablePlus.js +3 -3
  105. package/es/modules/dataPlan/userAttributeList.js +5 -5
  106. package/es/modules/dataReal/css/index.css +48 -0
  107. package/es/modules/dataReal/css/index.less +51 -0
  108. package/es/modules/dataReal/demo/index.d.ts +3 -0
  109. package/es/modules/dataReal/demo/index.js +6 -0
  110. package/es/modules/dataReal/index1.d.ts +28 -0
  111. package/es/modules/dataReal/index1.js +246 -0
  112. package/es/modules/dataReal/table.d.ts +5 -0
  113. package/es/modules/dataReal/table.js +261 -0
  114. package/es/store/index.js +11 -11
  115. package/es/utils/index.d.ts +1 -0
  116. package/es/utils/index.js +9 -1
  117. package/package.json +10 -4
@@ -0,0 +1,255 @@
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 _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
+ 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
+ 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
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
11
+ 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."); }
12
+ 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; } }
13
+ 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; }
14
+ 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; } }
15
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
16
+ import { Select, Form, Divider, Tree, Spin, Empty } from 'antd';
17
+ import { BorderOuterOutlined, CaretDownOutlined } from '@ant-design/icons';
18
+ import React, { useState, useContext, useEffect } from 'react';
19
+ import { mapContext } from '../../CutsModal';
20
+ import { ValuesList, BizGlobalDataContext } from '@zgfe/business-lib';
21
+ import apis from '../../../constants/api';
22
+ import request from '../../../utils/ajax';
23
+ var pageClassName = 'leftTreePage';
24
+ var LeftTree = function LeftTree(props) {
25
+ var _mapData$, _mapData$2;
26
+ var _useContext = useContext(mapContext),
27
+ setMapViewFlg = _useContext.setMapViewFlg,
28
+ mapData = _useContext.mapData;
29
+ var _Form$useForm = Form.useForm(),
30
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
31
+ viewForm = _Form$useForm2[0];
32
+ var _useContext2 = useContext(BizGlobalDataContext),
33
+ currentApp = _useContext2.currentApp;
34
+ var _useState = useState((mapData === null || mapData === void 0 ? void 0 : mapData[0]) || {
35
+ id: 0
36
+ }),
37
+ _useState2 = _slicedToArray(_useState, 2),
38
+ currentMap = _useState2[0],
39
+ setCurrentMap = _useState2[1]; // 当前选中地图
40
+ var _useState3 = useState((mapData === null || mapData === void 0 ? void 0 : (_mapData$ = mapData[0]) === null || _mapData$ === void 0 ? void 0 : _mapData$.attributeJson) ? JSON.parse(mapData === null || mapData === void 0 ? void 0 : (_mapData$2 = mapData[0]) === null || _mapData$2 === void 0 ? void 0 : _mapData$2.attributeJson) : []),
41
+ _useState4 = _slicedToArray(_useState3, 2),
42
+ filterMapListLabel = _useState4[0],
43
+ setFilterMapListLabel = _useState4[1]; // 当前选中地图下的筛选条件
44
+ var handleMapSelect = function handleMapSelect(value) {
45
+ var newArr = mapData === null || mapData === void 0 ? void 0 : mapData.filter(function (o) {
46
+ return o.id == value;
47
+ })[0];
48
+ setCurrentMap(function () {
49
+ getTreeList({
50
+ mapId: newArr.id
51
+ });
52
+ return newArr;
53
+ });
54
+ // 地图下的搜索条件
55
+ setFilterMapListLabel((newArr === null || newArr === void 0 ? void 0 : newArr.attributeJson) ? JSON.parse(newArr === null || newArr === void 0 ? void 0 : newArr.attributeJson) : []);
56
+ // 搜索条件重置
57
+ viewForm.resetFields();
58
+ };
59
+ var _useState5 = useState({
60
+ mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
61
+ }),
62
+ _useState6 = _slicedToArray(_useState5, 2),
63
+ search = _useState6[0],
64
+ setSearchData = _useState6[1];
65
+ var _useState7 = useState(false),
66
+ _useState8 = _slicedToArray(_useState7, 2),
67
+ loadingSearch = _useState8[0],
68
+ setLoadingSearch = _useState8[1];
69
+ var handleModelList = /*#__PURE__*/function () {
70
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
71
+ var values;
72
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
73
+ while (1) switch (_context.prev = _context.next) {
74
+ case 0:
75
+ _context.next = 2;
76
+ return viewForm.validateFields();
77
+ case 2:
78
+ values = _context.sent;
79
+ Object.keys(values).map(function (o) {
80
+ if (values[o]) {
81
+ values[o] = values[o].join();
82
+ }
83
+ });
84
+ setSearchData(function () {
85
+ getTreeList(_objectSpread(_objectSpread({}, values), {}, {
86
+ mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
87
+ }));
88
+ return _objectSpread(_objectSpread({}, values), {}, {
89
+ mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
90
+ });
91
+ });
92
+ setTimeout(function () {
93
+ (props === null || props === void 0 ? void 0 : props.onFilterValue) && (props === null || props === void 0 ? void 0 : props.onFilterValue(_objectSpread(_objectSpread({}, values), {}, {
94
+ mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
95
+ })));
96
+ }, 0);
97
+ case 6:
98
+ case "end":
99
+ return _context.stop();
100
+ }
101
+ }, _callee);
102
+ }));
103
+ return function handleModelList() {
104
+ return _ref.apply(this, arguments);
105
+ };
106
+ }();
107
+ useEffect(function () {
108
+ setSearchData({
109
+ mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
110
+ });
111
+ }, [currentMap]);
112
+ var _useState9 = useState(),
113
+ _useState10 = _slicedToArray(_useState9, 2),
114
+ treeData = _useState10[0],
115
+ setTreeData = _useState10[1];
116
+ var _useState11 = useState(),
117
+ _useState12 = _slicedToArray(_useState11, 2),
118
+ currentTree = _useState12[0],
119
+ setCurrentTree = _useState12[1];
120
+ useEffect(function () {
121
+ getTreeList();
122
+ }, []);
123
+ var getTreeList = function getTreeList() {
124
+ var searchJson = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : search;
125
+ setLoadingSearch(true);
126
+ request(apis.dataMap.getTreeList, {
127
+ method: 'post',
128
+ data: _objectSpread({
129
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
130
+ }, searchJson)
131
+ }).then(function (res) {
132
+ var _newArr$, _newArr$$children;
133
+ setLoadingSearch(false);
134
+ if (!res) return;
135
+ var newArr = [];
136
+ (res === null || res === void 0 ? void 0 : res.data) && Object.keys(res === null || res === void 0 ? void 0 : res.data).forEach(function (o, fatherIndex) {
137
+ var _res$data;
138
+ var obj = {
139
+ pageAttrName: o,
140
+ key: "".concat(o, "-").concat(fatherIndex),
141
+ children: (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data[o].map(function (v, index) {
142
+ return _objectSpread(_objectSpread({}, v), {}, {
143
+ key: "".concat(o, "-").concat(fatherIndex, "-").concat(index)
144
+ });
145
+ })
146
+ };
147
+ newArr.push(obj);
148
+ });
149
+ setTreeData(newArr);
150
+ setCurrentTree(newArr === null || newArr === void 0 ? void 0 : (_newArr$ = newArr[0]) === null || _newArr$ === void 0 ? void 0 : (_newArr$$children = _newArr$.children) === null || _newArr$$children === void 0 ? void 0 : _newArr$$children[0]);
151
+ });
152
+ };
153
+ useEffect(function () {
154
+ props.onChangeTree(_objectSpread(_objectSpread({}, currentTree), {}, {
155
+ mapId: currentMap === null || currentMap === void 0 ? void 0 : currentMap.id
156
+ }));
157
+ }, [currentTree]);
158
+ useEffect(function () {
159
+ (props === null || props === void 0 ? void 0 : props.onCurrentMap) && (props === null || props === void 0 ? void 0 : props.onCurrentMap(currentMap));
160
+ }, [currentMap]);
161
+ var onSelect = function onSelect(selectedKeys, info) {
162
+ var currentTreeData = info.node.children ? info.node.children[0] : info.node;
163
+ setCurrentTree(currentTreeData);
164
+ };
165
+ var treeHeight = function treeHeight() {
166
+ return filterMapListLabel.length > 0 ? 430 - 58 * (filterMapListLabel.length - 1) : 430;
167
+ };
168
+ return /*#__PURE__*/React.createElement("div", {
169
+ className: "".concat(pageClassName)
170
+ }, /*#__PURE__*/React.createElement("div", {
171
+ className: "".concat(pageClassName, "-top")
172
+ }, /*#__PURE__*/React.createElement(Form, {
173
+ name: "basic",
174
+ form: viewForm,
175
+ labelAlign: "left",
176
+ labelCol: {
177
+ span: 6
178
+ },
179
+ wrapperCol: {
180
+ span: 20
181
+ },
182
+ initialValues: {}
183
+ }, /*#__PURE__*/React.createElement(Form.Item, {
184
+ label: /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(BorderOuterOutlined, {
185
+ style: {
186
+ marginRight: '5px'
187
+ },
188
+ onPointerEnterCapture: undefined,
189
+ onPointerLeaveCapture: undefined
190
+ }), "\u57CB\u70B9\u5730\u56FE")
191
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
192
+ placeholder: "\u8BF7\u9009\u62E9\u5730\u56FE",
193
+ allowClear: true,
194
+ value: currentMap.id,
195
+ fieldNames: {
196
+ label: 'mapName',
197
+ value: 'id'
198
+ },
199
+ options: mapData,
200
+ onChange: handleMapSelect,
201
+ style: {
202
+ width: '70%'
203
+ }
204
+ }), /*#__PURE__*/React.createElement("span", {
205
+ className: "".concat(pageClassName, "_selectMap_setting"),
206
+ onClick: function onClick() {
207
+ return setMapViewFlg(true);
208
+ }
209
+ }, "\u5730\u56FE\u8BBE\u7F6E"))), filterMapListLabel.length > 0 && filterMapListLabel.map(function (o) {
210
+ var _o$inquire, _o$inquire2, _o$inquire3;
211
+ return /*#__PURE__*/React.createElement(Form.Item, {
212
+ key: o === null || o === void 0 ? void 0 : (_o$inquire = o.inquire) === null || _o$inquire === void 0 ? void 0 : _o$inquire.key,
213
+ label: o === null || o === void 0 ? void 0 : (_o$inquire2 = o.inquire) === null || _o$inquire2 === void 0 ? void 0 : _o$inquire2.label,
214
+ name: "attr".concat((_o$inquire3 = o.inquire) === null || _o$inquire3 === void 0 ? void 0 : _o$inquire3.index)
215
+ }, /*#__PURE__*/React.createElement(ValuesList, {
216
+ theme: "secondary",
217
+ attr: o.inquire,
218
+ operate: "equal"
219
+ }));
220
+ })), /*#__PURE__*/React.createElement("button", {
221
+ className: "".concat(pageClassName, "_searchBtn"),
222
+ onClick: handleModelList
223
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Divider, null)), /*#__PURE__*/React.createElement("div", {
224
+ className: "".concat(pageClassName, "-tree")
225
+ }, (treeData === null || treeData === void 0 ? void 0 : treeData.length) == 0 && !loadingSearch && /*#__PURE__*/React.createElement(Empty, {
226
+ style: {
227
+ margin: '70px 8px 0px'
228
+ }
229
+ }), loadingSearch ? (/*#__PURE__*/React.createElement("div", {
230
+ style: {
231
+ textAlign: 'center'
232
+ }
233
+ }, /*#__PURE__*/React.createElement(Spin, {
234
+ tip: "\u67E5\u8BE2\u4E2D"
235
+ }))) : (/*#__PURE__*/React.createElement(Tree, {
236
+ blockNode: true,
237
+ showLine: true,
238
+ switcherIcon: /*#__PURE__*/React.createElement(CaretDownOutlined, {
239
+ onPointerEnterCapture: undefined,
240
+ onPointerLeaveCapture: undefined
241
+ }),
242
+ autoExpandParent: true,
243
+ selectedKeys: [(currentTree === null || currentTree === void 0 ? void 0 : currentTree.key) || ''],
244
+ expandedKeys: [(currentTree === null || currentTree === void 0 ? void 0 : currentTree.key) || ''],
245
+ defaultExpandedKeys: [(currentTree === null || currentTree === void 0 ? void 0 : currentTree.key) || ''],
246
+ onSelect: onSelect,
247
+ fieldNames: {
248
+ title: 'pageAttrName'
249
+ },
250
+ treeData: treeData,
251
+ rootClassName: "ziBackground",
252
+ height: treeHeight()
253
+ }))));
254
+ };
255
+ export default LeftTree;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { mapDataType, mapFilterType } from '../../CutsModal';
3
+ declare const RightDetail: React.FC<{
4
+ currentTreeData: any;
5
+ currentMap?: mapDataType;
6
+ filterValue?: mapFilterType;
7
+ }>;
8
+ export default RightDetail;