cloud-web-corejs 1.0.54-dev.55 → 1.0.54-dev.551
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 +19 -4
- package/src/App.vue +30 -34
- 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/image-viewer.vue +2 -2
- package/src/components/VabUpload/index.js +2 -1
- package/src/components/VabUpload/mixins.js +2 -2
- package/src/components/VabUpload/privateProfileDialogMixins.js +1 -1063
- package/src/components/VabUpload/propertiesDialog.vue +1 -1
- package/src/components/VabUpload/view.vue +209 -120
- package/src/components/advancedSearchDialog/mixins.js +1 -1
- package/src/components/base-textarea/index.vue +104 -0
- package/src/components/baseAlert/index.vue +23 -19
- package/src/components/baseAlert/mixins.js +61 -1
- package/src/components/baseAttachment/index.vue +49 -40
- package/src/components/baseAttachment/mixins.js +2 -1
- package/src/components/baseInputExport/index.vue +19 -12
- package/src/components/baseInputExport/mixins.js +391 -1
- package/src/components/baseTabs/mixins.js +1 -1
- package/src/components/code-editor/index.vue +102 -63
- package/src/components/confirmDialog/index.vue +24 -17
- package/src/components/confirmDialog/mixins.js +1 -1
- package/src/components/errorMsg/index.vue +78 -70
- package/src/components/errorMsg/mixins.js +101 -5
- package/src/components/excelExport/button.vue +57 -4
- package/src/components/excelExport/exportFieldDialog.vue +215 -81
- package/src/components/excelExport/index.js +6 -6
- package/src/components/excelExport/index.vue +56 -2
- package/src/components/excelExport/mixins.js +3 -2
- package/src/components/excelImport/mixins.js +775 -1
- package/src/components/fileLibrary/fileObjAuthDialog.vue +179 -89
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
- package/src/components/fileLibrary/filterDialog.vue +454 -0
- package/src/components/fileLibrary/index.vue +599 -254
- package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +339 -211
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +31 -27
- package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +4 -4
- package/src/components/fileLibrary/mixins/indexMixins.js +220 -101
- package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +64 -4
- package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +3 -3
- package/src/components/fileLibrary/propertiesDialog.vue +113 -74
- package/src/components/fileLibrary/shareDialog.vue +1 -1
- package/src/components/formOplog/mixins.js +1 -1
- package/src/components/hiprint/css/bootstrap.min.css +6 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.eot +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.svg +288 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/src/components/hiprint/hiprint.bundle.js +7 -2
- package/src/components/hiprint/view/design/index.vue +1 -0
- 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/luckysheet/dialog.vue +159 -0
- package/src/components/luckysheet/export.js +409 -0
- package/src/components/luckysheet/index.js +72 -0
- package/src/components/luckysheet/templateJson.js +12078 -0
- package/src/components/luckysheet/view.vue +302 -0
- 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/oplogTable/mixins.js +83 -4
- 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 +1055 -11
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
- package/src/components/table/tableForm.vue +99 -63
- package/src/components/table/tableFormMixin.js +1 -1
- package/src/components/table/util/index.js +335 -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 +834 -362
- package/src/components/wf/mixins/addOpinionButton.js +3 -0
- package/src/components/wf/mixins/setCandidateButton.js +6 -0
- package/src/components/wf/mixins/setCandidateDialog.js +2 -1
- package/src/components/wf/mixins/setCandidateDialog2.js +6 -0
- package/src/components/wf/mixins/wfFlowEleScriptDialog.js +3 -0
- package/src/components/wf/mixins/wfTaskUserRangeDialog.js +3 -0
- package/src/components/wf/setCandidateButton.vue +40 -0
- package/src/components/wf/setCandidateDialog.vue +10 -0
- package/src/components/wf/setCandidateDialog2.vue +105 -0
- package/src/components/wf/wf.js +2156 -1
- package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
- package/src/components/wf/wfStartDialog.vue +66 -42
- package/src/components/wf/wfTaskUserRangeDialog.vue +65 -0
- package/src/components/wf/wfUtil.js +279 -1
- package/src/components/xform/form-designer/designer.js +5 -3
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +434 -0
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +3 -3
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +9 -8
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +301 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +82 -49
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
- package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +38 -7
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1760 -8
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +196 -73
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +34 -5
- package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
- package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +40 -28
- package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +18 -7
- package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +95 -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 +1654 -16
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +705 -379
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +964 -0
- package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +6 -2
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +22 -11
- package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +90 -0
- package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +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 +54 -27
- package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +120 -0
- package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +154 -47
- package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +26 -6
- package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +92 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +24 -9
- package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
- package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +12 -1
- package/src/components/xform/form-designer/form-widget/field-widget/static-text-widget.vue +8 -3
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +31 -17
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +42 -37
- package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +147 -0
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +106 -33
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +3 -171
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +260 -58
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +753 -0
- package/src/components/xform/form-designer/indexMixin.js +3 -772
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +978 -169
- 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 +953 -1042
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +432 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1127 -512
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +31 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +35 -20
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +64 -5
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +77 -20
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +44 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/preWrap-editor.vue +23 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +71 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +33 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +66 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +89 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +137 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +721 -466
- package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +20 -11
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +124 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +349 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +10 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +42 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +305 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +372 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +263 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +35 -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 +1710 -917
- package/src/components/xform/form-render/container-item/containerItemMixin.js +12 -11
- package/src/components/xform/form-render/container-item/data-table-item.vue +206 -198
- package/src/components/xform/form-render/container-item/data-table-mixin.js +3064 -18
- package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
- package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
- package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -9
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +1 -8
- package/src/components/xform/form-render/container-item/tab-item.vue +62 -25
- package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
- package/src/components/xform/form-render/container-item/table-item.vue +4 -2
- package/src/components/xform/form-render/container-item/table2-cell-item.vue +53 -34
- package/src/components/xform/form-render/container-item/table2-item.vue +141 -88
- package/src/components/xform/form-render/container-item/tree-item.vue +32 -11
- package/src/components/xform/form-render/index.vue +77 -20
- package/src/components/xform/form-render/indexMixin.js +3700 -12
- package/src/components/xform/lang/zh-CN.js +29 -4
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/mixins/scriptHttp.js +174 -1
- package/src/components/xform/utils/emitter.js +4 -4
- package/src/components/xform/utils/formHttp.js +162 -0
- package/src/components/xform/utils/format.js +35 -34
- package/src/components/xform/utils/formula-util copy 2.js +945 -0
- package/src/components/xform/utils/formula-util copy.js +856 -0
- package/src/components/xform/utils/formula-util.js +966 -0
- package/src/components/xform/utils/util.js +1 -1
- package/src/components/xform/utils/validators.js +1 -5
- package/src/components/xform/utils/vue2js-generator.js +2 -2
- package/src/index.js +215 -190
- package/src/lang/index.js +56 -51
- package/src/lang/locale/en/login.js +20 -0
- package/src/lang/locale/zh/login.js +20 -0
- package/src/layout/components/AppMain.vue +5 -1
- package/src/layout/components/Sidebar/default.vue +1423 -1222
- package/src/layout/components/TagsView/index.vue +37 -12
- package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
- package/src/layout/components/extractedCode/createDialog.vue +92 -0
- package/src/layout/components/extractedCode/queryDialog.vue +96 -0
- package/src/layout/components/extractedCode/viewDialog.vue +193 -0
- package/src/layout/components/watermark/index.vue +83 -0
- package/src/layout/defaultLayout.vue +1 -1
- package/src/layout/index.vue +3 -5
- package/src/mixins/selectDialog/index.js +1 -1
- package/src/mixins/table/index.js +151 -0
- package/src/mixins/tableTree/index.js +199 -4
- package/src/permission.js +1 -18
- package/src/router/modules/customer.js +142 -8
- package/src/store/config/index.js +1 -1
- package/src/store/getters.js +3 -1
- package/src/store/modules/permission.js +1 -1
- package/src/store/modules/settings.js +1 -1
- package/src/store/modules/tagsView.js +1 -14
- package/src/store/modules/user.js +1 -29
- package/src/utils/index.js +1 -7
- package/src/utils/pddLog.js +103 -0
- package/src/utils/pdfUtil.js +71 -0
- package/src/utils/request.js +1 -1
- package/src/utils/vab.js +19 -27
- package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
- package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
- package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +4 -5
- package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
- package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
- package/src/views/bd/setting/bd_company_env/list.vue +175 -0
- package/src/views/bd/setting/config_manage/list.vue +83 -0
- package/src/views/bd/setting/form_import_log/edit.vue +127 -0
- package/src/views/bd/setting/form_import_log/list.vue +206 -0
- package/src/views/bd/setting/form_script/edit.vue +9 -0
- package/src/views/bd/setting/form_script/edit1.vue +36 -3
- package/src/views/bd/setting/form_script/form_list.vue +99 -37
- package/src/views/bd/setting/form_script/list1.vue +181 -118
- package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +201 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +193 -1
- package/src/views/bd/setting/form_script/mixins/form_list.js +1 -1
- package/src/views/bd/setting/form_script/mixins/list.js +236 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +423 -14
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
- package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/edit.vue +22 -1
- package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/list.vue +326 -214
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +11 -9
- package/src/views/bd/setting/form_template/mixins/edit.js +234 -9
- package/src/views/bd/setting/form_template/mixins/list.js +689 -22
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
- package/src/views/bd/setting/form_template/mixins/wf_list.js +1 -423
- package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +4 -4
- package/src/views/bd/setting/form_template/wf_list.vue +1 -1
- package/src/views/bd/setting/logic_param/edit.vue +146 -0
- package/src/views/bd/setting/logic_param/edit1.vue +106 -0
- package/src/views/bd/setting/logic_param/edit2.vue +139 -0
- package/src/views/bd/setting/logic_param/list.vue +74 -0
- package/src/views/bd/setting/logic_param/list1.vue +12 -0
- package/src/views/bd/setting/logic_param/list2.vue +12 -0
- package/src/views/bd/setting/logic_param/mixins/edit.js +3 -0
- package/src/views/bd/setting/logic_param/mixins/list.js +9 -0
- package/src/views/bd/setting/menu_kind/list.vue +172 -83
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
- package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
- package/src/views/bd/setting/push_data/edit.vue +139 -0
- package/src/views/bd/setting/push_data/list.vue +283 -0
- package/src/views/bd/setting/push_data_h/edit.vue +153 -0
- package/src/views/bd/setting/push_data_h/list.vue +293 -0
- package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
- package/src/views/bd/setting/request_async_setting/list.vue +372 -0
- package/src/views/bd/setting/request_setting/edit.vue +300 -0
- package/src/views/bd/setting/request_setting/list.vue +311 -0
- package/src/views/bd/setting/table_model/edit.vue +875 -426
- package/src/views/bd/setting/table_model/list.vue +190 -128
- package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/edit.js +1202 -13
- package/src/views/bd/setting/table_model/mixins/list.js +440 -14
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
- package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
- package/src/views/user/access_log/list.vue +418 -349
- package/src/views/user/area/dialog.vue +223 -117
- package/src/views/user/area/list.vue +318 -0
- package/src/views/user/bill_setting/edit.vue +1 -1
- package/src/views/user/bill_setting/list.vue +1 -1
- package/src/views/user/common_attribute/itemEdit.vue +2 -2
- package/src/views/user/common_attribute/list.vue +5 -2
- package/src/views/user/common_script/edit.vue +1 -1
- package/src/views/user/common_script/list.vue +1 -1
- package/src/views/user/company_info/dialog.vue +195 -163
- package/src/views/user/company_info/edit.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +4 -0
- package/src/views/user/extend_datasource/edit.vue +5 -1
- package/src/views/user/extend_datasource/list.vue +5 -1
- package/src/views/user/fieldTranslation/editDialog.vue +7 -7
- package/src/views/user/fieldTranslation/list.vue +32 -32
- package/src/views/user/form/vform/designer.vue +776 -749
- package/src/views/user/form/vform/out_render.vue +1 -1
- package/src/views/user/form/vform/render.vue +59 -37
- package/src/views/user/form/view/edit.vue +38 -37
- package/src/views/user/form/view/list.vue +261 -49
- package/src/views/user/home/bears/index.vue +1032 -0
- package/src/views/user/home/default.vue +1026 -979
- package/src/views/user/home/dev.vue +29 -0
- package/src/views/user/home/index.vue +16 -6
- package/src/views/user/home/taili/index.vue +1034 -0
- package/src/views/user/ledger_library/list.vue +10 -12
- package/src/views/user/login/default.vue +165 -36
- package/src/views/user/login/index.vue +4 -6
- package/src/views/user/login/indexMixin.js +184 -8
- package/src/views/user/menu/list.vue +24 -1
- package/src/views/user/notify_message/dialog.vue +44 -22
- package/src/views/user/notify_template/edit.vue +188 -187
- package/src/views/user/notify_template/edit2.vue +176 -0
- package/src/views/user/notify_template/list.vue +4 -1
- package/src/views/user/notify_template/list2.vue +190 -0
- package/src/views/user/outLink/form_view.vue +211 -211
- package/src/views/user/outLink/index.vue +67 -11
- package/src/views/user/position/list.vue +128 -72
- package/src/views/user/project_tag/dialog.vue +9 -4
- package/src/views/user/project_tag/edit.vue +2 -2
- package/src/views/user/project_tag/list.vue +9 -4
- package/src/views/user/push_setting/list.vue +2 -2
- package/src/views/user/request_setting/edit.vue +258 -0
- package/src/views/user/request_setting/list.vue +248 -0
- package/src/views/user/role/authConfig.vue +89 -0
- package/src/views/user/role/dialog.vue +70 -48
- package/src/views/user/role/edit.vue +609 -429
- package/src/views/user/role/list.vue +4 -4
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/sale_org/list.vue +4 -1
- package/src/views/user/user/dialog.vue +46 -23
- package/src/views/user/user/edit.vue +1290 -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 +652 -563
- package/src/views/user/user/modifyPasswordDialog.vue +64 -53
- package/src/views/user/wf/wfReport/index.vue +619 -0
- package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
- package/src/views/user/wf/wf_manage/list.vue +379 -250
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +25 -22
- package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
- package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
- package/src/views/user/wf/wf_obj_config/list.vue +114 -9
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +2 -2
- package/src/views/user/wf/wf_transfer_setting/edit.vue +282 -0
- package/src/views/user/wf/wf_transfer_setting/list.vue +319 -0
- package/src/utils/renderUtils.js +0 -76
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:visible.sync="showDialog"
|
|
4
|
+
:fullscreen="true"
|
|
5
|
+
@close="close"
|
|
6
|
+
:appendToBody="true"
|
|
7
|
+
:modalAppendToBody="true"
|
|
8
|
+
:closeOnClickModal="false"
|
|
9
|
+
:modal="false"
|
|
10
|
+
:title="options.title || 'excel'"
|
|
11
|
+
custom-class="dialog-style list-dialog dialog-checkbox pd_0"
|
|
12
|
+
>
|
|
13
|
+
<div class="cont" id="containt" :class="{ nfootBtn: options.readonly }">
|
|
14
|
+
<luckysheet
|
|
15
|
+
ref="luckysheet"
|
|
16
|
+
:data="json"
|
|
17
|
+
v-if="showLuckysheet"
|
|
18
|
+
:options="options"
|
|
19
|
+
></luckysheet>
|
|
20
|
+
</div>
|
|
21
|
+
<span slot="footer" class="dialog-footer" v-if="!options.readonly">
|
|
22
|
+
<el-button type="primary" plain class="button-sty" @click="close">
|
|
23
|
+
<i class="el-icon-close el-icon"></i>
|
|
24
|
+
{{ $t2("取 消", "system.button.cancel2") }}
|
|
25
|
+
</el-button>
|
|
26
|
+
<el-button type="primary" @click="dialogSubmit" class="button-sty">
|
|
27
|
+
<i class="el-icon-check el-icon"></i>
|
|
28
|
+
{{ $t2("确 定", "system.button.confirm2") }}
|
|
29
|
+
</el-button>
|
|
30
|
+
</span>
|
|
31
|
+
</el-dialog>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import luckysheet from "./view.vue";
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
name: "luckysheetDialog",
|
|
39
|
+
components: { luckysheet },
|
|
40
|
+
props: {
|
|
41
|
+
visiable: Boolean,
|
|
42
|
+
options: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: () => {},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
mounted() {},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
showDialog: true,
|
|
51
|
+
json: [],
|
|
52
|
+
showLuckysheet: false,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
computed: {},
|
|
56
|
+
created() {
|
|
57
|
+
this.init();
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
init() {
|
|
61
|
+
if (this.options.data) {
|
|
62
|
+
try {
|
|
63
|
+
let data = JSON.parse(this.options.data);
|
|
64
|
+
if (Array.isArray(data)) {
|
|
65
|
+
this.json = data;
|
|
66
|
+
} else {
|
|
67
|
+
this.json = [];
|
|
68
|
+
}
|
|
69
|
+
} catch (error) {
|
|
70
|
+
this.json = [];
|
|
71
|
+
console.error(error);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
this.$nextTick(() => {
|
|
75
|
+
this.showLuckysheet = true;
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
close() {
|
|
79
|
+
this.$refs.luckysheet.exitEditMode();
|
|
80
|
+
this.showDialog = false;
|
|
81
|
+
this.$emit("update:visiable", false);
|
|
82
|
+
},
|
|
83
|
+
dialogSubmit() {
|
|
84
|
+
let luckysheetRef = this.$refs.luckysheet;
|
|
85
|
+
let value = luckysheetRef.getValue();
|
|
86
|
+
luckysheetRef.generateExcelFile((file) => {
|
|
87
|
+
this.fileToBase64Async(file).then((base64) => {
|
|
88
|
+
let response = {
|
|
89
|
+
data: JSON.stringify(value),
|
|
90
|
+
json: value,
|
|
91
|
+
file: file,
|
|
92
|
+
base64: base64,
|
|
93
|
+
};
|
|
94
|
+
let onConfirm = this.options.onConfirm;
|
|
95
|
+
if (onConfirm && typeof onConfirm === "function") {
|
|
96
|
+
let result = onConfirm(response, this.close);
|
|
97
|
+
if (result !== false) {
|
|
98
|
+
this.close();
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
this.close();
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* file 转Base64 DataURL
|
|
108
|
+
* @param {File} file
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
111
|
+
fileToBase64Async(file) {
|
|
112
|
+
return new Promise((resolve, reject) => {
|
|
113
|
+
let reader = new FileReader();
|
|
114
|
+
reader.readAsDataURL(file);
|
|
115
|
+
reader.onload = (e) => {
|
|
116
|
+
resolve(e.target.result);
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<style lang="scss" scoped>
|
|
125
|
+
.list-dialog {
|
|
126
|
+
.el-dialog__body {
|
|
127
|
+
height: calc(100% - 42px);
|
|
128
|
+
.cont {
|
|
129
|
+
height: calc(100vh - 210px);
|
|
130
|
+
|
|
131
|
+
&.nfootBtn {
|
|
132
|
+
height: calc(100vh - 158px);
|
|
133
|
+
}
|
|
134
|
+
&#containt {
|
|
135
|
+
padding: 0;
|
|
136
|
+
::v-deep .grid-container {
|
|
137
|
+
outline: none;
|
|
138
|
+
&.detail-wrap .d-cont {
|
|
139
|
+
height: calc(100vh - 150px);
|
|
140
|
+
.title .field-wrapper {
|
|
141
|
+
display: inline-block !important;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.is-fullscreen .el-dialog__body {
|
|
150
|
+
.cont {
|
|
151
|
+
height: calc(100vh - 110px);
|
|
152
|
+
|
|
153
|
+
&.nfootBtn {
|
|
154
|
+
height: calc(100vh - 58px);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
</style>
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
// import { createCellPos } from './translateNumToLetter'
|
|
2
|
+
const Excel = require('exceljs')
|
|
3
|
+
|
|
4
|
+
import FileSaver from 'file-saver'
|
|
5
|
+
export var testaaa = function (){
|
|
6
|
+
console.log("...");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export var exportExcel = function(luckysheet, value) {
|
|
10
|
+
// 参数为luckysheet.getluckysheetfile()获取的对象
|
|
11
|
+
// 1.创建工作簿,可以为工作簿添加属性
|
|
12
|
+
const workbook = new Excel.Workbook()
|
|
13
|
+
// 2.创建表格,第二个参数可以配置创建什么样的工作表
|
|
14
|
+
if (Object.prototype.toString.call(luckysheet) === '[object Object]') {
|
|
15
|
+
luckysheet = [luckysheet]
|
|
16
|
+
}
|
|
17
|
+
luckysheet.forEach(function(table) {
|
|
18
|
+
if (table.data.length === 0) return true
|
|
19
|
+
// ws.getCell('B2').fill = fills.
|
|
20
|
+
const worksheet = workbook.addWorksheet(table.name)
|
|
21
|
+
const merge = (table.config && table.config.merge) || {}
|
|
22
|
+
const borderInfo = (table.config && table.config.borderInfo) || {}
|
|
23
|
+
const colWidth = (table.config && (table.config.colwidth || table.config.columnlen)) || {}
|
|
24
|
+
// 3.设置单元格合并,设置单元格边框,设置单元格样式,设置值
|
|
25
|
+
setStyleAndValue(table.data, worksheet)
|
|
26
|
+
setMerge(merge, worksheet)
|
|
27
|
+
setBorder(borderInfo, worksheet)
|
|
28
|
+
setColumnWidth(colWidth, worksheet)
|
|
29
|
+
return true
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
// return
|
|
33
|
+
// 4.写入 buffer
|
|
34
|
+
const buffer = workbook.xlsx.writeBuffer().then(data => {
|
|
35
|
+
// console.log('data', data)
|
|
36
|
+
const blob = new Blob([data], {
|
|
37
|
+
type: 'application/vnd.ms-excel;charset=utf-8'
|
|
38
|
+
})
|
|
39
|
+
console.log("导出成功!")
|
|
40
|
+
FileSaver.saveAs(blob, `${value}.xlsx`)
|
|
41
|
+
})
|
|
42
|
+
return buffer
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export var generateExcelBlob = function(luckysheet, fileName) {
|
|
46
|
+
// 参数为luckysheet.getluckysheetfile()获取的对象,返回Blob对象
|
|
47
|
+
// 1.创建工作簿,可以为工作簿添加属性
|
|
48
|
+
const workbook = new Excel.Workbook()
|
|
49
|
+
// 2.创建表格,第二个参数可以配置创建什么样的工作表
|
|
50
|
+
if (Object.prototype.toString.call(luckysheet) === '[object Object]') {
|
|
51
|
+
luckysheet = [luckysheet]
|
|
52
|
+
}
|
|
53
|
+
luckysheet.forEach(function(table) {
|
|
54
|
+
if (table.data.length === 0) return true
|
|
55
|
+
const worksheet = workbook.addWorksheet(table.name)
|
|
56
|
+
const merge = (table.config && table.config.merge) || {}
|
|
57
|
+
const borderInfo = (table.config && table.config.borderInfo) || {}
|
|
58
|
+
const colWidth = (table.config && (table.config.colwidth || table.config.columnlen)) || {}
|
|
59
|
+
// 3.设置单元格合并,设置单元格边框,设置单元格样式,设置值
|
|
60
|
+
setStyleAndValue(table.data, worksheet)
|
|
61
|
+
setMerge(merge, worksheet)
|
|
62
|
+
setBorder(borderInfo, worksheet)
|
|
63
|
+
setColumnWidth(colWidth, worksheet)
|
|
64
|
+
return true
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
// 4.写入 buffer 并返回 Blob 对象
|
|
68
|
+
return workbook.xlsx.writeBuffer().then(data => {
|
|
69
|
+
const blob = new Blob([data], {
|
|
70
|
+
type: 'application/vnd.ms-excel;charset=utf-8'
|
|
71
|
+
})
|
|
72
|
+
// 如果提供了文件名,设置文件名属性
|
|
73
|
+
if (fileName) {
|
|
74
|
+
blob.name = `${fileName}.xlsx`
|
|
75
|
+
}
|
|
76
|
+
return blob
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export var generateExcelFile = function(luckysheet, fileName) {
|
|
81
|
+
// 参数为luckysheet.getluckysheetfile()获取的对象,返回File对象
|
|
82
|
+
return generateExcelBlob(luckysheet, fileName).then(blob => {
|
|
83
|
+
const file = new File([blob], `${fileName || 'export'}.xlsx`, {
|
|
84
|
+
type: 'application/vnd.ms-excel;charset=utf-8'
|
|
85
|
+
})
|
|
86
|
+
return file
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
var setMerge = function(luckyMerge = {}, worksheet) {
|
|
91
|
+
const mergearr = Object.values(luckyMerge)
|
|
92
|
+
mergearr.forEach(function(elem) {
|
|
93
|
+
// elem格式:{r: 0, c: 0, rs: 1, cs: 2}
|
|
94
|
+
// 按开始行,开始列,结束行,结束列合并(相当于 K10:M12)
|
|
95
|
+
worksheet.mergeCells(
|
|
96
|
+
elem.r + 1,
|
|
97
|
+
elem.c + 1,
|
|
98
|
+
elem.r + elem.rs,
|
|
99
|
+
elem.c + elem.cs
|
|
100
|
+
)
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
var setBorder = function(luckyBorderInfo, worksheet) {
|
|
105
|
+
if (!Array.isArray(luckyBorderInfo)) return
|
|
106
|
+
// console.log('luckyBorderInfo', luckyBorderInfo)
|
|
107
|
+
luckyBorderInfo.forEach(function(elem) {
|
|
108
|
+
// 现在只兼容到borderType 为range的情况
|
|
109
|
+
// console.log('ele', elem)
|
|
110
|
+
if (elem.rangeType === 'range') {
|
|
111
|
+
let border = borderConvert(elem.borderType, elem.style, elem.color)
|
|
112
|
+
let rang = elem.range[0]
|
|
113
|
+
// console.log('range', rang)
|
|
114
|
+
let row = rang.row
|
|
115
|
+
let column = rang.column
|
|
116
|
+
for (let i = row[0] + 1; i < row[1] + 2; i++) {
|
|
117
|
+
for (let y = column[0] + 1; y < column[1] + 2; y++) {
|
|
118
|
+
worksheet.getCell(i, y).border = border
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (elem.rangeType === 'cell') {
|
|
123
|
+
// col_index: 2
|
|
124
|
+
// row_index: 1
|
|
125
|
+
// b: {
|
|
126
|
+
// color: '#d0d4e3'
|
|
127
|
+
// style: 1
|
|
128
|
+
// }
|
|
129
|
+
const { col_index, row_index } = elem.value
|
|
130
|
+
const borderData = Object.assign({}, elem.value)
|
|
131
|
+
delete borderData.col_index
|
|
132
|
+
delete borderData.row_index
|
|
133
|
+
let border = addborderToCell(borderData, row_index, col_index)
|
|
134
|
+
// console.log('bordre', border, borderData)
|
|
135
|
+
worksheet.getCell(row_index + 1, col_index + 1).border = border
|
|
136
|
+
}
|
|
137
|
+
// console.log(rang.column_focus + 1, rang.row_focus + 1)
|
|
138
|
+
// worksheet.getCell(rang.row_focus + 1, rang.column_focus + 1).border = border
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
var setStyleAndValue = function(cellArr, worksheet) {
|
|
142
|
+
if (!Array.isArray(cellArr)) return
|
|
143
|
+
cellArr.forEach(function(row, rowid) {
|
|
144
|
+
row.every(function(cell, columnid) {
|
|
145
|
+
if (!cell) return true
|
|
146
|
+
let fill = fillConvert(cell.bg)
|
|
147
|
+
|
|
148
|
+
let font = fontConvert(
|
|
149
|
+
cell.ff,
|
|
150
|
+
cell.fc,
|
|
151
|
+
cell.bl,
|
|
152
|
+
cell.it,
|
|
153
|
+
cell.fs,
|
|
154
|
+
cell.cl,
|
|
155
|
+
cell.ul
|
|
156
|
+
)
|
|
157
|
+
let alignment = alignmentConvert(cell.vt, cell.ht, cell.tb, cell.tr)
|
|
158
|
+
let value = ''
|
|
159
|
+
|
|
160
|
+
if (cell.f) {
|
|
161
|
+
value = { formula: cell.f, result: cell.v }
|
|
162
|
+
} else if (!cell.v && cell.ct && cell.ct.s) {
|
|
163
|
+
// xls转为xlsx之后,内部存在不同的格式,都会进到富文本里,即值不存在与cell.v,而是存在于cell.ct.s之后
|
|
164
|
+
// value = cell.ct.s[0].v
|
|
165
|
+
cell.ct.s.forEach(arr => {
|
|
166
|
+
value += arr.v
|
|
167
|
+
})
|
|
168
|
+
} else {
|
|
169
|
+
value = cell.v
|
|
170
|
+
}
|
|
171
|
+
// style 填入到_value中可以实现填充色
|
|
172
|
+
let letter = createCellPos(columnid)
|
|
173
|
+
let target = worksheet.getCell(letter + (rowid + 1))
|
|
174
|
+
// console.log('1233', letter + (rowid + 1))
|
|
175
|
+
for (const key in fill) {
|
|
176
|
+
target.fill = fill
|
|
177
|
+
break
|
|
178
|
+
}
|
|
179
|
+
target.font = font
|
|
180
|
+
target.alignment = alignment
|
|
181
|
+
target.value = value
|
|
182
|
+
|
|
183
|
+
return true
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
var fillConvert = function(bg) {
|
|
189
|
+
if (!bg) {
|
|
190
|
+
return {}
|
|
191
|
+
}
|
|
192
|
+
// const bgc = bg.replace('#', '')
|
|
193
|
+
let fill = {
|
|
194
|
+
type: 'pattern',
|
|
195
|
+
pattern: 'solid',
|
|
196
|
+
fgColor: { argb: bg.replace('#', '') }
|
|
197
|
+
}
|
|
198
|
+
return fill
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
var fontConvert = function(
|
|
202
|
+
ff = 0,
|
|
203
|
+
fc = '#000000',
|
|
204
|
+
bl = 0,
|
|
205
|
+
it = 0,
|
|
206
|
+
fs = 10,
|
|
207
|
+
cl = 0,
|
|
208
|
+
ul = 0
|
|
209
|
+
) {
|
|
210
|
+
// luckysheet:ff(样式), fc(颜色), bl(粗体), it(斜体), fs(大小), cl(删除线), ul(下划线)
|
|
211
|
+
const luckyToExcel = {
|
|
212
|
+
0: '微软雅黑',
|
|
213
|
+
1: '宋体(Song)',
|
|
214
|
+
2: '黑体(ST Heiti)',
|
|
215
|
+
3: '楷体(ST Kaiti)',
|
|
216
|
+
4: '仿宋(ST FangSong)',
|
|
217
|
+
5: '新宋体(ST Song)',
|
|
218
|
+
6: '华文新魏',
|
|
219
|
+
7: '华文行楷',
|
|
220
|
+
8: '华文隶书',
|
|
221
|
+
9: 'Arial',
|
|
222
|
+
10: 'Times New Roman ',
|
|
223
|
+
11: 'Tahoma ',
|
|
224
|
+
12: 'Verdana',
|
|
225
|
+
num2bl: function(num) {
|
|
226
|
+
return num === 0 ? false : true
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
// 出现Bug,导入的时候ff为luckyToExcel的val
|
|
230
|
+
|
|
231
|
+
let font = {
|
|
232
|
+
name: typeof ff === 'number' ? luckyToExcel[ff] : ff,
|
|
233
|
+
family: 1,
|
|
234
|
+
size: fs,
|
|
235
|
+
color: { argb: fc.replace('#', '') },
|
|
236
|
+
bold: luckyToExcel.num2bl(bl),
|
|
237
|
+
italic: luckyToExcel.num2bl(it),
|
|
238
|
+
underline: luckyToExcel.num2bl(ul),
|
|
239
|
+
strike: luckyToExcel.num2bl(cl)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return font
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
var alignmentConvert = function(
|
|
246
|
+
vt = 'default',
|
|
247
|
+
ht = 'default',
|
|
248
|
+
tb = 'default',
|
|
249
|
+
tr = 'default'
|
|
250
|
+
) {
|
|
251
|
+
// luckysheet:vt(垂直), ht(水平), tb(换行), tr(旋转)
|
|
252
|
+
const luckyToExcel = {
|
|
253
|
+
vertical: {
|
|
254
|
+
0: 'middle',
|
|
255
|
+
1: 'top',
|
|
256
|
+
2: 'bottom',
|
|
257
|
+
default: 'top'
|
|
258
|
+
},
|
|
259
|
+
horizontal: {
|
|
260
|
+
0: 'center',
|
|
261
|
+
1: 'left',
|
|
262
|
+
2: 'right',
|
|
263
|
+
default: 'left'
|
|
264
|
+
},
|
|
265
|
+
wrapText: {
|
|
266
|
+
0: false,
|
|
267
|
+
1: false,
|
|
268
|
+
2: true,
|
|
269
|
+
default: false
|
|
270
|
+
},
|
|
271
|
+
textRotation: {
|
|
272
|
+
0: 0,
|
|
273
|
+
1: 45,
|
|
274
|
+
2: -45,
|
|
275
|
+
3: 'vertical',
|
|
276
|
+
4: 90,
|
|
277
|
+
5: -90,
|
|
278
|
+
default: 0
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
let alignment = {
|
|
283
|
+
vertical: luckyToExcel.vertical[vt],
|
|
284
|
+
horizontal: luckyToExcel.horizontal[ht],
|
|
285
|
+
wrapText: luckyToExcel.wrapText[tb],
|
|
286
|
+
textRotation: luckyToExcel.textRotation[tr]
|
|
287
|
+
}
|
|
288
|
+
return alignment
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
var borderConvert = function(borderType, style = 1, color = '#000') {
|
|
292
|
+
// 对应luckysheet的config中borderinfo的的参数
|
|
293
|
+
if (!borderType) {
|
|
294
|
+
return {}
|
|
295
|
+
}
|
|
296
|
+
const luckyToExcel = {
|
|
297
|
+
type: {
|
|
298
|
+
'border-all': 'all',
|
|
299
|
+
'border-top': 'top',
|
|
300
|
+
'border-right': 'right',
|
|
301
|
+
'border-bottom': 'bottom',
|
|
302
|
+
'border-left': 'left'
|
|
303
|
+
},
|
|
304
|
+
style: {
|
|
305
|
+
0: 'none',
|
|
306
|
+
1: 'thin',
|
|
307
|
+
2: 'hair',
|
|
308
|
+
3: 'dotted',
|
|
309
|
+
4: 'dashDot', // 'Dashed',
|
|
310
|
+
5: 'dashDot',
|
|
311
|
+
6: 'dashDotDot',
|
|
312
|
+
7: 'double',
|
|
313
|
+
8: 'medium',
|
|
314
|
+
9: 'mediumDashed',
|
|
315
|
+
10: 'mediumDashDot',
|
|
316
|
+
11: 'mediumDashDotDot',
|
|
317
|
+
12: 'slantDashDot',
|
|
318
|
+
13: 'thick'
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
let template = {
|
|
322
|
+
style: luckyToExcel.style[style],
|
|
323
|
+
color: { argb: color.replace('#', '') }
|
|
324
|
+
}
|
|
325
|
+
let border = {}
|
|
326
|
+
if (luckyToExcel.type[borderType] === 'all') {
|
|
327
|
+
border['top'] = template
|
|
328
|
+
border['right'] = template
|
|
329
|
+
border['bottom'] = template
|
|
330
|
+
border['left'] = template
|
|
331
|
+
} else {
|
|
332
|
+
border[luckyToExcel.type[borderType]] = template
|
|
333
|
+
}
|
|
334
|
+
// console.log('border', border)
|
|
335
|
+
return border
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function addborderToCell(borders, row_index, col_index) {
|
|
339
|
+
let border = {}
|
|
340
|
+
const luckyExcel = {
|
|
341
|
+
type: {
|
|
342
|
+
l: 'left',
|
|
343
|
+
r: 'right',
|
|
344
|
+
b: 'bottom',
|
|
345
|
+
t: 'top'
|
|
346
|
+
},
|
|
347
|
+
style: {
|
|
348
|
+
0: 'none',
|
|
349
|
+
1: 'thin',
|
|
350
|
+
2: 'hair',
|
|
351
|
+
3: 'dotted',
|
|
352
|
+
4: 'dashDot', // 'Dashed',
|
|
353
|
+
5: 'dashDot',
|
|
354
|
+
6: 'dashDotDot',
|
|
355
|
+
7: 'double',
|
|
356
|
+
8: 'medium',
|
|
357
|
+
9: 'mediumDashed',
|
|
358
|
+
10: 'mediumDashDot',
|
|
359
|
+
11: 'mediumDashDotDot',
|
|
360
|
+
12: 'slantDashDot',
|
|
361
|
+
13: 'thick'
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
// console.log('borders', borders)
|
|
365
|
+
for (const bor in borders) {
|
|
366
|
+
// console.log(bor)
|
|
367
|
+
if (borders[bor].color.indexOf('rgb') === -1) {
|
|
368
|
+
border[luckyExcel.type[bor]] = {
|
|
369
|
+
style: luckyExcel.style[borders[bor].style],
|
|
370
|
+
color: { argb: borders[bor].color.replace('#', '') }
|
|
371
|
+
}
|
|
372
|
+
} else {
|
|
373
|
+
border[luckyExcel.type[bor]] = {
|
|
374
|
+
style: luckyExcel.style[borders[bor].style],
|
|
375
|
+
color: { argb: borders[bor].color }
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return border
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function createCellPos(n) {
|
|
384
|
+
let ordA = 'A'.charCodeAt(0)
|
|
385
|
+
|
|
386
|
+
let ordZ = 'Z'.charCodeAt(0)
|
|
387
|
+
let len = ordZ - ordA + 1
|
|
388
|
+
let s = ''
|
|
389
|
+
while (n >= 0) {
|
|
390
|
+
s = String.fromCharCode((n % len) + ordA) + s
|
|
391
|
+
|
|
392
|
+
n = Math.floor(n / len) - 1
|
|
393
|
+
}
|
|
394
|
+
return s
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
var setColumnWidth = function(colWidth, worksheet) {
|
|
398
|
+
if (!Object.keys(colWidth).length) return
|
|
399
|
+
|
|
400
|
+
// 获取所有列索引并排序
|
|
401
|
+
const colIndexes = Object.keys(colWidth).map(Number).sort((a, b) => a - b)
|
|
402
|
+
|
|
403
|
+
// 为每一列设置宽度
|
|
404
|
+
colIndexes.forEach(colIndex => {
|
|
405
|
+
const width = colWidth[colIndex]
|
|
406
|
+
// ExcelJS 使用 1-based 索引
|
|
407
|
+
worksheet.getColumn(colIndex + 1).width = width
|
|
408
|
+
})
|
|
409
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import dialogComponent from './dialog.vue';
|
|
3
|
+
export {default as luckysheetDialog } from './dialog.vue';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 打开univerDialog对话框
|
|
7
|
+
* @param {Object} options - 对话框配置选项
|
|
8
|
+
* @param {Boolean} options.visiable - 是否可见
|
|
9
|
+
* @param {String} options.data - Excel数据(JSON字符串)
|
|
10
|
+
* @param {String} options.title - 对话框标题
|
|
11
|
+
* @param {Boolean} options.readonly - 是否只读
|
|
12
|
+
* @param {Object} options.options - univer配置选项
|
|
13
|
+
* @param {Function} options.onConfirm - 确认回调函数
|
|
14
|
+
* @param {Function} options.onClose - 关闭回调函数
|
|
15
|
+
* @returns {Object} 对话框实例,包含close方法
|
|
16
|
+
*/
|
|
17
|
+
export function openLuckysheetDialog(options = {}) {
|
|
18
|
+
let visiable = true;
|
|
19
|
+
const {
|
|
20
|
+
onClose,
|
|
21
|
+
} = options;
|
|
22
|
+
|
|
23
|
+
// 创建组件实例
|
|
24
|
+
const DialogConstructor = Vue.extend(dialogComponent);
|
|
25
|
+
const instance = new DialogConstructor({
|
|
26
|
+
propsData: {
|
|
27
|
+
visiable,
|
|
28
|
+
options: options,
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// 挂载组件
|
|
33
|
+
instance.$mount();
|
|
34
|
+
document.body.appendChild(instance.$el);
|
|
35
|
+
|
|
36
|
+
// 定义销毁函数
|
|
37
|
+
const destroyDialog = () => {
|
|
38
|
+
// 延迟销毁,确保动画完成
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
// 从DOM中移除
|
|
41
|
+
if (instance.$el && instance.$el.parentNode) {
|
|
42
|
+
instance.$el.parentNode.removeChild(instance.$el);
|
|
43
|
+
}
|
|
44
|
+
// 销毁组件实例
|
|
45
|
+
instance.$destroy();
|
|
46
|
+
}, 300);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// 监听关闭事件
|
|
50
|
+
if (onClose) {
|
|
51
|
+
instance.$on('update:visiable', (value) => {
|
|
52
|
+
if (!value) {
|
|
53
|
+
onClose();
|
|
54
|
+
// 关闭后销毁
|
|
55
|
+
destroyDialog();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
} else {
|
|
59
|
+
// 如果没有传入onClose,也要确保关闭后销毁
|
|
60
|
+
instance.$on('update:visiable', (value) => {
|
|
61
|
+
if (!value) destroyDialog();
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 返回实例,允许外部控制
|
|
66
|
+
return {
|
|
67
|
+
instance,
|
|
68
|
+
close: () => {
|
|
69
|
+
instance.close();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|