@panpanzhao/component-ui 0.0.9 → 0.0.12
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/lib/component-ui.common.js +1822 -451
- package/lib/components/crud.js +367 -192
- package/lib/components/dialog.js +10 -10
- package/lib/components/drawer.js +547 -0
- package/lib/components/form-dialog.js +178 -90
- package/lib/components/form-drawer.js +1263 -0
- package/lib/components/form-group.js +97 -53
- package/lib/components/form-input.js +244 -110
- package/lib/components/form-item.js +56 -16
- package/lib/components/form-view-dialog.js +35 -41
- package/lib/components/form-view-group.js +26 -25
- package/lib/components/form-view.js +14 -11
- package/lib/components/form.js +73 -25
- package/lib/components/formula.js +148 -78
- package/lib/components/table-column.js +66 -42
- package/lib/components/table-editable.js +30 -29
- package/lib/components/table-operate.js +2376 -0
- package/lib/components/table-search.js +34 -22
- package/lib/components/table.js +85 -44
- package/lib/index.js +1 -1
- package/lib/styles/component-ui.css +1 -1
- package/lib/styles/drawer.css +1 -0
- package/lib/styles/form-dialog.css +0 -1
- package/lib/styles/form.css +1 -1
- package/lib/styles/index.css +1 -1
- package/lib/styles/table-search.css +1 -0
- package/package.json +2 -2
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 58);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -167,312 +167,334 @@ module.exports = require("@panpanzhao/component-ui/lib/components/table-column")
|
|
|
167
167
|
/* 13 */
|
|
168
168
|
/***/ (function(module, exports) {
|
|
169
169
|
|
|
170
|
-
module.exports = require("
|
|
170
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/table-search");
|
|
171
171
|
|
|
172
172
|
/***/ }),
|
|
173
173
|
/* 14 */
|
|
174
174
|
/***/ (function(module, exports) {
|
|
175
175
|
|
|
176
|
-
module.exports = require("element-ui/lib/
|
|
176
|
+
module.exports = require("element-ui/lib/radio");
|
|
177
177
|
|
|
178
178
|
/***/ }),
|
|
179
179
|
/* 15 */
|
|
180
180
|
/***/ (function(module, exports) {
|
|
181
181
|
|
|
182
|
-
module.exports = require("
|
|
182
|
+
module.exports = require("element-ui/lib/table");
|
|
183
183
|
|
|
184
184
|
/***/ }),
|
|
185
185
|
/* 16 */
|
|
186
186
|
/***/ (function(module, exports) {
|
|
187
187
|
|
|
188
|
-
module.exports = require("
|
|
188
|
+
module.exports = require("element-ui/lib/message-box");
|
|
189
189
|
|
|
190
190
|
/***/ }),
|
|
191
191
|
/* 17 */
|
|
192
192
|
/***/ (function(module, exports) {
|
|
193
193
|
|
|
194
|
-
module.exports = require("element-ui/
|
|
194
|
+
module.exports = require("element-ui/src/utils/popup");
|
|
195
195
|
|
|
196
196
|
/***/ }),
|
|
197
197
|
/* 18 */
|
|
198
198
|
/***/ (function(module, exports) {
|
|
199
199
|
|
|
200
|
-
module.exports = require("element-ui/
|
|
200
|
+
module.exports = require("element-ui/src/mixins/emitter");
|
|
201
201
|
|
|
202
202
|
/***/ }),
|
|
203
203
|
/* 19 */
|
|
204
204
|
/***/ (function(module, exports) {
|
|
205
205
|
|
|
206
|
-
module.exports = require("
|
|
206
|
+
module.exports = require("codemirror");
|
|
207
207
|
|
|
208
208
|
/***/ }),
|
|
209
209
|
/* 20 */
|
|
210
210
|
/***/ (function(module, exports) {
|
|
211
211
|
|
|
212
|
-
module.exports = require("
|
|
212
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/drawer");
|
|
213
213
|
|
|
214
214
|
/***/ }),
|
|
215
215
|
/* 21 */
|
|
216
216
|
/***/ (function(module, exports) {
|
|
217
217
|
|
|
218
|
-
module.exports = require("
|
|
218
|
+
module.exports = require("dayjs");
|
|
219
219
|
|
|
220
220
|
/***/ }),
|
|
221
221
|
/* 22 */
|
|
222
222
|
/***/ (function(module, exports) {
|
|
223
223
|
|
|
224
|
-
module.exports = require("element-ui/lib/
|
|
224
|
+
module.exports = require("element-ui/lib/link");
|
|
225
225
|
|
|
226
226
|
/***/ }),
|
|
227
227
|
/* 23 */
|
|
228
228
|
/***/ (function(module, exports) {
|
|
229
229
|
|
|
230
|
-
module.exports = require("element-ui/lib/
|
|
230
|
+
module.exports = require("element-ui/lib/form");
|
|
231
231
|
|
|
232
232
|
/***/ }),
|
|
233
233
|
/* 24 */
|
|
234
234
|
/***/ (function(module, exports) {
|
|
235
235
|
|
|
236
|
-
module.exports = require("element-ui/lib/
|
|
236
|
+
module.exports = require("element-ui/lib/row");
|
|
237
237
|
|
|
238
238
|
/***/ }),
|
|
239
239
|
/* 25 */
|
|
240
240
|
/***/ (function(module, exports) {
|
|
241
241
|
|
|
242
|
-
module.exports = require("element-ui/lib/
|
|
242
|
+
module.exports = require("element-ui/lib/col");
|
|
243
243
|
|
|
244
244
|
/***/ }),
|
|
245
245
|
/* 26 */
|
|
246
246
|
/***/ (function(module, exports) {
|
|
247
247
|
|
|
248
|
-
module.exports = require("
|
|
248
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/form-item");
|
|
249
249
|
|
|
250
250
|
/***/ }),
|
|
251
251
|
/* 27 */
|
|
252
252
|
/***/ (function(module, exports) {
|
|
253
253
|
|
|
254
|
-
module.exports = require("element-ui/lib/
|
|
254
|
+
module.exports = require("element-ui/lib/input-number");
|
|
255
255
|
|
|
256
256
|
/***/ }),
|
|
257
257
|
/* 28 */
|
|
258
258
|
/***/ (function(module, exports) {
|
|
259
259
|
|
|
260
|
-
module.exports = require("element-ui/lib/
|
|
260
|
+
module.exports = require("element-ui/lib/select");
|
|
261
261
|
|
|
262
262
|
/***/ }),
|
|
263
263
|
/* 29 */
|
|
264
264
|
/***/ (function(module, exports) {
|
|
265
265
|
|
|
266
|
-
module.exports = require("element-ui/lib/
|
|
266
|
+
module.exports = require("element-ui/lib/option");
|
|
267
267
|
|
|
268
268
|
/***/ }),
|
|
269
269
|
/* 30 */
|
|
270
270
|
/***/ (function(module, exports) {
|
|
271
271
|
|
|
272
|
-
module.exports = require("element-ui/lib/
|
|
272
|
+
module.exports = require("element-ui/lib/option-group");
|
|
273
273
|
|
|
274
274
|
/***/ }),
|
|
275
275
|
/* 31 */
|
|
276
276
|
/***/ (function(module, exports) {
|
|
277
277
|
|
|
278
|
-
module.exports = require("element-ui/lib/
|
|
278
|
+
module.exports = require("element-ui/lib/radio-group");
|
|
279
279
|
|
|
280
280
|
/***/ }),
|
|
281
281
|
/* 32 */
|
|
282
282
|
/***/ (function(module, exports) {
|
|
283
283
|
|
|
284
|
-
module.exports = require("element-ui/lib/
|
|
284
|
+
module.exports = require("element-ui/lib/radio-button");
|
|
285
285
|
|
|
286
286
|
/***/ }),
|
|
287
287
|
/* 33 */
|
|
288
288
|
/***/ (function(module, exports) {
|
|
289
289
|
|
|
290
|
-
module.exports = require("element-ui/lib/
|
|
290
|
+
module.exports = require("element-ui/lib/checkbox-group");
|
|
291
291
|
|
|
292
292
|
/***/ }),
|
|
293
293
|
/* 34 */
|
|
294
294
|
/***/ (function(module, exports) {
|
|
295
295
|
|
|
296
|
-
module.exports = require("element-ui/lib/
|
|
296
|
+
module.exports = require("element-ui/lib/checkbox");
|
|
297
297
|
|
|
298
298
|
/***/ }),
|
|
299
299
|
/* 35 */
|
|
300
300
|
/***/ (function(module, exports) {
|
|
301
301
|
|
|
302
|
-
module.exports = require("element-ui/lib/
|
|
302
|
+
module.exports = require("element-ui/lib/checkbox-button");
|
|
303
303
|
|
|
304
304
|
/***/ }),
|
|
305
305
|
/* 36 */
|
|
306
306
|
/***/ (function(module, exports) {
|
|
307
307
|
|
|
308
|
-
module.exports = require("element-ui/lib/
|
|
308
|
+
module.exports = require("element-ui/lib/cascader");
|
|
309
309
|
|
|
310
310
|
/***/ }),
|
|
311
311
|
/* 37 */
|
|
312
312
|
/***/ (function(module, exports) {
|
|
313
313
|
|
|
314
|
-
module.exports = require("element-ui/lib/
|
|
314
|
+
module.exports = require("element-ui/lib/switch");
|
|
315
315
|
|
|
316
316
|
/***/ }),
|
|
317
317
|
/* 38 */
|
|
318
318
|
/***/ (function(module, exports) {
|
|
319
319
|
|
|
320
|
-
module.exports = require("element-ui/lib/
|
|
320
|
+
module.exports = require("element-ui/lib/slider");
|
|
321
321
|
|
|
322
322
|
/***/ }),
|
|
323
323
|
/* 39 */
|
|
324
324
|
/***/ (function(module, exports) {
|
|
325
325
|
|
|
326
|
-
module.exports = require("element-ui/lib/
|
|
326
|
+
module.exports = require("element-ui/lib/transfer");
|
|
327
327
|
|
|
328
328
|
/***/ }),
|
|
329
329
|
/* 40 */
|
|
330
330
|
/***/ (function(module, exports) {
|
|
331
331
|
|
|
332
|
-
module.exports = require("element-ui/lib/
|
|
332
|
+
module.exports = require("element-ui/lib/time-picker");
|
|
333
333
|
|
|
334
334
|
/***/ }),
|
|
335
335
|
/* 41 */
|
|
336
336
|
/***/ (function(module, exports) {
|
|
337
337
|
|
|
338
|
-
module.exports = require("element-ui/lib/
|
|
338
|
+
module.exports = require("element-ui/lib/date-picker");
|
|
339
339
|
|
|
340
340
|
/***/ }),
|
|
341
341
|
/* 42 */
|
|
342
342
|
/***/ (function(module, exports) {
|
|
343
343
|
|
|
344
|
-
module.exports = require("element-ui/lib/
|
|
344
|
+
module.exports = require("element-ui/lib/upload");
|
|
345
345
|
|
|
346
346
|
/***/ }),
|
|
347
347
|
/* 43 */
|
|
348
348
|
/***/ (function(module, exports) {
|
|
349
349
|
|
|
350
|
-
module.exports = require("element-ui/lib/
|
|
350
|
+
module.exports = require("element-ui/lib/form-item");
|
|
351
351
|
|
|
352
352
|
/***/ }),
|
|
353
353
|
/* 44 */
|
|
354
354
|
/***/ (function(module, exports) {
|
|
355
355
|
|
|
356
|
-
module.exports = require("element-ui/lib/
|
|
356
|
+
module.exports = require("element-ui/lib/descriptions");
|
|
357
357
|
|
|
358
358
|
/***/ }),
|
|
359
359
|
/* 45 */
|
|
360
360
|
/***/ (function(module, exports) {
|
|
361
361
|
|
|
362
|
-
module.exports = require("
|
|
362
|
+
module.exports = require("element-ui/lib/descriptions-item");
|
|
363
363
|
|
|
364
364
|
/***/ }),
|
|
365
365
|
/* 46 */
|
|
366
366
|
/***/ (function(module, exports) {
|
|
367
367
|
|
|
368
|
-
module.exports = require("
|
|
368
|
+
module.exports = require("element-ui/lib/pagination");
|
|
369
369
|
|
|
370
370
|
/***/ }),
|
|
371
371
|
/* 47 */
|
|
372
372
|
/***/ (function(module, exports) {
|
|
373
373
|
|
|
374
|
-
module.exports = require("element-ui/lib/
|
|
374
|
+
module.exports = require("element-ui/lib/dropdown");
|
|
375
375
|
|
|
376
376
|
/***/ }),
|
|
377
377
|
/* 48 */
|
|
378
378
|
/***/ (function(module, exports) {
|
|
379
379
|
|
|
380
|
-
module.exports = require("
|
|
380
|
+
module.exports = require("element-ui/lib/dropdown-item");
|
|
381
381
|
|
|
382
382
|
/***/ }),
|
|
383
383
|
/* 49 */
|
|
384
384
|
/***/ (function(module, exports) {
|
|
385
385
|
|
|
386
|
-
module.exports = require("
|
|
386
|
+
module.exports = require("element-ui/lib/dropdown-menu");
|
|
387
387
|
|
|
388
388
|
/***/ }),
|
|
389
389
|
/* 50 */
|
|
390
390
|
/***/ (function(module, exports) {
|
|
391
391
|
|
|
392
|
-
module.exports = require("
|
|
392
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/form");
|
|
393
393
|
|
|
394
394
|
/***/ }),
|
|
395
395
|
/* 51 */
|
|
396
396
|
/***/ (function(module, exports) {
|
|
397
397
|
|
|
398
|
-
module.exports = require("
|
|
398
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/table");
|
|
399
399
|
|
|
400
400
|
/***/ }),
|
|
401
401
|
/* 52 */
|
|
402
402
|
/***/ (function(module, exports) {
|
|
403
403
|
|
|
404
|
-
module.exports = require("element-ui/lib/
|
|
404
|
+
module.exports = require("element-ui/lib/popover");
|
|
405
405
|
|
|
406
406
|
/***/ }),
|
|
407
407
|
/* 53 */
|
|
408
408
|
/***/ (function(module, exports) {
|
|
409
409
|
|
|
410
|
-
module.exports = require("
|
|
410
|
+
module.exports = require("async-validator");
|
|
411
411
|
|
|
412
412
|
/***/ }),
|
|
413
413
|
/* 54 */
|
|
414
414
|
/***/ (function(module, exports) {
|
|
415
415
|
|
|
416
|
-
module.exports = require("element-ui/
|
|
416
|
+
module.exports = require("element-ui/lib/tree");
|
|
417
417
|
|
|
418
418
|
/***/ }),
|
|
419
419
|
/* 55 */
|
|
420
420
|
/***/ (function(module, exports) {
|
|
421
421
|
|
|
422
|
-
module.exports = require("element-ui/
|
|
422
|
+
module.exports = require("element-ui/lib/badge");
|
|
423
423
|
|
|
424
424
|
/***/ }),
|
|
425
425
|
/* 56 */
|
|
426
426
|
/***/ (function(module, exports) {
|
|
427
427
|
|
|
428
|
-
module.exports = require("element-ui/
|
|
428
|
+
module.exports = require("element-ui/lib/message");
|
|
429
429
|
|
|
430
430
|
/***/ }),
|
|
431
431
|
/* 57 */
|
|
432
|
+
/***/ (function(module, exports) {
|
|
433
|
+
|
|
434
|
+
module.exports = require("element-ui/src/mixins/migrating");
|
|
435
|
+
|
|
436
|
+
/***/ }),
|
|
437
|
+
/* 58 */
|
|
432
438
|
/***/ (function(module, exports, __webpack_require__) {
|
|
433
439
|
|
|
434
|
-
module.exports = __webpack_require__(
|
|
440
|
+
module.exports = __webpack_require__(63);
|
|
435
441
|
|
|
436
442
|
|
|
437
443
|
/***/ }),
|
|
438
|
-
/*
|
|
444
|
+
/* 59 */
|
|
439
445
|
/***/ (function(module, exports) {
|
|
440
446
|
|
|
441
447
|
module.exports = require("codemirror/mode/javascript/javascript");
|
|
442
448
|
|
|
443
449
|
/***/ }),
|
|
444
|
-
/*
|
|
450
|
+
/* 60 */
|
|
445
451
|
/***/ (function(module, exports) {
|
|
446
452
|
|
|
447
453
|
module.exports = require("codemirror/mode/htmlmixed/htmlmixed");
|
|
448
454
|
|
|
449
455
|
/***/ }),
|
|
450
|
-
/*
|
|
456
|
+
/* 61 */
|
|
451
457
|
/***/ (function(module, exports) {
|
|
452
458
|
|
|
453
459
|
module.exports = require("codemirror/addon/mode/simple");
|
|
454
460
|
|
|
455
461
|
/***/ }),
|
|
456
|
-
/*
|
|
462
|
+
/* 62 */
|
|
457
463
|
/***/ (function(module, exports) {
|
|
458
464
|
|
|
459
465
|
module.exports = require("codemirror/addon/mode/multiplex");
|
|
460
466
|
|
|
461
467
|
/***/ }),
|
|
462
|
-
/*
|
|
468
|
+
/* 63 */
|
|
463
469
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
464
470
|
|
|
465
471
|
"use strict";
|
|
466
472
|
// ESM COMPAT FLAG
|
|
467
473
|
__webpack_require__.r(__webpack_exports__);
|
|
468
474
|
|
|
469
|
-
//
|
|
470
|
-
|
|
475
|
+
// EXPORTS
|
|
476
|
+
__webpack_require__.d(__webpack_exports__, "uuid", function() { return /* reexport */ uuid; });
|
|
477
|
+
__webpack_require__.d(__webpack_exports__, "mapTree", function() { return /* reexport */ mapTree; });
|
|
478
|
+
__webpack_require__.d(__webpack_exports__, "eachTree", function() { return /* reexport */ eachTree; });
|
|
479
|
+
__webpack_require__.d(__webpack_exports__, "findTree", function() { return /* reexport */ findTree; });
|
|
480
|
+
__webpack_require__.d(__webpack_exports__, "findTreeIndex", function() { return /* reexport */ findTreeIndex; });
|
|
481
|
+
__webpack_require__.d(__webpack_exports__, "getTree", function() { return /* reexport */ getTree; });
|
|
482
|
+
__webpack_require__.d(__webpack_exports__, "filterTree", function() { return /* reexport */ filterTree; });
|
|
483
|
+
__webpack_require__.d(__webpack_exports__, "everyTree", function() { return /* reexport */ everyTree; });
|
|
484
|
+
__webpack_require__.d(__webpack_exports__, "someTree", function() { return /* reexport */ someTree; });
|
|
485
|
+
__webpack_require__.d(__webpack_exports__, "spliceTree", function() { return /* reexport */ spliceTree; });
|
|
486
|
+
__webpack_require__.d(__webpack_exports__, "getTreeDepth", function() { return /* reexport */ getTreeDepth; });
|
|
487
|
+
__webpack_require__.d(__webpack_exports__, "getTreeAncestors", function() { return /* reexport */ getTreeAncestors; });
|
|
488
|
+
__webpack_require__.d(__webpack_exports__, "getTreeParent", function() { return /* reexport */ getTreeParent; });
|
|
489
|
+
__webpack_require__.d(__webpack_exports__, "spliceTreeSelf", function() { return /* reexport */ spliceTreeSelf; });
|
|
490
|
+
|
|
491
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=dfeb985e&
|
|
492
|
+
var formvue_type_template_id_dfeb985e_render = function render() {
|
|
471
493
|
var _vm = this,
|
|
472
494
|
_c = _vm._self._c
|
|
473
495
|
return _c(
|
|
474
496
|
"div",
|
|
475
|
-
{
|
|
497
|
+
{ class: ["form", { "is-full": _vm.isFull }] },
|
|
476
498
|
[
|
|
477
499
|
_vm._t("default", function () {
|
|
478
500
|
return [
|
|
@@ -491,7 +513,10 @@ var formvue_type_template_id_42f43bc0_render = function render() {
|
|
|
491
513
|
return [
|
|
492
514
|
_c(
|
|
493
515
|
"el-col",
|
|
494
|
-
{
|
|
516
|
+
{
|
|
517
|
+
key: item.prop,
|
|
518
|
+
attrs: { span: item.span || _vm.span },
|
|
519
|
+
},
|
|
495
520
|
[
|
|
496
521
|
_c(
|
|
497
522
|
"form-item",
|
|
@@ -531,36 +556,40 @@ var formvue_type_template_id_42f43bc0_render = function render() {
|
|
|
531
556
|
)
|
|
532
557
|
}
|
|
533
558
|
var staticRenderFns = []
|
|
534
|
-
|
|
559
|
+
formvue_type_template_id_dfeb985e_render._withStripped = true
|
|
535
560
|
|
|
536
561
|
|
|
537
|
-
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=
|
|
562
|
+
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=dfeb985e&
|
|
538
563
|
|
|
539
564
|
// EXTERNAL MODULE: external "element-ui/lib/form"
|
|
540
|
-
var form_ = __webpack_require__(
|
|
565
|
+
var form_ = __webpack_require__(23);
|
|
541
566
|
var form_default = /*#__PURE__*/__webpack_require__.n(form_);
|
|
542
567
|
|
|
543
568
|
// EXTERNAL MODULE: external "element-ui/lib/row"
|
|
544
|
-
var row_ = __webpack_require__(
|
|
569
|
+
var row_ = __webpack_require__(24);
|
|
545
570
|
var row_default = /*#__PURE__*/__webpack_require__.n(row_);
|
|
546
571
|
|
|
547
572
|
// EXTERNAL MODULE: external "element-ui/lib/col"
|
|
548
|
-
var col_ = __webpack_require__(
|
|
573
|
+
var col_ = __webpack_require__(25);
|
|
549
574
|
var col_default = /*#__PURE__*/__webpack_require__.n(col_);
|
|
550
575
|
|
|
551
576
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-item"
|
|
552
|
-
var form_item_ = __webpack_require__(
|
|
577
|
+
var form_item_ = __webpack_require__(26);
|
|
553
578
|
var form_item_default = /*#__PURE__*/__webpack_require__.n(form_item_);
|
|
554
579
|
|
|
555
580
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
|
|
556
581
|
var formula_ = __webpack_require__(2);
|
|
557
582
|
|
|
583
|
+
// EXTERNAL MODULE: external "lodash"
|
|
584
|
+
var external_lodash_ = __webpack_require__(1);
|
|
585
|
+
|
|
558
586
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=script&lang=js&
|
|
559
587
|
|
|
560
588
|
|
|
561
589
|
|
|
562
590
|
|
|
563
591
|
|
|
592
|
+
|
|
564
593
|
/* harmony default export */ var formvue_type_script_lang_js_ = ({
|
|
565
594
|
name: "Form",
|
|
566
595
|
componentName: "Form",
|
|
@@ -576,7 +605,12 @@ var formula_ = __webpack_require__(2);
|
|
|
576
605
|
};
|
|
577
606
|
},
|
|
578
607
|
props: {
|
|
608
|
+
isFull: {
|
|
609
|
+
type: Boolean,
|
|
610
|
+
default: true
|
|
611
|
+
},
|
|
579
612
|
prop: String,
|
|
613
|
+
span: Number,
|
|
580
614
|
formItems: {
|
|
581
615
|
type: Array,
|
|
582
616
|
default: function _default() {
|
|
@@ -623,11 +657,14 @@ var formula_ = __webpack_require__(2);
|
|
|
623
657
|
}
|
|
624
658
|
if (typeof item.show === "function" && !item.show.call(_this, {
|
|
625
659
|
form: _this,
|
|
660
|
+
formModel: _this.formModel,
|
|
626
661
|
config: item
|
|
627
662
|
})) {
|
|
628
663
|
return false;
|
|
629
664
|
}
|
|
630
|
-
if (typeof item.show === "string" && !Object(formula_["evaluate"])(item.show, _this.formModel
|
|
665
|
+
if (typeof item.show === "string" && !Object(formula_["evaluate"])(item.show, _this.formModel, {
|
|
666
|
+
evalMode: true
|
|
667
|
+
})) {
|
|
631
668
|
return false;
|
|
632
669
|
}
|
|
633
670
|
return true;
|
|
@@ -647,6 +684,7 @@ var formula_ = __webpack_require__(2);
|
|
|
647
684
|
data: function data() {
|
|
648
685
|
return {
|
|
649
686
|
defaultModel: {},
|
|
687
|
+
//默认值存储
|
|
650
688
|
formItemLayout: {}
|
|
651
689
|
};
|
|
652
690
|
},
|
|
@@ -654,9 +692,34 @@ var formula_ = __webpack_require__(2);
|
|
|
654
692
|
var _this2 = this;
|
|
655
693
|
this.formItems.forEach(function (item) {
|
|
656
694
|
_this2.formItemLayout[item.prop] = item;
|
|
695
|
+
if (typeof item.value === "function") {
|
|
696
|
+
item.value = item.value.call(_this2);
|
|
697
|
+
}
|
|
657
698
|
_this2.defaultModel[item.prop] = item.value;
|
|
658
|
-
|
|
659
|
-
|
|
699
|
+
//初始化值处理
|
|
700
|
+
var formVal = Object(external_lodash_["get"])(_this2.formModel, item.prop);
|
|
701
|
+
if (typeof formVal === 'undefined') {
|
|
702
|
+
//初始化数据值
|
|
703
|
+
if (item.prop && item.prop.indexOf(".") != -1) {
|
|
704
|
+
//循环设置值
|
|
705
|
+
var keyArr = item.prop.split('.');
|
|
706
|
+
var tempObj = _this2.formModel;
|
|
707
|
+
keyArr.forEach(function (key, index) {
|
|
708
|
+
if (index < keyArr.length - 1) {
|
|
709
|
+
if (typeof tempObj[key] === 'undefined') {
|
|
710
|
+
_this2.$set(tempObj, key, {});
|
|
711
|
+
}
|
|
712
|
+
tempObj = tempObj[key];
|
|
713
|
+
} else {
|
|
714
|
+
_this2.$set(tempObj, key, item.value || null);
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
} else {
|
|
718
|
+
_this2.$set(_this2.formModel, item.prop, item.value || null);
|
|
719
|
+
}
|
|
720
|
+
} else {
|
|
721
|
+
item.value = formVal;
|
|
722
|
+
}
|
|
660
723
|
});
|
|
661
724
|
},
|
|
662
725
|
methods: {
|
|
@@ -666,6 +729,9 @@ var formula_ = __webpack_require__(2);
|
|
|
666
729
|
validateField: function validateField(props, callback) {
|
|
667
730
|
return this.$refs.form.validateField(props, callback);
|
|
668
731
|
},
|
|
732
|
+
reset: function reset() {
|
|
733
|
+
this.resetFields();
|
|
734
|
+
},
|
|
669
735
|
resetFields: function resetFields() {
|
|
670
736
|
for (var key in this.defaultModel) {
|
|
671
737
|
if (this.formItemLayout[key]) {
|
|
@@ -799,7 +865,7 @@ function normalizeComponent(
|
|
|
799
865
|
|
|
800
866
|
var component = normalizeComponent(
|
|
801
867
|
src_formvue_type_script_lang_js_,
|
|
802
|
-
|
|
868
|
+
formvue_type_template_id_dfeb985e_render,
|
|
803
869
|
staticRenderFns,
|
|
804
870
|
false,
|
|
805
871
|
null,
|
|
@@ -976,7 +1042,7 @@ InputNumbervue_type_template_id_7a2f5f6e_render._withStripped = true
|
|
|
976
1042
|
// CONCATENATED MODULE: ./src/components/form/src/item/InputNumber.vue?vue&type=template&id=7a2f5f6e&
|
|
977
1043
|
|
|
978
1044
|
// EXTERNAL MODULE: external "element-ui/lib/input-number"
|
|
979
|
-
var input_number_ = __webpack_require__(
|
|
1045
|
+
var input_number_ = __webpack_require__(27);
|
|
980
1046
|
var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
|
|
981
1047
|
|
|
982
1048
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/InputNumber.vue?vue&type=script&lang=js&
|
|
@@ -1016,19 +1082,19 @@ var InputNumber_component = normalizeComponent(
|
|
|
1016
1082
|
|
|
1017
1083
|
/* harmony default export */ var InputNumber = (InputNumber_component.exports);
|
|
1018
1084
|
// EXTERNAL MODULE: external "element-ui/lib/select"
|
|
1019
|
-
var select_ = __webpack_require__(
|
|
1085
|
+
var select_ = __webpack_require__(28);
|
|
1020
1086
|
var select_default = /*#__PURE__*/__webpack_require__.n(select_);
|
|
1021
1087
|
|
|
1022
1088
|
// EXTERNAL MODULE: external "element-ui/lib/option"
|
|
1023
|
-
var option_ = __webpack_require__(
|
|
1089
|
+
var option_ = __webpack_require__(29);
|
|
1024
1090
|
var option_default = /*#__PURE__*/__webpack_require__.n(option_);
|
|
1025
1091
|
|
|
1026
1092
|
// EXTERNAL MODULE: external "element-ui/lib/option-group"
|
|
1027
|
-
var option_group_ = __webpack_require__(
|
|
1093
|
+
var option_group_ = __webpack_require__(30);
|
|
1028
1094
|
var option_group_default = /*#__PURE__*/__webpack_require__.n(option_group_);
|
|
1029
1095
|
|
|
1030
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=template&id=
|
|
1031
|
-
var
|
|
1096
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=template&id=b7fb5e4e&
|
|
1097
|
+
var SelectTreevue_type_template_id_b7fb5e4e_render = function render() {
|
|
1032
1098
|
var _vm = this,
|
|
1033
1099
|
_c = _vm._self._c
|
|
1034
1100
|
return _c(
|
|
@@ -1098,11 +1164,11 @@ var SelectTreevue_type_template_id_626a2185_render = function render() {
|
|
|
1098
1164
|
1
|
|
1099
1165
|
)
|
|
1100
1166
|
}
|
|
1101
|
-
var
|
|
1102
|
-
|
|
1167
|
+
var SelectTreevue_type_template_id_b7fb5e4e_staticRenderFns = []
|
|
1168
|
+
SelectTreevue_type_template_id_b7fb5e4e_render._withStripped = true
|
|
1103
1169
|
|
|
1104
1170
|
|
|
1105
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/SelectTree.vue?vue&type=template&id=
|
|
1171
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/SelectTree.vue?vue&type=template&id=b7fb5e4e&
|
|
1106
1172
|
|
|
1107
1173
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=script&lang=js&
|
|
1108
1174
|
/* harmony default export */ var SelectTreevue_type_script_lang_js_ = ({
|
|
@@ -1159,6 +1225,17 @@ SelectTreevue_type_template_id_626a2185_render._withStripped = true
|
|
|
1159
1225
|
},
|
|
1160
1226
|
|
|
1161
1227
|
watch: {
|
|
1228
|
+
value: function value(val) {
|
|
1229
|
+
if (!val) {
|
|
1230
|
+
if (this.$refs.tree) {
|
|
1231
|
+
this.$refs.tree.setCurrentKey(null);
|
|
1232
|
+
this.$refs.tree.setCheckedKeys([]);
|
|
1233
|
+
}
|
|
1234
|
+
this.selectedData = null;
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1237
|
+
this.initData();
|
|
1238
|
+
},
|
|
1162
1239
|
options: {
|
|
1163
1240
|
handler: function handler() {
|
|
1164
1241
|
var _this = this;
|
|
@@ -1271,9 +1348,11 @@ SelectTreevue_type_template_id_626a2185_render._withStripped = true
|
|
|
1271
1348
|
},
|
|
1272
1349
|
emitChange: function emitChange() {
|
|
1273
1350
|
if (this.multiple) {
|
|
1351
|
+
this.$emit("input", this.checkedKeys, this.checkedData);
|
|
1274
1352
|
this.$emit("change", this.checkedKeys, this.checkedData);
|
|
1275
1353
|
return false;
|
|
1276
1354
|
}
|
|
1355
|
+
this.$emit("input", this.checkedData && this.checkedData[this.optionProps.value], this.checkedData);
|
|
1277
1356
|
this.$emit("change", this.checkedData && this.checkedData[this.optionProps.value], this.checkedData);
|
|
1278
1357
|
},
|
|
1279
1358
|
setSingleData: function setSingleData(data) {
|
|
@@ -1297,6 +1376,11 @@ SelectTreevue_type_template_id_626a2185_render._withStripped = true
|
|
|
1297
1376
|
if (this.multiple) {
|
|
1298
1377
|
return false;
|
|
1299
1378
|
}
|
|
1379
|
+
if (data.disabled) {
|
|
1380
|
+
this.$refs.tree.setCurrentKey(this.value || null);
|
|
1381
|
+
console.warn("该节点数据disabled为true,不能选择");
|
|
1382
|
+
return false;
|
|
1383
|
+
}
|
|
1300
1384
|
this.setSingleData(data);
|
|
1301
1385
|
this.emitChange();
|
|
1302
1386
|
this.$refs.select.handleClose();
|
|
@@ -1338,8 +1422,8 @@ SelectTreevue_type_template_id_626a2185_render._withStripped = true
|
|
|
1338
1422
|
|
|
1339
1423
|
var SelectTree_component = normalizeComponent(
|
|
1340
1424
|
item_SelectTreevue_type_script_lang_js_,
|
|
1341
|
-
|
|
1342
|
-
|
|
1425
|
+
SelectTreevue_type_template_id_b7fb5e4e_render,
|
|
1426
|
+
SelectTreevue_type_template_id_b7fb5e4e_staticRenderFns,
|
|
1343
1427
|
false,
|
|
1344
1428
|
null,
|
|
1345
1429
|
null,
|
|
@@ -1348,9 +1432,6 @@ var SelectTree_component = normalizeComponent(
|
|
|
1348
1432
|
)
|
|
1349
1433
|
|
|
1350
1434
|
/* harmony default export */ var SelectTree = (SelectTree_component.exports);
|
|
1351
|
-
// EXTERNAL MODULE: external "lodash"
|
|
1352
|
-
var external_lodash_ = __webpack_require__(1);
|
|
1353
|
-
|
|
1354
1435
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Select.vue?vue&type=script&lang=js&
|
|
1355
1436
|
|
|
1356
1437
|
|
|
@@ -1370,16 +1451,18 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
1370
1451
|
},
|
|
1371
1452
|
props: {
|
|
1372
1453
|
selectMode: String,
|
|
1454
|
+
dictCode: String,
|
|
1373
1455
|
options: {
|
|
1374
1456
|
type: Array,
|
|
1375
1457
|
default: function _default() {
|
|
1376
1458
|
return null;
|
|
1377
1459
|
}
|
|
1378
1460
|
},
|
|
1461
|
+
optionRender: Function,
|
|
1379
1462
|
api: {
|
|
1380
1463
|
type: Object,
|
|
1381
1464
|
default: function _default() {
|
|
1382
|
-
return
|
|
1465
|
+
return {};
|
|
1383
1466
|
}
|
|
1384
1467
|
},
|
|
1385
1468
|
apiOpen: {
|
|
@@ -1391,11 +1474,7 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
1391
1474
|
optionProps: {
|
|
1392
1475
|
type: Object,
|
|
1393
1476
|
default: function _default() {
|
|
1394
|
-
return {
|
|
1395
|
-
value: "value",
|
|
1396
|
-
label: "label",
|
|
1397
|
-
children: "children"
|
|
1398
|
-
};
|
|
1477
|
+
return {};
|
|
1399
1478
|
}
|
|
1400
1479
|
}
|
|
1401
1480
|
},
|
|
@@ -1408,8 +1487,15 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
1408
1487
|
attrs: function attrs() {
|
|
1409
1488
|
return Object.assign({}, this.$attrs);
|
|
1410
1489
|
},
|
|
1490
|
+
dictOption: function dictOption() {
|
|
1491
|
+
if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
|
|
1492
|
+
return this.$COMPONENT.dataSource.dict[this.dictCode];
|
|
1493
|
+
}
|
|
1494
|
+
return [];
|
|
1495
|
+
},
|
|
1411
1496
|
optionData: function optionData() {
|
|
1412
|
-
|
|
1497
|
+
var options = this.options || this.apiOptions;
|
|
1498
|
+
return Array.isArray(options) ? options : this.dictOption;
|
|
1413
1499
|
},
|
|
1414
1500
|
_form: function _form() {
|
|
1415
1501
|
var parent = this.$parent;
|
|
@@ -1422,6 +1508,13 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
1422
1508
|
}
|
|
1423
1509
|
return false;
|
|
1424
1510
|
},
|
|
1511
|
+
_optionProps: function _optionProps() {
|
|
1512
|
+
return Object.assign({
|
|
1513
|
+
value: "value",
|
|
1514
|
+
label: "label",
|
|
1515
|
+
children: "children"
|
|
1516
|
+
}, this.optionProps);
|
|
1517
|
+
},
|
|
1425
1518
|
request: function request() {
|
|
1426
1519
|
return this.api.request || this._form && this._form.request || (this.$COMPONENT || {}).request;
|
|
1427
1520
|
}
|
|
@@ -1441,26 +1534,36 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
1441
1534
|
},
|
|
1442
1535
|
methods: {
|
|
1443
1536
|
transformOption: function transformOption(item) {
|
|
1444
|
-
item.value = item[this.
|
|
1445
|
-
item.label = item[this.
|
|
1446
|
-
if (item[this.
|
|
1447
|
-
item.children = this.transformOption(item[this.
|
|
1537
|
+
item.value = item[this._optionProps.value];
|
|
1538
|
+
item.label = item[this._optionProps.label];
|
|
1539
|
+
if (item[this._optionProps.children]) {
|
|
1540
|
+
item.children = this.transformOption(item[this._optionProps.children]);
|
|
1448
1541
|
}
|
|
1449
1542
|
return item;
|
|
1450
1543
|
},
|
|
1451
1544
|
initApi: function initApi() {
|
|
1452
1545
|
var _this = this;
|
|
1453
|
-
if (!(this.api && this.request)) {
|
|
1546
|
+
if (!(this.api.url && this.request)) {
|
|
1454
1547
|
return false;
|
|
1455
1548
|
}
|
|
1549
|
+
var reqData = Object(external_lodash_["merge"])({}, this.api.data);
|
|
1550
|
+
if (typeof this.api.before === "function") {
|
|
1551
|
+
reqData = this.api.before.call(this, reqData, {
|
|
1552
|
+
form: this._form,
|
|
1553
|
+
formModel: this._form && this._form.formModel
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1456
1556
|
this.request({
|
|
1457
|
-
url: Object(formula_["evaluate"])(this.api.url,
|
|
1557
|
+
url: Object(formula_["evaluate"])(this.api.url, reqData),
|
|
1458
1558
|
method: this.api.method || "GET",
|
|
1459
|
-
|
|
1559
|
+
headers: this.api.headers,
|
|
1560
|
+
data: reqData
|
|
1460
1561
|
}).then(function (res) {
|
|
1461
|
-
if (typeof _this.api.
|
|
1462
|
-
|
|
1463
|
-
|
|
1562
|
+
if (typeof _this.api.after === "function") {
|
|
1563
|
+
res = _this.api.after.call(_this, res, {
|
|
1564
|
+
form: _this._form,
|
|
1565
|
+
formModel: _this._form && _this._form.formModel
|
|
1566
|
+
});
|
|
1464
1567
|
}
|
|
1465
1568
|
_this.apiOptions = _this.api.dataPath ? Object(external_lodash_["get"])(res, _this.api.dataPath, []) : res;
|
|
1466
1569
|
}).catch(function (error) {
|
|
@@ -1471,19 +1574,22 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
1471
1574
|
var _this2 = this;
|
|
1472
1575
|
return this.optionData.map(function (item) {
|
|
1473
1576
|
return h("el-option-group", {
|
|
1474
|
-
"key": item[_this2.
|
|
1577
|
+
"key": item[_this2._optionProps.value],
|
|
1475
1578
|
"attrs": {
|
|
1476
|
-
"label": item[_this2.
|
|
1579
|
+
"label": item[_this2._optionProps.label]
|
|
1477
1580
|
}
|
|
1478
|
-
}, [item[_this2.
|
|
1581
|
+
}, [item[_this2._optionProps.children] && item[_this2._optionProps.children].map(function (itemOpt) {
|
|
1479
1582
|
return h("el-option", {
|
|
1480
|
-
"key": itemOpt[_this2.
|
|
1583
|
+
"key": itemOpt[_this2._optionProps.value],
|
|
1481
1584
|
"attrs": {
|
|
1482
|
-
"value": itemOpt[_this2.
|
|
1483
|
-
"label": itemOpt[_this2.
|
|
1585
|
+
"value": itemOpt[_this2._optionProps.value],
|
|
1586
|
+
"label": itemOpt[_this2._optionProps.label],
|
|
1484
1587
|
"disabled": itemOpt.disabled
|
|
1485
1588
|
}
|
|
1486
|
-
}
|
|
1589
|
+
}, [_this2.optionRender ? _this2.optionRender.call(_this2, h, itemOpt, {
|
|
1590
|
+
form: _this2._form,
|
|
1591
|
+
formModel: _this2._form && _this2._form.formModel
|
|
1592
|
+
}) : null]);
|
|
1487
1593
|
})]);
|
|
1488
1594
|
});
|
|
1489
1595
|
},
|
|
@@ -1491,7 +1597,7 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
1491
1597
|
var param = {
|
|
1492
1598
|
attrs: Object.assign({}, this.$attrs, {
|
|
1493
1599
|
options: this.optionData,
|
|
1494
|
-
optionProps: this.
|
|
1600
|
+
optionProps: this._optionProps
|
|
1495
1601
|
}),
|
|
1496
1602
|
slots: this.$slots,
|
|
1497
1603
|
scopedSlots: this.$slots,
|
|
@@ -1504,14 +1610,17 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
1504
1610
|
if (this.selectMode === "group") {
|
|
1505
1611
|
return this.renderGroup(h, scoped);
|
|
1506
1612
|
}
|
|
1507
|
-
return this.optionData.map(function (
|
|
1613
|
+
return this.optionData.map(function (itemOpt) {
|
|
1508
1614
|
return h("el-option", {
|
|
1509
|
-
"key":
|
|
1615
|
+
"key": itemOpt[_this3._optionProps.value],
|
|
1510
1616
|
"attrs": {
|
|
1511
|
-
"value":
|
|
1512
|
-
"label":
|
|
1617
|
+
"value": itemOpt[_this3._optionProps.value],
|
|
1618
|
+
"label": itemOpt[_this3._optionProps.label]
|
|
1513
1619
|
}
|
|
1514
|
-
}
|
|
1620
|
+
}, [_this3.optionRender ? _this3.optionRender.call(_this3, h, itemOpt, {
|
|
1621
|
+
form: _this3._form,
|
|
1622
|
+
formModel: _this3._form && _this3._form.formModel
|
|
1623
|
+
}) : null]);
|
|
1515
1624
|
});
|
|
1516
1625
|
}
|
|
1517
1626
|
},
|
|
@@ -1559,15 +1668,15 @@ var Select_component = normalizeComponent(
|
|
|
1559
1668
|
|
|
1560
1669
|
/* harmony default export */ var Select = (Select_component.exports);
|
|
1561
1670
|
// EXTERNAL MODULE: external "element-ui/lib/radio-group"
|
|
1562
|
-
var radio_group_ = __webpack_require__(
|
|
1671
|
+
var radio_group_ = __webpack_require__(31);
|
|
1563
1672
|
var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
|
|
1564
1673
|
|
|
1565
1674
|
// EXTERNAL MODULE: external "element-ui/lib/radio"
|
|
1566
|
-
var radio_ = __webpack_require__(
|
|
1675
|
+
var radio_ = __webpack_require__(14);
|
|
1567
1676
|
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
|
|
1568
1677
|
|
|
1569
1678
|
// EXTERNAL MODULE: external "element-ui/lib/radio-button"
|
|
1570
|
-
var radio_button_ = __webpack_require__(
|
|
1679
|
+
var radio_button_ = __webpack_require__(32);
|
|
1571
1680
|
var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
1572
1681
|
|
|
1573
1682
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Radio.vue?vue&type=script&lang=js&
|
|
@@ -1586,6 +1695,7 @@ var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
|
1586
1695
|
},
|
|
1587
1696
|
props: {
|
|
1588
1697
|
size: String,
|
|
1698
|
+
dictCode: String,
|
|
1589
1699
|
border: {
|
|
1590
1700
|
type: Boolean,
|
|
1591
1701
|
default: function _default() {
|
|
@@ -1634,8 +1744,14 @@ var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
|
1634
1744
|
border: this.border
|
|
1635
1745
|
});
|
|
1636
1746
|
},
|
|
1747
|
+
dictOption: function dictOption() {
|
|
1748
|
+
if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
|
|
1749
|
+
return this.$COMPONENT.dataSource.dict[this.dictCode];
|
|
1750
|
+
}
|
|
1751
|
+
return [];
|
|
1752
|
+
},
|
|
1637
1753
|
optionData: function optionData() {
|
|
1638
|
-
return this.options || this.apiOptions ||
|
|
1754
|
+
return this.options || this.apiOptions || this.dictOption;
|
|
1639
1755
|
},
|
|
1640
1756
|
_form: function _form() {
|
|
1641
1757
|
var parent = this.$parent;
|
|
@@ -1754,15 +1870,15 @@ var Radio_component = normalizeComponent(
|
|
|
1754
1870
|
|
|
1755
1871
|
/* harmony default export */ var Radio = (Radio_component.exports);
|
|
1756
1872
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
|
|
1757
|
-
var checkbox_group_ = __webpack_require__(
|
|
1873
|
+
var checkbox_group_ = __webpack_require__(33);
|
|
1758
1874
|
var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
|
|
1759
1875
|
|
|
1760
1876
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
|
|
1761
|
-
var checkbox_ = __webpack_require__(
|
|
1877
|
+
var checkbox_ = __webpack_require__(34);
|
|
1762
1878
|
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
|
|
1763
1879
|
|
|
1764
1880
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-button"
|
|
1765
|
-
var checkbox_button_ = __webpack_require__(
|
|
1881
|
+
var checkbox_button_ = __webpack_require__(35);
|
|
1766
1882
|
var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button_);
|
|
1767
1883
|
|
|
1768
1884
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Checkbox.vue?vue&type=script&lang=js&
|
|
@@ -1781,6 +1897,7 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
|
|
|
1781
1897
|
},
|
|
1782
1898
|
props: {
|
|
1783
1899
|
size: String,
|
|
1900
|
+
dictCode: String,
|
|
1784
1901
|
border: {
|
|
1785
1902
|
type: Boolean,
|
|
1786
1903
|
default: function _default() {
|
|
@@ -1809,11 +1926,7 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
|
|
|
1809
1926
|
optionProps: {
|
|
1810
1927
|
type: Object,
|
|
1811
1928
|
default: function _default() {
|
|
1812
|
-
return {
|
|
1813
|
-
value: "value",
|
|
1814
|
-
label: "label",
|
|
1815
|
-
name: "name"
|
|
1816
|
-
};
|
|
1929
|
+
return {};
|
|
1817
1930
|
}
|
|
1818
1931
|
}
|
|
1819
1932
|
},
|
|
@@ -1829,8 +1942,14 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
|
|
|
1829
1942
|
border: this.border
|
|
1830
1943
|
});
|
|
1831
1944
|
},
|
|
1945
|
+
dictOption: function dictOption() {
|
|
1946
|
+
if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
|
|
1947
|
+
return this.$COMPONENT.dataSource.dict[this.dictCode];
|
|
1948
|
+
}
|
|
1949
|
+
return [];
|
|
1950
|
+
},
|
|
1832
1951
|
optionData: function optionData() {
|
|
1833
|
-
return this.options || this.apiOptions ||
|
|
1952
|
+
return this.options || this.apiOptions || this.dictOption;
|
|
1834
1953
|
},
|
|
1835
1954
|
_form: function _form() {
|
|
1836
1955
|
var parent = this.$parent;
|
|
@@ -1843,6 +1962,13 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
|
|
|
1843
1962
|
}
|
|
1844
1963
|
return false;
|
|
1845
1964
|
},
|
|
1965
|
+
_optionProps: function _optionProps() {
|
|
1966
|
+
return Object.assign({
|
|
1967
|
+
value: "value",
|
|
1968
|
+
label: "label",
|
|
1969
|
+
children: "children"
|
|
1970
|
+
}, this.optionProps);
|
|
1971
|
+
},
|
|
1846
1972
|
request: function request() {
|
|
1847
1973
|
return this.api.request || this._form && this._form.request || (this.$COMPONENT || {}).request;
|
|
1848
1974
|
}
|
|
@@ -1884,12 +2010,12 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
|
|
|
1884
2010
|
var _this2 = this;
|
|
1885
2011
|
return this.optionData.map(function (item) {
|
|
1886
2012
|
return h("el-checkbox-button", {
|
|
1887
|
-
"key": item[_this2.
|
|
2013
|
+
"key": item[_this2._optionProps.value],
|
|
1888
2014
|
"attrs": {
|
|
1889
|
-
"label": item[_this2.
|
|
1890
|
-
"disabled": item[_this2.
|
|
2015
|
+
"label": item[_this2._optionProps.value],
|
|
2016
|
+
"disabled": item[_this2._optionProps.disabled]
|
|
1891
2017
|
}
|
|
1892
|
-
}, [item[_this2.
|
|
2018
|
+
}, [item[_this2._optionProps.label]]);
|
|
1893
2019
|
});
|
|
1894
2020
|
},
|
|
1895
2021
|
renderOptions: function renderOptions(h, scoped) {
|
|
@@ -1899,15 +2025,15 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
|
|
|
1899
2025
|
}
|
|
1900
2026
|
return this.optionData.map(function (item) {
|
|
1901
2027
|
return h("el-checkbox", {
|
|
1902
|
-
"key": item[_this3.
|
|
2028
|
+
"key": item[_this3._optionProps.value],
|
|
1903
2029
|
"attrs": {
|
|
1904
|
-
"value": item[_this3.
|
|
1905
|
-
"label": item[_this3.
|
|
1906
|
-
"disabled": item[_this3.
|
|
2030
|
+
"value": item[_this3._optionProps.value],
|
|
2031
|
+
"label": item[_this3._optionProps.value],
|
|
2032
|
+
"disabled": item[_this3._optionProps.disabled],
|
|
1907
2033
|
"border": _this3.border,
|
|
1908
2034
|
"size": _this3.size
|
|
1909
2035
|
}
|
|
1910
|
-
}, [item[_this3.
|
|
2036
|
+
}, [item[_this3._optionProps.label]]);
|
|
1911
2037
|
});
|
|
1912
2038
|
}
|
|
1913
2039
|
},
|
|
@@ -2003,32 +2129,99 @@ var InputText_component = normalizeComponent(
|
|
|
2003
2129
|
)
|
|
2004
2130
|
|
|
2005
2131
|
/* harmony default export */ var InputText = (InputText_component.exports);
|
|
2006
|
-
//
|
|
2007
|
-
var
|
|
2008
|
-
var
|
|
2132
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Cascader.vue?vue&type=template&id=1306b5bf&
|
|
2133
|
+
var Cascadervue_type_template_id_1306b5bf_render = function render() {
|
|
2134
|
+
var _vm = this,
|
|
2135
|
+
_c = _vm._self._c
|
|
2136
|
+
return _c(
|
|
2137
|
+
"el-cascader",
|
|
2138
|
+
_vm._g(
|
|
2139
|
+
_vm._b(
|
|
2140
|
+
{ attrs: { options: _vm.options } },
|
|
2141
|
+
"el-cascader",
|
|
2142
|
+
_vm.attrs,
|
|
2143
|
+
false
|
|
2144
|
+
),
|
|
2145
|
+
_vm.$listeners
|
|
2146
|
+
)
|
|
2147
|
+
)
|
|
2148
|
+
}
|
|
2149
|
+
var Cascadervue_type_template_id_1306b5bf_staticRenderFns = []
|
|
2150
|
+
Cascadervue_type_template_id_1306b5bf_render._withStripped = true
|
|
2151
|
+
|
|
2152
|
+
|
|
2153
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/Cascader.vue?vue&type=template&id=1306b5bf&
|
|
2009
2154
|
|
|
2010
2155
|
// EXTERNAL MODULE: external "element-ui/lib/cascader"
|
|
2011
|
-
var cascader_ = __webpack_require__(
|
|
2156
|
+
var cascader_ = __webpack_require__(36);
|
|
2012
2157
|
var cascader_default = /*#__PURE__*/__webpack_require__.n(cascader_);
|
|
2013
2158
|
|
|
2159
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Cascader.vue?vue&type=script&lang=js&
|
|
2160
|
+
|
|
2161
|
+
/* harmony default export */ var Cascadervue_type_script_lang_js_ = ({
|
|
2162
|
+
name: "Cascader",
|
|
2163
|
+
components: {
|
|
2164
|
+
elCascader: cascader_default.a
|
|
2165
|
+
},
|
|
2166
|
+
props: {
|
|
2167
|
+
size: String,
|
|
2168
|
+
options: {
|
|
2169
|
+
type: Array,
|
|
2170
|
+
default: function _default() {
|
|
2171
|
+
return null;
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
},
|
|
2175
|
+
computed: {
|
|
2176
|
+
attrs: function attrs() {
|
|
2177
|
+
return Object.assign({}, this.$attrs);
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
});
|
|
2181
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/Cascader.vue?vue&type=script&lang=js&
|
|
2182
|
+
/* harmony default export */ var item_Cascadervue_type_script_lang_js_ = (Cascadervue_type_script_lang_js_);
|
|
2183
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/Cascader.vue
|
|
2184
|
+
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
|
|
2189
|
+
/* normalize component */
|
|
2190
|
+
|
|
2191
|
+
var Cascader_component = normalizeComponent(
|
|
2192
|
+
item_Cascadervue_type_script_lang_js_,
|
|
2193
|
+
Cascadervue_type_template_id_1306b5bf_render,
|
|
2194
|
+
Cascadervue_type_template_id_1306b5bf_staticRenderFns,
|
|
2195
|
+
false,
|
|
2196
|
+
null,
|
|
2197
|
+
null,
|
|
2198
|
+
null
|
|
2199
|
+
|
|
2200
|
+
)
|
|
2201
|
+
|
|
2202
|
+
/* harmony default export */ var Cascader = (Cascader_component.exports);
|
|
2203
|
+
// EXTERNAL MODULE: external "element-ui/lib/switch"
|
|
2204
|
+
var switch_ = __webpack_require__(37);
|
|
2205
|
+
var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
|
|
2206
|
+
|
|
2014
2207
|
// EXTERNAL MODULE: external "element-ui/lib/slider"
|
|
2015
|
-
var slider_ = __webpack_require__(
|
|
2208
|
+
var slider_ = __webpack_require__(38);
|
|
2016
2209
|
var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
|
|
2017
2210
|
|
|
2018
2211
|
// EXTERNAL MODULE: external "element-ui/lib/transfer"
|
|
2019
|
-
var transfer_ = __webpack_require__(
|
|
2212
|
+
var transfer_ = __webpack_require__(39);
|
|
2020
2213
|
var transfer_default = /*#__PURE__*/__webpack_require__.n(transfer_);
|
|
2021
2214
|
|
|
2022
2215
|
// EXTERNAL MODULE: external "element-ui/lib/time-picker"
|
|
2023
|
-
var time_picker_ = __webpack_require__(
|
|
2216
|
+
var time_picker_ = __webpack_require__(40);
|
|
2024
2217
|
var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);
|
|
2025
2218
|
|
|
2026
2219
|
// EXTERNAL MODULE: external "element-ui/lib/date-picker"
|
|
2027
|
-
var date_picker_ = __webpack_require__(
|
|
2220
|
+
var date_picker_ = __webpack_require__(41);
|
|
2028
2221
|
var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);
|
|
2029
2222
|
|
|
2030
2223
|
// EXTERNAL MODULE: external "element-ui/lib/upload"
|
|
2031
|
-
var upload_ = __webpack_require__(
|
|
2224
|
+
var upload_ = __webpack_require__(42);
|
|
2032
2225
|
var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
2033
2226
|
|
|
2034
2227
|
// CONCATENATED MODULE: ./src/components/form/src/form-input.js
|
|
@@ -2042,6 +2235,8 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
|
2042
2235
|
|
|
2043
2236
|
|
|
2044
2237
|
|
|
2238
|
+
// import elCascader from "element-ui/packages/cascader";
|
|
2239
|
+
|
|
2045
2240
|
|
|
2046
2241
|
|
|
2047
2242
|
|
|
@@ -2050,7 +2245,7 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
|
2050
2245
|
name: "FormInput",
|
|
2051
2246
|
inheritAttrs: false,
|
|
2052
2247
|
components: {
|
|
2053
|
-
Cascader:
|
|
2248
|
+
Cascader: Cascader,
|
|
2054
2249
|
Slider: slider_default.a,
|
|
2055
2250
|
Transfer: transfer_default.a,
|
|
2056
2251
|
Switchs: switch_default.a,
|
|
@@ -2060,6 +2255,7 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
|
2060
2255
|
Input: Input,
|
|
2061
2256
|
InputNumber: InputNumber,
|
|
2062
2257
|
Select: Select,
|
|
2258
|
+
SelectTree: SelectTree,
|
|
2063
2259
|
Radio: Radio,
|
|
2064
2260
|
Checkbox: Checkbox,
|
|
2065
2261
|
InputText: InputText
|
|
@@ -2109,7 +2305,7 @@ form_input.install = function (Vue) {
|
|
|
2109
2305
|
};
|
|
2110
2306
|
/* harmony default export */ var components_form_input = (form_input);
|
|
2111
2307
|
// EXTERNAL MODULE: external "element-ui/lib/form-item"
|
|
2112
|
-
var lib_form_item_ = __webpack_require__(
|
|
2308
|
+
var lib_form_item_ = __webpack_require__(43);
|
|
2113
2309
|
var lib_form_item_default = /*#__PURE__*/__webpack_require__.n(lib_form_item_);
|
|
2114
2310
|
|
|
2115
2311
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-input"
|
|
@@ -2120,6 +2316,7 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2120
2316
|
|
|
2121
2317
|
|
|
2122
2318
|
|
|
2319
|
+
|
|
2123
2320
|
/* harmony default export */ var form_item = ({
|
|
2124
2321
|
name: "FormItem",
|
|
2125
2322
|
components: {
|
|
@@ -2132,6 +2329,10 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2132
2329
|
prop: String,
|
|
2133
2330
|
value: [String, Number, Boolean, Object, Array, Date],
|
|
2134
2331
|
label: String,
|
|
2332
|
+
labelWidth: String,
|
|
2333
|
+
showMessage: Boolean,
|
|
2334
|
+
inlineMessage: Boolean,
|
|
2335
|
+
size: String,
|
|
2135
2336
|
rules: [Object, Array],
|
|
2136
2337
|
actions: Array,
|
|
2137
2338
|
on: Object,
|
|
@@ -2141,7 +2342,11 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2141
2342
|
watch: {
|
|
2142
2343
|
value: function value(val) {
|
|
2143
2344
|
//监听form的formModel变化,处理config的value变化
|
|
2144
|
-
this.config.value
|
|
2345
|
+
if (this.config.value === val) {
|
|
2346
|
+
return false;
|
|
2347
|
+
}
|
|
2348
|
+
this.setValue(val);
|
|
2349
|
+
this.execEvent("input", val);
|
|
2145
2350
|
if (this.form && this.form.formModel) {
|
|
2146
2351
|
this.$emit("formItemChange", {
|
|
2147
2352
|
itemConfig: this.config,
|
|
@@ -2201,8 +2406,9 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2201
2406
|
if (this.on && this.on[eventName]) {
|
|
2202
2407
|
this.$emit.apply(this, [eventName, {
|
|
2203
2408
|
trigger: this.form,
|
|
2409
|
+
triggerConfig: this.form.formItemLayout[this.prop],
|
|
2204
2410
|
triggerForm: this.form.formModel,
|
|
2205
|
-
|
|
2411
|
+
triggerFormConfig: this.form.formItemLayout
|
|
2206
2412
|
}].concat(arg));
|
|
2207
2413
|
}
|
|
2208
2414
|
//联动配置事件
|
|
@@ -2224,6 +2430,16 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2224
2430
|
triggerConfig: this.form.formItemLayout[this.prop],
|
|
2225
2431
|
targetConfig: targetConfig
|
|
2226
2432
|
}].concat(arg));
|
|
2433
|
+
},
|
|
2434
|
+
setValue: function setValue(val) {
|
|
2435
|
+
if (this.form) {
|
|
2436
|
+
if (this.prop && this.prop.indexOf(".") != -1) {
|
|
2437
|
+
Object(external_lodash_["set"])(this.form.formModel, this.prop, val);
|
|
2438
|
+
} else {
|
|
2439
|
+
this.form.formModel[this.prop] = val;
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
this.config.value = val;
|
|
2227
2443
|
}
|
|
2228
2444
|
},
|
|
2229
2445
|
render: function render(h) {
|
|
@@ -2231,23 +2447,31 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2231
2447
|
if (typeof this.render === "function") {
|
|
2232
2448
|
return this.render(h, {
|
|
2233
2449
|
form: this.form,
|
|
2450
|
+
formModel: this.form.formModel,
|
|
2451
|
+
config: this.config
|
|
2452
|
+
});
|
|
2453
|
+
}
|
|
2454
|
+
// disabled用的多,特殊处理下支持函数
|
|
2455
|
+
var disabled = this.config.disabled;
|
|
2456
|
+
if (typeof this.config.disabled === "function") {
|
|
2457
|
+
disabled = this.config.disabled.call(this, {
|
|
2458
|
+
form: this.form,
|
|
2459
|
+
formModel: this.form.formModel,
|
|
2234
2460
|
config: this.config
|
|
2235
2461
|
});
|
|
2236
2462
|
}
|
|
2237
2463
|
var itemProp = {
|
|
2238
|
-
attrs: Object.assign({}, this.config
|
|
2464
|
+
attrs: Object.assign({}, this.config, {
|
|
2465
|
+
disabled: disabled
|
|
2466
|
+
}),
|
|
2239
2467
|
on: Object.assign({}, this.eventOn, this.actionEventOn, {
|
|
2240
2468
|
input: function input(val) {
|
|
2469
|
+
_this2.setValue(val);
|
|
2241
2470
|
_this2.execEvent("input", val);
|
|
2242
|
-
if (_this2.form) {
|
|
2243
|
-
_this2.form.formModel[_this2.prop] = val;
|
|
2244
|
-
}
|
|
2245
2471
|
},
|
|
2246
2472
|
change: function change(val, selectOption) {
|
|
2473
|
+
_this2.setValue(val);
|
|
2247
2474
|
_this2.execEvent("change", val, selectOption);
|
|
2248
|
-
if (_this2.form) {
|
|
2249
|
-
_this2.form.formModel[_this2.prop] = val;
|
|
2250
|
-
}
|
|
2251
2475
|
}
|
|
2252
2476
|
})
|
|
2253
2477
|
};
|
|
@@ -2255,7 +2479,9 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2255
2479
|
"attrs": {
|
|
2256
2480
|
"label": this.label,
|
|
2257
2481
|
"prop": this.prop,
|
|
2258
|
-
"rules": this.rules
|
|
2482
|
+
"rules": this.rules,
|
|
2483
|
+
"labelWidth": this.labelWidth,
|
|
2484
|
+
"size": this.size
|
|
2259
2485
|
}
|
|
2260
2486
|
}, [h("form-input", babel_helper_vue_jsx_merge_props_default()([{}, itemProp]))]);
|
|
2261
2487
|
}
|
|
@@ -2270,7 +2496,7 @@ form_item.install = function (Vue) {
|
|
|
2270
2496
|
// CONCATENATED MODULE: ./src/components/form-group/src/content.js
|
|
2271
2497
|
|
|
2272
2498
|
|
|
2273
|
-
/* harmony default export */ var
|
|
2499
|
+
/* harmony default export */ var src_content = ({
|
|
2274
2500
|
name: "Content",
|
|
2275
2501
|
inheritAttrs: false,
|
|
2276
2502
|
components: {
|
|
@@ -2328,7 +2554,7 @@ form_item.install = function (Vue) {
|
|
|
2328
2554
|
}
|
|
2329
2555
|
},
|
|
2330
2556
|
render: function render(h) {
|
|
2331
|
-
if (this.slots.form) {
|
|
2557
|
+
if (this.slots && this.slots.form) {
|
|
2332
2558
|
var vForm = typeof this.slots.form === "function" ? this.slots.form.call(this, h) : this.slots.form;
|
|
2333
2559
|
return vForm;
|
|
2334
2560
|
}
|
|
@@ -2516,7 +2742,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
2516
2742
|
}, form),
|
|
2517
2743
|
on: form.on
|
|
2518
2744
|
};
|
|
2519
|
-
return h(
|
|
2745
|
+
return h(src_content, babel_helper_vue_jsx_merge_props_default()([{
|
|
2520
2746
|
"ref": form.prop,
|
|
2521
2747
|
"key": form.prop,
|
|
2522
2748
|
"attrs": {
|
|
@@ -2695,6 +2921,7 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2695
2921
|
}
|
|
2696
2922
|
},
|
|
2697
2923
|
props: {
|
|
2924
|
+
request: Function,
|
|
2698
2925
|
dialog: {
|
|
2699
2926
|
type: Object,
|
|
2700
2927
|
default: function _default() {
|
|
@@ -2707,6 +2934,10 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2707
2934
|
}
|
|
2708
2935
|
},
|
|
2709
2936
|
formMode: String,
|
|
2937
|
+
noApiClose: {
|
|
2938
|
+
type: Boolean,
|
|
2939
|
+
default: true
|
|
2940
|
+
},
|
|
2710
2941
|
api: {
|
|
2711
2942
|
type: Object,
|
|
2712
2943
|
default: function _default() {
|
|
@@ -2737,6 +2968,7 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2737
2968
|
return {
|
|
2738
2969
|
show: false,
|
|
2739
2970
|
formModel: {},
|
|
2971
|
+
expandModel: null,
|
|
2740
2972
|
defaultTools: [{
|
|
2741
2973
|
label: this.dialog.cancelButtonText || "取消",
|
|
2742
2974
|
type: this.confirmButtonType,
|
|
@@ -2755,13 +2987,20 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2755
2987
|
};
|
|
2756
2988
|
},
|
|
2757
2989
|
computed: {
|
|
2758
|
-
|
|
2759
|
-
return this.api.request || (this.$COMPONENT || {}).request;
|
|
2990
|
+
requester: function requester() {
|
|
2991
|
+
return this.api.request || this.request || (this.$COMPONENT || {}).request;
|
|
2760
2992
|
}
|
|
2761
2993
|
},
|
|
2762
2994
|
methods: {
|
|
2763
|
-
open: function open() {
|
|
2995
|
+
open: function open(model, expandModel) {
|
|
2996
|
+
var _this2 = this;
|
|
2764
2997
|
this.show = true;
|
|
2998
|
+
this.expandModel = expandModel;
|
|
2999
|
+
if (model) {
|
|
3000
|
+
this.$nextTick(function () {
|
|
3001
|
+
_this2.setFormModel(model);
|
|
3002
|
+
});
|
|
3003
|
+
}
|
|
2765
3004
|
},
|
|
2766
3005
|
close: function close() {
|
|
2767
3006
|
this.show = false;
|
|
@@ -2769,35 +3008,69 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2769
3008
|
setFormModel: function setFormModel(model) {
|
|
2770
3009
|
Object(external_lodash_["merge"])(this.formModel, model);
|
|
2771
3010
|
},
|
|
3011
|
+
reset: function reset() {
|
|
3012
|
+
this.$refs.form && this.$refs.form.reset();
|
|
3013
|
+
},
|
|
3014
|
+
closed: function closed() {
|
|
3015
|
+
this.reset();
|
|
3016
|
+
this.show = false;
|
|
3017
|
+
},
|
|
2772
3018
|
submit: function submit(button) {
|
|
2773
|
-
var
|
|
2774
|
-
if (!(this.api && this.request)) {
|
|
2775
|
-
return false;
|
|
2776
|
-
}
|
|
3019
|
+
var _this3 = this;
|
|
2777
3020
|
this.$refs.form.validate(function (isValidate, errorMessage) {
|
|
2778
3021
|
if (!isValidate) {
|
|
2779
3022
|
return false;
|
|
2780
3023
|
}
|
|
3024
|
+
var reqData = Object(external_lodash_["merge"])(_this3.api.data || {}, _this3.formModel);
|
|
3025
|
+
if (typeof _this3.api.before === "function") {
|
|
3026
|
+
reqData = _this3.api.before.call(_this3, reqData);
|
|
3027
|
+
}
|
|
3028
|
+
if (!(_this3.api.url && _this3.requester)) {
|
|
3029
|
+
if (_this3.noApiClose) {
|
|
3030
|
+
_this3.reset();
|
|
3031
|
+
_this3.show = false;
|
|
3032
|
+
}
|
|
3033
|
+
_this3.$emit("success", {
|
|
3034
|
+
request: _this3.requester,
|
|
3035
|
+
reqData: reqData,
|
|
3036
|
+
expandData: _this3.expandModel
|
|
3037
|
+
}, {
|
|
3038
|
+
button: button
|
|
3039
|
+
});
|
|
3040
|
+
return false;
|
|
3041
|
+
}
|
|
2781
3042
|
button.loading = true;
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
3043
|
+
_this3.requester({
|
|
3044
|
+
url: Object(formula_["evaluate"])(_this3.api.url, reqData),
|
|
3045
|
+
method: _this3.api.method || "POST",
|
|
3046
|
+
headers: _this3.api.headers,
|
|
2786
3047
|
data: reqData
|
|
2787
3048
|
}).then(function (res) {
|
|
2788
3049
|
button.loading = false;
|
|
2789
|
-
|
|
2790
|
-
|
|
3050
|
+
_this3.reset();
|
|
3051
|
+
_this3.show = false;
|
|
3052
|
+
_this3.$emit("success", {
|
|
3053
|
+
request: _this3.requester,
|
|
3054
|
+
reqData: reqData,
|
|
3055
|
+
resData: res,
|
|
3056
|
+
expandData: _this3.expandModel
|
|
3057
|
+
});
|
|
2791
3058
|
}).catch(function (error) {
|
|
2792
3059
|
button.loading = false;
|
|
2793
|
-
|
|
3060
|
+
_this3.$emit("error", {
|
|
3061
|
+
request: _this3.requester,
|
|
3062
|
+
reqData: reqData,
|
|
3063
|
+
resError: error,
|
|
3064
|
+
expandData: _this3.expandModel
|
|
3065
|
+
});
|
|
2794
3066
|
});
|
|
2795
3067
|
});
|
|
2796
3068
|
},
|
|
2797
3069
|
renderForm: function renderForm(h) {
|
|
2798
3070
|
var param = {
|
|
2799
3071
|
attrs: Object.assign({
|
|
2800
|
-
formModel: this.formModel
|
|
3072
|
+
formModel: this.formModel,
|
|
3073
|
+
request: this.request
|
|
2801
3074
|
}, this.form)
|
|
2802
3075
|
};
|
|
2803
3076
|
if (this.formMode === "group") {
|
|
@@ -2829,7 +3102,7 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2829
3102
|
}
|
|
2830
3103
|
},
|
|
2831
3104
|
render: function render(h) {
|
|
2832
|
-
var
|
|
3105
|
+
var _this4 = this;
|
|
2833
3106
|
var param = {
|
|
2834
3107
|
attrs: Object.assign({
|
|
2835
3108
|
visible: this.show,
|
|
@@ -2838,7 +3111,8 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2838
3111
|
}, this.dialog),
|
|
2839
3112
|
on: Object.assign(this.on, {
|
|
2840
3113
|
close: function close() {
|
|
2841
|
-
|
|
3114
|
+
_this4.reset();
|
|
3115
|
+
_this4.show = false;
|
|
2842
3116
|
}
|
|
2843
3117
|
})
|
|
2844
3118
|
};
|
|
@@ -2879,8 +3153,283 @@ form_dialog_src.install = function (Vue) {
|
|
|
2879
3153
|
Vue.component(form_dialog_src.name, form_dialog_src);
|
|
2880
3154
|
};
|
|
2881
3155
|
/* harmony default export */ var form_dialog = (form_dialog_src);
|
|
2882
|
-
//
|
|
2883
|
-
var
|
|
3156
|
+
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/drawer"
|
|
3157
|
+
var drawer_ = __webpack_require__(20);
|
|
3158
|
+
var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
3159
|
+
|
|
3160
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-drawer/src/index.vue?vue&type=script&lang=js&
|
|
3161
|
+
|
|
3162
|
+
|
|
3163
|
+
|
|
3164
|
+
|
|
3165
|
+
|
|
3166
|
+
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
|
|
3172
|
+
/* harmony default export */ var form_drawer_srcvue_type_script_lang_js_ = ({
|
|
3173
|
+
name: "FormDrawer",
|
|
3174
|
+
componentName: "FormDrawer",
|
|
3175
|
+
components: {
|
|
3176
|
+
Form: components_form,
|
|
3177
|
+
FormGroup: form_group,
|
|
3178
|
+
Drawer: drawer_default.a,
|
|
3179
|
+
Tool: {
|
|
3180
|
+
components: {
|
|
3181
|
+
elButton: button_default.a
|
|
3182
|
+
},
|
|
3183
|
+
props: {
|
|
3184
|
+
label: String,
|
|
3185
|
+
show: {
|
|
3186
|
+
type: [Boolean, Function],
|
|
3187
|
+
default: true
|
|
3188
|
+
},
|
|
3189
|
+
on: {
|
|
3190
|
+
type: Object,
|
|
3191
|
+
default: function _default() {
|
|
3192
|
+
return {};
|
|
3193
|
+
}
|
|
3194
|
+
},
|
|
3195
|
+
render: Function
|
|
3196
|
+
},
|
|
3197
|
+
computed: {
|
|
3198
|
+
attrs: function attrs() {
|
|
3199
|
+
return Object.assign({
|
|
3200
|
+
size: "mini"
|
|
3201
|
+
}, this.$attrs);
|
|
3202
|
+
}
|
|
3203
|
+
},
|
|
3204
|
+
data: function data() {
|
|
3205
|
+
return {
|
|
3206
|
+
loading: this.$attrs.loading
|
|
3207
|
+
};
|
|
3208
|
+
},
|
|
3209
|
+
render: function render(h) {
|
|
3210
|
+
var _this = this;
|
|
3211
|
+
if (this.show === false) {
|
|
3212
|
+
return null;
|
|
3213
|
+
}
|
|
3214
|
+
if (typeof this.render === "function") {
|
|
3215
|
+
return this.render(h, this);
|
|
3216
|
+
}
|
|
3217
|
+
var param = {
|
|
3218
|
+
attrs: this.attrs,
|
|
3219
|
+
on: {
|
|
3220
|
+
click: function click(event) {
|
|
3221
|
+
if (typeof _this.$listeners.click === "function") {
|
|
3222
|
+
_this.$listeners.click.call(event, _this);
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
};
|
|
3227
|
+
return h("el-button", babel_helper_vue_jsx_merge_props_default()([{}, param, {
|
|
3228
|
+
"attrs": {
|
|
3229
|
+
"loading": this.loading
|
|
3230
|
+
}
|
|
3231
|
+
}]), [this.label]);
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
},
|
|
3235
|
+
props: {
|
|
3236
|
+
drawer: {
|
|
3237
|
+
type: Object,
|
|
3238
|
+
default: function _default() {
|
|
3239
|
+
return {
|
|
3240
|
+
confirmButtonText: "确认",
|
|
3241
|
+
confirmButtonType: "Primary",
|
|
3242
|
+
cancelButtonText: "取消",
|
|
3243
|
+
cancelButtonType: "Primary"
|
|
3244
|
+
};
|
|
3245
|
+
}
|
|
3246
|
+
},
|
|
3247
|
+
formMode: String,
|
|
3248
|
+
api: {
|
|
3249
|
+
type: Object,
|
|
3250
|
+
default: function _default() {
|
|
3251
|
+
return {};
|
|
3252
|
+
}
|
|
3253
|
+
},
|
|
3254
|
+
form: {
|
|
3255
|
+
type: Object,
|
|
3256
|
+
default: function _default() {
|
|
3257
|
+
return {};
|
|
3258
|
+
}
|
|
3259
|
+
},
|
|
3260
|
+
tools: Array,
|
|
3261
|
+
on: {
|
|
3262
|
+
type: Object,
|
|
3263
|
+
default: function _default() {
|
|
3264
|
+
return {};
|
|
3265
|
+
}
|
|
3266
|
+
},
|
|
3267
|
+
slots: {
|
|
3268
|
+
type: Object,
|
|
3269
|
+
default: function _default() {
|
|
3270
|
+
return {};
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3273
|
+
},
|
|
3274
|
+
data: function data() {
|
|
3275
|
+
return {
|
|
3276
|
+
show: false,
|
|
3277
|
+
formModel: {},
|
|
3278
|
+
defaultTools: [{
|
|
3279
|
+
label: this.drawer.cancelButtonText || "取消",
|
|
3280
|
+
type: this.confirmButtonType,
|
|
3281
|
+
loading: false,
|
|
3282
|
+
on: {
|
|
3283
|
+
click: this.close
|
|
3284
|
+
}
|
|
3285
|
+
}, {
|
|
3286
|
+
label: this.drawer.confirmButtonText || "确认",
|
|
3287
|
+
type: this.confirmButtonType || "primary",
|
|
3288
|
+
loading: false,
|
|
3289
|
+
on: {
|
|
3290
|
+
click: this.submit
|
|
3291
|
+
}
|
|
3292
|
+
}]
|
|
3293
|
+
};
|
|
3294
|
+
},
|
|
3295
|
+
computed: {
|
|
3296
|
+
request: function request() {
|
|
3297
|
+
return this.api.request || (this.$COMPONENT || {}).request;
|
|
3298
|
+
}
|
|
3299
|
+
},
|
|
3300
|
+
methods: {
|
|
3301
|
+
open: function open(model) {
|
|
3302
|
+
this.show = true;
|
|
3303
|
+
if (model) {
|
|
3304
|
+
this.setFormModel(model);
|
|
3305
|
+
}
|
|
3306
|
+
},
|
|
3307
|
+
close: function close() {
|
|
3308
|
+
this.show = false;
|
|
3309
|
+
this.$emit("close");
|
|
3310
|
+
},
|
|
3311
|
+
setFormModel: function setFormModel(model) {
|
|
3312
|
+
Object(external_lodash_["merge"])(this.formModel, model);
|
|
3313
|
+
},
|
|
3314
|
+
reset: function reset() {
|
|
3315
|
+
this.$refs.form && this.$refs.form.reset();
|
|
3316
|
+
},
|
|
3317
|
+
submit: function submit(button) {
|
|
3318
|
+
var _this2 = this;
|
|
3319
|
+
this.$refs.form.validate(function (isValidate, errorMessage) {
|
|
3320
|
+
if (!isValidate) {
|
|
3321
|
+
return false;
|
|
3322
|
+
}
|
|
3323
|
+
var reqData = Object(external_lodash_["merge"])(_this2.api.data || {}, _this2.formModel);
|
|
3324
|
+
if (!(_this2.api.url && _this2.request)) {
|
|
3325
|
+
_this2.$emit("success", null, reqData);
|
|
3326
|
+
_this2.reset();
|
|
3327
|
+
_this2.close();
|
|
3328
|
+
return false;
|
|
3329
|
+
}
|
|
3330
|
+
button.loading = true;
|
|
3331
|
+
_this2.request({
|
|
3332
|
+
url: Object(formula_["evaluate"])(_this2.api.url, reqData),
|
|
3333
|
+
method: _this2.api.method || "POST",
|
|
3334
|
+
data: reqData
|
|
3335
|
+
}).then(function (res) {
|
|
3336
|
+
button.loading = false;
|
|
3337
|
+
_this2.$emit("success", res, reqData);
|
|
3338
|
+
_this2.reset();
|
|
3339
|
+
_this2.close();
|
|
3340
|
+
}).catch(function (error) {
|
|
3341
|
+
button.loading = false;
|
|
3342
|
+
_this2.$emit("error", error, reqData);
|
|
3343
|
+
});
|
|
3344
|
+
});
|
|
3345
|
+
},
|
|
3346
|
+
renderForm: function renderForm(h) {
|
|
3347
|
+
var param = {
|
|
3348
|
+
attrs: Object.assign({
|
|
3349
|
+
formModel: this.formModel
|
|
3350
|
+
}, this.form)
|
|
3351
|
+
};
|
|
3352
|
+
if (this.formMode === "group") {
|
|
3353
|
+
return h(form_group, babel_helper_vue_jsx_merge_props_default()([{
|
|
3354
|
+
"ref": "form"
|
|
3355
|
+
}, param]));
|
|
3356
|
+
}
|
|
3357
|
+
return h(components_form, babel_helper_vue_jsx_merge_props_default()([{
|
|
3358
|
+
"ref": "form"
|
|
3359
|
+
}, param]));
|
|
3360
|
+
},
|
|
3361
|
+
renderTitle: function renderTitle(h) {
|
|
3362
|
+
if (typeof this.slots.title === "function") {
|
|
3363
|
+
return this.slots.title.call(this, this.formModel);
|
|
3364
|
+
}
|
|
3365
|
+
return this.slots.title || this.drawer.title;
|
|
3366
|
+
},
|
|
3367
|
+
renderTools: function renderTools(h) {
|
|
3368
|
+
if (typeof this.slots.footer === "function") {
|
|
3369
|
+
return this.slots.footer.call(this, this.formModel);
|
|
3370
|
+
}
|
|
3371
|
+
return h("div", [(this.tools || this.defaultTools).map(function (item) {
|
|
3372
|
+
var toolParam = {
|
|
3373
|
+
attrs: Object.assign({}, item),
|
|
3374
|
+
on: item.on
|
|
3375
|
+
};
|
|
3376
|
+
return h("Tool", babel_helper_vue_jsx_merge_props_default()([{}, toolParam]));
|
|
3377
|
+
})]);
|
|
3378
|
+
}
|
|
3379
|
+
},
|
|
3380
|
+
render: function render(h) {
|
|
3381
|
+
var _this3 = this;
|
|
3382
|
+
var param = {
|
|
3383
|
+
attrs: Object.assign({
|
|
3384
|
+
visible: this.show,
|
|
3385
|
+
closeOnClickModal: false,
|
|
3386
|
+
"customClass": "form-drawer"
|
|
3387
|
+
}, this.drawer),
|
|
3388
|
+
on: Object.assign(this.on, {
|
|
3389
|
+
close: function close() {
|
|
3390
|
+
_this3.close();
|
|
3391
|
+
}
|
|
3392
|
+
})
|
|
3393
|
+
};
|
|
3394
|
+
return h(drawer_default.a, babel_helper_vue_jsx_merge_props_default()([{}, param]), [h("template", {
|
|
3395
|
+
"slot": "title",
|
|
3396
|
+
"class": "drawer-title"
|
|
3397
|
+
}, [h("span", [this.renderTitle(h)])]), h("template", {
|
|
3398
|
+
"slot": "footer",
|
|
3399
|
+
"class": "drawer-footer"
|
|
3400
|
+
}, [this.renderTools(h)]), this.renderForm(h)]);
|
|
3401
|
+
}
|
|
3402
|
+
});
|
|
3403
|
+
// CONCATENATED MODULE: ./src/components/form-drawer/src/index.vue?vue&type=script&lang=js&
|
|
3404
|
+
/* harmony default export */ var components_form_drawer_srcvue_type_script_lang_js_ = (form_drawer_srcvue_type_script_lang_js_);
|
|
3405
|
+
// CONCATENATED MODULE: ./src/components/form-drawer/src/index.vue
|
|
3406
|
+
var form_drawer_src_render, form_drawer_src_staticRenderFns
|
|
3407
|
+
|
|
3408
|
+
|
|
3409
|
+
|
|
3410
|
+
|
|
3411
|
+
/* normalize component */
|
|
3412
|
+
|
|
3413
|
+
var form_drawer_src_component = normalizeComponent(
|
|
3414
|
+
components_form_drawer_srcvue_type_script_lang_js_,
|
|
3415
|
+
form_drawer_src_render,
|
|
3416
|
+
form_drawer_src_staticRenderFns,
|
|
3417
|
+
false,
|
|
3418
|
+
null,
|
|
3419
|
+
null,
|
|
3420
|
+
null
|
|
3421
|
+
|
|
3422
|
+
)
|
|
3423
|
+
|
|
3424
|
+
/* harmony default export */ var form_drawer_src = (form_drawer_src_component.exports);
|
|
3425
|
+
// CONCATENATED MODULE: ./src/components/form-drawer/index.js
|
|
3426
|
+
|
|
3427
|
+
form_drawer_src.install = function (Vue) {
|
|
3428
|
+
Vue.component(form_drawer_src.name, form_drawer_src);
|
|
3429
|
+
};
|
|
3430
|
+
/* harmony default export */ var form_drawer = (form_drawer_src);
|
|
3431
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view/src/index.vue?vue&type=template&id=720bd4fc&
|
|
3432
|
+
var srcvue_type_template_id_720bd4fc_render = function render() {
|
|
2884
3433
|
var _vm = this,
|
|
2885
3434
|
_c = _vm._self._c
|
|
2886
3435
|
return _c(
|
|
@@ -2922,18 +3471,18 @@ var srcvue_type_template_id_1df6f53d_render = function render() {
|
|
|
2922
3471
|
2
|
|
2923
3472
|
)
|
|
2924
3473
|
}
|
|
2925
|
-
var
|
|
2926
|
-
|
|
3474
|
+
var srcvue_type_template_id_720bd4fc_staticRenderFns = []
|
|
3475
|
+
srcvue_type_template_id_720bd4fc_render._withStripped = true
|
|
2927
3476
|
|
|
2928
3477
|
|
|
2929
|
-
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=
|
|
3478
|
+
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=720bd4fc&
|
|
2930
3479
|
|
|
2931
3480
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions"
|
|
2932
|
-
var descriptions_ = __webpack_require__(
|
|
3481
|
+
var descriptions_ = __webpack_require__(44);
|
|
2933
3482
|
var descriptions_default = /*#__PURE__*/__webpack_require__.n(descriptions_);
|
|
2934
3483
|
|
|
2935
3484
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions-item"
|
|
2936
|
-
var descriptions_item_ = __webpack_require__(
|
|
3485
|
+
var descriptions_item_ = __webpack_require__(45);
|
|
2937
3486
|
var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_item_);
|
|
2938
3487
|
|
|
2939
3488
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view/src/index.vue?vue&type=script&lang=js&
|
|
@@ -2991,7 +3540,9 @@ var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_
|
|
|
2991
3540
|
})) {
|
|
2992
3541
|
return false;
|
|
2993
3542
|
}
|
|
2994
|
-
if (typeof item.show === "string" && !Object(formula_["evaluate"])(item.show, _this.formModel
|
|
3543
|
+
if (typeof item.show === "string" && !Object(formula_["evaluate"])(item.show, _this.formModel, {
|
|
3544
|
+
evalMode: true
|
|
3545
|
+
})) {
|
|
2995
3546
|
return false;
|
|
2996
3547
|
}
|
|
2997
3548
|
return true;
|
|
@@ -3029,8 +3580,8 @@ var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_
|
|
|
3029
3580
|
|
|
3030
3581
|
var form_view_src_component = normalizeComponent(
|
|
3031
3582
|
components_form_view_srcvue_type_script_lang_js_,
|
|
3032
|
-
|
|
3033
|
-
|
|
3583
|
+
srcvue_type_template_id_720bd4fc_render,
|
|
3584
|
+
srcvue_type_template_id_720bd4fc_staticRenderFns,
|
|
3034
3585
|
false,
|
|
3035
3586
|
null,
|
|
3036
3587
|
null,
|
|
@@ -3048,7 +3599,7 @@ form_view_src.install = function (Vue) {
|
|
|
3048
3599
|
// CONCATENATED MODULE: ./src/components/form-view-group/src/content.js
|
|
3049
3600
|
|
|
3050
3601
|
|
|
3051
|
-
/* harmony default export */ var
|
|
3602
|
+
/* harmony default export */ var form_view_group_src_content = ({
|
|
3052
3603
|
name: "Content",
|
|
3053
3604
|
inheritAttrs: false,
|
|
3054
3605
|
components: {
|
|
@@ -3166,7 +3717,7 @@ form_view_src.install = function (Vue) {
|
|
|
3166
3717
|
attrs: Object.assign({}, form),
|
|
3167
3718
|
on: form.on
|
|
3168
3719
|
};
|
|
3169
|
-
return h(
|
|
3720
|
+
return h(form_view_group_src_content, babel_helper_vue_jsx_merge_props_default()([{
|
|
3170
3721
|
"ref": form.prop,
|
|
3171
3722
|
"key": form.prop,
|
|
3172
3723
|
"attrs": {
|
|
@@ -3272,7 +3823,6 @@ form_view_group_src.install = function (Vue) {
|
|
|
3272
3823
|
|
|
3273
3824
|
|
|
3274
3825
|
|
|
3275
|
-
|
|
3276
3826
|
/* harmony default export */ var form_view_dialog_srcvue_type_script_lang_js_ = ({
|
|
3277
3827
|
name: "FormViewDialog",
|
|
3278
3828
|
componentName: "FormViewDialog",
|
|
@@ -3486,8 +4036,8 @@ form_view_dialog_src.install = function (Vue) {
|
|
|
3486
4036
|
Vue.component(form_view_dialog_src.name, form_view_dialog_src);
|
|
3487
4037
|
};
|
|
3488
4038
|
/* harmony default export */ var form_view_dialog = (form_view_dialog_src);
|
|
3489
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/table.vue?vue&type=template&id=
|
|
3490
|
-
var
|
|
4039
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/table.vue?vue&type=template&id=a8e62da6&
|
|
4040
|
+
var tablevue_type_template_id_a8e62da6_render = function render() {
|
|
3491
4041
|
var _vm = this,
|
|
3492
4042
|
_c = _vm._self._c
|
|
3493
4043
|
return _c("div", { staticClass: "table" }, [
|
|
@@ -3565,14 +4115,14 @@ var tablevue_type_template_id_f8ac923e_render = function render() {
|
|
|
3565
4115
|
: _vm._e(),
|
|
3566
4116
|
])
|
|
3567
4117
|
}
|
|
3568
|
-
var
|
|
3569
|
-
|
|
4118
|
+
var tablevue_type_template_id_a8e62da6_staticRenderFns = []
|
|
4119
|
+
tablevue_type_template_id_a8e62da6_render._withStripped = true
|
|
3570
4120
|
|
|
3571
4121
|
|
|
3572
|
-
// CONCATENATED MODULE: ./src/components/table/src/table.vue?vue&type=template&id=
|
|
4122
|
+
// CONCATENATED MODULE: ./src/components/table/src/table.vue?vue&type=template&id=a8e62da6&
|
|
3573
4123
|
|
|
3574
4124
|
// EXTERNAL MODULE: external "element-ui/lib/table"
|
|
3575
|
-
var table_ = __webpack_require__(
|
|
4125
|
+
var table_ = __webpack_require__(15);
|
|
3576
4126
|
var table_default = /*#__PURE__*/__webpack_require__.n(table_);
|
|
3577
4127
|
|
|
3578
4128
|
// EXTERNAL MODULE: external "element-ui/lib/table-column"
|
|
@@ -3580,7 +4130,7 @@ var table_column_ = __webpack_require__(3);
|
|
|
3580
4130
|
var table_column_default = /*#__PURE__*/__webpack_require__.n(table_column_);
|
|
3581
4131
|
|
|
3582
4132
|
// EXTERNAL MODULE: external "element-ui/lib/pagination"
|
|
3583
|
-
var pagination_ = __webpack_require__(
|
|
4133
|
+
var pagination_ = __webpack_require__(46);
|
|
3584
4134
|
var pagination_default = /*#__PURE__*/__webpack_require__.n(pagination_);
|
|
3585
4135
|
|
|
3586
4136
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-column"
|
|
@@ -3666,22 +4216,27 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
3666
4216
|
};
|
|
3667
4217
|
},
|
|
3668
4218
|
props: {
|
|
4219
|
+
request: Function,
|
|
3669
4220
|
data: {
|
|
3670
4221
|
type: Array,
|
|
3671
4222
|
default: function _default() {
|
|
3672
4223
|
return null;
|
|
3673
4224
|
}
|
|
3674
4225
|
},
|
|
3675
|
-
api:
|
|
4226
|
+
api: {
|
|
4227
|
+
type: Object,
|
|
4228
|
+
default: function _default() {
|
|
4229
|
+
return {};
|
|
4230
|
+
}
|
|
4231
|
+
},
|
|
4232
|
+
hasInit: {
|
|
4233
|
+
type: Boolean,
|
|
4234
|
+
default: true
|
|
4235
|
+
},
|
|
3676
4236
|
remoteProp: {
|
|
3677
4237
|
type: Object,
|
|
3678
4238
|
default: function _default() {
|
|
3679
|
-
return {
|
|
3680
|
-
data: "list",
|
|
3681
|
-
currentPage: "page",
|
|
3682
|
-
pageSize: "pageSize",
|
|
3683
|
-
total: "total"
|
|
3684
|
-
};
|
|
4239
|
+
return {};
|
|
3685
4240
|
}
|
|
3686
4241
|
},
|
|
3687
4242
|
dataSource: Object,
|
|
@@ -3691,7 +4246,6 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
3691
4246
|
return [];
|
|
3692
4247
|
}
|
|
3693
4248
|
},
|
|
3694
|
-
beforeSearch: Function,
|
|
3695
4249
|
pagination: {
|
|
3696
4250
|
type: [Boolean, Object],
|
|
3697
4251
|
default: function _default() {
|
|
@@ -3734,6 +4288,17 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
3734
4288
|
}
|
|
3735
4289
|
},
|
|
3736
4290
|
computed: {
|
|
4291
|
+
requester: function requester() {
|
|
4292
|
+
return this.api.request || this.request || (this.$COMPONENT || {}).request;
|
|
4293
|
+
},
|
|
4294
|
+
remoteDataProp: function remoteDataProp() {
|
|
4295
|
+
return Object.assign({
|
|
4296
|
+
data: "list",
|
|
4297
|
+
currentPage: "page",
|
|
4298
|
+
pageSize: "pageSize",
|
|
4299
|
+
total: "total"
|
|
4300
|
+
}, this.remoteProp);
|
|
4301
|
+
},
|
|
3737
4302
|
tableSource: function tableSource() {
|
|
3738
4303
|
return this.data || this.remoteData || [];
|
|
3739
4304
|
},
|
|
@@ -3767,10 +4332,16 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
3767
4332
|
}
|
|
3768
4333
|
|
|
3769
4334
|
_this2.$emit("row-click", row);
|
|
4335
|
+
if (typeof _this2.on["row-click"] === "function") {
|
|
4336
|
+
_this2.on["row-click"].call(_this2, row);
|
|
4337
|
+
}
|
|
3770
4338
|
},
|
|
3771
4339
|
"selection-change": function selectionChange(selection) {
|
|
3772
4340
|
_this2.selection = selection;
|
|
3773
4341
|
_this2.$emit("selection-change", selection);
|
|
4342
|
+
if (typeof _this2.on["selection-change"] === "function") {
|
|
4343
|
+
_this2.on["selection-change"].call(_this2, row);
|
|
4344
|
+
}
|
|
3774
4345
|
}
|
|
3775
4346
|
});
|
|
3776
4347
|
},
|
|
@@ -3806,40 +4377,60 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
3806
4377
|
}
|
|
3807
4378
|
},
|
|
3808
4379
|
mounted: function mounted() {
|
|
3809
|
-
|
|
4380
|
+
if (this.hasInit) {
|
|
4381
|
+
this.reset();
|
|
4382
|
+
}
|
|
3810
4383
|
},
|
|
3811
4384
|
methods: {
|
|
3812
4385
|
reset: function reset() {
|
|
3813
4386
|
this.currentPage = 1;
|
|
3814
4387
|
this.search();
|
|
3815
4388
|
},
|
|
4389
|
+
reload: function reload() {
|
|
4390
|
+
this.search();
|
|
4391
|
+
},
|
|
3816
4392
|
search: function search() {
|
|
3817
4393
|
var _this4 = this;
|
|
3818
|
-
if (!(this.
|
|
4394
|
+
if (!(this.requester && this.api.url)) {
|
|
3819
4395
|
return false;
|
|
3820
4396
|
}
|
|
3821
|
-
var
|
|
4397
|
+
var reqData = Object.assign({}, this.api.data);
|
|
3822
4398
|
if (this.pagination) {
|
|
3823
|
-
Object(external_lodash_["set"])(
|
|
3824
|
-
Object(external_lodash_["set"])(
|
|
4399
|
+
Object(external_lodash_["set"])(reqData, this.remoteDataProp.currentPage, this.currentPage);
|
|
4400
|
+
Object(external_lodash_["set"])(reqData, this.remoteDataProp.pageSize, this.pageSize);
|
|
3825
4401
|
}
|
|
3826
|
-
if (typeof this.
|
|
3827
|
-
|
|
4402
|
+
if (typeof this.api.before === "function") {
|
|
4403
|
+
reqData = this.api.before.call(this, reqData);
|
|
3828
4404
|
}
|
|
3829
|
-
this.$emit("
|
|
3830
|
-
|
|
3831
|
-
|
|
4405
|
+
this.$emit("request", {
|
|
4406
|
+
request: this.requester,
|
|
4407
|
+
reqData: reqData
|
|
4408
|
+
});
|
|
4409
|
+
this.requester({
|
|
4410
|
+
url: Object(formula_["evaluate"])(this.api.url, reqData),
|
|
3832
4411
|
method: this.api.method || "POST",
|
|
3833
|
-
|
|
4412
|
+
headers: this.api.headers,
|
|
4413
|
+
data: reqData
|
|
3834
4414
|
}).then(function (res) {
|
|
3835
|
-
_this4
|
|
3836
|
-
|
|
4415
|
+
if (typeof _this4.api.after === "function") {
|
|
4416
|
+
res = _this4.api.after.call(_this4, res);
|
|
4417
|
+
}
|
|
4418
|
+
_this4.remoteData = _this4.remoteDataProp.data ? Object(external_lodash_["get"])(res, _this4.remoteDataProp.data, []) : res;
|
|
3837
4419
|
if (_this4.pagination) {
|
|
3838
|
-
_this4.total = Object(external_lodash_["get"])(res, _this4.
|
|
4420
|
+
_this4.total = Object(external_lodash_["get"])(res, _this4.remoteDataProp.total, 0);
|
|
3839
4421
|
}
|
|
4422
|
+
_this4.$emit("success", {
|
|
4423
|
+
request: _this4.requester,
|
|
4424
|
+
reqData: reqData,
|
|
4425
|
+
resData: res
|
|
4426
|
+
});
|
|
3840
4427
|
}).catch(function (error) {
|
|
3841
|
-
_this4.$emit("loadingChange", false);
|
|
3842
4428
|
_this4.remoteData = [], _this4.total = 0;
|
|
4429
|
+
_this4.$emit("error", {
|
|
4430
|
+
request: _this4.requester,
|
|
4431
|
+
reqData: reqData,
|
|
4432
|
+
resError: error
|
|
4433
|
+
});
|
|
3843
4434
|
});
|
|
3844
4435
|
}
|
|
3845
4436
|
}
|
|
@@ -3856,8 +4447,8 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
3856
4447
|
|
|
3857
4448
|
var table_component = normalizeComponent(
|
|
3858
4449
|
src_tablevue_type_script_lang_js_,
|
|
3859
|
-
|
|
3860
|
-
|
|
4450
|
+
tablevue_type_template_id_a8e62da6_render,
|
|
4451
|
+
tablevue_type_template_id_a8e62da6_staticRenderFns,
|
|
3861
4452
|
false,
|
|
3862
4453
|
null,
|
|
3863
4454
|
null,
|
|
@@ -4121,7 +4712,7 @@ datevue_type_template_id_3d682315_render._withStripped = true
|
|
|
4121
4712
|
// CONCATENATED MODULE: ./src/components/table/src/column/date.vue?vue&type=template&id=3d682315&
|
|
4122
4713
|
|
|
4123
4714
|
// EXTERNAL MODULE: external "dayjs"
|
|
4124
|
-
var external_dayjs_ = __webpack_require__(
|
|
4715
|
+
var external_dayjs_ = __webpack_require__(21);
|
|
4125
4716
|
var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_);
|
|
4126
4717
|
|
|
4127
4718
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/date.vue?vue&type=script&lang=js&
|
|
@@ -4183,8 +4774,8 @@ var date_component = normalizeComponent(
|
|
|
4183
4774
|
)
|
|
4184
4775
|
|
|
4185
4776
|
/* harmony default export */ var date = (date_component.exports);
|
|
4186
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=template&id=
|
|
4187
|
-
var
|
|
4777
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=template&id=512d00c0&
|
|
4778
|
+
var dictvue_type_template_id_512d00c0_render = function render() {
|
|
4188
4779
|
var _vm = this,
|
|
4189
4780
|
_c = _vm._self._c
|
|
4190
4781
|
return _c(
|
|
@@ -4222,11 +4813,11 @@ var dictvue_type_template_id_1da75cb2_render = function render() {
|
|
|
4222
4813
|
)
|
|
4223
4814
|
)
|
|
4224
4815
|
}
|
|
4225
|
-
var
|
|
4226
|
-
|
|
4816
|
+
var dictvue_type_template_id_512d00c0_staticRenderFns = []
|
|
4817
|
+
dictvue_type_template_id_512d00c0_render._withStripped = true
|
|
4227
4818
|
|
|
4228
4819
|
|
|
4229
|
-
// CONCATENATED MODULE: ./src/components/table/src/column/dict.vue?vue&type=template&id=
|
|
4820
|
+
// CONCATENATED MODULE: ./src/components/table/src/column/dict.vue?vue&type=template&id=512d00c0&
|
|
4230
4821
|
|
|
4231
4822
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=script&lang=js&
|
|
4232
4823
|
|
|
@@ -4236,6 +4827,7 @@ dictvue_type_template_id_1da75cb2_render._withStripped = true
|
|
|
4236
4827
|
elTableColumn: table_column_default.a
|
|
4237
4828
|
},
|
|
4238
4829
|
props: {
|
|
4830
|
+
dictCode: String,
|
|
4239
4831
|
options: {
|
|
4240
4832
|
type: Array,
|
|
4241
4833
|
required: true
|
|
@@ -4259,11 +4851,18 @@ dictvue_type_template_id_1da75cb2_render._withStripped = true
|
|
|
4259
4851
|
"show-overflow-tooltip": true
|
|
4260
4852
|
}, this.$attrs);
|
|
4261
4853
|
},
|
|
4854
|
+
dictOption: function dictOption() {
|
|
4855
|
+
if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
|
|
4856
|
+
return this.$COMPONENT.dataSource.dict[this.dictCode];
|
|
4857
|
+
}
|
|
4858
|
+
return [];
|
|
4859
|
+
},
|
|
4262
4860
|
optionMap: function optionMap() {
|
|
4263
4861
|
var _this = this;
|
|
4264
|
-
|
|
4862
|
+
var options = this.options || this.dictOption;
|
|
4863
|
+
if (Array.isArray(options)) {
|
|
4265
4864
|
var map = {};
|
|
4266
|
-
|
|
4865
|
+
options.forEach(function (item) {
|
|
4267
4866
|
var valueKey = item[_this.optionProp.value || "value"];
|
|
4268
4867
|
map[valueKey] = item;
|
|
4269
4868
|
});
|
|
@@ -4297,8 +4896,8 @@ dictvue_type_template_id_1da75cb2_render._withStripped = true
|
|
|
4297
4896
|
|
|
4298
4897
|
var dict_component = normalizeComponent(
|
|
4299
4898
|
column_dictvue_type_script_lang_js_,
|
|
4300
|
-
|
|
4301
|
-
|
|
4899
|
+
dictvue_type_template_id_512d00c0_render,
|
|
4900
|
+
dictvue_type_template_id_512d00c0_staticRenderFns,
|
|
4302
4901
|
false,
|
|
4303
4902
|
null,
|
|
4304
4903
|
null,
|
|
@@ -4308,19 +4907,19 @@ var dict_component = normalizeComponent(
|
|
|
4308
4907
|
|
|
4309
4908
|
/* harmony default export */ var dict = (dict_component.exports);
|
|
4310
4909
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown"
|
|
4311
|
-
var dropdown_ = __webpack_require__(
|
|
4910
|
+
var dropdown_ = __webpack_require__(47);
|
|
4312
4911
|
var dropdown_default = /*#__PURE__*/__webpack_require__.n(dropdown_);
|
|
4313
4912
|
|
|
4314
4913
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-item"
|
|
4315
|
-
var dropdown_item_ = __webpack_require__(
|
|
4914
|
+
var dropdown_item_ = __webpack_require__(48);
|
|
4316
4915
|
var dropdown_item_default = /*#__PURE__*/__webpack_require__.n(dropdown_item_);
|
|
4317
4916
|
|
|
4318
4917
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-menu"
|
|
4319
|
-
var dropdown_menu_ = __webpack_require__(
|
|
4918
|
+
var dropdown_menu_ = __webpack_require__(49);
|
|
4320
4919
|
var dropdown_menu_default = /*#__PURE__*/__webpack_require__.n(dropdown_menu_);
|
|
4321
4920
|
|
|
4322
4921
|
// EXTERNAL MODULE: external "element-ui/lib/link"
|
|
4323
|
-
var link_ = __webpack_require__(
|
|
4922
|
+
var link_ = __webpack_require__(22);
|
|
4324
4923
|
var link_default = /*#__PURE__*/__webpack_require__.n(link_);
|
|
4325
4924
|
|
|
4326
4925
|
// CONCATENATED MODULE: ./src/utils/helper.js
|
|
@@ -4669,6 +5268,7 @@ function spliceTreeSelf(tree, idx, deleteCount) {
|
|
|
4669
5268
|
|
|
4670
5269
|
|
|
4671
5270
|
|
|
5271
|
+
|
|
4672
5272
|
/* harmony default export */ var operatevue_type_script_lang_js_ = ({
|
|
4673
5273
|
name: "Operate",
|
|
4674
5274
|
props: {
|
|
@@ -4681,7 +5281,6 @@ function spliceTreeSelf(tree, idx, deleteCount) {
|
|
|
4681
5281
|
},
|
|
4682
5282
|
items: {
|
|
4683
5283
|
type: Array,
|
|
4684
|
-
required: true,
|
|
4685
5284
|
default: function _default() {
|
|
4686
5285
|
return [];
|
|
4687
5286
|
}
|
|
@@ -4690,7 +5289,7 @@ function spliceTreeSelf(tree, idx, deleteCount) {
|
|
|
4690
5289
|
computed: {
|
|
4691
5290
|
attrs: function attrs() {
|
|
4692
5291
|
return Object.assign({
|
|
4693
|
-
"show-overflow-tooltip":
|
|
5292
|
+
"show-overflow-tooltip": false
|
|
4694
5293
|
}, this.$attrs, this.$props);
|
|
4695
5294
|
},
|
|
4696
5295
|
defaultItem: function defaultItem() {
|
|
@@ -4705,7 +5304,7 @@ function spliceTreeSelf(tree, idx, deleteCount) {
|
|
|
4705
5304
|
}
|
|
4706
5305
|
},
|
|
4707
5306
|
created: function created() {
|
|
4708
|
-
this.items.
|
|
5307
|
+
this.items.forEach(function (row) {
|
|
4709
5308
|
if (!row.key) {
|
|
4710
5309
|
row.key = uuid();
|
|
4711
5310
|
}
|
|
@@ -4714,7 +5313,7 @@ function spliceTreeSelf(tree, idx, deleteCount) {
|
|
|
4714
5313
|
methods: {
|
|
4715
5314
|
renderItems: function renderItems(h, scoped) {
|
|
4716
5315
|
var _this = this;
|
|
4717
|
-
var filterItems = this.items.filter(function (row) {
|
|
5316
|
+
var filterItems = Object(external_lodash_["sortBy"])(this.items, ['sort']).filter(function (row) {
|
|
4718
5317
|
if (typeof row.show === "function") {
|
|
4719
5318
|
return row.show.call(_this, scoped, row);
|
|
4720
5319
|
}
|
|
@@ -4739,9 +5338,7 @@ function spliceTreeSelf(tree, idx, deleteCount) {
|
|
|
4739
5338
|
return template;
|
|
4740
5339
|
},
|
|
4741
5340
|
itemVNode: function itemVNode(h, itemRow, scoped) {
|
|
4742
|
-
var cloneItem = Object
|
|
4743
|
-
control: this.defaultItem.control
|
|
4744
|
-
}, itemRow);
|
|
5341
|
+
var cloneItem = Object(external_lodash_["merge"])({}, this.defaultItem, itemRow);
|
|
4745
5342
|
cloneItem.parentData = scoped;
|
|
4746
5343
|
if (typeof cloneItem.render === "function") {
|
|
4747
5344
|
return cloneItem.render.call(this, h, scoped, cloneItem);
|
|
@@ -4942,12 +5539,19 @@ function table_column_extends() { table_column_extends = Object.assign ? Object.
|
|
|
4942
5539
|
required: false,
|
|
4943
5540
|
default: "Default"
|
|
4944
5541
|
},
|
|
5542
|
+
show: {
|
|
5543
|
+
type: Boolean,
|
|
5544
|
+
default: true
|
|
5545
|
+
},
|
|
4945
5546
|
slots: {
|
|
4946
5547
|
type: Object
|
|
4947
5548
|
}
|
|
4948
5549
|
},
|
|
4949
5550
|
render: function render(h) {
|
|
4950
5551
|
var _this = this;
|
|
5552
|
+
if (this.show === false) {
|
|
5553
|
+
return;
|
|
5554
|
+
}
|
|
4951
5555
|
var param = {
|
|
4952
5556
|
attrs: Object.assign({}, this.$attrs),
|
|
4953
5557
|
on: this.$listeners,
|
|
@@ -4980,8 +5584,8 @@ table_column.install = function (Vue) {
|
|
|
4980
5584
|
Vue.component(table_column.name, table_column);
|
|
4981
5585
|
};
|
|
4982
5586
|
/* harmony default export */ var components_table_column = (table_column);
|
|
4983
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-search/src/index.vue?vue&type=template&id=
|
|
4984
|
-
var
|
|
5587
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-search/src/index.vue?vue&type=template&id=36222536&
|
|
5588
|
+
var srcvue_type_template_id_36222536_render = function render() {
|
|
4985
5589
|
var _vm = this,
|
|
4986
5590
|
_c = _vm._self._c
|
|
4987
5591
|
return _c("div", { staticClass: "table-search" }, [
|
|
@@ -5013,7 +5617,7 @@ var srcvue_type_template_id_d82821d8_render = function render() {
|
|
|
5013
5617
|
"el-button",
|
|
5014
5618
|
{
|
|
5015
5619
|
attrs: { icon: "el-icon-refresh-left" },
|
|
5016
|
-
on: { click: _vm.
|
|
5620
|
+
on: { click: _vm.resetForm },
|
|
5017
5621
|
},
|
|
5018
5622
|
[_vm._v("重置")]
|
|
5019
5623
|
),
|
|
@@ -5030,23 +5634,33 @@ var srcvue_type_template_id_d82821d8_render = function render() {
|
|
|
5030
5634
|
_c(
|
|
5031
5635
|
"div",
|
|
5032
5636
|
{ staticClass: "table-search-table" },
|
|
5033
|
-
[
|
|
5637
|
+
[
|
|
5638
|
+
_c(
|
|
5639
|
+
"Table",
|
|
5640
|
+
_vm._b(
|
|
5641
|
+
{ ref: "table", attrs: { request: _vm.request } },
|
|
5642
|
+
"Table",
|
|
5643
|
+
_vm.tableProps,
|
|
5644
|
+
false
|
|
5645
|
+
)
|
|
5646
|
+
),
|
|
5647
|
+
],
|
|
5034
5648
|
1
|
|
5035
5649
|
),
|
|
5036
5650
|
])
|
|
5037
5651
|
}
|
|
5038
|
-
var
|
|
5039
|
-
|
|
5652
|
+
var srcvue_type_template_id_36222536_staticRenderFns = []
|
|
5653
|
+
srcvue_type_template_id_36222536_render._withStripped = true
|
|
5040
5654
|
|
|
5041
5655
|
|
|
5042
|
-
// CONCATENATED MODULE: ./src/components/table-search/src/index.vue?vue&type=template&id=
|
|
5656
|
+
// CONCATENATED MODULE: ./src/components/table-search/src/index.vue?vue&type=template&id=36222536&
|
|
5043
5657
|
|
|
5044
5658
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form"
|
|
5045
|
-
var components_form_ = __webpack_require__(
|
|
5659
|
+
var components_form_ = __webpack_require__(50);
|
|
5046
5660
|
var components_form_default = /*#__PURE__*/__webpack_require__.n(components_form_);
|
|
5047
5661
|
|
|
5048
5662
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table"
|
|
5049
|
-
var components_table_ = __webpack_require__(
|
|
5663
|
+
var components_table_ = __webpack_require__(51);
|
|
5050
5664
|
var components_table_default = /*#__PURE__*/__webpack_require__.n(components_table_);
|
|
5051
5665
|
|
|
5052
5666
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-search/src/index.vue?vue&type=script&lang=js&
|
|
@@ -5074,11 +5688,7 @@ var components_table_default = /*#__PURE__*/__webpack_require__.n(components_tab
|
|
|
5074
5688
|
}, this.search.form);
|
|
5075
5689
|
},
|
|
5076
5690
|
tableProps: function tableProps() {
|
|
5077
|
-
return Object(external_lodash_["merge"])({
|
|
5078
|
-
api: {
|
|
5079
|
-
request: this.request
|
|
5080
|
-
}
|
|
5081
|
-
}, this.table, {
|
|
5691
|
+
return Object(external_lodash_["merge"])(this.table, {
|
|
5082
5692
|
api: {
|
|
5083
5693
|
data: this.searchData
|
|
5084
5694
|
}
|
|
@@ -5095,23 +5705,29 @@ var components_table_default = /*#__PURE__*/__webpack_require__.n(components_tab
|
|
|
5095
5705
|
},
|
|
5096
5706
|
mounted: function mounted() {
|
|
5097
5707
|
var _this = this;
|
|
5098
|
-
if (this.search.hasInit) {
|
|
5708
|
+
if (this.search && this.search.hasInit) {
|
|
5099
5709
|
this.$nextTick(function () {
|
|
5100
5710
|
_this.searchSubmit();
|
|
5101
5711
|
});
|
|
5102
5712
|
}
|
|
5103
5713
|
},
|
|
5104
5714
|
methods: {
|
|
5105
|
-
|
|
5715
|
+
resetForm: function resetForm() {
|
|
5106
5716
|
this.$refs.form.resetFields();
|
|
5107
5717
|
},
|
|
5718
|
+
resetTable: function resetTable() {
|
|
5719
|
+
this.$refs.table.reset();
|
|
5720
|
+
},
|
|
5721
|
+
reloadTable: function reloadTable() {
|
|
5722
|
+
this.$refs.table.reload();
|
|
5723
|
+
},
|
|
5108
5724
|
searchSubmit: function searchSubmit() {
|
|
5109
5725
|
var _this2 = this;
|
|
5110
5726
|
this.$refs.form.validate(function (isValidate, errorMessage) {
|
|
5111
5727
|
if (!isValidate) {
|
|
5112
5728
|
return false;
|
|
5113
5729
|
}
|
|
5114
|
-
_this2
|
|
5730
|
+
_this2.resetTable();
|
|
5115
5731
|
});
|
|
5116
5732
|
}
|
|
5117
5733
|
}
|
|
@@ -5128,8 +5744,8 @@ var components_table_default = /*#__PURE__*/__webpack_require__.n(components_tab
|
|
|
5128
5744
|
|
|
5129
5745
|
var table_search_src_component = normalizeComponent(
|
|
5130
5746
|
components_table_search_srcvue_type_script_lang_js_,
|
|
5131
|
-
|
|
5132
|
-
|
|
5747
|
+
srcvue_type_template_id_36222536_render,
|
|
5748
|
+
srcvue_type_template_id_36222536_staticRenderFns,
|
|
5133
5749
|
false,
|
|
5134
5750
|
null,
|
|
5135
5751
|
null,
|
|
@@ -5146,8 +5762,8 @@ table_search_src.install = function (Vue) {
|
|
|
5146
5762
|
Vue.component(table_search_src.name, table_search_src);
|
|
5147
5763
|
};
|
|
5148
5764
|
/* harmony default export */ var table_search = (table_search_src);
|
|
5149
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-editable/src/index.vue?vue&type=template&id=
|
|
5150
|
-
var
|
|
5765
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-editable/src/index.vue?vue&type=template&id=aabdd8e6&
|
|
5766
|
+
var srcvue_type_template_id_aabdd8e6_render = function render() {
|
|
5151
5767
|
var _vm = this,
|
|
5152
5768
|
_c = _vm._self._c
|
|
5153
5769
|
return _c(
|
|
@@ -5189,18 +5805,18 @@ var srcvue_type_template_id_2cd18efc_render = function render() {
|
|
|
5189
5805
|
1
|
|
5190
5806
|
)
|
|
5191
5807
|
}
|
|
5192
|
-
var
|
|
5193
|
-
|
|
5808
|
+
var srcvue_type_template_id_aabdd8e6_staticRenderFns = []
|
|
5809
|
+
srcvue_type_template_id_aabdd8e6_render._withStripped = true
|
|
5194
5810
|
|
|
5195
5811
|
|
|
5196
|
-
// CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=template&id=
|
|
5812
|
+
// CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=template&id=aabdd8e6&
|
|
5197
5813
|
|
|
5198
5814
|
// EXTERNAL MODULE: external "element-ui/lib/popover"
|
|
5199
|
-
var popover_ = __webpack_require__(
|
|
5815
|
+
var popover_ = __webpack_require__(52);
|
|
5200
5816
|
var popover_default = /*#__PURE__*/__webpack_require__.n(popover_);
|
|
5201
5817
|
|
|
5202
5818
|
// EXTERNAL MODULE: external "async-validator"
|
|
5203
|
-
var external_async_validator_ = __webpack_require__(
|
|
5819
|
+
var external_async_validator_ = __webpack_require__(53);
|
|
5204
5820
|
var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_);
|
|
5205
5821
|
|
|
5206
5822
|
// CONCATENATED MODULE: ./src/components/table-editable/src/form-item.js
|
|
@@ -5768,91 +6384,390 @@ var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(extern
|
|
|
5768
6384
|
if (typeof callback === 'function' && ++count === fields.length) {
|
|
5769
6385
|
callback(valid, invalidFields);
|
|
5770
6386
|
}
|
|
5771
|
-
});
|
|
5772
|
-
});
|
|
5773
|
-
if (promise) {
|
|
5774
|
-
return promise;
|
|
6387
|
+
});
|
|
6388
|
+
});
|
|
6389
|
+
if (promise) {
|
|
6390
|
+
return promise;
|
|
6391
|
+
}
|
|
6392
|
+
},
|
|
6393
|
+
validateField: function validateField(rowIndex, props, cb) {
|
|
6394
|
+
props = [].concat(props);
|
|
6395
|
+
var fields = this.fields.filter(function (item) {
|
|
6396
|
+
return item.row && item.row.$index === rowIndex && props.indexOf(item.prop) !== -1;
|
|
6397
|
+
});
|
|
6398
|
+
if (!fields.length) {
|
|
6399
|
+
console.warn('[Element Warn]please pass correct props!');
|
|
6400
|
+
return;
|
|
6401
|
+
}
|
|
6402
|
+
fields.forEach(function (field) {
|
|
6403
|
+
field.validate('', cb);
|
|
6404
|
+
});
|
|
6405
|
+
},
|
|
6406
|
+
clearValidate: function clearValidate(rowIndex, props) {
|
|
6407
|
+
if (props === void 0) {
|
|
6408
|
+
props = [];
|
|
6409
|
+
}
|
|
6410
|
+
var fields = this.fields;
|
|
6411
|
+
if (typeof rowIndex === "number") {
|
|
6412
|
+
fields = props.length ? this.fields.filter(function (item) {
|
|
6413
|
+
return item.row && item.row.$index === rowIndex && props.indexOf(item.prop) !== -1;
|
|
6414
|
+
}) : this.fields.filter(function (item) {
|
|
6415
|
+
return item.row && item.row.$index === rowIndex;
|
|
6416
|
+
});
|
|
6417
|
+
}
|
|
6418
|
+
fields.forEach(function (field) {
|
|
6419
|
+
field.clearValidate();
|
|
6420
|
+
});
|
|
6421
|
+
},
|
|
6422
|
+
getRowField: function getRowField(row) {
|
|
6423
|
+
var fieldMap = {};
|
|
6424
|
+
var fields = this.fields.filter(function (item) {
|
|
6425
|
+
return item.row && item.row.$index === row.$index;
|
|
6426
|
+
});
|
|
6427
|
+
fields.forEach(function (item) {
|
|
6428
|
+
fieldMap[item.prop] = item;
|
|
6429
|
+
});
|
|
6430
|
+
return fieldMap;
|
|
6431
|
+
},
|
|
6432
|
+
addRow: function addRow(data, parentRow) {
|
|
6433
|
+
var _Object$assign;
|
|
6434
|
+
var rowData = Object.assign((_Object$assign = {}, _Object$assign[this.rowKey] = uuid(), _Object$assign), this.rowData, data);
|
|
6435
|
+
if (this.hasChildren && !rowData.children) {
|
|
6436
|
+
rowData.children = [];
|
|
6437
|
+
}
|
|
6438
|
+
if (parentRow) {
|
|
6439
|
+
if (!parentRow.children) {
|
|
6440
|
+
this.$set(parentRow, "children", []);
|
|
6441
|
+
}
|
|
6442
|
+
parentRow.children.push(rowData);
|
|
6443
|
+
} else {
|
|
6444
|
+
this.data.push(rowData);
|
|
6445
|
+
}
|
|
6446
|
+
},
|
|
6447
|
+
deleteByIndex: function deleteByIndex(index) {
|
|
6448
|
+
this.data && this.data.splice(index, 1);
|
|
6449
|
+
},
|
|
6450
|
+
deleteByRow: function deleteByRow(row, id) {
|
|
6451
|
+
var refId = row[this.rowKey] ? this.rowKey : "id";
|
|
6452
|
+
spliceTreeSelf(this.data, findTreeIndex(this.data, function (item) {
|
|
6453
|
+
return item[id || refId] === row[id || refId];
|
|
6454
|
+
}), 1);
|
|
6455
|
+
}
|
|
6456
|
+
}
|
|
6457
|
+
});
|
|
6458
|
+
// CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=script&lang=js&
|
|
6459
|
+
/* harmony default export */ var components_table_editable_srcvue_type_script_lang_js_ = (table_editable_srcvue_type_script_lang_js_);
|
|
6460
|
+
// CONCATENATED MODULE: ./src/components/table-editable/src/index.vue
|
|
6461
|
+
|
|
6462
|
+
|
|
6463
|
+
|
|
6464
|
+
|
|
6465
|
+
|
|
6466
|
+
/* normalize component */
|
|
6467
|
+
|
|
6468
|
+
var table_editable_src_component = normalizeComponent(
|
|
6469
|
+
components_table_editable_srcvue_type_script_lang_js_,
|
|
6470
|
+
srcvue_type_template_id_aabdd8e6_render,
|
|
6471
|
+
srcvue_type_template_id_aabdd8e6_staticRenderFns,
|
|
6472
|
+
false,
|
|
6473
|
+
null,
|
|
6474
|
+
null,
|
|
6475
|
+
null
|
|
6476
|
+
|
|
6477
|
+
)
|
|
6478
|
+
|
|
6479
|
+
/* harmony default export */ var table_editable_src = (table_editable_src_component.exports);
|
|
6480
|
+
// CONCATENATED MODULE: ./src/components/table-editable/index.js
|
|
6481
|
+
|
|
6482
|
+
table_editable_src.install = function (Vue) {
|
|
6483
|
+
Vue.component(table_editable_src.name, table_editable_src);
|
|
6484
|
+
};
|
|
6485
|
+
/* harmony default export */ var table_editable = (table_editable_src);
|
|
6486
|
+
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-search"
|
|
6487
|
+
var table_search_ = __webpack_require__(13);
|
|
6488
|
+
var table_search_default = /*#__PURE__*/__webpack_require__.n(table_search_);
|
|
6489
|
+
|
|
6490
|
+
// EXTERNAL MODULE: external "element-ui/lib/message-box"
|
|
6491
|
+
var message_box_ = __webpack_require__(16);
|
|
6492
|
+
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
6493
|
+
|
|
6494
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-operate/src/index.vue?vue&type=script&lang=js&
|
|
6495
|
+
|
|
6496
|
+
|
|
6497
|
+
|
|
6498
|
+
|
|
6499
|
+
|
|
6500
|
+
/* harmony default export */ var table_operate_srcvue_type_script_lang_js_ = ({
|
|
6501
|
+
name: "TableOperate",
|
|
6502
|
+
componentName: "TableOperate",
|
|
6503
|
+
components: {
|
|
6504
|
+
TableSearch: table_search_default.a,
|
|
6505
|
+
FormDialog: form_dialog,
|
|
6506
|
+
FormViewDialog: form_view_dialog
|
|
6507
|
+
},
|
|
6508
|
+
computed: {
|
|
6509
|
+
tableProps: function tableProps() {
|
|
6510
|
+
return {
|
|
6511
|
+
request: this.request,
|
|
6512
|
+
search: this.search,
|
|
6513
|
+
table: this.table
|
|
6514
|
+
};
|
|
6515
|
+
},
|
|
6516
|
+
createProps: function createProps() {
|
|
6517
|
+
return Object.assign({
|
|
6518
|
+
dialog: {
|
|
6519
|
+
title: "添加"
|
|
6520
|
+
}
|
|
6521
|
+
}, this.create);
|
|
6522
|
+
},
|
|
6523
|
+
updateProps: function updateProps() {
|
|
6524
|
+
return Object.assign({
|
|
6525
|
+
dialog: {
|
|
6526
|
+
title: "修改"
|
|
6527
|
+
}
|
|
6528
|
+
}, this.update);
|
|
6529
|
+
},
|
|
6530
|
+
viewProps: function viewProps() {
|
|
6531
|
+
return Object.assign({
|
|
6532
|
+
dialog: {
|
|
6533
|
+
title: "查看"
|
|
6534
|
+
}
|
|
6535
|
+
}, this.view);
|
|
6536
|
+
}
|
|
6537
|
+
},
|
|
6538
|
+
props: {
|
|
6539
|
+
request: Function,
|
|
6540
|
+
search: {
|
|
6541
|
+
type: Object,
|
|
6542
|
+
default: function _default() {
|
|
6543
|
+
return {};
|
|
6544
|
+
}
|
|
6545
|
+
},
|
|
6546
|
+
table: {
|
|
6547
|
+
type: Object,
|
|
6548
|
+
default: function _default() {
|
|
6549
|
+
return {};
|
|
6550
|
+
}
|
|
6551
|
+
},
|
|
6552
|
+
create: {
|
|
6553
|
+
type: Object,
|
|
6554
|
+
default: function _default() {
|
|
6555
|
+
return null;
|
|
6556
|
+
}
|
|
6557
|
+
},
|
|
6558
|
+
update: {
|
|
6559
|
+
type: Object,
|
|
6560
|
+
default: function _default() {
|
|
6561
|
+
return null;
|
|
6562
|
+
}
|
|
6563
|
+
},
|
|
6564
|
+
delete: {
|
|
6565
|
+
type: Object,
|
|
6566
|
+
default: function _default() {
|
|
6567
|
+
return null;
|
|
6568
|
+
}
|
|
6569
|
+
},
|
|
6570
|
+
view: {
|
|
6571
|
+
type: Object,
|
|
6572
|
+
default: function _default() {
|
|
6573
|
+
return null;
|
|
6574
|
+
}
|
|
6575
|
+
},
|
|
6576
|
+
on: {
|
|
6577
|
+
type: Object,
|
|
6578
|
+
default: function _default() {
|
|
6579
|
+
return {};
|
|
6580
|
+
}
|
|
6581
|
+
},
|
|
6582
|
+
slots: {
|
|
6583
|
+
type: Object,
|
|
6584
|
+
default: function _default() {
|
|
6585
|
+
return {};
|
|
6586
|
+
}
|
|
6587
|
+
}
|
|
6588
|
+
},
|
|
6589
|
+
data: function data() {
|
|
6590
|
+
return {};
|
|
6591
|
+
},
|
|
6592
|
+
mounted: function mounted() {
|
|
6593
|
+
this.addTools();
|
|
6594
|
+
},
|
|
6595
|
+
methods: {
|
|
6596
|
+
addTools: function addTools() {
|
|
6597
|
+
// 添加按钮处理
|
|
6598
|
+
if (this.create) {
|
|
6599
|
+
var tools = this.table && this.table.tools || [];
|
|
6600
|
+
tools.unshift(Object.assign({
|
|
6601
|
+
label: "添加",
|
|
6602
|
+
loading: false,
|
|
6603
|
+
on: {
|
|
6604
|
+
click: this.handleCreate
|
|
6605
|
+
}
|
|
6606
|
+
}, this.create.tool));
|
|
6607
|
+
this.table.tools = tools;
|
|
6608
|
+
}
|
|
6609
|
+
//修改和删除按钮处理
|
|
6610
|
+
if (!(this.update || this.delete || this.view)) {
|
|
6611
|
+
return false;
|
|
6612
|
+
}
|
|
6613
|
+
var filterColumns = this.table.columns.filter(function (item) {
|
|
6614
|
+
return item.control === "Operate";
|
|
6615
|
+
});
|
|
6616
|
+
var optColumn = filterColumns && filterColumns[0];
|
|
6617
|
+
var items = optColumn && optColumn.items || [];
|
|
6618
|
+
if (this.delete) {
|
|
6619
|
+
items.unshift(Object.assign({
|
|
6620
|
+
label: "删除",
|
|
6621
|
+
loading: false,
|
|
6622
|
+
on: {
|
|
6623
|
+
click: this.handleDelete
|
|
6624
|
+
}
|
|
6625
|
+
}, this.delete.tool));
|
|
5775
6626
|
}
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
return;
|
|
6627
|
+
if (this.update) {
|
|
6628
|
+
items.unshift(Object.assign({
|
|
6629
|
+
label: "修改",
|
|
6630
|
+
loading: false,
|
|
6631
|
+
on: {
|
|
6632
|
+
click: this.handleUpdate
|
|
6633
|
+
}
|
|
6634
|
+
}, this.update.tool));
|
|
5785
6635
|
}
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
6636
|
+
if (this.view) {
|
|
6637
|
+
items.unshift(Object.assign({
|
|
6638
|
+
label: "查看",
|
|
6639
|
+
loading: false,
|
|
6640
|
+
on: {
|
|
6641
|
+
click: this.handleView
|
|
6642
|
+
}
|
|
6643
|
+
}, this.view.tool));
|
|
5793
6644
|
}
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
6645
|
+
if (optColumn) {
|
|
6646
|
+
optColumn.items = items;
|
|
6647
|
+
} else {
|
|
6648
|
+
this.table.columns.push({
|
|
6649
|
+
control: "Operate",
|
|
6650
|
+
label: "操作",
|
|
6651
|
+
align: "center",
|
|
6652
|
+
items: items
|
|
5800
6653
|
});
|
|
5801
6654
|
}
|
|
5802
|
-
fields.forEach(function (field) {
|
|
5803
|
-
field.clearValidate();
|
|
5804
|
-
});
|
|
5805
6655
|
},
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
var fields = this.fields.filter(function (item) {
|
|
5809
|
-
return item.row && item.row.$index === row.$index;
|
|
5810
|
-
});
|
|
5811
|
-
fields.forEach(function (item) {
|
|
5812
|
-
fieldMap[item.prop] = item;
|
|
5813
|
-
});
|
|
5814
|
-
return fieldMap;
|
|
6656
|
+
handleCreate: function handleCreate() {
|
|
6657
|
+
this.$refs.createFormDialog.open();
|
|
5815
6658
|
},
|
|
5816
|
-
|
|
5817
|
-
var
|
|
5818
|
-
var rowData =
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
this
|
|
5825
|
-
|
|
5826
|
-
|
|
6659
|
+
handleUpdate: function handleUpdate(rowProps, that) {
|
|
6660
|
+
var _this = this;
|
|
6661
|
+
var rowData = rowProps.row;
|
|
6662
|
+
this.$refs.updateFormDialog.open();
|
|
6663
|
+
if (this.update.detail) {
|
|
6664
|
+
var request = this.update.detail.request || this.request;
|
|
6665
|
+
request({
|
|
6666
|
+
url: Object(formula_["evaluate"])(this.update.detail.url, rowData),
|
|
6667
|
+
method: this.update.detail.method || "GET",
|
|
6668
|
+
data: rowData
|
|
6669
|
+
}).then(function (res) {
|
|
6670
|
+
_this.$refs.updateFormDialog.setFormModel(res);
|
|
6671
|
+
}).catch(function (error) {});
|
|
5827
6672
|
} else {
|
|
5828
|
-
this
|
|
6673
|
+
this.$nextTick(function () {
|
|
6674
|
+
_this.$refs.updateFormDialog.setFormModel(rowData);
|
|
6675
|
+
});
|
|
5829
6676
|
}
|
|
5830
6677
|
},
|
|
5831
|
-
|
|
5832
|
-
|
|
6678
|
+
handleDelete: function handleDelete(rowProps, that) {
|
|
6679
|
+
var _this2 = this;
|
|
6680
|
+
message_box_default.a.confirm("是否确定删除", '提示', {
|
|
6681
|
+
confirmButtonText: '确定',
|
|
6682
|
+
cancelButtonText: '取消',
|
|
6683
|
+
type: 'warning'
|
|
6684
|
+
}).then(function () {
|
|
6685
|
+
var request = _this2.delete.api.request || _this2.request;
|
|
6686
|
+
var rowData = rowProps.row;
|
|
6687
|
+
that.loading = true;
|
|
6688
|
+
request({
|
|
6689
|
+
url: Object(formula_["evaluate"])(_this2.delete.api.url, rowData),
|
|
6690
|
+
method: _this2.delete.api.method || "GET",
|
|
6691
|
+
data: rowData
|
|
6692
|
+
}).then(function (res) {
|
|
6693
|
+
that.loading = false;
|
|
6694
|
+
}).catch(function (error) {
|
|
6695
|
+
that.loading = false;
|
|
6696
|
+
});
|
|
6697
|
+
}).catch(function () {});
|
|
5833
6698
|
},
|
|
5834
|
-
|
|
5835
|
-
var
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
6699
|
+
handleView: function handleView(rowProps, that) {
|
|
6700
|
+
var _this3 = this;
|
|
6701
|
+
var rowData = rowProps.row;
|
|
6702
|
+
this.$refs.viewFormDialog.open();
|
|
6703
|
+
if (this.view.api) {
|
|
6704
|
+
var request = this.view.api.request || this.request;
|
|
6705
|
+
request({
|
|
6706
|
+
url: Object(formula_["evaluate"])(this.view.api.url, rowData),
|
|
6707
|
+
method: this.view.api.method || "GET",
|
|
6708
|
+
data: rowData
|
|
6709
|
+
}).then(function (res) {
|
|
6710
|
+
_this3.$refs.viewFormDialog.setFormModel(res);
|
|
6711
|
+
}).catch(function (error) {});
|
|
6712
|
+
} else {
|
|
6713
|
+
this.$nextTick(function () {
|
|
6714
|
+
_this3.$refs.viewFormDialog.setFormModel(rowData);
|
|
6715
|
+
});
|
|
6716
|
+
}
|
|
5839
6717
|
}
|
|
6718
|
+
},
|
|
6719
|
+
render: function render() {
|
|
6720
|
+
var h = arguments[0];
|
|
6721
|
+
return h("div", [h("div", [h(table_search_default.a, {
|
|
6722
|
+
"ref": "table",
|
|
6723
|
+
"directives": [{
|
|
6724
|
+
name: "bind",
|
|
6725
|
+
value: "tableProps"
|
|
6726
|
+
}]
|
|
6727
|
+
})]), h("div", [h(form_dialog, {
|
|
6728
|
+
"directives": [{
|
|
6729
|
+
name: "if",
|
|
6730
|
+
value: "create"
|
|
6731
|
+
}, {
|
|
6732
|
+
name: "bind",
|
|
6733
|
+
value: "createProps"
|
|
6734
|
+
}],
|
|
6735
|
+
"ref": "createFormDialog"
|
|
6736
|
+
}), h(form_dialog, {
|
|
6737
|
+
"directives": [{
|
|
6738
|
+
name: "if",
|
|
6739
|
+
value: "update"
|
|
6740
|
+
}, {
|
|
6741
|
+
name: "bind",
|
|
6742
|
+
value: "updateProps"
|
|
6743
|
+
}],
|
|
6744
|
+
"ref": "updateFormDialog"
|
|
6745
|
+
}), h(form_view_dialog, {
|
|
6746
|
+
"directives": [{
|
|
6747
|
+
name: "if",
|
|
6748
|
+
value: "view"
|
|
6749
|
+
}, {
|
|
6750
|
+
name: "bind",
|
|
6751
|
+
value: "viewProps"
|
|
6752
|
+
}],
|
|
6753
|
+
"ref": "viewFormDialog"
|
|
6754
|
+
})])]);
|
|
5840
6755
|
}
|
|
5841
6756
|
});
|
|
5842
|
-
// CONCATENATED MODULE: ./src/components/table-
|
|
5843
|
-
/* harmony default export */ var
|
|
5844
|
-
// CONCATENATED MODULE: ./src/components/table-
|
|
5845
|
-
|
|
6757
|
+
// CONCATENATED MODULE: ./src/components/table-operate/src/index.vue?vue&type=script&lang=js&
|
|
6758
|
+
/* harmony default export */ var components_table_operate_srcvue_type_script_lang_js_ = (table_operate_srcvue_type_script_lang_js_);
|
|
6759
|
+
// CONCATENATED MODULE: ./src/components/table-operate/src/index.vue
|
|
6760
|
+
var table_operate_src_render, table_operate_src_staticRenderFns
|
|
5846
6761
|
|
|
5847
6762
|
|
|
5848
6763
|
|
|
5849
6764
|
|
|
5850
6765
|
/* normalize component */
|
|
5851
6766
|
|
|
5852
|
-
var
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
6767
|
+
var table_operate_src_component = normalizeComponent(
|
|
6768
|
+
components_table_operate_srcvue_type_script_lang_js_,
|
|
6769
|
+
table_operate_src_render,
|
|
6770
|
+
table_operate_src_staticRenderFns,
|
|
5856
6771
|
false,
|
|
5857
6772
|
null,
|
|
5858
6773
|
null,
|
|
@@ -5860,15 +6775,15 @@ var table_editable_src_component = normalizeComponent(
|
|
|
5860
6775
|
|
|
5861
6776
|
)
|
|
5862
6777
|
|
|
5863
|
-
/* harmony default export */ var
|
|
5864
|
-
// CONCATENATED MODULE: ./src/components/table-
|
|
6778
|
+
/* harmony default export */ var table_operate_src = (table_operate_src_component.exports);
|
|
6779
|
+
// CONCATENATED MODULE: ./src/components/table-operate/index.js
|
|
5865
6780
|
|
|
5866
|
-
|
|
5867
|
-
Vue.component(
|
|
6781
|
+
table_operate_src.install = function (Vue) {
|
|
6782
|
+
Vue.component(table_operate_src.name, table_operate_src);
|
|
5868
6783
|
};
|
|
5869
|
-
/* harmony default export */ var
|
|
5870
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=
|
|
5871
|
-
var
|
|
6784
|
+
/* harmony default export */ var table_operate = (table_operate_src);
|
|
6785
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=34fe6a3b&
|
|
6786
|
+
var srcvue_type_template_id_34fe6a3b_render = function render() {
|
|
5872
6787
|
var _vm = this,
|
|
5873
6788
|
_c = _vm._self._c
|
|
5874
6789
|
return _c("div", [
|
|
@@ -5877,7 +6792,12 @@ var srcvue_type_template_id_0fa8c191_render = function render() {
|
|
|
5877
6792
|
[
|
|
5878
6793
|
_c(
|
|
5879
6794
|
"TableSearch",
|
|
5880
|
-
_vm._b(
|
|
6795
|
+
_vm._b(
|
|
6796
|
+
{ ref: "table", attrs: { request: _vm.request } },
|
|
6797
|
+
"TableSearch",
|
|
6798
|
+
_vm.tableProps,
|
|
6799
|
+
false
|
|
6800
|
+
)
|
|
5881
6801
|
),
|
|
5882
6802
|
],
|
|
5883
6803
|
1
|
|
@@ -5888,22 +6808,28 @@ var srcvue_type_template_id_0fa8c191_render = function render() {
|
|
|
5888
6808
|
_vm.create
|
|
5889
6809
|
? _c(
|
|
5890
6810
|
"FormDialog",
|
|
5891
|
-
_vm.
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
6811
|
+
_vm._g(
|
|
6812
|
+
_vm._b(
|
|
6813
|
+
{ ref: "createFormDialog", attrs: { request: _vm.request } },
|
|
6814
|
+
"FormDialog",
|
|
6815
|
+
_vm.createProps,
|
|
6816
|
+
false
|
|
6817
|
+
),
|
|
6818
|
+
_vm.reloadTableEvent
|
|
5896
6819
|
)
|
|
5897
6820
|
)
|
|
5898
6821
|
: _vm._e(),
|
|
5899
6822
|
_vm.update
|
|
5900
6823
|
? _c(
|
|
5901
6824
|
"FormDialog",
|
|
5902
|
-
_vm.
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
6825
|
+
_vm._g(
|
|
6826
|
+
_vm._b(
|
|
6827
|
+
{ ref: "updateFormDialog", attrs: { request: _vm.request } },
|
|
6828
|
+
"FormDialog",
|
|
6829
|
+
_vm.updateProps,
|
|
6830
|
+
false
|
|
6831
|
+
),
|
|
6832
|
+
_vm.reloadTableEvent
|
|
5907
6833
|
)
|
|
5908
6834
|
)
|
|
5909
6835
|
: _vm._e(),
|
|
@@ -5911,7 +6837,7 @@ var srcvue_type_template_id_0fa8c191_render = function render() {
|
|
|
5911
6837
|
? _c(
|
|
5912
6838
|
"FormViewDialog",
|
|
5913
6839
|
_vm._b(
|
|
5914
|
-
{ ref: "viewFormDialog" },
|
|
6840
|
+
{ ref: "viewFormDialog", attrs: { request: _vm.request } },
|
|
5915
6841
|
"FormViewDialog",
|
|
5916
6842
|
_vm.viewProps,
|
|
5917
6843
|
false
|
|
@@ -5923,19 +6849,11 @@ var srcvue_type_template_id_0fa8c191_render = function render() {
|
|
|
5923
6849
|
),
|
|
5924
6850
|
])
|
|
5925
6851
|
}
|
|
5926
|
-
var
|
|
5927
|
-
|
|
5928
|
-
|
|
6852
|
+
var srcvue_type_template_id_34fe6a3b_staticRenderFns = []
|
|
6853
|
+
srcvue_type_template_id_34fe6a3b_render._withStripped = true
|
|
5929
6854
|
|
|
5930
|
-
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=0fa8c191&
|
|
5931
|
-
|
|
5932
|
-
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-search"
|
|
5933
|
-
var table_search_ = __webpack_require__(49);
|
|
5934
|
-
var table_search_default = /*#__PURE__*/__webpack_require__.n(table_search_);
|
|
5935
6855
|
|
|
5936
|
-
//
|
|
5937
|
-
var message_box_ = __webpack_require__(50);
|
|
5938
|
-
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
6856
|
+
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=34fe6a3b&
|
|
5939
6857
|
|
|
5940
6858
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=script&lang=js&
|
|
5941
6859
|
|
|
@@ -5943,6 +6861,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
5943
6861
|
|
|
5944
6862
|
|
|
5945
6863
|
|
|
6864
|
+
|
|
5946
6865
|
/* harmony default export */ var crud_srcvue_type_script_lang_js_ = ({
|
|
5947
6866
|
name: "CRUD",
|
|
5948
6867
|
componentName: "CRUD",
|
|
@@ -6033,7 +6952,14 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
6033
6952
|
}
|
|
6034
6953
|
},
|
|
6035
6954
|
data: function data() {
|
|
6036
|
-
|
|
6955
|
+
var _this = this;
|
|
6956
|
+
return {
|
|
6957
|
+
reloadTableEvent: {
|
|
6958
|
+
success: function success() {
|
|
6959
|
+
_this.reloadTable();
|
|
6960
|
+
}
|
|
6961
|
+
}
|
|
6962
|
+
};
|
|
6037
6963
|
},
|
|
6038
6964
|
created: function created() {
|
|
6039
6965
|
this.addTools();
|
|
@@ -6046,13 +6972,14 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
6046
6972
|
tools.unshift(Object.assign({
|
|
6047
6973
|
label: "添加",
|
|
6048
6974
|
loading: false,
|
|
6975
|
+
sort: 10,
|
|
6049
6976
|
on: {
|
|
6050
6977
|
click: this.handleCreate
|
|
6051
6978
|
}
|
|
6052
6979
|
}, this.create.tool));
|
|
6053
6980
|
this.table.tools = tools;
|
|
6054
6981
|
}
|
|
6055
|
-
|
|
6982
|
+
//修改,查看和删除按钮处理
|
|
6056
6983
|
if (!(this.update || this.delete || this.view)) {
|
|
6057
6984
|
return false;
|
|
6058
6985
|
}
|
|
@@ -6062,32 +6989,35 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
6062
6989
|
var optColumn = filterColumns && filterColumns[0];
|
|
6063
6990
|
var items = optColumn && optColumn.items || [];
|
|
6064
6991
|
if (this.update) {
|
|
6065
|
-
items.
|
|
6992
|
+
items.push(Object.assign({
|
|
6066
6993
|
label: "修改",
|
|
6067
6994
|
loading: false,
|
|
6995
|
+
sort: 10,
|
|
6068
6996
|
on: {
|
|
6069
6997
|
click: this.handleUpdate
|
|
6070
6998
|
}
|
|
6071
6999
|
}, this.update.tool));
|
|
6072
7000
|
}
|
|
6073
|
-
if (this.delete) {
|
|
6074
|
-
items.unshift(Object.assign({
|
|
6075
|
-
label: "删除",
|
|
6076
|
-
loading: false,
|
|
6077
|
-
on: {
|
|
6078
|
-
click: this.handleDelete
|
|
6079
|
-
}
|
|
6080
|
-
}, this.delete.tool));
|
|
6081
|
-
}
|
|
6082
7001
|
if (this.view) {
|
|
6083
|
-
items.
|
|
7002
|
+
items.push(Object.assign({
|
|
6084
7003
|
label: "查看",
|
|
6085
7004
|
loading: false,
|
|
7005
|
+
sort: 20,
|
|
6086
7006
|
on: {
|
|
6087
7007
|
click: this.handleView
|
|
6088
7008
|
}
|
|
6089
7009
|
}, this.view.tool));
|
|
6090
7010
|
}
|
|
7011
|
+
if (this.delete) {
|
|
7012
|
+
items.push(Object.assign({
|
|
7013
|
+
label: "删除",
|
|
7014
|
+
loading: false,
|
|
7015
|
+
sort: 30,
|
|
7016
|
+
on: {
|
|
7017
|
+
click: this.handleDelete
|
|
7018
|
+
}
|
|
7019
|
+
}, this.delete.tool));
|
|
7020
|
+
}
|
|
6091
7021
|
if (optColumn) {
|
|
6092
7022
|
optColumn.items = items;
|
|
6093
7023
|
} else {
|
|
@@ -6102,62 +7032,120 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
6102
7032
|
handleCreate: function handleCreate() {
|
|
6103
7033
|
this.$refs.createFormDialog.open();
|
|
6104
7034
|
},
|
|
7035
|
+
resetTable: function resetTable() {
|
|
7036
|
+
this.$refs.table.resetTable();
|
|
7037
|
+
},
|
|
7038
|
+
reloadTable: function reloadTable() {
|
|
7039
|
+
this.$refs.table.reloadTable();
|
|
7040
|
+
},
|
|
7041
|
+
getRequest: function getRequest(request) {
|
|
7042
|
+
if (request) {
|
|
7043
|
+
return request;
|
|
7044
|
+
}
|
|
7045
|
+
return this.request || (this.$COMPONENT || {}).request;
|
|
7046
|
+
},
|
|
6105
7047
|
handleUpdate: function handleUpdate(rowProps, that) {
|
|
6106
|
-
var
|
|
7048
|
+
var _this2 = this;
|
|
6107
7049
|
var rowData = rowProps.row;
|
|
6108
7050
|
this.$refs.updateFormDialog.open();
|
|
6109
|
-
|
|
6110
|
-
|
|
7051
|
+
var detailApi = this.update.detail || {};
|
|
7052
|
+
var request = this.getRequest(detailApi.request);
|
|
7053
|
+
var reqData = Object(external_lodash_["merge"])(detailApi.data || {}, rowData);
|
|
7054
|
+
if (typeof detailApi.before === "function") {
|
|
7055
|
+
reqData = detailApi.before.call(this, reqData);
|
|
7056
|
+
}
|
|
7057
|
+
if (detailApi.url && request) {
|
|
7058
|
+
that.loading = true;
|
|
6111
7059
|
request({
|
|
6112
|
-
url: Object(formula_["evaluate"])(
|
|
6113
|
-
method:
|
|
6114
|
-
data:
|
|
7060
|
+
url: Object(formula_["evaluate"])(detailApi.url, rowData),
|
|
7061
|
+
method: detailApi.method || "GET",
|
|
7062
|
+
data: reqData
|
|
6115
7063
|
}).then(function (res) {
|
|
6116
|
-
|
|
6117
|
-
|
|
7064
|
+
that.loading = false;
|
|
7065
|
+
if (typeof detailApi.after === "function") {
|
|
7066
|
+
res = detailApi.after.call(_this2, res);
|
|
7067
|
+
}
|
|
7068
|
+
_this2.$refs.updateFormDialog.setFormModel(res);
|
|
7069
|
+
}).catch(function (error) {
|
|
7070
|
+
that.loading = false;
|
|
7071
|
+
});
|
|
6118
7072
|
} else {
|
|
6119
7073
|
this.$nextTick(function () {
|
|
6120
|
-
|
|
7074
|
+
_this2.$refs.updateFormDialog.setFormModel(typeof detailApi.after === "function" ? detailApi.after.call(_this2, reqData) : reqData);
|
|
6121
7075
|
});
|
|
6122
7076
|
}
|
|
6123
7077
|
},
|
|
6124
7078
|
handleDelete: function handleDelete(rowProps, that) {
|
|
6125
|
-
var
|
|
7079
|
+
var _this3 = this;
|
|
7080
|
+
var deleteApi = this.delete.api;
|
|
7081
|
+
if (!deleteApi) {
|
|
7082
|
+
console.warn("缺少删除的配置");
|
|
7083
|
+
return false;
|
|
7084
|
+
}
|
|
6126
7085
|
message_box_default.a.confirm("是否确定删除", '提示', {
|
|
6127
7086
|
confirmButtonText: '确定',
|
|
6128
7087
|
cancelButtonText: '取消',
|
|
6129
7088
|
type: 'warning'
|
|
6130
7089
|
}).then(function () {
|
|
6131
|
-
var request =
|
|
6132
|
-
var
|
|
7090
|
+
var request = _this3.getRequest(deleteApi.request);
|
|
7091
|
+
var reqData = Object(external_lodash_["merge"])(deleteApi.data || {}, rowProps.row);
|
|
7092
|
+
if (typeof deleteApi.before === "function") {
|
|
7093
|
+
reqData = deleteApi.before.call(_this3, reqData);
|
|
7094
|
+
}
|
|
6133
7095
|
that.loading = true;
|
|
6134
7096
|
request({
|
|
6135
|
-
url: Object(formula_["evaluate"])(
|
|
6136
|
-
method:
|
|
6137
|
-
data:
|
|
7097
|
+
url: Object(formula_["evaluate"])(deleteApi.url, reqData),
|
|
7098
|
+
method: deleteApi.method || "GET",
|
|
7099
|
+
data: reqData
|
|
6138
7100
|
}).then(function (res) {
|
|
6139
7101
|
that.loading = false;
|
|
7102
|
+
_this3.reloadTable();
|
|
7103
|
+
_this3.$emit("deleteSuccess", {
|
|
7104
|
+
request: request,
|
|
7105
|
+
reqData: reqData,
|
|
7106
|
+
resData: res
|
|
7107
|
+
});
|
|
6140
7108
|
}).catch(function (error) {
|
|
6141
7109
|
that.loading = false;
|
|
7110
|
+
_this3.$emit("deleteError", {
|
|
7111
|
+
request: request,
|
|
7112
|
+
reqData: reqData,
|
|
7113
|
+
resError: error
|
|
7114
|
+
});
|
|
6142
7115
|
});
|
|
6143
7116
|
}).catch(function () {});
|
|
6144
7117
|
},
|
|
6145
7118
|
handleView: function handleView(rowProps, that) {
|
|
6146
|
-
var
|
|
7119
|
+
var _this4 = this;
|
|
6147
7120
|
var rowData = rowProps.row;
|
|
6148
7121
|
this.$refs.viewFormDialog.open();
|
|
6149
|
-
|
|
6150
|
-
|
|
7122
|
+
var viewApi = this.view.api || {};
|
|
7123
|
+
var request = this.getRequest(viewApi.request);
|
|
7124
|
+
var reqData = Object(external_lodash_["merge"])(viewApi.data || {}, rowData);
|
|
7125
|
+
if (typeof viewApi.before === "function") {
|
|
7126
|
+
reqData = viewApi.before.call(this, reqData);
|
|
7127
|
+
}
|
|
7128
|
+
if (viewApi.url && request) {
|
|
7129
|
+
that.loading = true;
|
|
6151
7130
|
request({
|
|
6152
|
-
url: Object(formula_["evaluate"])(
|
|
6153
|
-
method:
|
|
6154
|
-
data:
|
|
7131
|
+
url: Object(formula_["evaluate"])(viewApi.url, reqData),
|
|
7132
|
+
method: viewApi.method || "GET",
|
|
7133
|
+
data: reqData
|
|
6155
7134
|
}).then(function (res) {
|
|
6156
|
-
|
|
6157
|
-
|
|
7135
|
+
that.loading = false;
|
|
7136
|
+
if (typeof viewApi.after === "function") {
|
|
7137
|
+
res = viewApi.after.call(_this4, res);
|
|
7138
|
+
}
|
|
7139
|
+
_this4.$refs.viewFormDialog.setFormModel(res);
|
|
7140
|
+
}).catch(function (error) {
|
|
7141
|
+
that.loading = false;
|
|
7142
|
+
});
|
|
6158
7143
|
} else {
|
|
7144
|
+
if (typeof viewApi.after === "function") {
|
|
7145
|
+
reqData = viewApi.after.call(this, reqData);
|
|
7146
|
+
}
|
|
6159
7147
|
this.$nextTick(function () {
|
|
6160
|
-
|
|
7148
|
+
_this4.$refs.viewFormDialog.setFormModel(typeof viewApi.after === "function" ? viewApi.after.call(_this4, reqData) : reqData);
|
|
6161
7149
|
});
|
|
6162
7150
|
}
|
|
6163
7151
|
}
|
|
@@ -6175,8 +7163,8 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
6175
7163
|
|
|
6176
7164
|
var crud_src_component = normalizeComponent(
|
|
6177
7165
|
components_crud_srcvue_type_script_lang_js_,
|
|
6178
|
-
|
|
6179
|
-
|
|
7166
|
+
srcvue_type_template_id_34fe6a3b_render,
|
|
7167
|
+
srcvue_type_template_id_34fe6a3b_staticRenderFns,
|
|
6180
7168
|
false,
|
|
6181
7169
|
null,
|
|
6182
7170
|
null,
|
|
@@ -6192,20 +7180,20 @@ crud_src.install = function (Vue) {
|
|
|
6192
7180
|
};
|
|
6193
7181
|
/* harmony default export */ var crud = (crud_src);
|
|
6194
7182
|
// EXTERNAL MODULE: external "codemirror"
|
|
6195
|
-
var external_codemirror_ = __webpack_require__(
|
|
7183
|
+
var external_codemirror_ = __webpack_require__(19);
|
|
6196
7184
|
var external_codemirror_default = /*#__PURE__*/__webpack_require__.n(external_codemirror_);
|
|
6197
7185
|
|
|
6198
7186
|
// EXTERNAL MODULE: external "codemirror/mode/javascript/javascript"
|
|
6199
|
-
var javascript_ = __webpack_require__(
|
|
7187
|
+
var javascript_ = __webpack_require__(59);
|
|
6200
7188
|
|
|
6201
7189
|
// EXTERNAL MODULE: external "codemirror/mode/htmlmixed/htmlmixed"
|
|
6202
|
-
var htmlmixed_ = __webpack_require__(
|
|
7190
|
+
var htmlmixed_ = __webpack_require__(60);
|
|
6203
7191
|
|
|
6204
7192
|
// EXTERNAL MODULE: external "codemirror/addon/mode/simple"
|
|
6205
|
-
var simple_ = __webpack_require__(
|
|
7193
|
+
var simple_ = __webpack_require__(61);
|
|
6206
7194
|
|
|
6207
7195
|
// EXTERNAL MODULE: external "codemirror/addon/mode/multiplex"
|
|
6208
|
-
var multiplex_ = __webpack_require__(
|
|
7196
|
+
var multiplex_ = __webpack_require__(62);
|
|
6209
7197
|
|
|
6210
7198
|
// CONCATENATED MODULE: ./src/components/formula/src/codeMirror.js
|
|
6211
7199
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
@@ -6424,11 +7412,11 @@ function funcList_extends() { funcList_extends = Object.assign ? Object.assign.b
|
|
|
6424
7412
|
}
|
|
6425
7413
|
});
|
|
6426
7414
|
// EXTERNAL MODULE: external "element-ui/lib/tree"
|
|
6427
|
-
var tree_ = __webpack_require__(
|
|
7415
|
+
var tree_ = __webpack_require__(54);
|
|
6428
7416
|
var tree_default = /*#__PURE__*/__webpack_require__.n(tree_);
|
|
6429
7417
|
|
|
6430
7418
|
// EXTERNAL MODULE: external "element-ui/lib/badge"
|
|
6431
|
-
var badge_ = __webpack_require__(
|
|
7419
|
+
var badge_ = __webpack_require__(55);
|
|
6432
7420
|
var badge_default = /*#__PURE__*/__webpack_require__.n(badge_);
|
|
6433
7421
|
|
|
6434
7422
|
// CONCATENATED MODULE: ./src/components/formula/src/variableList.js
|
|
@@ -6522,7 +7510,7 @@ var badge_default = /*#__PURE__*/__webpack_require__.n(badge_);
|
|
|
6522
7510
|
"attrs": {
|
|
6523
7511
|
"value": "self"
|
|
6524
7512
|
}
|
|
6525
|
-
}, [h("label", [data.label])]), data.label && (!this.selfVariableName || data.value !== this.selfVariableName) && h("label", [data.label]), data.tag ? h("span", {
|
|
7513
|
+
}, [h("label", [data.label])]), data.label && (!this.selfVariableName || data.value !== this.selfVariableName) && h("label", [data.label]), data.label && data.tag ? h("span", {
|
|
6526
7514
|
"class": this.classPrefix + "-item-tag"
|
|
6527
7515
|
}, [data.tag]) : null]);
|
|
6528
7516
|
},
|
|
@@ -6622,31 +7610,11 @@ var badge_default = /*#__PURE__*/__webpack_require__.n(badge_);
|
|
|
6622
7610
|
}, [this.selectMode === 'tabs' ? this.renderTab(h) : this.renderContent(h)]);
|
|
6623
7611
|
}
|
|
6624
7612
|
});
|
|
6625
|
-
// CONCATENATED MODULE: ./src/components/formula/src/plugin.js
|
|
6626
|
-
/**
|
|
6627
|
-
* @file 扩展 codemirror
|
|
6628
|
-
*/
|
|
7613
|
+
// CONCATENATED MODULE: ./src/components/formula/src/plugin.js
|
|
6629
7614
|
|
|
6630
7615
|
/**
|
|
6631
|
-
*
|
|
6632
|
-
* @param tree
|
|
6633
|
-
* @param iterator
|
|
7616
|
+
* @file 扩展 codemirror
|
|
6634
7617
|
*/
|
|
6635
|
-
function plugin_eachTree(tree, iterator, level, paths) {
|
|
6636
|
-
if (level === void 0) {
|
|
6637
|
-
level = 1;
|
|
6638
|
-
}
|
|
6639
|
-
if (paths === void 0) {
|
|
6640
|
-
paths = [];
|
|
6641
|
-
}
|
|
6642
|
-
tree.map(function (item, index) {
|
|
6643
|
-
var currentPath = paths.concat(item);
|
|
6644
|
-
iterator(item, index, level, currentPath);
|
|
6645
|
-
if (item.children && item.children.splice) {
|
|
6646
|
-
plugin_eachTree(item.children, iterator, level + 1, currentPath);
|
|
6647
|
-
}
|
|
6648
|
-
});
|
|
6649
|
-
}
|
|
6650
7618
|
function replaceStrByIndex(str, idx, key, replaceKey) {
|
|
6651
7619
|
var from = str.slice(0, idx);
|
|
6652
7620
|
var left = str.slice(idx);
|
|
@@ -6664,20 +7632,29 @@ function plugin_editorFactory(dom, cm, props) {
|
|
|
6664
7632
|
mode: props && props.evalMode ? 'text/formula' : 'text/formula-template'
|
|
6665
7633
|
});
|
|
6666
7634
|
}
|
|
6667
|
-
var
|
|
7635
|
+
var plugin_FormulaPlugin = /*#__PURE__*/function () {
|
|
6668
7636
|
function FormulaPlugin(editor, cm, getProps) {
|
|
7637
|
+
var _this = this;
|
|
6669
7638
|
this.editor = editor;
|
|
6670
7639
|
this.cm = cm;
|
|
6671
7640
|
this.getProps = getProps;
|
|
6672
|
-
|
|
7641
|
+
editor.on('change', function (editorDom) {
|
|
7642
|
+
//处理第一次初始化
|
|
7643
|
+
var val = editorDom.getDoc().getValue();
|
|
7644
|
+
var _this$getProps = _this.getProps(),
|
|
7645
|
+
value = _this$getProps.value;
|
|
7646
|
+
if (val == value) {
|
|
7647
|
+
_this.autoMarkText();
|
|
7648
|
+
}
|
|
7649
|
+
});
|
|
6673
7650
|
this.autoMarkText();
|
|
6674
7651
|
}
|
|
6675
7652
|
var _proto = FormulaPlugin.prototype;
|
|
6676
7653
|
_proto.autoMarkText = function autoMarkText() {
|
|
6677
|
-
var _this$
|
|
6678
|
-
functions = _this$
|
|
6679
|
-
variables = _this$
|
|
6680
|
-
value = _this$
|
|
7654
|
+
var _this$getProps2 = this.getProps(),
|
|
7655
|
+
functions = _this$getProps2.functions,
|
|
7656
|
+
variables = _this$getProps2.variables,
|
|
7657
|
+
value = _this$getProps2.value;
|
|
6681
7658
|
if (value) {
|
|
6682
7659
|
// todo functions 也需要自动替换
|
|
6683
7660
|
this.autoMark(variables);
|
|
@@ -6747,8 +7724,8 @@ var FormulaPlugin = /*#__PURE__*/function () {
|
|
|
6747
7724
|
};
|
|
6748
7725
|
_proto.insertContent = function insertContent(value, type) {
|
|
6749
7726
|
var from = this.editor.getCursor();
|
|
6750
|
-
var _this$
|
|
6751
|
-
evalMode = _this$
|
|
7727
|
+
var _this$getProps3 = this.getProps(),
|
|
7728
|
+
evalMode = _this$getProps3.evalMode;
|
|
6752
7729
|
if (type === 'variable') {
|
|
6753
7730
|
this.editor.replaceSelection(value.key);
|
|
6754
7731
|
var to = this.editor.getCursor();
|
|
@@ -6790,12 +7767,12 @@ var FormulaPlugin = /*#__PURE__*/function () {
|
|
|
6790
7767
|
});
|
|
6791
7768
|
};
|
|
6792
7769
|
_proto.autoMark = function autoMark(variables) {
|
|
6793
|
-
var
|
|
7770
|
+
var _this2 = this;
|
|
6794
7771
|
if (!Array.isArray(variables) || !variables.length) {
|
|
6795
7772
|
return;
|
|
6796
7773
|
}
|
|
6797
7774
|
var varMap = {};
|
|
6798
|
-
|
|
7775
|
+
eachTree(variables, function (item) {
|
|
6799
7776
|
if (item.value) {
|
|
6800
7777
|
varMap[item.value] = item.label;
|
|
6801
7778
|
}
|
|
@@ -6805,14 +7782,14 @@ var FormulaPlugin = /*#__PURE__*/function () {
|
|
|
6805
7782
|
});
|
|
6806
7783
|
var editor = this.editor;
|
|
6807
7784
|
var lines = editor.lineCount();
|
|
6808
|
-
var _this$
|
|
6809
|
-
_this$
|
|
6810
|
-
evalMode = _this$
|
|
7785
|
+
var _this$getProps4 = this.getProps(),
|
|
7786
|
+
_this$getProps4$evalM = _this$getProps4.evalMode,
|
|
7787
|
+
evalMode = _this$getProps4$evalM === void 0 ? true : _this$getProps4$evalM;
|
|
6811
7788
|
var _loop = function _loop(line) {
|
|
6812
7789
|
var content = editor.getLine(line);
|
|
6813
7790
|
// 标记方法调用
|
|
6814
7791
|
content.replace(/([A-Z]+)\s*\(/g, function (_, func, pos) {
|
|
6815
|
-
|
|
7792
|
+
_this2.markText({
|
|
6816
7793
|
line: line,
|
|
6817
7794
|
ch: pos
|
|
6818
7795
|
}, {
|
|
@@ -6830,7 +7807,7 @@ var FormulaPlugin = /*#__PURE__*/function () {
|
|
|
6830
7807
|
var encode = replaceStrByIndex(content, idx, v, REPLACE_KEY);
|
|
6831
7808
|
var reg = getRegExpByMode(evalMode, REPLACE_KEY);
|
|
6832
7809
|
if (reg.test(encode)) {
|
|
6833
|
-
|
|
7810
|
+
_this2.markText({
|
|
6834
7811
|
line: line,
|
|
6835
7812
|
ch: idx
|
|
6836
7813
|
}, {
|
|
@@ -6868,7 +7845,6 @@ function registerLaunguageMode(cm) {
|
|
|
6868
7845
|
cm.defineMode('formula', function (config, parserConfig) {
|
|
6869
7846
|
var formula = cm.getMode(config, 'javascript');
|
|
6870
7847
|
if (!parserConfig || !parserConfig.base) return formula;
|
|
6871
|
-
debugger;
|
|
6872
7848
|
return cm.multiplexingMode(cm.getMode(config, parserConfig.base), {
|
|
6873
7849
|
open: '${',
|
|
6874
7850
|
close: '}',
|
|
@@ -8427,7 +9403,7 @@ function registerLaunguageMode(cm) {
|
|
|
8427
9403
|
namespace: "其他"
|
|
8428
9404
|
}]);
|
|
8429
9405
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
8430
|
-
var message_ = __webpack_require__(
|
|
9406
|
+
var message_ = __webpack_require__(56);
|
|
8431
9407
|
var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
8432
9408
|
|
|
8433
9409
|
// CONCATENATED MODULE: ./src/components/formula/src/index.js
|
|
@@ -8440,6 +9416,8 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
|
8440
9416
|
|
|
8441
9417
|
|
|
8442
9418
|
|
|
9419
|
+
|
|
9420
|
+
|
|
8443
9421
|
/* harmony default export */ var formula_src = ({
|
|
8444
9422
|
name: "Formula",
|
|
8445
9423
|
componentName: "Formula",
|
|
@@ -8505,7 +9483,7 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
|
8505
9483
|
},
|
|
8506
9484
|
handleEditorMounted: function handleEditorMounted(cm, editor) {
|
|
8507
9485
|
var _this = this;
|
|
8508
|
-
this.editorPlugin = new
|
|
9486
|
+
this.editorPlugin = new plugin_FormulaPlugin(editor, cm, function () {
|
|
8509
9487
|
return _this.$props;
|
|
8510
9488
|
});
|
|
8511
9489
|
},
|
|
@@ -8539,6 +9517,7 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
|
8539
9517
|
}, 'variable');
|
|
8540
9518
|
},
|
|
8541
9519
|
handleChange: function handleChange(value) {
|
|
9520
|
+
this.$emit("input", value);
|
|
8542
9521
|
this.$emit("change", value);
|
|
8543
9522
|
},
|
|
8544
9523
|
handleFocus: function handleFocus() {
|
|
@@ -8552,6 +9531,74 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
|
8552
9531
|
value: "name",
|
|
8553
9532
|
label: "名称"
|
|
8554
9533
|
});
|
|
9534
|
+
},
|
|
9535
|
+
validate: function validate() {
|
|
9536
|
+
var value = this.value;
|
|
9537
|
+
try {
|
|
9538
|
+
value ? Object(formula_["parse"])(value, {
|
|
9539
|
+
evalMode: this.evalMode
|
|
9540
|
+
}) : null;
|
|
9541
|
+
} catch (e) {
|
|
9542
|
+
return "\u516C\u5F0F\u503C\u6821\u9A8C\u9519\u8BEF\uFF0C\u9519\u8BEF\u7684\u4F4D\u7F6E/\u539F\u56E0\u662F " + e.message;
|
|
9543
|
+
}
|
|
9544
|
+
return;
|
|
9545
|
+
},
|
|
9546
|
+
replaceStrByIndex: function replaceStrByIndex(str, idx, key, replaceKey) {
|
|
9547
|
+
var from = str.slice(0, idx);
|
|
9548
|
+
var left = str.slice(idx);
|
|
9549
|
+
return from + left.replace(key, replaceKey);
|
|
9550
|
+
},
|
|
9551
|
+
getRegExpByMode: function getRegExpByMode(evalMode, key) {
|
|
9552
|
+
var reg = evalMode ? "\\b" + key + "\\b" : "\\$\\{[^\\{\\}]*\\b" + key + "\\b[^\\{\\}]*\\}";
|
|
9553
|
+
return new RegExp(reg);
|
|
9554
|
+
},
|
|
9555
|
+
highlightValue: function highlightValue(value, variables, evalMode) {
|
|
9556
|
+
var _this2 = this;
|
|
9557
|
+
if (evalMode === void 0) {
|
|
9558
|
+
evalMode = true;
|
|
9559
|
+
}
|
|
9560
|
+
if (!Array.isArray(variables) || !variables.length || !value) {
|
|
9561
|
+
return;
|
|
9562
|
+
}
|
|
9563
|
+
var varMap = {};
|
|
9564
|
+
eachTree(variables, function (item) {
|
|
9565
|
+
if (item.value) {
|
|
9566
|
+
var key = item.value;
|
|
9567
|
+
varMap[key] = item.label;
|
|
9568
|
+
}
|
|
9569
|
+
});
|
|
9570
|
+
var vars = Object.keys(varMap).filter(function (item) {
|
|
9571
|
+
return item;
|
|
9572
|
+
}).sort(function (a, b) {
|
|
9573
|
+
return b.length - a.length;
|
|
9574
|
+
});
|
|
9575
|
+
var content = value || '';
|
|
9576
|
+
var html = '';
|
|
9577
|
+
|
|
9578
|
+
// 标记方法调用
|
|
9579
|
+
html = content.replace(/([A-Z]+)\s*\(/g, function (_, func, pos) {
|
|
9580
|
+
return _ && _.replace(func, "<span class=\"c-func\">" + func + "</span>");
|
|
9581
|
+
});
|
|
9582
|
+
var REPLACE_KEY = 'AMIS_FORMULA_REPLACE_KEY';
|
|
9583
|
+
vars.forEach(function (v) {
|
|
9584
|
+
var from = 0;
|
|
9585
|
+
var idx = -1;
|
|
9586
|
+
while (~(idx = content.indexOf(v, from))) {
|
|
9587
|
+
var encodeHtml = _this2.replaceStrByIndex(html, idx, v, REPLACE_KEY);
|
|
9588
|
+
var reg = _this2.getRegExpByMode(evalMode, REPLACE_KEY);
|
|
9589
|
+
|
|
9590
|
+
// 如果匹配到则高亮,没有匹配到替换成原值
|
|
9591
|
+
if (reg.test(encodeHtml)) {
|
|
9592
|
+
html = encodeHtml.replace(REPLACE_KEY, "<span class=\"c-field\">" + varMap[v] + "</span>");
|
|
9593
|
+
} else {
|
|
9594
|
+
html = encodeHtml.replace(REPLACE_KEY, v);
|
|
9595
|
+
}
|
|
9596
|
+
from = idx + v.length;
|
|
9597
|
+
}
|
|
9598
|
+
});
|
|
9599
|
+
return {
|
|
9600
|
+
html: html
|
|
9601
|
+
};
|
|
8555
9602
|
}
|
|
8556
9603
|
},
|
|
8557
9604
|
beforeDestroy: function beforeDestroy() {
|
|
@@ -8736,15 +9783,15 @@ srcvue_type_template_id_6ea89ba6_render._withStripped = true
|
|
|
8736
9783
|
// CONCATENATED MODULE: ./src/components/dialog/src/index.vue?vue&type=template&id=6ea89ba6&
|
|
8737
9784
|
|
|
8738
9785
|
// EXTERNAL MODULE: external "element-ui/src/utils/popup"
|
|
8739
|
-
var popup_ = __webpack_require__(
|
|
9786
|
+
var popup_ = __webpack_require__(17);
|
|
8740
9787
|
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
|
|
8741
9788
|
|
|
8742
9789
|
// EXTERNAL MODULE: external "element-ui/src/mixins/migrating"
|
|
8743
|
-
var migrating_ = __webpack_require__(
|
|
9790
|
+
var migrating_ = __webpack_require__(57);
|
|
8744
9791
|
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
|
|
8745
9792
|
|
|
8746
9793
|
// EXTERNAL MODULE: external "element-ui/src/mixins/emitter"
|
|
8747
|
-
var emitter_ = __webpack_require__(
|
|
9794
|
+
var emitter_ = __webpack_require__(18);
|
|
8748
9795
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
8749
9796
|
|
|
8750
9797
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/dialog/src/index.vue?vue&type=script&lang=js&
|
|
@@ -8940,6 +9987,323 @@ dialog_src.install = function (Vue) {
|
|
|
8940
9987
|
Vue.component(dialog_src.name, dialog_src);
|
|
8941
9988
|
};
|
|
8942
9989
|
/* harmony default export */ var dialog = (dialog_src);
|
|
9990
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/drawer/src/index.vue?vue&type=template&id=6565c780&
|
|
9991
|
+
var srcvue_type_template_id_6565c780_render = function render() {
|
|
9992
|
+
var _vm = this,
|
|
9993
|
+
_c = _vm._self._c
|
|
9994
|
+
return _c(
|
|
9995
|
+
"transition",
|
|
9996
|
+
{
|
|
9997
|
+
attrs: { name: "el-drawer-fade" },
|
|
9998
|
+
on: { "after-enter": _vm.afterEnter, "after-leave": _vm.afterLeave },
|
|
9999
|
+
},
|
|
10000
|
+
[
|
|
10001
|
+
_c(
|
|
10002
|
+
"div",
|
|
10003
|
+
{
|
|
10004
|
+
directives: [
|
|
10005
|
+
{
|
|
10006
|
+
name: "show",
|
|
10007
|
+
rawName: "v-show",
|
|
10008
|
+
value: _vm.visible,
|
|
10009
|
+
expression: "visible",
|
|
10010
|
+
},
|
|
10011
|
+
],
|
|
10012
|
+
staticClass: "el-drawer__wrapper",
|
|
10013
|
+
attrs: { tabindex: "-1" },
|
|
10014
|
+
},
|
|
10015
|
+
[
|
|
10016
|
+
_c(
|
|
10017
|
+
"div",
|
|
10018
|
+
{
|
|
10019
|
+
staticClass: "el-drawer__container",
|
|
10020
|
+
class: _vm.visible && "el-drawer__open",
|
|
10021
|
+
attrs: { role: "document", tabindex: "-1" },
|
|
10022
|
+
on: {
|
|
10023
|
+
click: function ($event) {
|
|
10024
|
+
if ($event.target !== $event.currentTarget) return null
|
|
10025
|
+
return _vm.handleWrapperClick.apply(null, arguments)
|
|
10026
|
+
},
|
|
10027
|
+
},
|
|
10028
|
+
},
|
|
10029
|
+
[
|
|
10030
|
+
_c(
|
|
10031
|
+
"div",
|
|
10032
|
+
{
|
|
10033
|
+
ref: "drawer",
|
|
10034
|
+
staticClass: "el-drawer drawer",
|
|
10035
|
+
class: [_vm.direction, _vm.customClass],
|
|
10036
|
+
style: _vm.isHorizontal
|
|
10037
|
+
? `width: ${_vm.drawerSize}`
|
|
10038
|
+
: `height: ${_vm.drawerSize}`,
|
|
10039
|
+
attrs: {
|
|
10040
|
+
"aria-modal": "true",
|
|
10041
|
+
"aria-labelledby": "el-drawer__title",
|
|
10042
|
+
"aria-label": _vm.title,
|
|
10043
|
+
role: "dialog",
|
|
10044
|
+
tabindex: "-1",
|
|
10045
|
+
},
|
|
10046
|
+
},
|
|
10047
|
+
[
|
|
10048
|
+
_vm.withHeader
|
|
10049
|
+
? _c(
|
|
10050
|
+
"header",
|
|
10051
|
+
{
|
|
10052
|
+
staticClass: "el-drawer__header",
|
|
10053
|
+
attrs: { id: "el-drawer__title" },
|
|
10054
|
+
},
|
|
10055
|
+
[
|
|
10056
|
+
_vm._t("title", function () {
|
|
10057
|
+
return [
|
|
10058
|
+
_c(
|
|
10059
|
+
"span",
|
|
10060
|
+
{
|
|
10061
|
+
attrs: { role: "heading", title: _vm.title },
|
|
10062
|
+
},
|
|
10063
|
+
[_vm._v(_vm._s(_vm.title))]
|
|
10064
|
+
),
|
|
10065
|
+
]
|
|
10066
|
+
}),
|
|
10067
|
+
_vm.showClose
|
|
10068
|
+
? _c(
|
|
10069
|
+
"button",
|
|
10070
|
+
{
|
|
10071
|
+
staticClass: "el-drawer__close-btn",
|
|
10072
|
+
attrs: {
|
|
10073
|
+
"aria-label": `close ${
|
|
10074
|
+
_vm.title || "drawer"
|
|
10075
|
+
}`,
|
|
10076
|
+
type: "button",
|
|
10077
|
+
},
|
|
10078
|
+
on: { click: _vm.closeDrawer },
|
|
10079
|
+
},
|
|
10080
|
+
[
|
|
10081
|
+
_c("i", {
|
|
10082
|
+
staticClass:
|
|
10083
|
+
"el-dialog__close el-icon el-icon-close",
|
|
10084
|
+
}),
|
|
10085
|
+
]
|
|
10086
|
+
)
|
|
10087
|
+
: _vm._e(),
|
|
10088
|
+
],
|
|
10089
|
+
2
|
|
10090
|
+
)
|
|
10091
|
+
: _vm._e(),
|
|
10092
|
+
_vm.rendered
|
|
10093
|
+
? _c(
|
|
10094
|
+
"section",
|
|
10095
|
+
{ staticClass: "el-drawer__body" },
|
|
10096
|
+
[_vm._t("default")],
|
|
10097
|
+
2
|
|
10098
|
+
)
|
|
10099
|
+
: _vm._e(),
|
|
10100
|
+
_vm.$slots.footer
|
|
10101
|
+
? _c(
|
|
10102
|
+
"footer",
|
|
10103
|
+
{ staticClass: "el-drawer__footer" },
|
|
10104
|
+
[_vm._t("footer")],
|
|
10105
|
+
2
|
|
10106
|
+
)
|
|
10107
|
+
: _vm._e(),
|
|
10108
|
+
]
|
|
10109
|
+
),
|
|
10110
|
+
]
|
|
10111
|
+
),
|
|
10112
|
+
]
|
|
10113
|
+
),
|
|
10114
|
+
]
|
|
10115
|
+
)
|
|
10116
|
+
}
|
|
10117
|
+
var srcvue_type_template_id_6565c780_staticRenderFns = []
|
|
10118
|
+
srcvue_type_template_id_6565c780_render._withStripped = true
|
|
10119
|
+
|
|
10120
|
+
|
|
10121
|
+
// CONCATENATED MODULE: ./src/components/drawer/src/index.vue?vue&type=template&id=6565c780&
|
|
10122
|
+
|
|
10123
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/drawer/src/index.vue?vue&type=script&lang=js&
|
|
10124
|
+
|
|
10125
|
+
|
|
10126
|
+
/* harmony default export */ var drawer_srcvue_type_script_lang_js_ = ({
|
|
10127
|
+
name: 'Drawer',
|
|
10128
|
+
mixins: [popup_default.a, emitter_default.a],
|
|
10129
|
+
props: {
|
|
10130
|
+
appendToBody: {
|
|
10131
|
+
type: Boolean,
|
|
10132
|
+
default: true
|
|
10133
|
+
},
|
|
10134
|
+
beforeClose: {
|
|
10135
|
+
type: Function
|
|
10136
|
+
},
|
|
10137
|
+
customClass: {
|
|
10138
|
+
type: String,
|
|
10139
|
+
default: ''
|
|
10140
|
+
},
|
|
10141
|
+
closeOnPressEscape: {
|
|
10142
|
+
type: Boolean,
|
|
10143
|
+
default: true
|
|
10144
|
+
},
|
|
10145
|
+
destroyOnClose: {
|
|
10146
|
+
type: Boolean,
|
|
10147
|
+
default: false
|
|
10148
|
+
},
|
|
10149
|
+
modal: {
|
|
10150
|
+
type: Boolean,
|
|
10151
|
+
default: true
|
|
10152
|
+
},
|
|
10153
|
+
direction: {
|
|
10154
|
+
type: String,
|
|
10155
|
+
default: 'rtl',
|
|
10156
|
+
validator: function validator(val) {
|
|
10157
|
+
return ['ltr', 'rtl', 'ttb', 'btt'].indexOf(val) !== -1;
|
|
10158
|
+
}
|
|
10159
|
+
},
|
|
10160
|
+
modalAppendToBody: {
|
|
10161
|
+
type: Boolean,
|
|
10162
|
+
default: true
|
|
10163
|
+
},
|
|
10164
|
+
showClose: {
|
|
10165
|
+
type: Boolean,
|
|
10166
|
+
default: true
|
|
10167
|
+
},
|
|
10168
|
+
size: {
|
|
10169
|
+
type: [Number, String],
|
|
10170
|
+
default: '30%'
|
|
10171
|
+
},
|
|
10172
|
+
title: {
|
|
10173
|
+
type: String,
|
|
10174
|
+
default: ''
|
|
10175
|
+
},
|
|
10176
|
+
visible: {
|
|
10177
|
+
type: Boolean
|
|
10178
|
+
},
|
|
10179
|
+
wrapperClosable: {
|
|
10180
|
+
type: Boolean,
|
|
10181
|
+
default: true
|
|
10182
|
+
},
|
|
10183
|
+
withHeader: {
|
|
10184
|
+
type: Boolean,
|
|
10185
|
+
default: true
|
|
10186
|
+
}
|
|
10187
|
+
},
|
|
10188
|
+
computed: {
|
|
10189
|
+
isHorizontal: function isHorizontal() {
|
|
10190
|
+
return this.direction === 'rtl' || this.direction === 'ltr';
|
|
10191
|
+
},
|
|
10192
|
+
drawerSize: function drawerSize() {
|
|
10193
|
+
return typeof this.size === 'number' ? this.size + "px" : this.size;
|
|
10194
|
+
}
|
|
10195
|
+
},
|
|
10196
|
+
data: function data() {
|
|
10197
|
+
return {
|
|
10198
|
+
closed: false,
|
|
10199
|
+
prevActiveElement: null
|
|
10200
|
+
};
|
|
10201
|
+
},
|
|
10202
|
+
watch: {
|
|
10203
|
+
visible: function visible(val) {
|
|
10204
|
+
var _this = this;
|
|
10205
|
+
if (val) {
|
|
10206
|
+
this.closed = false;
|
|
10207
|
+
this.$emit('open');
|
|
10208
|
+
if (this.appendToBody) {
|
|
10209
|
+
document.body.appendChild(this.$el);
|
|
10210
|
+
}
|
|
10211
|
+
this.prevActiveElement = document.activeElement;
|
|
10212
|
+
} else {
|
|
10213
|
+
if (!this.closed) {
|
|
10214
|
+
this.$emit('close');
|
|
10215
|
+
if (this.destroyOnClose === true) {
|
|
10216
|
+
this.rendered = false;
|
|
10217
|
+
}
|
|
10218
|
+
}
|
|
10219
|
+
this.$nextTick(function () {
|
|
10220
|
+
if (_this.prevActiveElement) {
|
|
10221
|
+
_this.prevActiveElement.focus();
|
|
10222
|
+
}
|
|
10223
|
+
});
|
|
10224
|
+
}
|
|
10225
|
+
}
|
|
10226
|
+
},
|
|
10227
|
+
methods: {
|
|
10228
|
+
afterEnter: function afterEnter() {
|
|
10229
|
+
this.$emit('opened');
|
|
10230
|
+
},
|
|
10231
|
+
afterLeave: function afterLeave() {
|
|
10232
|
+
this.$emit('closed');
|
|
10233
|
+
},
|
|
10234
|
+
hide: function hide(cancel) {
|
|
10235
|
+
if (cancel !== false) {
|
|
10236
|
+
this.$emit('update:visible', false);
|
|
10237
|
+
this.$emit('close');
|
|
10238
|
+
if (this.destroyOnClose === true) {
|
|
10239
|
+
this.rendered = false;
|
|
10240
|
+
}
|
|
10241
|
+
this.closed = true;
|
|
10242
|
+
}
|
|
10243
|
+
},
|
|
10244
|
+
handleWrapperClick: function handleWrapperClick() {
|
|
10245
|
+
if (this.wrapperClosable) {
|
|
10246
|
+
this.closeDrawer();
|
|
10247
|
+
}
|
|
10248
|
+
},
|
|
10249
|
+
closeDrawer: function closeDrawer() {
|
|
10250
|
+
if (typeof this.beforeClose === 'function') {
|
|
10251
|
+
this.beforeClose(this.hide);
|
|
10252
|
+
} else {
|
|
10253
|
+
this.hide();
|
|
10254
|
+
}
|
|
10255
|
+
},
|
|
10256
|
+
handleClose: function handleClose() {
|
|
10257
|
+
// This method here will be called by PopupManger, when the `closeOnPressEscape` was set to true
|
|
10258
|
+
// pressing `ESC` will call this method, and also close the drawer.
|
|
10259
|
+
// This method also calls `beforeClose` if there was one.
|
|
10260
|
+
this.closeDrawer();
|
|
10261
|
+
}
|
|
10262
|
+
},
|
|
10263
|
+
mounted: function mounted() {
|
|
10264
|
+
if (this.visible) {
|
|
10265
|
+
this.rendered = true;
|
|
10266
|
+
this.open();
|
|
10267
|
+
if (this.appendToBody) {
|
|
10268
|
+
document.body.appendChild(this.$el);
|
|
10269
|
+
}
|
|
10270
|
+
}
|
|
10271
|
+
},
|
|
10272
|
+
destroyed: function destroyed() {
|
|
10273
|
+
// if appendToBody is true, remove DOM node after destroy
|
|
10274
|
+
if (this.appendToBody && this.$el && this.$el.parentNode) {
|
|
10275
|
+
this.$el.parentNode.removeChild(this.$el);
|
|
10276
|
+
}
|
|
10277
|
+
}
|
|
10278
|
+
});
|
|
10279
|
+
// CONCATENATED MODULE: ./src/components/drawer/src/index.vue?vue&type=script&lang=js&
|
|
10280
|
+
/* harmony default export */ var components_drawer_srcvue_type_script_lang_js_ = (drawer_srcvue_type_script_lang_js_);
|
|
10281
|
+
// CONCATENATED MODULE: ./src/components/drawer/src/index.vue
|
|
10282
|
+
|
|
10283
|
+
|
|
10284
|
+
|
|
10285
|
+
|
|
10286
|
+
|
|
10287
|
+
/* normalize component */
|
|
10288
|
+
|
|
10289
|
+
var drawer_src_component = normalizeComponent(
|
|
10290
|
+
components_drawer_srcvue_type_script_lang_js_,
|
|
10291
|
+
srcvue_type_template_id_6565c780_render,
|
|
10292
|
+
srcvue_type_template_id_6565c780_staticRenderFns,
|
|
10293
|
+
false,
|
|
10294
|
+
null,
|
|
10295
|
+
null,
|
|
10296
|
+
null
|
|
10297
|
+
|
|
10298
|
+
)
|
|
10299
|
+
|
|
10300
|
+
/* harmony default export */ var drawer_src = (drawer_src_component.exports);
|
|
10301
|
+
// CONCATENATED MODULE: ./src/components/drawer/index.js
|
|
10302
|
+
|
|
10303
|
+
drawer_src.install = function (Vue) {
|
|
10304
|
+
Vue.component(drawer_src.name, drawer_src);
|
|
10305
|
+
};
|
|
10306
|
+
/* harmony default export */ var drawer = (drawer_src);
|
|
8943
10307
|
// CONCATENATED MODULE: ./src/index.js
|
|
8944
10308
|
|
|
8945
10309
|
|
|
@@ -8956,7 +10320,11 @@ dialog_src.install = function (Vue) {
|
|
|
8956
10320
|
|
|
8957
10321
|
|
|
8958
10322
|
|
|
8959
|
-
|
|
10323
|
+
|
|
10324
|
+
|
|
10325
|
+
|
|
10326
|
+
|
|
10327
|
+
var components = [components_form, components_form_input, components_form_item, form_group, form_dialog, form_drawer, form_view, form_view_group, form_view_dialog, components_table, components_table_column, table_search, table_editable, table_operate, crud, formula, dialog, drawer];
|
|
8960
10328
|
var install = function install(Vue, opts) {
|
|
8961
10329
|
if (opts === void 0) {
|
|
8962
10330
|
opts = {};
|
|
@@ -8983,6 +10351,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
8983
10351
|
FormItem: components_form_item,
|
|
8984
10352
|
FormGroup: form_group,
|
|
8985
10353
|
FormDialog: form_dialog,
|
|
10354
|
+
FormDrawer: form_drawer,
|
|
8986
10355
|
FormView: form_view,
|
|
8987
10356
|
FormViewGroup: form_view_group,
|
|
8988
10357
|
FormViewDialog: form_view_dialog,
|
|
@@ -8990,9 +10359,11 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
8990
10359
|
TableColumn: components_table_column,
|
|
8991
10360
|
TableSearch: table_search,
|
|
8992
10361
|
TableEditable: table_editable,
|
|
10362
|
+
TableOperate: table_operate,
|
|
8993
10363
|
Crud: crud,
|
|
8994
10364
|
Formula: formula,
|
|
8995
|
-
Dialog: dialog
|
|
10365
|
+
Dialog: dialog,
|
|
10366
|
+
Drawer: drawer
|
|
8996
10367
|
});
|
|
8997
10368
|
|
|
8998
10369
|
/***/ })
|