@kmkf-fe-packages/basic-components 1.5.0 → 1.6.0-beta.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.
- package/dist/index.esm.js +660 -281
- package/dist/index.js +657 -277
- package/dist/src/apaas/ApaasInput/index.d.ts +1 -0
- package/dist/src/apaas/SubForm/index.d.ts +29 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8,9 +8,9 @@ var icons = require('@ant-design/icons');
|
|
|
8
8
|
var request = require('umi-request');
|
|
9
9
|
var reactCopyToClipboard = require('react-copy-to-clipboard');
|
|
10
10
|
var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
|
|
11
|
-
var zhCN = require('antd/lib/locale/zh_CN');
|
|
12
11
|
var lodash = require('lodash');
|
|
13
12
|
var ahooks = require('ahooks');
|
|
13
|
+
var zhCN = require('antd/lib/locale/zh_CN');
|
|
14
14
|
var pubsub = require('pubsub-js');
|
|
15
15
|
var BigNumber = require('bignumber.js');
|
|
16
16
|
|
|
@@ -22,377 +22,363 @@ var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
|
|
|
22
22
|
var pubsub__default = /*#__PURE__*/_interopDefaultLegacy(pubsub);
|
|
23
23
|
var BigNumber__default = /*#__PURE__*/_interopDefaultLegacy(BigNumber);
|
|
24
24
|
|
|
25
|
-
function _iterableToArrayLimit(
|
|
26
|
-
var
|
|
27
|
-
if (null !=
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
function _iterableToArrayLimit(arr, i) {
|
|
26
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
27
|
+
if (null != _i) {
|
|
28
|
+
var _s,
|
|
29
|
+
_e,
|
|
30
|
+
_x,
|
|
31
|
+
_r,
|
|
32
|
+
_arr = [],
|
|
33
|
+
_n = !0,
|
|
34
|
+
_d = !1;
|
|
35
35
|
try {
|
|
36
|
-
if (
|
|
37
|
-
if (Object(
|
|
38
|
-
|
|
39
|
-
} else for (; !(
|
|
40
|
-
} catch (
|
|
41
|
-
|
|
36
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
37
|
+
if (Object(_i) !== _i) return;
|
|
38
|
+
_n = !1;
|
|
39
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
40
|
+
} catch (err) {
|
|
41
|
+
_d = !0, _e = err;
|
|
42
42
|
} finally {
|
|
43
43
|
try {
|
|
44
|
-
if (!
|
|
44
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
45
45
|
} finally {
|
|
46
|
-
if (
|
|
46
|
+
if (_d) throw _e;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
return
|
|
49
|
+
return _arr;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function ownKeys(
|
|
53
|
-
var
|
|
52
|
+
function ownKeys(object, enumerableOnly) {
|
|
53
|
+
var keys = Object.keys(object);
|
|
54
54
|
if (Object.getOwnPropertySymbols) {
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
return Object.getOwnPropertyDescriptor(
|
|
58
|
-
})),
|
|
55
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
56
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
58
|
+
})), keys.push.apply(keys, symbols);
|
|
59
59
|
}
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
function _objectSpread2(
|
|
63
|
-
for (var
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
_defineProperty(
|
|
67
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
68
|
-
Object.defineProperty(
|
|
60
|
+
return keys;
|
|
61
|
+
}
|
|
62
|
+
function _objectSpread2(target) {
|
|
63
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
64
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
65
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
66
|
+
_defineProperty(target, key, source[key]);
|
|
67
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
68
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return target;
|
|
72
72
|
}
|
|
73
73
|
function _regeneratorRuntime() {
|
|
74
74
|
_regeneratorRuntime = function () {
|
|
75
|
-
return
|
|
76
|
-
};
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
t[e] = r.value;
|
|
75
|
+
return exports;
|
|
76
|
+
};
|
|
77
|
+
var exports = {},
|
|
78
|
+
Op = Object.prototype,
|
|
79
|
+
hasOwn = Op.hasOwnProperty,
|
|
80
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
81
|
+
obj[key] = desc.value;
|
|
83
82
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
function define(
|
|
89
|
-
return Object.defineProperty(
|
|
90
|
-
value:
|
|
83
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
84
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
85
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
86
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
87
|
+
function define(obj, key, value) {
|
|
88
|
+
return Object.defineProperty(obj, key, {
|
|
89
|
+
value: value,
|
|
91
90
|
enumerable: !0,
|
|
92
91
|
configurable: !0,
|
|
93
92
|
writable: !0
|
|
94
|
-
}),
|
|
93
|
+
}), obj[key];
|
|
95
94
|
}
|
|
96
95
|
try {
|
|
97
96
|
define({}, "");
|
|
98
|
-
} catch (
|
|
99
|
-
define = function (
|
|
100
|
-
return
|
|
97
|
+
} catch (err) {
|
|
98
|
+
define = function (obj, key, value) {
|
|
99
|
+
return obj[key] = value;
|
|
101
100
|
};
|
|
102
101
|
}
|
|
103
|
-
function wrap(
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return
|
|
108
|
-
value: makeInvokeMethod(
|
|
109
|
-
}),
|
|
102
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
103
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
104
|
+
generator = Object.create(protoGenerator.prototype),
|
|
105
|
+
context = new Context(tryLocsList || []);
|
|
106
|
+
return defineProperty(generator, "_invoke", {
|
|
107
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
108
|
+
}), generator;
|
|
110
109
|
}
|
|
111
|
-
function tryCatch(
|
|
110
|
+
function tryCatch(fn, obj, arg) {
|
|
112
111
|
try {
|
|
113
112
|
return {
|
|
114
113
|
type: "normal",
|
|
115
|
-
arg:
|
|
114
|
+
arg: fn.call(obj, arg)
|
|
116
115
|
};
|
|
117
|
-
} catch (
|
|
116
|
+
} catch (err) {
|
|
118
117
|
return {
|
|
119
118
|
type: "throw",
|
|
120
|
-
arg:
|
|
119
|
+
arg: err
|
|
121
120
|
};
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
|
-
|
|
125
|
-
var
|
|
126
|
-
l = "suspendedYield",
|
|
127
|
-
f = "executing",
|
|
128
|
-
s = "completed",
|
|
129
|
-
y = {};
|
|
123
|
+
exports.wrap = wrap;
|
|
124
|
+
var ContinueSentinel = {};
|
|
130
125
|
function Generator() {}
|
|
131
126
|
function GeneratorFunction() {}
|
|
132
127
|
function GeneratorFunctionPrototype() {}
|
|
133
|
-
var
|
|
134
|
-
define(
|
|
128
|
+
var IteratorPrototype = {};
|
|
129
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
135
130
|
return this;
|
|
136
131
|
});
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
var
|
|
141
|
-
function defineIteratorMethods(
|
|
142
|
-
["next", "throw", "return"].forEach(function (
|
|
143
|
-
define(
|
|
144
|
-
return this._invoke(
|
|
132
|
+
var getProto = Object.getPrototypeOf,
|
|
133
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
134
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
135
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
136
|
+
function defineIteratorMethods(prototype) {
|
|
137
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
138
|
+
define(prototype, method, function (arg) {
|
|
139
|
+
return this._invoke(method, arg);
|
|
145
140
|
});
|
|
146
141
|
});
|
|
147
142
|
}
|
|
148
|
-
function AsyncIterator(
|
|
149
|
-
function invoke(
|
|
150
|
-
var
|
|
151
|
-
if ("throw" !==
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
return
|
|
155
|
-
invoke("next",
|
|
156
|
-
}, function (
|
|
157
|
-
invoke("throw",
|
|
158
|
-
}) :
|
|
159
|
-
|
|
160
|
-
}, function (
|
|
161
|
-
return invoke("throw",
|
|
143
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
144
|
+
function invoke(method, arg, resolve, reject) {
|
|
145
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
146
|
+
if ("throw" !== record.type) {
|
|
147
|
+
var result = record.arg,
|
|
148
|
+
value = result.value;
|
|
149
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
150
|
+
invoke("next", value, resolve, reject);
|
|
151
|
+
}, function (err) {
|
|
152
|
+
invoke("throw", err, resolve, reject);
|
|
153
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
154
|
+
result.value = unwrapped, resolve(result);
|
|
155
|
+
}, function (error) {
|
|
156
|
+
return invoke("throw", error, resolve, reject);
|
|
162
157
|
});
|
|
163
158
|
}
|
|
164
|
-
|
|
159
|
+
reject(record.arg);
|
|
165
160
|
}
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
value: function (
|
|
161
|
+
var previousPromise;
|
|
162
|
+
defineProperty(this, "_invoke", {
|
|
163
|
+
value: function (method, arg) {
|
|
169
164
|
function callInvokeWithMethodAndArg() {
|
|
170
|
-
return new
|
|
171
|
-
invoke(
|
|
165
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
166
|
+
invoke(method, arg, resolve, reject);
|
|
172
167
|
});
|
|
173
168
|
}
|
|
174
|
-
return
|
|
169
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
175
170
|
}
|
|
176
171
|
});
|
|
177
172
|
}
|
|
178
|
-
function makeInvokeMethod(
|
|
179
|
-
var
|
|
180
|
-
return function (
|
|
181
|
-
if (
|
|
182
|
-
if (
|
|
183
|
-
if ("throw" ===
|
|
184
|
-
return
|
|
185
|
-
value: t,
|
|
186
|
-
done: !0
|
|
187
|
-
};
|
|
173
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
174
|
+
var state = "suspendedStart";
|
|
175
|
+
return function (method, arg) {
|
|
176
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
177
|
+
if ("completed" === state) {
|
|
178
|
+
if ("throw" === method) throw arg;
|
|
179
|
+
return doneResult();
|
|
188
180
|
}
|
|
189
|
-
for (
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
var
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
return
|
|
181
|
+
for (context.method = method, context.arg = arg;;) {
|
|
182
|
+
var delegate = context.delegate;
|
|
183
|
+
if (delegate) {
|
|
184
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
185
|
+
if (delegateResult) {
|
|
186
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
187
|
+
return delegateResult;
|
|
196
188
|
}
|
|
197
189
|
}
|
|
198
|
-
if ("next" ===
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
} else "return" ===
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
if ("normal" ===
|
|
205
|
-
if (
|
|
190
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
191
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
192
|
+
context.dispatchException(context.arg);
|
|
193
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
194
|
+
state = "executing";
|
|
195
|
+
var record = tryCatch(innerFn, self, context);
|
|
196
|
+
if ("normal" === record.type) {
|
|
197
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
206
198
|
return {
|
|
207
|
-
value:
|
|
208
|
-
done:
|
|
199
|
+
value: record.arg,
|
|
200
|
+
done: context.done
|
|
209
201
|
};
|
|
210
202
|
}
|
|
211
|
-
"throw" ===
|
|
203
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
212
204
|
}
|
|
213
205
|
};
|
|
214
206
|
}
|
|
215
|
-
function maybeInvokeDelegate(
|
|
216
|
-
var
|
|
217
|
-
|
|
218
|
-
if (
|
|
219
|
-
var
|
|
220
|
-
if ("throw" ===
|
|
221
|
-
var
|
|
222
|
-
return
|
|
207
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
208
|
+
var methodName = context.method,
|
|
209
|
+
method = delegate.iterator[methodName];
|
|
210
|
+
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;
|
|
211
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
212
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
213
|
+
var info = record.arg;
|
|
214
|
+
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);
|
|
223
215
|
}
|
|
224
|
-
function pushTryEntry(
|
|
225
|
-
var
|
|
226
|
-
tryLoc:
|
|
216
|
+
function pushTryEntry(locs) {
|
|
217
|
+
var entry = {
|
|
218
|
+
tryLoc: locs[0]
|
|
227
219
|
};
|
|
228
|
-
1 in
|
|
220
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
229
221
|
}
|
|
230
|
-
function resetTryEntry(
|
|
231
|
-
var
|
|
232
|
-
|
|
222
|
+
function resetTryEntry(entry) {
|
|
223
|
+
var record = entry.completion || {};
|
|
224
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
233
225
|
}
|
|
234
|
-
function Context(
|
|
226
|
+
function Context(tryLocsList) {
|
|
235
227
|
this.tryEntries = [{
|
|
236
228
|
tryLoc: "root"
|
|
237
|
-
}],
|
|
229
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
238
230
|
}
|
|
239
|
-
function values(
|
|
240
|
-
if (
|
|
241
|
-
var
|
|
242
|
-
if (
|
|
243
|
-
if ("function" == typeof
|
|
244
|
-
if (!isNaN(
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
for (; ++
|
|
248
|
-
return next.value =
|
|
231
|
+
function values(iterable) {
|
|
232
|
+
if (iterable) {
|
|
233
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
234
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
235
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
236
|
+
if (!isNaN(iterable.length)) {
|
|
237
|
+
var i = -1,
|
|
238
|
+
next = function next() {
|
|
239
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
240
|
+
return next.value = undefined, next.done = !0, next;
|
|
249
241
|
};
|
|
250
|
-
return
|
|
242
|
+
return next.next = next;
|
|
251
243
|
}
|
|
252
244
|
}
|
|
253
|
-
|
|
245
|
+
return {
|
|
246
|
+
next: doneResult
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function doneResult() {
|
|
250
|
+
return {
|
|
251
|
+
value: undefined,
|
|
252
|
+
done: !0
|
|
253
|
+
};
|
|
254
254
|
}
|
|
255
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
255
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
256
256
|
value: GeneratorFunctionPrototype,
|
|
257
257
|
configurable: !0
|
|
258
|
-
}),
|
|
258
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
259
259
|
value: GeneratorFunction,
|
|
260
260
|
configurable: !0
|
|
261
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
262
|
-
var
|
|
263
|
-
return !!
|
|
264
|
-
},
|
|
265
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
266
|
-
},
|
|
261
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
262
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
263
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
264
|
+
}, exports.mark = function (genFun) {
|
|
265
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
266
|
+
}, exports.awrap = function (arg) {
|
|
267
267
|
return {
|
|
268
|
-
__await:
|
|
268
|
+
__await: arg
|
|
269
269
|
};
|
|
270
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
270
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
271
271
|
return this;
|
|
272
|
-
}),
|
|
273
|
-
void 0 ===
|
|
274
|
-
var
|
|
275
|
-
return
|
|
276
|
-
return
|
|
272
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
273
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
274
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
275
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
276
|
+
return result.done ? result.value : iter.next();
|
|
277
277
|
});
|
|
278
|
-
}, defineIteratorMethods(
|
|
278
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
279
279
|
return this;
|
|
280
|
-
}), define(
|
|
280
|
+
}), define(Gp, "toString", function () {
|
|
281
281
|
return "[object Generator]";
|
|
282
|
-
}),
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
for (var
|
|
286
|
-
return
|
|
287
|
-
for (;
|
|
288
|
-
var
|
|
289
|
-
if (
|
|
282
|
+
}), exports.keys = function (val) {
|
|
283
|
+
var object = Object(val),
|
|
284
|
+
keys = [];
|
|
285
|
+
for (var key in object) keys.push(key);
|
|
286
|
+
return keys.reverse(), function next() {
|
|
287
|
+
for (; keys.length;) {
|
|
288
|
+
var key = keys.pop();
|
|
289
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
290
290
|
}
|
|
291
291
|
return next.done = !0, next;
|
|
292
292
|
};
|
|
293
|
-
},
|
|
293
|
+
}, exports.values = values, Context.prototype = {
|
|
294
294
|
constructor: Context,
|
|
295
|
-
reset: function (
|
|
296
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
295
|
+
reset: function (skipTempReset) {
|
|
296
|
+
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);
|
|
297
297
|
},
|
|
298
298
|
stop: function () {
|
|
299
299
|
this.done = !0;
|
|
300
|
-
var
|
|
301
|
-
if ("throw" ===
|
|
300
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
301
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
302
302
|
return this.rval;
|
|
303
303
|
},
|
|
304
|
-
dispatchException: function (
|
|
305
|
-
if (this.done) throw
|
|
306
|
-
var
|
|
307
|
-
function handle(
|
|
308
|
-
return
|
|
304
|
+
dispatchException: function (exception) {
|
|
305
|
+
if (this.done) throw exception;
|
|
306
|
+
var context = this;
|
|
307
|
+
function handle(loc, caught) {
|
|
308
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
309
309
|
}
|
|
310
|
-
for (var
|
|
311
|
-
var
|
|
312
|
-
|
|
313
|
-
if ("root" ===
|
|
314
|
-
if (
|
|
315
|
-
var
|
|
316
|
-
|
|
317
|
-
if (
|
|
318
|
-
if (this.prev <
|
|
319
|
-
if (this.prev <
|
|
320
|
-
} else if (
|
|
321
|
-
if (this.prev <
|
|
310
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
311
|
+
var entry = this.tryEntries[i],
|
|
312
|
+
record = entry.completion;
|
|
313
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
314
|
+
if (entry.tryLoc <= this.prev) {
|
|
315
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
316
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
317
|
+
if (hasCatch && hasFinally) {
|
|
318
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
319
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
320
|
+
} else if (hasCatch) {
|
|
321
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
322
322
|
} else {
|
|
323
|
-
if (!
|
|
324
|
-
if (this.prev <
|
|
323
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
324
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
|
-
abrupt: function (
|
|
330
|
-
for (var
|
|
331
|
-
var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
329
|
+
abrupt: function (type, arg) {
|
|
330
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
331
|
+
var entry = this.tryEntries[i];
|
|
332
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
333
|
+
var finallyEntry = entry;
|
|
334
334
|
break;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
|
|
338
|
-
var
|
|
339
|
-
return
|
|
337
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
338
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
339
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
340
340
|
},
|
|
341
|
-
complete: function (
|
|
342
|
-
if ("throw" ===
|
|
343
|
-
return "break" ===
|
|
341
|
+
complete: function (record, afterLoc) {
|
|
342
|
+
if ("throw" === record.type) throw record.arg;
|
|
343
|
+
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;
|
|
344
344
|
},
|
|
345
|
-
finish: function (
|
|
346
|
-
for (var
|
|
347
|
-
var
|
|
348
|
-
if (
|
|
345
|
+
finish: function (finallyLoc) {
|
|
346
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
347
|
+
var entry = this.tryEntries[i];
|
|
348
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
349
349
|
}
|
|
350
350
|
},
|
|
351
|
-
catch: function (
|
|
352
|
-
for (var
|
|
353
|
-
var
|
|
354
|
-
if (
|
|
355
|
-
var
|
|
356
|
-
if ("throw" ===
|
|
357
|
-
var
|
|
358
|
-
resetTryEntry(
|
|
351
|
+
catch: function (tryLoc) {
|
|
352
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
353
|
+
var entry = this.tryEntries[i];
|
|
354
|
+
if (entry.tryLoc === tryLoc) {
|
|
355
|
+
var record = entry.completion;
|
|
356
|
+
if ("throw" === record.type) {
|
|
357
|
+
var thrown = record.arg;
|
|
358
|
+
resetTryEntry(entry);
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return thrown;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
throw new Error("illegal catch attempt");
|
|
364
364
|
},
|
|
365
|
-
delegateYield: function (
|
|
365
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
366
366
|
return this.delegate = {
|
|
367
|
-
iterator: values(
|
|
368
|
-
resultName:
|
|
369
|
-
nextLoc:
|
|
370
|
-
}, "next" === this.method && (this.arg =
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
}
|
|
374
|
-
function _toPrimitive(t, r) {
|
|
375
|
-
if ("object" != typeof t || !t) return t;
|
|
376
|
-
var e = t[Symbol.toPrimitive];
|
|
377
|
-
if (void 0 !== e) {
|
|
378
|
-
var i = e.call(t, r || "default");
|
|
379
|
-
if ("object" != typeof i) return i;
|
|
380
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
381
|
-
}
|
|
382
|
-
return ("string" === r ? String : Number)(t);
|
|
383
|
-
}
|
|
384
|
-
function _toPropertyKey(t) {
|
|
385
|
-
var i = _toPrimitive(t, "string");
|
|
386
|
-
return "symbol" == typeof i ? i : String(i);
|
|
367
|
+
iterator: values(iterable),
|
|
368
|
+
resultName: resultName,
|
|
369
|
+
nextLoc: nextLoc
|
|
370
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
371
|
+
}
|
|
372
|
+
}, exports;
|
|
387
373
|
}
|
|
388
|
-
function _typeof(
|
|
374
|
+
function _typeof(obj) {
|
|
389
375
|
"@babel/helpers - typeof";
|
|
390
376
|
|
|
391
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
392
|
-
return typeof
|
|
393
|
-
} : function (
|
|
394
|
-
return
|
|
395
|
-
}, _typeof(
|
|
377
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
378
|
+
return typeof obj;
|
|
379
|
+
} : function (obj) {
|
|
380
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
381
|
+
}, _typeof(obj);
|
|
396
382
|
}
|
|
397
383
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
398
384
|
try {
|
|
@@ -499,6 +485,20 @@ function _nonIterableSpread() {
|
|
|
499
485
|
function _nonIterableRest() {
|
|
500
486
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
501
487
|
}
|
|
488
|
+
function _toPrimitive(input, hint) {
|
|
489
|
+
if (typeof input !== "object" || input === null) return input;
|
|
490
|
+
var prim = input[Symbol.toPrimitive];
|
|
491
|
+
if (prim !== undefined) {
|
|
492
|
+
var res = prim.call(input, hint || "default");
|
|
493
|
+
if (typeof res !== "object") return res;
|
|
494
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
495
|
+
}
|
|
496
|
+
return (hint === "string" ? String : Number)(input);
|
|
497
|
+
}
|
|
498
|
+
function _toPropertyKey(arg) {
|
|
499
|
+
var key = _toPrimitive(arg, "string");
|
|
500
|
+
return typeof key === "symbol" ? key : String(key);
|
|
501
|
+
}
|
|
502
502
|
|
|
503
503
|
function ApaasCascader(props) {
|
|
504
504
|
return /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
|
|
@@ -523,11 +523,12 @@ var ApaasDate = function ApaasDate(props) {
|
|
|
523
523
|
}, otherProps));
|
|
524
524
|
};
|
|
525
525
|
|
|
526
|
-
var _excluded$1 = ["isNumber", "replaceWarn"];
|
|
526
|
+
var _excluded$1 = ["isNumber", "replaceWarn", "precision"];
|
|
527
527
|
function ApaasInput(props) {
|
|
528
528
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
529
529
|
var isNumber = props.isNumber,
|
|
530
530
|
replaceWarn = props.replaceWarn,
|
|
531
|
+
precision = props.precision,
|
|
531
532
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
532
533
|
var handleBlur = function handleBlur(e) {
|
|
533
534
|
// 去除头尾空格
|
|
@@ -537,8 +538,12 @@ function ApaasInput(props) {
|
|
|
537
538
|
typeof onChange === 'function' && onChange(e);
|
|
538
539
|
typeof onBlur === 'function' && onBlur(e);
|
|
539
540
|
};
|
|
541
|
+
return isNumber ?
|
|
542
|
+
/*#__PURE__*/
|
|
540
543
|
// @ts-ignore
|
|
541
|
-
|
|
544
|
+
React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
545
|
+
precision: precision === 'nolimit' ? undefined : precision
|
|
546
|
+
})) : /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
542
547
|
onBlur: handleBlur
|
|
543
548
|
}));
|
|
544
549
|
}
|
|
@@ -7639,6 +7644,391 @@ function withFormItem(WrappedComponent) {
|
|
|
7639
7644
|
};
|
|
7640
7645
|
}
|
|
7641
7646
|
|
|
7647
|
+
/*
|
|
7648
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7649
|
+
* @Date: 2022-09-13 11:06:09
|
|
7650
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7651
|
+
* @LastEditTime: 2022-11-04 15:55:10
|
|
7652
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7653
|
+
* @Description:
|
|
7654
|
+
*
|
|
7655
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7656
|
+
*/
|
|
7657
|
+
var extendRequest = request.extend({});
|
|
7658
|
+
|
|
7659
|
+
var WidgetMap = {
|
|
7660
|
+
INPUT: 'input',
|
|
7661
|
+
TEXTAREA: 'textarea'
|
|
7662
|
+
};
|
|
7663
|
+
var pageSize = 50;
|
|
7664
|
+
var SubForm = function SubForm(props) {
|
|
7665
|
+
var _selectOptions$;
|
|
7666
|
+
var value = props.value,
|
|
7667
|
+
onChange = props.onChange,
|
|
7668
|
+
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
7669
|
+
_props$subConfig = props.subConfig,
|
|
7670
|
+
flowStatus = _props$subConfig.flowStatus,
|
|
7671
|
+
flowTemplateKey = _props$subConfig.flowTemplateKey,
|
|
7672
|
+
nodeId = _props$subConfig.nodeId,
|
|
7673
|
+
workOrderTemplateId = _props$subConfig.workOrderTemplateId,
|
|
7674
|
+
correlationList = _props$subConfig.correlationList,
|
|
7675
|
+
tableHeader = props.tableHeader,
|
|
7676
|
+
disabled = props.disabled;
|
|
7677
|
+
var ref = React.useRef(null);
|
|
7678
|
+
var _useState = React.useState(false),
|
|
7679
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7680
|
+
open = _useState2[0],
|
|
7681
|
+
setOpen = _useState2[1];
|
|
7682
|
+
var _useState3 = React.useState(''),
|
|
7683
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7684
|
+
selectKey = _useState4[0],
|
|
7685
|
+
setSelectKey = _useState4[1];
|
|
7686
|
+
var _useState5 = React.useState(''),
|
|
7687
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7688
|
+
inputValue = _useState6[0],
|
|
7689
|
+
setInputValue = _useState6[1];
|
|
7690
|
+
var _useState7 = React.useState([]),
|
|
7691
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7692
|
+
list = _useState8[0],
|
|
7693
|
+
setList = _useState8[1];
|
|
7694
|
+
var _useState9 = React.useState(1),
|
|
7695
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
7696
|
+
pageNo = _useState10[0],
|
|
7697
|
+
setPageNo = _useState10[1];
|
|
7698
|
+
var _useState11 = React.useState(true),
|
|
7699
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
7700
|
+
hasMore = _useState12[0],
|
|
7701
|
+
setHasMore = _useState12[1];
|
|
7702
|
+
var updateHandle = function updateHandle(val, index, type) {
|
|
7703
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
7704
|
+
var valueItem = tableHeader.find(function (t) {
|
|
7705
|
+
return t.key === type && t.isNumber && t.precision !== 'nolimit';
|
|
7706
|
+
});
|
|
7707
|
+
var newValue = JSON.parse(JSON.stringify(value));
|
|
7708
|
+
newValue[index][type] = valueItem ? Number(val).toFixed(+valueItem.precision) : val;
|
|
7709
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newValue));
|
|
7710
|
+
}
|
|
7711
|
+
};
|
|
7712
|
+
var newTableHeader = React.useMemo(function () {
|
|
7713
|
+
return correlationList.reduce(function (prv, next) {
|
|
7714
|
+
var t = tableHeader.find(function (t) {
|
|
7715
|
+
return t.key === next.key;
|
|
7716
|
+
}) || {
|
|
7717
|
+
isShow: true,
|
|
7718
|
+
isEdit: false,
|
|
7719
|
+
isRequired: false,
|
|
7720
|
+
isNumber: false,
|
|
7721
|
+
precision: 'nolimit',
|
|
7722
|
+
width: 150
|
|
7723
|
+
};
|
|
7724
|
+
if (t && t.isShow) {
|
|
7725
|
+
prv.push(_objectSpread2(_objectSpread2({}, next), t));
|
|
7726
|
+
}
|
|
7727
|
+
return prv;
|
|
7728
|
+
}, []);
|
|
7729
|
+
}, [correlationList, tableHeader]);
|
|
7730
|
+
var column = [{
|
|
7731
|
+
dataIndex: 'index',
|
|
7732
|
+
title: '序号',
|
|
7733
|
+
width: 50,
|
|
7734
|
+
render: function render(val, record, index) {
|
|
7735
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7736
|
+
style: {
|
|
7737
|
+
width: 25
|
|
7738
|
+
}
|
|
7739
|
+
}, index + 1);
|
|
7740
|
+
}
|
|
7741
|
+
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
7742
|
+
return {
|
|
7743
|
+
dataIndex: t.key,
|
|
7744
|
+
title: /*#__PURE__*/React__default['default'].createElement("span", null, t.isRequired ? /*#__PURE__*/React__default['default'].createElement("span", {
|
|
7745
|
+
style: {
|
|
7746
|
+
color: 'red'
|
|
7747
|
+
}
|
|
7748
|
+
}, "*") : null, t.name),
|
|
7749
|
+
ellipsis: true,
|
|
7750
|
+
width: t.width,
|
|
7751
|
+
render: function render(val, record, index) {
|
|
7752
|
+
// @ts-ignore
|
|
7753
|
+
var precisionValue = t.precision === 'nolimit' ? undefined : t.precision;
|
|
7754
|
+
return !t.isEdit ? t.isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
7755
|
+
style: {
|
|
7756
|
+
width: '100%'
|
|
7757
|
+
},
|
|
7758
|
+
value: val,
|
|
7759
|
+
precision: precisionValue,
|
|
7760
|
+
onChange: function onChange(e) {
|
|
7761
|
+
return updateHandle(e, index, t.key);
|
|
7762
|
+
},
|
|
7763
|
+
stringMode: true
|
|
7764
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
7765
|
+
style: {
|
|
7766
|
+
width: '100%'
|
|
7767
|
+
},
|
|
7768
|
+
value: val,
|
|
7769
|
+
onChange: function onChange(e) {
|
|
7770
|
+
var _e$target;
|
|
7771
|
+
return updateHandle(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value, index, t.key);
|
|
7772
|
+
}
|
|
7773
|
+
}) : /*#__PURE__*/React__default['default'].createElement("div", null, val);
|
|
7774
|
+
}
|
|
7775
|
+
};
|
|
7776
|
+
})), [disabled ? {} : {
|
|
7777
|
+
dataIndex: 'operation',
|
|
7778
|
+
title: '操作',
|
|
7779
|
+
width: 70,
|
|
7780
|
+
render: function render(val, record, index) {
|
|
7781
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7782
|
+
type: "link",
|
|
7783
|
+
onClick: function onClick() {
|
|
7784
|
+
return deleteHandle(record.uuid);
|
|
7785
|
+
}
|
|
7786
|
+
}, "\u5220\u9664");
|
|
7787
|
+
}
|
|
7788
|
+
}]);
|
|
7789
|
+
var columsSearch = React.useMemo(function () {
|
|
7790
|
+
return [{
|
|
7791
|
+
dataIndex: 'index',
|
|
7792
|
+
title: '序号',
|
|
7793
|
+
render: function render(val, record, index) {
|
|
7794
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7795
|
+
style: {
|
|
7796
|
+
width: 25
|
|
7797
|
+
}
|
|
7798
|
+
}, index + 1);
|
|
7799
|
+
}
|
|
7800
|
+
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
7801
|
+
return {
|
|
7802
|
+
dataIndex: t.key,
|
|
7803
|
+
title: t.name
|
|
7804
|
+
};
|
|
7805
|
+
})));
|
|
7806
|
+
}, [newTableHeader]);
|
|
7807
|
+
var valueMap = React.useMemo(function () {
|
|
7808
|
+
return newTableHeader.reduce(function (prv, next) {
|
|
7809
|
+
prv["".concat(next.key, "_").concat(WidgetMap[next.workOrderComponentType])] = next.key;
|
|
7810
|
+
return prv;
|
|
7811
|
+
}, {});
|
|
7812
|
+
}, [newTableHeader]);
|
|
7813
|
+
var selectOptions = React.useMemo(function () {
|
|
7814
|
+
var _options$;
|
|
7815
|
+
var options = newTableHeader.map(function (item) {
|
|
7816
|
+
return {
|
|
7817
|
+
label: item.name,
|
|
7818
|
+
value: "".concat(item.key, "_").concat(WidgetMap[item.workOrderComponentType])
|
|
7819
|
+
};
|
|
7820
|
+
});
|
|
7821
|
+
setSelectKey(options === null || options === void 0 ? void 0 : (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value);
|
|
7822
|
+
return options;
|
|
7823
|
+
}, [newTableHeader]);
|
|
7824
|
+
var deleteHandle = function deleteHandle(uuid) {
|
|
7825
|
+
var newList = value.filter(function (item) {
|
|
7826
|
+
return item.uuid !== uuid;
|
|
7827
|
+
});
|
|
7828
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
7829
|
+
};
|
|
7830
|
+
var onScrollCapture = function onScrollCapture(e) {
|
|
7831
|
+
if (e.target.scrollTop + e.target.clientHeight >= e.target.scrollHeight) {
|
|
7832
|
+
if (hasMore) {
|
|
7833
|
+
getWorkOrderList({
|
|
7834
|
+
pageNo: pageNo + 1
|
|
7835
|
+
});
|
|
7836
|
+
setPageNo(pageNo + 1);
|
|
7837
|
+
}
|
|
7838
|
+
}
|
|
7839
|
+
};
|
|
7840
|
+
var getWorkOrderList = /*#__PURE__*/function () {
|
|
7841
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7842
|
+
var _ref2,
|
|
7843
|
+
_ref2$pageNo,
|
|
7844
|
+
pageNo,
|
|
7845
|
+
params,
|
|
7846
|
+
res,
|
|
7847
|
+
data,
|
|
7848
|
+
success,
|
|
7849
|
+
newList,
|
|
7850
|
+
_args = arguments;
|
|
7851
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7852
|
+
while (1) switch (_context.prev = _context.next) {
|
|
7853
|
+
case 0:
|
|
7854
|
+
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo;
|
|
7855
|
+
if (!disabled) {
|
|
7856
|
+
_context.next = 3;
|
|
7857
|
+
break;
|
|
7858
|
+
}
|
|
7859
|
+
return _context.abrupt("return");
|
|
7860
|
+
case 3:
|
|
7861
|
+
params = {
|
|
7862
|
+
flowNodeId: nodeId,
|
|
7863
|
+
flowTemplateKey: flowTemplateKey === null || flowTemplateKey === void 0 ? void 0 : flowTemplateKey[1],
|
|
7864
|
+
pageNo: pageNo,
|
|
7865
|
+
pageSize: pageSize,
|
|
7866
|
+
templateKey: workOrderTemplateId,
|
|
7867
|
+
needReturnRepeatValue: true,
|
|
7868
|
+
needFilterShopByPermission: needFilterShopByPermission,
|
|
7869
|
+
queryComponents: [{
|
|
7870
|
+
key: 'flowStatus',
|
|
7871
|
+
symbol: 'in',
|
|
7872
|
+
value: flowStatus
|
|
7873
|
+
}]
|
|
7874
|
+
};
|
|
7875
|
+
if (selectKey && inputValue) {
|
|
7876
|
+
params.queryComponents = [{
|
|
7877
|
+
key: 'flowStatus',
|
|
7878
|
+
symbol: 'in',
|
|
7879
|
+
value: flowStatus
|
|
7880
|
+
}, {
|
|
7881
|
+
key: selectKey,
|
|
7882
|
+
symbol: 'in',
|
|
7883
|
+
value: [inputValue]
|
|
7884
|
+
}];
|
|
7885
|
+
}
|
|
7886
|
+
_context.next = 7;
|
|
7887
|
+
return extendRequest('/qy/view/workOrderList', {
|
|
7888
|
+
method: 'post',
|
|
7889
|
+
data: params
|
|
7890
|
+
});
|
|
7891
|
+
case 7:
|
|
7892
|
+
res = _context.sent;
|
|
7893
|
+
data = res.data, success = res.success;
|
|
7894
|
+
if (success) {
|
|
7895
|
+
newList = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
7896
|
+
var params = {};
|
|
7897
|
+
Object.keys(item.jsonMap).forEach(function (key) {
|
|
7898
|
+
if (valueMap[key]) {
|
|
7899
|
+
params[valueMap[key]] = item.jsonMap[key];
|
|
7900
|
+
}
|
|
7901
|
+
});
|
|
7902
|
+
return params;
|
|
7903
|
+
});
|
|
7904
|
+
if (pageNo === 1) {
|
|
7905
|
+
setList(newList);
|
|
7906
|
+
} else {
|
|
7907
|
+
setList([].concat(_toConsumableArray(list), _toConsumableArray(newList)));
|
|
7908
|
+
setHasMore((data === null || data === void 0 ? void 0 : data.list.length) === pageSize);
|
|
7909
|
+
}
|
|
7910
|
+
}
|
|
7911
|
+
case 10:
|
|
7912
|
+
case "end":
|
|
7913
|
+
return _context.stop();
|
|
7914
|
+
}
|
|
7915
|
+
}, _callee);
|
|
7916
|
+
}));
|
|
7917
|
+
return function getWorkOrderList() {
|
|
7918
|
+
return _ref.apply(this, arguments);
|
|
7919
|
+
};
|
|
7920
|
+
}();
|
|
7921
|
+
React.useEffect(function () {
|
|
7922
|
+
getWorkOrderList({
|
|
7923
|
+
pageNo: 1
|
|
7924
|
+
});
|
|
7925
|
+
}, []);
|
|
7926
|
+
ahooks.useUpdateEffect(function () {
|
|
7927
|
+
setPageNo(1);
|
|
7928
|
+
getWorkOrderList({
|
|
7929
|
+
pageNo: 1
|
|
7930
|
+
});
|
|
7931
|
+
}, [inputValue]);
|
|
7932
|
+
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
7933
|
+
setOpen(newOpen);
|
|
7934
|
+
};
|
|
7935
|
+
var onChangeInput = React.useCallback(lodash.debounce(function (val) {
|
|
7936
|
+
setInputValue(val);
|
|
7937
|
+
setOpen(true);
|
|
7938
|
+
}, 1000), []);
|
|
7939
|
+
var hasNumber = function hasNumber(val) {
|
|
7940
|
+
try {
|
|
7941
|
+
return lodash.isNaN(+val) ? false : lodash.isNumber(+val);
|
|
7942
|
+
} catch (e) {
|
|
7943
|
+
return false;
|
|
7944
|
+
}
|
|
7945
|
+
};
|
|
7946
|
+
var selectValueHandle = function selectValueHandle(record) {
|
|
7947
|
+
var numberKeys = newTableHeader.map(function (t) {
|
|
7948
|
+
if (t.isNumber) {
|
|
7949
|
+
return t.key;
|
|
7950
|
+
}
|
|
7951
|
+
});
|
|
7952
|
+
var newValue = _objectSpread2({}, record);
|
|
7953
|
+
if (numberKeys.length) {
|
|
7954
|
+
Object.keys(newValue).forEach(function (key) {
|
|
7955
|
+
if (numberKeys.includes(key)) {
|
|
7956
|
+
newValue[key] = hasNumber(newValue[key]) ? newValue[key] : '';
|
|
7957
|
+
}
|
|
7958
|
+
});
|
|
7959
|
+
}
|
|
7960
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
7961
|
+
uuid: kmkfUtils.uuid()
|
|
7962
|
+
})]));
|
|
7963
|
+
};
|
|
7964
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
7965
|
+
style: {
|
|
7966
|
+
marginBottom: '10px'
|
|
7967
|
+
}
|
|
7968
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
7969
|
+
style: {
|
|
7970
|
+
width: '120px'
|
|
7971
|
+
},
|
|
7972
|
+
options: selectOptions,
|
|
7973
|
+
defaultValue: selectOptions === null || selectOptions === void 0 ? void 0 : (_selectOptions$ = selectOptions[0]) === null || _selectOptions$ === void 0 ? void 0 : _selectOptions$.value,
|
|
7974
|
+
value: selectKey,
|
|
7975
|
+
onChange: setSelectKey
|
|
7976
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
7977
|
+
content: /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7978
|
+
ref: ref,
|
|
7979
|
+
onScrollCapture: onScrollCapture,
|
|
7980
|
+
style: {
|
|
7981
|
+
height: 320,
|
|
7982
|
+
overflowY: 'scroll',
|
|
7983
|
+
overflowX: 'auto'
|
|
7984
|
+
}
|
|
7985
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
7986
|
+
columns: columsSearch,
|
|
7987
|
+
dataSource: list,
|
|
7988
|
+
rowKey: 'index',
|
|
7989
|
+
size: "small",
|
|
7990
|
+
pagination: false,
|
|
7991
|
+
scroll: {
|
|
7992
|
+
x: '100%'
|
|
7993
|
+
},
|
|
7994
|
+
locale: {
|
|
7995
|
+
emptyText: '暂无数据'
|
|
7996
|
+
},
|
|
7997
|
+
onRow: function onRow(record) {
|
|
7998
|
+
return {
|
|
7999
|
+
onClick: function onClick(e) {
|
|
8000
|
+
e.stopPropagation();
|
|
8001
|
+
selectValueHandle(record);
|
|
8002
|
+
setOpen(false);
|
|
8003
|
+
}
|
|
8004
|
+
};
|
|
8005
|
+
}
|
|
8006
|
+
})),
|
|
8007
|
+
trigger: "click",
|
|
8008
|
+
placement: "bottom",
|
|
8009
|
+
visible: open,
|
|
8010
|
+
onVisibleChange: handleOpenChange
|
|
8011
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
8012
|
+
placeholder: "\u8F93\u5165\u5173\u952E\u8BCD\u67E5\u8BE2",
|
|
8013
|
+
allowClear: true,
|
|
8014
|
+
onChange: function onChange(e) {
|
|
8015
|
+
onChangeInput(e.target.value);
|
|
8016
|
+
}
|
|
8017
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
8018
|
+
columns: column,
|
|
8019
|
+
dataSource: value,
|
|
8020
|
+
rowKey: 'uuid',
|
|
8021
|
+
size: "small",
|
|
8022
|
+
pagination: false,
|
|
8023
|
+
scroll: {
|
|
8024
|
+
x: '100%'
|
|
8025
|
+
},
|
|
8026
|
+
locale: {
|
|
8027
|
+
emptyText: '暂无数据'
|
|
8028
|
+
}
|
|
8029
|
+
}));
|
|
8030
|
+
};
|
|
8031
|
+
|
|
7642
8032
|
var BuyerNick = function BuyerNick(props) {
|
|
7643
8033
|
var _props$value = props.value,
|
|
7644
8034
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -7925,18 +8315,6 @@ var AliPay = function AliPay(props) {
|
|
|
7925
8315
|
})));
|
|
7926
8316
|
};
|
|
7927
8317
|
|
|
7928
|
-
/*
|
|
7929
|
-
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7930
|
-
* @Date: 2022-09-13 11:06:09
|
|
7931
|
-
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7932
|
-
* @LastEditTime: 2022-11-04 15:55:10
|
|
7933
|
-
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7934
|
-
* @Description:
|
|
7935
|
-
*
|
|
7936
|
-
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7937
|
-
*/
|
|
7938
|
-
var extendRequest = request.extend({});
|
|
7939
|
-
|
|
7940
8318
|
var css_248z$5 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.goodsBox .right-context {\n font-size: 12px;\n}\n.goodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.goodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.goodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.goods-imgBox .add-btn {\n color: #86909c;\n}\n.goods-imgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
7941
8319
|
styleInject(css_248z$5);
|
|
7942
8320
|
|
|
@@ -13762,9 +14140,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13762
14140
|
var _typeMap$type25;
|
|
13763
14141
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
|
|
13764
14142
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
|
|
13765
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
13766
|
-
gutter: 8
|
|
13767
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
14143
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, null, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13768
14144
|
className: "gutter-row",
|
|
13769
14145
|
xs: {
|
|
13770
14146
|
span: 11
|
|
@@ -13796,6 +14172,9 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13796
14172
|
},
|
|
13797
14173
|
md: {
|
|
13798
14174
|
span: 6
|
|
14175
|
+
},
|
|
14176
|
+
style: {
|
|
14177
|
+
marginLeft: '8px'
|
|
13799
14178
|
}
|
|
13800
14179
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13801
14180
|
style: {
|
|
@@ -14642,6 +15021,7 @@ exports.Remark = RemarkInput;
|
|
|
14642
15021
|
exports.ReturnLogistics = ExpressLogistics;
|
|
14643
15022
|
exports.ShopName = ShopNameSelect;
|
|
14644
15023
|
exports.Status = Status;
|
|
15024
|
+
exports.SubForm = SubForm;
|
|
14645
15025
|
exports.Supplier = Supplier;
|
|
14646
15026
|
exports.TBGoodId = TBGoodId;
|
|
14647
15027
|
exports.TBGoodSerial = TBGoodSerial;
|