@zgfe/business-lib 1.1.27 → 1.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/addToPanel/components/addPanel.js +8 -21
- package/es/addToPanel/components/radioGroup.js +1 -3
- package/es/addToPanel/components/styleList.js +5 -22
- package/es/addToPanel/demo/edit.js +5 -12
- package/es/addToPanel/demo/index.js +5 -12
- package/es/addToPanel/index.js +21 -58
- package/es/addToScene/addGroup.js +0 -4
- package/es/addToScene/demo/index.js +5 -12
- package/es/addToScene/index.js +13 -40
- package/es/assets/demo/index.js +0 -2
- package/es/assets/demo/input.js +5 -12
- package/es/assets/iconfont/iconfont.js +10 -17
- package/es/assets/theme.js +0 -1
- package/es/attrConditions/components/operateList.js +10 -27
- package/es/attrConditions/components/stringList.js +69 -98
- package/es/attrConditions/components/valuesList.js +14 -40
- package/es/attrConditions/demo/group.js +11 -23
- package/es/attrConditions/demo/index.js +17 -26
- package/es/attrConditions/group.js +17 -48
- package/es/attrConditions/index.js +22 -49
- package/es/attrConditions/types.js +0 -1
- package/es/attributeSelector/demo/disable.js +8 -16
- package/es/attributeSelector/demo/index.js +8 -17
- package/es/attributeSelector/index.js +22 -45
- package/es/attributeSelector/listPanel.js +18 -46
- package/es/attributeSelector/option.js +3 -13
- package/es/attributeSelector/types.js +0 -5
- package/es/attributeSelector/util.js +0 -3
- package/es/chart/demo/index.js +5 -14
- package/es/chart/index.js +30 -44
- package/es/chart/util/chartOptionConfig.d.ts +3 -3
- package/es/chart/util/chartOptionConfig.js +13 -37
- package/es/chart/util/data/china.js +1 -4
- package/es/chart/util/formatData.d.ts +2 -2
- package/es/chart/util/formatData.js +0 -5
- package/es/chart/util/formatOption.js +0 -13
- package/es/chart/util/mapUtil.js +5 -26
- package/es/config.js +0 -2
- package/es/cycleTime/demo/disable.js +0 -1
- package/es/cycleTime/index.js +19 -46
- package/es/cycleTime/month.js +8 -27
- package/es/datePicker/datePicker.js +5 -23
- package/es/datePicker/demo/customType.js +13 -22
- package/es/datePicker/demo/day.js +13 -22
- package/es/datePicker/demo/index.js +12 -21
- package/es/datePicker/index.js +18 -41
- package/es/datePicker/utils.js +0 -7
- package/es/demoWrapper/content.js +31 -56
- package/es/demoWrapper/head.js +9 -23
- package/es/demoWrapper/index.js +14 -30
- package/es/dialog/demo/index.js +5 -12
- package/es/dialog/index.js +4 -6
- package/es/dnd/demo/data.js +19 -28
- package/es/dnd/demo/handle.js +19 -28
- package/es/dnd/index.js +21 -45
- package/es/dnd/item.js +10 -30
- package/es/eventSelector/demo/index.js +12 -23
- package/es/eventSelector/index.js +14 -42
- package/es/eventSelector/listPanel.js +27 -61
- package/es/eventSelector/option.js +6 -11
- package/es/icon/iconFont.js +7 -13
- package/es/layout/analysisLayout/demo/index.js +0 -6
- package/es/layout/analysisLayout/index.d.ts +1 -1
- package/es/layout/analysisLayout/index.js +16 -34
- package/es/layout/detail/index.js +1 -3
- package/es/loginForm/index.js +7 -18
- package/es/searchInput/index.js +2 -7
- package/es/select/demo/children.js +8 -16
- package/es/select/demo/customLabel.js +0 -2
- package/es/select/demo/group.js +8 -17
- package/es/select/demo/index.js +11 -19
- package/es/select/demo/loading.js +8 -18
- package/es/select/demo/multiple.js +8 -16
- package/es/select/handle.js +14 -34
- package/es/select/index.js +22 -59
- package/es/select/option.js +10 -30
- package/es/select/overlay.js +25 -62
- package/es/table/demo/data/table.js +0 -2
- package/es/table/demo/index.js +13 -39
- package/es/table/demo/index2.js +5 -15
- package/es/table/demo/index3.js +7 -28
- package/es/table/index.js +14 -33
- package/es/targetConditionGroup/components/targetDimension.js +12 -38
- package/es/targetConditionGroup/demo/group.js +21 -36
- package/es/targetConditionGroup/demo/index.js +5 -13
- package/es/targetConditionGroup/index.js +31 -84
- package/es/targetSelector/demo/index.js +15 -28
- package/es/targetSelector/editBox.js +5 -20
- package/es/targetSelector/index.js +15 -36
- package/es/targetSelector/optionIcon.js +1 -5
- package/es/targetSelector/optionMenu.js +0 -3
- package/es/userCondition/conditionTypeList.js +7 -12
- package/es/userCondition/conditionWrap.js +0 -2
- package/es/userCondition/conditions/cdpCondition.js +51 -97
- package/es/userCondition/conditions/eventCondition.js +6 -16
- package/es/userCondition/conditions/periodCondition.js +8 -26
- package/es/userCondition/conditions/propCondition.js +29 -61
- package/es/userCondition/conditions/runTimesCondition.js +5 -10
- package/es/userCondition/conditions/tagsCondition.d.ts +1 -1
- package/es/userCondition/conditions/tagsCondition.js +15 -33
- package/es/userCondition/conditions/textDesc.js +16 -67
- package/es/userCondition/demo/index.js +11 -21
- package/es/userCondition/index.js +51 -91
- package/es/userCondition/orConditions.js +11 -48
- package/es/userCondition/relationLabel.js +1 -4
- package/es/userCondition/types.d.ts +1 -1
- package/es/userCondition/types.js +0 -1
- package/es/userCondition/util.js +4 -13
- package/es/userGroup/demo/group.js +14 -23
- package/es/userGroup/demo/index.js +5 -15
- package/es/userGroup/index.js +12 -30
- package/es/userTagsSelector/cascaderOverlay.js +19 -51
- package/es/userTagsSelector/components/search/index.js +0 -2
- package/es/userTagsSelector/demo/index.js +0 -3
- package/es/userTagsSelector/groups/groupOption.js +6 -8
- package/es/userTagsSelector/groups/index.js +15 -30
- package/es/userTagsSelector/index.js +17 -35
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +3 -6
- package/es/userTagsSelector/multipleCheckPanel/index.js +8 -21
- package/es/userTagsSelector/util.js +0 -2
- package/es/utils/ajax.js +45 -71
- package/es/utils/base64.js +3 -22
- package/es/utils/type.d.ts +1 -1
- package/es/utils/type.js +4 -7
- package/es/utils/util.js +0 -16
- package/package.json +2 -2
|
@@ -1,19 +1,13 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
1
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
|
-
|
|
3
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
|
-
|
|
5
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
|
|
7
6
|
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."); }
|
|
8
|
-
|
|
9
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
-
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
15
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
|
|
17
11
|
import React, { useContext, useEffect, useState } from 'react';
|
|
18
12
|
import { classPrefix } from '..';
|
|
19
13
|
import Apis from '../../constants/apis';
|
|
@@ -21,38 +15,30 @@ import BizGlobalDataContext from '../../context';
|
|
|
21
15
|
import BizSelect from '../../select';
|
|
22
16
|
import request from '../../utils/ajax';
|
|
23
17
|
import { OperateTypes } from '../types';
|
|
24
|
-
|
|
25
18
|
var StringList = function StringList(props) {
|
|
26
19
|
var _props$attr;
|
|
27
|
-
|
|
28
20
|
var _useContext = useContext(BizGlobalDataContext),
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
currentApp = _useContext.currentApp;
|
|
31
22
|
var _useState = useState(),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
current = _useState2[0],
|
|
25
|
+
setCurrent = _useState2[1];
|
|
36
26
|
var _useState3 = useState(),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
28
|
+
options = _useState4[0],
|
|
29
|
+
setOptions = _useState4[1];
|
|
41
30
|
var _useState5 = useState(true),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
32
|
+
isFirst = _useState6[0],
|
|
33
|
+
setIsFirst = _useState6[1];
|
|
46
34
|
var _useState7 = useState(''),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
36
|
+
searchValue = _useState8[0],
|
|
37
|
+
setSearchValue = _useState8[1];
|
|
51
38
|
var _useState9 = useState(0),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
39
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
40
|
+
timer = _useState10[0],
|
|
41
|
+
setTimer = _useState10[1];
|
|
56
42
|
useEffect(function () {
|
|
57
43
|
if (props.value) {
|
|
58
44
|
var data = props.value.map(function (item) {
|
|
@@ -68,7 +54,6 @@ var StringList = function StringList(props) {
|
|
|
68
54
|
}, [props.value]);
|
|
69
55
|
useEffect(function () {
|
|
70
56
|
fetchValues();
|
|
71
|
-
|
|
72
57
|
if (isFirst) {
|
|
73
58
|
setIsFirst(false);
|
|
74
59
|
} else {
|
|
@@ -84,82 +69,70 @@ var StringList = function StringList(props) {
|
|
|
84
69
|
useEffect(function () {
|
|
85
70
|
fetchValues();
|
|
86
71
|
}, [searchValue]);
|
|
87
|
-
|
|
88
72
|
var fetchValues = /*#__PURE__*/function () {
|
|
89
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
73
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
90
74
|
var fetch;
|
|
91
|
-
return
|
|
92
|
-
while (1) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
arr.push("".concat(key, "=").concat(encodeURIComponent(params[key])));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return arr.join('&');
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
var formData = transformRequest(requestData);
|
|
117
|
-
request(Apis.esQuery, {
|
|
118
|
-
method: 'post',
|
|
119
|
-
data: formData,
|
|
120
|
-
headers: {
|
|
121
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
122
|
-
}
|
|
123
|
-
}).then(function (result) {
|
|
124
|
-
setOptions(function () {
|
|
125
|
-
return result && result.sources ? result.sources.map(function (item) {
|
|
126
|
-
return {
|
|
127
|
-
name: item,
|
|
128
|
-
value: item
|
|
129
|
-
};
|
|
130
|
-
}) : [];
|
|
131
|
-
});
|
|
132
|
-
}).catch(function (e) {
|
|
133
|
-
console.error(e);
|
|
134
|
-
setOptions([]);
|
|
135
|
-
});
|
|
75
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
76
|
+
while (1) switch (_context.prev = _context.next) {
|
|
77
|
+
case 0:
|
|
78
|
+
fetch = function fetch() {
|
|
79
|
+
var attrData = props.attr;
|
|
80
|
+
var requestData = {
|
|
81
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
82
|
+
platform: currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform,
|
|
83
|
+
limit: 20,
|
|
84
|
+
attr: (attrData === null || attrData === void 0 ? void 0 : attrData.id) || 0,
|
|
85
|
+
dimension_sub: attrData === null || attrData === void 0 ? void 0 : attrData.dimensionSub,
|
|
86
|
+
v: searchValue || ''
|
|
87
|
+
};
|
|
88
|
+
var transformRequest = function transformRequest(params) {
|
|
89
|
+
var arr = [];
|
|
90
|
+
for (var key in params) {
|
|
91
|
+
arr.push("".concat(key, "=").concat(encodeURIComponent(params[key])));
|
|
92
|
+
}
|
|
93
|
+
return arr.join('&');
|
|
136
94
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
95
|
+
var formData = transformRequest(requestData);
|
|
96
|
+
request(Apis.esQuery, {
|
|
97
|
+
method: 'post',
|
|
98
|
+
data: formData,
|
|
99
|
+
headers: {
|
|
100
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
101
|
+
}
|
|
102
|
+
}).then(function (result) {
|
|
103
|
+
setOptions(function () {
|
|
104
|
+
return result && result.sources ? result.sources.map(function (item) {
|
|
105
|
+
return {
|
|
106
|
+
name: item,
|
|
107
|
+
value: item
|
|
108
|
+
};
|
|
109
|
+
}) : [];
|
|
110
|
+
});
|
|
111
|
+
}).catch(function (e) {
|
|
112
|
+
console.error(e);
|
|
113
|
+
setOptions([]);
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
if (timer) clearTimeout(timer);
|
|
117
|
+
setTimer(setTimeout(function () {
|
|
118
|
+
fetch();
|
|
119
|
+
}, 400));
|
|
120
|
+
case 3:
|
|
121
|
+
case "end":
|
|
122
|
+
return _context.stop();
|
|
147
123
|
}
|
|
148
124
|
}, _callee);
|
|
149
125
|
}));
|
|
150
|
-
|
|
151
126
|
return function fetchValues() {
|
|
152
127
|
return _ref.apply(this, arguments);
|
|
153
128
|
};
|
|
154
129
|
}();
|
|
155
|
-
|
|
156
130
|
var onChange = function onChange(data) {
|
|
157
131
|
var resData = data.map(function (item) {
|
|
158
132
|
return item.value;
|
|
159
133
|
});
|
|
160
134
|
if (props.onChange) props.onChange(resData);
|
|
161
135
|
};
|
|
162
|
-
|
|
163
136
|
if (!current || !options) {
|
|
164
137
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
165
138
|
multiple: true,
|
|
@@ -171,12 +144,11 @@ var StringList = function StringList(props) {
|
|
|
171
144
|
disable: true
|
|
172
145
|
});
|
|
173
146
|
}
|
|
174
|
-
|
|
175
147
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
176
148
|
className: "".concat(classPrefix, "-multi-select"),
|
|
177
149
|
value: current,
|
|
178
150
|
multiple: true,
|
|
179
|
-
enableCreate:
|
|
151
|
+
enableCreate: true,
|
|
180
152
|
theme: props.theme,
|
|
181
153
|
size: "middle",
|
|
182
154
|
disable: props.operate === OperateTypes.IsNull || props.operate === OperateTypes.IsNotNull,
|
|
@@ -187,5 +159,4 @@ var StringList = function StringList(props) {
|
|
|
187
159
|
onSearch: setSearchValue
|
|
188
160
|
});
|
|
189
161
|
};
|
|
190
|
-
|
|
191
162
|
export default StringList;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
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."); }
|
|
4
|
-
|
|
5
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import { DatePicker, Input } from 'antd';
|
|
14
8
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
15
9
|
import moment from 'moment';
|
|
@@ -22,29 +16,24 @@ import { OperateTypes } from '../types';
|
|
|
22
16
|
import { propSubtype } from '../utils/operates';
|
|
23
17
|
import StringList from './stringList';
|
|
24
18
|
var RangePicker = DatePicker.RangePicker;
|
|
25
|
-
|
|
26
19
|
var ValuesList = function ValuesList(props) {
|
|
27
20
|
var attr = props.attr,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
defaultValue = props.defaultValue,
|
|
22
|
+
operate = props.operate,
|
|
23
|
+
theme = props.theme;
|
|
31
24
|
var initValue = [moment().subtract(1, 'weeks').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')];
|
|
32
|
-
|
|
33
25
|
var _useState = useState(),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
current = _useState2[0],
|
|
28
|
+
setCurrent = _useState2[1];
|
|
38
29
|
var _useState3 = useState('1'),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
+
unit = _useState4[0],
|
|
32
|
+
setUnit = _useState4[1];
|
|
43
33
|
var _useState5 = useState(true),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
+
isFirst = _useState6[0],
|
|
36
|
+
setIsFirst = _useState6[1];
|
|
48
37
|
useEffect(function () {
|
|
49
38
|
if (defaultValue) {
|
|
50
39
|
if ((attr === null || attr === void 0 ? void 0 : attr.propCategory) === 'userProp' && (attr === null || attr === void 0 ? void 0 : attr.subtype) === 2) {
|
|
@@ -54,12 +43,10 @@ var ValuesList = function ValuesList(props) {
|
|
|
54
43
|
setCurrent(defaultValue);
|
|
55
44
|
}
|
|
56
45
|
}
|
|
57
|
-
|
|
58
46
|
setIsFirst(false);
|
|
59
47
|
}, []);
|
|
60
48
|
useEffect(function () {
|
|
61
49
|
if (isFirst) return;
|
|
62
|
-
|
|
63
50
|
if (operate === OperateTypes.Absolute || operate === OperateTypes.Relative) {
|
|
64
51
|
var data = operate === OperateTypes.Absolute ? initValue : ['30', '1'];
|
|
65
52
|
onChange(data);
|
|
@@ -71,24 +58,19 @@ var ValuesList = function ValuesList(props) {
|
|
|
71
58
|
setCurrent([]);
|
|
72
59
|
}
|
|
73
60
|
}, [attr]);
|
|
74
|
-
|
|
75
61
|
var onChange = function onChange(data) {
|
|
76
62
|
setCurrent(data);
|
|
77
63
|
if (props.onChange) props.onChange(data);
|
|
78
64
|
};
|
|
79
|
-
|
|
80
65
|
var onChangeRange = function onChangeRange() {
|
|
81
66
|
onChange(arguments.length <= 1 ? undefined : arguments[1]);
|
|
82
67
|
};
|
|
83
|
-
|
|
84
68
|
var onChangeDate = function onChangeDate(e) {
|
|
85
69
|
var data = [e.target.value, '1'];
|
|
86
70
|
onChange(data);
|
|
87
71
|
};
|
|
88
|
-
|
|
89
72
|
var onChangeNumber = function onChangeNumber(e) {
|
|
90
73
|
var data = [e.target.value];
|
|
91
|
-
|
|
92
74
|
if ((attr === null || attr === void 0 ? void 0 : attr.propCategory) === PropCategory.UserProp && (attr === null || attr === void 0 ? void 0 : attr.subtype) === 2) {
|
|
93
75
|
var num = String(parseFloat(e.target.value) * getUnitCount(unit));
|
|
94
76
|
data = [num, unit];
|
|
@@ -96,27 +78,21 @@ var ValuesList = function ValuesList(props) {
|
|
|
96
78
|
} else {
|
|
97
79
|
setCurrent(data);
|
|
98
80
|
}
|
|
99
|
-
|
|
100
81
|
if (props.onChange) props.onChange(data);
|
|
101
82
|
};
|
|
102
|
-
|
|
103
83
|
var onChangeUnit = function onChangeUnit(data) {
|
|
104
84
|
setUnit(data.value);
|
|
105
|
-
|
|
106
85
|
if (current && current[0]) {
|
|
107
86
|
var num = String(parseFloat(current[0]) * getUnitCount(data.value));
|
|
108
87
|
if (props.onChange) props.onChange([num, data.value]);
|
|
109
88
|
}
|
|
110
89
|
};
|
|
111
|
-
|
|
112
90
|
var getUnitCount = function getUnitCount(value) {
|
|
113
91
|
return value === '1' ? 3600 : value === '2' ? 60 : 1;
|
|
114
92
|
};
|
|
115
|
-
|
|
116
93
|
var disabledDate = function disabledDate(current) {
|
|
117
94
|
return current && current > moment().endOf('day');
|
|
118
95
|
};
|
|
119
|
-
|
|
120
96
|
if (!attr || !operate || isFirst) {
|
|
121
97
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
122
98
|
disable: true,
|
|
@@ -126,7 +102,6 @@ var ValuesList = function ValuesList(props) {
|
|
|
126
102
|
options: []
|
|
127
103
|
});
|
|
128
104
|
}
|
|
129
|
-
|
|
130
105
|
if (attr.type === PropType.STRING) {
|
|
131
106
|
return /*#__PURE__*/React.createElement(StringList, {
|
|
132
107
|
theme: theme,
|
|
@@ -188,5 +163,4 @@ var ValuesList = function ValuesList(props) {
|
|
|
188
163
|
}
|
|
189
164
|
}
|
|
190
165
|
};
|
|
191
|
-
|
|
192
166
|
export default ValuesList;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
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."); }
|
|
4
|
-
|
|
5
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import React, { useRef, useState } from 'react';
|
|
14
8
|
import { BizConditionGroup, DemoWrapper } from '@zgfe/business-lib';
|
|
15
9
|
import { Button } from 'antd';
|
|
@@ -31,35 +25,29 @@ var conditions = [{
|
|
|
31
25
|
}];
|
|
32
26
|
export default (function () {
|
|
33
27
|
var _useState = useState({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
relation: 'and',
|
|
29
|
+
conditions: conditions
|
|
30
|
+
}),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
data = _useState2[0],
|
|
33
|
+
setData = _useState2[1];
|
|
41
34
|
var _useState3 = useState(conditions.length),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
+
count = _useState4[0],
|
|
37
|
+
setCount = _useState4[1];
|
|
46
38
|
var conditionRef = useRef(null);
|
|
47
|
-
|
|
48
39
|
var onChange = function onChange(value) {
|
|
49
40
|
setData(value);
|
|
50
41
|
};
|
|
51
|
-
|
|
52
42
|
var onClick = function onClick() {
|
|
53
43
|
conditionRef.current.add();
|
|
54
44
|
};
|
|
55
|
-
|
|
56
45
|
var onClear = function onClear() {
|
|
57
46
|
conditionRef.current.setValue();
|
|
58
47
|
setData({
|
|
59
48
|
conditions: []
|
|
60
49
|
});
|
|
61
50
|
};
|
|
62
|
-
|
|
63
51
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
64
52
|
needMeta: true
|
|
65
53
|
}, /*#__PURE__*/React.createElement(BizConditionGroup, {
|
|
@@ -1,42 +1,33 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
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."); }
|
|
4
|
-
|
|
5
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import React, { useState } from 'react';
|
|
14
8
|
import { BizConditionItem, DemoWrapper } from '@zgfe/business-lib';
|
|
15
9
|
import { Form } from 'antd';
|
|
16
10
|
export default (function () {
|
|
17
11
|
var _Form$useForm = Form.useForm(),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13
|
+
form = _Form$useForm2[0];
|
|
21
14
|
var _useState = useState({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
15
|
+
condition: {
|
|
16
|
+
attrId: 30183426,
|
|
17
|
+
propCategory: 'eventProp',
|
|
18
|
+
type: 1,
|
|
19
|
+
operator: 'equal',
|
|
20
|
+
values: [],
|
|
21
|
+
dimensionSub: 'event_attr',
|
|
22
|
+
attrName: '公众号名称'
|
|
23
|
+
}
|
|
24
|
+
}),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
formData = _useState2[0],
|
|
27
|
+
setFormData = _useState2[1];
|
|
36
28
|
var onChange = function onChange() {
|
|
37
29
|
setFormData(arguments.length <= 1 ? undefined : arguments[1]);
|
|
38
30
|
};
|
|
39
|
-
|
|
40
31
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
41
32
|
needMeta: true
|
|
42
33
|
}, /*#__PURE__*/React.createElement(Form, {
|