ns-base-module 1.1.85 → 1.1.87
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.
|
@@ -1,48 +1,686 @@
|
|
|
1
|
-
function _typeof(o) {
|
|
1
|
+
function _typeof(o) {
|
|
2
|
+
"@babel/helpers - typeof";
|
|
3
|
+
return (
|
|
4
|
+
(_typeof =
|
|
5
|
+
"function" == typeof Symbol && "symbol" == typeof Symbol.iterator
|
|
6
|
+
? function (o) {
|
|
7
|
+
return typeof o;
|
|
8
|
+
}
|
|
9
|
+
: function (o) {
|
|
10
|
+
return o &&
|
|
11
|
+
"function" == typeof Symbol &&
|
|
12
|
+
o.constructor === Symbol &&
|
|
13
|
+
o !== Symbol.prototype
|
|
14
|
+
? "symbol"
|
|
15
|
+
: typeof o;
|
|
16
|
+
}),
|
|
17
|
+
_typeof(o)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
2
20
|
var _excluded = ["menuCode", "formTemplateCode"];
|
|
3
|
-
function _objectDestructuringEmpty(obj) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
function _objectDestructuringEmpty(obj) {
|
|
22
|
+
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
23
|
+
}
|
|
24
|
+
function _objectWithoutProperties(source, excluded) {
|
|
25
|
+
if (source == null) return {};
|
|
26
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
27
|
+
var key, i;
|
|
28
|
+
if (Object.getOwnPropertySymbols) {
|
|
29
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
30
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
31
|
+
key = sourceSymbolKeys[i];
|
|
32
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
33
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
34
|
+
target[key] = source[key];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
}
|
|
39
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
40
|
+
if (source == null) return {};
|
|
41
|
+
var target = {};
|
|
42
|
+
var sourceKeys = Object.keys(source);
|
|
43
|
+
var key, i;
|
|
44
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
45
|
+
key = sourceKeys[i];
|
|
46
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
47
|
+
target[key] = source[key];
|
|
48
|
+
}
|
|
49
|
+
return target;
|
|
50
|
+
}
|
|
51
|
+
function _toConsumableArray(arr) {
|
|
52
|
+
return (
|
|
53
|
+
_arrayWithoutHoles(arr) ||
|
|
54
|
+
_iterableToArray(arr) ||
|
|
55
|
+
_unsupportedIterableToArray(arr) ||
|
|
56
|
+
_nonIterableSpread()
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function _nonIterableSpread() {
|
|
60
|
+
throw new TypeError(
|
|
61
|
+
"Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function _iterableToArray(iter) {
|
|
65
|
+
if (
|
|
66
|
+
(typeof Symbol !== "undefined" && iter[Symbol.iterator] != null) ||
|
|
67
|
+
iter["@@iterator"] != null
|
|
68
|
+
)
|
|
69
|
+
return Array.from(iter);
|
|
70
|
+
}
|
|
71
|
+
function _arrayWithoutHoles(arr) {
|
|
72
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
73
|
+
}
|
|
74
|
+
function _regeneratorRuntime() {
|
|
75
|
+
"use strict";
|
|
76
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime =
|
|
77
|
+
function _regeneratorRuntime() {
|
|
78
|
+
return e;
|
|
79
|
+
};
|
|
80
|
+
var t,
|
|
81
|
+
e = {},
|
|
82
|
+
r = Object.prototype,
|
|
83
|
+
n = r.hasOwnProperty,
|
|
84
|
+
o =
|
|
85
|
+
Object.defineProperty ||
|
|
86
|
+
function (t, e, r) {
|
|
87
|
+
t[e] = r.value;
|
|
88
|
+
},
|
|
89
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
90
|
+
a = i.iterator || "@@iterator",
|
|
91
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
92
|
+
u = i.toStringTag || "@@toStringTag";
|
|
93
|
+
function define(t, e, r) {
|
|
94
|
+
return (
|
|
95
|
+
Object.defineProperty(t, e, {
|
|
96
|
+
value: r,
|
|
97
|
+
enumerable: !0,
|
|
98
|
+
configurable: !0,
|
|
99
|
+
writable: !0,
|
|
100
|
+
}),
|
|
101
|
+
t[e]
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
define({}, "");
|
|
106
|
+
} catch (t) {
|
|
107
|
+
define = function define(t, e, r) {
|
|
108
|
+
return (t[e] = r);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function wrap(t, e, r, n) {
|
|
112
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
113
|
+
a = Object.create(i.prototype),
|
|
114
|
+
c = new Context(n || []);
|
|
115
|
+
return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a;
|
|
116
|
+
}
|
|
117
|
+
function tryCatch(t, e, r) {
|
|
118
|
+
try {
|
|
119
|
+
return { type: "normal", arg: t.call(e, r) };
|
|
120
|
+
} catch (t) {
|
|
121
|
+
return { type: "throw", arg: t };
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
e.wrap = wrap;
|
|
125
|
+
var h = "suspendedStart",
|
|
126
|
+
l = "suspendedYield",
|
|
127
|
+
f = "executing",
|
|
128
|
+
s = "completed",
|
|
129
|
+
y = {};
|
|
130
|
+
function Generator() {}
|
|
131
|
+
function GeneratorFunction() {}
|
|
132
|
+
function GeneratorFunctionPrototype() {}
|
|
133
|
+
var p = {};
|
|
134
|
+
define(p, a, function () {
|
|
135
|
+
return this;
|
|
136
|
+
});
|
|
137
|
+
var d = Object.getPrototypeOf,
|
|
138
|
+
v = d && d(d(values([])));
|
|
139
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
140
|
+
var g =
|
|
141
|
+
(GeneratorFunctionPrototype.prototype =
|
|
142
|
+
Generator.prototype =
|
|
143
|
+
Object.create(p));
|
|
144
|
+
function defineIteratorMethods(t) {
|
|
145
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
146
|
+
define(t, e, function (t) {
|
|
147
|
+
return this._invoke(e, t);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function AsyncIterator(t, e) {
|
|
152
|
+
function invoke(r, o, i, a) {
|
|
153
|
+
var c = tryCatch(t[r], t, o);
|
|
154
|
+
if ("throw" !== c.type) {
|
|
155
|
+
var u = c.arg,
|
|
156
|
+
h = u.value;
|
|
157
|
+
return h && "object" == _typeof(h) && n.call(h, "__await")
|
|
158
|
+
? e.resolve(h.__await).then(
|
|
159
|
+
function (t) {
|
|
160
|
+
invoke("next", t, i, a);
|
|
161
|
+
},
|
|
162
|
+
function (t) {
|
|
163
|
+
invoke("throw", t, i, a);
|
|
164
|
+
},
|
|
165
|
+
)
|
|
166
|
+
: e.resolve(h).then(
|
|
167
|
+
function (t) {
|
|
168
|
+
(u.value = t), i(u);
|
|
169
|
+
},
|
|
170
|
+
function (t) {
|
|
171
|
+
return invoke("throw", t, i, a);
|
|
172
|
+
},
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
a(c.arg);
|
|
176
|
+
}
|
|
177
|
+
var r;
|
|
178
|
+
o(this, "_invoke", {
|
|
179
|
+
value: function value(t, n) {
|
|
180
|
+
function callInvokeWithMethodAndArg() {
|
|
181
|
+
return new e(function (e, r) {
|
|
182
|
+
invoke(t, n, e, r);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
return (r = r
|
|
186
|
+
? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg)
|
|
187
|
+
: callInvokeWithMethodAndArg());
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
function makeInvokeMethod(e, r, n) {
|
|
192
|
+
var o = h;
|
|
193
|
+
return function (i, a) {
|
|
194
|
+
if (o === f) throw new Error("Generator is already running");
|
|
195
|
+
if (o === s) {
|
|
196
|
+
if ("throw" === i) throw a;
|
|
197
|
+
return { value: t, done: !0 };
|
|
198
|
+
}
|
|
199
|
+
for (n.method = i, n.arg = a; ; ) {
|
|
200
|
+
var c = n.delegate;
|
|
201
|
+
if (c) {
|
|
202
|
+
var u = maybeInvokeDelegate(c, n);
|
|
203
|
+
if (u) {
|
|
204
|
+
if (u === y) continue;
|
|
205
|
+
return u;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;
|
|
209
|
+
else if ("throw" === n.method) {
|
|
210
|
+
if (o === h) throw ((o = s), n.arg);
|
|
211
|
+
n.dispatchException(n.arg);
|
|
212
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
213
|
+
o = f;
|
|
214
|
+
var p = tryCatch(e, r, n);
|
|
215
|
+
if ("normal" === p.type) {
|
|
216
|
+
if (((o = n.done ? s : l), p.arg === y)) continue;
|
|
217
|
+
return { value: p.arg, done: n.done };
|
|
218
|
+
}
|
|
219
|
+
"throw" === p.type && ((o = s), (n.method = "throw"), (n.arg = p.arg));
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
function maybeInvokeDelegate(e, r) {
|
|
224
|
+
var n = r.method,
|
|
225
|
+
o = e.iterator[n];
|
|
226
|
+
if (o === t)
|
|
227
|
+
return (
|
|
228
|
+
(r.delegate = null),
|
|
229
|
+
("throw" === n &&
|
|
230
|
+
e.iterator.return &&
|
|
231
|
+
((r.method = "return"),
|
|
232
|
+
(r.arg = t),
|
|
233
|
+
maybeInvokeDelegate(e, r),
|
|
234
|
+
"throw" === r.method)) ||
|
|
235
|
+
("return" !== n &&
|
|
236
|
+
((r.method = "throw"),
|
|
237
|
+
(r.arg = new TypeError(
|
|
238
|
+
"The iterator does not provide a '" + n + "' method",
|
|
239
|
+
)))),
|
|
240
|
+
y
|
|
241
|
+
);
|
|
242
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
243
|
+
if ("throw" === i.type)
|
|
244
|
+
return (r.method = "throw"), (r.arg = i.arg), (r.delegate = null), y;
|
|
245
|
+
var a = i.arg;
|
|
246
|
+
return a
|
|
247
|
+
? a.done
|
|
248
|
+
? ((r[e.resultName] = a.value),
|
|
249
|
+
(r.next = e.nextLoc),
|
|
250
|
+
"return" !== r.method && ((r.method = "next"), (r.arg = t)),
|
|
251
|
+
(r.delegate = null),
|
|
252
|
+
y)
|
|
253
|
+
: a
|
|
254
|
+
: ((r.method = "throw"),
|
|
255
|
+
(r.arg = new TypeError("iterator result is not an object")),
|
|
256
|
+
(r.delegate = null),
|
|
257
|
+
y);
|
|
258
|
+
}
|
|
259
|
+
function pushTryEntry(t) {
|
|
260
|
+
var e = { tryLoc: t[0] };
|
|
261
|
+
1 in t && (e.catchLoc = t[1]),
|
|
262
|
+
2 in t && ((e.finallyLoc = t[2]), (e.afterLoc = t[3])),
|
|
263
|
+
this.tryEntries.push(e);
|
|
264
|
+
}
|
|
265
|
+
function resetTryEntry(t) {
|
|
266
|
+
var e = t.completion || {};
|
|
267
|
+
(e.type = "normal"), delete e.arg, (t.completion = e);
|
|
268
|
+
}
|
|
269
|
+
function Context(t) {
|
|
270
|
+
(this.tryEntries = [{ tryLoc: "root" }]),
|
|
271
|
+
t.forEach(pushTryEntry, this),
|
|
272
|
+
this.reset(!0);
|
|
273
|
+
}
|
|
274
|
+
function values(e) {
|
|
275
|
+
if (e || "" === e) {
|
|
276
|
+
var r = e[a];
|
|
277
|
+
if (r) return r.call(e);
|
|
278
|
+
if ("function" == typeof e.next) return e;
|
|
279
|
+
if (!isNaN(e.length)) {
|
|
280
|
+
var o = -1,
|
|
281
|
+
i = function next() {
|
|
282
|
+
for (; ++o < e.length; )
|
|
283
|
+
if (n.call(e, o))
|
|
284
|
+
return (next.value = e[o]), (next.done = !1), next;
|
|
285
|
+
return (next.value = t), (next.done = !0), next;
|
|
286
|
+
};
|
|
287
|
+
return (i.next = i);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
throw new TypeError(_typeof(e) + " is not iterable");
|
|
291
|
+
}
|
|
292
|
+
return (
|
|
293
|
+
(GeneratorFunction.prototype = GeneratorFunctionPrototype),
|
|
294
|
+
o(g, "constructor", {
|
|
295
|
+
value: GeneratorFunctionPrototype,
|
|
296
|
+
configurable: !0,
|
|
297
|
+
}),
|
|
298
|
+
o(GeneratorFunctionPrototype, "constructor", {
|
|
299
|
+
value: GeneratorFunction,
|
|
300
|
+
configurable: !0,
|
|
301
|
+
}),
|
|
302
|
+
(GeneratorFunction.displayName = define(
|
|
303
|
+
GeneratorFunctionPrototype,
|
|
304
|
+
u,
|
|
305
|
+
"GeneratorFunction",
|
|
306
|
+
)),
|
|
307
|
+
(e.isGeneratorFunction = function (t) {
|
|
308
|
+
var e = "function" == typeof t && t.constructor;
|
|
309
|
+
return (
|
|
310
|
+
!!e &&
|
|
311
|
+
(e === GeneratorFunction ||
|
|
312
|
+
"GeneratorFunction" === (e.displayName || e.name))
|
|
313
|
+
);
|
|
314
|
+
}),
|
|
315
|
+
(e.mark = function (t) {
|
|
316
|
+
return (
|
|
317
|
+
Object.setPrototypeOf
|
|
318
|
+
? Object.setPrototypeOf(t, GeneratorFunctionPrototype)
|
|
319
|
+
: ((t.__proto__ = GeneratorFunctionPrototype),
|
|
320
|
+
define(t, u, "GeneratorFunction")),
|
|
321
|
+
(t.prototype = Object.create(g)),
|
|
322
|
+
t
|
|
323
|
+
);
|
|
324
|
+
}),
|
|
325
|
+
(e.awrap = function (t) {
|
|
326
|
+
return { __await: t };
|
|
327
|
+
}),
|
|
328
|
+
defineIteratorMethods(AsyncIterator.prototype),
|
|
329
|
+
define(AsyncIterator.prototype, c, function () {
|
|
330
|
+
return this;
|
|
331
|
+
}),
|
|
332
|
+
(e.AsyncIterator = AsyncIterator),
|
|
333
|
+
(e.async = function (t, r, n, o, i) {
|
|
334
|
+
void 0 === i && (i = Promise);
|
|
335
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
336
|
+
return e.isGeneratorFunction(r)
|
|
337
|
+
? a
|
|
338
|
+
: a.next().then(function (t) {
|
|
339
|
+
return t.done ? t.value : a.next();
|
|
340
|
+
});
|
|
341
|
+
}),
|
|
342
|
+
defineIteratorMethods(g),
|
|
343
|
+
define(g, u, "Generator"),
|
|
344
|
+
define(g, a, function () {
|
|
345
|
+
return this;
|
|
346
|
+
}),
|
|
347
|
+
define(g, "toString", function () {
|
|
348
|
+
return "[object Generator]";
|
|
349
|
+
}),
|
|
350
|
+
(e.keys = function (t) {
|
|
351
|
+
var e = Object(t),
|
|
352
|
+
r = [];
|
|
353
|
+
for (var n in e) r.push(n);
|
|
354
|
+
return (
|
|
355
|
+
r.reverse(),
|
|
356
|
+
function next() {
|
|
357
|
+
for (; r.length; ) {
|
|
358
|
+
var t = r.pop();
|
|
359
|
+
if (t in e) return (next.value = t), (next.done = !1), next;
|
|
360
|
+
}
|
|
361
|
+
return (next.done = !0), next;
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
}),
|
|
365
|
+
(e.values = values),
|
|
366
|
+
(Context.prototype = {
|
|
367
|
+
constructor: Context,
|
|
368
|
+
reset: function reset(e) {
|
|
369
|
+
if (
|
|
370
|
+
((this.prev = 0),
|
|
371
|
+
(this.next = 0),
|
|
372
|
+
(this.sent = this._sent = t),
|
|
373
|
+
(this.done = !1),
|
|
374
|
+
(this.delegate = null),
|
|
375
|
+
(this.method = "next"),
|
|
376
|
+
(this.arg = t),
|
|
377
|
+
this.tryEntries.forEach(resetTryEntry),
|
|
378
|
+
!e)
|
|
379
|
+
)
|
|
380
|
+
for (var r in this)
|
|
381
|
+
"t" === r.charAt(0) &&
|
|
382
|
+
n.call(this, r) &&
|
|
383
|
+
!isNaN(+r.slice(1)) &&
|
|
384
|
+
(this[r] = t);
|
|
385
|
+
},
|
|
386
|
+
stop: function stop() {
|
|
387
|
+
this.done = !0;
|
|
388
|
+
var t = this.tryEntries[0].completion;
|
|
389
|
+
if ("throw" === t.type) throw t.arg;
|
|
390
|
+
return this.rval;
|
|
391
|
+
},
|
|
392
|
+
dispatchException: function dispatchException(e) {
|
|
393
|
+
if (this.done) throw e;
|
|
394
|
+
var r = this;
|
|
395
|
+
function handle(n, o) {
|
|
396
|
+
return (
|
|
397
|
+
(a.type = "throw"),
|
|
398
|
+
(a.arg = e),
|
|
399
|
+
(r.next = n),
|
|
400
|
+
o && ((r.method = "next"), (r.arg = t)),
|
|
401
|
+
!!o
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
405
|
+
var i = this.tryEntries[o],
|
|
406
|
+
a = i.completion;
|
|
407
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
408
|
+
if (i.tryLoc <= this.prev) {
|
|
409
|
+
var c = n.call(i, "catchLoc"),
|
|
410
|
+
u = n.call(i, "finallyLoc");
|
|
411
|
+
if (c && u) {
|
|
412
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
413
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
414
|
+
} else if (c) {
|
|
415
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
416
|
+
} else {
|
|
417
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
418
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
abrupt: function abrupt(t, e) {
|
|
424
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
425
|
+
var o = this.tryEntries[r];
|
|
426
|
+
if (
|
|
427
|
+
o.tryLoc <= this.prev &&
|
|
428
|
+
n.call(o, "finallyLoc") &&
|
|
429
|
+
this.prev < o.finallyLoc
|
|
430
|
+
) {
|
|
431
|
+
var i = o;
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
i &&
|
|
436
|
+
("break" === t || "continue" === t) &&
|
|
437
|
+
i.tryLoc <= e &&
|
|
438
|
+
e <= i.finallyLoc &&
|
|
439
|
+
(i = null);
|
|
440
|
+
var a = i ? i.completion : {};
|
|
441
|
+
return (
|
|
442
|
+
(a.type = t),
|
|
443
|
+
(a.arg = e),
|
|
444
|
+
i
|
|
445
|
+
? ((this.method = "next"), (this.next = i.finallyLoc), y)
|
|
446
|
+
: this.complete(a)
|
|
447
|
+
);
|
|
448
|
+
},
|
|
449
|
+
complete: function complete(t, e) {
|
|
450
|
+
if ("throw" === t.type) throw t.arg;
|
|
451
|
+
return (
|
|
452
|
+
"break" === t.type || "continue" === t.type
|
|
453
|
+
? (this.next = t.arg)
|
|
454
|
+
: "return" === t.type
|
|
455
|
+
? ((this.rval = this.arg = t.arg),
|
|
456
|
+
(this.method = "return"),
|
|
457
|
+
(this.next = "end"))
|
|
458
|
+
: "normal" === t.type && e && (this.next = e),
|
|
459
|
+
y
|
|
460
|
+
);
|
|
461
|
+
},
|
|
462
|
+
finish: function finish(t) {
|
|
463
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
464
|
+
var r = this.tryEntries[e];
|
|
465
|
+
if (r.finallyLoc === t)
|
|
466
|
+
return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
catch: function _catch(t) {
|
|
470
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
471
|
+
var r = this.tryEntries[e];
|
|
472
|
+
if (r.tryLoc === t) {
|
|
473
|
+
var n = r.completion;
|
|
474
|
+
if ("throw" === n.type) {
|
|
475
|
+
var o = n.arg;
|
|
476
|
+
resetTryEntry(r);
|
|
477
|
+
}
|
|
478
|
+
return o;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
throw new Error("illegal catch attempt");
|
|
482
|
+
},
|
|
483
|
+
delegateYield: function delegateYield(e, r, n) {
|
|
484
|
+
return (
|
|
485
|
+
(this.delegate = { iterator: values(e), resultName: r, nextLoc: n }),
|
|
486
|
+
"next" === this.method && (this.arg = t),
|
|
487
|
+
y
|
|
488
|
+
);
|
|
489
|
+
},
|
|
490
|
+
}),
|
|
491
|
+
e
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
function ownKeys(e, r) {
|
|
495
|
+
var t = Object.keys(e);
|
|
496
|
+
if (Object.getOwnPropertySymbols) {
|
|
497
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
498
|
+
r &&
|
|
499
|
+
(o = o.filter(function (r) {
|
|
500
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
501
|
+
})),
|
|
502
|
+
t.push.apply(t, o);
|
|
503
|
+
}
|
|
504
|
+
return t;
|
|
505
|
+
}
|
|
506
|
+
function _objectSpread(e) {
|
|
507
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
508
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
509
|
+
r % 2
|
|
510
|
+
? ownKeys(Object(t), !0).forEach(function (r) {
|
|
511
|
+
_defineProperty(e, r, t[r]);
|
|
512
|
+
})
|
|
513
|
+
: Object.getOwnPropertyDescriptors
|
|
514
|
+
? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t))
|
|
515
|
+
: ownKeys(Object(t)).forEach(function (r) {
|
|
516
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
return e;
|
|
520
|
+
}
|
|
521
|
+
function _defineProperty(obj, key, value) {
|
|
522
|
+
key = _toPropertyKey(key);
|
|
523
|
+
if (key in obj) {
|
|
524
|
+
Object.defineProperty(obj, key, {
|
|
525
|
+
value: value,
|
|
526
|
+
enumerable: true,
|
|
527
|
+
configurable: true,
|
|
528
|
+
writable: true,
|
|
529
|
+
});
|
|
530
|
+
} else {
|
|
531
|
+
obj[key] = value;
|
|
532
|
+
}
|
|
533
|
+
return obj;
|
|
534
|
+
}
|
|
535
|
+
function _toPropertyKey(t) {
|
|
536
|
+
var i = _toPrimitive(t, "string");
|
|
537
|
+
return "symbol" == _typeof(i) ? i : String(i);
|
|
538
|
+
}
|
|
539
|
+
function _toPrimitive(t, r) {
|
|
540
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
541
|
+
var e = t[Symbol.toPrimitive];
|
|
542
|
+
if (void 0 !== e) {
|
|
543
|
+
var i = e.call(t, r || "default");
|
|
544
|
+
if ("object" != _typeof(i)) return i;
|
|
545
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
546
|
+
}
|
|
547
|
+
return ("string" === r ? String : Number)(t);
|
|
548
|
+
}
|
|
549
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
550
|
+
try {
|
|
551
|
+
var info = gen[key](arg);
|
|
552
|
+
var value = info.value;
|
|
553
|
+
} catch (error) {
|
|
554
|
+
reject(error);
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
if (info.done) {
|
|
558
|
+
resolve(value);
|
|
559
|
+
} else {
|
|
560
|
+
Promise.resolve(value).then(_next, _throw);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
function _asyncToGenerator(fn) {
|
|
564
|
+
return function () {
|
|
565
|
+
var self = this,
|
|
566
|
+
args = arguments;
|
|
567
|
+
return new Promise(function (resolve, reject) {
|
|
568
|
+
var gen = fn.apply(self, args);
|
|
569
|
+
function _next(value) {
|
|
570
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
571
|
+
}
|
|
572
|
+
function _throw(err) {
|
|
573
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
574
|
+
}
|
|
575
|
+
_next(undefined);
|
|
576
|
+
});
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
function _slicedToArray(arr, i) {
|
|
580
|
+
return (
|
|
581
|
+
_arrayWithHoles(arr) ||
|
|
582
|
+
_iterableToArrayLimit(arr, i) ||
|
|
583
|
+
_unsupportedIterableToArray(arr, i) ||
|
|
584
|
+
_nonIterableRest()
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
function _nonIterableRest() {
|
|
588
|
+
throw new TypeError(
|
|
589
|
+
"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
593
|
+
if (!o) return;
|
|
594
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
595
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
596
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
597
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
598
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
599
|
+
return _arrayLikeToArray(o, minLen);
|
|
600
|
+
}
|
|
601
|
+
function _arrayLikeToArray(arr, len) {
|
|
602
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
603
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
604
|
+
return arr2;
|
|
605
|
+
}
|
|
606
|
+
function _iterableToArrayLimit(r, l) {
|
|
607
|
+
var t =
|
|
608
|
+
null == r
|
|
609
|
+
? null
|
|
610
|
+
: ("undefined" != typeof Symbol && r[Symbol.iterator]) || r["@@iterator"];
|
|
611
|
+
if (null != t) {
|
|
612
|
+
var e,
|
|
613
|
+
n,
|
|
614
|
+
i,
|
|
615
|
+
u,
|
|
616
|
+
a = [],
|
|
617
|
+
f = !0,
|
|
618
|
+
o = !1;
|
|
619
|
+
try {
|
|
620
|
+
if (((i = (t = t.call(r)).next), 0 === l)) {
|
|
621
|
+
if (Object(t) !== t) return;
|
|
622
|
+
f = !1;
|
|
623
|
+
} else
|
|
624
|
+
for (
|
|
625
|
+
;
|
|
626
|
+
!(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l);
|
|
627
|
+
f = !0
|
|
628
|
+
);
|
|
629
|
+
} catch (r) {
|
|
630
|
+
(o = !0), (n = r);
|
|
631
|
+
} finally {
|
|
632
|
+
try {
|
|
633
|
+
if (!f && null != t.return && ((u = t.return()), Object(u) !== u))
|
|
634
|
+
return;
|
|
635
|
+
} finally {
|
|
636
|
+
if (o) throw n;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
return a;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
function _arrayWithHoles(arr) {
|
|
643
|
+
if (Array.isArray(arr)) return arr;
|
|
644
|
+
}
|
|
645
|
+
/*
|
|
646
|
+
* @Date: 2023-05-08 13:49:30
|
|
647
|
+
* @description:
|
|
648
|
+
* @author chenchangfu
|
|
649
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
650
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
30
651
|
*/
|
|
31
652
|
// import { crossContext } from "@/my-context";
|
|
32
653
|
// import { initLang } from "@/utils/language";
|
|
33
|
-
import {
|
|
34
|
-
|
|
654
|
+
import {
|
|
655
|
+
CopyOutlined,
|
|
656
|
+
DeleteOutlined,
|
|
657
|
+
PlusOutlined,
|
|
658
|
+
SettingOutlined,
|
|
659
|
+
ShareAltOutlined,
|
|
660
|
+
UserOutlined,
|
|
661
|
+
} from "@ant-design/icons";
|
|
662
|
+
import {
|
|
663
|
+
Button,
|
|
664
|
+
Checkbox,
|
|
665
|
+
Input,
|
|
666
|
+
message,
|
|
667
|
+
Popconfirm,
|
|
668
|
+
Popover,
|
|
669
|
+
Radio,
|
|
670
|
+
Tooltip,
|
|
671
|
+
Tree,
|
|
672
|
+
} from "antd";
|
|
35
673
|
import { cloneDeep, get, isArray, isEmpty } from "lodash";
|
|
36
674
|
import React, { memo, useEffect, useMemo, useState } from "react";
|
|
37
675
|
import { DndProvider } from "react-dnd";
|
|
38
676
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
39
|
-
import Dustbin from "./Dustbin";
|
|
40
677
|
import "../../style/components/TableHeaderConfigPopover.scss";
|
|
41
678
|
import { initLang } from "../utils/language";
|
|
42
679
|
import { queryColumnsConfig, setFormTemplates } from "../utils/services/global";
|
|
680
|
+
import Dustbin from "./Dustbin";
|
|
43
681
|
import { adapterColumns, sortColums } from "./utils";
|
|
44
682
|
// 设置界面
|
|
45
|
-
var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
683
|
+
var ColumnsToolbarRender = /*#__PURE__*/ memo(function (props) {
|
|
46
684
|
var columns = props.columns,
|
|
47
685
|
updateColumns = props.updateColumns,
|
|
48
686
|
newColumns = props.newColumns,
|
|
@@ -63,39 +701,57 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
63
701
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
64
702
|
templateName = _useState6[0],
|
|
65
703
|
setTemplateName = _useState6[1];
|
|
66
|
-
useEffect(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
704
|
+
useEffect(
|
|
705
|
+
function () {
|
|
706
|
+
var _props$editItem, _props$editItem2;
|
|
707
|
+
setTemplateName(
|
|
708
|
+
(_props$editItem = props.editItem) === null ||
|
|
709
|
+
_props$editItem === void 0
|
|
710
|
+
? void 0
|
|
711
|
+
: _props$editItem.label,
|
|
712
|
+
);
|
|
713
|
+
setPermsType(
|
|
714
|
+
((_props$editItem2 = props.editItem) === null ||
|
|
715
|
+
_props$editItem2 === void 0
|
|
716
|
+
? void 0
|
|
717
|
+
: _props$editItem2.perms_type) || "private",
|
|
718
|
+
);
|
|
719
|
+
},
|
|
720
|
+
[props.editItem],
|
|
721
|
+
);
|
|
722
|
+
var saveTempale = /*#__PURE__*/ (function () {
|
|
723
|
+
var _ref = _asyncToGenerator(
|
|
724
|
+
/*#__PURE__*/ _regeneratorRuntime().mark(function _callee(params) {
|
|
725
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
726
|
+
while (1)
|
|
727
|
+
switch ((_context.prev = _context.next)) {
|
|
728
|
+
case 0:
|
|
729
|
+
if (!(props !== null && props !== void 0 && props.saveColumn)) {
|
|
730
|
+
_context.next = 6;
|
|
731
|
+
break;
|
|
732
|
+
}
|
|
733
|
+
_context.next = 3;
|
|
734
|
+
return props === null || props === void 0
|
|
735
|
+
? void 0
|
|
736
|
+
: props.saveColumn(params);
|
|
737
|
+
case 3:
|
|
738
|
+
return _context.abrupt("return", _context.sent);
|
|
739
|
+
case 6:
|
|
740
|
+
_context.next = 8;
|
|
741
|
+
return setFormTemplates(_objectSpread({}, params));
|
|
742
|
+
case 8:
|
|
743
|
+
return _context.abrupt("return", _context.sent);
|
|
744
|
+
case 9:
|
|
745
|
+
case "end":
|
|
746
|
+
return _context.stop();
|
|
79
747
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return _context.abrupt("return", _context.sent);
|
|
84
|
-
case 6:
|
|
85
|
-
_context.next = 8;
|
|
86
|
-
return setFormTemplates(_objectSpread({}, params));
|
|
87
|
-
case 8:
|
|
88
|
-
return _context.abrupt("return", _context.sent);
|
|
89
|
-
case 9:
|
|
90
|
-
case "end":
|
|
91
|
-
return _context.stop();
|
|
92
|
-
}
|
|
93
|
-
}, _callee);
|
|
94
|
-
}));
|
|
748
|
+
}, _callee);
|
|
749
|
+
}),
|
|
750
|
+
);
|
|
95
751
|
return function saveTempale(_x) {
|
|
96
752
|
return _ref.apply(this, arguments);
|
|
97
753
|
};
|
|
98
|
-
}();
|
|
754
|
+
})();
|
|
99
755
|
var loopColumns = function loopColumns(arr, firstLoop) {
|
|
100
756
|
return arr.map(function (field) {
|
|
101
757
|
// if (firstLoop && field.defaultDisplay === false) {
|
|
@@ -103,28 +759,41 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
103
759
|
// setIndeterminate(true);
|
|
104
760
|
// }
|
|
105
761
|
|
|
106
|
-
return _objectSpread(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
762
|
+
return _objectSpread(
|
|
763
|
+
_objectSpread({}, field),
|
|
764
|
+
{},
|
|
765
|
+
{
|
|
766
|
+
dataIndex: field.dataIndex || field.code,
|
|
767
|
+
title: field.title || field.label,
|
|
768
|
+
checked:
|
|
769
|
+
typeof field.checked === "boolean"
|
|
770
|
+
? field.checked
|
|
771
|
+
: field.defaultDisplay == false
|
|
772
|
+
? false
|
|
773
|
+
: true,
|
|
774
|
+
fixed: field.fixed,
|
|
775
|
+
width: field.width,
|
|
776
|
+
children: field.children ? loopColumns(field.children) : null,
|
|
777
|
+
},
|
|
778
|
+
);
|
|
114
779
|
});
|
|
115
780
|
};
|
|
116
|
-
useEffect(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
781
|
+
useEffect(
|
|
782
|
+
function () {
|
|
783
|
+
if (!columns) return;
|
|
784
|
+
// setCheckAll(true);
|
|
785
|
+
// console.log("组件内部:", columns);
|
|
786
|
+
var _columns = columns.filter(function (item) {
|
|
787
|
+
return item.visitable !== false;
|
|
788
|
+
});
|
|
789
|
+
var nextColumnsTree = loopColumns(_columns, true);
|
|
790
|
+
setColumnsTree(nextColumnsTree);
|
|
791
|
+
},
|
|
792
|
+
[columns],
|
|
793
|
+
);
|
|
126
794
|
var flatColumns = function flatColumns(_columns) {
|
|
127
|
-
var isAll =
|
|
795
|
+
var isAll =
|
|
796
|
+
arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
128
797
|
var initArr = [];
|
|
129
798
|
var flatArr = function flatArr(arr) {
|
|
130
799
|
arr.forEach(function (item) {
|
|
@@ -158,7 +827,10 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
158
827
|
|
|
159
828
|
// 禁止跨层级拖拽 模板 和更新的数据匹配渲染问题, 渲染时也只匹配同级增删改
|
|
160
829
|
// 修复 模板存储 a下的b, 新表头b在c下面 并改名d
|
|
161
|
-
if (
|
|
830
|
+
if (
|
|
831
|
+
(node.parentCode || dragNode.parentCode) &&
|
|
832
|
+
node.parentCode !== dragNode.parentCode
|
|
833
|
+
) {
|
|
162
834
|
message.warning("不允许改变层级");
|
|
163
835
|
return;
|
|
164
836
|
}
|
|
@@ -210,9 +882,17 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
210
882
|
return f.dataIndex === item.dataIndex;
|
|
211
883
|
});
|
|
212
884
|
if (findItem) {
|
|
213
|
-
if (
|
|
885
|
+
if (
|
|
886
|
+
!checkedKeys.includes(
|
|
887
|
+
item === null || item === void 0 ? void 0 : item.dataIndex,
|
|
888
|
+
)
|
|
889
|
+
) {
|
|
214
890
|
item.checked = false;
|
|
215
|
-
if (
|
|
891
|
+
if (
|
|
892
|
+
_toConsumableArray(halfCheckedKeys).includes(
|
|
893
|
+
item === null || item === void 0 ? void 0 : item.dataIndex,
|
|
894
|
+
)
|
|
895
|
+
) {
|
|
216
896
|
item.parentChecked = true;
|
|
217
897
|
} else {
|
|
218
898
|
if (isArray(item.children)) {
|
|
@@ -271,7 +951,7 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
271
951
|
var nextColumnsTree = cloneDeep(columnsTree);
|
|
272
952
|
var findObj = {
|
|
273
953
|
findColumns: null,
|
|
274
|
-
indexs: []
|
|
954
|
+
indexs: [],
|
|
275
955
|
};
|
|
276
956
|
loopFind(nextColumnsTree, key, findObj);
|
|
277
957
|
var findColumns = findObj.findColumns;
|
|
@@ -343,19 +1023,27 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
343
1023
|
// },
|
|
344
1024
|
// [[], [], []],
|
|
345
1025
|
// );
|
|
346
|
-
var loopSplitFixed = function loopSplitFixed(
|
|
1026
|
+
var loopSplitFixed = function loopSplitFixed(
|
|
1027
|
+
_columnsTree,
|
|
1028
|
+
fixed,
|
|
1029
|
+
parent,
|
|
1030
|
+
parentArr,
|
|
1031
|
+
) {
|
|
347
1032
|
var _loop = function _loop() {
|
|
348
1033
|
var col = _columnsTree[i];
|
|
349
1034
|
var child = col.children || [];
|
|
350
1035
|
col.children = [];
|
|
351
1036
|
if (col.fixed == "left" || col.fixed === true) {
|
|
352
|
-
if (parent && parentArr && !parentArr[0].title)
|
|
1037
|
+
if (parent && parentArr && !parentArr[0].title)
|
|
1038
|
+
parentArr[0]._parent = parent;
|
|
353
1039
|
fixed[0].push(col);
|
|
354
1040
|
} else if (col.fixed == "right") {
|
|
355
|
-
if (parent && parentArr && !parentArr[2].title)
|
|
1041
|
+
if (parent && parentArr && !parentArr[2].title)
|
|
1042
|
+
parentArr[2]._parent = parent;
|
|
356
1043
|
fixed[2].push(col);
|
|
357
1044
|
} else {
|
|
358
|
-
if (parent && parentArr && !parentArr[1].title)
|
|
1045
|
+
if (parent && parentArr && !parentArr[1].title)
|
|
1046
|
+
parentArr[1]._parent = parent;
|
|
359
1047
|
fixed[1].push(col);
|
|
360
1048
|
}
|
|
361
1049
|
|
|
@@ -364,7 +1052,7 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
364
1052
|
fixed.forEach(function (items) {
|
|
365
1053
|
if (!items.length) {
|
|
366
1054
|
items.push({
|
|
367
|
-
children: []
|
|
1055
|
+
children: [],
|
|
368
1056
|
});
|
|
369
1057
|
} else {
|
|
370
1058
|
var has = false;
|
|
@@ -373,7 +1061,7 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
373
1061
|
});
|
|
374
1062
|
if (!has) {
|
|
375
1063
|
items.push({
|
|
376
|
-
children: []
|
|
1064
|
+
children: [],
|
|
377
1065
|
});
|
|
378
1066
|
}
|
|
379
1067
|
}
|
|
@@ -382,7 +1070,11 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
382
1070
|
// if (!fixed[1].length) fixed[1].push({ children: [] });
|
|
383
1071
|
// if (!fixed[2].length) fixed[2].push({ children: [] });
|
|
384
1072
|
|
|
385
|
-
var arr2 = [
|
|
1073
|
+
var arr2 = [
|
|
1074
|
+
fixed[0][fixed[0].length - 1],
|
|
1075
|
+
fixed[1][fixed[1].length - 1],
|
|
1076
|
+
fixed[2][fixed[2].length - 1],
|
|
1077
|
+
];
|
|
386
1078
|
var arr = [arr2[0].children, arr2[1].children, arr2[2].children];
|
|
387
1079
|
loopSplitFixed(child, arr, col, arr2);
|
|
388
1080
|
}
|
|
@@ -393,35 +1085,44 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
393
1085
|
};
|
|
394
1086
|
var loopClearChild = function loopClearChild(fixeds) {
|
|
395
1087
|
for (var i = 0, l = fixeds.length; i < l; i++) {
|
|
396
|
-
if (
|
|
1088
|
+
if (
|
|
1089
|
+
!fixeds[i]._parent &&
|
|
1090
|
+
!(fixeds[i].code || fixeds[i].title || fixeds[i].index)
|
|
1091
|
+
) {
|
|
397
1092
|
fixeds.splice(i, 1);
|
|
398
1093
|
l = l - 1;
|
|
399
1094
|
i = i - 1;
|
|
400
1095
|
} else {
|
|
401
1096
|
if (fixeds[i]._parent) {
|
|
402
|
-
fixeds[i] = _objectSpread(
|
|
1097
|
+
fixeds[i] = _objectSpread(
|
|
1098
|
+
_objectSpread({}, fixeds[i]._parent),
|
|
1099
|
+
fixeds[i],
|
|
1100
|
+
);
|
|
403
1101
|
delete fixeds[i]._parent;
|
|
404
1102
|
}
|
|
405
1103
|
}
|
|
406
1104
|
}
|
|
407
1105
|
};
|
|
408
|
-
var _useMemo = useMemo(
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
1106
|
+
var _useMemo = useMemo(
|
|
1107
|
+
function () {
|
|
1108
|
+
var fixed = [[], [], []];
|
|
1109
|
+
if (isEmpty(columnsTree)) return fixed;
|
|
1110
|
+
var _tree = cloneDeep(columnsTree);
|
|
1111
|
+
loopSplitFixed(_tree, fixed);
|
|
413
1112
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
1113
|
+
// 处理空children
|
|
1114
|
+
loopClearChild(fixed[0]);
|
|
1115
|
+
loopClearChild(fixed[1]);
|
|
1116
|
+
loopClearChild(fixed[2]);
|
|
418
1117
|
|
|
419
|
-
|
|
420
|
-
|
|
1118
|
+
// console.log("fixed", fixed);
|
|
1119
|
+
// debugger;
|
|
421
1120
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
1121
|
+
return fixed;
|
|
1122
|
+
// return [[], [], []];
|
|
1123
|
+
},
|
|
1124
|
+
[columnsTree],
|
|
1125
|
+
),
|
|
425
1126
|
_useMemo2 = _slicedToArray(_useMemo, 3),
|
|
426
1127
|
leftFixed = _useMemo2[0],
|
|
427
1128
|
unFixed = _useMemo2[1],
|
|
@@ -429,55 +1130,70 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
429
1130
|
var changeInput = function changeInput(e) {
|
|
430
1131
|
setTemplateName(e.target.value);
|
|
431
1132
|
};
|
|
432
|
-
var saveColums = /*#__PURE__*/function () {
|
|
433
|
-
var _ref3 = _asyncToGenerator(
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
1133
|
+
var saveColums = /*#__PURE__*/ (function () {
|
|
1134
|
+
var _ref3 = _asyncToGenerator(
|
|
1135
|
+
/*#__PURE__*/ _regeneratorRuntime().mark(function _callee2() {
|
|
1136
|
+
var _props$editItem3, _props$editItem4, _props$handleSaveCall;
|
|
1137
|
+
var params;
|
|
1138
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1139
|
+
while (1)
|
|
1140
|
+
switch ((_context2.prev = _context2.next)) {
|
|
1141
|
+
case 0:
|
|
1142
|
+
if (templateName) {
|
|
1143
|
+
_context2.next = 3;
|
|
1144
|
+
break;
|
|
1145
|
+
}
|
|
1146
|
+
message.warning(
|
|
1147
|
+
initLang({
|
|
1148
|
+
id: "prompt.placeholderTemplate",
|
|
1149
|
+
}),
|
|
1150
|
+
);
|
|
1151
|
+
return _context2.abrupt("return");
|
|
1152
|
+
case 3:
|
|
1153
|
+
params = {
|
|
1154
|
+
name: templateName,
|
|
1155
|
+
is_default:
|
|
1156
|
+
((_props$editItem3 = props.editItem) === null ||
|
|
1157
|
+
_props$editItem3 === void 0
|
|
1158
|
+
? void 0
|
|
1159
|
+
: _props$editItem3.is_default) || "N",
|
|
1160
|
+
configs: JSON.stringify(columnsTree),
|
|
1161
|
+
menu_code: props.menuCode,
|
|
1162
|
+
form_template_code: props.formTemplateCode,
|
|
1163
|
+
perms_type: permsType || "private",
|
|
1164
|
+
// public
|
|
1165
|
+
code:
|
|
1166
|
+
((_props$editItem4 = props.editItem) === null ||
|
|
1167
|
+
_props$editItem4 === void 0
|
|
1168
|
+
? void 0
|
|
1169
|
+
: _props$editItem4.value) || null,
|
|
1170
|
+
query_type: props.crossQuery ? "cross" : "list",
|
|
1171
|
+
};
|
|
1172
|
+
_context2.next = 6;
|
|
1173
|
+
return saveTempale(params);
|
|
1174
|
+
case 6:
|
|
1175
|
+
// if (props?.saveColumn) {
|
|
1176
|
+
// await props?.saveColumn(params);s
|
|
1177
|
+
// } else {
|
|
1178
|
+
// await setFormTemplates({
|
|
1179
|
+
// ...params,
|
|
1180
|
+
// });
|
|
1181
|
+
// }
|
|
469
1182
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
1183
|
+
(_props$handleSaveCall = props.handleSaveCallback) === null ||
|
|
1184
|
+
_props$handleSaveCall === void 0 ||
|
|
1185
|
+
_props$handleSaveCall.call(props);
|
|
1186
|
+
case 7:
|
|
1187
|
+
case "end":
|
|
1188
|
+
return _context2.stop();
|
|
1189
|
+
}
|
|
1190
|
+
}, _callee2);
|
|
1191
|
+
}),
|
|
1192
|
+
);
|
|
477
1193
|
return function saveColums() {
|
|
478
1194
|
return _ref3.apply(this, arguments);
|
|
479
1195
|
};
|
|
480
|
-
}();
|
|
1196
|
+
})();
|
|
481
1197
|
|
|
482
1198
|
// 保存
|
|
483
1199
|
var handleSave = function handleSave() {
|
|
@@ -485,201 +1201,318 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
485
1201
|
};
|
|
486
1202
|
var titleChildren = function titleChildren(children, showArrows) {
|
|
487
1203
|
if (!children) return null;
|
|
488
|
-
return children === null || children === void 0
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
1204
|
+
return children === null || children === void 0
|
|
1205
|
+
? void 0
|
|
1206
|
+
: children.map(function (d) {
|
|
1207
|
+
return {
|
|
1208
|
+
key: d.dataIndex,
|
|
1209
|
+
disabled: d.customizable === false,
|
|
1210
|
+
title:
|
|
1211
|
+
d.customizable === false
|
|
1212
|
+
? d.title
|
|
1213
|
+
: /*#__PURE__*/ React.createElement(Dustbin, {
|
|
1214
|
+
item: d,
|
|
1215
|
+
onChange: changeTableHeader,
|
|
1216
|
+
onFixed: onFixed,
|
|
1217
|
+
// showArrows={showArrows}
|
|
1218
|
+
onDrop: d.customizable === false ? null : onDrop, // 子动态列 不能拖拽
|
|
1219
|
+
}),
|
|
1220
|
+
children: titleChildren(d.children, showArrows),
|
|
1221
|
+
};
|
|
1222
|
+
});
|
|
503
1223
|
};
|
|
504
|
-
var _useMemo3 = useMemo(
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
1224
|
+
var _useMemo3 = useMemo(
|
|
1225
|
+
function () {
|
|
1226
|
+
var _checkAll = true; // 全选
|
|
1227
|
+
var _deCheckAll = true; // 全不选
|
|
1228
|
+
var _indeterminate = false; // 半选
|
|
1229
|
+
var _flatColumns = flatColumns(columnsTree, true);
|
|
1230
|
+
for (var i = 0, l = _flatColumns.length; i < l; i++) {
|
|
1231
|
+
if (!_flatColumns[i].checked) {
|
|
1232
|
+
_checkAll = false;
|
|
1233
|
+
} else {
|
|
1234
|
+
_deCheckAll = false;
|
|
1235
|
+
_indeterminate = true;
|
|
1236
|
+
}
|
|
1237
|
+
if (!_checkAll && !_deCheckAll && _indeterminate) break;
|
|
515
1238
|
}
|
|
516
|
-
if (
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
1239
|
+
if (_checkAll) _indeterminate = false;
|
|
1240
|
+
return [_checkAll, _indeterminate];
|
|
1241
|
+
},
|
|
1242
|
+
[columnsTree],
|
|
1243
|
+
),
|
|
521
1244
|
_useMemo4 = _slicedToArray(_useMemo3, 2),
|
|
522
1245
|
checkAll = _useMemo4[0],
|
|
523
1246
|
indeterminate = _useMemo4[1];
|
|
524
|
-
return /*#__PURE__*/
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
},
|
|
536
|
-
onChange: function onChange(e) {
|
|
537
|
-
setPermsType(e.target.value);
|
|
538
|
-
},
|
|
539
|
-
value: permsType
|
|
540
|
-
}, /*#__PURE__*/React.createElement(Radio, {
|
|
541
|
-
value: "private"
|
|
542
|
-
}, initLang({
|
|
543
|
-
id: "prompt.personalTemplate"
|
|
544
|
-
})), /*#__PURE__*/React.createElement(Radio, {
|
|
545
|
-
value: "public"
|
|
546
|
-
}, initLang({
|
|
547
|
-
id: "prompt.publicTemplate"
|
|
548
|
-
})))), /*#__PURE__*/React.createElement(DndProvider, {
|
|
549
|
-
backend: HTML5Backend
|
|
550
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
551
|
-
style: {
|
|
552
|
-
display: "flex",
|
|
553
|
-
flexDirection: "column"
|
|
554
|
-
}
|
|
555
|
-
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
556
|
-
key: columns === null || columns === void 0 ? void 0 : columns.length
|
|
557
|
-
// checked={checkAll}
|
|
558
|
-
,
|
|
559
|
-
checked: checkAll,
|
|
560
|
-
indeterminate: indeterminate,
|
|
561
|
-
onChange: selectAllChange,
|
|
562
|
-
className: "tree_selectall"
|
|
563
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
564
|
-
style: {
|
|
565
|
-
color: "#0273b0"
|
|
566
|
-
}
|
|
567
|
-
}, initLang({
|
|
568
|
-
id: "app.search.modal.selectAll"
|
|
569
|
-
}))), !!leftFixed.length && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
570
|
-
className: "columns-fixed-title"
|
|
571
|
-
}, initLang({
|
|
572
|
-
id: "prompt.fixed.left"
|
|
573
|
-
})), /*#__PURE__*/React.createElement(Tree, {
|
|
574
|
-
blockNode: true,
|
|
575
|
-
checkable: true,
|
|
576
|
-
showLine: true,
|
|
577
|
-
checkedKeys: flatColumns(leftFixed, true).filter(function (col) {
|
|
578
|
-
return col.checked;
|
|
579
|
-
}).map(function (col) {
|
|
580
|
-
return col.dataIndex;
|
|
581
|
-
}),
|
|
582
|
-
onCheck: function onCheck(checkedKeys, event) {
|
|
583
|
-
return _onCheck(leftFixed, checkedKeys, event);
|
|
584
|
-
},
|
|
585
|
-
treeData: leftFixed === null || leftFixed === void 0 ? void 0 : leftFixed.map(function (c) {
|
|
586
|
-
return {
|
|
587
|
-
key: c.dataIndex,
|
|
588
|
-
disabled: c.customizable === false,
|
|
589
|
-
title: c.customizable === false ? c.title : /*#__PURE__*/React.createElement(Dustbin, {
|
|
590
|
-
item: c,
|
|
591
|
-
onDrop: onDrop,
|
|
592
|
-
onFixed: onFixed,
|
|
593
|
-
showArrows: ["center", "down"],
|
|
594
|
-
onChange: changeTableHeader,
|
|
595
|
-
isRoot: c.children && c.children.length
|
|
1247
|
+
return /*#__PURE__*/ React.createElement(
|
|
1248
|
+
"div",
|
|
1249
|
+
null,
|
|
1250
|
+
/*#__PURE__*/ React.createElement(
|
|
1251
|
+
"div",
|
|
1252
|
+
{
|
|
1253
|
+
className: "mode-name-wrap",
|
|
1254
|
+
},
|
|
1255
|
+
/*#__PURE__*/ React.createElement(Input, {
|
|
1256
|
+
placeholder: initLang({
|
|
1257
|
+
id: "prompt.placeholderTemplate",
|
|
596
1258
|
}),
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
1259
|
+
value: templateName,
|
|
1260
|
+
onChange: changeInput,
|
|
1261
|
+
}),
|
|
1262
|
+
/*#__PURE__*/ React.createElement(
|
|
1263
|
+
Radio.Group,
|
|
1264
|
+
{
|
|
1265
|
+
style: {
|
|
1266
|
+
paddingTop: 6,
|
|
1267
|
+
},
|
|
1268
|
+
onChange: function onChange(e) {
|
|
1269
|
+
setPermsType(e.target.value);
|
|
1270
|
+
},
|
|
1271
|
+
value: permsType,
|
|
1272
|
+
},
|
|
1273
|
+
/*#__PURE__*/ React.createElement(
|
|
1274
|
+
Radio,
|
|
1275
|
+
{
|
|
1276
|
+
value: "private",
|
|
1277
|
+
},
|
|
1278
|
+
initLang({
|
|
1279
|
+
id: "prompt.personalTemplate",
|
|
1280
|
+
}),
|
|
1281
|
+
),
|
|
1282
|
+
/*#__PURE__*/ React.createElement(
|
|
1283
|
+
Radio,
|
|
1284
|
+
{
|
|
1285
|
+
value: "public",
|
|
1286
|
+
},
|
|
1287
|
+
initLang({
|
|
1288
|
+
id: "prompt.publicTemplate",
|
|
1289
|
+
}),
|
|
1290
|
+
),
|
|
1291
|
+
),
|
|
1292
|
+
),
|
|
1293
|
+
/*#__PURE__*/ React.createElement(
|
|
1294
|
+
DndProvider,
|
|
1295
|
+
{
|
|
1296
|
+
backend: HTML5Backend,
|
|
1297
|
+
},
|
|
1298
|
+
/*#__PURE__*/ React.createElement(
|
|
1299
|
+
"div",
|
|
1300
|
+
{
|
|
1301
|
+
style: {
|
|
1302
|
+
display: "flex",
|
|
1303
|
+
flexDirection: "column",
|
|
1304
|
+
},
|
|
1305
|
+
},
|
|
1306
|
+
/*#__PURE__*/ React.createElement(
|
|
1307
|
+
Checkbox,
|
|
1308
|
+
{
|
|
1309
|
+
key:
|
|
1310
|
+
columns === null || columns === void 0 ? void 0 : columns.length,
|
|
1311
|
+
// checked={checkAll}
|
|
1312
|
+
checked: checkAll,
|
|
1313
|
+
indeterminate: indeterminate,
|
|
1314
|
+
onChange: selectAllChange,
|
|
1315
|
+
className: "tree_selectall",
|
|
1316
|
+
},
|
|
1317
|
+
/*#__PURE__*/ React.createElement(
|
|
1318
|
+
"span",
|
|
1319
|
+
{
|
|
1320
|
+
style: {
|
|
1321
|
+
color: "#0273b0",
|
|
1322
|
+
},
|
|
1323
|
+
},
|
|
1324
|
+
initLang({
|
|
1325
|
+
id: "app.search.modal.selectAll",
|
|
1326
|
+
}),
|
|
1327
|
+
),
|
|
1328
|
+
),
|
|
1329
|
+
!!leftFixed.length &&
|
|
1330
|
+
/*#__PURE__*/ React.createElement(
|
|
1331
|
+
"div",
|
|
1332
|
+
null,
|
|
1333
|
+
/*#__PURE__*/ React.createElement(
|
|
1334
|
+
"div",
|
|
1335
|
+
{
|
|
1336
|
+
className: "columns-fixed-title",
|
|
1337
|
+
},
|
|
1338
|
+
initLang({
|
|
1339
|
+
id: "prompt.fixed.left",
|
|
1340
|
+
}),
|
|
1341
|
+
),
|
|
1342
|
+
/*#__PURE__*/ React.createElement(Tree, {
|
|
1343
|
+
blockNode: true,
|
|
1344
|
+
checkable: true,
|
|
1345
|
+
showLine: true,
|
|
1346
|
+
checkedKeys: flatColumns(leftFixed, true)
|
|
1347
|
+
.filter(function (col) {
|
|
1348
|
+
return col.checked;
|
|
1349
|
+
})
|
|
1350
|
+
.map(function (col) {
|
|
1351
|
+
return col.dataIndex;
|
|
1352
|
+
}),
|
|
1353
|
+
onCheck: function onCheck(checkedKeys, event) {
|
|
1354
|
+
return _onCheck(leftFixed, checkedKeys, event);
|
|
1355
|
+
},
|
|
1356
|
+
treeData:
|
|
1357
|
+
leftFixed === null || leftFixed === void 0
|
|
1358
|
+
? void 0
|
|
1359
|
+
: leftFixed.map(function (c) {
|
|
1360
|
+
return {
|
|
1361
|
+
key: c.dataIndex,
|
|
1362
|
+
disabled: c.customizable === false,
|
|
1363
|
+
title:
|
|
1364
|
+
c.customizable === false
|
|
1365
|
+
? c.title
|
|
1366
|
+
: /*#__PURE__*/ React.createElement(Dustbin, {
|
|
1367
|
+
item: c,
|
|
1368
|
+
onDrop: onDrop,
|
|
1369
|
+
onFixed: onFixed,
|
|
1370
|
+
showArrows: ["center", "down"],
|
|
1371
|
+
onChange: changeTableHeader,
|
|
1372
|
+
isRoot: c.children && c.children.length,
|
|
1373
|
+
}),
|
|
1374
|
+
children: titleChildren(c.children, ["center", "down"]),
|
|
1375
|
+
};
|
|
1376
|
+
}),
|
|
1377
|
+
}),
|
|
1378
|
+
),
|
|
1379
|
+
/*#__PURE__*/ React.createElement(
|
|
1380
|
+
"div",
|
|
1381
|
+
null,
|
|
1382
|
+
(!!leftFixed.length || !!rightFixed.length) &&
|
|
1383
|
+
/*#__PURE__*/ React.createElement(
|
|
1384
|
+
"div",
|
|
1385
|
+
{
|
|
1386
|
+
className: "columns-fixed-title",
|
|
1387
|
+
},
|
|
1388
|
+
"\u4E0D\u56FA\u5B9A",
|
|
1389
|
+
),
|
|
1390
|
+
/*#__PURE__*/ React.createElement(Tree, {
|
|
1391
|
+
blockNode: true,
|
|
1392
|
+
checkable: true,
|
|
1393
|
+
showLine: true,
|
|
1394
|
+
rootStyle: {
|
|
1395
|
+
overflowY: "auto",
|
|
1396
|
+
maxHeight: "500px",
|
|
1397
|
+
},
|
|
1398
|
+
checkedKeys: flatColumns(unFixed, true)
|
|
1399
|
+
.filter(function (col) {
|
|
1400
|
+
return col.checked;
|
|
1401
|
+
})
|
|
1402
|
+
.map(function (col) {
|
|
1403
|
+
return col.dataIndex;
|
|
1404
|
+
}),
|
|
1405
|
+
onCheck: function onCheck(checkKey, event) {
|
|
1406
|
+
return _onCheck(unFixed, checkKey, event);
|
|
1407
|
+
},
|
|
1408
|
+
treeData:
|
|
1409
|
+
unFixed === null || unFixed === void 0
|
|
1410
|
+
? void 0
|
|
1411
|
+
: unFixed.map(function (c) {
|
|
1412
|
+
return {
|
|
1413
|
+
key: c.dataIndex,
|
|
1414
|
+
disabled: c.customizable === false,
|
|
1415
|
+
title:
|
|
1416
|
+
c.customizable === false
|
|
1417
|
+
? c.title
|
|
1418
|
+
: /*#__PURE__*/ React.createElement(Dustbin, {
|
|
1419
|
+
item: c,
|
|
1420
|
+
onDrop: onDrop,
|
|
1421
|
+
onFixed: onFixed,
|
|
1422
|
+
showArrows: ["up", "down"],
|
|
1423
|
+
onChange: changeTableHeader,
|
|
1424
|
+
isRoot: c.children && c.children.length,
|
|
1425
|
+
}),
|
|
1426
|
+
children: titleChildren(c.children, ["up", "down"]),
|
|
1427
|
+
};
|
|
1428
|
+
}),
|
|
1429
|
+
}),
|
|
1430
|
+
),
|
|
1431
|
+
!!rightFixed.length &&
|
|
1432
|
+
/*#__PURE__*/ React.createElement(
|
|
1433
|
+
"div",
|
|
1434
|
+
null,
|
|
1435
|
+
/*#__PURE__*/ React.createElement(
|
|
1436
|
+
"div",
|
|
1437
|
+
{
|
|
1438
|
+
className: "columns-fixed-title",
|
|
1439
|
+
},
|
|
1440
|
+
initLang({
|
|
1441
|
+
id: "prompt.fixed.right",
|
|
1442
|
+
}),
|
|
1443
|
+
),
|
|
1444
|
+
/*#__PURE__*/ React.createElement(Tree, {
|
|
1445
|
+
blockNode: true,
|
|
1446
|
+
checkable: true,
|
|
1447
|
+
showLine: true,
|
|
1448
|
+
checkedKeys: flatColumns(rightFixed, true)
|
|
1449
|
+
.filter(function (col) {
|
|
1450
|
+
return col.checked;
|
|
1451
|
+
})
|
|
1452
|
+
.map(function (col) {
|
|
1453
|
+
return col.dataIndex;
|
|
1454
|
+
}),
|
|
1455
|
+
onCheck: function onCheck(checkKeys, event) {
|
|
1456
|
+
return _onCheck(rightFixed, checkKeys, event);
|
|
1457
|
+
},
|
|
1458
|
+
treeData:
|
|
1459
|
+
rightFixed === null || rightFixed === void 0
|
|
1460
|
+
? void 0
|
|
1461
|
+
: rightFixed.map(function (c) {
|
|
1462
|
+
return {
|
|
1463
|
+
key: c.dataIndex,
|
|
1464
|
+
disabled: c.customizable === false,
|
|
1465
|
+
title:
|
|
1466
|
+
c.customizable === false
|
|
1467
|
+
? c.title
|
|
1468
|
+
: /*#__PURE__*/ React.createElement(Dustbin, {
|
|
1469
|
+
item: c,
|
|
1470
|
+
onDrop: onDrop,
|
|
1471
|
+
onFixed: onFixed,
|
|
1472
|
+
showArrows: ["up", "center"],
|
|
1473
|
+
onChange: changeTableHeader,
|
|
1474
|
+
isRoot: c.children && c.children.length,
|
|
1475
|
+
}),
|
|
1476
|
+
children: titleChildren(c.children, ["up", "center"]),
|
|
1477
|
+
};
|
|
1478
|
+
}),
|
|
1479
|
+
}),
|
|
1480
|
+
),
|
|
1481
|
+
),
|
|
1482
|
+
),
|
|
1483
|
+
/*#__PURE__*/ React.createElement(
|
|
1484
|
+
"div",
|
|
1485
|
+
{
|
|
1486
|
+
style: {
|
|
1487
|
+
textAlign: "right",
|
|
1488
|
+
},
|
|
1489
|
+
},
|
|
1490
|
+
/*#__PURE__*/ React.createElement(
|
|
1491
|
+
Button,
|
|
1492
|
+
{
|
|
1493
|
+
onClick: props.handleBack,
|
|
1494
|
+
size: "small",
|
|
1495
|
+
style: {
|
|
1496
|
+
marginRight: 10,
|
|
1497
|
+
},
|
|
1498
|
+
},
|
|
1499
|
+
initLang({
|
|
1500
|
+
id: "button.back",
|
|
629
1501
|
}),
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
showLine: true,
|
|
641
|
-
checkedKeys: flatColumns(rightFixed, true).filter(function (col) {
|
|
642
|
-
return col.checked;
|
|
643
|
-
}).map(function (col) {
|
|
644
|
-
return col.dataIndex;
|
|
645
|
-
}),
|
|
646
|
-
onCheck: function onCheck(checkKeys, event) {
|
|
647
|
-
return _onCheck(rightFixed, checkKeys, event);
|
|
648
|
-
},
|
|
649
|
-
treeData: rightFixed === null || rightFixed === void 0 ? void 0 : rightFixed.map(function (c) {
|
|
650
|
-
return {
|
|
651
|
-
key: c.dataIndex,
|
|
652
|
-
disabled: c.customizable === false,
|
|
653
|
-
title: c.customizable === false ? c.title : /*#__PURE__*/React.createElement(Dustbin, {
|
|
654
|
-
item: c,
|
|
655
|
-
onDrop: onDrop,
|
|
656
|
-
onFixed: onFixed,
|
|
657
|
-
showArrows: ["up", "center"],
|
|
658
|
-
onChange: changeTableHeader,
|
|
659
|
-
isRoot: c.children && c.children.length
|
|
1502
|
+
),
|
|
1503
|
+
/*#__PURE__*/ React.createElement(
|
|
1504
|
+
Button,
|
|
1505
|
+
{
|
|
1506
|
+
onClick: handleSave,
|
|
1507
|
+
size: "small",
|
|
1508
|
+
type: "primary",
|
|
1509
|
+
},
|
|
1510
|
+
initLang({
|
|
1511
|
+
id: "button.save",
|
|
660
1512
|
}),
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
665
|
-
style: {
|
|
666
|
-
textAlign: "right"
|
|
667
|
-
}
|
|
668
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
669
|
-
onClick: props.handleBack,
|
|
670
|
-
size: "small",
|
|
671
|
-
style: {
|
|
672
|
-
marginRight: 10
|
|
673
|
-
}
|
|
674
|
-
}, initLang({
|
|
675
|
-
id: "button.back"
|
|
676
|
-
})), /*#__PURE__*/React.createElement(Button, {
|
|
677
|
-
onClick: handleSave,
|
|
678
|
-
size: "small",
|
|
679
|
-
type: "primary"
|
|
680
|
-
}, initLang({
|
|
681
|
-
id: "button.save"
|
|
682
|
-
}))));
|
|
1513
|
+
),
|
|
1514
|
+
),
|
|
1515
|
+
);
|
|
683
1516
|
});
|
|
684
1517
|
|
|
685
1518
|
// 模板列表
|
|
@@ -727,105 +1560,128 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
727
1560
|
return "";
|
|
728
1561
|
}
|
|
729
1562
|
}, []);
|
|
730
|
-
var saveTempale = /*#__PURE__*/function () {
|
|
731
|
-
var _ref5 = _asyncToGenerator(
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
1563
|
+
var saveTempale = /*#__PURE__*/ (function () {
|
|
1564
|
+
var _ref5 = _asyncToGenerator(
|
|
1565
|
+
/*#__PURE__*/ _regeneratorRuntime().mark(function _callee3(params) {
|
|
1566
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1567
|
+
while (1)
|
|
1568
|
+
switch ((_context3.prev = _context3.next)) {
|
|
1569
|
+
case 0:
|
|
1570
|
+
if (!(props !== null && props !== void 0 && props.saveColumn)) {
|
|
1571
|
+
_context3.next = 6;
|
|
1572
|
+
break;
|
|
1573
|
+
}
|
|
1574
|
+
_context3.next = 3;
|
|
1575
|
+
return props === null || props === void 0
|
|
1576
|
+
? void 0
|
|
1577
|
+
: props.saveColumn(params);
|
|
1578
|
+
case 3:
|
|
1579
|
+
return _context3.abrupt("return", _context3.sent);
|
|
1580
|
+
case 6:
|
|
1581
|
+
_context3.next = 8;
|
|
1582
|
+
return setFormTemplates(_objectSpread({}, params));
|
|
1583
|
+
case 8:
|
|
1584
|
+
return _context3.abrupt("return", _context3.sent);
|
|
1585
|
+
case 9:
|
|
1586
|
+
case "end":
|
|
1587
|
+
return _context3.stop();
|
|
738
1588
|
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
return _context3.abrupt("return", _context3.sent);
|
|
743
|
-
case 6:
|
|
744
|
-
_context3.next = 8;
|
|
745
|
-
return setFormTemplates(_objectSpread({}, params));
|
|
746
|
-
case 8:
|
|
747
|
-
return _context3.abrupt("return", _context3.sent);
|
|
748
|
-
case 9:
|
|
749
|
-
case "end":
|
|
750
|
-
return _context3.stop();
|
|
751
|
-
}
|
|
752
|
-
}, _callee3);
|
|
753
|
-
}));
|
|
1589
|
+
}, _callee3);
|
|
1590
|
+
}),
|
|
1591
|
+
);
|
|
754
1592
|
return function saveTempale(_x2) {
|
|
755
1593
|
return _ref5.apply(this, arguments);
|
|
756
1594
|
};
|
|
757
|
-
}();
|
|
758
|
-
var getColumnsFilter = /*#__PURE__*/function () {
|
|
759
|
-
var _ref6 = _asyncToGenerator(
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
return props === null || props === void 0 ? void 0 : props.request();
|
|
772
|
-
case 4:
|
|
773
|
-
res = _context4.sent;
|
|
774
|
-
res = {
|
|
775
|
-
data: {
|
|
776
|
-
data: res
|
|
777
|
-
}
|
|
778
|
-
};
|
|
779
|
-
_context4.next = 11;
|
|
780
|
-
break;
|
|
781
|
-
case 8:
|
|
782
|
-
_context4.next = 10;
|
|
783
|
-
return queryColumnsConfig({
|
|
784
|
-
menuCode: menuCode,
|
|
785
|
-
formTemplateCode: formTemplateCode,
|
|
786
|
-
queryType: props.crossQuery ? "cross" : "list"
|
|
787
|
-
});
|
|
788
|
-
case 10:
|
|
789
|
-
res = _context4.sent;
|
|
790
|
-
case 11:
|
|
791
|
-
if ((_res = res) !== null && _res !== void 0 && (_res = _res.data) !== null && _res !== void 0 && _res.data) {
|
|
792
|
-
_templateUser = [];
|
|
793
|
-
_template = [];
|
|
794
|
-
hasDefault = false;
|
|
795
|
-
(_res2 = res) === null || _res2 === void 0 || (_res2 = _res2.data) === null || _res2 === void 0 || _res2.data.forEach(function (item) {
|
|
796
|
-
if (item.perms_type === "private") {
|
|
797
|
-
_templateUser.push(item);
|
|
798
|
-
} else {
|
|
799
|
-
_template.push(item);
|
|
1595
|
+
})();
|
|
1596
|
+
var getColumnsFilter = /*#__PURE__*/ (function () {
|
|
1597
|
+
var _ref6 = _asyncToGenerator(
|
|
1598
|
+
/*#__PURE__*/ _regeneratorRuntime().mark(function _callee4() {
|
|
1599
|
+
var _res;
|
|
1600
|
+
var res, _res2, _templateUser, _template, hasDefault;
|
|
1601
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
1602
|
+
while (1)
|
|
1603
|
+
switch ((_context4.prev = _context4.next)) {
|
|
1604
|
+
case 0:
|
|
1605
|
+
res = {}; // debugger;
|
|
1606
|
+
if (!(props !== null && props !== void 0 && props.request)) {
|
|
1607
|
+
_context4.next = 8;
|
|
1608
|
+
break;
|
|
800
1609
|
}
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
1610
|
+
_context4.next = 4;
|
|
1611
|
+
return props === null || props === void 0
|
|
1612
|
+
? void 0
|
|
1613
|
+
: props.request();
|
|
1614
|
+
case 4:
|
|
1615
|
+
res = _context4.sent;
|
|
1616
|
+
res = {
|
|
1617
|
+
data: {
|
|
1618
|
+
data: res,
|
|
1619
|
+
},
|
|
1620
|
+
};
|
|
1621
|
+
_context4.next = 11;
|
|
1622
|
+
break;
|
|
1623
|
+
case 8:
|
|
1624
|
+
_context4.next = 10;
|
|
1625
|
+
return queryColumnsConfig({
|
|
1626
|
+
menuCode: menuCode,
|
|
1627
|
+
formTemplateCode: formTemplateCode,
|
|
1628
|
+
queryType: props.crossQuery ? "cross" : "list",
|
|
1629
|
+
});
|
|
1630
|
+
case 10:
|
|
1631
|
+
res = _context4.sent;
|
|
1632
|
+
case 11:
|
|
1633
|
+
if (
|
|
1634
|
+
(_res = res) !== null &&
|
|
1635
|
+
_res !== void 0 &&
|
|
1636
|
+
(_res = _res.data) !== null &&
|
|
1637
|
+
_res !== void 0 &&
|
|
1638
|
+
_res.data
|
|
1639
|
+
) {
|
|
1640
|
+
_templateUser = [];
|
|
1641
|
+
_template = [];
|
|
1642
|
+
hasDefault = false;
|
|
1643
|
+
(_res2 = res) === null ||
|
|
1644
|
+
_res2 === void 0 ||
|
|
1645
|
+
(_res2 = _res2.data) === null ||
|
|
1646
|
+
_res2 === void 0 ||
|
|
1647
|
+
_res2.data.forEach(function (item) {
|
|
1648
|
+
if (item.perms_type === "private") {
|
|
1649
|
+
_templateUser.push(item);
|
|
1650
|
+
} else {
|
|
1651
|
+
_template.push(item);
|
|
1652
|
+
}
|
|
1653
|
+
if (item.is_default === "Y") {
|
|
1654
|
+
hasDefault = true;
|
|
1655
|
+
setValue(item.value);
|
|
1656
|
+
setCurItem(item);
|
|
1657
|
+
}
|
|
1658
|
+
if (item.is_default_public === "Y" && !hasDefault) {
|
|
1659
|
+
setValue(item.value);
|
|
1660
|
+
setCurItem(item);
|
|
1661
|
+
}
|
|
1662
|
+
});
|
|
1663
|
+
setTemplate(_template);
|
|
1664
|
+
setTemplateUser(_templateUser);
|
|
805
1665
|
}
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
}
|
|
810
|
-
});
|
|
811
|
-
setTemplate(_template);
|
|
812
|
-
setTemplateUser(_templateUser);
|
|
1666
|
+
case 12:
|
|
1667
|
+
case "end":
|
|
1668
|
+
return _context4.stop();
|
|
813
1669
|
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
}
|
|
818
|
-
}, _callee4);
|
|
819
|
-
}));
|
|
1670
|
+
}, _callee4);
|
|
1671
|
+
}),
|
|
1672
|
+
);
|
|
820
1673
|
return function getColumnsFilter() {
|
|
821
1674
|
return _ref6.apply(this, arguments);
|
|
822
1675
|
};
|
|
823
|
-
}();
|
|
1676
|
+
})();
|
|
824
1677
|
|
|
825
1678
|
// 获取模板
|
|
826
|
-
useEffect(
|
|
827
|
-
|
|
828
|
-
|
|
1679
|
+
useEffect(
|
|
1680
|
+
function () {
|
|
1681
|
+
getColumnsFilter();
|
|
1682
|
+
},
|
|
1683
|
+
[props.crossQuery],
|
|
1684
|
+
);
|
|
829
1685
|
|
|
830
1686
|
// 新增模板
|
|
831
1687
|
var handleAdd = function handleAdd() {
|
|
@@ -866,9 +1722,18 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
866
1722
|
// }
|
|
867
1723
|
// }
|
|
868
1724
|
|
|
869
|
-
var _adapterColumns = adapterColumns(
|
|
870
|
-
|
|
871
|
-
|
|
1725
|
+
var _adapterColumns = adapterColumns(
|
|
1726
|
+
[
|
|
1727
|
+
_objectSpread(
|
|
1728
|
+
_objectSpread({}, item),
|
|
1729
|
+
{},
|
|
1730
|
+
{
|
|
1731
|
+
is_default: "Y",
|
|
1732
|
+
},
|
|
1733
|
+
),
|
|
1734
|
+
],
|
|
1735
|
+
props.columns,
|
|
1736
|
+
),
|
|
872
1737
|
JsonPares = _adapterColumns.JsonPares;
|
|
873
1738
|
setColumnsCofnig(JsonPares);
|
|
874
1739
|
setShowConfig(true);
|
|
@@ -878,42 +1743,48 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
878
1743
|
};
|
|
879
1744
|
|
|
880
1745
|
// 复制成个人模板
|
|
881
|
-
var handleCopy = /*#__PURE__*/function () {
|
|
882
|
-
var _ref7 = _asyncToGenerator(
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
1746
|
+
var handleCopy = /*#__PURE__*/ (function () {
|
|
1747
|
+
var _ref7 = _asyncToGenerator(
|
|
1748
|
+
/*#__PURE__*/ _regeneratorRuntime().mark(function _callee5(item) {
|
|
1749
|
+
var params;
|
|
1750
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
1751
|
+
while (1)
|
|
1752
|
+
switch ((_context5.prev = _context5.next)) {
|
|
1753
|
+
case 0:
|
|
1754
|
+
params = {
|
|
1755
|
+
name: item.label + "-copy",
|
|
1756
|
+
is_default: "N",
|
|
1757
|
+
configs: item.define,
|
|
1758
|
+
menu_code: menuCode,
|
|
1759
|
+
form_template_code: formTemplateCode,
|
|
1760
|
+
perms_type: "private",
|
|
1761
|
+
code: null,
|
|
1762
|
+
query_type: props.crossQuery ? "cross" : "list",
|
|
1763
|
+
}; // await setFormTemplates(params);
|
|
1764
|
+
_context5.next = 3;
|
|
1765
|
+
return saveTempale(params);
|
|
1766
|
+
case 3:
|
|
1767
|
+
getColumnsFilter();
|
|
1768
|
+
case 4:
|
|
1769
|
+
case "end":
|
|
1770
|
+
return _context5.stop();
|
|
1771
|
+
}
|
|
1772
|
+
}, _callee5);
|
|
1773
|
+
}),
|
|
1774
|
+
);
|
|
907
1775
|
return function handleCopy(_x3) {
|
|
908
1776
|
return _ref7.apply(this, arguments);
|
|
909
1777
|
};
|
|
910
|
-
}();
|
|
1778
|
+
})();
|
|
911
1779
|
var onChange = function onChange(e) {
|
|
912
1780
|
setValue(e.target.value);
|
|
913
|
-
var arr = [].concat(
|
|
1781
|
+
var arr = [].concat(
|
|
1782
|
+
_toConsumableArray(templateUser),
|
|
1783
|
+
_toConsumableArray(template),
|
|
1784
|
+
);
|
|
914
1785
|
arr.forEach(function (item) {
|
|
915
1786
|
if (item.value === e.target.value) {
|
|
916
|
-
props.updateColumns(JSON.parse(item.define));
|
|
1787
|
+
props.updateColumns(JSON.parse(item.define), item);
|
|
917
1788
|
setCurItem(item);
|
|
918
1789
|
return;
|
|
919
1790
|
}
|
|
@@ -928,38 +1799,44 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
928
1799
|
var handleDel = function handleDel(item) {
|
|
929
1800
|
setEditItem(item);
|
|
930
1801
|
};
|
|
931
|
-
var handleOptionDelete = /*#__PURE__*/function () {
|
|
932
|
-
var _ref8 = _asyncToGenerator(
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
_context6.
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1802
|
+
var handleOptionDelete = /*#__PURE__*/ (function () {
|
|
1803
|
+
var _ref8 = _asyncToGenerator(
|
|
1804
|
+
/*#__PURE__*/ _regeneratorRuntime().mark(function _callee6() {
|
|
1805
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
1806
|
+
while (1)
|
|
1807
|
+
switch ((_context6.prev = _context6.next)) {
|
|
1808
|
+
case 0:
|
|
1809
|
+
_context6.next = 2;
|
|
1810
|
+
return saveTempale({
|
|
1811
|
+
menu_code: menuCode,
|
|
1812
|
+
form_template_code: formTemplateCode,
|
|
1813
|
+
is_deleted: "Y",
|
|
1814
|
+
code:
|
|
1815
|
+
editItem === null || editItem === void 0
|
|
1816
|
+
? void 0
|
|
1817
|
+
: editItem.value,
|
|
1818
|
+
query_type: props.crossQuery ? "cross" : "list",
|
|
1819
|
+
});
|
|
1820
|
+
case 2:
|
|
1821
|
+
// await setFormTemplates({
|
|
1822
|
+
// menu_code: menuCode,
|
|
1823
|
+
// form_template_code: formTemplateCode,
|
|
1824
|
+
// is_deleted: "Y",
|
|
1825
|
+
// code: editItem?.value,
|
|
1826
|
+
// query_type: props.crossQuery ? "cross" : "list",
|
|
1827
|
+
// });
|
|
1828
|
+
getColumnsFilter();
|
|
1829
|
+
case 3:
|
|
1830
|
+
case "end":
|
|
1831
|
+
return _context6.stop();
|
|
1832
|
+
}
|
|
1833
|
+
}, _callee6);
|
|
1834
|
+
}),
|
|
1835
|
+
);
|
|
959
1836
|
return function handleOptionDelete() {
|
|
960
1837
|
return _ref8.apply(this, arguments);
|
|
961
1838
|
};
|
|
962
|
-
}();
|
|
1839
|
+
})();
|
|
963
1840
|
var confirm = function confirm() {
|
|
964
1841
|
handleOptionDelete();
|
|
965
1842
|
};
|
|
@@ -967,7 +1844,10 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
967
1844
|
|
|
968
1845
|
// 设置默认
|
|
969
1846
|
var handleSaveDefault = function handleSaveDefault(isDefault, code) {
|
|
970
|
-
var arr = [].concat(
|
|
1847
|
+
var arr = [].concat(
|
|
1848
|
+
_toConsumableArray(templateUser),
|
|
1849
|
+
_toConsumableArray(template),
|
|
1850
|
+
);
|
|
971
1851
|
arr.forEach(function (item) {
|
|
972
1852
|
if (item.value === value) {
|
|
973
1853
|
saveTempale({
|
|
@@ -979,18 +1859,33 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
979
1859
|
name: item === null || item === void 0 ? void 0 : item.label,
|
|
980
1860
|
configs: item === null || item === void 0 ? void 0 : item.define,
|
|
981
1861
|
query_type: props.crossQuery ? "cross" : "list",
|
|
982
|
-
perms_type: item.perms_type
|
|
1862
|
+
perms_type: item.perms_type,
|
|
983
1863
|
}).then(function (res) {
|
|
984
1864
|
var _res$data;
|
|
985
|
-
if (
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1865
|
+
if (
|
|
1866
|
+
(res === null ||
|
|
1867
|
+
res === void 0 ||
|
|
1868
|
+
(_res$data = res.data) === null ||
|
|
1869
|
+
_res$data === void 0
|
|
1870
|
+
? void 0
|
|
1871
|
+
: _res$data.code) === 200
|
|
1872
|
+
) {
|
|
1873
|
+
message.success(
|
|
1874
|
+
initLang({
|
|
1875
|
+
id: "message.success.set",
|
|
1876
|
+
}),
|
|
1877
|
+
);
|
|
989
1878
|
// 刷新列表
|
|
990
|
-
setCurItem(
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1879
|
+
setCurItem(
|
|
1880
|
+
_objectSpread(
|
|
1881
|
+
_objectSpread({}, item),
|
|
1882
|
+
{},
|
|
1883
|
+
{
|
|
1884
|
+
is_default: code !== "public" ? isDefault : "N",
|
|
1885
|
+
is_default_public: code === "public" ? isDefault : "N",
|
|
1886
|
+
},
|
|
1887
|
+
),
|
|
1888
|
+
);
|
|
994
1889
|
getColumnsFilter();
|
|
995
1890
|
}
|
|
996
1891
|
});
|
|
@@ -1012,219 +1907,405 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
1012
1907
|
}
|
|
1013
1908
|
var loopColumns = function loopColumns(arr, firstLoop) {
|
|
1014
1909
|
return arr.map(function (field) {
|
|
1015
|
-
return _objectSpread(
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1910
|
+
return _objectSpread(
|
|
1911
|
+
_objectSpread({}, field),
|
|
1912
|
+
{},
|
|
1913
|
+
{
|
|
1914
|
+
checked:
|
|
1915
|
+
typeof field.checked === "boolean"
|
|
1916
|
+
? field.checked
|
|
1917
|
+
: field.defaultDisplay == false
|
|
1918
|
+
? false
|
|
1919
|
+
: true,
|
|
1920
|
+
children: field.children ? loopColumns(field.children) : null,
|
|
1921
|
+
},
|
|
1922
|
+
);
|
|
1019
1923
|
});
|
|
1020
1924
|
};
|
|
1021
1925
|
var _columns = loopColumns(cloneDeep(props.columns), true);
|
|
1022
1926
|
props.updateColumns(_columns);
|
|
1023
1927
|
};
|
|
1024
|
-
return /*#__PURE__*/React.createElement(
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1032
|
-
className: "title"
|
|
1033
|
-
}, initLang({
|
|
1034
|
-
id: "prompt.tableColumnSet"
|
|
1035
|
-
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
1036
|
-
placement: "top",
|
|
1037
|
-
title: initLang({
|
|
1038
|
-
id: "setting.info.add"
|
|
1039
|
-
})
|
|
1040
|
-
}, /*#__PURE__*/React.createElement(PlusOutlined, {
|
|
1041
|
-
className: "add-icon",
|
|
1042
|
-
style: {
|
|
1043
|
-
display: showConfig ? "none" : "block"
|
|
1928
|
+
return /*#__PURE__*/ React.createElement(
|
|
1929
|
+
"div",
|
|
1930
|
+
{
|
|
1931
|
+
className: "popover-body",
|
|
1932
|
+
style: {
|
|
1933
|
+
width: "500px",
|
|
1934
|
+
},
|
|
1044
1935
|
},
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1936
|
+
/*#__PURE__*/ React.createElement(
|
|
1937
|
+
"div",
|
|
1938
|
+
{
|
|
1939
|
+
className: "top-wrap",
|
|
1940
|
+
},
|
|
1941
|
+
/*#__PURE__*/ React.createElement(
|
|
1942
|
+
"span",
|
|
1943
|
+
{
|
|
1944
|
+
className: "title",
|
|
1945
|
+
},
|
|
1946
|
+
initLang({
|
|
1947
|
+
id: "prompt.tableColumnSet",
|
|
1948
|
+
}),
|
|
1949
|
+
),
|
|
1950
|
+
/*#__PURE__*/ React.createElement(
|
|
1951
|
+
Tooltip,
|
|
1952
|
+
{
|
|
1953
|
+
placement: "top",
|
|
1954
|
+
title: initLang({
|
|
1955
|
+
id: "setting.info.add",
|
|
1956
|
+
}),
|
|
1957
|
+
},
|
|
1958
|
+
/*#__PURE__*/ React.createElement(PlusOutlined, {
|
|
1959
|
+
className: "add-icon",
|
|
1960
|
+
style: {
|
|
1961
|
+
display: showConfig ? "none" : "block",
|
|
1962
|
+
},
|
|
1963
|
+
onClick: handleAdd,
|
|
1964
|
+
}),
|
|
1965
|
+
),
|
|
1966
|
+
),
|
|
1967
|
+
showConfig
|
|
1968
|
+
? /*#__PURE__*/ React.createElement(ColumnsToolbarRender, {
|
|
1969
|
+
newColumns: props.columns, // 页面的新数据 曾删改后
|
|
1970
|
+
columns: columnsCofnig,
|
|
1971
|
+
updateColumns: props.updateColumns,
|
|
1972
|
+
handleBack: function handleBack() {
|
|
1973
|
+
restColumns();
|
|
1974
|
+
setShowConfig(false);
|
|
1975
|
+
},
|
|
1976
|
+
handleSaveCallback: handleSaveCallback,
|
|
1977
|
+
menuCode: menuCode,
|
|
1978
|
+
saveColumn: props.saveColumn,
|
|
1979
|
+
request: props.request,
|
|
1980
|
+
crossQuery: props.crossQuery,
|
|
1981
|
+
formTemplateCode: formTemplateCode,
|
|
1982
|
+
editItem: editItem,
|
|
1983
|
+
})
|
|
1984
|
+
: /*#__PURE__*/ React.createElement(
|
|
1985
|
+
React.Fragment,
|
|
1986
|
+
null,
|
|
1987
|
+
/*#__PURE__*/ React.createElement(
|
|
1988
|
+
Radio.Group,
|
|
1989
|
+
{
|
|
1990
|
+
onChange: onChange,
|
|
1991
|
+
value: value,
|
|
1992
|
+
style: {
|
|
1993
|
+
width: "100%",
|
|
1994
|
+
},
|
|
1995
|
+
},
|
|
1996
|
+
/*#__PURE__*/ React.createElement(
|
|
1997
|
+
"div",
|
|
1998
|
+
{
|
|
1999
|
+
className: "list-title",
|
|
2000
|
+
},
|
|
2001
|
+
/*#__PURE__*/ React.createElement(UserOutlined, {
|
|
2002
|
+
className: "list-title-icon",
|
|
2003
|
+
}),
|
|
2004
|
+
initLang({
|
|
2005
|
+
id: "prompt.personalTemplate",
|
|
2006
|
+
}),
|
|
2007
|
+
),
|
|
2008
|
+
/*#__PURE__*/ React.createElement(
|
|
2009
|
+
React.Fragment,
|
|
2010
|
+
null,
|
|
2011
|
+
templateUser.map(function (item) {
|
|
2012
|
+
return /*#__PURE__*/ React.createElement(
|
|
2013
|
+
"div",
|
|
2014
|
+
{
|
|
2015
|
+
className: "list-radio",
|
|
2016
|
+
key: item.value,
|
|
2017
|
+
},
|
|
2018
|
+
/*#__PURE__*/ React.createElement(
|
|
2019
|
+
Radio,
|
|
2020
|
+
{
|
|
2021
|
+
value: item.value,
|
|
2022
|
+
className: "list-radio-label",
|
|
2023
|
+
},
|
|
2024
|
+
item.label,
|
|
2025
|
+
),
|
|
2026
|
+
/*#__PURE__*/ React.createElement(
|
|
2027
|
+
"span",
|
|
2028
|
+
null,
|
|
2029
|
+
item.is_default === "Y" &&
|
|
2030
|
+
/*#__PURE__*/ React.createElement(
|
|
2031
|
+
"span",
|
|
2032
|
+
{
|
|
2033
|
+
className: "set-text-default",
|
|
2034
|
+
},
|
|
2035
|
+
initLang({
|
|
2036
|
+
id: "prompt.text.default",
|
|
2037
|
+
}),
|
|
2038
|
+
),
|
|
2039
|
+
/*#__PURE__*/ React.createElement(
|
|
2040
|
+
Popconfirm,
|
|
2041
|
+
{
|
|
2042
|
+
title: initLang({
|
|
2043
|
+
id: "message.confirm.delete",
|
|
2044
|
+
}),
|
|
2045
|
+
onConfirm: confirm,
|
|
2046
|
+
onCancel: cancel,
|
|
2047
|
+
okText: initLang({
|
|
2048
|
+
id: "button.ok",
|
|
2049
|
+
}),
|
|
2050
|
+
cancelText: initLang({
|
|
2051
|
+
id: "button.cancel",
|
|
2052
|
+
}),
|
|
2053
|
+
},
|
|
2054
|
+
/*#__PURE__*/ React.createElement(
|
|
2055
|
+
Tooltip,
|
|
2056
|
+
{
|
|
2057
|
+
placement: "top",
|
|
2058
|
+
title: initLang({
|
|
2059
|
+
id: "prompt.delTemplate",
|
|
2060
|
+
}),
|
|
2061
|
+
},
|
|
2062
|
+
/*#__PURE__*/ React.createElement(DeleteOutlined, {
|
|
2063
|
+
className: "set-icon",
|
|
2064
|
+
onClick: function onClick() {
|
|
2065
|
+
return handleDel(item);
|
|
2066
|
+
},
|
|
2067
|
+
}),
|
|
2068
|
+
),
|
|
2069
|
+
),
|
|
2070
|
+
/*#__PURE__*/ React.createElement(
|
|
2071
|
+
Tooltip,
|
|
2072
|
+
{
|
|
2073
|
+
placement: "top",
|
|
2074
|
+
title: initLang({
|
|
2075
|
+
id: "prompt.setTemplate",
|
|
2076
|
+
}),
|
|
2077
|
+
},
|
|
2078
|
+
/*#__PURE__*/ React.createElement(SettingOutlined, {
|
|
2079
|
+
className: "set-icon",
|
|
2080
|
+
onClick: function onClick() {
|
|
2081
|
+
return handleSet(item);
|
|
2082
|
+
},
|
|
2083
|
+
}),
|
|
2084
|
+
),
|
|
2085
|
+
),
|
|
2086
|
+
);
|
|
2087
|
+
}),
|
|
2088
|
+
),
|
|
2089
|
+
/*#__PURE__*/ React.createElement(
|
|
2090
|
+
"div",
|
|
2091
|
+
{
|
|
2092
|
+
className: "list-title",
|
|
2093
|
+
},
|
|
2094
|
+
/*#__PURE__*/ React.createElement(ShareAltOutlined, {
|
|
2095
|
+
className: "list-title-icon",
|
|
2096
|
+
}),
|
|
2097
|
+
initLang({
|
|
2098
|
+
id: "prompt.publicTemplate",
|
|
2099
|
+
}),
|
|
2100
|
+
),
|
|
2101
|
+
/*#__PURE__*/ React.createElement(
|
|
2102
|
+
React.Fragment,
|
|
2103
|
+
null,
|
|
2104
|
+
template.map(function (item) {
|
|
2105
|
+
return /*#__PURE__*/ React.createElement(
|
|
2106
|
+
"div",
|
|
2107
|
+
{
|
|
2108
|
+
className: "list-radio",
|
|
2109
|
+
key: item.value,
|
|
2110
|
+
},
|
|
2111
|
+
/*#__PURE__*/ React.createElement(
|
|
2112
|
+
Radio,
|
|
2113
|
+
{
|
|
2114
|
+
value: item.value,
|
|
2115
|
+
className: "list-radio-label",
|
|
2116
|
+
},
|
|
2117
|
+
item.label,
|
|
2118
|
+
),
|
|
2119
|
+
item.is_default_public === "Y" &&
|
|
2120
|
+
/*#__PURE__*/ React.createElement(
|
|
2121
|
+
"span",
|
|
2122
|
+
{
|
|
2123
|
+
className: "set-text-default",
|
|
2124
|
+
},
|
|
2125
|
+
initLang({
|
|
2126
|
+
id: "prompt.text.default",
|
|
2127
|
+
}),
|
|
2128
|
+
),
|
|
2129
|
+
/*#__PURE__*/ React.createElement(
|
|
2130
|
+
"span",
|
|
2131
|
+
null,
|
|
2132
|
+
/*#__PURE__*/ React.createElement(
|
|
2133
|
+
Tooltip,
|
|
2134
|
+
{
|
|
2135
|
+
placement: "top",
|
|
2136
|
+
title: initLang({
|
|
2137
|
+
id: "prompt.copyTemplate",
|
|
2138
|
+
}),
|
|
2139
|
+
},
|
|
2140
|
+
/*#__PURE__*/ React.createElement(CopyOutlined, {
|
|
2141
|
+
className: "set-icon",
|
|
2142
|
+
onClick: function onClick() {
|
|
2143
|
+
return handleCopy(item);
|
|
2144
|
+
},
|
|
2145
|
+
}),
|
|
2146
|
+
),
|
|
2147
|
+
),
|
|
2148
|
+
item.owner === "Y" &&
|
|
2149
|
+
/*#__PURE__*/ React.createElement(
|
|
2150
|
+
"span",
|
|
2151
|
+
null,
|
|
2152
|
+
/*#__PURE__*/ React.createElement(
|
|
2153
|
+
Popconfirm,
|
|
2154
|
+
{
|
|
2155
|
+
title: initLang({
|
|
2156
|
+
id: "message.confirm.delete",
|
|
2157
|
+
}),
|
|
2158
|
+
okText: initLang({
|
|
2159
|
+
id: "button.ok",
|
|
2160
|
+
}),
|
|
2161
|
+
cancelText: initLang({
|
|
2162
|
+
id: "button.cancel",
|
|
2163
|
+
}),
|
|
2164
|
+
onConfirm: confirm,
|
|
2165
|
+
onCancel: cancel,
|
|
2166
|
+
},
|
|
2167
|
+
/*#__PURE__*/ React.createElement(
|
|
2168
|
+
Tooltip,
|
|
2169
|
+
{
|
|
2170
|
+
placement: "top",
|
|
2171
|
+
title: initLang({
|
|
2172
|
+
id: "prompt.delTemplate",
|
|
2173
|
+
}),
|
|
2174
|
+
},
|
|
2175
|
+
/*#__PURE__*/ React.createElement(DeleteOutlined, {
|
|
2176
|
+
className: "set-icon",
|
|
2177
|
+
onClick: function onClick() {
|
|
2178
|
+
return handleDel(item);
|
|
2179
|
+
},
|
|
2180
|
+
}),
|
|
2181
|
+
),
|
|
2182
|
+
),
|
|
2183
|
+
/*#__PURE__*/ React.createElement(
|
|
2184
|
+
Tooltip,
|
|
2185
|
+
{
|
|
2186
|
+
placement: "top",
|
|
2187
|
+
title: initLang({
|
|
2188
|
+
id: "prompt.setTemplate",
|
|
2189
|
+
}),
|
|
2190
|
+
},
|
|
2191
|
+
/*#__PURE__*/ React.createElement(SettingOutlined, {
|
|
2192
|
+
className: "set-icon",
|
|
2193
|
+
onClick: function onClick() {
|
|
2194
|
+
return handleSet(item);
|
|
2195
|
+
},
|
|
2196
|
+
}),
|
|
2197
|
+
),
|
|
2198
|
+
),
|
|
2199
|
+
);
|
|
2200
|
+
}),
|
|
2201
|
+
),
|
|
2202
|
+
),
|
|
2203
|
+
/*#__PURE__*/ React.createElement(
|
|
2204
|
+
"div",
|
|
2205
|
+
{
|
|
2206
|
+
style: {
|
|
2207
|
+
position: "absolute",
|
|
2208
|
+
right: 12,
|
|
2209
|
+
bottom: 16,
|
|
2210
|
+
},
|
|
2211
|
+
},
|
|
2212
|
+
(curItem === null || curItem === void 0
|
|
2213
|
+
? void 0
|
|
2214
|
+
: curItem.perms_type) == "private" &&
|
|
2215
|
+
/*#__PURE__*/ React.createElement(
|
|
2216
|
+
React.Fragment,
|
|
2217
|
+
null,
|
|
2218
|
+
(curItem === null || curItem === void 0
|
|
2219
|
+
? void 0
|
|
2220
|
+
: curItem.is_default) === "Y"
|
|
2221
|
+
? /*#__PURE__*/ React.createElement(
|
|
2222
|
+
Button,
|
|
2223
|
+
{
|
|
2224
|
+
onClick: function onClick() {
|
|
2225
|
+
return handleSaveDefault("N");
|
|
2226
|
+
},
|
|
2227
|
+
size: "small",
|
|
2228
|
+
type: "primary",
|
|
2229
|
+
},
|
|
2230
|
+
initLang({
|
|
2231
|
+
id: "button.set.cancelDefault",
|
|
2232
|
+
}),
|
|
2233
|
+
)
|
|
2234
|
+
: /*#__PURE__*/ React.createElement(
|
|
2235
|
+
Button,
|
|
2236
|
+
{
|
|
2237
|
+
onClick: function onClick() {
|
|
2238
|
+
return handleSaveDefault("Y");
|
|
2239
|
+
},
|
|
2240
|
+
size: "small",
|
|
2241
|
+
type: "primary",
|
|
2242
|
+
},
|
|
2243
|
+
initLang({
|
|
2244
|
+
id: "button.set.default",
|
|
2245
|
+
}),
|
|
2246
|
+
),
|
|
2247
|
+
),
|
|
2248
|
+
(curItem === null || curItem === void 0
|
|
2249
|
+
? void 0
|
|
2250
|
+
: curItem.perms_type) == "public" &&
|
|
2251
|
+
mode === "DEV" &&
|
|
2252
|
+
/*#__PURE__*/ React.createElement(
|
|
2253
|
+
React.Fragment,
|
|
2254
|
+
null,
|
|
2255
|
+
(curItem === null || curItem === void 0
|
|
2256
|
+
? void 0
|
|
2257
|
+
: curItem.is_default_public) === "Y"
|
|
2258
|
+
? /*#__PURE__*/ React.createElement(
|
|
2259
|
+
Button,
|
|
2260
|
+
{
|
|
2261
|
+
onClick: function onClick() {
|
|
2262
|
+
return handleSaveDefault("N", "public");
|
|
2263
|
+
},
|
|
2264
|
+
size: "small",
|
|
2265
|
+
type: "primary",
|
|
2266
|
+
},
|
|
2267
|
+
initLang({
|
|
2268
|
+
id: "button.set.cancelDefault",
|
|
2269
|
+
}),
|
|
2270
|
+
)
|
|
2271
|
+
: /*#__PURE__*/ React.createElement(
|
|
2272
|
+
Popconfirm,
|
|
2273
|
+
{
|
|
2274
|
+
title:
|
|
2275
|
+
"\u6CA1\u6709\u8BBE\u7F6E\u4E2A\u4EBA\u6A21\u677F\u7684\u7528\u6237\u5C06\u4F1A\u9ED8\u8BA4\u5230\u8BE5\u516C\u5171\u6A21\u677F!",
|
|
2276
|
+
onConfirm: function onConfirm() {
|
|
2277
|
+
handleSaveDefault("Y", "public");
|
|
2278
|
+
},
|
|
2279
|
+
// onCancel={() => {}}
|
|
2280
|
+
},
|
|
2281
|
+
/*#__PURE__*/ React.createElement(
|
|
2282
|
+
Button,
|
|
2283
|
+
{
|
|
2284
|
+
size: "small",
|
|
2285
|
+
type: "primary",
|
|
2286
|
+
},
|
|
2287
|
+
initLang({
|
|
2288
|
+
id: "button.set.default",
|
|
2289
|
+
}),
|
|
2290
|
+
),
|
|
2291
|
+
),
|
|
2292
|
+
),
|
|
2293
|
+
/*#__PURE__*/ React.createElement(
|
|
2294
|
+
Button,
|
|
2295
|
+
{
|
|
2296
|
+
style: {
|
|
2297
|
+
marginLeft: 8,
|
|
2298
|
+
},
|
|
2299
|
+
onClick: cancelSelect,
|
|
2300
|
+
size: "small",
|
|
2301
|
+
},
|
|
2302
|
+
initLang({
|
|
2303
|
+
id: "button.set.cancelSelect",
|
|
2304
|
+
}),
|
|
2305
|
+
),
|
|
2306
|
+
),
|
|
2307
|
+
),
|
|
2308
|
+
);
|
|
1228
2309
|
};
|
|
1229
2310
|
var Index = function Index(_ref9) {
|
|
1230
2311
|
var props = Object.assign({}, (_objectDestructuringEmpty(_ref9), _ref9));
|
|
@@ -1233,70 +2314,97 @@ var Index = function Index(_ref9) {
|
|
|
1233
2314
|
getColumnsFilter();
|
|
1234
2315
|
}
|
|
1235
2316
|
}, []);
|
|
1236
|
-
var getColumnsFilter = /*#__PURE__*/function () {
|
|
1237
|
-
var _ref10 = _asyncToGenerator(
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
return props === null || props === void 0 ? void 0 : props.request();
|
|
1250
|
-
case 4:
|
|
1251
|
-
res = _context7.sent;
|
|
1252
|
-
res = {
|
|
1253
|
-
data: {
|
|
1254
|
-
data: res
|
|
1255
|
-
}
|
|
1256
|
-
};
|
|
1257
|
-
_context7.next = 11;
|
|
1258
|
-
break;
|
|
1259
|
-
case 8:
|
|
1260
|
-
_context7.next = 10;
|
|
1261
|
-
return queryColumnsConfig({
|
|
1262
|
-
menuCode: props.menuCode,
|
|
1263
|
-
formTemplateCode: props.formTemplateCode,
|
|
1264
|
-
queryType: props.crossQuery ? "cross" : "list"
|
|
1265
|
-
});
|
|
1266
|
-
case 10:
|
|
1267
|
-
res = _context7.sent;
|
|
1268
|
-
case 11:
|
|
1269
|
-
if ((_res3 = res) !== null && _res3 !== void 0 && (_res3 = _res3.data) !== null && _res3 !== void 0 && _res3.data) {
|
|
1270
|
-
_templateUser = [];
|
|
1271
|
-
_template = [];
|
|
1272
|
-
(_res4 = res) === null || _res4 === void 0 || (_res4 = _res4.data) === null || _res4 === void 0 || _res4.data.forEach(function (item) {
|
|
1273
|
-
if (item.is_default === "Y") {
|
|
1274
|
-
props.updateColumns(JSON.parse(item.define));
|
|
2317
|
+
var getColumnsFilter = /*#__PURE__*/ (function () {
|
|
2318
|
+
var _ref10 = _asyncToGenerator(
|
|
2319
|
+
/*#__PURE__*/ _regeneratorRuntime().mark(function _callee7() {
|
|
2320
|
+
var _res3;
|
|
2321
|
+
var res, _res4, _templateUser, _template;
|
|
2322
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
2323
|
+
while (1)
|
|
2324
|
+
switch ((_context7.prev = _context7.next)) {
|
|
2325
|
+
case 0:
|
|
2326
|
+
res = {}; // debugger;
|
|
2327
|
+
if (!(props !== null && props !== void 0 && props.request)) {
|
|
2328
|
+
_context7.next = 8;
|
|
2329
|
+
break;
|
|
1275
2330
|
}
|
|
1276
|
-
|
|
2331
|
+
_context7.next = 4;
|
|
2332
|
+
return props === null || props === void 0
|
|
2333
|
+
? void 0
|
|
2334
|
+
: props.request();
|
|
2335
|
+
case 4:
|
|
2336
|
+
res = _context7.sent;
|
|
2337
|
+
res = {
|
|
2338
|
+
data: {
|
|
2339
|
+
data: res,
|
|
2340
|
+
},
|
|
2341
|
+
};
|
|
2342
|
+
_context7.next = 11;
|
|
2343
|
+
break;
|
|
2344
|
+
case 8:
|
|
2345
|
+
_context7.next = 10;
|
|
2346
|
+
return queryColumnsConfig({
|
|
2347
|
+
menuCode: props.menuCode,
|
|
2348
|
+
formTemplateCode: props.formTemplateCode,
|
|
2349
|
+
queryType: props.crossQuery ? "cross" : "list",
|
|
2350
|
+
});
|
|
2351
|
+
case 10:
|
|
2352
|
+
res = _context7.sent;
|
|
2353
|
+
case 11:
|
|
2354
|
+
if (
|
|
2355
|
+
(_res3 = res) !== null &&
|
|
2356
|
+
_res3 !== void 0 &&
|
|
2357
|
+
(_res3 = _res3.data) !== null &&
|
|
2358
|
+
_res3 !== void 0 &&
|
|
2359
|
+
_res3.data
|
|
2360
|
+
) {
|
|
2361
|
+
_templateUser = [];
|
|
2362
|
+
_template = [];
|
|
2363
|
+
(_res4 = res) === null ||
|
|
2364
|
+
_res4 === void 0 ||
|
|
2365
|
+
(_res4 = _res4.data) === null ||
|
|
2366
|
+
_res4 === void 0 ||
|
|
2367
|
+
_res4.data.forEach(function (item) {
|
|
2368
|
+
if (item.is_default === "Y") {
|
|
2369
|
+
props.updateColumns(JSON.parse(item.define));
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
}
|
|
2373
|
+
case 12:
|
|
2374
|
+
case "end":
|
|
2375
|
+
return _context7.stop();
|
|
1277
2376
|
}
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
}
|
|
1282
|
-
}, _callee7);
|
|
1283
|
-
}));
|
|
2377
|
+
}, _callee7);
|
|
2378
|
+
}),
|
|
2379
|
+
);
|
|
1284
2380
|
return function getColumnsFilter() {
|
|
1285
2381
|
return _ref10.apply(this, arguments);
|
|
1286
2382
|
};
|
|
1287
|
-
}();
|
|
1288
|
-
return /*#__PURE__*/
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
2383
|
+
})();
|
|
2384
|
+
return /*#__PURE__*/ React.createElement(
|
|
2385
|
+
"span",
|
|
2386
|
+
null,
|
|
2387
|
+
/*#__PURE__*/ React.createElement(
|
|
2388
|
+
Popover,
|
|
2389
|
+
{
|
|
2390
|
+
placement: "bottomLeft",
|
|
2391
|
+
trigger: "click",
|
|
2392
|
+
title: "",
|
|
2393
|
+
content: /*#__PURE__*/ React.createElement(ColumnsToolbar, props),
|
|
2394
|
+
},
|
|
2395
|
+
/*#__PURE__*/ React.createElement(
|
|
2396
|
+
Tooltip,
|
|
2397
|
+
{
|
|
2398
|
+
placement: "left",
|
|
2399
|
+
title: initLang({
|
|
2400
|
+
id: "prompt.setTemplate",
|
|
2401
|
+
}),
|
|
2402
|
+
},
|
|
2403
|
+
/*#__PURE__*/ React.createElement(SettingOutlined, {
|
|
2404
|
+
className: "icon-button-wrapper",
|
|
2405
|
+
}),
|
|
2406
|
+
),
|
|
2407
|
+
),
|
|
2408
|
+
);
|
|
1301
2409
|
};
|
|
1302
|
-
export default Index;
|
|
2410
|
+
export default Index;
|