super-page-runtime 2.3.20-sit2 → 2.3.21-tmp1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/api/page-expose-util.js +124 -133
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +26 -25
- package/dist/es/components/runtime/utils/events/standard-event.js +568 -584
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/page-init-util.js +11 -9
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +98 -93
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +8 -8
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +34 -34
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +35 -34
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +17 -15
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +13 -22
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +76 -75
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +76 -76
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +6 -0
- package/dist/lib/assets/chart-themes/bar-theme.js +2 -0
- package/dist/lib/assets/chart-themes/gauge-theme.js +2 -0
- package/dist/lib/assets/chart-themes/pie-theme.js +2 -0
- package/dist/lib/assets/chart-themes/radar-theme.js +2 -0
- package/dist/lib/assets/chart-themes/scatter-theme.js +2 -0
- package/dist/lib/assets/file.png.js +2 -0
- package/dist/lib/assets/folder.png.js +2 -0
- package/dist/lib/components/runtime/utils/ai-chat-util.js +13 -0
- package/dist/lib/components/runtime/utils/anchor-util.js +62 -0
- package/dist/lib/components/runtime/utils/api/api-util.js +3 -0
- package/dist/lib/components/runtime/utils/api/page-expose-util.js +169 -0
- package/dist/lib/components/runtime/utils/assemblys-config.js +16 -0
- package/dist/lib/components/runtime/utils/barcode-util.js +10 -0
- package/dist/lib/components/runtime/utils/charts/chart-columnline-util.js +137 -0
- package/dist/lib/components/runtime/utils/charts/chart-gauge-util.js +34 -0
- package/dist/lib/components/runtime/utils/charts/chart-pie-util.js +78 -0
- package/dist/lib/components/runtime/utils/charts/chart-radar-util.js +52 -0
- package/dist/lib/components/runtime/utils/charts/chart-scatter-util.js +43 -0
- package/dist/lib/components/runtime/utils/charts/chart-util.js +244 -0
- package/dist/lib/components/runtime/utils/common-util.js +91 -0
- package/dist/lib/components/runtime/utils/eventBus.js +3 -0
- package/dist/lib/components/runtime/utils/events/event-util.js +345 -0
- package/dist/lib/components/runtime/utils/events/print-label.js +97 -0
- package/dist/lib/components/runtime/utils/events/standard-event.js +1101 -0
- package/dist/lib/components/runtime/utils/events/validator-util.js +296 -0
- package/dist/lib/components/runtime/utils/form/date-shortcuts.js +34 -0
- package/dist/lib/components/runtime/utils/form/scan-util.js +90 -0
- package/dist/lib/components/runtime/utils/global-refs.js +42 -0
- package/dist/lib/components/runtime/utils/i18n-util.js +11 -0
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +4 -0
- package/dist/lib/components/runtime/utils/page-helper-util.js +354 -0
- package/dist/lib/components/runtime/utils/page-init-util.js +244 -0
- package/dist/lib/components/runtime/utils/page-permission-util.js +26 -0
- package/dist/lib/components/runtime/utils/page-store.js +50 -0
- package/dist/lib/components/runtime/utils/store-util.js +11 -0
- package/dist/lib/components/runtime/utils/store.js +3 -0
- package/dist/lib/components/runtime/utils/table-utils.js +68 -0
- package/dist/lib/components/runtime/utils/tree-utils.js +54 -0
- package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +24 -0
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +17 -0
- package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +35 -0
- package/dist/lib/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -0
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +41 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +11 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +11 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +53 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +48 -0
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +24 -0
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +34 -0
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +24 -0
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +24 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/chart-table-util.js +402 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/group-column.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/group-column.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/normal-column.vue.js +36 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +249 -0
- package/dist/lib/components/runtime/views/assemblys/common/event-call-component.vue.js +16 -0
- package/dist/lib/components/runtime/views/assemblys/common/event-call-component.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +32 -0
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/file-task-notice.vue.js +32 -0
- package/dist/lib/components/runtime/views/assemblys/common/file-task-notice.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/format-file-task-notice-message.vue.js +19 -0
- package/dist/lib/components/runtime/views/assemblys/common/format-file-task-notice-message.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +12 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-table.vue.js +21 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-table.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-transactor-dialog.vue.js +13 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-transactor-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +30 -0
- package/dist/lib/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +15 -0
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +21 -0
- package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -0
- package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +15 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/FixedBox.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/FixedBox.vue2.js +27 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +79 -0
- package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +20 -0
- package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +15 -0
- package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +12 -0
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +88 -0
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +43 -0
- package/dist/lib/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +59 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +382 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +322 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +81 -0
- package/dist/lib/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +124 -0
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +57 -0
- package/dist/lib/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +35 -0
- package/dist/lib/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +57 -0
- package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +91 -0
- package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +47 -0
- package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +20 -0
- package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +65 -0
- package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +20 -0
- package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +70 -0
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +31 -0
- package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +26 -0
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -0
- package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +75 -0
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +188 -0
- package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +130 -0
- package/dist/lib/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +11 -0
- package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +29 -0
- package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +38 -0
- package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +20 -0
- package/dist/lib/components/runtime/views/assemblys/home-chart-render.vue.js +73 -0
- package/dist/lib/components/runtime/views/assemblys/home-chart-render.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +132 -0
- package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/page-bottom.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/page-bottom.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +23 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +23 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +34 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +17 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +20 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +5 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +19 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +14 -0
- package/dist/lib/components/runtime/views/home-chart.vue.js +38 -0
- package/dist/lib/components/runtime/views/home-chart.vue2.js +3 -0
- package/dist/lib/components/runtime/views/super-page-dialog.vue.js +23 -0
- package/dist/lib/components/runtime/views/super-page-dialog.vue3.js +3 -0
- package/dist/lib/components/runtime/views/super-page.vue.js +5 -0
- package/dist/lib/components/runtime/views/super-page.vue2.js +264 -0
- package/dist/lib/favicon.ico +0 -0
- package/dist/lib/i18n/langs/cn.js +2 -0
- package/dist/lib/i18n/langs/en.js +2 -0
- package/dist/lib/index.js +6 -0
- package/dist/lib/style.css +996 -0
- package/dist/umd/favicon.ico +0 -0
- package/dist/umd/index.full.min.js +7429 -0
- package/dist/umd/style.css +996 -0
- package/package.json +2 -2
- package/dist/es/components/runtime/utils/events/data-backfill-util.d.ts +0 -27
- package/dist/es/components/runtime/utils/events/data-backfill-util.js +0 -39
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const e = require("vue"), t = require("../../../../utils/page-helper-util.js"), l = require("../../../../utils/page-init-util.js"), n = require("../../../../utils/events/event-util.js"), o = require("../../../../utils/i18n-util.js"), a = require("../../../../utils/common-util.js"), u = e.defineComponent({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }, setup(u2, { expose: r }) {
|
|
3
|
+
const i = u2, s = e.ref(null), c = i.pageContext.entity ? i.pageContext.entity : {};
|
|
4
|
+
let f = l.getFormModelFields(i.pageContext, i.configure);
|
|
5
|
+
const p = e.computed({ get() {
|
|
6
|
+
let e2 = t.getVariableValue(c, f);
|
|
7
|
+
return null != e2 && (e2 += ""), e2;
|
|
8
|
+
}, set(e2) {
|
|
9
|
+
t.setVariableValue(c, f, e2), null != e2 && (s.value = "");
|
|
10
|
+
} }), g = i.configure.runtime ? i.configure.runtime : {}, d = g.style, v = g.class, m = g.headerStyle, h = g.titleExceedStyle, C = e.ref(g.props ? g.props : {}), y = e.ref(C.value.options ? C.value.options : []), b = t.getOptionDatasFromPage(i.pageContext, i.configure);
|
|
11
|
+
b.length > 0 && (y.value = b);
|
|
12
|
+
const x = i.configure.props && i.configure.props.dataOrigin ? i.configure.props.dataOrigin : {}, k = x.optionValueSetType;
|
|
13
|
+
let V = [];
|
|
14
|
+
if (("dynamicData" == k || "dataTable" == k || "service" == k) && x.autoSets) for (let e2 of x.autoSets) e2.source && V.push(e2);
|
|
15
|
+
i.configure && i.configure.props && i.configure.props.base && i.configure.props.base.optionProp && V.push({ source: "label", target: i.configure.props.base.optionProp }), C.value.changeMethod = function(e2) {
|
|
16
|
+
if (V.length > 0) {
|
|
17
|
+
let l2 = null;
|
|
18
|
+
y.value && null != e2 && null != e2 && (l2 = y.value.filter((t2) => e2 === t2.value)), t.autoSetAfterSelect(i.configure, i.pageContext, V, l2);
|
|
19
|
+
}
|
|
20
|
+
n.handleFormEvent(e2, i.pageContext, i.configure, "change");
|
|
21
|
+
};
|
|
22
|
+
const S = C.value.monitorFields, q = [];
|
|
23
|
+
if (S) {
|
|
24
|
+
const t2 = [];
|
|
25
|
+
for (let e2 of S) if (e2.startsWith("${")) {
|
|
26
|
+
e2 = e2.substring(2, e2.length - 1);
|
|
27
|
+
const l2 = e2.split(".");
|
|
28
|
+
"page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (q.push(l2), t2.includes(l2[0]) || t2.push(l2[0]));
|
|
29
|
+
}
|
|
30
|
+
for (let l2 of t2) e.watch(c[l2], () => {
|
|
31
|
+
T();
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function _() {
|
|
35
|
+
let e2 = "";
|
|
36
|
+
for (let l2 of q) e2 += "_" + t.getVariableValue(c, l2);
|
|
37
|
+
return e2;
|
|
38
|
+
}
|
|
39
|
+
let w = _(), B = false;
|
|
40
|
+
const R = C.value.optionconfigInfo ? C.value.optionconfigInfo : {};
|
|
41
|
+
function T() {
|
|
42
|
+
B && clearTimeout(B), B = setTimeout(function() {
|
|
43
|
+
const e2 = _();
|
|
44
|
+
e2 != w && (w = e2, t.queryOptionDatasources(i.pageContext, R, void 0).then((e3) => {
|
|
45
|
+
}));
|
|
46
|
+
}, 200);
|
|
47
|
+
}
|
|
48
|
+
e.onUnmounted(() => {
|
|
49
|
+
B && clearTimeout(B);
|
|
50
|
+
});
|
|
51
|
+
const E = e.ref(null), F = e.ref(null), j = e.ref(null);
|
|
52
|
+
return e.onMounted(() => {
|
|
53
|
+
e.nextTick(() => {
|
|
54
|
+
const e2 = p.value;
|
|
55
|
+
n.handleAfterInitEvent(e2, i.pageContext, i.configure, { formItemRef: E.value, componentRef: F.value, titleRef: j.value, value: e2, entity: i.pageContext.entity.data, pageData: i.pageContext.entity.page });
|
|
56
|
+
});
|
|
57
|
+
}), r({ updateOptions: function(e2) {
|
|
58
|
+
y.value = e2 || [];
|
|
59
|
+
}, addRequiredClass: function() {
|
|
60
|
+
s.value = a.addRequiredClassUtil();
|
|
61
|
+
}, getSelectItemsTitle: function() {
|
|
62
|
+
let e2 = t.getVariableValue(c, f);
|
|
63
|
+
if (null == e2) return "";
|
|
64
|
+
if (e2 = String(e2), null != e2 && "" !== e2 && e2.length > 0) {
|
|
65
|
+
let t2 = "";
|
|
66
|
+
return y.value.length > 0 ? (y.value.forEach((l2) => {
|
|
67
|
+
l2.value === e2 && (t2 = t2 + l2.label + ",");
|
|
68
|
+
}), t2 = t2.slice(0, t2.length - 1)) : t2 = e2.join(","), t2;
|
|
69
|
+
}
|
|
70
|
+
} }), (t2, l2) => {
|
|
71
|
+
const a2 = e.resolveComponent("el-radio"), u3 = e.resolveComponent("el-radio-group"), r2 = e.resolveComponent("el-form-item");
|
|
72
|
+
return e.openBlock(), e.createBlock(r2, { ref_key: "formItemRef", ref: E, required: C.value.required, class: e.normalizeClass(e.unref(v) + (s.value ? " " + s.value : "")), "label-width": C.value.labelWidth, style: e.normalizeStyle(e.unref(d)) }, { label: e.withCtx(() => [C.value.tittleShow ? (e.openBlock(), e.createElementBlock("div", { key: 0, ref_key: "titleRef", ref: j, style: e.normalizeStyle({ ...e.unref(m), ...e.unref(h) }) }, e.toDisplayString(e.unref(o.$t)(C.value.title)), 5)) : e.createCommentVNode("", true)]), default: e.withCtx(() => [e.createVNode(u3, { ref_key: "componentRef", ref: F, disabled: "disabled" === C.value.state, size: C.value.size, onChange: C.value.changeMethod, modelValue: p.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e2) => p.value = e2) }, { default: e.withCtx(() => [(e.openBlock(true), e.createElementBlock(e.Fragment, null, e.renderList(y.value, (l3) => (e.openBlock(), e.createBlock(a2, { key: l3.value, label: l3.value, onClick: (o2) => e.unref(n.handleFormEvent)(l3.value, t2.pageContext, t2.configure, "click", { values: p.value }) }, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(l3.label), 1)]), _: 2 }, 1032, ["label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
73
|
+
};
|
|
74
|
+
} });
|
|
75
|
+
module.exports = u;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const e = require("vue"), t = require("../../../../utils/page-init-util.js"), n = require("../../../../utils/page-helper-util.js"), l = require("../../../../utils/events/event-util.js"), o = require("agilebuilder-ui/src/utils/request"), r = require("../../../../utils/i18n-util.js"), a = require("../../../../utils/common-util.js"), i = require("quill");
|
|
3
|
+
require("quill/dist/quill.snow.css");
|
|
4
|
+
const u = require("element-plus"), c = { class: "toolbar-right-btns" }, s = ["title"], d = { class: "richtext-statusbar" }, p = { class: "word-count" }, f = { key: 0, class: "upload-loading" }, m = ["innerHTML"], v = e.defineComponent({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(v2, { expose: g }) {
|
|
5
|
+
const h = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], b = i.import("attributors/style/size");
|
|
6
|
+
b.whitelist = h, i.register(b, true);
|
|
7
|
+
const x = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], C = i.import("attributors/style/font");
|
|
8
|
+
C.whitelist = x, i.register(C, true);
|
|
9
|
+
const y = v2, k = e.ref(""), w = y.pageContext.entity ? y.pageContext.entity : {}, q = t.getFormModelFields(y.pageContext, y.configure), E = y.configure.runtime ? y.configure.runtime : {}, V = E.style, N = E.class, S = E.headerStyle, T = E.titleExceedStyle, B = e.ref(E.props ? E.props : {});
|
|
10
|
+
let A = n.getSizeConfig(y.pageContext, y.configure);
|
|
11
|
+
A && A.fixHeight && (V.height || (V.height = A.fixHeight + "px"));
|
|
12
|
+
let L = B.value.value;
|
|
13
|
+
const M = n.formatVariableValue(y.pageContext, L), H = e.ref(null);
|
|
14
|
+
let z = null;
|
|
15
|
+
const R = e.ref(false), F = e.ref(0), U = e.ref(false), _ = e.ref(false), $ = e.ref("");
|
|
16
|
+
let j = null, D = B.value.state;
|
|
17
|
+
function W(e2) {
|
|
18
|
+
return "readonly" == e2 || "disabled" == e2;
|
|
19
|
+
}
|
|
20
|
+
const I = W(D), P = e.ref({ modules: { toolbar: [["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: h }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: x }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: I ? "" : B.value.placeholder, readOnly: I });
|
|
21
|
+
function G() {
|
|
22
|
+
if (!(z == null ? void 0 : z.container)) return;
|
|
23
|
+
const e2 = z.container.parentNode;
|
|
24
|
+
if (!e2) return;
|
|
25
|
+
const t2 = e2.getBoundingClientRect(), n2 = z.container.getBoundingClientRect();
|
|
26
|
+
let l2 = t2.height - (n2.top - t2.top);
|
|
27
|
+
z.container.style.height = Math.max(l2, 100) + "px";
|
|
28
|
+
}
|
|
29
|
+
e.watch(B.value, () => {
|
|
30
|
+
const e2 = B.value.state;
|
|
31
|
+
if (null != e2 && e2 !== D) {
|
|
32
|
+
D = e2;
|
|
33
|
+
const t2 = W(D);
|
|
34
|
+
z && (z.enable(!t2), z.root.dataset.placeholder = t2 ? "" : B.value.placeholder);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const K = e.ref([]), O = e.ref(false), Y = e.ref(null), J = e.ref(null), Q = e.ref(null);
|
|
38
|
+
let X = null;
|
|
39
|
+
function Z(e2) {
|
|
40
|
+
const t2 = e2.match(/serverPath=([^&"]+)/);
|
|
41
|
+
return t2 ? t2[1] : "";
|
|
42
|
+
}
|
|
43
|
+
function ee(t2) {
|
|
44
|
+
if (!z) return;
|
|
45
|
+
const n2 = function(e2) {
|
|
46
|
+
let t3 = e2.replace(/<img data-uuid="(.*?)"/g, (e3, t4) => {
|
|
47
|
+
const n3 = Z(t4), l3 = y.pageContext.backendUrl;
|
|
48
|
+
return `<img src="${a.getBaseUrl(l3, y.pageContext.isTest)}/common/fs-upload/download?serverPath=${n3}&isShowWatermark=false" data-uuid="${n3}"`;
|
|
49
|
+
});
|
|
50
|
+
return t3 = t3.replace(/\t/g, " "), t3 = t3.replace(/ {2}/g, " "), t3;
|
|
51
|
+
}(t2), l2 = z.clipboard.convertHTML(n2);
|
|
52
|
+
z.setContents(l2.ops), e.nextTick(() => {
|
|
53
|
+
if (!z) return;
|
|
54
|
+
z.root.querySelectorAll("img").forEach((e2) => {
|
|
55
|
+
if (!e2.getAttribute("data-uuid")) {
|
|
56
|
+
const t3 = Z(e2.src);
|
|
57
|
+
e2.setAttribute("data-uuid", t3);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const te = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
|
|
63
|
+
function ne() {
|
|
64
|
+
R.value = !R.value, e.nextTick(() => {
|
|
65
|
+
G();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function le() {
|
|
69
|
+
z && ($.value = z.root.innerHTML, _.value = true);
|
|
70
|
+
}
|
|
71
|
+
function oe() {
|
|
72
|
+
if (!z) return void (F.value = 0);
|
|
73
|
+
const e2 = z.getText().trim();
|
|
74
|
+
F.value = e2.length;
|
|
75
|
+
}
|
|
76
|
+
function re() {
|
|
77
|
+
u.ElMessage.error({ message: "图片上传失败,请重试", duration: 3e3 });
|
|
78
|
+
}
|
|
79
|
+
function ae(e2) {
|
|
80
|
+
"Escape" === e2.key && R.value && (R.value = false);
|
|
81
|
+
}
|
|
82
|
+
function ie(e2) {
|
|
83
|
+
var _a;
|
|
84
|
+
z && (null !== e2.relatedTarget && ((_a = H.value) == null ? void 0 : _a.contains(e2.relatedTarget)) || l.handleFormEvent(z.root.innerHTML, y.pageContext, y.configure, "change", { entity: w }));
|
|
85
|
+
}
|
|
86
|
+
function ue(e2) {
|
|
87
|
+
if ("img" === e2.target.localName) {
|
|
88
|
+
K.value = [];
|
|
89
|
+
let t2 = e2.target.src;
|
|
90
|
+
K.value.push(t2), O.value = true;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function ce(e2) {
|
|
94
|
+
const t2 = new FormData();
|
|
95
|
+
t2.append("file", e2);
|
|
96
|
+
const n2 = y.pageContext.backendUrl, l2 = a.getBaseUrl(n2, y.pageContext.isTest);
|
|
97
|
+
return o.post(l2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
|
|
98
|
+
}
|
|
99
|
+
function se(e2, t2) {
|
|
100
|
+
const n2 = e2.split(","), l2 = n2[0].match(/:(.*?);/), o2 = l2 ? l2[1] : "image/png", r2 = atob(n2[1]);
|
|
101
|
+
let a2 = r2.length;
|
|
102
|
+
const i2 = new Uint8Array(a2);
|
|
103
|
+
for (; a2--; ) i2[a2] = r2.charCodeAt(a2);
|
|
104
|
+
return new File([i2], t2, { type: o2 });
|
|
105
|
+
}
|
|
106
|
+
return e.onMounted(() => {
|
|
107
|
+
var _a;
|
|
108
|
+
H.value && (z = new i(H.value, P.value), z.root.style.fontSize = "16px", function() {
|
|
109
|
+
var _a2, _b;
|
|
110
|
+
const e2 = (_b = (_a2 = H.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
|
|
111
|
+
if (!e2) return;
|
|
112
|
+
e2.querySelectorAll("button").forEach((e3) => {
|
|
113
|
+
const t2 = e3.className.match(/ql-([\w-]+)/);
|
|
114
|
+
if (t2) {
|
|
115
|
+
const n2 = t2[1], l2 = `${n2}[value="${e3.value}"]`;
|
|
116
|
+
te[l2] ? e3.setAttribute("data-tooltip", te[l2]) : te[n2] && e3.setAttribute("data-tooltip", te[n2]);
|
|
117
|
+
}
|
|
118
|
+
}), e2.querySelectorAll(".ql-picker").forEach((e3) => {
|
|
119
|
+
const t2 = e3.className.match(/ql-(\w+)/);
|
|
120
|
+
if (t2) {
|
|
121
|
+
const n2 = t2[1];
|
|
122
|
+
if (te[n2]) {
|
|
123
|
+
const t3 = e3.querySelector(".ql-picker-label");
|
|
124
|
+
t3 && t3.setAttribute("data-tooltip", te[n2]);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}(), function() {
|
|
129
|
+
var _a2, _b;
|
|
130
|
+
const e2 = (_b = (_a2 = H.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
|
|
131
|
+
e2 && e2.addEventListener("mousedown", (e3) => {
|
|
132
|
+
e3.preventDefault();
|
|
133
|
+
});
|
|
134
|
+
}(), ee(M), (_a = H.value) == null ? void 0 : _a.addEventListener("focusout", ie), z.on("text-change", async function(e2) {
|
|
135
|
+
if (!z) return;
|
|
136
|
+
const t2 = z.root.getElementsByTagName("img");
|
|
137
|
+
for (const e3 of t2) if (!e3.getAttribute("data-uuid")) {
|
|
138
|
+
const t3 = Z(e3.src);
|
|
139
|
+
e3.setAttribute("data-uuid", t3);
|
|
140
|
+
}
|
|
141
|
+
if (e2.ops && e2.ops.length > 0) for (const t3 of e2.ops) {
|
|
142
|
+
const e3 = t3.insert;
|
|
143
|
+
if (e3 == null ? void 0 : e3.image) {
|
|
144
|
+
const t4 = e3.image;
|
|
145
|
+
if (!t4.startsWith("data:image")) continue;
|
|
146
|
+
try {
|
|
147
|
+
U.value = true;
|
|
148
|
+
const e4 = se(t4, "image.png"), n2 = await ce(e4);
|
|
149
|
+
if (!z) return;
|
|
150
|
+
const l2 = z.root.getElementsByTagName("img");
|
|
151
|
+
for (const e5 of l2) e5.src === t4 && (e5.width = 300, e5.src = n2.url, e5.setAttribute("data-uuid", n2.uuid));
|
|
152
|
+
} catch (e4) {
|
|
153
|
+
console.error("上传图片失败", e4), re();
|
|
154
|
+
} finally {
|
|
155
|
+
U.value = false;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
!function() {
|
|
160
|
+
j && clearTimeout(j);
|
|
161
|
+
j = setTimeout(() => {
|
|
162
|
+
if (!z) return;
|
|
163
|
+
const e3 = z.root.innerHTML;
|
|
164
|
+
n.setVariableValue(w, q, e3), e3 && (k.value = "");
|
|
165
|
+
}, 300);
|
|
166
|
+
}(), oe();
|
|
167
|
+
}), oe(), X = z.container, X.addEventListener("click", ue), G(), e.nextTick(() => {
|
|
168
|
+
const e2 = n.getVariableValue(w, q);
|
|
169
|
+
l.handleAfterInitEvent(e2, y.pageContext, y.configure, { formItemRef: Y.value, componentRef: J.value, titleRef: Q.value, value: e2, entity: y.pageContext.entity.data, pageData: y.pageContext.entity.page });
|
|
170
|
+
}));
|
|
171
|
+
}), e.onMounted(() => {
|
|
172
|
+
document.addEventListener("keydown", ae);
|
|
173
|
+
}), e.onBeforeUnmount(() => {
|
|
174
|
+
document.removeEventListener("keydown", ae), j && clearTimeout(j), H.value && H.value.removeEventListener("focusout", ie), X && X.removeEventListener("click", ue);
|
|
175
|
+
}), g({ addRequiredClass: function() {
|
|
176
|
+
k.value = a.addRequiredClassUtil();
|
|
177
|
+
}, setContent: function(e2) {
|
|
178
|
+
ee(e2), oe();
|
|
179
|
+
}, getContent: function() {
|
|
180
|
+
return z ? z.root.innerHTML : "";
|
|
181
|
+
} }), (t2, n2) => {
|
|
182
|
+
const l2 = e.resolveComponent("View"), o2 = e.resolveComponent("el-icon"), a2 = e.resolveComponent("FullScreen"), i2 = e.resolveComponent("Close"), u2 = e.resolveComponent("el-form-item"), v3 = e.resolveComponent("el-image-viewer"), g2 = e.resolveComponent("el-dialog");
|
|
183
|
+
return e.openBlock(), e.createElementBlock(e.Fragment, null, [e.createVNode(u2, { required: B.value.required, class: e.normalizeClass(e.unref(N) + (k.value ? " " + k.value : "")), "label-width": B.value.labelWidth, style: e.normalizeStyle(e.unref(V)) }, { label: e.withCtx(() => [B.value.tittleShow ? (e.openBlock(), e.createElementBlock("div", { key: 0, style: e.normalizeStyle({ ...e.unref(S), ...e.unref(T) }) }, e.toDisplayString(e.unref(r.$t)(B.value.title)), 5)) : e.createCommentVNode("", true)]), default: e.withCtx(() => [e.createElementVNode("div", { class: e.normalizeClass(["richtext-wrapper", { "is-fullscreen": R.value }]) }, [e.createElementVNode("div", { ref_key: "quillEditorRef", ref: H, style: { width: "100%" } }, null, 512), e.createElementVNode("div", c, [e.createElementVNode("button", { class: "toolbar-btn", onClick: le, title: "预览" }, [e.createVNode(o2, null, { default: e.withCtx(() => [e.createVNode(l2)]), _: 1 })]), e.createElementVNode("button", { class: "toolbar-btn", onClick: ne, title: R.value ? "退出全屏" : "全屏编辑" }, [R.value ? (e.openBlock(), e.createBlock(o2, { key: 1 }, { default: e.withCtx(() => [e.createVNode(i2)]), _: 1 })) : (e.openBlock(), e.createBlock(o2, { key: 0 }, { default: e.withCtx(() => [e.createVNode(a2)]), _: 1 }))], 8, s)]), e.createElementVNode("div", d, [e.createElementVNode("span", p, "字数:" + e.toDisplayString(F.value), 1)]), U.value ? (e.openBlock(), e.createElementBlock("div", f, n2[2] || (n2[2] = [e.createElementVNode("div", { class: "loading-spinner" }, null, -1), e.createElementVNode("span", null, "图片上传中...", -1)]))) : e.createCommentVNode("", true)], 2)]), _: 1 }, 8, ["required", "class", "label-width", "style"]), O.value ? (e.openBlock(), e.createBlock(v3, { key: 0, "hide-on-click-modal": "", onClose: n2[0] || (n2[0] = () => {
|
|
184
|
+
O.value = false;
|
|
185
|
+
}), "url-list": K.value }, null, 8, ["url-list"])) : e.createCommentVNode("", true), e.createVNode(g2, { modelValue: _.value, "onUpdate:modelValue": n2[1] || (n2[1] = (e2) => _.value = e2), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: e.withCtx(() => [e.createElementVNode("div", { class: "richtext-preview-content ql-editor", innerHTML: $.value }, null, 8, m)]), _: 1 }, 8, ["modelValue"])], 64);
|
|
186
|
+
};
|
|
187
|
+
} });
|
|
188
|
+
module.exports = v;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const e = require("vue"), t = require("../../../../utils/page-helper-util.js"), l = require("../../../../utils/page-init-util.js"), o = require("../../../../utils/events/event-util.js"), a = require("../common/title-suffix-element.vue.js"), n = require("../../../../utils/i18n-util.js"), r = require("../../../../utils/common-util.js"), u = require("@element-plus/icons-vue"), i = require("clipboard"), s = require("element-plus"), c = require("vue-i18n"), p = { style: { "padding-left": "5px" } }, f = { style: { width: "100%" } }, v = { style: { float: "left" } }, g = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, d = e.defineComponent({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(d2, { expose: m }) {
|
|
3
|
+
const { t: h } = c.useI18n(), y = d2, C = e.ref(null), x = y.pageContext.entity ? y.pageContext.entity : {};
|
|
4
|
+
let b = l.getFormModelFields(y.pageContext, y.configure);
|
|
5
|
+
const k = y.configure.runtime ? y.configure.runtime : {}, w = k.style, V = k.class, S = k.headerStyle, q = k.titleExceedStyle, E = e.ref(k.props ? k.props : {});
|
|
6
|
+
let _ = [];
|
|
7
|
+
const B = "copyBtn_" + y.configure.uuid + "_" + (/* @__PURE__ */ new Date()).getTime();
|
|
8
|
+
function T() {
|
|
9
|
+
let e2 = t.getVariableValue(x, b);
|
|
10
|
+
return null != e2 && (e2 = String(e2)), E.value.multiple && (e2 = e2 ? String(e2).split(",") : []), e2;
|
|
11
|
+
}
|
|
12
|
+
const A = e.computed({ get: () => T(), set(e2) {
|
|
13
|
+
const l2 = T();
|
|
14
|
+
_ = Array.isArray(l2) ? [...l2] : l2;
|
|
15
|
+
let o2 = e2;
|
|
16
|
+
if (E.value.multiple) {
|
|
17
|
+
o2 = !!E.value.arrayValue ? Array.isArray(e2) ? e2 : e2 ? String(e2).split(",") : [] : Array.isArray(e2) ? e2.length > 0 ? e2.join(",") : "" : e2 ?? "";
|
|
18
|
+
}
|
|
19
|
+
void 0 === o2 && (o2 = null), t.setVariableValue(x, b, o2), null != o2 && (C.value = "");
|
|
20
|
+
} }), N = e.ref(E.value.options ? E.value.options : []), D = t.getOptionDatasFromPage(y.pageContext, y.configure);
|
|
21
|
+
D.length > 0 && (N.value = D);
|
|
22
|
+
const M = e.ref(false), j = y.configure.props && y.configure.props.dataOrigin ? y.configure.props.dataOrigin : {}, F = j.optionValueSetType;
|
|
23
|
+
let R = [];
|
|
24
|
+
const z = E.value.optionconfigInfo ? E.value.optionconfigInfo : {};
|
|
25
|
+
if ("dynamicData" == F || "dataTable" == F || "service" == F) {
|
|
26
|
+
if ("remote" == j.filterType) {
|
|
27
|
+
let e2;
|
|
28
|
+
E.value.filterable = true, E.value.remote = true, E.value.remoteShowSuffix = true, E.value.remoteMethod = function(l2) {
|
|
29
|
+
e2 !== l2 && (e2 = l2, M.value = true, t.queryOptionDatasources(y.pageContext, z, l2).then((e3) => {
|
|
30
|
+
M.value = false;
|
|
31
|
+
}).then((e3) => {
|
|
32
|
+
M.value = false;
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (j.autoSets) for (let e2 of j.autoSets) e2.source && R.push(e2);
|
|
37
|
+
}
|
|
38
|
+
y.configure && y.configure.props && y.configure.props.base && y.configure.props.base.optionProp && R.push({ source: "label", target: y.configure.props.base.optionProp }), E.value.changeMethod = function(e2) {
|
|
39
|
+
let l2, a2 = null;
|
|
40
|
+
N.value && null != e2 && null != e2 && (a2 = N.value.filter((t2) => Array.isArray(e2) ? e2.includes(t2.value) : e2 === t2.value));
|
|
41
|
+
R.length > 0 && t.autoSetAfterSelect(y.configure, y.pageContext, R, a2, [E.value.prop]);
|
|
42
|
+
a2 && a2.length > 0 && (l2 = a2[0]);
|
|
43
|
+
let n2 = {};
|
|
44
|
+
l2 && (n2.extendParams = l2);
|
|
45
|
+
n2.options = N.value, n2.oldValue = _, o.handleFormEvent(e2, y.pageContext, y.configure, "change", n2);
|
|
46
|
+
};
|
|
47
|
+
const I = E.value.monitorFields, O = [];
|
|
48
|
+
if (I) {
|
|
49
|
+
const t2 = [];
|
|
50
|
+
for (let e2 of I) if (e2.startsWith("${")) {
|
|
51
|
+
e2 = e2.substring(2, e2.length - 1);
|
|
52
|
+
const l2 = e2.split(".");
|
|
53
|
+
"page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (O.push(l2), t2.includes(l2[0]) || t2.push(l2[0]));
|
|
54
|
+
}
|
|
55
|
+
for (let l2 of t2) e.watch(x[l2], () => {
|
|
56
|
+
K();
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
let P = "", U = false;
|
|
60
|
+
function K() {
|
|
61
|
+
U && clearTimeout(U), U = setTimeout(function() {
|
|
62
|
+
const e2 = function() {
|
|
63
|
+
let e3 = [];
|
|
64
|
+
for (let l2 of O) e3.push(t.getVariableValue(x, l2));
|
|
65
|
+
return e3.join(",");
|
|
66
|
+
}();
|
|
67
|
+
e2 != P && (P = e2, z.watchAttrValue = e2, t.queryOptionDatasources(y.pageContext, z, void 0).then((e3) => {
|
|
68
|
+
M.value = false;
|
|
69
|
+
}));
|
|
70
|
+
}, 200);
|
|
71
|
+
}
|
|
72
|
+
e.onUnmounted(() => {
|
|
73
|
+
U && clearTimeout(U);
|
|
74
|
+
});
|
|
75
|
+
let W = false;
|
|
76
|
+
const $ = e.ref(null), L = e.ref(null), G = e.ref(null);
|
|
77
|
+
function H() {
|
|
78
|
+
const e2 = T();
|
|
79
|
+
if (null != e2 && "" !== e2 && e2.length > 0) {
|
|
80
|
+
let t2 = "";
|
|
81
|
+
return "string" == typeof e2 ? N.value.length > 0 ? N.value.forEach((l2) => {
|
|
82
|
+
l2.value === e2 && (t2 = l2.label);
|
|
83
|
+
}) : t2 = e2 : N.value.length > 0 ? (N.value.forEach((l2) => {
|
|
84
|
+
e2.forEach((e3) => {
|
|
85
|
+
l2.value === e3 && (t2 = t2 + l2.label + ",");
|
|
86
|
+
});
|
|
87
|
+
}), t2 = t2.slice(0, t2.length - 1)) : t2 = e2.join(","), t2;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return e.onMounted(() => {
|
|
91
|
+
const t2 = new i("#" + B, { text: function() {
|
|
92
|
+
return H();
|
|
93
|
+
} });
|
|
94
|
+
t2.on("success", () => {
|
|
95
|
+
s.ElMessage({ showClose: true, type: "success", message: h("superPageRuntimeMessage.copySuccess") });
|
|
96
|
+
}), t2.on("error", (e2) => {
|
|
97
|
+
console.error("复制失败", e2);
|
|
98
|
+
}), e.nextTick(() => {
|
|
99
|
+
const e2 = A.value;
|
|
100
|
+
o.handleAfterInitEvent(e2, y.pageContext, y.configure, { formItemRef: $.value, componentRef: L.value, titleRef: G.value, value: e2, entity: y.pageContext.entity.data, pageData: y.pageContext.entity.page });
|
|
101
|
+
});
|
|
102
|
+
}), m({ updateOptions: function(e2) {
|
|
103
|
+
if (N.value = e2 || [], !W) {
|
|
104
|
+
const e3 = T();
|
|
105
|
+
if (null != e3 && "" !== e3 && N.value.length > 0) {
|
|
106
|
+
let t2 = false;
|
|
107
|
+
for (let l2 of N.value) if (l2.value == e3) {
|
|
108
|
+
t2 = true;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
if (!t2) {
|
|
112
|
+
for (let t3 of N.value) if (t3.label == e3) {
|
|
113
|
+
A.value = t3.value;
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
W = true;
|
|
120
|
+
}, addRequiredClass: function() {
|
|
121
|
+
C.value = r.addRequiredClassUtil();
|
|
122
|
+
}, getSelectItemsTitle: H, getOptions: function() {
|
|
123
|
+
return N.value;
|
|
124
|
+
} }), (t2, l2) => {
|
|
125
|
+
const r2 = e.resolveComponent("el-icon"), i2 = e.resolveComponent("el-option"), s2 = e.resolveComponent("el-select"), c2 = e.resolveComponent("el-popover"), d3 = e.resolveComponent("el-form-item");
|
|
126
|
+
return e.openBlock(), e.createBlock(d3, { ref_key: "formItemRef", ref: $, required: !!E.value.required, class: e.normalizeClass(e.unref(V) + (C.value ? " " + C.value : "")), "label-width": E.value.labelWidth, style: e.normalizeStyle(e.unref(w)) }, { label: e.withCtx(() => [E.value.tittleShow ? (e.openBlock(), e.createElementBlock("div", { key: 0, ref_key: "titleRef", ref: G, style: e.normalizeStyle({ ...e.unref(S), ...e.unref(q) }) }, [E.value.prefixType ? (e.openBlock(), e.createBlock(a, { key: 0, pageContext: t2.pageContext, property: E.value }, null, 8, ["pageContext", "property"])) : (e.openBlock(), e.createElementBlock(e.Fragment, { key: 1 }, [e.createTextVNode(e.toDisplayString(e.unref(n.$t)(E.value.title)), 1)], 64))], 4)) : e.createCommentVNode("", true)]), default: e.withCtx(() => [e.createVNode(c2, { placement: "top", trigger: "hover" }, { reference: e.withCtx(() => [e.createElementVNode("div", f, [e.createVNode(s2, { ref_key: "componentRef", ref: L, style: { width: "100%" }, disabled: "disabled" === E.value.state, size: E.value.size, clearable: E.value.clearable, multiple: E.value.multiple, "collapse-tags": E.value.collapseTags, "collapse-tags-tooltip": E.value.collapseTagsTooltip, filterable: E.value.filterable, "allow-create": E.value.allowCreate, placeholder: E.value.placeholder, "remote-show-suffix": E.value.remoteShowSuffix, remote: E.value.remote, "remote-method": E.value.remoteMethod, loading: M.value, onKeydown: l2[0] || (l2[0] = e.withKeys(e.withModifiers(() => {
|
|
127
|
+
}, ["stop"]), ["space"])), onChange: E.value.changeMethod, onClear: E.value.changeMethod, modelValue: A.value, "onUpdate:modelValue": l2[1] || (l2[1] = (e2) => A.value = e2) }, { default: e.withCtx(() => [(e.openBlock(true), e.createElementBlock(e.Fragment, null, e.renderList(N.value, (l3) => (e.openBlock(), e.createBlock(i2, { key: l3.value, label: l3.label, value: l3.value, onClick: (a2) => e.unref(o.handleFormEvent)(l3.value, t2.pageContext, t2.configure, "click", { values: A.value }) }, { default: e.withCtx(() => [l3._description_ ? (e.openBlock(), e.createElementBlock(e.Fragment, { key: 0 }, [e.createElementVNode("span", v, e.toDisplayString(l3.label), 1), e.createElementVNode("span", g, e.toDisplayString(l3._description_), 1)], 64)) : e.createCommentVNode("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "onClear", "modelValue"])])]), default: e.withCtx(() => [e.createElementVNode("span", p, [e.createVNode(r2, { id: B }, { default: e.withCtx(() => [e.createVNode(e.unref(u.CopyDocument))]), _: 1 })])]), _: 1 })]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
128
|
+
};
|
|
129
|
+
} });
|
|
130
|
+
module.exports = d;
|
package/dist/lib/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const e = require("vue"), t = require("agilebuilder-ui"), n = require("../../../../utils/i18n-util.js"), r = require("../../../../utils/events/event-util.js"), o = e.defineComponent({ __name: "separatelabel-runtime", props: { pageContext: {}, configure: {} }, setup(o2, { expose: i }) {
|
|
3
|
+
const l = o2, a = e.ref(null), u = l.configure.runtime ? l.configure.runtime : {}, s = u.style, c = u.class, p = u.headerStyle;
|
|
4
|
+
return e.onMounted(() => {
|
|
5
|
+
e.nextTick(() => {
|
|
6
|
+
const e2 = n.$t(l.configure.props.base.title);
|
|
7
|
+
r.handleAfterInitEvent(e2, l.pageContext, l.configure, { componentRef: a.value, value: e2, entity: l.pageContext.entity.data, pageData: l.pageContext.entity.page });
|
|
8
|
+
});
|
|
9
|
+
}), i({}), (r2, o3) => (e.openBlock(), e.createElementBlock("div", { style: e.normalizeStyle(e.unref(s)), class: e.normalizeClass([e.unref(c), "amb-widget-separatelabel"]), ref_key: "thisRef", ref: a }, [e.createElementVNode("div", { class: "label", style: e.normalizeStyle(e.unref(p)) }, [r2.configure.props.iconType && r2.configure.props.iconValue ? (e.openBlock(), e.createBlock(e.unref(t.SuperIcon), { key: 0, iconType: r2.configure.props.iconType, iconValue: r2.configure.props.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : e.createCommentVNode("", true), e.createTextVNode(" " + e.toDisplayString(e.unref(n.$t)(r2.configure.props.base.title)), 1)], 4)], 6));
|
|
10
|
+
} });
|
|
11
|
+
module.exports = o;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const e = require("vue"), t = require("../../../../utils/page-init-util.js"), l = require("../../../../utils/page-helper-util.js"), a = require("../../../../utils/events/event-util.js"), u = require("../../../../utils/i18n-util.js"), i = require("../../../../utils/common-util.js"), n = e.defineComponent({ __name: "switch-runtime", props: { pageContext: {}, configure: {} }, setup(n2, { expose: r }) {
|
|
3
|
+
const o = n2, v = e.ref(null), c = o.pageContext.entity ? o.pageContext.entity : {};
|
|
4
|
+
let s = t.getFormModelFields(o.pageContext, o.configure);
|
|
5
|
+
const f = o.configure.runtime ? o.configure.runtime : {}, d = f.style, p = f.class, m = f.headerStyle, V = f.titleExceedStyle, g = e.ref(f.props ? f.props : {});
|
|
6
|
+
let y = l.getVariableValue(c, s);
|
|
7
|
+
function x(e2) {
|
|
8
|
+
return void 0 !== g.value[e2] && null !== g.value[e2] && "" !== g.value[e2];
|
|
9
|
+
}
|
|
10
|
+
null == y || "number" != typeof y || y + "" != "1" && y + "" != "0" || (x("activeValue") || (g.value.activeValue = 1), x("inactiveValue") || (g.value.inactiveValue = 0)), null != y && "boolean" == typeof y && (x("activeValue") || (g.value.activeValue = true), x("inactiveValue") || (g.value.inactiveValue = false)), x("activeValue") || (g.value.activeValue = true), x("inactiveValue") || (g.value.inactiveValue = false);
|
|
11
|
+
const h = f.switchStyle, C = e.computed({ get() {
|
|
12
|
+
let e2 = l.getVariableValue(c, s);
|
|
13
|
+
return null != e2 && (true === g.value.activeValue ? (e2 + "" == "1" && (e2 = true), e2 + "" == "0" && (e2 = false)) : 1 === g.value.activeValue ? (e2 + "" == "true" && (e2 = 1), e2 + "" == "false" && (e2 = 0)) : e2 += ""), e2;
|
|
14
|
+
}, set(e2) {
|
|
15
|
+
null != e2 && (true === g.value.activeValue ? (e2 + "" == "1" && (e2 = true), e2 + "" == "0" && (e2 = false)) : 1 === g.value.activeValue ? (e2 + "" == "true" && (e2 = 1), e2 + "" == "false" && (e2 = 0)) : e2 += ""), l.setVariableValue(c, s, e2), null != e2 && (v.value = "");
|
|
16
|
+
} }), b = e.ref(null), q = e.ref(null), w = e.ref(null);
|
|
17
|
+
return e.onMounted(() => {
|
|
18
|
+
e.nextTick(() => {
|
|
19
|
+
const e2 = C.value;
|
|
20
|
+
a.handleAfterInitEvent(e2, o.pageContext, o.configure, { formItemRef: b.value, componentRef: q.value, titleRef: w.value, value: e2, entity: o.pageContext.entity.data, pageData: o.pageContext.entity.page });
|
|
21
|
+
});
|
|
22
|
+
}), r({ addRequiredClass: function() {
|
|
23
|
+
v.value = i.addRequiredClassUtil();
|
|
24
|
+
} }), (t2, l2) => {
|
|
25
|
+
const i2 = e.resolveComponent("el-switch"), n3 = e.resolveComponent("el-form-item");
|
|
26
|
+
return e.openBlock(), e.createBlock(n3, { ref_key: "formItemRef", ref: b, required: g.value.required, class: e.normalizeClass(e.unref(p) + (v.value ? " " + v.value : "")), "label-width": g.value.labelWidth, style: e.normalizeStyle(e.unref(d)) }, { label: e.withCtx(() => [g.value.tittleShow ? (e.openBlock(), e.createElementBlock("div", { key: 0, ref_key: "titleRef", ref: w, style: e.normalizeStyle({ ...e.unref(m), ...e.unref(V) }) }, e.toDisplayString(e.unref(u.$t)(g.value.title)), 5)) : e.createCommentVNode("", true)]), default: e.withCtx(() => [e.createVNode(i2, { ref_key: "componentRef", ref: q, disabled: "disabled" === g.value.state, "active-value": g.value.activeValue, "active-text": g.value.activeText, "inactive-value": g.value.inactiveValue, "inactive-text": g.value.inactiveText, width: g.value.offOnWidth, size: g.value.size, style: e.normalizeStyle(e.unref(h)), modelValue: C.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e2) => C.value = e2), onChange: l2[1] || (l2[1] = (l3) => e.unref(a.handleFormEvent)(l3, t2.pageContext, t2.configure, "change")) }, null, 8, ["disabled", "active-value", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
27
|
+
};
|
|
28
|
+
} });
|
|
29
|
+
module.exports = n;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const e = require("vue"), t = require("../../../../utils/page-init-util.js"), l = require("../../../../utils/page-helper-util.js"), n = require("../../../../utils/events/event-util.js"), r = require("../../../../utils/i18n-util.js"), a = e.defineComponent({ __name: "tag-runtime", props: { pageContext: {}, configure: {} }, setup(a2) {
|
|
3
|
+
const o = a2, i = t.getFormModelFields(o.pageContext, o.configure), u = o.configure.runtime ? o.configure.runtime : {}, s = u.style, c = u.class, p = u.headerStyle, f = u.titleExceedStyle, g = e.ref(u.props ? u.props : {});
|
|
4
|
+
let m = g.value.formatting;
|
|
5
|
+
const v = o.pageContext.entity ? o.pageContext.entity : {}, y = e.computed(() => {
|
|
6
|
+
let e2 = l.getVariableValue(v, i);
|
|
7
|
+
null == e2 && (e2 = []), Array.isArray(e2) || (e2 = (e2 + "").split(","));
|
|
8
|
+
const t2 = [];
|
|
9
|
+
let n2 = 1;
|
|
10
|
+
for (const l2 of e2) {
|
|
11
|
+
if (null == l2 || "" === l2) continue;
|
|
12
|
+
const e3 = { value: l2, label: l2 };
|
|
13
|
+
m && (e3.label = m.replace(/\${value}/g, e3.value).replace(/\${no}/g, n2)), t2.push(e3), n2++;
|
|
14
|
+
}
|
|
15
|
+
return t2;
|
|
16
|
+
});
|
|
17
|
+
const d = e.ref(null), C = e.ref(null);
|
|
18
|
+
return e.onMounted(() => {
|
|
19
|
+
e.nextTick(() => {
|
|
20
|
+
const e2 = y.value;
|
|
21
|
+
n.handleAfterInitEvent(e2, o.pageContext, o.configure, { formItemRef: d.value, titleRef: C.value, value: e2, entity: o.pageContext.entity.data, pageData: o.pageContext.entity.page });
|
|
22
|
+
});
|
|
23
|
+
}), (t2, a3) => {
|
|
24
|
+
const u2 = e.resolveComponent("el-tag"), m2 = e.resolveComponent("el-form-item");
|
|
25
|
+
return e.openBlock(), e.createBlock(m2, { ref_key: "formItemRef", ref: d, required: g.value.required, class: e.normalizeClass(e.unref(c)), "label-width": g.value.labelWidth, style: e.normalizeStyle(e.unref(s)) }, { label: e.withCtx(() => [g.value.tittleShow ? (e.openBlock(), e.createElementBlock("div", { key: 0, ref_key: "titleRef", ref: C, style: e.normalizeStyle({ ...e.unref(p), ...e.unref(f) }) }, e.toDisplayString(e.unref(r.$t)(g.value.title)), 5)) : e.createCommentVNode("", true)]), default: e.withCtx(() => [(e.openBlock(true), e.createElementBlock(e.Fragment, null, e.renderList(y.value, (r2) => (e.openBlock(), e.createBlock(u2, { key: r2, size: g.value.size, closable: g.value.closable, type: g.value.type, style: { "margin-right": "4px" }, onClose: (e2) => function(e3, t3) {
|
|
26
|
+
if (g.value.closable) {
|
|
27
|
+
let e4 = l.getVariableValue(v, i);
|
|
28
|
+
null == e4 && (e4 = []);
|
|
29
|
+
const n2 = Array.isArray(e4);
|
|
30
|
+
n2 || (e4 = (e4 + "").split(","));
|
|
31
|
+
const r3 = e4.indexOf(t3.value);
|
|
32
|
+
r3 > -1 && e4.splice(r3, 1), n2 || (e4 = e4.join(",")), l.setVariableValue(v, i, e4);
|
|
33
|
+
}
|
|
34
|
+
n.handleFormEvent(e3, o.pageContext, o.configure, "remove");
|
|
35
|
+
}(e2, r2), onClick: a3[0] || (a3[0] = (l2) => e.unref(n.handleFormEvent)(l2, t2.pageContext, t2.configure, "click")) }, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(r2.label), 1)]), _: 2 }, 1032, ["size", "closable", "type", "onClose"]))), 128))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
36
|
+
};
|
|
37
|
+
} });
|
|
38
|
+
module.exports = a;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const e = require("vue"), t = require("../../../../utils/page-init-util.js"), l = require("../../../../utils/page-helper-util.js"), n = require("../../../../utils/events/event-util.js"), a = require("../common/title-suffix-element.vue.js"), r = require("../../../../utils/i18n-util.js"), o = require("../../../../utils/common-util.js"), u = e.defineComponent({ __name: "textarea-runtime", props: { pageContext: {}, configure: {} }, setup(u2, { expose: i }) {
|
|
3
|
+
const s = u2, c = e.ref(null), p = s.pageContext.entity ? s.pageContext.entity : {};
|
|
4
|
+
let d = t.getFormModelFields(s.pageContext, s.configure);
|
|
5
|
+
const m = e.computed({ get: () => l.getVariableValue(p, d), set(e2) {
|
|
6
|
+
l.setVariableValue(p, d, e2), null != e2 && "" !== e2 && (c.value = "");
|
|
7
|
+
} }), f = s.configure.runtime ? s.configure.runtime : {}, g = e.ref(f.props ? f.props : {}), v = f.style, x = f.class, h = f.headerStyle, y = f.titleExceedStyle, C = e.ref(null), k = e.ref(null), w = e.ref(null);
|
|
8
|
+
return e.onMounted(() => {
|
|
9
|
+
e.nextTick(() => {
|
|
10
|
+
const e2 = m.value;
|
|
11
|
+
n.handleAfterInitEvent(e2, s.pageContext, s.configure, { formItemRef: C.value, componentRef: k.value, titleRef: w.value, value: e2, entity: s.pageContext.entity.data, pageData: s.pageContext.entity.page });
|
|
12
|
+
});
|
|
13
|
+
}), i({ addRequiredClass: function() {
|
|
14
|
+
c.value = o.addRequiredClassUtil();
|
|
15
|
+
} }), (t2, l2) => {
|
|
16
|
+
const o2 = e.resolveComponent("el-input"), u3 = e.resolveComponent("el-form-item");
|
|
17
|
+
return e.openBlock(), e.createElementBlock("div", null, [e.createVNode(u3, { ref_key: "formItemRef", ref: C, required: !!g.value.required, class: e.normalizeClass(e.unref(x) + (c.value ? " " + c.value : "")), "label-width": g.value.labelWidth, style: e.normalizeStyle(e.unref(v)) }, { label: e.withCtx(() => [g.value.tittleShow ? (e.openBlock(), e.createElementBlock("div", { key: 0, ref_key: "titleRef", ref: w, style: e.normalizeStyle({ ...e.unref(h), ...e.unref(y) }) }, [g.value.prefixType ? (e.openBlock(), e.createBlock(a, { key: 0, pageContext: t2.pageContext, property: g.value }, null, 8, ["pageContext", "property"])) : (e.openBlock(), e.createElementBlock(e.Fragment, { key: 1 }, [e.createTextVNode(e.toDisplayString(e.unref(r.$t)(g.value.title)), 1)], 64))], 4)) : e.createCommentVNode("", true)]), default: e.withCtx(() => [e.createVNode(o2, { ref_key: "componentRef", ref: k, disabled: "disabled" === g.value.state, readonly: "readonly" === g.value.state, size: g.value.size, clearable: g.value.clearable, placeholder: g.value.placeholder, modelValue: m.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e2) => m.value = e2), rows: g.value.rows ? g.value.rows : 2, maxlength: g.value.maxlength, minlength: g.value.minlength, "show-word-limit": g.value.showInputNum, type: "textarea", onInput: l2[1] || (l2[1] = (l3) => e.unref(n.handleFormEvent)(l3, t2.pageContext, t2.configure, "input")), onChange: l2[2] || (l2[2] = (l3) => e.unref(n.handleFormEvent)(l3, t2.pageContext, t2.configure, "change")), onBlur: l2[3] || (l2[3] = (l3) => e.unref(n.handleFormEvent)(l3, t2.pageContext, t2.configure, "blur")), onFocus: l2[4] || (l2[4] = (l3) => e.unref(n.handleFormEvent)(l3, t2.pageContext, t2.configure, "focus")), onClick: l2[5] || (l2[5] = (l3) => e.unref(n.handleFormEvent)(l3, t2.pageContext, t2.configure, "click")) }, null, 8, ["disabled", "readonly", "size", "clearable", "placeholder", "modelValue", "rows", "maxlength", "minlength", "show-word-limit"])]), _: 1 }, 8, ["required", "class", "label-width", "style"])]);
|
|
18
|
+
};
|
|
19
|
+
} });
|
|
20
|
+
module.exports = u;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const e = require("vue"), n = require("./error-render.vue.js"), o = require("../../utils/assemblys-config.js"), t = require("../../utils/interfaces/page-design-types.js"), r = require("../../utils/global-refs.js"), i = require("../../utils/page-init-util.js"), s = require("../../utils/page-helper-util.js"), u = require("../../utils/common-util.js"), l = require("../../utils/events/event-util.js"), c = e.defineComponent({ __name: "home-chart-render", props: { pageContext: {}, configure: {} }, setup(c2) {
|
|
3
|
+
const a = c2;
|
|
4
|
+
null == a.configure.style && (a.configure.style = {});
|
|
5
|
+
const g = i.getPermissionCodes(a.configure, a.pageContext);
|
|
6
|
+
a.configure && a.configure.props && a.configure.props.base && (a.configure.props.base.functionCode = g);
|
|
7
|
+
let f = e.ref(true), p = e.ref(true);
|
|
8
|
+
const m = e.ref({});
|
|
9
|
+
m.value = e.markRaw(o.getRuntimeComponentByName(a.configure.name));
|
|
10
|
+
const d = e.ref(true);
|
|
11
|
+
null == m.value && (m.value = n, d.value = false);
|
|
12
|
+
const C = e.ref(null), v = e.ref({}), y = e.ref(""), h = u.getPropClassName(a.configure);
|
|
13
|
+
h && (y.value = h);
|
|
14
|
+
const x = a.configure.runtime && a.configure.runtime.common ? a.configure.runtime.common : {};
|
|
15
|
+
if (x.class && (y.value += " " + x.class), x.style) {
|
|
16
|
+
Object.assign(v.value, x.style);
|
|
17
|
+
const e2 = a.pageContext && a.pageContext.dimensions ? a.pageContext.dimensions : t.PageDimensions.PC, n2 = x.style[e2 + "_style"];
|
|
18
|
+
n2 && Object.assign(v.value, n2);
|
|
19
|
+
const o2 = x.style[e2 + "_class"];
|
|
20
|
+
o2 && (y.value += " " + o2);
|
|
21
|
+
}
|
|
22
|
+
function b(n2) {
|
|
23
|
+
if (C.value = n2, n2 && !n2.show && (n2.show = function() {
|
|
24
|
+
f.value = true;
|
|
25
|
+
}), n2 && !n2.hide && (n2.hide = function() {
|
|
26
|
+
f.value = false;
|
|
27
|
+
}), n2 && !n2.getConfigure && (n2.getConfigure = function() {
|
|
28
|
+
return a.configure;
|
|
29
|
+
}), a.configure.uuid && r.addComponentRef(a.pageContext, a.configure.uuid, C), a.configure.code) r.addComponentRefByCode(a.pageContext, a.configure.code, C);
|
|
30
|
+
else if (a.configure.props && a.configure.props.base) {
|
|
31
|
+
const e2 = a.configure.props.base;
|
|
32
|
+
if (e2.prop) {
|
|
33
|
+
let n3 = e2.prop;
|
|
34
|
+
n3.startsWith("${") && (n3 = n3.substring(2, n3.length - 1)), n3.includes(".") && (n3 = n3.substring(n3.indexOf(".") + 1)), r.addComponentRefByCode(a.pageContext, n3, C);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const o2 = a.configure.props ? a.configure.props.base : null;
|
|
38
|
+
if (o2 && o2.prop) {
|
|
39
|
+
let e2 = o2.prop;
|
|
40
|
+
e2 = s.getFormPropName(e2), i.controlObjectRenderState(a.pageContext, e2);
|
|
41
|
+
}
|
|
42
|
+
!function() {
|
|
43
|
+
if (!C.value) return;
|
|
44
|
+
const n3 = s.getSizeConfig(a.pageContext, a.configure);
|
|
45
|
+
"table" !== a.configure.name && n3 && n3.isCalcHeight && e.nextTick(() => {
|
|
46
|
+
let e2 = C.value.$el;
|
|
47
|
+
e2 || (e2 = C.value);
|
|
48
|
+
const n4 = e2.parentNode;
|
|
49
|
+
if (!e2 || !n4) return;
|
|
50
|
+
const o3 = e2.getBoundingClientRect();
|
|
51
|
+
let t2 = window.innerHeight - o3.y - 80, r2 = t2 + "";
|
|
52
|
+
u.isNumber(t2) && (r2 = t2 + "px"), v.value.height = r2, v.value["overflow-y"] = "auto", v.value["overflow-x"] = "hidden", a.configure.sytle || (a.configure.sytle = {}), a.configure.sytle._heightStyle = r2;
|
|
53
|
+
});
|
|
54
|
+
}();
|
|
55
|
+
}
|
|
56
|
+
e.onMounted(() => {
|
|
57
|
+
j();
|
|
58
|
+
});
|
|
59
|
+
const j = () => {
|
|
60
|
+
if (!C.value) return;
|
|
61
|
+
let e2 = C.value.$el;
|
|
62
|
+
e2 || (e2 = C.value);
|
|
63
|
+
const n2 = e2.parentNode;
|
|
64
|
+
if (!e2 || !n2) return;
|
|
65
|
+
const o2 = a.configure.props ? a.configure.props : {}, t2 = a.configure.style ? a.configure.style : {}, r2 = o2.position;
|
|
66
|
+
"top" == r2 || "bottom" == r2 || t2.position;
|
|
67
|
+
};
|
|
68
|
+
return (n2, o2) => {
|
|
69
|
+
const t2 = e.resolveDirective("permission");
|
|
70
|
+
return e.unref(l.isShowComponent)(n2.configure) ? e.withDirectives((e.openBlock(), e.createBlock(e.resolveDynamicComponent(m.value), { key: 0, ref: b, style: e.normalizeStyle(v.value), class: e.normalizeClass(y.value), configure: n2.configure, pageContext: n2.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[e.vShow, e.unref(p)], [t2, { codes: e.unref(g) ? e.unref(g) : "true", systemCode: n2.pageContext.systemCode }]]) : e.createCommentVNode("", true);
|
|
71
|
+
};
|
|
72
|
+
} });
|
|
73
|
+
module.exports = c;
|