cloud-web-corejs 1.0.276 → 1.0.277
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 +28 -24
- package/src/App.vue +73 -71
- package/src/api/user.js +21 -0
- package/src/components/baseArea/index.vue +82 -27
- package/src/components/baseTabs/mixins.js +5 -1
- package/src/components/luckysheet/dialog.vue +1 -1
- package/src/components/micro-view-host/contract.js +66 -0
- package/src/components/micro-view-host/index.vue +148 -0
- package/src/components/table/tableForm.vue +16 -5
- package/src/components/table/tableFormMixin.js +35 -7
- package/src/components/vb-tabs/x-tabs.vue +167 -143
- package/src/components/wf/content.vue +14 -0
- package/src/components/wf/content2.vue +4 -2
- package/src/components/wf/wf.js +74 -23
- package/src/components/wf/wfActionDropdown.vue +85 -0
- package/src/components/wf/wfActionItems.js +136 -0
- package/src/components/wf/wfAutoConfirm.js +55 -0
- package/src/components/wf/wfButtonName.js +60 -0
- package/src/components/wf/wfUserRange.js +53 -0
- package/src/components/wf/wfUtil.js +373 -295
- package/src/components/xform/XFormTabContainer//346/226/260/345/242/236/351/241/265/347/255/276/346/250/241/345/274/217-/346/234/200/347/273/210/345/256/236/347/216/260.md +195 -0
- package/src/components/xform/docs/2026-07 table/344/270/216excelExport/344/277/256/345/244/215/345/217/212/345/257/274/345/207/272/344/274/230/345/214/226.md" +57 -0
- package/src/components/xform/docs/2026-07 /346/216/222/346/237/245/344/277/256/345/244/215/350/256/260/345/275/225.md" +73 -0
- package/src/components/xform/docs/autocomplete /350/207/252/345/212/250/345/256/214/346/210/220/347/273/204/344/273/266/350/257/264/346/230/216.md" +126 -0
- package/src/components/xform/docs//345/257/271/346/257/224/345/212/237/350/203/275/350/220/275/345/234/260/346/226/271/346/241/210.md +986 -0
- package/src/components/xform/docs//346/225/260/346/215/256/350/241/250/346/240/274/345/212/250/346/200/201/345/210/227 JSON /350/257/264/346/230/216.md" +657 -0
- package/src/components/xform/docs//346/240/221/350/241/250rowField/346/224/266/346/225/233-/350/220/275/345/234/260/346/226/207/346/241/243.md +1427 -0
- package/src/components/xform/form-designer/designer.js +2085 -2025
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +9 -11
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +76 -75
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +10 -4
- package/src/components/xform/form-designer/form-widget/container-widget/detail-plain-widget.vue +76 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +59 -5
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +38 -17
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +138 -13
- package/src/components/xform/form-designer/form-widget/dialog/formFieldDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1774 -1772
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +2 -3
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +66 -53
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +287 -214
- package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +76 -66
- package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +208 -124
- package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +3 -9
- package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +11 -2
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +7 -6
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +43 -19
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +680 -372
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +879 -763
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +17 -2
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +3 -9
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +3 -9
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +3 -9
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/relative-default-mixin.js +107 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/relativeDateUtil.js +321 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +13 -0
- package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +13 -8
- package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +4 -9
- package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue +3 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +120 -120
- package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +4 -0
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +11 -0
- package/src/components/xform/form-designer/form-widget/field-widget/switch-widget.vue +9 -1
- package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +7 -3
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +4 -2
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +36 -5
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +338 -374
- package/src/components/xform/form-designer/form-widget/index.vue +6 -1
- package/src/components/xform/form-designer/form-widget/indexMixin.js +29 -25
- package/src/components/xform/form-designer/index.vue +194 -191
- package/src/components/xform/form-designer/indexMixin.js +860 -847
- package/src/components/xform/form-designer/setting-panel/dataSource-setting.vue +397 -397
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +602 -601
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +1790 -1483
- package/src/components/xform/form-designer/setting-panel/index.vue +2 -7
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +370 -335
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +585 -544
- package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/alignType-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +124 -125
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1151 -957
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +96 -74
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-plain/detail-plain-editor.vue +75 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +14 -13
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-height-editor.vue +1 -1
- 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-grid-col/grid-col-span-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/container-h5-card/h5-card-editor.vue +124 -124
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +26 -31
- package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/height-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/width-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -119
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tabClass-editor.vue +45 -45
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +340 -342
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree-pane/tree-pane-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/okButtonLabel-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/title-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/containerClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/customClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/descriptionsItems-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +6 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/dsName-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/echartHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +7 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/addTableData-event-editor.vue +84 -85
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindActions.js +262 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +97 -88
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/form-host-event-editor.vue +188 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +27 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/checkStrictly-editor.vue +11 -13
- package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +74 -67
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +27 -5
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +35 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +35 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -59
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +11 -11
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +12 -12
- package/src/components/xform/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -44
- package/src/components/xform/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +29 -29
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +6 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +44 -44
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +115 -115
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -115
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +1 -1
- 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-rate/rate-max-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script/script-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/fontSize-editor.vue +1 -1
- 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 +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +74 -74
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +34 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-timeLimit-editor.vue +53 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +35 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchField-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -176
- package/src/components/xform/form-designer/setting-panel/property-editor/fixedQuery-editor.vue +39 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +41 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +972 -972
- package/src/components/xform/form-designer/setting-panel/property-editor/iconClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/label-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelAlign-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-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/labelWidth-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/max-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/maxLength-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/min-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/minLength-editor.vue +1 -1
- 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 +15 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- 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/prefixIcon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +6 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/relative-default-block.vue +369 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/rows-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/space-editor-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/step-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTableClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTitClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +2 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/uploadTip-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/uploadURL-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/urlValueEnabled-editor.vue +91 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/widgetWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +374 -351
- package/src/components/xform/form-designer/toolbar-panel/index.vue +266 -103
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +655 -589
- package/src/components/xform/form-designer/widget-panel/index.vue +391 -341
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +351 -308
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +4642 -4028
- package/src/components/xform/form-render/container-item/containerItemMixin.js +76 -61
- package/src/components/xform/form-render/container-item/data-table-item.vue +24 -13
- package/src/components/xform/form-render/container-item/data-table-mixin.js +5927 -3400
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +173 -173
- package/src/components/xform/form-render/container-item/detail-item.vue +446 -224
- package/src/components/xform/form-render/container-item/detail-plain-item.vue +92 -0
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1186 -411
- package/src/components/xform/form-render/container-item/tab-item.vue +129 -125
- package/src/components/xform/form-render/container-item/table-item.vue +0 -3
- package/src/components/xform/form-render/container-item/table2-item.vue +18 -10
- package/src/components/xform/form-render/dynamicDialogRender.js +140 -99
- package/src/components/xform/form-render/index.vue +8 -8
- package/src/components/xform/form-render/indexMixin.js +5299 -3766
- package/src/components/xform/form-render/refMixin.js +14 -11
- package/src/components/xform/lang/en-US.js +473 -438
- package/src/components/xform/lang/en-US_extension.js +4 -0
- package/src/components/xform/lang/zh-CN.js +646 -620
- package/src/components/xform/mixins/defaultHandle.js +363 -26
- package/src/components/xform/mixins/scriptHttp.js +54 -51
- package/src/components/xform/utils/attachmentValueUtil.js +239 -0
- package/src/components/xform/utils/fixedQueryUtil.js +93 -0
- package/src/components/xform/utils/format.js +195 -169
- package/src/components/xform/utils/queryParamUtil.js +84 -0
- package/src/components/xform/utils/tableColumnHelper.js +7 -8
- package/src/components/xform/utils/util.js +1663 -1551
- package/src/components/xform/utils/validators.js +100 -48
- package/src/index.js +403 -89
- package/src/layout/components/AppMain.vue +147 -119
- package/src/layout/components/Sidebar/default.vue +109 -59
- package/src/layout/components/TagsView/index.vue +1 -1
- package/src/layout/components/extractedCode/queryDialog.vue +33 -26
- package/src/layout/components/extractedCode/viewDialog.vue +207 -193
- package/src/layout/components/langTool.vue +128 -123
- package/src/layout/defaultLayout.vue +170 -158
- package/src/mixins/wf/index.js +40 -38
- package/src/public-path.js +38 -0
- package/src/router/modules/system.js +4 -0
- package/src/store/config/index.js +945 -669
- package/src/utils/pdfUtil.js +428 -70
- package/src/views/bd/setting/bd_company_env/dialog.vue +1 -1
- package/src/views/bd/setting/formVersion/button.vue +5 -0
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +21 -10
- package/src/views/bd/setting/formVersion/link.vue +5 -0
- package/src/views/bd/setting/form_script/edit.vue +1 -0
- package/src/views/bd/setting/form_script/edit1.vue +1 -0
- package/src/views/bd/setting/form_script/form_list.vue +1 -0
- package/src/views/bd/setting/form_script/list.vue +1 -0
- package/src/views/bd/setting/form_script/list1.vue +2 -0
- package/src/views/bd/setting/form_template/edit.vue +1 -0
- package/src/views/bd/setting/form_template/list.vue +2 -0
- package/src/views/bd/setting/form_template/mixins/edit.js +77 -74
- package/src/views/bd/setting/table_model/edit.vue +16 -29
- package/src/views/bd/setting/table_model/list.vue +1 -0
- package/src/views/bd/setting/table_model/mixins/edit.js +295 -149
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +32 -0
- package/src/views/support/export_template/list.vue +1 -1
- package/src/views/user/company_info/edit.vue +149 -88
- package/src/views/user/form/form_template/dialog.vue +1 -1
- package/src/views/user/form/form_template/itemList.vue +1 -1
- package/src/views/user/form/form_template/list.vue +1 -1
- package/src/views/user/form/form_template_field/dialog.vue +1 -1
- package/src/views/user/form/form_type/dialog.vue +1 -1
- package/src/views/user/form/form_type/list.vue +1 -1
- package/src/views/user/form/report_requestaccess/dialog.vue +1 -1
- package/src/views/user/form/report_requestaccess/list.vue +1 -1
- package/src/views/user/form/vform/designer.vue +51 -22
- package/src/views/user/form/vform/render.vue +21 -23
- package/src/views/user/form/view/list.vue +134 -37
- package/src/views/user/wf/wfReport/index.vue +24 -1
- package/src/views/user/wf/wf_manage/list.vue +8 -4
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +0 -209
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +0 -1639
- package/src/views/bd/setting/table_model/mixins/edit copy.js +0 -903
- package/src/views/user/menu/voc_list.vue +0 -686
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import moment from "moment";
|
|
2
|
+
import { saveUserLog } from "@base/api/user";
|
|
3
|
+
import settingConfig from "@/settings";
|
|
4
|
+
import { openStartWfDialog } from "../../../components/wf/wfUtil";
|
|
5
|
+
import { getWfButtonNames } from "../../../components/wf/wfButtonName";
|
|
6
|
+
import {
|
|
7
|
+
isWfAutoConfirm,
|
|
8
|
+
loadWfAutoConfirm,
|
|
9
|
+
} from "../../../components/wf/wfAutoConfirm";
|
|
10
|
+
import {
|
|
11
|
+
isWfUserRangeEnabled,
|
|
12
|
+
loadWfUserRange,
|
|
13
|
+
} from "../../../components/wf/wfUserRange";
|
|
2
14
|
|
|
3
15
|
let modules = {};
|
|
4
16
|
modules = {
|
|
5
17
|
data() {
|
|
6
18
|
return {
|
|
7
19
|
timerMap: {},
|
|
20
|
+
formSavePending: false,
|
|
21
|
+
formSaveReconcileTask: null,
|
|
8
22
|
};
|
|
9
23
|
},
|
|
10
24
|
beforeDestroy() {
|
|
@@ -52,7 +66,7 @@ modules = {
|
|
|
52
66
|
if (!reqFormData) reqFormData = this.getReqFormData();
|
|
53
67
|
return reqFormData.data[entity];
|
|
54
68
|
},
|
|
55
|
-
getReqFormData() {
|
|
69
|
+
getReqFormData(formDataOverride) {
|
|
56
70
|
let formRef = this.getFormRef ? this.getFormRef() : this;
|
|
57
71
|
let formConfig = formRef.formConfig;
|
|
58
72
|
let entity = formConfig.entity;
|
|
@@ -61,7 +75,11 @@ modules = {
|
|
|
61
75
|
let reportTemplate = formRef?.reportTemplate;
|
|
62
76
|
let formCode = reportTemplate?.formCode;
|
|
63
77
|
|
|
64
|
-
let
|
|
78
|
+
let sourceFormData
|
|
79
|
+
= arguments.length > 0
|
|
80
|
+
? formDataOverride
|
|
81
|
+
: formRef.getRealFormData();
|
|
82
|
+
let formData = this.$baseLodash.cloneDeep(sourceFormData);
|
|
65
83
|
let mainData = formData[formCode] || {};
|
|
66
84
|
delete formData[formCode];
|
|
67
85
|
formData[entity] = mainData;
|
|
@@ -73,6 +91,23 @@ modules = {
|
|
|
73
91
|
delete mainData._createBy;
|
|
74
92
|
delete mainData._modifyBy;
|
|
75
93
|
|
|
94
|
+
// 移除对比功能给各子表行加的快照字段 hData,避免提交到后端
|
|
95
|
+
let stripHData = (obj) => {
|
|
96
|
+
if (!obj || typeof obj !== "object") return;
|
|
97
|
+
if (Array.isArray(obj)) {
|
|
98
|
+
obj.forEach(stripHData);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (Object.prototype.hasOwnProperty.call(obj, "hData")) {
|
|
102
|
+
delete obj.hData;
|
|
103
|
+
}
|
|
104
|
+
Object.keys(obj).forEach((k) => {
|
|
105
|
+
let v = obj[k];
|
|
106
|
+
if (v && typeof v === "object") stripHData(v);
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
stripHData(formData);
|
|
110
|
+
|
|
76
111
|
let reqData = {
|
|
77
112
|
formCode: formCode,
|
|
78
113
|
formVersion: reportTemplate.formVersion,
|
|
@@ -81,31 +116,188 @@ modules = {
|
|
|
81
116
|
};
|
|
82
117
|
return reqData;
|
|
83
118
|
},
|
|
84
|
-
|
|
119
|
+
onAfterSaveHandle(reqData, res, response) {
|
|
120
|
+
//保存成功后处理
|
|
121
|
+
this.writeSaveLog(reqData, res, response); //写入保存日志
|
|
122
|
+
},
|
|
123
|
+
writeSaveLog(reqData, res, response) {
|
|
124
|
+
//写入保存日志
|
|
125
|
+
if (settingConfig.formSaveLogEnabled && res.type === "success") {
|
|
126
|
+
let responseConfig = response.config || {};
|
|
127
|
+
let formRef = this.getFormRef ? this.getFormRef() : this;
|
|
128
|
+
let reportTemplate = formRef ? formRef.reportTemplate : null;
|
|
129
|
+
if (!reportTemplate) return;
|
|
130
|
+
let isAdd = !formRef.dataId;
|
|
131
|
+
let formName = reportTemplate?.formName;
|
|
132
|
+
let formCode = reportTemplate?.formCode;
|
|
133
|
+
let action = isAdd ? "新增成功" : "更新成功";
|
|
134
|
+
let content = `${formName}(${formCode}),${action}`;
|
|
135
|
+
let path = responseConfig.url.replace(responseConfig.baseURL, "");
|
|
136
|
+
saveUserLog({
|
|
137
|
+
data: {
|
|
138
|
+
path: path,
|
|
139
|
+
businessCode: content,
|
|
140
|
+
content: content,
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
async saveAndSubmitWfHandle(option) {
|
|
146
|
+
let formRef = this.getFormRef ? this.getFormRef() : this;
|
|
147
|
+
let formConfig = formRef.formConfig;
|
|
148
|
+
let reportTemplate = formRef.reportTemplate;
|
|
149
|
+
let wfParam = formRef.wfParam || {};
|
|
150
|
+
|
|
151
|
+
if (!formConfig?.wfEnabled) return;
|
|
152
|
+
if (
|
|
153
|
+
formRef.hasWf ||
|
|
154
|
+
wfParam.hasWf ||
|
|
155
|
+
wfParam.wfInfo?.procInstId
|
|
156
|
+
) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// 提示语跟随后台 param18 下发的按钮名;没配就保持原文案不变。
|
|
161
|
+
// 只能用 $t1(找不到 key 原样返回),$t2 在 i18n 命中 key 时会把拼进去的名字吞掉。
|
|
162
|
+
let btnName = getWfButtonNames().saveSubmitBtn;
|
|
163
|
+
let confirmText =
|
|
164
|
+
option?.confirmText ||
|
|
165
|
+
option?.config?.confirmText ||
|
|
166
|
+
(btnName
|
|
167
|
+
? this.$t1(`您确定要${btnName}吗?`)
|
|
168
|
+
: this.$t1("您确定要保存并提交流程吗?"));
|
|
169
|
+
|
|
170
|
+
// param19 + param12 都开:这道「保存前」的确认框不弹,把确认交给 wfStartDialog——
|
|
171
|
+
// 它在保存之后才探 preStart,探到候选人就由「修改候选人」弹框顶替,探不到才弹确认框。
|
|
172
|
+
// 任一为 false 都当场弹:param12 关着后面不可能有候选人弹框,延后没有意义。
|
|
173
|
+
await Promise.all([loadWfAutoConfirm(this), loadWfUserRange(this)]);
|
|
174
|
+
let autoConfirm = isWfAutoConfirm() && isWfUserRangeEnabled();
|
|
175
|
+
|
|
176
|
+
return this.saveDefaultHandle({
|
|
177
|
+
...option,
|
|
178
|
+
config: {
|
|
179
|
+
...option?.config,
|
|
180
|
+
successMsg: option?.config?.successMsg ?? true,
|
|
181
|
+
isConfirm: option?.config?.isConfirm ?? !autoConfirm,
|
|
182
|
+
confirmText: option?.config?.confirmText || confirmText,
|
|
183
|
+
skipHostReloadAfterSave: true,
|
|
184
|
+
//提交前置处理(与「提交流程」按钮共用同一个表单脚本)
|
|
185
|
+
beforeConfirm: () =>
|
|
186
|
+
formRef.runBeforeSubmitWf
|
|
187
|
+
? formRef.runBeforeSubmitWf("saveSubmit")
|
|
188
|
+
: true,
|
|
189
|
+
success: (res) => {
|
|
190
|
+
// ★ 保存成功后,只升级新增页签的「元数据」为编辑态(设 dataId/isAdd/formCode/标题),
|
|
191
|
+
// 不重渲染详情内容。这样即便随后提交失败/取消候选人弹框,页签也已是编辑态,
|
|
192
|
+
// 再次提交只会更新、不会重复入库;而详情内容的刷新交给最终的提交后行为(避免刷两次)。
|
|
193
|
+
let editFormCode = formConfig.editFormCode;
|
|
194
|
+
let listPageRef = formRef.getListPageRef && formRef.getListPageRef();
|
|
195
|
+
if (listPageRef && listPageRef.promoteActiveAddTab) {
|
|
196
|
+
listPageRef.promoteActiveAddTab(res.objx, editFormCode, formRef);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
openStartWfDialog(formRef, {
|
|
200
|
+
objId: res.objx,
|
|
201
|
+
wfCode: reportTemplate.objTypeCode,
|
|
202
|
+
formCode: reportTemplate.formCode,
|
|
203
|
+
serviceId: reportTemplate.serviceName,
|
|
204
|
+
// 上面确认过就不再弹第二次;上面因 param19 跳过了,就得让弹框自己去确认
|
|
205
|
+
skipStartConfirm: !autoConfirm,
|
|
206
|
+
// 提交后行为复用 xform 侧统一方法:
|
|
207
|
+
// 成功 → onWfStartSuccess(关页签/刷新本页);失败/取消 → onWfStartAbort(刷新到编辑态)
|
|
208
|
+
onStartSuccess: () =>
|
|
209
|
+
formRef.onWfStartSuccess && formRef.onWfStartSuccess(),
|
|
210
|
+
onStartFail: () =>
|
|
211
|
+
formRef.onWfStartAbort && formRef.onWfStartAbort(),
|
|
212
|
+
onCancel: () => formRef.onWfStartAbort && formRef.onWfStartAbort(),
|
|
213
|
+
});
|
|
214
|
+
option?.config?.success && option.config.success(res);
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
async saveDefaultHandle(option) {
|
|
85
220
|
let formRef = this.getFormRef ? this.getFormRef() : this;
|
|
86
221
|
let formConfig = formRef.formConfig;
|
|
87
222
|
let entity = formConfig.entity;
|
|
88
223
|
if (!entity) return;
|
|
89
|
-
let dataId = formRef?.dataId;
|
|
90
|
-
let reportTemplate = formRef?.reportTemplate;
|
|
91
|
-
let formCode = reportTemplate?.formCode;
|
|
92
224
|
let scriptCode = formConfig.saveScriptCode || "saveUpdate";
|
|
93
|
-
let config = option?.config;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
225
|
+
let config = { ...(option?.config || {}) };
|
|
226
|
+
let skipHostReloadAfterSave
|
|
227
|
+
= config.skipHostReloadAfterSave === true;
|
|
228
|
+
delete config.skipHostReloadAfterSave;
|
|
229
|
+
if (typeof formRef.formSaveReconcileTask === "function") {
|
|
230
|
+
return formRef.formSaveReconcileTask();
|
|
231
|
+
}
|
|
232
|
+
if (formRef.formSavePending) {
|
|
233
|
+
this.$message.warning(this.$t1("数据正在保存,请勿重复操作"));
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
formRef.formSavePending = true;
|
|
238
|
+
let keepSaveLocked = false;
|
|
239
|
+
try {
|
|
240
|
+
let valid = await new Promise((resolve, reject) => {
|
|
241
|
+
try {
|
|
242
|
+
formRef.validate(resolve);
|
|
243
|
+
} catch (error) {
|
|
244
|
+
reject(error);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
if (!valid) return false;
|
|
248
|
+
|
|
249
|
+
// 提交前置处理:校验通过后、确认框之前拦截。只有「保存并提交流程」入口会传,
|
|
250
|
+
// 普通保存不受影响。返回 false 即中止(finally 里会释放 formSavePending)。
|
|
251
|
+
let beforeConfirm = config.beforeConfirm;
|
|
252
|
+
delete config.beforeConfirm; //不能透传给 formHttp
|
|
253
|
+
if (typeof beforeConfirm === "function") {
|
|
254
|
+
let pass = await beforeConfirm();
|
|
255
|
+
if (pass === false) return false;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
let submitFormData
|
|
259
|
+
= typeof formRef.buildSubmitPayload === "function"
|
|
260
|
+
? await formRef.buildSubmitPayload()
|
|
261
|
+
: formRef.getRealFormData();
|
|
262
|
+
let reqData = this.getReqFormData(submitFormData);
|
|
263
|
+
let shouldConfirm = config.isConfirm ?? true;
|
|
264
|
+
let confirmText
|
|
265
|
+
= config.confirmText || this.$t1("您确定要保存吗?");
|
|
266
|
+
if (shouldConfirm) {
|
|
267
|
+
try {
|
|
268
|
+
await this.$baseConfirm(confirmText);
|
|
269
|
+
} catch (error) {
|
|
270
|
+
return false;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
let userSuccess = config.success;
|
|
275
|
+
let userFail = config.fail;
|
|
276
|
+
let userError = config.error;
|
|
277
|
+
let userCallback = config.callback;
|
|
278
|
+
|
|
279
|
+
return await new Promise((resolve, reject) => {
|
|
280
|
+
let settled = false;
|
|
281
|
+
let resolveOnce = (value) => {
|
|
282
|
+
if (settled) return;
|
|
283
|
+
settled = true;
|
|
284
|
+
resolve(value);
|
|
285
|
+
};
|
|
286
|
+
let rejectOnce = (error) => {
|
|
287
|
+
if (settled) return;
|
|
288
|
+
settled = true;
|
|
289
|
+
reject(error);
|
|
290
|
+
};
|
|
291
|
+
let requestTask = this.formHttp({
|
|
102
292
|
// url: "/" + reportTemplate.serviceName + "/form_ins/saveUpdate",
|
|
103
293
|
scriptCode: scriptCode,
|
|
104
294
|
data: reqData,
|
|
105
295
|
successMsg: true,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
296
|
+
...config,
|
|
297
|
+
isConfirm: false,
|
|
298
|
+
confirmText,
|
|
299
|
+
callback: undefined,
|
|
300
|
+
success: async (res, response) => {
|
|
109
301
|
let editFormCode = formConfig.editFormCode;
|
|
110
302
|
let updateParam = {
|
|
111
303
|
dataId: res.objx,
|
|
@@ -113,15 +305,160 @@ modules = {
|
|
|
113
305
|
if (editFormCode) {
|
|
114
306
|
updateParam.formCode = editFormCode;
|
|
115
307
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
308
|
+
// 保存成功后一律让宿主整页重挂载(toggle v-if):新增/编辑都需要出流程信息、
|
|
309
|
+
// 切编辑模板、按新状态重算显隐与只读——这些就地取数做不到。
|
|
310
|
+
// 唯一例外是「保存并提交」路径(skipHostReloadAfterSave=true),
|
|
311
|
+
// 它的刷新交给流程结束后的 onWfStartSuccess / onWfStartAbort,避免刷两次。
|
|
312
|
+
//
|
|
313
|
+
// 刷新前只同步「元数据」,绝不做整单 setFormData:表单已挂载时那是逐字段同步
|
|
314
|
+
// 广播赋值,每个字段的 onChange 会当场执行,先赋值组件的脚本读到的是后赋值
|
|
315
|
+
// 组件的旧值,公式与 keyName 联动乱序,子表还会被整体清空(getOne 不返回子表)。
|
|
316
|
+
// 首屏之所以正确,靠的是「先填满 formDataModel 再挂载组件」,就地整单赋值破坏
|
|
317
|
+
// 了这个前提,故整单刷新只能走重挂载。
|
|
318
|
+
let syncSavedMeta = () => {
|
|
319
|
+
let nextDataId = updateParam.dataId;
|
|
320
|
+
if (
|
|
321
|
+
nextDataId !== undefined
|
|
322
|
+
&& nextDataId !== null
|
|
323
|
+
&& nextDataId !== ""
|
|
324
|
+
) {
|
|
325
|
+
// 提交报文的主表以 currentFormData 打底(见 form-render getSubData2),
|
|
326
|
+
// 主键 id 不是表单控件,只能在此回写;否则 skip 路径下再次保存会重复入库。
|
|
327
|
+
if (
|
|
328
|
+
formRef.currentFormData
|
|
329
|
+
&& formRef.currentFormData.id == null
|
|
330
|
+
) {
|
|
331
|
+
formRef.currentFormData.id = nextDataId;
|
|
332
|
+
}
|
|
333
|
+
formRef.$emit("update:dataId", nextDataId);
|
|
334
|
+
}
|
|
335
|
+
if (updateParam.formCode) {
|
|
336
|
+
formRef.$emit("update:formCode", updateParam.formCode);
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
let runHostReload = async () => {
|
|
340
|
+
if (skipHostReloadAfterSave) return;
|
|
341
|
+
await formRef.reloadForm({ updateParam });
|
|
342
|
+
};
|
|
343
|
+
let callbacksStarted = false;
|
|
344
|
+
let runPostReloadCallbacks = async () => {
|
|
345
|
+
if (callbacksStarted) return res;
|
|
346
|
+
callbacksStarted = true;
|
|
347
|
+
let callbacks = [
|
|
348
|
+
() => this.onAfterSaveHandle(reqData, res, response),
|
|
349
|
+
typeof userSuccess === "function"
|
|
350
|
+
? () => userSuccess(res)
|
|
351
|
+
: null,
|
|
352
|
+
typeof option?.callback === "function"
|
|
353
|
+
? () => option.callback(res)
|
|
354
|
+
: null,
|
|
355
|
+
typeof userCallback === "function"
|
|
356
|
+
? () => userCallback(res, response)
|
|
357
|
+
: null,
|
|
358
|
+
].filter(Boolean);
|
|
359
|
+
let hasCallbackError = false;
|
|
360
|
+
let firstCallbackError;
|
|
361
|
+
for (let index = 0; index < callbacks.length; index++) {
|
|
362
|
+
try {
|
|
363
|
+
await callbacks[index]();
|
|
364
|
+
} catch (error) {
|
|
365
|
+
if (!hasCallbackError) {
|
|
366
|
+
hasCallbackError = true;
|
|
367
|
+
firstCallbackError = error;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (hasCallbackError) {
|
|
372
|
+
let detail
|
|
373
|
+
= firstCallbackError?.message || firstCallbackError;
|
|
374
|
+
let message = this.$t1("已保存,后续处理失败");
|
|
375
|
+
this.$message.error(
|
|
376
|
+
detail ? `${message}:${detail}` : message
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
return res;
|
|
380
|
+
};
|
|
381
|
+
let clearReconcileState = () => {
|
|
382
|
+
formRef.formSaveReconcileTask = null;
|
|
383
|
+
formRef.formSavePending = false;
|
|
384
|
+
};
|
|
385
|
+
let showHostReloadFailure = (retry, error) => {
|
|
386
|
+
let detail = error?.message;
|
|
387
|
+
let message = this.$t1(
|
|
388
|
+
retry
|
|
389
|
+
? "重新加载仍未成功,请手动刷新后再操作"
|
|
390
|
+
: "保存成功,但重新加载失败,请手动刷新后再操作"
|
|
391
|
+
);
|
|
392
|
+
this.$message.error(
|
|
393
|
+
detail ? `${message}:${detail}` : message
|
|
394
|
+
);
|
|
395
|
+
};
|
|
396
|
+
let installHostReloadRetry = (error) => {
|
|
397
|
+
keepSaveLocked = true;
|
|
398
|
+
let hostRetryPromise = null;
|
|
399
|
+
formRef.formSaveReconcileTask = () => {
|
|
400
|
+
if (hostRetryPromise) return hostRetryPromise;
|
|
401
|
+
hostRetryPromise = (async () => {
|
|
402
|
+
try {
|
|
403
|
+
await runHostReload();
|
|
404
|
+
clearReconcileState();
|
|
405
|
+
return res;
|
|
406
|
+
} catch (retryError) {
|
|
407
|
+
showHostReloadFailure(true, retryError);
|
|
408
|
+
return false;
|
|
409
|
+
} finally {
|
|
410
|
+
hostRetryPromise = null;
|
|
411
|
+
}
|
|
412
|
+
})();
|
|
413
|
+
return hostRetryPromise;
|
|
414
|
+
};
|
|
415
|
+
showHostReloadFailure(false, error);
|
|
416
|
+
};
|
|
417
|
+
syncSavedMeta();
|
|
418
|
+
await runPostReloadCallbacks();
|
|
419
|
+
try {
|
|
420
|
+
await runHostReload();
|
|
421
|
+
} catch (hostReloadError) {
|
|
422
|
+
installHostReloadRetry(hostReloadError);
|
|
423
|
+
rejectOnce(hostReloadError);
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
resolveOnce(res);
|
|
427
|
+
},
|
|
428
|
+
fail: (res, response) => {
|
|
429
|
+
this.onAfterSaveHandle(reqData, res, response);
|
|
430
|
+
if (typeof option?.callback === "function") {
|
|
431
|
+
option.callback(res);
|
|
432
|
+
}
|
|
433
|
+
if (typeof userCallback === "function") {
|
|
434
|
+
userCallback(res, response);
|
|
435
|
+
}
|
|
436
|
+
Promise.resolve(
|
|
437
|
+
typeof userFail === "function" ? userFail(res) : null
|
|
438
|
+
).then(() => resolveOnce(res), rejectOnce);
|
|
439
|
+
},
|
|
440
|
+
error: (error) => {
|
|
441
|
+
Promise.resolve(
|
|
442
|
+
typeof userError === "function" ? userError(error) : null
|
|
443
|
+
).then(() => rejectOnce(error), rejectOnce);
|
|
120
444
|
},
|
|
121
|
-
...config,
|
|
122
445
|
});
|
|
446
|
+
if (requestTask && typeof requestTask.catch === "function") {
|
|
447
|
+
requestTask.catch(rejectOnce);
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
} catch (error) {
|
|
451
|
+
if (!keepSaveLocked) {
|
|
452
|
+
let message
|
|
453
|
+
= error?.message || error || this.$t1("保存失败");
|
|
454
|
+
this.$message.error(message);
|
|
123
455
|
}
|
|
124
|
-
|
|
456
|
+
return false;
|
|
457
|
+
} finally {
|
|
458
|
+
if (!keepSaveLocked) {
|
|
459
|
+
formRef.formSavePending = false;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
125
462
|
},
|
|
126
463
|
setInterval(callback, millis) {
|
|
127
464
|
let timer = setInterval(callback, millis);
|
|
@@ -325,9 +662,9 @@ modules = {
|
|
|
325
662
|
seqField = "seq",
|
|
326
663
|
refField = "super_seq"
|
|
327
664
|
) {
|
|
328
|
-
//
|
|
665
|
+
// 边界检查(返回结构与正常分支保持一致:list1/list2)
|
|
329
666
|
if (rowIdx < 0 || rowIdx >= masters.length) {
|
|
330
|
-
return {
|
|
667
|
+
return { list1: [...masters], list2: [...slaves] };
|
|
331
668
|
}
|
|
332
669
|
|
|
333
670
|
// 创建副本
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {initWf} from
|
|
2
|
-
import {getReportGlobalMap} from "../../../components/xform/utils/util";
|
|
3
|
-
import {decrypt} from "@base/utils/aes";
|
|
4
|
-
|
|
1
|
+
import { initWf } from "../../../components/wf/wfUtil";
|
|
2
|
+
import { getReportGlobalMap } from "../../../components/xform/utils/util";
|
|
3
|
+
import { decrypt } from "@base/utils/aes";
|
|
5
4
|
|
|
6
5
|
let modules = {};
|
|
7
6
|
modules = {
|
|
@@ -14,24 +13,25 @@ modules = {
|
|
|
14
13
|
handleDecryptData(data) {
|
|
15
14
|
if (data) {
|
|
16
15
|
if (Array.isArray(data)) {
|
|
17
|
-
data.forEach(item => {
|
|
18
|
-
this.handleDecryptData(item)
|
|
19
|
-
})
|
|
16
|
+
data.forEach((item) => {
|
|
17
|
+
this.handleDecryptData(item);
|
|
18
|
+
});
|
|
20
19
|
} else if (Object.prototype.toString.call(data) === "[object Object]") {
|
|
21
|
-
Object.keys(data).forEach(key => {
|
|
22
|
-
|
|
20
|
+
Object.keys(data).forEach((key) => {
|
|
23
21
|
let value = data[key];
|
|
24
22
|
if (value !== null && value !== undefined) {
|
|
25
|
-
if (
|
|
23
|
+
if (
|
|
24
|
+
Object.prototype.toString.call(data[key]) === "[object String]"
|
|
25
|
+
) {
|
|
26
26
|
let str = "ATEN*-";
|
|
27
27
|
if (value.startsWith(str)) {
|
|
28
28
|
data[key] = decrypt(value.slice(str.length));
|
|
29
29
|
}
|
|
30
30
|
} else {
|
|
31
|
-
this.handleDecryptData(data[key])
|
|
31
|
+
this.handleDecryptData(data[key]);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
})
|
|
34
|
+
});
|
|
35
35
|
} else if (Object.prototype.toString.call(data) === "[object String]") {
|
|
36
36
|
let str = "ATEN*-";
|
|
37
37
|
if (data.startsWith(str)) {
|
|
@@ -54,29 +54,29 @@ modules = {
|
|
|
54
54
|
let error = opts.error;
|
|
55
55
|
|
|
56
56
|
let that = this;
|
|
57
|
-
let reportTemplate = that.getFormRef
|
|
57
|
+
let reportTemplate = that.getFormRef
|
|
58
|
+
? that.getFormRef().reportTemplate
|
|
59
|
+
: that.reportTemplate;
|
|
58
60
|
if (scriptCode && !formCode) {
|
|
59
|
-
let arr = scriptCode.split("/").filter(item => item)
|
|
61
|
+
let arr = scriptCode.split("/").filter((item) => item);
|
|
60
62
|
if (arr.length > 1) {
|
|
61
63
|
formCode = arr[0];
|
|
62
64
|
scriptCode = arr[1];
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
67
|
if (!formCode) {
|
|
66
|
-
formCode = reportTemplate.formCode
|
|
68
|
+
formCode = reportTemplate.formCode;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
delete opts.data
|
|
70
|
-
delete opts.scriptCode
|
|
71
|
-
delete opts.formCode
|
|
72
|
-
delete opts.isLoading
|
|
73
|
-
delete opts.success
|
|
74
|
-
delete opts.fail
|
|
75
|
-
delete opts.error
|
|
76
|
-
|
|
71
|
+
delete opts.data;
|
|
72
|
+
delete opts.scriptCode;
|
|
73
|
+
delete opts.formCode;
|
|
74
|
+
delete opts.isLoading;
|
|
75
|
+
delete opts.success;
|
|
76
|
+
delete opts.fail;
|
|
77
|
+
delete opts.error;
|
|
77
78
|
|
|
78
79
|
let getServiceName = (callback) => {
|
|
79
|
-
|
|
80
80
|
if (formCode && formCode !== reportTemplate.formCode) {
|
|
81
81
|
this.getHttpTarget().$http({
|
|
82
82
|
aes: true,
|
|
@@ -84,35 +84,34 @@ modules = {
|
|
|
84
84
|
method: `post`,
|
|
85
85
|
data: {
|
|
86
86
|
formCode,
|
|
87
|
-
scriptCode
|
|
87
|
+
scriptCode,
|
|
88
88
|
},
|
|
89
89
|
isLoading,
|
|
90
90
|
// loadingTarget: this.getLoadingTarget(),
|
|
91
91
|
// modalStrictly: true,
|
|
92
|
-
success: res => {
|
|
92
|
+
success: (res) => {
|
|
93
93
|
let serviceName = res.objx;
|
|
94
94
|
if (serviceName) {
|
|
95
|
-
callback(serviceName)
|
|
95
|
+
callback(serviceName);
|
|
96
96
|
} else {
|
|
97
|
-
this.$baseAlert("服务名不存在")
|
|
97
|
+
this.$baseAlert("服务名不存在");
|
|
98
98
|
}
|
|
99
|
-
}
|
|
99
|
+
},
|
|
100
100
|
});
|
|
101
101
|
} else {
|
|
102
|
-
callback(reportTemplate.serviceName)
|
|
102
|
+
callback(reportTemplate.serviceName);
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
}
|
|
104
|
+
};
|
|
106
105
|
let toDo = () => {
|
|
107
106
|
return new Promise((resolve, reject) => {
|
|
108
|
-
getServiceName(searviceName => {
|
|
107
|
+
getServiceName((searviceName) => {
|
|
109
108
|
let reqData;
|
|
110
109
|
reqData = data;
|
|
111
110
|
|
|
112
111
|
let reportGlobalMap = getReportGlobalMap() || {};
|
|
113
112
|
let url = `/${searviceName}/bd_api/${formCode}/${scriptCode}`;
|
|
114
113
|
return this.getHttpTarget().$http({
|
|
115
|
-
aes: true,
|
|
114
|
+
// aes: true,
|
|
116
115
|
url: url,
|
|
117
116
|
method: `post`,
|
|
118
117
|
// loadingTarget: this.getLoadingTarget(),
|
|
@@ -121,51 +120,55 @@ modules = {
|
|
|
121
120
|
data: {
|
|
122
121
|
// scriptCode: scriptCode,
|
|
123
122
|
fixeData: reportGlobalMap,
|
|
124
|
-
...reqData
|
|
123
|
+
...reqData,
|
|
125
124
|
},
|
|
126
|
-
success: res => {
|
|
125
|
+
success: (res, response) => {
|
|
127
126
|
if (res.objx) {
|
|
128
127
|
res.objx = this.handleDecryptData(res.objx);
|
|
129
128
|
}
|
|
130
129
|
if (opts.successMsg) {
|
|
131
130
|
this.$message({
|
|
132
131
|
message: res.content,
|
|
133
|
-
type:
|
|
134
|
-
duration: 1000
|
|
132
|
+
type: "success",
|
|
133
|
+
duration: 1000,
|
|
135
134
|
});
|
|
136
135
|
}
|
|
137
|
-
success && success(res);
|
|
136
|
+
success && success(res, response);
|
|
138
137
|
if (opts.wfConfig) {
|
|
139
138
|
let formTarget = this.getFormRef ? this.getFormRef() : this;
|
|
140
139
|
let wfConfig = opts.wfConfig(res);
|
|
141
140
|
if (wfConfig) {
|
|
142
141
|
// let reportTemplate = this.getFormRef ? this.getFormRef().reportTemplate : this.reportTemplate;
|
|
143
|
-
let serviceId =
|
|
142
|
+
let serviceId =
|
|
143
|
+
wfConfig.serviceId || reportTemplate?.serviceName;
|
|
144
144
|
let opt2 = Object.assign({}, wfConfig, {
|
|
145
|
-
serviceId: serviceId
|
|
145
|
+
serviceId: serviceId,
|
|
146
146
|
});
|
|
147
147
|
//初始化流程
|
|
148
148
|
/*let target1 = formTarget.$attrs['parent-target'];
|
|
149
149
|
let target2 = target1?.$attrs['parent-target'];
|
|
150
150
|
let target = !target2 ? this : target1;*/
|
|
151
151
|
let target = formTarget;
|
|
152
|
+
// 暴露启动流程所需的 option 与上下文,供 detail-item 声明式渲染启动按钮(替代 DOM 强制注入)
|
|
153
|
+
target.wfStartOption = opt2;
|
|
154
|
+
target.wfStartCtx = target;
|
|
152
155
|
initWf.call(target, opt2);
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
resolve(res);
|
|
156
159
|
},
|
|
157
|
-
fail: res => {
|
|
158
|
-
fail && fail(res);
|
|
160
|
+
fail: (res, response) => {
|
|
161
|
+
fail && fail(res, response);
|
|
159
162
|
resolve(res);
|
|
160
163
|
},
|
|
161
|
-
error: e => {
|
|
164
|
+
error: (e) => {
|
|
162
165
|
error && error(e);
|
|
163
166
|
reject(e);
|
|
164
|
-
}
|
|
167
|
+
},
|
|
165
168
|
});
|
|
166
|
-
})
|
|
167
|
-
})
|
|
168
|
-
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
};
|
|
169
172
|
if (opts.isConfirm) {
|
|
170
173
|
this.$baseConfirm(opts.confirmText).then(() => {
|
|
171
174
|
return toDo();
|
|
@@ -173,7 +176,7 @@ modules = {
|
|
|
173
176
|
} else {
|
|
174
177
|
return toDo();
|
|
175
178
|
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
};
|
|
179
182
|
export default modules;
|