super-page-runtime 2.3.17 → 2.3.18-tmp2
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/page-init-util.d.ts +2 -1
- package/dist/es/components/runtime/utils/page-init-util.js +84 -65
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +27 -27
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
- 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 +4 -4
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.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-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue.d.ts +11 -2
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +136 -128
- package/dist/es/style.css +76 -76
- package/dist/lib/_virtual/AttributeMap.js +4 -0
- package/dist/lib/_virtual/Barcode.js +4 -0
- package/dist/lib/_virtual/CODE128.js +4 -0
- package/dist/lib/_virtual/CODE128A.js +4 -0
- package/dist/lib/_virtual/CODE128B.js +4 -0
- package/dist/lib/_virtual/CODE128C.js +4 -0
- package/dist/lib/_virtual/CODE128_AUTO.js +4 -0
- package/dist/lib/_virtual/CODE93.js +4 -0
- package/dist/lib/_virtual/CODE93FullASCII.js +4 -0
- package/dist/lib/_virtual/Delta.js +4 -0
- package/dist/lib/_virtual/EAN.js +4 -0
- package/dist/lib/_virtual/EAN13.js +4 -0
- package/dist/lib/_virtual/EAN2.js +4 -0
- package/dist/lib/_virtual/EAN5.js +4 -0
- package/dist/lib/_virtual/EAN8.js +4 -0
- package/dist/lib/_virtual/ErrorHandler.js +4 -0
- package/dist/lib/_virtual/ITF.js +4 -0
- package/dist/lib/_virtual/ITF14.js +4 -0
- package/dist/lib/_virtual/JsBarcode.js +6 -0
- package/dist/lib/_virtual/MSI.js +4 -0
- package/dist/lib/_virtual/MSI10.js +4 -0
- package/dist/lib/_virtual/MSI1010.js +4 -0
- package/dist/lib/_virtual/MSI11.js +4 -0
- package/dist/lib/_virtual/MSI1110.js +4 -0
- package/dist/lib/_virtual/Op.js +4 -0
- package/dist/lib/_virtual/OpIterator.js +4 -0
- package/dist/lib/_virtual/OverloadYield.js +4 -0
- package/dist/lib/_virtual/SVGPathData.js +4 -0
- package/dist/lib/_virtual/SVGPathData2.js +5 -0
- package/dist/lib/_virtual/UPC.js +4 -0
- package/dist/lib/_virtual/UPCE.js +4 -0
- package/dist/lib/_virtual/_commonjsHelpers.js +33 -0
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/lib/_virtual/alignment-pattern.js +4 -0
- package/dist/lib/_virtual/arrayLikeToArray.js +4 -0
- package/dist/lib/_virtual/arrayWithHoles.js +4 -0
- package/dist/lib/_virtual/arrayWithoutHoles.js +4 -0
- package/dist/lib/_virtual/assertThisInitialized.js +4 -0
- package/dist/lib/_virtual/asyncToGenerator.js +4 -0
- package/dist/lib/_virtual/asyncToGenerator2.js +6 -0
- package/dist/lib/_virtual/auto.js +4 -0
- package/dist/lib/_virtual/backo2.js +4 -0
- package/dist/lib/_virtual/base64-arraybuffer.js +4 -0
- package/dist/lib/_virtual/binary.js +4 -0
- package/dist/lib/_virtual/browser.js +4 -0
- package/dist/lib/_virtual/browser2.js +4 -0
- package/dist/lib/_virtual/canvas.js +4 -0
- package/dist/lib/_virtual/canvas2.js +4 -0
- package/dist/lib/_virtual/checksums.js +4 -0
- package/dist/lib/_virtual/classCallCheck.js +4 -0
- package/dist/lib/_virtual/clipboard.js +4 -0
- package/dist/lib/_virtual/commons.js +4 -0
- package/dist/lib/_virtual/constants.js +4 -0
- package/dist/lib/_virtual/constants2.js +4 -0
- package/dist/lib/_virtual/constants3.js +4 -0
- package/dist/lib/_virtual/constants4.js +4 -0
- package/dist/lib/_virtual/createClass.js +4 -0
- package/dist/lib/_virtual/dayjs.min.js +4 -0
- package/dist/lib/_virtual/decodePacket.browser.js +4 -0
- package/dist/lib/_virtual/defaults.js +4 -0
- package/dist/lib/_virtual/defineProperty.js +4 -0
- package/dist/lib/_virtual/defineProperty2.js +6 -0
- package/dist/lib/_virtual/dijkstra.js +4 -0
- package/dist/lib/_virtual/encodePacket.browser.js +4 -0
- package/dist/lib/_virtual/encoder.js +4 -0
- package/dist/lib/_virtual/error-correction-code.js +4 -0
- package/dist/lib/_virtual/error-correction-level.js +4 -0
- package/dist/lib/_virtual/es.array.concat.js +4 -0
- package/dist/lib/_virtual/es.array.every.js +4 -0
- package/dist/lib/_virtual/es.array.fill.js +4 -0
- package/dist/lib/_virtual/es.array.for-each.js +4 -0
- package/dist/lib/_virtual/es.array.from.js +4 -0
- package/dist/lib/_virtual/es.array.includes.js +4 -0
- package/dist/lib/_virtual/es.array.index-of.js +4 -0
- package/dist/lib/_virtual/es.array.index-of2.js +3 -0
- package/dist/lib/_virtual/es.array.iterator.js +3 -0
- package/dist/lib/_virtual/es.array.join.js +4 -0
- package/dist/lib/_virtual/es.array.map.js +4 -0
- package/dist/lib/_virtual/es.array.reduce.js +4 -0
- package/dist/lib/_virtual/es.array.reduce2.js +3 -0
- package/dist/lib/_virtual/es.array.reverse.js +4 -0
- package/dist/lib/_virtual/es.array.reverse2.js +3 -0
- package/dist/lib/_virtual/es.array.some.js +4 -0
- package/dist/lib/_virtual/es.function.name.js +4 -0
- package/dist/lib/_virtual/es.map.constructor.js +4 -0
- package/dist/lib/_virtual/es.map.js +4 -0
- package/dist/lib/_virtual/es.number.constructor.js +4 -0
- package/dist/lib/_virtual/es.object.to-string.js +4 -0
- package/dist/lib/_virtual/es.parse-float.js +4 -0
- package/dist/lib/_virtual/es.promise.all.js +4 -0
- package/dist/lib/_virtual/es.promise.catch.js +4 -0
- package/dist/lib/_virtual/es.promise.constructor.js +4 -0
- package/dist/lib/_virtual/es.promise.js +4 -0
- package/dist/lib/_virtual/es.promise.race.js +4 -0
- package/dist/lib/_virtual/es.promise.reject.js +4 -0
- package/dist/lib/_virtual/es.promise.resolve.js +4 -0
- package/dist/lib/_virtual/es.promise2.js +3 -0
- package/dist/lib/_virtual/es.reflect.apply.js +4 -0
- package/dist/lib/_virtual/es.reflect.delete-property.js +4 -0
- package/dist/lib/_virtual/es.reflect.get-prototype-of.js +4 -0
- package/dist/lib/_virtual/es.regexp.exec.js +4 -0
- package/dist/lib/_virtual/es.regexp.to-string.js +4 -0
- package/dist/lib/_virtual/es.regexp.to-string2.js +3 -0
- package/dist/lib/_virtual/es.string.ends-with.js +4 -0
- package/dist/lib/_virtual/es.string.ends-with2.js +3 -0
- package/dist/lib/_virtual/es.string.includes.js +4 -0
- package/dist/lib/_virtual/es.string.includes2.js +3 -0
- package/dist/lib/_virtual/es.string.iterator.js +4 -0
- package/dist/lib/_virtual/es.string.match.js +4 -0
- package/dist/lib/_virtual/es.string.match2.js +3 -0
- package/dist/lib/_virtual/es.string.replace.js +4 -0
- package/dist/lib/_virtual/es.string.replace2.js +3 -0
- package/dist/lib/_virtual/es.string.split.js +4 -0
- package/dist/lib/_virtual/es.string.split2.js +3 -0
- package/dist/lib/_virtual/es.string.starts-with.js +4 -0
- package/dist/lib/_virtual/es.string.starts-with2.js +3 -0
- package/dist/lib/_virtual/es.string.trim.js +4 -0
- package/dist/lib/_virtual/es.string.trim2.js +3 -0
- package/dist/lib/_virtual/exceptions.js +4 -0
- package/dist/lib/_virtual/finder-pattern.js +4 -0
- package/dist/lib/_virtual/fixOptions.js +4 -0
- package/dist/lib/_virtual/format-info.js +4 -0
- package/dist/lib/_virtual/galois-field.js +4 -0
- package/dist/lib/_virtual/get.js +4 -0
- package/dist/lib/_virtual/getOptionsFromElement.js +4 -0
- package/dist/lib/_virtual/getPrototypeOf.js +4 -0
- package/dist/lib/_virtual/getRenderProperties.js +4 -0
- package/dist/lib/_virtual/globals.js +4 -0
- package/dist/lib/_virtual/has-cors.js +4 -0
- package/dist/lib/_virtual/html2canvas.js +4 -0
- package/dist/lib/_virtual/index.js +4 -0
- package/dist/lib/_virtual/index10.js +4 -0
- package/dist/lib/_virtual/index11.js +4 -0
- package/dist/lib/_virtual/index12.js +4 -0
- package/dist/lib/_virtual/index13.js +4 -0
- package/dist/lib/_virtual/index14.js +4 -0
- package/dist/lib/_virtual/index15.js +4 -0
- package/dist/lib/_virtual/index16.js +4 -0
- package/dist/lib/_virtual/index17.js +4 -0
- package/dist/lib/_virtual/index18.js +4 -0
- package/dist/lib/_virtual/index19.js +4 -0
- package/dist/lib/_virtual/index2.js +4 -0
- package/dist/lib/_virtual/index20.js +4 -0
- package/dist/lib/_virtual/index21.js +4 -0
- package/dist/lib/_virtual/index22.js +4 -0
- package/dist/lib/_virtual/index23.js +4 -0
- package/dist/lib/_virtual/index24.js +4 -0
- package/dist/lib/_virtual/index3.js +4 -0
- package/dist/lib/_virtual/index4.js +5 -0
- package/dist/lib/_virtual/index5.js +4 -0
- package/dist/lib/_virtual/index6.js +4 -0
- package/dist/lib/_virtual/index7.js +4 -0
- package/dist/lib/_virtual/index8.js +6 -0
- package/dist/lib/_virtual/index9.js +6 -0
- package/dist/lib/_virtual/inherits.js +4 -0
- package/dist/lib/_virtual/internal-metadata.js +4 -0
- package/dist/lib/_virtual/is-binary.js +4 -0
- package/dist/lib/_virtual/iterableToArray.js +4 -0
- package/dist/lib/_virtual/iterableToArrayLimit.js +4 -0
- package/dist/lib/_virtual/jquery.js +4 -0
- package/dist/lib/_virtual/jspdf.es.min.js +5 -0
- package/dist/lib/_virtual/linearizeEncodings.js +4 -0
- package/dist/lib/_virtual/make-built-in.js +4 -0
- package/dist/lib/_virtual/manager.js +4 -0
- package/dist/lib/_virtual/mask-pattern.js +4 -0
- package/dist/lib/_virtual/merge.js +4 -0
- package/dist/lib/_virtual/mode.js +4 -0
- package/dist/lib/_virtual/new-promise-capability.js +4 -0
- package/dist/lib/_virtual/nonIterableRest.js +4 -0
- package/dist/lib/_virtual/nonIterableSpread.js +4 -0
- package/dist/lib/_virtual/object-define-properties.js +4 -0
- package/dist/lib/_virtual/object-define-property.js +4 -0
- package/dist/lib/_virtual/object-get-own-property-descriptor.js +4 -0
- package/dist/lib/_virtual/object-get-own-property-names-external.js +4 -0
- package/dist/lib/_virtual/object-get-own-property-names.js +4 -0
- package/dist/lib/_virtual/object-get-own-property-symbols.js +4 -0
- package/dist/lib/_virtual/object-property-is-enumerable.js +4 -0
- package/dist/lib/_virtual/object.js +4 -0
- package/dist/lib/_virtual/on.js +4 -0
- package/dist/lib/_virtual/optionsFromStrings.js +4 -0
- package/dist/lib/_virtual/parseqs.js +4 -0
- package/dist/lib/_virtual/parseuri.js +4 -0
- package/dist/lib/_virtual/performance-now.js +4 -0
- package/dist/lib/_virtual/polling-fetch.js +4 -0
- package/dist/lib/_virtual/polling-xhr.js +4 -0
- package/dist/lib/_virtual/polling.js +4 -0
- package/dist/lib/_virtual/polynomial.js +4 -0
- package/dist/lib/_virtual/possibleConstructorReturn.js +4 -0
- package/dist/lib/_virtual/qrcode.js +4 -0
- package/dist/lib/_virtual/regenerator.js +4 -0
- package/dist/lib/_virtual/regeneratorAsync.js +4 -0
- package/dist/lib/_virtual/regeneratorAsyncGen.js +4 -0
- package/dist/lib/_virtual/regeneratorAsyncIterator.js +4 -0
- package/dist/lib/_virtual/regeneratorDefine.js +4 -0
- package/dist/lib/_virtual/regeneratorKeys.js +4 -0
- package/dist/lib/_virtual/regeneratorRuntime.js +4 -0
- package/dist/lib/_virtual/regeneratorValues.js +4 -0
- package/dist/lib/_virtual/regex.js +4 -0
- package/dist/lib/_virtual/segments.js +4 -0
- package/dist/lib/_virtual/setPrototypeOf.js +4 -0
- package/dist/lib/_virtual/shared-store.js +4 -0
- package/dist/lib/_virtual/shared.js +4 -0
- package/dist/lib/_virtual/slicedToArray.js +4 -0
- package/dist/lib/_virtual/socket.js +4 -0
- package/dist/lib/_virtual/socket2.js +4 -0
- package/dist/lib/_virtual/stackblur-es.js +5 -0
- package/dist/lib/_virtual/superPropBase.js +4 -0
- package/dist/lib/_virtual/svg-tag.js +4 -0
- package/dist/lib/_virtual/svg.js +4 -0
- package/dist/lib/_virtual/toConsumableArray.js +4 -0
- package/dist/lib/_virtual/toPrimitive.js +4 -0
- package/dist/lib/_virtual/toPropertyKey.js +4 -0
- package/dist/lib/_virtual/transport.js +4 -0
- package/dist/lib/_virtual/typeof.js +4 -0
- package/dist/lib/_virtual/unsupportedIterableToArray.js +4 -0
- package/dist/lib/_virtual/url.js +4 -0
- package/dist/lib/_virtual/util.js +4 -0
- package/dist/lib/_virtual/utils.js +4 -0
- package/dist/lib/_virtual/utils2.js +4 -0
- package/dist/lib/_virtual/version-check.js +4 -0
- package/dist/lib/_virtual/version.js +4 -0
- package/dist/lib/_virtual/vue-plugin-hiprint.js +4 -0
- package/dist/lib/_virtual/web.dom-collections.for-each.js +4 -0
- package/dist/lib/_virtual/web.dom-collections.iterator.js +4 -0
- package/dist/lib/_virtual/web.dom-collections.iterator2.js +3 -0
- package/dist/lib/_virtual/websocket.js +4 -0
- package/dist/lib/_virtual/webtransport.js +4 -0
- package/dist/lib/assets/chart-themes/theme1.d.ts +4 -0
- package/dist/lib/assets/chart-themes/theme1.js +7 -0
- package/dist/lib/assets/chart-themes/theme2.d.ts +4 -0
- package/dist/lib/assets/chart-themes/theme2.js +7 -0
- package/dist/lib/assets/chart-themes/theme3.d.ts +4 -0
- package/dist/lib/assets/chart-themes/theme3.js +7 -0
- package/dist/lib/assets/file.png.js +3 -0
- package/dist/lib/assets/folder.png.js +3 -0
- package/dist/lib/components/runtime/index.d.ts +5 -0
- package/dist/lib/components/runtime/utils/ai-chat-util.js +38 -0
- package/dist/lib/components/runtime/utils/api/api-util.d.ts +1 -0
- package/dist/lib/components/runtime/utils/api/api-util.js +9 -0
- package/dist/lib/components/runtime/utils/api/page-expose-util.d.ts +1 -0
- package/dist/lib/components/runtime/utils/api/page-expose-util.js +494 -0
- package/dist/lib/components/runtime/utils/assemblys-config.js +384 -0
- package/dist/lib/components/runtime/utils/barcode-util.d.ts +8 -0
- package/dist/lib/components/runtime/utils/barcode-util.js +36 -0
- package/dist/lib/components/runtime/utils/charts/chart-columnline-util.js +327 -0
- package/dist/lib/components/runtime/utils/charts/chart-gauge-util.js +77 -0
- package/dist/lib/components/runtime/utils/charts/chart-pie-util.js +162 -0
- package/dist/lib/components/runtime/utils/charts/chart-radar-util.js +130 -0
- package/dist/lib/components/runtime/utils/charts/chart-scatter-util.js +106 -0
- package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +113 -0
- package/dist/lib/components/runtime/utils/charts/chart-util.js +550 -0
- package/dist/lib/components/runtime/utils/common-util.d.ts +33 -0
- package/dist/lib/components/runtime/utils/common-util.js +219 -0
- package/dist/lib/components/runtime/utils/eventBus.d.ts +7 -0
- package/dist/lib/components/runtime/utils/eventBus.js +9 -0
- package/dist/lib/components/runtime/utils/events/event-util.d.ts +92 -0
- package/dist/lib/components/runtime/utils/events/event-util.js +752 -0
- package/dist/lib/components/runtime/utils/events/print-label.d.ts +5 -0
- package/dist/lib/components/runtime/utils/events/print-label.js +174 -0
- package/dist/lib/components/runtime/utils/events/standard-event.d.ts +96 -0
- package/dist/lib/components/runtime/utils/events/standard-event.js +2837 -0
- package/dist/lib/components/runtime/utils/events/validator-util.d.ts +25 -0
- package/dist/lib/components/runtime/utils/events/validator-util.js +730 -0
- package/dist/lib/components/runtime/utils/form/date-shortcuts.d.ts +7 -0
- package/dist/lib/components/runtime/utils/form/date-shortcuts.js +96 -0
- package/dist/lib/components/runtime/utils/form/scan-util.js +194 -0
- package/dist/lib/components/runtime/utils/global-refs.d.ts +65 -0
- package/dist/lib/components/runtime/utils/global-refs.js +88 -0
- package/dist/lib/components/runtime/utils/i18n-util.d.ts +1 -0
- package/dist/lib/components/runtime/utils/i18n-util.js +23 -0
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +247 -0
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +9 -0
- package/dist/lib/components/runtime/utils/page-helper-util.d.ts +174 -0
- package/dist/lib/components/runtime/utils/page-helper-util.js +767 -0
- package/dist/lib/components/runtime/utils/page-init-util.d.ts +48 -0
- package/dist/lib/components/runtime/utils/page-init-util.js +502 -0
- package/dist/lib/components/runtime/utils/page-permission-util.d.ts +26 -0
- package/dist/lib/components/runtime/utils/page-permission-util.js +717 -0
- package/dist/lib/components/runtime/utils/page-store.d.ts +46 -0
- package/dist/lib/components/runtime/utils/page-store.js +71 -0
- package/dist/lib/components/runtime/utils/store-util.d.ts +15 -0
- package/dist/lib/components/runtime/utils/store-util.js +17 -0
- package/dist/lib/components/runtime/utils/store.d.ts +2 -0
- package/dist/lib/components/runtime/utils/store.js +3 -0
- package/dist/lib/components/runtime/utils/table-utils.d.ts +34 -0
- package/dist/lib/components/runtime/utils/table-utils.js +126 -0
- package/dist/lib/components/runtime/utils/tree-utils.js +121 -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 +118 -0
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +55 -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 +135 -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 +19 -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 +110 -0
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +213 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +43 -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 +61 -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 +208 -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 +6 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +179 -0
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +121 -0
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +171 -0
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +122 -0
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +132 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +121 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/chart-table-util.js +786 -0
- package/dist/lib/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +43 -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 +63 -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 +169 -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 +63 -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 +631 -0
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +28 -0
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +163 -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/remove-signer-dialog.vue.d.ts +35 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +90 -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.d.ts +26 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-table.vue.js +76 -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.d.ts +35 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-transactor-dialog.vue.js +114 -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.d.ts +31 -0
- package/dist/lib/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +181 -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.d.ts +26 -0
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +122 -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 +6 -0
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +106 -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 +85 -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 +89 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/FixedBox.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/FixedBox.vue2.js +99 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/YxAffix.vue.d.ts +94 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +224 -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 +82 -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 +69 -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 +40 -0
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +272 -0
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +144 -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 +184 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +943 -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 +718 -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 +187 -0
- package/dist/lib/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +531 -0
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +22 -0
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +22 -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 +163 -0
- package/dist/lib/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +101 -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 +212 -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 +290 -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 +176 -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 +61 -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 +225 -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 +116 -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 +310 -0
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +176 -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 +109 -0
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +52 -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 +208 -0
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +287 -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 +364 -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 +54 -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 +168 -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 +132 -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 +116 -0
- package/dist/lib/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
- package/dist/lib/components/runtime/views/assemblys/home-chart-render.vue.js +169 -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.d.ts +17 -0
- package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +265 -0
- package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +209 -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 +47 -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 +50 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +6 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +64 -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 +58 -0
- package/dist/lib/components/runtime/views/home-chart.vue.d.ts +23 -0
- package/dist/lib/components/runtime/views/home-chart.vue.js +168 -0
- package/dist/lib/components/runtime/views/home-chart.vue2.js +3 -0
- package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +40 -0
- package/dist/lib/components/runtime/views/super-page-dialog.vue.js +154 -0
- package/dist/lib/components/runtime/views/super-page-dialog.vue3.js +4 -0
- package/dist/lib/components/runtime/views/super-page.vue.d.ts +126 -0
- package/dist/lib/components/runtime/views/super-page.vue.js +6 -0
- package/dist/lib/components/runtime/views/super-page.vue2.js +856 -0
- package/dist/lib/favicon.ico +0 -0
- package/dist/lib/i18n/langs/cn.js +78 -0
- package/dist/lib/i18n/langs/en.js +78 -0
- package/dist/lib/index.d.ts +16 -0
- package/dist/lib/index.js +30 -0
- package/dist/lib/style.css +1169 -0
- package/package.json +2 -2
|
@@ -0,0 +1,786 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pageHelperUtil = require("../../../../utils/page-helper-util.js");
|
|
4
|
+
const eventUtil = require("../../../../utils/events/event-util.js");
|
|
5
|
+
const chartUtil = require("../../../../utils/charts/chart-util.js");
|
|
6
|
+
class ExpressionEvaluator {
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param pageContext 页面上下文
|
|
10
|
+
* @param conditions 条件集合
|
|
11
|
+
* @param data 数据对象,一般是行数据
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
static evaluate(pageContext, conditions, data2) {
|
|
15
|
+
if (conditions && conditions.length > 0) {
|
|
16
|
+
const lastCondition = conditions[conditions.length - 1];
|
|
17
|
+
if (lastCondition.joinSign) {
|
|
18
|
+
lastCondition.joinSign = "";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const expressions = conditions.map((condition) => this.createExpression(pageContext, condition, data2));
|
|
22
|
+
const joinedExpression = expressions.join(" ");
|
|
23
|
+
return this.evaluateExpression(joinedExpression);
|
|
24
|
+
}
|
|
25
|
+
static createExpression(pageContext, condition, data2) {
|
|
26
|
+
const { propName, operator, propValue, leftBracket, rightBracket, joinSign, dataType } = condition;
|
|
27
|
+
if (!propName || propName === "") {
|
|
28
|
+
return "";
|
|
29
|
+
}
|
|
30
|
+
const value = pageHelperUtil.getValueFromVariable(pageContext.entity, propName, data2);
|
|
31
|
+
let expression2 = `${leftBracket} ${this.getComparisonExpression(value, condition, pageHelperUtil.getValueFromVariable(pageContext.entity, propValue, data2))} ${rightBracket}`;
|
|
32
|
+
if (joinSign) {
|
|
33
|
+
if (joinSign === "and" || joinSign === "AND") {
|
|
34
|
+
expression2 += "&&";
|
|
35
|
+
} else if (joinSign === "or" || joinSign === "OR") {
|
|
36
|
+
expression2 += "||";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return expression2.trim();
|
|
40
|
+
}
|
|
41
|
+
static getComparisonExpression(value, condition, propValue) {
|
|
42
|
+
const { dataType, variableIsNull } = condition;
|
|
43
|
+
let operator = condition.operator;
|
|
44
|
+
if (!operator) {
|
|
45
|
+
operator = "EQ";
|
|
46
|
+
}
|
|
47
|
+
let parsedValue = this.parseValue(value, dataType);
|
|
48
|
+
const parsedPropValue = this.parseValue(propValue, dataType);
|
|
49
|
+
if (parsedPropValue === void 0 || parsedPropValue === null) {
|
|
50
|
+
if (variableIsNull) {
|
|
51
|
+
if (parsedValue === void 0 || parsedValue === null) {
|
|
52
|
+
parsedValue = "null";
|
|
53
|
+
}
|
|
54
|
+
if ("null" === variableIsNull) {
|
|
55
|
+
return `${parsedValue} === null`;
|
|
56
|
+
} else if ("ignore" === variableIsNull) {
|
|
57
|
+
return "1=1";
|
|
58
|
+
} else if ("notequal" === variableIsNull) {
|
|
59
|
+
return "1!=1";
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
switch (operator) {
|
|
64
|
+
case "EQ":
|
|
65
|
+
return `${parsedValue} === ${parsedPropValue}`;
|
|
66
|
+
case "GT":
|
|
67
|
+
return `${parsedValue} > ${parsedPropValue}`;
|
|
68
|
+
case "LT":
|
|
69
|
+
return `${parsedValue} < ${parsedPropValue}`;
|
|
70
|
+
case "GET":
|
|
71
|
+
return `${parsedValue} >= ${parsedPropValue}`;
|
|
72
|
+
case "LET":
|
|
73
|
+
return `${parsedValue} <= ${parsedPropValue}`;
|
|
74
|
+
case "NET":
|
|
75
|
+
return `${parsedValue} !== ${parsedPropValue}`;
|
|
76
|
+
case "CONTAIN":
|
|
77
|
+
return `${parsedValue}.includes(${parsedPropValue})`;
|
|
78
|
+
case "NOT_CONTAIN":
|
|
79
|
+
return `!${parsedValue}.includes(${parsedPropValue})`;
|
|
80
|
+
case "IS_NULL":
|
|
81
|
+
return `${parsedValue} === null`;
|
|
82
|
+
case "IS_NOT_NULL":
|
|
83
|
+
return `${parsedValue} !== null`;
|
|
84
|
+
case "IN":
|
|
85
|
+
if (dataType === "TEXT") {
|
|
86
|
+
const parseValues = parsedPropValue.split(",");
|
|
87
|
+
return `${parseValues}.includes(${parsedValue})`;
|
|
88
|
+
}
|
|
89
|
+
return `[${parsedPropValue}].includes(${parsedValue})`;
|
|
90
|
+
default:
|
|
91
|
+
throw new Error(`比较符号不匹配: ${operator}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
static changeDataType(dataType) {
|
|
95
|
+
let resultDataType = dataType;
|
|
96
|
+
if (dataType) {
|
|
97
|
+
if (dataType === "TEXT") {
|
|
98
|
+
resultDataType = "string";
|
|
99
|
+
} else if (dataType === "DATE" || dataType === "TIME") {
|
|
100
|
+
resultDataType = "date";
|
|
101
|
+
} else if (dataType === "DOUBLE" || dataType === "FLOAT" || dataType === "INTEGER" || dataType === "LONG") {
|
|
102
|
+
resultDataType = "number";
|
|
103
|
+
} else if (dataType === "BOOLEAN") {
|
|
104
|
+
return "boolean";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return resultDataType;
|
|
108
|
+
}
|
|
109
|
+
static parseValue(value, dataType) {
|
|
110
|
+
dataType = this.changeDataType(dataType);
|
|
111
|
+
if (value === null || value === void 0) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
switch (dataType) {
|
|
115
|
+
case "number":
|
|
116
|
+
return getNumberValue(value);
|
|
117
|
+
case "date":
|
|
118
|
+
return new Date(value).getTime();
|
|
119
|
+
case "string":
|
|
120
|
+
return `"${value}"`;
|
|
121
|
+
case "boolean":
|
|
122
|
+
return value === "true" || value === true || value === 1;
|
|
123
|
+
default:
|
|
124
|
+
return `"${value}"`;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
static evaluateExpression(expression) {
|
|
128
|
+
try {
|
|
129
|
+
return eval(expression);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error("表达式错误:", expression, error);
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function getNumberValue(value) {
|
|
137
|
+
if (isNumber(value)) {
|
|
138
|
+
return Number(value);
|
|
139
|
+
} else {
|
|
140
|
+
if (value && value.indexOf(",") > 0) {
|
|
141
|
+
const values = value.split(",");
|
|
142
|
+
const result = [];
|
|
143
|
+
for (let i = 0; i < values.length; i++) {
|
|
144
|
+
result.push(Number(values[i]));
|
|
145
|
+
}
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
return value;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function isNumber(value) {
|
|
152
|
+
return typeof value === "number" && !isNaN(value);
|
|
153
|
+
}
|
|
154
|
+
function getSummaryTitleColumn(configure) {
|
|
155
|
+
var _a;
|
|
156
|
+
const result = {};
|
|
157
|
+
if (((_a = configure.props.summaries) == null ? void 0 : _a.titleColumn) && configure.props.summaries.titleColumn.length > 0) {
|
|
158
|
+
configure.props.summaries.titleColumn.forEach((item) => {
|
|
159
|
+
result[item.prop] = item;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
function getSummaryDataColumn(configure, type) {
|
|
165
|
+
var _a;
|
|
166
|
+
const result = {};
|
|
167
|
+
if (((_a = configure.props.summaries) == null ? void 0 : _a.dataColumn) && configure.props.summaries.dataColumn.length > 0) {
|
|
168
|
+
configure.props.summaries.dataColumn.forEach((item) => {
|
|
169
|
+
var _a2;
|
|
170
|
+
const columnConfigs = (_a2 = configure.items) == null ? void 0 : _a2.find((columnItem) => item.prop === columnItem.props.base.prop);
|
|
171
|
+
if (columnConfigs) {
|
|
172
|
+
if (type === "table" && columnConfigs.props.base.tableSummary) {
|
|
173
|
+
result[item.prop] = item;
|
|
174
|
+
} else if (type === "group" && columnConfigs.props.base.groupSummary) {
|
|
175
|
+
result[item.prop] = item;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
return result;
|
|
181
|
+
}
|
|
182
|
+
function summaryStatistics(summaryColumn, data2, prop, pageContext) {
|
|
183
|
+
let sumsIndex = "";
|
|
184
|
+
const summaryMode = summaryColumn.summaryMode;
|
|
185
|
+
const values = data2.map((item) => Number(item[prop])).filter((value) => !Number.isNaN(value));
|
|
186
|
+
if (values.length > 0) {
|
|
187
|
+
if (summaryMode === "custom") {
|
|
188
|
+
const func = eventUtil.getCustomFunc(pageContext, summaryColumn.customFunc);
|
|
189
|
+
if (func) {
|
|
190
|
+
try {
|
|
191
|
+
const resultValue = func.apply(func, [{ data: data2, prop }]);
|
|
192
|
+
if (resultValue) {
|
|
193
|
+
sumsIndex = ` ${resultValue}`;
|
|
194
|
+
} else {
|
|
195
|
+
sumsIndex = " N/A";
|
|
196
|
+
}
|
|
197
|
+
} catch (error) {
|
|
198
|
+
console.error("自定义函数脚本错误:", data2, error);
|
|
199
|
+
}
|
|
200
|
+
} else {
|
|
201
|
+
sumsIndex = " N/A";
|
|
202
|
+
}
|
|
203
|
+
} else {
|
|
204
|
+
switch (summaryMode) {
|
|
205
|
+
case "sum":
|
|
206
|
+
sumsIndex = ` ${values.reduce((prev, curr) => prev + curr, 0)}`;
|
|
207
|
+
break;
|
|
208
|
+
case "avg":
|
|
209
|
+
sumsIndex = ` ${values.reduce((prev, curr) => prev + curr, 0) / values.length}`;
|
|
210
|
+
break;
|
|
211
|
+
case "min":
|
|
212
|
+
sumsIndex = ` ${Math.min(...values)}`;
|
|
213
|
+
break;
|
|
214
|
+
case "max":
|
|
215
|
+
sumsIndex = ` ${Math.max(...values)}`;
|
|
216
|
+
break;
|
|
217
|
+
default:
|
|
218
|
+
sumsIndex = " N/A";
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
} else {
|
|
222
|
+
sumsIndex = " N/A";
|
|
223
|
+
}
|
|
224
|
+
return sumsIndex;
|
|
225
|
+
}
|
|
226
|
+
function replacePlaceholders(template, data2) {
|
|
227
|
+
if (template) {
|
|
228
|
+
return template.replace(/\$\{row\.(\w+)\}/g, (match, p1) => {
|
|
229
|
+
return Object.prototype.hasOwnProperty.call(data2, p1) ? data2[p1] : "";
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
function getHeaderCellStyleUtil(data2, runtimeStyle, props) {
|
|
234
|
+
var _a;
|
|
235
|
+
const headerStyle = {};
|
|
236
|
+
if (data2.column.property) {
|
|
237
|
+
(_a = runtimeStyle.titleStyle) == null ? void 0 : _a.forEach((item) => {
|
|
238
|
+
if (item.field && item.field.includes(data2.column.property)) {
|
|
239
|
+
if (item.scopeFunc) {
|
|
240
|
+
const func = eventUtil.getCustomFunc(props.pageContext, item.scopeFunc);
|
|
241
|
+
if (func) {
|
|
242
|
+
try {
|
|
243
|
+
const funcResult = func.apply(func, [{ item, data: data2 }]);
|
|
244
|
+
if (funcResult !== false) {
|
|
245
|
+
copyStyle(headerStyle, item);
|
|
246
|
+
}
|
|
247
|
+
} catch (error) {
|
|
248
|
+
console.error("自定义函数脚本错误:", item, data2, error);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
} else {
|
|
252
|
+
copyStyle(headerStyle, item);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
const cellTitleStytle = getCellStyleUtil(data2, runtimeStyle.cellTitleStyle, props);
|
|
258
|
+
if (cellTitleStytle) {
|
|
259
|
+
Object.assign(headerStyle, cellTitleStytle);
|
|
260
|
+
}
|
|
261
|
+
return headerStyle;
|
|
262
|
+
}
|
|
263
|
+
function getRowStyleUtil(data2, groupSummaryDataRowIndex, props) {
|
|
264
|
+
const returnStyle = {};
|
|
265
|
+
if (props.configure.style.rowStyle) {
|
|
266
|
+
for (let i = 0; i < props.configure.style.rowStyle.length; i++) {
|
|
267
|
+
const rowStyle = props.configure.style.rowStyle[i];
|
|
268
|
+
if (rowStyle.scopeFunc) {
|
|
269
|
+
const func = eventUtil.getCustomFunc(props.pageContext, rowStyle.scopeFunc);
|
|
270
|
+
if (func) {
|
|
271
|
+
try {
|
|
272
|
+
const funcResult = func.apply(func, [{ data: data2 }]);
|
|
273
|
+
if (funcResult !== void 0 && funcResult !== null && funcResult !== false) {
|
|
274
|
+
copyStyle(returnStyle, rowStyle);
|
|
275
|
+
}
|
|
276
|
+
} catch (error) {
|
|
277
|
+
console.error("自定义函数脚本错误:", data2, error);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
} else if (rowStyle.matchingCondition) {
|
|
281
|
+
const result = ExpressionEvaluator.evaluate(props.pageContext, rowStyle.matchingCondition, data2.row);
|
|
282
|
+
if (result || result === void 0) {
|
|
283
|
+
copyStyle(returnStyle, rowStyle);
|
|
284
|
+
}
|
|
285
|
+
} else {
|
|
286
|
+
copyStyle(returnStyle, rowStyle);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (groupSummaryDataRowIndex && groupSummaryDataRowIndex.length > 0 && groupSummaryDataRowIndex.indexOf(data2.rowIndex) !== -1) {
|
|
291
|
+
const result = {};
|
|
292
|
+
if (props.configure.style.collectStyle && props.configure.style.collectStyle.length > 0) {
|
|
293
|
+
for (let i = 0; i < props.configure.style.collectStyle.length; i++) {
|
|
294
|
+
const collectStyle = props.configure.style.collectStyle[i];
|
|
295
|
+
copyStyle(result, collectStyle);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (Object.keys(result).length === 0) {
|
|
299
|
+
result["background-color"] = "var(--el-table-row-hover-bg-color)";
|
|
300
|
+
}
|
|
301
|
+
return result;
|
|
302
|
+
}
|
|
303
|
+
return returnStyle;
|
|
304
|
+
}
|
|
305
|
+
function getCellStyleUtil(data2, cellStyles, props) {
|
|
306
|
+
const cellStyle = {};
|
|
307
|
+
if (cellStyles) {
|
|
308
|
+
for (let i = 0; i < cellStyles.length; i++) {
|
|
309
|
+
const columnsStyleSetting = cellStyles[i];
|
|
310
|
+
if (isSetStyle(columnsStyleSetting)) {
|
|
311
|
+
if (columnsStyleSetting.scopeFunc) {
|
|
312
|
+
const func = eventUtil.getCustomFunc(props.pageContext, columnsStyleSetting.scopeFunc);
|
|
313
|
+
if (func) {
|
|
314
|
+
try {
|
|
315
|
+
const funcResult = func.apply(func, [{ data: data2 }]);
|
|
316
|
+
if (funcResult !== false) {
|
|
317
|
+
copyStyle(cellStyle, columnsStyleSetting);
|
|
318
|
+
}
|
|
319
|
+
} catch (error) {
|
|
320
|
+
console.error("自定义函数脚本错误:", data2, error);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
} else if (columnsStyleSetting.matchingCondition) {
|
|
324
|
+
const result = ExpressionEvaluator.evaluate(
|
|
325
|
+
props.pageContext,
|
|
326
|
+
columnsStyleSetting.matchingCondition,
|
|
327
|
+
data2.row
|
|
328
|
+
);
|
|
329
|
+
if (result || result === void 0) {
|
|
330
|
+
copyStyle(cellStyle, columnsStyleSetting);
|
|
331
|
+
}
|
|
332
|
+
} else {
|
|
333
|
+
copyStyle(cellStyle, columnsStyleSetting);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return cellStyle;
|
|
339
|
+
}
|
|
340
|
+
function isSetStyle(columnsStyleSetting) {
|
|
341
|
+
let customStyle;
|
|
342
|
+
if (columnsStyleSetting.customStyle) {
|
|
343
|
+
customStyle = JSON.parse(columnsStyleSetting.customStyle);
|
|
344
|
+
}
|
|
345
|
+
if (columnsStyleSetting.style && Object.keys(columnsStyleSetting.style).length > 0 || customStyle && Object.keys(customStyle).length > 0) {
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
function copyStyle(target, source) {
|
|
351
|
+
Object.assign(target, source.style);
|
|
352
|
+
if (source.customStyle) {
|
|
353
|
+
Object.assign(target, JSON.parse(source.customStyle));
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
function rowDataToColumn(data2, configure, sourceTableColumnsConfig) {
|
|
357
|
+
const groupByFields = configure.props.dataOrigin.groupField;
|
|
358
|
+
const titleColumns = configure.props.dataOrigin.rowToColumn.titleColumns;
|
|
359
|
+
const dataColumns = configure.props.dataOrigin.rowToColumn.dataColumns;
|
|
360
|
+
const result = [];
|
|
361
|
+
const groupedData = {};
|
|
362
|
+
if (groupByFields && groupByFields.length > 0) {
|
|
363
|
+
data2.forEach((item) => {
|
|
364
|
+
const key2 = groupByFields.map((field) => item[field]).join("|");
|
|
365
|
+
if (!groupedData[key2]) {
|
|
366
|
+
const group = {};
|
|
367
|
+
groupByFields.forEach((field) => group[field] = item[field]);
|
|
368
|
+
groupedData[key2] = group;
|
|
369
|
+
result.push(group);
|
|
370
|
+
}
|
|
371
|
+
dataColumns.forEach((valueField) => {
|
|
372
|
+
const columnNameParts = titleColumns.map((field) => item[field]);
|
|
373
|
+
const columnName = `${columnNameParts.join("")}${valueField}`;
|
|
374
|
+
groupedData[key2][columnName] = item[valueField];
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
} else {
|
|
378
|
+
const titleColProp = [];
|
|
379
|
+
data2.forEach((item) => {
|
|
380
|
+
titleColumns.forEach((titleColumn) => {
|
|
381
|
+
if (item[titleColumn]) {
|
|
382
|
+
titleColProp.push(item[titleColumn]);
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
dataColumns.forEach((dataColumn) => {
|
|
387
|
+
const rowData = {};
|
|
388
|
+
const sourceDataColumns = sourceTableColumnsConfig.find((column) => {
|
|
389
|
+
var _a, _b;
|
|
390
|
+
return ((_b = (_a = column.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop) === dataColumn;
|
|
391
|
+
});
|
|
392
|
+
if (sourceDataColumns) {
|
|
393
|
+
rowData.$GroupColumn = sourceDataColumns.props.base.name;
|
|
394
|
+
}
|
|
395
|
+
data2.forEach((item) => {
|
|
396
|
+
titleColumns.forEach((titleProp) => {
|
|
397
|
+
const prop = item[titleProp];
|
|
398
|
+
const value = item[dataColumn];
|
|
399
|
+
rowData[prop] = value;
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
result.push(rowData);
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
return result;
|
|
406
|
+
}
|
|
407
|
+
function colDataToRow(data2, configure) {
|
|
408
|
+
const groupByFields = configure.props.dataOrigin.groupField;
|
|
409
|
+
const titleColumns = configure.props.dataOrigin.columnToRow.titleColumns;
|
|
410
|
+
const dataColumns = configure.props.dataOrigin.columnToRow.dataColumns;
|
|
411
|
+
const transColumns = configure.props.dataOrigin.columnToRow.transColumns;
|
|
412
|
+
const dataColumnsMapping = configure.props.dataOrigin.columnToRow.dataColumnsMapping;
|
|
413
|
+
if (data2.length === 0) {
|
|
414
|
+
return data2;
|
|
415
|
+
}
|
|
416
|
+
const result = [];
|
|
417
|
+
const newData = groupBy(data2, groupByFields);
|
|
418
|
+
const dataColumnsConfig = dataColumns.reduce((max, current) => {
|
|
419
|
+
return current.columns.length > max.columns.length ? current : max;
|
|
420
|
+
}, dataColumns[0]);
|
|
421
|
+
const dataColumnsAndNewColumnMapping = dataColumns.reduce((acc, item) => {
|
|
422
|
+
item.columns.forEach((column) => {
|
|
423
|
+
acc[column] = item.prop;
|
|
424
|
+
});
|
|
425
|
+
return acc;
|
|
426
|
+
}, {});
|
|
427
|
+
newData.forEach((item) => {
|
|
428
|
+
dataColumnsConfig.columns.forEach((col) => {
|
|
429
|
+
const newColumnsProp = dataColumnsConfig.prop;
|
|
430
|
+
const dataRow = {};
|
|
431
|
+
groupByFields.forEach((field) => {
|
|
432
|
+
dataRow[field] = item[field];
|
|
433
|
+
});
|
|
434
|
+
dataRow[newColumnsProp] = item[col];
|
|
435
|
+
if (dataColumns.length > 1) {
|
|
436
|
+
const columnMapping = dataColumnsMapping.find((item2) => item2.props.includes(col));
|
|
437
|
+
if (columnMapping && columnMapping.props.length > 1) {
|
|
438
|
+
columnMapping.props.forEach((prop) => {
|
|
439
|
+
if (prop !== col && dataColumnsAndNewColumnMapping[prop]) {
|
|
440
|
+
dataRow[dataColumnsAndNewColumnMapping[prop]] = item[prop];
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
titleColumns.forEach((titleCol) => {
|
|
446
|
+
const sourceTitleRenameConfigs = transColumns.filter((transCol) => transCol.relatedTitle === titleCol.prop);
|
|
447
|
+
let rename = false;
|
|
448
|
+
if (sourceTitleRenameConfigs && sourceTitleRenameConfigs.length > 0) {
|
|
449
|
+
sourceTitleRenameConfigs.forEach((item2) => {
|
|
450
|
+
if (item2.columns.includes(col)) {
|
|
451
|
+
dataRow[titleCol.prop] = item2.label;
|
|
452
|
+
rename = true;
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
if (!rename) {
|
|
458
|
+
dataRow[titleCol.prop] = col;
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
result.push(dataRow);
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
return result;
|
|
465
|
+
}
|
|
466
|
+
function getColumnToRowTableConfig(configure) {
|
|
467
|
+
const sourceConfig = configure.items;
|
|
468
|
+
const groupField = configure.props.dataOrigin.groupField;
|
|
469
|
+
const titleColumns = configure.props.dataOrigin.columnToRow.titleColumns;
|
|
470
|
+
const dataColumns = configure.props.dataOrigin.columnToRow.dataColumns;
|
|
471
|
+
const newTableColumns = [];
|
|
472
|
+
if (groupField && groupField.length > 0) {
|
|
473
|
+
groupField.forEach((field) => {
|
|
474
|
+
if (sourceConfig) {
|
|
475
|
+
const column = sourceConfig.find((item) => item.props.base.prop === field);
|
|
476
|
+
if (column) {
|
|
477
|
+
newTableColumns.push(column);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
const newCols = [...titleColumns, ...dataColumns];
|
|
483
|
+
newCols.forEach((field) => {
|
|
484
|
+
if (sourceConfig) {
|
|
485
|
+
const column = sourceConfig.find((item) => item.props.base.prop === field);
|
|
486
|
+
if (column) {
|
|
487
|
+
newTableColumns.push(column);
|
|
488
|
+
} else {
|
|
489
|
+
newTableColumns.push({
|
|
490
|
+
uuid: (/* @__PURE__ */ new Date()).getTime(),
|
|
491
|
+
// 生成新的UUID
|
|
492
|
+
name: "",
|
|
493
|
+
props: {
|
|
494
|
+
base: {
|
|
495
|
+
prop: field.prop,
|
|
496
|
+
name: field.title,
|
|
497
|
+
sortable: true,
|
|
498
|
+
headerAlign: "center",
|
|
499
|
+
align: "center",
|
|
500
|
+
fixed: false,
|
|
501
|
+
visible: true,
|
|
502
|
+
dataType: "string"
|
|
503
|
+
},
|
|
504
|
+
format: {},
|
|
505
|
+
size: {
|
|
506
|
+
pc: {}
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
style: {},
|
|
510
|
+
componentIndex: 0,
|
|
511
|
+
// 根据实际情况设置
|
|
512
|
+
runtime: {
|
|
513
|
+
common: {
|
|
514
|
+
class: "",
|
|
515
|
+
style: {
|
|
516
|
+
pc_style: {},
|
|
517
|
+
pc_class: ""
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
return newTableColumns;
|
|
526
|
+
}
|
|
527
|
+
function groupBy(data2, groupFields) {
|
|
528
|
+
const grouped = {};
|
|
529
|
+
data2.forEach((item) => {
|
|
530
|
+
const key2 = groupFields.map((field) => item[field]).join("|");
|
|
531
|
+
if (!grouped[key2]) {
|
|
532
|
+
grouped[key2] = {
|
|
533
|
+
...item,
|
|
534
|
+
// 复制所有字段
|
|
535
|
+
records: []
|
|
536
|
+
// 初始化记录数组
|
|
537
|
+
};
|
|
538
|
+
groupFields.forEach((field, index2) => {
|
|
539
|
+
grouped[key2][field] = item[field];
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
grouped[key2].records.push(item);
|
|
543
|
+
});
|
|
544
|
+
return Object.values(grouped).map((group) => ({
|
|
545
|
+
...group,
|
|
546
|
+
// 复制所有分组信息
|
|
547
|
+
records: void 0
|
|
548
|
+
// 移除records字段,因为不需要展示
|
|
549
|
+
}));
|
|
550
|
+
}
|
|
551
|
+
function getIndexColumn() {
|
|
552
|
+
return {
|
|
553
|
+
props: {
|
|
554
|
+
base: {
|
|
555
|
+
name: "序号",
|
|
556
|
+
prop: "$index",
|
|
557
|
+
columnWidth: 80,
|
|
558
|
+
sortable: true,
|
|
559
|
+
visible: true,
|
|
560
|
+
displayOrder: 1,
|
|
561
|
+
alignTitle: "center",
|
|
562
|
+
alignContent: "center"
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
events: [],
|
|
566
|
+
style: {
|
|
567
|
+
titleFont: {},
|
|
568
|
+
contentFont: {},
|
|
569
|
+
width: {},
|
|
570
|
+
background: {},
|
|
571
|
+
tableCell: [{ type: "", model: "" }],
|
|
572
|
+
conentPadding: {},
|
|
573
|
+
tittlePadding: {},
|
|
574
|
+
border: {},
|
|
575
|
+
shadow: {},
|
|
576
|
+
tittleClass: ""
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
function getNewColumnConfig(prop, name, displayOrder, dataType) {
|
|
581
|
+
return {
|
|
582
|
+
uuid: (/* @__PURE__ */ new Date()).getTime(),
|
|
583
|
+
// 生成新的UUID
|
|
584
|
+
name: "",
|
|
585
|
+
props: {
|
|
586
|
+
base: {
|
|
587
|
+
prop,
|
|
588
|
+
name,
|
|
589
|
+
displayOrder,
|
|
590
|
+
// 更新显示顺序
|
|
591
|
+
sortable: true,
|
|
592
|
+
headerAlign: "center",
|
|
593
|
+
align: "center",
|
|
594
|
+
fixed: false,
|
|
595
|
+
visible: true,
|
|
596
|
+
dataType
|
|
597
|
+
},
|
|
598
|
+
format: {},
|
|
599
|
+
size: {
|
|
600
|
+
pc: {}
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
style: {},
|
|
604
|
+
componentIndex: 0,
|
|
605
|
+
// 根据实际情况设置
|
|
606
|
+
runtime: {
|
|
607
|
+
common: {
|
|
608
|
+
class: "",
|
|
609
|
+
style: {
|
|
610
|
+
pc_style: {},
|
|
611
|
+
pc_class: ""
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
function computeFormula(itemConfs, datas, entity) {
|
|
618
|
+
Object.keys(itemConfs).forEach((key) => {
|
|
619
|
+
const paramNames = pageHelperUtil.getParamNames(itemConfs[key]);
|
|
620
|
+
datas.forEach((data, index) => {
|
|
621
|
+
const totalValueMap = {};
|
|
622
|
+
for (const paramName of paramNames) {
|
|
623
|
+
if (paramName.startsWith("${min.")) {
|
|
624
|
+
totalValueMap[paramName] = chartUtil.getMinValue(datas, getFieldName(paramName));
|
|
625
|
+
} else if (paramName.startsWith("${max.")) {
|
|
626
|
+
totalValueMap[paramName] = chartUtil.getMaxValue(datas, getFieldName(paramName));
|
|
627
|
+
} else if (paramName.startsWith("${sum.")) {
|
|
628
|
+
totalValueMap[paramName] = chartUtil.getSumValue(datas, getFieldName(paramName));
|
|
629
|
+
} else if (paramName.startsWith("${avg.")) {
|
|
630
|
+
totalValueMap[paramName] = chartUtil.getAvgValue(datas, getFieldName(paramName));
|
|
631
|
+
} else if (paramName.startsWith("${add.")) {
|
|
632
|
+
const fieldName = getFieldName(paramName);
|
|
633
|
+
let currentRowValue = 0;
|
|
634
|
+
try {
|
|
635
|
+
currentRowValue = Number(data[fieldName]);
|
|
636
|
+
datas.slice(0, index).forEach((item) => {
|
|
637
|
+
currentRowValue += Number(item[fieldName]);
|
|
638
|
+
});
|
|
639
|
+
} catch (e) {
|
|
640
|
+
console.error("计算错误:", e);
|
|
641
|
+
currentRowValue = 0;
|
|
642
|
+
}
|
|
643
|
+
totalValueMap[paramName] = currentRowValue;
|
|
644
|
+
} else if (paramName.startsWith("${page.") || paramName.startsWith("${data.") || paramName.startsWith("${row.") || paramName.startsWith("${request.") || paramName.startsWith("${context.") || paramName.startsWith("${system.") || paramName.startsWith("${fixed.")) {
|
|
645
|
+
totalValueMap[paramName] = pageHelperUtil.getValueFromVariable(entity, paramName, data);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
let expr = itemConfs[key];
|
|
649
|
+
Object.keys(totalValueMap).forEach((exprParam) => {
|
|
650
|
+
if (expr.indexOf(exprParam) > -1) {
|
|
651
|
+
expr = expr.replaceAll(exprParam, totalValueMap[exprParam]);
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
for (const paramName of paramNames) {
|
|
655
|
+
if (expr.indexOf(paramName) > -1) {
|
|
656
|
+
expr = expr.replaceAll(paramName, 0);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
try {
|
|
660
|
+
data[key] = eval(expr);
|
|
661
|
+
} catch (e) {
|
|
662
|
+
console.error(itemConfs[key] + " 计算错误, 替换后表达式为:" + expr, e);
|
|
663
|
+
data[key] = 0;
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
function getFieldName(paramName) {
|
|
669
|
+
return paramName.substring(6, paramName.length - 1);
|
|
670
|
+
}
|
|
671
|
+
function formatColContent(row, format, column, pageContext, configure) {
|
|
672
|
+
const value = row[column.props.base.prop];
|
|
673
|
+
switch (format.type) {
|
|
674
|
+
case "number":
|
|
675
|
+
return formatNumber(value, format);
|
|
676
|
+
case "currency":
|
|
677
|
+
return formatCurrency(value, format);
|
|
678
|
+
case "percent":
|
|
679
|
+
return formatPercent(value, format);
|
|
680
|
+
case "custom":
|
|
681
|
+
return formatCustomFunc(row, format, column, pageContext, configure);
|
|
682
|
+
default:
|
|
683
|
+
return value;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
function formatNumber(value, format) {
|
|
687
|
+
let formattedValue = value;
|
|
688
|
+
if (!formattedValue) {
|
|
689
|
+
formattedValue = 0;
|
|
690
|
+
}
|
|
691
|
+
if (format.scientific) {
|
|
692
|
+
formattedValue = Number(value).toExponential(format.scientificNum);
|
|
693
|
+
}
|
|
694
|
+
if (format.decimalDigit) {
|
|
695
|
+
formattedValue = Number(value).toFixed(format.decimalDigit);
|
|
696
|
+
}
|
|
697
|
+
if (format.thousandsSeparator) {
|
|
698
|
+
formattedValue = formattedValue.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
699
|
+
}
|
|
700
|
+
if (format.symbol) {
|
|
701
|
+
formattedValue = `${format.symbol} ${formattedValue}`;
|
|
702
|
+
}
|
|
703
|
+
return formattedValue;
|
|
704
|
+
}
|
|
705
|
+
function formatCurrency(value, format) {
|
|
706
|
+
let formattedValue = value;
|
|
707
|
+
if (!formattedValue) {
|
|
708
|
+
formattedValue = 0;
|
|
709
|
+
}
|
|
710
|
+
if (format.decimalDigit) {
|
|
711
|
+
formattedValue = Number(value).toFixed(format.decimalDigit);
|
|
712
|
+
}
|
|
713
|
+
if (format.symbol) {
|
|
714
|
+
formattedValue = `${format.symbol} ${formattedValue}`;
|
|
715
|
+
}
|
|
716
|
+
return formattedValue;
|
|
717
|
+
}
|
|
718
|
+
function formatPercent(value, format) {
|
|
719
|
+
let formattedValue = value;
|
|
720
|
+
if (!formattedValue) {
|
|
721
|
+
formattedValue = 0;
|
|
722
|
+
}
|
|
723
|
+
if (format.decimalDigit) {
|
|
724
|
+
formattedValue = Number(value).toFixed(format.decimalDigit);
|
|
725
|
+
}
|
|
726
|
+
return formattedValue + " %";
|
|
727
|
+
}
|
|
728
|
+
function formatCustomFunc(row, format, column, pageContext, configure) {
|
|
729
|
+
const func = eventUtil.getCustomFunc(pageContext, format.customFunc);
|
|
730
|
+
if (func) {
|
|
731
|
+
try {
|
|
732
|
+
const resultValue = func.apply(func, [
|
|
733
|
+
{
|
|
734
|
+
pageContext,
|
|
735
|
+
configureObj: configure,
|
|
736
|
+
row,
|
|
737
|
+
prop: column.props.base.prop
|
|
738
|
+
}
|
|
739
|
+
]);
|
|
740
|
+
return resultValue;
|
|
741
|
+
} catch (error) {
|
|
742
|
+
console.error("自定义函数脚本错误:", row, error);
|
|
743
|
+
}
|
|
744
|
+
return "";
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
function mergeRowByProperty(row, column, rowIndex, property, data2) {
|
|
748
|
+
const currentValue = row[property];
|
|
749
|
+
let spanCount = 1;
|
|
750
|
+
let isFirstOccurrence = true;
|
|
751
|
+
for (let i = rowIndex - 1; i >= 0; i--) {
|
|
752
|
+
if (data2[i][property] === currentValue) {
|
|
753
|
+
isFirstOccurrence = false;
|
|
754
|
+
break;
|
|
755
|
+
} else {
|
|
756
|
+
break;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
if (!isFirstOccurrence) {
|
|
760
|
+
return [0, 0];
|
|
761
|
+
}
|
|
762
|
+
for (let i = rowIndex + 1; i < data2.length; i++) {
|
|
763
|
+
if (data2[i][property] === currentValue) {
|
|
764
|
+
spanCount++;
|
|
765
|
+
} else {
|
|
766
|
+
break;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
return [spanCount, 1];
|
|
770
|
+
}
|
|
771
|
+
exports.ExpressionEvaluator = ExpressionEvaluator;
|
|
772
|
+
exports.colDataToRow = colDataToRow;
|
|
773
|
+
exports.computeFormula = computeFormula;
|
|
774
|
+
exports.formatColContent = formatColContent;
|
|
775
|
+
exports.getCellStyleUtil = getCellStyleUtil;
|
|
776
|
+
exports.getColumnToRowTableConfig = getColumnToRowTableConfig;
|
|
777
|
+
exports.getHeaderCellStyleUtil = getHeaderCellStyleUtil;
|
|
778
|
+
exports.getIndexColumn = getIndexColumn;
|
|
779
|
+
exports.getNewColumnConfig = getNewColumnConfig;
|
|
780
|
+
exports.getRowStyleUtil = getRowStyleUtil;
|
|
781
|
+
exports.getSummaryDataColumn = getSummaryDataColumn;
|
|
782
|
+
exports.getSummaryTitleColumn = getSummaryTitleColumn;
|
|
783
|
+
exports.mergeRowByProperty = mergeRowByProperty;
|
|
784
|
+
exports.replacePlaceholders = replacePlaceholders;
|
|
785
|
+
exports.rowDataToColumn = rowDataToColumn;
|
|
786
|
+
exports.summaryStatistics = summaryStatistics;
|