cloud-web-corejs 1.0.54-dev.63 → 1.0.54-dev.632
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 +22 -14
- package/src/App.vue +30 -34
- package/src/api/user.js +64 -40
- package/src/components/Qrcode/fileParse.vue +0 -1
- package/src/components/Tinymce/index.vue +112 -71
- package/src/components/VabUpload/image-viewer.vue +2 -2
- package/src/components/VabUpload/index.js +49 -1
- package/src/components/VabUpload/mixins.js +1822 -2
- package/src/components/VabUpload/propertiesDialog.vue +1 -1
- package/src/components/VabUpload/view.vue +209 -120
- package/src/components/advancedSearchDialog/mixins.js +28 -1
- package/src/components/base-textarea/index.vue +104 -0
- package/src/components/baseAlert/index.js +44 -1
- package/src/components/baseAlert/index.vue +24 -20
- package/src/components/baseAlert/mixins.js +61 -1
- package/src/components/baseAttachment/index.vue +49 -40
- package/src/components/baseAttachment/install.js +21 -5
- package/src/components/baseAttachment/mixins.js +310 -1
- package/src/components/baseInputBatch/mixins.js +58 -1
- package/src/components/baseInputExport/index.vue +21 -14
- package/src/components/baseInputExport/mixins.js +391 -1
- package/src/components/baseTabs/index.vue +16 -8
- package/src/components/baseTabs/mixins.js +166 -1
- package/src/components/cnPrint/index.js +44 -1
- package/src/components/cnPrint/mixins.js +189 -1
- package/src/components/code-editor/index.vue +102 -63
- package/src/components/confirmDialog/index.js +41 -1
- package/src/components/confirmDialog/index.vue +24 -17
- package/src/components/confirmDialog/mixins.js +31 -1
- package/src/components/errorMsg/index.js +44 -1
- package/src/components/errorMsg/index.vue +78 -70
- package/src/components/errorMsg/mixins.js +101 -5
- package/src/components/excelExport/button.vue +86 -24
- package/src/components/excelExport/exportFieldDialog.vue +215 -81
- package/src/components/excelExport/index.js +6 -6
- package/src/components/excelExport/index.vue +108 -26
- package/src/components/excelExport/mixins.js +970 -2
- package/src/components/excelImport/index.js +13 -13
- 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 +605 -262
- 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 +85 -4
- package/src/components/hiprint/css/bootstrap.min.css +6 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.eot +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.svg +288 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/src/components/hiprint/hiprint.bundle.js +7 -2
- package/src/components/hiprint/view/design/index.vue +140 -47
- package/src/components/hiprint/view/design/mixins.js +611 -1
- package/src/components/hiprint/view/design/preview.vue +75 -52
- package/src/components/hiprint/view/json-view.vue +31 -31
- package/src/components/jdPrint/index.js +44 -1
- package/src/components/jdPrint/mixins.js +208 -1
- package/src/components/jsonImport/index.js +187 -17
- package/src/components/jsonImport/mixins.js +333 -1
- package/src/components/langImport/index.js +80 -1
- package/src/components/langImport/mixins.js +500 -16
- package/src/components/langTag/mixins/addButton.js +51 -5
- package/src/components/langTag/mixins/deleteButton.js +55 -5
- package/src/components/langTag/mixins/view.js +47 -5
- package/src/components/luckysheet/dialog.vue +159 -0
- package/src/components/luckysheet/export.js +595 -0
- package/src/components/luckysheet/fileUtils.js +147 -0
- package/src/components/luckysheet/index.js +72 -0
- package/src/components/luckysheet/templateJson.js +12078 -0
- package/src/components/luckysheet/view.vue +210 -0
- package/src/components/obsUpload/index.js +34 -0
- package/src/components/obsUpload/index.vue +231 -0
- package/src/components/obsUpload/mixins.js +1476 -0
- package/src/components/onlineTalk/index.vue +1 -1
- package/src/components/onlineTalk/mixins.js +852 -1
- package/src/components/onlineTalk/talkUserDialog.vue +280 -0
- package/src/components/oplogTable/mixins.js +83 -4
- package/src/components/pddPrint/index.js +44 -1
- package/src/components/pddPrint/mixins.js +252 -1
- package/src/components/projectTag/mixins/addButton.js +52 -1
- package/src/components/projectTag/mixins/deleteButton.js +52 -1
- package/src/components/projectTag/mixins/view.js +43 -1
- package/src/components/scriptDescription/button.vue +12 -4
- package/src/components/scriptDescription/mixins.js +30 -1
- package/src/components/scriptTest/mixins.js +90 -1
- package/src/components/statusTag/mixins.js +66 -1
- package/src/components/table/CellSlot.vue +1 -0
- package/src/components/table/config.js +74 -1
- package/src/components/table/index.js +1174 -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 +285 -1
- package/src/components/table/util/index.js +339 -0
- package/src/components/table/vxeFilter/index.js +154 -1
- package/src/components/table/vxeFilter/mixin.js +308 -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 +56 -30
- package/src/components/vipPrint/index.js +44 -1
- package/src/components/vipPrint/mixins.js +268 -1
- package/src/components/wf/addOpinionButton.vue +57 -0
- package/src/components/wf/content.vue +834 -362
- package/src/components/wf/mixins/addOpinionButton.js +53 -0
- package/src/components/wf/mixins/setCandidateButton.js +161 -0
- package/src/components/wf/mixins/setCandidateDialog.js +213 -1
- package/src/components/wf/mixins/setCandidateDialog2.js +252 -0
- package/src/components/wf/mixins/wfFlowEleScriptDialog.js +131 -0
- package/src/components/wf/mixins/wfTaskUserRangeDialog.js +69 -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 +2156 -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 +1995 -9
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +434 -0
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +1 -1
- 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-pane-widget.vue +3 -2
- 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 +85 -48
- 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 +30 -7
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1762 -9
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +222 -75
- 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 +32 -4
- 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 +95 -0
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +13 -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 +86 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +170 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1654 -997
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +705 -379
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +964 -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 +40 -10
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +58 -91
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +8 -1
- 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 +55 -28
- package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +119 -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-export-item-button-widget.vue +92 -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/static-text-widget.vue +8 -3
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +82 -49
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +38 -37
- 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 +106 -33
- 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 +191 -66
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +753 -0
- package/src/components/xform/form-designer/form-widget/indexMixin.js +1 -1
- package/src/components/xform/form-designer/indexMixin.js +3 -772
- package/src/components/xform/form-designer/refMixinDesign.js +1 -28
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +981 -172
- 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 +956 -1042
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +432 -0
- 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 +1193 -520
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
- 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/dropdownFlag-editor.vue +133 -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 +5 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +23 -8
- 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-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 +25 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +5 -5
- 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-static-text/preWrap-editor.vue +23 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-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/select-export-item-button-editor.vue +71 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +24 -8
- 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/formatType-editor.vue +137 -0
- 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 +126 -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 +33 -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 +1729 -918
- package/src/components/xform/form-render/container-item/containerItemMixin.js +12 -11
- package/src/components/xform/form-render/container-item/data-table-item.vue +206 -198
- package/src/components/xform/form-render/container-item/data-table-mixin.js +3326 -1685
- package/src/components/xform/form-render/container-item/detail-item.vue +72 -48
- 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 +167 -92
- package/src/components/xform/form-render/container-item/tree-item.vue +32 -11
- package/src/components/xform/form-render/dynamicDialogRender.js +1 -1
- package/src/components/xform/form-render/index.vue +77 -20
- package/src/components/xform/form-render/indexMixin.js +3719 -12
- package/src/components/xform/form-render/refMixin.js +3 -3
- package/src/components/xform/lang/zh-CN.js +29 -4
- package/src/components/xform/mixins/defaultHandle.js +367 -2
- package/src/components/xform/mixins/scriptHttp.js +3 -1
- package/src/components/xform/utils/emitter.js +4 -4
- package/src/components/xform/utils/formHttp.js +162 -0
- package/src/components/xform/utils/format.js +41 -34
- package/src/components/xform/utils/formula-util.js +969 -0
- package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
- package/src/components/xform/utils/util.js +1475 -1
- package/src/components/xform/utils/validators.js +2 -5
- package/src/components/xform/utils/vue2js-generator.js +2 -2
- package/src/components/xhsPrint/index.js +44 -1
- package/src/components/xhsPrint/mixins.js +269 -1
- package/src/directive/LimitNumber/index.js +125 -1
- package/src/directive/el-dialog-center/index.js +34 -1
- package/src/directive/el-drag-dialog/drag.js +86 -1
- package/src/directive/el-readonly/index.js +15 -1
- package/src/directive/permission/hasPermi.js +34 -1
- package/src/index.js +215 -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 +8 -1
- package/src/layout/components/Sidebar/default.vue +1577 -1222
- package/src/layout/components/Sidebar/index.vue +6 -1
- package/src/layout/components/TagsView/index.vue +43 -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 +103 -0
- package/src/layout/components/extractedCode/viewDialog.vue +207 -0
- package/src/layout/components/langTool.vue +32 -29
- package/src/layout/components/watermark/index.vue +83 -0
- package/src/layout/defaultLayout.vue +17 -9
- package/src/mixins/selectDialog/index.js +266 -1
- package/src/mixins/tableTree/index.js +199 -4
- package/src/mixins/wf/index.js +33 -1
- package/src/permission.js +135 -18
- package/src/resources/js/base/common.js +109 -109
- package/src/router/modules/customer.js +0 -15
- package/src/router/modules/system.js +4 -0
- package/src/store/config/index.js +667 -1
- package/src/store/getters.js +4 -1
- package/src/store/modules/permission.js +46 -41
- package/src/store/modules/settings.js +1 -1
- package/src/store/modules/tagsView.js +5 -8
- package/src/store/modules/user.js +367 -16
- package/src/utils/aes.js +2 -1
- package/src/utils/auth.js +1 -1
- package/src/utils/global.js +1 -1
- package/src/utils/index.js +2 -3
- package/src/utils/keepAlive.js +1 -1
- package/src/utils/pddLog.js +92 -0
- package/src/utils/pdfUtil.js +71 -0
- package/src/utils/request.js +1 -1
- package/src/utils/vab.js +1268 -27
- package/src/utils/validate.js +1 -1
- package/src/utils/wf.js +4 -4
- 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/dialog.js +84 -1
- package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +116 -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/formVersion/button.vue +55 -0
- package/src/views/bd/setting/formVersion/compareDialog.vue +287 -0
- package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +400 -0
- package/src/views/bd/setting/formVersion/link.vue +58 -0
- package/src/views/bd/setting/formVersion/preformDialog.vue +86 -0
- package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
- package/src/views/bd/setting/form_import_log/edit.vue +130 -0
- package/src/views/bd/setting/form_import_log/list.vue +211 -0
- package/src/views/bd/setting/form_script/edit.vue +196 -74
- package/src/views/bd/setting/form_script/edit1.vue +410 -187
- package/src/views/bd/setting/form_script/form_list.vue +118 -37
- package/src/views/bd/setting/form_script/list.vue +90 -21
- package/src/views/bd/setting/form_script/list1.vue +200 -118
- package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +265 -7
- package/src/views/bd/setting/form_script/mixins/edit1.js +259 -9
- package/src/views/bd/setting/form_script/mixins/form_list.js +322 -14
- package/src/views/bd/setting/form_script/mixins/list.js +278 -4
- package/src/views/bd/setting/form_script/mixins/list1.js +480 -14
- package/src/views/bd/setting/form_script/mixins/list2.js +10 -1
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
- package/src/views/bd/setting/form_script/mixins/preformDialog.js +34 -1
- 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 +355 -184
- package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
- package/src/views/bd/setting/form_template/list.vue +296 -214
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +11 -9
- package/src/views/bd/setting/form_template/mixins/dialog.js +103 -1
- package/src/views/bd/setting/form_template/mixins/edit.js +277 -9
- package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +92 -1
- package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +91 -1
- package/src/views/bd/setting/form_template/mixins/itemEdit.js +104 -1
- package/src/views/bd/setting/form_template/mixins/itemList.js +234 -1
- package/src/views/bd/setting/form_template/mixins/list.js +672 -22
- package/src/views/bd/setting/form_template/mixins/list2.js +411 -0
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
- package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -3
- package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -7
- 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 +161 -127
- 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 +93 -0
- package/src/views/bd/setting/logic_param/mixins/list.js +376 -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/dialog.js +139 -1
- 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 +1073 -426
- package/src/views/bd/setting/table_model/list.vue +213 -128
- package/src/views/bd/setting/table_model/mixins/dialog.js +71 -1
- package/src/views/bd/setting/table_model/mixins/edit.js +1284 -13
- package/src/views/bd/setting/table_model/mixins/list.js +441 -14
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +108 -1
- package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/utils/index.js +60 -1
- 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 +195 -163
- package/src/views/user/company_info/edit.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +3 -0
- package/src/views/user/extend_datasource/edit.vue +2 -1
- package/src/views/user/extend_datasource/list.vue +3 -0
- package/src/views/user/fieldTranslation/editDialog.vue +8 -8
- package/src/views/user/fieldTranslation/list.vue +33 -33
- package/src/views/user/form/vform/designer.vue +790 -749
- package/src/views/user/form/vform/out_render.vue +1 -1
- package/src/views/user/form/vform/render.vue +67 -37
- package/src/views/user/form/view/edit.vue +38 -37
- package/src/views/user/form/view/list.vue +270 -49
- package/src/views/user/home/default.vue +1026 -979
- package/src/views/user/home/dev.vue +29 -0
- package/src/views/user/home/index.vue +18 -7
- 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 +186 -9
- package/src/views/user/menu/list.vue +27 -1
- package/src/views/user/notify_message/dialog.vue +44 -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 -211
- package/src/views/user/outLink/index.vue +67 -11
- package/src/views/user/position/list.vue +112 -72
- 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/infoDialog.vue +2 -1
- package/src/views/user/user/dialog.vue +46 -23
- package/src/views/user/user/edit.vue +1338 -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/info.vue +253 -140
- package/src/views/user/user/list.vue +652 -563
- package/src/views/user/user/modifyPasswordDialog.vue +64 -53
- package/src/views/user/wf/wfReport/index.vue +619 -0
- package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
- package/src/views/user/wf/wf_manage/list.vue +379 -250
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +25 -22
- 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
- package/src/views/user/workbench_menu/list.vue +555 -0
- package/src/utils/renderUtils.js +0 -76
|
@@ -1,997 +1,1654 @@
|
|
|
1
|
-
import {
|
|
2
|
-
deepClone,
|
|
3
|
-
translateOptionItems,
|
|
4
|
-
getDSByName,
|
|
5
|
-
overwriteObj,
|
|
6
|
-
runDataSourceRequest,
|
|
7
|
-
getReportGlobalMap,
|
|
8
|
-
getAccessUrl
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
);
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
this.
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
this.
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
this.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
)
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
if (
|
|
386
|
-
this.
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
} else
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
this.
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
this.
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
this.
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}
|
|
546
|
-
},
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
},
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
this.
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
if (this.field.options.
|
|
635
|
-
let
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
if (this.field.formItemFlag) {
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
this.field.options.
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
},
|
|
840
|
-
|
|
841
|
-
this.field.options.
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
.
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
this.
|
|
931
|
-
}
|
|
932
|
-
})
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
if (
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
},
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1
|
+
import {
|
|
2
|
+
deepClone,
|
|
3
|
+
translateOptionItems,
|
|
4
|
+
getDSByName,
|
|
5
|
+
overwriteObj,
|
|
6
|
+
runDataSourceRequest,
|
|
7
|
+
getReportGlobalMap,
|
|
8
|
+
getAccessUrl,
|
|
9
|
+
generateId,
|
|
10
|
+
trim
|
|
11
|
+
} from "../../../../../components/xform/utils/util";
|
|
12
|
+
import FormValidators, {getRegExp} from "../../../../../components/xform/utils/validators";
|
|
13
|
+
import scriptHttpMixin from "../../../../../components/xform/mixins/scriptHttp";
|
|
14
|
+
import defaultHandleMixin from "../../../../../components/xform/mixins/defaultHandle";
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
fieldIsUsedInFormula, calculateFormula, recalculateFormulaOnSubFormRowDelete,
|
|
18
|
+
} from '@base/components/xform/utils/formula-util'
|
|
19
|
+
import * as formulajs from '@formulajs/formulajs'
|
|
20
|
+
import settingConfig from "@/settings.js";
|
|
21
|
+
|
|
22
|
+
let modules = {};
|
|
23
|
+
const isDev = process.env.NODE_ENV === "development";
|
|
24
|
+
const baseRefUtil = {
|
|
25
|
+
deepClone,
|
|
26
|
+
translateOptionItems,
|
|
27
|
+
getDSByName,
|
|
28
|
+
overwriteObj,
|
|
29
|
+
runDataSourceRequest,
|
|
30
|
+
FormValidators,
|
|
31
|
+
getReportGlobalMap,
|
|
32
|
+
getAccessUrl,
|
|
33
|
+
};
|
|
34
|
+
modules = {
|
|
35
|
+
mixins: [scriptHttpMixin, defaultHandleMixin],
|
|
36
|
+
props: {
|
|
37
|
+
columnConfig: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: null,
|
|
40
|
+
},
|
|
41
|
+
tableParam: {
|
|
42
|
+
type: Object,
|
|
43
|
+
default: null,
|
|
44
|
+
},
|
|
45
|
+
formItemProp: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: null,
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
provide() {
|
|
51
|
+
return {
|
|
52
|
+
tableParam: this.tableParam,
|
|
53
|
+
formItemProp: this.formItemProp,
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
inject: [
|
|
57
|
+
"refList",
|
|
58
|
+
"widgetKeyNameMap",
|
|
59
|
+
"getFormConfig",
|
|
60
|
+
"globalOptionData",
|
|
61
|
+
"globalModel",
|
|
62
|
+
"getOptionData",
|
|
63
|
+
"getGlobalDsv",
|
|
64
|
+
"getReadMode",
|
|
65
|
+
"getSubFormFieldFlag",
|
|
66
|
+
"getSubFormName",
|
|
67
|
+
"getReportTemplate",
|
|
68
|
+
"getObjectFieldFlag",
|
|
69
|
+
"getObjectName",
|
|
70
|
+
],
|
|
71
|
+
data: function () {
|
|
72
|
+
return {
|
|
73
|
+
fieldReadonlyFlag: !1,
|
|
74
|
+
requestAccess: null,
|
|
75
|
+
extraAccessData: {},
|
|
76
|
+
timerMap: {},
|
|
77
|
+
|
|
78
|
+
disabled: false,
|
|
79
|
+
hidden: false,
|
|
80
|
+
readonly: false
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
beforeDestroy() {
|
|
84
|
+
this.clearAllInterval();
|
|
85
|
+
},
|
|
86
|
+
created() {
|
|
87
|
+
// this.initFieldAttrs();
|
|
88
|
+
this.initConfig();
|
|
89
|
+
this.initValueWatchEvent();
|
|
90
|
+
if (this.field.options.searchDialogConfig) {
|
|
91
|
+
if (this.field.options.searchDialogConfig.multipleChoices === void 0) {
|
|
92
|
+
if (this.hasVabsearchFlag()) {
|
|
93
|
+
this.$set(
|
|
94
|
+
this.field.options.searchDialogConfig,
|
|
95
|
+
"multipleChoices",
|
|
96
|
+
false
|
|
97
|
+
);
|
|
98
|
+
} else {
|
|
99
|
+
this.$set(
|
|
100
|
+
this.field.options.searchDialogConfig,
|
|
101
|
+
"multipleChoices",
|
|
102
|
+
true
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
mounted() {
|
|
109
|
+
},
|
|
110
|
+
/*watch: {
|
|
111
|
+
currentValue(val) {
|
|
112
|
+
this.initFieldModel(true);
|
|
113
|
+
},
|
|
114
|
+
},*/
|
|
115
|
+
computed: {
|
|
116
|
+
/* currentValue() {
|
|
117
|
+
let currentData =
|
|
118
|
+
this.tableParam && this.tableParam.row
|
|
119
|
+
? this.tableParam.row
|
|
120
|
+
: this.formModel;
|
|
121
|
+
let currentValue = currentData[this.fieldKeyName];
|
|
122
|
+
return currentValue;
|
|
123
|
+
}, */
|
|
124
|
+
formConfig: function () {
|
|
125
|
+
return this.getFormConfig();
|
|
126
|
+
},
|
|
127
|
+
subFormName: function () {
|
|
128
|
+
return this.getSubFormName ? this.getSubFormName() : "";
|
|
129
|
+
},
|
|
130
|
+
subFormItemFlag: function () {
|
|
131
|
+
return !!this.getSubFormFieldFlag && this.getSubFormFieldFlag();
|
|
132
|
+
},
|
|
133
|
+
formModel: {
|
|
134
|
+
cache: !1,
|
|
135
|
+
get: function () {
|
|
136
|
+
return this.globalModel.formModel;
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
isReadMode: function () {
|
|
140
|
+
return !!this.getReadMode() || this.fieldReadonlyFlag;
|
|
141
|
+
},
|
|
142
|
+
optionLabel() {
|
|
143
|
+
return this.getOptionLabel();
|
|
144
|
+
},
|
|
145
|
+
tableRow() {
|
|
146
|
+
let tableParam = this.tableParam;
|
|
147
|
+
return tableParam && tableParam.row ? tableParam.row : null;
|
|
148
|
+
},
|
|
149
|
+
fieldKeyName() {
|
|
150
|
+
let o = this.field.options.name;
|
|
151
|
+
return (
|
|
152
|
+
(this.field.options.keyNameEnabled && this.field.options.keyName) || o
|
|
153
|
+
);
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
methods: {
|
|
157
|
+
getCurrentValue() {
|
|
158
|
+
let currentData =
|
|
159
|
+
this.tableParam && this.tableParam.row
|
|
160
|
+
? this.tableParam.row
|
|
161
|
+
: this.formModel;
|
|
162
|
+
let currentValue = currentData[this.fieldKeyName];
|
|
163
|
+
return currentValue;
|
|
164
|
+
},
|
|
165
|
+
setFormScriptEnabled(value){
|
|
166
|
+
this.field.options.formScriptEnabled = value || false
|
|
167
|
+
},
|
|
168
|
+
getOptionLabel(){
|
|
169
|
+
if (this.fieldModel === null) {
|
|
170
|
+
return null
|
|
171
|
+
} else {
|
|
172
|
+
let resultList = []
|
|
173
|
+
let labelField = this.getOptionItemLabelKey();
|
|
174
|
+
let valueField = this.getOptionItemValueKey();
|
|
175
|
+
this.field.options.optionItems.forEach(oItem => {
|
|
176
|
+
if ((oItem[valueField] === this.fieldModel) || (this.findInArray(this.fieldModel, oItem[valueField])) !== -1) {
|
|
177
|
+
resultList.push(this.$t1(oItem[labelField]))
|
|
178
|
+
// resultContent = resultContent === '--' ? oItem.label : resultContent + ' ' + oItem.label
|
|
179
|
+
}
|
|
180
|
+
})
|
|
181
|
+
return resultList.join(",")
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
initValueWatchEvent() {
|
|
185
|
+
if (!this.designer) {
|
|
186
|
+
this.$watch(() => {
|
|
187
|
+
let currentData = this.tableParam && this.tableParam.row
|
|
188
|
+
? this.tableParam.row
|
|
189
|
+
: this.formModel;
|
|
190
|
+
let currentValue = currentData[this.fieldKeyName];
|
|
191
|
+
return currentValue;
|
|
192
|
+
}, (newValue, oldValue) => {
|
|
193
|
+
if (oldValue !== undefined) {
|
|
194
|
+
this.initFieldModel(true);
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
initFieldAttrs() {
|
|
200
|
+
this.setDisabled(this.field.options.disabled)
|
|
201
|
+
this.setHidden(this.field.options.hidden)
|
|
202
|
+
this.setReadonly(this.field.options.readonly)
|
|
203
|
+
},
|
|
204
|
+
initConfig() {
|
|
205
|
+
/*if (this.designState) {
|
|
206
|
+
let config = this.designer.getFieldWidgetByType(this.field.type);
|
|
207
|
+
if(config){
|
|
208
|
+
let defaultOptions = config.options;
|
|
209
|
+
let options = this.field.options;
|
|
210
|
+
Object.keys(defaultOptions).forEach(function (k) {
|
|
211
|
+
if (!options.hasOwnProperty(k)) {
|
|
212
|
+
let val = defaultOptions[k]
|
|
213
|
+
if (Array.isArray(val)) {
|
|
214
|
+
options[k] = []
|
|
215
|
+
} else {
|
|
216
|
+
options[k] = null
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
}*/
|
|
223
|
+
|
|
224
|
+
/*this.field.options = Object.assign(
|
|
225
|
+
{},
|
|
226
|
+
config.options,
|
|
227
|
+
this.field.options
|
|
228
|
+
);*/
|
|
229
|
+
},
|
|
230
|
+
findInArray: function (e, t) {
|
|
231
|
+
if (!Array.isArray(e)) return -1;
|
|
232
|
+
let i = -1;
|
|
233
|
+
return (
|
|
234
|
+
e.forEach(function (e, n) {
|
|
235
|
+
e === t && (i = n);
|
|
236
|
+
}),
|
|
237
|
+
i
|
|
238
|
+
);
|
|
239
|
+
},
|
|
240
|
+
getPropName: function () {
|
|
241
|
+
if (this.formItemProp) {
|
|
242
|
+
return this.formItemProp;
|
|
243
|
+
} else {
|
|
244
|
+
return this.subFormItemFlag && !this.designState
|
|
245
|
+
? this.subFormName +
|
|
246
|
+
"." +
|
|
247
|
+
this.subFormRowIndex +
|
|
248
|
+
"." +
|
|
249
|
+
this.fieldKeyName
|
|
250
|
+
: this.getObjectFieldFlag() && !this.designState
|
|
251
|
+
? this.getObjectName() + "." + this.fieldKeyName
|
|
252
|
+
: this.fieldKeyName;
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
initFieldModel: function (flag) {
|
|
256
|
+
let e = this;
|
|
257
|
+
if (this.field.formItemFlag) {
|
|
258
|
+
let currentData =
|
|
259
|
+
this.tableParam && this.tableParam.row
|
|
260
|
+
? this.tableParam.row
|
|
261
|
+
: this.formModel;
|
|
262
|
+
/*if (this.subFormItemFlag && !this.designState) {
|
|
263
|
+
let t = currentData[this.subFormName];
|
|
264
|
+
return void 0 !== t && void 0 !== t[this.subFormRowIndex] && void 0 !== t[this.subFormRowIndex][
|
|
265
|
+
this.fieldKeyName
|
|
266
|
+
] || void 0 === this.field.options.defaultValue ? void 0 === t[this.subFormRowIndex][this
|
|
267
|
+
.fieldKeyName
|
|
268
|
+
] ? (this.fieldModel = null,
|
|
269
|
+
t[this.subFormRowIndex][this.fieldKeyName] = null) : this.fieldModel = t[this
|
|
270
|
+
.subFormRowIndex][this.fieldKeyName] : (this.fieldModel = this.field.options
|
|
271
|
+
.defaultValue,
|
|
272
|
+
t[this.subFormRowIndex][this.fieldKeyName] = this.field.options.defaultValue),
|
|
273
|
+
setTimeout((function () {
|
|
274
|
+
e.handleOnChangeForSubForm(e.fieldModel, e.oldFieldValue, t, e.subFormRowId)
|
|
275
|
+
}), 800),
|
|
276
|
+
this.oldFieldValue = baseRefUtil.deepClone(this.fieldModel),
|
|
277
|
+
void this.initFileList();
|
|
278
|
+
}*/
|
|
279
|
+
|
|
280
|
+
let defaultValue = this.field.options.defaultValue;
|
|
281
|
+
let dataId = this.getFormRef()?.dataId ?? null;
|
|
282
|
+
let nullValue = null;
|
|
283
|
+
let widgetType = this.field.type;
|
|
284
|
+
if (widgetType === "number") {
|
|
285
|
+
nullValue = undefined;
|
|
286
|
+
} else if (widgetType === 'checkbox' || (widgetType === 'select' && this.field.options.multiple)) {
|
|
287
|
+
nullValue = [];
|
|
288
|
+
} else if (widgetType === "time-range" || widgetType === "date-range" || (widgetType === 'date' && this.field.options.type === "dates")) {
|
|
289
|
+
nullValue = [];
|
|
290
|
+
}
|
|
291
|
+
if (void 0 === currentData[this.fieldKeyName]) {
|
|
292
|
+
this.$set(currentData, this.fieldKeyName, nullValue);
|
|
293
|
+
}
|
|
294
|
+
if (flag) {
|
|
295
|
+
this.fieldModel = currentData[this.fieldKeyName];
|
|
296
|
+
} else if (currentData[this.fieldKeyName] !== null) {
|
|
297
|
+
this.fieldModel = currentData[this.fieldKeyName];
|
|
298
|
+
} else {
|
|
299
|
+
if (!dataId) {
|
|
300
|
+
//新增
|
|
301
|
+
if (!this.designState && this.hasVabsearchFlag() && !this.field.options.multipleChoices) {
|
|
302
|
+
let searchDialogConfig = this.field.options.searchDialogConfig || {};
|
|
303
|
+
if (this.field.options.userDefaultVabSearch) {
|
|
304
|
+
let userInfo = this.getFormRef().getUserInfo();
|
|
305
|
+
let valueSourceField = "id";
|
|
306
|
+
let labelSourceField = "nick_name";
|
|
307
|
+
if (this.field.options.clickBindEvent === "1") {
|
|
308
|
+
if (searchDialogConfig.valueSourceField) valueSourceField = searchDialogConfig.valueSourceField
|
|
309
|
+
if (searchDialogConfig.labelSourceField) labelSourceField = searchDialogConfig.labelSourceField
|
|
310
|
+
}
|
|
311
|
+
this.initValue(userInfo[valueSourceField] ?? null);
|
|
312
|
+
this.setShowValue(userInfo[labelSourceField] ?? null);
|
|
313
|
+
} else if (this.field.options.saleOrgDefaultVabSearch) {
|
|
314
|
+
let saleOrgDTO = this.getFormRef().getDefaultSaleOrgDTO();
|
|
315
|
+
if (saleOrgDTO) {
|
|
316
|
+
let valueSourceField = "id";
|
|
317
|
+
let labelSourceField = "name";
|
|
318
|
+
if (this.field.options.clickBindEvent === "1") {
|
|
319
|
+
if (searchDialogConfig.valueSourceField) valueSourceField = searchDialogConfig.valueSourceField
|
|
320
|
+
if (searchDialogConfig.labelSourceField) labelSourceField = searchDialogConfig.labelSourceField
|
|
321
|
+
}
|
|
322
|
+
this.initValue(saleOrgDTO[valueSourceField] ?? null);
|
|
323
|
+
this.setShowValue(saleOrgDTO[labelSourceField] ?? null);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
if (!this.tableParam) {
|
|
328
|
+
//主表
|
|
329
|
+
if (this.isNotNullVal(defaultValue)) {
|
|
330
|
+
this.initValue(defaultValue);
|
|
331
|
+
}
|
|
332
|
+
} else {
|
|
333
|
+
//明细
|
|
334
|
+
if (!this.tableParam.row.id && this.isNotNullVal(defaultValue)) {
|
|
335
|
+
this.initValue(defaultValue);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
} else {
|
|
339
|
+
//编辑
|
|
340
|
+
if (!this.tableParam) {
|
|
341
|
+
//主表
|
|
342
|
+
} else {
|
|
343
|
+
//明细
|
|
344
|
+
if (!this.tableParam.row.id && this.isNotNullVal(defaultValue)) {
|
|
345
|
+
this.initValue(defaultValue);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/*if (this.fieldKeyName === "f_mobile" && !this.fieldModel) {
|
|
352
|
+
}*/
|
|
353
|
+
/*void 0 === currentData[this.fieldKeyName] && void 0 !== this.field.options.defaultValue
|
|
354
|
+
? this.fieldModel = this.field.options.defaultValue :
|
|
355
|
+
void 0 === currentData[this.fieldKeyName] ? currentData[this.fieldKeyName] = null : this.fieldModel = currentData[this.fieldKeyName];*/
|
|
356
|
+
this.oldFieldValue = baseRefUtil.deepClone(this.fieldModel);
|
|
357
|
+
/*if (this.fieldKeyName === "f_contract" && !this.fieldModel) {
|
|
358
|
+
}*/
|
|
359
|
+
this.initFileList();
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
isNotNullVal(val) {
|
|
363
|
+
return val !== null && val !== undefined && val !== "";
|
|
364
|
+
},
|
|
365
|
+
initFileList: function () {
|
|
366
|
+
("picture-upload" !== this.field.type &&
|
|
367
|
+
"file-upload" !== this.field.type) ||
|
|
368
|
+
!0 === this.designState ||
|
|
369
|
+
(this.fieldModel &&
|
|
370
|
+
(Array.isArray(this.fieldModel)
|
|
371
|
+
? (this.fileList = baseRefUtil.deepClone(this.fieldModel))
|
|
372
|
+
: this.fileList.splice(
|
|
373
|
+
0,
|
|
374
|
+
0,
|
|
375
|
+
baseRefUtil.deepClone(this.fieldModel)
|
|
376
|
+
)));
|
|
377
|
+
},
|
|
378
|
+
handleCreatedEnterEvent() {
|
|
379
|
+
this.handleCustomEvent(this.field.options.onCreatedEnter);
|
|
380
|
+
},
|
|
381
|
+
initEventHandler() {
|
|
382
|
+
this.designState ||
|
|
383
|
+
(this.$on("setFormData", (o) => {
|
|
384
|
+
/*if (!this.subFormItemFlag)
|
|
385
|
+
if (
|
|
386
|
+
!!this.getObjectFieldFlag()
|
|
387
|
+
&& !this.designState
|
|
388
|
+
) {
|
|
389
|
+
const e = this.getObjectModel();
|
|
390
|
+
this.setValue(
|
|
391
|
+
e === void 0
|
|
392
|
+
? null
|
|
393
|
+
: e[this.fieldKeyName]
|
|
394
|
+
);
|
|
395
|
+
} else this.setValue(o[this.fieldKeyName]);*/
|
|
396
|
+
this.subFormItemFlag || this.setValue(o[this.fieldKeyName]);
|
|
397
|
+
}),
|
|
398
|
+
this.$on("field-value-changed", (o) => {
|
|
399
|
+
if (this.subFormItemFlag) {
|
|
400
|
+
let e = this.formModel[this.subFormName];
|
|
401
|
+
this.handleOnChangeForSubForm(o[0], o[1], e, this.subFormRowId);
|
|
402
|
+
} else this.handleOnChange(o[0], o[1]);
|
|
403
|
+
}),
|
|
404
|
+
/* this.$on("field-value-changed", function (e) {
|
|
405
|
+
if (this.subFormItemFlag) {
|
|
406
|
+
let t = this.formModel[this.subFormName];
|
|
407
|
+
this.handleOnChangeForSubForm(e[0], e[1], t, this.subFormRowId);
|
|
408
|
+
} else this.handleOnChange(e[0], e[1]);
|
|
409
|
+
}), */
|
|
410
|
+
this.$on("sync-field-value", (o) => {
|
|
411
|
+
const e = o[0],
|
|
412
|
+
n = o[1];
|
|
413
|
+
if (
|
|
414
|
+
this.field.options.name === e ||
|
|
415
|
+
(!n && this.field.options.keyName !== e) ||
|
|
416
|
+
(!this.field.options.keyName && this.field.options.name !== n) ||
|
|
417
|
+
(!!this.field.options.keyName &&
|
|
418
|
+
!!n &&
|
|
419
|
+
this.field.options.keyName !== n) ||
|
|
420
|
+
o[5] !== this.getObjectName()
|
|
421
|
+
)
|
|
422
|
+
return;
|
|
423
|
+
const s = o[2],
|
|
424
|
+
c = o[3],
|
|
425
|
+
u = o[4];
|
|
426
|
+
!this.subFormName && !s
|
|
427
|
+
? this.setValue(u, !0)
|
|
428
|
+
: this.subFormName === s &&
|
|
429
|
+
this.subFormRowId === c &&
|
|
430
|
+
this.setValue(u, !0);
|
|
431
|
+
}),
|
|
432
|
+
|
|
433
|
+
/* 执行计算公式运算 */
|
|
434
|
+
this.$on('calculate-formula', (newValue, sourceWidget) => {
|
|
435
|
+
if (!!this.field.options.formulaEnabled && !!this.field.options.formula) {
|
|
436
|
+
let changedFieldRef = sourceWidget
|
|
437
|
+
const changedFieldName = sourceWidget.field.options.name
|
|
438
|
+
//检查计算公式是否包含当前修改字段
|
|
439
|
+
if (fieldIsUsedInFormula(changedFieldName, this.field.options.formula, this.getFormRef(), this)) {
|
|
440
|
+
|
|
441
|
+
/* 计算公式的计算改成延时执行,否则当子表单开启默认创建新行后,子表单字段的计算公式中使用到主表单字段则会出现计算错误!! */
|
|
442
|
+
//calculateFormula(this.getFormRef(), this.getGlobalDsv(), formulajs, this, changedFieldRef)
|
|
443
|
+
|
|
444
|
+
setTimeout(() => {
|
|
445
|
+
calculateFormula(this.getFormRef(), this.getGlobalDsv(), formulajs, this, changedFieldRef)
|
|
446
|
+
}, 200)
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}),
|
|
450
|
+
|
|
451
|
+
/* 删除子表单行后重新执行计算公式运算 */
|
|
452
|
+
this.$on('calculate-formula-sfRowDeleted', (newValue, deletedFieldName) => {
|
|
453
|
+
if (!!this.field.options.formulaEnabled && !!this.field.options.formula) {
|
|
454
|
+
//检查计算公式是否包含当前修改字段
|
|
455
|
+
if (fieldIsUsedInFormula(deletedFieldName, this.field.options.formula, this.getFormRef())) {
|
|
456
|
+
recalculateFormulaOnSubFormRowDelete(this.getFormRef(), this.getGlobalDsv(), formulajs, this)
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}),
|
|
460
|
+
|
|
461
|
+
this.$on("loadOptionItemsFromDataSet", (o) => {
|
|
462
|
+
this.loadOptionItemsFromDataSet(o), (this.dataSetLoadedFlag = !0);
|
|
463
|
+
}),
|
|
464
|
+
this.$on("reloadOptionItems", (o) => {
|
|
465
|
+
(o.length === 0 || o.indexOf(this.field.options.name) > -1) &&
|
|
466
|
+
this.initOptionItems(!0);
|
|
467
|
+
}));
|
|
468
|
+
},
|
|
469
|
+
getEventParam() {
|
|
470
|
+
let formRef = this.getFormRef();
|
|
471
|
+
let dataId = formRef?.dataId;
|
|
472
|
+
let formCode = formRef?.reportTemplate?.formCode;
|
|
473
|
+
return {
|
|
474
|
+
eventParamNames: ["dataId", "formCode"],
|
|
475
|
+
eventParamValues: [dataId, formCode],
|
|
476
|
+
};
|
|
477
|
+
},
|
|
478
|
+
handleCustomEvent(funtionStr, eventParamNames = [], eventParamValues = []) {
|
|
479
|
+
if (!this.designState && funtionStr) {
|
|
480
|
+
let eventParam = this.getEventParam();
|
|
481
|
+
let e = new Function(
|
|
482
|
+
...eventParam.eventParamNames,
|
|
483
|
+
...eventParamNames,
|
|
484
|
+
funtionStr
|
|
485
|
+
);
|
|
486
|
+
let that = this;
|
|
487
|
+
try{
|
|
488
|
+
return e.call(
|
|
489
|
+
this,
|
|
490
|
+
...eventParam.eventParamValues,
|
|
491
|
+
...eventParamValues
|
|
492
|
+
);
|
|
493
|
+
}catch(error){
|
|
494
|
+
if(settingConfig.fontErrorTipEnabled){
|
|
495
|
+
that.$errorMsg({
|
|
496
|
+
rmid: that.$t1("前端脚本异常"),
|
|
497
|
+
content: error.message,
|
|
498
|
+
type: 'error',
|
|
499
|
+
_errorMsg: error.stack
|
|
500
|
+
})
|
|
501
|
+
}
|
|
502
|
+
throw error;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
handleOnCreated: function () {
|
|
507
|
+
this.handleCustomEvent(this.field.options.onCreated);
|
|
508
|
+
},
|
|
509
|
+
handleOnMounted: function () {
|
|
510
|
+
this.handleCustomEvent(this.field.options.onMounted);
|
|
511
|
+
this.autoExcScript();
|
|
512
|
+
},
|
|
513
|
+
registerToRefList: function (e) {
|
|
514
|
+
/* null !== this.refList && this.field.options.name && (this.tableParam && !this.designState ? (e
|
|
515
|
+
&& delete this.refList[e + "@row" + this.tableParam.rowIndex],
|
|
516
|
+
this.refList[this.field.options.name + "@row" + this.tableParam.rowIndex] = this) : (e
|
|
517
|
+
&& delete this.refList[e],
|
|
518
|
+
this.refList[this.field.options.name] = this)); */
|
|
519
|
+
if (null !== this.refList && this.field.options.name) {
|
|
520
|
+
if (this.tableParam && !this.designState) {
|
|
521
|
+
let row = this.tableParam.row;
|
|
522
|
+
if (!row._X_ROW_KEY) {
|
|
523
|
+
row._X_ROW_KEY = "row_" + generateId()
|
|
524
|
+
}
|
|
525
|
+
let keyVal = row._X_ROW_KEY;
|
|
526
|
+
e && delete this.refList[e + "_" + keyVal];
|
|
527
|
+
this.refList[this.field.options.name + "_" + keyVal] = this;
|
|
528
|
+
|
|
529
|
+
/* if (!!e) {
|
|
530
|
+
delete this.refList[e + '_' + this.subFormRowId]
|
|
531
|
+
}
|
|
532
|
+
this.refList[this.field.options.name + '@' + this.subFormRowId] = this
|
|
533
|
+
*/
|
|
534
|
+
} else {
|
|
535
|
+
e && delete this.refList[e];
|
|
536
|
+
this.refList[this.field.options.name] = this;
|
|
537
|
+
if (this.widgetKeyNameMap) {
|
|
538
|
+
if (!this.widgetKeyNameMap[this.fieldKeyName]) {
|
|
539
|
+
this.widgetKeyNameMap[this.fieldKeyName] = [this.field.options.name]
|
|
540
|
+
} else {
|
|
541
|
+
this.widgetKeyNameMap[this.fieldKeyName].push(this.field.options.name);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
getTableRef() {
|
|
548
|
+
let tableRef = this.getWidgetRef(this.parentWidget.options.name)
|
|
549
|
+
return tableRef;
|
|
550
|
+
},
|
|
551
|
+
getWidgetRefByTableRow(index, name) {
|
|
552
|
+
let tableRef = this.getTableRef();
|
|
553
|
+
return tableRef.getWidgetRefByTableRow(index, name)
|
|
554
|
+
},
|
|
555
|
+
getWidgetRefByTableParam(param) {
|
|
556
|
+
let tableParam = param || this.tableParam;
|
|
557
|
+
let tableRef = this.getTableRef();
|
|
558
|
+
return tableRef.getWidgetRefByTableParam(tableParam);
|
|
559
|
+
},
|
|
560
|
+
unregisterFromRefList: function () {
|
|
561
|
+
if (null !== this.refList && this.field.options.name) {
|
|
562
|
+
let e = this.field.options.name;
|
|
563
|
+
this.tableParam && !this.designState
|
|
564
|
+
? delete this.refList[e + "@row" + this.tableParam.rowIndex]
|
|
565
|
+
: delete this.refList[e];
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
initOptionItemsHandle() {
|
|
569
|
+
if(this.tableParam){
|
|
570
|
+
if(this.field._syncInited){
|
|
571
|
+
this.handleCustomEvent(
|
|
572
|
+
this.field.options.formScriptSuccess
|
|
573
|
+
);
|
|
574
|
+
}
|
|
575
|
+
return
|
|
576
|
+
}
|
|
577
|
+
this.initGloatOptionItems(true);
|
|
578
|
+
},
|
|
579
|
+
initGloatOptionItems(initFlag) {
|
|
580
|
+
let t = this;
|
|
581
|
+
if (this.designState) {
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
if (
|
|
586
|
+
this.field.type === "radio" ||
|
|
587
|
+
this.field.type === "checkbox" ||
|
|
588
|
+
this.field.type === "select" ||
|
|
589
|
+
this.field.type === "cascader" ||
|
|
590
|
+
this.field.type === "status"
|
|
591
|
+
) {
|
|
592
|
+
/* this.field.options.optionItems.forEach(item=>{
|
|
593
|
+
if (!item.hasOwnProperty('disabled')) {
|
|
594
|
+
this.$set(item,"disabled",false)
|
|
595
|
+
}
|
|
596
|
+
}) */
|
|
597
|
+
|
|
598
|
+
let reportTemplate = this.getFormRef().reportTemplate;
|
|
599
|
+
let formCode = reportTemplate.formCode;
|
|
600
|
+
let formScriptEnabled = this.field.options.formScriptEnabled || false;
|
|
601
|
+
let scriptCode = this.field.options.formScriptCode || "getList";
|
|
602
|
+
let tableParam = this.tableParam;
|
|
603
|
+
if (formScriptEnabled) {
|
|
604
|
+
if (initFlag && tableParam) {
|
|
605
|
+
let optionItems = this.getOptionItemsFlag()
|
|
606
|
+
if (optionItems !== undefined) {
|
|
607
|
+
return
|
|
608
|
+
}
|
|
609
|
+
this.setOptionItemsFlag(null)
|
|
610
|
+
}
|
|
611
|
+
let accessParam = this.handleCustomEvent(
|
|
612
|
+
this.field.options.formScriptParam
|
|
613
|
+
);
|
|
614
|
+
return this.formHttp({
|
|
615
|
+
scriptCode: scriptCode,
|
|
616
|
+
data: {
|
|
617
|
+
formCode: formCode,
|
|
618
|
+
formVersion: reportTemplate.formVersion,
|
|
619
|
+
taBm: this.fieldKeyName,
|
|
620
|
+
data: {
|
|
621
|
+
...accessParam,
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
callback: (res) => {
|
|
625
|
+
let rows = res.objx?.records || res.objx || [];
|
|
626
|
+
this.loadGloatOptions(rows, initFlag);
|
|
627
|
+
this.handleCustomEvent(
|
|
628
|
+
this.field.options.formScriptSuccess,
|
|
629
|
+
["res"],
|
|
630
|
+
[res]
|
|
631
|
+
);
|
|
632
|
+
},
|
|
633
|
+
});
|
|
634
|
+
} else if (this.field.options.commonAttributeEnabled) {
|
|
635
|
+
let commonAttributeCode = this.field.options.commonAttributeCode;
|
|
636
|
+
if (!commonAttributeCode) return;
|
|
637
|
+
if (initFlag && tableParam) {
|
|
638
|
+
let optionItems = this.getOptionItemsFlag();
|
|
639
|
+
if (optionItems !== undefined) {
|
|
640
|
+
return
|
|
641
|
+
}
|
|
642
|
+
this.setOptionItemsFlag(null)
|
|
643
|
+
}
|
|
644
|
+
let accessParam = this.handleCustomEvent(
|
|
645
|
+
this.field.options.formScriptParam
|
|
646
|
+
);
|
|
647
|
+
this.$getBaseDicts({
|
|
648
|
+
code: commonAttributeCode,
|
|
649
|
+
data:{
|
|
650
|
+
...accessParam
|
|
651
|
+
},
|
|
652
|
+
success: ({dicts, dictMap}) => {
|
|
653
|
+
this.loadGloatOptions(dicts, initFlag);
|
|
654
|
+
this.handleCustomEvent(
|
|
655
|
+
this.field.options.formScriptSuccess,
|
|
656
|
+
["res"],
|
|
657
|
+
[dicts]
|
|
658
|
+
);
|
|
659
|
+
},
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
loadGloatOptions: function (e, initFlag) {
|
|
667
|
+
let optionItems = baseRefUtil.translateOptionItems(
|
|
668
|
+
e,
|
|
669
|
+
this.field.type,
|
|
670
|
+
this.getOptionItemLabelKey(),
|
|
671
|
+
this.getOptionItemValueKey()
|
|
672
|
+
);
|
|
673
|
+
// this.field.options.optionItems = optionItems
|
|
674
|
+
this.setOptionItems(optionItems)
|
|
675
|
+
let tableParam = this.tableParam;
|
|
676
|
+
if (tableParam) {
|
|
677
|
+
if (initFlag) {
|
|
678
|
+
this.setOptionItemsFlag(true)
|
|
679
|
+
}
|
|
680
|
+
this.loadTableOtions(optionItems)
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
setOptionItems(rows){
|
|
684
|
+
let formScriptEnabledTypes = ['select', 'checkbox', 'radio',"cascader"]
|
|
685
|
+
let widgetType = this.field.type;
|
|
686
|
+
if(formScriptEnabledTypes.includes(widgetType)){
|
|
687
|
+
this.field.options.optionItems = rows || [];
|
|
688
|
+
}else if(widgetType=="status"){
|
|
689
|
+
this.field.options.statusParam = rows || [];
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
loadTableOtions(e) {
|
|
693
|
+
let tableParam = this.tableParam;
|
|
694
|
+
if (tableParam) {
|
|
695
|
+
let optionItems = baseRefUtil.translateOptionItems(
|
|
696
|
+
e,
|
|
697
|
+
this.field.type,
|
|
698
|
+
this.getOptionItemLabelKey(),
|
|
699
|
+
this.getOptionItemValueKey()
|
|
700
|
+
);
|
|
701
|
+
let widgetName = this.field.options.name;
|
|
702
|
+
let tableWidgetName = tableParam.column.params.tableWidgetName
|
|
703
|
+
let tableTarget = this.getWidgetRef(tableWidgetName);
|
|
704
|
+
tableTarget.loopHandleWidgetByName(widgetName, (row, widget, target) => {
|
|
705
|
+
widget.options.optionItems = optionItems
|
|
706
|
+
})
|
|
707
|
+
if (tableParam.column.params.widget) {
|
|
708
|
+
if (tableParam.column.params.widget.options.name === widgetName) {
|
|
709
|
+
tableParam.column.params.widget.options.optionItems = optionItems
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
}
|
|
713
|
+
if (tableParam.column.params.editWidget) {
|
|
714
|
+
if (tableParam.column.params.editWidget.options.name === widgetName) {
|
|
715
|
+
tableParam.column.params.editWidget.options.optionItems = optionItems
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
if (tableParam.column.params.widgetList?.length) {
|
|
719
|
+
this.loopHandleWidget(tableParam.column.params.widgetList, (item1) => {
|
|
720
|
+
if (item1.options.name === widgetName) {
|
|
721
|
+
item1.options.optionItems = optionItems
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
delete tableParam.column.params[widgetName]
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
async initOptionItems(gloatFlag) {
|
|
730
|
+
let t = this;
|
|
731
|
+
if (this.designState) {
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
if (
|
|
736
|
+
this.field.type === "radio" ||
|
|
737
|
+
this.field.type === "checkbox" ||
|
|
738
|
+
this.field.type === "select" ||
|
|
739
|
+
this.field.type === "cascader"
|
|
740
|
+
) {
|
|
741
|
+
let reportTemplate = this.getFormRef().reportTemplate;
|
|
742
|
+
let formCode = reportTemplate.formCode;
|
|
743
|
+
let formScriptEnabled = this.field.options.formScriptEnabled || false;
|
|
744
|
+
let scriptCode = this.field.options.formScriptCode || "getList";
|
|
745
|
+
let tableParam = this.tableParam;
|
|
746
|
+
if (formScriptEnabled) {
|
|
747
|
+
let accessParam = this.handleCustomEvent(
|
|
748
|
+
this.field.options.formScriptParam
|
|
749
|
+
);
|
|
750
|
+
return this.formHttp({
|
|
751
|
+
scriptCode: scriptCode,
|
|
752
|
+
data: {
|
|
753
|
+
formCode: formCode,
|
|
754
|
+
formVersion: reportTemplate.formVersion,
|
|
755
|
+
taBm: this.fieldKeyName,
|
|
756
|
+
data: {
|
|
757
|
+
...accessParam,
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
callback: (res) => {
|
|
761
|
+
let rows = res.objx || [];
|
|
762
|
+
this.loadOptions(rows);
|
|
763
|
+
this.handleCustomEvent(
|
|
764
|
+
this.field.options.formScriptSuccess,
|
|
765
|
+
["res"],
|
|
766
|
+
[res]
|
|
767
|
+
);
|
|
768
|
+
},
|
|
769
|
+
});
|
|
770
|
+
} else if (this.field.options.commonAttributeEnabled) {
|
|
771
|
+
let commonAttributeCode = this.field.options.commonAttributeCode;
|
|
772
|
+
if (!commonAttributeCode) return;
|
|
773
|
+
this.$getBaseDicts({
|
|
774
|
+
code: commonAttributeCode,
|
|
775
|
+
success: ({dicts, dictMap}) => {
|
|
776
|
+
this.loadOptions(dicts);
|
|
777
|
+
this.handleCustomEvent(
|
|
778
|
+
this.field.options.formScriptSuccess,
|
|
779
|
+
["res"],
|
|
780
|
+
[dicts]
|
|
781
|
+
);
|
|
782
|
+
},
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
refreshDefaultValue: function () {
|
|
790
|
+
!0 === this.designState &&
|
|
791
|
+
void 0 !== this.field.options.defaultValue &&
|
|
792
|
+
(this.fieldModel = this.field.options.defaultValue);
|
|
793
|
+
},
|
|
794
|
+
|
|
795
|
+
clearFieldRules() {
|
|
796
|
+
if (!this.field.formItemFlag) {
|
|
797
|
+
return
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
this.rules && this.rules.splice(0, this.rules.length) //清空已有
|
|
801
|
+
},
|
|
802
|
+
|
|
803
|
+
getValidateDefaultMsg(labelCode, vldName) {
|
|
804
|
+
let label = this.$t1(labelCode);
|
|
805
|
+
let map = {
|
|
806
|
+
number: "[{label}]包含非数字字符",
|
|
807
|
+
letter: "[{label}]包含非字母字符",
|
|
808
|
+
letterAndNumber: "[{label}]只能输入字母或数字",
|
|
809
|
+
mobilePhone: "[{label}]手机号码格式有误",
|
|
810
|
+
letterStartNumberIncluded: "[{label}]必须以字母开头,可包含数字",
|
|
811
|
+
noChinese: "[{label}]不可输入中文字符",
|
|
812
|
+
chinese: "[{label}]只能输入中文字符",
|
|
813
|
+
email: "[{label}]邮箱格式有误",
|
|
814
|
+
url: "[{label}]URL格式有误",
|
|
815
|
+
required: "[{label}]不能为空"
|
|
816
|
+
}
|
|
817
|
+
let result = null
|
|
818
|
+
let value = map[vldName]
|
|
819
|
+
if (!value) {
|
|
820
|
+
value = "[{label}]invalid value"
|
|
821
|
+
}
|
|
822
|
+
result = this.$t1(value, {label});
|
|
823
|
+
return result
|
|
824
|
+
},
|
|
825
|
+
getValidationHintMsg() {
|
|
826
|
+
let vldName = this.field.options.validation
|
|
827
|
+
if (this.field.options.validationHint) {
|
|
828
|
+
return this.$t1(this.field.options.validationHint)
|
|
829
|
+
} else {
|
|
830
|
+
return this.getValidateDefaultMsg(this.field.options.label, vldName)
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
getRequiredHintMsg() {
|
|
834
|
+
if (this.field.options.requiredHint) {
|
|
835
|
+
return this.$t1(this.field.options.requiredHint)
|
|
836
|
+
} else {
|
|
837
|
+
return this.getValidateDefaultMsg(this.field.options.label, "required")
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
buildFieldRules() {
|
|
841
|
+
if (!this.field.formItemFlag || this.field.options.hidden) {
|
|
842
|
+
return
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
this.rules.splice(0, this.rules.length) //清空已有
|
|
846
|
+
if (!!this.field.options.required) {
|
|
847
|
+
this.rules.push({
|
|
848
|
+
required: true,
|
|
849
|
+
//trigger: ['blur', 'change'],
|
|
850
|
+
trigger: ['blur'], /* 去掉change事件触发校验,change事件触发时formModel数据尚未更新,导致radio/checkbox必填校验出错!! */
|
|
851
|
+
message: this.getRequiredHintMsg()
|
|
852
|
+
})
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
if (!!this.field.options.validation) {
|
|
856
|
+
let vldName = this.field.options.validation
|
|
857
|
+
if (!!FormValidators[vldName]) {
|
|
858
|
+
this.rules.push({
|
|
859
|
+
validator: FormValidators[vldName],
|
|
860
|
+
trigger: ['blur', 'change'],
|
|
861
|
+
label: this.field.options.label,
|
|
862
|
+
// errorMsg: this.field.options.validationHint
|
|
863
|
+
errorMsg: this.getValidationHintMsg()
|
|
864
|
+
})
|
|
865
|
+
} else {
|
|
866
|
+
this.rules.push({
|
|
867
|
+
validator: FormValidators['regExp'],
|
|
868
|
+
trigger: ['blur', 'change'],
|
|
869
|
+
regExp: vldName,
|
|
870
|
+
label: this.field.options.label,
|
|
871
|
+
// errorMsg: this.field.options.validationHint
|
|
872
|
+
errorMsg: this.getValidationHintMsg()
|
|
873
|
+
})
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
if (!!this.field.options.onValidate) {
|
|
878
|
+
let customFn = (rule, value, callback) => {
|
|
879
|
+
let tmpFunc = new Function('rule', 'value', 'callback', this.field.options.onValidate)
|
|
880
|
+
return tmpFunc.call(this, rule, value, callback)
|
|
881
|
+
}
|
|
882
|
+
this.rules.push({
|
|
883
|
+
validator: customFn,
|
|
884
|
+
trigger: ['blur', 'change'],
|
|
885
|
+
label: this.field.options.label
|
|
886
|
+
})
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* 禁用字段值变动触发表单校验
|
|
892
|
+
*/
|
|
893
|
+
disableChangeValidate() {
|
|
894
|
+
if (!this.rules) {
|
|
895
|
+
return
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
this.rules.forEach(rule => {
|
|
899
|
+
if (!!rule.trigger) {
|
|
900
|
+
rule.trigger.splice(0, rule.trigger.length)
|
|
901
|
+
}
|
|
902
|
+
})
|
|
903
|
+
},
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* 启用字段值变动触发表单校验
|
|
907
|
+
*/
|
|
908
|
+
enableChangeValidate() {
|
|
909
|
+
if (!this.rules) {
|
|
910
|
+
return
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
this.rules.forEach(rule => {
|
|
914
|
+
if (!!rule.trigger) {
|
|
915
|
+
rule.trigger.push('blur')
|
|
916
|
+
rule.trigger.push('change')
|
|
917
|
+
}
|
|
918
|
+
})
|
|
919
|
+
},
|
|
920
|
+
|
|
921
|
+
disableOptionOfList(optionList, optionValue) {
|
|
922
|
+
if (!!optionList && (optionList.length > 0)) {
|
|
923
|
+
let valueKey = this.getOptionItemValueKey();
|
|
924
|
+
optionList.forEach(opt => {
|
|
925
|
+
if (opt[valueKey] === optionValue) {
|
|
926
|
+
opt.disabled = true
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
if (opt.children && Array.isArray(opt.children)) {
|
|
930
|
+
this.disableOptionOfList(opt.children, optionValue)
|
|
931
|
+
}
|
|
932
|
+
})
|
|
933
|
+
this.$forceUpdate()
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
|
|
937
|
+
enableOptionOfList(optionList, optionValue) {
|
|
938
|
+
if (!!optionList && (optionList.length > 0)) {
|
|
939
|
+
let valueKey = this.getOptionItemValueKey();
|
|
940
|
+
optionList.forEach(opt => {
|
|
941
|
+
if (opt[valueKey] === optionValue) {
|
|
942
|
+
opt.disabled = false
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
if (opt.children && Array.isArray(opt.children)) {
|
|
946
|
+
this.enableOptionOfList(opt.children, optionValue)
|
|
947
|
+
}
|
|
948
|
+
})
|
|
949
|
+
this.$forceUpdate()
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
emitFieldDataChange(newValue, oldValue) {
|
|
955
|
+
if (this.designState) return
|
|
956
|
+
this.$emit('field-value-changed', [newValue, oldValue])
|
|
957
|
+
|
|
958
|
+
/* 同步更新keyName属性一致的字段组件值!! */
|
|
959
|
+
if (this.field.options.keyNameEnabled) {
|
|
960
|
+
this.getFormRef().broadcast('FieldWidget', 'sync-field-value',
|
|
961
|
+
[this.field.options.name, this.field.options.keyName, this.subFormName, this.subFormRowId,
|
|
962
|
+
newValue, this.getObjectName()])
|
|
963
|
+
} else {
|
|
964
|
+
this.getFormRef().broadcast('FieldWidget', 'sync-field-value',
|
|
965
|
+
[this.field.options.name, this.field.options.name, this.subFormName, this.subFormRowId,
|
|
966
|
+
newValue, this.getObjectName()])
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
if (this.field.type === 'number') {
|
|
970
|
+
this.getFormRef().broadcast('FieldWidget', 'calculate-formula', [newValue, this]) //触发计算公式计算
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/* 必须用dispatch向指定父组件派发消息!! */
|
|
974
|
+
this.dispatch('VFormRender', 'fieldChange',
|
|
975
|
+
[this.field.options.name, newValue, oldValue, this.subFormName, this.subFormRowIndex])
|
|
976
|
+
},
|
|
977
|
+
syncUpdateFormModel: function (e) {
|
|
978
|
+
if (!this.designState)
|
|
979
|
+
if (this.tableRow) {
|
|
980
|
+
this.tableRow[this.fieldKeyName] = e;
|
|
981
|
+
} else if (this.subFormItemFlag) {
|
|
982
|
+
let t = this.formModel[this.subFormName] || [{}],
|
|
983
|
+
i = t[this.subFormRowIndex];
|
|
984
|
+
i[this.fieldKeyName] = e;
|
|
985
|
+
} else this.formModel[this.fieldKeyName] = e;
|
|
986
|
+
},
|
|
987
|
+
handleChangeEvent: function (e) {
|
|
988
|
+
let widgetType = this.field.type;
|
|
989
|
+
if(widgetType === "select"){
|
|
990
|
+
if(e===""){
|
|
991
|
+
e = this.field.options.multiple? [] : null;
|
|
992
|
+
this.fieldModel = e;
|
|
993
|
+
}
|
|
994
|
+
}else if(widgetType === "number"){
|
|
995
|
+
if(e===undefined){
|
|
996
|
+
e = null;
|
|
997
|
+
this.fieldModel = e;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
this.syncUpdateFormModel(e),
|
|
1002
|
+
this.emitFieldDataChange(e, this.oldFieldValue),
|
|
1003
|
+
(this.oldFieldValue = baseRefUtil.deepClone(e)),
|
|
1004
|
+
this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]);
|
|
1005
|
+
},
|
|
1006
|
+
handleFocusCustomEvent: function (e) {
|
|
1007
|
+
if (
|
|
1008
|
+
((this.oldFieldValue = baseRefUtil.deepClone(this.fieldModel)),
|
|
1009
|
+
this.field.options.onFocus)
|
|
1010
|
+
) {
|
|
1011
|
+
let t = new Function("event", this.field.options.onFocus);
|
|
1012
|
+
t.call(this, e);
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
handleBlurCustomEvent: function (e) {
|
|
1016
|
+
if (this.field.options.onBlur) {
|
|
1017
|
+
let t = new Function("event", this.field.options.onBlur);
|
|
1018
|
+
t.call(this, e);
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
handleInputCustomEvent: function (e) {
|
|
1022
|
+
if (
|
|
1023
|
+
(this.syncUpdateFormModel(e),
|
|
1024
|
+
this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]),
|
|
1025
|
+
this.field.options.onInput)
|
|
1026
|
+
) {
|
|
1027
|
+
let t = new Function("value", this.field.options.onInput);
|
|
1028
|
+
t.call(this, e);
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
emitAppendButtonClick: function () {
|
|
1032
|
+
if (!this.designState) {
|
|
1033
|
+
if (this.field.options.onAppendButtonClick) {
|
|
1034
|
+
let tableParam = this.tableParam;
|
|
1035
|
+
let eventParamNames = [];
|
|
1036
|
+
let eventParamValues = [];
|
|
1037
|
+
if (tableParam) {
|
|
1038
|
+
eventParamNames = ["rowData", "rowIndex"];
|
|
1039
|
+
eventParamValues = [tableParam.row, tableParam.rowIndex];
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
this.handleCustomEvent(
|
|
1043
|
+
this.field.options.onAppendButtonClick,
|
|
1044
|
+
eventParamNames,
|
|
1045
|
+
eventParamValues
|
|
1046
|
+
);
|
|
1047
|
+
|
|
1048
|
+
// this.handleCustomEvent(this.field.options.onAppendButtonClick)
|
|
1049
|
+
} else {
|
|
1050
|
+
this.dispatch("VFormRender", "appendButtonClick", [this]);
|
|
1051
|
+
}
|
|
1052
|
+
this.handleCustomClickEvent();
|
|
1053
|
+
}
|
|
1054
|
+
},
|
|
1055
|
+
handleCustomClickEvent: function (flag) {
|
|
1056
|
+
let tableParam = this.tableParam;
|
|
1057
|
+
let clickBindEvent = !flag ? this.field.options.clickBindEvent : this.field.options.widgetTextLinkConfig?.options?.clickBindEvent;
|
|
1058
|
+
|
|
1059
|
+
const done = () => {
|
|
1060
|
+
if (clickBindEvent === "1") {
|
|
1061
|
+
//打开选择弹框
|
|
1062
|
+
this.openSearchDialog(tableParam, flag);
|
|
1063
|
+
} else if (clickBindEvent === "2") {
|
|
1064
|
+
//列表插入数据
|
|
1065
|
+
this.handleAddTableDataEvent(flag);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
if (clickBindEvent && this.field.options.onBeforeClickButton) {
|
|
1069
|
+
if (this.handleCustomEvent(this.field.options.onBeforeClickButton, ["done"], [done]) !== false) {
|
|
1070
|
+
done();
|
|
1071
|
+
}
|
|
1072
|
+
} else {
|
|
1073
|
+
done();
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
handleAddTableDataEvent(flag) {
|
|
1077
|
+
let optionModel = !flag ? this.field.options : (this.field.options.widgetTextLinkConfig?.options || {});
|
|
1078
|
+
|
|
1079
|
+
let addTableDataConfig = optionModel.addTableDataConfig || {};
|
|
1080
|
+
if (!addTableDataConfig.tableRef) return;
|
|
1081
|
+
let tableData = addTableDataConfig.tableData || {};
|
|
1082
|
+
this.getWidgetRef(addTableDataConfig.tableRef).addTableData([tableData]);
|
|
1083
|
+
},
|
|
1084
|
+
handleOnChange: function (e, t) {
|
|
1085
|
+
if (this.field.options.onChange) {
|
|
1086
|
+
let i = new Function("value", "oldValue", this.field.options.onChange);
|
|
1087
|
+
i.call(this, e, t);
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
handleOnChangeForSubForm: function (e, t, i, n) {
|
|
1091
|
+
if (this.field.options.onChange) {
|
|
1092
|
+
let o = new Function(
|
|
1093
|
+
"value",
|
|
1094
|
+
"oldValue",
|
|
1095
|
+
"subFormData",
|
|
1096
|
+
"rowId",
|
|
1097
|
+
this.field.options.onChange
|
|
1098
|
+
);
|
|
1099
|
+
o.call(this, e, t, i, n);
|
|
1100
|
+
}
|
|
1101
|
+
},
|
|
1102
|
+
handleButtonWidgetClick: function (event, flag) {
|
|
1103
|
+
if (!this.designState) {
|
|
1104
|
+
let onClick = !flag ? this.field.options.onClick : this.field.options.widgetTextLinkConfig?.options?.onClick
|
|
1105
|
+
if (onClick) {
|
|
1106
|
+
let tableParam = this.tableParam;
|
|
1107
|
+
let eventParamNames = ["event"];
|
|
1108
|
+
let eventParamValues = [event];
|
|
1109
|
+
if (tableParam) {
|
|
1110
|
+
eventParamNames = ["row", "rowIndex", "event"];
|
|
1111
|
+
eventParamValues = [tableParam.row, tableParam.rowIndex, event];
|
|
1112
|
+
}
|
|
1113
|
+
this.handleCustomEvent(
|
|
1114
|
+
onClick,
|
|
1115
|
+
eventParamNames,
|
|
1116
|
+
eventParamValues
|
|
1117
|
+
);
|
|
1118
|
+
} else {
|
|
1119
|
+
if (!flag) this.dispatch("VFormRender", "buttonClick", [this]);
|
|
1120
|
+
}
|
|
1121
|
+
this.handleCustomClickEvent(flag);
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
getSearchDialogSourceField(targetField) {
|
|
1125
|
+
let searchDialogConfig = this.field.options.searchDialogConfig || {};
|
|
1126
|
+
let tableData = searchDialogConfig.tableData || [];
|
|
1127
|
+
},
|
|
1128
|
+
openSearchDialog(tableParam, flag) {
|
|
1129
|
+
let optionModel = !flag ? this.field.options : (this.field.options.widgetTextLinkConfig?.options || {});
|
|
1130
|
+
let searchDialogConfig = optionModel.searchDialogConfig || {};
|
|
1131
|
+
let formCode = searchDialogConfig.formCode;
|
|
1132
|
+
let tableData = searchDialogConfig.tableData || [];
|
|
1133
|
+
let formModel = this.formModel;
|
|
1134
|
+
|
|
1135
|
+
let rows = [];
|
|
1136
|
+
if (this.hasVabsearchFlag()) {
|
|
1137
|
+
if (this.field.options.multipleChoices) {
|
|
1138
|
+
let fieldKeyName = this.fieldKeyName;
|
|
1139
|
+
let valueField = trim(this.field.options.valueField || fieldKeyName);
|
|
1140
|
+
let vabSearchName = trim(this.field.options.vabSearchName || fieldKeyName);
|
|
1141
|
+
let valueSourceField = trim(searchDialogConfig.valueSourceField)
|
|
1142
|
+
let labelSourceField = trim(searchDialogConfig.labelSourceField)
|
|
1143
|
+
|
|
1144
|
+
rows = (this.fieldModel || []).map((row) => {
|
|
1145
|
+
return {
|
|
1146
|
+
[valueSourceField]: row[valueField],
|
|
1147
|
+
[labelSourceField]: row[vabSearchName],
|
|
1148
|
+
};
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
// dialogQueryParam.
|
|
1154
|
+
let queryParam = null;
|
|
1155
|
+
if (searchDialogConfig.dialogQueryParam) {
|
|
1156
|
+
queryParam = this.handleCustomEvent(searchDialogConfig.dialogQueryParam)
|
|
1157
|
+
}
|
|
1158
|
+
let dialogCustomParam = {};
|
|
1159
|
+
if (searchDialogConfig.dialogCustomParam) {
|
|
1160
|
+
dialogCustomParam = this.handleCustomEvent(searchDialogConfig.dialogCustomParam) || {}
|
|
1161
|
+
}
|
|
1162
|
+
let dialogParam = Object.assign({
|
|
1163
|
+
formCode: formCode,
|
|
1164
|
+
rows,
|
|
1165
|
+
queryParam,
|
|
1166
|
+
multiple: searchDialogConfig.multipleChoices || false,
|
|
1167
|
+
confirm: (rows) => {
|
|
1168
|
+
this.handleConfirmSearchDialog(rows, false, flag);
|
|
1169
|
+
},
|
|
1170
|
+
},dialogCustomParam)
|
|
1171
|
+
this.getFormRef().openSearchDialog(dialogParam);
|
|
1172
|
+
},
|
|
1173
|
+
handleClearSearchDialog() {
|
|
1174
|
+
let clickBindEvent = this.field.options.clickBindEvent;
|
|
1175
|
+
if (clickBindEvent === "1") {
|
|
1176
|
+
this.handleConfirmSearchDialog(null, true);
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
getMultipleChoices() {
|
|
1180
|
+
let multipleChoices = this.field.options.multipleChoices;
|
|
1181
|
+
return multipleChoices;
|
|
1182
|
+
},
|
|
1183
|
+
hasVabsearchFlag() {
|
|
1184
|
+
return this.field.type === "vabsearch" || this.field.type === "singerSearch" || this.field.type === "multiSearch"
|
|
1185
|
+
},
|
|
1186
|
+
handleConfirmSearchDialog(rows, isClear, flag) {
|
|
1187
|
+
if (!isClear && !rows.length) return;
|
|
1188
|
+
let optionModel = !flag ? this.field.options : (this.field.options.widgetTextLinkConfig?.options || {});
|
|
1189
|
+
|
|
1190
|
+
let tableParam = this.tableParam;
|
|
1191
|
+
let searchDialogConfig = optionModel.searchDialogConfig || {};
|
|
1192
|
+
let formCode = searchDialogConfig.formCode;
|
|
1193
|
+
let tableData = searchDialogConfig.tableData || [];
|
|
1194
|
+
let formModel = this.formModel;
|
|
1195
|
+
let row = rows && rows.length ? rows[0] : null;
|
|
1196
|
+
let multipleChoices =
|
|
1197
|
+
optionModel.searchDialogConfig.multipleChoices || false;
|
|
1198
|
+
|
|
1199
|
+
let valueSourceField = trim(searchDialogConfig.valueSourceField)
|
|
1200
|
+
let labelSourceField = trim(searchDialogConfig.labelSourceField)
|
|
1201
|
+
if (this.hasVabsearchFlag()) {
|
|
1202
|
+
let fieldKeyName = this.fieldKeyName;
|
|
1203
|
+
let valueField = trim(this.field.options.valueField || fieldKeyName);
|
|
1204
|
+
let vabSearchName = trim(this.field.options.vabSearchName || fieldKeyName);
|
|
1205
|
+
if (tableParam) {
|
|
1206
|
+
let rowData = tableParam.row;
|
|
1207
|
+
if (this.getMultipleChoices()) {
|
|
1208
|
+
if (isClear) {
|
|
1209
|
+
rowData[fieldKeyName] = [];
|
|
1210
|
+
} else {
|
|
1211
|
+
rowData[fieldKeyName] = rows.map((item) => {
|
|
1212
|
+
let newData = {};
|
|
1213
|
+
newData[valueField] =
|
|
1214
|
+
item[valueSourceField] ?? null;
|
|
1215
|
+
newData[vabSearchName] =
|
|
1216
|
+
item[labelSourceField] ?? null;
|
|
1217
|
+
tableData.forEach((item1) => {
|
|
1218
|
+
let targetFormField = trim(item1.targetFormField || item1.targetField)
|
|
1219
|
+
let sourceField = trim(item1.sourceField)
|
|
1220
|
+
newData[targetFormField] = item[sourceField];
|
|
1221
|
+
});
|
|
1222
|
+
return newData;
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
} else {
|
|
1226
|
+
rowData[fieldKeyName] = !isClear
|
|
1227
|
+
? row[valueSourceField]
|
|
1228
|
+
: null;
|
|
1229
|
+
if (labelSourceField)
|
|
1230
|
+
rowData[vabSearchName] = !isClear
|
|
1231
|
+
? row[labelSourceField]
|
|
1232
|
+
: null;
|
|
1233
|
+
tableData.forEach((item) => {
|
|
1234
|
+
let targetFormField = trim(item.targetFormField || item.targetField);
|
|
1235
|
+
let sourceField = trim(item.sourceField)
|
|
1236
|
+
if (!isClear) {
|
|
1237
|
+
rowData[targetFormField] = row[sourceField];
|
|
1238
|
+
} else {
|
|
1239
|
+
rowData[targetFormField] = null;
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1243
|
+
} else {
|
|
1244
|
+
if (this.getMultipleChoices()) {
|
|
1245
|
+
let rowData = [];
|
|
1246
|
+
if (isClear) {
|
|
1247
|
+
rowData = [];
|
|
1248
|
+
} else {
|
|
1249
|
+
rowData = rows.map((item) => {
|
|
1250
|
+
let newData = {};
|
|
1251
|
+
newData[valueField] =
|
|
1252
|
+
item[valueSourceField] ?? null;
|
|
1253
|
+
newData[vabSearchName] =
|
|
1254
|
+
item[labelSourceField] ?? null;
|
|
1255
|
+
tableData.forEach((item1) => {
|
|
1256
|
+
let targetFormField = trim(item1.targetFormField || item1.targetField)
|
|
1257
|
+
let sourceField = trim(item1.sourceField)
|
|
1258
|
+
newData[targetFormField] = item[sourceField];
|
|
1259
|
+
});
|
|
1260
|
+
return newData;
|
|
1261
|
+
});
|
|
1262
|
+
}
|
|
1263
|
+
this.setValue(rowData);
|
|
1264
|
+
} else {
|
|
1265
|
+
/* this.fieldModel = !isClear
|
|
1266
|
+
? row[valueSourceField]
|
|
1267
|
+
: null; */
|
|
1268
|
+
let value = !isClear
|
|
1269
|
+
? row[valueSourceField]
|
|
1270
|
+
: null
|
|
1271
|
+
this.setValue(value)
|
|
1272
|
+
if (labelSourceField) {
|
|
1273
|
+
this.setShowValue(
|
|
1274
|
+
!isClear ? row[labelSourceField] : null
|
|
1275
|
+
);
|
|
1276
|
+
}
|
|
1277
|
+
tableData.forEach((item) => {
|
|
1278
|
+
// formModel[item.targetField] = row[item.sourceField]
|
|
1279
|
+
let value = !isClear ? row[item.sourceField] ?? null : null;
|
|
1280
|
+
let targetField = trim(item.targetField)
|
|
1281
|
+
let targetFormField = trim(item.targetFormField)
|
|
1282
|
+
if (targetField) {
|
|
1283
|
+
this.getWidgetRef(targetField).setValue(value);
|
|
1284
|
+
} else if (targetFormField) {
|
|
1285
|
+
formModel[targetFormField] = value;
|
|
1286
|
+
}
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
} else {
|
|
1291
|
+
if (searchDialogConfig.tableEnabled) {
|
|
1292
|
+
if (!searchDialogConfig.tableRef || !tableData.length) return;
|
|
1293
|
+
let addRows = rows.map((rowData) => {
|
|
1294
|
+
let itemData = {};
|
|
1295
|
+
tableData.forEach((item) => {
|
|
1296
|
+
let targetFormField = trim(item.targetFormField || item.targetField);
|
|
1297
|
+
let sourceField = trim(item.sourceField)
|
|
1298
|
+
itemData[targetFormField] = rowData[sourceField];
|
|
1299
|
+
});
|
|
1300
|
+
return itemData;
|
|
1301
|
+
});
|
|
1302
|
+
let tableUniqueKey = trim(searchDialogConfig.tableUniqueKey);
|
|
1303
|
+
this.getWidgetRef(searchDialogConfig.tableRef).addTableData(
|
|
1304
|
+
addRows,
|
|
1305
|
+
tableUniqueKey
|
|
1306
|
+
);
|
|
1307
|
+
} else if (!multipleChoices) {
|
|
1308
|
+
tableData.forEach((item) => {
|
|
1309
|
+
let value = row[item.sourceField] ?? null;
|
|
1310
|
+
// formModel[item.targetField] = value
|
|
1311
|
+
// this.getWidgetRef(item.targetField).setValue(value);
|
|
1312
|
+
let targetField = trim(item.targetField)
|
|
1313
|
+
let targetFormField = trim(item.targetFormField)
|
|
1314
|
+
if (targetField) {
|
|
1315
|
+
this.getWidgetRef(targetField).setValue(value);
|
|
1316
|
+
} else if (targetFormField) {
|
|
1317
|
+
formModel[targetFormField] = value;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
});
|
|
1322
|
+
// this.$forceUpdate();
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
if (!isClear) {
|
|
1327
|
+
this.$nextTick(() => {
|
|
1328
|
+
this.handleCustomEvent(
|
|
1329
|
+
searchDialogConfig.confirmCallback,
|
|
1330
|
+
["rows"],
|
|
1331
|
+
[rows]
|
|
1332
|
+
);
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1335
|
+
},
|
|
1336
|
+
remoteQuery: function (e) {
|
|
1337
|
+
if (this.field.options.onRemoteQuery) {
|
|
1338
|
+
let t = new Function("keyword", this.field.options.onRemoteQuery);
|
|
1339
|
+
t.call(this, e);
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
getFormRef: function () {
|
|
1343
|
+
return this.refList ? this.refList["v_form_ref"] : null;
|
|
1344
|
+
},
|
|
1345
|
+
getWidgetRef: function (e, t) {
|
|
1346
|
+
let i = this.refList[e];
|
|
1347
|
+
return (
|
|
1348
|
+
!i &&
|
|
1349
|
+
t &&
|
|
1350
|
+
this.$message.error(this.i18nt("render.hint.refNotFound") + e),
|
|
1351
|
+
i
|
|
1352
|
+
);
|
|
1353
|
+
},
|
|
1354
|
+
getFieldEditor: function () {
|
|
1355
|
+
return this.$refs["fieldEditor"];
|
|
1356
|
+
},
|
|
1357
|
+
initValue: function (e) {
|
|
1358
|
+
let value = e ?? null;
|
|
1359
|
+
let currentData =
|
|
1360
|
+
this.tableParam && this.tableParam.row
|
|
1361
|
+
? this.tableParam.row
|
|
1362
|
+
: this.formModel;
|
|
1363
|
+
if (void 0 === currentData[this.fieldKeyName]) {
|
|
1364
|
+
this.$set(currentData, this.fieldKeyName, null);
|
|
1365
|
+
}
|
|
1366
|
+
this.fieldModel = value;
|
|
1367
|
+
this.initFileList();
|
|
1368
|
+
this.syncUpdateFormModel(value);
|
|
1369
|
+
},
|
|
1370
|
+
setValue: function (e) {
|
|
1371
|
+
if (this.field.formItemFlag) {
|
|
1372
|
+
let value = e ?? null;
|
|
1373
|
+
|
|
1374
|
+
let currentData =
|
|
1375
|
+
this.tableParam && this.tableParam.row
|
|
1376
|
+
? this.tableParam.row
|
|
1377
|
+
: this.formModel;
|
|
1378
|
+
if (void 0 === currentData[this.fieldKeyName]) {
|
|
1379
|
+
this.$set(currentData, this.fieldKeyName, null);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
let t = baseRefUtil.deepClone(this.fieldModel);
|
|
1383
|
+
(this.fieldModel = value),
|
|
1384
|
+
this.initFileList(),
|
|
1385
|
+
this.syncUpdateFormModel(value),
|
|
1386
|
+
this.emitFieldDataChange(value, t);
|
|
1387
|
+
}
|
|
1388
|
+
},
|
|
1389
|
+
getValue: function () {
|
|
1390
|
+
return this.fieldModel;
|
|
1391
|
+
},
|
|
1392
|
+
resetField: function () {
|
|
1393
|
+
if (!this.subFormItemFlag) {
|
|
1394
|
+
let e = this.field.options.defaultValue;
|
|
1395
|
+
this.setValue(e),
|
|
1396
|
+
("picture-upload" !== this.field.type &&
|
|
1397
|
+
"file-upload" !== this.field.type) ||
|
|
1398
|
+
(this.$refs["fieldEditor"].clearFiles(),
|
|
1399
|
+
this.fileList.splice(0, this.fileList.length));
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
setWidgetOption: function (e, t) {
|
|
1403
|
+
this.field.options.hasOwnProperty(e) && (this.field.options[e] = t);
|
|
1404
|
+
},
|
|
1405
|
+
setReadonly: function (e) {
|
|
1406
|
+
this.field.options.readonly = e;
|
|
1407
|
+
this.readonly = e;
|
|
1408
|
+
},
|
|
1409
|
+
setDisabled: function (e) {
|
|
1410
|
+
this.field.options.disabled = e;
|
|
1411
|
+
this.disabled = e;
|
|
1412
|
+
},
|
|
1413
|
+
setAppendButtonVisible: function (e) {
|
|
1414
|
+
this.field.options.appendButton = e;
|
|
1415
|
+
},
|
|
1416
|
+
setAppendButtonDisabled: function (e) {
|
|
1417
|
+
this.field.options.appendButtonDisabled = e;
|
|
1418
|
+
},
|
|
1419
|
+
setHidden: function (e) {
|
|
1420
|
+
this.field.options.hidden = e;
|
|
1421
|
+
this.hidden = e;
|
|
1422
|
+
e ? this.clearFieldRules() : this.buildFieldRules();
|
|
1423
|
+
},
|
|
1424
|
+
setRequired: function (e) {
|
|
1425
|
+
(this.field.options.required = e), this.buildFieldRules();
|
|
1426
|
+
},
|
|
1427
|
+
setLabel: function (e) {
|
|
1428
|
+
this.field.options.label = e;
|
|
1429
|
+
},
|
|
1430
|
+
focus: function () {
|
|
1431
|
+
this.getFieldEditor() &&
|
|
1432
|
+
this.getFieldEditor().focus &&
|
|
1433
|
+
this.getFieldEditor().focus();
|
|
1434
|
+
},
|
|
1435
|
+
clearSelectedOptions: function () {
|
|
1436
|
+
("checkbox" !== this.field.type &&
|
|
1437
|
+
"radio" !== this.field.type &&
|
|
1438
|
+
"select" !== this.field.type) ||
|
|
1439
|
+
("checkbox" === this.field.type ||
|
|
1440
|
+
("select" === this.field.type && this.field.options.multiple)
|
|
1441
|
+
? (this.fieldModel = [])
|
|
1442
|
+
: (this.fieldModel = ""));
|
|
1443
|
+
},
|
|
1444
|
+
getOptionItemValueKey(){
|
|
1445
|
+
return this.field.options.valueKey || "value"
|
|
1446
|
+
},
|
|
1447
|
+
getOptionItemLabelKey(){
|
|
1448
|
+
return this.field.options.labelKey || "label"
|
|
1449
|
+
},
|
|
1450
|
+
loadRowGloatOptions: function (e) {
|
|
1451
|
+
let optionItems = baseRefUtil.translateOptionItems(
|
|
1452
|
+
e,
|
|
1453
|
+
this.field.type,
|
|
1454
|
+
this.getOptionItemLabelKey(),
|
|
1455
|
+
this.getOptionItemValueKey()()
|
|
1456
|
+
);
|
|
1457
|
+
// this.field.options.optionItems = optionItems
|
|
1458
|
+
this.setOptionItems(optionItems)
|
|
1459
|
+
},
|
|
1460
|
+
loadOptions: function (e, rowOptionFlag) {
|
|
1461
|
+
let optionItems = baseRefUtil.translateOptionItems(
|
|
1462
|
+
e,
|
|
1463
|
+
this.field.type,
|
|
1464
|
+
this.getOptionItemLabelKey(),
|
|
1465
|
+
this.getOptionItemValueKey()
|
|
1466
|
+
);
|
|
1467
|
+
// this.field.options.optionItems = optionItems
|
|
1468
|
+
this.setOptionItems(optionItems)
|
|
1469
|
+
},
|
|
1470
|
+
getOptionKey() {
|
|
1471
|
+
let key = "optionItems-" + this.field.options.name
|
|
1472
|
+
return key;
|
|
1473
|
+
},
|
|
1474
|
+
getOptionItemsFlag: function () {
|
|
1475
|
+
let key = this.getOptionKey()
|
|
1476
|
+
return this.getGlobalParam(key);
|
|
1477
|
+
},
|
|
1478
|
+
setOptionItemsFlag: function (flag) {
|
|
1479
|
+
let key = this.getOptionKey()
|
|
1480
|
+
return this.setGlobalParam(key, flag);
|
|
1481
|
+
},
|
|
1482
|
+
reloadOptions: function (e) {
|
|
1483
|
+
let optionItems = baseRefUtil.translateOptionItems(
|
|
1484
|
+
e,
|
|
1485
|
+
this.field.type,
|
|
1486
|
+
this.getOptionItemLabelKey(),
|
|
1487
|
+
this.getOptionItemValueKey()
|
|
1488
|
+
);
|
|
1489
|
+
// this.field.options.optionItems = optionItems;
|
|
1490
|
+
this.setOptionItems(optionItems)
|
|
1491
|
+
},
|
|
1492
|
+
getOptions: function () {
|
|
1493
|
+
return this.getOptionItems();
|
|
1494
|
+
},
|
|
1495
|
+
disableOption: function (e) {
|
|
1496
|
+
this.disableOptionOfList(this.getOptionItems(), e);
|
|
1497
|
+
},
|
|
1498
|
+
enableOption: function (e) {
|
|
1499
|
+
this.enableOptionOfList(this.getOptionItems(), e);
|
|
1500
|
+
},
|
|
1501
|
+
getOptionItems: function () {
|
|
1502
|
+
let optionItems = this.field.options.optionItems;
|
|
1503
|
+
return optionItems;
|
|
1504
|
+
},
|
|
1505
|
+
setUploadHeader: function (e, t) {
|
|
1506
|
+
this.$set(this.uploadHeaders, e, t);
|
|
1507
|
+
},
|
|
1508
|
+
setUploadData: function (e, t) {
|
|
1509
|
+
this.$set(this.uploadData, e, t);
|
|
1510
|
+
},
|
|
1511
|
+
setToolbar: function (e) {
|
|
1512
|
+
this.customToolbar = e;
|
|
1513
|
+
},
|
|
1514
|
+
isSubFormItem: function () {
|
|
1515
|
+
return this.subFormItemFlag;
|
|
1516
|
+
},
|
|
1517
|
+
isSubFormField: function () {
|
|
1518
|
+
return this.subFormItemFlag;
|
|
1519
|
+
},
|
|
1520
|
+
setReadMode: function () {
|
|
1521
|
+
let e =
|
|
1522
|
+
!(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
|
|
1523
|
+
this.fieldReadonlyFlag = e;
|
|
1524
|
+
},
|
|
1525
|
+
addCssClass: function (e) {
|
|
1526
|
+
this.field.options.customClass
|
|
1527
|
+
? this.field.options.customClass.push(e)
|
|
1528
|
+
: (this.field.options.customClass = [e]);
|
|
1529
|
+
},
|
|
1530
|
+
removeCssClass: function (e) {
|
|
1531
|
+
if (this.field.options.customClass) {
|
|
1532
|
+
let t = -1;
|
|
1533
|
+
this.field.options.customClass.map(function (i, n) {
|
|
1534
|
+
i === e && (t = n);
|
|
1535
|
+
}),
|
|
1536
|
+
t > -1 && this.field.options.customClass.splice(t, 1);
|
|
1537
|
+
}
|
|
1538
|
+
},
|
|
1539
|
+
async initAccess() {
|
|
1540
|
+
if (this.field.options.accessCode) {
|
|
1541
|
+
return this.$http({
|
|
1542
|
+
url: SUPPORT_PREFIX + `/report_requestaccess/getByCode`,
|
|
1543
|
+
method: `post`,
|
|
1544
|
+
data: {
|
|
1545
|
+
stringOne: this.field.options.accessCode,
|
|
1546
|
+
},
|
|
1547
|
+
isLoading: true,
|
|
1548
|
+
// modalStrictly: true,
|
|
1549
|
+
success: (res) => {
|
|
1550
|
+
let requestAccess = res.objx || {};
|
|
1551
|
+
|
|
1552
|
+
let dsModel = {};
|
|
1553
|
+
if (requestAccess.accessViewContent) {
|
|
1554
|
+
dsModel = JSON.parse(requestAccess.accessViewContent);
|
|
1555
|
+
}
|
|
1556
|
+
if (!dsModel.headers) dsModel.headers = [];
|
|
1557
|
+
if (!dsModel.params) dsModel.params = [];
|
|
1558
|
+
if (!dsModel.data) dsModel.data = [];
|
|
1559
|
+
if (dsModel.dataHandlerCode === null || dsModel.dataHandlerCode === undefined) dsModel.dataHandlerCode = "";
|
|
1560
|
+
if (dsModel.configHandlerCode === null || dsModel.configHandlerCode === undefined)
|
|
1561
|
+
dsModel.configHandlerCode = "";
|
|
1562
|
+
if (dsModel.errorHandlerCode === null || dsModel.errorHandlerCode === undefined) dsModel.errorHandlerCode = "";
|
|
1563
|
+
|
|
1564
|
+
requestAccess.dsModel = dsModel;
|
|
1565
|
+
this.requestAccess = requestAccess;
|
|
1566
|
+
},
|
|
1567
|
+
});
|
|
1568
|
+
} else {
|
|
1569
|
+
return null;
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
addExtraAccessData(data) {
|
|
1573
|
+
if (data) {
|
|
1574
|
+
Object.keys(data).forEach((field) => {
|
|
1575
|
+
this.extraAccessData[field] = data[field];
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1579
|
+
clearExtraAccessData() {
|
|
1580
|
+
this.extraAccessData = {};
|
|
1581
|
+
},
|
|
1582
|
+
doAccess(accessCode, conditions, callback) {
|
|
1583
|
+
let path = baseRefUtil.getAccessUrl();
|
|
1584
|
+
let globalReqData = baseRefUtil.getReportGlobalMap(); //全局请求参数
|
|
1585
|
+
return this.$http({
|
|
1586
|
+
url: path,
|
|
1587
|
+
method: `post`,
|
|
1588
|
+
loadingTarget: document.body,
|
|
1589
|
+
data: {
|
|
1590
|
+
accessCode: accessCode,
|
|
1591
|
+
conditions: {
|
|
1592
|
+
...conditions,
|
|
1593
|
+
...globalReqData,
|
|
1594
|
+
},
|
|
1595
|
+
},
|
|
1596
|
+
isLoading: true,
|
|
1597
|
+
success: (res) => {
|
|
1598
|
+
callback && callback(res);
|
|
1599
|
+
},
|
|
1600
|
+
});
|
|
1601
|
+
},
|
|
1602
|
+
autoExcScript() {
|
|
1603
|
+
if (!this.designState && this.field.options.accessAutoExc) {
|
|
1604
|
+
this.scriptHttp({
|
|
1605
|
+
options: this.field.options,
|
|
1606
|
+
});
|
|
1607
|
+
}
|
|
1608
|
+
},
|
|
1609
|
+
addInterval(handler, timeout) {
|
|
1610
|
+
let timer = setInterval(handler, timeout);
|
|
1611
|
+
this.timerMap[timer] = timer;
|
|
1612
|
+
return timer;
|
|
1613
|
+
},
|
|
1614
|
+
clearAllInterval() {
|
|
1615
|
+
let timerMap = this.timerMap;
|
|
1616
|
+
for (let key in timerMap) {
|
|
1617
|
+
let timer = timerMap[key];
|
|
1618
|
+
clearInterval(timer);
|
|
1619
|
+
}
|
|
1620
|
+
this.timerMap = {};
|
|
1621
|
+
},
|
|
1622
|
+
getI18nLabel(label, path, param) {
|
|
1623
|
+
return !this.designState && label ? this.$t2(label, path, param) : label;
|
|
1624
|
+
},
|
|
1625
|
+
getParentTarget() {
|
|
1626
|
+
let name = this.parentWidget?.options?.name ?? null;
|
|
1627
|
+
return name ? this.getWidgetRef(name) : null;
|
|
1628
|
+
},
|
|
1629
|
+
setWidgetTextFlag(val) {
|
|
1630
|
+
this.widgetTextFlag = val;
|
|
1631
|
+
},
|
|
1632
|
+
showWidget() {
|
|
1633
|
+
this.widgetTextFlag = 0;
|
|
1634
|
+
},
|
|
1635
|
+
showText() {
|
|
1636
|
+
this.widgetTextFlag = 1;
|
|
1637
|
+
},
|
|
1638
|
+
showEncryptText() {
|
|
1639
|
+
this.widgetTextFlag = 2;
|
|
1640
|
+
},
|
|
1641
|
+
showAText() {
|
|
1642
|
+
this.widgetTextFlag = 3;
|
|
1643
|
+
},
|
|
1644
|
+
getAuthCode(){
|
|
1645
|
+
let formRef = this.getFormRef();
|
|
1646
|
+
if(formRef){
|
|
1647
|
+
return formRef.reportTemplate.formCode + ":" + this.field.options.name;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
}
|
|
1651
|
+
},
|
|
1652
|
+
};
|
|
1653
|
+
|
|
1654
|
+
export default modules;
|