@idooel/components 0.0.1-beta.60 → 0.0.1-beta.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@idooel/components.esm.js +808 -611
- package/dist/@idooel/components.umd.js +841 -643
- package/package.json +1 -1
- package/packages/composite-components/modal-table/index.js +5 -0
- package/packages/composite-components/modal-table/src/index.vue +93 -0
- package/packages/composite-components/search-area/src/index.vue +1 -1
- package/packages/index.js +5 -2
- package/packages/models/tree-table-model/src/index.vue +9 -1
- package/packages/table/src/action.vue +9 -2
- package/packages/table/src/index.vue +4 -4
- package/packages/utils/index.js +1 -0
|
@@ -20,7 +20,7 @@ import FileUpload from 'vue-upload-component';
|
|
|
20
20
|
//
|
|
21
21
|
//
|
|
22
22
|
|
|
23
|
-
var script$
|
|
23
|
+
var script$C = {
|
|
24
24
|
name: 'ele-button',
|
|
25
25
|
props: {
|
|
26
26
|
record: {
|
|
@@ -141,10 +141,10 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/* script */
|
|
144
|
-
const __vue_script__$
|
|
144
|
+
const __vue_script__$C = script$C;
|
|
145
145
|
|
|
146
146
|
/* template */
|
|
147
|
-
var __vue_render__$
|
|
147
|
+
var __vue_render__$C = function () {
|
|
148
148
|
var _vm = this;
|
|
149
149
|
var _h = _vm.$createElement;
|
|
150
150
|
var _c = _vm._self._c || _h;
|
|
@@ -190,17 +190,17 @@ var __vue_render__$B = function () {
|
|
|
190
190
|
2
|
|
191
191
|
)
|
|
192
192
|
};
|
|
193
|
-
var __vue_staticRenderFns__$
|
|
194
|
-
__vue_render__$
|
|
193
|
+
var __vue_staticRenderFns__$C = [];
|
|
194
|
+
__vue_render__$C._withStripped = true;
|
|
195
195
|
|
|
196
196
|
/* style */
|
|
197
|
-
const __vue_inject_styles__$
|
|
197
|
+
const __vue_inject_styles__$C = undefined;
|
|
198
198
|
/* scoped */
|
|
199
|
-
const __vue_scope_id__$
|
|
199
|
+
const __vue_scope_id__$C = undefined;
|
|
200
200
|
/* module identifier */
|
|
201
|
-
const __vue_module_identifier__$
|
|
201
|
+
const __vue_module_identifier__$C = undefined;
|
|
202
202
|
/* functional template */
|
|
203
|
-
const __vue_is_functional_template__$
|
|
203
|
+
const __vue_is_functional_template__$C = false;
|
|
204
204
|
/* style inject */
|
|
205
205
|
|
|
206
206
|
/* style inject SSR */
|
|
@@ -209,23 +209,23 @@ __vue_render__$B._withStripped = true;
|
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
|
|
212
|
-
const __vue_component__$
|
|
213
|
-
{ render: __vue_render__$
|
|
214
|
-
__vue_inject_styles__$
|
|
215
|
-
__vue_script__$
|
|
216
|
-
__vue_scope_id__$
|
|
217
|
-
__vue_is_functional_template__$
|
|
218
|
-
__vue_module_identifier__$
|
|
212
|
+
const __vue_component__$C = /*#__PURE__*/normalizeComponent(
|
|
213
|
+
{ render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
|
|
214
|
+
__vue_inject_styles__$C,
|
|
215
|
+
__vue_script__$C,
|
|
216
|
+
__vue_scope_id__$C,
|
|
217
|
+
__vue_is_functional_template__$C,
|
|
218
|
+
__vue_module_identifier__$C,
|
|
219
219
|
false,
|
|
220
220
|
undefined,
|
|
221
221
|
undefined,
|
|
222
222
|
undefined
|
|
223
223
|
);
|
|
224
224
|
|
|
225
|
-
__vue_component__$
|
|
225
|
+
__vue_component__$C.install = Vue => Vue.component(__vue_component__$C.name, __vue_component__$C);
|
|
226
226
|
|
|
227
227
|
//
|
|
228
|
-
var script$
|
|
228
|
+
var script$B = {
|
|
229
229
|
name: 'ele-date',
|
|
230
230
|
model: {
|
|
231
231
|
prop: 'value',
|
|
@@ -345,10 +345,10 @@ function addStyle(id, css) {
|
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
/* script */
|
|
348
|
-
const __vue_script__$
|
|
348
|
+
const __vue_script__$B = script$B;
|
|
349
349
|
|
|
350
350
|
/* template */
|
|
351
|
-
var __vue_render__$
|
|
351
|
+
var __vue_render__$B = function () {
|
|
352
352
|
var _vm = this;
|
|
353
353
|
var _h = _vm.$createElement;
|
|
354
354
|
var _c = _vm._self._c || _h;
|
|
@@ -396,48 +396,48 @@ var __vue_render__$A = function () {
|
|
|
396
396
|
1
|
|
397
397
|
)
|
|
398
398
|
};
|
|
399
|
-
var __vue_staticRenderFns__$
|
|
400
|
-
__vue_render__$
|
|
399
|
+
var __vue_staticRenderFns__$B = [];
|
|
400
|
+
__vue_render__$B._withStripped = true;
|
|
401
401
|
|
|
402
402
|
/* style */
|
|
403
|
-
const __vue_inject_styles__$
|
|
403
|
+
const __vue_inject_styles__$B = function (inject) {
|
|
404
404
|
if (!inject) return
|
|
405
405
|
inject("data-v-0b54504c_0", { source: ".ele-date__wrapper[data-v-0b54504c] {\n width: 100%;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/date/src/index.vue","index.vue"],"names":[],"mappings":"AAuGA;EACA,WAAA;ACtGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele-date__wrapper\">\n <a-date-picker \n style=\"width: 100%;\" \n :mode=\"modeValue\"\n v-if=\"modeValue == 'year'\"\n :open=\"open\"\n :disabled=\"disabled\"\n :value=\"value\"\n :show-time=\"showTime\"\n :show-today=\"showToday\"\n :valueFormat=\"innerValueFormat\"\n @panelChange=\"onPanelChange\"\n @openChange=\"openChange\"\n @change=\"onChange\"\n :format=\"format\">\n </a-date-picker>\n <a-date-picker \n v-else\n style=\"width: 100%;\" \n :open=\"open\"\n :disabled=\"disabled\"\n :value=\"value\"\n :show-time=\"showTime\"\n :show-today=\"showToday\"\n :valueFormat=\"innerValueFormat\"\n @panelChange=\"onPanelChange\"\n @openChange=\"openChange\"\n @change=\"onChange\"\n :format=\"format\">\n </a-date-picker>\n </div>\n</template>\n\n<script>\nimport moment from 'moment'\nexport default {\n name: 'ele-date',\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n value: {\n type: [String, Object]\n },\n disabled: {\n type: Boolean,\n default: false\n },\n format: {\n type: String,\n default: 'YYYY/MM/DD'\n },\n mode: {\n type: String\n },\n valueFormat: {\n type: String\n },\n showTime: {\n type: [Boolean, Object],\n default: true\n },\n showToday: {\n type: Boolean,\n default: true\n },\n },\n data () {\n return {\n open: false\n }\n },\n computed: {\n innerValueFormat () {\n if (this.valueFormat) return this.valueFormat\n return this.format\n },\n modeValue () {\n if (this.mode) return this.mode\n if (this.format === 'YYYY') return 'year'\n return 'date'\n }\n },\n methods: {\n onChange (_, dataString) {\n this.$emit('input', dataString)\n this.$emit('change', dataString)\n },\n onPanelChange (value, mode) {\n if (this.modeValue !== 'year') return\n this.$emit('input', moment(value).format(this.format))\n this.$emit('change', moment(value).format(this.format))\n this.open = false\n },\n openChange (open) {\n this.open = open\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.ele-date__wrapper {\n width: 100%;\n}\n</style>",".ele-date__wrapper {\n width: 100%;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
406
406
|
|
|
407
407
|
};
|
|
408
408
|
/* scoped */
|
|
409
|
-
const __vue_scope_id__$
|
|
409
|
+
const __vue_scope_id__$B = "data-v-0b54504c";
|
|
410
410
|
/* module identifier */
|
|
411
|
-
const __vue_module_identifier__$
|
|
411
|
+
const __vue_module_identifier__$B = undefined;
|
|
412
412
|
/* functional template */
|
|
413
|
-
const __vue_is_functional_template__$
|
|
413
|
+
const __vue_is_functional_template__$B = false;
|
|
414
414
|
/* style inject SSR */
|
|
415
415
|
|
|
416
416
|
/* style inject shadow dom */
|
|
417
417
|
|
|
418
418
|
|
|
419
419
|
|
|
420
|
-
const __vue_component__$
|
|
421
|
-
{ render: __vue_render__$
|
|
422
|
-
__vue_inject_styles__$
|
|
423
|
-
__vue_script__$
|
|
424
|
-
__vue_scope_id__$
|
|
425
|
-
__vue_is_functional_template__$
|
|
426
|
-
__vue_module_identifier__$
|
|
420
|
+
const __vue_component__$B = /*#__PURE__*/normalizeComponent(
|
|
421
|
+
{ render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
|
|
422
|
+
__vue_inject_styles__$B,
|
|
423
|
+
__vue_script__$B,
|
|
424
|
+
__vue_scope_id__$B,
|
|
425
|
+
__vue_is_functional_template__$B,
|
|
426
|
+
__vue_module_identifier__$B,
|
|
427
427
|
false,
|
|
428
428
|
createInjector,
|
|
429
429
|
undefined,
|
|
430
430
|
undefined
|
|
431
431
|
);
|
|
432
432
|
|
|
433
|
-
__vue_component__$
|
|
433
|
+
__vue_component__$B.install = Vue => Vue.component(__vue_component__$B.name, __vue_component__$B);
|
|
434
434
|
|
|
435
435
|
//
|
|
436
436
|
//
|
|
437
437
|
//
|
|
438
438
|
//
|
|
439
439
|
|
|
440
|
-
var script$
|
|
440
|
+
var script$A = {
|
|
441
441
|
name: 'ele-input',
|
|
442
442
|
model: {
|
|
443
443
|
prop: 'value',
|
|
@@ -465,10 +465,10 @@ var script$z = {
|
|
|
465
465
|
};
|
|
466
466
|
|
|
467
467
|
/* script */
|
|
468
|
-
const __vue_script__$
|
|
468
|
+
const __vue_script__$A = script$A;
|
|
469
469
|
|
|
470
470
|
/* template */
|
|
471
|
-
var __vue_render__$
|
|
471
|
+
var __vue_render__$A = function () {
|
|
472
472
|
var _vm = this;
|
|
473
473
|
var _h = _vm.$createElement;
|
|
474
474
|
var _c = _vm._self._c || _h;
|
|
@@ -481,44 +481,44 @@ var __vue_render__$z = function () {
|
|
|
481
481
|
on: { change: _vm.onChange },
|
|
482
482
|
})
|
|
483
483
|
};
|
|
484
|
-
var __vue_staticRenderFns__$
|
|
485
|
-
__vue_render__$
|
|
484
|
+
var __vue_staticRenderFns__$A = [];
|
|
485
|
+
__vue_render__$A._withStripped = true;
|
|
486
486
|
|
|
487
487
|
/* style */
|
|
488
|
-
const __vue_inject_styles__$
|
|
488
|
+
const __vue_inject_styles__$A = function (inject) {
|
|
489
489
|
if (!inject) return
|
|
490
490
|
inject("data-v-c04139c8_0", { source: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", map: {"version":3,"sources":[],"names":[],"mappings":"","file":"index.vue"}, media: undefined });
|
|
491
491
|
|
|
492
492
|
};
|
|
493
493
|
/* scoped */
|
|
494
|
-
const __vue_scope_id__$
|
|
494
|
+
const __vue_scope_id__$A = "data-v-c04139c8";
|
|
495
495
|
/* module identifier */
|
|
496
|
-
const __vue_module_identifier__$
|
|
496
|
+
const __vue_module_identifier__$A = undefined;
|
|
497
497
|
/* functional template */
|
|
498
|
-
const __vue_is_functional_template__$
|
|
498
|
+
const __vue_is_functional_template__$A = false;
|
|
499
499
|
/* style inject SSR */
|
|
500
500
|
|
|
501
501
|
/* style inject shadow dom */
|
|
502
502
|
|
|
503
503
|
|
|
504
504
|
|
|
505
|
-
const __vue_component__$
|
|
506
|
-
{ render: __vue_render__$
|
|
507
|
-
__vue_inject_styles__$
|
|
508
|
-
__vue_script__$
|
|
509
|
-
__vue_scope_id__$
|
|
510
|
-
__vue_is_functional_template__$
|
|
511
|
-
__vue_module_identifier__$
|
|
505
|
+
const __vue_component__$A = /*#__PURE__*/normalizeComponent(
|
|
506
|
+
{ render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
|
|
507
|
+
__vue_inject_styles__$A,
|
|
508
|
+
__vue_script__$A,
|
|
509
|
+
__vue_scope_id__$A,
|
|
510
|
+
__vue_is_functional_template__$A,
|
|
511
|
+
__vue_module_identifier__$A,
|
|
512
512
|
false,
|
|
513
513
|
createInjector,
|
|
514
514
|
undefined,
|
|
515
515
|
undefined
|
|
516
516
|
);
|
|
517
517
|
|
|
518
|
-
__vue_component__$
|
|
518
|
+
__vue_component__$A.install = Vue => Vue.component(__vue_component__$A.name, __vue_component__$A);
|
|
519
519
|
|
|
520
520
|
//
|
|
521
|
-
var script$
|
|
521
|
+
var script$z = {
|
|
522
522
|
name: 'ele-select',
|
|
523
523
|
props: {
|
|
524
524
|
disabled: {
|
|
@@ -603,10 +603,10 @@ var script$y = {
|
|
|
603
603
|
};
|
|
604
604
|
|
|
605
605
|
/* script */
|
|
606
|
-
const __vue_script__$
|
|
606
|
+
const __vue_script__$z = script$z;
|
|
607
607
|
|
|
608
608
|
/* template */
|
|
609
|
-
var __vue_render__$
|
|
609
|
+
var __vue_render__$z = function () {
|
|
610
610
|
var _vm = this;
|
|
611
611
|
var _h = _vm.$createElement;
|
|
612
612
|
var _c = _vm._self._c || _h;
|
|
@@ -627,41 +627,41 @@ var __vue_render__$y = function () {
|
|
|
627
627
|
1
|
|
628
628
|
)
|
|
629
629
|
};
|
|
630
|
-
var __vue_staticRenderFns__$
|
|
631
|
-
__vue_render__$
|
|
630
|
+
var __vue_staticRenderFns__$z = [];
|
|
631
|
+
__vue_render__$z._withStripped = true;
|
|
632
632
|
|
|
633
633
|
/* style */
|
|
634
|
-
const __vue_inject_styles__$
|
|
634
|
+
const __vue_inject_styles__$z = function (inject) {
|
|
635
635
|
if (!inject) return
|
|
636
636
|
inject("data-v-1fbed5ac_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
637
637
|
|
|
638
638
|
};
|
|
639
639
|
/* scoped */
|
|
640
|
-
const __vue_scope_id__$
|
|
640
|
+
const __vue_scope_id__$z = "data-v-1fbed5ac";
|
|
641
641
|
/* module identifier */
|
|
642
|
-
const __vue_module_identifier__$
|
|
642
|
+
const __vue_module_identifier__$z = undefined;
|
|
643
643
|
/* functional template */
|
|
644
|
-
const __vue_is_functional_template__$
|
|
644
|
+
const __vue_is_functional_template__$z = false;
|
|
645
645
|
/* style inject SSR */
|
|
646
646
|
|
|
647
647
|
/* style inject shadow dom */
|
|
648
648
|
|
|
649
649
|
|
|
650
650
|
|
|
651
|
-
const __vue_component__$
|
|
652
|
-
{ render: __vue_render__$
|
|
653
|
-
__vue_inject_styles__$
|
|
654
|
-
__vue_script__$
|
|
655
|
-
__vue_scope_id__$
|
|
656
|
-
__vue_is_functional_template__$
|
|
657
|
-
__vue_module_identifier__$
|
|
651
|
+
const __vue_component__$z = /*#__PURE__*/normalizeComponent(
|
|
652
|
+
{ render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
|
|
653
|
+
__vue_inject_styles__$z,
|
|
654
|
+
__vue_script__$z,
|
|
655
|
+
__vue_scope_id__$z,
|
|
656
|
+
__vue_is_functional_template__$z,
|
|
657
|
+
__vue_module_identifier__$z,
|
|
658
658
|
false,
|
|
659
659
|
createInjector,
|
|
660
660
|
undefined,
|
|
661
661
|
undefined
|
|
662
662
|
);
|
|
663
663
|
|
|
664
|
-
__vue_component__$
|
|
664
|
+
__vue_component__$z.install = Vue => Vue.component(__vue_component__$z.name, __vue_component__$z);
|
|
665
665
|
|
|
666
666
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
667
667
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
@@ -1365,6 +1365,7 @@ const PAGE_STATUS = {
|
|
|
1365
1365
|
const RESERVE_EVENT_NAMES = {
|
|
1366
1366
|
//global event
|
|
1367
1367
|
INIT: 'init',
|
|
1368
|
+
WATCH: 'watch',
|
|
1368
1369
|
//form event
|
|
1369
1370
|
WATCH_FORM_STATUS: 'watch-form-status',
|
|
1370
1371
|
INIT_FORM: 'init-form'
|
|
@@ -1379,7 +1380,7 @@ const parseFieldMap = (fieldMap = {}, dataSource = {}) => {
|
|
|
1379
1380
|
|
|
1380
1381
|
//
|
|
1381
1382
|
const MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002';
|
|
1382
|
-
var script$
|
|
1383
|
+
var script$y = {
|
|
1383
1384
|
props: {
|
|
1384
1385
|
record: {
|
|
1385
1386
|
type: Object
|
|
@@ -1457,10 +1458,11 @@ var script$x = {
|
|
|
1457
1458
|
//TODO generate event by special rule
|
|
1458
1459
|
const {
|
|
1459
1460
|
eventName,
|
|
1460
|
-
value
|
|
1461
|
+
value,
|
|
1462
|
+
key
|
|
1461
1463
|
} = props;
|
|
1462
1464
|
this.$emit(eventName, {
|
|
1463
|
-
key: value,
|
|
1465
|
+
key: value || key,
|
|
1464
1466
|
record: this.record,
|
|
1465
1467
|
builtInMethods: this.builtInMethods,
|
|
1466
1468
|
exposed: this.builtInMethods
|
|
@@ -1505,10 +1507,10 @@ var script$x = {
|
|
|
1505
1507
|
};
|
|
1506
1508
|
|
|
1507
1509
|
/* script */
|
|
1508
|
-
const __vue_script__$
|
|
1510
|
+
const __vue_script__$y = script$y;
|
|
1509
1511
|
|
|
1510
1512
|
/* template */
|
|
1511
|
-
var __vue_render__$
|
|
1513
|
+
var __vue_render__$y = function () {
|
|
1512
1514
|
var _vm = this;
|
|
1513
1515
|
var _h = _vm.$createElement;
|
|
1514
1516
|
var _c = _vm._self._c || _h;
|
|
@@ -1534,6 +1536,31 @@ var __vue_render__$x = function () {
|
|
|
1534
1536
|
[_vm._v(_vm._s(item.label))]
|
|
1535
1537
|
),
|
|
1536
1538
|
]
|
|
1539
|
+
: item.type == "confirm"
|
|
1540
|
+
? [
|
|
1541
|
+
_c(
|
|
1542
|
+
"div",
|
|
1543
|
+
[
|
|
1544
|
+
_c(
|
|
1545
|
+
"a-popconfirm",
|
|
1546
|
+
{
|
|
1547
|
+
attrs: { title: item.message },
|
|
1548
|
+
on: {
|
|
1549
|
+
confirm: function ($event) {
|
|
1550
|
+
return _vm.handleClickConfirm(item)
|
|
1551
|
+
},
|
|
1552
|
+
},
|
|
1553
|
+
},
|
|
1554
|
+
[
|
|
1555
|
+
_vm._v(
|
|
1556
|
+
"\n " + _vm._s(item.label) + "\n "
|
|
1557
|
+
),
|
|
1558
|
+
]
|
|
1559
|
+
),
|
|
1560
|
+
],
|
|
1561
|
+
1
|
|
1562
|
+
),
|
|
1563
|
+
]
|
|
1537
1564
|
: item.type == "dropdown"
|
|
1538
1565
|
? [
|
|
1539
1566
|
_c(
|
|
@@ -1648,34 +1675,34 @@ var __vue_render__$x = function () {
|
|
|
1648
1675
|
0
|
|
1649
1676
|
)
|
|
1650
1677
|
};
|
|
1651
|
-
var __vue_staticRenderFns__$
|
|
1652
|
-
__vue_render__$
|
|
1678
|
+
var __vue_staticRenderFns__$y = [];
|
|
1679
|
+
__vue_render__$y._withStripped = true;
|
|
1653
1680
|
|
|
1654
1681
|
/* style */
|
|
1655
|
-
const __vue_inject_styles__$
|
|
1682
|
+
const __vue_inject_styles__$y = function (inject) {
|
|
1656
1683
|
if (!inject) return
|
|
1657
|
-
inject("data-v-
|
|
1684
|
+
inject("data-v-3fafa38c_0", { source: ".g-table__action[data-v-3fafa38c] {\n display: flex;\n flex-direction: row;\n}\n.g-table__action .table-action__item[data-v-3fafa38c] {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n}\n.g-table__action .table-action__item[data-v-3fafa38c]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=action.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/table/src/action.vue","action.vue"],"names":[],"mappings":"AA8JA;EACA,aAAA;EACA,mBAAA;AC7JA;AD8JA;EACA,eAAA;EACA,cAAA;EACA,iBAAA;EACA,eAAA;AC5JA;AD6JA;EACA,cAAA;AC3JA;;AAEA,qCAAqC","file":"action.vue","sourcesContent":["<template>\n <div class=\"g-table__action\">\n <div class=\"table-action__item\" v-for=\"(item, idx) in execOperationExpression(dataSource)\" :key=\"idx\">\n <template v-if=\"item.type == 'text'\">\n <span @click=\"handleClickText(item)\">{{ item.label }}</span>\n </template>\n <template v-else-if=\"item.type == 'confirm'\">\n <div>\n <a-popconfirm :title=\"item.message\" @confirm=\"handleClickConfirm(item)\">\n {{ item.label }}\n </a-popconfirm>\n </div>\n </template>\n <template v-else-if=\"item.type == 'dropdown'\">\n <a-dropdown>\n <a-menu slot=\"overlay\" @click=\"handleDropdownClick\">\n <a-menu-item :key=\"`${item.key || ''}${menuKeyDelimiter}${opt.value || ''}`\" v-for=\"opt in execOperationExpression(item.optionList)\">\n <template v-if=\"opt.type == 'confirm'\">\n <a-popconfirm :title=\"opt.message\" @confirm=\"handleClickConfirm(opt)\">\n {{ opt.label }}\n </a-popconfirm>\n </template>\n <template v-if=\"opt.type == 'modal-confirm'\">\n <div style=\"width: 100%\" @click=\"handleClickModalConfirm(opt)\">{{ opt.label }}</div>\n <ele-modal-confirm v-bind=\"opt.modalConfirm\" v-on=\"$listeners\" v-model=\"showModalConfirm\"></ele-modal-confirm>\n </template>\n <template v-else>\n {{ opt.label }}\n </template>\n </a-menu-item>\n </a-menu>\n <span>{{ item.label }}</span>\n </a-dropdown>\n </template>\n </div>\n </div>\n</template>\n\n<script>\nimport { v5 as uuidv5 } from 'uuid'\nimport { type, route } from '@idooel/shared'\nimport { parse } from '@idooel/expression'\nimport { CONTEXT } from '../../utils'\nconst MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002'\nexport default {\n props: {\n record: {\n type: Object\n },\n dataSource: {\n type: Array,\n default: () => []\n }\n },\n inject: {\n requestTreeData: {\n default: void 0\n },\n requestTableData: {\n default: void 0\n }\n },\n data() {\n return {\n showModalConfirm: false\n }\n },\n provide () {\n return {\n [CONTEXT]: () => {\n return {\n _route: this.$route.query,\n _routeMeta: this.$route.meta,\n exposed: this.builtInMethods,\n ...this.record\n }\n }\n }\n },\n computed: {\n menuKeyDelimiter () {\n return uuidv5('_', MENU_KEY_NAMESPACE)\n },\n builtInMethods () {\n return { \n requestTreeData: this.requestTreeData, \n requestTableData: this.requestTableData,\n closeModalConfirm: this.closeModalConfirm,\n showModalConfirm: this.handleClickModalConfirm\n }\n }\n },\n methods: {\n closeModalConfirm () {\n this.showModalConfirm = false\n },\n handleClickModalConfirm () {\n this.showModalConfirm = true\n },\n execOperationExpression (dataSource = []) {\n const ret = dataSource.map(item => {\n const { show } = item\n if (type.isUndefined(show)) {\n return item\n } else if (type.isBool(show)) {\n if (show) return item\n } else if (type.isStr(show)) {\n const parseRet = parse(show, { \n ...this.record, \n _route: route.searchToQueryParams(window.location.search) \n })\n if (parseRet) return item\n }\n }).filter(item => item)\n return ret\n },\n handleClickConfirm (props) {\n //TODO generate event by special rule\n const { eventName, value, key } = props\n this.$emit(eventName, { \n key: value || key, \n record: this.record,\n builtInMethods: this.builtInMethods,\n exposed: this.builtInMethods\n })\n },\n handleDropdownClick (props) {\n const { key } = props\n const [parent, child] = key.split(this.menuKeyDelimiter)\n if (!parent || !child) {\n throw new Error('key is required')\n }\n const currentDropdown = this.dataSource.find(item => item.key === parent)\n const currentClickTarget = currentDropdown.optionList.find(item => item.value === child)\n const { eventName, type } = currentClickTarget\n //TODO generate event by special rule\n if (type === 'confirm' || type === 'modal-confirm') return\n this.$emit(eventName, { \n key: child, \n record: this.record, \n builtInMethods: this.builtInMethods,\n exposed: this.builtInMethods\n })\n },\n handleClickText (props) {\n const { eventName, key } = props\n this.$emit(eventName, { \n key, \n record: this.record, \n builtInMethods: this.builtInMethods,\n exposed: this.builtInMethods\n })\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-table__action {\n display: flex;\n flex-direction: row;\n .table-action__item {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n &:first-child {\n margin-left: 0;\n }\n }\n}\n</style>",".g-table__action {\n display: flex;\n flex-direction: row;\n}\n.g-table__action .table-action__item {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n}\n.g-table__action .table-action__item:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=action.vue.map */"]}, media: undefined });
|
|
1658
1685
|
|
|
1659
1686
|
};
|
|
1660
1687
|
/* scoped */
|
|
1661
|
-
const __vue_scope_id__$
|
|
1688
|
+
const __vue_scope_id__$y = "data-v-3fafa38c";
|
|
1662
1689
|
/* module identifier */
|
|
1663
|
-
const __vue_module_identifier__$
|
|
1690
|
+
const __vue_module_identifier__$y = undefined;
|
|
1664
1691
|
/* functional template */
|
|
1665
|
-
const __vue_is_functional_template__$
|
|
1692
|
+
const __vue_is_functional_template__$y = false;
|
|
1666
1693
|
/* style inject SSR */
|
|
1667
1694
|
|
|
1668
1695
|
/* style inject shadow dom */
|
|
1669
1696
|
|
|
1670
1697
|
|
|
1671
1698
|
|
|
1672
|
-
const __vue_component__$
|
|
1673
|
-
{ render: __vue_render__$
|
|
1674
|
-
__vue_inject_styles__$
|
|
1675
|
-
__vue_script__$
|
|
1676
|
-
__vue_scope_id__$
|
|
1677
|
-
__vue_is_functional_template__$
|
|
1678
|
-
__vue_module_identifier__$
|
|
1699
|
+
const __vue_component__$y = /*#__PURE__*/normalizeComponent(
|
|
1700
|
+
{ render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
|
|
1701
|
+
__vue_inject_styles__$y,
|
|
1702
|
+
__vue_script__$y,
|
|
1703
|
+
__vue_scope_id__$y,
|
|
1704
|
+
__vue_is_functional_template__$y,
|
|
1705
|
+
__vue_module_identifier__$y,
|
|
1679
1706
|
false,
|
|
1680
1707
|
createInjector,
|
|
1681
1708
|
undefined,
|
|
@@ -1683,10 +1710,10 @@ __vue_render__$x._withStripped = true;
|
|
|
1683
1710
|
);
|
|
1684
1711
|
|
|
1685
1712
|
//
|
|
1686
|
-
var script$
|
|
1713
|
+
var script$x = {
|
|
1687
1714
|
name: 'ele-table',
|
|
1688
1715
|
components: {
|
|
1689
|
-
Actions: __vue_component__$
|
|
1716
|
+
Actions: __vue_component__$y
|
|
1690
1717
|
},
|
|
1691
1718
|
props: {
|
|
1692
1719
|
// ant table wrapper
|
|
@@ -1768,9 +1795,9 @@ var script$w = {
|
|
|
1768
1795
|
getScrollHeightByHeight() {
|
|
1769
1796
|
const height = this.height - this.tableHeaderHeight - this.paginationHeight;
|
|
1770
1797
|
if (height > this.tableTbodyHeight) {
|
|
1771
|
-
document.querySelector('.ant-table-content').style.height = 'inherit';
|
|
1772
|
-
document.querySelector('.ant-table-scroll').style.height = 'inherit';
|
|
1773
|
-
document.querySelector('.ant-table-body').style.height = 'inherit';
|
|
1798
|
+
document.querySelector('.ant-table-content') && (document.querySelector('.ant-table-content').style.height = 'inherit');
|
|
1799
|
+
document.querySelector('.ant-table-scroll') && (document.querySelector('.ant-table-scroll').style.height = 'inherit');
|
|
1800
|
+
document.querySelector('.ant-table-body') && (document.querySelector('.ant-table-body').style.height = 'inherit');
|
|
1774
1801
|
if (this.tableTbodyHeight > height) {
|
|
1775
1802
|
document.querySelector('.ant-table-content').style.height = 'auto';
|
|
1776
1803
|
document.querySelector('.ant-table-scroll').style.height = 'auto';
|
|
@@ -1869,10 +1896,10 @@ var script$w = {
|
|
|
1869
1896
|
};
|
|
1870
1897
|
|
|
1871
1898
|
/* script */
|
|
1872
|
-
const __vue_script__$
|
|
1899
|
+
const __vue_script__$x = script$x;
|
|
1873
1900
|
|
|
1874
1901
|
/* template */
|
|
1875
|
-
var __vue_render__$
|
|
1902
|
+
var __vue_render__$x = function () {
|
|
1876
1903
|
var _vm = this;
|
|
1877
1904
|
var _h = _vm.$createElement;
|
|
1878
1905
|
var _c = _vm._self._c || _h;
|
|
@@ -1938,41 +1965,41 @@ var __vue_render__$w = function () {
|
|
|
1938
1965
|
1
|
|
1939
1966
|
)
|
|
1940
1967
|
};
|
|
1941
|
-
var __vue_staticRenderFns__$
|
|
1942
|
-
__vue_render__$
|
|
1968
|
+
var __vue_staticRenderFns__$x = [];
|
|
1969
|
+
__vue_render__$x._withStripped = true;
|
|
1943
1970
|
|
|
1944
1971
|
/* style */
|
|
1945
|
-
const __vue_inject_styles__$
|
|
1972
|
+
const __vue_inject_styles__$x = function (inject) {
|
|
1946
1973
|
if (!inject) return
|
|
1947
|
-
inject("data-v-7a00ac8d_0", { source: ".g-table__wrapper[data-v-7a00ac8d] {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-spin-nested-loading {\n height: inherit;\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-spin-nested-loading .ant-table-fixed-header .ant-table-body-inner {\n overflow: hidden;\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-spin-nested-loading .ant-spin-container {\n height: inherit;\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-spin-nested-loading .ant-spin-container .ant-table {\n height: inherit;\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table-tbody tr td {\n border-color: var(--idooel-column-border-color);\n border-width: calc(var(--idooel-column-border-width) * 1px);\n border-style: solid;\n border-top: unset;\n border-left: unset;\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table-fixed-left {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table-fixed-left .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table-fixed-left .ant-table-body-inner {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-style: solid;\n border-right-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table-fixed-left .ant-table-fixed {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-color: var(--idooel-border-color);\n border-right-style: solid;\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table-fixed-right .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-color: var(--idooel-border-color);\n border-bottom-style: solid;\n}\n.g-table__wrapper[data-v-7a00ac8d] .ant-table-wrapper .ant-table-fixed-right .ant-table-fixed {\n border-left-width: calc(var(--idooel-border-width) * 1px);\n border-left-style: solid;\n border-left-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-7a00ac8d] .g-table__row--even {\n background: var(--idooel-row-even-color);\n}\n.g-table__wrapper .g-table__row--odd[data-v-7a00ac8d] {\n background: var(--idooel-row-odd-color);\n}\n.g-table__wrapper .g-table__pagination[data-v-7a00ac8d] {\n display: flex;\n flex-direction: row;\n justify-content: end;\n border-width: calc(var(--idooel-border-width) * 1px);\n border-color: var(--idooel-border-color);\n border-style: solid;\n border-top: unset;\n padding-top: 8px;\n padding-bottom: 8px;\n position: relative;\n z-index: 9999;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/table/src/index.vue","index.vue"],"names":[],"mappings":"AAiNA;EAuFA,aAAA;EACA,kBAAA;ACtSA;AD+MA;EACA,eAAA;AC7MA;AD+MA;EACA,gBAAA;AC7MA;ADgNA;EACA,eAAA;AC9MA;AD+MA;EACA,eAAA;AC7MA;AD2NA;EACA,oDAAA;EACA,mBAAA;EACA,wCAAA;ACzNA;AD4NA;EACA,iDAAA;AC1NA;AD+NA;EACA,+CAAA;EACA,2DAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;AC7NA;ADsOA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;ACpOA;ADqOA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;ACnOA;ADqOA;EACA,0DAAA;EACA,yBAAA;EACA,8CAAA;ACnOA;ADqOA;EACA,0DAAA;EACA,8CAAA;EACA,yBAAA;ACnOA;ADuOA;EACA,2DAAA;EACA,+CAAA;EACA,0BAAA;ACrOA;AD0OA;EACA,yDAAA;EACA,wBAAA;EACA,6CAAA;ACxOA;AD8OA;EACA,wCAAA;AC5OA;AD8OA;EACA,uCAAA;AC5OA;AD8OA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;EACA,oDAAA;EACA,wCAAA;EACA,mBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,kBAAA;EACA,aAAA;AC5OA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"g-table__wrapper\" :style=\"{ height: `${height}px` }\">\n <a-table\n :class=\"[isNoData && 'g-table__no-data']\"\n :style=\"{ height: noDataAntTableHeight }\"\n :pagination=\"false\"\n :loading=\"loading\"\n :columns=\"innerColumns\"\n :row-selection=\"rowSelection\"\n :row-class-name=\"setRowClassName\"\n :data-source=\"dataSource\"\n :scroll=\"getScroll\">\n <template slot=\"action\" slot-scope=\"record\">\n <Actions v-on=\"$listeners\" :data-source=\"actions\" :record=\"record\"></Actions>\n </template>\n </a-table>\n <div class=\"g-table__pagination\">\n <a-pagination\n :show-total=\"all => `共 ${all} 条数据`\"\n show-size-changer \n show-quick-jumper\n :pageSize=\"innerPageSize\"\n :current=\"innerCurrentPage\"\n :pageSizeOptions=\"pageSizeOptions\"\n @change=\"onChangePagination\"\n @showSizeChange=\"onShowSizeChange\"\n :total=\"total\">\n </a-pagination>\n </div>\n </div>\n</template>\n\n<script>\nimport Actions from './action.vue'\nexport default {\n name: 'ele-table',\n components: {\n Actions\n },\n props: {\n // ant table wrapper\n height: {\n type: Number\n },\n width: {\n type: Number\n },\n x: {\n type: Number,\n default: 1200\n },\n y: {\n type: Number,\n default: 200\n },\n scroll: {\n type: Object\n },\n rowSelection: {\n type: Object\n },\n actions: {\n type: Array,\n default: () => []\n },\n total: {\n type: Number,\n default: 0\n },\n loading: {\n type: Boolean,\n default: false\n },\n columns: {\n type: Array,\n default: () => []\n },\n dataSource: {\n type: Array,\n default: () => []\n },\n pageSize: {\n type: Number,\n default: 10\n },\n pageSizeOptions: {\n type: Array,\n default: () => ['10', '20', '30', '40']\n }\n },\n data() {\n return {\n tableHeaderHeight: 0,\n paginationHeight: 0,\n innerPageSize: 10,\n innerCurrentPage: 1,\n tableContentHeight: 0,\n obs: [],\n tableTbodyHeight: 0\n }\n },\n computed: {\n innerColumns () {\n return this.columns.filter(col => !Object.keys(col).includes('multiple'))\n },\n isNoData () {\n return !this.dataSource.length\n },\n noDataAntTableHeight () {\n //TODO\n if (this.dataSource.length) {\n // return 'auto'\n return `${this.height - this.paginationHeight - 16}px` \n }\n return `${this.height - this.paginationHeight - 16}px` \n },\n getScrollHeightByHeight () {\n const height = this.height - this.tableHeaderHeight - this.paginationHeight\n if (height > this.tableTbodyHeight) {\n document.querySelector('.ant-table-content').style.height = 'inherit'\n document.querySelector('.ant-table-scroll').style.height = 'inherit'\n document.querySelector('.ant-table-body').style.height = 'inherit'\n if (this.tableTbodyHeight > height) {\n document.querySelector('.ant-table-content').style.height = 'auto'\n document.querySelector('.ant-table-scroll').style.height = 'auto'\n document.querySelector('.ant-table-body').style.height = 'auto'\n }\n // 0的时候没有y滚动条\n return 0\n }\n return this.height - this.tableHeaderHeight - this.paginationHeight\n },\n isFlexColumn () {\n return this.columns.every(col => !col.width)\n },\n getScroll () {\n if (this.scroll) {\n return this.scroll\n } else {\n if (this.height) {\n return { x: this.isFlexColumn ? 0 : this.width > this.x ? 0 : this.x, y: this.getScrollHeightByHeight }\n }\n return { x: this.isFlexColumn ? 0 : this.width > this.x ? 0 : this.x, y: this.y }\n }\n }\n },\n watch: {\n pageSize: {\n handler (pageSize) {\n this.innerPageSize = pageSize\n },\n immediate: true\n }\n },\n methods: {\n onShowSizeChange (current, pageSize) {\n this.innerCurrentPage = current\n this.innerPageSize = pageSize\n this.$emit('change-page', current, pageSize)\n },\n setPaginationHeight () {\n this.$nextTick(() => {\n const { height } = document.querySelector('.g-table__pagination').getBoundingClientRect()\n this.paginationHeight = height\n })\n },\n setTableHeaderHeight () {\n this.$nextTick(() => {\n const el = document.querySelector('.ant-table-header')\n if (!el) return\n const { height } = el.getBoundingClientRect()\n this.tableHeaderHeight = height\n })\n },\n setTableTbodyHeight () {\n const el = document.querySelector('.ant-table-tbody')\n const ob = new ResizeObserver((entries => {\n if (this.tableHeaderHeight) return\n for (const _ of entries) {\n requestAnimationFrame(() => {\n const { height } = el.getBoundingClientRect()\n this.tableTbodyHeight = height\n this.setTableHeaderHeight()\n })\n }\n }))\n ob.observe(el)\n this.obs.push(ob)\n },\n setRowClassName (record, idx) {\n return idx % 2 === 0 ? 'g-table__row--even' : 'g-table__row--odd'\n },\n onChangePagination (page, pageSize) {\n this.innerCurrentPage = page\n this.innerPageSize = pageSize\n this.$emit('change-page', page, pageSize)\n }\n },\n mounted() {\n this.setTableTbodyHeight()\n this.setPaginationHeight()\n },\n destroyed () {\n this.obs.forEach(ob => ob.disconnect())\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-table__wrapper {\n ::v-deep .ant-spin-nested-loading {\n height: inherit;\n .ant-table-fixed-header {\n .ant-table-body-inner {\n overflow: hidden;\n }\n }\n .ant-spin-container {\n height: inherit;\n .ant-table {\n height: inherit;\n .ant-table-content {\n // height: inherit;\n // .ant-table-scroll {\n // height: inherit;\n // .ant-table-body {\n // height: inherit;\n // }\n // }\n }\n }\n }\n }\n ::v-deep .ant-table-wrapper {\n .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n }\n .ant-table-header {\n .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n }\n }\n .ant-table-tbody {\n tr {\n td {\n border-color: var(--idooel-column-border-color);\n border-width: calc(var(--idooel-column-border-width) * 1px);;\n border-style: solid;\n border-top: unset;\n border-left: unset;\n }\n }\n }\n .ant-table-body {\n // border-top-width: calc(var(--idooel-border-width) * 1px);\n // border-top-style: solid;\n // border-top-color: var(--idooel-border-color);\n }\n .ant-table-fixed-left {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n }\n .ant-table-body-inner {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-style: solid;\n border-right-color: var(--idooel-border-color);\n }\n .ant-table-fixed {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-color: var(--idooel-border-color);\n border-right-style: solid;\n }\n }\n .ant-table-fixed-right {\n .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-color: var(--idooel-border-color);\n border-bottom-style: solid;\n }\n // border-bottom-width: calc(var(--idooel-border-width) * 1px);\n // border-bottom-style: solid;\n // border-bottom-color: var(--idooel-border-color);\n .ant-table-fixed {\n border-left-width: calc(var(--idooel-border-width) * 1px);\n border-left-style: solid;\n border-left-color: var(--idooel-border-color);\n }\n }\n }\n padding: 16px;\n padding-top: unset;\n ::v-deep .g-table__row--even {\n background: var(--idooel-row-even-color);\n }\n .g-table__row--odd {\n background: var(--idooel-row-odd-color);\n }\n .g-table__pagination {\n display: flex;\n flex-direction: row;\n justify-content: end;\n border-width: calc(var(--idooel-border-width) * 1px);\n border-color: var(--idooel-border-color);\n border-style: solid;\n border-top: unset;\n padding-top: 8px;\n padding-bottom: 8px;\n position: relative;\n z-index: 9999;\n }\n}\n</style>",".g-table__wrapper {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-table-fixed-header .ant-table-body-inner {\n overflow: hidden;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-spin-container {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-spin-container .ant-table {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-tbody tr td {\n border-color: var(--idooel-column-border-color);\n border-width: calc(var(--idooel-column-border-width) * 1px);\n border-style: solid;\n border-top: unset;\n border-left: unset;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-body-inner {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-style: solid;\n border-right-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-fixed {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-color: var(--idooel-border-color);\n border-right-style: solid;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-right .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-color: var(--idooel-border-color);\n border-bottom-style: solid;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-right .ant-table-fixed {\n border-left-width: calc(var(--idooel-border-width) * 1px);\n border-left-style: solid;\n border-left-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .g-table__row--even {\n background: var(--idooel-row-even-color);\n}\n.g-table__wrapper .g-table__row--odd {\n background: var(--idooel-row-odd-color);\n}\n.g-table__wrapper .g-table__pagination {\n display: flex;\n flex-direction: row;\n justify-content: end;\n border-width: calc(var(--idooel-border-width) * 1px);\n border-color: var(--idooel-border-color);\n border-style: solid;\n border-top: unset;\n padding-top: 8px;\n padding-bottom: 8px;\n position: relative;\n z-index: 9999;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
1974
|
+
inject("data-v-1de938d1_0", { source: ".g-table__wrapper[data-v-1de938d1] {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper[data-v-1de938d1] .ant-spin-nested-loading {\n height: inherit;\n}\n.g-table__wrapper[data-v-1de938d1] .ant-spin-nested-loading .ant-table-fixed-header .ant-table-body-inner {\n overflow: hidden;\n}\n.g-table__wrapper[data-v-1de938d1] .ant-spin-nested-loading .ant-spin-container {\n height: inherit;\n}\n.g-table__wrapper[data-v-1de938d1] .ant-spin-nested-loading .ant-spin-container .ant-table {\n height: inherit;\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table-tbody tr td {\n border-color: var(--idooel-column-border-color);\n border-width: calc(var(--idooel-column-border-width) * 1px);\n border-style: solid;\n border-top: unset;\n border-left: unset;\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table-fixed-left {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table-fixed-left .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table-fixed-left .ant-table-body-inner {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-style: solid;\n border-right-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table-fixed-left .ant-table-fixed {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-color: var(--idooel-border-color);\n border-right-style: solid;\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table-fixed-right .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-color: var(--idooel-border-color);\n border-bottom-style: solid;\n}\n.g-table__wrapper[data-v-1de938d1] .ant-table-wrapper .ant-table-fixed-right .ant-table-fixed {\n border-left-width: calc(var(--idooel-border-width) * 1px);\n border-left-style: solid;\n border-left-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-1de938d1] .g-table__row--even {\n background: var(--idooel-row-even-color);\n}\n.g-table__wrapper .g-table__row--odd[data-v-1de938d1] {\n background: var(--idooel-row-odd-color);\n}\n.g-table__wrapper .g-table__pagination[data-v-1de938d1] {\n display: flex;\n flex-direction: row;\n justify-content: end;\n border-width: calc(var(--idooel-border-width) * 1px);\n border-color: var(--idooel-border-color);\n border-style: solid;\n border-top: unset;\n padding-top: 8px;\n padding-bottom: 8px;\n position: relative;\n z-index: 999;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/table/src/index.vue","index.vue"],"names":[],"mappings":"AAiNA;EAuFA,aAAA;EACA,kBAAA;ACtSA;AD+MA;EACA,eAAA;AC7MA;AD+MA;EACA,gBAAA;AC7MA;ADgNA;EACA,eAAA;AC9MA;AD+MA;EACA,eAAA;AC7MA;AD2NA;EACA,oDAAA;EACA,mBAAA;EACA,wCAAA;ACzNA;AD4NA;EACA,iDAAA;AC1NA;AD+NA;EACA,+CAAA;EACA,2DAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;AC7NA;ADsOA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;ACpOA;ADqOA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;ACnOA;ADqOA;EACA,0DAAA;EACA,yBAAA;EACA,8CAAA;ACnOA;ADqOA;EACA,0DAAA;EACA,8CAAA;EACA,yBAAA;ACnOA;ADuOA;EACA,2DAAA;EACA,+CAAA;EACA,0BAAA;ACrOA;AD0OA;EACA,yDAAA;EACA,wBAAA;EACA,6CAAA;ACxOA;AD8OA;EACA,wCAAA;AC5OA;AD8OA;EACA,uCAAA;AC5OA;AD8OA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;EACA,oDAAA;EACA,wCAAA;EACA,mBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,kBAAA;EACA,YAAA;AC5OA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"g-table__wrapper\" :style=\"{ height: `${height}px` }\">\n <a-table\n :class=\"[isNoData && 'g-table__no-data']\"\n :style=\"{ height: noDataAntTableHeight }\"\n :pagination=\"false\"\n :loading=\"loading\"\n :columns=\"innerColumns\"\n :row-selection=\"rowSelection\"\n :row-class-name=\"setRowClassName\"\n :data-source=\"dataSource\"\n :scroll=\"getScroll\">\n <template slot=\"action\" slot-scope=\"record\">\n <Actions v-on=\"$listeners\" :data-source=\"actions\" :record=\"record\"></Actions>\n </template>\n </a-table>\n <div class=\"g-table__pagination\">\n <a-pagination\n :show-total=\"all => `共 ${all} 条数据`\"\n show-size-changer \n show-quick-jumper\n :pageSize=\"innerPageSize\"\n :current=\"innerCurrentPage\"\n :pageSizeOptions=\"pageSizeOptions\"\n @change=\"onChangePagination\"\n @showSizeChange=\"onShowSizeChange\"\n :total=\"total\">\n </a-pagination>\n </div>\n </div>\n</template>\n\n<script>\nimport Actions from './action.vue'\nexport default {\n name: 'ele-table',\n components: {\n Actions\n },\n props: {\n // ant table wrapper\n height: {\n type: Number\n },\n width: {\n type: Number\n },\n x: {\n type: Number,\n default: 1200\n },\n y: {\n type: Number,\n default: 200\n },\n scroll: {\n type: Object\n },\n rowSelection: {\n type: Object\n },\n actions: {\n type: Array,\n default: () => []\n },\n total: {\n type: Number,\n default: 0\n },\n loading: {\n type: Boolean,\n default: false\n },\n columns: {\n type: Array,\n default: () => []\n },\n dataSource: {\n type: Array,\n default: () => []\n },\n pageSize: {\n type: Number,\n default: 10\n },\n pageSizeOptions: {\n type: Array,\n default: () => ['10', '20', '30', '40']\n }\n },\n data() {\n return {\n tableHeaderHeight: 0,\n paginationHeight: 0,\n innerPageSize: 10,\n innerCurrentPage: 1,\n tableContentHeight: 0,\n obs: [],\n tableTbodyHeight: 0\n }\n },\n computed: {\n innerColumns () {\n return this.columns.filter(col => !Object.keys(col).includes('multiple'))\n },\n isNoData () {\n return !this.dataSource.length\n },\n noDataAntTableHeight () {\n //TODO\n if (this.dataSource.length) {\n // return 'auto'\n return `${this.height - this.paginationHeight - 16}px` \n }\n return `${this.height - this.paginationHeight - 16}px` \n },\n getScrollHeightByHeight () {\n const height = this.height - this.tableHeaderHeight - this.paginationHeight\n if (height > this.tableTbodyHeight) {\n document.querySelector('.ant-table-content') && (document.querySelector('.ant-table-content').style.height = 'inherit')\n document.querySelector('.ant-table-scroll') && (document.querySelector('.ant-table-scroll').style.height = 'inherit')\n document.querySelector('.ant-table-body') && (document.querySelector('.ant-table-body').style.height = 'inherit')\n if (this.tableTbodyHeight > height) {\n document.querySelector('.ant-table-content').style.height = 'auto'\n document.querySelector('.ant-table-scroll').style.height = 'auto'\n document.querySelector('.ant-table-body').style.height = 'auto'\n }\n // 0的时候没有y滚动条\n return 0\n }\n return this.height - this.tableHeaderHeight - this.paginationHeight\n },\n isFlexColumn () {\n return this.columns.every(col => !col.width)\n },\n getScroll () {\n if (this.scroll) {\n return this.scroll\n } else {\n if (this.height) {\n return { x: this.isFlexColumn ? 0 : this.width > this.x ? 0 : this.x, y: this.getScrollHeightByHeight }\n }\n return { x: this.isFlexColumn ? 0 : this.width > this.x ? 0 : this.x, y: this.y }\n }\n }\n },\n watch: {\n pageSize: {\n handler (pageSize) {\n this.innerPageSize = pageSize\n },\n immediate: true\n }\n },\n methods: {\n onShowSizeChange (current, pageSize) {\n this.innerCurrentPage = current\n this.innerPageSize = pageSize\n this.$emit('change-page', current, pageSize)\n },\n setPaginationHeight () {\n this.$nextTick(() => {\n const { height } = document.querySelector('.g-table__pagination').getBoundingClientRect()\n this.paginationHeight = height\n })\n },\n setTableHeaderHeight () {\n this.$nextTick(() => {\n const el = document.querySelector('.ant-table-header')\n if (!el) return\n const { height } = el.getBoundingClientRect()\n this.tableHeaderHeight = height\n })\n },\n setTableTbodyHeight () {\n const el = document.querySelector('.ant-table-tbody')\n const ob = new ResizeObserver((entries => {\n if (this.tableHeaderHeight) return\n for (const _ of entries) {\n requestAnimationFrame(() => {\n const { height } = el.getBoundingClientRect()\n this.tableTbodyHeight = height\n this.setTableHeaderHeight()\n })\n }\n }))\n ob.observe(el)\n this.obs.push(ob)\n },\n setRowClassName (record, idx) {\n return idx % 2 === 0 ? 'g-table__row--even' : 'g-table__row--odd'\n },\n onChangePagination (page, pageSize) {\n this.innerCurrentPage = page\n this.innerPageSize = pageSize\n this.$emit('change-page', page, pageSize)\n }\n },\n mounted() {\n this.setTableTbodyHeight()\n this.setPaginationHeight()\n },\n destroyed () {\n this.obs.forEach(ob => ob.disconnect())\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-table__wrapper {\n ::v-deep .ant-spin-nested-loading {\n height: inherit;\n .ant-table-fixed-header {\n .ant-table-body-inner {\n overflow: hidden;\n }\n }\n .ant-spin-container {\n height: inherit;\n .ant-table {\n height: inherit;\n .ant-table-content {\n // height: inherit;\n // .ant-table-scroll {\n // height: inherit;\n // .ant-table-body {\n // height: inherit;\n // }\n // }\n }\n }\n }\n }\n ::v-deep .ant-table-wrapper {\n .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n }\n .ant-table-header {\n .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n }\n }\n .ant-table-tbody {\n tr {\n td {\n border-color: var(--idooel-column-border-color);\n border-width: calc(var(--idooel-column-border-width) * 1px);;\n border-style: solid;\n border-top: unset;\n border-left: unset;\n }\n }\n }\n .ant-table-body {\n // border-top-width: calc(var(--idooel-border-width) * 1px);\n // border-top-style: solid;\n // border-top-color: var(--idooel-border-color);\n }\n .ant-table-fixed-left {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n }\n .ant-table-body-inner {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-style: solid;\n border-right-color: var(--idooel-border-color);\n }\n .ant-table-fixed {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-color: var(--idooel-border-color);\n border-right-style: solid;\n }\n }\n .ant-table-fixed-right {\n .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-color: var(--idooel-border-color);\n border-bottom-style: solid;\n }\n // border-bottom-width: calc(var(--idooel-border-width) * 1px);\n // border-bottom-style: solid;\n // border-bottom-color: var(--idooel-border-color);\n .ant-table-fixed {\n border-left-width: calc(var(--idooel-border-width) * 1px);\n border-left-style: solid;\n border-left-color: var(--idooel-border-color);\n }\n }\n }\n padding: 16px;\n padding-top: unset;\n ::v-deep .g-table__row--even {\n background: var(--idooel-row-even-color);\n }\n .g-table__row--odd {\n background: var(--idooel-row-odd-color);\n }\n .g-table__pagination {\n display: flex;\n flex-direction: row;\n justify-content: end;\n border-width: calc(var(--idooel-border-width) * 1px);\n border-color: var(--idooel-border-color);\n border-style: solid;\n border-top: unset;\n padding-top: 8px;\n padding-bottom: 8px;\n position: relative;\n z-index: 999;\n }\n}\n</style>",".g-table__wrapper {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-table-fixed-header .ant-table-body-inner {\n overflow: hidden;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-spin-container {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-spin-container .ant-table {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-tbody tr td {\n border-color: var(--idooel-column-border-color);\n border-width: calc(var(--idooel-column-border-width) * 1px);\n border-style: solid;\n border-top: unset;\n border-left: unset;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-body-inner {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-style: solid;\n border-right-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-fixed {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-color: var(--idooel-border-color);\n border-right-style: solid;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-right .ant-table-header {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-color: var(--idooel-border-color);\n border-bottom-style: solid;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-right .ant-table-fixed {\n border-left-width: calc(var(--idooel-border-width) * 1px);\n border-left-style: solid;\n border-left-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .g-table__row--even {\n background: var(--idooel-row-even-color);\n}\n.g-table__wrapper .g-table__row--odd {\n background: var(--idooel-row-odd-color);\n}\n.g-table__wrapper .g-table__pagination {\n display: flex;\n flex-direction: row;\n justify-content: end;\n border-width: calc(var(--idooel-border-width) * 1px);\n border-color: var(--idooel-border-color);\n border-style: solid;\n border-top: unset;\n padding-top: 8px;\n padding-bottom: 8px;\n position: relative;\n z-index: 999;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
1948
1975
|
|
|
1949
1976
|
};
|
|
1950
1977
|
/* scoped */
|
|
1951
|
-
const __vue_scope_id__$
|
|
1978
|
+
const __vue_scope_id__$x = "data-v-1de938d1";
|
|
1952
1979
|
/* module identifier */
|
|
1953
|
-
const __vue_module_identifier__$
|
|
1980
|
+
const __vue_module_identifier__$x = undefined;
|
|
1954
1981
|
/* functional template */
|
|
1955
|
-
const __vue_is_functional_template__$
|
|
1982
|
+
const __vue_is_functional_template__$x = false;
|
|
1956
1983
|
/* style inject SSR */
|
|
1957
1984
|
|
|
1958
1985
|
/* style inject shadow dom */
|
|
1959
1986
|
|
|
1960
1987
|
|
|
1961
1988
|
|
|
1962
|
-
const __vue_component__$
|
|
1963
|
-
{ render: __vue_render__$
|
|
1964
|
-
__vue_inject_styles__$
|
|
1965
|
-
__vue_script__$
|
|
1966
|
-
__vue_scope_id__$
|
|
1967
|
-
__vue_is_functional_template__$
|
|
1968
|
-
__vue_module_identifier__$
|
|
1989
|
+
const __vue_component__$x = /*#__PURE__*/normalizeComponent(
|
|
1990
|
+
{ render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
|
|
1991
|
+
__vue_inject_styles__$x,
|
|
1992
|
+
__vue_script__$x,
|
|
1993
|
+
__vue_scope_id__$x,
|
|
1994
|
+
__vue_is_functional_template__$x,
|
|
1995
|
+
__vue_module_identifier__$x,
|
|
1969
1996
|
false,
|
|
1970
1997
|
createInjector,
|
|
1971
1998
|
undefined,
|
|
1972
1999
|
undefined
|
|
1973
2000
|
);
|
|
1974
2001
|
|
|
1975
|
-
__vue_component__$
|
|
2002
|
+
__vue_component__$x.install = Vue => Vue.component(__vue_component__$x.name, __vue_component__$x);
|
|
1976
2003
|
|
|
1977
2004
|
//
|
|
1978
2005
|
//
|
|
@@ -2002,7 +2029,7 @@ __vue_component__$w.install = Vue => Vue.component(__vue_component__$w.name, __v
|
|
|
2002
2029
|
//
|
|
2003
2030
|
//
|
|
2004
2031
|
|
|
2005
|
-
var script$
|
|
2032
|
+
var script$w = {
|
|
2006
2033
|
name: 'ele-tree',
|
|
2007
2034
|
props: {
|
|
2008
2035
|
treeData: {
|
|
@@ -2063,10 +2090,10 @@ var script$v = {
|
|
|
2063
2090
|
};
|
|
2064
2091
|
|
|
2065
2092
|
/* script */
|
|
2066
|
-
const __vue_script__$
|
|
2093
|
+
const __vue_script__$w = script$w;
|
|
2067
2094
|
|
|
2068
2095
|
/* template */
|
|
2069
|
-
var __vue_render__$
|
|
2096
|
+
var __vue_render__$w = function () {
|
|
2070
2097
|
var _vm = this;
|
|
2071
2098
|
var _h = _vm.$createElement;
|
|
2072
2099
|
var _c = _vm._self._c || _h;
|
|
@@ -2137,49 +2164,53 @@ var __vue_render__$v = function () {
|
|
|
2137
2164
|
1
|
|
2138
2165
|
)
|
|
2139
2166
|
};
|
|
2140
|
-
var __vue_staticRenderFns__$
|
|
2141
|
-
__vue_render__$
|
|
2167
|
+
var __vue_staticRenderFns__$w = [];
|
|
2168
|
+
__vue_render__$w._withStripped = true;
|
|
2142
2169
|
|
|
2143
2170
|
/* style */
|
|
2144
|
-
const __vue_inject_styles__$
|
|
2171
|
+
const __vue_inject_styles__$w = function (inject) {
|
|
2145
2172
|
if (!inject) return
|
|
2146
2173
|
inject("data-v-a7a27de8_0", { source: ".g-tree__wrapper[data-v-a7a27de8] {\n overflow: hidden;\n}\n.g-tree__wrapper[data-v-a7a27de8] .ant-tree .ant-tree-node-content-wrapper {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.g-tree__wrapper[data-v-a7a27de8] .ant-tree .ant-tree-node-selected {\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/tree/src/index.vue","index.vue"],"names":[],"mappings":"AAwFA;EACA,gBAAA;ACvFA;ADyFA;EACA,uBAAA;EACA,gBAAA;EACA,mBAAA;ACvFA;ADyFA;EACA,WAAA;ACvFA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"g-tree__wrapper\">\n <a-tree\n v-if=\"innerTreeData.length\"\n :tree-data=\"innerTreeData\"\n :checkable=\"checkable\"\n @select=\"selectTreeNode\"\n @check=\"checkTreeNode\"\n :replaceFields=\"replaceFields\"\n :default-expanded-keys=\"defaultExpandedKeys\"\n :default-selected-keys=\"defaultSelectedKeys\"\n :show-line=\"showLine\"\n blockNode \n :show-icon=\"showIcon\">\n <a-icon v-if=\"switcherIcon\" slot=\"switcherIcon\" :type=\"switcherIcon\" />\n <template #title=\"{ title }\">\n <span :title=\"title\" class=\"tree-node__title\">\n {{ title }}\n </span>\n </template>\n <template slot=\"custom\" slot-scope=\"{ scopedSlots }\">\n <a-icon :type=\"scopedSlots.iconName\"></a-icon>\n </template>\n </a-tree>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-tree',\n props: {\n treeData: {\n type: Array,\n default: () => []\n },\n showLine: {\n type: Boolean,\n default: false\n },\n switcherIcon: {\n type: String\n },\n checkable: {\n type: Boolean,\n default: false\n },\n replaceFields: {\n type: Object,\n default: () => ({\n title: 'title',\n key: 'id',\n children: 'children'\n })\n },\n defaultExpandedKeys: {\n type: Array\n },\n defaultSelectedKeys: {\n type: Array\n },\n showIcon: {\n type: Boolean,\n default: true\n }\n },\n data () {\n return {}\n },\n computed: {\n innerTreeData () {\n return this.treeData\n }\n },\n methods: {\n checkTreeNode (checkedKeys, e) {\n const { checkedNodes } = e\n const nodeDatas = checkedNodes.map(item => item.data.props.dataRef)\n this.$emit('check', checkedKeys, nodeDatas)\n },\n refreshTreeStatus (props = {}) {},\n selectTreeNode (selectedKeys, e) {\n this.$emit('select', selectedKeys, e)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-tree__wrapper {\n overflow: hidden;\n ::v-deep .ant-tree {\n .ant-tree-node-content-wrapper {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .ant-tree-node-selected {\n color: #fff;\n }\n }\n}\n</style>",".g-tree__wrapper {\n overflow: hidden;\n}\n.g-tree__wrapper ::v-deep .ant-tree .ant-tree-node-content-wrapper {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.g-tree__wrapper ::v-deep .ant-tree .ant-tree-node-selected {\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2147
2174
|
|
|
2148
2175
|
};
|
|
2149
2176
|
/* scoped */
|
|
2150
|
-
const __vue_scope_id__$
|
|
2177
|
+
const __vue_scope_id__$w = "data-v-a7a27de8";
|
|
2151
2178
|
/* module identifier */
|
|
2152
|
-
const __vue_module_identifier__$
|
|
2179
|
+
const __vue_module_identifier__$w = undefined;
|
|
2153
2180
|
/* functional template */
|
|
2154
|
-
const __vue_is_functional_template__$
|
|
2181
|
+
const __vue_is_functional_template__$w = false;
|
|
2155
2182
|
/* style inject SSR */
|
|
2156
2183
|
|
|
2157
2184
|
/* style inject shadow dom */
|
|
2158
2185
|
|
|
2159
2186
|
|
|
2160
2187
|
|
|
2161
|
-
const __vue_component__$
|
|
2162
|
-
{ render: __vue_render__$
|
|
2163
|
-
__vue_inject_styles__$
|
|
2164
|
-
__vue_script__$
|
|
2165
|
-
__vue_scope_id__$
|
|
2166
|
-
__vue_is_functional_template__$
|
|
2167
|
-
__vue_module_identifier__$
|
|
2188
|
+
const __vue_component__$w = /*#__PURE__*/normalizeComponent(
|
|
2189
|
+
{ render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
|
|
2190
|
+
__vue_inject_styles__$w,
|
|
2191
|
+
__vue_script__$w,
|
|
2192
|
+
__vue_scope_id__$w,
|
|
2193
|
+
__vue_is_functional_template__$w,
|
|
2194
|
+
__vue_module_identifier__$w,
|
|
2168
2195
|
false,
|
|
2169
2196
|
createInjector,
|
|
2170
2197
|
undefined,
|
|
2171
2198
|
undefined
|
|
2172
2199
|
);
|
|
2173
2200
|
|
|
2174
|
-
__vue_component__$
|
|
2201
|
+
__vue_component__$w.install = Vue => Vue.component(__vue_component__$w.name, __vue_component__$w);
|
|
2175
2202
|
|
|
2176
2203
|
//
|
|
2177
|
-
var script$
|
|
2204
|
+
var script$v = {
|
|
2178
2205
|
name: 'ele-tree-table-model',
|
|
2179
2206
|
props: {
|
|
2180
2207
|
title: {
|
|
2181
2208
|
type: [Object, String]
|
|
2182
2209
|
},
|
|
2210
|
+
overHeight: {
|
|
2211
|
+
type: Number,
|
|
2212
|
+
default: 0
|
|
2213
|
+
},
|
|
2183
2214
|
treeMeta: {
|
|
2184
2215
|
type: Object,
|
|
2185
2216
|
default: () => ({})
|
|
@@ -2518,8 +2549,10 @@ var script$u = {
|
|
|
2518
2549
|
onChangeTableSelection(_, selectedRows) {
|
|
2519
2550
|
if (this.currentTableMode === 'radio') {
|
|
2520
2551
|
this.currentTableSelection = selectedRows[0];
|
|
2552
|
+
this.$emit('on-change-table-selection', this.currentTableSelection);
|
|
2521
2553
|
} else {
|
|
2522
2554
|
this.currentTableSelection = selectedRows;
|
|
2555
|
+
this.$emit('on-change-table-selection', this.currentTableSelection);
|
|
2523
2556
|
}
|
|
2524
2557
|
},
|
|
2525
2558
|
[BUILT_IN_EVENT_NAMES.EDIT]() {
|
|
@@ -2608,6 +2641,9 @@ var script$u = {
|
|
|
2608
2641
|
currentPage: 1,
|
|
2609
2642
|
pageSize
|
|
2610
2643
|
}, props);
|
|
2644
|
+
this.$emit(RESERVE_EVENT_NAMES.WATCH, {
|
|
2645
|
+
...this.exposed
|
|
2646
|
+
});
|
|
2611
2647
|
this.loading = true;
|
|
2612
2648
|
const ret = await net[requestType.toLowerCase()](url, this.tableQuerys).then(resp => {
|
|
2613
2649
|
const {
|
|
@@ -2637,9 +2673,10 @@ var script$u = {
|
|
|
2637
2673
|
width
|
|
2638
2674
|
} = tableRef.$el.getBoundingClientRect();
|
|
2639
2675
|
this.tableWidth = width;
|
|
2640
|
-
this.tableHeight = currentViewportHeight - tableToTop;
|
|
2676
|
+
this.tableHeight = currentViewportHeight - tableToTop - this.overHeight;
|
|
2641
2677
|
},
|
|
2642
2678
|
calculateTreeHeight() {
|
|
2679
|
+
if (!this.showTree) return;
|
|
2643
2680
|
const modelTableContainerRef = this.$refs[this.modelTableContainerRef];
|
|
2644
2681
|
const {
|
|
2645
2682
|
height
|
|
@@ -2667,10 +2704,10 @@ var script$u = {
|
|
|
2667
2704
|
};
|
|
2668
2705
|
|
|
2669
2706
|
/* script */
|
|
2670
|
-
const __vue_script__$
|
|
2707
|
+
const __vue_script__$v = script$v;
|
|
2671
2708
|
|
|
2672
2709
|
/* template */
|
|
2673
|
-
var __vue_render__$
|
|
2710
|
+
var __vue_render__$v = function () {
|
|
2674
2711
|
var _vm = this;
|
|
2675
2712
|
var _h = _vm.$createElement;
|
|
2676
2713
|
var _c = _vm._self._c || _h;
|
|
@@ -2825,42 +2862,42 @@ var __vue_render__$u = function () {
|
|
|
2825
2862
|
1
|
|
2826
2863
|
)
|
|
2827
2864
|
};
|
|
2828
|
-
var __vue_staticRenderFns__$
|
|
2829
|
-
__vue_render__$
|
|
2865
|
+
var __vue_staticRenderFns__$v = [];
|
|
2866
|
+
__vue_render__$v._withStripped = true;
|
|
2830
2867
|
|
|
2831
2868
|
/* style */
|
|
2832
|
-
const __vue_inject_styles__$
|
|
2869
|
+
const __vue_inject_styles__$v = function (inject) {
|
|
2833
2870
|
if (!inject) return
|
|
2834
|
-
inject("data-v-48c95897_0", { source: ".ele.model__tree-table[data-v-48c95897] {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n.ele.model__tree-table .model__tree-table--container .model__tree--wrapper[data-v-48c95897] {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n}\n.ele.model__tree-table .model__table--container[data-v-48c95897] {\n width: 100%;\n min-width: 0;\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--bar[data-v-48c95897] {\n width: 100%;\n height: 8px;\n background: var(--idooel-primary-color);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--text[data-v-48c95897] {\n text-align: left;\n padding: 16px;\n font-size: 16px;\n font-weight: bold;\n background: #fff;\n border-bottom: 1px solid;\n border-color: var(--idoole-black-016);\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper[data-v-48c95897] {\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .button-row__area[data-v-48c95897] {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding-top: 16px;\n padding-bottom: 8px;\n padding-right: 16px;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .g-table__wrapper .fsm[data-v-48c95897] {\n cursor: pointer;\n color: var(--idooel-primary-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/models/tree-table-model/src/index.vue","index.vue"],"names":[],"mappings":"AA2cA;EACA,uBAAA;EACA,aAAA;EACA,mBAAA;EACA,WAAA;AC1cA;AD4cA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,sBAAA;EACA,kBAAA;EACA,gBAAA;AC1cA;AD6cA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;AC3cA;AD6cA;EACA,WAAA;EACA,WAAA;EACA,uCAAA;EACA,2BAAA;EACA,4BAAA;AC3cA;AD6cA;EACA,gBAAA;EACA,aAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,qCAAA;AC3cA;AD8cA;EACA,gBAAA;AC5cA;AD6cA;EACA,WAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;EACA,iBAAA;EACA,mBAAA;EACA,mBAAA;AC3cA;AD8cA;EACA,eAAA;EACA,kCAAA;AC5cA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <section class=\"ele model__tree-table\">\n <section class=\"model__tree-table--container\" v-if=\"showTree\">\n <div class=\"model__tree--title\"></div>\n <section :ref=\"modelTreeWrapper\" class=\"model__tree--wrapper\" :style=\"{height: `${treeWrapperHeight}px`}\">\n <ele-tree\n :tree-data=\"treeData\"\n :defaultExpandedKeys=\"defaultExpandedKeys\"\n :defaultSelectedKeys=\"defaultSelectedKeys\"\n @select=\"selectTreeNode\"\n :replace-fields=\"treeMeta.replaceFields || replaceFields\">\n </ele-tree>\n </section>\n </section>\n <section class=\"model__table--container\" :ref=\"modelTableContainerRef\">\n <div class=\"model__table--title\" v-if=\"title\">\n <template v-if=\"titleMode\">\n <div :class=\"[`model__table-title--${titleMode}`]\"></div>\n </template>\n <template v-else>\n <div class=\"model__table-title--text\">{{ title }}</div>\n </template>\n </div>\n <section :ref=\"modelTableWrapper\" class=\"model__table--wrapper\">\n <ele-search-area :ref=\"searchArea\" @search=\"onSearch\" :data-source=\"searchMeta.elements\"></ele-search-area>\n <div class=\"button-row__area\">\n <ele-button-group class=\"model-table__button-group\" v-on=\"overrideButtonGroupEvent\" :ref=\"buttonGroup\" @click=\"handleClickButtonGroup\" :data-source=\"getButtonGroupElements\"></ele-button-group>\n <slot name=\"tags\"></slot>\n </div>\n <ele-table\n v-on=\"overrideTableEvent\"\n :ref=\"tableRef\"\n :row-selection=\"rowSelection\"\n :loading=\"loading\" \n :columns=\"columns\"\n :total=\"total\"\n :x=\"x\"\n :y=\"y\"\n :height=\"tableHeight\"\n :width=\"tableWidth\"\n :actions=\"actions\"\n :pageSize=\"pageSize\"\n :pageSizeOptions=\"pageSizeOptions\"\n :data-source=\"tableData\"\n @change-page=\"onChangePage\"\n ></ele-table>\n </section>\n </section>\n <ele-modal-form v-model=\"modalFormValue\" :meta=\"modalFormMeta\"></ele-modal-form>\n <ele-modal-fsm v-model=\"showFsmModal\" :contextProp=\"fsmContextProp\" :meta=\"fsmMeta\" @cancel=\"handleCloseFsmModal\"></ele-modal-fsm>\n </section>\n</template>\n\n<script>\nimport { type, net } from '@idooel/shared'\nimport { v4 as uuidv4 } from 'uuid'\nimport { BUILT_IN_EVENT_NAMES, RESERVE_EVENT_NAMES, parseFieldMap, BUILT_IN_TRIGGER } from '../../../utils'\nexport default {\n name: 'ele-tree-table-model',\n props: {\n title: {\n type: [Object, String]\n },\n treeMeta: {\n type: Object,\n default: () => ({})\n },\n searchMeta: {\n type: Object,\n default: () => ({})\n },\n buttonGroupMeta: {\n typeof: Object,\n default: () => ({})\n },\n tableMeta: {\n type: Object,\n default: () => ({})\n },\n createMeta: {\n type: Object\n },\n editMeta: {\n type: Object\n }\n },\n provide () {\n return {\n requestTreeData: this.requestTreeData,\n requestTableData: this.requestTableData\n }\n },\n data () {\n return {\n tableHeight: 0,\n tableWidth: 0,\n modalFormMeta: {},\n modalFormValue: false,\n treeData: [],\n tableData: [],\n defaultExpandedKeys: [],\n defaultSelectedKeys: [],\n replaceFields: {\n title: 'title',\n children: 'children',\n key: 'id'\n },\n loading: false,\n total: 0,\n tableQuerys: {},\n resizeObserverModelTableWrapper: null,\n modelTableWrapperHeight: 0,\n currentTreeNodeData: {},\n treeWrapperHeight: 0,\n currentTableSelection: {},\n showFsmModal: false,\n fsmMeta: {},\n fsmContextProp: {}\n }\n },\n computed: {\n rowSelection () {\n if (!this.currentTableMode) return void 0\n return {\n columnTitle: this.currentSelectionColumn.columnTitle,\n fixed: true,\n type: this.currentTableMode,\n onChange: this.onChangeTableSelection\n }\n },\n currentSelectionColumn () {\n const { multiple } = this.tableMeta\n const target = this.columns.find(item => Object.keys(item).includes('multiple'))\n const isGlobalExistMultiple = Object.keys(this.tableMeta).includes('multiple')\n if (target) {\n return target\n } else if (isGlobalExistMultiple) {\n return { multiple }\n }\n return void 0\n },\n x () {\n const { x } = this.tableMeta\n return x\n },\n y () {\n const { y } = this.tableMeta\n return y\n },\n currentTableMode () {\n if (!this.currentSelectionColumn) return void 0\n const { multiple } = this.currentSelectionColumn\n if (type.isBool(multiple)) {\n if (multiple) {\n return 'checkbox'\n } else {\n return 'radio'\n }\n } else {\n return void 0\n }\n },\n modelTableContainerRef () {\n return uuidv4()\n },\n titleMode () {\n if (type.isObject(this.title)) {\n const { mode = '' } = this.title\n return mode\n }\n return void 0\n },\n tableRef () {\n return uuidv4()\n },\n exposed () {\n return {\n currentTableSelection: this.currentTableSelection,\n currentTreeNode: this.currentTreeNodeData,\n requestTableData: this.requestTableData,\n querys: this.tableQuerys\n }\n },\n overrideTableEvent () {\n const events = this.actions.reduce((ret, action) => {\n ret[action.eventName] = (e) => {\n this.$emit(action.eventName || 'click', { ...e, currentTreeNode: this.currentTreeNodeData, exposed: this.exposed })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.EDIT]: this[BUILT_IN_EVENT_NAMES.EDIT]\n }\n },\n overrideButtonGroupEvent () {\n const events = this.getButtonGroupElements.reduce((ret, ele) => {\n ret[ele.eventName] = (e) => {\n this.$emit(ele.eventName || 'click', { ...e, currentTreeNode: this.currentTreeNodeData, exposed: this.exposed })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.CREATE]: this[BUILT_IN_EVENT_NAMES.CREATE]\n }\n },\n showTree () {\n return !!Object.keys(this.treeMeta).length\n },\n buttonGroup () {\n return uuidv4()\n },\n searchArea () {\n return uuidv4()\n },\n modelTreeWrapper () {\n return uuidv4()\n },\n modelTableWrapper () {\n return uuidv4()\n },\n actions () {\n const { operations } = this.tableMeta\n if (operations) {\n return operations.elements\n } else {\n return []\n }\n },\n pageSize () {\n const { page = {} } = this.tableMeta\n return page.pageSize || 10\n },\n pageSizeOptions () {\n const { page = {} } = this.tableMeta\n return page.pageSizeOptions || ['10', '20', '30', '40']\n },\n columns () {\n const { columns, operations } = this.tableMeta\n if (type.get(columns) === 'array') {\n const columnsOptions = columns.map(item => {\n const { mode = 'text' } = item\n if (item.render) {\n return {\n ...item,\n customRender: (text, record, index) => {\n const { $createElement } = this\n return item.render.call(this, \n { h: $createElement, ctx: this },\n text ? typeof text == 'object' ? text[item.dataIndex] : text : '', \n record, index)\n }\n }\n } else if (mode !== BUILT_IN_TRIGGER.TEXT) {\n const { [`${mode}Meta`]: modeMeta } = item\n return {\n ...item,\n customRender: (text, record, index) => {\n return <span onClick={() => this.dispatchTrigger({ mode, record, modeMeta, index })} class={ mode }>{ text }</span>\n }\n }\n }\n return {\n ...item\n }\n })\n if (operations) {\n return [\n ...columnsOptions,\n {\n title: '操作',\n width: operations.width,\n key: 'action',\n fixed: 'right',\n scopedSlots: { customRender: 'action' }\n }\n ]\n }\n return columnsOptions\n } else {\n console.error('Error: columns is invalid, please check it')\n return []\n }\n },\n getButtonGroupElements () {\n const { elements } = this.buttonGroupMeta\n if (type.get(elements) === 'function') {\n return elements.call(this)\n } else if (type.get(elements) === 'array') {\n return elements\n } else {\n return []\n }\n }\n },\n async created () {\n if (this.showTree) {\n this.treeData = await this.requestTreeData()\n const [defaultTreeNode = {}] = this.treeData\n this.defaultExpandedKeys = [defaultTreeNode[this.replaceFields.key]]\n this.defaultSelectedKeys = [defaultTreeNode[this.replaceFields.key]]\n this.currentTreeNodeData = defaultTreeNode\n }\n const { params = {}, fieldMap = {}, overrideInit = false } = this.tableMeta\n const ctx = { ...this.currentTreeNodeData, _route: this.$route.query }\n const initQuerys = Object.assign({}, params, parseFieldMap(fieldMap, ctx))\n if (overrideInit) {\n this.$emit(RESERVE_EVENT_NAMES.INIT, { ...this.exposed })\n } else {\n this.tableData = await this.requestTableData(initQuerys)\n }\n },\n methods: {\n dispatchTrigger ({ mode, record = {}, modeMeta = { } }) {\n switch (mode) {\n case BUILT_IN_TRIGGER.FSM:\n this[`${BUILT_IN_TRIGGER.FSM}Trigger`](record, modeMeta = { \n url: 'api-fsm/workbench/fsm/auditFlow',\n requestType: 'GET',\n fieldMap: {\n modelCode: 'modelCode',\n businessId: 'businessId'\n }\n })\n break\n default:\n break\n }\n },\n handleCloseFsmModal () {\n this.showFsmModal = false\n },\n [`${BUILT_IN_TRIGGER.FSM}Trigger`] (record, meta) {\n this.fsmMeta = meta\n this.fsmContextProp = record\n this.showFsmModal = true\n },\n onChangeTableSelection (_, selectedRows) {\n if (this.currentTableMode === 'radio') {\n this.currentTableSelection = selectedRows[0]\n } else {\n this.currentTableSelection = selectedRows\n }\n },\n [BUILT_IN_EVENT_NAMES.EDIT] () {\n this.modalFormMeta = this.editMeta\n this.modalFormValue = true\n },\n [BUILT_IN_EVENT_NAMES.CREATE] () {\n this.modalFormMeta = this.createMeta\n this.modalFormValue = true\n },\n handleClickButtonGroup (props) {\n const { eventName } = props\n this.$emit(eventName, { currentTreeNode: this.currentTreeNodeData })\n },\n watchViewPort () {\n const modelTableWrapper = this.$refs[this.modelTableWrapper]\n console.log(modelTableWrapper.getBoundingClientRect())\n const { top } = modelTableWrapper.getBoundingClientRect()\n this.$refs[this.modelTreeWrapper].style.height = `calc(100vh - ${top}px)`\n },\n async onSearch (props) {\n this.tableQuerys = Object.assign(this.tableQuerys, props)\n this.tableData = await this.requestTableData()\n },\n execTableFieldMap (fieldMap = {}, props) {\n let ret = {}\n const keys = Object.keys(fieldMap)\n keys.forEach(key => {\n const field = fieldMap[key]\n ret[field] = props[key]\n })\n return ret\n },\n async selectTreeNode (selectedKeys, e) {\n const { fieldMap } = this.tableMeta\n this.currentTreeNodeData = e.node.$vnode.data.props.dataRef\n const execFieldMapRet = this.execTableFieldMap(fieldMap, e.node.$vnode.data.props.dataRef)\n this.tableData = await this.requestTableData(execFieldMapRet)\n },\n async requestTreeData () {\n const { url, requestType = 'GET', params = {}, fieldMap = {} } = this.treeMeta\n const fieldMapRet = parseFieldMap(fieldMap, { ...this.currentTreeNodeData, _route: this.$route.query })\n const ret = await net[requestType.toLowerCase()](\n url,\n { ...params, ...fieldMapRet }\n ).then(resp => {\n const { data } = resp || {}\n return data\n })\n return ret\n },\n async onChangePage (page, pageSize) {\n this.tableData = await this.requestTableData({ currentPage: page, pageSize })\n },\n async requestTableData (props = {}) {\n const { url, requestType = 'GET', page = {} } = this.tableMeta\n const { pageSize = 10 } = page\n this.tableQuerys = Object.assign(this.tableQuerys, { currentPage: 1, pageSize }, props)\n this.loading = true\n const ret = await net[requestType.toLowerCase()](\n url,\n this.tableQuerys\n ).then(resp => {\n const { data = [], count } = resp || {}\n this.total = count\n this.loading = false\n return data.map(item => {\n delete item.children\n return {\n key: uuidv4(),\n ...item\n }\n })\n })\n this.tableData = ret\n return ret\n },\n refreshTreeStatus (props = {}) {},\n refreshTableStatus (props = {}) {},\n calculateTableHeight () {\n const currentViewportHeight = window.innerHeight\n const tableRef = this.$refs[this.tableRef]\n const { top: tableToTop, width } = tableRef.$el.getBoundingClientRect()\n this.tableWidth = width\n this.tableHeight = currentViewportHeight - tableToTop\n },\n calculateTreeHeight () {\n const modelTableContainerRef = this.$refs[this.modelTableContainerRef]\n const { height } = modelTableContainerRef.getBoundingClientRect()\n this.treeWrapperHeight = height\n }\n },\n mounted () {\n this.calculateTableHeight()\n this.$nextTick(() => {\n this.calculateTreeHeight()\n })\n this.resizeObserverModelTableWrapper = new ResizeObserver(entries => {\n for (const _ of entries) {\n requestAnimationFrame(() => {\n this.calculateTableHeight()\n })\n }\n })\n this.resizeObserverModelTableWrapper.observe(this.$refs[this.modelTableWrapper])\n },\n destroyed () {\n this.resizeObserverModelTableWrapper.disconnect()\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele {\n &.model__tree-table {\n background: transparent; \n display: flex;\n flex-direction: row;\n width: 100%;\n .model__tree-table--container {\n .model__tree--wrapper {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n }\n }\n .model__table--container {\n width: 100%;\n min-width: 0;\n background: #fff;\n .model__table--title {\n .model__table-title--bar {\n width: 100%;\n height: 8px;\n background: var(--idooel-primary-color);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n }\n .model__table-title--text {\n text-align: left;\n padding: 16px;\n font-size: 16px;\n font-weight: bold;\n background: #fff;\n border-bottom: 1px solid;\n border-color: var(--idoole-black-016);\n }\n }\n .model__table--wrapper {\n background: #fff;\n .button-row__area {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding-top: 16px;\n padding-bottom: 8px;\n padding-right: 16px;\n }\n .g-table__wrapper {\n .fsm {\n cursor: pointer;\n color: var(--idooel-primary-color);\n }\n }\n }\n }\n }\n}\n</style>\n",".ele.model__tree-table {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n.ele.model__tree-table .model__tree-table--container .model__tree--wrapper {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n}\n.ele.model__tree-table .model__table--container {\n width: 100%;\n min-width: 0;\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--bar {\n width: 100%;\n height: 8px;\n background: var(--idooel-primary-color);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--text {\n text-align: left;\n padding: 16px;\n font-size: 16px;\n font-weight: bold;\n background: #fff;\n border-bottom: 1px solid;\n border-color: var(--idoole-black-016);\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper {\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .button-row__area {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding-top: 16px;\n padding-bottom: 8px;\n padding-right: 16px;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .g-table__wrapper .fsm {\n cursor: pointer;\n color: var(--idooel-primary-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2871
|
+
inject("data-v-59aa9f0b_0", { source: ".ele.model__tree-table[data-v-59aa9f0b] {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n.ele.model__tree-table .model__tree-table--container .model__tree--wrapper[data-v-59aa9f0b] {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n}\n.ele.model__tree-table .model__table--container[data-v-59aa9f0b] {\n width: 100%;\n min-width: 0;\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--bar[data-v-59aa9f0b] {\n width: 100%;\n height: 8px;\n background: var(--idooel-primary-color);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--text[data-v-59aa9f0b] {\n text-align: left;\n padding: 16px;\n font-size: 16px;\n font-weight: bold;\n background: #fff;\n border-bottom: 1px solid;\n border-color: var(--idoole-black-016);\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper[data-v-59aa9f0b] {\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .button-row__area[data-v-59aa9f0b] {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding-top: 16px;\n padding-bottom: 8px;\n padding-right: 16px;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .g-table__wrapper .fsm[data-v-59aa9f0b] {\n cursor: pointer;\n color: var(--idooel-primary-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/models/tree-table-model/src/index.vue","index.vue"],"names":[],"mappings":"AAmdA;EACA,uBAAA;EACA,aAAA;EACA,mBAAA;EACA,WAAA;ACldA;ADodA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,sBAAA;EACA,kBAAA;EACA,gBAAA;ACldA;ADqdA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;ACndA;ADqdA;EACA,WAAA;EACA,WAAA;EACA,uCAAA;EACA,2BAAA;EACA,4BAAA;ACndA;ADqdA;EACA,gBAAA;EACA,aAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,qCAAA;ACndA;ADsdA;EACA,gBAAA;ACpdA;ADqdA;EACA,WAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;EACA,iBAAA;EACA,mBAAA;EACA,mBAAA;ACndA;ADsdA;EACA,eAAA;EACA,kCAAA;ACpdA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <section class=\"ele model__tree-table\">\n <section class=\"model__tree-table--container\" v-if=\"showTree\">\n <div class=\"model__tree--title\"></div>\n <section :ref=\"modelTreeWrapper\" class=\"model__tree--wrapper\" :style=\"{height: `${treeWrapperHeight}px`}\">\n <ele-tree\n :tree-data=\"treeData\"\n :defaultExpandedKeys=\"defaultExpandedKeys\"\n :defaultSelectedKeys=\"defaultSelectedKeys\"\n @select=\"selectTreeNode\"\n :replace-fields=\"treeMeta.replaceFields || replaceFields\">\n </ele-tree>\n </section>\n </section>\n <section class=\"model__table--container\" :ref=\"modelTableContainerRef\">\n <div class=\"model__table--title\" v-if=\"title\">\n <template v-if=\"titleMode\">\n <div :class=\"[`model__table-title--${titleMode}`]\"></div>\n </template>\n <template v-else>\n <div class=\"model__table-title--text\">{{ title }}</div>\n </template>\n </div>\n <section :ref=\"modelTableWrapper\" class=\"model__table--wrapper\">\n <ele-search-area :ref=\"searchArea\" @search=\"onSearch\" :data-source=\"searchMeta.elements\"></ele-search-area>\n <div class=\"button-row__area\">\n <ele-button-group class=\"model-table__button-group\" v-on=\"overrideButtonGroupEvent\" :ref=\"buttonGroup\" @click=\"handleClickButtonGroup\" :data-source=\"getButtonGroupElements\"></ele-button-group>\n <slot name=\"tags\"></slot>\n </div>\n <ele-table\n v-on=\"overrideTableEvent\"\n :ref=\"tableRef\"\n :row-selection=\"rowSelection\"\n :loading=\"loading\" \n :columns=\"columns\"\n :total=\"total\"\n :x=\"x\"\n :y=\"y\"\n :height=\"tableHeight\"\n :width=\"tableWidth\"\n :actions=\"actions\"\n :pageSize=\"pageSize\"\n :pageSizeOptions=\"pageSizeOptions\"\n :data-source=\"tableData\"\n @change-page=\"onChangePage\"\n ></ele-table>\n </section>\n </section>\n <ele-modal-form v-model=\"modalFormValue\" :meta=\"modalFormMeta\"></ele-modal-form>\n <ele-modal-fsm v-model=\"showFsmModal\" :contextProp=\"fsmContextProp\" :meta=\"fsmMeta\" @cancel=\"handleCloseFsmModal\"></ele-modal-fsm>\n </section>\n</template>\n\n<script>\nimport { type, net } from '@idooel/shared'\nimport { v4 as uuidv4 } from 'uuid'\nimport { BUILT_IN_EVENT_NAMES, RESERVE_EVENT_NAMES, parseFieldMap, BUILT_IN_TRIGGER } from '../../../utils'\nexport default {\n name: 'ele-tree-table-model',\n props: {\n title: {\n type: [Object, String]\n },\n overHeight: {\n type: Number,\n default: 0\n },\n treeMeta: {\n type: Object,\n default: () => ({})\n },\n searchMeta: {\n type: Object,\n default: () => ({})\n },\n buttonGroupMeta: {\n typeof: Object,\n default: () => ({})\n },\n tableMeta: {\n type: Object,\n default: () => ({})\n },\n createMeta: {\n type: Object\n },\n editMeta: {\n type: Object\n }\n },\n provide () {\n return {\n requestTreeData: this.requestTreeData,\n requestTableData: this.requestTableData\n }\n },\n data () {\n return {\n tableHeight: 0,\n tableWidth: 0,\n modalFormMeta: {},\n modalFormValue: false,\n treeData: [],\n tableData: [],\n defaultExpandedKeys: [],\n defaultSelectedKeys: [],\n replaceFields: {\n title: 'title',\n children: 'children',\n key: 'id'\n },\n loading: false,\n total: 0,\n tableQuerys: {},\n resizeObserverModelTableWrapper: null,\n modelTableWrapperHeight: 0,\n currentTreeNodeData: {},\n treeWrapperHeight: 0,\n currentTableSelection: {},\n showFsmModal: false,\n fsmMeta: {},\n fsmContextProp: {}\n }\n },\n computed: {\n rowSelection () {\n if (!this.currentTableMode) return void 0\n return {\n columnTitle: this.currentSelectionColumn.columnTitle,\n fixed: true,\n type: this.currentTableMode,\n onChange: this.onChangeTableSelection\n }\n },\n currentSelectionColumn () {\n const { multiple } = this.tableMeta\n const target = this.columns.find(item => Object.keys(item).includes('multiple'))\n const isGlobalExistMultiple = Object.keys(this.tableMeta).includes('multiple')\n if (target) {\n return target\n } else if (isGlobalExistMultiple) {\n return { multiple }\n }\n return void 0\n },\n x () {\n const { x } = this.tableMeta\n return x\n },\n y () {\n const { y } = this.tableMeta\n return y\n },\n currentTableMode () {\n if (!this.currentSelectionColumn) return void 0\n const { multiple } = this.currentSelectionColumn\n if (type.isBool(multiple)) {\n if (multiple) {\n return 'checkbox'\n } else {\n return 'radio'\n }\n } else {\n return void 0\n }\n },\n modelTableContainerRef () {\n return uuidv4()\n },\n titleMode () {\n if (type.isObject(this.title)) {\n const { mode = '' } = this.title\n return mode\n }\n return void 0\n },\n tableRef () {\n return uuidv4()\n },\n exposed () {\n return {\n currentTableSelection: this.currentTableSelection,\n currentTreeNode: this.currentTreeNodeData,\n requestTableData: this.requestTableData,\n querys: this.tableQuerys\n }\n },\n overrideTableEvent () {\n const events = this.actions.reduce((ret, action) => {\n ret[action.eventName] = (e) => {\n this.$emit(action.eventName || 'click', { ...e, currentTreeNode: this.currentTreeNodeData, exposed: this.exposed })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.EDIT]: this[BUILT_IN_EVENT_NAMES.EDIT]\n }\n },\n overrideButtonGroupEvent () {\n const events = this.getButtonGroupElements.reduce((ret, ele) => {\n ret[ele.eventName] = (e) => {\n this.$emit(ele.eventName || 'click', { ...e, currentTreeNode: this.currentTreeNodeData, exposed: this.exposed })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.CREATE]: this[BUILT_IN_EVENT_NAMES.CREATE]\n }\n },\n showTree () {\n return !!Object.keys(this.treeMeta).length\n },\n buttonGroup () {\n return uuidv4()\n },\n searchArea () {\n return uuidv4()\n },\n modelTreeWrapper () {\n return uuidv4()\n },\n modelTableWrapper () {\n return uuidv4()\n },\n actions () {\n const { operations } = this.tableMeta\n if (operations) {\n return operations.elements\n } else {\n return []\n }\n },\n pageSize () {\n const { page = {} } = this.tableMeta\n return page.pageSize || 10\n },\n pageSizeOptions () {\n const { page = {} } = this.tableMeta\n return page.pageSizeOptions || ['10', '20', '30', '40']\n },\n columns () {\n const { columns, operations } = this.tableMeta\n if (type.get(columns) === 'array') {\n const columnsOptions = columns.map(item => {\n const { mode = 'text' } = item\n if (item.render) {\n return {\n ...item,\n customRender: (text, record, index) => {\n const { $createElement } = this\n return item.render.call(this, \n { h: $createElement, ctx: this },\n text ? typeof text == 'object' ? text[item.dataIndex] : text : '', \n record, index)\n }\n }\n } else if (mode !== BUILT_IN_TRIGGER.TEXT) {\n const { [`${mode}Meta`]: modeMeta } = item\n return {\n ...item,\n customRender: (text, record, index) => {\n return <span onClick={() => this.dispatchTrigger({ mode, record, modeMeta, index })} class={ mode }>{ text }</span>\n }\n }\n }\n return {\n ...item\n }\n })\n if (operations) {\n return [\n ...columnsOptions,\n {\n title: '操作',\n width: operations.width,\n key: 'action',\n fixed: 'right',\n scopedSlots: { customRender: 'action' }\n }\n ]\n }\n return columnsOptions\n } else {\n console.error('Error: columns is invalid, please check it')\n return []\n }\n },\n getButtonGroupElements () {\n const { elements } = this.buttonGroupMeta\n if (type.get(elements) === 'function') {\n return elements.call(this)\n } else if (type.get(elements) === 'array') {\n return elements\n } else {\n return []\n }\n }\n },\n async created () {\n if (this.showTree) {\n this.treeData = await this.requestTreeData()\n const [defaultTreeNode = {}] = this.treeData\n this.defaultExpandedKeys = [defaultTreeNode[this.replaceFields.key]]\n this.defaultSelectedKeys = [defaultTreeNode[this.replaceFields.key]]\n this.currentTreeNodeData = defaultTreeNode\n }\n const { params = {}, fieldMap = {}, overrideInit = false } = this.tableMeta\n const ctx = { ...this.currentTreeNodeData, _route: this.$route.query }\n const initQuerys = Object.assign({}, params, parseFieldMap(fieldMap, ctx))\n if (overrideInit) {\n this.$emit(RESERVE_EVENT_NAMES.INIT, { ...this.exposed })\n } else {\n this.tableData = await this.requestTableData(initQuerys)\n }\n },\n methods: {\n dispatchTrigger ({ mode, record = {}, modeMeta = { } }) {\n switch (mode) {\n case BUILT_IN_TRIGGER.FSM:\n this[`${BUILT_IN_TRIGGER.FSM}Trigger`](record, modeMeta = { \n url: 'api-fsm/workbench/fsm/auditFlow',\n requestType: 'GET',\n fieldMap: {\n modelCode: 'modelCode',\n businessId: 'businessId'\n }\n })\n break\n default:\n break\n }\n },\n handleCloseFsmModal () {\n this.showFsmModal = false\n },\n [`${BUILT_IN_TRIGGER.FSM}Trigger`] (record, meta) {\n this.fsmMeta = meta\n this.fsmContextProp = record\n this.showFsmModal = true\n },\n onChangeTableSelection (_, selectedRows) {\n if (this.currentTableMode === 'radio') {\n this.currentTableSelection = selectedRows[0]\n this.$emit('on-change-table-selection', this.currentTableSelection)\n } else {\n this.currentTableSelection = selectedRows\n this.$emit('on-change-table-selection', this.currentTableSelection)\n }\n },\n [BUILT_IN_EVENT_NAMES.EDIT] () {\n this.modalFormMeta = this.editMeta\n this.modalFormValue = true\n },\n [BUILT_IN_EVENT_NAMES.CREATE] () {\n this.modalFormMeta = this.createMeta\n this.modalFormValue = true\n },\n handleClickButtonGroup (props) {\n const { eventName } = props\n this.$emit(eventName, { currentTreeNode: this.currentTreeNodeData })\n },\n watchViewPort () {\n const modelTableWrapper = this.$refs[this.modelTableWrapper]\n console.log(modelTableWrapper.getBoundingClientRect())\n const { top } = modelTableWrapper.getBoundingClientRect()\n this.$refs[this.modelTreeWrapper].style.height = `calc(100vh - ${top}px)`\n },\n async onSearch (props) {\n this.tableQuerys = Object.assign(this.tableQuerys, props)\n this.tableData = await this.requestTableData()\n },\n execTableFieldMap (fieldMap = {}, props) {\n let ret = {}\n const keys = Object.keys(fieldMap)\n keys.forEach(key => {\n const field = fieldMap[key]\n ret[field] = props[key]\n })\n return ret\n },\n async selectTreeNode (selectedKeys, e) {\n const { fieldMap } = this.tableMeta\n this.currentTreeNodeData = e.node.$vnode.data.props.dataRef\n const execFieldMapRet = this.execTableFieldMap(fieldMap, e.node.$vnode.data.props.dataRef)\n this.tableData = await this.requestTableData(execFieldMapRet)\n },\n async requestTreeData () {\n const { url, requestType = 'GET', params = {}, fieldMap = {} } = this.treeMeta\n const fieldMapRet = parseFieldMap(fieldMap, { ...this.currentTreeNodeData, _route: this.$route.query })\n const ret = await net[requestType.toLowerCase()](\n url,\n { ...params, ...fieldMapRet }\n ).then(resp => {\n const { data } = resp || {}\n return data\n })\n return ret\n },\n async onChangePage (page, pageSize) {\n this.tableData = await this.requestTableData({ currentPage: page, pageSize })\n },\n async requestTableData (props = {}) {\n const { url, requestType = 'GET', page = {} } = this.tableMeta\n const { pageSize = 10 } = page\n this.tableQuerys = Object.assign(this.tableQuerys, { currentPage: 1, pageSize }, props)\n this.$emit(RESERVE_EVENT_NAMES.WATCH, { ...this.exposed })\n this.loading = true\n const ret = await net[requestType.toLowerCase()](\n url,\n this.tableQuerys\n ).then(resp => {\n const { data = [], count } = resp || {}\n this.total = count\n this.loading = false\n return data.map(item => {\n delete item.children\n return {\n key: uuidv4(),\n ...item\n }\n })\n })\n this.tableData = ret\n return ret\n },\n refreshTreeStatus (props = {}) {},\n refreshTableStatus (props = {}) {},\n calculateTableHeight () {\n const currentViewportHeight = window.innerHeight\n const tableRef = this.$refs[this.tableRef]\n const { top: tableToTop, width } = tableRef.$el.getBoundingClientRect()\n this.tableWidth = width\n this.tableHeight = currentViewportHeight - tableToTop - this.overHeight\n },\n calculateTreeHeight () {\n if (!this.showTree) return\n const modelTableContainerRef = this.$refs[this.modelTableContainerRef]\n const { height } = modelTableContainerRef.getBoundingClientRect()\n this.treeWrapperHeight = height\n }\n },\n mounted () {\n this.calculateTableHeight()\n this.$nextTick(() => {\n this.calculateTreeHeight()\n })\n this.resizeObserverModelTableWrapper = new ResizeObserver(entries => {\n for (const _ of entries) {\n requestAnimationFrame(() => {\n this.calculateTableHeight()\n })\n }\n })\n this.resizeObserverModelTableWrapper.observe(this.$refs[this.modelTableWrapper])\n },\n destroyed () {\n this.resizeObserverModelTableWrapper.disconnect()\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele {\n &.model__tree-table {\n background: transparent; \n display: flex;\n flex-direction: row;\n width: 100%;\n .model__tree-table--container {\n .model__tree--wrapper {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n }\n }\n .model__table--container {\n width: 100%;\n min-width: 0;\n background: #fff;\n .model__table--title {\n .model__table-title--bar {\n width: 100%;\n height: 8px;\n background: var(--idooel-primary-color);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n }\n .model__table-title--text {\n text-align: left;\n padding: 16px;\n font-size: 16px;\n font-weight: bold;\n background: #fff;\n border-bottom: 1px solid;\n border-color: var(--idoole-black-016);\n }\n }\n .model__table--wrapper {\n background: #fff;\n .button-row__area {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding-top: 16px;\n padding-bottom: 8px;\n padding-right: 16px;\n }\n .g-table__wrapper {\n .fsm {\n cursor: pointer;\n color: var(--idooel-primary-color);\n }\n }\n }\n }\n }\n}\n</style>\n",".ele.model__tree-table {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n.ele.model__tree-table .model__tree-table--container .model__tree--wrapper {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n}\n.ele.model__tree-table .model__table--container {\n width: 100%;\n min-width: 0;\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--bar {\n width: 100%;\n height: 8px;\n background: var(--idooel-primary-color);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--text {\n text-align: left;\n padding: 16px;\n font-size: 16px;\n font-weight: bold;\n background: #fff;\n border-bottom: 1px solid;\n border-color: var(--idoole-black-016);\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper {\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .button-row__area {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding-top: 16px;\n padding-bottom: 8px;\n padding-right: 16px;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .g-table__wrapper .fsm {\n cursor: pointer;\n color: var(--idooel-primary-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2835
2872
|
|
|
2836
2873
|
};
|
|
2837
2874
|
/* scoped */
|
|
2838
|
-
const __vue_scope_id__$
|
|
2875
|
+
const __vue_scope_id__$v = "data-v-59aa9f0b";
|
|
2839
2876
|
/* module identifier */
|
|
2840
|
-
const __vue_module_identifier__$
|
|
2877
|
+
const __vue_module_identifier__$v = undefined;
|
|
2841
2878
|
/* functional template */
|
|
2842
|
-
const __vue_is_functional_template__$
|
|
2879
|
+
const __vue_is_functional_template__$v = false;
|
|
2843
2880
|
/* style inject SSR */
|
|
2844
2881
|
|
|
2845
2882
|
/* style inject shadow dom */
|
|
2846
2883
|
|
|
2847
2884
|
|
|
2848
2885
|
|
|
2849
|
-
const __vue_component__$
|
|
2850
|
-
{ render: __vue_render__$
|
|
2851
|
-
__vue_inject_styles__$
|
|
2852
|
-
__vue_script__$
|
|
2853
|
-
__vue_scope_id__$
|
|
2854
|
-
__vue_is_functional_template__$
|
|
2855
|
-
__vue_module_identifier__$
|
|
2856
|
-
false,
|
|
2857
|
-
createInjector,
|
|
2858
|
-
undefined,
|
|
2859
|
-
undefined
|
|
2860
|
-
);
|
|
2886
|
+
const __vue_component__$v = /*#__PURE__*/normalizeComponent(
|
|
2887
|
+
{ render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
|
|
2888
|
+
__vue_inject_styles__$v,
|
|
2889
|
+
__vue_script__$v,
|
|
2890
|
+
__vue_scope_id__$v,
|
|
2891
|
+
__vue_is_functional_template__$v,
|
|
2892
|
+
__vue_module_identifier__$v,
|
|
2893
|
+
false,
|
|
2894
|
+
createInjector,
|
|
2895
|
+
undefined,
|
|
2896
|
+
undefined
|
|
2897
|
+
);
|
|
2861
2898
|
|
|
2862
2899
|
//
|
|
2863
|
-
var script$
|
|
2900
|
+
var script$u = {
|
|
2864
2901
|
name: 'ele-form-group-model',
|
|
2865
2902
|
props: {
|
|
2866
2903
|
mode: {
|
|
@@ -3140,10 +3177,10 @@ var script$t = {
|
|
|
3140
3177
|
};
|
|
3141
3178
|
|
|
3142
3179
|
/* script */
|
|
3143
|
-
const __vue_script__$
|
|
3180
|
+
const __vue_script__$u = script$u;
|
|
3144
3181
|
|
|
3145
3182
|
/* template */
|
|
3146
|
-
var __vue_render__$
|
|
3183
|
+
var __vue_render__$u = function () {
|
|
3147
3184
|
var _vm = this;
|
|
3148
3185
|
var _h = _vm.$createElement;
|
|
3149
3186
|
var _c = _vm._self._c || _h;
|
|
@@ -3245,34 +3282,34 @@ var __vue_render__$t = function () {
|
|
|
3245
3282
|
2
|
|
3246
3283
|
)
|
|
3247
3284
|
};
|
|
3248
|
-
var __vue_staticRenderFns__$
|
|
3249
|
-
__vue_render__$
|
|
3285
|
+
var __vue_staticRenderFns__$u = [];
|
|
3286
|
+
__vue_render__$u._withStripped = true;
|
|
3250
3287
|
|
|
3251
3288
|
/* style */
|
|
3252
|
-
const __vue_inject_styles__$
|
|
3289
|
+
const __vue_inject_styles__$u = function (inject) {
|
|
3253
3290
|
if (!inject) return
|
|
3254
3291
|
inject("data-v-770e5c93_0", { source: ".ele.form-group-model__wrapper[data-v-770e5c93] {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-770e5c93] {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-770e5c93]:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title[data-v-770e5c93] {\n width: 100%;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid;\n border-color: var(--idooel-form-title-border-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--content[data-v-770e5c93] {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer[data-v-770e5c93] {\n width: 100%;\n height: 64px;\n background: #fff;\n position: fixed;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/models/form-group-model/src/index.vue","index.vue"],"names":[],"mappings":"AA4OA;EACA,iBAAA;EACA,oBAAA;AC3OA;AD4OA;EACA,gBAAA;EACA,gBAAA;AC1OA;AD2OA;EACA,iBAAA;ACzOA;AD2OA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,wBAAA;EACA,mDAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;ACzOA;AD2OA;EACA,aAAA;ACzOA;AD4OA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC1OA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele form-group-model__wrapper\">\n <template v-for=\"(group, idx) in innerGroupMeta\">\n <div \n class=\"form-group-model__from\"\n v-if=\"!group.isGenTpl\"\n :key=\"group.key || idx\">\n <div class=\"form-group-model__form--title\">\n <div>{{ group.title }}</div>\n <div class=\"form-group-model__form--buttons\">\n <ele-button-group v-if=\"group.buttonGroupMeta\" v-on=\"assignAttrForEvents\" @delete=\"handleClickDelete($event, group, idx)\" :data-source=\"group.buttonGroupMeta.elements.call(this)\"></ele-button-group>\n </div>\n </div>\n <div class=\"form-group-model__form--content\">\n <ele-form @change=\"onChangeFormStatus($event, group.key || idx)\" :form-name=\"group.key || idx\" :ref=\"group.key || `${formRefBase}__${idx}`\" :elements=\"group.elements\"></ele-form>\n </div>\n </div>\n </template>\n <div v-if=\"showFooterMeta\" class=\"form-group-model__form--footer\">\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\n </div>\n </div>\n</template>\n\n<script>\nimport { BUILT_IN_EVENT_NAMES, RESERVE_EVENT_NAMES, parseFieldMap, PAGE_STATUS } from '../../../utils'\nimport { v4 as uuidv4 } from 'uuid'\nimport { type, net } from '@idooel/shared'\nexport default {\n name: 'ele-form-group-model',\n props: {\n mode: {\n type: String\n },\n fieldName: {\n type: String,\n default: 'formGroup'\n },\n groupMeta: {\n type: Function,\n default: () => []\n },\n footerMeta: {\n type: Object,\n default: () => {}\n },\n preRequest: {\n type: Object,\n default: () => {}\n },\n infoRequest: {\n type: Object,\n default: () => {}\n },\n submitRequest: {\n type: Object,\n default: () => {}\n }\n },\n data () {\n return {\n increaseCount: 1,\n innerGroupMeta: []\n }\n },\n watch: {\n readOnlyGroupMeta: {\n handler (meta) {\n this.innerGroupMeta = meta\n },\n immediate: true\n }\n },\n computed: {\n routeMetaMode () {\n return this.$route.meta.mode\n },\n readOnlyGroupMeta () {\n return this.groupMeta.call(this)\n },\n showFooterMeta () {\n return !type.isEmpty(this.footerMeta)\n },\n formRefBase () {\n return uuidv4()\n },\n footerElements () {\n const { elements } = this.footerMeta\n return elements.call(this)\n },\n assignAttrForEvents () {\n const events = this.footerElements.reduce((ret, ele) => {\n ret[ele.eventName] = (e) => {\n this.$emit(ele.eventName || 'click', { ...e })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL],\n [BUILT_IN_EVENT_NAMES.INCREASE]: this[BUILT_IN_EVENT_NAMES.INCREASE]\n }\n },\n getFormRefs () {\n return this.innerGroupMeta.map((group, idx) => {\n if (!group.isGenTpl) {\n return this.$refs[group.key || `${this.formRefBase}__${idx}`]\n }\n return void 0\n }).filter(item => !!item).flat()\n },\n formModels () {\n if (this.mode === 'increase') {\n //TODO increase mode to return formModels\n return this.getFormRefs.map(form => {\n return form.getFieldsValue()\n })\n } else {\n return this.getFormRefs.map(form => {\n const { $vnode: { data: { ref } } } = form\n return {\n key: ref,\n value: form.getFieldsValue()\n }\n }).reduce((ret, props) => {\n ret[props.key] = props.value\n return ret\n }, {})\n }\n }\n },\n methods: {\n execFieldMap (fieldMap = {}, dataSource = {}) {\n const ret = parseFieldMap(fieldMap, { _route: this.$route.query, ...dataSource})\n return ret\n },\n onChangeFormStatus (props, key) {\n this.$emit(RESERVE_EVENT_NAMES.WATCH_FORM_STATUS, { key, ...props })\n },\n async infoRequestTrigger () {\n if (!this.infoRequest || this.routeMetaMode == PAGE_STATUS.CREATE) return\n const { url, requestType, params = {}, fieldMap = {}, headers = {} } = this.infoRequest\n if (!url) return\n net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers }).then(resp => {\n const { data = {} } = resp\n if (this.mode === 'increase') {\n this.renderIncreaseForm(data)\n }\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\n })\n },\n async preRequestTrigger () {\n if (!this.preRequest) return\n const { url, requestType = 'GET', params = {}, fieldMap = {}, headers = {} } = this.preRequest\n if (!url) return\n net[requestType.toLowerCase()](url, { ...params, ...fieldMap }, { ...headers }).then(resp => {\n const { data = {} } = resp\n if (this.mode === 'increase') {\n this.renderIncreaseForm(data)\n }\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\n })\n },\n renderIncreaseForm (data = {}) {\n const formGroupValuesLength = data[this.fieldName].length\n const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl)\n const notGenTplPoolLength = this.readOnlyGroupMeta.filter(item => !item.isGenTpl).length\n const genNum = formGroupValuesLength - notGenTplPoolLength\n new Array(genNum).fill().forEach(() => {\n const form = this.genForm(genTplTarget)\n this.innerGroupMeta.push(form)\n })\n const formGroupValues = data[this.fieldName]\n this.$nextTick(() => {\n this.setFieldsValue(formGroupValues)\n })\n },\n async submitRequestTrigger (props = {}) {\n const { url, requestType, headers = {}, params = {}, fieldMap = {} } = this.submitRequest\n if (!url) return\n const ret = await net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap, { ...this.formModels }), [this.fieldName]: this.formModels }, { headers }).then(resp => {\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels, ...resp.data || {} } })\n return resp.data\n })\n return ret\n },\n setFieldsValue (data = []) {\n this.getFormRefs.forEach((form, idx) => {\n form.setFieldsValue(data[idx])\n form.evalDisabledExpression(data[idx])\n })\n },\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\n const status = this.getFormRefs.map(form => {\n const status = form.validateFields()\n return status\n }).every(item => item)\n if (status) {\n return this.submitRequestTrigger(props)\n } else {\n return false\n }\n },\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\n },\n genForm (base) {\n const { elements, title, buttonGroupMeta } = base\n return {\n elements: JSON.parse(JSON.stringify(elements)),\n buttonGroupMeta,\n title: `${title}${this.increaseCount++}`,\n _gen: true\n }\n },\n handleClickDelete (props = {}, attr = {}, idx) {\n this.innerGroupMeta.splice(idx, 1)\n this.$emit(BUILT_IN_EVENT_NAMES.DELETE, { ...props })\n },\n [BUILT_IN_EVENT_NAMES.INCREASE] (props) {\n const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl)\n const form = this.genForm(genTplTarget)\n this.innerGroupMeta.push(form)\n }\n },\n async mounted() {\n await this.preRequestTrigger()\n await this.infoRequestTrigger()\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele {\n &.form-group-model__wrapper {\n background: unset;\n padding-bottom: 80px;\n .form-group-model__from {\n background: #fff;\n margin-top: 16px;\n &:first-child {\n margin-top: unset;\n }\n .form-group-model__form--title {\n width: 100%;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid;\n border-color: var(--idooel-form-title-border-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n .form-group-model__form--content {\n padding: 16px;\n }\n }\n .form-group-model__form--footer {\n width: 100%;\n height: 64px;\n background: #fff;\n position: fixed;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n }\n }\n}\n</style>",".ele.form-group-model__wrapper {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title {\n width: 100%;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid;\n border-color: var(--idooel-form-title-border-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--content {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer {\n width: 100%;\n height: 64px;\n background: #fff;\n position: fixed;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
3255
3292
|
|
|
3256
3293
|
};
|
|
3257
3294
|
/* scoped */
|
|
3258
|
-
const __vue_scope_id__$
|
|
3295
|
+
const __vue_scope_id__$u = "data-v-770e5c93";
|
|
3259
3296
|
/* module identifier */
|
|
3260
|
-
const __vue_module_identifier__$
|
|
3297
|
+
const __vue_module_identifier__$u = undefined;
|
|
3261
3298
|
/* functional template */
|
|
3262
|
-
const __vue_is_functional_template__$
|
|
3299
|
+
const __vue_is_functional_template__$u = false;
|
|
3263
3300
|
/* style inject SSR */
|
|
3264
3301
|
|
|
3265
3302
|
/* style inject shadow dom */
|
|
3266
3303
|
|
|
3267
3304
|
|
|
3268
3305
|
|
|
3269
|
-
const __vue_component__$
|
|
3270
|
-
{ render: __vue_render__$
|
|
3271
|
-
__vue_inject_styles__$
|
|
3272
|
-
__vue_script__$
|
|
3273
|
-
__vue_scope_id__$
|
|
3274
|
-
__vue_is_functional_template__$
|
|
3275
|
-
__vue_module_identifier__$
|
|
3306
|
+
const __vue_component__$u = /*#__PURE__*/normalizeComponent(
|
|
3307
|
+
{ render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
|
|
3308
|
+
__vue_inject_styles__$u,
|
|
3309
|
+
__vue_script__$u,
|
|
3310
|
+
__vue_scope_id__$u,
|
|
3311
|
+
__vue_is_functional_template__$u,
|
|
3312
|
+
__vue_module_identifier__$u,
|
|
3276
3313
|
false,
|
|
3277
3314
|
createInjector,
|
|
3278
3315
|
undefined,
|
|
@@ -3280,7 +3317,7 @@ __vue_render__$t._withStripped = true;
|
|
|
3280
3317
|
);
|
|
3281
3318
|
|
|
3282
3319
|
//
|
|
3283
|
-
var script$
|
|
3320
|
+
var script$t = {
|
|
3284
3321
|
name: 'ele-form-model',
|
|
3285
3322
|
props: {
|
|
3286
3323
|
disabled: {
|
|
@@ -3517,10 +3554,10 @@ var script$s = {
|
|
|
3517
3554
|
};
|
|
3518
3555
|
|
|
3519
3556
|
/* script */
|
|
3520
|
-
const __vue_script__$
|
|
3557
|
+
const __vue_script__$t = script$t;
|
|
3521
3558
|
|
|
3522
3559
|
/* template */
|
|
3523
|
-
var __vue_render__$
|
|
3560
|
+
var __vue_render__$t = function () {
|
|
3524
3561
|
var _vm = this;
|
|
3525
3562
|
var _h = _vm.$createElement;
|
|
3526
3563
|
var _c = _vm._self._c || _h;
|
|
@@ -3573,34 +3610,34 @@ var __vue_render__$s = function () {
|
|
|
3573
3610
|
: _vm._e(),
|
|
3574
3611
|
])
|
|
3575
3612
|
};
|
|
3576
|
-
var __vue_staticRenderFns__$
|
|
3577
|
-
__vue_render__$
|
|
3613
|
+
var __vue_staticRenderFns__$t = [];
|
|
3614
|
+
__vue_render__$t._withStripped = true;
|
|
3578
3615
|
|
|
3579
3616
|
/* style */
|
|
3580
|
-
const __vue_inject_styles__$
|
|
3617
|
+
const __vue_inject_styles__$t = function (inject) {
|
|
3581
3618
|
if (!inject) return
|
|
3582
3619
|
inject("data-v-02358f9a_0", { source: ".form__model--wrapper[data-v-02358f9a] {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title[data-v-02358f9a] {\n height: 56px;\n padding: 0 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid var(--idooel-form-title-border-color);\n}\n.form__model--wrapper .form-model__content[data-v-02358f9a] {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer[data-v-02358f9a] {\n /* width: 100%; */\n height: 64px;\n position: fixed;\n bottom: 0;\n display: flex;\n float: right;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/models/form-model/src/index.vue","index.vue"],"names":[],"mappings":"AAuLA;EACA,WAAA;EACA,YAAA;EACA,cAAA;EACA,gBAAA;ACtLA;ADuLA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8DAAA;ACrLA;ADuLA;EACA,aAAA;ACrLA;ADuLA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,YAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;ACrLA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"form__model--wrapper\">\n <div class=\"form-model__title\" v-if=\"title\">\n {{ title }}\n </div>\n <div class=\"form-model__content\">\n <ele-alert style=\"margin-bottom: 16px;\" v-if=\"alertMeta\" v-bind=\"alertMeta\"></ele-alert>\n <ele-form :ref=\"formRef\" :elements=\"elements\" :disabled=\"globalDisabled\"></ele-form>\n </div>\n <div class=\"form-model__footer\" v-if=\"footerMeta\">\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\n </div>\n </div>\n</template>\n\n<script>\nimport { BUILT_IN_EVENT_NAMES, parseFieldMap, RESERVE_EVENT_NAMES, PAGE_STATUS, CONTEXT } from '../../../utils'\nimport { v4 as uuidv4 } from 'uuid'\nimport { net, type } from '@idooel/shared'\nimport { parse } from '@idooel/expression'\nexport default {\n name: 'ele-form-model',\n props: {\n disabled: {\n type: [Boolean, String],\n default: '_routeMeta.disabled'\n },\n title: {\n type: String\n },\n formMeta: {\n type: Object\n },\n footerMeta: {\n type: Object\n }\n },\n data() {\n return {}\n },\n provide () {\n return {\n [CONTEXT]: () => {\n return {\n exposed: this.exposed\n }\n }\n }\n },\n computed: {\n globalDisabled () {\n return this.executeExpression(this.disabled)\n },\n formRef () {\n return uuidv4()\n },\n exposed () {\n return {\n setFieldsValue: this.setFieldsValue,\n validateFields: this.validateFields\n }\n },\n assignAttrForEvents () {\n const events = this.footerElements.reduce((ret, ele) => {\n ret[ele.eventName] = (e) => {\n this.$emit(ele.eventName || 'click', { ...e, formModel: this.formModels(), exposed: this.exposed })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL]\n }\n },\n elements () {\n const { elements } = this.formMeta\n return elements\n },\n preRequest () {\n const { preRequest = {} } = this.formMeta\n return preRequest\n },\n infoRequest () {\n const { infoRequest = {} } = this.formMeta\n return infoRequest\n },\n alertMeta () {\n const { alert = {} } = this.formMeta\n return type.isEmpty(alert) ? null : alert\n },\n submitRequest () {\n const { submitRequest = {} } = this.formMeta\n return submitRequest\n },\n footerElements () {\n const { elements } = this.footerMeta\n return elements.call(this)\n },\n expressionData () {\n return {\n _route: this.$route.query,\n _routeMeta: this.$route.meta\n }\n },\n routeMetaMode () {\n return this.$route.meta.mode\n }\n },\n methods: {\n formModels () {\n return this.$refs[this.formRef] ? this.$refs[this.formRef].getFieldsValue() : {}\n },\n executeExpression (expression, dataSource = {}) {\n if (type.isBool(expression)) return expression\n if (type.isEmpty(expression)) return false\n return parse(expression, { ...this.expressionData, ...this.formModels(), ...dataSource })\n },\n execFieldMap (fieldMap = {}, dataSource = {}) {\n const ret = parseFieldMap(fieldMap, { ...this.expressionData, ...dataSource})\n return ret\n },\n async submitRequestTrigger (props = {}) {\n const { url, requestType, headers = {}, params = {}, fieldMap = {} } = this.submitRequest\n const currentUrl = this.executeExpressionForUrl(url)\n if (!currentUrl) return\n const ret = await net[requestType.toLowerCase()](currentUrl, { ...params, ...this.execFieldMap(fieldMap, { ...this.formModels() }), ...this.formModels() }, { headers }).then(resp => {\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels(), ...resp.data || {} } })\n return resp.data\n })\n return ret\n },\n async infoRequestTrigger () {\n if (PAGE_STATUS.CREATE == this.routeMetaMode) return\n const { url, requestType, params = {}, fieldMap = {}, headers = {} } = this.infoRequest\n const currentUrl = this.executeExpressionForUrl(url)\n if (!currentUrl) return\n net[requestType.toLowerCase()](currentUrl, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers }).then(resp => {\n const { data = {} } = resp\n this.setFieldsValue(data)\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\n })\n },\n async preRequestTrigger () {\n const { url, requestType = 'GET', params = {}, fieldMap = {}, headers = {} } = this.preRequest\n const currentUrl = this.executeExpressionForUrl(url)\n if (!currentUrl) return\n const { data } = await net[requestType.toLowerCase()](currentUrl, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers })\n this.setFieldsValue(data)\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\n },\n executeExpressionForUrl (url) {\n return type.isApi(url) ? url : this.executeExpression(url)\n },\n setFieldsValue (props) {\n this.$refs[this.formRef].setFieldsValue(props)\n },\n validateFields () {\n return this.$refs[this.formRef].validateFields()\n },\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\n if (this.globalDisabled) return\n const status = this.$refs[this.formRef].validateFields()\n if (status) {\n //TODO fieldMap\n return this.submitRequestTrigger(props)\n } else {\n return false\n }\n },\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\n }\n },\n async mounted() {\n await this.preRequestTrigger()\n await this.infoRequestTrigger()\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.form__model--wrapper {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n .form-model__title {\n height: 56px;\n padding: 0 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid var(--idooel-form-title-border-color);\n }\n .form-model__content {\n padding: 16px;\n }\n .form-model__footer {\n /* width: 100%; */\n height: 64px;\n position: fixed;\n bottom: 0;\n display: flex;\n float: right;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n }\n}\n</style>",".form__model--wrapper {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title {\n height: 56px;\n padding: 0 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid var(--idooel-form-title-border-color);\n}\n.form__model--wrapper .form-model__content {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer {\n /* width: 100%; */\n height: 64px;\n position: fixed;\n bottom: 0;\n display: flex;\n float: right;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
3583
3620
|
|
|
3584
3621
|
};
|
|
3585
3622
|
/* scoped */
|
|
3586
|
-
const __vue_scope_id__$
|
|
3623
|
+
const __vue_scope_id__$t = "data-v-02358f9a";
|
|
3587
3624
|
/* module identifier */
|
|
3588
|
-
const __vue_module_identifier__$
|
|
3625
|
+
const __vue_module_identifier__$t = undefined;
|
|
3589
3626
|
/* functional template */
|
|
3590
|
-
const __vue_is_functional_template__$
|
|
3627
|
+
const __vue_is_functional_template__$t = false;
|
|
3591
3628
|
/* style inject SSR */
|
|
3592
3629
|
|
|
3593
3630
|
/* style inject shadow dom */
|
|
3594
3631
|
|
|
3595
3632
|
|
|
3596
3633
|
|
|
3597
|
-
const __vue_component__$
|
|
3598
|
-
{ render: __vue_render__$
|
|
3599
|
-
__vue_inject_styles__$
|
|
3600
|
-
__vue_script__$
|
|
3601
|
-
__vue_scope_id__$
|
|
3602
|
-
__vue_is_functional_template__$
|
|
3603
|
-
__vue_module_identifier__$
|
|
3634
|
+
const __vue_component__$t = /*#__PURE__*/normalizeComponent(
|
|
3635
|
+
{ render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
|
|
3636
|
+
__vue_inject_styles__$t,
|
|
3637
|
+
__vue_script__$t,
|
|
3638
|
+
__vue_scope_id__$t,
|
|
3639
|
+
__vue_is_functional_template__$t,
|
|
3640
|
+
__vue_module_identifier__$t,
|
|
3604
3641
|
false,
|
|
3605
3642
|
createInjector,
|
|
3606
3643
|
undefined,
|
|
@@ -3608,7 +3645,7 @@ __vue_render__$s._withStripped = true;
|
|
|
3608
3645
|
);
|
|
3609
3646
|
|
|
3610
3647
|
//
|
|
3611
|
-
var script$
|
|
3648
|
+
var script$s = {
|
|
3612
3649
|
name: 'ele-step-model',
|
|
3613
3650
|
props: {
|
|
3614
3651
|
stepMeta: {
|
|
@@ -3799,10 +3836,10 @@ var script$r = {
|
|
|
3799
3836
|
};
|
|
3800
3837
|
|
|
3801
3838
|
/* script */
|
|
3802
|
-
const __vue_script__$
|
|
3839
|
+
const __vue_script__$s = script$s;
|
|
3803
3840
|
|
|
3804
3841
|
/* template */
|
|
3805
|
-
var __vue_render__$
|
|
3842
|
+
var __vue_render__$s = function () {
|
|
3806
3843
|
var _vm = this;
|
|
3807
3844
|
var _h = _vm.$createElement;
|
|
3808
3845
|
var _c = _vm._self._c || _h;
|
|
@@ -3868,34 +3905,34 @@ var __vue_render__$r = function () {
|
|
|
3868
3905
|
),
|
|
3869
3906
|
])
|
|
3870
3907
|
};
|
|
3871
|
-
var __vue_staticRenderFns__$
|
|
3872
|
-
__vue_render__$
|
|
3908
|
+
var __vue_staticRenderFns__$s = [];
|
|
3909
|
+
__vue_render__$s._withStripped = true;
|
|
3873
3910
|
|
|
3874
3911
|
/* style */
|
|
3875
|
-
const __vue_inject_styles__$
|
|
3912
|
+
const __vue_inject_styles__$s = function (inject) {
|
|
3876
3913
|
if (!inject) return
|
|
3877
3914
|
inject("data-v-1919f228_0", { source: ".ele-step-model__wrapper[data-v-1919f228] {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper[data-v-1919f228] {\n width: 100%;\n height: 64px;\n padding: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper .ele-steps .ant-steps-item[data-v-1919f228] {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper[data-v-1919f228] {\n width: 100%;\n width: 100%;\n margin-top: 16px;\n margin-bottom: 16px;\n height: calc(100vh - 64px - 64px - 16px - 16px);\n overflow: auto;\n}\n.ele-step-model__wrapper .ele-step-model__footer--wrapper[data-v-1919f228] {\n width: 100%;\n height: 64px;\n background: #fff;\n position: absolute;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/models/step-model/src/index.vue","index.vue"],"names":[],"mappings":"AAwLA;EACA,WAAA;EACA,aAAA;EACA,kBAAA;ACvLA;ADwLA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,gBAAA;ACtLA;ADwLA;EACA,gBAAA;ACtLA;AD0LA;EACA,WAAA;EACA,WAAA;EACA,gBAAA;EACA,mBAAA;EACA,+CAAA;EACA,cAAA;ACxLA;AD0LA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;ACxLA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele-step-model__wrapper\">\n <div class=\"ele-step-model__step--wrapper\">\n <a-steps class=\"ele-steps\" :current=\"current\" size=\"small\">\n <a-step v-for=\"step in elements\" :title=\"step.title\" :key=\"step.key\" />\n </a-steps>\n </div>\n <div class=\"ele-step-model__content--wrapper\">\n <template v-for=\"name in scopedSlotsNames\">\n <div :key=\"name\" v-if=\"currentSlotName == name\" :class=\"['ele-step-model__slot', `ele-step-model__slot--${name}`]\">\n <slot :name=\"name\"></slot>\n </div>\n </template>\n </div>\n <div class=\"ele-step-model__footer--wrapper\">\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\n </div>\n </div>\n</template>\n\n<script>\nimport { BUILT_IN_EVENT_NAMES, CONTEXT } from '../../../utils'\nimport { parse } from '@idooel/expression'\nimport { type } from '@idooel/shared'\nexport default {\n name: 'ele-step-model',\n props: {\n stepMeta: {\n type: Object,\n default: () => ({})\n },\n footerMeta: {\n type: Object,\n default: () => ({})\n }\n },\n data() {\n return {\n current: 0,\n currentSlotComponentRef: null,\n innerFooterElements: []\n }\n },\n provide() {\n return {\n [CONTEXT]: () => {\n return {\n ...this.expressionData\n }\n }\n }\n },\n computed: {\n routeMetaDisabled () {\n return this.executeExpression(this.$route.meta.disabled)\n },\n expressionData () {\n return {\n current: this.current,\n _route: this.$route.query,\n _routeMeta: this.$route.meta\n }\n },\n currentSlotName () {\n return this.scopedSlotsNames[this.current]\n },\n footerElements () {\n return this.innerFooterElements\n },\n assignAttrForEvents () {\n const events = this.footerElements.reduce((ret, ele) => {\n ret[ele.eventName] = (e) => {\n this.evalShowExpressionForFooterElements()\n this.$emit(ele.eventName || 'click', { ...e, exposed: this.exposedMethods })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.NEXT]: this[BUILT_IN_EVENT_NAMES.NEXT],\n [BUILT_IN_EVENT_NAMES.PREVIOUS]: this[BUILT_IN_EVENT_NAMES.PREVIOUS],\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT]\n }\n },\n activeIndex () {\n const { activeIndex } = this.stepMeta\n return activeIndex\n },\n elements () {\n const { elements } = this.stepMeta\n return elements\n },\n scopedSlotsNames () {\n const slotNames = this.elements.map(item => item.key)\n return slotNames\n },\n exposedMethods () {\n return {\n slotRef: this.currentSlotComponentRef,\n setCurrentStep: this.setCurrentStep,\n next: this.nextStep,\n prev: this.prevStep,\n current: this.current\n }\n }\n },\n watch: {\n activeIndex: {\n handler (idx) {\n this.current = idx\n },\n immediate: true\n },\n current: {\n handler () {\n this.$nextTick(() => {\n this.currentSlotComponentRef = this.getCurrentSlotComponentRef()\n })\n },\n immediate: true\n }\n },\n created () {\n const { elements } = this.footerMeta\n this.innerFooterElements = elements.call(this)\n this.evalShowExpressionForFooterElements()\n },\n methods: {\n executeExpression (expression) {\n if (type.isBool(expression)) return expression\n if (type.isEmpty(expression)) return false\n return parse(expression, { ...this.expressionData })\n },\n evalShowExpressionForFooterElements () {\n this.innerFooterElements = this.innerFooterElements.map(element => {\n const { show = true, key, eventName } = element\n if(key == BUILT_IN_EVENT_NAMES.SUBMIT || eventName == BUILT_IN_EVENT_NAMES.SUBMIT) {\n // built in submit button should according to the route meta disabled\n this.$set(element, '_show', this.executeExpression(show, this.expressionData) && !this.routeMetaDisabled)\n return element\n }\n show && this.$set(element, '_show', this.executeExpression(show, this.expressionData))\n return element\n })\n },\n getCurrentSlotComponentRef () {\n const includeMetaCmp = this.$children.find(child => child.meta)\n if (!includeMetaCmp) return null\n const { $children: components } = includeMetaCmp\n const target = components.find(cmp => cmp.$options._componentTag === 'ele-tpl')\n return target.getModel ? target.getModel() : null\n },\n setCurrentStep (index) {\n this.current = index\n this.evalShowExpressionForFooterElements()\n },\n nextStep () {\n if (this.current >= this.elements.length - 1) return\n this.current ++\n this.evalShowExpressionForFooterElements()\n },\n prevStep () {\n if (this.current <= 0) return\n this.current --\n this.evalShowExpressionForFooterElements()\n },\n [BUILT_IN_EVENT_NAMES.NEXT] (props) {\n this.$emit(BUILT_IN_EVENT_NAMES.NEXT, { ...props, exposed: { ...this.exposedMethods } })\n },\n [BUILT_IN_EVENT_NAMES.PREVIOUS] (props) {\n this.$emit(BUILT_IN_EVENT_NAMES.PREVIOUS, { ...props, exposed: { ...this.exposedMethods } })\n },\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props) {\n const currentComponent = this.getCurrentSlotComponentRef() || {}\n const hasSubmitMethod = currentComponent.hasOwnProperty(BUILT_IN_EVENT_NAMES.SUBMIT)\n hasSubmitMethod && currentComponent[BUILT_IN_EVENT_NAMES.SUBMIT]()\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, exposed: { ...this.exposedMethods } })\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele-step-model__wrapper {\n width: 100%;\n height: 100vh;\n position: relative;\n .ele-step-model__step--wrapper {\n width: 100%;\n height: 64px;\n padding: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n .ele-steps {\n .ant-steps-item {\n text-align: left;\n }\n }\n }\n .ele-step-model__content--wrapper {\n width: 100%;\n width: 100%;\n margin-top: 16px;\n margin-bottom: 16px;\n height: calc(100vh - 64px - 64px - 16px - 16px);\n overflow: auto;\n }\n .ele-step-model__footer--wrapper {\n width: 100%;\n height: 64px;\n background: #fff;\n position: absolute;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n }\n}\n</style>import meta from '@/views/tree-table-page/meta'import meta from '@/views/tree-table-page/meta'\n\n",".ele-step-model__wrapper {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper {\n width: 100%;\n height: 64px;\n padding: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper .ele-steps .ant-steps-item {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper {\n width: 100%;\n width: 100%;\n margin-top: 16px;\n margin-bottom: 16px;\n height: calc(100vh - 64px - 64px - 16px - 16px);\n overflow: auto;\n}\n.ele-step-model__wrapper .ele-step-model__footer--wrapper {\n width: 100%;\n height: 64px;\n background: #fff;\n position: absolute;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
3878
3915
|
|
|
3879
3916
|
};
|
|
3880
3917
|
/* scoped */
|
|
3881
|
-
const __vue_scope_id__$
|
|
3918
|
+
const __vue_scope_id__$s = "data-v-1919f228";
|
|
3882
3919
|
/* module identifier */
|
|
3883
|
-
const __vue_module_identifier__$
|
|
3920
|
+
const __vue_module_identifier__$s = undefined;
|
|
3884
3921
|
/* functional template */
|
|
3885
|
-
const __vue_is_functional_template__$
|
|
3922
|
+
const __vue_is_functional_template__$s = false;
|
|
3886
3923
|
/* style inject SSR */
|
|
3887
3924
|
|
|
3888
3925
|
/* style inject shadow dom */
|
|
3889
3926
|
|
|
3890
3927
|
|
|
3891
3928
|
|
|
3892
|
-
const __vue_component__$
|
|
3893
|
-
{ render: __vue_render__$
|
|
3894
|
-
__vue_inject_styles__$
|
|
3895
|
-
__vue_script__$
|
|
3896
|
-
__vue_scope_id__$
|
|
3897
|
-
__vue_is_functional_template__$
|
|
3898
|
-
__vue_module_identifier__$
|
|
3929
|
+
const __vue_component__$s = /*#__PURE__*/normalizeComponent(
|
|
3930
|
+
{ render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
|
|
3931
|
+
__vue_inject_styles__$s,
|
|
3932
|
+
__vue_script__$s,
|
|
3933
|
+
__vue_scope_id__$s,
|
|
3934
|
+
__vue_is_functional_template__$s,
|
|
3935
|
+
__vue_module_identifier__$s,
|
|
3899
3936
|
false,
|
|
3900
3937
|
createInjector,
|
|
3901
3938
|
undefined,
|
|
@@ -3903,7 +3940,7 @@ __vue_render__$r._withStripped = true;
|
|
|
3903
3940
|
);
|
|
3904
3941
|
|
|
3905
3942
|
//
|
|
3906
|
-
var script$
|
|
3943
|
+
var script$r = {
|
|
3907
3944
|
name: 'ele-tpl',
|
|
3908
3945
|
props: {
|
|
3909
3946
|
modelName: {
|
|
@@ -3911,10 +3948,10 @@ var script$q = {
|
|
|
3911
3948
|
}
|
|
3912
3949
|
},
|
|
3913
3950
|
components: {
|
|
3951
|
+
[__vue_component__$v.name]: __vue_component__$v,
|
|
3914
3952
|
[__vue_component__$u.name]: __vue_component__$u,
|
|
3915
|
-
[__vue_component__$
|
|
3916
|
-
[__vue_component__$
|
|
3917
|
-
[__vue_component__$s.name]: __vue_component__$s
|
|
3953
|
+
[__vue_component__$s.name]: __vue_component__$s,
|
|
3954
|
+
[__vue_component__$t.name]: __vue_component__$t
|
|
3918
3955
|
},
|
|
3919
3956
|
computed: {
|
|
3920
3957
|
modelNameValidator() {
|
|
@@ -3936,10 +3973,10 @@ var script$q = {
|
|
|
3936
3973
|
};
|
|
3937
3974
|
|
|
3938
3975
|
/* script */
|
|
3939
|
-
const __vue_script__$
|
|
3976
|
+
const __vue_script__$r = script$r;
|
|
3940
3977
|
|
|
3941
3978
|
/* template */
|
|
3942
|
-
var __vue_render__$
|
|
3979
|
+
var __vue_render__$r = function () {
|
|
3943
3980
|
var _vm = this;
|
|
3944
3981
|
var _h = _vm.$createElement;
|
|
3945
3982
|
var _c = _vm._self._c || _h;
|
|
@@ -3977,44 +4014,44 @@ var __vue_render__$q = function () {
|
|
|
3977
4014
|
domProps: { innerHTML: _vm._s(_vm.modelNameValidator.message) },
|
|
3978
4015
|
})
|
|
3979
4016
|
};
|
|
3980
|
-
var __vue_staticRenderFns__$
|
|
3981
|
-
__vue_render__$
|
|
4017
|
+
var __vue_staticRenderFns__$r = [];
|
|
4018
|
+
__vue_render__$r._withStripped = true;
|
|
3982
4019
|
|
|
3983
4020
|
/* style */
|
|
3984
|
-
const __vue_inject_styles__$
|
|
4021
|
+
const __vue_inject_styles__$r = function (inject) {
|
|
3985
4022
|
if (!inject) return
|
|
3986
4023
|
inject("data-v-cb05e1de_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,uCAAuC;EACvC,uCAAuC;EACvC,mDAAmD;EACnD,4BAA4B;EAC5B,4BAA4B;EAC5B,0BAA0B;EAC1B,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,gCAAgC;EAChC,4BAA4B;EAC5B,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;AAEA;EACE,4DAA4D;AAC9D;AAEA;EACE,4DAA4D;AAC9D;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
3987
4024
|
|
|
3988
4025
|
};
|
|
3989
4026
|
/* scoped */
|
|
3990
|
-
const __vue_scope_id__$
|
|
4027
|
+
const __vue_scope_id__$r = undefined;
|
|
3991
4028
|
/* module identifier */
|
|
3992
|
-
const __vue_module_identifier__$
|
|
4029
|
+
const __vue_module_identifier__$r = undefined;
|
|
3993
4030
|
/* functional template */
|
|
3994
|
-
const __vue_is_functional_template__$
|
|
4031
|
+
const __vue_is_functional_template__$r = false;
|
|
3995
4032
|
/* style inject SSR */
|
|
3996
4033
|
|
|
3997
4034
|
/* style inject shadow dom */
|
|
3998
4035
|
|
|
3999
4036
|
|
|
4000
4037
|
|
|
4001
|
-
const __vue_component__$
|
|
4002
|
-
{ render: __vue_render__$
|
|
4003
|
-
__vue_inject_styles__$
|
|
4004
|
-
__vue_script__$
|
|
4005
|
-
__vue_scope_id__$
|
|
4006
|
-
__vue_is_functional_template__$
|
|
4007
|
-
__vue_module_identifier__$
|
|
4038
|
+
const __vue_component__$r = /*#__PURE__*/normalizeComponent(
|
|
4039
|
+
{ render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
|
|
4040
|
+
__vue_inject_styles__$r,
|
|
4041
|
+
__vue_script__$r,
|
|
4042
|
+
__vue_scope_id__$r,
|
|
4043
|
+
__vue_is_functional_template__$r,
|
|
4044
|
+
__vue_module_identifier__$r,
|
|
4008
4045
|
false,
|
|
4009
4046
|
createInjector,
|
|
4010
4047
|
undefined,
|
|
4011
4048
|
undefined
|
|
4012
4049
|
);
|
|
4013
4050
|
|
|
4014
|
-
__vue_component__$
|
|
4051
|
+
__vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __vue_component__$r);
|
|
4015
4052
|
|
|
4016
4053
|
//
|
|
4017
|
-
var script$
|
|
4054
|
+
var script$q = {
|
|
4018
4055
|
name: 'ele-form',
|
|
4019
4056
|
props: {
|
|
4020
4057
|
disabled: {
|
|
@@ -4151,10 +4188,10 @@ var script$p = {
|
|
|
4151
4188
|
};
|
|
4152
4189
|
|
|
4153
4190
|
/* script */
|
|
4154
|
-
const __vue_script__$
|
|
4191
|
+
const __vue_script__$q = script$q;
|
|
4155
4192
|
|
|
4156
4193
|
/* template */
|
|
4157
|
-
var __vue_render__$
|
|
4194
|
+
var __vue_render__$q = function () {
|
|
4158
4195
|
var _vm = this;
|
|
4159
4196
|
var _h = _vm.$createElement;
|
|
4160
4197
|
var _c = _vm._self._c || _h;
|
|
@@ -4588,41 +4625,41 @@ var __vue_render__$p = function () {
|
|
|
4588
4625
|
1
|
|
4589
4626
|
)
|
|
4590
4627
|
};
|
|
4591
|
-
var __vue_staticRenderFns__$
|
|
4592
|
-
__vue_render__$
|
|
4628
|
+
var __vue_staticRenderFns__$q = [];
|
|
4629
|
+
__vue_render__$q._withStripped = true;
|
|
4593
4630
|
|
|
4594
4631
|
/* style */
|
|
4595
|
-
const __vue_inject_styles__$
|
|
4632
|
+
const __vue_inject_styles__$q = function (inject) {
|
|
4596
4633
|
if (!inject) return
|
|
4597
4634
|
inject("data-v-80dc2882_0", { source: ".ele__form--wrapper[data-v-80dc2882] {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/form/src/index.vue","index.vue"],"names":[],"mappings":"AAwPA;EACA,gBAAA;ACvPA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele__form--wrapper\">\n <a-form :form=\"form\" layout=\"vertical\" class=\"ant-advanced-search-form\">\n <a-row :gutter=\"24\">\n <template v-for=\"ele in elements\">\n <a-col v-if=\"executeExpression(ele._show)\" :span=\"ele.span\" :key=\"ele.name\">\n <template v-if=\"ele.type == 'Input'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-input \n @change=\"onChange($event, ele)\" \n :disabled=\"executeExpression(ele._disabled)\" \n :max-length=\"ele.maxLength\" \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-input>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'Textarea'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-textarea \n @change=\"onChange($event, ele)\"\n :max-length=\"ele.maxLength\"\n :autosize=\"ele.autosize\"\n :disabled=\"executeExpression(ele._disabled)\"\n :allow-clear=\"ele.allowClear\"\n :placeholder=\"ele.placeholder\"\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\"\n style=\"width:100%;\">\n </ele-textarea>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'Select'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-select \n :data-source=\"ele.optionList\" \n :disabled=\"executeExpression(ele._disabled)\"\n :multiple=\"ele.multiple\"\n :mode=\"ele.mode\"\n :code=\"ele.code\" \n :params=\"ele.params\" \n @change=\"onChange($event, ele)\"\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-select>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'ele-upload'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-upload v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n :ext=\"ele.ext\"\n :multiple=\"ele.multiple\"\n :accept=\"ele.accept\"\n :extensions=\"ele.extensions\"\n :size=\"ele.size\"\n :icon=\"ele.icon\"\n :url=\"ele.url\"\n :message=\"ele.message\" \n style=\"width:100%;\">\n </ele-upload>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'ele-date-range'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-date-range \n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-date-range>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'ele-date'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-date\n :format=\"ele.format\"\n :mode=\"ele.mode\"\n :show-time=\"ele.showTime\"\n :show-today=\"ele.showToday\"\n :value-format=\"ele.valueFormat\"\n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-date>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'SelectEntity'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-select-entity \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-select-entity>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'InputNumber'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-input-number \n @change=\"onChange($event, ele)\" \n :precision=\"ele.precision\" \n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n v-bind=\"ele.props\" \n style=\"width:100%;\">\n </ele-input-number>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'Checkbox'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-checkbox \n :data-source=\"ele.optionList\" \n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-checkbox>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'Radio'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-radio \n @change=\"onChange($event, ele)\" \n :disabled=\"executeExpression(ele._disabled)\" \n :data-source=\"ele.optionList\" \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-radio>\n </a-form-item>\n </template>\n </a-col>\n </template>\n </a-row>\n </a-form>\n </div>\n</template>\n\n<script>\nimport { parse } from '@idooel/expression'\nimport { type } from '@idooel/shared'\nexport default {\n name: 'ele-form',\n props: {\n disabled: {\n type: [Boolean, String],\n default: '_routeMeta.disabled'\n },\n formName: {\n type: [Number, String],\n default: 'coordinated'\n },\n elements: {\n type: Array,\n default: () => []\n }\n },\n data () {\n return {}\n },\n computed: {\n globalDisabled () {\n return this.executeExpression(this.disabled)\n },\n form () {\n return this.$form.createForm(this, { name: this.formName })\n },\n exposedMethods () {\n return {\n setFieldsValue: this.setFieldsValue,\n getFieldsValue: this.getFieldsValue\n }\n }\n },\n methods: {\n rebuildRules (rules = []) {\n //TODO\n rules.map(rule => {\n const { validator } = rule\n if (validator) {\n validator.formModel = this.getFieldsValue()\n validator.exposed = this.exposedMethods\n }\n })\n return rules\n },\n dispatchExpression () {\n this.evalDisabledExpression()\n this.evalShowExpression()\n },\n evalDisabledExpression () {\n this.elements.forEach(ele => {\n if (this.globalDisabled) return this.$set(ele, '_disabled', true)\n const { disabled } = ele\n const ret = this.executeExpression(disabled)\n this.$set(ele, '_disabled', ret)\n })\n },\n evalShowExpression () {\n this.elements.forEach(ele => {\n const { show = true } = ele\n const ret = this.executeExpression(show)\n this.$set(ele, '_show', ret)\n })\n },\n executeExpression (expression) {\n if (type.isBool(expression)) return expression\n if (type.isEmpty(expression)) return false\n return parse(expression, { ...this.getFieldsValue(), _route: this.$route.query, _routeMeta: this.$route.meta })\n },\n onChange (value, props) {\n const { name } = props\n this.setFieldsValue({ [name]: value })\n this.dispatchExpression()\n this.$emit('change', { value, props, exposed: { ...this.exposedMethods } })\n },\n collectDefaultValues () {\n const ret = this.elements.reduce((ret, props) => {\n const { name, defaultValue } = props\n if (defaultValue) {\n ret[name] = defaultValue\n }\n return ret\n }, {})\n return ret\n },\n setDefaultValues () {\n const defaultValues = this.collectDefaultValues()\n this.setFieldsValue(defaultValues)\n },\n validateFields () {\n let ret = false\n this.form.validateFields((error, values) => {\n ret = !error\n })\n return ret\n },\n setFieldsValue (props = {}) {\n this.form.setFieldsValue(props)\n },\n getFieldsValue () {\n return this.form.getFieldsValue()\n }\n },\n mounted() {\n this.dispatchExpression()\n this.$nextTick(() => {\n this.setDefaultValues()\n })\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele__form--wrapper {\n background: #fff;\n .ant-form-item {\n }\n}\n</style>",".ele__form--wrapper {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
4598
4635
|
|
|
4599
4636
|
};
|
|
4600
4637
|
/* scoped */
|
|
4601
|
-
const __vue_scope_id__$
|
|
4638
|
+
const __vue_scope_id__$q = "data-v-80dc2882";
|
|
4602
4639
|
/* module identifier */
|
|
4603
|
-
const __vue_module_identifier__$
|
|
4640
|
+
const __vue_module_identifier__$q = undefined;
|
|
4604
4641
|
/* functional template */
|
|
4605
|
-
const __vue_is_functional_template__$
|
|
4642
|
+
const __vue_is_functional_template__$q = false;
|
|
4606
4643
|
/* style inject SSR */
|
|
4607
4644
|
|
|
4608
4645
|
/* style inject shadow dom */
|
|
4609
4646
|
|
|
4610
4647
|
|
|
4611
4648
|
|
|
4612
|
-
const __vue_component__$
|
|
4613
|
-
{ render: __vue_render__$
|
|
4614
|
-
__vue_inject_styles__$
|
|
4615
|
-
__vue_script__$
|
|
4616
|
-
__vue_scope_id__$
|
|
4617
|
-
__vue_is_functional_template__$
|
|
4618
|
-
__vue_module_identifier__$
|
|
4649
|
+
const __vue_component__$q = /*#__PURE__*/normalizeComponent(
|
|
4650
|
+
{ render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
|
|
4651
|
+
__vue_inject_styles__$q,
|
|
4652
|
+
__vue_script__$q,
|
|
4653
|
+
__vue_scope_id__$q,
|
|
4654
|
+
__vue_is_functional_template__$q,
|
|
4655
|
+
__vue_module_identifier__$q,
|
|
4619
4656
|
false,
|
|
4620
4657
|
createInjector,
|
|
4621
4658
|
undefined,
|
|
4622
4659
|
undefined
|
|
4623
4660
|
);
|
|
4624
4661
|
|
|
4625
|
-
__vue_component__$
|
|
4662
|
+
__vue_component__$q.install = Vue => Vue.component(__vue_component__$q.name, __vue_component__$q);
|
|
4626
4663
|
|
|
4627
4664
|
//
|
|
4628
4665
|
//
|
|
@@ -4636,7 +4673,7 @@ __vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __v
|
|
|
4636
4673
|
//
|
|
4637
4674
|
//
|
|
4638
4675
|
|
|
4639
|
-
var script$
|
|
4676
|
+
var script$p = {
|
|
4640
4677
|
name: 'ele-alert',
|
|
4641
4678
|
props: {
|
|
4642
4679
|
type: {
|
|
@@ -4665,10 +4702,10 @@ var script$o = {
|
|
|
4665
4702
|
};
|
|
4666
4703
|
|
|
4667
4704
|
/* script */
|
|
4668
|
-
const __vue_script__$
|
|
4705
|
+
const __vue_script__$p = script$p;
|
|
4669
4706
|
|
|
4670
4707
|
/* template */
|
|
4671
|
-
var __vue_render__$
|
|
4708
|
+
var __vue_render__$p = function () {
|
|
4672
4709
|
var _vm = this;
|
|
4673
4710
|
var _h = _vm.$createElement;
|
|
4674
4711
|
var _c = _vm._self._c || _h;
|
|
@@ -4684,44 +4721,44 @@ var __vue_render__$o = function () {
|
|
|
4684
4721
|
},
|
|
4685
4722
|
})
|
|
4686
4723
|
};
|
|
4687
|
-
var __vue_staticRenderFns__$
|
|
4688
|
-
__vue_render__$
|
|
4724
|
+
var __vue_staticRenderFns__$p = [];
|
|
4725
|
+
__vue_render__$p._withStripped = true;
|
|
4689
4726
|
|
|
4690
4727
|
/* style */
|
|
4691
|
-
const __vue_inject_styles__$
|
|
4728
|
+
const __vue_inject_styles__$p = function (inject) {
|
|
4692
4729
|
if (!inject) return
|
|
4693
4730
|
inject("data-v-ee7d6de4_0", { source: ".ele-alert[data-v-ee7d6de4] {\n text-align: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/alert/src/index.vue","index.vue"],"names":[],"mappings":"AA0CA;EACA,2BAAA;ACzCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <a-alert\n class=\"ele-alert\"\n :message=\"message\" \n :description=\"description\" \n :type=\"type\"\n :closable=\"closable\"\n :closeText=\"closeText\"\n :show-icon=\"showIcon\" />\n</template>\n\n<script>\nexport default {\n name: 'ele-alert',\n props: {\n type: {\n type: String,\n default: 'success'\n },\n showIcon: {\n type: Boolean,\n default: true\n },\n message: {\n type: String,\n default: 'Success Tips'\n },\n description: {\n type: String\n },\n closable: {\n type: Boolean,\n default: true\n },\n closeText: {\n type: String\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele-alert {\n text-align: left !important;\n}\n</style>",".ele-alert {\n text-align: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
4694
4731
|
|
|
4695
4732
|
};
|
|
4696
4733
|
/* scoped */
|
|
4697
|
-
const __vue_scope_id__$
|
|
4734
|
+
const __vue_scope_id__$p = "data-v-ee7d6de4";
|
|
4698
4735
|
/* module identifier */
|
|
4699
|
-
const __vue_module_identifier__$
|
|
4736
|
+
const __vue_module_identifier__$p = undefined;
|
|
4700
4737
|
/* functional template */
|
|
4701
|
-
const __vue_is_functional_template__$
|
|
4738
|
+
const __vue_is_functional_template__$p = false;
|
|
4702
4739
|
/* style inject SSR */
|
|
4703
4740
|
|
|
4704
4741
|
/* style inject shadow dom */
|
|
4705
4742
|
|
|
4706
4743
|
|
|
4707
4744
|
|
|
4708
|
-
const __vue_component__$
|
|
4709
|
-
{ render: __vue_render__$
|
|
4710
|
-
__vue_inject_styles__$
|
|
4711
|
-
__vue_script__$
|
|
4712
|
-
__vue_scope_id__$
|
|
4713
|
-
__vue_is_functional_template__$
|
|
4714
|
-
__vue_module_identifier__$
|
|
4745
|
+
const __vue_component__$p = /*#__PURE__*/normalizeComponent(
|
|
4746
|
+
{ render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
|
|
4747
|
+
__vue_inject_styles__$p,
|
|
4748
|
+
__vue_script__$p,
|
|
4749
|
+
__vue_scope_id__$p,
|
|
4750
|
+
__vue_is_functional_template__$p,
|
|
4751
|
+
__vue_module_identifier__$p,
|
|
4715
4752
|
false,
|
|
4716
4753
|
createInjector,
|
|
4717
4754
|
undefined,
|
|
4718
4755
|
undefined
|
|
4719
4756
|
);
|
|
4720
4757
|
|
|
4721
|
-
__vue_component__$
|
|
4758
|
+
__vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __vue_component__$p);
|
|
4722
4759
|
|
|
4723
4760
|
//
|
|
4724
|
-
var script$
|
|
4761
|
+
var script$o = {
|
|
4725
4762
|
name: 'ele-upload',
|
|
4726
4763
|
components: {
|
|
4727
4764
|
FileUpload
|
|
@@ -5062,10 +5099,10 @@ var script$n = {
|
|
|
5062
5099
|
};
|
|
5063
5100
|
|
|
5064
5101
|
/* script */
|
|
5065
|
-
const __vue_script__$
|
|
5102
|
+
const __vue_script__$o = script$o;
|
|
5066
5103
|
|
|
5067
5104
|
/* template */
|
|
5068
|
-
var __vue_render__$
|
|
5105
|
+
var __vue_render__$o = function () {
|
|
5069
5106
|
var _vm = this;
|
|
5070
5107
|
var _h = _vm.$createElement;
|
|
5071
5108
|
var _c = _vm._self._c || _h;
|
|
@@ -5227,41 +5264,41 @@ var __vue_render__$n = function () {
|
|
|
5227
5264
|
1
|
|
5228
5265
|
)
|
|
5229
5266
|
};
|
|
5230
|
-
var __vue_staticRenderFns__$
|
|
5231
|
-
__vue_render__$
|
|
5267
|
+
var __vue_staticRenderFns__$o = [];
|
|
5268
|
+
__vue_render__$o._withStripped = true;
|
|
5232
5269
|
|
|
5233
5270
|
/* style */
|
|
5234
|
-
const __vue_inject_styles__$
|
|
5271
|
+
const __vue_inject_styles__$o = function (inject) {
|
|
5235
5272
|
if (!inject) return
|
|
5236
5273
|
inject("data-v-d2929816_0", { source: "[data-v-d2929816] .ele-upload__inner {\n opacity: 1 !important;\n cursor: pointer;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color) !important;\n border-radius: var(--idooel-form-border-radius);\n}\n[data-v-d2929816] .ele-upload__inner:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n}\n.ele-upload__wrapper[data-v-d2929816] {\n width: 100%;\n}\n.ele-upload__wrapper .ele-upload__area[data-v-d2929816] {\n padding: 16px;\n width: 100%;\n height: 80px;\n display: flex;\n flex-direction: row;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon[data-v-d2929816] {\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: 16x;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload[data-v-d2929816] {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon .anticon[data-v-d2929816] {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text[data-v-d2929816] {\n margin-left: 16px;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__message[data-v-d2929816] {\n font-size: 16px;\n color: var(--idoole-black-088);\n text-align: left;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__ext[data-v-d2929816] {\n text-align: left;\n font-size: 14px;\n color: var(--idoole-black-06);\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item[data-v-d2929816] {\n width: 100%;\n margin-top: 8px;\n padding: 8px 12px;\n border-radius: var(--idooel-form-border-radius);\n background: var(--idooel-form-upload-bg-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__name[data-v-d2929816] {\n flex: 1;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n font-size: 14px;\n margin-left: 8px;\n cursor: pointer;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__name .ele-file__inner[data-v-d2929816] {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete[data-v-d2929816] {\n margin-left: 8px;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete .ele-file__delete--icon[data-v-d2929816] {\n margin-left: 8px;\n cursor: pointer;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/upload/src/index.vue","index.vue"],"names":[],"mappings":"AA2WA;EACA,qBAAA;EACA,eAAA;EACA,wDAAA;EACA,yDAAA;EAIA,+CAAA;AC7WA;AD0WA;EACA,0DAAA;ACxWA;AD4WA;EACA,WAAA;ACzWA;AD0WA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;ACxWA;ADyWA;EACA,kCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,cAAA;ACvWA;ADwWA;EACA,eAAA;EACA,kCAAA;ACtWA;ADwWA;EACA,eAAA;EACA,kCAAA;ACtWA;ADyWA;EACA,iBAAA;ACvWA;ADwWA;EACA,eAAA;EACA,8BAAA;EACA,gBAAA;ACtWA;ADwWA;EACA,gBAAA;EACA,eAAA;EACA,6BAAA;ACtWA;AD2WA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;EACA,+CAAA;EACA,8CAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACzWA;AD2WA;EACA,OAAA;EACA,gBAAA;EACA,mBAAA;EACA,gBAAA;EACA,eAAA;EACA,gBAAA;EACA,eAAA;ACzWA;AD0WA;EACA,gBAAA;EACA,uBAAA;ACxWA;AD2WA;EACA,gBAAA;ACzWA;AD0WA;EACA,gBAAA;EACA,eAAA;ACxWA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele-upload__wrapper\">\n <FileUpload\n class=\"ele-upload__inner\"\n v-show=\"isShowUploadContainer\"\n v-model=\"files\"\n :ref=\"uploadRef\"\n :drop=\"drop\"\n :chunk-enabled=\"chunkEnabled\"\n :chunk=\"chunkConfig\"\n :accept=\"accept\"\n :extensions=\"extensions\"\n :size=\"fileSizeLimit\"\n :post-action=\"postAction\"\n :multiple=\"multiple\"\n :headers=\"headers\"\n :maximum=\"getMaximum\"\n @input-file=\"onWatchInputFiles\"\n @input=\"onWatchFiles\"\n style=\"width: 100%;\">\n <section class=\"ele-upload__area\">\n <div class=\"ele-upload__area--icon\">\n <template v-if=\"iconIsZhWrod\">\n {{ icon }}\n </template>\n <template v-else>\n <ele-icon :type=\"icon\"></ele-icon>\n </template>\n </div>\n <div class=\"ele-upload__area--text\">\n <div class=\"ele-upload__message\" v-if=\"message\" v-html=\"message\"></div>\n <div class=\"ele-upload__message\" v-else>单击或拖动文件到该区域以上传</div>\n <div class=\"ele-upload__ext\" v-if=\"ext\" v-html=\"ext\"></div>\n <div class=\"ele-upload__ext\" v-else>文件小于{{ size }}M</div>\n </div>\n </section>\n </FileUpload>\n <section class=\"ele-files__wrapper\">\n <div class=\"ele-file__item\" v-for=\"(file, idx) in buildedFiles\" :key=\"idx\">\n <div class=\"ele-file__suffix--icon\">\n <ele-icon :type=\"fileSuffixIcon[file.suffix] ? fileSuffixIcon[file.suffix].name : 'icon-file'\"></ele-icon>\n </div>\n <div class=\"ele-file__name\">\n <div class=\"ele-file__inner\" @click=\"handleClickDownload(file)\">{{ file.name }}</div>\n <div v-if=\"(!file.success && file.progress)\" class=\"ele-uplpad__progress\">\n <a-progress :strokeWidth=\"2\" :percent=\"Number(file.progress)\" size=\"small\" />\n </div>\n </div>\n <div class=\"ele-file__delete\" v-if=\"file.success || file.error || !file.response\">\n <span class=\"ele-file__size\">{{ (file.size / byteConversion).toFixed(2) }}M</span>\n <span class=\"ele-file__delete--icon\" @click=\"handleClickDelete(file)\">\n <ele-icon type=\"delete\"></ele-icon>\n </span>\n </div>\n </div>\n </section>\n </div>\n</template>\n\n<script>\nimport FileUpload from 'vue-upload-component'\nimport { v4 as uuidv4 } from 'uuid'\nimport { route, net, type } from '@idooel/shared'\nexport default {\n name: 'ele-upload',\n components: {\n FileUpload\n },\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n url: {\n type: String,\n //TODO\n default: `zuul/api-file/workbench/file`\n },\n icon: {\n type: String,\n default: '上传'\n },\n size: {\n type: Number,\n default: 100\n },\n message: {\n type: String,\n default: '单击或拖动文件到该区域以上传'\n },\n ext: {\n type: String\n },\n extensions: {\n type: String\n },\n accept: {\n type: String\n },\n maximum: {\n type: Number,\n default: 10\n },\n multiple: {\n type: Boolean,\n default: false\n },\n drop: {\n type: Boolean,\n default: true\n },\n value: {\n type: [String, Array]\n },\n querys: {\n type: Object,\n default: () => ({\n _csrf: localStorage.getItem('token'),\n _t: new Date().valueOf()\n })\n },\n headers: {\n type: Object,\n default: () => ({\n 'X-XSRF-TOKEN': localStorage.getItem('token')\n })\n },\n byteConversion: {\n type: Number,\n default: 1024 * 1024\n },\n chunkEnabled: {\n type: Boolean,\n default: true\n }\n },\n data() {\n return {\n files: [],\n buildedFiles: [],\n saveToServerAsyncPageTimer: null\n }\n },\n watch: {\n value: {\n async handler (value) {\n if (type.isArray(value)) {\n // multiple\n } else if (type.isEmpty(value)) {\n this.files = []\n this.buildedFiles = []\n } else {\n // single\n this.fetchFileWithFileId()\n }\n },\n immediate: true\n }\n },\n computed: {\n prefixPath () {\n return window.prefixPath\n },\n iconIsZhWrod () {\n return type.isZhWord(this.icon)\n },\n getPayloads () {\n return {\n override: false\n }\n },\n chunkConfig () {\n return {\n action: `${this.prefixPath}zuul/api-file/workbench/file/temp/chunk/vue`,\n headers: {\n ...this.headers\n },\n minSize: 3 * this.byteConversion,\n maxActive: 3,\n maxRetries: 5,\n startBody: {\n override: true,\n path: '/cw'\n },\n uploadBody: {\n override: true,\n path: '/cw'\n },\n finishBody: {\n override: true,\n path: '/cw'\n }\n }\n },\n isFileUploadSuccessed () {\n return this.files.every(file => file.success)\n },\n isShowUploadContainer () {\n if (this.multiple) {\n if (this.isFileUploadSuccessed && this.buildedFiles.length >= this.maximum) {\n return false\n } else {\n return true\n }\n } else {\n const [file = {}] = this.buildedFiles\n if (this.buildedFiles.length < 1) {\n return true\n }\n if ((this.isFileUploadSuccessed && this.buildedFiles.length >= 1) || !file.response) {\n return false\n } else {\n return true\n }\n }\n },\n getMaximum () {\n return this.multiple ? this.maximum : 1\n },\n fileSizeLimit () {\n return this.size * this.byteConversion\n },\n postAction () {\n const ret = route.toQueryString(this.querys)\n return `${this.prefixPath}${this.url}?${ret}`\n },\n uploadRef () {\n return uuidv4()\n },\n fileSuffixIcon () {\n return {\n 'doc': { name: 'icon-doc' },\n 'html': { name: 'icon-html' },\n 'mp4': { name: 'icon-mp' },\n 'pdf': { name: 'icon-pdf' },\n 'ppt': { name: 'icon-ppt' },\n 'psd': { name: 'icon-psd' },\n 'rtf': { name: 'icon-rtf' },\n 'txt': { name: 'icon-txt' },\n 'vis': { name: 'icon-vis' },\n 'xls': { name: 'icon-xls' },\n 'xml': { name: 'icon-xml' },\n 'zip': { name: 'icon-zip' },\n 'jpg': { name: 'icon-img' },\n 'mp3': { name: 'icon-mp1' },\n }\n },\n fileIds () {\n const fileIds = this.buildedFiles.map(file => {\n return file.fileID\n })\n return this.multiple ? fileIds : fileIds[0]\n },\n fileResponseData () {\n return this.multiple ? this.buildedFiles : this.buildedFiles[0]\n }\n },\n methods: {\n async fetchFileWithFileId () {\n if (!this.value) return\n await net.get(\n `/api-file/file/${this.value}`\n ).then(resp => {\n const { data } = resp\n this.buildedFiles = [data]\n this.files = [data]\n })\n },\n handleClickDownload (file) {\n const { fileID: fileId } = file\n window.open(`/api-file/workbench/file/stream/${fileId}?origin=true`)\n },\n handleClickDelete (file) {\n this.$refs[this.uploadRef].remove(file)\n const { fileID } = file\n this.files = this.files.filter(file => file.fileID !== fileID)\n this.buildedFiles = this.buildedFiles.filter(file => file.fileID !== fileID)\n this.$emit('change', this.fileIds)\n },\n onWatchFiles (files) {\n this.files = files\n this.buildedFiles = this.files.map(file => {\n return {\n ...file.response.data,\n ...file\n }\n })\n if (this.isFileUploadSuccessed) {\n this.$emit('change', this.fileIds)\n this.$emit('on-success', this.fileResponseData)\n }\n },\n async saveToServerAsyncPage (payloads = {}) {\n net.post('zuul/api-file/workbench/file/temp/saveToServerAsyncPage', payloads, { \n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n }).then(resp =>{\n const { data } = resp\n if (data !== 'saveToServerAsyncPage') {\n clearInterval(this.saveToServerAsyncPageTimer)\n }\n })\n // const ret = await net.post({\n // url: 'zuul/api-file/workbench/file/temp/saveToServerAsyncPage',\n // method: 'POST',\n // data: { ...payloads }\n // }).then(resp => {\n // const { data: { data, code, message } } = resp\n // if (code !== '2000') {\n // this.$Message.error(message)\n // return\n // }\n // if (data !== 'saveToServerAsyncPage') {\n // clearInterval(timer)\n // const { fileID, size } = data\n // this.$emit('on-success', { ...data, fileId: fileID })\n // this.$Message.success('同步成功')\n // return { fileId: fileID, size }\n // }\n // })\n // return ret\n },\n onWatchInputFiles (newFile, oldFile) {\n if (newFile && !oldFile) {\n // add file\n console.log('add', newFile)\n }\n if (newFile && oldFile) {\n // update file\n console.log('update', newFile)\n const { success, active, chunk, response } = newFile\n if (chunk && success && !active) {\n console.log('chunk end')\n const { data: { file, type } } = response\n const payloads = {\n filePath: file.match(/\\/cw(.*)/)[0],\n asyncID: uuidv4(),\n isDeleteOrigin: false,\n toImage: type === 'pdf' ? true : false,\n unzip: type === 'zip' ? true : false,\n _csrf: localStorage.getItem('token')\n }\n this.saveToServerAsyncPageTimer = setInterval(() => {\n this.saveToServerAsyncPage(payloads)\n }, 2000)\n }\n }\n if (!newFile && oldFile) {\n // delete file\n console.log('delete')\n }\n if (Boolean(newFile) !== Boolean(oldFile) || oldFile.error !== newFile.error) {\n if (!this.$refs[this.uploadRef].active) {\n this.$refs[this.uploadRef].active = true\n }\n }\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n::v-deep .ele-upload__inner {\n opacity: 1 !important;\n cursor: pointer;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color) !important;\n &:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n }\n border-radius: var(--idooel-form-border-radius);\n}\n.ele-upload__wrapper {\n width: 100%;\n .ele-upload__area {\n padding: 16px;\n width: 100%;\n height: 80px;\n display: flex;\n flex-direction: row;\n .ele-upload__area--icon {\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: 16x;\n .anticon-cloud-upload {\n font-size: 48px;\n color: var(--idooel-primary-color);\n }\n .anticon {\n font-size: 48px;\n color: var(--idooel-primary-color);\n }\n }\n .ele-upload__area--text {\n margin-left: 16px;\n .ele-upload__message {\n font-size: 16px;\n color: var(--idoole-black-088);\n text-align: left;\n }\n .ele-upload__ext {\n text-align: left;\n font-size: 14px;\n color: var(--idoole-black-06);\n }\n }\n }\n .ele-files__wrapper {\n .ele-file__item {\n width: 100%;\n margin-top: 8px;\n padding: 8px 12px;\n border-radius: var(--idooel-form-border-radius);\n background: var(--idooel-form-upload-bg-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n .ele-file__suffix--icon {}\n .ele-file__name {\n flex: 1;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n font-size: 14px;\n margin-left: 8px;\n cursor: pointer;\n .ele-file__inner {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n .ele-file__delete {\n margin-left: 8px;\n .ele-file__delete--icon {\n margin-left: 8px;\n cursor: pointer;\n }\n }\n }\n }\n}\n</style>","::v-deep .ele-upload__inner {\n opacity: 1 !important;\n cursor: pointer;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color) !important;\n border-radius: var(--idooel-form-border-radius);\n}\n::v-deep .ele-upload__inner:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n}\n\n.ele-upload__wrapper {\n width: 100%;\n}\n.ele-upload__wrapper .ele-upload__area {\n padding: 16px;\n width: 100%;\n height: 80px;\n display: flex;\n flex-direction: row;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon {\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: 16x;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon .anticon {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text {\n margin-left: 16px;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__message {\n font-size: 16px;\n color: var(--idoole-black-088);\n text-align: left;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n text-align: left;\n font-size: 14px;\n color: var(--idoole-black-06);\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item {\n width: 100%;\n margin-top: 8px;\n padding: 8px 12px;\n border-radius: var(--idooel-form-border-radius);\n background: var(--idooel-form-upload-bg-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__name {\n flex: 1;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n font-size: 14px;\n margin-left: 8px;\n cursor: pointer;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__name .ele-file__inner {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete {\n margin-left: 8px;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete .ele-file__delete--icon {\n margin-left: 8px;\n cursor: pointer;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5237
5274
|
|
|
5238
5275
|
};
|
|
5239
5276
|
/* scoped */
|
|
5240
|
-
const __vue_scope_id__$
|
|
5277
|
+
const __vue_scope_id__$o = "data-v-d2929816";
|
|
5241
5278
|
/* module identifier */
|
|
5242
|
-
const __vue_module_identifier__$
|
|
5279
|
+
const __vue_module_identifier__$o = undefined;
|
|
5243
5280
|
/* functional template */
|
|
5244
|
-
const __vue_is_functional_template__$
|
|
5281
|
+
const __vue_is_functional_template__$o = false;
|
|
5245
5282
|
/* style inject SSR */
|
|
5246
5283
|
|
|
5247
5284
|
/* style inject shadow dom */
|
|
5248
5285
|
|
|
5249
5286
|
|
|
5250
5287
|
|
|
5251
|
-
const __vue_component__$
|
|
5252
|
-
{ render: __vue_render__$
|
|
5253
|
-
__vue_inject_styles__$
|
|
5254
|
-
__vue_script__$
|
|
5255
|
-
__vue_scope_id__$
|
|
5256
|
-
__vue_is_functional_template__$
|
|
5257
|
-
__vue_module_identifier__$
|
|
5288
|
+
const __vue_component__$o = /*#__PURE__*/normalizeComponent(
|
|
5289
|
+
{ render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
|
|
5290
|
+
__vue_inject_styles__$o,
|
|
5291
|
+
__vue_script__$o,
|
|
5292
|
+
__vue_scope_id__$o,
|
|
5293
|
+
__vue_is_functional_template__$o,
|
|
5294
|
+
__vue_module_identifier__$o,
|
|
5258
5295
|
false,
|
|
5259
5296
|
createInjector,
|
|
5260
5297
|
undefined,
|
|
5261
5298
|
undefined
|
|
5262
5299
|
);
|
|
5263
5300
|
|
|
5264
|
-
__vue_component__$
|
|
5301
|
+
__vue_component__$o.install = Vue => Vue.component(__vue_component__$o.name, __vue_component__$o);
|
|
5265
5302
|
|
|
5266
5303
|
//
|
|
5267
5304
|
//
|
|
@@ -5282,7 +5319,7 @@ __vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __v
|
|
|
5282
5319
|
//
|
|
5283
5320
|
//
|
|
5284
5321
|
|
|
5285
|
-
var script$
|
|
5322
|
+
var script$n = {
|
|
5286
5323
|
name: 'ele-select-entity',
|
|
5287
5324
|
props: {
|
|
5288
5325
|
value: {
|
|
@@ -5339,10 +5376,10 @@ var script$m = {
|
|
|
5339
5376
|
};
|
|
5340
5377
|
|
|
5341
5378
|
/* script */
|
|
5342
|
-
const __vue_script__$
|
|
5379
|
+
const __vue_script__$n = script$n;
|
|
5343
5380
|
|
|
5344
5381
|
/* template */
|
|
5345
|
-
var __vue_render__$
|
|
5382
|
+
var __vue_render__$n = function () {
|
|
5346
5383
|
var _vm = this;
|
|
5347
5384
|
var _h = _vm.$createElement;
|
|
5348
5385
|
var _c = _vm._self._c || _h;
|
|
@@ -5392,41 +5429,41 @@ var __vue_render__$m = function () {
|
|
|
5392
5429
|
2
|
|
5393
5430
|
)
|
|
5394
5431
|
};
|
|
5395
|
-
var __vue_staticRenderFns__$
|
|
5396
|
-
__vue_render__$
|
|
5432
|
+
var __vue_staticRenderFns__$n = [];
|
|
5433
|
+
__vue_render__$n._withStripped = true;
|
|
5397
5434
|
|
|
5398
5435
|
/* style */
|
|
5399
|
-
const __vue_inject_styles__$
|
|
5436
|
+
const __vue_inject_styles__$n = function (inject) {
|
|
5400
5437
|
if (!inject) return
|
|
5401
5438
|
inject("data-v-611a11f1_0", { source: ".g-select-entity__wrapper[data-v-611a11f1] {\n font-size: 14px;\n line-height: 30px;\n position: relative;\n width: 100%;\n display: flex;\n color: var(--idoole-black-07);\n border-radius: 4px;\n border: 1px solid var(--idooel-form-title-border-color);\n}\n.g-select-entity__wrapper[data-v-611a11f1]:hover {\n border-color: var(--idooel-primary-color);\n}\n.g-select-entity__wrapper .select-entity__input[data-v-611a11f1] {\n padding: 0 11px;\n background-color: #fff;\n border-radius: 4px;\n flex-grow: 1;\n min-height: 30px;\n text-align: left;\n}\n.g-select-entity__wrapper .select-entity__addon[data-v-611a11f1] {\n padding: 0 11px;\n color: var(--idoole-black-07);\n background-color: var(--idoole-black-02);\n border-left: 1px solid var(--idooel-form-title-border-color);\n cursor: pointer;\n min-height: 30px;\n white-space: nowrap;\n}\n.has-error .g-select-entity__wrapper[data-v-611a11f1] {\n border-color: var(--idooel-form-border-err-color);\n}\n.g-select-entity__disabled .select-entity__input[data-v-611a11f1] {\n background-color: var(--idoole-black-02);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/select-entity/src/index.vue","index.vue"],"names":[],"mappings":"AA6EA;EACA,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,WAAA;EACA,aAAA;EACA,6BAAA;EACA,kBAAA;EACA,uDAAA;AC5EA;AD6EA;EACA,yCAAA;AC3EA;AD6EA;EACA,eAAA;EACA,sBAAA;EACA,kBAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;AC3EA;AD6EA;EACA,eAAA;EACA,6BAAA;EACA,wCAAA;EACA,4DAAA;EACA,eAAA;EACA,gBAAA;EACA,mBAAA;AC3EA;AD8EA;EACA,iDAAA;AC3EA;AD6EA;EACA,wCAAA;AC1EA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"g-select-entity__wrapper\" :class=\"disabled ? 'g-select-entity__disabled' : ''\">\n <span class=\"select-entity__input\">\n <a-tag\n v-for=\"(item, inx) in getValueList()\"\n :key=\"item.value\"\n :closable=\"!disabled && !getIsMaxCount()\"\n @close=\"onClose(...arguments, inx)\"\n >\n {{ item.label }}\n </a-tag>\n <a-tag v-if=\"getIsMaxCount()\">......</a-tag>\n </span>\n <span class=\"select-entity__addon\" @click=\"onChange\">{{ addonAfter }}</span>\n <slot></slot>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-select-entity',\n props: {\n value: {\n type: [Array, Object]\n },\n multiple: {\n type: Boolean,\n default: true\n },\n maxCount: {\n type: Number,\n default: 7\n },\n disabled: {\n type: Boolean,\n default: false\n },\n addonAfter: {\n type: String,\n default: '选择'\n }\n },\n methods: {\n getValueList () {\n if (this.value) {\n if (this.multiple) {\n return this.getIsMaxCount() ? this.value.slice(0, this.maxCount) : this.value\n }\n return [this.value]\n }\n return []\n },\n getIsMaxCount () {\n if (this.value && this.multiple) {\n return this.value.length >= this.maxCount\n }\n return false\n },\n onChange () {\n if (this.disabled) return\n this.$emit('change', this.value)\n },\n onClose (e, inx) {\n e = window.event || e\n e.preventDefault()\n if (!this.multiple) {\n this.$emit('change', null)\n return\n }\n this.value.splice(inx, 1)\n this.$emit('change', this.value)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-select-entity__wrapper {\n font-size: 14px;\n line-height: 30px;\n position: relative;\n width: 100%;\n display: flex;\n color: var(--idoole-black-07);\n border-radius: 4px;\n border: 1px solid var(--idooel-form-title-border-color);\n &:hover {\n border-color: var(--idooel-primary-color);\n }\n .select-entity__input {\n padding: 0 11px;\n background-color: #fff;\n border-radius: 4px;\n flex-grow: 1;\n min-height: 30px;\n text-align: left;\n }\n .select-entity__addon {\n padding: 0 11px;\n color: var(--idoole-black-07);\n background-color: var(--idoole-black-02);\n border-left: 1px solid var(--idooel-form-title-border-color);\n cursor: pointer;\n min-height: 30px;\n white-space: nowrap;\n }\n}\n.has-error .g-select-entity__wrapper {\n border-color: var(--idooel-form-border-err-color);\n}\n.g-select-entity__disabled .select-entity__input {\n background-color: var(--idoole-black-02);\n}\n</style>",".g-select-entity__wrapper {\n font-size: 14px;\n line-height: 30px;\n position: relative;\n width: 100%;\n display: flex;\n color: var(--idoole-black-07);\n border-radius: 4px;\n border: 1px solid var(--idooel-form-title-border-color);\n}\n.g-select-entity__wrapper:hover {\n border-color: var(--idooel-primary-color);\n}\n.g-select-entity__wrapper .select-entity__input {\n padding: 0 11px;\n background-color: #fff;\n border-radius: 4px;\n flex-grow: 1;\n min-height: 30px;\n text-align: left;\n}\n.g-select-entity__wrapper .select-entity__addon {\n padding: 0 11px;\n color: var(--idoole-black-07);\n background-color: var(--idoole-black-02);\n border-left: 1px solid var(--idooel-form-title-border-color);\n cursor: pointer;\n min-height: 30px;\n white-space: nowrap;\n}\n\n.has-error .g-select-entity__wrapper {\n border-color: var(--idooel-form-border-err-color);\n}\n\n.g-select-entity__disabled .select-entity__input {\n background-color: var(--idoole-black-02);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5402
5439
|
|
|
5403
5440
|
};
|
|
5404
5441
|
/* scoped */
|
|
5405
|
-
const __vue_scope_id__$
|
|
5442
|
+
const __vue_scope_id__$n = "data-v-611a11f1";
|
|
5406
5443
|
/* module identifier */
|
|
5407
|
-
const __vue_module_identifier__$
|
|
5444
|
+
const __vue_module_identifier__$n = undefined;
|
|
5408
5445
|
/* functional template */
|
|
5409
|
-
const __vue_is_functional_template__$
|
|
5446
|
+
const __vue_is_functional_template__$n = false;
|
|
5410
5447
|
/* style inject SSR */
|
|
5411
5448
|
|
|
5412
5449
|
/* style inject shadow dom */
|
|
5413
5450
|
|
|
5414
5451
|
|
|
5415
5452
|
|
|
5416
|
-
const __vue_component__$
|
|
5417
|
-
{ render: __vue_render__$
|
|
5418
|
-
__vue_inject_styles__$
|
|
5419
|
-
__vue_script__$
|
|
5420
|
-
__vue_scope_id__$
|
|
5421
|
-
__vue_is_functional_template__$
|
|
5422
|
-
__vue_module_identifier__$
|
|
5423
|
-
false,
|
|
5424
|
-
createInjector,
|
|
5425
|
-
undefined,
|
|
5426
|
-
undefined
|
|
5453
|
+
const __vue_component__$n = /*#__PURE__*/normalizeComponent(
|
|
5454
|
+
{ render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
|
|
5455
|
+
__vue_inject_styles__$n,
|
|
5456
|
+
__vue_script__$n,
|
|
5457
|
+
__vue_scope_id__$n,
|
|
5458
|
+
__vue_is_functional_template__$n,
|
|
5459
|
+
__vue_module_identifier__$n,
|
|
5460
|
+
false,
|
|
5461
|
+
createInjector,
|
|
5462
|
+
undefined,
|
|
5463
|
+
undefined
|
|
5427
5464
|
);
|
|
5428
5465
|
|
|
5429
|
-
__vue_component__$
|
|
5466
|
+
__vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __vue_component__$n);
|
|
5430
5467
|
|
|
5431
5468
|
//
|
|
5432
5469
|
//
|
|
@@ -5438,7 +5475,7 @@ __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __v
|
|
|
5438
5475
|
//
|
|
5439
5476
|
//
|
|
5440
5477
|
|
|
5441
|
-
var script$
|
|
5478
|
+
var script$m = {
|
|
5442
5479
|
name: 'ele-icon',
|
|
5443
5480
|
props: {
|
|
5444
5481
|
type: {
|
|
@@ -5461,10 +5498,10 @@ var script$l = {
|
|
|
5461
5498
|
};
|
|
5462
5499
|
|
|
5463
5500
|
/* script */
|
|
5464
|
-
const __vue_script__$
|
|
5501
|
+
const __vue_script__$m = script$m;
|
|
5465
5502
|
|
|
5466
5503
|
/* template */
|
|
5467
|
-
var __vue_render__$
|
|
5504
|
+
var __vue_render__$m = function () {
|
|
5468
5505
|
var _vm = this;
|
|
5469
5506
|
var _h = _vm.$createElement;
|
|
5470
5507
|
var _c = _vm._self._c || _h;
|
|
@@ -5472,17 +5509,17 @@ var __vue_render__$l = function () {
|
|
|
5472
5509
|
? _c("a-icon", { attrs: { type: _vm.type, theme: _vm.theme } })
|
|
5473
5510
|
: _c("i", { class: ["iconfont", _vm.type] })
|
|
5474
5511
|
};
|
|
5475
|
-
var __vue_staticRenderFns__$
|
|
5476
|
-
__vue_render__$
|
|
5512
|
+
var __vue_staticRenderFns__$m = [];
|
|
5513
|
+
__vue_render__$m._withStripped = true;
|
|
5477
5514
|
|
|
5478
5515
|
/* style */
|
|
5479
|
-
const __vue_inject_styles__$
|
|
5516
|
+
const __vue_inject_styles__$m = undefined;
|
|
5480
5517
|
/* scoped */
|
|
5481
|
-
const __vue_scope_id__$
|
|
5518
|
+
const __vue_scope_id__$m = undefined;
|
|
5482
5519
|
/* module identifier */
|
|
5483
|
-
const __vue_module_identifier__$
|
|
5520
|
+
const __vue_module_identifier__$m = undefined;
|
|
5484
5521
|
/* functional template */
|
|
5485
|
-
const __vue_is_functional_template__$
|
|
5522
|
+
const __vue_is_functional_template__$m = false;
|
|
5486
5523
|
/* style inject */
|
|
5487
5524
|
|
|
5488
5525
|
/* style inject SSR */
|
|
@@ -5491,20 +5528,20 @@ __vue_render__$l._withStripped = true;
|
|
|
5491
5528
|
|
|
5492
5529
|
|
|
5493
5530
|
|
|
5494
|
-
const __vue_component__$
|
|
5495
|
-
{ render: __vue_render__$
|
|
5496
|
-
__vue_inject_styles__$
|
|
5497
|
-
__vue_script__$
|
|
5498
|
-
__vue_scope_id__$
|
|
5499
|
-
__vue_is_functional_template__$
|
|
5500
|
-
__vue_module_identifier__$
|
|
5531
|
+
const __vue_component__$m = /*#__PURE__*/normalizeComponent(
|
|
5532
|
+
{ render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
|
|
5533
|
+
__vue_inject_styles__$m,
|
|
5534
|
+
__vue_script__$m,
|
|
5535
|
+
__vue_scope_id__$m,
|
|
5536
|
+
__vue_is_functional_template__$m,
|
|
5537
|
+
__vue_module_identifier__$m,
|
|
5501
5538
|
false,
|
|
5502
5539
|
undefined,
|
|
5503
5540
|
undefined,
|
|
5504
5541
|
undefined
|
|
5505
5542
|
);
|
|
5506
5543
|
|
|
5507
|
-
__vue_component__$
|
|
5544
|
+
__vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
|
|
5508
5545
|
|
|
5509
5546
|
//
|
|
5510
5547
|
//
|
|
@@ -5513,7 +5550,7 @@ __vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __v
|
|
|
5513
5550
|
//
|
|
5514
5551
|
//
|
|
5515
5552
|
|
|
5516
|
-
var script$
|
|
5553
|
+
var script$l = {
|
|
5517
5554
|
name: 'ele-input-number',
|
|
5518
5555
|
props: {
|
|
5519
5556
|
precision: {
|
|
@@ -5531,10 +5568,10 @@ var script$k = {
|
|
|
5531
5568
|
};
|
|
5532
5569
|
|
|
5533
5570
|
/* script */
|
|
5534
|
-
const __vue_script__$
|
|
5571
|
+
const __vue_script__$l = script$l;
|
|
5535
5572
|
|
|
5536
5573
|
/* template */
|
|
5537
|
-
var __vue_render__$
|
|
5574
|
+
var __vue_render__$l = function () {
|
|
5538
5575
|
var _vm = this;
|
|
5539
5576
|
var _h = _vm.$createElement;
|
|
5540
5577
|
var _c = _vm._self._c || _h;
|
|
@@ -5558,17 +5595,17 @@ var __vue_render__$k = function () {
|
|
|
5558
5595
|
1
|
|
5559
5596
|
)
|
|
5560
5597
|
};
|
|
5561
|
-
var __vue_staticRenderFns__$
|
|
5562
|
-
__vue_render__$
|
|
5598
|
+
var __vue_staticRenderFns__$l = [];
|
|
5599
|
+
__vue_render__$l._withStripped = true;
|
|
5563
5600
|
|
|
5564
5601
|
/* style */
|
|
5565
|
-
const __vue_inject_styles__$
|
|
5602
|
+
const __vue_inject_styles__$l = undefined;
|
|
5566
5603
|
/* scoped */
|
|
5567
|
-
const __vue_scope_id__$
|
|
5604
|
+
const __vue_scope_id__$l = undefined;
|
|
5568
5605
|
/* module identifier */
|
|
5569
|
-
const __vue_module_identifier__$
|
|
5606
|
+
const __vue_module_identifier__$l = undefined;
|
|
5570
5607
|
/* functional template */
|
|
5571
|
-
const __vue_is_functional_template__$
|
|
5608
|
+
const __vue_is_functional_template__$l = false;
|
|
5572
5609
|
/* style inject */
|
|
5573
5610
|
|
|
5574
5611
|
/* style inject SSR */
|
|
@@ -5577,23 +5614,23 @@ __vue_render__$k._withStripped = true;
|
|
|
5577
5614
|
|
|
5578
5615
|
|
|
5579
5616
|
|
|
5580
|
-
const __vue_component__$
|
|
5581
|
-
{ render: __vue_render__$
|
|
5582
|
-
__vue_inject_styles__$
|
|
5583
|
-
__vue_script__$
|
|
5584
|
-
__vue_scope_id__$
|
|
5585
|
-
__vue_is_functional_template__$
|
|
5586
|
-
__vue_module_identifier__$
|
|
5617
|
+
const __vue_component__$l = /*#__PURE__*/normalizeComponent(
|
|
5618
|
+
{ render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
|
|
5619
|
+
__vue_inject_styles__$l,
|
|
5620
|
+
__vue_script__$l,
|
|
5621
|
+
__vue_scope_id__$l,
|
|
5622
|
+
__vue_is_functional_template__$l,
|
|
5623
|
+
__vue_module_identifier__$l,
|
|
5587
5624
|
false,
|
|
5588
5625
|
undefined,
|
|
5589
5626
|
undefined,
|
|
5590
5627
|
undefined
|
|
5591
5628
|
);
|
|
5592
5629
|
|
|
5593
|
-
__vue_component__$
|
|
5630
|
+
__vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __vue_component__$l);
|
|
5594
5631
|
|
|
5595
5632
|
//
|
|
5596
|
-
var script$
|
|
5633
|
+
var script$k = {
|
|
5597
5634
|
name: 'ele-modal',
|
|
5598
5635
|
props: {
|
|
5599
5636
|
value: {
|
|
@@ -5737,10 +5774,10 @@ var script$j = {
|
|
|
5737
5774
|
};
|
|
5738
5775
|
|
|
5739
5776
|
/* script */
|
|
5740
|
-
const __vue_script__$
|
|
5777
|
+
const __vue_script__$k = script$k;
|
|
5741
5778
|
|
|
5742
5779
|
/* template */
|
|
5743
|
-
var __vue_render__$
|
|
5780
|
+
var __vue_render__$k = function () {
|
|
5744
5781
|
var _vm = this;
|
|
5745
5782
|
var _h = _vm.$createElement;
|
|
5746
5783
|
var _c = _vm._self._c || _h;
|
|
@@ -5813,41 +5850,41 @@ var __vue_render__$j = function () {
|
|
|
5813
5850
|
2
|
|
5814
5851
|
)
|
|
5815
5852
|
};
|
|
5816
|
-
var __vue_staticRenderFns__$
|
|
5817
|
-
__vue_render__$
|
|
5853
|
+
var __vue_staticRenderFns__$k = [];
|
|
5854
|
+
__vue_render__$k._withStripped = true;
|
|
5818
5855
|
|
|
5819
5856
|
/* style */
|
|
5820
|
-
const __vue_inject_styles__$
|
|
5857
|
+
const __vue_inject_styles__$k = function (inject) {
|
|
5821
5858
|
if (!inject) return
|
|
5822
5859
|
inject("data-v-e7c1987c_0", { source: ".ele-modal__footer[data-v-e7c1987c] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.ele-modal__footer .footer-btn__wrapper[data-v-e7c1987c] {\n flex: 1;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/modal/src/index.vue","index.vue"],"names":[],"mappings":"AA+KA;EACA,aAAA;EACA,mBAAA;EACA,8BAAA;EACA,mBAAA;AC9KA;AD+KA;EACA,OAAA;AC7KA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <a-modal\n :title=\"title\"\n :cancelText=\"cancelText\"\n :okText=\"okText\"\n :closable=\"closable\"\n v-model:visible=\"showModal\"\n :width=\"width\"\n :keyboard=\"false\"\n :maskClosable=\"maskClosable\"\n :dialogStyle=\"{ top: `${upDownDistance[size]}px` }\"\n :bodyStyle=\"{ maxHeight: maxheight, overflowY: 'auto' }\"\n :footer=\"showFooter ? undefined : null\"\n @cancel=\"handleCancel\"\n @ok=\"handleOk\"\n >\n <slot v-if=\"showModal\"></slot>\n <template slot=\"footer\" v-if=\"!showDefaultFooter\">\n <div class=\"ele-modal__footer\">\n <slot name=\"footer-text\"></slot>\n <div class=\"footer-btn__wrapper\">\n <ele-button\n v-for=\"btn in buttonGroupMeta.elements\"\n :type=\"btn.type\"\n v-on=\"assignAttrEvents\"\n :event-name=\"btn.eventName\"\n :key=\"btn.key\">\n {{ btn.label }}\n </ele-button>\n </div>\n </div>\n </template>\n </a-modal>\n</template>\n<script>\nimport { CONTEXT } from '../../utils'\nexport default {\n name: 'ele-modal',\n props: {\n value: {\n type: Boolean,\n default: false\n },\n title: {\n type: String,\n default: '标题'\n },\n cancelText: {\n type: String,\n default: '关闭'\n },\n okText: {\n type: String,\n default: '确定'\n },\n size: {\n type: String,\n default: 'middle'\n },\n map: {\n type: Object,\n default () {\n return {}\n }\n },\n closable: {\n type: Boolean,\n default: true\n },\n maskClosable: {\n type: Boolean,\n default: false\n },\n showFooter: {\n type: Boolean,\n default: true\n },\n footer: {\n type: Function,\n default: null\n },\n onlyClose: {\n type: Boolean,\n default: false\n },\n buttonGroupMeta: {\n type: Object,\n default: () => ({})\n },\n // 是否展示组件默认底部按钮\n showDefaultFooter: {\n type: Boolean,\n default: false\n }\n },\n watch: {\n value: {\n handler (value) {\n this.$nextTick(() => {\n this.showModal = value\n })\n },\n immediate: true\n }\n },\n inject: {\n [CONTEXT]: {\n default: () => (() => ({}))\n }\n },\n computed: {\n assignAttrEvents () {\n const events = this.buttons.reduce((ret, btn) => {\n ret[btn.eventName] = (e) => {\n this.$emit(btn.eventName || 'click', { ...e, ...this[CONTEXT]() })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events\n }\n },\n buttons () {\n const { elements = [] } = this.buttonGroupMeta\n return elements\n },\n width () {\n return this.map[this.size]\n },\n maxheight () {\n return `calc(100vh - ${this.upDownDistance[this.size] * 2 + (this.title ? 55 : 0) + (this.showFooter ? 53 : 0) }px`\n }\n },\n data () {\n return {\n showModal: false\n }\n },\n created () {\n let defaultMap = {\n small: 480,\n middle: 768,\n big: 1200\n }\n this.upDownDistance = {\n small: 80,\n middle: 80,\n big: 40\n }\n this.map = Object.assign(this.map, defaultMap)\n },\n methods: {\n openModal () {\n this.showModal = true\n this.removeHidden()\n },\n handleCancel () {\n this.showModal = false\n this.$emit('input', this.showModal)\n this.$emit('change', this.showModal)\n this.removeHidden()\n this.$emit('cancel')\n },\n handleOk () {\n this.$emit('ok')\n },\n removeHidden () {\n let ishidden = document.body.style.overflow === 'hidden'\n ishidden && (document.body.style.overflow = 'initial')\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.ele-modal__footer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n .footer-btn__wrapper {\n flex: 1;\n }\n}\n</style>",".ele-modal__footer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.ele-modal__footer .footer-btn__wrapper {\n flex: 1;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5823
5860
|
|
|
5824
5861
|
};
|
|
5825
5862
|
/* scoped */
|
|
5826
|
-
const __vue_scope_id__$
|
|
5863
|
+
const __vue_scope_id__$k = "data-v-e7c1987c";
|
|
5827
5864
|
/* module identifier */
|
|
5828
|
-
const __vue_module_identifier__$
|
|
5865
|
+
const __vue_module_identifier__$k = undefined;
|
|
5829
5866
|
/* functional template */
|
|
5830
|
-
const __vue_is_functional_template__$
|
|
5867
|
+
const __vue_is_functional_template__$k = false;
|
|
5831
5868
|
/* style inject SSR */
|
|
5832
5869
|
|
|
5833
5870
|
/* style inject shadow dom */
|
|
5834
5871
|
|
|
5835
5872
|
|
|
5836
5873
|
|
|
5837
|
-
const __vue_component__$
|
|
5838
|
-
{ render: __vue_render__$
|
|
5839
|
-
__vue_inject_styles__$
|
|
5840
|
-
__vue_script__$
|
|
5841
|
-
__vue_scope_id__$
|
|
5842
|
-
__vue_is_functional_template__$
|
|
5843
|
-
__vue_module_identifier__$
|
|
5874
|
+
const __vue_component__$k = /*#__PURE__*/normalizeComponent(
|
|
5875
|
+
{ render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
|
|
5876
|
+
__vue_inject_styles__$k,
|
|
5877
|
+
__vue_script__$k,
|
|
5878
|
+
__vue_scope_id__$k,
|
|
5879
|
+
__vue_is_functional_template__$k,
|
|
5880
|
+
__vue_module_identifier__$k,
|
|
5844
5881
|
false,
|
|
5845
5882
|
createInjector,
|
|
5846
5883
|
undefined,
|
|
5847
5884
|
undefined
|
|
5848
5885
|
);
|
|
5849
5886
|
|
|
5850
|
-
__vue_component__$
|
|
5887
|
+
__vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
|
|
5851
5888
|
|
|
5852
5889
|
//
|
|
5853
5890
|
//
|
|
@@ -5859,7 +5896,7 @@ __vue_component__$j.install = Vue => Vue.component(__vue_component__$j.name, __v
|
|
|
5859
5896
|
//
|
|
5860
5897
|
//
|
|
5861
5898
|
|
|
5862
|
-
var script$
|
|
5899
|
+
var script$j = {
|
|
5863
5900
|
name: 'ele-checkbox',
|
|
5864
5901
|
model: {
|
|
5865
5902
|
prop: 'value',
|
|
@@ -5887,10 +5924,10 @@ var script$i = {
|
|
|
5887
5924
|
};
|
|
5888
5925
|
|
|
5889
5926
|
/* script */
|
|
5890
|
-
const __vue_script__$
|
|
5927
|
+
const __vue_script__$j = script$j;
|
|
5891
5928
|
|
|
5892
5929
|
/* template */
|
|
5893
|
-
var __vue_render__$
|
|
5930
|
+
var __vue_render__$j = function () {
|
|
5894
5931
|
var _vm = this;
|
|
5895
5932
|
var _h = _vm.$createElement;
|
|
5896
5933
|
var _c = _vm._self._c || _h;
|
|
@@ -5903,41 +5940,41 @@ var __vue_render__$i = function () {
|
|
|
5903
5940
|
on: { change: _vm.onChange },
|
|
5904
5941
|
})
|
|
5905
5942
|
};
|
|
5906
|
-
var __vue_staticRenderFns__$
|
|
5907
|
-
__vue_render__$
|
|
5943
|
+
var __vue_staticRenderFns__$j = [];
|
|
5944
|
+
__vue_render__$j._withStripped = true;
|
|
5908
5945
|
|
|
5909
5946
|
/* style */
|
|
5910
|
-
const __vue_inject_styles__$
|
|
5947
|
+
const __vue_inject_styles__$j = function (inject) {
|
|
5911
5948
|
if (!inject) return
|
|
5912
5949
|
inject("data-v-e6c4aea4_0", { source: ".ant-checkbox-group[data-v-e6c4aea4] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-checkbox-group[data-v-e6c4aea4] .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-checkbox-group[data-v-e6c4aea4] .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/checkbox/src/index.vue","index.vue"],"names":[],"mappings":"AAsCA;EACA,gBAAA;EACA,iBAAA;ACrCA;ADyCA;EACA,0CAAA;ACtCA;ADwCA;EACA,iDAAA;ACtCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <a-checkbox-group\n :value=\"value\"\n :options=\"dataSource\" \n :disabled=\"disabled\" \n @change=\"onChange\">\n </a-checkbox-group>\n</template>\n\n<script>\nexport default {\n name: 'ele-checkbox',\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n value: {\n type: Array\n },\n dataSource: {\n type: Array,\n default: () => []\n },\n disabled: {\n type: Boolean,\n default: false\n }\n },\n methods: {\n onChange (value) {\n this.$emit('change', value)\n this.$emit('input', value)\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.ant-checkbox-group {\n text-align: left;\n line-height: 32px;\n}\n.has-error {\n .ant-checkbox-group {\n ::v-deep .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n }\n ::v-deep .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n }\n }\n}\n</style>",".ant-checkbox-group {\n text-align: left;\n line-height: 32px;\n}\n\n.has-error .ant-checkbox-group ::v-deep .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-checkbox-group ::v-deep .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5913
5950
|
|
|
5914
5951
|
};
|
|
5915
5952
|
/* scoped */
|
|
5916
|
-
const __vue_scope_id__$
|
|
5953
|
+
const __vue_scope_id__$j = "data-v-e6c4aea4";
|
|
5917
5954
|
/* module identifier */
|
|
5918
|
-
const __vue_module_identifier__$
|
|
5955
|
+
const __vue_module_identifier__$j = undefined;
|
|
5919
5956
|
/* functional template */
|
|
5920
|
-
const __vue_is_functional_template__$
|
|
5957
|
+
const __vue_is_functional_template__$j = false;
|
|
5921
5958
|
/* style inject SSR */
|
|
5922
5959
|
|
|
5923
5960
|
/* style inject shadow dom */
|
|
5924
5961
|
|
|
5925
5962
|
|
|
5926
5963
|
|
|
5927
|
-
const __vue_component__$
|
|
5928
|
-
{ render: __vue_render__$
|
|
5929
|
-
__vue_inject_styles__$
|
|
5930
|
-
__vue_script__$
|
|
5931
|
-
__vue_scope_id__$
|
|
5932
|
-
__vue_is_functional_template__$
|
|
5933
|
-
__vue_module_identifier__$
|
|
5964
|
+
const __vue_component__$j = /*#__PURE__*/normalizeComponent(
|
|
5965
|
+
{ render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
|
|
5966
|
+
__vue_inject_styles__$j,
|
|
5967
|
+
__vue_script__$j,
|
|
5968
|
+
__vue_scope_id__$j,
|
|
5969
|
+
__vue_is_functional_template__$j,
|
|
5970
|
+
__vue_module_identifier__$j,
|
|
5934
5971
|
false,
|
|
5935
5972
|
createInjector,
|
|
5936
5973
|
undefined,
|
|
5937
5974
|
undefined
|
|
5938
5975
|
);
|
|
5939
5976
|
|
|
5940
|
-
__vue_component__$
|
|
5977
|
+
__vue_component__$j.install = Vue => Vue.component(__vue_component__$j.name, __vue_component__$j);
|
|
5941
5978
|
|
|
5942
5979
|
//
|
|
5943
5980
|
//
|
|
@@ -5948,7 +5985,7 @@ __vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __v
|
|
|
5948
5985
|
//
|
|
5949
5986
|
//
|
|
5950
5987
|
|
|
5951
|
-
var script$
|
|
5988
|
+
var script$i = {
|
|
5952
5989
|
name: 'ele-radio',
|
|
5953
5990
|
model: {
|
|
5954
5991
|
prop: 'value',
|
|
@@ -5981,10 +6018,10 @@ var script$h = {
|
|
|
5981
6018
|
};
|
|
5982
6019
|
|
|
5983
6020
|
/* script */
|
|
5984
|
-
const __vue_script__$
|
|
6021
|
+
const __vue_script__$i = script$i;
|
|
5985
6022
|
|
|
5986
6023
|
/* template */
|
|
5987
|
-
var __vue_render__$
|
|
6024
|
+
var __vue_render__$i = function () {
|
|
5988
6025
|
var _vm = this;
|
|
5989
6026
|
var _h = _vm.$createElement;
|
|
5990
6027
|
var _c = _vm._self._c || _h;
|
|
@@ -6002,41 +6039,41 @@ var __vue_render__$h = function () {
|
|
|
6002
6039
|
1
|
|
6003
6040
|
)
|
|
6004
6041
|
};
|
|
6005
|
-
var __vue_staticRenderFns__$
|
|
6006
|
-
__vue_render__$
|
|
6042
|
+
var __vue_staticRenderFns__$i = [];
|
|
6043
|
+
__vue_render__$i._withStripped = true;
|
|
6007
6044
|
|
|
6008
6045
|
/* style */
|
|
6009
|
-
const __vue_inject_styles__$
|
|
6046
|
+
const __vue_inject_styles__$i = function (inject) {
|
|
6010
6047
|
if (!inject) return
|
|
6011
6048
|
inject("data-v-00d35412_0", { source: ".ant-radio-group[data-v-00d35412] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-radio-group[data-v-00d35412] .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-radio-group[data-v-00d35412] .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/radio/src/index.vue","index.vue"],"names":[],"mappings":"AA0CA;EACA,gBAAA;EACA,iBAAA;ACzCA;AD6CA;EACA,0CAAA;AC1CA;AD4CA;EACA,iDAAA;AC1CA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <a-radio-group :value=\"value\" @change=\"onChange\" :disabled=\"disabled\">\n <a-radio v-for=\"item in dataSource\" :key=\"item.value\" :value=\"item.value\">\n {{ item.label }}\n </a-radio>\n </a-radio-group>\n</template>\n\n<script>\nexport default {\n name: 'ele-radio',\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n value: {\n type: [String, Array, Number]\n },\n dataSource: {\n type: Array,\n default: () => []\n },\n disabled: {\n type: Boolean,\n default: false\n }\n },\n watch: {\n value (val) {\n console.log('valvalval', val)\n }\n },\n methods: {\n onChange (e) {\n this.$emit('change', e.target.value)\n this.$emit('input', e.target.value)\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.ant-radio-group {\n text-align: left;\n line-height: 32px;\n}\n.has-error {\n .ant-radio-group {\n ::v-deep .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n }\n ::v-deep .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n }\n }\n}\n</style>",".ant-radio-group {\n text-align: left;\n line-height: 32px;\n}\n\n.has-error .ant-radio-group ::v-deep .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-radio-group ::v-deep .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
6012
6049
|
|
|
6013
6050
|
};
|
|
6014
6051
|
/* scoped */
|
|
6015
|
-
const __vue_scope_id__$
|
|
6052
|
+
const __vue_scope_id__$i = "data-v-00d35412";
|
|
6016
6053
|
/* module identifier */
|
|
6017
|
-
const __vue_module_identifier__$
|
|
6054
|
+
const __vue_module_identifier__$i = undefined;
|
|
6018
6055
|
/* functional template */
|
|
6019
|
-
const __vue_is_functional_template__$
|
|
6056
|
+
const __vue_is_functional_template__$i = false;
|
|
6020
6057
|
/* style inject SSR */
|
|
6021
6058
|
|
|
6022
6059
|
/* style inject shadow dom */
|
|
6023
6060
|
|
|
6024
6061
|
|
|
6025
6062
|
|
|
6026
|
-
const __vue_component__$
|
|
6027
|
-
{ render: __vue_render__$
|
|
6028
|
-
__vue_inject_styles__$
|
|
6029
|
-
__vue_script__$
|
|
6030
|
-
__vue_scope_id__$
|
|
6031
|
-
__vue_is_functional_template__$
|
|
6032
|
-
__vue_module_identifier__$
|
|
6063
|
+
const __vue_component__$i = /*#__PURE__*/normalizeComponent(
|
|
6064
|
+
{ render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
|
|
6065
|
+
__vue_inject_styles__$i,
|
|
6066
|
+
__vue_script__$i,
|
|
6067
|
+
__vue_scope_id__$i,
|
|
6068
|
+
__vue_is_functional_template__$i,
|
|
6069
|
+
__vue_module_identifier__$i,
|
|
6033
6070
|
false,
|
|
6034
6071
|
createInjector,
|
|
6035
6072
|
undefined,
|
|
6036
6073
|
undefined
|
|
6037
6074
|
);
|
|
6038
6075
|
|
|
6039
|
-
__vue_component__$
|
|
6076
|
+
__vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
|
|
6040
6077
|
|
|
6041
6078
|
//
|
|
6042
6079
|
//
|
|
@@ -6060,7 +6097,7 @@ __vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __v
|
|
|
6060
6097
|
//
|
|
6061
6098
|
//
|
|
6062
6099
|
|
|
6063
|
-
var script$
|
|
6100
|
+
var script$h = {
|
|
6064
6101
|
name: 'ele-batch-export',
|
|
6065
6102
|
props: {
|
|
6066
6103
|
value: {
|
|
@@ -6104,10 +6141,10 @@ var script$g = {
|
|
|
6104
6141
|
};
|
|
6105
6142
|
|
|
6106
6143
|
/* script */
|
|
6107
|
-
const __vue_script__$
|
|
6144
|
+
const __vue_script__$h = script$h;
|
|
6108
6145
|
|
|
6109
6146
|
/* template */
|
|
6110
|
-
var __vue_render__$
|
|
6147
|
+
var __vue_render__$h = function () {
|
|
6111
6148
|
var _vm = this;
|
|
6112
6149
|
var _h = _vm.$createElement;
|
|
6113
6150
|
var _c = _vm._self._c || _h;
|
|
@@ -6166,42 +6203,42 @@ var __vue_render__$g = function () {
|
|
|
6166
6203
|
]
|
|
6167
6204
|
)
|
|
6168
6205
|
};
|
|
6169
|
-
var __vue_staticRenderFns__$
|
|
6170
|
-
__vue_render__$
|
|
6206
|
+
var __vue_staticRenderFns__$h = [];
|
|
6207
|
+
__vue_render__$h._withStripped = true;
|
|
6171
6208
|
|
|
6172
6209
|
/* style */
|
|
6173
|
-
const __vue_inject_styles__$
|
|
6210
|
+
const __vue_inject_styles__$h = function (inject) {
|
|
6174
6211
|
if (!inject) return
|
|
6175
6212
|
inject("data-v-06685ad4_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,uCAAuC;EACvC,uCAAuC;EACvC,mDAAmD;EACnD,4BAA4B;EAC5B,4BAA4B;EAC5B,0BAA0B;EAC1B,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,gCAAgC;EAChC,4BAA4B;EAC5B,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;AAEA;EACE,4DAA4D;AAC9D;AAEA;EACE,4DAA4D;AAC9D;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
|
|
6176
6213
|
,inject("data-v-06685ad4_1", { source: ".ele-batch-export__content[data-v-06685ad4] {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container[data-v-06685ad4] {\n border-width: 1px;\n border-style: dashed;\n height: 80px;\n border-color: var(--idooel-link-06);\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__icon[data-v-06685ad4] {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle[data-v-06685ad4] {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn[data-v-06685ad4] {\n color: var(--idooel-link-06);\n font-size: 16px;\n cursor: pointer;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn--hint[data-v-06685ad4] {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message[data-v-06685ad4] {\n color: var(--idooel-link-06);\n font-size: 14px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/batch-export/src/index.vue","index.vue"],"names":[],"mappings":"AAuEA;EACA,aAAA;ACtEA;ADuEA;EACA,iBAAA;EACA,oBAAA;EACA,YAAA;EACA,mCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,eAAA;ACrEA;ADsEA;EACA,eAAA;EACA,4BAAA;ACpEA;ADsEA;EACA,iBAAA;ACpEA;ADqEA;EACA,4BAAA;EACA,eAAA;EACA,eAAA;ACnEA;ADqEA;EACA,4BAAA;EACA,eAAA;ACnEA;ADuEA;EACA,4BAAA;EACA,eAAA;ACrEA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <ele-modal \n v-model=\"innerValue\" \n v-on=\"$listeners\"\n :buttonGroupMeta=\"buttonGroupMeta\" \n title=\"批量导出\">\n <div class=\"ele-batch-export__content\">\n <div class=\"ele-batch-export__container\">\n <ele-icon class=\"ele-batch-export__icon\" type=\"download\"></ele-icon>\n <div class=\"ele-batch-export__handle\">\n <div class=\"ele-batch-export__btn\" @click=\"handleClick\">导出任务处理中..... 请点击此按钮跳转到“批处理管理”菜单查看任务进度</div>\n <div class=\"ele-batch-export__btn--hint\">批处理任务的准备工作会在后台运行</div>\n </div>\n </div>\n <div class=\"ele-batch-export__message\">\n 您可以请点击上方按钮查看任务进度或关闭弹框\n </div>\n </div>\n </ele-modal>\n</template>\n\n<script>\nexport default {\n name: 'ele-batch-export',\n props: {\n value: {\n type: Boolean,\n default: false\n },\n buttonGroupMeta: {\n type: Object,\n default: () => {\n return {\n elements: [\n {\n label: '关闭',\n key: 'close',\n type: 'primary',\n eventName: 'handleClose'\n }\n ]\n }\n }\n }\n },\n data() {\n return {\n innerValue: false\n }\n },\n watch: {\n value: {\n handler (value) {\n this.$nextTick(() => {\n this.innerValue = value\n })\n },\n immediate: true\n }\n },\n methods: {\n handleClick () {\n this.$emit('on-batch-export')\n }\n }\n}\n</script>\n<style lang=\"scss\">\n@import '../../theme/index';\n</style>\n<style lang=\"scss\" scoped>\n.ele-batch-export__content {\n height: 106px;\n .ele-batch-export__container {\n border-width: 1px;\n border-style: dashed;\n height: 80px;\n border-color: var(--idooel-link-06);\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 16px;\n .ele-batch-export__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n }\n .ele-batch-export__handle {\n margin-left: 16px;\n .ele-batch-export__btn {\n color: var(--idooel-link-06);\n font-size: 16px;\n cursor: pointer;\n }\n .ele-batch-export__btn--hint {\n color: var(--idooel-link-03);\n font-size: 14px;\n }\n }\n }\n .ele-batch-export__message {\n color: var(--idooel-link-06);\n font-size: 14px;\n }\n}\n</style>",".ele-batch-export__content {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container {\n border-width: 1px;\n border-style: dashed;\n height: 80px;\n border-color: var(--idooel-link-06);\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn {\n color: var(--idooel-link-06);\n font-size: 16px;\n cursor: pointer;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn--hint {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message {\n color: var(--idooel-link-06);\n font-size: 14px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
6177
6214
|
|
|
6178
6215
|
};
|
|
6179
6216
|
/* scoped */
|
|
6180
|
-
const __vue_scope_id__$
|
|
6217
|
+
const __vue_scope_id__$h = "data-v-06685ad4";
|
|
6181
6218
|
/* module identifier */
|
|
6182
|
-
const __vue_module_identifier__$
|
|
6219
|
+
const __vue_module_identifier__$h = undefined;
|
|
6183
6220
|
/* functional template */
|
|
6184
|
-
const __vue_is_functional_template__$
|
|
6221
|
+
const __vue_is_functional_template__$h = false;
|
|
6185
6222
|
/* style inject SSR */
|
|
6186
6223
|
|
|
6187
6224
|
/* style inject shadow dom */
|
|
6188
6225
|
|
|
6189
6226
|
|
|
6190
6227
|
|
|
6191
|
-
const __vue_component__$
|
|
6192
|
-
{ render: __vue_render__$
|
|
6193
|
-
__vue_inject_styles__$
|
|
6194
|
-
__vue_script__$
|
|
6195
|
-
__vue_scope_id__$
|
|
6196
|
-
__vue_is_functional_template__$
|
|
6197
|
-
__vue_module_identifier__$
|
|
6228
|
+
const __vue_component__$h = /*#__PURE__*/normalizeComponent(
|
|
6229
|
+
{ render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
|
|
6230
|
+
__vue_inject_styles__$h,
|
|
6231
|
+
__vue_script__$h,
|
|
6232
|
+
__vue_scope_id__$h,
|
|
6233
|
+
__vue_is_functional_template__$h,
|
|
6234
|
+
__vue_module_identifier__$h,
|
|
6198
6235
|
false,
|
|
6199
6236
|
createInjector,
|
|
6200
6237
|
undefined,
|
|
6201
6238
|
undefined
|
|
6202
6239
|
);
|
|
6203
6240
|
|
|
6204
|
-
__vue_component__$
|
|
6241
|
+
__vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __vue_component__$h);
|
|
6205
6242
|
|
|
6206
6243
|
//
|
|
6207
6244
|
//
|
|
@@ -6215,7 +6252,7 @@ __vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __v
|
|
|
6215
6252
|
//
|
|
6216
6253
|
//
|
|
6217
6254
|
|
|
6218
|
-
var script$
|
|
6255
|
+
var script$g = {
|
|
6219
6256
|
name: 'ele-date-range',
|
|
6220
6257
|
model: {
|
|
6221
6258
|
prop: 'value',
|
|
@@ -6246,10 +6283,10 @@ var script$f = {
|
|
|
6246
6283
|
};
|
|
6247
6284
|
|
|
6248
6285
|
/* script */
|
|
6249
|
-
const __vue_script__$
|
|
6286
|
+
const __vue_script__$g = script$g;
|
|
6250
6287
|
|
|
6251
6288
|
/* template */
|
|
6252
|
-
var __vue_render__$
|
|
6289
|
+
var __vue_render__$g = function () {
|
|
6253
6290
|
var _vm = this;
|
|
6254
6291
|
var _h = _vm.$createElement;
|
|
6255
6292
|
var _c = _vm._self._c || _h;
|
|
@@ -6264,44 +6301,44 @@ var __vue_render__$f = function () {
|
|
|
6264
6301
|
on: { change: _vm.onChange },
|
|
6265
6302
|
})
|
|
6266
6303
|
};
|
|
6267
|
-
var __vue_staticRenderFns__$
|
|
6268
|
-
__vue_render__$
|
|
6304
|
+
var __vue_staticRenderFns__$g = [];
|
|
6305
|
+
__vue_render__$g._withStripped = true;
|
|
6269
6306
|
|
|
6270
6307
|
/* style */
|
|
6271
|
-
const __vue_inject_styles__$
|
|
6308
|
+
const __vue_inject_styles__$g = function (inject) {
|
|
6272
6309
|
if (!inject) return
|
|
6273
6310
|
inject("data-v-eee16c3c_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
6274
6311
|
|
|
6275
6312
|
};
|
|
6276
6313
|
/* scoped */
|
|
6277
|
-
const __vue_scope_id__$
|
|
6314
|
+
const __vue_scope_id__$g = "data-v-eee16c3c";
|
|
6278
6315
|
/* module identifier */
|
|
6279
|
-
const __vue_module_identifier__$
|
|
6316
|
+
const __vue_module_identifier__$g = undefined;
|
|
6280
6317
|
/* functional template */
|
|
6281
|
-
const __vue_is_functional_template__$
|
|
6318
|
+
const __vue_is_functional_template__$g = false;
|
|
6282
6319
|
/* style inject SSR */
|
|
6283
6320
|
|
|
6284
6321
|
/* style inject shadow dom */
|
|
6285
6322
|
|
|
6286
6323
|
|
|
6287
6324
|
|
|
6288
|
-
const __vue_component__$
|
|
6289
|
-
{ render: __vue_render__$
|
|
6290
|
-
__vue_inject_styles__$
|
|
6291
|
-
__vue_script__$
|
|
6292
|
-
__vue_scope_id__$
|
|
6293
|
-
__vue_is_functional_template__$
|
|
6294
|
-
__vue_module_identifier__$
|
|
6325
|
+
const __vue_component__$g = /*#__PURE__*/normalizeComponent(
|
|
6326
|
+
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
|
|
6327
|
+
__vue_inject_styles__$g,
|
|
6328
|
+
__vue_script__$g,
|
|
6329
|
+
__vue_scope_id__$g,
|
|
6330
|
+
__vue_is_functional_template__$g,
|
|
6331
|
+
__vue_module_identifier__$g,
|
|
6295
6332
|
false,
|
|
6296
6333
|
createInjector,
|
|
6297
6334
|
undefined,
|
|
6298
6335
|
undefined
|
|
6299
6336
|
);
|
|
6300
6337
|
|
|
6301
|
-
__vue_component__$
|
|
6338
|
+
__vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __vue_component__$g);
|
|
6302
6339
|
|
|
6303
6340
|
//
|
|
6304
|
-
var script$
|
|
6341
|
+
var script$f = {
|
|
6305
6342
|
name: 'ele-timeline',
|
|
6306
6343
|
props: {
|
|
6307
6344
|
url: {
|
|
@@ -6389,10 +6426,10 @@ var script$e = {
|
|
|
6389
6426
|
};
|
|
6390
6427
|
|
|
6391
6428
|
/* script */
|
|
6392
|
-
const __vue_script__$
|
|
6429
|
+
const __vue_script__$f = script$f;
|
|
6393
6430
|
|
|
6394
6431
|
/* template */
|
|
6395
|
-
var __vue_render__$
|
|
6432
|
+
var __vue_render__$f = function () {
|
|
6396
6433
|
var _vm = this;
|
|
6397
6434
|
var _h = _vm.$createElement;
|
|
6398
6435
|
var _c = _vm._self._c || _h;
|
|
@@ -6470,7 +6507,7 @@ var __vue_render__$e = function () {
|
|
|
6470
6507
|
0
|
|
6471
6508
|
)
|
|
6472
6509
|
};
|
|
6473
|
-
var __vue_staticRenderFns__$
|
|
6510
|
+
var __vue_staticRenderFns__$f = [
|
|
6474
6511
|
function () {
|
|
6475
6512
|
var _vm = this;
|
|
6476
6513
|
var _h = _vm.$createElement;
|
|
@@ -6482,41 +6519,41 @@ var __vue_staticRenderFns__$e = [
|
|
|
6482
6519
|
])
|
|
6483
6520
|
},
|
|
6484
6521
|
];
|
|
6485
|
-
__vue_render__$
|
|
6522
|
+
__vue_render__$f._withStripped = true;
|
|
6486
6523
|
|
|
6487
6524
|
/* style */
|
|
6488
|
-
const __vue_inject_styles__$
|
|
6525
|
+
const __vue_inject_styles__$f = function (inject) {
|
|
6489
6526
|
if (!inject) return
|
|
6490
6527
|
inject("data-v-24d69f04_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,uCAAuC;EACvC,uCAAuC;EACvC,mDAAmD;EACnD,4BAA4B;EAC5B,4BAA4B;EAC5B,0BAA0B;EAC1B,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,gCAAgC;EAChC,4BAA4B;EAC5B,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;AAEA;EACE,4DAA4D;AAC9D;AAEA;EACE,4DAA4D;AAC9D;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
|
|
6491
6528
|
,inject("data-v-24d69f04_1", { source: ".ele-timeline__wrapper[data-v-24d69f04] {\n width: 100%;\n height: 100%;\n}\n.ele-timeline__wrapper .ele-timeline__item[data-v-24d69f04] {\n display: flex;\n flex-direction: row;\n}\n.ele-timeline__wrapper .ele-timeline__item:last-child .ele-timeline__middle .ele-timeline__traline[data-v-24d69f04] {\n display: none;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left[data-v-24d69f04] {\n flex: 1;\n padding-right: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n text-align: right;\n display: flex;\n flex-direction: row;\n justify-content: end;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left .titleline-left__date[data-v-24d69f04] {\n width: 100px;\n font-size: 14px;\n color: var(--idoole-black-064);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle[data-v-24d69f04] {\n width: 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n transform: translate(0, 20px);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle .ele-timeline__circle[data-v-24d69f04] {\n width: 100%;\n height: 10px;\n border-radius: 50%;\n border-width: 2px;\n border-style: solid;\n border-color: var(--idooel-primary-color);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle .ele-timeline__traline[data-v-24d69f04] {\n width: 1px;\n height: calc(100% - 10px);\n border-width: 1px;\n border-style: solid;\n border-color: var(--idoole-black-016);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right[data-v-24d69f04] {\n text-align: left;\n flex: 2;\n padding-left: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title[data-v-24d69f04] {\n line-height: 22px;\n display: flex;\n flex-direction: row;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title[data-v-24d69f04] {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info[data-v-24d69f04] {\n font-size: 14px;\n color: var(--idoole-black-064);\n margin-left: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info[data-v-24d69f04]::before {\n content: \"\";\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-right: 8px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.success[data-v-24d69f04]::before {\n background: var(--idoole-success-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.warning[data-v-24d69f04]::before {\n background: var(--idoole-warning-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.error[data-v-24d69f04]::before {\n background: var(--idoole-error-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper[data-v-24d69f04] {\n line-height: 22px;\n margin-top: 8px;\n margin-left: 12px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper .oper-name[data-v-24d69f04] {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle[data-v-24d69f04] {\n margin-left: 12px;\n display: flex;\n flex-direction: row;\n line-height: 22px;\n margin-top: 4px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle .right-subtitle__field[data-v-24d69f04] {\n flex-shrink: 0;\n font-size: 14px;\n color: var(--idoole-black-064);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle .right-subtitle__content[data-v-24d69f04] {\n font-size: 14px;\n color: var(--idoole-black-088);\n font-weight: bold;\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/timeline/src/index.vue","index.vue"],"names":[],"mappings":"AA6HA;EACA,WAAA;EACA,YAAA;AC5HA;AD6HA;EACA,aAAA;EACA,mBAAA;AC3HA;AD8HA;EACA,aAAA;AC5HA;ADgIA;EACA,OAAA;EACA,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;AC9HA;AD+HA;EACA,YAAA;EACA,eAAA;EACA,8BAAA;AC7HA;ADgIA;EACA,WAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,6BAAA;AC9HA;AD+HA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;EACA,iBAAA;EACA,mBAAA;EACA,yCAAA;AC7HA;AD+HA;EACA,UAAA;EACA,yBAAA;EACA,iBAAA;EACA,mBAAA;EACA,qCAAA;AC7HA;ADgIA;EACA,gBAAA;EACA,OAAA;EACA,kBAAA;EACA,iBAAA;EACA,oBAAA;AC9HA;AD+HA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;AC7HA;AD8HA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;AC5HA;AD8HA;EACA,eAAA;EACA,8BAAA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;AC5HA;AD6HA;EACA,WAAA;EACA,qBAAA;EACA,UAAA;EACA,WAAA;EACA,kBAAA;EACA,iBAAA;AC3HA;AD8HA;EACA,oCAAA;AC5HA;ADgIA;EACA,oCAAA;AC9HA;ADkIA;EACA,kCAAA;AChIA;ADqIA;EACA,iBAAA;EACA,eAAA;EACA,iBAAA;ACnIA;ADoIA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;AClIA;ADqIA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,iBAAA;EACA,eAAA;ACnIA;ADoIA;EACA,cAAA;EACA,eAAA;EACA,8BAAA;AClIA;ADoIA;EACA,eAAA;EACA,8BAAA;EACA,iBAAA;EACA,gBAAA;AClIA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele-timeline__wrapper\">\n <div class=\"ele-timeline__item\" v-for=\"item in innerDataSource\" :key=\"item.key\">\n <div class=\"ele-timeline__left\">\n <div class=\"titleline-left__date\">{{ item.date }}</div>\n </div>\n <div class=\"ele-timeline__middle\">\n <div class=\"ele-timeline__circle\"></div>\n <div class=\"ele-timeline__traline\"></div>\n </div>\n <div class=\"ele-timeline__right\">\n <slot v-if=\"$scopedSlots.right\" name=\"right\" :data=\"item\"></slot>\n <template v-else>\n <div class=\"timeline-right__title\">\n <span class=\"title\">{{ item.title }}</span>\n <span :class=\"['title-info', item.state == 1 && 'success', item.state == 2 && 'warning', item.state == 3 && 'error']\">{{ item.stateName }}</span>\n </div>\n <div class=\"timeline-right__oper\">\n 由\n <span class=\"oper-name\">{{ item.userName }}</span>\n 操作\n </div>\n <div class=\"timeline-right__subtitle\" v-for=\"label in item.labelList\" :key=\"label.value\">\n <div class=\"right-subtitle__field\">{{ label.label }}:</div>\n <div class=\"right-subtitle__content\">{{ label.value }}</div>\n </div>\n </template>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { net, type } from '@idooel/shared'\nimport { v4 as uuidv4 } from 'uuid'\nimport { CONTEXT, parseFieldMap } from '../../utils'\nexport default {\n name: 'ele-timeline',\n props: {\n url: {\n type: String\n },\n params: {\n type: Object,\n default: () => ({})\n },\n requestType: {\n type: String,\n default: 'GET'\n },\n fieldMap: {\n type: Object,\n default: () => ({})\n },\n dataSource: {\n type: Array,\n default: () => ([\n // {\n // date: '2023/05/09 03:34:56',\n // title: 123,\n // state: 1,\n // stateName: '成功',\n // userName: 'Name',\n // labelList: [\n // {\n // label: 'label',\n // value: 'value'\n // }\n // ],\n // action: '结班',\n // opinion: '意见'\n // }\n ])\n }\n },\n data () {\n return {\n innerDataSource: []\n }\n },\n inject: {\n [CONTEXT]: {\n default: () => (() => ({}))\n }\n },\n computed: {\n expressionData () {\n return {\n _route: this.$route.query,\n ...this[CONTEXT]()\n }\n }\n },\n async created() {\n if (this.url) {\n this.innerDataSource = await this.requestData()\n } else if (!type.isEmpty(this.dataSource)) {\n this.innerDataSource = this.dataSource\n } else {\n console.warn('ele-timeline: 请传入数据源')\n }\n },\n methods: {\n async requestData () {\n const ret = await net[this.requestType.toLowerCase()](\n this.url,\n { ...this.params, ...parseFieldMap(this.fieldMap, this.expressionData) }\n ).then(resp => {\n const { data } = resp || {}\n return data.map(item => {\n return {\n key: uuidv4(),\n ...item\n }\n })\n })\n return ret\n }\n }\n}\n</script>\n<style lang=\"scss\">\n@import '../../theme/index';\n</style>\n<style lang=\"scss\" scoped>\n.ele-timeline__wrapper {\n width: 100%;\n height: 100%;\n .ele-timeline__item {\n display: flex;\n flex-direction: row;\n &:last-child {\n .ele-timeline__middle {\n .ele-timeline__traline {\n display: none;\n }\n }\n }\n .ele-timeline__left {\n flex: 1;\n padding-right: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n text-align: right;\n display: flex;\n flex-direction: row;\n justify-content: end;\n .titleline-left__date {\n width: 100px;\n font-size: 14px;\n color: var(--idoole-black-064);\n }\n }\n .ele-timeline__middle {\n width: 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n transform: translate(0, 20px);\n .ele-timeline__circle {\n width: 100%;\n height: 10px;\n border-radius: 50%;\n border-width: 2px;\n border-style: solid;\n border-color: var(--idooel-primary-color);\n }\n .ele-timeline__traline {\n width: 1px;\n height: calc(100% - 10px);\n border-width: 1px;\n border-style: solid;\n border-color: var(--idoole-black-016);\n }\n }\n .ele-timeline__right {\n text-align: left;\n flex: 2;\n padding-left: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n .timeline-right__title {\n line-height: 22px;\n display: flex;\n flex-direction: row;\n .title {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n }\n .title-info {\n font-size: 14px;\n color: var(--idoole-black-064);\n margin-left: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n &::before {\n content: '';\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-right: 8px;\n }\n &.success {\n &::before {\n background: var(--idoole-success-06);\n }\n }\n &.warning {\n &::before {\n background: var(--idoole-warning-06);\n }\n }\n &.error {\n &::before {\n background: var(--idoole-error-06);\n }\n }\n }\n }\n .timeline-right__oper {\n line-height: 22px;\n margin-top: 8px;\n margin-left: 12px;\n .oper-name {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n }\n }\n .timeline-right__subtitle {\n margin-left: 12px;\n display: flex;\n flex-direction: row;\n line-height: 22px;\n margin-top: 4px;\n .right-subtitle__field {\n flex-shrink: 0;\n font-size: 14px;\n color: var(--idoole-black-064);\n }\n .right-subtitle__content {\n font-size: 14px;\n color: var(--idoole-black-088);\n font-weight: bold;\n margin-left: 4px;\n }\n }\n }\n }\n}\n</style>",".ele-timeline__wrapper {\n width: 100%;\n height: 100%;\n}\n.ele-timeline__wrapper .ele-timeline__item {\n display: flex;\n flex-direction: row;\n}\n.ele-timeline__wrapper .ele-timeline__item:last-child .ele-timeline__middle .ele-timeline__traline {\n display: none;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left {\n flex: 1;\n padding-right: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n text-align: right;\n display: flex;\n flex-direction: row;\n justify-content: end;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left .titleline-left__date {\n width: 100px;\n font-size: 14px;\n color: var(--idoole-black-064);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle {\n width: 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n transform: translate(0, 20px);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle .ele-timeline__circle {\n width: 100%;\n height: 10px;\n border-radius: 50%;\n border-width: 2px;\n border-style: solid;\n border-color: var(--idooel-primary-color);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle .ele-timeline__traline {\n width: 1px;\n height: calc(100% - 10px);\n border-width: 1px;\n border-style: solid;\n border-color: var(--idoole-black-016);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right {\n text-align: left;\n flex: 2;\n padding-left: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title {\n line-height: 22px;\n display: flex;\n flex-direction: row;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info {\n font-size: 14px;\n color: var(--idoole-black-064);\n margin-left: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info::before {\n content: \"\";\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-right: 8px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.success::before {\n background: var(--idoole-success-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.warning::before {\n background: var(--idoole-warning-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.error::before {\n background: var(--idoole-error-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper {\n line-height: 22px;\n margin-top: 8px;\n margin-left: 12px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper .oper-name {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle {\n margin-left: 12px;\n display: flex;\n flex-direction: row;\n line-height: 22px;\n margin-top: 4px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle .right-subtitle__field {\n flex-shrink: 0;\n font-size: 14px;\n color: var(--idoole-black-064);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle .right-subtitle__content {\n font-size: 14px;\n color: var(--idoole-black-088);\n font-weight: bold;\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
6492
6529
|
|
|
6493
6530
|
};
|
|
6494
6531
|
/* scoped */
|
|
6495
|
-
const __vue_scope_id__$
|
|
6532
|
+
const __vue_scope_id__$f = "data-v-24d69f04";
|
|
6496
6533
|
/* module identifier */
|
|
6497
|
-
const __vue_module_identifier__$
|
|
6534
|
+
const __vue_module_identifier__$f = undefined;
|
|
6498
6535
|
/* functional template */
|
|
6499
|
-
const __vue_is_functional_template__$
|
|
6536
|
+
const __vue_is_functional_template__$f = false;
|
|
6500
6537
|
/* style inject SSR */
|
|
6501
6538
|
|
|
6502
6539
|
/* style inject shadow dom */
|
|
6503
6540
|
|
|
6504
6541
|
|
|
6505
6542
|
|
|
6506
|
-
const __vue_component__$
|
|
6507
|
-
{ render: __vue_render__$
|
|
6508
|
-
__vue_inject_styles__$
|
|
6509
|
-
__vue_script__$
|
|
6510
|
-
__vue_scope_id__$
|
|
6511
|
-
__vue_is_functional_template__$
|
|
6512
|
-
__vue_module_identifier__$
|
|
6543
|
+
const __vue_component__$f = /*#__PURE__*/normalizeComponent(
|
|
6544
|
+
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
|
|
6545
|
+
__vue_inject_styles__$f,
|
|
6546
|
+
__vue_script__$f,
|
|
6547
|
+
__vue_scope_id__$f,
|
|
6548
|
+
__vue_is_functional_template__$f,
|
|
6549
|
+
__vue_module_identifier__$f,
|
|
6513
6550
|
false,
|
|
6514
6551
|
createInjector,
|
|
6515
6552
|
undefined,
|
|
6516
6553
|
undefined
|
|
6517
6554
|
);
|
|
6518
6555
|
|
|
6519
|
-
__vue_component__$
|
|
6556
|
+
__vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
|
|
6520
6557
|
|
|
6521
6558
|
//
|
|
6522
6559
|
//
|
|
@@ -6526,7 +6563,7 @@ __vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __v
|
|
|
6526
6563
|
//
|
|
6527
6564
|
//
|
|
6528
6565
|
|
|
6529
|
-
var script$
|
|
6566
|
+
var script$e = {
|
|
6530
6567
|
name: 'ele-text',
|
|
6531
6568
|
props: {
|
|
6532
6569
|
type: {
|
|
@@ -6546,10 +6583,10 @@ var script$d = {
|
|
|
6546
6583
|
};
|
|
6547
6584
|
|
|
6548
6585
|
/* script */
|
|
6549
|
-
const __vue_script__$
|
|
6586
|
+
const __vue_script__$e = script$e;
|
|
6550
6587
|
|
|
6551
6588
|
/* template */
|
|
6552
|
-
var __vue_render__$
|
|
6589
|
+
var __vue_render__$e = function () {
|
|
6553
6590
|
var _vm = this;
|
|
6554
6591
|
var _h = _vm.$createElement;
|
|
6555
6592
|
var _c = _vm._self._c || _h;
|
|
@@ -6564,41 +6601,41 @@ var __vue_render__$d = function () {
|
|
|
6564
6601
|
1
|
|
6565
6602
|
)
|
|
6566
6603
|
};
|
|
6567
|
-
var __vue_staticRenderFns__$
|
|
6568
|
-
__vue_render__$
|
|
6604
|
+
var __vue_staticRenderFns__$e = [];
|
|
6605
|
+
__vue_render__$e._withStripped = true;
|
|
6569
6606
|
|
|
6570
6607
|
/* style */
|
|
6571
|
-
const __vue_inject_styles__$
|
|
6608
|
+
const __vue_inject_styles__$e = function (inject) {
|
|
6572
6609
|
if (!inject) return
|
|
6573
6610
|
inject("data-v-636e07f7_0", { source: ".ele-text__wrapper[data-v-636e07f7] {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-text__wrapper.default .anticon[data-v-636e07f7], .ele-text__wrapper.default .message[data-v-636e07f7] {\n color: var(--idoole-black-064);\n}\n.ele-text__wrapper .anticon[data-v-636e07f7] {\n font-size: 16px;\n}\n.ele-text__wrapper .message[data-v-636e07f7] {\n font-size: 14px;\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/text/src/index.vue","index.vue"],"names":[],"mappings":"AA8BA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;AC7BA;AD+BA;EACA,8BAAA;AC7BA;ADgCA;EACA,eAAA;AC9BA;ADgCA;EACA,eAAA;EACA,gBAAA;AC9BA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div :class=\"['ele-text__wrapper', type]\">\n <ele-icon theme=\"filled\" :type=\"icon\"></ele-icon>\n <span class=\"message\">{{ message }}</span>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-text',\n props: {\n type: {\n String,\n // default success error warning info\n default: 'default'\n },\n message: {\n type: String\n }\n },\n computed: {\n icon() {\n return 'info-circle'\n }\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n//\n.ele-text__wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n &.default {\n .anticon, .message {\n color: var(--idoole-black-064);\n }\n }\n .anticon {\n font-size: 16px;\n }\n .message {\n font-size: 14px;\n margin-left: 4px;\n }\n}\n</style>",".ele-text__wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-text__wrapper.default .anticon, .ele-text__wrapper.default .message {\n color: var(--idoole-black-064);\n}\n.ele-text__wrapper .anticon {\n font-size: 16px;\n}\n.ele-text__wrapper .message {\n font-size: 14px;\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
6574
6611
|
|
|
6575
6612
|
};
|
|
6576
6613
|
/* scoped */
|
|
6577
|
-
const __vue_scope_id__$
|
|
6614
|
+
const __vue_scope_id__$e = "data-v-636e07f7";
|
|
6578
6615
|
/* module identifier */
|
|
6579
|
-
const __vue_module_identifier__$
|
|
6616
|
+
const __vue_module_identifier__$e = undefined;
|
|
6580
6617
|
/* functional template */
|
|
6581
|
-
const __vue_is_functional_template__$
|
|
6618
|
+
const __vue_is_functional_template__$e = false;
|
|
6582
6619
|
/* style inject SSR */
|
|
6583
6620
|
|
|
6584
6621
|
/* style inject shadow dom */
|
|
6585
6622
|
|
|
6586
6623
|
|
|
6587
6624
|
|
|
6588
|
-
const __vue_component__$
|
|
6589
|
-
{ render: __vue_render__$
|
|
6590
|
-
__vue_inject_styles__$
|
|
6591
|
-
__vue_script__$
|
|
6592
|
-
__vue_scope_id__$
|
|
6593
|
-
__vue_is_functional_template__$
|
|
6594
|
-
__vue_module_identifier__$
|
|
6625
|
+
const __vue_component__$e = /*#__PURE__*/normalizeComponent(
|
|
6626
|
+
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
|
|
6627
|
+
__vue_inject_styles__$e,
|
|
6628
|
+
__vue_script__$e,
|
|
6629
|
+
__vue_scope_id__$e,
|
|
6630
|
+
__vue_is_functional_template__$e,
|
|
6631
|
+
__vue_module_identifier__$e,
|
|
6595
6632
|
false,
|
|
6596
6633
|
createInjector,
|
|
6597
6634
|
undefined,
|
|
6598
6635
|
undefined
|
|
6599
6636
|
);
|
|
6600
6637
|
|
|
6601
|
-
__vue_component__$
|
|
6638
|
+
__vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
|
|
6602
6639
|
|
|
6603
6640
|
//
|
|
6604
6641
|
//
|
|
@@ -6615,7 +6652,7 @@ __vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __v
|
|
|
6615
6652
|
//
|
|
6616
6653
|
//
|
|
6617
6654
|
|
|
6618
|
-
var script$
|
|
6655
|
+
var script$d = {
|
|
6619
6656
|
name: 'ele-tabs',
|
|
6620
6657
|
components: {},
|
|
6621
6658
|
model: {
|
|
@@ -6651,10 +6688,10 @@ var script$c = {
|
|
|
6651
6688
|
};
|
|
6652
6689
|
|
|
6653
6690
|
/* script */
|
|
6654
|
-
const __vue_script__$
|
|
6691
|
+
const __vue_script__$d = script$d;
|
|
6655
6692
|
|
|
6656
6693
|
/* template */
|
|
6657
|
-
var __vue_render__$
|
|
6694
|
+
var __vue_render__$d = function () {
|
|
6658
6695
|
var _vm = this;
|
|
6659
6696
|
var _h = _vm.$createElement;
|
|
6660
6697
|
var _c = _vm._self._c || _h;
|
|
@@ -6705,41 +6742,41 @@ var __vue_render__$c = function () {
|
|
|
6705
6742
|
1
|
|
6706
6743
|
)
|
|
6707
6744
|
};
|
|
6708
|
-
var __vue_staticRenderFns__$
|
|
6709
|
-
__vue_render__$
|
|
6745
|
+
var __vue_staticRenderFns__$d = [];
|
|
6746
|
+
__vue_render__$d._withStripped = true;
|
|
6710
6747
|
|
|
6711
6748
|
/* style */
|
|
6712
|
-
const __vue_inject_styles__$
|
|
6749
|
+
const __vue_inject_styles__$d = function (inject) {
|
|
6713
6750
|
if (!inject) return
|
|
6714
6751
|
inject("data-v-508efd50_0", { source: "[data-v-508efd50] .ant-tabs-nav-scroll {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/tabs/src/index.vue","index.vue"],"names":[],"mappings":"AAoDA;EACA,sBAAA;ACnDA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div>\n <a-tabs :default-active-key=\"activeKey\" :tabBarGutter=\"tabBarGutter\" :tabBarStyle=\"tabBarStyle\" @change=\"changeHandle\">\n <a-tab-pane v-for=\"(item, index) in tabsList\" :key=\"index\" :tab=\"item.tabName\" :disabled=\"item.disabled\">\n <template #tab>\n <component v-if=\"item.renderHeader\" :is=\"item.renderHeader\" ></component>\n <span v-else>{{ item.tabName }}</span>\n </template>\n <component :is=\"item.content\"></component>\n </a-tab-pane>\n </a-tabs>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-tabs',\n components: {},\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n activeKey: {\n type: Number,\n default: 0\n },\n tabsList: {\n type: Array,\n default () {\n return []\n }\n },\n tabBarStyle: {\n type: Object,\n default () {\n return {}\n }\n },\n tabBarGutter: {\n type: Number\n }\n },\n methods: {\n changeHandle (key) {\n this.$emit('changeActiveKey', key)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n::v-deep .ant-tabs-nav-scroll {\n float: left !important;\n}\n</style>","::v-deep .ant-tabs-nav-scroll {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
6715
6752
|
|
|
6716
6753
|
};
|
|
6717
6754
|
/* scoped */
|
|
6718
|
-
const __vue_scope_id__$
|
|
6755
|
+
const __vue_scope_id__$d = "data-v-508efd50";
|
|
6719
6756
|
/* module identifier */
|
|
6720
|
-
const __vue_module_identifier__$
|
|
6757
|
+
const __vue_module_identifier__$d = undefined;
|
|
6721
6758
|
/* functional template */
|
|
6722
|
-
const __vue_is_functional_template__$
|
|
6759
|
+
const __vue_is_functional_template__$d = false;
|
|
6723
6760
|
/* style inject SSR */
|
|
6724
6761
|
|
|
6725
6762
|
/* style inject shadow dom */
|
|
6726
6763
|
|
|
6727
6764
|
|
|
6728
6765
|
|
|
6729
|
-
const __vue_component__$
|
|
6730
|
-
{ render: __vue_render__$
|
|
6731
|
-
__vue_inject_styles__$
|
|
6732
|
-
__vue_script__$
|
|
6733
|
-
__vue_scope_id__$
|
|
6734
|
-
__vue_is_functional_template__$
|
|
6735
|
-
__vue_module_identifier__$
|
|
6766
|
+
const __vue_component__$d = /*#__PURE__*/normalizeComponent(
|
|
6767
|
+
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
|
|
6768
|
+
__vue_inject_styles__$d,
|
|
6769
|
+
__vue_script__$d,
|
|
6770
|
+
__vue_scope_id__$d,
|
|
6771
|
+
__vue_is_functional_template__$d,
|
|
6772
|
+
__vue_module_identifier__$d,
|
|
6736
6773
|
false,
|
|
6737
6774
|
createInjector,
|
|
6738
6775
|
undefined,
|
|
6739
6776
|
undefined
|
|
6740
6777
|
);
|
|
6741
6778
|
|
|
6742
|
-
__vue_component__$
|
|
6779
|
+
__vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __vue_component__$d);
|
|
6743
6780
|
|
|
6744
6781
|
/*!
|
|
6745
6782
|
* Cropper.js v1.4.1
|
|
@@ -10451,7 +10488,7 @@ var Cropper = function () {
|
|
|
10451
10488
|
assign(Cropper.prototype, render, preview, events, handlers, change, methods);
|
|
10452
10489
|
|
|
10453
10490
|
//
|
|
10454
|
-
var script$
|
|
10491
|
+
var script$c = {
|
|
10455
10492
|
name: 'ele-modal-img-crop',
|
|
10456
10493
|
model: {
|
|
10457
10494
|
event: 'input',
|
|
@@ -10592,10 +10629,10 @@ var script$b = {
|
|
|
10592
10629
|
};
|
|
10593
10630
|
|
|
10594
10631
|
/* script */
|
|
10595
|
-
const __vue_script__$
|
|
10632
|
+
const __vue_script__$c = script$c;
|
|
10596
10633
|
|
|
10597
10634
|
/* template */
|
|
10598
|
-
var __vue_render__$
|
|
10635
|
+
var __vue_render__$c = function () {
|
|
10599
10636
|
var _vm = this;
|
|
10600
10637
|
var _h = _vm.$createElement;
|
|
10601
10638
|
var _c = _vm._self._c || _h;
|
|
@@ -10713,44 +10750,44 @@ var __vue_render__$b = function () {
|
|
|
10713
10750
|
1
|
|
10714
10751
|
)
|
|
10715
10752
|
};
|
|
10716
|
-
var __vue_staticRenderFns__$
|
|
10717
|
-
__vue_render__$
|
|
10753
|
+
var __vue_staticRenderFns__$c = [];
|
|
10754
|
+
__vue_render__$c._withStripped = true;
|
|
10718
10755
|
|
|
10719
10756
|
/* style */
|
|
10720
|
-
const __vue_inject_styles__$
|
|
10757
|
+
const __vue_inject_styles__$c = function (inject) {
|
|
10721
10758
|
if (!inject) return
|
|
10722
10759
|
inject("data-v-1fd3602e_0", { source: "[data-v-1fd3602e] .ant-modal-body {\n padding: 16px;\n}\n[data-v-1fd3602e] .ant-modal-header {\n padding: 16px;\n}\n.ele-imgCrop__wrapper[data-v-1fd3602e] {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg[data-v-1fd3602e] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .img-crop-left__image[data-v-1fd3602e] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-1fd3602e] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-1fd3602e] .ele-upload__inner {\n height: 100%;\n border: unset;\n background: transparent !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-1fd3602e] .ele-upload__inner .ele-upload__area {\n display: flex;\n flex-direction: column;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-1fd3602e] .ele-upload__inner .ele-upload__area .ele-upload__area--text {\n margin-top: 16px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font1[data-v-1fd3602e] {\n color: var(--idoole-black-088);\n font-size: 16px;\n line-height: 24px !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font2[data-v-1fd3602e] {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__update[data-v-1fd3602e] {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right[data-v-1fd3602e] {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span[data-v-1fd3602e] {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right .img-crop-right__image[data-v-1fd3602e] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item[data-v-1fd3602e] {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n}\n.ele-imgCrop__tips[data-v-1fd3602e] {\n float: left;\n width: 80%;\n}\n.ele-imgCrop__error[data-v-1fd3602e] {\n color: var(--idooel-form-border-err-color) !important;\n}\n.ele-imgCrop__error2[data-v-1fd3602e] {\n color: var(--idooel-img-crop-err-color) !important;\n}\n.ele-imgCrop__icon[data-v-1fd3602e] {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/composite-components/modal-img-crop/src/index.vue","index.vue"],"names":[],"mappings":"AAsLA;EACA,aAAA;ACrLA;ADuLA;EACA,aAAA;ACpLA;ADsLA;EACA,aAAA;EACA,SAAA;EACA,uBAAA;EACA,mBAAA;ACnLA;ADqLA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;ACnLA;ADoLA;EACA,WAAA;EACA,YAAA;AClLA;ADoLA;EACA,WAAA;EACA,YAAA;AClLA;ADmLA;EACA,YAAA;EACA,aAAA;EACA,kCAAA;ACjLA;ADkLA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;AChLA;ADiLA;EACA,gBAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;AC/KA;ADoLA;EACA,8BAAA;EACA,eAAA;EACA,4BAAA;AClLA;ADoLA;EACA,6BAAA;EACA,eAAA;EACA,iBAAA;AClLA;ADqLA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,eAAA;ACnLA;ADsLA;EACA,kBAAA;ACpLA;ADqLA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;ACnLA;ADqLA;EACA,WAAA;EACA,YAAA;ACnLA;ADsLA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,wDAAA;EACA,8CAAA;ACpLA;ADuLA;EACA,WAAA;EACA,UAAA;ACpLA;ADsLA;EACA,qDAAA;ACnLA;ADqLA;EACA,kDAAA;AClLA;ADoLA;EACA,eAAA;EACA,4BAAA;ACjLA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div>\n <ele-modal\n :ref=\"getEleModal\"\n :title=\"title\"\n :cancelText=\"cancelText\"\n :maskClosable=\"maskClosable\"\n v-on=\"$listeners\"\n :size=\"size\"\n :value=\"value\"\n @ok=\"handleOk\"\n :showDefaultFooter=\"true\"\n >\n <div class=\"ele-imgCrop__wrapper\">\n <div class=\"ele-imgCrop__left ele-imgCrop__item\">\n <div class=\"ele-imgCrop__noImg\">\n <ele-upload v-if=\"!fileId\" v-bind=\"uploadFileConfig\" class=\"ele-img-crop__upload\" @on-success=\"onUploadFileSuccess\" icon=\"inbox\" url=\"api/zuul/api-file/workbench/file\"></ele-upload>\n <template v-else>\n <img :ref=\"leftImage\" class=\"img-crop-left__image\" :src=\"imageUrl\" alt=\"\">\n </template>\n </div>\n <div class=\"margin-t-8\">\n <span v-if=\"imgtips\" class=\"ele-imgCrop__font1 ele-imgCrop__tips\" :class=\"isFail? 'ele-imgCrop__error' : ''\">{{ imgtips }}</span>\n <template v-else>\n <span class=\"ele-imgCrop__font1\">{{ fileName }}</span>\n <a-icon v-if=\"fileName\" @click=\"handleClickDeleteFile\" type=\"close\" style=\"cursor: pointer;float: right; line-height: 24px;\"/>\n </template>\n </div>\n </div>\n <div class=\"ele-imgCrop__right ele-imgCrop__item\">\n <span v-if=\"!fileId\" class=\"ele-imgCrop__font2\">左侧上传图片后可预览</span>\n <template v-else>\n <img class=\"img-crop-right__image\" :src=\"previewBase\" alt=\"\">\n </template>\n </div>\n </div>\n </ele-modal>\n </div>\n</template>\n\n<script>\nimport { v4 as uuidv4 } from 'uuid'\nimport Cropper from 'cropperjs'\nimport { util, net } from '@idooel/shared'\nexport default {\n name: 'ele-modal-img-crop',\n model: {\n event: 'input',\n prop: 'value'\n },\n props: {\n title: {\n type: String,\n default: '图像裁剪'\n },\n uploadFileConfig: {\n type: Object,\n default: () => {\n return {\n size: 10,\n accept: '*',\n byteConversion: 1024 * 1024\n }\n }\n },\n imageId: {\n type: String\n },\n maskClosable: {\n type: Boolean,\n default () {\n return false\n }\n },\n size: {\n type: String,\n default () {\n return 'big'\n }\n },\n value: {\n type: Boolean,\n default () {\n return false\n }\n },\n cropperConfig: {\n type: Object,\n default: () => {\n return {\n aspectRatio: 16 / 9\n }\n }\n }\n },\n data () {\n return {\n haveImg: false,\n imgtips: null,\n isFail: false,\n cancelText: '取消',\n fileName: null,\n fileId: null,\n previewBase: null,\n cropper: null\n }\n },\n computed: {\n leftImage () {\n return uuidv4()\n },\n imageUrl () {\n return `api-file/workbench/file/stream/${this.fileId}?origin=true`\n },\n getEleModal () {\n return uuidv4()\n }\n },\n watch: {\n value: {\n handler (value) {\n this.fileId = this.imageId\n if (value && this.fileId) {\n setTimeout(() => {\n this.initCropper()\n })\n }\n },\n immediate: true\n }\n },\n methods: {\n handleClickDeleteFile () {\n this.fileId = null\n this.fileName = null\n },\n handleOk () {\n this.cropper.getCroppedCanvas().toBlob(async (blob) => {\n await this.uploadFile(blob)\n this.$emit('input', false)\n this.$emit('change', this.fileId)\n })\n },\n async uploadFile (file) {\n const formData = new FormData()\n formData.append('serviceCode', 'cover-image')\n formData.append('_t', Math.random())\n formData.append('file', file)\n await net.post(\n 'zuul/api-file/workbench/file' + '?_csrf=' + localStorage.getItem('token'),\n formData\n ).then(() => {})\n },\n initCropper () {\n let previewReady = false\n console.log('this.$refs[this.leftImage', this.$refs[this.leftImage])\n this.cropper = new Cropper(this.$refs[this.leftImage], {\n aspectRatio: this.cropperConfig.aspectRatio,\n ready: () => {\n previewReady = true\n },\n crop: util.debounce(() => {\n if (!previewReady) {\n return\n }\n this.previewBase = this.cropper.getCroppedCanvas().toDataURL()\n }, 200)\n })\n },\n onUploadFileSuccess (props) {\n const { response: { data: { fileID } }, name } = props\n this.fileId = fileID\n this.fileName = name\n this.$nextTick(() => {\n this.initCropper()\n })\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n::v-deep .ant-modal-body {\n padding: 16px;\n}\n::v-deep .ant-modal-header {\n padding: 16px;\n}\n.ele-imgCrop__wrapper {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n .ele-imgCrop__left {\n .ele-imgCrop__noImg {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n .img-crop-left__image {\n width: 100%;\n height: 100%;\n }\n .ele-img-crop__upload {\n width: 100%;\n height: 100%;\n ::v-deep .ele-upload__inner {\n height: 100%;\n border: unset;\n background: transparent !important;\n .ele-upload__area {\n display: flex;\n flex-direction: column;\n height: 100%;\n align-items: center;\n justify-content: center;\n .ele-upload__area--text {\n margin-top: 16px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n }\n }\n .ele-imgCrop__font1 {\n color: var(--idoole-black-088);\n font-size: 16px;\n line-height: 24px !important;\n }\n .ele-imgCrop__font2 {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px; \n }\n }\n .ele-imgCrop__update {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n }\n }\n .ele-imgCrop__right {\n position: relative;\n span {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n .img-crop-right__image {\n width: 100%;\n height: 100%;\n }\n }\n .ele-imgCrop__item {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n }\n}\n.ele-imgCrop__tips {\n float: left;\n width: 80%;\n}\n.ele-imgCrop__error {\n color: var(--idooel-form-border-err-color) !important;\n}\n.ele-imgCrop__error2 {\n color: var(--idooel-img-crop-err-color) !important;\n}\n.ele-imgCrop__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n</style>","::v-deep .ant-modal-body {\n padding: 16px;\n}\n\n::v-deep .ant-modal-header {\n padding: 16px;\n}\n\n.ele-imgCrop__wrapper {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .img-crop-left__image {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner {\n height: 100%;\n border: unset;\n background: transparent !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner .ele-upload__area {\n display: flex;\n flex-direction: column;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner .ele-upload__area .ele-upload__area--text {\n margin-top: 16px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font1 {\n color: var(--idoole-black-088);\n font-size: 16px;\n line-height: 24px !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font2 {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__update {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right .img-crop-right__image {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n}\n\n.ele-imgCrop__tips {\n float: left;\n width: 80%;\n}\n\n.ele-imgCrop__error {\n color: var(--idooel-form-border-err-color) !important;\n}\n\n.ele-imgCrop__error2 {\n color: var(--idooel-img-crop-err-color) !important;\n}\n\n.ele-imgCrop__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
10723
10760
|
|
|
10724
10761
|
};
|
|
10725
10762
|
/* scoped */
|
|
10726
|
-
const __vue_scope_id__$
|
|
10763
|
+
const __vue_scope_id__$c = "data-v-1fd3602e";
|
|
10727
10764
|
/* module identifier */
|
|
10728
|
-
const __vue_module_identifier__$
|
|
10765
|
+
const __vue_module_identifier__$c = undefined;
|
|
10729
10766
|
/* functional template */
|
|
10730
|
-
const __vue_is_functional_template__$
|
|
10767
|
+
const __vue_is_functional_template__$c = false;
|
|
10731
10768
|
/* style inject SSR */
|
|
10732
10769
|
|
|
10733
10770
|
/* style inject shadow dom */
|
|
10734
10771
|
|
|
10735
10772
|
|
|
10736
10773
|
|
|
10737
|
-
const __vue_component__$
|
|
10738
|
-
{ render: __vue_render__$
|
|
10739
|
-
__vue_inject_styles__$
|
|
10740
|
-
__vue_script__$
|
|
10741
|
-
__vue_scope_id__$
|
|
10742
|
-
__vue_is_functional_template__$
|
|
10743
|
-
__vue_module_identifier__$
|
|
10774
|
+
const __vue_component__$c = /*#__PURE__*/normalizeComponent(
|
|
10775
|
+
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
|
|
10776
|
+
__vue_inject_styles__$c,
|
|
10777
|
+
__vue_script__$c,
|
|
10778
|
+
__vue_scope_id__$c,
|
|
10779
|
+
__vue_is_functional_template__$c,
|
|
10780
|
+
__vue_module_identifier__$c,
|
|
10744
10781
|
false,
|
|
10745
10782
|
createInjector,
|
|
10746
10783
|
undefined,
|
|
10747
10784
|
undefined
|
|
10748
10785
|
);
|
|
10749
10786
|
|
|
10750
|
-
__vue_component__$
|
|
10787
|
+
__vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __vue_component__$c);
|
|
10751
10788
|
|
|
10752
10789
|
//
|
|
10753
|
-
var script$
|
|
10790
|
+
var script$b = {
|
|
10754
10791
|
name: 'ele-text-editor',
|
|
10755
10792
|
props: {
|
|
10756
10793
|
editorWidth: {
|
|
@@ -10796,10 +10833,10 @@ var script$a = {
|
|
|
10796
10833
|
};
|
|
10797
10834
|
|
|
10798
10835
|
/* script */
|
|
10799
|
-
const __vue_script__$
|
|
10836
|
+
const __vue_script__$b = script$b;
|
|
10800
10837
|
|
|
10801
10838
|
/* template */
|
|
10802
|
-
var __vue_render__$
|
|
10839
|
+
var __vue_render__$b = function () {
|
|
10803
10840
|
var _vm = this;
|
|
10804
10841
|
var _h = _vm.$createElement;
|
|
10805
10842
|
var _c = _vm._self._c || _h;
|
|
@@ -10822,41 +10859,41 @@ var __vue_render__$a = function () {
|
|
|
10822
10859
|
1
|
|
10823
10860
|
)
|
|
10824
10861
|
};
|
|
10825
|
-
var __vue_staticRenderFns__$
|
|
10826
|
-
__vue_render__$
|
|
10862
|
+
var __vue_staticRenderFns__$b = [];
|
|
10863
|
+
__vue_render__$b._withStripped = true;
|
|
10827
10864
|
|
|
10828
10865
|
/* style */
|
|
10829
|
-
const __vue_inject_styles__$
|
|
10866
|
+
const __vue_inject_styles__$b = function (inject) {
|
|
10830
10867
|
if (!inject) return
|
|
10831
10868
|
inject("data-v-baee03c0_0", { source: ".ele-editor__bottom[data-v-baee03c0] {\n height: 40px;\n padding: 8px 20px 8px 8px;\n border: 1px solid var(--idooel-form-title-border-color);\n border-top: 0px;\n}\n.ele-editor__bottom span[data-v-baee03c0] {\n color: var(--idoole-black-088);\n text-align: right;\n font-size: 12px;\n line-height: 20px;\n width: 100%;\n display: inline-block;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/text-editor/src/index.vue","index.vue"],"names":[],"mappings":"AA0DA;EACA,YAAA;EACA,yBAAA;EACA,uDAAA;EACA,eAAA;ACzDA;AD0DA;EACA,8BAAA;EACA,iBAAA;EACA,eAAA;EACA,iBAAA;EACA,WAAA;EACA,qBAAA;ACxDA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele-editor__wrapper\" :style=\"{width: editorWidth, height: editorHeight}\">\n <Vueditor :ref=\"getVueditor\" :style=\"{width: editorWidth, height: editorHeight}\"></Vueditor>\n <div class=\"ele-editor__bottom\">\n <span>{{ innerContent.length }}字</span>\n </div>\n </div>\n</template>\n\n<script>\nimport { v4 as uuidv4 } from 'uuid'\nexport default {\n name: 'ele-text-editor',\n props: {\n editorWidth: {\n type: String\n },\n editorHeight: {\n type: String\n },\n maxLength: {\n type: Number,\n default () {\n return 10\n }\n }\n },\n data() {\n return {\n editorConfig: {},\n textEditorRef: null\n }\n },\n computed: {\n innerContent () {\n let content = this.textEditorRef ? this.textEditorRef.getContent() : ''\n if (this.textEditorRef && content.length > this.maxLength) {\n content = content.substring(0, this.maxLength)\n this.$nextTick(() => {\n this.textEditorRef.setContent(content)\n })\n }\n this.$emit('input', content)\n return content\n },\n getVueditor () {\n return uuidv4()\n }\n },\n watch: {},\n methods: {},\n mounted () {\n this.textEditorRef = this.$refs[this.getVueditor]\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele-editor__bottom {\n height: 40px;\n padding: 8px 20px 8px 8px;\n border: 1px solid var(--idooel-form-title-border-color);\n border-top: 0px;\n span {\n color: var(--idoole-black-088);\n text-align: right;\n font-size: 12px;\n line-height: 20px;\n width: 100%;\n display: inline-block;\n }\n}\n</style>",".ele-editor__bottom {\n height: 40px;\n padding: 8px 20px 8px 8px;\n border: 1px solid var(--idooel-form-title-border-color);\n border-top: 0px;\n}\n.ele-editor__bottom span {\n color: var(--idoole-black-088);\n text-align: right;\n font-size: 12px;\n line-height: 20px;\n width: 100%;\n display: inline-block;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
10832
10869
|
|
|
10833
10870
|
};
|
|
10834
10871
|
/* scoped */
|
|
10835
|
-
const __vue_scope_id__$
|
|
10872
|
+
const __vue_scope_id__$b = "data-v-baee03c0";
|
|
10836
10873
|
/* module identifier */
|
|
10837
|
-
const __vue_module_identifier__$
|
|
10874
|
+
const __vue_module_identifier__$b = undefined;
|
|
10838
10875
|
/* functional template */
|
|
10839
|
-
const __vue_is_functional_template__$
|
|
10876
|
+
const __vue_is_functional_template__$b = false;
|
|
10840
10877
|
/* style inject SSR */
|
|
10841
10878
|
|
|
10842
10879
|
/* style inject shadow dom */
|
|
10843
10880
|
|
|
10844
10881
|
|
|
10845
10882
|
|
|
10846
|
-
const __vue_component__$
|
|
10847
|
-
{ render: __vue_render__$
|
|
10848
|
-
__vue_inject_styles__$
|
|
10849
|
-
__vue_script__$
|
|
10850
|
-
__vue_scope_id__$
|
|
10851
|
-
__vue_is_functional_template__$
|
|
10852
|
-
__vue_module_identifier__$
|
|
10883
|
+
const __vue_component__$b = /*#__PURE__*/normalizeComponent(
|
|
10884
|
+
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
|
|
10885
|
+
__vue_inject_styles__$b,
|
|
10886
|
+
__vue_script__$b,
|
|
10887
|
+
__vue_scope_id__$b,
|
|
10888
|
+
__vue_is_functional_template__$b,
|
|
10889
|
+
__vue_module_identifier__$b,
|
|
10853
10890
|
false,
|
|
10854
10891
|
createInjector,
|
|
10855
10892
|
undefined,
|
|
10856
10893
|
undefined
|
|
10857
10894
|
);
|
|
10858
10895
|
|
|
10859
|
-
__vue_component__$
|
|
10896
|
+
__vue_component__$b.install = Vue => Vue.component(__vue_component__$b.name, __vue_component__$b);
|
|
10860
10897
|
|
|
10861
10898
|
//
|
|
10862
10899
|
//
|
|
@@ -10871,7 +10908,7 @@ __vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __v
|
|
|
10871
10908
|
//
|
|
10872
10909
|
//
|
|
10873
10910
|
|
|
10874
|
-
var script$
|
|
10911
|
+
var script$a = {
|
|
10875
10912
|
name: 'ele-textarea',
|
|
10876
10913
|
model: {
|
|
10877
10914
|
prop: 'value',
|
|
@@ -10913,10 +10950,10 @@ var script$9 = {
|
|
|
10913
10950
|
};
|
|
10914
10951
|
|
|
10915
10952
|
/* script */
|
|
10916
|
-
const __vue_script__$
|
|
10953
|
+
const __vue_script__$a = script$a;
|
|
10917
10954
|
|
|
10918
10955
|
/* template */
|
|
10919
|
-
var __vue_render__$
|
|
10956
|
+
var __vue_render__$a = function () {
|
|
10920
10957
|
var _vm = this;
|
|
10921
10958
|
var _h = _vm.$createElement;
|
|
10922
10959
|
var _c = _vm._self._c || _h;
|
|
@@ -10932,41 +10969,41 @@ var __vue_render__$9 = function () {
|
|
|
10932
10969
|
on: { change: _vm.onChange },
|
|
10933
10970
|
})
|
|
10934
10971
|
};
|
|
10935
|
-
var __vue_staticRenderFns__$
|
|
10936
|
-
__vue_render__$
|
|
10972
|
+
var __vue_staticRenderFns__$a = [];
|
|
10973
|
+
__vue_render__$a._withStripped = true;
|
|
10937
10974
|
|
|
10938
10975
|
/* style */
|
|
10939
|
-
const __vue_inject_styles__$
|
|
10976
|
+
const __vue_inject_styles__$a = function (inject) {
|
|
10940
10977
|
if (!inject) return
|
|
10941
10978
|
inject("data-v-27d78bca_0", { source: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", map: {"version":3,"sources":[],"names":[],"mappings":"","file":"index.vue"}, media: undefined });
|
|
10942
10979
|
|
|
10943
10980
|
};
|
|
10944
10981
|
/* scoped */
|
|
10945
|
-
const __vue_scope_id__$
|
|
10982
|
+
const __vue_scope_id__$a = "data-v-27d78bca";
|
|
10946
10983
|
/* module identifier */
|
|
10947
|
-
const __vue_module_identifier__$
|
|
10984
|
+
const __vue_module_identifier__$a = undefined;
|
|
10948
10985
|
/* functional template */
|
|
10949
|
-
const __vue_is_functional_template__$
|
|
10986
|
+
const __vue_is_functional_template__$a = false;
|
|
10950
10987
|
/* style inject SSR */
|
|
10951
10988
|
|
|
10952
10989
|
/* style inject shadow dom */
|
|
10953
10990
|
|
|
10954
10991
|
|
|
10955
10992
|
|
|
10956
|
-
const __vue_component__$
|
|
10957
|
-
{ render: __vue_render__$
|
|
10958
|
-
__vue_inject_styles__$
|
|
10959
|
-
__vue_script__$
|
|
10960
|
-
__vue_scope_id__$
|
|
10961
|
-
__vue_is_functional_template__$
|
|
10962
|
-
__vue_module_identifier__$
|
|
10993
|
+
const __vue_component__$a = /*#__PURE__*/normalizeComponent(
|
|
10994
|
+
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
|
|
10995
|
+
__vue_inject_styles__$a,
|
|
10996
|
+
__vue_script__$a,
|
|
10997
|
+
__vue_scope_id__$a,
|
|
10998
|
+
__vue_is_functional_template__$a,
|
|
10999
|
+
__vue_module_identifier__$a,
|
|
10963
11000
|
false,
|
|
10964
11001
|
createInjector,
|
|
10965
11002
|
undefined,
|
|
10966
11003
|
undefined
|
|
10967
11004
|
);
|
|
10968
11005
|
|
|
10969
|
-
__vue_component__$
|
|
11006
|
+
__vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __vue_component__$a);
|
|
10970
11007
|
|
|
10971
11008
|
//
|
|
10972
11009
|
//
|
|
@@ -10976,7 +11013,7 @@ __vue_component__$9.install = Vue => Vue.component(__vue_component__$9.name, __v
|
|
|
10976
11013
|
//
|
|
10977
11014
|
//
|
|
10978
11015
|
|
|
10979
|
-
var script$
|
|
11016
|
+
var script$9 = {
|
|
10980
11017
|
props: {
|
|
10981
11018
|
label: {
|
|
10982
11019
|
type: String
|
|
@@ -10985,10 +11022,10 @@ var script$8 = {
|
|
|
10985
11022
|
};
|
|
10986
11023
|
|
|
10987
11024
|
/* script */
|
|
10988
|
-
const __vue_script__$
|
|
11025
|
+
const __vue_script__$9 = script$9;
|
|
10989
11026
|
|
|
10990
11027
|
/* template */
|
|
10991
|
-
var __vue_render__$
|
|
11028
|
+
var __vue_render__$9 = function () {
|
|
10992
11029
|
var _vm = this;
|
|
10993
11030
|
var _h = _vm.$createElement;
|
|
10994
11031
|
var _c = _vm._self._c || _h;
|
|
@@ -10998,34 +11035,34 @@ var __vue_render__$8 = function () {
|
|
|
10998
11035
|
_c("span", { staticClass: "label__suffix" }, [_vm._v(":")]),
|
|
10999
11036
|
])
|
|
11000
11037
|
};
|
|
11001
|
-
var __vue_staticRenderFns__$
|
|
11002
|
-
__vue_render__$
|
|
11038
|
+
var __vue_staticRenderFns__$9 = [];
|
|
11039
|
+
__vue_render__$9._withStripped = true;
|
|
11003
11040
|
|
|
11004
11041
|
/* style */
|
|
11005
|
-
const __vue_inject_styles__$
|
|
11042
|
+
const __vue_inject_styles__$9 = function (inject) {
|
|
11006
11043
|
if (!inject) return
|
|
11007
11044
|
inject("data-v-07e596bf_0", { source: ".g-search__label[data-v-07e596bf] {\n /* width: 69px; */\n flex-basis: 69px;\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.g-search__label .label__title[data-v-07e596bf], .g-search__label .label__suffix[data-v-07e596bf] {\n font-size: 14px;\n color: rgba(0, 0, 0, 0.88);\n white-space: nowrap;\n}\n.g-search__label .label__suffix[data-v-07e596bf] {\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=label.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/composite-components/search-area/src/label.vue","label.vue"],"names":[],"mappings":"AAkBA;EACA,iBAAA;EACA,gBAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;ACjBA;ADkBA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;AChBA;ADkBA;EACA,gBAAA;AChBA;;AAEA,oCAAoC","file":"label.vue","sourcesContent":["<template>\n <div class=\"g-search__label\">\n <span class=\"label__title\">{{ label }}</span>\n <span class=\"label__suffix\">:</span>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n label: {\n type: String\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-search__label {\n /* width: 69px; */\n flex-basis: 69px;\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n .label__title, .label__suffix {\n font-size: 14px;\n color: rgba(0, 0, 0, 0.88);\n white-space: nowrap;\n }\n .label__suffix {\n margin-left: 4px;\n }\n}\n</style>",".g-search__label {\n /* width: 69px; */\n flex-basis: 69px;\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.g-search__label .label__title, .g-search__label .label__suffix {\n font-size: 14px;\n color: rgba(0, 0, 0, 0.88);\n white-space: nowrap;\n}\n.g-search__label .label__suffix {\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=label.vue.map */"]}, media: undefined });
|
|
11008
11045
|
|
|
11009
11046
|
};
|
|
11010
11047
|
/* scoped */
|
|
11011
|
-
const __vue_scope_id__$
|
|
11048
|
+
const __vue_scope_id__$9 = "data-v-07e596bf";
|
|
11012
11049
|
/* module identifier */
|
|
11013
|
-
const __vue_module_identifier__$
|
|
11050
|
+
const __vue_module_identifier__$9 = undefined;
|
|
11014
11051
|
/* functional template */
|
|
11015
|
-
const __vue_is_functional_template__$
|
|
11052
|
+
const __vue_is_functional_template__$9 = false;
|
|
11016
11053
|
/* style inject SSR */
|
|
11017
11054
|
|
|
11018
11055
|
/* style inject shadow dom */
|
|
11019
11056
|
|
|
11020
11057
|
|
|
11021
11058
|
|
|
11022
|
-
const __vue_component__$
|
|
11023
|
-
{ render: __vue_render__$
|
|
11024
|
-
__vue_inject_styles__$
|
|
11025
|
-
__vue_script__$
|
|
11026
|
-
__vue_scope_id__$
|
|
11027
|
-
__vue_is_functional_template__$
|
|
11028
|
-
__vue_module_identifier__$
|
|
11059
|
+
const __vue_component__$9 = /*#__PURE__*/normalizeComponent(
|
|
11060
|
+
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
|
|
11061
|
+
__vue_inject_styles__$9,
|
|
11062
|
+
__vue_script__$9,
|
|
11063
|
+
__vue_scope_id__$9,
|
|
11064
|
+
__vue_is_functional_template__$9,
|
|
11065
|
+
__vue_module_identifier__$9,
|
|
11029
11066
|
false,
|
|
11030
11067
|
createInjector,
|
|
11031
11068
|
undefined,
|
|
@@ -11033,10 +11070,10 @@ __vue_render__$8._withStripped = true;
|
|
|
11033
11070
|
);
|
|
11034
11071
|
|
|
11035
11072
|
//
|
|
11036
|
-
var script$
|
|
11073
|
+
var script$8 = {
|
|
11037
11074
|
name: 'ele-search-area',
|
|
11038
11075
|
components: {
|
|
11039
|
-
Label: __vue_component__$
|
|
11076
|
+
Label: __vue_component__$9
|
|
11040
11077
|
},
|
|
11041
11078
|
props: {
|
|
11042
11079
|
gutter: {
|
|
@@ -11175,10 +11212,10 @@ var script$7 = {
|
|
|
11175
11212
|
};
|
|
11176
11213
|
|
|
11177
11214
|
/* script */
|
|
11178
|
-
const __vue_script__$
|
|
11215
|
+
const __vue_script__$8 = script$8;
|
|
11179
11216
|
|
|
11180
11217
|
/* template */
|
|
11181
|
-
var __vue_render__$
|
|
11218
|
+
var __vue_render__$8 = function () {
|
|
11182
11219
|
var _vm = this;
|
|
11183
11220
|
var _h = _vm.$createElement;
|
|
11184
11221
|
var _c = _vm._self._c || _h;
|
|
@@ -11298,7 +11335,10 @@ var __vue_render__$7 = function () {
|
|
|
11298
11335
|
}),
|
|
11299
11336
|
_vm._v(" "),
|
|
11300
11337
|
_c("ele-select", {
|
|
11301
|
-
attrs: {
|
|
11338
|
+
attrs: {
|
|
11339
|
+
multiple: item.multiple,
|
|
11340
|
+
"data-source": item.optionList,
|
|
11341
|
+
},
|
|
11302
11342
|
model: {
|
|
11303
11343
|
value: item._value,
|
|
11304
11344
|
callback: function ($$v) {
|
|
@@ -11361,44 +11401,44 @@ var __vue_render__$7 = function () {
|
|
|
11361
11401
|
1
|
|
11362
11402
|
)
|
|
11363
11403
|
};
|
|
11364
|
-
var __vue_staticRenderFns__$
|
|
11365
|
-
__vue_render__$
|
|
11404
|
+
var __vue_staticRenderFns__$8 = [];
|
|
11405
|
+
__vue_render__$8._withStripped = true;
|
|
11366
11406
|
|
|
11367
11407
|
/* style */
|
|
11368
|
-
const __vue_inject_styles__$
|
|
11408
|
+
const __vue_inject_styles__$8 = function (inject) {
|
|
11369
11409
|
if (!inject) return
|
|
11370
|
-
inject("data-v-
|
|
11410
|
+
inject("data-v-48ea0d0b_0", { source: ".search-area__wrapper[data-v-48ea0d0b] {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n}\n.search-area__wrapper[data-v-48ea0d0b] .ant-col:last-child {\n float: right;\n}\n.search-area__wrapper .search-area__item[data-v-48ea0d0b] {\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.search-area__wrapper .search-area__item.search-area--action[data-v-48ea0d0b] {\n justify-content: end;\n}\n.search-area__wrapper .search-area__item .expand-collapse[data-v-48ea0d0b] {\n margin-left: 8px;\n height: 32px;\n padding: 4px 16px;\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__text[data-v-48ea0d0b] {\n font-size: 14px;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__icon[data-v-48ea0d0b] {\n font-size: 16px;\n margin-left: 8px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/composite-components/search-area/src/index.vue","index.vue"],"names":[],"mappings":"AAwLA;EACA,iBAAA;EACA,kBAAA;EACA,mBAAA;ACvLA;ADyLA;EACA,YAAA;ACvLA;AD0LA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACxLA;ADyLA;EACA,oBAAA;ACvLA;ADyLA;EACA,gBAAA;EACA,YAAA;EACA,iBAAA;EACA,kCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,uBAAA;EACA,eAAA;ACvLA;ADwLA;EACA,eAAA;ACtLA;ADwLA;EACA,eAAA;EACA,gBAAA;ACtLA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"search-area__wrapper\">\n <a-row :gutter=\"gutter\">\n <template v-for=\"(item, idx) in innerDataSource\">\n <a-col v-if=\"item._show\" :span=\"item.span || span\" :key=\"idx\">\n <div v-if=\"item.type == '_action'\" class=\"search-area__item search-area--action\">\n <ele-button icon=\"search\" type=\"primary\" @click=\"handleClickSearch\">查询</ele-button>\n <ele-button style=\"margin-left:8px;\" icon=\"reload\" @click=\"handleClickReset\">重置</ele-button>\n <div v-if=\"innerDataSource.length > cuttingFormula + 1\" class=\"expand-collapse\" @click=\"handleClickExpandCollapse\">\n <span class=\"expand-collapse__text\">{{ isExpand ? '收起' : '展开' }}</span>\n <span class=\"expand-collapse__icon\">\n <a-icon v-if=\"isExpand\" type=\"up\" />\n <a-icon v-else type=\"down\" />\n </span>\n </div>\n </div>\n <div v-else class=\"search-area__item\">\n <template v-if=\"item.type == 'Input'\">\n <Label :label=\"item.label\"></Label>\n <ele-input v-model=\"item._value\"></ele-input>\n </template>\n <template v-else-if=\"item.type == 'Select'\">\n <Label :label=\"item.label\"></Label>\n <ele-select v-model=\"item._value\" :multiple=\"item.multiple\" :data-source=\"item.optionList\"></ele-select>\n </template>\n <template v-else-if=\"item.type == 'DatePicker'\">\n <Label :label=\"item.label\"></Label>\n <ele-date v-model=\"item._value\" :format=\"item.format\"></ele-date>\n </template>\n <template v-else-if=\"item.type == 'ele-date-range'\">\n <Label :label=\"item.label\"></Label>\n <ele-date-range v-model=\"item._value\" :format=\"item.format\" :show-time=\"item.showTime\"></ele-date-range>\n </template>\n </div>\n </a-col>\n </template>\n </a-row>\n </div>\n</template>\n\n<script>\nimport Label from './label.vue'\nimport moment from 'moment'\nimport { parse } from '@idooel/expression'\nexport default {\n name: 'ele-search-area',\n components: {\n Label\n },\n props: {\n gutter: {\n type: [Number, Array, Object],\n default: () => ([\n 16, 8\n ])\n },\n span: {\n type: Number,\n default: 8\n },\n dataSource: {\n type: Array,\n required: true\n }\n },\n data() {\n return {\n isExpand: false\n }\n },\n computed: {\n cuttingFormula () {\n return (24 / this.span - 1)\n },\n buildDataSource () {\n return this.controlDisplayByFormula(this.mapDefaultValueToValue())\n },\n innerDataSource () {\n return [ ...this.buildDataSource, { type: '_action', _show: true }]\n }\n },\n created() {},\n methods: {\n controlDisplayByFormula (dataSource = []) {\n if (this.isExpand) {\n dataSource.forEach(item => {\n this.$set(item, '_show', true)\n })\n } else {\n dataSource.forEach((item, idx) => {\n if (idx < this.cuttingFormula) {\n this.$set(item, '_show', true)\n } else {\n this.$set(item, '_show', false)\n }\n })\n }\n return dataSource\n },\n buildDefaultValue (arg) {\n if (!arg || arg.charAt(0) !== '_') return arg\n return parse(arg, {\n _route: this.$route.query\n })\n },\n mapDefaultValueToValue () {\n this.dataSource.forEach(props => {\n this.$set(props, '_show', this.isExpand)\n if (props.defaultValue) {\n this.$set(props, '_value', this.buildDefaultValue(props.defaultValue))\n }\n })\n return this.dataSource\n },\n handleClickExpandCollapse () {\n this.isExpand = !this.isExpand\n },\n handleClickSearch () {\n const querys = this.extractValues()\n this.$emit('search', querys)\n },\n buildMapto (mapTo = [], dataSource) {\n const [ startField, endField ] = mapTo\n const [ startValue, endValue ] = dataSource || [null, null]\n return {\n [startField]: startValue,\n [endField]: endValue\n }\n },\n extractValues () {\n let ret = {}\n this.innerDataSource.filter(item => item.type !== '_action').forEach(item => {\n switch (item.type) {\n case 'DatePicker':\n ret[item.name] = typeof item._value == 'undefined' ? undefined : moment(item._value).format(item.format)\n break\n case 'ele-date-range':\n if (item.mapTo) {\n Object.assign(ret, this.buildMapto(item.mapTo, item._value))\n } else {\n ret[item.name] = (item._value || []).join(',')\n }\n break\n default:\n ret[item.name] = item._value\n break\n }\n })\n return ret\n },\n handleClickReset () {\n this.innerDataSource.filter(item => item.type !== '_action').forEach(item => {\n const { defaultValue } = item\n switch (item.type) {\n case 'Select':\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\n !defaultValue && this.$set(item, '_value', null)\n break\n case 'DatePicker':\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\n !defaultValue && this.$set(item, '_value', undefined)\n break\n case 'ele-date-range':\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\n !defaultValue && this.$set(item, '_value', [])\n break\n default:\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\n !defaultValue && this.$set(item, '_value', null)\n break\n }\n })\n //TODO defaultValue\n const querys = this.extractValues()\n this.$emit('search', querys)\n },\n onChangeSelect (value, props) {\n this.$set(props, '_value', value)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.search-area__wrapper {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n ::v-deep .ant-col {\n &:last-child {\n float: right;\n }\n }\n .search-area__item {\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n &.search-area--action {\n justify-content: end;\n }\n .expand-collapse {\n margin-left: 8px;\n height: 32px;\n padding: 4px 16px;\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n .expand-collapse__text {\n font-size: 14px;\n }\n .expand-collapse__icon {\n font-size: 16px;\n margin-left: 8px;\n }\n }\n }\n}\n</style>",".search-area__wrapper {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n}\n.search-area__wrapper ::v-deep .ant-col:last-child {\n float: right;\n}\n.search-area__wrapper .search-area__item {\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.search-area__wrapper .search-area__item.search-area--action {\n justify-content: end;\n}\n.search-area__wrapper .search-area__item .expand-collapse {\n margin-left: 8px;\n height: 32px;\n padding: 4px 16px;\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__text {\n font-size: 14px;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__icon {\n font-size: 16px;\n margin-left: 8px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
11371
11411
|
|
|
11372
11412
|
};
|
|
11373
11413
|
/* scoped */
|
|
11374
|
-
const __vue_scope_id__$
|
|
11414
|
+
const __vue_scope_id__$8 = "data-v-48ea0d0b";
|
|
11375
11415
|
/* module identifier */
|
|
11376
|
-
const __vue_module_identifier__$
|
|
11416
|
+
const __vue_module_identifier__$8 = undefined;
|
|
11377
11417
|
/* functional template */
|
|
11378
|
-
const __vue_is_functional_template__$
|
|
11418
|
+
const __vue_is_functional_template__$8 = false;
|
|
11379
11419
|
/* style inject SSR */
|
|
11380
11420
|
|
|
11381
11421
|
/* style inject shadow dom */
|
|
11382
11422
|
|
|
11383
11423
|
|
|
11384
11424
|
|
|
11385
|
-
const __vue_component__$
|
|
11386
|
-
{ render: __vue_render__$
|
|
11387
|
-
__vue_inject_styles__$
|
|
11388
|
-
__vue_script__$
|
|
11389
|
-
__vue_scope_id__$
|
|
11390
|
-
__vue_is_functional_template__$
|
|
11391
|
-
__vue_module_identifier__$
|
|
11425
|
+
const __vue_component__$8 = /*#__PURE__*/normalizeComponent(
|
|
11426
|
+
{ render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },
|
|
11427
|
+
__vue_inject_styles__$8,
|
|
11428
|
+
__vue_script__$8,
|
|
11429
|
+
__vue_scope_id__$8,
|
|
11430
|
+
__vue_is_functional_template__$8,
|
|
11431
|
+
__vue_module_identifier__$8,
|
|
11392
11432
|
false,
|
|
11393
11433
|
createInjector,
|
|
11394
11434
|
undefined,
|
|
11395
11435
|
undefined
|
|
11396
11436
|
);
|
|
11397
11437
|
|
|
11398
|
-
__vue_component__$
|
|
11438
|
+
__vue_component__$8.install = Vue => Vue.component(__vue_component__$8.name, __vue_component__$8);
|
|
11399
11439
|
|
|
11400
11440
|
//
|
|
11401
|
-
var script$
|
|
11441
|
+
var script$7 = {
|
|
11402
11442
|
name: 'ele-button-group',
|
|
11403
11443
|
props: {
|
|
11404
11444
|
dataSource: {
|
|
@@ -11483,10 +11523,10 @@ var script$6 = {
|
|
|
11483
11523
|
};
|
|
11484
11524
|
|
|
11485
11525
|
/* script */
|
|
11486
|
-
const __vue_script__$
|
|
11526
|
+
const __vue_script__$7 = script$7;
|
|
11487
11527
|
|
|
11488
11528
|
/* template */
|
|
11489
|
-
var __vue_render__$
|
|
11529
|
+
var __vue_render__$7 = function () {
|
|
11490
11530
|
var _vm = this;
|
|
11491
11531
|
var _h = _vm.$createElement;
|
|
11492
11532
|
var _c = _vm._self._c || _h;
|
|
@@ -11544,44 +11584,44 @@ var __vue_render__$6 = function () {
|
|
|
11544
11584
|
2
|
|
11545
11585
|
)
|
|
11546
11586
|
};
|
|
11547
|
-
var __vue_staticRenderFns__$
|
|
11548
|
-
__vue_render__$
|
|
11587
|
+
var __vue_staticRenderFns__$7 = [];
|
|
11588
|
+
__vue_render__$7._withStripped = true;
|
|
11549
11589
|
|
|
11550
11590
|
/* style */
|
|
11551
|
-
const __vue_inject_styles__$
|
|
11591
|
+
const __vue_inject_styles__$7 = function (inject) {
|
|
11552
11592
|
if (!inject) return
|
|
11553
11593
|
inject("data-v-643f1a24_0", { source: ".button-group__wrapper[data-v-643f1a24] {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn[data-v-643f1a24] {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn[data-v-643f1a24]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/composite-components/button-group/src/index.vue","index.vue"],"names":[],"mappings":"AAsGA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;ACrGA;ADsGA;EACA,gBAAA;ACpGA;ADqGA;EACA,cAAA;ACnGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"button-group__wrapper\">\n <template v-for=\"(item, idx) in innerDatasource\" >\n <ele-button\n v-if=\"isBool(item._show) ? item._show : true\"\n :type=\"item.type\"\n :icon=\"item.icon\"\n :mode=\"item.mode\"\n :data-source=\"item.optionList\"\n :event-name=\"item.eventName\"\n :record=\"item\"\n v-on=\"overrideButtonEvent\"\n :key=\"idx\">\n {{ item.label }}\n </ele-button>\n </template>\n <ele-modal-confirm v-model=\"modalConfirmValue\" :contextProp=\"currentContext\" v-on=\"overrideModalConfirmEvent\" v-bind=\"modalConfirmMeta\"></ele-modal-confirm>\n </div>\n</template>\n\n<script>\nimport { type } from '@idooel/shared'\nimport { parse } from '@idooel/expression'\nimport { CONTEXT } from '../../../utils'\nexport default {\n name: 'ele-button-group',\n props: {\n dataSource: {\n type: Array,\n default: () => []\n }\n },\n data() {\n return {\n innerDatasource: [],\n modalConfirmValue: false,\n modalConfirmMeta: {}\n }\n },\n inject: {\n [CONTEXT]: {\n default: () => (() => ({}))\n }\n },\n computed: {\n overrideButtonEvent () {\n const events = this.dataSource.reduce((ret, item) => {\n ret[item.eventName || 'click'] = (e) => {\n const { modalConfirm } = item\n if (modalConfirm) {\n this.modalConfirmMeta = modalConfirm\n this.modalConfirmValue = true\n }\n this.$emit(item.eventName || 'click', { ...e, record: item, ...this.currentContext })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events\n }\n },\n overrideModalConfirmEvent () {\n return {\n ...this.$listeners\n }\n },\n currentContext () {\n return {\n _route: this.$route.query,\n _routeMeta: this.$route.meta,\n ...this[CONTEXT]()\n }\n }\n },\n watch: {\n dataSource: {\n handler (dataSource) {\n this.innerDatasource = dataSource.map(item => {\n return {\n ...item,\n _show: this.executeExpression(item.show)\n }\n })\n },\n immediate: true\n }\n },\n methods: {\n executeExpression (expression) {\n if (type.isBool(expression)) return expression\n if (type.isEmpty(expression)) return true\n return parse(expression, { ...this.currentContext })\n },\n isBool (arg) {\n return type.isBool(arg)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.button-group__wrapper {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n .ant-btn {\n margin-left: 8px;\n &:first-child {\n margin-left: 0;\n }\n }\n}\n</style>",".button-group__wrapper {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
11554
11594
|
|
|
11555
11595
|
};
|
|
11556
11596
|
/* scoped */
|
|
11557
|
-
const __vue_scope_id__$
|
|
11597
|
+
const __vue_scope_id__$7 = "data-v-643f1a24";
|
|
11558
11598
|
/* module identifier */
|
|
11559
|
-
const __vue_module_identifier__$
|
|
11599
|
+
const __vue_module_identifier__$7 = undefined;
|
|
11560
11600
|
/* functional template */
|
|
11561
|
-
const __vue_is_functional_template__$
|
|
11601
|
+
const __vue_is_functional_template__$7 = false;
|
|
11562
11602
|
/* style inject SSR */
|
|
11563
11603
|
|
|
11564
11604
|
/* style inject shadow dom */
|
|
11565
11605
|
|
|
11566
11606
|
|
|
11567
11607
|
|
|
11568
|
-
const __vue_component__$
|
|
11569
|
-
{ render: __vue_render__$
|
|
11570
|
-
__vue_inject_styles__$
|
|
11571
|
-
__vue_script__$
|
|
11572
|
-
__vue_scope_id__$
|
|
11573
|
-
__vue_is_functional_template__$
|
|
11574
|
-
__vue_module_identifier__$
|
|
11608
|
+
const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
|
|
11609
|
+
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
|
|
11610
|
+
__vue_inject_styles__$7,
|
|
11611
|
+
__vue_script__$7,
|
|
11612
|
+
__vue_scope_id__$7,
|
|
11613
|
+
__vue_is_functional_template__$7,
|
|
11614
|
+
__vue_module_identifier__$7,
|
|
11575
11615
|
false,
|
|
11576
11616
|
createInjector,
|
|
11577
11617
|
undefined,
|
|
11578
11618
|
undefined
|
|
11579
11619
|
);
|
|
11580
11620
|
|
|
11581
|
-
__vue_component__$
|
|
11621
|
+
__vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __vue_component__$7);
|
|
11582
11622
|
|
|
11583
11623
|
//
|
|
11584
|
-
var script$
|
|
11624
|
+
var script$6 = {
|
|
11585
11625
|
name: 'ele-modal-form',
|
|
11586
11626
|
model: {
|
|
11587
11627
|
prop: 'value',
|
|
@@ -11852,10 +11892,10 @@ var script$5 = {
|
|
|
11852
11892
|
};
|
|
11853
11893
|
|
|
11854
11894
|
/* script */
|
|
11855
|
-
const __vue_script__$
|
|
11895
|
+
const __vue_script__$6 = script$6;
|
|
11856
11896
|
|
|
11857
11897
|
/* template */
|
|
11858
|
-
var __vue_render__$
|
|
11898
|
+
var __vue_render__$6 = function () {
|
|
11859
11899
|
var _vm = this;
|
|
11860
11900
|
var _h = _vm.$createElement;
|
|
11861
11901
|
var _c = _vm._self._c || _h;
|
|
@@ -11876,17 +11916,17 @@ var __vue_render__$5 = function () {
|
|
|
11876
11916
|
1
|
|
11877
11917
|
)
|
|
11878
11918
|
};
|
|
11879
|
-
var __vue_staticRenderFns__$
|
|
11880
|
-
__vue_render__$
|
|
11919
|
+
var __vue_staticRenderFns__$6 = [];
|
|
11920
|
+
__vue_render__$6._withStripped = true;
|
|
11881
11921
|
|
|
11882
11922
|
/* style */
|
|
11883
|
-
const __vue_inject_styles__$
|
|
11923
|
+
const __vue_inject_styles__$6 = undefined;
|
|
11884
11924
|
/* scoped */
|
|
11885
|
-
const __vue_scope_id__$
|
|
11925
|
+
const __vue_scope_id__$6 = undefined;
|
|
11886
11926
|
/* module identifier */
|
|
11887
|
-
const __vue_module_identifier__$
|
|
11927
|
+
const __vue_module_identifier__$6 = undefined;
|
|
11888
11928
|
/* functional template */
|
|
11889
|
-
const __vue_is_functional_template__$
|
|
11929
|
+
const __vue_is_functional_template__$6 = false;
|
|
11890
11930
|
/* style inject */
|
|
11891
11931
|
|
|
11892
11932
|
/* style inject SSR */
|
|
@@ -11895,20 +11935,20 @@ __vue_render__$5._withStripped = true;
|
|
|
11895
11935
|
|
|
11896
11936
|
|
|
11897
11937
|
|
|
11898
|
-
const __vue_component__$
|
|
11899
|
-
{ render: __vue_render__$
|
|
11900
|
-
__vue_inject_styles__$
|
|
11901
|
-
__vue_script__$
|
|
11902
|
-
__vue_scope_id__$
|
|
11903
|
-
__vue_is_functional_template__$
|
|
11904
|
-
__vue_module_identifier__$
|
|
11938
|
+
const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
|
|
11939
|
+
{ render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
|
|
11940
|
+
__vue_inject_styles__$6,
|
|
11941
|
+
__vue_script__$6,
|
|
11942
|
+
__vue_scope_id__$6,
|
|
11943
|
+
__vue_is_functional_template__$6,
|
|
11944
|
+
__vue_module_identifier__$6,
|
|
11905
11945
|
false,
|
|
11906
11946
|
undefined,
|
|
11907
11947
|
undefined,
|
|
11908
11948
|
undefined
|
|
11909
11949
|
);
|
|
11910
11950
|
|
|
11911
|
-
__vue_component__$
|
|
11951
|
+
__vue_component__$6.install = Vue => Vue.component(__vue_component__$6.name, __vue_component__$6);
|
|
11912
11952
|
|
|
11913
11953
|
//
|
|
11914
11954
|
//
|
|
@@ -11920,7 +11960,7 @@ __vue_component__$5.install = Vue => Vue.component(__vue_component__$5.name, __v
|
|
|
11920
11960
|
//
|
|
11921
11961
|
//
|
|
11922
11962
|
|
|
11923
|
-
var script$
|
|
11963
|
+
var script$5 = {
|
|
11924
11964
|
name: 'ele-modal-tree',
|
|
11925
11965
|
model: {
|
|
11926
11966
|
event: 'input',
|
|
@@ -11978,10 +12018,10 @@ var script$4 = {
|
|
|
11978
12018
|
};
|
|
11979
12019
|
|
|
11980
12020
|
/* script */
|
|
11981
|
-
const __vue_script__$
|
|
12021
|
+
const __vue_script__$5 = script$5;
|
|
11982
12022
|
|
|
11983
12023
|
/* template */
|
|
11984
|
-
var __vue_render__$
|
|
12024
|
+
var __vue_render__$5 = function () {
|
|
11985
12025
|
var _vm = this;
|
|
11986
12026
|
var _h = _vm.$createElement;
|
|
11987
12027
|
var _c = _vm._self._c || _h;
|
|
@@ -12003,44 +12043,44 @@ var __vue_render__$4 = function () {
|
|
|
12003
12043
|
1
|
|
12004
12044
|
)
|
|
12005
12045
|
};
|
|
12006
|
-
var __vue_staticRenderFns__$
|
|
12007
|
-
__vue_render__$
|
|
12046
|
+
var __vue_staticRenderFns__$5 = [];
|
|
12047
|
+
__vue_render__$5._withStripped = true;
|
|
12008
12048
|
|
|
12009
12049
|
/* style */
|
|
12010
|
-
const __vue_inject_styles__$
|
|
12050
|
+
const __vue_inject_styles__$5 = function (inject) {
|
|
12011
12051
|
if (!inject) return
|
|
12012
12052
|
inject("data-v-205df81d_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
12013
12053
|
|
|
12014
12054
|
};
|
|
12015
12055
|
/* scoped */
|
|
12016
|
-
const __vue_scope_id__$
|
|
12056
|
+
const __vue_scope_id__$5 = "data-v-205df81d";
|
|
12017
12057
|
/* module identifier */
|
|
12018
|
-
const __vue_module_identifier__$
|
|
12058
|
+
const __vue_module_identifier__$5 = undefined;
|
|
12019
12059
|
/* functional template */
|
|
12020
|
-
const __vue_is_functional_template__$
|
|
12060
|
+
const __vue_is_functional_template__$5 = false;
|
|
12021
12061
|
/* style inject SSR */
|
|
12022
12062
|
|
|
12023
12063
|
/* style inject shadow dom */
|
|
12024
12064
|
|
|
12025
12065
|
|
|
12026
12066
|
|
|
12027
|
-
const __vue_component__$
|
|
12028
|
-
{ render: __vue_render__$
|
|
12029
|
-
__vue_inject_styles__$
|
|
12030
|
-
__vue_script__$
|
|
12031
|
-
__vue_scope_id__$
|
|
12032
|
-
__vue_is_functional_template__$
|
|
12033
|
-
__vue_module_identifier__$
|
|
12067
|
+
const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
|
|
12068
|
+
{ render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
|
|
12069
|
+
__vue_inject_styles__$5,
|
|
12070
|
+
__vue_script__$5,
|
|
12071
|
+
__vue_scope_id__$5,
|
|
12072
|
+
__vue_is_functional_template__$5,
|
|
12073
|
+
__vue_module_identifier__$5,
|
|
12034
12074
|
false,
|
|
12035
12075
|
createInjector,
|
|
12036
12076
|
undefined,
|
|
12037
12077
|
undefined
|
|
12038
12078
|
);
|
|
12039
12079
|
|
|
12040
|
-
__vue_component__$
|
|
12080
|
+
__vue_component__$5.install = Vue => Vue.component(__vue_component__$5.name, __vue_component__$5);
|
|
12041
12081
|
|
|
12042
12082
|
//
|
|
12043
|
-
var script$
|
|
12083
|
+
var script$4 = {
|
|
12044
12084
|
name: 'ele-modal-confirm',
|
|
12045
12085
|
model: {
|
|
12046
12086
|
event: 'change',
|
|
@@ -12133,10 +12173,10 @@ var script$3 = {
|
|
|
12133
12173
|
};
|
|
12134
12174
|
|
|
12135
12175
|
/* script */
|
|
12136
|
-
const __vue_script__$
|
|
12176
|
+
const __vue_script__$4 = script$4;
|
|
12137
12177
|
|
|
12138
12178
|
/* template */
|
|
12139
|
-
var __vue_render__$
|
|
12179
|
+
var __vue_render__$4 = function () {
|
|
12140
12180
|
var _vm = this;
|
|
12141
12181
|
var _h = _vm.$createElement;
|
|
12142
12182
|
var _c = _vm._self._c || _h;
|
|
@@ -12168,18 +12208,175 @@ var __vue_render__$3 = function () {
|
|
|
12168
12208
|
1
|
|
12169
12209
|
)
|
|
12170
12210
|
};
|
|
12211
|
+
var __vue_staticRenderFns__$4 = [];
|
|
12212
|
+
__vue_render__$4._withStripped = true;
|
|
12213
|
+
|
|
12214
|
+
/* style */
|
|
12215
|
+
const __vue_inject_styles__$4 = function (inject) {
|
|
12216
|
+
if (!inject) return
|
|
12217
|
+
inject("data-v-07f0e100_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,uCAAuC;EACvC,uCAAuC;EACvC,mDAAmD;EACnD,4BAA4B;EAC5B,4BAA4B;EAC5B,0BAA0B;EAC1B,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,gCAAgC;EAChC,4BAA4B;EAC5B,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;AAEA;EACE,4DAA4D;AAC9D;AAEA;EACE,4DAA4D;AAC9D;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
|
|
12218
|
+
,inject("data-v-07f0e100_1", { source: ".ele-modal-confirm__content[data-v-07f0e100] {\n margin-top: 8px;\n color: var(--idoole-black-088);\n font-size: 14px;\n line-height: 22px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/composite-components/modal-confirm/src/index.vue","index.vue"],"names":[],"mappings":"AAkGA;EACA,eAAA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;ACjGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <ele-modal :title=\"title\" :value=\"value\" :size=\"size\" @cancel=\"onCancel\" v-on=\"overrideEvents\" :buttonGroupMeta=\"buttonGroupMeta\">\n <ele-alert v-if=\"alert\" v-bind=\"alert\"></ele-alert>\n <div v-if=\"contentText\" class=\"ele-modal-confirm__content\">\n {{ contentText }}\n </div>\n </ele-modal>\n</template>\n\n<script>\nimport { CONTEXT } from '../../../utils'\nexport default {\n name: 'ele-modal-confirm',\n model: {\n event: 'change',\n prop: 'value'\n },\n props: {\n title: {\n type: String\n },\n size: {\n type: String,\n default: 'small'\n },\n alert: {\n type: [Object, Boolean],\n default: () => ({\n type: 'warning',\n message: '确定要删除吗?',\n description: '删除后将无法恢复',\n closable: false\n })\n },\n contentText: {\n type: String\n },\n value: {\n type: Boolean,\n default: false\n },\n buttonGroupMeta: {\n type: Object\n },\n //!deprecated\n contextProp: {\n type: Object,\n default: () => ({})\n }\n },\n inject: {\n [CONTEXT]: {\n default: () => (() => ({}))\n }\n },\n data () {\n return {}\n },\n computed: {\n currentContext () {\n const { exposed: exposedData = {} } = this[CONTEXT]()\n const exposed = Object.assign({}, exposedData, { closeModalConfirm: this.closeModalConfirm })\n return {\n _route: this.$route.query,\n _routeMeta: this.$route.meta,\n ...this[CONTEXT](),\n exposed\n }\n },\n overrideEvents () {\n if (!this.buttonGroupMeta) return {}\n const { elements = [] } = this.buttonGroupMeta\n const events = elements.reduce((ret, ele) =>{\n ret[ele.eventName || 'click'] = (e) => {\n this.$emit(ele.eventName || 'click', { ...e, ...this.currentContext })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events\n }\n }\n },\n methods: {\n closeModalConfirm () {\n this.$emit('change', false)\n },\n onCancel () {\n this.$emit('change', false)\n }\n }\n}\n</script>\n<style lang=\"scss\">\n@import '../../../theme/index';\n</style>\n<style lang=\"scss\" scoped>\n.ele-modal-confirm__content {\n margin-top: 8px;\n color: var(--idoole-black-088);\n font-size: 14px;\n line-height: 22px;\n}\n</style>",".ele-modal-confirm__content {\n margin-top: 8px;\n color: var(--idoole-black-088);\n font-size: 14px;\n line-height: 22px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
12219
|
+
|
|
12220
|
+
};
|
|
12221
|
+
/* scoped */
|
|
12222
|
+
const __vue_scope_id__$4 = "data-v-07f0e100";
|
|
12223
|
+
/* module identifier */
|
|
12224
|
+
const __vue_module_identifier__$4 = undefined;
|
|
12225
|
+
/* functional template */
|
|
12226
|
+
const __vue_is_functional_template__$4 = false;
|
|
12227
|
+
/* style inject SSR */
|
|
12228
|
+
|
|
12229
|
+
/* style inject shadow dom */
|
|
12230
|
+
|
|
12231
|
+
|
|
12232
|
+
|
|
12233
|
+
const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
|
|
12234
|
+
{ render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
|
|
12235
|
+
__vue_inject_styles__$4,
|
|
12236
|
+
__vue_script__$4,
|
|
12237
|
+
__vue_scope_id__$4,
|
|
12238
|
+
__vue_is_functional_template__$4,
|
|
12239
|
+
__vue_module_identifier__$4,
|
|
12240
|
+
false,
|
|
12241
|
+
createInjector,
|
|
12242
|
+
undefined,
|
|
12243
|
+
undefined
|
|
12244
|
+
);
|
|
12245
|
+
|
|
12246
|
+
__vue_component__$4.install = Vue => Vue.component(__vue_component__$4.name, __vue_component__$4);
|
|
12247
|
+
|
|
12248
|
+
//
|
|
12249
|
+
var script$3 = {
|
|
12250
|
+
name: 'ele-modal-table',
|
|
12251
|
+
model: {
|
|
12252
|
+
event: 'change',
|
|
12253
|
+
prop: 'value'
|
|
12254
|
+
},
|
|
12255
|
+
props: {
|
|
12256
|
+
value: {
|
|
12257
|
+
type: Boolean,
|
|
12258
|
+
default: false
|
|
12259
|
+
},
|
|
12260
|
+
title: {
|
|
12261
|
+
type: String
|
|
12262
|
+
},
|
|
12263
|
+
size: {
|
|
12264
|
+
type: String,
|
|
12265
|
+
default: 'big'
|
|
12266
|
+
},
|
|
12267
|
+
meta: {
|
|
12268
|
+
type: Object,
|
|
12269
|
+
default: () => ({})
|
|
12270
|
+
}
|
|
12271
|
+
},
|
|
12272
|
+
data() {
|
|
12273
|
+
return {
|
|
12274
|
+
currentTableSelection: null
|
|
12275
|
+
};
|
|
12276
|
+
},
|
|
12277
|
+
computed: {
|
|
12278
|
+
exposed() {
|
|
12279
|
+
return {
|
|
12280
|
+
closeModal: this.closeModal,
|
|
12281
|
+
currentTableSelection: this.currentTableSelection
|
|
12282
|
+
};
|
|
12283
|
+
},
|
|
12284
|
+
assignAttrForEvents() {
|
|
12285
|
+
const events = this.footerMetaElements.reduce((ret, ele) => {
|
|
12286
|
+
ret[ele.eventName] = e => {
|
|
12287
|
+
this.$emit(ele.eventName || 'click', {
|
|
12288
|
+
...e,
|
|
12289
|
+
exposed: this.exposed
|
|
12290
|
+
});
|
|
12291
|
+
};
|
|
12292
|
+
return ret;
|
|
12293
|
+
}, {});
|
|
12294
|
+
return {
|
|
12295
|
+
...this.$listeners,
|
|
12296
|
+
...events
|
|
12297
|
+
};
|
|
12298
|
+
},
|
|
12299
|
+
footerMetaElements() {
|
|
12300
|
+
const {
|
|
12301
|
+
elements = []
|
|
12302
|
+
} = this.buttonGroupMeta;
|
|
12303
|
+
if (type.isFunction(elements)) {
|
|
12304
|
+
return elements.call(this);
|
|
12305
|
+
}
|
|
12306
|
+
return elements;
|
|
12307
|
+
},
|
|
12308
|
+
buildButtonGroupMeta() {
|
|
12309
|
+
return {
|
|
12310
|
+
...this.buttonGroupMeta,
|
|
12311
|
+
elements: this.footerMetaElements
|
|
12312
|
+
};
|
|
12313
|
+
},
|
|
12314
|
+
buttonGroupMeta() {
|
|
12315
|
+
const {
|
|
12316
|
+
footerMeta = {}
|
|
12317
|
+
} = this.meta;
|
|
12318
|
+
return footerMeta;
|
|
12319
|
+
}
|
|
12320
|
+
},
|
|
12321
|
+
methods: {
|
|
12322
|
+
closeModal() {
|
|
12323
|
+
this.$emit('change', false);
|
|
12324
|
+
},
|
|
12325
|
+
onChangeTableSelection(selection) {
|
|
12326
|
+
this.currentTableSelection = selection;
|
|
12327
|
+
}
|
|
12328
|
+
}
|
|
12329
|
+
};
|
|
12330
|
+
|
|
12331
|
+
/* script */
|
|
12332
|
+
const __vue_script__$3 = script$3;
|
|
12333
|
+
|
|
12334
|
+
/* template */
|
|
12335
|
+
var __vue_render__$3 = function () {
|
|
12336
|
+
var _vm = this;
|
|
12337
|
+
var _h = _vm.$createElement;
|
|
12338
|
+
var _c = _vm._self._c || _h;
|
|
12339
|
+
return _c(
|
|
12340
|
+
"ele-modal",
|
|
12341
|
+
_vm._g(
|
|
12342
|
+
{
|
|
12343
|
+
attrs: {
|
|
12344
|
+
title: _vm.title,
|
|
12345
|
+
"button-group-meta": _vm.buildButtonGroupMeta,
|
|
12346
|
+
value: _vm.value,
|
|
12347
|
+
size: _vm.size,
|
|
12348
|
+
},
|
|
12349
|
+
},
|
|
12350
|
+
_vm.assignAttrForEvents
|
|
12351
|
+
),
|
|
12352
|
+
[
|
|
12353
|
+
_c(
|
|
12354
|
+
"ele-tree-table-model",
|
|
12355
|
+
_vm._b(
|
|
12356
|
+
{
|
|
12357
|
+
attrs: { "over-height": 156 },
|
|
12358
|
+
on: { "on-change-table-selection": _vm.onChangeTableSelection },
|
|
12359
|
+
},
|
|
12360
|
+
"ele-tree-table-model",
|
|
12361
|
+
_vm.meta,
|
|
12362
|
+
false
|
|
12363
|
+
)
|
|
12364
|
+
),
|
|
12365
|
+
],
|
|
12366
|
+
1
|
|
12367
|
+
)
|
|
12368
|
+
};
|
|
12171
12369
|
var __vue_staticRenderFns__$3 = [];
|
|
12172
12370
|
__vue_render__$3._withStripped = true;
|
|
12173
12371
|
|
|
12174
12372
|
/* style */
|
|
12175
12373
|
const __vue_inject_styles__$3 = function (inject) {
|
|
12176
12374
|
if (!inject) return
|
|
12177
|
-
inject("data-v-
|
|
12178
|
-
,inject("data-v-07f0e100_1", { source: ".ele-modal-confirm__content[data-v-07f0e100] {\n margin-top: 8px;\n color: var(--idoole-black-088);\n font-size: 14px;\n line-height: 22px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/composite-components/modal-confirm/src/index.vue","index.vue"],"names":[],"mappings":"AAkGA;EACA,eAAA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;ACjGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <ele-modal :title=\"title\" :value=\"value\" :size=\"size\" @cancel=\"onCancel\" v-on=\"overrideEvents\" :buttonGroupMeta=\"buttonGroupMeta\">\n <ele-alert v-if=\"alert\" v-bind=\"alert\"></ele-alert>\n <div v-if=\"contentText\" class=\"ele-modal-confirm__content\">\n {{ contentText }}\n </div>\n </ele-modal>\n</template>\n\n<script>\nimport { CONTEXT } from '../../../utils'\nexport default {\n name: 'ele-modal-confirm',\n model: {\n event: 'change',\n prop: 'value'\n },\n props: {\n title: {\n type: String\n },\n size: {\n type: String,\n default: 'small'\n },\n alert: {\n type: [Object, Boolean],\n default: () => ({\n type: 'warning',\n message: '确定要删除吗?',\n description: '删除后将无法恢复',\n closable: false\n })\n },\n contentText: {\n type: String\n },\n value: {\n type: Boolean,\n default: false\n },\n buttonGroupMeta: {\n type: Object\n },\n //!deprecated\n contextProp: {\n type: Object,\n default: () => ({})\n }\n },\n inject: {\n [CONTEXT]: {\n default: () => (() => ({}))\n }\n },\n data () {\n return {}\n },\n computed: {\n currentContext () {\n const { exposed: exposedData = {} } = this[CONTEXT]()\n const exposed = Object.assign({}, exposedData, { closeModalConfirm: this.closeModalConfirm })\n return {\n _route: this.$route.query,\n _routeMeta: this.$route.meta,\n ...this[CONTEXT](),\n exposed\n }\n },\n overrideEvents () {\n if (!this.buttonGroupMeta) return {}\n const { elements = [] } = this.buttonGroupMeta\n const events = elements.reduce((ret, ele) =>{\n ret[ele.eventName || 'click'] = (e) => {\n this.$emit(ele.eventName || 'click', { ...e, ...this.currentContext })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events\n }\n }\n },\n methods: {\n closeModalConfirm () {\n this.$emit('change', false)\n },\n onCancel () {\n this.$emit('change', false)\n }\n }\n}\n</script>\n<style lang=\"scss\">\n@import '../../../theme/index';\n</style>\n<style lang=\"scss\" scoped>\n.ele-modal-confirm__content {\n margin-top: 8px;\n color: var(--idoole-black-088);\n font-size: 14px;\n line-height: 22px;\n}\n</style>",".ele-modal-confirm__content {\n margin-top: 8px;\n color: var(--idoole-black-088);\n font-size: 14px;\n line-height: 22px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
12375
|
+
inject("data-v-0b93fa62_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
12179
12376
|
|
|
12180
12377
|
};
|
|
12181
12378
|
/* scoped */
|
|
12182
|
-
const __vue_scope_id__$3 = "data-v-
|
|
12379
|
+
const __vue_scope_id__$3 = "data-v-0b93fa62";
|
|
12183
12380
|
/* module identifier */
|
|
12184
12381
|
const __vue_module_identifier__$3 = undefined;
|
|
12185
12382
|
/* functional template */
|
|
@@ -12762,18 +12959,18 @@ __vue_render__._withStripped = true;
|
|
|
12762
12959
|
|
|
12763
12960
|
__vue_component__.install = Vue => Vue.component(__vue_component__.name, __vue_component__);
|
|
12764
12961
|
|
|
12765
|
-
__vue_component__$
|
|
12766
|
-
|
|
12767
|
-
__vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
|
|
12962
|
+
__vue_component__$v.install = Vue => Vue.component(__vue_component__$v.name, __vue_component__$v);
|
|
12768
12963
|
|
|
12769
12964
|
__vue_component__$t.install = Vue => Vue.component(__vue_component__$t.name, __vue_component__$t);
|
|
12770
12965
|
|
|
12771
|
-
__vue_component__$
|
|
12966
|
+
__vue_component__$u.install = Vue => Vue.component(__vue_component__$u.name, __vue_component__$u);
|
|
12967
|
+
|
|
12968
|
+
__vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
|
|
12772
12969
|
|
|
12773
|
-
const compositeComponents = [__vue_component__$
|
|
12970
|
+
const compositeComponents = [__vue_component__$7, __vue_component__$8, __vue_component__$6, __vue_component__$5, __vue_component__$c, __vue_component__$4, __vue_component__$3];
|
|
12774
12971
|
const businessComponents = [__vue_component__$2, __vue_component__$1, __vue_component__];
|
|
12775
|
-
const models = [__vue_component__$
|
|
12776
|
-
const components = [__vue_component__$B, __vue_component__$A, __vue_component__$z, __vue_component__$
|
|
12972
|
+
const models = [__vue_component__$v, __vue_component__$t, __vue_component__$u, __vue_component__$s];
|
|
12973
|
+
const components = [__vue_component__$C, __vue_component__$B, __vue_component__$A, __vue_component__$z, __vue_component__$x, __vue_component__$w, __vue_component__$r, __vue_component__$q, __vue_component__$p, __vue_component__$o, __vue_component__$n, __vue_component__$m, __vue_component__$l, __vue_component__$k, __vue_component__$j, __vue_component__$i, __vue_component__$h, __vue_component__$g, __vue_component__$f, __vue_component__$e, __vue_component__$d, __vue_component__$b, __vue_component__$a, ...compositeComponents, ...businessComponents, ...models];
|
|
12777
12974
|
const install = Vue => {
|
|
12778
12975
|
if (install.installed) return;
|
|
12779
12976
|
install.installed = true;
|
|
@@ -12782,4 +12979,4 @@ const install = Vue => {
|
|
|
12782
12979
|
});
|
|
12783
12980
|
};
|
|
12784
12981
|
|
|
12785
|
-
export { __vue_component__$
|
|
12982
|
+
export { __vue_component__$p as EleAlert, __vue_component__$h as EleBatchExport, __vue_component__$C as EleButton, __vue_component__$7 as EleButtonGroup, __vue_component__$j as EleCheckbox, __vue_component__$B as EleDate, __vue_component__$g as EleDateRange, __vue_component__$q as EleForm, __vue_component__$u as EleFormGroupModel, __vue_component__$t as EleFormPageModel, __vue_component__$m as EleIcon, __vue_component__$A as EleInput, __vue_component__$l as EleInputNumber, __vue_component__$k as EleModal, __vue_component__$4 as EleModalConfirm, __vue_component__$6 as EleModalForm, __vue_component__ as EleModalFsm, __vue_component__$c as EleModalImgCrop, __vue_component__$2 as EleModalImport, __vue_component__$3 as EleModalTable, __vue_component__$1 as EleModalTimeline, __vue_component__$5 as EleModalTree, __vue_component__$i as EleRadio, __vue_component__$8 as EleSearchArea, __vue_component__$z as EleSelect, __vue_component__$n as EleSelectEntity, __vue_component__$s as EleStepModel, __vue_component__$x as EleTable, __vue_component__$d as EleTabs, __vue_component__$e as EleText, __vue_component__$b as EleTextEditor, __vue_component__$a as EleTextarea, __vue_component__$f as EleTimeline, __vue_component__$r as EleTpl, __vue_component__$w as EleTree, __vue_component__$v as EleTreeTableModel, __vue_component__$o as EleUpload, install as default, models };
|