@idooel/components 0.0.1-beta.81 → 0.0.1-beta.83

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.
@@ -20,7 +20,7 @@ import FileUpload from 'vue-upload-component';
20
20
  //
21
21
  //
22
22
 
23
- var script$F = {
23
+ var script$G = {
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__$F = script$F;
144
+ const __vue_script__$G = script$G;
145
145
 
146
146
  /* template */
147
- var __vue_render__$F = function () {
147
+ var __vue_render__$G = 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__$F = function () {
190
190
  2
191
191
  )
192
192
  };
193
- var __vue_staticRenderFns__$F = [];
194
- __vue_render__$F._withStripped = true;
193
+ var __vue_staticRenderFns__$G = [];
194
+ __vue_render__$G._withStripped = true;
195
195
 
196
196
  /* style */
197
- const __vue_inject_styles__$F = undefined;
197
+ const __vue_inject_styles__$G = undefined;
198
198
  /* scoped */
199
- const __vue_scope_id__$F = undefined;
199
+ const __vue_scope_id__$G = undefined;
200
200
  /* module identifier */
201
- const __vue_module_identifier__$F = undefined;
201
+ const __vue_module_identifier__$G = undefined;
202
202
  /* functional template */
203
- const __vue_is_functional_template__$F = false;
203
+ const __vue_is_functional_template__$G = false;
204
204
  /* style inject */
205
205
 
206
206
  /* style inject SSR */
@@ -209,23 +209,23 @@ __vue_render__$F._withStripped = true;
209
209
 
210
210
 
211
211
 
212
- const __vue_component__$F = /*#__PURE__*/normalizeComponent(
213
- { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
214
- __vue_inject_styles__$F,
215
- __vue_script__$F,
216
- __vue_scope_id__$F,
217
- __vue_is_functional_template__$F,
218
- __vue_module_identifier__$F,
212
+ const __vue_component__$G = /*#__PURE__*/normalizeComponent(
213
+ { render: __vue_render__$G, staticRenderFns: __vue_staticRenderFns__$G },
214
+ __vue_inject_styles__$G,
215
+ __vue_script__$G,
216
+ __vue_scope_id__$G,
217
+ __vue_is_functional_template__$G,
218
+ __vue_module_identifier__$G,
219
219
  false,
220
220
  undefined,
221
221
  undefined,
222
222
  undefined
223
223
  );
224
224
 
225
- __vue_component__$F.install = Vue => Vue.component(__vue_component__$F.name, __vue_component__$F);
225
+ __vue_component__$G.install = Vue => Vue.component(__vue_component__$G.name, __vue_component__$G);
226
226
 
227
227
  //
228
- var script$E = {
228
+ var script$F = {
229
229
  name: 'ele-date',
230
230
  model: {
231
231
  prop: 'value',
@@ -349,10 +349,10 @@ function addStyle(id, css) {
349
349
  }
350
350
 
351
351
  /* script */
352
- const __vue_script__$E = script$E;
352
+ const __vue_script__$F = script$F;
353
353
 
354
354
  /* template */
355
- var __vue_render__$E = function () {
355
+ var __vue_render__$F = function () {
356
356
  var _vm = this;
357
357
  var _h = _vm.$createElement;
358
358
  var _c = _vm._self._c || _h;
@@ -402,48 +402,48 @@ var __vue_render__$E = function () {
402
402
  1
403
403
  )
404
404
  };
405
- var __vue_staticRenderFns__$E = [];
406
- __vue_render__$E._withStripped = true;
405
+ var __vue_staticRenderFns__$F = [];
406
+ __vue_render__$F._withStripped = true;
407
407
 
408
408
  /* style */
409
- const __vue_inject_styles__$E = function (inject) {
409
+ const __vue_inject_styles__$F = function (inject) {
410
410
  if (!inject) return
411
411
  inject("data-v-7716ba90_0", { source: ".ele-date__wrapper[data-v-7716ba90] {\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":"AA6GA;EACA,WAAA;AC5GA;;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 :placeholder=\"placeholder\"\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 :placeholder=\"placeholder\"\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 placeholder: {\n type: String,\n default: '请选择日期'\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 });
412
412
 
413
413
  };
414
414
  /* scoped */
415
- const __vue_scope_id__$E = "data-v-7716ba90";
415
+ const __vue_scope_id__$F = "data-v-7716ba90";
416
416
  /* module identifier */
417
- const __vue_module_identifier__$E = undefined;
417
+ const __vue_module_identifier__$F = undefined;
418
418
  /* functional template */
419
- const __vue_is_functional_template__$E = false;
419
+ const __vue_is_functional_template__$F = false;
420
420
  /* style inject SSR */
421
421
 
422
422
  /* style inject shadow dom */
423
423
 
424
424
 
425
425
 
426
- const __vue_component__$E = /*#__PURE__*/normalizeComponent(
427
- { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
428
- __vue_inject_styles__$E,
429
- __vue_script__$E,
430
- __vue_scope_id__$E,
431
- __vue_is_functional_template__$E,
432
- __vue_module_identifier__$E,
426
+ const __vue_component__$F = /*#__PURE__*/normalizeComponent(
427
+ { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
428
+ __vue_inject_styles__$F,
429
+ __vue_script__$F,
430
+ __vue_scope_id__$F,
431
+ __vue_is_functional_template__$F,
432
+ __vue_module_identifier__$F,
433
433
  false,
434
434
  createInjector,
435
435
  undefined,
436
436
  undefined
437
437
  );
438
438
 
439
- __vue_component__$E.install = Vue => Vue.component(__vue_component__$E.name, __vue_component__$E);
439
+ __vue_component__$F.install = Vue => Vue.component(__vue_component__$F.name, __vue_component__$F);
440
440
 
441
441
  //
442
442
  //
443
443
  //
444
444
  //
445
445
 
446
- var script$D = {
446
+ var script$E = {
447
447
  name: 'ele-input',
448
448
  model: {
449
449
  prop: 'value',
@@ -471,10 +471,10 @@ var script$D = {
471
471
  };
472
472
 
473
473
  /* script */
474
- const __vue_script__$D = script$D;
474
+ const __vue_script__$E = script$E;
475
475
 
476
476
  /* template */
477
- var __vue_render__$D = function () {
477
+ var __vue_render__$E = function () {
478
478
  var _vm = this;
479
479
  var _h = _vm.$createElement;
480
480
  var _c = _vm._self._c || _h;
@@ -487,44 +487,44 @@ var __vue_render__$D = function () {
487
487
  on: { change: _vm.onChange },
488
488
  })
489
489
  };
490
- var __vue_staticRenderFns__$D = [];
491
- __vue_render__$D._withStripped = true;
490
+ var __vue_staticRenderFns__$E = [];
491
+ __vue_render__$E._withStripped = true;
492
492
 
493
493
  /* style */
494
- const __vue_inject_styles__$D = function (inject) {
494
+ const __vue_inject_styles__$E = function (inject) {
495
495
  if (!inject) return
496
496
  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 });
497
497
 
498
498
  };
499
499
  /* scoped */
500
- const __vue_scope_id__$D = "data-v-c04139c8";
500
+ const __vue_scope_id__$E = "data-v-c04139c8";
501
501
  /* module identifier */
502
- const __vue_module_identifier__$D = undefined;
502
+ const __vue_module_identifier__$E = undefined;
503
503
  /* functional template */
504
- const __vue_is_functional_template__$D = false;
504
+ const __vue_is_functional_template__$E = false;
505
505
  /* style inject SSR */
506
506
 
507
507
  /* style inject shadow dom */
508
508
 
509
509
 
510
510
 
511
- const __vue_component__$D = /*#__PURE__*/normalizeComponent(
512
- { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
513
- __vue_inject_styles__$D,
514
- __vue_script__$D,
515
- __vue_scope_id__$D,
516
- __vue_is_functional_template__$D,
517
- __vue_module_identifier__$D,
511
+ const __vue_component__$E = /*#__PURE__*/normalizeComponent(
512
+ { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
513
+ __vue_inject_styles__$E,
514
+ __vue_script__$E,
515
+ __vue_scope_id__$E,
516
+ __vue_is_functional_template__$E,
517
+ __vue_module_identifier__$E,
518
518
  false,
519
519
  createInjector,
520
520
  undefined,
521
521
  undefined
522
522
  );
523
523
 
524
- __vue_component__$D.install = Vue => Vue.component(__vue_component__$D.name, __vue_component__$D);
524
+ __vue_component__$E.install = Vue => Vue.component(__vue_component__$E.name, __vue_component__$E);
525
525
 
526
526
  //
527
- var script$C = {
527
+ var script$D = {
528
528
  name: 'ele-select',
529
529
  props: {
530
530
  init: {
@@ -622,10 +622,10 @@ var script$C = {
622
622
  };
623
623
 
624
624
  /* script */
625
- const __vue_script__$C = script$C;
625
+ const __vue_script__$D = script$D;
626
626
 
627
627
  /* template */
628
- var __vue_render__$C = function () {
628
+ var __vue_render__$D = function () {
629
629
  var _vm = this;
630
630
  var _h = _vm.$createElement;
631
631
  var _c = _vm._self._c || _h;
@@ -646,41 +646,41 @@ var __vue_render__$C = function () {
646
646
  1
647
647
  )
648
648
  };
649
- var __vue_staticRenderFns__$C = [];
650
- __vue_render__$C._withStripped = true;
649
+ var __vue_staticRenderFns__$D = [];
650
+ __vue_render__$D._withStripped = true;
651
651
 
652
652
  /* style */
653
- const __vue_inject_styles__$C = function (inject) {
653
+ const __vue_inject_styles__$D = function (inject) {
654
654
  if (!inject) return
655
655
  inject("data-v-dd210296_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
656
656
 
657
657
  };
658
658
  /* scoped */
659
- const __vue_scope_id__$C = "data-v-dd210296";
659
+ const __vue_scope_id__$D = "data-v-dd210296";
660
660
  /* module identifier */
661
- const __vue_module_identifier__$C = undefined;
661
+ const __vue_module_identifier__$D = undefined;
662
662
  /* functional template */
663
- const __vue_is_functional_template__$C = false;
663
+ const __vue_is_functional_template__$D = false;
664
664
  /* style inject SSR */
665
665
 
666
666
  /* style inject shadow dom */
667
667
 
668
668
 
669
669
 
670
- const __vue_component__$C = /*#__PURE__*/normalizeComponent(
671
- { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
672
- __vue_inject_styles__$C,
673
- __vue_script__$C,
674
- __vue_scope_id__$C,
675
- __vue_is_functional_template__$C,
676
- __vue_module_identifier__$C,
670
+ const __vue_component__$D = /*#__PURE__*/normalizeComponent(
671
+ { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
672
+ __vue_inject_styles__$D,
673
+ __vue_script__$D,
674
+ __vue_scope_id__$D,
675
+ __vue_is_functional_template__$D,
676
+ __vue_module_identifier__$D,
677
677
  false,
678
678
  createInjector,
679
679
  undefined,
680
680
  undefined
681
681
  );
682
682
 
683
- __vue_component__$C.install = Vue => Vue.component(__vue_component__$C.name, __vue_component__$C);
683
+ __vue_component__$D.install = Vue => Vue.component(__vue_component__$D.name, __vue_component__$D);
684
684
 
685
685
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
686
686
  // require the crypto API and do not support built-in fallback to lower quality random number
@@ -1405,7 +1405,7 @@ const parseFieldMap = (fieldMap = {}, dataSource = {}) => {
1405
1405
 
1406
1406
  //
1407
1407
  const MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002';
1408
- var script$B = {
1408
+ var script$C = {
1409
1409
  props: {
1410
1410
  record: {
1411
1411
  type: Object
@@ -1532,10 +1532,10 @@ var script$B = {
1532
1532
  };
1533
1533
 
1534
1534
  /* script */
1535
- const __vue_script__$B = script$B;
1535
+ const __vue_script__$C = script$C;
1536
1536
 
1537
1537
  /* template */
1538
- var __vue_render__$B = function () {
1538
+ var __vue_render__$C = function () {
1539
1539
  var _vm = this;
1540
1540
  var _h = _vm.$createElement;
1541
1541
  var _c = _vm._self._c || _h;
@@ -1700,34 +1700,34 @@ var __vue_render__$B = function () {
1700
1700
  0
1701
1701
  )
1702
1702
  };
1703
- var __vue_staticRenderFns__$B = [];
1704
- __vue_render__$B._withStripped = true;
1703
+ var __vue_staticRenderFns__$C = [];
1704
+ __vue_render__$C._withStripped = true;
1705
1705
 
1706
1706
  /* style */
1707
- const __vue_inject_styles__$B = function (inject) {
1707
+ const __vue_inject_styles__$C = function (inject) {
1708
1708
  if (!inject) return
1709
1709
  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 });
1710
1710
 
1711
1711
  };
1712
1712
  /* scoped */
1713
- const __vue_scope_id__$B = "data-v-3fafa38c";
1713
+ const __vue_scope_id__$C = "data-v-3fafa38c";
1714
1714
  /* module identifier */
1715
- const __vue_module_identifier__$B = undefined;
1715
+ const __vue_module_identifier__$C = undefined;
1716
1716
  /* functional template */
1717
- const __vue_is_functional_template__$B = false;
1717
+ const __vue_is_functional_template__$C = false;
1718
1718
  /* style inject SSR */
1719
1719
 
1720
1720
  /* style inject shadow dom */
1721
1721
 
1722
1722
 
1723
1723
 
1724
- const __vue_component__$B = /*#__PURE__*/normalizeComponent(
1725
- { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
1726
- __vue_inject_styles__$B,
1727
- __vue_script__$B,
1728
- __vue_scope_id__$B,
1729
- __vue_is_functional_template__$B,
1730
- __vue_module_identifier__$B,
1724
+ const __vue_component__$C = /*#__PURE__*/normalizeComponent(
1725
+ { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
1726
+ __vue_inject_styles__$C,
1727
+ __vue_script__$C,
1728
+ __vue_scope_id__$C,
1729
+ __vue_is_functional_template__$C,
1730
+ __vue_module_identifier__$C,
1731
1731
  false,
1732
1732
  createInjector,
1733
1733
  undefined,
@@ -1735,10 +1735,10 @@ __vue_render__$B._withStripped = true;
1735
1735
  );
1736
1736
 
1737
1737
  //
1738
- var script$A = {
1738
+ var script$B = {
1739
1739
  name: 'ele-table',
1740
1740
  components: {
1741
- Actions: __vue_component__$B
1741
+ Actions: __vue_component__$C
1742
1742
  },
1743
1743
  props: {
1744
1744
  // ant table wrapper
@@ -1929,10 +1929,10 @@ var script$A = {
1929
1929
  };
1930
1930
 
1931
1931
  /* script */
1932
- const __vue_script__$A = script$A;
1932
+ const __vue_script__$B = script$B;
1933
1933
 
1934
1934
  /* template */
1935
- var __vue_render__$A = function () {
1935
+ var __vue_render__$B = function () {
1936
1936
  var _vm = this;
1937
1937
  var _h = _vm.$createElement;
1938
1938
  var _c = _vm._self._c || _h;
@@ -1998,41 +1998,41 @@ var __vue_render__$A = function () {
1998
1998
  1
1999
1999
  )
2000
2000
  };
2001
- var __vue_staticRenderFns__$A = [];
2002
- __vue_render__$A._withStripped = true;
2001
+ var __vue_staticRenderFns__$B = [];
2002
+ __vue_render__$B._withStripped = true;
2003
2003
 
2004
2004
  /* style */
2005
- const __vue_inject_styles__$A = function (inject) {
2005
+ const __vue_inject_styles__$B = function (inject) {
2006
2006
  if (!inject) return
2007
2007
  inject("data-v-983131fc_0", { source: ".g-table__wrapper[data-v-983131fc] {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper[data-v-983131fc] .ant-spin-nested-loading {\n height: inherit;\n}\n.g-table__wrapper[data-v-983131fc] .ant-spin-nested-loading .ant-table-fixed-header .ant-table-body-inner {\n overflow: hidden;\n}\n.g-table__wrapper[data-v-983131fc] .ant-spin-nested-loading .ant-spin-container {\n height: inherit;\n}\n.g-table__wrapper[data-v-983131fc] .ant-spin-nested-loading .ant-spin-container .ant-table {\n height: inherit;\n}\n.g-table__wrapper[data-v-983131fc] .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-983131fc] .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper[data-v-983131fc] .ant-table-wrapper .ant-table-header tr th {\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-983131fc] .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-983131fc] .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-983131fc] .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-983131fc] .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-983131fc] .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-983131fc] .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-983131fc] .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-983131fc] .g-table__row--even {\n background: var(--idooel-row-even-color);\n}\n.g-table__wrapper .g-table__row--odd[data-v-983131fc] {\n background: var(--idooel-row-odd-color);\n}\n.g-table__wrapper .g-table__pagination[data-v-983131fc] {\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":"AAyNA;EA8FA,aAAA;EACA,kBAAA;ACrTA;ADuNA;EACA,eAAA;ACrNA;ADuNA;EACA,gBAAA;ACrNA;ADwNA;EACA,eAAA;ACtNA;ADuNA;EACA,eAAA;ACrNA;ADmOA;EACA,oDAAA;EACA,mBAAA;EACA,wCAAA;ACjOA;ADoOA;EACA,iDAAA;AClOA;ADqOA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;ACnOA;ADyOA;EACA,+CAAA;EACA,2DAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;ACvOA;ADgPA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;AC9OA;AD+OA;EACA,iEAAA;EACA,gCAAA;EACA,qDAAA;AC7OA;AD+OA;EACA,0DAAA;EACA,yBAAA;EACA,8CAAA;AC7OA;AD+OA;EACA,0DAAA;EACA,8CAAA;EACA,yBAAA;AC7OA;ADiPA;EACA,iEAAA;EACA,qDAAA;EACA,gCAAA;AC/OA;ADoPA;EACA,yDAAA;EACA,wBAAA;EACA,6CAAA;AClPA;ADwPA;EACA,wCAAA;ACtPA;ADwPA;EACA,uCAAA;ACtPA;ADwPA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;EACA,oDAAA;EACA,wCAAA;EACA,mBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,kBAAA;EACA,YAAA;ACtPA;;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 console.log('this.height', this.height)\n console.log('height', height)\n console.log('this.tableTbodyHeight', this.tableTbodyHeight)\n if (this.tableTbodyHeight == 0) {\n //暂无数据\n document.querySelector('.ant-table-body') && (document.querySelector('.ant-table-body').style.height = 'auto')\n } else if (this.tableTbodyHeight !== 0 && 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 return 0\n // 0的时候没有y滚动条\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('table .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.setPaginationHeight()\n setTimeout(() => {\n this.setTableTbodyHeight()\n }, 100)\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 tr {\n th {\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 }\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-header tr th {\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-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 });
2008
2008
 
2009
2009
  };
2010
2010
  /* scoped */
2011
- const __vue_scope_id__$A = "data-v-983131fc";
2011
+ const __vue_scope_id__$B = "data-v-983131fc";
2012
2012
  /* module identifier */
2013
- const __vue_module_identifier__$A = undefined;
2013
+ const __vue_module_identifier__$B = undefined;
2014
2014
  /* functional template */
2015
- const __vue_is_functional_template__$A = false;
2015
+ const __vue_is_functional_template__$B = false;
2016
2016
  /* style inject SSR */
2017
2017
 
2018
2018
  /* style inject shadow dom */
2019
2019
 
2020
2020
 
2021
2021
 
2022
- const __vue_component__$A = /*#__PURE__*/normalizeComponent(
2023
- { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
2024
- __vue_inject_styles__$A,
2025
- __vue_script__$A,
2026
- __vue_scope_id__$A,
2027
- __vue_is_functional_template__$A,
2028
- __vue_module_identifier__$A,
2022
+ const __vue_component__$B = /*#__PURE__*/normalizeComponent(
2023
+ { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
2024
+ __vue_inject_styles__$B,
2025
+ __vue_script__$B,
2026
+ __vue_scope_id__$B,
2027
+ __vue_is_functional_template__$B,
2028
+ __vue_module_identifier__$B,
2029
2029
  false,
2030
2030
  createInjector,
2031
2031
  undefined,
2032
2032
  undefined
2033
2033
  );
2034
2034
 
2035
- __vue_component__$A.install = Vue => Vue.component(__vue_component__$A.name, __vue_component__$A);
2035
+ __vue_component__$B.install = Vue => Vue.component(__vue_component__$B.name, __vue_component__$B);
2036
2036
 
2037
2037
  //
2038
2038
  //
@@ -2062,7 +2062,7 @@ __vue_component__$A.install = Vue => Vue.component(__vue_component__$A.name, __v
2062
2062
  //
2063
2063
  //
2064
2064
 
2065
- var script$z = {
2065
+ var script$A = {
2066
2066
  name: 'ele-tree',
2067
2067
  props: {
2068
2068
  treeData: {
@@ -2123,10 +2123,10 @@ var script$z = {
2123
2123
  };
2124
2124
 
2125
2125
  /* script */
2126
- const __vue_script__$z = script$z;
2126
+ const __vue_script__$A = script$A;
2127
2127
 
2128
2128
  /* template */
2129
- var __vue_render__$z = function () {
2129
+ var __vue_render__$A = function () {
2130
2130
  var _vm = this;
2131
2131
  var _h = _vm.$createElement;
2132
2132
  var _c = _vm._self._c || _h;
@@ -2202,44 +2202,44 @@ var __vue_render__$z = function () {
2202
2202
  1
2203
2203
  )
2204
2204
  };
2205
- var __vue_staticRenderFns__$z = [];
2206
- __vue_render__$z._withStripped = true;
2205
+ var __vue_staticRenderFns__$A = [];
2206
+ __vue_render__$A._withStripped = true;
2207
2207
 
2208
2208
  /* style */
2209
- const __vue_inject_styles__$z = function (inject) {
2209
+ const __vue_inject_styles__$A = function (inject) {
2210
2210
  if (!inject) return
2211
2211
  inject("data-v-34ea3fcc_0", { source: ".g-tree__wrapper[data-v-34ea3fcc] {\n overflow: hidden;\n}\n.g-tree__wrapper[data-v-34ea3fcc] .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-34ea3fcc] .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=\"props\">\n <span :title=\"props[replaceFields.title]\" class=\"tree-node__title\">\n {{ props[replaceFields.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 });
2212
2212
 
2213
2213
  };
2214
2214
  /* scoped */
2215
- const __vue_scope_id__$z = "data-v-34ea3fcc";
2215
+ const __vue_scope_id__$A = "data-v-34ea3fcc";
2216
2216
  /* module identifier */
2217
- const __vue_module_identifier__$z = undefined;
2217
+ const __vue_module_identifier__$A = undefined;
2218
2218
  /* functional template */
2219
- const __vue_is_functional_template__$z = false;
2219
+ const __vue_is_functional_template__$A = false;
2220
2220
  /* style inject SSR */
2221
2221
 
2222
2222
  /* style inject shadow dom */
2223
2223
 
2224
2224
 
2225
2225
 
2226
- const __vue_component__$z = /*#__PURE__*/normalizeComponent(
2227
- { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
2228
- __vue_inject_styles__$z,
2229
- __vue_script__$z,
2230
- __vue_scope_id__$z,
2231
- __vue_is_functional_template__$z,
2232
- __vue_module_identifier__$z,
2226
+ const __vue_component__$A = /*#__PURE__*/normalizeComponent(
2227
+ { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
2228
+ __vue_inject_styles__$A,
2229
+ __vue_script__$A,
2230
+ __vue_scope_id__$A,
2231
+ __vue_is_functional_template__$A,
2232
+ __vue_module_identifier__$A,
2233
2233
  false,
2234
2234
  createInjector,
2235
2235
  undefined,
2236
2236
  undefined
2237
2237
  );
2238
2238
 
2239
- __vue_component__$z.install = Vue => Vue.component(__vue_component__$z.name, __vue_component__$z);
2239
+ __vue_component__$A.install = Vue => Vue.component(__vue_component__$A.name, __vue_component__$A);
2240
2240
 
2241
2241
  //
2242
- var script$y = {
2242
+ var script$z = {
2243
2243
  name: 'ele-tree-table-model',
2244
2244
  props: {
2245
2245
  title: {
@@ -2813,10 +2813,10 @@ var script$y = {
2813
2813
  };
2814
2814
 
2815
2815
  /* script */
2816
- const __vue_script__$y = script$y;
2816
+ const __vue_script__$z = script$z;
2817
2817
 
2818
2818
  /* template */
2819
- var __vue_render__$y = function () {
2819
+ var __vue_render__$z = function () {
2820
2820
  var _vm = this;
2821
2821
  var _h = _vm.$createElement;
2822
2822
  var _c = _vm._self._c || _h;
@@ -2978,34 +2978,34 @@ var __vue_render__$y = function () {
2978
2978
  1
2979
2979
  )
2980
2980
  };
2981
- var __vue_staticRenderFns__$y = [];
2982
- __vue_render__$y._withStripped = true;
2981
+ var __vue_staticRenderFns__$z = [];
2982
+ __vue_render__$z._withStripped = true;
2983
2983
 
2984
2984
  /* style */
2985
- const __vue_inject_styles__$y = function (inject) {
2985
+ const __vue_inject_styles__$z = function (inject) {
2986
2986
  if (!inject) return
2987
2987
  inject("data-v-592e4998_0", { source: ".ele.model__tree-table[data-v-592e4998] {\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-592e4998] {\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-592e4998] {\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-592e4998] {\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-592e4998] {\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-592e4998] {\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .button-row__area[data-v-592e4998] {\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-592e4998] {\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":"AA6gBA;EACA,uBAAA;EACA,aAAA;EACA,mBAAA;EACA,WAAA;AC5gBA;AD8gBA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,sBAAA;EACA,kBAAA;EACA,gBAAA;AC5gBA;AD+gBA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;AC7gBA;AD+gBA;EACA,WAAA;EACA,WAAA;EACA,uCAAA;EACA,2BAAA;EACA,4BAAA;AC7gBA;AD+gBA;EACA,gBAAA;EACA,aAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,qCAAA;AC7gBA;ADghBA;EACA,gBAAA;AC9gBA;AD+gBA;EACA,WAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;EACA,iBAAA;EACA,mBAAA;EACA,mBAAA;AC7gBA;ADghBA;EACA,eAAA;EACA,kCAAA;AC9gBA;;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=\"mapFields\">\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 <slot name=\"sub-center\"></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\" v-on=\"overrideModalFormEvent\" :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, CONTEXT } 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 [CONTEXT]: () => {\n return {\n exposed: { ...this.exposed }\n }\n }\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 currentRowData: {},\n treeWrapperHeight: 0,\n currentTableSelection: this.currentTableMode == 'radio' ? {} : [],\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 currentRowData: this.currentRowData,\n setCurrentRowData: this.setCurrentRowData,\n setCurrentTableSelection: this.setCurrentTableSelection,\n route: this.$route,\n _route: this.$route.query,\n _routeMeta: this.$route.meta\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 [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT]\n }\n },\n overrideModalFormEvent () {\n return {\n ...this.$listeners\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 exposed: this.exposed\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 mapFields () {\n const { replaceFields = {} } = this.treeMeta\n const mapFields = type.isEmpty(replaceFields) ? this.replaceFields : replaceFields\n return mapFields\n }\n },\n async created () {\n if (this.showTree) {\n this.treeData = await this.requestTreeData()\n const [defaultTreeNode = {}] = this.treeData\n // const { replaceFields = {} } = this.treeMeta\n // const mapFields = type.isEmpty(replaceFields) ? this.replaceFields : replaceFields\n // console.log('replaceFields', this.replaceFields, replaceFields)\n this.defaultExpandedKeys = [defaultTreeNode[this.mapFields.key]]\n this.defaultSelectedKeys = [defaultTreeNode[this.mapFields.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 = type.isEmpty(modeMeta) ? { \n url: 'api-fsm/workbench/fsm/auditFlow',\n requestType: 'GET',\n fieldMap: {\n modelCode: 'modelCode',\n businessId: 'businessId'\n }\n } : modeMeta)\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 setCurrentTableSelection (props = {}) {\n if (this.currentTableMode === 'radio') {\n this.currentTableSelection = type.isObject(props) ? props : {}\n } else {\n this.currentTableSelection = type.isArray(props) ? props : []\n }\n },\n setCurrentRowData (props = {}) {\n this.currentRowData = props\n },\n cleanCurrentModelEffect () {\n this.setCurrentTableSelection()\n this.setCurrentRowData({})\n },\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\n this.cleanCurrentModelEffect()\n this.requestTableData()\n },\n [BUILT_IN_EVENT_NAMES.EDIT] (props = {}) {\n const { record = {} } = props\n this.currentRowData = record\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 const { overrideInit = false } = this.tableMeta\n this.tableQuerys = Object.assign(this.tableQuerys, props)\n if (overrideInit) {\n this.$emit(RESERVE_EVENT_NAMES.TREE_CHANGE, { ...this.exposed })\n } else {\n this.tableData = await this.requestTableData()\n }\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 const { overrideInit = false } = this.tableMeta\n if (overrideInit) {\n this.$emit(RESERVE_EVENT_NAMES.TREE_CHANGE, { ...this.exposed })\n } else {\n this.tableData = await this.requestTableData(execFieldMapRet)\n }\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 });
2988
2988
 
2989
2989
  };
2990
2990
  /* scoped */
2991
- const __vue_scope_id__$y = "data-v-592e4998";
2991
+ const __vue_scope_id__$z = "data-v-592e4998";
2992
2992
  /* module identifier */
2993
- const __vue_module_identifier__$y = undefined;
2993
+ const __vue_module_identifier__$z = undefined;
2994
2994
  /* functional template */
2995
- const __vue_is_functional_template__$y = false;
2995
+ const __vue_is_functional_template__$z = false;
2996
2996
  /* style inject SSR */
2997
2997
 
2998
2998
  /* style inject shadow dom */
2999
2999
 
3000
3000
 
3001
3001
 
3002
- const __vue_component__$y = /*#__PURE__*/normalizeComponent(
3003
- { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
3004
- __vue_inject_styles__$y,
3005
- __vue_script__$y,
3006
- __vue_scope_id__$y,
3007
- __vue_is_functional_template__$y,
3008
- __vue_module_identifier__$y,
3002
+ const __vue_component__$z = /*#__PURE__*/normalizeComponent(
3003
+ { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
3004
+ __vue_inject_styles__$z,
3005
+ __vue_script__$z,
3006
+ __vue_scope_id__$z,
3007
+ __vue_is_functional_template__$z,
3008
+ __vue_module_identifier__$z,
3009
3009
  false,
3010
3010
  createInjector,
3011
3011
  undefined,
@@ -3013,7 +3013,7 @@ __vue_render__$y._withStripped = true;
3013
3013
  );
3014
3014
 
3015
3015
  //
3016
- var script$x = {
3016
+ var script$y = {
3017
3017
  name: 'ele-form-group-model',
3018
3018
  props: {
3019
3019
  mode: {
@@ -3293,10 +3293,10 @@ var script$x = {
3293
3293
  };
3294
3294
 
3295
3295
  /* script */
3296
- const __vue_script__$x = script$x;
3296
+ const __vue_script__$y = script$y;
3297
3297
 
3298
3298
  /* template */
3299
- var __vue_render__$x = function () {
3299
+ var __vue_render__$y = function () {
3300
3300
  var _vm = this;
3301
3301
  var _h = _vm.$createElement;
3302
3302
  var _c = _vm._self._c || _h;
@@ -3398,42 +3398,42 @@ var __vue_render__$x = function () {
3398
3398
  2
3399
3399
  )
3400
3400
  };
3401
- var __vue_staticRenderFns__$x = [];
3402
- __vue_render__$x._withStripped = true;
3401
+ var __vue_staticRenderFns__$y = [];
3402
+ __vue_render__$y._withStripped = true;
3403
3403
 
3404
3404
  /* style */
3405
- const __vue_inject_styles__$x = function (inject) {
3405
+ const __vue_inject_styles__$y = function (inject) {
3406
3406
  if (!inject) return
3407
3407
  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 });
3408
3408
 
3409
3409
  };
3410
3410
  /* scoped */
3411
- const __vue_scope_id__$x = "data-v-770e5c93";
3411
+ const __vue_scope_id__$y = "data-v-770e5c93";
3412
3412
  /* module identifier */
3413
- const __vue_module_identifier__$x = undefined;
3413
+ const __vue_module_identifier__$y = undefined;
3414
3414
  /* functional template */
3415
- const __vue_is_functional_template__$x = false;
3415
+ const __vue_is_functional_template__$y = false;
3416
3416
  /* style inject SSR */
3417
3417
 
3418
3418
  /* style inject shadow dom */
3419
3419
 
3420
3420
 
3421
3421
 
3422
- const __vue_component__$x = /*#__PURE__*/normalizeComponent(
3423
- { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
3424
- __vue_inject_styles__$x,
3425
- __vue_script__$x,
3426
- __vue_scope_id__$x,
3427
- __vue_is_functional_template__$x,
3428
- __vue_module_identifier__$x,
3429
- false,
3422
+ const __vue_component__$y = /*#__PURE__*/normalizeComponent(
3423
+ { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
3424
+ __vue_inject_styles__$y,
3425
+ __vue_script__$y,
3426
+ __vue_scope_id__$y,
3427
+ __vue_is_functional_template__$y,
3428
+ __vue_module_identifier__$y,
3429
+ false,
3430
3430
  createInjector,
3431
3431
  undefined,
3432
3432
  undefined
3433
3433
  );
3434
3434
 
3435
3435
  //
3436
- var script$w = {
3436
+ var script$x = {
3437
3437
  name: 'ele-form-model',
3438
3438
  props: {
3439
3439
  disabled: {
@@ -3472,7 +3472,9 @@ var script$w = {
3472
3472
  exposed() {
3473
3473
  return {
3474
3474
  setFieldsValue: this.setFieldsValue,
3475
- validateFields: this.validateFields
3475
+ validateFields: this.validateFields,
3476
+ getFieldsValue: this.getFieldsValue,
3477
+ route: this.$route
3476
3478
  };
3477
3479
  },
3478
3480
  assignAttrForEvents() {
@@ -3540,6 +3542,11 @@ var script$w = {
3540
3542
  }
3541
3543
  },
3542
3544
  methods: {
3545
+ onChangeFormStatus(props) {
3546
+ this.$emit(RESERVE_EVENT_NAMES.WATCH_FORM_STATUS, {
3547
+ ...props
3548
+ });
3549
+ },
3543
3550
  formModels() {
3544
3551
  return this.$refs[this.formRef] ? this.$refs[this.formRef].getFieldsValue() : {};
3545
3552
  },
@@ -3644,6 +3651,9 @@ var script$w = {
3644
3651
  setFieldsValue(props) {
3645
3652
  this.$refs[this.formRef].setFieldsValue(props);
3646
3653
  },
3654
+ getFieldsValue() {
3655
+ return this.$refs[this.formRef].getFieldsValue();
3656
+ },
3647
3657
  validateFields() {
3648
3658
  return this.$refs[this.formRef].validateFields();
3649
3659
  },
@@ -3666,14 +3676,17 @@ var script$w = {
3666
3676
  async mounted() {
3667
3677
  await this.preRequestTrigger();
3668
3678
  await this.infoRequestTrigger();
3679
+ this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, {
3680
+ exposed: this.exposed
3681
+ });
3669
3682
  }
3670
3683
  };
3671
3684
 
3672
3685
  /* script */
3673
- const __vue_script__$w = script$w;
3686
+ const __vue_script__$x = script$x;
3674
3687
 
3675
3688
  /* template */
3676
- var __vue_render__$w = function () {
3689
+ var __vue_render__$x = function () {
3677
3690
  var _vm = this;
3678
3691
  var _h = _vm.$createElement;
3679
3692
  var _c = _vm._self._c || _h;
@@ -3703,6 +3716,11 @@ var __vue_render__$w = function () {
3703
3716
  _c("ele-form", {
3704
3717
  ref: _vm.formRef,
3705
3718
  attrs: { elements: _vm.elements, disabled: _vm.globalDisabled },
3719
+ on: {
3720
+ change: function ($event) {
3721
+ return _vm.onChangeFormStatus($event)
3722
+ },
3723
+ },
3706
3724
  }),
3707
3725
  ],
3708
3726
  1
@@ -3726,34 +3744,34 @@ var __vue_render__$w = function () {
3726
3744
  : _vm._e(),
3727
3745
  ])
3728
3746
  };
3729
- var __vue_staticRenderFns__$w = [];
3730
- __vue_render__$w._withStripped = true;
3747
+ var __vue_staticRenderFns__$x = [];
3748
+ __vue_render__$x._withStripped = true;
3731
3749
 
3732
3750
  /* style */
3733
- const __vue_inject_styles__$w = function (inject) {
3751
+ const __vue_inject_styles__$x = function (inject) {
3734
3752
  if (!inject) return
3735
- 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 });
3753
+ inject("data-v-3205dad4_0", { source: ".form__model--wrapper[data-v-3205dad4] {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title[data-v-3205dad4] {\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-3205dad4] {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer[data-v-3205dad4] {\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":"AAgMA;EACA,WAAA;EACA,YAAA;EACA,cAAA;EACA,gBAAA;AC/LA;ADgMA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8DAAA;AC9LA;ADgMA;EACA,aAAA;AC9LA;ADgMA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,YAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC9LA;;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\" @change=\"onChangeFormStatus($event)\" :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 getFieldsValue: this.getFieldsValue,\n route: this.$route\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 onChangeFormStatus (props) {\n this.$emit(RESERVE_EVENT_NAMES.WATCH_FORM_STATUS, { ...props })\n },\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 getFieldsValue () {\n return this.$refs[this.formRef].getFieldsValue()\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 this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { exposed: this.exposed })\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 });
3736
3754
 
3737
3755
  };
3738
3756
  /* scoped */
3739
- const __vue_scope_id__$w = "data-v-02358f9a";
3757
+ const __vue_scope_id__$x = "data-v-3205dad4";
3740
3758
  /* module identifier */
3741
- const __vue_module_identifier__$w = undefined;
3759
+ const __vue_module_identifier__$x = undefined;
3742
3760
  /* functional template */
3743
- const __vue_is_functional_template__$w = false;
3761
+ const __vue_is_functional_template__$x = false;
3744
3762
  /* style inject SSR */
3745
3763
 
3746
3764
  /* style inject shadow dom */
3747
3765
 
3748
3766
 
3749
3767
 
3750
- const __vue_component__$w = /*#__PURE__*/normalizeComponent(
3751
- { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
3752
- __vue_inject_styles__$w,
3753
- __vue_script__$w,
3754
- __vue_scope_id__$w,
3755
- __vue_is_functional_template__$w,
3756
- __vue_module_identifier__$w,
3768
+ const __vue_component__$x = /*#__PURE__*/normalizeComponent(
3769
+ { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
3770
+ __vue_inject_styles__$x,
3771
+ __vue_script__$x,
3772
+ __vue_scope_id__$x,
3773
+ __vue_is_functional_template__$x,
3774
+ __vue_module_identifier__$x,
3757
3775
  false,
3758
3776
  createInjector,
3759
3777
  undefined,
@@ -3761,7 +3779,7 @@ __vue_render__$w._withStripped = true;
3761
3779
  );
3762
3780
 
3763
3781
  //
3764
- var script$v = {
3782
+ var script$w = {
3765
3783
  name: 'ele-step-model',
3766
3784
  props: {
3767
3785
  stepMeta: {
@@ -3952,10 +3970,10 @@ var script$v = {
3952
3970
  };
3953
3971
 
3954
3972
  /* script */
3955
- const __vue_script__$v = script$v;
3973
+ const __vue_script__$w = script$w;
3956
3974
 
3957
3975
  /* template */
3958
- var __vue_render__$v = function () {
3976
+ var __vue_render__$w = function () {
3959
3977
  var _vm = this;
3960
3978
  var _h = _vm.$createElement;
3961
3979
  var _c = _vm._self._c || _h;
@@ -4021,34 +4039,34 @@ var __vue_render__$v = function () {
4021
4039
  ),
4022
4040
  ])
4023
4041
  };
4024
- var __vue_staticRenderFns__$v = [];
4025
- __vue_render__$v._withStripped = true;
4042
+ var __vue_staticRenderFns__$w = [];
4043
+ __vue_render__$w._withStripped = true;
4026
4044
 
4027
4045
  /* style */
4028
- const __vue_inject_styles__$v = function (inject) {
4046
+ const __vue_inject_styles__$w = function (inject) {
4029
4047
  if (!inject) return
4030
4048
  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 });
4031
4049
 
4032
4050
  };
4033
4051
  /* scoped */
4034
- const __vue_scope_id__$v = "data-v-1919f228";
4052
+ const __vue_scope_id__$w = "data-v-1919f228";
4035
4053
  /* module identifier */
4036
- const __vue_module_identifier__$v = undefined;
4054
+ const __vue_module_identifier__$w = undefined;
4037
4055
  /* functional template */
4038
- const __vue_is_functional_template__$v = false;
4056
+ const __vue_is_functional_template__$w = false;
4039
4057
  /* style inject SSR */
4040
4058
 
4041
4059
  /* style inject shadow dom */
4042
4060
 
4043
4061
 
4044
4062
 
4045
- const __vue_component__$v = /*#__PURE__*/normalizeComponent(
4046
- { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
4047
- __vue_inject_styles__$v,
4048
- __vue_script__$v,
4049
- __vue_scope_id__$v,
4050
- __vue_is_functional_template__$v,
4051
- __vue_module_identifier__$v,
4063
+ const __vue_component__$w = /*#__PURE__*/normalizeComponent(
4064
+ { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
4065
+ __vue_inject_styles__$w,
4066
+ __vue_script__$w,
4067
+ __vue_scope_id__$w,
4068
+ __vue_is_functional_template__$w,
4069
+ __vue_module_identifier__$w,
4052
4070
  false,
4053
4071
  createInjector,
4054
4072
  undefined,
@@ -4056,7 +4074,7 @@ __vue_render__$v._withStripped = true;
4056
4074
  );
4057
4075
 
4058
4076
  //
4059
- var script$u = {
4077
+ var script$v = {
4060
4078
  name: 'ele-tpl',
4061
4079
  props: {
4062
4080
  modelName: {
@@ -4064,10 +4082,10 @@ var script$u = {
4064
4082
  }
4065
4083
  },
4066
4084
  components: {
4085
+ [__vue_component__$z.name]: __vue_component__$z,
4067
4086
  [__vue_component__$y.name]: __vue_component__$y,
4068
- [__vue_component__$x.name]: __vue_component__$x,
4069
- [__vue_component__$v.name]: __vue_component__$v,
4070
- [__vue_component__$w.name]: __vue_component__$w
4087
+ [__vue_component__$w.name]: __vue_component__$w,
4088
+ [__vue_component__$x.name]: __vue_component__$x
4071
4089
  },
4072
4090
  computed: {
4073
4091
  modelNameValidator() {
@@ -4089,10 +4107,10 @@ var script$u = {
4089
4107
  };
4090
4108
 
4091
4109
  /* script */
4092
- const __vue_script__$u = script$u;
4110
+ const __vue_script__$v = script$v;
4093
4111
 
4094
4112
  /* template */
4095
- var __vue_render__$u = function () {
4113
+ var __vue_render__$v = function () {
4096
4114
  var _vm = this;
4097
4115
  var _h = _vm.$createElement;
4098
4116
  var _c = _vm._self._c || _h;
@@ -4130,44 +4148,44 @@ var __vue_render__$u = function () {
4130
4148
  domProps: { innerHTML: _vm._s(_vm.modelNameValidator.message) },
4131
4149
  })
4132
4150
  };
4133
- var __vue_staticRenderFns__$u = [];
4134
- __vue_render__$u._withStripped = true;
4151
+ var __vue_staticRenderFns__$v = [];
4152
+ __vue_render__$v._withStripped = true;
4135
4153
 
4136
4154
  /* style */
4137
- const __vue_inject_styles__$u = function (inject) {
4155
+ const __vue_inject_styles__$v = function (inject) {
4138
4156
  if (!inject) return
4139
4157
  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 });
4140
4158
 
4141
4159
  };
4142
4160
  /* scoped */
4143
- const __vue_scope_id__$u = undefined;
4161
+ const __vue_scope_id__$v = undefined;
4144
4162
  /* module identifier */
4145
- const __vue_module_identifier__$u = undefined;
4163
+ const __vue_module_identifier__$v = undefined;
4146
4164
  /* functional template */
4147
- const __vue_is_functional_template__$u = false;
4165
+ const __vue_is_functional_template__$v = false;
4148
4166
  /* style inject SSR */
4149
4167
 
4150
4168
  /* style inject shadow dom */
4151
4169
 
4152
4170
 
4153
4171
 
4154
- const __vue_component__$u = /*#__PURE__*/normalizeComponent(
4155
- { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
4156
- __vue_inject_styles__$u,
4157
- __vue_script__$u,
4158
- __vue_scope_id__$u,
4159
- __vue_is_functional_template__$u,
4160
- __vue_module_identifier__$u,
4172
+ const __vue_component__$v = /*#__PURE__*/normalizeComponent(
4173
+ { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
4174
+ __vue_inject_styles__$v,
4175
+ __vue_script__$v,
4176
+ __vue_scope_id__$v,
4177
+ __vue_is_functional_template__$v,
4178
+ __vue_module_identifier__$v,
4161
4179
  false,
4162
4180
  createInjector,
4163
4181
  undefined,
4164
4182
  undefined
4165
4183
  );
4166
4184
 
4167
- __vue_component__$u.install = Vue => Vue.component(__vue_component__$u.name, __vue_component__$u);
4185
+ __vue_component__$v.install = Vue => Vue.component(__vue_component__$v.name, __vue_component__$v);
4168
4186
 
4169
4187
  //
4170
- var script$t = {
4188
+ var script$u = {
4171
4189
  name: 'ele-form',
4172
4190
  props: {
4173
4191
  disabled: {
@@ -4186,7 +4204,15 @@ var script$t = {
4186
4204
  data() {
4187
4205
  return {};
4188
4206
  },
4207
+ inject: {
4208
+ [CONTEXT]: {
4209
+ default: () => () => ({})
4210
+ }
4211
+ },
4189
4212
  computed: {
4213
+ contextData() {
4214
+ return this[CONTEXT].call(this);
4215
+ },
4190
4216
  globalDisabled() {
4191
4217
  return this.executeExpression(this.disabled);
4192
4218
  },
@@ -4304,10 +4330,10 @@ var script$t = {
4304
4330
  };
4305
4331
 
4306
4332
  /* script */
4307
- const __vue_script__$t = script$t;
4333
+ const __vue_script__$u = script$u;
4308
4334
 
4309
4335
  /* template */
4310
- var __vue_render__$t = function () {
4336
+ var __vue_render__$u = function () {
4311
4337
  var _vm = this;
4312
4338
  var _h = _vm.$createElement;
4313
4339
  var _c = _vm._self._c || _h;
@@ -4448,7 +4474,7 @@ var __vue_render__$t = function () {
4448
4474
  multiple: ele.multiple,
4449
4475
  mode: ele.mode,
4450
4476
  code: ele.code,
4451
- init: ele.inits,
4477
+ init: ele.init,
4452
4478
  url: ele.url,
4453
4479
  params: ele.params,
4454
4480
  },
@@ -4769,6 +4795,53 @@ var __vue_render__$t = function () {
4769
4795
  1
4770
4796
  ),
4771
4797
  ]
4798
+ : ele.type == "ele-tree-select"
4799
+ ? [
4800
+ _c(
4801
+ "a-form-item",
4802
+ { attrs: { label: ele.label + ":" } },
4803
+ [
4804
+ _c(
4805
+ "ele-tree-select",
4806
+ _vm._b(
4807
+ {
4808
+ directives: [
4809
+ {
4810
+ name: "decorator",
4811
+ rawName: "v-decorator",
4812
+ value: [
4813
+ ele.name,
4814
+ {
4815
+ rules: _vm.rebuildRules(
4816
+ ele.rules
4817
+ ),
4818
+ },
4819
+ ],
4820
+ expression:
4821
+ "[ele.name, { rules: rebuildRules(ele.rules) }]",
4822
+ },
4823
+ ],
4824
+ staticStyle: { width: "100%" },
4825
+ attrs: {
4826
+ disabled: _vm.executeExpression(
4827
+ ele._disabled
4828
+ ),
4829
+ },
4830
+ on: {
4831
+ change: function ($event) {
4832
+ return _vm.onChange($event, ele)
4833
+ },
4834
+ },
4835
+ },
4836
+ "ele-tree-select",
4837
+ ele.meta,
4838
+ false
4839
+ )
4840
+ ),
4841
+ ],
4842
+ 1
4843
+ ),
4844
+ ]
4772
4845
  : _vm._e(),
4773
4846
  ],
4774
4847
  2
@@ -4786,41 +4859,41 @@ var __vue_render__$t = function () {
4786
4859
  1
4787
4860
  )
4788
4861
  };
4789
- var __vue_staticRenderFns__$t = [];
4790
- __vue_render__$t._withStripped = true;
4862
+ var __vue_staticRenderFns__$u = [];
4863
+ __vue_render__$u._withStripped = true;
4791
4864
 
4792
4865
  /* style */
4793
- const __vue_inject_styles__$t = function (inject) {
4866
+ const __vue_inject_styles__$u = function (inject) {
4794
4867
  if (!inject) return
4795
- inject("data-v-a37cd1dc_0", { source: ".ele__form--wrapper[data-v-a37cd1dc] {\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":"AAwQA;EACA,gBAAA;ACvQA;;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 :init=\"ele.inits\"\n :url=\"ele.url\"\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 <template v-else-if=\"ele.type == 'ele-form-img-crop'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-form-img-crop\n @change=\"onChange($event, ele)\"\n :width=\"ele.width\"\n :height=\"ele.height\"\n :modal-title=\"ele.modalTitle\"\n :oper-text=\"ele.operText\"\n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-form-img-crop>\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 });
4868
+ inject("data-v-b1ff94c6_0", { source: ".ele__form--wrapper[data-v-b1ff94c6] {\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":"AA4RA;EACA,gBAAA;AC3RA;;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 :init=\"ele.init\"\n :url=\"ele.url\"\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 <template v-else-if=\"ele.type == 'ele-form-img-crop'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-form-img-crop\n @change=\"onChange($event, ele)\"\n :width=\"ele.width\"\n :height=\"ele.height\"\n :modal-title=\"ele.modalTitle\"\n :oper-text=\"ele.operText\"\n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-form-img-crop>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'ele-tree-select'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-tree-select\n @change=\"onChange($event, ele)\"\n :disabled=\"executeExpression(ele._disabled)\"\n v-bind=\"ele.meta\"\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \n style=\"width:100%;\">\n </ele-tree-select>\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'\nimport { CONTEXT } from '../../utils'\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 inject: {\n [CONTEXT]: {\n default: () => (() => ({}))\n }\n },\n computed: {\n contextData () {\n return this[CONTEXT].call(this)\n },\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 });
4796
4869
 
4797
4870
  };
4798
4871
  /* scoped */
4799
- const __vue_scope_id__$t = "data-v-a37cd1dc";
4872
+ const __vue_scope_id__$u = "data-v-b1ff94c6";
4800
4873
  /* module identifier */
4801
- const __vue_module_identifier__$t = undefined;
4874
+ const __vue_module_identifier__$u = undefined;
4802
4875
  /* functional template */
4803
- const __vue_is_functional_template__$t = false;
4876
+ const __vue_is_functional_template__$u = false;
4804
4877
  /* style inject SSR */
4805
4878
 
4806
4879
  /* style inject shadow dom */
4807
4880
 
4808
4881
 
4809
4882
 
4810
- const __vue_component__$t = /*#__PURE__*/normalizeComponent(
4811
- { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
4812
- __vue_inject_styles__$t,
4813
- __vue_script__$t,
4814
- __vue_scope_id__$t,
4815
- __vue_is_functional_template__$t,
4816
- __vue_module_identifier__$t,
4883
+ const __vue_component__$u = /*#__PURE__*/normalizeComponent(
4884
+ { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
4885
+ __vue_inject_styles__$u,
4886
+ __vue_script__$u,
4887
+ __vue_scope_id__$u,
4888
+ __vue_is_functional_template__$u,
4889
+ __vue_module_identifier__$u,
4817
4890
  false,
4818
4891
  createInjector,
4819
4892
  undefined,
4820
4893
  undefined
4821
4894
  );
4822
4895
 
4823
- __vue_component__$t.install = Vue => Vue.component(__vue_component__$t.name, __vue_component__$t);
4896
+ __vue_component__$u.install = Vue => Vue.component(__vue_component__$u.name, __vue_component__$u);
4824
4897
 
4825
4898
  //
4826
4899
  //
@@ -4834,7 +4907,7 @@ __vue_component__$t.install = Vue => Vue.component(__vue_component__$t.name, __v
4834
4907
  //
4835
4908
  //
4836
4909
 
4837
- var script$s = {
4910
+ var script$t = {
4838
4911
  name: 'ele-alert',
4839
4912
  props: {
4840
4913
  type: {
@@ -4863,10 +4936,10 @@ var script$s = {
4863
4936
  };
4864
4937
 
4865
4938
  /* script */
4866
- const __vue_script__$s = script$s;
4939
+ const __vue_script__$t = script$t;
4867
4940
 
4868
4941
  /* template */
4869
- var __vue_render__$s = function () {
4942
+ var __vue_render__$t = function () {
4870
4943
  var _vm = this;
4871
4944
  var _h = _vm.$createElement;
4872
4945
  var _c = _vm._self._c || _h;
@@ -4882,44 +4955,44 @@ var __vue_render__$s = function () {
4882
4955
  },
4883
4956
  })
4884
4957
  };
4885
- var __vue_staticRenderFns__$s = [];
4886
- __vue_render__$s._withStripped = true;
4958
+ var __vue_staticRenderFns__$t = [];
4959
+ __vue_render__$t._withStripped = true;
4887
4960
 
4888
4961
  /* style */
4889
- const __vue_inject_styles__$s = function (inject) {
4962
+ const __vue_inject_styles__$t = function (inject) {
4890
4963
  if (!inject) return
4891
4964
  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 });
4892
4965
 
4893
4966
  };
4894
4967
  /* scoped */
4895
- const __vue_scope_id__$s = "data-v-ee7d6de4";
4968
+ const __vue_scope_id__$t = "data-v-ee7d6de4";
4896
4969
  /* module identifier */
4897
- const __vue_module_identifier__$s = undefined;
4970
+ const __vue_module_identifier__$t = undefined;
4898
4971
  /* functional template */
4899
- const __vue_is_functional_template__$s = false;
4972
+ const __vue_is_functional_template__$t = false;
4900
4973
  /* style inject SSR */
4901
4974
 
4902
4975
  /* style inject shadow dom */
4903
4976
 
4904
4977
 
4905
4978
 
4906
- const __vue_component__$s = /*#__PURE__*/normalizeComponent(
4907
- { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
4908
- __vue_inject_styles__$s,
4909
- __vue_script__$s,
4910
- __vue_scope_id__$s,
4911
- __vue_is_functional_template__$s,
4912
- __vue_module_identifier__$s,
4979
+ const __vue_component__$t = /*#__PURE__*/normalizeComponent(
4980
+ { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
4981
+ __vue_inject_styles__$t,
4982
+ __vue_script__$t,
4983
+ __vue_scope_id__$t,
4984
+ __vue_is_functional_template__$t,
4985
+ __vue_module_identifier__$t,
4913
4986
  false,
4914
4987
  createInjector,
4915
4988
  undefined,
4916
4989
  undefined
4917
4990
  );
4918
4991
 
4919
- __vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
4992
+ __vue_component__$t.install = Vue => Vue.component(__vue_component__$t.name, __vue_component__$t);
4920
4993
 
4921
4994
  //
4922
- var script$r = {
4995
+ var script$s = {
4923
4996
  name: 'ele-upload',
4924
4997
  components: {
4925
4998
  FileUpload
@@ -5260,10 +5333,10 @@ var script$r = {
5260
5333
  };
5261
5334
 
5262
5335
  /* script */
5263
- const __vue_script__$r = script$r;
5336
+ const __vue_script__$s = script$s;
5264
5337
 
5265
5338
  /* template */
5266
- var __vue_render__$r = function () {
5339
+ var __vue_render__$s = function () {
5267
5340
  var _vm = this;
5268
5341
  var _h = _vm.$createElement;
5269
5342
  var _c = _vm._self._c || _h;
@@ -5425,41 +5498,41 @@ var __vue_render__$r = function () {
5425
5498
  1
5426
5499
  )
5427
5500
  };
5428
- var __vue_staticRenderFns__$r = [];
5429
- __vue_render__$r._withStripped = true;
5501
+ var __vue_staticRenderFns__$s = [];
5502
+ __vue_render__$s._withStripped = true;
5430
5503
 
5431
5504
  /* style */
5432
- const __vue_inject_styles__$r = function (inject) {
5505
+ const __vue_inject_styles__$s = function (inject) {
5433
5506
  if (!inject) return
5434
5507
  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 });
5435
5508
 
5436
5509
  };
5437
5510
  /* scoped */
5438
- const __vue_scope_id__$r = "data-v-d2929816";
5511
+ const __vue_scope_id__$s = "data-v-d2929816";
5439
5512
  /* module identifier */
5440
- const __vue_module_identifier__$r = undefined;
5513
+ const __vue_module_identifier__$s = undefined;
5441
5514
  /* functional template */
5442
- const __vue_is_functional_template__$r = false;
5515
+ const __vue_is_functional_template__$s = false;
5443
5516
  /* style inject SSR */
5444
5517
 
5445
5518
  /* style inject shadow dom */
5446
5519
 
5447
5520
 
5448
5521
 
5449
- const __vue_component__$r = /*#__PURE__*/normalizeComponent(
5450
- { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
5451
- __vue_inject_styles__$r,
5452
- __vue_script__$r,
5453
- __vue_scope_id__$r,
5454
- __vue_is_functional_template__$r,
5455
- __vue_module_identifier__$r,
5522
+ const __vue_component__$s = /*#__PURE__*/normalizeComponent(
5523
+ { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
5524
+ __vue_inject_styles__$s,
5525
+ __vue_script__$s,
5526
+ __vue_scope_id__$s,
5527
+ __vue_is_functional_template__$s,
5528
+ __vue_module_identifier__$s,
5456
5529
  false,
5457
5530
  createInjector,
5458
5531
  undefined,
5459
5532
  undefined
5460
5533
  );
5461
5534
 
5462
- __vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __vue_component__$r);
5535
+ __vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
5463
5536
 
5464
5537
  //
5465
5538
  //
@@ -5480,7 +5553,7 @@ __vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __v
5480
5553
  //
5481
5554
  //
5482
5555
 
5483
- var script$q = {
5556
+ var script$r = {
5484
5557
  name: 'ele-select-entity',
5485
5558
  props: {
5486
5559
  value: {
@@ -5537,10 +5610,10 @@ var script$q = {
5537
5610
  };
5538
5611
 
5539
5612
  /* script */
5540
- const __vue_script__$q = script$q;
5613
+ const __vue_script__$r = script$r;
5541
5614
 
5542
5615
  /* template */
5543
- var __vue_render__$q = function () {
5616
+ var __vue_render__$r = function () {
5544
5617
  var _vm = this;
5545
5618
  var _h = _vm.$createElement;
5546
5619
  var _c = _vm._self._c || _h;
@@ -5590,41 +5663,41 @@ var __vue_render__$q = function () {
5590
5663
  2
5591
5664
  )
5592
5665
  };
5593
- var __vue_staticRenderFns__$q = [];
5594
- __vue_render__$q._withStripped = true;
5666
+ var __vue_staticRenderFns__$r = [];
5667
+ __vue_render__$r._withStripped = true;
5595
5668
 
5596
5669
  /* style */
5597
- const __vue_inject_styles__$q = function (inject) {
5670
+ const __vue_inject_styles__$r = function (inject) {
5598
5671
  if (!inject) return
5599
5672
  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 });
5600
5673
 
5601
5674
  };
5602
5675
  /* scoped */
5603
- const __vue_scope_id__$q = "data-v-611a11f1";
5676
+ const __vue_scope_id__$r = "data-v-611a11f1";
5604
5677
  /* module identifier */
5605
- const __vue_module_identifier__$q = undefined;
5678
+ const __vue_module_identifier__$r = undefined;
5606
5679
  /* functional template */
5607
- const __vue_is_functional_template__$q = false;
5680
+ const __vue_is_functional_template__$r = false;
5608
5681
  /* style inject SSR */
5609
5682
 
5610
5683
  /* style inject shadow dom */
5611
5684
 
5612
5685
 
5613
5686
 
5614
- const __vue_component__$q = /*#__PURE__*/normalizeComponent(
5615
- { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
5616
- __vue_inject_styles__$q,
5617
- __vue_script__$q,
5618
- __vue_scope_id__$q,
5619
- __vue_is_functional_template__$q,
5620
- __vue_module_identifier__$q,
5687
+ const __vue_component__$r = /*#__PURE__*/normalizeComponent(
5688
+ { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
5689
+ __vue_inject_styles__$r,
5690
+ __vue_script__$r,
5691
+ __vue_scope_id__$r,
5692
+ __vue_is_functional_template__$r,
5693
+ __vue_module_identifier__$r,
5621
5694
  false,
5622
5695
  createInjector,
5623
5696
  undefined,
5624
5697
  undefined
5625
5698
  );
5626
5699
 
5627
- __vue_component__$q.install = Vue => Vue.component(__vue_component__$q.name, __vue_component__$q);
5700
+ __vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __vue_component__$r);
5628
5701
 
5629
5702
  //
5630
5703
  //
@@ -5636,7 +5709,7 @@ __vue_component__$q.install = Vue => Vue.component(__vue_component__$q.name, __v
5636
5709
  //
5637
5710
  //
5638
5711
 
5639
- var script$p = {
5712
+ var script$q = {
5640
5713
  name: 'ele-icon',
5641
5714
  props: {
5642
5715
  type: {
@@ -5659,10 +5732,10 @@ var script$p = {
5659
5732
  };
5660
5733
 
5661
5734
  /* script */
5662
- const __vue_script__$p = script$p;
5735
+ const __vue_script__$q = script$q;
5663
5736
 
5664
5737
  /* template */
5665
- var __vue_render__$p = function () {
5738
+ var __vue_render__$q = function () {
5666
5739
  var _vm = this;
5667
5740
  var _h = _vm.$createElement;
5668
5741
  var _c = _vm._self._c || _h;
@@ -5670,17 +5743,17 @@ var __vue_render__$p = function () {
5670
5743
  ? _c("a-icon", { attrs: { type: _vm.type, theme: _vm.theme } })
5671
5744
  : _c("i", { class: ["iconfont", _vm.type] })
5672
5745
  };
5673
- var __vue_staticRenderFns__$p = [];
5674
- __vue_render__$p._withStripped = true;
5746
+ var __vue_staticRenderFns__$q = [];
5747
+ __vue_render__$q._withStripped = true;
5675
5748
 
5676
5749
  /* style */
5677
- const __vue_inject_styles__$p = undefined;
5750
+ const __vue_inject_styles__$q = undefined;
5678
5751
  /* scoped */
5679
- const __vue_scope_id__$p = undefined;
5752
+ const __vue_scope_id__$q = undefined;
5680
5753
  /* module identifier */
5681
- const __vue_module_identifier__$p = undefined;
5754
+ const __vue_module_identifier__$q = undefined;
5682
5755
  /* functional template */
5683
- const __vue_is_functional_template__$p = false;
5756
+ const __vue_is_functional_template__$q = false;
5684
5757
  /* style inject */
5685
5758
 
5686
5759
  /* style inject SSR */
@@ -5689,20 +5762,20 @@ __vue_render__$p._withStripped = true;
5689
5762
 
5690
5763
 
5691
5764
 
5692
- const __vue_component__$p = /*#__PURE__*/normalizeComponent(
5693
- { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
5694
- __vue_inject_styles__$p,
5695
- __vue_script__$p,
5696
- __vue_scope_id__$p,
5697
- __vue_is_functional_template__$p,
5698
- __vue_module_identifier__$p,
5765
+ const __vue_component__$q = /*#__PURE__*/normalizeComponent(
5766
+ { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
5767
+ __vue_inject_styles__$q,
5768
+ __vue_script__$q,
5769
+ __vue_scope_id__$q,
5770
+ __vue_is_functional_template__$q,
5771
+ __vue_module_identifier__$q,
5699
5772
  false,
5700
5773
  undefined,
5701
5774
  undefined,
5702
5775
  undefined
5703
5776
  );
5704
5777
 
5705
- __vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __vue_component__$p);
5778
+ __vue_component__$q.install = Vue => Vue.component(__vue_component__$q.name, __vue_component__$q);
5706
5779
 
5707
5780
  //
5708
5781
  //
@@ -5711,7 +5784,7 @@ __vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __v
5711
5784
  //
5712
5785
  //
5713
5786
 
5714
- var script$o = {
5787
+ var script$p = {
5715
5788
  name: 'ele-input-number',
5716
5789
  props: {
5717
5790
  precision: {
@@ -5729,10 +5802,10 @@ var script$o = {
5729
5802
  };
5730
5803
 
5731
5804
  /* script */
5732
- const __vue_script__$o = script$o;
5805
+ const __vue_script__$p = script$p;
5733
5806
 
5734
5807
  /* template */
5735
- var __vue_render__$o = function () {
5808
+ var __vue_render__$p = function () {
5736
5809
  var _vm = this;
5737
5810
  var _h = _vm.$createElement;
5738
5811
  var _c = _vm._self._c || _h;
@@ -5756,17 +5829,17 @@ var __vue_render__$o = function () {
5756
5829
  1
5757
5830
  )
5758
5831
  };
5759
- var __vue_staticRenderFns__$o = [];
5760
- __vue_render__$o._withStripped = true;
5832
+ var __vue_staticRenderFns__$p = [];
5833
+ __vue_render__$p._withStripped = true;
5761
5834
 
5762
5835
  /* style */
5763
- const __vue_inject_styles__$o = undefined;
5836
+ const __vue_inject_styles__$p = undefined;
5764
5837
  /* scoped */
5765
- const __vue_scope_id__$o = undefined;
5838
+ const __vue_scope_id__$p = undefined;
5766
5839
  /* module identifier */
5767
- const __vue_module_identifier__$o = undefined;
5840
+ const __vue_module_identifier__$p = undefined;
5768
5841
  /* functional template */
5769
- const __vue_is_functional_template__$o = false;
5842
+ const __vue_is_functional_template__$p = false;
5770
5843
  /* style inject */
5771
5844
 
5772
5845
  /* style inject SSR */
@@ -5775,23 +5848,23 @@ __vue_render__$o._withStripped = true;
5775
5848
 
5776
5849
 
5777
5850
 
5778
- const __vue_component__$o = /*#__PURE__*/normalizeComponent(
5779
- { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
5780
- __vue_inject_styles__$o,
5781
- __vue_script__$o,
5782
- __vue_scope_id__$o,
5783
- __vue_is_functional_template__$o,
5784
- __vue_module_identifier__$o,
5851
+ const __vue_component__$p = /*#__PURE__*/normalizeComponent(
5852
+ { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
5853
+ __vue_inject_styles__$p,
5854
+ __vue_script__$p,
5855
+ __vue_scope_id__$p,
5856
+ __vue_is_functional_template__$p,
5857
+ __vue_module_identifier__$p,
5785
5858
  false,
5786
5859
  undefined,
5787
5860
  undefined,
5788
5861
  undefined
5789
5862
  );
5790
5863
 
5791
- __vue_component__$o.install = Vue => Vue.component(__vue_component__$o.name, __vue_component__$o);
5864
+ __vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __vue_component__$p);
5792
5865
 
5793
5866
  //
5794
- var script$n = {
5867
+ var script$o = {
5795
5868
  name: 'ele-modal',
5796
5869
  props: {
5797
5870
  value: {
@@ -5935,10 +6008,10 @@ var script$n = {
5935
6008
  };
5936
6009
 
5937
6010
  /* script */
5938
- const __vue_script__$n = script$n;
6011
+ const __vue_script__$o = script$o;
5939
6012
 
5940
6013
  /* template */
5941
- var __vue_render__$n = function () {
6014
+ var __vue_render__$o = function () {
5942
6015
  var _vm = this;
5943
6016
  var _h = _vm.$createElement;
5944
6017
  var _c = _vm._self._c || _h;
@@ -6011,41 +6084,41 @@ var __vue_render__$n = function () {
6011
6084
  2
6012
6085
  )
6013
6086
  };
6014
- var __vue_staticRenderFns__$n = [];
6015
- __vue_render__$n._withStripped = true;
6087
+ var __vue_staticRenderFns__$o = [];
6088
+ __vue_render__$o._withStripped = true;
6016
6089
 
6017
6090
  /* style */
6018
- const __vue_inject_styles__$n = function (inject) {
6091
+ const __vue_inject_styles__$o = function (inject) {
6019
6092
  if (!inject) return
6020
6093
  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 });
6021
6094
 
6022
6095
  };
6023
6096
  /* scoped */
6024
- const __vue_scope_id__$n = "data-v-e7c1987c";
6097
+ const __vue_scope_id__$o = "data-v-e7c1987c";
6025
6098
  /* module identifier */
6026
- const __vue_module_identifier__$n = undefined;
6099
+ const __vue_module_identifier__$o = undefined;
6027
6100
  /* functional template */
6028
- const __vue_is_functional_template__$n = false;
6101
+ const __vue_is_functional_template__$o = false;
6029
6102
  /* style inject SSR */
6030
6103
 
6031
6104
  /* style inject shadow dom */
6032
6105
 
6033
6106
 
6034
6107
 
6035
- const __vue_component__$n = /*#__PURE__*/normalizeComponent(
6036
- { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
6037
- __vue_inject_styles__$n,
6038
- __vue_script__$n,
6039
- __vue_scope_id__$n,
6040
- __vue_is_functional_template__$n,
6041
- __vue_module_identifier__$n,
6108
+ const __vue_component__$o = /*#__PURE__*/normalizeComponent(
6109
+ { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
6110
+ __vue_inject_styles__$o,
6111
+ __vue_script__$o,
6112
+ __vue_scope_id__$o,
6113
+ __vue_is_functional_template__$o,
6114
+ __vue_module_identifier__$o,
6042
6115
  false,
6043
6116
  createInjector,
6044
6117
  undefined,
6045
6118
  undefined
6046
6119
  );
6047
6120
 
6048
- __vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __vue_component__$n);
6121
+ __vue_component__$o.install = Vue => Vue.component(__vue_component__$o.name, __vue_component__$o);
6049
6122
 
6050
6123
  //
6051
6124
  //
@@ -6057,7 +6130,7 @@ __vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __v
6057
6130
  //
6058
6131
  //
6059
6132
 
6060
- var script$m = {
6133
+ var script$n = {
6061
6134
  name: 'ele-checkbox',
6062
6135
  model: {
6063
6136
  prop: 'value',
@@ -6085,10 +6158,10 @@ var script$m = {
6085
6158
  };
6086
6159
 
6087
6160
  /* script */
6088
- const __vue_script__$m = script$m;
6161
+ const __vue_script__$n = script$n;
6089
6162
 
6090
6163
  /* template */
6091
- var __vue_render__$m = function () {
6164
+ var __vue_render__$n = function () {
6092
6165
  var _vm = this;
6093
6166
  var _h = _vm.$createElement;
6094
6167
  var _c = _vm._self._c || _h;
@@ -6101,41 +6174,41 @@ var __vue_render__$m = function () {
6101
6174
  on: { change: _vm.onChange },
6102
6175
  })
6103
6176
  };
6104
- var __vue_staticRenderFns__$m = [];
6105
- __vue_render__$m._withStripped = true;
6177
+ var __vue_staticRenderFns__$n = [];
6178
+ __vue_render__$n._withStripped = true;
6106
6179
 
6107
6180
  /* style */
6108
- const __vue_inject_styles__$m = function (inject) {
6181
+ const __vue_inject_styles__$n = function (inject) {
6109
6182
  if (!inject) return
6110
6183
  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 });
6111
6184
 
6112
6185
  };
6113
6186
  /* scoped */
6114
- const __vue_scope_id__$m = "data-v-e6c4aea4";
6187
+ const __vue_scope_id__$n = "data-v-e6c4aea4";
6115
6188
  /* module identifier */
6116
- const __vue_module_identifier__$m = undefined;
6189
+ const __vue_module_identifier__$n = undefined;
6117
6190
  /* functional template */
6118
- const __vue_is_functional_template__$m = false;
6191
+ const __vue_is_functional_template__$n = false;
6119
6192
  /* style inject SSR */
6120
6193
 
6121
6194
  /* style inject shadow dom */
6122
6195
 
6123
6196
 
6124
6197
 
6125
- const __vue_component__$m = /*#__PURE__*/normalizeComponent(
6126
- { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
6127
- __vue_inject_styles__$m,
6128
- __vue_script__$m,
6129
- __vue_scope_id__$m,
6130
- __vue_is_functional_template__$m,
6131
- __vue_module_identifier__$m,
6198
+ const __vue_component__$n = /*#__PURE__*/normalizeComponent(
6199
+ { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
6200
+ __vue_inject_styles__$n,
6201
+ __vue_script__$n,
6202
+ __vue_scope_id__$n,
6203
+ __vue_is_functional_template__$n,
6204
+ __vue_module_identifier__$n,
6132
6205
  false,
6133
6206
  createInjector,
6134
6207
  undefined,
6135
6208
  undefined
6136
6209
  );
6137
6210
 
6138
- __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
6211
+ __vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __vue_component__$n);
6139
6212
 
6140
6213
  //
6141
6214
  //
@@ -6146,7 +6219,7 @@ __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __v
6146
6219
  //
6147
6220
  //
6148
6221
 
6149
- var script$l = {
6222
+ var script$m = {
6150
6223
  name: 'ele-radio',
6151
6224
  model: {
6152
6225
  prop: 'value',
@@ -6179,10 +6252,10 @@ var script$l = {
6179
6252
  };
6180
6253
 
6181
6254
  /* script */
6182
- const __vue_script__$l = script$l;
6255
+ const __vue_script__$m = script$m;
6183
6256
 
6184
6257
  /* template */
6185
- var __vue_render__$l = function () {
6258
+ var __vue_render__$m = function () {
6186
6259
  var _vm = this;
6187
6260
  var _h = _vm.$createElement;
6188
6261
  var _c = _vm._self._c || _h;
@@ -6200,41 +6273,41 @@ var __vue_render__$l = function () {
6200
6273
  1
6201
6274
  )
6202
6275
  };
6203
- var __vue_staticRenderFns__$l = [];
6204
- __vue_render__$l._withStripped = true;
6276
+ var __vue_staticRenderFns__$m = [];
6277
+ __vue_render__$m._withStripped = true;
6205
6278
 
6206
6279
  /* style */
6207
- const __vue_inject_styles__$l = function (inject) {
6280
+ const __vue_inject_styles__$m = function (inject) {
6208
6281
  if (!inject) return
6209
6282
  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 });
6210
6283
 
6211
6284
  };
6212
6285
  /* scoped */
6213
- const __vue_scope_id__$l = "data-v-00d35412";
6286
+ const __vue_scope_id__$m = "data-v-00d35412";
6214
6287
  /* module identifier */
6215
- const __vue_module_identifier__$l = undefined;
6288
+ const __vue_module_identifier__$m = undefined;
6216
6289
  /* functional template */
6217
- const __vue_is_functional_template__$l = false;
6290
+ const __vue_is_functional_template__$m = false;
6218
6291
  /* style inject SSR */
6219
6292
 
6220
6293
  /* style inject shadow dom */
6221
6294
 
6222
6295
 
6223
6296
 
6224
- const __vue_component__$l = /*#__PURE__*/normalizeComponent(
6225
- { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
6226
- __vue_inject_styles__$l,
6227
- __vue_script__$l,
6228
- __vue_scope_id__$l,
6229
- __vue_is_functional_template__$l,
6230
- __vue_module_identifier__$l,
6297
+ const __vue_component__$m = /*#__PURE__*/normalizeComponent(
6298
+ { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
6299
+ __vue_inject_styles__$m,
6300
+ __vue_script__$m,
6301
+ __vue_scope_id__$m,
6302
+ __vue_is_functional_template__$m,
6303
+ __vue_module_identifier__$m,
6231
6304
  false,
6232
6305
  createInjector,
6233
6306
  undefined,
6234
6307
  undefined
6235
6308
  );
6236
6309
 
6237
- __vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __vue_component__$l);
6310
+ __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
6238
6311
 
6239
6312
  //
6240
6313
  //
@@ -6258,7 +6331,7 @@ __vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __v
6258
6331
  //
6259
6332
  //
6260
6333
 
6261
- var script$k = {
6334
+ var script$l = {
6262
6335
  name: 'ele-batch-export',
6263
6336
  props: {
6264
6337
  value: {
@@ -6302,10 +6375,10 @@ var script$k = {
6302
6375
  };
6303
6376
 
6304
6377
  /* script */
6305
- const __vue_script__$k = script$k;
6378
+ const __vue_script__$l = script$l;
6306
6379
 
6307
6380
  /* template */
6308
- var __vue_render__$k = function () {
6381
+ var __vue_render__$l = function () {
6309
6382
  var _vm = this;
6310
6383
  var _h = _vm.$createElement;
6311
6384
  var _c = _vm._self._c || _h;
@@ -6364,42 +6437,42 @@ var __vue_render__$k = function () {
6364
6437
  ]
6365
6438
  )
6366
6439
  };
6367
- var __vue_staticRenderFns__$k = [];
6368
- __vue_render__$k._withStripped = true;
6440
+ var __vue_staticRenderFns__$l = [];
6441
+ __vue_render__$l._withStripped = true;
6369
6442
 
6370
6443
  /* style */
6371
- const __vue_inject_styles__$k = function (inject) {
6444
+ const __vue_inject_styles__$l = function (inject) {
6372
6445
  if (!inject) return
6373
6446
  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 })
6374
6447
  ,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 });
6375
6448
 
6376
6449
  };
6377
6450
  /* scoped */
6378
- const __vue_scope_id__$k = "data-v-06685ad4";
6451
+ const __vue_scope_id__$l = "data-v-06685ad4";
6379
6452
  /* module identifier */
6380
- const __vue_module_identifier__$k = undefined;
6453
+ const __vue_module_identifier__$l = undefined;
6381
6454
  /* functional template */
6382
- const __vue_is_functional_template__$k = false;
6455
+ const __vue_is_functional_template__$l = false;
6383
6456
  /* style inject SSR */
6384
6457
 
6385
6458
  /* style inject shadow dom */
6386
6459
 
6387
6460
 
6388
6461
 
6389
- const __vue_component__$k = /*#__PURE__*/normalizeComponent(
6390
- { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
6391
- __vue_inject_styles__$k,
6392
- __vue_script__$k,
6393
- __vue_scope_id__$k,
6394
- __vue_is_functional_template__$k,
6395
- __vue_module_identifier__$k,
6462
+ const __vue_component__$l = /*#__PURE__*/normalizeComponent(
6463
+ { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
6464
+ __vue_inject_styles__$l,
6465
+ __vue_script__$l,
6466
+ __vue_scope_id__$l,
6467
+ __vue_is_functional_template__$l,
6468
+ __vue_module_identifier__$l,
6396
6469
  false,
6397
6470
  createInjector,
6398
6471
  undefined,
6399
6472
  undefined
6400
6473
  );
6401
6474
 
6402
- __vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
6475
+ __vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __vue_component__$l);
6403
6476
 
6404
6477
  //
6405
6478
  //
@@ -6413,7 +6486,7 @@ __vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __v
6413
6486
  //
6414
6487
  //
6415
6488
 
6416
- var script$j = {
6489
+ var script$k = {
6417
6490
  name: 'ele-date-range',
6418
6491
  model: {
6419
6492
  prop: 'value',
@@ -6444,10 +6517,10 @@ var script$j = {
6444
6517
  };
6445
6518
 
6446
6519
  /* script */
6447
- const __vue_script__$j = script$j;
6520
+ const __vue_script__$k = script$k;
6448
6521
 
6449
6522
  /* template */
6450
- var __vue_render__$j = function () {
6523
+ var __vue_render__$k = function () {
6451
6524
  var _vm = this;
6452
6525
  var _h = _vm.$createElement;
6453
6526
  var _c = _vm._self._c || _h;
@@ -6462,44 +6535,44 @@ var __vue_render__$j = function () {
6462
6535
  on: { change: _vm.onChange },
6463
6536
  })
6464
6537
  };
6465
- var __vue_staticRenderFns__$j = [];
6466
- __vue_render__$j._withStripped = true;
6538
+ var __vue_staticRenderFns__$k = [];
6539
+ __vue_render__$k._withStripped = true;
6467
6540
 
6468
6541
  /* style */
6469
- const __vue_inject_styles__$j = function (inject) {
6542
+ const __vue_inject_styles__$k = function (inject) {
6470
6543
  if (!inject) return
6471
6544
  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 });
6472
6545
 
6473
6546
  };
6474
6547
  /* scoped */
6475
- const __vue_scope_id__$j = "data-v-eee16c3c";
6548
+ const __vue_scope_id__$k = "data-v-eee16c3c";
6476
6549
  /* module identifier */
6477
- const __vue_module_identifier__$j = undefined;
6550
+ const __vue_module_identifier__$k = undefined;
6478
6551
  /* functional template */
6479
- const __vue_is_functional_template__$j = false;
6552
+ const __vue_is_functional_template__$k = false;
6480
6553
  /* style inject SSR */
6481
6554
 
6482
6555
  /* style inject shadow dom */
6483
6556
 
6484
6557
 
6485
6558
 
6486
- const __vue_component__$j = /*#__PURE__*/normalizeComponent(
6487
- { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
6488
- __vue_inject_styles__$j,
6489
- __vue_script__$j,
6490
- __vue_scope_id__$j,
6491
- __vue_is_functional_template__$j,
6492
- __vue_module_identifier__$j,
6559
+ const __vue_component__$k = /*#__PURE__*/normalizeComponent(
6560
+ { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
6561
+ __vue_inject_styles__$k,
6562
+ __vue_script__$k,
6563
+ __vue_scope_id__$k,
6564
+ __vue_is_functional_template__$k,
6565
+ __vue_module_identifier__$k,
6493
6566
  false,
6494
6567
  createInjector,
6495
6568
  undefined,
6496
6569
  undefined
6497
6570
  );
6498
6571
 
6499
- __vue_component__$j.install = Vue => Vue.component(__vue_component__$j.name, __vue_component__$j);
6572
+ __vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
6500
6573
 
6501
6574
  //
6502
- var script$i = {
6575
+ var script$j = {
6503
6576
  name: 'ele-timeline',
6504
6577
  props: {
6505
6578
  url: {
@@ -6591,10 +6664,10 @@ var script$i = {
6591
6664
  };
6592
6665
 
6593
6666
  /* script */
6594
- const __vue_script__$i = script$i;
6667
+ const __vue_script__$j = script$j;
6595
6668
 
6596
6669
  /* template */
6597
- var __vue_render__$i = function () {
6670
+ var __vue_render__$j = function () {
6598
6671
  var _vm = this;
6599
6672
  var _h = _vm.$createElement;
6600
6673
  var _c = _vm._self._c || _h;
@@ -6672,7 +6745,7 @@ var __vue_render__$i = function () {
6672
6745
  0
6673
6746
  )
6674
6747
  };
6675
- var __vue_staticRenderFns__$i = [
6748
+ var __vue_staticRenderFns__$j = [
6676
6749
  function () {
6677
6750
  var _vm = this;
6678
6751
  var _h = _vm.$createElement;
@@ -6684,41 +6757,41 @@ var __vue_staticRenderFns__$i = [
6684
6757
  ])
6685
6758
  },
6686
6759
  ];
6687
- __vue_render__$i._withStripped = true;
6760
+ __vue_render__$j._withStripped = true;
6688
6761
 
6689
6762
  /* style */
6690
- const __vue_inject_styles__$i = function (inject) {
6763
+ const __vue_inject_styles__$j = function (inject) {
6691
6764
  if (!inject) return
6692
6765
  inject("data-v-bfb18322_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 })
6693
6766
  ,inject("data-v-bfb18322_1", { source: ".ele-timeline__wrapper[data-v-bfb18322] {\n width: 100%;\n height: 100%;\n}\n.ele-timeline__wrapper .ele-timeline__item[data-v-bfb18322] {\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-bfb18322] {\n display: none;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left[data-v-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322]::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-bfb18322]::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-bfb18322]::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-bfb18322]::before {\n background: var(--idoole-error-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper[data-v-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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-bfb18322] {\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":"AAiIA;EACA,WAAA;EACA,YAAA;AChIA;ADiIA;EACA,aAAA;EACA,mBAAA;AC/HA;ADkIA;EACA,aAAA;AChIA;ADoIA;EACA,OAAA;EACA,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;AClIA;ADmIA;EACA,YAAA;EACA,eAAA;EACA,8BAAA;ACjIA;ADoIA;EACA,WAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,6BAAA;AClIA;ADmIA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;EACA,iBAAA;EACA,mBAAA;EACA,yCAAA;ACjIA;ADmIA;EACA,UAAA;EACA,yBAAA;EACA,iBAAA;EACA,mBAAA;EACA,qCAAA;ACjIA;ADoIA;EACA,gBAAA;EACA,OAAA;EACA,kBAAA;EACA,iBAAA;EACA,oBAAA;AClIA;ADmIA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;ACjIA;ADkIA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;AChIA;ADkIA;EACA,eAAA;EACA,8BAAA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;AChIA;ADiIA;EACA,WAAA;EACA,qBAAA;EACA,UAAA;EACA,WAAA;EACA,kBAAA;EACA,iBAAA;AC/HA;ADkIA;EACA,oCAAA;AChIA;ADoIA;EACA,oCAAA;AClIA;ADsIA;EACA,kCAAA;ACpIA;ADyIA;EACA,iBAAA;EACA,eAAA;EACA,iBAAA;ACvIA;ADwIA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;ACtIA;ADyIA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,iBAAA;EACA,eAAA;ACvIA;ADwIA;EACA,cAAA;EACA,eAAA;EACA,8BAAA;ACtIA;ADwIA;EACA,eAAA;EACA,8BAAA;EACA,iBAAA;EACA,gBAAA;ACtIA;;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 params: {\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 });
6694
6767
 
6695
6768
  };
6696
6769
  /* scoped */
6697
- const __vue_scope_id__$i = "data-v-bfb18322";
6770
+ const __vue_scope_id__$j = "data-v-bfb18322";
6698
6771
  /* module identifier */
6699
- const __vue_module_identifier__$i = undefined;
6772
+ const __vue_module_identifier__$j = undefined;
6700
6773
  /* functional template */
6701
- const __vue_is_functional_template__$i = false;
6774
+ const __vue_is_functional_template__$j = false;
6702
6775
  /* style inject SSR */
6703
6776
 
6704
6777
  /* style inject shadow dom */
6705
6778
 
6706
6779
 
6707
6780
 
6708
- const __vue_component__$i = /*#__PURE__*/normalizeComponent(
6709
- { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
6710
- __vue_inject_styles__$i,
6711
- __vue_script__$i,
6712
- __vue_scope_id__$i,
6713
- __vue_is_functional_template__$i,
6714
- __vue_module_identifier__$i,
6781
+ const __vue_component__$j = /*#__PURE__*/normalizeComponent(
6782
+ { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
6783
+ __vue_inject_styles__$j,
6784
+ __vue_script__$j,
6785
+ __vue_scope_id__$j,
6786
+ __vue_is_functional_template__$j,
6787
+ __vue_module_identifier__$j,
6715
6788
  false,
6716
6789
  createInjector,
6717
6790
  undefined,
6718
6791
  undefined
6719
6792
  );
6720
6793
 
6721
- __vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
6794
+ __vue_component__$j.install = Vue => Vue.component(__vue_component__$j.name, __vue_component__$j);
6722
6795
 
6723
6796
  //
6724
6797
  //
@@ -6728,7 +6801,7 @@ __vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __v
6728
6801
  //
6729
6802
  //
6730
6803
 
6731
- var script$h = {
6804
+ var script$i = {
6732
6805
  name: 'ele-text',
6733
6806
  props: {
6734
6807
  type: {
@@ -6748,10 +6821,10 @@ var script$h = {
6748
6821
  };
6749
6822
 
6750
6823
  /* script */
6751
- const __vue_script__$h = script$h;
6824
+ const __vue_script__$i = script$i;
6752
6825
 
6753
6826
  /* template */
6754
- var __vue_render__$h = function () {
6827
+ var __vue_render__$i = function () {
6755
6828
  var _vm = this;
6756
6829
  var _h = _vm.$createElement;
6757
6830
  var _c = _vm._self._c || _h;
@@ -6766,41 +6839,41 @@ var __vue_render__$h = function () {
6766
6839
  1
6767
6840
  )
6768
6841
  };
6769
- var __vue_staticRenderFns__$h = [];
6770
- __vue_render__$h._withStripped = true;
6842
+ var __vue_staticRenderFns__$i = [];
6843
+ __vue_render__$i._withStripped = true;
6771
6844
 
6772
6845
  /* style */
6773
- const __vue_inject_styles__$h = function (inject) {
6846
+ const __vue_inject_styles__$i = function (inject) {
6774
6847
  if (!inject) return
6775
6848
  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 });
6776
6849
 
6777
6850
  };
6778
6851
  /* scoped */
6779
- const __vue_scope_id__$h = "data-v-636e07f7";
6852
+ const __vue_scope_id__$i = "data-v-636e07f7";
6780
6853
  /* module identifier */
6781
- const __vue_module_identifier__$h = undefined;
6854
+ const __vue_module_identifier__$i = undefined;
6782
6855
  /* functional template */
6783
- const __vue_is_functional_template__$h = false;
6856
+ const __vue_is_functional_template__$i = false;
6784
6857
  /* style inject SSR */
6785
6858
 
6786
6859
  /* style inject shadow dom */
6787
6860
 
6788
6861
 
6789
6862
 
6790
- const __vue_component__$h = /*#__PURE__*/normalizeComponent(
6791
- { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
6792
- __vue_inject_styles__$h,
6793
- __vue_script__$h,
6794
- __vue_scope_id__$h,
6795
- __vue_is_functional_template__$h,
6796
- __vue_module_identifier__$h,
6863
+ const __vue_component__$i = /*#__PURE__*/normalizeComponent(
6864
+ { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
6865
+ __vue_inject_styles__$i,
6866
+ __vue_script__$i,
6867
+ __vue_scope_id__$i,
6868
+ __vue_is_functional_template__$i,
6869
+ __vue_module_identifier__$i,
6797
6870
  false,
6798
6871
  createInjector,
6799
6872
  undefined,
6800
6873
  undefined
6801
6874
  );
6802
6875
 
6803
- __vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __vue_component__$h);
6876
+ __vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
6804
6877
 
6805
6878
  //
6806
6879
  //
@@ -6817,7 +6890,7 @@ __vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __v
6817
6890
  //
6818
6891
  //
6819
6892
 
6820
- var script$g = {
6893
+ var script$h = {
6821
6894
  name: 'ele-tabs',
6822
6895
  components: {},
6823
6896
  model: {
@@ -6853,10 +6926,10 @@ var script$g = {
6853
6926
  };
6854
6927
 
6855
6928
  /* script */
6856
- const __vue_script__$g = script$g;
6929
+ const __vue_script__$h = script$h;
6857
6930
 
6858
6931
  /* template */
6859
- var __vue_render__$g = function () {
6932
+ var __vue_render__$h = function () {
6860
6933
  var _vm = this;
6861
6934
  var _h = _vm.$createElement;
6862
6935
  var _c = _vm._self._c || _h;
@@ -6907,41 +6980,41 @@ var __vue_render__$g = function () {
6907
6980
  1
6908
6981
  )
6909
6982
  };
6910
- var __vue_staticRenderFns__$g = [];
6911
- __vue_render__$g._withStripped = true;
6983
+ var __vue_staticRenderFns__$h = [];
6984
+ __vue_render__$h._withStripped = true;
6912
6985
 
6913
6986
  /* style */
6914
- const __vue_inject_styles__$g = function (inject) {
6987
+ const __vue_inject_styles__$h = function (inject) {
6915
6988
  if (!inject) return
6916
6989
  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 });
6917
6990
 
6918
6991
  };
6919
6992
  /* scoped */
6920
- const __vue_scope_id__$g = "data-v-508efd50";
6993
+ const __vue_scope_id__$h = "data-v-508efd50";
6921
6994
  /* module identifier */
6922
- const __vue_module_identifier__$g = undefined;
6995
+ const __vue_module_identifier__$h = undefined;
6923
6996
  /* functional template */
6924
- const __vue_is_functional_template__$g = false;
6997
+ const __vue_is_functional_template__$h = false;
6925
6998
  /* style inject SSR */
6926
6999
 
6927
7000
  /* style inject shadow dom */
6928
7001
 
6929
7002
 
6930
7003
 
6931
- const __vue_component__$g = /*#__PURE__*/normalizeComponent(
6932
- { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
6933
- __vue_inject_styles__$g,
6934
- __vue_script__$g,
6935
- __vue_scope_id__$g,
6936
- __vue_is_functional_template__$g,
6937
- __vue_module_identifier__$g,
7004
+ const __vue_component__$h = /*#__PURE__*/normalizeComponent(
7005
+ { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
7006
+ __vue_inject_styles__$h,
7007
+ __vue_script__$h,
7008
+ __vue_scope_id__$h,
7009
+ __vue_is_functional_template__$h,
7010
+ __vue_module_identifier__$h,
6938
7011
  false,
6939
7012
  createInjector,
6940
7013
  undefined,
6941
7014
  undefined
6942
7015
  );
6943
7016
 
6944
- __vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __vue_component__$g);
7017
+ __vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __vue_component__$h);
6945
7018
 
6946
7019
  /*!
6947
7020
  * Cropper.js v1.4.1
@@ -10653,7 +10726,7 @@ var Cropper = function () {
10653
10726
  assign(Cropper.prototype, render, preview, events, handlers, change, methods);
10654
10727
 
10655
10728
  //
10656
- var script$f = {
10729
+ var script$g = {
10657
10730
  name: 'ele-modal-img-crop',
10658
10731
  model: {
10659
10732
  event: 'input',
@@ -10798,10 +10871,10 @@ var script$f = {
10798
10871
  };
10799
10872
 
10800
10873
  /* script */
10801
- const __vue_script__$f = script$f;
10874
+ const __vue_script__$g = script$g;
10802
10875
 
10803
10876
  /* template */
10804
- var __vue_render__$f = function () {
10877
+ var __vue_render__$g = function () {
10805
10878
  var _vm = this;
10806
10879
  var _h = _vm.$createElement;
10807
10880
  var _c = _vm._self._c || _h;
@@ -10919,44 +10992,44 @@ var __vue_render__$f = function () {
10919
10992
  1
10920
10993
  )
10921
10994
  };
10922
- var __vue_staticRenderFns__$f = [];
10923
- __vue_render__$f._withStripped = true;
10995
+ var __vue_staticRenderFns__$g = [];
10996
+ __vue_render__$g._withStripped = true;
10924
10997
 
10925
10998
  /* style */
10926
- const __vue_inject_styles__$f = function (inject) {
10999
+ const __vue_inject_styles__$g = function (inject) {
10927
11000
  if (!inject) return
10928
11001
  inject("data-v-307ca7c2_0", { source: "[data-v-307ca7c2] .ant-modal-body {\n padding: 16px;\n}\n[data-v-307ca7c2] .ant-modal-header {\n padding: 16px;\n}\n.ele-imgCrop__wrapper[data-v-307ca7c2] {\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-307ca7c2] {\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-307ca7c2] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-307ca7c2] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-307ca7c2] .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-307ca7c2] .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-307ca7c2] .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-307ca7c2] {\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-307ca7c2] {\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-307ca7c2] {\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-307ca7c2] {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span[data-v-307ca7c2] {\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-307ca7c2] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item[data-v-307ca7c2] {\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-307ca7c2] {\n float: left;\n width: 80%;\n}\n.ele-imgCrop__error[data-v-307ca7c2] {\n color: var(--idooel-form-border-err-color) !important;\n}\n.ele-imgCrop__error2[data-v-307ca7c2] {\n color: var(--idooel-img-crop-err-color) !important;\n}\n.ele-imgCrop__icon[data-v-307ca7c2] {\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":"AA2LA;EACA,aAAA;AC1LA;AD4LA;EACA,aAAA;ACzLA;AD2LA;EACA,aAAA;EACA,SAAA;EACA,uBAAA;EACA,mBAAA;ACxLA;AD0LA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;ACxLA;ADyLA;EACA,WAAA;EACA,YAAA;ACvLA;ADyLA;EACA,WAAA;EACA,YAAA;ACvLA;ADwLA;EACA,YAAA;EACA,aAAA;EACA,kCAAA;ACtLA;ADuLA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;ACrLA;ADsLA;EACA,gBAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;ACpLA;ADyLA;EACA,8BAAA;EACA,eAAA;EACA,4BAAA;ACvLA;ADyLA;EACA,6BAAA;EACA,eAAA;EACA,iBAAA;ACvLA;AD0LA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,eAAA;ACxLA;AD2LA;EACA,kBAAA;ACzLA;AD0LA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;ACxLA;AD0LA;EACA,WAAA;EACA,YAAA;ACxLA;AD2LA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,wDAAA;EACA,8CAAA;ACzLA;AD4LA;EACA,WAAA;EACA,UAAA;ACzLA;AD2LA;EACA,qDAAA;ACxLA;AD0LA;EACA,kDAAA;ACvLA;ADyLA;EACA,eAAA;EACA,4BAAA;ACtLA;;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 @cancel=\"handleCancel\"\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 handleCancel () {\n this.$emit('input', false)\n this.$emit('change', this.fileId)\n },\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 });
10929
11002
 
10930
11003
  };
10931
11004
  /* scoped */
10932
- const __vue_scope_id__$f = "data-v-307ca7c2";
11005
+ const __vue_scope_id__$g = "data-v-307ca7c2";
10933
11006
  /* module identifier */
10934
- const __vue_module_identifier__$f = undefined;
11007
+ const __vue_module_identifier__$g = undefined;
10935
11008
  /* functional template */
10936
- const __vue_is_functional_template__$f = false;
11009
+ const __vue_is_functional_template__$g = false;
10937
11010
  /* style inject SSR */
10938
11011
 
10939
11012
  /* style inject shadow dom */
10940
11013
 
10941
11014
 
10942
11015
 
10943
- const __vue_component__$f = /*#__PURE__*/normalizeComponent(
10944
- { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
10945
- __vue_inject_styles__$f,
10946
- __vue_script__$f,
10947
- __vue_scope_id__$f,
10948
- __vue_is_functional_template__$f,
10949
- __vue_module_identifier__$f,
11016
+ const __vue_component__$g = /*#__PURE__*/normalizeComponent(
11017
+ { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
11018
+ __vue_inject_styles__$g,
11019
+ __vue_script__$g,
11020
+ __vue_scope_id__$g,
11021
+ __vue_is_functional_template__$g,
11022
+ __vue_module_identifier__$g,
10950
11023
  false,
10951
11024
  createInjector,
10952
11025
  undefined,
10953
11026
  undefined
10954
11027
  );
10955
11028
 
10956
- __vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
11029
+ __vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __vue_component__$g);
10957
11030
 
10958
11031
  //
10959
- var script$e = {
11032
+ var script$f = {
10960
11033
  name: 'ele-text-editor',
10961
11034
  props: {
10962
11035
  editorWidth: {
@@ -11002,10 +11075,10 @@ var script$e = {
11002
11075
  };
11003
11076
 
11004
11077
  /* script */
11005
- const __vue_script__$e = script$e;
11078
+ const __vue_script__$f = script$f;
11006
11079
 
11007
11080
  /* template */
11008
- var __vue_render__$e = function () {
11081
+ var __vue_render__$f = function () {
11009
11082
  var _vm = this;
11010
11083
  var _h = _vm.$createElement;
11011
11084
  var _c = _vm._self._c || _h;
@@ -11028,41 +11101,41 @@ var __vue_render__$e = function () {
11028
11101
  1
11029
11102
  )
11030
11103
  };
11031
- var __vue_staticRenderFns__$e = [];
11032
- __vue_render__$e._withStripped = true;
11104
+ var __vue_staticRenderFns__$f = [];
11105
+ __vue_render__$f._withStripped = true;
11033
11106
 
11034
11107
  /* style */
11035
- const __vue_inject_styles__$e = function (inject) {
11108
+ const __vue_inject_styles__$f = function (inject) {
11036
11109
  if (!inject) return
11037
11110
  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 });
11038
11111
 
11039
11112
  };
11040
11113
  /* scoped */
11041
- const __vue_scope_id__$e = "data-v-baee03c0";
11114
+ const __vue_scope_id__$f = "data-v-baee03c0";
11042
11115
  /* module identifier */
11043
- const __vue_module_identifier__$e = undefined;
11116
+ const __vue_module_identifier__$f = undefined;
11044
11117
  /* functional template */
11045
- const __vue_is_functional_template__$e = false;
11118
+ const __vue_is_functional_template__$f = false;
11046
11119
  /* style inject SSR */
11047
11120
 
11048
11121
  /* style inject shadow dom */
11049
11122
 
11050
11123
 
11051
11124
 
11052
- const __vue_component__$e = /*#__PURE__*/normalizeComponent(
11053
- { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
11054
- __vue_inject_styles__$e,
11055
- __vue_script__$e,
11056
- __vue_scope_id__$e,
11057
- __vue_is_functional_template__$e,
11058
- __vue_module_identifier__$e,
11125
+ const __vue_component__$f = /*#__PURE__*/normalizeComponent(
11126
+ { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
11127
+ __vue_inject_styles__$f,
11128
+ __vue_script__$f,
11129
+ __vue_scope_id__$f,
11130
+ __vue_is_functional_template__$f,
11131
+ __vue_module_identifier__$f,
11059
11132
  false,
11060
11133
  createInjector,
11061
11134
  undefined,
11062
11135
  undefined
11063
11136
  );
11064
11137
 
11065
- __vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
11138
+ __vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
11066
11139
 
11067
11140
  //
11068
11141
  //
@@ -11077,7 +11150,7 @@ __vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __v
11077
11150
  //
11078
11151
  //
11079
11152
 
11080
- var script$d = {
11153
+ var script$e = {
11081
11154
  name: 'ele-textarea',
11082
11155
  model: {
11083
11156
  prop: 'value',
@@ -11119,10 +11192,10 @@ var script$d = {
11119
11192
  };
11120
11193
 
11121
11194
  /* script */
11122
- const __vue_script__$d = script$d;
11195
+ const __vue_script__$e = script$e;
11123
11196
 
11124
11197
  /* template */
11125
- var __vue_render__$d = function () {
11198
+ var __vue_render__$e = function () {
11126
11199
  var _vm = this;
11127
11200
  var _h = _vm.$createElement;
11128
11201
  var _c = _vm._self._c || _h;
@@ -11138,17 +11211,80 @@ var __vue_render__$d = function () {
11138
11211
  on: { change: _vm.onChange },
11139
11212
  })
11140
11213
  };
11214
+ var __vue_staticRenderFns__$e = [];
11215
+ __vue_render__$e._withStripped = true;
11216
+
11217
+ /* style */
11218
+ const __vue_inject_styles__$e = function (inject) {
11219
+ if (!inject) return
11220
+ 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 });
11221
+
11222
+ };
11223
+ /* scoped */
11224
+ const __vue_scope_id__$e = "data-v-27d78bca";
11225
+ /* module identifier */
11226
+ const __vue_module_identifier__$e = undefined;
11227
+ /* functional template */
11228
+ const __vue_is_functional_template__$e = false;
11229
+ /* style inject SSR */
11230
+
11231
+ /* style inject shadow dom */
11232
+
11233
+
11234
+
11235
+ const __vue_component__$e = /*#__PURE__*/normalizeComponent(
11236
+ { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
11237
+ __vue_inject_styles__$e,
11238
+ __vue_script__$e,
11239
+ __vue_scope_id__$e,
11240
+ __vue_is_functional_template__$e,
11241
+ __vue_module_identifier__$e,
11242
+ false,
11243
+ createInjector,
11244
+ undefined,
11245
+ undefined
11246
+ );
11247
+
11248
+ __vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
11249
+
11250
+ //
11251
+ //
11252
+ //
11253
+ //
11254
+ //
11255
+ //
11256
+
11257
+ var script$d = {
11258
+ name: 'ele-loading',
11259
+ props: {
11260
+ loading: {
11261
+ type: Boolean,
11262
+ default: true
11263
+ }
11264
+ }
11265
+ };
11266
+
11267
+ /* script */
11268
+ const __vue_script__$d = script$d;
11269
+
11270
+ /* template */
11271
+ var __vue_render__$d = function () {
11272
+ var _vm = this;
11273
+ var _h = _vm.$createElement;
11274
+ var _c = _vm._self._c || _h;
11275
+ return _vm.loading ? _c("div", { staticClass: "g-loading" }) : _vm._e()
11276
+ };
11141
11277
  var __vue_staticRenderFns__$d = [];
11142
11278
  __vue_render__$d._withStripped = true;
11143
11279
 
11144
11280
  /* style */
11145
11281
  const __vue_inject_styles__$d = function (inject) {
11146
11282
  if (!inject) return
11147
- 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 });
11283
+ inject("data-v-190ede62_0", { source: ".g-loading[data-v-190ede62] {\n width: 16px;\n height: 16px;\n border: 1px solid #409EFF;\n border-top-color: transparent;\n border-left-color: transparent;\n border-radius: 100%;\n animation: rotate-data-v-190ede62 infinite 0.75s linear;\n}\n@keyframes rotate-data-v-190ede62 {\n0% {\n transform: rotate(0);\n}\n100% {\n transform: rotate(360deg);\n}\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/loading/src/index.vue","index.vue"],"names":[],"mappings":"AAmBA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,6BAAA;EACA,8BAAA;EACA,mBAAA;EACA,uDAAA;AClBA;ADoBA;AACA;IACA,oBAAA;ACjBE;ADmBF;IACA,yBAAA;ACjBE;AACF;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div v-if=\"loading\" class=\"g-loading\">\n\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-loading',\n props: {\n loading: {\n type: Boolean,\n default: true\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-loading {\n width: 16px;\n height: 16px;\n border: 1px solid #409EFF;\n border-top-color: transparent;\n border-left-color: transparent;\n border-radius: 100%;\n animation: rotate infinite 0.75s linear;\n}\n@keyframes rotate {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n</style>",".g-loading {\n width: 16px;\n height: 16px;\n border: 1px solid #409EFF;\n border-top-color: transparent;\n border-left-color: transparent;\n border-radius: 100%;\n animation: rotate infinite 0.75s linear;\n}\n\n@keyframes rotate {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
11148
11284
 
11149
11285
  };
11150
11286
  /* scoped */
11151
- const __vue_scope_id__$d = "data-v-27d78bca";
11287
+ const __vue_scope_id__$d = "data-v-190ede62";
11152
11288
  /* module identifier */
11153
11289
  const __vue_module_identifier__$d = undefined;
11154
11290
  /* functional template */
@@ -11175,19 +11311,134 @@ __vue_render__$d._withStripped = true;
11175
11311
  __vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __vue_component__$d);
11176
11312
 
11177
11313
  //
11178
- //
11179
- //
11180
- //
11181
- //
11182
- //
11183
-
11184
11314
  var script$c = {
11185
- name: 'ele-loading',
11315
+ name: 'ele-tree-select',
11316
+ model: {
11317
+ prop: 'value',
11318
+ event: 'change'
11319
+ },
11320
+ inject: {
11321
+ [CONTEXT]: {
11322
+ default: () => () => {}
11323
+ }
11324
+ },
11186
11325
  props: {
11187
- loading: {
11326
+ value: {
11327
+ type: [String, Array]
11328
+ },
11329
+ url: {
11330
+ type: String,
11331
+ default: ''
11332
+ },
11333
+ requestType: {
11334
+ type: String,
11335
+ default: 'GET'
11336
+ },
11337
+ params: {
11338
+ type: Object,
11339
+ default: () => {
11340
+ return {};
11341
+ }
11342
+ },
11343
+ fieldMap: {
11344
+ type: Object,
11345
+ default: () => {
11346
+ return {};
11347
+ }
11348
+ },
11349
+ replaceFields: {
11350
+ type: Object,
11351
+ default: () => {
11352
+ return {
11353
+ children: 'children',
11354
+ title: 'title',
11355
+ key: 'key',
11356
+ value: 'value'
11357
+ };
11358
+ }
11359
+ },
11360
+ treeData: {
11361
+ type: Array,
11362
+ default: () => {
11363
+ return [];
11364
+ }
11365
+ },
11366
+ multiple: {
11188
11367
  type: Boolean,
11189
- default: true
11368
+ default: false
11369
+ },
11370
+ picks: {
11371
+ type: Array,
11372
+ default: () => {
11373
+ return [];
11374
+ }
11375
+ },
11376
+ defaultValue: {
11377
+ type: Array,
11378
+ default: () => []
11379
+ }
11380
+ },
11381
+ data() {
11382
+ return {
11383
+ innerDataSource: []
11384
+ };
11385
+ },
11386
+ computed: {
11387
+ contextData() {
11388
+ return this[CONTEXT].call(this);
11389
+ },
11390
+ dataSource() {
11391
+ return this.url ? this.innerDataSource : this.treeData;
11392
+ }
11393
+ },
11394
+ methods: {
11395
+ onChange(value, label, extra) {
11396
+ this.$emit('change', value);
11397
+ },
11398
+ assignKeyFormTreeData(dataSource = []) {
11399
+ return dataSource.map(nodeData => {
11400
+ const {
11401
+ children
11402
+ } = nodeData;
11403
+ children && this.assignKeyFormTreeData(children);
11404
+ if (!nodeData.key) {
11405
+ nodeData.key = nodeData.id;
11406
+ nodeData.value = nodeData.id;
11407
+ }
11408
+ return nodeData;
11409
+ });
11410
+ },
11411
+ requestData() {
11412
+ const {
11413
+ exposed = {}
11414
+ } = this.contextData;
11415
+ const {
11416
+ getFieldsValue,
11417
+ route
11418
+ } = exposed;
11419
+ const formModel = getFieldsValue && getFieldsValue();
11420
+ const ctx = {
11421
+ ...formModel,
11422
+ route
11423
+ };
11424
+ net[this.requestType.toLowerCase()](this.url, {
11425
+ ...this.params,
11426
+ ...parseFieldMap(this.fieldMap, ctx)
11427
+ }).then(resp => {
11428
+ const {
11429
+ data,
11430
+ code
11431
+ } = resp;
11432
+ if (code == 2000) {
11433
+ this.innerDataSource = this.assignKeyFormTreeData(data);
11434
+ }
11435
+ });
11190
11436
  }
11437
+ },
11438
+ mounted() {
11439
+ this.$nextTick(() => {
11440
+ this.url && this.requestData();
11441
+ });
11191
11442
  }
11192
11443
  };
11193
11444
 
@@ -11199,7 +11450,23 @@ var __vue_render__$c = function () {
11199
11450
  var _vm = this;
11200
11451
  var _h = _vm.$createElement;
11201
11452
  var _c = _vm._self._c || _h;
11202
- return _vm.loading ? _c("div", { staticClass: "g-loading" }) : _vm._e()
11453
+ return _c(
11454
+ "div",
11455
+ { staticClass: "ele__tree-select" },
11456
+ [
11457
+ _c("a-tree-select", {
11458
+ attrs: {
11459
+ value: _vm.value,
11460
+ multiple: _vm.multiple,
11461
+ defaultValue: _vm.defaultValue,
11462
+ replaceFields: _vm.replaceFields,
11463
+ "tree-data": _vm.dataSource,
11464
+ },
11465
+ on: { change: _vm.onChange },
11466
+ }),
11467
+ ],
11468
+ 1
11469
+ )
11203
11470
  };
11204
11471
  var __vue_staticRenderFns__$c = [];
11205
11472
  __vue_render__$c._withStripped = true;
@@ -11207,11 +11474,11 @@ __vue_render__$c._withStripped = true;
11207
11474
  /* style */
11208
11475
  const __vue_inject_styles__$c = function (inject) {
11209
11476
  if (!inject) return
11210
- inject("data-v-190ede62_0", { source: ".g-loading[data-v-190ede62] {\n width: 16px;\n height: 16px;\n border: 1px solid #409EFF;\n border-top-color: transparent;\n border-left-color: transparent;\n border-radius: 100%;\n animation: rotate-data-v-190ede62 infinite 0.75s linear;\n}\n@keyframes rotate-data-v-190ede62 {\n0% {\n transform: rotate(0);\n}\n100% {\n transform: rotate(360deg);\n}\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/loading/src/index.vue","index.vue"],"names":[],"mappings":"AAmBA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,6BAAA;EACA,8BAAA;EACA,mBAAA;EACA,uDAAA;AClBA;ADoBA;AACA;IACA,oBAAA;ACjBE;ADmBF;IACA,yBAAA;ACjBE;AACF;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div v-if=\"loading\" class=\"g-loading\">\n\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-loading',\n props: {\n loading: {\n type: Boolean,\n default: true\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-loading {\n width: 16px;\n height: 16px;\n border: 1px solid #409EFF;\n border-top-color: transparent;\n border-left-color: transparent;\n border-radius: 100%;\n animation: rotate infinite 0.75s linear;\n}\n@keyframes rotate {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n</style>",".g-loading {\n width: 16px;\n height: 16px;\n border: 1px solid #409EFF;\n border-top-color: transparent;\n border-left-color: transparent;\n border-radius: 100%;\n animation: rotate infinite 0.75s linear;\n}\n\n@keyframes rotate {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
11477
+ inject("data-v-09096c22_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
11211
11478
 
11212
11479
  };
11213
11480
  /* scoped */
11214
- const __vue_scope_id__$c = "data-v-190ede62";
11481
+ const __vue_scope_id__$c = "data-v-09096c22";
11215
11482
  /* module identifier */
11216
11483
  const __vue_module_identifier__$c = undefined;
11217
11484
  /* functional template */
@@ -13639,18 +13906,18 @@ __vue_render__._withStripped = true;
13639
13906
 
13640
13907
  __vue_component__.install = Vue => Vue.component(__vue_component__.name, __vue_component__);
13641
13908
 
13642
- __vue_component__$y.install = Vue => Vue.component(__vue_component__$y.name, __vue_component__$y);
13643
-
13644
- __vue_component__$w.install = Vue => Vue.component(__vue_component__$w.name, __vue_component__$w);
13909
+ __vue_component__$z.install = Vue => Vue.component(__vue_component__$z.name, __vue_component__$z);
13645
13910
 
13646
13911
  __vue_component__$x.install = Vue => Vue.component(__vue_component__$x.name, __vue_component__$x);
13647
13912
 
13648
- __vue_component__$v.install = Vue => Vue.component(__vue_component__$v.name, __vue_component__$v);
13913
+ __vue_component__$y.install = Vue => Vue.component(__vue_component__$y.name, __vue_component__$y);
13914
+
13915
+ __vue_component__$w.install = Vue => Vue.component(__vue_component__$w.name, __vue_component__$w);
13649
13916
 
13650
- const compositeComponents = [__vue_component__$9, __vue_component__$a, __vue_component__$8, __vue_component__$7, __vue_component__$f, __vue_component__$6, __vue_component__$5, __vue_component__$4];
13917
+ const compositeComponents = [__vue_component__$9, __vue_component__$a, __vue_component__$8, __vue_component__$7, __vue_component__$g, __vue_component__$6, __vue_component__$5, __vue_component__$4];
13651
13918
  const businessComponents = [__vue_component__$3, __vue_component__$2, __vue_component__$1, __vue_component__];
13652
- const models = [__vue_component__$y, __vue_component__$w, __vue_component__$x, __vue_component__$v];
13653
- const components = [__vue_component__$F, __vue_component__$E, __vue_component__$D, __vue_component__$C, __vue_component__$A, __vue_component__$z, __vue_component__$u, __vue_component__$t, __vue_component__$s, __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__$e, __vue_component__$d, __vue_component__$c, ...compositeComponents, ...businessComponents, ...models];
13919
+ const models = [__vue_component__$z, __vue_component__$x, __vue_component__$y, __vue_component__$w];
13920
+ const components = [__vue_component__$G, __vue_component__$F, __vue_component__$E, __vue_component__$D, __vue_component__$B, __vue_component__$A, __vue_component__$v, __vue_component__$u, __vue_component__$t, __vue_component__$s, __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__$f, __vue_component__$e, __vue_component__$d, __vue_component__$c, ...compositeComponents, ...businessComponents, ...models];
13654
13921
  const install = Vue => {
13655
13922
  if (install.installed) return;
13656
13923
  install.installed = true;
@@ -13659,4 +13926,4 @@ const install = Vue => {
13659
13926
  });
13660
13927
  };
13661
13928
 
13662
- export { __vue_component__$s as EleAlert, __vue_component__$k as EleBatchExport, __vue_component__$F as EleButton, __vue_component__$9 as EleButtonGroup, __vue_component__$m as EleCheckbox, __vue_component__$E as EleDate, __vue_component__$j as EleDateRange, __vue_component__$t as EleForm, __vue_component__$x as EleFormGroupModel, __vue_component__$4 as EleFormImgCrop, __vue_component__$w as EleFormPageModel, __vue_component__$p as EleIcon, __vue_component__$D as EleInput, __vue_component__$o as EleInputNumber, __vue_component__$c as EleLoading, __vue_component__$n as EleModal, __vue_component__$6 as EleModalConfirm, __vue_component__$8 as EleModalForm, __vue_component__$1 as EleModalFsm, __vue_component__$f as EleModalImgCrop, __vue_component__$3 as EleModalImport, __vue_component__$5 as EleModalTable, __vue_component__$2 as EleModalTimeline, __vue_component__$7 as EleModalTree, __vue_component__$l as EleRadio, __vue_component__$a as EleSearchArea, __vue_component__$C as EleSelect, __vue_component__$q as EleSelectEntity, __vue_component__$v as EleStepModel, __vue_component__$A as EleTable, __vue_component__$g as EleTabs, __vue_component__ as EleTabsSubCenter, __vue_component__$h as EleText, __vue_component__$e as EleTextEditor, __vue_component__$d as EleTextarea, __vue_component__$i as EleTimeline, __vue_component__$u as EleTpl, __vue_component__$z as EleTree, __vue_component__$y as EleTreeTableModel, __vue_component__$r as EleUpload, install as default, models };
13929
+ export { __vue_component__$t as EleAlert, __vue_component__$l as EleBatchExport, __vue_component__$G as EleButton, __vue_component__$9 as EleButtonGroup, __vue_component__$n as EleCheckbox, __vue_component__$F as EleDate, __vue_component__$k as EleDateRange, __vue_component__$u as EleForm, __vue_component__$y as EleFormGroupModel, __vue_component__$4 as EleFormImgCrop, __vue_component__$x as EleFormPageModel, __vue_component__$q as EleIcon, __vue_component__$E as EleInput, __vue_component__$p as EleInputNumber, __vue_component__$d as EleLoading, __vue_component__$o as EleModal, __vue_component__$6 as EleModalConfirm, __vue_component__$8 as EleModalForm, __vue_component__$1 as EleModalFsm, __vue_component__$g as EleModalImgCrop, __vue_component__$3 as EleModalImport, __vue_component__$5 as EleModalTable, __vue_component__$2 as EleModalTimeline, __vue_component__$7 as EleModalTree, __vue_component__$m as EleRadio, __vue_component__$a as EleSearchArea, __vue_component__$D as EleSelect, __vue_component__$r as EleSelectEntity, __vue_component__$w as EleStepModel, __vue_component__$B as EleTable, __vue_component__$h as EleTabs, __vue_component__ as EleTabsSubCenter, __vue_component__$i as EleText, __vue_component__$f as EleTextEditor, __vue_component__$e as EleTextarea, __vue_component__$j as EleTimeline, __vue_component__$v as EleTpl, __vue_component__$A as EleTree, __vue_component__$c as EleTreeSelect, __vue_component__$z as EleTreeTableModel, __vue_component__$s as EleUpload, install as default, models };