cloud-web-corejs 1.0.54-dev.46 → 1.0.54-dev.460
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -3
- package/src/App.vue +31 -33
- package/src/api/user.js +16 -0
- package/src/components/Qrcode/fileParse.vue +0 -1
- package/src/components/Tinymce/index.vue +112 -71
- package/src/components/VabUpload/index.js +49 -1
- package/src/components/VabUpload/mixins.js +2 -2
- package/src/components/VabUpload/propertiesDialog.vue +1 -1
- package/src/components/VabUpload/view.vue +207 -120
- package/src/components/advancedSearchDialog/mixins.js +1 -1
- package/src/components/baseAttachment/index.vue +49 -40
- package/src/components/baseAttachment/mixins.js +295 -1
- package/src/components/baseInputExport/index.vue +19 -12
- package/src/components/baseInputExport/mixins.js +389 -1
- package/src/components/baseTabs/mixins.js +166 -1
- package/src/components/errorMsg/mixins.js +6 -5
- package/src/components/excelExport/button.vue +57 -4
- package/src/components/excelExport/index.js +48 -6
- package/src/components/excelExport/index.vue +56 -2
- package/src/components/excelExport/mixins.js +938 -2
- package/src/components/excelImport/mixins.js +2 -1
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
- package/src/components/fileLibrary/filterDialog.vue +454 -0
- package/src/components/fileLibrary/index.vue +594 -254
- package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +335 -212
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +31 -27
- package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +4 -4
- package/src/components/fileLibrary/mixins/indexMixins.js +220 -101
- package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +64 -4
- package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +3 -3
- package/src/components/fileLibrary/propertiesDialog.vue +113 -74
- package/src/components/fileLibrary/shareDialog.vue +1 -1
- package/src/components/formOplog/mixins.js +1 -1
- package/src/components/jsonImport/index.js +1 -1
- package/src/components/jsonImport/mixins.js +2 -1
- package/src/components/langImport/mixins.js +17 -16
- package/src/components/obsUpload/index.js +1 -0
- package/src/components/obsUpload/index.vue +231 -0
- package/src/components/obsUpload/mixins.js +8 -0
- package/src/components/scriptDescription/button.vue +12 -4
- package/src/components/scriptTest/mixins.js +1 -1
- package/src/components/statusTag/mixins.js +1 -1
- package/src/components/table/CellSlot.vue +1 -0
- package/src/components/table/index.js +1049 -1293
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
- package/src/components/table/tableForm.vue +99 -63
- package/src/components/table/tableFormMixin.js +1 -1
- package/src/components/table/util/index.js +328 -0
- package/src/components/table/vxeFilter/mixin.js +6 -6
- package/src/components/tempStorage/index.vue +76 -55
- package/src/components/tempStorage/tempStorageDialog.vue +179 -54
- package/src/components/vb-tabs/x-tabs.vue +56 -30
- package/src/components/wf/addOpinionButton.vue +57 -0
- package/src/components/wf/content.vue +833 -362
- package/src/components/wf/mixins/addOpinionButton.js +3 -0
- package/src/components/wf/mixins/setCandidateButton.js +6 -0
- package/src/components/wf/mixins/setCandidateDialog.js +2 -1
- package/src/components/wf/mixins/setCandidateDialog2.js +6 -0
- package/src/components/wf/mixins/wfFlowEleScriptDialog.js +3 -0
- package/src/components/wf/mixins/wfTaskUserRangeDialog.js +3 -0
- package/src/components/wf/setCandidateButton.vue +40 -0
- package/src/components/wf/setCandidateDialog.vue +10 -0
- package/src/components/wf/setCandidateDialog2.vue +105 -0
- package/src/components/wf/wf.js +1 -1
- package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
- package/src/components/wf/wfStartDialog.vue +66 -42
- package/src/components/wf/wfTaskUserRangeDialog.vue +65 -0
- package/src/components/wf/wfUtil.js +1 -1
- package/src/components/xform/form-designer/designer.js +1657 -3
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +419 -0
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +3 -3
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +290 -8
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +301 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +16 -4
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
- package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +38 -7
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1759 -8
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +120 -72
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +34 -5
- package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
- package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +18 -7
- package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +89 -0
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +14 -2
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +30 -4
- package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +77 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +106 -0
- package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1634 -16
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +645 -379
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +962 -0
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +10 -8
- package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +81 -0
- package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +49 -8
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +61 -88
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +13 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +179 -0
- package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
- package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +114 -81
- package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +186 -0
- package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +41 -27
- package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +113 -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 +25 -6
- package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +24 -9
- package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
- package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +2 -1
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +31 -17
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +6 -1
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +99 -0
- package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +147 -0
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +46 -34
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +3 -171
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +259 -58
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +744 -0
- package/src/components/xform/form-designer/indexMixin.js +3 -2
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +947 -156
- package/src/components/xform/form-designer/setting-panel/index.vue +4 -0
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +537 -302
- package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +946 -1042
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1127 -512
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +35 -20
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +64 -5
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +70 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +89 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +44 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +30 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +63 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +89 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +721 -466
- package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +20 -11
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +349 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +10 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +42 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +305 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +372 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +263 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +32 -11
- package/src/components/xform/form-designer/toolbar-panel/index.vue +12 -11
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/widget-panel/index.vue +21 -1
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +19 -18
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1644 -871
- package/src/components/xform/form-render/container-item/containerItemMixin.js +386 -11
- package/src/components/xform/form-render/container-item/data-table-item.vue +194 -199
- package/src/components/xform/form-render/container-item/data-table-mixin.js +2928 -18
- package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
- package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
- package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -9
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +1 -8
- package/src/components/xform/form-render/container-item/tab-item.vue +62 -25
- package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
- package/src/components/xform/form-render/container-item/table-item.vue +4 -2
- package/src/components/xform/form-render/container-item/table2-cell-item.vue +53 -34
- package/src/components/xform/form-render/container-item/table2-item.vue +141 -88
- package/src/components/xform/form-render/index.vue +69 -20
- package/src/components/xform/form-render/indexMixin.js +3427 -12
- package/src/components/xform/lang/zh-CN.js +27 -4
- package/src/components/xform/mixins/defaultHandle.js +340 -1
- package/src/components/xform/mixins/scriptHttp.js +174 -1
- package/src/components/xform/utils/emitter.js +4 -4
- package/src/components/xform/utils/format.js +21 -30
- package/src/components/xform/utils/formula-util copy 2.js +945 -0
- package/src/components/xform/utils/formula-util copy.js +860 -0
- package/src/components/xform/utils/formula-util.js +970 -0
- package/src/components/xform/utils/util.js +1463 -1
- package/src/components/xform/utils/validators.js +1 -5
- package/src/components/xform/utils/vue2js-generator.js +2 -2
- package/src/index.js +210 -190
- package/src/lang/index.js +56 -51
- package/src/lang/locale/en/login.js +20 -0
- package/src/lang/locale/zh/login.js +20 -0
- package/src/layout/components/AppMain.vue +5 -1
- package/src/layout/components/Sidebar/default.vue +1389 -1222
- package/src/layout/components/TagsView/index.vue +37 -12
- package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
- package/src/layout/components/extractedCode/createDialog.vue +92 -0
- package/src/layout/components/extractedCode/queryDialog.vue +96 -0
- package/src/layout/components/extractedCode/viewDialog.vue +193 -0
- package/src/layout/components/watermark/index.vue +83 -0
- package/src/layout/defaultLayout.vue +1 -1
- package/src/layout/index.vue +3 -5
- package/src/mixins/selectDialog/index.js +266 -1
- package/src/mixins/table/index.js +151 -0
- package/src/mixins/tableTree/index.js +1 -1
- package/src/permission.js +135 -18
- package/src/router/modules/customer.js +79 -8
- package/src/store/config/index.js +1 -532
- package/src/store/getters.js +3 -1
- package/src/store/modules/permission.js +1 -1
- package/src/store/modules/settings.js +1 -1
- package/src/store/modules/tagsView.js +1 -14
- package/src/store/modules/user.js +341 -16
- package/src/utils/index.js +2 -3
- package/src/utils/pddLog.js +103 -0
- package/src/utils/pdfUtil.js +71 -0
- package/src/utils/request.js +1 -1
- package/src/utils/vab.js +19 -27
- package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
- package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
- package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +4 -5
- package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
- package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
- package/src/views/bd/setting/bd_company_env/list.vue +175 -0
- package/src/views/bd/setting/config_manage/list.vue +76 -0
- package/src/views/bd/setting/form_import_log/edit.vue +127 -0
- package/src/views/bd/setting/form_import_log/list.vue +206 -0
- package/src/views/bd/setting/form_script/edit.vue +9 -0
- package/src/views/bd/setting/form_script/edit1.vue +36 -3
- package/src/views/bd/setting/form_script/form_list.vue +1 -1
- package/src/views/bd/setting/form_script/list1.vue +4 -4
- package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +201 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +193 -1
- package/src/views/bd/setting/form_script/mixins/form_list.js +1 -1
- package/src/views/bd/setting/form_script/mixins/list.js +236 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +423 -14
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
- package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
- package/src/views/bd/setting/form_template/edit.vue +22 -1
- package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/list.vue +5 -5
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +282 -0
- package/src/views/bd/setting/form_template/mixins/edit.js +234 -9
- package/src/views/bd/setting/form_template/mixins/list.js +689 -22
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
- package/src/views/bd/setting/form_template/mixins/wf_list.js +12 -0
- package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +140 -75
- package/src/views/bd/setting/form_template/{list2.vue → wf_list.vue} +25 -35
- 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 +369 -0
- package/src/views/bd/setting/menu_kind/list.vue +4 -0
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
- package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
- package/src/views/bd/setting/push_data/edit.vue +139 -0
- package/src/views/bd/setting/push_data/list.vue +283 -0
- package/src/views/bd/setting/push_data_h/edit.vue +153 -0
- package/src/views/bd/setting/push_data_h/list.vue +293 -0
- package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
- package/src/views/bd/setting/request_async_setting/list.vue +372 -0
- package/src/views/bd/setting/request_setting/edit.vue +300 -0
- package/src/views/bd/setting/request_setting/list.vue +311 -0
- package/src/views/bd/setting/table_model/edit.vue +875 -426
- package/src/views/bd/setting/table_model/list.vue +4 -4
- package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/edit.js +1202 -13
- package/src/views/bd/setting/table_model/mixins/list.js +440 -14
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
- package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
- package/src/views/user/access_log/list.vue +418 -349
- package/src/views/user/area/dialog.vue +0 -1
- 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 +1 -1
- package/src/views/user/common_script/edit.vue +1 -1
- package/src/views/user/common_script/list.vue +1 -1
- package/src/views/user/company_info/dialog.vue +164 -154
- package/src/views/user/company_info/edit.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +1 -0
- package/src/views/user/extend_datasource/edit.vue +3 -0
- package/src/views/user/extend_datasource/list.vue +2 -1
- package/src/views/user/fieldTranslation/editDialog.vue +7 -7
- package/src/views/user/fieldTranslation/list.vue +32 -32
- package/src/views/user/form/vform/designer.vue +775 -749
- package/src/views/user/form/vform/out_render.vue +1 -1
- package/src/views/user/form/vform/render.vue +59 -37
- package/src/views/user/form/view/edit.vue +38 -37
- package/src/views/user/form/view/list.vue +236 -46
- package/src/views/user/home/bears/index.vue +1032 -0
- package/src/views/user/home/default.vue +1025 -979
- package/src/views/user/home/dev.vue +29 -0
- package/src/views/user/home/index.vue +16 -6
- package/src/views/user/home/taili/index.vue +1034 -0
- package/src/views/user/ledger_library/list.vue +10 -12
- package/src/views/user/login/default.vue +165 -36
- package/src/views/user/login/index.vue +4 -6
- package/src/views/user/login/indexMixin.js +184 -8
- package/src/views/user/notify_message/dialog.vue +38 -22
- package/src/views/user/notify_template/edit.vue +188 -187
- package/src/views/user/notify_template/edit2.vue +176 -0
- package/src/views/user/notify_template/list.vue +4 -1
- package/src/views/user/notify_template/list2.vue +190 -0
- package/src/views/user/outLink/form_view.vue +211 -184
- package/src/views/user/outLink/index.vue +67 -11
- package/src/views/user/outLink/view.vue +28 -23
- package/src/views/user/position/edit.vue +116 -83
- package/src/views/user/position/list.vue +118 -86
- package/src/views/user/project_tag/dialog.vue +9 -4
- package/src/views/user/project_tag/edit.vue +2 -2
- package/src/views/user/project_tag/list.vue +9 -4
- package/src/views/user/push_setting/list.vue +2 -2
- package/src/views/user/request_setting/edit.vue +258 -0
- package/src/views/user/request_setting/list.vue +248 -0
- package/src/views/user/role/dialog.vue +70 -48
- package/src/views/user/role/edit.vue +499 -429
- package/src/views/user/role/list.vue +4 -4
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/sale_org/list.vue +4 -1
- package/src/views/user/system_notice/edit.vue +232 -186
- package/src/views/user/user/dialog.vue +46 -23
- package/src/views/user/user/edit.vue +1059 -1021
- package/src/views/user/user/form_dialog.vue +158 -0
- package/src/views/user/user/form_info.vue +210 -0
- package/src/views/user/user/list.vue +647 -563
- package/src/views/user/user/modifyPasswordDialog.vue +64 -53
- package/src/views/user/wf/wfReport/index.vue +618 -0
- package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
- package/src/views/user/wf/wf_manage/list.vue +371 -249
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
- package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
- package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
- package/src/views/user/wf/wf_obj_config/list.vue +114 -9
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +2 -2
- package/src/views/user/wf/wf_transfer_setting/edit.vue +230 -0
- package/src/views/user/wf/wf_transfer_setting/list.vue +309 -0
- package/src/views/bd/setting/form_template/mixins/list2.js +0 -12
|
@@ -1,1293 +1,1049 @@
|
|
|
1
|
-
/**version-1.0*/
|
|
2
|
-
let modules = {};
|
|
3
|
-
import Sortable from "sortablejs";
|
|
4
|
-
import tableConfig from "./config.js";
|
|
5
|
-
import customConfig from "./customConfig.js";
|
|
6
|
-
import Vue from "vue";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
function getGrid(that, tableRef) {
|
|
20
|
-
var $grid;
|
|
21
|
-
if (Array.isArray(that.$refs[tableRef])) {
|
|
22
|
-
$grid = that.$refs[tableRef][0];
|
|
23
|
-
} else {
|
|
24
|
-
$grid = that.$refs[tableRef];
|
|
25
|
-
}
|
|
26
|
-
return $grid;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async function initVxeTable(option) {
|
|
30
|
-
let tableName = option.tableName;
|
|
31
|
-
if (
|
|
32
|
-
!configUtil.tableConfig.disableTableName
|
|
33
|
-
&& option.tableNameRequired !== false
|
|
34
|
-
&& !tableName
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
$grid.originOption
|
|
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
|
-
let
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
$grid.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
$grid.getCellValue = getCellValue;
|
|
102
|
-
$grid
|
|
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
|
-
option.bindToolbar
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
let
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
= option.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
let
|
|
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
|
-
if (
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
$table.sortable
|
|
225
|
-
$table
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
//
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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
|
-
let
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
let
|
|
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
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
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
|
-
let
|
|
456
|
-
let
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
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
|
-
|
|
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
|
-
if (
|
|
559
|
-
queryParams.
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
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
|
-
|
|
635
|
-
|
|
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
|
-
|
|
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
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
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
|
-
let
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
var
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
var
|
|
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
|
-
var
|
|
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
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
var
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
var
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
// tableColumn = visibleColumn
|
|
1051
|
-
// }
|
|
1052
|
-
}
|
|
1053
|
-
} else {
|
|
1054
|
-
tableColumn = visibleColumn;
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
} else {
|
|
1058
|
-
tableColumn = obj.tableColumn;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
var rowid = $xetable.getRowid(row);
|
|
1062
|
-
let fullAllDataRowIdData = $xetable.fullAllDataRowIdData;
|
|
1063
|
-
var rest = fullAllDataRowIdData[rowid];
|
|
1064
|
-
var rowLevel = rest ? rest.level : 0;
|
|
1065
|
-
var seq = rest ? rest.seq : -1;
|
|
1066
|
-
var renderType = "body";
|
|
1067
|
-
|
|
1068
|
-
let $rowIndex = obj.$rowIndex;
|
|
1069
|
-
if ($rowIndex == null) {
|
|
1070
|
-
tableData.some(function (item, index) {
|
|
1071
|
-
let flag = rowid == $xetable.getRowid(item);
|
|
1072
|
-
if (flag) {
|
|
1073
|
-
$rowIndex = index;
|
|
1074
|
-
}
|
|
1075
|
-
return flag;
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
let $columnIndex = obj.$columnIndex;
|
|
1080
|
-
if ($columnIndex == null) {
|
|
1081
|
-
tableColumn.some(function (item, index) {
|
|
1082
|
-
let flag = column.id == item.id;
|
|
1083
|
-
if (flag) {
|
|
1084
|
-
$columnIndex = index;
|
|
1085
|
-
}
|
|
1086
|
-
return flag;
|
|
1087
|
-
});
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
var _rowIndex = $xetable.getVTRowIndex(row); // 确保任何情况下 rowIndex 都精准指向真实 data 索引
|
|
1091
|
-
var rowIndex = $xetable.getRowIndex(row); // 事件绑定
|
|
1092
|
-
var params = {
|
|
1093
|
-
$table: $xetable,
|
|
1094
|
-
seq: seq,
|
|
1095
|
-
rowid: rowid,
|
|
1096
|
-
row: row,
|
|
1097
|
-
rowIndex: rowIndex,
|
|
1098
|
-
$rowIndex: $rowIndex,
|
|
1099
|
-
_rowIndex: _rowIndex,
|
|
1100
|
-
column: column,
|
|
1101
|
-
columnIndex: columnIndex,
|
|
1102
|
-
$columnIndex: $columnIndex,
|
|
1103
|
-
_columnIndex: _columnIndex,
|
|
1104
|
-
fixed: fixedType,
|
|
1105
|
-
type: renderType,
|
|
1106
|
-
isHidden: fixedHiddenColumn,
|
|
1107
|
-
level: rowLevel,
|
|
1108
|
-
visibleData: afterFullData,
|
|
1109
|
-
data: tableData,
|
|
1110
|
-
items: items,
|
|
1111
|
-
};
|
|
1112
|
-
return params;
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
let TempSoltConstructor = configUtil.Vue.extend(configUtil.CellSlot);
|
|
1116
|
-
|
|
1117
|
-
function vNodeRender(vNodes) {
|
|
1118
|
-
if (vNodes == null) {
|
|
1119
|
-
return null;
|
|
1120
|
-
}
|
|
1121
|
-
let type = typeof vNodes;
|
|
1122
|
-
if (type == "string" || type == "number") {
|
|
1123
|
-
return vNodes;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
let loop = function (item) {
|
|
1127
|
-
if (item && item.children && item.children.length > 0) {
|
|
1128
|
-
let arr = [];
|
|
1129
|
-
item.children.forEach((child) => {
|
|
1130
|
-
let text = loop(child);
|
|
1131
|
-
if (text != null) {
|
|
1132
|
-
arr.push(text);
|
|
1133
|
-
}
|
|
1134
|
-
});
|
|
1135
|
-
return arr.join("");
|
|
1136
|
-
} else {
|
|
1137
|
-
if (item.text != null) {
|
|
1138
|
-
return item.text;
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
};
|
|
1142
|
-
|
|
1143
|
-
let contents = [];
|
|
1144
|
-
let instance;
|
|
1145
|
-
vNodes.forEach(function (vNode) {
|
|
1146
|
-
if (vNode.componentOptions) {
|
|
1147
|
-
// instance = new TempSoltConstructor({i18n: window.$vueRoot._i18n});
|
|
1148
|
-
instance = new TempSoltConstructor();
|
|
1149
|
-
instance.$slots.default = vNode;
|
|
1150
|
-
instance.$mount();
|
|
1151
|
-
let cellValue = "";
|
|
1152
|
-
if (vNode.componentInstance && vNode.componentInstance.$el) {
|
|
1153
|
-
cellValue = domRender(vNode.componentInstance.$el);
|
|
1154
|
-
}
|
|
1155
|
-
contents.push(cellValue);
|
|
1156
|
-
instance = null;
|
|
1157
|
-
} else {
|
|
1158
|
-
if (vNode && vNode.children && vNode.children.length > 0) {
|
|
1159
|
-
let text = loop(vNode);
|
|
1160
|
-
if (text != null) {
|
|
1161
|
-
contents.push(text);
|
|
1162
|
-
}
|
|
1163
|
-
} else {
|
|
1164
|
-
if (vNode.text != null) {
|
|
1165
|
-
contents.push(vNode.text);
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
});
|
|
1170
|
-
return contents.join("").trim();
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
function groupDomRender(dom) {
|
|
1174
|
-
let contents = [];
|
|
1175
|
-
let loop = function (item) {
|
|
1176
|
-
if (item && item.children && item.children.length > 0) {
|
|
1177
|
-
let arr = [];
|
|
1178
|
-
Array.from(item.children).forEach((child) => {
|
|
1179
|
-
let text = loop(child);
|
|
1180
|
-
if (text != null) {
|
|
1181
|
-
arr.push(text);
|
|
1182
|
-
}
|
|
1183
|
-
});
|
|
1184
|
-
return arr.join("");
|
|
1185
|
-
} else {
|
|
1186
|
-
var style = window.getComputedStyle(item); //el即DOM元素
|
|
1187
|
-
let classList = Array.from(item.classList);
|
|
1188
|
-
if (style.display === "none") {
|
|
1189
|
-
} else if (item.nodeName == "INPUT") {
|
|
1190
|
-
if (item.type == "radio") {
|
|
1191
|
-
if (item.checked && classList.includes("el-radio__original")) {
|
|
1192
|
-
let value = item.parentNode.parentNode.innerText || "";
|
|
1193
|
-
if (value) {
|
|
1194
|
-
contents.push(value);
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
} else if (item.type == "checkbox") {
|
|
1198
|
-
if (item.checked && classList.includes("el-checkbox__original")) {
|
|
1199
|
-
let value = item.parentNode.parentNode.innerText || "";
|
|
1200
|
-
if (value) {
|
|
1201
|
-
contents.push(value);
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
};
|
|
1208
|
-
loop(dom);
|
|
1209
|
-
return contents.join(",");
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
function selectGroupRender(dom) {
|
|
1213
|
-
let ul = dom.querySelector(".el-select-dropdown__list");
|
|
1214
|
-
if (ul) {
|
|
1215
|
-
let lis = ul.children;
|
|
1216
|
-
if (lis) {
|
|
1217
|
-
return Array.from(lis)
|
|
1218
|
-
.filter((li) => {
|
|
1219
|
-
let classList = Array.from(li.classList);
|
|
1220
|
-
return classList.includes("selected");
|
|
1221
|
-
})
|
|
1222
|
-
.map((li) => {
|
|
1223
|
-
return li.innerText;
|
|
1224
|
-
})
|
|
1225
|
-
.join(",");
|
|
1226
|
-
} else {
|
|
1227
|
-
return "";
|
|
1228
|
-
}
|
|
1229
|
-
} else {
|
|
1230
|
-
return "";
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
function domRender(dom) {
|
|
1235
|
-
let loop = function (item) {
|
|
1236
|
-
var style = window.getComputedStyle(item); //el即DOM元素
|
|
1237
|
-
let role = item.getAttribute("role");
|
|
1238
|
-
let classList = Array.from(item.classList);
|
|
1239
|
-
|
|
1240
|
-
if (style.display === "none") {
|
|
1241
|
-
return "";
|
|
1242
|
-
} else if (role == "group") {
|
|
1243
|
-
return groupDomRender(item);
|
|
1244
|
-
} else if (role == "radiogroup") {
|
|
1245
|
-
return groupDomRender(item);
|
|
1246
|
-
} else if (
|
|
1247
|
-
classList.includes("el-select")
|
|
1248
|
-
&& item["@@clickoutsideContext"]
|
|
1249
|
-
) {
|
|
1250
|
-
return selectGroupRender(item);
|
|
1251
|
-
} else if (item && item.children && item.children.length > 0) {
|
|
1252
|
-
let arr = [];
|
|
1253
|
-
Array.from(item.children).forEach((child) => {
|
|
1254
|
-
let text = loop(child);
|
|
1255
|
-
if (text != null) {
|
|
1256
|
-
arr.push(text);
|
|
1257
|
-
}
|
|
1258
|
-
});
|
|
1259
|
-
return arr.join("");
|
|
1260
|
-
} else {
|
|
1261
|
-
if (item.nodeName == "INPUT") {
|
|
1262
|
-
return item.value;
|
|
1263
|
-
} else if (item.innerText != null && item.innerText != "") {
|
|
1264
|
-
return item.innerText;
|
|
1265
|
-
} else {
|
|
1266
|
-
return "";
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
};
|
|
1270
|
-
let res = loop(dom).trim();
|
|
1271
|
-
return res;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
modules = {
|
|
1275
|
-
initVxeTable,
|
|
1276
|
-
columnDrop,
|
|
1277
|
-
initOption,
|
|
1278
|
-
getTableJson,
|
|
1279
|
-
addTableJson,
|
|
1280
|
-
onColumnWitchChange,
|
|
1281
|
-
customHandle,
|
|
1282
|
-
changeSelectCount,
|
|
1283
|
-
getTableData,
|
|
1284
|
-
addTableData,
|
|
1285
|
-
checkQueryTotal,
|
|
1286
|
-
getCellValue,
|
|
1287
|
-
createParams,
|
|
1288
|
-
};
|
|
1289
|
-
|
|
1290
|
-
if (!configUtil.Vue.prototype.$vxeTableUtil)
|
|
1291
|
-
configUtil.Vue.prototype.$vxeTableUtil = modules;
|
|
1292
|
-
|
|
1293
|
-
export default modules;
|
|
1
|
+
/**version-1.0*/
|
|
2
|
+
let modules = {};
|
|
3
|
+
import Sortable from "sortablejs";
|
|
4
|
+
import tableConfig from "./config.js";
|
|
5
|
+
import customConfig from "./customConfig.js";
|
|
6
|
+
import Vue from "vue";
|
|
7
|
+
import {extendDeeply} from "../../utils/index.js";
|
|
8
|
+
import corejsConfig from "@/corejsConfig";
|
|
9
|
+
import settingConfig from "@/settings.js";
|
|
10
|
+
import {getCellValue, createParams} from "./util/index";
|
|
11
|
+
|
|
12
|
+
let configUtil = {
|
|
13
|
+
Sortable,
|
|
14
|
+
extendDeeply,
|
|
15
|
+
tableConfig,
|
|
16
|
+
Vue,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function getGrid(that, tableRef) {
|
|
20
|
+
var $grid;
|
|
21
|
+
if (Array.isArray(that.$refs[tableRef])) {
|
|
22
|
+
$grid = that.$refs[tableRef][0];
|
|
23
|
+
} else {
|
|
24
|
+
$grid = that.$refs[tableRef];
|
|
25
|
+
}
|
|
26
|
+
return $grid;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async function initVxeTable(option) {
|
|
30
|
+
let tableName = option.tableName;
|
|
31
|
+
if (
|
|
32
|
+
!configUtil.tableConfig.disableTableName
|
|
33
|
+
&& option.tableNameRequired !== false
|
|
34
|
+
&& !tableName
|
|
35
|
+
&& settingConfig.tableStorageDisabled !== true
|
|
36
|
+
) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
var that = option.vue;
|
|
40
|
+
if (!that.$refs[option.tableRef]) {
|
|
41
|
+
await that.$nextTick();
|
|
42
|
+
}
|
|
43
|
+
var $grid = getGrid(that, option.tableRef);
|
|
44
|
+
if (!$grid) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
delete option.vue;
|
|
48
|
+
|
|
49
|
+
//操作列自动补全
|
|
50
|
+
handleCustomAlign(option);
|
|
51
|
+
|
|
52
|
+
$grid.originOption = that.$baseLodash.cloneDeep(option);
|
|
53
|
+
$grid.originOption.vue = that;
|
|
54
|
+
option.vue = that;
|
|
55
|
+
|
|
56
|
+
var isQueryAllPage = true;
|
|
57
|
+
if (option.isQueryAllPage != null) {
|
|
58
|
+
isQueryAllPage = option.isQueryAllPage;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (tableName) {
|
|
62
|
+
$grid.tableName = tableName;
|
|
63
|
+
if (option.path) {
|
|
64
|
+
await getTableData(that, option.tableRef, "isQueryAllPage", (res1) => {
|
|
65
|
+
let result = res1.objx ? res1.objx.data : null;
|
|
66
|
+
if (result != null) {
|
|
67
|
+
if (result === "false" || result == false) {
|
|
68
|
+
isQueryAllPage = false;
|
|
69
|
+
} else {
|
|
70
|
+
isQueryAllPage = true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
await getTableJson(tableName, that, (resultMsg) => {
|
|
76
|
+
var objx = resultMsg.objx;
|
|
77
|
+
if (objx != null) {
|
|
78
|
+
let jsonStr = objx.data;
|
|
79
|
+
if (jsonStr) {
|
|
80
|
+
let json = JSON.parse(decodeURIComponent(jsonStr));
|
|
81
|
+
let columnData = json.columns ? json.columns : json;
|
|
82
|
+
if (columnData) {
|
|
83
|
+
option.columns = initColumn(option, columnData);
|
|
84
|
+
}
|
|
85
|
+
$grid.searchColumns = initSearchColumns(option, json.searchColumns);
|
|
86
|
+
initExportColumns($grid, json);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (!$grid.searchColumns || !$grid.searchColumns.length) {
|
|
90
|
+
$grid.searchColumns = initSearchColumns(option);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
$grid.searchColumns = initSearchColumns(option);
|
|
95
|
+
}
|
|
96
|
+
if(!!$grid?.$refs?.xTable){
|
|
97
|
+
$grid.$refs.xTable.getCellValue = getCellValue;
|
|
98
|
+
$grid.$refs.xTable.createParams = createParams;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
$grid.getCellValue = getCellValue;
|
|
102
|
+
$grid.createParams = createParams;
|
|
103
|
+
|
|
104
|
+
option.isQueryAllPage = isQueryAllPage;
|
|
105
|
+
let nOption = initOption(option);
|
|
106
|
+
|
|
107
|
+
$grid.isQueryAllPage = isQueryAllPage;
|
|
108
|
+
|
|
109
|
+
if (tableName) {
|
|
110
|
+
nOption.tableName = tableName;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
nOption.vue = that;
|
|
114
|
+
//绑定列位置拖拽
|
|
115
|
+
columnDrop(that, tableName, option.tableRef);
|
|
116
|
+
|
|
117
|
+
//自动绑定toobar
|
|
118
|
+
handleToolbar($grid, option);
|
|
119
|
+
|
|
120
|
+
return nOption;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
//自动绑定toobar
|
|
124
|
+
function handleToolbar($grid, option) {
|
|
125
|
+
let selfConfig = getSelfConfig();
|
|
126
|
+
if (
|
|
127
|
+
option.bindToolbar
|
|
128
|
+
|| (option.bindToolbar !== false && selfConfig.bindToolbar)
|
|
129
|
+
) {
|
|
130
|
+
let loopDo = function (children) {
|
|
131
|
+
if (children && children.length) {
|
|
132
|
+
children.forEach((item) => {
|
|
133
|
+
if (item.$options.name == "VxeToolbar") {
|
|
134
|
+
$grid.connect(item);
|
|
135
|
+
} else {
|
|
136
|
+
loopDo(item.$children);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
that.$nextTick(() => {
|
|
142
|
+
loopDo($grid.$children);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
//操作列自动补全
|
|
148
|
+
function handleCustomAlign(option) {
|
|
149
|
+
let selfConfig = getSelfConfig();
|
|
150
|
+
// let customAlign = option.customAlign || selfConfig.customAlign || "right";
|
|
151
|
+
let customAlign
|
|
152
|
+
= selfConfig.customAlign === false
|
|
153
|
+
? false
|
|
154
|
+
: selfConfig.customAlign || "right";
|
|
155
|
+
customAlign
|
|
156
|
+
= option.customAlign === false ? false : option.customAlign || customAlign;
|
|
157
|
+
|
|
158
|
+
let customColumnWidth
|
|
159
|
+
= option.customColumnWidth || selfConfig.customColumnWidth || 47;
|
|
160
|
+
let checkBoxColumnWidth
|
|
161
|
+
= option.checkBoxColumnWidth || selfConfig.checkBoxColumnWidth || 48;
|
|
162
|
+
|
|
163
|
+
let checkBoxRequired = selfConfig.checkBoxRequired !== false;
|
|
164
|
+
if (option.checkBoxRequired === false) {
|
|
165
|
+
checkBoxRequired = false;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
let columnSize = option.columns.length;
|
|
169
|
+
if (columnSize > 0) {
|
|
170
|
+
if (checkBoxRequired) {
|
|
171
|
+
let firstColumn = option.columns[0];
|
|
172
|
+
if (firstColumn.type != "checkbox") {
|
|
173
|
+
option.columns.splice(0, 0, {
|
|
174
|
+
type: "checkbox",
|
|
175
|
+
width: checkBoxColumnWidth,
|
|
176
|
+
resizable: false,
|
|
177
|
+
fixed: "left",
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (customAlign !== false) {
|
|
182
|
+
let lastColumn = option.columns[columnSize - 1];
|
|
183
|
+
if (customAlign == "left") {
|
|
184
|
+
if (!lastColumn.field && lastColumn.fixed == "right") {
|
|
185
|
+
option.columns.splice(columnSize - 1, 1);
|
|
186
|
+
lastColumn.fixed = "left";
|
|
187
|
+
option.columns.splice(1, 0, lastColumn);
|
|
188
|
+
} else if (columnSize > 1) {
|
|
189
|
+
if (option.columns[1].field) {
|
|
190
|
+
option.columns.splice(1, 0, {
|
|
191
|
+
width: customColumnWidth,
|
|
192
|
+
fixed: "left",
|
|
193
|
+
title: "",
|
|
194
|
+
sortable: false,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
} else if (customAlign == "right") {
|
|
199
|
+
let column1 = option.columns[1];
|
|
200
|
+
if (!column1.field && column1.fixed == "left") {
|
|
201
|
+
option.columns.splice(1, 1);
|
|
202
|
+
column1.fixed = "right";
|
|
203
|
+
option.columns.push(column1);
|
|
204
|
+
} else if (lastColumn.field || lastColumn.fixed != "right") {
|
|
205
|
+
option.columns.push({
|
|
206
|
+
width: customColumnWidth,
|
|
207
|
+
fixed: "right",
|
|
208
|
+
title: "",
|
|
209
|
+
sortable: false,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
//列位置拖拽
|
|
218
|
+
function columnDrop(t, tableName, tableRef) {
|
|
219
|
+
var that = t;
|
|
220
|
+
const $table = getGrid(that, tableRef);
|
|
221
|
+
if (!$table) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if ($table.sortable) {
|
|
225
|
+
$table.sortable.destroy();
|
|
226
|
+
}
|
|
227
|
+
$table.sortable = configUtil.Sortable.create(
|
|
228
|
+
$table.$el.querySelector(
|
|
229
|
+
".body--wrapper>.vxe-table--header .vxe-header--row"
|
|
230
|
+
),
|
|
231
|
+
{
|
|
232
|
+
handle: ".vxe-header--column:not(.col--fixed)",
|
|
233
|
+
onEnd: ({item, newIndex, oldIndex}) => {
|
|
234
|
+
const {fullColumn, tableColumn} = $table.getTableColumn();
|
|
235
|
+
const targetThElem = item;
|
|
236
|
+
const wrapperElem = targetThElem.parentNode;
|
|
237
|
+
const newColumn = fullColumn[newIndex];
|
|
238
|
+
if (newColumn.fixed) {
|
|
239
|
+
// 错误的移动
|
|
240
|
+
if (newIndex > oldIndex) {
|
|
241
|
+
wrapperElem.insertBefore(
|
|
242
|
+
targetThElem,
|
|
243
|
+
wrapperElem.children[oldIndex]
|
|
244
|
+
);
|
|
245
|
+
} else {
|
|
246
|
+
wrapperElem.insertBefore(
|
|
247
|
+
wrapperElem.children[oldIndex],
|
|
248
|
+
targetThElem
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
return;
|
|
252
|
+
/* return that.$XModal.message({
|
|
253
|
+
content: '固定列不允许拖动!',
|
|
254
|
+
status: 'error'
|
|
255
|
+
}) */
|
|
256
|
+
}
|
|
257
|
+
// 转换真实索引
|
|
258
|
+
const oldColumnIndex = $table.getColumnIndex(tableColumn[oldIndex]);
|
|
259
|
+
const newColumnIndex = $table.getColumnIndex(tableColumn[newIndex]);
|
|
260
|
+
// 移动到目标列
|
|
261
|
+
const currRow = fullColumn.splice(oldColumnIndex, 1)[0];
|
|
262
|
+
fullColumn.splice(newColumnIndex, 0, currRow);
|
|
263
|
+
|
|
264
|
+
$table.loadColumn(fullColumn);
|
|
265
|
+
addTableJson(that, $table, tableName, fullColumn);
|
|
266
|
+
},
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function getSelfConfig() {
|
|
272
|
+
let tableConfig = configUtil.tableConfig || {};
|
|
273
|
+
let selfConfig = tableConfig.selfConfig || {};
|
|
274
|
+
return selfConfig;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function initColumnDefaulAttrs(columns, opts) {
|
|
278
|
+
if (opts.sortAll == true || (opts.sortAll !== false && !opts.treeNodeUrl)) {
|
|
279
|
+
for (let i = 0; i < columns.length; i++) {
|
|
280
|
+
if (columns[i].title && columns[i].sortable == null) {
|
|
281
|
+
columns[i].sortable = true;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
let tableConfig = configUtil.tableConfig || {};
|
|
287
|
+
let selfConfig = getSelfConfig();
|
|
288
|
+
if (opts.filterType !== false && !opts.treeNodeUrl) {
|
|
289
|
+
let filterType
|
|
290
|
+
= opts.filterType || selfConfig.filterType || "filterContent";
|
|
291
|
+
if (filterType) {
|
|
292
|
+
columns.forEach((column) => {
|
|
293
|
+
if (column.title && column.field) {
|
|
294
|
+
if (
|
|
295
|
+
column.filterType == "filterContent"
|
|
296
|
+
|| (column.filterType == null && filterType == "filterContent")
|
|
297
|
+
) {
|
|
298
|
+
if (!column.filters) {
|
|
299
|
+
column.filters = [
|
|
300
|
+
{
|
|
301
|
+
data: {},
|
|
302
|
+
},
|
|
303
|
+
];
|
|
304
|
+
}
|
|
305
|
+
if (!column.filterRender) {
|
|
306
|
+
column.filterRender = {
|
|
307
|
+
name: "FilterContent",
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
} else if (
|
|
311
|
+
column.filterType === "filterInput"
|
|
312
|
+
|| (column.filterType == null && filterType == "filterInput")
|
|
313
|
+
) {
|
|
314
|
+
if (!column.filters) {
|
|
315
|
+
column.filters = [
|
|
316
|
+
{
|
|
317
|
+
data: "",
|
|
318
|
+
},
|
|
319
|
+
];
|
|
320
|
+
}
|
|
321
|
+
if (!column.filterRender) {
|
|
322
|
+
column.filterRender = {
|
|
323
|
+
name: "FilterInput",
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
//设置复选框列的锁定宽度
|
|
333
|
+
if (opts.lockCheckboxWidth !== false) {
|
|
334
|
+
let lockCheckboxWidth
|
|
335
|
+
= opts.lockCheckboxWidth || selfConfig.lockCheckboxWidth;
|
|
336
|
+
if (lockCheckboxWidth) {
|
|
337
|
+
columns.forEach((column) => {
|
|
338
|
+
if (column.type == "checkbox") {
|
|
339
|
+
column.width = lockCheckboxWidth;
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
function initOption(opts) {
|
|
347
|
+
let result = {};
|
|
348
|
+
var that = opts.vue;
|
|
349
|
+
var $grid = getGrid(that, opts.tableRef);
|
|
350
|
+
|
|
351
|
+
let path = opts.path || "";
|
|
352
|
+
// let columns = JSON.parse(JSON.stringify(opts.columns || []));
|
|
353
|
+
let columns = opts.columns || [];
|
|
354
|
+
let isQueryAllPage = opts.isQueryAllPage;
|
|
355
|
+
var pagerLayouts = getPagerConfigLayouts(opts);
|
|
356
|
+
|
|
357
|
+
let config = opts.config || {};
|
|
358
|
+
|
|
359
|
+
initColumnDefaulAttrs(columns, opts);
|
|
360
|
+
/*if (opts.sortAll == true || (opts.sortAll !== false && !opts.treeNodeUrl)) {
|
|
361
|
+
for (let i = 0; i < columns.length; i++) {
|
|
362
|
+
if (columns[i].title && columns[i].sortable == null) {
|
|
363
|
+
columns[i].sortable = true;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
let tableConfig = configUtil.tableConfig || {};
|
|
369
|
+
let selfConfig = getSelfConfig();
|
|
370
|
+
if (opts.filterType !== false && !opts.treeNodeUrl) {
|
|
371
|
+
let filterType
|
|
372
|
+
= opts.filterType || selfConfig.filterType || "filterContent";
|
|
373
|
+
if (filterType) {
|
|
374
|
+
columns.forEach((column) => {
|
|
375
|
+
if (column.title && column.field) {
|
|
376
|
+
if (
|
|
377
|
+
column.filterType == "filterContent"
|
|
378
|
+
|| (column.filterType == null && filterType == "filterContent")
|
|
379
|
+
) {
|
|
380
|
+
if (!column.filters) {
|
|
381
|
+
column.filters = [
|
|
382
|
+
{
|
|
383
|
+
data: {},
|
|
384
|
+
},
|
|
385
|
+
];
|
|
386
|
+
}
|
|
387
|
+
if (!column.filterRender) {
|
|
388
|
+
column.filterRender = {
|
|
389
|
+
name: "FilterContent",
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
} else if (
|
|
393
|
+
column.filterType === "filterInput"
|
|
394
|
+
|| (column.filterType == null && filterType == "filterInput")
|
|
395
|
+
) {
|
|
396
|
+
if (!column.filters) {
|
|
397
|
+
column.filters = [
|
|
398
|
+
{
|
|
399
|
+
data: "",
|
|
400
|
+
},
|
|
401
|
+
];
|
|
402
|
+
}
|
|
403
|
+
if (!column.filterRender) {
|
|
404
|
+
column.filterRender = {
|
|
405
|
+
name: "FilterInput",
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
//设置复选框列的锁定宽度
|
|
415
|
+
if (opts.lockCheckboxWidth !== false) {
|
|
416
|
+
let lockCheckboxWidth = opts.lockCheckboxWidth || selfConfig.lockCheckboxWidth;
|
|
417
|
+
if (lockCheckboxWidth) {
|
|
418
|
+
columns.forEach((column) => {
|
|
419
|
+
if (column.type == 'checkbox') {
|
|
420
|
+
column.width = lockCheckboxWidth;
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}*/
|
|
425
|
+
|
|
426
|
+
let defaultOptions = {
|
|
427
|
+
columnKey: true,
|
|
428
|
+
resizable: true,
|
|
429
|
+
showOverflow: true,
|
|
430
|
+
showHeaderOverflow: true,
|
|
431
|
+
showFooterOverflow: true,
|
|
432
|
+
highlightHoverRow: true,
|
|
433
|
+
border: "inner",
|
|
434
|
+
height: "auto",
|
|
435
|
+
// maxHeight:"1000px",
|
|
436
|
+
// rowId: 'id',
|
|
437
|
+
emptyText: " ",
|
|
438
|
+
sortConfig: {
|
|
439
|
+
trigger: "cell",
|
|
440
|
+
remote: false,
|
|
441
|
+
},
|
|
442
|
+
filterConfig: {
|
|
443
|
+
remote: false,
|
|
444
|
+
},
|
|
445
|
+
pagerConfig: {
|
|
446
|
+
autoHidden: true,
|
|
447
|
+
perfect: true,
|
|
448
|
+
pageSize: 200,
|
|
449
|
+
pageSizes: [50, 100, 200, 500],
|
|
450
|
+
layouts: pagerLayouts,
|
|
451
|
+
slots: {
|
|
452
|
+
left: (obj, b, c) => {
|
|
453
|
+
var $grid = obj.$grid;
|
|
454
|
+
let k = $grid.$data;
|
|
455
|
+
let tableDataInfo = $grid.getTableData();
|
|
456
|
+
let data = tableDataInfo.fullData;
|
|
457
|
+
let h = $grid.$createElement;
|
|
458
|
+
|
|
459
|
+
let proxyInfo = $grid.getProxyInfo();
|
|
460
|
+
let pager = proxyInfo ? proxyInfo.pager : null;
|
|
461
|
+
|
|
462
|
+
let celems = [
|
|
463
|
+
h("span", $grid.$t2("本页记录数", "components.table.currentNum")),
|
|
464
|
+
h(
|
|
465
|
+
"span",
|
|
466
|
+
{
|
|
467
|
+
attrs: {
|
|
468
|
+
class: "f-red",
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
" " + tableDataInfo.visibleData.length + " "
|
|
472
|
+
),
|
|
473
|
+
];
|
|
474
|
+
if (pager && $grid.isQueryAllPage) {
|
|
475
|
+
celems.push(
|
|
476
|
+
h(
|
|
477
|
+
"span",
|
|
478
|
+
"," + $grid.$t2("总记录数", "components.table.totalNum")
|
|
479
|
+
)
|
|
480
|
+
);
|
|
481
|
+
celems.push(
|
|
482
|
+
h(
|
|
483
|
+
"span",
|
|
484
|
+
{
|
|
485
|
+
attrs: {
|
|
486
|
+
class: "f-red",
|
|
487
|
+
},
|
|
488
|
+
},
|
|
489
|
+
" " + pager.total + " "
|
|
490
|
+
)
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
let elem = h("span", {}, celems);
|
|
494
|
+
return [elem];
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
exportConfig: {
|
|
499
|
+
// 默认选中类型
|
|
500
|
+
type: "xlsx",
|
|
501
|
+
// 局部自定义类型
|
|
502
|
+
types: ["xlsx", "csv", "html", "xml", "txt"],
|
|
503
|
+
// 自定义数据量列表
|
|
504
|
+
modes: ["current", "all"],
|
|
505
|
+
},
|
|
506
|
+
radioConfig: {
|
|
507
|
+
labelField: "id",
|
|
508
|
+
reserve: true,
|
|
509
|
+
highlight: true,
|
|
510
|
+
},
|
|
511
|
+
checkboxConfig: {
|
|
512
|
+
highlight: true,
|
|
513
|
+
},
|
|
514
|
+
customConfig: {
|
|
515
|
+
storage: false,
|
|
516
|
+
},
|
|
517
|
+
scrollX: {
|
|
518
|
+
// enabled: true,
|
|
519
|
+
gt: 10,
|
|
520
|
+
// oSize: 5
|
|
521
|
+
},
|
|
522
|
+
/*loadingConfig: {
|
|
523
|
+
icon: "vxe-loading--spinner",
|
|
524
|
+
text: ' '
|
|
525
|
+
},*/
|
|
526
|
+
columns: columns,
|
|
527
|
+
};
|
|
528
|
+
let tableDefaultConfig
|
|
529
|
+
= corejsConfig?.componentConfig?.table?.defaultConfig || {};
|
|
530
|
+
defaultOptions = configUtil.extendDeeply(defaultOptions, tableConfig);
|
|
531
|
+
defaultOptions = configUtil.extendDeeply(defaultOptions, customConfig);
|
|
532
|
+
defaultOptions = configUtil.extendDeeply(defaultOptions, tableDefaultConfig);
|
|
533
|
+
|
|
534
|
+
if (opts.path) {
|
|
535
|
+
// defaultOptions.filterInput = true;
|
|
536
|
+
defaultOptions.pagerConfig.autoHidden = false;
|
|
537
|
+
defaultOptions.proxyConfig = {
|
|
538
|
+
seq: true, // 启用动态序号代理
|
|
539
|
+
sort: true, // 启用排序代理
|
|
540
|
+
filter: true, // 启用筛选代理
|
|
541
|
+
props: {
|
|
542
|
+
result: "objx.records", // 配置响应结果列表字段
|
|
543
|
+
total: "objx.total", // 配置响应结果总页数字段
|
|
544
|
+
},
|
|
545
|
+
ajax: {
|
|
546
|
+
// 接收 Promise 对象
|
|
547
|
+
query: ({page, sorts, filters, form}) => {
|
|
548
|
+
if (!opts.path) {
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
return new Promise((resolve, reject) => {
|
|
552
|
+
let toDo = () => {
|
|
553
|
+
let formData = opts.param ? opts.param() || {} : {};
|
|
554
|
+
const queryParams = Object.assign({}, formData);
|
|
555
|
+
|
|
556
|
+
// 处理排序条件
|
|
557
|
+
/*const firstSort = sorts[0];
|
|
558
|
+
if (firstSort) {
|
|
559
|
+
queryParams.sort = firstSort.property;
|
|
560
|
+
queryParams.order = firstSort.order;
|
|
561
|
+
}*/
|
|
562
|
+
// 处理筛选条件
|
|
563
|
+
filters.forEach(({property, values}) => {
|
|
564
|
+
queryParams[property] = values.join(",");
|
|
565
|
+
});
|
|
566
|
+
if (page.pageSize !== undefined) {
|
|
567
|
+
queryParams["size"] = page.pageSize;
|
|
568
|
+
queryParams["current"] = page.currentPage;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
var $grid = getGrid(that, opts.tableRef);
|
|
572
|
+
let isQueryAllPage = $grid.isQueryAllPage;
|
|
573
|
+
let pathStr1 = "";
|
|
574
|
+
if (isQueryAllPage === false) {
|
|
575
|
+
queryParams.searchCount = false;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
var reqPath = typeof path == "function" ? path() : path;
|
|
579
|
+
let addUserForTableEnabled
|
|
580
|
+
= settingConfig.addUserForTableDisabled !== true;
|
|
581
|
+
let addCreateInfo
|
|
582
|
+
= opts.addCreateInfo === true || addUserForTableEnabled;
|
|
583
|
+
let queryCreateInfo
|
|
584
|
+
= opts.queryCreateInfo === true || addUserForTableEnabled;
|
|
585
|
+
that.$commonHttp({
|
|
586
|
+
aes: opts.aes || false,
|
|
587
|
+
url: reqPath,
|
|
588
|
+
method: "post",
|
|
589
|
+
data: queryParams,
|
|
590
|
+
addCreateInfo: addCreateInfo,
|
|
591
|
+
queryCreateInfo: queryCreateInfo,
|
|
592
|
+
callback: (res) => {
|
|
593
|
+
resolve(res);
|
|
594
|
+
if (res.type == "success") {
|
|
595
|
+
let rows = res.objx
|
|
596
|
+
? res.objx.records || res.objx || []
|
|
597
|
+
: [];
|
|
598
|
+
if (opts.treeNodeUrl) {
|
|
599
|
+
if (rows.length > 0) {
|
|
600
|
+
let $t = getGrid(that, opts.tableRef);
|
|
601
|
+
var treeConditions = $t.originOption.treeConditions || [
|
|
602
|
+
"enabled",
|
|
603
|
+
];
|
|
604
|
+
let treeFiled = Object.keys(formData).some((key) => {
|
|
605
|
+
return (
|
|
606
|
+
!treeConditions.includes(key)
|
|
607
|
+
&& formData[key] != null
|
|
608
|
+
&& formData[key] != ""
|
|
609
|
+
);
|
|
610
|
+
});
|
|
611
|
+
if (treeFiled) {
|
|
612
|
+
that.$nextTick(() => {
|
|
613
|
+
setTimeout(function () {
|
|
614
|
+
let isLazy = $t.treeConfig.lazy;
|
|
615
|
+
$t.treeConfig.lazy = false;
|
|
616
|
+
$t.setAllTreeExpand(true).then(() => {
|
|
617
|
+
let fullAllDataRowMap
|
|
618
|
+
= $t.$refs.xTable.fullAllDataRowMap;
|
|
619
|
+
let fullData = $t.getTableData().fullData;
|
|
620
|
+
fullData.forEach((lineData) => {
|
|
621
|
+
if (
|
|
622
|
+
$t.$refs.xTable.isTreeExpandByRow(lineData)
|
|
623
|
+
) {
|
|
624
|
+
var rest = fullAllDataRowMap.get(lineData);
|
|
625
|
+
rest.treeLoaded = true;
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
$t.treeConfig.lazy = isLazy;
|
|
629
|
+
});
|
|
630
|
+
}, 0);
|
|
631
|
+
});
|
|
632
|
+
} else {
|
|
633
|
+
let row = rows[0];
|
|
634
|
+
if (row[result.treeConfig.hasChild]) {
|
|
635
|
+
that.$nextTick(() => {
|
|
636
|
+
setTimeout(function () {
|
|
637
|
+
$t.setTreeExpand(row, true);
|
|
638
|
+
}, 0);
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
if (opts.callback) {
|
|
645
|
+
that.$nextTick(() => {
|
|
646
|
+
setTimeout(function () {
|
|
647
|
+
opts.callback(rows);
|
|
648
|
+
}, 0);
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
error: (error) => {
|
|
654
|
+
reject(error);
|
|
655
|
+
},
|
|
656
|
+
});
|
|
657
|
+
};
|
|
658
|
+
let index = 0;
|
|
659
|
+
let loopHandle = () => {
|
|
660
|
+
if (index < 500 && $grid.tableFormStop === true) {
|
|
661
|
+
//阻塞列表查询,或者次数达到500时,自动释放
|
|
662
|
+
index++;
|
|
663
|
+
setTimeout(() => {
|
|
664
|
+
loopHandle();
|
|
665
|
+
}, 10);
|
|
666
|
+
} else {
|
|
667
|
+
if ($grid.tableFormStop) $grid.tableFormStop = false;
|
|
668
|
+
toDo();
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
loopHandle();
|
|
672
|
+
});
|
|
673
|
+
},
|
|
674
|
+
// 被某些特殊功能所触发,例如:导出数据 mode=all 时,会触发该方法并对返回的数据进行导出
|
|
675
|
+
queryAll: () => fetch(path || "").then((response) => response.json()),
|
|
676
|
+
},
|
|
677
|
+
};
|
|
678
|
+
/*defaultOptions.scrollX = {
|
|
679
|
+
enabled: true,
|
|
680
|
+
gt: 20
|
|
681
|
+
};*/
|
|
682
|
+
defaultOptions.scrollY = {
|
|
683
|
+
// enabled: false,
|
|
684
|
+
gt: 20,
|
|
685
|
+
oSize: 20,
|
|
686
|
+
};
|
|
687
|
+
} else {
|
|
688
|
+
if (!$grid.height && (!opts.config || !opts.config.height)) {
|
|
689
|
+
defaultOptions.maxHeight = "528px";
|
|
690
|
+
}
|
|
691
|
+
defaultOptions.scrollY = {
|
|
692
|
+
// enabled: false,
|
|
693
|
+
gt: 20,
|
|
694
|
+
oSize: 20,
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
if (opts.editSaveUrl) {
|
|
699
|
+
(defaultOptions.keepSource = true),
|
|
700
|
+
(defaultOptions.editConfig = {
|
|
701
|
+
trigger: "manual",
|
|
702
|
+
mode: "row",
|
|
703
|
+
showStatus: true,
|
|
704
|
+
autoClear: false,
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
if (opts.treeNodeUrl) {
|
|
708
|
+
defaultOptions.proxyConfig.props.result = "objx";
|
|
709
|
+
defaultOptions.pagerConfig.autoHidden = true;
|
|
710
|
+
defaultOptions.treeConfig = {
|
|
711
|
+
lazy: true,
|
|
712
|
+
children: "children",
|
|
713
|
+
hasChild: "hasChild", // 设置是否有子节点标识
|
|
714
|
+
parentField: "parent",
|
|
715
|
+
transform: true,
|
|
716
|
+
loadMethod({$table, row}) {
|
|
717
|
+
// 模拟后台接口
|
|
718
|
+
return new Promise((resolve, reject) => {
|
|
719
|
+
let treeNodeParam = opts.treeNodeParam
|
|
720
|
+
? opts.treeNodeParam(row) || {}
|
|
721
|
+
: {
|
|
722
|
+
parent: row.id,
|
|
723
|
+
};
|
|
724
|
+
that.$http({
|
|
725
|
+
aes: opts.aes || false,
|
|
726
|
+
url: opts.treeNodeUrl,
|
|
727
|
+
method: "post",
|
|
728
|
+
data: treeNodeParam,
|
|
729
|
+
callback: (res) => {
|
|
730
|
+
if (res.type == "success") {
|
|
731
|
+
// let rows = res.objx || [];
|
|
732
|
+
let rows = res.objx ? res.objx.records || res.objx || [] : [];
|
|
733
|
+
let hasChildField = $grid.treeConfig.hasChild;
|
|
734
|
+
if (row[hasChildField] && !rows.length) {
|
|
735
|
+
row[hasChildField] = false;
|
|
736
|
+
}
|
|
737
|
+
resolve(rows);
|
|
738
|
+
if (opts.treeCallback) {
|
|
739
|
+
that.$nextTick(() => {
|
|
740
|
+
setTimeout(function () {
|
|
741
|
+
opts.treeCallback(rows);
|
|
742
|
+
}, 0);
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
} else {
|
|
746
|
+
reject(res);
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
},
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
result = configUtil.extendDeeply(defaultOptions, config);
|
|
756
|
+
|
|
757
|
+
let pageSize = result.pagerConfig.pageSize;
|
|
758
|
+
let pageSizes = result.pagerConfig.pageSizes;
|
|
759
|
+
if (pageSizes && !pageSizes.includes(pageSize)) {
|
|
760
|
+
for (let i = 0; i < pageSizes.length; i++) {
|
|
761
|
+
let item = pageSizes[i];
|
|
762
|
+
if (item > pageSize) {
|
|
763
|
+
pageSizes.splice(i, 0, pageSize);
|
|
764
|
+
break;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
return result;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
function getTableJson(tableName, that, success) {
|
|
773
|
+
if (
|
|
774
|
+
configUtil.tableConfig.disableTableName
|
|
775
|
+
|| settingConfig.tableStorageDisabled
|
|
776
|
+
)
|
|
777
|
+
return false;
|
|
778
|
+
if (!tableName) return;
|
|
779
|
+
var url = USER_PREFIX + "/table_column/getTableJson";
|
|
780
|
+
var data = {
|
|
781
|
+
tableName: tableName,
|
|
782
|
+
};
|
|
783
|
+
var json = null;
|
|
784
|
+
return that.$http({
|
|
785
|
+
url: url,
|
|
786
|
+
method: "post",
|
|
787
|
+
data: data,
|
|
788
|
+
success: success,
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
function addTableExportJson() {
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
function addTableJson(that, $grid, tableName, columns, success) {
|
|
796
|
+
if (
|
|
797
|
+
configUtil.tableConfig.disableTableName
|
|
798
|
+
|| settingConfig.tableStorageDisabled
|
|
799
|
+
)
|
|
800
|
+
return false;
|
|
801
|
+
if (!tableName) return;
|
|
802
|
+
if (!columns) {
|
|
803
|
+
columns = $grid.getTableColumn().fullColumn;
|
|
804
|
+
}
|
|
805
|
+
let saveColumn = [];
|
|
806
|
+
columns.forEach(function (item, index) {
|
|
807
|
+
saveColumn.push({
|
|
808
|
+
field: item.field || item.property,
|
|
809
|
+
title: item.title,
|
|
810
|
+
visible: item.visible,
|
|
811
|
+
width: item.renderWidth || item.width,
|
|
812
|
+
});
|
|
813
|
+
});
|
|
814
|
+
|
|
815
|
+
let searchColumns = $grid.searchColumns || [];
|
|
816
|
+
let jsonData = {
|
|
817
|
+
columns: saveColumn,
|
|
818
|
+
searchColumns: searchColumns,
|
|
819
|
+
};
|
|
820
|
+
if ($grid.exportColumns && $grid.exportColumns.length) {
|
|
821
|
+
jsonData.exportColumns = $grid.exportColumns;
|
|
822
|
+
}
|
|
823
|
+
let json = encodeURIComponent(JSON.stringify(jsonData));
|
|
824
|
+
|
|
825
|
+
var url = USER_PREFIX + "/table_column/addTableJson";
|
|
826
|
+
var data = {
|
|
827
|
+
tableName: tableName,
|
|
828
|
+
// json: encodeURIComponent(JSON.stringify(saveColumn)),
|
|
829
|
+
json: json,
|
|
830
|
+
};
|
|
831
|
+
that.$http({
|
|
832
|
+
url: url,
|
|
833
|
+
method: "post",
|
|
834
|
+
data: data,
|
|
835
|
+
success: success,
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
function initColumn(option, syncColumns) {
|
|
840
|
+
let oldColumns = option.columns;
|
|
841
|
+
let newColumns = [];
|
|
842
|
+
if (syncColumns) {
|
|
843
|
+
let fields = [];
|
|
844
|
+
syncColumns.forEach(function (syncColumn) {
|
|
845
|
+
let field = syncColumn.field;
|
|
846
|
+
if (field) {
|
|
847
|
+
oldColumns.some(function (oldColumn) {
|
|
848
|
+
let flag = oldColumn.field === field;
|
|
849
|
+
if (flag) {
|
|
850
|
+
let visibleSync
|
|
851
|
+
= option.visibleSync !== false && oldColumn.visibleSync !== false;
|
|
852
|
+
if (visibleSync) {
|
|
853
|
+
oldColumn.visible = syncColumn.visible;
|
|
854
|
+
}
|
|
855
|
+
if (syncColumn.width) oldColumn.width = syncColumn.width;
|
|
856
|
+
newColumns.push(oldColumn);
|
|
857
|
+
fields.push(field);
|
|
858
|
+
}
|
|
859
|
+
return flag;
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
oldColumns.forEach(function (oldColumn, index) {
|
|
864
|
+
let field = oldColumn.field;
|
|
865
|
+
if (field) {
|
|
866
|
+
if (!fields.includes(field)) {
|
|
867
|
+
newColumns.splice(index, 0, oldColumn);
|
|
868
|
+
}
|
|
869
|
+
} else {
|
|
870
|
+
newColumns.splice(index, 0, oldColumn);
|
|
871
|
+
}
|
|
872
|
+
});
|
|
873
|
+
} else {
|
|
874
|
+
newColumns = oldColumns;
|
|
875
|
+
}
|
|
876
|
+
return newColumns;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
function initExportColumns($grid, json) {
|
|
880
|
+
if (json?.exportColumns?.length) {
|
|
881
|
+
$grid.exportColumns = json.exportColumns;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
function initSearchColumns(option, syncColumns) {
|
|
886
|
+
let oldColumns = option.searchColumns || [];
|
|
887
|
+
let newColumns = [];
|
|
888
|
+
if (syncColumns) {
|
|
889
|
+
let fields = [];
|
|
890
|
+
syncColumns.forEach(function (syncColumn) {
|
|
891
|
+
let field = syncColumn.field;
|
|
892
|
+
if (field) {
|
|
893
|
+
oldColumns.some(function (oldColumn) {
|
|
894
|
+
let flag = oldColumn.field === field && !oldColumn.fixed;
|
|
895
|
+
if (flag) {
|
|
896
|
+
oldColumn.common = syncColumn.common || false;
|
|
897
|
+
if (syncColumn.defaultValue !== undefined) {
|
|
898
|
+
oldColumn.defaultValue = syncColumn.defaultValue;
|
|
899
|
+
}
|
|
900
|
+
newColumns.push(oldColumn);
|
|
901
|
+
fields.push(field);
|
|
902
|
+
}
|
|
903
|
+
return flag;
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
oldColumns.forEach(function (oldColumn, index) {
|
|
908
|
+
let field = oldColumn.field;
|
|
909
|
+
if (field && !oldColumn.fixed) {
|
|
910
|
+
if (!fields.includes(field)) {
|
|
911
|
+
newColumns.splice(index, 0, oldColumn);
|
|
912
|
+
}
|
|
913
|
+
} else {
|
|
914
|
+
newColumns.splice(index, 0, oldColumn);
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
} else {
|
|
918
|
+
newColumns = oldColumns;
|
|
919
|
+
}
|
|
920
|
+
return newColumns.length ? newColumns : oldColumns;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
function onColumnWitchChange(option) {
|
|
924
|
+
var that = option.$grid.$parent;
|
|
925
|
+
var $grid = option.$grid;
|
|
926
|
+
var originOption = $grid.originOption;
|
|
927
|
+
let tableName = originOption.tableName;
|
|
928
|
+
if (tableName) {
|
|
929
|
+
// let columns = $grid.columns;
|
|
930
|
+
const {fullColumn, tableColumn} = $grid.getTableColumn();
|
|
931
|
+
addTableJson(that, $grid, tableName);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
function customHandle(option) {
|
|
936
|
+
let that = option.$grid.$parent;
|
|
937
|
+
let $grid = option.$grid;
|
|
938
|
+
var originOption = $grid.originOption;
|
|
939
|
+
if (option.type == "confirm" || option.type == "reset") {
|
|
940
|
+
let tableName = originOption.tableName;
|
|
941
|
+
if (option.type == "reset") {
|
|
942
|
+
let columns = that.$baseLodash.cloneDeep(originOption.columns);
|
|
943
|
+
initColumnDefaulAttrs(columns, originOption);
|
|
944
|
+
$grid.columns = columns;
|
|
945
|
+
// $grid.columns = originOption.columns;
|
|
946
|
+
}
|
|
947
|
+
if (tableName) {
|
|
948
|
+
setTimeout(() => {
|
|
949
|
+
const {fullColumn, tableColumn} = $grid.getTableColumn();
|
|
950
|
+
addTableJson(that, $grid, tableName);
|
|
951
|
+
}, 200);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
if (option && option.$event && option.$event.preventDefault) {
|
|
955
|
+
option.$event.preventDefault(); // 取消事件的默认行为
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
originOption.customCallback && originOption.customCallback(option);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
function changeSelectCount(checked) {
|
|
962
|
+
var checkedLength = checked.records.length;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
function getTableData(that, tableRef, type, success) {
|
|
966
|
+
if (
|
|
967
|
+
configUtil.tableConfig.disableTableName
|
|
968
|
+
|| settingConfig.tableStorageDisabled
|
|
969
|
+
)
|
|
970
|
+
return false;
|
|
971
|
+
var $grid = getGrid(that, tableRef);
|
|
972
|
+
var tableName = $grid.tableName;
|
|
973
|
+
var url = USER_PREFIX + "/table_column/getTableData";
|
|
974
|
+
var param = {
|
|
975
|
+
tableName: tableName,
|
|
976
|
+
type: type,
|
|
977
|
+
};
|
|
978
|
+
var data = null;
|
|
979
|
+
return that.$http({
|
|
980
|
+
async: false,
|
|
981
|
+
url: url,
|
|
982
|
+
method: "post",
|
|
983
|
+
data: param,
|
|
984
|
+
success: success,
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
function addTableData(that, tableRef, value, success) {
|
|
989
|
+
if (
|
|
990
|
+
configUtil.tableConfig.disableTableName
|
|
991
|
+
|| settingConfig.tableStorageDisabled
|
|
992
|
+
)
|
|
993
|
+
return false;
|
|
994
|
+
var $grid = getGrid(that, tableRef);
|
|
995
|
+
var tableName = $grid.tableName;
|
|
996
|
+
if (tableName) {
|
|
997
|
+
that.$http({
|
|
998
|
+
method: "post",
|
|
999
|
+
url: USER_PREFIX + "/table_column/addTableData",
|
|
1000
|
+
data: {
|
|
1001
|
+
tableName: tableName,
|
|
1002
|
+
type: "isQueryAllPage",
|
|
1003
|
+
data: value,
|
|
1004
|
+
success: success,
|
|
1005
|
+
},
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
function checkQueryTotal(that, tableRef, value) {
|
|
1011
|
+
var $grid = getGrid(that, tableRef);
|
|
1012
|
+
$grid.isQueryAllPage = value;
|
|
1013
|
+
var tableName = $grid.tableName;
|
|
1014
|
+
var option = $grid.getProxyInfo();
|
|
1015
|
+
var pagerConfig = $grid.pagerConfig;
|
|
1016
|
+
|
|
1017
|
+
$grid.pagerConfig.layouts = pagerConfig.layouts || [];
|
|
1018
|
+
addTableData(that, tableRef, value);
|
|
1019
|
+
$grid.commitProxy("query");
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
function getPagerConfigLayouts(opts) {
|
|
1023
|
+
if (opts.showPageSizes !== false) {
|
|
1024
|
+
return ["Sizes", "PrevPage", "JumpNumber", "NextPage"];
|
|
1025
|
+
} else {
|
|
1026
|
+
return ["PrevPage", "JumpNumber", "NextPage"];
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
modules = {
|
|
1031
|
+
initVxeTable,
|
|
1032
|
+
columnDrop,
|
|
1033
|
+
initOption,
|
|
1034
|
+
getTableJson,
|
|
1035
|
+
addTableJson,
|
|
1036
|
+
onColumnWitchChange,
|
|
1037
|
+
customHandle,
|
|
1038
|
+
changeSelectCount,
|
|
1039
|
+
getTableData,
|
|
1040
|
+
addTableData,
|
|
1041
|
+
checkQueryTotal,
|
|
1042
|
+
getCellValue,
|
|
1043
|
+
createParams,
|
|
1044
|
+
};
|
|
1045
|
+
|
|
1046
|
+
if (!configUtil.Vue.prototype.$vxeTableUtil)
|
|
1047
|
+
configUtil.Vue.prototype.$vxeTableUtil = modules;
|
|
1048
|
+
|
|
1049
|
+
export default modules;
|