cloud-web-corejs 1.0.54-dev.50 → 1.0.54-dev.501
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/package.json +13 -3
- package/src/App.vue +29 -33
- package/src/api/user.js +16 -0
- package/src/components/Qrcode/fileParse.vue +0 -1
- package/src/components/Tinymce/index.vue +112 -71
- package/src/components/VabUpload/index.js +49 -1
- package/src/components/VabUpload/mixins.js +2 -2
- package/src/components/VabUpload/propertiesDialog.vue +1 -1
- package/src/components/VabUpload/view.vue +209 -120
- package/src/components/advancedSearchDialog/mixins.js +1 -1
- package/src/components/baseAttachment/index.vue +49 -40
- package/src/components/baseAttachment/mixins.js +295 -1
- package/src/components/baseInputExport/index.vue +19 -12
- package/src/components/baseInputExport/mixins.js +389 -1
- package/src/components/baseTabs/mixins.js +166 -1
- package/src/components/errorMsg/mixins.js +6 -5
- package/src/components/excelExport/button.vue +57 -4
- package/src/components/excelExport/index.js +48 -6
- package/src/components/excelExport/index.vue +56 -2
- package/src/components/excelExport/mixins.js +965 -2
- package/src/components/excelImport/mixins.js +2 -1
- package/src/components/fileLibrary/fileObjAuthDialog.vue +179 -89
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
- package/src/components/fileLibrary/filterDialog.vue +454 -0
- package/src/components/fileLibrary/index.vue +594 -254
- package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +339 -211
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +31 -27
- package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +4 -4
- package/src/components/fileLibrary/mixins/indexMixins.js +220 -101
- package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +64 -4
- package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +3 -3
- package/src/components/fileLibrary/propertiesDialog.vue +113 -74
- package/src/components/fileLibrary/shareDialog.vue +1 -1
- package/src/components/formOplog/mixins.js +1 -1
- package/src/components/jsonImport/index.js +1 -1
- package/src/components/jsonImport/mixins.js +2 -1
- package/src/components/langImport/mixins.js +17 -16
- package/src/components/obsUpload/index.js +1 -0
- package/src/components/obsUpload/index.vue +231 -0
- package/src/components/obsUpload/mixins.js +8 -0
- package/src/components/scriptDescription/button.vue +12 -4
- package/src/components/scriptTest/mixins.js +1 -1
- package/src/components/statusTag/mixins.js +1 -1
- package/src/components/table/CellSlot.vue +1 -0
- package/src/components/table/index.js +12 -11
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
- package/src/components/table/tableForm.vue +99 -63
- package/src/components/table/tableFormMixin.js +1 -1
- package/src/components/table/util/index.js +328 -0
- package/src/components/table/vxeFilter/mixin.js +6 -6
- package/src/components/tempStorage/index.vue +76 -55
- package/src/components/tempStorage/tempStorageDialog.vue +179 -54
- package/src/components/vb-tabs/x-tabs.vue +57 -30
- package/src/components/wf/addOpinionButton.vue +57 -0
- package/src/components/wf/content.vue +834 -362
- package/src/components/wf/mixins/addOpinionButton.js +3 -0
- package/src/components/wf/mixins/setCandidateButton.js +6 -0
- package/src/components/wf/mixins/setCandidateDialog.js +2 -1
- package/src/components/wf/mixins/setCandidateDialog2.js +6 -0
- package/src/components/wf/mixins/wfFlowEleScriptDialog.js +3 -0
- package/src/components/wf/mixins/wfTaskUserRangeDialog.js +3 -0
- package/src/components/wf/setCandidateButton.vue +40 -0
- package/src/components/wf/setCandidateDialog.vue +10 -0
- package/src/components/wf/setCandidateDialog2.vue +105 -0
- package/src/components/wf/wf.js +1 -1
- package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
- package/src/components/wf/wfStartDialog.vue +66 -42
- package/src/components/wf/wfTaskUserRangeDialog.vue +65 -0
- package/src/components/wf/wfUtil.js +279 -1
- package/src/components/xform/form-designer/designer.js +5 -3
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +419 -0
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +3 -3
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +9 -8
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +301 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +82 -49
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
- package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +38 -7
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1759 -8
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +120 -72
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +34 -5
- package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
- package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +40 -28
- package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +18 -7
- package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +89 -0
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +14 -2
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +30 -4
- package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +77 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +106 -0
- package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1650 -16
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +646 -379
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +962 -0
- package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +6 -2
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +22 -11
- package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +90 -0
- package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +49 -8
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +61 -88
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +13 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +179 -0
- package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
- package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +114 -81
- package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +186 -0
- package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +44 -27
- package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +116 -0
- package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +154 -47
- package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +26 -6
- package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +24 -9
- package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
- package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +12 -1
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +31 -17
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +7 -2
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +99 -0
- package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +147 -0
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +46 -34
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +3 -171
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +260 -58
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +753 -0
- package/src/components/xform/form-designer/indexMixin.js +3 -772
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +956 -159
- package/src/components/xform/form-designer/setting-panel/index.vue +4 -0
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +537 -302
- package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +946 -1042
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1127 -512
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +31 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +35 -20
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +64 -5
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +77 -20
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +44 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +33 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +66 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +89 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +721 -466
- package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +20 -11
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +124 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +349 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +10 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +42 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +305 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +372 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +263 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +32 -11
- package/src/components/xform/form-designer/toolbar-panel/index.vue +12 -11
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/widget-panel/index.vue +21 -1
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +19 -18
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1653 -869
- package/src/components/xform/form-render/container-item/containerItemMixin.js +12 -11
- package/src/components/xform/form-render/container-item/data-table-item.vue +194 -199
- package/src/components/xform/form-render/container-item/data-table-mixin.js +22 -18
- package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
- package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
- package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -9
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +1 -8
- package/src/components/xform/form-render/container-item/tab-item.vue +62 -25
- package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
- package/src/components/xform/form-render/container-item/table-item.vue +4 -2
- package/src/components/xform/form-render/container-item/table2-cell-item.vue +53 -34
- package/src/components/xform/form-render/container-item/table2-item.vue +141 -88
- package/src/components/xform/form-render/container-item/tree-item.vue +32 -11
- package/src/components/xform/form-render/index.vue +69 -20
- package/src/components/xform/form-render/indexMixin.js +22 -12
- package/src/components/xform/lang/zh-CN.js +27 -4
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/mixins/scriptHttp.js +174 -1
- package/src/components/xform/utils/emitter.js +4 -4
- package/src/components/xform/utils/format.js +21 -30
- package/src/components/xform/utils/formula-util copy 2.js +945 -0
- package/src/components/xform/utils/formula-util copy.js +860 -0
- package/src/components/xform/utils/formula-util.js +970 -0
- package/src/components/xform/utils/util.js +1 -1
- package/src/components/xform/utils/validators.js +1 -5
- package/src/components/xform/utils/vue2js-generator.js +2 -2
- package/src/index.js +210 -190
- package/src/lang/index.js +56 -51
- package/src/lang/locale/en/login.js +20 -0
- package/src/lang/locale/zh/login.js +20 -0
- package/src/layout/components/AppMain.vue +5 -1
- package/src/layout/components/Sidebar/default.vue +1389 -1222
- package/src/layout/components/TagsView/index.vue +37 -12
- package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
- package/src/layout/components/extractedCode/createDialog.vue +92 -0
- package/src/layout/components/extractedCode/queryDialog.vue +96 -0
- package/src/layout/components/extractedCode/viewDialog.vue +193 -0
- package/src/layout/components/watermark/index.vue +83 -0
- package/src/layout/defaultLayout.vue +1 -1
- package/src/layout/index.vue +3 -5
- package/src/mixins/selectDialog/index.js +1 -1
- package/src/mixins/table/index.js +151 -0
- package/src/mixins/tableTree/index.js +1 -1
- package/src/permission.js +1 -18
- package/src/router/modules/customer.js +79 -8
- package/src/store/config/index.js +1 -1
- package/src/store/getters.js +3 -1
- package/src/store/modules/permission.js +1 -1
- package/src/store/modules/settings.js +1 -1
- package/src/store/modules/tagsView.js +1 -14
- package/src/store/modules/user.js +1 -29
- package/src/utils/index.js +2 -3
- package/src/utils/pddLog.js +103 -0
- package/src/utils/pdfUtil.js +71 -0
- package/src/utils/request.js +1 -1
- package/src/utils/vab.js +19 -27
- package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
- package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
- package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +4 -5
- package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
- package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
- package/src/views/bd/setting/bd_company_env/list.vue +175 -0
- package/src/views/bd/setting/config_manage/list.vue +83 -0
- package/src/views/bd/setting/form_import_log/edit.vue +127 -0
- package/src/views/bd/setting/form_import_log/list.vue +206 -0
- package/src/views/bd/setting/form_script/edit.vue +9 -0
- package/src/views/bd/setting/form_script/edit1.vue +36 -3
- package/src/views/bd/setting/form_script/form_list.vue +99 -37
- package/src/views/bd/setting/form_script/list1.vue +181 -118
- package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +201 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +193 -1
- package/src/views/bd/setting/form_script/mixins/form_list.js +1 -1
- package/src/views/bd/setting/form_script/mixins/list.js +236 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +423 -14
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
- package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/edit.vue +22 -1
- package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/list.vue +326 -214
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +11 -10
- package/src/views/bd/setting/form_template/mixins/edit.js +234 -9
- package/src/views/bd/setting/form_template/mixins/list.js +689 -22
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
- package/src/views/bd/setting/form_template/mixins/wf_list.js +1 -425
- package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +4 -4
- package/src/views/bd/setting/form_template/wf_list.vue +1 -1
- package/src/views/bd/setting/logic_param/edit.vue +146 -0
- package/src/views/bd/setting/logic_param/edit1.vue +106 -0
- package/src/views/bd/setting/logic_param/edit2.vue +139 -0
- package/src/views/bd/setting/logic_param/list.vue +74 -0
- package/src/views/bd/setting/logic_param/list1.vue +12 -0
- package/src/views/bd/setting/logic_param/list2.vue +12 -0
- package/src/views/bd/setting/logic_param/mixins/edit.js +3 -0
- package/src/views/bd/setting/logic_param/mixins/list.js +9 -0
- package/src/views/bd/setting/menu_kind/list.vue +172 -83
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
- package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
- package/src/views/bd/setting/push_data/edit.vue +139 -0
- package/src/views/bd/setting/push_data/list.vue +283 -0
- package/src/views/bd/setting/push_data_h/edit.vue +153 -0
- package/src/views/bd/setting/push_data_h/list.vue +293 -0
- package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
- package/src/views/bd/setting/request_async_setting/list.vue +372 -0
- package/src/views/bd/setting/request_setting/edit.vue +300 -0
- package/src/views/bd/setting/request_setting/list.vue +311 -0
- package/src/views/bd/setting/table_model/edit.vue +875 -426
- package/src/views/bd/setting/table_model/list.vue +190 -128
- package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/edit.js +1202 -13
- package/src/views/bd/setting/table_model/mixins/list.js +440 -14
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
- package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
- package/src/views/user/access_log/list.vue +418 -349
- package/src/views/user/area/dialog.vue +223 -117
- package/src/views/user/area/list.vue +318 -0
- package/src/views/user/bill_setting/edit.vue +1 -1
- package/src/views/user/bill_setting/list.vue +1 -1
- package/src/views/user/common_attribute/itemEdit.vue +2 -2
- package/src/views/user/common_attribute/list.vue +5 -2
- package/src/views/user/common_script/edit.vue +1 -1
- package/src/views/user/common_script/list.vue +1 -1
- package/src/views/user/company_info/dialog.vue +164 -163
- package/src/views/user/company_info/edit.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +4 -0
- package/src/views/user/extend_datasource/edit.vue +5 -1
- package/src/views/user/extend_datasource/list.vue +5 -1
- package/src/views/user/fieldTranslation/editDialog.vue +7 -7
- package/src/views/user/fieldTranslation/list.vue +32 -32
- package/src/views/user/form/vform/designer.vue +776 -749
- package/src/views/user/form/vform/out_render.vue +1 -1
- package/src/views/user/form/vform/render.vue +59 -37
- package/src/views/user/form/view/edit.vue +38 -37
- package/src/views/user/form/view/list.vue +261 -49
- package/src/views/user/home/bears/index.vue +1032 -0
- package/src/views/user/home/default.vue +1025 -979
- package/src/views/user/home/dev.vue +29 -0
- package/src/views/user/home/index.vue +16 -6
- package/src/views/user/home/taili/index.vue +1034 -0
- package/src/views/user/ledger_library/list.vue +10 -12
- package/src/views/user/login/default.vue +165 -36
- package/src/views/user/login/index.vue +4 -6
- package/src/views/user/login/indexMixin.js +184 -8
- package/src/views/user/menu/list.vue +24 -1
- package/src/views/user/notify_message/dialog.vue +38 -22
- package/src/views/user/notify_template/edit.vue +188 -187
- package/src/views/user/notify_template/edit2.vue +176 -0
- package/src/views/user/notify_template/list.vue +4 -1
- package/src/views/user/notify_template/list2.vue +190 -0
- package/src/views/user/outLink/form_view.vue +211 -184
- package/src/views/user/outLink/index.vue +67 -11
- package/src/views/user/outLink/view.vue +28 -23
- package/src/views/user/position/edit.vue +116 -83
- package/src/views/user/position/list.vue +118 -86
- package/src/views/user/project_tag/dialog.vue +9 -4
- package/src/views/user/project_tag/edit.vue +2 -2
- package/src/views/user/project_tag/list.vue +9 -4
- package/src/views/user/push_setting/list.vue +2 -2
- package/src/views/user/request_setting/edit.vue +258 -0
- package/src/views/user/request_setting/list.vue +248 -0
- package/src/views/user/role/authConfig.vue +89 -0
- package/src/views/user/role/dialog.vue +70 -48
- package/src/views/user/role/edit.vue +609 -429
- package/src/views/user/role/list.vue +4 -4
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/sale_org/list.vue +4 -1
- package/src/views/user/system_notice/edit.vue +232 -186
- package/src/views/user/user/dialog.vue +46 -23
- package/src/views/user/user/edit.vue +1059 -1021
- package/src/views/user/user/form_dialog.vue +158 -0
- package/src/views/user/user/form_info.vue +210 -0
- package/src/views/user/user/list.vue +647 -563
- package/src/views/user/user/modifyPasswordDialog.vue +64 -53
- package/src/views/user/wf/wfReport/index.vue +618 -0
- package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
- package/src/views/user/wf/wf_manage/list.vue +371 -249
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
- package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
- package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
- package/src/views/user/wf/wf_obj_config/list.vue +114 -9
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +2 -2
- package/src/views/user/wf/wf_transfer_setting/edit.vue +282 -0
- package/src/views/user/wf/wf_transfer_setting/list.vue +319 -0
|
@@ -0,0 +1,945 @@
|
|
|
1
|
+
// 计算公式相关工具方法
|
|
2
|
+
import {evalFn, getFieldWidgetById, traverseFieldWidgetsOfContainer} from "@base/components/xform/utils/util";
|
|
3
|
+
import * as formulajs from '@formulajs/formulajs'
|
|
4
|
+
import {EditorView} from "codemirror"
|
|
5
|
+
import {MatchDecorator, Decoration, ViewPlugin, WidgetType} from "@codemirror/view"
|
|
6
|
+
import {translate} from "@base/components/xform/utils/i18n";
|
|
7
|
+
|
|
8
|
+
class PlaceholderWidget extends WidgetType {
|
|
9
|
+
field;
|
|
10
|
+
text;
|
|
11
|
+
type;
|
|
12
|
+
|
|
13
|
+
constructor(text) {
|
|
14
|
+
super();
|
|
15
|
+
if (text) {
|
|
16
|
+
//type 仅用于区分颜色
|
|
17
|
+
const [field, mText, type] = text.split(".");
|
|
18
|
+
this.text = mText;
|
|
19
|
+
this.type = type;
|
|
20
|
+
this.field = field;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
eq(other) {
|
|
25
|
+
return this.text === other.text;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 此处是我们的渲染方法
|
|
29
|
+
toDOM() {
|
|
30
|
+
let elt = document.createElement('span');
|
|
31
|
+
if (!this.text) return elt;
|
|
32
|
+
elt.className = this.type === "func" ? "cm-function" : "cm-field";
|
|
33
|
+
elt.textContent = this.text;
|
|
34
|
+
return elt;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ignoreEvent() {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const FORMULA_REG_EXP = /\{\{(\w+\.[^.]+\.\w+)}}/g
|
|
43
|
+
|
|
44
|
+
const placeholderMatcher = new MatchDecorator({
|
|
45
|
+
regexp: /\{\{(.+?)}}/g,
|
|
46
|
+
decoration: (match) =>
|
|
47
|
+
Decoration.replace({
|
|
48
|
+
widget: new PlaceholderWidget(match[1])
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
export const placeholders = ViewPlugin.fromClass(class {
|
|
54
|
+
placeholders
|
|
55
|
+
|
|
56
|
+
constructor(view) {
|
|
57
|
+
this.placeholders = placeholderMatcher.createDeco(view)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
update(update) {
|
|
61
|
+
this.placeholders = placeholderMatcher.updateDeco(update, this.placeholders)
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
decorations: instance => instance.placeholders,
|
|
65
|
+
provide: plugin => EditorView.atomicRanges.of(view => {
|
|
66
|
+
return view.plugin(plugin)?.placeholders || Decoration.none
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
// 背景样式
|
|
71
|
+
export const baseTheme = EditorView.baseTheme({
|
|
72
|
+
".cm-function": {
|
|
73
|
+
paddingLeft: "6px",
|
|
74
|
+
paddingRight: "6px",
|
|
75
|
+
paddingTop: "3px",
|
|
76
|
+
paddingBottom: "3px",
|
|
77
|
+
marginLeft: "3px",
|
|
78
|
+
marginRight: "3px",
|
|
79
|
+
backgroundColor: "#ffcdcc",
|
|
80
|
+
borderRadius: "4px",
|
|
81
|
+
},
|
|
82
|
+
".cm-field": {
|
|
83
|
+
paddingLeft: "6px",
|
|
84
|
+
paddingRight: "6px",
|
|
85
|
+
paddingTop: "3px",
|
|
86
|
+
paddingBottom: "3px",
|
|
87
|
+
marginLeft: "3px",
|
|
88
|
+
marginRight: "3px",
|
|
89
|
+
backgroundColor: "#f8e7a0",
|
|
90
|
+
borderRadius: "4px",
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export function calculateFormula(VFR, DSV, formulaJs, formulaFieldRef, changedFieldRef) {
|
|
96
|
+
if (formulaFieldRef.tableParam) {
|
|
97
|
+
} else if (!!formulaFieldRef.subFormItemFlag && !!changedFieldRef.subFormItemFlag) {
|
|
98
|
+
/* 子表单字段变化,只能触发子表单同一行字段的计算公式重新计算!! */
|
|
99
|
+
if (changedFieldRef.subFormRowId !== formulaFieldRef.subFormRowId) {
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let formula = formulaFieldRef.field.options.formula
|
|
105
|
+
formula = replaceFieldsAndFunctionsOfFormula(VFR, formulaFieldRef, changedFieldRef) //替换字段值
|
|
106
|
+
if (!formula) {
|
|
107
|
+
return
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
//替换formula-js函数
|
|
111
|
+
const matchResult = formula.match(/[A-Za-z]*/g)
|
|
112
|
+
let matchedList = []
|
|
113
|
+
if (!!matchResult) {
|
|
114
|
+
matchResult.forEach(mi => {
|
|
115
|
+
if (!!mi && (findCalFunStartIndex(mi) !== -1) && !matchedList.includes(mi)) {
|
|
116
|
+
const funcName = mi.toUpperCase()
|
|
117
|
+
formula = formula.replaceAll(mi, 'formulaJs.' + funcName)
|
|
118
|
+
matchedList.push(mi)
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const formulaValue = evalFn(formula, DSV, VFR, formulaJs)
|
|
124
|
+
if(formulaFieldRef)formulaFieldRef.setValue(formulaValue)
|
|
125
|
+
return formulaValue
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ... existing code ...
|
|
129
|
+
export function baseCalculateFormula(that,formulaStr, row /* VFR, DSV, formulaJs, formulaFieldRef, changedFieldRef */) {
|
|
130
|
+
if(!formulaStr)return
|
|
131
|
+
let formula = formulaStr;
|
|
132
|
+
let VFR = that.getFormRef();
|
|
133
|
+
let DSV = that.getGlobalDsv()
|
|
134
|
+
let formulaJs = formulajs
|
|
135
|
+
let formulaFieldRef = that;
|
|
136
|
+
let changedFieldRef = arguments[5];
|
|
137
|
+
|
|
138
|
+
// 增强子表单字段变化时的计算范围控制
|
|
139
|
+
if (formulaFieldRef.tableParam) {
|
|
140
|
+
} else if (!!formulaFieldRef.subFormItemFlag && !!changedFieldRef?.subFormItemFlag) {
|
|
141
|
+
/* 子表单字段变化,只能触发子表单同一行字段的计算公式重新计算 */
|
|
142
|
+
if (changedFieldRef.subFormRowId !== formulaFieldRef.subFormRowId) {
|
|
143
|
+
return
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 预处理:识别并标记聚合函数,记录它们的参数字段所属子表单
|
|
148
|
+
const aggregationFunctions = ['SUM', 'AVERAGE', 'MAX', 'MIN', 'SUMIF', 'SUMIFS'];
|
|
149
|
+
let functionCalls = [];
|
|
150
|
+
|
|
151
|
+
// 解析公式中的函数调用
|
|
152
|
+
let functionCallMatch;
|
|
153
|
+
const functionCallRegex = /([A-Z]+)\s*\(([^)]*)\)/g;
|
|
154
|
+
while ((functionCallMatch = functionCallRegex.exec(formulaStr)) !== null) {
|
|
155
|
+
const funcName = functionCallMatch[1].toUpperCase();
|
|
156
|
+
const params = functionCallMatch[2];
|
|
157
|
+
|
|
158
|
+
if (aggregationFunctions.includes(funcName)) {
|
|
159
|
+
functionCalls.push({
|
|
160
|
+
name: funcName,
|
|
161
|
+
params: params,
|
|
162
|
+
fullMatch: functionCallMatch[0],
|
|
163
|
+
start: functionCallMatch.index
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 替换字段值,增加对子表单引用子表单场景的特殊处理
|
|
169
|
+
formula = baseReplaceFieldsAndFunctionsOfFormula(VFR, formulaFieldRef, formula, row, functionCalls)
|
|
170
|
+
|
|
171
|
+
if (!formula) {
|
|
172
|
+
return
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
//替换formula-js函数
|
|
176
|
+
const matchResult = formula.match(/[A-Za-z]*/g)
|
|
177
|
+
let matchedList = []
|
|
178
|
+
if (!!matchResult) {
|
|
179
|
+
matchResult.forEach(mi => {
|
|
180
|
+
if (!!mi && (findCalFunStartIndex(mi) !== -1) && !matchedList.includes(mi)) {
|
|
181
|
+
const funcName = mi.toUpperCase()
|
|
182
|
+
formula = formula.replaceAll(mi, 'formulaJs.' + funcName)
|
|
183
|
+
matchedList.push(mi)
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
try {
|
|
189
|
+
const formulaValue = evalFn(formula, DSV, VFR, formulaJs)
|
|
190
|
+
return formulaValue
|
|
191
|
+
} catch (error) {
|
|
192
|
+
console.error('公式计算错误:', error, '公式:', formula);
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// 优化 baseReplaceFieldsAndFunctionsOfFormula 方法,增加对聚合函数的特殊处理
|
|
198
|
+
export function baseReplaceFieldsAndFunctionsOfFormula(VFR, formulaFieldRef, formula, row, functionCalls = []) {
|
|
199
|
+
// let formula = formulaFieldRef.field.options.formula
|
|
200
|
+
const matchResult = formula.match(FORMULA_REG_EXP)
|
|
201
|
+
if (!matchResult) {
|
|
202
|
+
return formula
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
let resultFormula = formula
|
|
206
|
+
let quitFlag = false
|
|
207
|
+
|
|
208
|
+
// 记录所有字段引用及其所属子表单
|
|
209
|
+
let fieldReferences = [];
|
|
210
|
+
|
|
211
|
+
matchResult.forEach(mi => {
|
|
212
|
+
const thirdPart = mi.split('.')[2]
|
|
213
|
+
const nodeType = thirdPart.substring(0, thirdPart.length - 2)
|
|
214
|
+
if (nodeType === 'func') {
|
|
215
|
+
const funcName = mi.split('.')[1]
|
|
216
|
+
resultFormula = resultFormula.replace(mi, funcName)
|
|
217
|
+
return
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const firstPart = mi.split('.')[0]
|
|
221
|
+
const fieldId = firstPart.substring(2, firstPart.length)
|
|
222
|
+
const fieldSchema = getFieldWidgetById(VFR.formJsonObj.widgetList, fieldId, false)
|
|
223
|
+
if (!!fieldSchema) {
|
|
224
|
+
let fieldRef = VFR.getWidgetRef(fieldSchema.options.name)
|
|
225
|
+
if (!!fieldRef) {
|
|
226
|
+
let fieldKeyName = getFieldKeyName(fieldSchema)
|
|
227
|
+
let value = fieldRef.formModel[fieldKeyName]??null;
|
|
228
|
+
resultFormula = resultFormula.replace(mi, value)
|
|
229
|
+
} else { //getWidgetRef找不到,则可能是子表单字段
|
|
230
|
+
const subFormNameOfField = VFR.getSubFormNameOfWidget(fieldSchema.options.name)
|
|
231
|
+
|
|
232
|
+
// 记录字段引用信息
|
|
233
|
+
fieldReferences.push({
|
|
234
|
+
placeholder: mi,
|
|
235
|
+
fieldName: fieldSchema.options.name,
|
|
236
|
+
subFormName: subFormNameOfField
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
if (!!formulaFieldRef.subFormItemFlag || formulaFieldRef.tableParam || row) {
|
|
240
|
+
/* 如果当前计算字段是子表单字段,要判断公式中的子表单字段是否和当前计算字段是否属于同一子表单!! */
|
|
241
|
+
// 判断是否是同一子表单
|
|
242
|
+
const isSameSubForm = subFormNameOfField === formulaFieldRef?.parentWidget?.options?.name ||
|
|
243
|
+
subFormNameOfField === formulaFieldRef.subFormName;
|
|
244
|
+
|
|
245
|
+
// 检查该字段是否在某个聚合函数的参数中
|
|
246
|
+
let isInAggregationParam = false;
|
|
247
|
+
functionCalls.forEach(call => {
|
|
248
|
+
if (call.params.includes(mi)) {
|
|
249
|
+
isInAggregationParam = true;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
if (isSameSubForm && !isInAggregationParam) {
|
|
254
|
+
// 同一子表单且不在聚合函数参数中,使用当前行数据
|
|
255
|
+
if(row){
|
|
256
|
+
let fieldKeyName = getFieldKeyName(fieldSchema)
|
|
257
|
+
let value = row[fieldKeyName]??null;
|
|
258
|
+
resultFormula = resultFormula.replaceAll(mi, value)
|
|
259
|
+
}else if (subFormNameOfField === formulaFieldRef?.parentWidget?.options?.name) {
|
|
260
|
+
let subFormRowId = formulaFieldRef.tableParam.row._X_ROW_KEY
|
|
261
|
+
fieldRef = VFR.getWidgetRef(fieldSchema.options.name + '_' + subFormRowId)
|
|
262
|
+
if (!!fieldRef) {
|
|
263
|
+
let value = fieldRef.currentValue??null;
|
|
264
|
+
resultFormula = resultFormula.replaceAll(mi, value)
|
|
265
|
+
} else {
|
|
266
|
+
quitFlag = true
|
|
267
|
+
console.error('Field not found: ' + fieldSchema.options.label)
|
|
268
|
+
}
|
|
269
|
+
} else if (subFormNameOfField === formulaFieldRef.subFormName) {
|
|
270
|
+
fieldRef = VFR.getWidgetRef(fieldSchema.options.name + '@row' + formulaFieldRef.subFormRowId)
|
|
271
|
+
if (!!fieldRef) {
|
|
272
|
+
resultFormula = resultFormula.replaceAll(mi, fieldRef.currentValue)
|
|
273
|
+
} else {
|
|
274
|
+
quitFlag = true
|
|
275
|
+
console.error('Field not found: ' + fieldSchema.options.label)
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
} else {
|
|
279
|
+
// 不同子表单或在聚合函数参数中,使用全部明细行数据创建数组表达式
|
|
280
|
+
let dataTableRef = VFR.getWidgetRef(subFormNameOfField)
|
|
281
|
+
if (!dataTableRef) {
|
|
282
|
+
console.error('Subform not found: ' + subFormNameOfField);
|
|
283
|
+
quitFlag = true;
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
const subFormValue = VFR.formDataModel[fieldKeyName(dataTableRef.widget)] || [];
|
|
288
|
+
const subFieldName = fieldKeyName(fieldSchema);
|
|
289
|
+
|
|
290
|
+
// 构建有效的数组表达式
|
|
291
|
+
let arrayExpr = '[';
|
|
292
|
+
subFormValue.forEach((vi, idx) => {
|
|
293
|
+
const val = vi[subFieldName] ?? null;
|
|
294
|
+
// 确保数值类型正确处理
|
|
295
|
+
if (val === null || val === undefined || val === '') {
|
|
296
|
+
arrayExpr += (idx === 0) ? '0' : ', 0';
|
|
297
|
+
} else if (typeof val === 'string' && !isNaN(Number(val))) {
|
|
298
|
+
arrayExpr += (idx === 0) ? Number(val) : ', ' + Number(val);
|
|
299
|
+
} else if (typeof val === 'number') {
|
|
300
|
+
arrayExpr += (idx === 0) ? val : ', ' + val;
|
|
301
|
+
} else {
|
|
302
|
+
arrayExpr += (idx === 0) ? '0' : ', 0';
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
arrayExpr += ']';
|
|
306
|
+
|
|
307
|
+
resultFormula = resultFormula.replaceAll(mi, arrayExpr);
|
|
308
|
+
}
|
|
309
|
+
} else {
|
|
310
|
+
/* 在主表单字段的计算公式中使用子表单字段,应将子表单所有记录同字段的值代入!! */
|
|
311
|
+
let dataTableRef = VFR.getWidgetRef(subFormNameOfField)
|
|
312
|
+
const subFormValue = VFR.formDataModel[fieldKeyName(dataTableRef.widget)]
|
|
313
|
+
let allSubFieldValues = ''
|
|
314
|
+
const subFieldName = fieldKeyName(fieldSchema)
|
|
315
|
+
|
|
316
|
+
// 对于聚合函数,创建数组表达式
|
|
317
|
+
let isInAggregationParam = false;
|
|
318
|
+
functionCalls.forEach(call => {
|
|
319
|
+
if (call.params.includes(mi)) {
|
|
320
|
+
isInAggregationParam = true;
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
if (isInAggregationParam) {
|
|
325
|
+
let arrayExpr = '[';
|
|
326
|
+
subFormValue.forEach((vi, idx) => {
|
|
327
|
+
const val = vi[subFieldName] ?? 0;
|
|
328
|
+
arrayExpr += (idx === 0) ? val : ', ' + val;
|
|
329
|
+
});
|
|
330
|
+
arrayExpr += ']';
|
|
331
|
+
resultFormula = resultFormula.replaceAll(mi, arrayExpr);
|
|
332
|
+
} else {
|
|
333
|
+
// 非聚合函数,使用逗号分隔的字符串
|
|
334
|
+
subFormValue.forEach((vi, idx) => {
|
|
335
|
+
let val = vi[subFieldName]??null
|
|
336
|
+
allSubFieldValues = (idx === 0) ? val : allSubFieldValues + ', ' + val
|
|
337
|
+
})
|
|
338
|
+
resultFormula = resultFormula.replaceAll(mi, allSubFieldValues)
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
})
|
|
344
|
+
|
|
345
|
+
return quitFlag ? null : resultFormula
|
|
346
|
+
}
|
|
347
|
+
// ... existing code ...
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
function getFieldKeyName(widget) {
|
|
351
|
+
let o = widget.options.name;
|
|
352
|
+
return (widget.options.keyNameEnabled && widget.options.keyName) || o;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
function funOtherHanlde(){
|
|
356
|
+
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export function calculateFormula2(formulaStr, data, that) {
|
|
360
|
+
if(!formulaStr)return
|
|
361
|
+
let formula = formulaStr;
|
|
362
|
+
let VFR = that.getFormRef();
|
|
363
|
+
let DSV = that.getGlobalDsv()
|
|
364
|
+
let formulaJs = formulajs
|
|
365
|
+
|
|
366
|
+
if(data){
|
|
367
|
+
for(let key in data){
|
|
368
|
+
formula = formula.replaceAll(`[${key}]`,(data[key] || 0))
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
//替换formula-js函数
|
|
373
|
+
const matchResult = formula.match(/[A-Za-z]*/g)
|
|
374
|
+
let matchedList = []
|
|
375
|
+
if (!!matchResult) {
|
|
376
|
+
matchResult.forEach(mi => {
|
|
377
|
+
if (!!mi && (findCalFunStartIndex(mi) !== -1) && !matchedList.includes(mi)) {
|
|
378
|
+
const funcName = mi.toUpperCase()
|
|
379
|
+
formula = formula.replaceAll(mi, 'formulaJs.' + funcName)
|
|
380
|
+
matchedList.push(mi)
|
|
381
|
+
}
|
|
382
|
+
})
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const formulaValue = evalFn(formula, DSV, VFR, formulaJs)
|
|
386
|
+
return formulaValue
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* 判断字段是否用在计算公式中
|
|
391
|
+
* @param fieldName
|
|
392
|
+
* @param formula
|
|
393
|
+
* @param VFR
|
|
394
|
+
*/
|
|
395
|
+
export function fieldIsUsedInFormula(fieldName, formula, VFR, fieldTarget) {
|
|
396
|
+
const matchResult = formula.match(FORMULA_REG_EXP)
|
|
397
|
+
if (!matchResult) {
|
|
398
|
+
return false
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
let foundResult = false
|
|
402
|
+
matchResult.forEach(mi => {
|
|
403
|
+
const thirdPart = mi.split('.')[2]
|
|
404
|
+
const nodeType = thirdPart.substring(0, thirdPart.length - 2)
|
|
405
|
+
if (nodeType === 'func') {
|
|
406
|
+
return
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
const firstPart = mi.split('.')[0]
|
|
410
|
+
const fieldId = firstPart.substring(2, firstPart.length)
|
|
411
|
+
let fieldSchema = getFieldWidgetById(VFR.formJsonObj.widgetList, fieldId, false)
|
|
412
|
+
if (!fieldSchema) {
|
|
413
|
+
console.error('The field used by formula not found: ', fieldId)
|
|
414
|
+
console.error('The formula is: ', formula)
|
|
415
|
+
}
|
|
416
|
+
if (fieldSchema && (fieldSchema.options.name === fieldName)) {
|
|
417
|
+
foundResult = true
|
|
418
|
+
}
|
|
419
|
+
})
|
|
420
|
+
|
|
421
|
+
return foundResult
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* 替换计算公式中的字段值
|
|
427
|
+
* @param VFR
|
|
428
|
+
* @param formulaFieldRef
|
|
429
|
+
* @returns {*}
|
|
430
|
+
*/
|
|
431
|
+
export function replaceFieldsAndFunctionsOfFormula(VFR, formulaFieldRef) {
|
|
432
|
+
let formula = formulaFieldRef.field.options.formula
|
|
433
|
+
const matchResult = formula.match(FORMULA_REG_EXP)
|
|
434
|
+
if (!matchResult) {
|
|
435
|
+
return formula
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
let resultFormula = formula
|
|
439
|
+
let quitFlag = false
|
|
440
|
+
matchResult.forEach(mi => {
|
|
441
|
+
const thirdPart = mi.split('.')[2]
|
|
442
|
+
const nodeType = thirdPart.substring(0, thirdPart.length - 2)
|
|
443
|
+
if (nodeType === 'func') {
|
|
444
|
+
const funcName = mi.split('.')[1]
|
|
445
|
+
resultFormula = resultFormula.replace(mi, funcName)
|
|
446
|
+
return
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
const firstPart = mi.split('.')[0]
|
|
450
|
+
const fieldId = firstPart.substring(2, firstPart.length)
|
|
451
|
+
const fieldSchema = getFieldWidgetById(VFR.formJsonObj.widgetList, fieldId, false)
|
|
452
|
+
if (!!fieldSchema) {
|
|
453
|
+
let fieldRef = VFR.getWidgetRef(fieldSchema.options.name)
|
|
454
|
+
if (!!fieldRef) {
|
|
455
|
+
//是否要考虑字符串值的替换??
|
|
456
|
+
resultFormula = resultFormula.replace(mi, fieldRef.currentValue)
|
|
457
|
+
} else { //getWidgetRef找不到,则可能是子表单字段
|
|
458
|
+
const subFormNameOfField = VFR.getSubFormNameOfWidget(fieldSchema.options.name)
|
|
459
|
+
if (!!formulaFieldRef.subFormItemFlag || formulaFieldRef.tableParam) {
|
|
460
|
+
/* 如果当前计算字段是子表单字段,要判断公式中的子表单字段是否和当前计算字段是否属于同一子表单!! */
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
if (subFormNameOfField === formulaFieldRef?.parentWidget?.options?.name) {
|
|
464
|
+
let subFormRowId = formulaFieldRef.tableParam.row._X_ROW_KEY
|
|
465
|
+
fieldRef = VFR.getWidgetRef(fieldSchema.options.name + '_' + subFormRowId)
|
|
466
|
+
if (!!fieldRef) {
|
|
467
|
+
resultFormula = resultFormula.replaceAll(mi, fieldRef.currentValue)
|
|
468
|
+
} else {
|
|
469
|
+
quitFlag = true
|
|
470
|
+
console.error('Field not found: ' + fieldSchema.options.label)
|
|
471
|
+
}
|
|
472
|
+
} else if (subFormNameOfField === formulaFieldRef.subFormName) {
|
|
473
|
+
fieldRef = VFR.getWidgetRef(fieldSchema.options.name + '@row' + formulaFieldRef.subFormRowId)
|
|
474
|
+
if (!!fieldRef) {
|
|
475
|
+
resultFormula = resultFormula.replaceAll(mi, fieldRef.currentValue)
|
|
476
|
+
} else {
|
|
477
|
+
quitFlag = true
|
|
478
|
+
console.error('Field not found: ' + fieldSchema.options.label)
|
|
479
|
+
}
|
|
480
|
+
} else {
|
|
481
|
+
console.error('Invalid formula!')
|
|
482
|
+
}
|
|
483
|
+
} else {
|
|
484
|
+
/* 在主表单字段的计算公式中使用子表单字段,应将子表单所有记录同字段的值代入!! */
|
|
485
|
+
// const subFormValue = VFR.formDataModel[subFormNameOfField]
|
|
486
|
+
let dataTableRef = VFR.getWidgetRef(subFormNameOfField)
|
|
487
|
+
const subFormValue = VFR.formDataModel[fieldKeyName(dataTableRef.widget)]
|
|
488
|
+
|
|
489
|
+
let allSubFieldValues = ''
|
|
490
|
+
// const subFieldName = fieldSchema.options.name
|
|
491
|
+
const subFieldName = fieldKeyName(fieldSchema)
|
|
492
|
+
subFormValue.forEach((vi, idx) => {
|
|
493
|
+
allSubFieldValues = (idx === 0) ? vi[subFieldName] : allSubFieldValues + ', ' + vi[subFieldName]
|
|
494
|
+
})
|
|
495
|
+
resultFormula = resultFormula.replaceAll(mi, allSubFieldValues)
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
})
|
|
500
|
+
|
|
501
|
+
return quitFlag ? null : resultFormula
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
function fieldKeyName(widget) {
|
|
505
|
+
let o = widget.options.name;
|
|
506
|
+
return (
|
|
507
|
+
(widget.options.keyNameEnabled && widget.options.keyName) || o
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* 获取字段值
|
|
513
|
+
*/
|
|
514
|
+
function getWidgetValue(VFR, formula, widgetName) {
|
|
515
|
+
const sIndex = formula.indexOf("(");
|
|
516
|
+
const func = formula.substring(0, sIndex);
|
|
517
|
+
|
|
518
|
+
const funcType = formulas.find(item => {
|
|
519
|
+
if (item.flist.some(fItem => {
|
|
520
|
+
return fItem.fName === func
|
|
521
|
+
})) {
|
|
522
|
+
return item;
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
if (translate(funcType.fClass) === "数学类型") {
|
|
526
|
+
return Number(VFR.getWidgetRef(widgetName).getValue());
|
|
527
|
+
} else {
|
|
528
|
+
return VFR.getWidgetRef(widgetName).getValue() + '';
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// 查找公式中的函数是否在枚举中
|
|
533
|
+
export function hasFun(funName) {
|
|
534
|
+
for (let i = 0; i < FORMULA_JS_FUNCTIONS.length; i++) {
|
|
535
|
+
if (funName === FORMULA_JS_FUNCTIONS[i]) {
|
|
536
|
+
return true
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
return false
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export function findCalFunStartIndex(formula) {
|
|
543
|
+
let startIndex = -1
|
|
544
|
+
for (let i = 0; i < FORMULA_JS_FUNCTIONS.length; i++) {
|
|
545
|
+
let index = formula.indexOf(FORMULA_JS_FUNCTIONS[i])
|
|
546
|
+
if (index !== -1) {
|
|
547
|
+
return index
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
return startIndex
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* 当删除子表单行时,重新计算相关联的计算字段
|
|
555
|
+
*/
|
|
556
|
+
export function recalculateFormulaOnSubFormRowDelete(VFR, DSV, formulaJs, formulaFieldRef) {
|
|
557
|
+
if (!!formulaFieldRef.subFormItemFlag) {
|
|
558
|
+
return
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
let formula = formulaFieldRef.field.options.formula
|
|
562
|
+
formula = replaceFieldsAndFunctionsOfFormula(VFR, formulaFieldRef) //替换字段值
|
|
563
|
+
if (!formula) {
|
|
564
|
+
return
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
//替换formula-js函数
|
|
568
|
+
const matchResult = formula.match(/[A-Za-z]*/g)
|
|
569
|
+
let matchedList = []
|
|
570
|
+
if (!!matchResult) {
|
|
571
|
+
matchResult.forEach(mi => {
|
|
572
|
+
if (!!mi && (findCalFunStartIndex(mi) !== -1) && !matchedList.includes(mi)) {
|
|
573
|
+
const funcName = mi.toUpperCase()
|
|
574
|
+
formula = formula.replaceAll(mi, 'formulaJs.' + funcName)
|
|
575
|
+
matchedList.push(mi)
|
|
576
|
+
}
|
|
577
|
+
})
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
console.log('formula: ', formula)
|
|
581
|
+
const formulaValue = evalFn(formula, DSV, VFR, formulaJs)
|
|
582
|
+
formulaFieldRef.setValue(formulaValue)
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export function broadcastFormulaRecalculateEvent(subFormRef) {
|
|
586
|
+
let fieldNames = []
|
|
587
|
+
let getFieldNamesFn = (fw) => {
|
|
588
|
+
fieldNames.push(fw.options.name)
|
|
589
|
+
}
|
|
590
|
+
traverseFieldWidgetsOfContainer(subFormRef.widget, getFieldNamesFn)
|
|
591
|
+
fieldNames.map(fieldName => {
|
|
592
|
+
subFormRef.getFormRef().broadcast('FieldWidget', 'calculate-formula-sfRowDeleted', [null, fieldName])
|
|
593
|
+
})
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
//--------------------- 以下为公式计算的API方法 start ------------------//
|
|
597
|
+
// 日期格式化
|
|
598
|
+
export function dateFormat(date, fmt) {
|
|
599
|
+
date = new Date(date)
|
|
600
|
+
let a = ['日', '一', '二', '三', '四', '五', '六']
|
|
601
|
+
let o = {
|
|
602
|
+
'M+': date.getMonth() + 1, // 月份
|
|
603
|
+
'd+': date.getDate(), // 日
|
|
604
|
+
'h+': date.getHours(), // 小时
|
|
605
|
+
'm+': date.getMinutes(), // 分
|
|
606
|
+
's+': date.getSeconds(), // 秒
|
|
607
|
+
'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
|
|
608
|
+
'S': date.getMilliseconds(), // 毫秒
|
|
609
|
+
'w': date.getDay(), // 周
|
|
610
|
+
'W': a[date.getDay()], // 大写周
|
|
611
|
+
'T': 'T'
|
|
612
|
+
}
|
|
613
|
+
if (/(y+)/.test(fmt)) {
|
|
614
|
+
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
615
|
+
}
|
|
616
|
+
for (let k in o) {
|
|
617
|
+
if (new RegExp('(' + k + ')').test(fmt)) {
|
|
618
|
+
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
return fmt
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
//月份加减
|
|
625
|
+
export function addMonths(yearMonthDay, monthNum) {
|
|
626
|
+
let arr = yearMonthDay.split('-'); //2020-08-19或2020-08
|
|
627
|
+
let year = parseInt(arr[0]);
|
|
628
|
+
let month = parseInt(arr[1]);
|
|
629
|
+
month = month + monthNum;
|
|
630
|
+
if (month > 12) { //月份加
|
|
631
|
+
let yearNum = parseInt((month - 1) / 12);
|
|
632
|
+
month = month % 12 === 0 ? 12 : month % 12;
|
|
633
|
+
year += yearNum;
|
|
634
|
+
} else if (month <= 0) { //月份减
|
|
635
|
+
month = Math.abs(month);
|
|
636
|
+
let yearNum = parseInt((month + 12) / 12);
|
|
637
|
+
year -= yearNum;
|
|
638
|
+
}
|
|
639
|
+
month = month < 10 ? "0" + month : month;
|
|
640
|
+
return year + "-" + month;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
// 获取当前日期 yyyy-MM-dd
|
|
644
|
+
export function TODAY() {
|
|
645
|
+
// return this.FUNAPI.DODAY().toLocaleDateString().replaceAll("/","-")
|
|
646
|
+
return dateFormat(new Date(), "yyyy-MM-dd")
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// 获取当前时间 yyyy-MM-dd hh:mm:ss
|
|
650
|
+
export function NOW() {
|
|
651
|
+
// return this.FUNAPI.NOW().toLocaleDateString().replaceAll("/","-")
|
|
652
|
+
return dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss")
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/** 加减日期年
|
|
656
|
+
* @param {Object} date 日期
|
|
657
|
+
* @param {Object} month 加减的年
|
|
658
|
+
*/
|
|
659
|
+
export function EYEAR(date, year) {
|
|
660
|
+
try {
|
|
661
|
+
let myDate = new Date(date)
|
|
662
|
+
let newDate = myDate.setYear(myDate.getFullYear() + year)
|
|
663
|
+
return dateFormat(new Date(newDate), "yyyy-MM-dd")
|
|
664
|
+
} catch (e) {
|
|
665
|
+
//TODO handle the exception
|
|
666
|
+
//console.log(this.i18nt('designer.hint.formulaDateError'), date)
|
|
667
|
+
//console.error(this.i18nt('designer.hint.formulaDateErrorMsg'), e);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/** 加减日期月份
|
|
672
|
+
* @param {Object} date 日期
|
|
673
|
+
* @param {Object} month 加减的月份
|
|
674
|
+
*/
|
|
675
|
+
export function EMONTH(date, month) {
|
|
676
|
+
try {
|
|
677
|
+
let myDate = new Date(date)
|
|
678
|
+
let newDate = myDate.setMonth(myDate.getMonth() + month)
|
|
679
|
+
return dateFormat(new Date(newDate), "yyyy-MM-dd")
|
|
680
|
+
} catch (e) {
|
|
681
|
+
//TODO handle the exception
|
|
682
|
+
// console.log(this.i18nt('designer.hint.formulaDateError'), date)
|
|
683
|
+
// console.error(this.i18nt('designer.hint.formulaDateErrorMsg'), e);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/** 加减日期天数
|
|
688
|
+
* @param {Object} date
|
|
689
|
+
* @param {Object} day 加减天数
|
|
690
|
+
*/
|
|
691
|
+
export function EDAY(date, day) {
|
|
692
|
+
try {
|
|
693
|
+
let myDate = new Date(date)
|
|
694
|
+
let newDate = myDate.setDate(myDate.getDate() + day)
|
|
695
|
+
return dateFormat(new Date(newDate), "yyyy-MM-dd")
|
|
696
|
+
} catch (e) {
|
|
697
|
+
//TODO handle the exception
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
const FORMULA_JS_FUNCTIONS = [
|
|
702
|
+
"INT",
|
|
703
|
+
"SUM",
|
|
704
|
+
"AVERAGE",
|
|
705
|
+
"MAX",
|
|
706
|
+
"MIN",
|
|
707
|
+
"ABS",
|
|
708
|
+
"ROUND",
|
|
709
|
+
"CEILING",
|
|
710
|
+
"LOG",
|
|
711
|
+
"MOD",
|
|
712
|
+
"POWER",
|
|
713
|
+
"AND",
|
|
714
|
+
"IF",
|
|
715
|
+
"IFS",
|
|
716
|
+
"IFERROR",
|
|
717
|
+
"IFNA",
|
|
718
|
+
"NOT",
|
|
719
|
+
"OR",
|
|
720
|
+
"SWITCH",
|
|
721
|
+
"XOR",
|
|
722
|
+
"YEAR",
|
|
723
|
+
"MONTH",
|
|
724
|
+
"DAY",
|
|
725
|
+
"TODAY",
|
|
726
|
+
"NOW",
|
|
727
|
+
"EMONTH",
|
|
728
|
+
"EDAY",
|
|
729
|
+
"FIND",
|
|
730
|
+
"LEFT",
|
|
731
|
+
"RIGHT",
|
|
732
|
+
"LEN",
|
|
733
|
+
"LOWER",
|
|
734
|
+
"UPPER",
|
|
735
|
+
"MID",
|
|
736
|
+
"TRIM",
|
|
737
|
+
];
|
|
738
|
+
|
|
739
|
+
export const formulas = [
|
|
740
|
+
{
|
|
741
|
+
fClass: "designer.hint.formulaFunctionMaths",
|
|
742
|
+
flist: [
|
|
743
|
+
{
|
|
744
|
+
fName: "INT",
|
|
745
|
+
fType: "designer.hint.formulaNumber",
|
|
746
|
+
fIntro: "designer.hint.formulaINT",
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
fName: "SUM",
|
|
750
|
+
fType: "designer.hint.formulaNumber",
|
|
751
|
+
fIntro: "designer.hint.formulaSUM",
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
fName: "SUMIF",
|
|
755
|
+
fType: "designer.hint.formulaNumber",
|
|
756
|
+
fIntro: "designer.hint.formulaSUMIF",
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
fName: "SUMIFS",
|
|
760
|
+
fType: "designer.hint.formulaNumber",
|
|
761
|
+
fIntro: "designer.hint.formulaSUMIFS",
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
fName: "AVERAGE",
|
|
765
|
+
fType: "designer.hint.formulaNumber",
|
|
766
|
+
fIntro: "designer.hint.formulaAVERAGE",
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
fName: "MAX",
|
|
770
|
+
fType: "designer.hint.formulaNumber",
|
|
771
|
+
fIntro: "designer.hint.formulaMAX",
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
fName: "MIN",
|
|
775
|
+
fType: "designer.hint.formulaNumber",
|
|
776
|
+
fIntro: "designer.hint.formulaMIN",
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
fName: "ABS",
|
|
780
|
+
fType: "designer.hint.formulaNumber",
|
|
781
|
+
fIntro: "designer.hint.formulaABS",
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
fName: "ROUND",
|
|
785
|
+
fType: "designer.hint.formulaNumber",
|
|
786
|
+
fIntro: "designer.hint.formulaROUND",
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
fName: "CEILING",
|
|
790
|
+
fType: "designer.hint.formulaNumber",
|
|
791
|
+
fIntro: "designer.hint.formulaCEILING",
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
fName: "LOG",
|
|
795
|
+
fType: "designer.hint.formulaNumber",
|
|
796
|
+
fIntro: "designer.hint.formulaLOG",
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
fName: "MOD",
|
|
800
|
+
fType: "designer.hint.formulaNumber",
|
|
801
|
+
fIntro: "designer.hint.formulaMOD",
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
fName: "POWER",
|
|
805
|
+
fType: "designer.hint.formulaNumber",
|
|
806
|
+
fIntro: "designer.hint.formulaPOWER",
|
|
807
|
+
},
|
|
808
|
+
],
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
fClass: "designer.hint.formulaFunctionLogic",
|
|
812
|
+
flist: [
|
|
813
|
+
{
|
|
814
|
+
fName: "AND",
|
|
815
|
+
fType: "designer.hint.formulaObject",
|
|
816
|
+
fIntro: "designer.hint.formulaAND",
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
fName: "IF",
|
|
820
|
+
fType: "designer.hint.formulaObject",
|
|
821
|
+
fIntro: "designer.hint.formulaIF",
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
fName: "IFS",
|
|
825
|
+
fType: "designer.hint.formulaObject",
|
|
826
|
+
fIntro: "designer.hint.formulaIFS",
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
fName: "IFERROR",
|
|
830
|
+
fType: "designer.hint.formulaObject",
|
|
831
|
+
fIntro: "designer.hint.formulaIFERROR",
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
fName: "IFNA",
|
|
835
|
+
fType: "designer.hint.formulaObject",
|
|
836
|
+
fIntro: "designer.hint.formulaIFNA",
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
fName: "NOT",
|
|
840
|
+
fType: "designer.hint.formulaObject",
|
|
841
|
+
fIntro: "designer.hint.formulaNOT",
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
fName: "OR",
|
|
845
|
+
fType: "designer.hint.formulaObject",
|
|
846
|
+
fIntro: "designer.hint.formulaOR",
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
fName: "SWITCH",
|
|
850
|
+
fType: "designer.hint.formulaObject",
|
|
851
|
+
fIntro: "designer.hint.formulaSWITCH",
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
fName: "XOR",
|
|
855
|
+
fType: "designer.hint.formulaObject",
|
|
856
|
+
fIntro: "designer.hint.formulaXOR",
|
|
857
|
+
},
|
|
858
|
+
],
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
fClass: "designer.hint.formulaFunctionTime",
|
|
862
|
+
flist: [
|
|
863
|
+
{
|
|
864
|
+
fName: "YEAR",
|
|
865
|
+
fType: "designer.hint.formulaDate",
|
|
866
|
+
fIntro: "designer.hint.formulaYEAR",
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
fName: "MONTH",
|
|
870
|
+
fType: "designer.hint.formulaDate",
|
|
871
|
+
fIntro: "designer.hint.formulaMONTH",
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
fName: "DAY",
|
|
875
|
+
fType: "designer.hint.formulaDate",
|
|
876
|
+
fIntro: "designer.hint.formulaDAY",
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
fName: "TODAY",
|
|
880
|
+
fType: "designer.hint.formulaDate",
|
|
881
|
+
fIntro: "designer.hint.formulaTODAY",
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
fName: "NOW",
|
|
885
|
+
fType: "designer.hint.formulaDate",
|
|
886
|
+
fIntro: "designer.hint.formulaNOW",
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
fName: "EMONTH",
|
|
890
|
+
fType: "designer.hint.formulaDate",
|
|
891
|
+
fIntro: "designer.hint.formulaEMONTH",
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
fName: "EDAY",
|
|
895
|
+
fType: "designer.hint.formulaDate",
|
|
896
|
+
fIntro: "designer.hint.formulaEDAY",
|
|
897
|
+
},
|
|
898
|
+
],
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
fClass: "designer.hint.formulaFunctionString",
|
|
902
|
+
flist: [
|
|
903
|
+
{
|
|
904
|
+
fName: "FIND",
|
|
905
|
+
fType: "designer.hint.formulaChar",
|
|
906
|
+
fIntro: "designer.hint.formulaFIND",
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
fName: "LEFT",
|
|
910
|
+
fType: "designer.hint.formulaChar",
|
|
911
|
+
fIntro: "designer.hint.formulaLEFT",
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
fName: "RIGHT",
|
|
915
|
+
fType: "designer.hint.formulaChar",
|
|
916
|
+
fIntro: "designer.hint.formulaRIGHT",
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
fName: "LEN",
|
|
920
|
+
fType: "designer.hint.formulaChar",
|
|
921
|
+
fIntro: "designer.hint.formulaLEN",
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
fName: "LOWER",
|
|
925
|
+
fType: "designer.hint.formulaChar",
|
|
926
|
+
fIntro: "designer.hint.formulaLOWER",
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
fName: "UPPER",
|
|
930
|
+
fType: "designer.hint.formulaChar",
|
|
931
|
+
fIntro: "designer.hint.formulaUPPER",
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
fName: "MID",
|
|
935
|
+
fType: "designer.hint.formulaChar",
|
|
936
|
+
fIntro: "designer.hint.formulaMID",
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
fName: "TRIM",
|
|
940
|
+
fType: "designer.hint.formulaChar",
|
|
941
|
+
fIntro: "designer.hint.formulaTRIM",
|
|
942
|
+
},
|
|
943
|
+
],
|
|
944
|
+
},
|
|
945
|
+
];
|