cloud-web-corejs 1.0.54-dev.78 → 1.0.54-dev.780
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 +200 -183
- package/src/App.vue +73 -75
- package/src/api/user.js +85 -40
- package/src/components/Qrcode/fileParse.vue +0 -1
- package/src/components/Tinymce/index.vue +112 -71
- package/src/components/VabUpload/fileLibraryDialog.vue +296 -0
- package/src/components/VabUpload/image-viewer.vue +2 -2
- package/src/components/VabUpload/index.js +69 -1
- package/src/components/VabUpload/index.vue +9 -1
- package/src/components/VabUpload/mixins/fileLibraryDialog.js +1112 -0
- package/src/components/VabUpload/mixins.js +1881 -2
- package/src/components/VabUpload/propertiesDialog.vue +1 -1
- package/src/components/VabUpload/view.vue +209 -120
- package/src/components/advancedSearchDialog/mixins.js +28 -1
- package/src/components/base-textarea/index.vue +104 -0
- package/src/components/baseAlert/index.js +44 -1
- package/src/components/baseAlert/index.vue +24 -20
- package/src/components/baseAlert/mixins.js +61 -1
- package/src/components/baseArea/index.vue +1628 -0
- package/src/components/baseAttachment/index.vue +49 -40
- package/src/components/baseAttachment/install.js +21 -5
- package/src/components/baseAttachment/mixins.js +310 -1
- package/src/components/baseInputBatch/mixins.js +58 -1
- package/src/components/baseInputExport/index.vue +21 -14
- package/src/components/baseInputExport/mixins.js +391 -1
- package/src/components/baseInputNumber/index.vue +9 -9
- package/src/components/baseTabs/index.vue +16 -8
- package/src/components/baseTabs/mixins.js +177 -1
- package/src/components/cnPrint/index.js +44 -1
- package/src/components/cnPrint/mixins.js +189 -1
- package/src/components/code-editor/index.vue +131 -62
- package/src/components/confirmDialog/index.js +41 -1
- package/src/components/confirmDialog/index.vue +24 -17
- package/src/components/confirmDialog/mixins.js +31 -1
- package/src/components/errorMsg/index.js +47 -3
- package/src/components/errorMsg/index.vue +78 -70
- package/src/components/errorMsg/mixins.js +103 -5
- package/src/components/excelExport/button.vue +86 -24
- package/src/components/excelExport/exportFieldDialog.vue +246 -90
- package/src/components/excelExport/index.js +65 -6
- package/src/components/excelExport/index.vue +109 -26
- package/src/components/excelExport/mixins.js +1132 -8
- package/src/components/excelImport/index.js +13 -13
- package/src/components/excelImport/mixins.js +2 -1
- package/src/components/fileLibrary/categoryMoveDialog.vue +109 -109
- package/src/components/fileLibrary/fileObjAuthDialog.vue +297 -208
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
- package/src/components/fileLibrary/filterDialog.vue +454 -0
- package/src/components/fileLibrary/index.vue +1109 -687
- 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 +230 -101
- package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +62 -3
- package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +3 -3
- package/src/components/fileLibrary/propertiesDialog.vue +190 -145
- package/src/components/fileLibrary/recycleBinDialog.vue +237 -236
- package/src/components/fileLibrary/shareDialog.vue +1 -1
- package/src/components/formDialog/README.md +241 -0
- package/src/components/formDialog/index.js +35 -0
- package/src/components/formDialog/index.vue +724 -0
- package/src/components/formOplog/mixins.js +85 -4
- package/src/components/hiprint/css/bootstrap.min.css +6 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.eot +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.svg +288 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff +0 -0
- package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/src/components/hiprint/hiprint.bundle.js +15 -3
- package/src/components/hiprint/view/design/index.vue +140 -47
- package/src/components/hiprint/view/design/mixins.js +611 -1
- package/src/components/hiprint/view/design/preview.vue +75 -52
- package/src/components/hiprint/view/json-view.vue +31 -31
- package/src/components/jdPrint/index.js +44 -1
- package/src/components/jdPrint/mixins.js +208 -1
- package/src/components/jsonImport/exportUtil.js +106 -0
- package/src/components/jsonImport/index.js +212 -17
- package/src/components/jsonImport/mixins.js +350 -16
- package/src/components/langImport/index.js +80 -1
- package/src/components/langImport/mixins.js +487 -1
- package/src/components/langTag/mixins/addButton.js +51 -5
- package/src/components/langTag/mixins/deleteButton.js +55 -5
- package/src/components/langTag/mixins/view.js +47 -5
- package/src/components/luckysheet/dialog.vue +159 -0
- package/src/components/luckysheet/export.js +595 -0
- package/src/components/luckysheet/fileUtils.js +147 -0
- package/src/components/luckysheet/index.js +72 -0
- package/src/components/luckysheet/templateJson.js +12078 -0
- package/src/components/luckysheet/view.vue +210 -0
- package/src/components/micro-view-host/contract.js +66 -0
- package/src/components/micro-view-host/index.vue +148 -0
- package/src/components/mobile/file/index.vue +10 -0
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +51 -47
- package/src/components/obsUpload/index.js +34 -0
- package/src/components/obsUpload/index.vue +231 -0
- package/src/components/obsUpload/mixins.js +1476 -0
- package/src/components/onlineTalk/index.vue +1 -1
- package/src/components/onlineTalk/mixins.js +852 -1
- package/src/components/onlineTalk/talkUserDialog.vue +280 -0
- package/src/components/oplogTable/mixins.js +83 -4
- package/src/components/pddPrint/index.js +44 -1
- package/src/components/pddPrint/mixins.js +252 -1
- package/src/components/projectTag/mixins/addButton.js +52 -1
- package/src/components/projectTag/mixins/deleteButton.js +52 -1
- package/src/components/projectTag/mixins/view.js +43 -1
- package/src/components/scriptDescription/button.vue +12 -4
- package/src/components/scriptDescription/mixins.js +30 -1
- package/src/components/scriptTest/mixins.js +90 -1
- package/src/components/statusTag/mixins.js +66 -1
- package/src/components/table/CellSlot.vue +12 -9
- package/src/components/table/config.js +74 -1
- package/src/components/table/index.js +1215 -11
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
- package/src/components/table/tableForm.vue +99 -63
- package/src/components/table/tableFormMixin.js +285 -1
- package/src/components/table/util/index.js +337 -0
- package/src/components/table/vxeFilter/index.js +153 -1
- package/src/components/table/vxeFilter/mixin.js +310 -6
- package/src/components/tempStorage/index.vue +76 -55
- package/src/components/tempStorage/tempStorageDialog.vue +179 -54
- package/src/components/vb-tabs/x-tabs.vue +57 -30
- package/src/components/vipPrint/index.js +44 -1
- package/src/components/vipPrint/mixins.js +268 -1
- package/src/components/wf/addOpinionButton.vue +57 -0
- package/src/components/wf/content.vue +834 -362
- package/src/components/wf/mixins/addOpinionButton.js +53 -0
- package/src/components/wf/mixins/setCandidateButton.js +161 -0
- package/src/components/wf/mixins/setCandidateDialog.js +217 -5
- package/src/components/wf/mixins/setCandidateDialog2.js +252 -0
- package/src/components/wf/mixins/wfFlowEleScriptDialog.js +131 -0
- package/src/components/wf/mixins/wfTaskUserRangeDialog.js +69 -0
- package/src/components/wf/setCandidateButton.vue +40 -0
- package/src/components/wf/setCandidateDialog.vue +10 -0
- package/src/components/wf/setCandidateDialog2.vue +105 -0
- package/src/components/wf/wf.js +2224 -30
- 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 +280 -1
- package/src/components/xform/XFormTabContainer//346/226/260/345/242/236/351/241/265/347/255/276/346/250/241/345/274/217-/346/234/200/347/273/210/345/256/236/347/216/260.md +195 -0
- package/src/components/xform/docs/2026-07 table/344/270/216excelExport/344/277/256/345/244/215/345/217/212/345/257/274/345/207/272/344/274/230/345/214/226.md" +57 -0
- package/src/components/xform/docs/2026-07 /346/216/222/346/237/245/344/277/256/345/244/215/350/256/260/345/275/225.md" +73 -0
- package/src/components/xform/docs/autocomplete /350/207/252/345/212/250/345/256/214/346/210/220/347/273/204/344/273/266/350/257/264/346/230/216.md" +126 -0
- package/src/components/xform/docs//345/220/216/345/217/260/345/255/227/346/256/265/357/274/210/345/212/250/346/200/201/347/224/237/346/210/220/357/274/211JSON /350/257/264/346/230/216.md" +1286 -0
- package/src/components/xform/docs//345/257/271/346/257/224/345/212/237/350/203/275/350/220/275/345/234/260/346/226/271/346/241/210.md +986 -0
- package/src/components/xform/docs//346/225/260/346/215/256/350/241/250/346/240/274/345/212/250/346/200/201/345/210/227 JSON /350/257/264/346/230/216.md" +657 -0
- package/src/components/xform/form-designer/designer.js +2027 -29
- 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 +108 -1
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +291 -8
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +14 -1
- package/src/components/xform/form-designer/form-widget/container-widget/detail-pane-widget.vue +3 -2
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
- package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +320 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +85 -49
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +6 -3
- package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +30 -8
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1774 -19
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +222 -76
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +67 -54
- 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/area-select-widget.vue +272 -0
- package/src/components/xform/form-designer/form-widget/field-widget/autocomplete-widget.vue +119 -0
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +216 -184
- package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +76 -66
- package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +209 -90
- package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +41 -35
- 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 -3
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +48 -5
- package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +86 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +170 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1941 -16
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +657 -108
- 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/autocomplete-mixin.js +451 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +157 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +3 -9
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +3 -9
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +3 -9
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin.js +75 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +192 -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 +119 -81
- package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +186 -0
- package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +55 -28
- package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +119 -0
- package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +156 -54
- 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/save_submit_wf_button-widget.vue +112 -0
- package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +146 -0
- 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 +16 -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 +93 -49
- package/src/components/xform/form-designer/form-widget/field-widget/switch-widget.vue +9 -1
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +38 -38
- 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 +111 -34
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +4 -3
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +2 -1
- 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 +187 -70
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +753 -0
- package/src/components/xform/form-designer/form-widget/field-widget/vue-page-widget.vue +231 -0
- package/src/components/xform/form-designer/form-widget/index.vue +6 -1
- package/src/components/xform/form-designer/form-widget/indexMixin.js +184 -2
- package/src/components/xform/form-designer/index.vue +195 -191
- package/src/components/xform/form-designer/indexMixin.js +855 -24
- package/src/components/xform/form-designer/refMixinDesign.js +27 -28
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +601 -0
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +1553 -629
- package/src/components/xform/form-designer/setting-panel/index.vue +313 -305
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +370 -12
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +585 -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/buttonIcon-editor.vue +14 -15
- 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 +124 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1154 -1048
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/edit-tree-button-group-config-dialog.vue +281 -0
- 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 +1632 -592
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +34 -46
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +344 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +31 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +133 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +23 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +25 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +20 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +199 -0
- 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/icon-editor.vue +14 -15
- 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-cascader/cascader-multiple-editor.vue +8 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/checkStrictly-editor.vue +11 -13
- package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/showAllLevels-editor.vue +21 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +157 -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-gantt/gantt-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +75 -21
- 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-script-input/script-input-editor.vue +55 -0
- 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-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/field-vue-page/vue-page-editor.vue +48 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +107 -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 +17 -16
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +25 -25
- package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +67 -13
- 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 +127 -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/prefixIcon-editor.vue +14 -15
- 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/showViewButton-editor.vue +29 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +14 -15
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +42 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +304 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/utcTransformEnabled-editor.vue +19 -0
- 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 +369 -324
- package/src/components/xform/form-designer/setting-panel/widgetPropertyDialogMixin.js +186 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +267 -103
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +655 -24
- package/src/components/xform/form-designer/widget-panel/index.vue +389 -321
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +334 -2
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +4531 -3141
- package/src/components/xform/form-render/compareDelList.vue +83 -0
- package/src/components/xform/form-render/compareView.vue +76 -0
- package/src/components/xform/form-render/container-item/containerItemMixin.js +404 -11
- package/src/components/xform/form-render/container-item/data-table-item.vue +221 -203
- package/src/components/xform/form-render/container-item/data-table-mixin.js +3716 -858
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +173 -172
- package/src/components/xform/form-render/container-item/detail-item.vue +287 -158
- package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
- package/src/components/xform/form-render/container-item/dynamicFieldEngine.js +285 -0
- package/src/components/xform/form-render/container-item/dynamicFieldMixin.js +416 -0
- 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 +1184 -419
- package/src/components/xform/form-render/container-item/sub-form-item.vue +10 -2
- package/src/components/xform/form-render/container-item/tab-item.vue +125 -88
- 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 +7 -7
- 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 +198 -99
- package/src/components/xform/form-render/container-item/tree-item.vue +32 -11
- package/src/components/xform/form-render/dynamicDialogRender.js +238 -3
- package/src/components/xform/form-render/dynamicDrawerRender.js +229 -0
- package/src/components/xform/form-render/formDynamicFieldMixin.js +131 -0
- package/src/components/xform/form-render/index.vue +86 -21
- package/src/components/xform/form-render/indexMixin.js +5070 -37
- package/src/components/xform/form-render/refMixin.js +34 -3
- package/src/components/xform/icon-picker/icons.json +284 -0
- package/src/components/xform/icon-picker/index.vue +145 -0
- package/src/components/xform/lang/en-US.js +457 -438
- package/src/components/xform/lang/en-US_extension.js +4 -0
- package/src/components/xform/lang/zh-CN.js +628 -593
- package/src/components/xform/mixins/defaultHandle.js +474 -2
- package/src/components/xform/mixins/scriptHttp.js +179 -3
- package/src/components/xform/utils/dynamicSchemaUtil.js +361 -0
- 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 +205 -172
- package/src/components/xform/utils/formula-util.js +969 -0
- package/src/components/xform/utils/sfc-generator.js +2 -2
- package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
- package/src/components/xform/utils/tableCellValidateUtil.js +148 -0
- package/src/components/xform/utils/tableColumnHelper.js +155 -0
- package/src/components/xform/utils/util.js +1591 -1
- package/src/components/xform/utils/validators.js +185 -4
- package/src/components/xform/utils/vue2js-generator.js +2 -2
- package/src/components/xhsPrint/index.js +44 -1
- package/src/components/xhsPrint/mixins.js +269 -1
- package/src/directive/LimitNumber/index.js +144 -1
- package/src/directive/el-dialog-center/index.js +34 -1
- package/src/directive/el-drag-dialog/drag.js +86 -1
- package/src/directive/el-readonly/index.js +15 -1
- package/src/directive/permission/hasPermi.js +34 -1
- package/src/index.js +472 -190
- package/src/lang/index.js +56 -51
- package/src/lang/locale/en/login.js +27 -0
- package/src/lang/locale/zh/login.js +26 -0
- package/src/layout/components/AppMain.vue +147 -111
- package/src/layout/components/Sidebar/default.vue +1655 -1222
- package/src/layout/components/Sidebar/index.vue +6 -1
- package/src/layout/components/TagsView/index.vue +57 -15
- package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
- package/src/layout/components/extractedCode/createDialog.vue +92 -0
- package/src/layout/components/extractedCode/queryDialog.vue +103 -0
- package/src/layout/components/extractedCode/viewDialog.vue +207 -0
- package/src/layout/components/langTool.vue +128 -120
- package/src/layout/components/watermark/index.vue +83 -0
- package/src/layout/defaultLayout.vue +170 -150
- package/src/microRouter/index.js +444 -0
- package/src/mixins/selectDialog/index.js +266 -1
- package/src/mixins/tableTree/index.js +199 -4
- package/src/mixins/wf/index.js +33 -1
- package/src/permission.js +158 -16
- package/src/public-path.js +38 -0
- package/src/resources/js/base/common.js +109 -109
- package/src/router/index.js +4 -7
- package/src/router/modules/customer.js +21 -18
- package/src/router/modules/system.js +4 -0
- package/src/store/config/index.js +667 -600
- package/src/store/getters.js +4 -1
- package/src/store/modules/micro.js +57 -0
- package/src/store/modules/permission.js +517 -23
- package/src/store/modules/settings.js +26 -1
- package/src/store/modules/tagsView.js +206 -5
- package/src/store/modules/user.js +418 -28
- package/src/utils/aes.js +21 -1
- package/src/utils/auth.js +27 -1
- package/src/utils/componentDialog.js +339 -0
- package/src/utils/global.js +370 -8
- package/src/utils/index.js +579 -7
- package/src/utils/keepAlive.js +185 -1
- package/src/utils/menuAdapter.js +277 -0
- package/src/utils/pddLog.js +92 -0
- package/src/utils/pdfUtil.js +71 -0
- package/src/utils/repeatOpen.js +48 -0
- package/src/utils/request.js +417 -28
- package/src/utils/resolveViewComponent.js +198 -0
- package/src/utils/vab.js +1276 -27
- package/src/utils/validate.js +104 -1
- package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
- package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
- package/src/views/bd/setting/bd_attach_setting/mixins/dialog.js +84 -1
- package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +116 -5
- package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
- package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
- package/src/views/bd/setting/bd_company_env/list.vue +175 -0
- package/src/views/bd/setting/config_manage/list.vue +83 -0
- package/src/views/bd/setting/formVersion/button.vue +55 -0
- package/src/views/bd/setting/formVersion/compareBasicSection.vue +125 -0
- package/src/views/bd/setting/formVersion/compareCodeSection.vue +539 -0
- package/src/views/bd/setting/formVersion/compareContMixin.scss +65 -0
- package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
- package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
- package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
- package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
- package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
- package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +483 -0
- package/src/views/bd/setting/formVersion/link.vue +58 -0
- package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
- package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
- package/src/views/bd/setting/formVersion/tableDetailDiff.js +99 -0
- package/src/views/bd/setting/formVersion/tableModelCompareView.vue +514 -0
- package/src/views/bd/setting/formVersion/textDiff.js +102 -0
- package/src/views/bd/setting/form_import_log/edit.vue +130 -0
- package/src/views/bd/setting/form_import_log/list.vue +211 -0
- package/src/views/bd/setting/form_script/edit.vue +196 -74
- package/src/views/bd/setting/form_script/edit1.vue +410 -187
- package/src/views/bd/setting/form_script/form_list.vue +174 -85
- package/src/views/bd/setting/form_script/list.vue +95 -21
- package/src/views/bd/setting/form_script/list1.vue +205 -118
- package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +265 -7
- package/src/views/bd/setting/form_script/mixins/edit1.js +259 -9
- package/src/views/bd/setting/form_script/mixins/form_list.js +320 -4
- package/src/views/bd/setting/form_script/mixins/list.js +307 -4
- package/src/views/bd/setting/form_script/mixins/list1.js +512 -14
- package/src/views/bd/setting/form_script/mixins/list2.js +10 -1
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
- package/src/views/bd/setting/form_script/mixins/preformDialog.js +34 -1
- package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +3 -3
- package/src/views/bd/setting/form_template/edit.vue +355 -184
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
- package/src/views/bd/setting/form_template/list.vue +301 -214
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +279 -1
- package/src/views/bd/setting/form_template/mixins/dialog.js +103 -1
- package/src/views/bd/setting/form_template/mixins/edit.js +277 -9
- package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +92 -1
- package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +91 -1
- package/src/views/bd/setting/form_template/mixins/itemEdit.js +104 -1
- package/src/views/bd/setting/form_template/mixins/itemList.js +234 -1
- package/src/views/bd/setting/form_template/mixins/list.js +721 -22
- package/src/views/bd/setting/form_template/mixins/list2.js +411 -0
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
- package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -3
- package/src/views/bd/setting/form_template/mixins/wf_list.js +421 -3
- package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +253 -254
- package/src/views/bd/setting/form_template/wf_list.vue +161 -127
- package/src/views/bd/setting/logic_param/edit.vue +146 -0
- package/src/views/bd/setting/logic_param/edit1.vue +106 -0
- package/src/views/bd/setting/logic_param/edit2.vue +139 -0
- package/src/views/bd/setting/logic_param/list.vue +74 -0
- package/src/views/bd/setting/logic_param/list1.vue +12 -0
- package/src/views/bd/setting/logic_param/list2.vue +12 -0
- package/src/views/bd/setting/logic_param/mixins/edit.js +93 -0
- package/src/views/bd/setting/logic_param/mixins/list.js +376 -0
- package/src/views/bd/setting/menu_kind/list.vue +172 -83
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
- package/src/views/bd/setting/menu_kind/mixins/dialog.js +139 -1
- package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
- package/src/views/bd/setting/push_data/edit.vue +139 -0
- package/src/views/bd/setting/push_data/list.vue +283 -0
- package/src/views/bd/setting/push_data_h/edit.vue +153 -0
- package/src/views/bd/setting/push_data_h/list.vue +293 -0
- package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
- package/src/views/bd/setting/request_async_setting/list.vue +372 -0
- package/src/views/bd/setting/request_setting/edit.vue +300 -0
- package/src/views/bd/setting/request_setting/list.vue +301 -0
- package/src/views/bd/setting/table_model/edit.vue +1079 -426
- package/src/views/bd/setting/table_model/list.vue +218 -128
- package/src/views/bd/setting/table_model/mixins/dialog.js +71 -1
- package/src/views/bd/setting/table_model/mixins/edit.js +1309 -13
- package/src/views/bd/setting/table_model/mixins/list.js +463 -2
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +114 -3
- package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/utils/index.js +75 -1
- package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
- package/src/views/support/form-dialog-demo/index.vue +537 -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/commMenu/index.vue +2 -2
- package/src/views/user/common_attribute/list.vue +4 -1
- package/src/views/user/company_info/dialog.vue +195 -163
- package/src/views/user/extend_datasource/dialog.vue +3 -0
- package/src/views/user/extend_datasource/edit.vue +2 -1
- package/src/views/user/extend_datasource/list.vue +3 -0
- package/src/views/user/fieldTranslation/editDialog.vue +8 -8
- package/src/views/user/fieldTranslation/list.vue +33 -33
- package/src/views/user/file_view_ins/list.vue +22 -1
- package/src/views/user/form/vform/designer.vue +792 -749
- package/src/views/user/form/vform/formFieldMapping.js +2 -3
- package/src/views/user/form/vform/out_render.vue +1 -1
- package/src/views/user/form/vform/render.vue +65 -52
- package/src/views/user/form/view/edit.vue +56 -37
- package/src/views/user/form/view/list.vue +474 -54
- package/src/views/user/home/default.vue +1117 -979
- package/src/views/user/home/default2.vue +1158 -0
- package/src/views/user/home/dev.vue +29 -0
- package/src/views/user/home/index.vue +20 -16
- package/src/views/user/login/default.vue +165 -44
- package/src/views/user/login/index.vue +4 -6
- package/src/views/user/login/indexMixin.js +582 -380
- package/src/views/user/menu/list.vue +50 -1
- package/src/views/user/menuFallback/index.vue +123 -0
- package/src/views/user/notify_message/dialog.vue +65 -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 +202 -211
- package/src/views/user/outLink/index.vue +62 -19
- package/src/views/user/outLink/view.vue +5 -13
- package/src/views/user/position/list.vue +4 -4
- 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/request_setting/edit.vue +258 -0
- package/src/views/user/request_setting/list.vue +248 -0
- package/src/views/user/role/authConfig.vue +89 -0
- package/src/views/user/role/dialog.vue +70 -48
- package/src/views/user/role/edit.vue +609 -429
- package/src/views/user/role/list.vue +4 -4
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/sale_org/list.vue +4 -1
- package/src/views/user/system_notice/infoDialog.vue +61 -1
- package/src/views/user/user/dialog.vue +46 -23
- package/src/views/user/user/edit.vue +1391 -1021
- package/src/views/user/user/form_dialog.vue +158 -0
- package/src/views/user/user/form_info.vue +210 -0
- package/src/views/user/user/info.vue +253 -140
- package/src/views/user/user/list.vue +652 -563
- package/src/views/user/user/modifyPasswordDialog.vue +64 -53
- package/src/views/user/wf/iframe/index.vue +6 -1
- package/src/views/user/wf/iframe/index2.vue +6 -1
- package/src/views/user/wf/wfReport/index.vue +625 -0
- package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
- package/src/views/user/wf/wf_manage/list.vue +678 -256
- package/src/views/user/wf/wf_manage/list2.vue +875 -0
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +47 -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_transfer_setting/edit.vue +282 -0
- package/src/views/user/wf/wf_transfer_setting/list.vue +319 -0
- package/src/views/user/workbench_menu/list.vue +555 -0
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1347
- package/src/utils/wf.js +0 -21
|
@@ -1,219 +1,302 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
<el-dialog
|
|
3
|
+
custom-class="dialog-style list-dialog table-column-config-dialog"
|
|
4
|
+
:title="i18nt('designer.setting.tableColEdit')"
|
|
5
|
+
:visible.sync="showDialog"
|
|
6
|
+
:modal="false"
|
|
7
|
+
:show-close="!0"
|
|
8
|
+
:close-on-click-modal="!1"
|
|
9
|
+
:close-on-press-escape="!1"
|
|
10
|
+
:destroy-on-close="false"
|
|
11
|
+
top="5vh"
|
|
12
|
+
width="1220px"
|
|
13
|
+
v-dialog-drag
|
|
14
|
+
:before-close="closeHandle"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
class="cont table-column-dialog-cont"
|
|
18
|
+
v-loading="!tableReady"
|
|
19
|
+
element-loading-background="rgba(0, 0, 0, 0)"
|
|
20
|
+
element-loading-text="数据正在加载中"
|
|
21
|
+
element-loading-spinner="el-icon-loading"
|
|
16
22
|
>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
<el-table
|
|
24
|
+
v-if="tableReady"
|
|
25
|
+
ref="singleTable"
|
|
26
|
+
width="100%"
|
|
27
|
+
:data="tableData"
|
|
28
|
+
height="500"
|
|
29
|
+
border=""
|
|
30
|
+
row-key="columnId"
|
|
31
|
+
stripe=""
|
|
32
|
+
:tree-props="{ children: 'children' }"
|
|
33
|
+
:default-expand-all="shouldExpandAllTable"
|
|
34
|
+
>
|
|
35
|
+
<el-table-column label="" width="80" fixed="left">
|
|
36
|
+
<template #default="scope">
|
|
37
|
+
<span>{{ scope.$index + 1 }}</span>
|
|
38
|
+
</template>
|
|
39
|
+
</el-table-column>
|
|
40
|
+
<el-table-column label="" width="35" fixed="left"
|
|
41
|
+
><i class="el-icon-s-operation drag-option"></i>
|
|
42
|
+
</el-table-column>
|
|
43
|
+
<el-table-column
|
|
44
|
+
:label="i18nt('designer.setting.columnLabel')"
|
|
45
|
+
width="150"
|
|
46
|
+
prop="label"
|
|
47
|
+
fixed="left"
|
|
28
48
|
>
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<el-switch v-model="scope.row.required"></el-switch>
|
|
59
|
-
</template>
|
|
60
|
-
</el-table-column>
|
|
61
|
-
<el-table-column :label="i18nt('designer.setting.sortableColumn')" width="70" prop="sortable">
|
|
62
|
-
<template slot-scope="scope">
|
|
63
|
-
<el-switch v-model="scope.row.sortable"></el-switch>
|
|
64
|
-
</template>
|
|
65
|
-
</el-table-column>
|
|
66
|
-
<el-table-column :label="i18nt('明细行')" width="70" prop="sortable">
|
|
67
|
-
<template slot-scope="scope">
|
|
68
|
-
<el-switch v-model="scope.row.isItemLine"></el-switch>
|
|
69
|
-
</template>
|
|
70
|
-
</el-table-column>
|
|
71
|
-
<el-table-column :label="i18nt('designer.setting.fixedColumn')" width="100" prop="fixed">
|
|
72
|
-
<template slot-scope="scope">
|
|
73
|
-
<el-select v-model="scope.row.fixed" clearable>
|
|
74
|
-
<el-option value="left">left</el-option>
|
|
75
|
-
<el-option value="right">right</el-option>
|
|
76
|
-
</el-select>
|
|
77
|
-
</template>
|
|
78
|
-
</el-table-column>
|
|
79
|
-
<!-- <el-table-column :label="i18nt('designer.setting.alignTypeOfColumn')" width="100" prop="align">
|
|
80
|
-
<template slot-scope="scope">
|
|
81
|
-
<el-select v-model="scope.row.align">
|
|
82
|
-
<el-option v-for="(e,index) in alignOptions" :key="index" :value="e.value" :label="e.label"></el-option>
|
|
83
|
-
</el-select>
|
|
84
|
-
</template>
|
|
85
|
-
</el-table-column>-->
|
|
86
|
-
<el-table-column :label="i18nt('designer.setting.formatOfColumn')" width="200" prop="formatS">
|
|
87
|
-
<template slot-scope="scope">
|
|
88
|
-
<el-select v-model="scope.row.formatS" @change="changeFormatS(scope.row)" clearable>
|
|
89
|
-
<el-option-group :label="i18nt('designer.setting.customRenderGroup')">
|
|
90
|
-
<el-option value="render" label="render"></el-option>
|
|
91
|
-
</el-option-group>
|
|
92
|
-
<el-option-group v-for="t in op" :key="t.label" :label="t.label">
|
|
93
|
-
<el-option v-for="e in t.options" :key="e.value" :value="e.value" :label="e.label"></el-option>
|
|
94
|
-
</el-option-group>
|
|
95
|
-
</el-select>
|
|
96
|
-
</template>
|
|
97
|
-
</el-table-column>
|
|
98
|
-
<el-table-column :label="i18nt('自定义表格列配置')" width="150">
|
|
99
|
-
<template slot-scope="scope">
|
|
100
|
-
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
101
|
-
@click="openTableColumnConfigDialog(scope.row,scope.$index)">
|
|
102
|
-
<span>{{ scope.row.tableColumnConfig }}</span>
|
|
103
|
-
<i class="el-icon-edit"></i>
|
|
104
|
-
</a>
|
|
105
|
-
</template>
|
|
106
|
-
</el-table-column>
|
|
107
|
-
<el-table-column :label="i18nt('编辑下拉列')" width="70" prop="sortable">
|
|
108
|
-
<template slot-scope="scope">
|
|
109
|
-
<el-switch v-model="scope.row.treeNode"></el-switch>
|
|
110
|
-
</template>
|
|
111
|
-
</el-table-column>
|
|
112
|
-
<el-table-column :label="i18nt('编辑插槽类型')" width="200" prop="editFormatS">
|
|
113
|
-
<template slot-scope="scope">
|
|
114
|
-
<el-select v-model="scope.row.editFormatS" @change="changeFormatS(scope.row)" clearable>
|
|
115
|
-
<el-option v-for="e in editOp" :key="e.value" :value="e.value" :label="e.label"></el-option>
|
|
116
|
-
</el-select>
|
|
117
|
-
</template>
|
|
118
|
-
</el-table-column>
|
|
119
|
-
<el-table-column label="编辑插槽配置" width="70" align="center">
|
|
120
|
-
<template slot-scope="scope">
|
|
121
|
-
<el-button size="mini" plain="" round="" icon="el-icon-edit"
|
|
122
|
-
@click="openEditFormatConfigDialog(scope.row,scope.$index)"
|
|
123
|
-
:disabled="!scope.row.editFormatS"></el-button>
|
|
124
|
-
</template>
|
|
125
|
-
</el-table-column>
|
|
126
|
-
<el-table-column :label="i18nt('导出类型')" width="200" prop="formatS">
|
|
127
|
-
<template slot-scope="scope">
|
|
128
|
-
<el-select v-model="scope.row.exportType" clearable>
|
|
129
|
-
<el-option value="Image2" label="图片"></el-option>
|
|
130
|
-
<el-option value="Number" label="数值"></el-option>
|
|
131
|
-
</el-select>
|
|
132
|
-
</template>
|
|
133
|
-
</el-table-column>
|
|
134
|
-
<el-table-column label="格式化配置" width="90" fixed="right" align="center">
|
|
135
|
-
<template slot-scope="scope">
|
|
136
|
-
<el-button size="mini" plain="" round="" icon="el-icon-edit"
|
|
137
|
-
@click="openFormatConfigDialog(scope.row,scope.$index)"
|
|
138
|
-
:disabled="!columnFormatMap[scope.row.formatS]"></el-button>
|
|
139
|
-
</template>
|
|
140
|
-
</el-table-column>
|
|
141
|
-
<el-table-column :label="i18nt('designer.setting.renderFunction')" width="70" fixed="right" align="center">
|
|
142
|
-
<template slot-scope="scope">
|
|
143
|
-
<el-button :disabled="'render' !== scope.row.formatS" size="mini" plain="" round="" icon="el-icon-edit"
|
|
144
|
-
@click="showRenderDialog(scope.row)"></el-button>
|
|
145
|
-
</template>
|
|
146
|
-
</el-table-column>
|
|
147
|
-
<el-table-column label="操作" width="150" fixed="right">
|
|
148
|
-
<template slot="header">
|
|
149
|
-
<el-tooltip
|
|
150
|
-
:hide-after="500"
|
|
151
|
-
class="item"
|
|
152
|
-
effect="dark"
|
|
153
|
-
content="添加根节点"
|
|
154
|
-
placement="top"
|
|
155
|
-
>
|
|
156
|
-
<el-button
|
|
157
|
-
size="mini" type="" circle=""
|
|
158
|
-
icon="el-icon-plus"
|
|
159
|
-
@click="onAddRoot"
|
|
160
|
-
/>
|
|
161
|
-
</el-tooltip>
|
|
162
|
-
</template>
|
|
163
|
-
<template #default="{ row, $index }">
|
|
164
|
-
<el-tooltip
|
|
165
|
-
:hide-after="hideAfter"
|
|
166
|
-
:open-delay="openDelay"
|
|
167
|
-
effect="dark"
|
|
168
|
-
content="添加兄弟节点"
|
|
169
|
-
placement="top"
|
|
170
|
-
>
|
|
171
|
-
<el-button
|
|
172
|
-
size="mini" type="" circle=""
|
|
173
|
-
icon="el-icon-plus"
|
|
174
|
-
@click="onAddSibling(row, $index)"
|
|
175
|
-
/>
|
|
176
|
-
</el-tooltip>
|
|
49
|
+
<template #default="scope">
|
|
50
|
+
<el-input
|
|
51
|
+
v-model="scope.row.label"
|
|
52
|
+
@change="changeRowLabel(scope.row)"
|
|
53
|
+
></el-input>
|
|
54
|
+
</template>
|
|
55
|
+
</el-table-column>
|
|
56
|
+
<el-table-column
|
|
57
|
+
:label="i18nt('designer.setting.columnName')"
|
|
58
|
+
width="150"
|
|
59
|
+
prop="prop"
|
|
60
|
+
>
|
|
61
|
+
<template #default="scope">
|
|
62
|
+
<el-input
|
|
63
|
+
v-model="scope.row.prop"
|
|
64
|
+
@change="changeRowProp(scope.row)"
|
|
65
|
+
:disabled="'editAttachment' == scope.row.formatS"
|
|
66
|
+
></el-input>
|
|
67
|
+
</template>
|
|
68
|
+
</el-table-column>
|
|
69
|
+
<el-table-column
|
|
70
|
+
:label="i18nt('designer.setting.columnWidth')"
|
|
71
|
+
width="100"
|
|
72
|
+
prop="width"
|
|
73
|
+
>
|
|
74
|
+
<template #default="scope">
|
|
75
|
+
<el-input v-model="scope.row.width"></el-input>
|
|
76
|
+
</template>
|
|
77
|
+
</el-table-column>
|
|
177
78
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
79
|
+
<el-table-column :label="i18nt('必填')" width="70" prop="required">
|
|
80
|
+
<template #default="scope">
|
|
81
|
+
<el-switch
|
|
82
|
+
v-model="scope.row.required"
|
|
83
|
+
@change="changeRowRequired(scope.row)"
|
|
84
|
+
></el-switch>
|
|
85
|
+
</template>
|
|
86
|
+
</el-table-column>
|
|
87
|
+
<el-table-column
|
|
88
|
+
:label="i18nt('designer.setting.fixedColumn')"
|
|
89
|
+
width="100"
|
|
90
|
+
prop="fixed"
|
|
91
|
+
>
|
|
92
|
+
<template #default="scope">
|
|
93
|
+
<el-select v-model="scope.row.fixed" clearable>
|
|
94
|
+
<el-option value="left">left</el-option>
|
|
95
|
+
<el-option value="right">right</el-option>
|
|
96
|
+
</el-select>
|
|
97
|
+
</template>
|
|
98
|
+
</el-table-column>
|
|
99
|
+
<el-table-column
|
|
100
|
+
:label="i18nt('designer.setting.formatOfColumn')"
|
|
101
|
+
width="200"
|
|
102
|
+
prop="formatS"
|
|
103
|
+
>
|
|
104
|
+
<template #default="scope">
|
|
105
|
+
<el-select
|
|
106
|
+
v-model="scope.row.formatS"
|
|
107
|
+
@change="changeFormatS(scope.row, false)"
|
|
108
|
+
clearable
|
|
109
|
+
>
|
|
110
|
+
<el-option-group
|
|
111
|
+
:label="i18nt('designer.setting.customRenderGroup')"
|
|
197
112
|
>
|
|
198
|
-
<el-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
113
|
+
<el-option value="render" label="render"></el-option>
|
|
114
|
+
</el-option-group>
|
|
115
|
+
<el-option-group v-for="t in op" :key="t.label" :label="t.label">
|
|
116
|
+
<el-option
|
|
117
|
+
v-for="e in t.options"
|
|
118
|
+
:key="e.value"
|
|
119
|
+
:value="e.value"
|
|
120
|
+
:label="e.label"
|
|
121
|
+
></el-option>
|
|
122
|
+
</el-option-group>
|
|
123
|
+
</el-select>
|
|
124
|
+
</template>
|
|
125
|
+
</el-table-column>
|
|
126
|
+
<el-table-column label="格式化配置" width="90" align="center">
|
|
127
|
+
<template #default="scope">
|
|
128
|
+
<el-button
|
|
129
|
+
size="mini"
|
|
130
|
+
plain=""
|
|
131
|
+
round=""
|
|
132
|
+
icon="el-icon-edit"
|
|
133
|
+
@click="openFormatConfigDialog(scope.row, scope.$index)"
|
|
134
|
+
:disabled="
|
|
135
|
+
!columnFormatMap[scope.row.formatS] &&
|
|
136
|
+
'widgetRender' !== scope.row.formatS &&
|
|
137
|
+
'editTreeButtonGroup' !== scope.row.formatS
|
|
138
|
+
"
|
|
139
|
+
></el-button>
|
|
140
|
+
</template>
|
|
141
|
+
</el-table-column>
|
|
142
|
+
<el-table-column
|
|
143
|
+
:label="i18nt('designer.setting.renderFunction')"
|
|
144
|
+
width="70"
|
|
145
|
+
align="center"
|
|
146
|
+
>
|
|
147
|
+
<template #default="scope">
|
|
148
|
+
<el-button
|
|
149
|
+
:disabled="'render' !== scope.row.formatS"
|
|
150
|
+
size="mini"
|
|
151
|
+
plain=""
|
|
152
|
+
round=""
|
|
153
|
+
icon="el-icon-edit"
|
|
154
|
+
@click="showRenderDialog(scope.row)"
|
|
155
|
+
></el-button>
|
|
156
|
+
</template>
|
|
157
|
+
</el-table-column>
|
|
158
|
+
<el-table-column
|
|
159
|
+
:label="i18nt('designer.setting.visibleColumn')"
|
|
160
|
+
width="70"
|
|
161
|
+
prop="show"
|
|
162
|
+
>
|
|
163
|
+
<template #default="scope">
|
|
164
|
+
<el-switch v-model="scope.row.show"></el-switch>
|
|
165
|
+
</template>
|
|
166
|
+
</el-table-column>
|
|
167
|
+
<el-table-column
|
|
168
|
+
:label="i18nt('designer.setting.sortableColumn')"
|
|
169
|
+
width="70"
|
|
170
|
+
prop="sortable"
|
|
171
|
+
>
|
|
172
|
+
<template #default="scope">
|
|
173
|
+
<el-switch v-model="scope.row.sortable"></el-switch>
|
|
174
|
+
</template>
|
|
175
|
+
</el-table-column>
|
|
176
|
+
<el-table-column label="显示筛选" width="70" prop="filterable">
|
|
177
|
+
<template #default="scope">
|
|
178
|
+
<el-switch v-model="scope.row.filterable"></el-switch>
|
|
179
|
+
</template>
|
|
180
|
+
</el-table-column>
|
|
181
|
+
<el-table-column label="UTC时差转换" width="90" align="center">
|
|
182
|
+
<template #default="scope">
|
|
183
|
+
<el-switch
|
|
184
|
+
v-if="isUtcTransformColumn(scope.row)"
|
|
185
|
+
v-model="scope.row.utcTransformEnabled"
|
|
186
|
+
></el-switch>
|
|
187
|
+
</template>
|
|
188
|
+
</el-table-column>
|
|
189
|
+
<el-table-column
|
|
190
|
+
label="编辑更多属性"
|
|
191
|
+
width="100"
|
|
192
|
+
align="center"
|
|
193
|
+
fixed="right"
|
|
194
|
+
>
|
|
195
|
+
<template #default="scope">
|
|
196
|
+
<el-button
|
|
197
|
+
size="mini"
|
|
198
|
+
plain=""
|
|
199
|
+
round=""
|
|
200
|
+
icon="el-icon-edit"
|
|
201
|
+
@click="openRowEditDialog(scope.row, scope.$index)"
|
|
202
|
+
></el-button>
|
|
203
|
+
</template>
|
|
204
|
+
</el-table-column>
|
|
205
|
+
<el-table-column label="操作" width="150" fixed="right">
|
|
206
|
+
<template slot="header">
|
|
207
|
+
<el-tooltip
|
|
208
|
+
:hide-after="500"
|
|
209
|
+
class="item"
|
|
210
|
+
effect="dark"
|
|
211
|
+
content="添加根节点"
|
|
212
|
+
placement="top"
|
|
213
|
+
>
|
|
214
|
+
<el-button
|
|
215
|
+
size="mini"
|
|
216
|
+
type=""
|
|
217
|
+
circle=""
|
|
218
|
+
icon="el-icon-plus"
|
|
219
|
+
@click="onAddRoot"
|
|
220
|
+
/>
|
|
221
|
+
</el-tooltip>
|
|
222
|
+
</template>
|
|
223
|
+
<template #default="{ row, $index }">
|
|
224
|
+
<el-tooltip
|
|
225
|
+
:hide-after="hideAfter"
|
|
226
|
+
:open-delay="openDelay"
|
|
227
|
+
effect="dark"
|
|
228
|
+
content="添加兄弟节点"
|
|
229
|
+
placement="top"
|
|
230
|
+
>
|
|
231
|
+
<el-button
|
|
232
|
+
size="mini"
|
|
233
|
+
type=""
|
|
234
|
+
circle=""
|
|
235
|
+
icon="el-icon-plus"
|
|
236
|
+
@click="onAddSibling(row, $index)"
|
|
237
|
+
/>
|
|
238
|
+
</el-tooltip>
|
|
239
|
+
|
|
240
|
+
<el-tooltip
|
|
241
|
+
:hide-after="hideAfter"
|
|
242
|
+
:open-delay="openDelay"
|
|
243
|
+
effect="dark"
|
|
244
|
+
content="添加子节点"
|
|
245
|
+
placement="top"
|
|
246
|
+
>
|
|
247
|
+
<el-button
|
|
248
|
+
size="mini"
|
|
249
|
+
type=""
|
|
250
|
+
circle=""
|
|
251
|
+
icon="el-icon-circle-plus-outline"
|
|
252
|
+
@click="onAddChild(row, $index)"
|
|
253
|
+
/>
|
|
254
|
+
</el-tooltip>
|
|
255
|
+
<el-tooltip
|
|
256
|
+
:hide-after="hideAfter"
|
|
257
|
+
:open-delay="openDelay"
|
|
258
|
+
effect="dark"
|
|
259
|
+
content="删除"
|
|
260
|
+
placement="top"
|
|
261
|
+
>
|
|
262
|
+
<el-button
|
|
263
|
+
size="mini"
|
|
264
|
+
type=""
|
|
265
|
+
circle=""
|
|
266
|
+
icon="el-icon-delete"
|
|
267
|
+
@click="onDelete(row, $index)"
|
|
268
|
+
/>
|
|
269
|
+
</el-tooltip>
|
|
270
|
+
</template>
|
|
271
|
+
</el-table-column>
|
|
272
|
+
</el-table>
|
|
273
|
+
<columnRenderDialog
|
|
274
|
+
:column="currentTableColumn"
|
|
275
|
+
:sourceData="sourceData"
|
|
276
|
+
v-if="showColumnRenderDialog"
|
|
277
|
+
:visiable.sync="showColumnRenderDialog"
|
|
278
|
+
@confirm="confirmWidgetRenderDialog"
|
|
279
|
+
></columnRenderDialog>
|
|
280
|
+
<editTreeButtonGroupConfigDialog
|
|
281
|
+
v-if="showEditTreeButtonGroupConfigDialog && editTreeButtonGroupRowData"
|
|
282
|
+
:visible.sync="showEditTreeButtonGroupConfigDialog"
|
|
283
|
+
:row="editTreeButtonGroupRowData"
|
|
284
|
+
@confirm="confirmEditTreeButtonGroupConfig"
|
|
285
|
+
/>
|
|
286
|
+
</div>
|
|
287
|
+
<div class="dialog-footer" slot="footer">
|
|
288
|
+
<el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
|
|
289
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
290
|
+
</el-button>
|
|
291
|
+
<el-button
|
|
292
|
+
type="primary"
|
|
293
|
+
@click="colSubmit"
|
|
294
|
+
class="button-sty"
|
|
295
|
+
icon="el-icon-check"
|
|
296
|
+
>
|
|
297
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
298
|
+
</el-button>
|
|
299
|
+
</div>
|
|
217
300
|
<el-dialog
|
|
218
301
|
v-if="showRenderDialogFlag"
|
|
219
302
|
:title="i18nt('designer.setting.renderFunction')"
|
|
@@ -226,16 +309,35 @@
|
|
|
226
309
|
:destroy-on-close="!0"
|
|
227
310
|
v-dialog-drag
|
|
228
311
|
top="7vh"
|
|
312
|
+
:append-to-body="true"
|
|
229
313
|
>
|
|
230
|
-
<el-alert
|
|
231
|
-
|
|
232
|
-
|
|
314
|
+
<el-alert
|
|
315
|
+
type="info"
|
|
316
|
+
:closable="!1"
|
|
317
|
+
title="function customRender(params,h) {"
|
|
318
|
+
/>
|
|
319
|
+
<code-editor
|
|
320
|
+
ref="dsResultEditor"
|
|
321
|
+
mode="javascript"
|
|
322
|
+
:readonly="!1"
|
|
323
|
+
v-model="renderJson"
|
|
324
|
+
></code-editor>
|
|
325
|
+
<el-alert type="info" :closable="!1" title="}" />
|
|
233
326
|
<div class="dialog-footer" slot="footer">
|
|
234
|
-
<el-button
|
|
235
|
-
|
|
327
|
+
<el-button
|
|
328
|
+
@click="showRenderDialogFlag = !1"
|
|
329
|
+
class="button-sty"
|
|
330
|
+
icon="el-icon-close"
|
|
331
|
+
>
|
|
332
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
236
333
|
</el-button>
|
|
237
|
-
<el-button
|
|
238
|
-
|
|
334
|
+
<el-button
|
|
335
|
+
type="primary"
|
|
336
|
+
@click="saveColumnRender"
|
|
337
|
+
class="button-sty"
|
|
338
|
+
icon="el-icon-check"
|
|
339
|
+
>
|
|
340
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
239
341
|
</el-button>
|
|
240
342
|
</div>
|
|
241
343
|
</el-dialog>
|
|
@@ -254,305 +356,962 @@
|
|
|
254
356
|
top="5vh"
|
|
255
357
|
>
|
|
256
358
|
<div class="cont">
|
|
257
|
-
<el-alert
|
|
258
|
-
|
|
259
|
-
|
|
359
|
+
<el-alert
|
|
360
|
+
type="info"
|
|
361
|
+
:closable="false"
|
|
362
|
+
:title="tableColumnConfigHeader"
|
|
363
|
+
></el-alert>
|
|
364
|
+
<code-editor
|
|
365
|
+
:mode="'javascript'"
|
|
366
|
+
:readonly="false"
|
|
367
|
+
v-model="tableColumnConfigCode"
|
|
368
|
+
ref="ecEditor"
|
|
369
|
+
></code-editor>
|
|
260
370
|
<el-alert type="info" :closable="false" title="}"></el-alert>
|
|
261
371
|
</div>
|
|
262
372
|
<div slot="footer" class="dialog-footer">
|
|
263
|
-
<el-button
|
|
264
|
-
|
|
373
|
+
<el-button
|
|
374
|
+
@click="showTableColumnConfigDialog = false"
|
|
375
|
+
class="button-sty"
|
|
376
|
+
icon="el-icon-close"
|
|
377
|
+
>
|
|
378
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
265
379
|
</el-button>
|
|
266
|
-
<el-button
|
|
267
|
-
|
|
380
|
+
<el-button
|
|
381
|
+
type="primary"
|
|
382
|
+
@click="saveTableColumnConfigDialog"
|
|
383
|
+
class="button-sty"
|
|
384
|
+
icon="el-icon-check"
|
|
385
|
+
>
|
|
386
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
268
387
|
</el-button>
|
|
269
388
|
</div>
|
|
270
389
|
</el-dialog>
|
|
271
|
-
|
|
390
|
+
<el-dialog
|
|
391
|
+
:title="i18nt('designer.setting.editFormEventHandler')"
|
|
392
|
+
:visible.sync="showFormEventDialogFlag"
|
|
393
|
+
v-if="showFormEventDialogFlag"
|
|
394
|
+
:show-close="true"
|
|
395
|
+
custom-class="dialog-style list-dialog"
|
|
396
|
+
v-dialog-drag
|
|
397
|
+
:close-on-click-modal="false"
|
|
398
|
+
:close-on-press-escape="false"
|
|
399
|
+
:destroy-on-close="true"
|
|
400
|
+
:append-to-body="true"
|
|
401
|
+
:modal-append-to-body="true"
|
|
402
|
+
top="5vh"
|
|
403
|
+
>
|
|
404
|
+
<div class="cont">
|
|
405
|
+
<el-alert
|
|
406
|
+
type="info"
|
|
407
|
+
:closable="false"
|
|
408
|
+
:title="'form.' + eventParamsMap[curEventName]"
|
|
409
|
+
></el-alert>
|
|
410
|
+
<code-editor
|
|
411
|
+
:mode="'javascript'"
|
|
412
|
+
:readonly="false"
|
|
413
|
+
v-model="formEventHandlerCode"
|
|
414
|
+
ref="ecEditor"
|
|
415
|
+
></code-editor>
|
|
416
|
+
<el-alert type="info" :closable="false" title="}"></el-alert>
|
|
417
|
+
</div>
|
|
418
|
+
<div slot="footer" class="dialog-footer">
|
|
419
|
+
<el-button
|
|
420
|
+
@click="showFormEventDialogFlag = false"
|
|
421
|
+
class="button-sty"
|
|
422
|
+
icon="el-icon-close"
|
|
423
|
+
>
|
|
424
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
425
|
+
</el-button>
|
|
426
|
+
<el-button
|
|
427
|
+
type="primary"
|
|
428
|
+
@click="saveFormEventHandler"
|
|
429
|
+
class="button-sty"
|
|
430
|
+
icon="el-icon-check"
|
|
431
|
+
>
|
|
432
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
433
|
+
</el-button>
|
|
434
|
+
</div>
|
|
435
|
+
</el-dialog>
|
|
436
|
+
|
|
437
|
+
<el-dialog
|
|
438
|
+
custom-class="dialog-style list-dialog table-column-row-edit-dialog"
|
|
439
|
+
:title="i18nt('designer.setting.tableColEdit')"
|
|
440
|
+
:visible.sync="showRowEditDialog"
|
|
441
|
+
v-if="showRowEditDialog"
|
|
442
|
+
:modal="false"
|
|
443
|
+
:show-close="!0"
|
|
444
|
+
:close-on-click-modal="!1"
|
|
445
|
+
:close-on-press-escape="!1"
|
|
446
|
+
:destroy-on-close="!0"
|
|
447
|
+
:append-to-body="true"
|
|
448
|
+
:modal-append-to-body="true"
|
|
449
|
+
top="5vh"
|
|
450
|
+
width="480px"
|
|
451
|
+
v-dialog-drag
|
|
452
|
+
>
|
|
453
|
+
<div class="cont table-column-row-edit-cont">
|
|
454
|
+
<el-form :model="rowData" class="form-m2" label-position="top">
|
|
455
|
+
<el-form-item :label="i18nt('designer.setting.columnLabel')">
|
|
456
|
+
<el-input
|
|
457
|
+
v-model="rowData.label"
|
|
458
|
+
@change="changeRowLabel(rowData)"
|
|
459
|
+
></el-input>
|
|
460
|
+
</el-form-item>
|
|
461
|
+
<el-form-item :label="i18nt('designer.setting.columnName')">
|
|
462
|
+
<el-input
|
|
463
|
+
v-model="rowData.prop"
|
|
464
|
+
@change="changeRowProp(rowData)"
|
|
465
|
+
:disabled="'editAttachment' == rowData.formatS"
|
|
466
|
+
></el-input>
|
|
467
|
+
</el-form-item>
|
|
468
|
+
<el-form-item :label="i18nt('designer.setting.columnWidth')">
|
|
469
|
+
<el-input v-model="rowData.width"></el-input>
|
|
470
|
+
</el-form-item>
|
|
471
|
+
<el-form-item :label="i18nt('必填')">
|
|
472
|
+
<el-switch
|
|
473
|
+
v-model="rowData.required"
|
|
474
|
+
@change="changeRowRequired(rowData)"
|
|
475
|
+
></el-switch>
|
|
476
|
+
</el-form-item>
|
|
477
|
+
<el-form-item :label="i18nt('designer.setting.fixedColumn')">
|
|
478
|
+
<el-select v-model="rowData.fixed" clearable>
|
|
479
|
+
<el-option value="left">left</el-option>
|
|
480
|
+
<el-option value="right">right</el-option>
|
|
481
|
+
</el-select>
|
|
482
|
+
</el-form-item>
|
|
483
|
+
<el-form-item :label="i18nt('designer.setting.formatOfColumn')">
|
|
484
|
+
<el-select
|
|
485
|
+
v-model="rowData.formatS"
|
|
486
|
+
@change="changeFormatS(rowData, false)"
|
|
487
|
+
clearable
|
|
488
|
+
>
|
|
489
|
+
<el-option-group
|
|
490
|
+
:label="i18nt('designer.setting.customRenderGroup')"
|
|
491
|
+
>
|
|
492
|
+
<el-option value="render" label="render"></el-option>
|
|
493
|
+
</el-option-group>
|
|
494
|
+
<el-option-group v-for="t in op" :key="t.label" :label="t.label">
|
|
495
|
+
<el-option
|
|
496
|
+
v-for="e in t.options"
|
|
497
|
+
:key="e.value"
|
|
498
|
+
:value="e.value"
|
|
499
|
+
:label="e.label"
|
|
500
|
+
></el-option>
|
|
501
|
+
</el-option-group>
|
|
502
|
+
</el-select>
|
|
503
|
+
</el-form-item>
|
|
504
|
+
<el-form-item label="格式化配置">
|
|
505
|
+
<el-button
|
|
506
|
+
size="mini"
|
|
507
|
+
plain=""
|
|
508
|
+
round=""
|
|
509
|
+
icon="el-icon-edit"
|
|
510
|
+
@click="openFormatConfigDialog(rowData, rowDataIndex)"
|
|
511
|
+
:disabled="
|
|
512
|
+
!columnFormatMap[rowData.formatS] &&
|
|
513
|
+
'widgetRender' !== rowData.formatS &&
|
|
514
|
+
'editTreeButtonGroup' !== rowData.formatS
|
|
515
|
+
"
|
|
516
|
+
></el-button>
|
|
517
|
+
</el-form-item>
|
|
518
|
+
<el-form-item :label="i18nt('designer.setting.renderFunction')">
|
|
519
|
+
<el-button
|
|
520
|
+
:disabled="'render' !== rowData.formatS"
|
|
521
|
+
size="mini"
|
|
522
|
+
plain=""
|
|
523
|
+
round=""
|
|
524
|
+
icon="el-icon-edit"
|
|
525
|
+
@click="showRenderDialog(rowData)"
|
|
526
|
+
></el-button>
|
|
527
|
+
</el-form-item>
|
|
528
|
+
<el-form-item
|
|
529
|
+
v-if="isUtcTransformColumn(rowData)"
|
|
530
|
+
label="UTC时差转换"
|
|
531
|
+
>
|
|
532
|
+
<el-switch v-model="rowData.utcTransformEnabled"></el-switch>
|
|
533
|
+
</el-form-item>
|
|
534
|
+
<el-form-item :label="i18nt('designer.setting.visibleColumn')">
|
|
535
|
+
<el-switch v-model="rowData.show"></el-switch>
|
|
536
|
+
</el-form-item>
|
|
537
|
+
<el-form-item label="动态显示脚本">
|
|
538
|
+
<a
|
|
539
|
+
href="javascript:void(0);"
|
|
540
|
+
class="a-link link-oneLind"
|
|
541
|
+
@click="openColumnShowDialog(rowData)"
|
|
542
|
+
>
|
|
543
|
+
<span>{{ rowData.columnShow }}</span>
|
|
544
|
+
<i class="el-icon-edit"></i>
|
|
545
|
+
</a>
|
|
546
|
+
</el-form-item>
|
|
547
|
+
<el-form-item :label="i18nt('designer.setting.sortableColumn')">
|
|
548
|
+
<el-switch v-model="rowData.sortable"></el-switch>
|
|
549
|
+
</el-form-item>
|
|
550
|
+
<el-form-item label="显示筛选">
|
|
551
|
+
<el-switch v-model="rowData.filterable"></el-switch>
|
|
552
|
+
</el-form-item>
|
|
553
|
+
<el-form-item :label="i18nt('明细行')">
|
|
554
|
+
<el-switch v-model="rowData.isItemLine"></el-switch>
|
|
555
|
+
</el-form-item>
|
|
272
556
|
|
|
557
|
+
<el-form-item :label="i18nt('下拉列')">
|
|
558
|
+
<el-switch v-model="rowData.treeNode"></el-switch>
|
|
559
|
+
</el-form-item>
|
|
560
|
+
<el-form-item :label="i18nt('自定义表格列配置')">
|
|
561
|
+
<a
|
|
562
|
+
href="javascript:void(0);"
|
|
563
|
+
class="a-link link-oneLind"
|
|
564
|
+
@click="openTableColumnConfigDialog(rowData, rowDataIndex)"
|
|
565
|
+
>
|
|
566
|
+
<span>{{ rowData.tableColumnConfig }}</span>
|
|
567
|
+
<i class="el-icon-edit"></i>
|
|
568
|
+
</a>
|
|
569
|
+
</el-form-item>
|
|
570
|
+
<el-form-item :label="i18nt('编辑插槽类型')">
|
|
571
|
+
<el-select
|
|
572
|
+
v-model="rowData.editFormatS"
|
|
573
|
+
@change="changeFormatS(rowData, true)"
|
|
574
|
+
clearable
|
|
575
|
+
>
|
|
576
|
+
<el-option
|
|
577
|
+
v-for="e in editOp"
|
|
578
|
+
:key="e.value"
|
|
579
|
+
:value="e.value"
|
|
580
|
+
:label="e.label"
|
|
581
|
+
></el-option>
|
|
582
|
+
</el-select>
|
|
583
|
+
</el-form-item>
|
|
584
|
+
<el-form-item label="编辑插槽配置">
|
|
585
|
+
<el-button
|
|
586
|
+
size="mini"
|
|
587
|
+
plain=""
|
|
588
|
+
round=""
|
|
589
|
+
icon="el-icon-edit"
|
|
590
|
+
@click="openEditFormatConfigDialog(rowData, rowDataIndex)"
|
|
591
|
+
:disabled="!rowData.editFormatS"
|
|
592
|
+
></el-button>
|
|
593
|
+
</el-form-item>
|
|
594
|
+
<el-form-item :label="i18nt('导出类型')">
|
|
595
|
+
<el-select v-model="rowData.exportType" clearable>
|
|
596
|
+
<el-option value="Image2" label="图片"></el-option>
|
|
597
|
+
<el-option value="Number" label="数值"></el-option>
|
|
598
|
+
</el-select>
|
|
599
|
+
</el-form-item>
|
|
600
|
+
<el-form-item :label="i18nt('表尾统计行类型')">
|
|
601
|
+
<el-select v-model="rowData.footerDataType" clearable>
|
|
602
|
+
<el-option value="1" label="合计"></el-option>
|
|
603
|
+
<el-option value="2" label="平均"></el-option>
|
|
604
|
+
<el-option value="3" label="自定义"></el-option>
|
|
605
|
+
</el-select>
|
|
606
|
+
</el-form-item>
|
|
607
|
+
<el-form-item label="表尾统计行配置">
|
|
608
|
+
<el-button
|
|
609
|
+
size="mini"
|
|
610
|
+
plain=""
|
|
611
|
+
round=""
|
|
612
|
+
icon="el-icon-edit"
|
|
613
|
+
@click="
|
|
614
|
+
editFormEventHandler(rowData, rowDataIndex, 'footerMethodConfg')
|
|
615
|
+
"
|
|
616
|
+
:disabled="rowData.footerDataType !== '3'"
|
|
617
|
+
></el-button>
|
|
618
|
+
</el-form-item>
|
|
619
|
+
<el-form-item :label="i18nt('显示名称颜色')">
|
|
620
|
+
<el-select v-model="rowData.labelColor" clearable>
|
|
621
|
+
<el-option value="#e6a23c" label="橙"></el-option>
|
|
622
|
+
<el-option value="#2a6494" label="蓝"></el-option>
|
|
623
|
+
<el-option value="#30b08f" label="绿"></el-option>
|
|
624
|
+
<el-option value="#909399" label="灰"></el-option>
|
|
625
|
+
<el-option value="#ea5353" label="红"></el-option>
|
|
626
|
+
</el-select>
|
|
627
|
+
</el-form-item>
|
|
628
|
+
<el-form-item label-width="0" class="form-item-full">
|
|
629
|
+
<el-divider class="custom-divider">{{
|
|
630
|
+
i18nt("designer.setting.customLabelIcon")
|
|
631
|
+
}}</el-divider>
|
|
632
|
+
</el-form-item>
|
|
633
|
+
<el-form-item :label="i18nt('designer.setting.labelIconClass')">
|
|
634
|
+
<icon-picker v-model="rowData.labelIconClass"></icon-picker>
|
|
635
|
+
</el-form-item>
|
|
636
|
+
<el-form-item :label="i18nt('designer.setting.labelIconPosition')">
|
|
637
|
+
<el-select
|
|
638
|
+
v-model="rowData.labelIconPosition"
|
|
639
|
+
clearable
|
|
640
|
+
placeholder="默认后面"
|
|
641
|
+
>
|
|
642
|
+
<el-option label="前面" value="front"></el-option>
|
|
643
|
+
<el-option label="后面" value="rear"></el-option>
|
|
644
|
+
</el-select>
|
|
645
|
+
</el-form-item>
|
|
646
|
+
<el-form-item
|
|
647
|
+
:label="i18nt('designer.setting.labelTooltip')"
|
|
648
|
+
class="form-item-full"
|
|
649
|
+
>
|
|
650
|
+
<a
|
|
651
|
+
href="javascript:void(0);"
|
|
652
|
+
class="a-link link-oneLind"
|
|
653
|
+
@click="openLabelTooltipDialog"
|
|
654
|
+
>
|
|
655
|
+
<span>{{ rowData.labelTooltip }}</span>
|
|
656
|
+
<i class="el-icon-edit"></i>
|
|
657
|
+
</a>
|
|
658
|
+
</el-form-item>
|
|
659
|
+
</el-form>
|
|
660
|
+
</div>
|
|
661
|
+
<el-dialog
|
|
662
|
+
v-if="labelTooltipDialogVisible"
|
|
663
|
+
custom-class="dialog-style"
|
|
664
|
+
:title="i18nt('designer.setting.labelTooltip')"
|
|
665
|
+
:visible.sync="labelTooltipDialogVisible"
|
|
666
|
+
:show-close="true"
|
|
667
|
+
:append-to-body="true"
|
|
668
|
+
:modal="false"
|
|
669
|
+
:close-on-click-modal="false"
|
|
670
|
+
:close-on-press-escape="false"
|
|
671
|
+
:destroy-on-close="true"
|
|
672
|
+
width="520px"
|
|
673
|
+
v-dialog-drag
|
|
674
|
+
>
|
|
675
|
+
<el-input
|
|
676
|
+
type="textarea"
|
|
677
|
+
:rows="14"
|
|
678
|
+
class="label-tooltip-textarea"
|
|
679
|
+
v-model="labelTooltipValue"
|
|
680
|
+
clearable
|
|
681
|
+
></el-input>
|
|
682
|
+
<div class="dialog-footer" slot="footer">
|
|
683
|
+
<el-button
|
|
684
|
+
@click="labelTooltipDialogVisible = false"
|
|
685
|
+
class="button-sty"
|
|
686
|
+
icon="el-icon-close"
|
|
687
|
+
>
|
|
688
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
689
|
+
</el-button>
|
|
690
|
+
<el-button
|
|
691
|
+
type="primary"
|
|
692
|
+
@click="submitLabelTooltipDialog"
|
|
693
|
+
class="button-sty"
|
|
694
|
+
icon="el-icon-check"
|
|
695
|
+
>
|
|
696
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
697
|
+
</el-button>
|
|
698
|
+
</div>
|
|
699
|
+
</el-dialog>
|
|
700
|
+
<div class="dialog-footer" slot="footer">
|
|
701
|
+
<el-button
|
|
702
|
+
@click="closeRowEditDialog"
|
|
703
|
+
class="button-sty"
|
|
704
|
+
icon="el-icon-close"
|
|
705
|
+
>
|
|
706
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
707
|
+
</el-button>
|
|
708
|
+
<el-button
|
|
709
|
+
type="primary"
|
|
710
|
+
@click="submitRowEditDialog"
|
|
711
|
+
class="button-sty"
|
|
712
|
+
icon="el-icon-check"
|
|
713
|
+
>
|
|
714
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
715
|
+
</el-button>
|
|
716
|
+
</div>
|
|
717
|
+
</el-dialog>
|
|
718
|
+
</el-dialog>
|
|
273
719
|
</template>
|
|
274
720
|
<script>
|
|
275
721
|
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
276
722
|
import Sortable from "sortablejs";
|
|
277
|
-
import {
|
|
723
|
+
import {
|
|
724
|
+
generateId,
|
|
725
|
+
loopHandleWidget,
|
|
726
|
+
deepClone,
|
|
727
|
+
columnFormatMap,
|
|
728
|
+
} from "../../../../../../components/xform/utils/util";
|
|
729
|
+
import columnRenderDialog from "./columnRenderDialog.vue";
|
|
730
|
+
import editTreeButtonGroupConfigDialog from "./edit-tree-button-group-config-dialog.vue";
|
|
731
|
+
import IconPicker from "@base/components/xform/icon-picker/index.vue";
|
|
732
|
+
|
|
733
|
+
let businessOptions = [
|
|
734
|
+
{
|
|
735
|
+
value: "_createBy",
|
|
736
|
+
label: "创建人",
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
value: "_modifyBy",
|
|
740
|
+
label: "更新人",
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
value: "create_date",
|
|
744
|
+
label: "创建时间",
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
value: "modify_date",
|
|
748
|
+
label: "更新时间",
|
|
749
|
+
},
|
|
750
|
+
];
|
|
751
|
+
let userFields = ["_createBy", "_modifyBy", "create_date", "modify_date"];
|
|
278
752
|
|
|
279
753
|
export default {
|
|
280
754
|
mixins: [i18n],
|
|
281
755
|
props: {
|
|
282
756
|
designer: Object,
|
|
283
757
|
selectedWidget: Object,
|
|
284
|
-
optionModel: Object
|
|
758
|
+
optionModel: Object,
|
|
759
|
+
visiable: {
|
|
760
|
+
type: Boolean,
|
|
761
|
+
default: false,
|
|
762
|
+
},
|
|
285
763
|
},
|
|
286
|
-
components: {
|
|
287
|
-
|
|
764
|
+
components: {
|
|
765
|
+
columnRenderDialog,
|
|
766
|
+
editTreeButtonGroupConfigDialog,
|
|
767
|
+
IconPicker,
|
|
768
|
+
},
|
|
769
|
+
inject: ["openWidgetPropertyDialog"],
|
|
288
770
|
data() {
|
|
289
771
|
return {
|
|
772
|
+
tableReady: false,
|
|
290
773
|
tableColumnConfigTitle: null,
|
|
291
774
|
showTableColumnConfigDialog: false,
|
|
292
775
|
tableColumnConfigHeader: null,
|
|
293
776
|
tableColumnConfigCode: null,
|
|
294
|
-
|
|
295
|
-
|
|
777
|
+
showEditTreeButtonGroupConfigDialog: false,
|
|
778
|
+
currentEditTreeButtonGroupRow: null,
|
|
779
|
+
editTreeButtonGroupRowData: null,
|
|
296
780
|
alignOptions: [
|
|
297
781
|
{
|
|
298
|
-
value:
|
|
299
|
-
label:
|
|
782
|
+
value: "left",
|
|
783
|
+
label: "left",
|
|
300
784
|
},
|
|
301
785
|
{
|
|
302
|
-
value:
|
|
303
|
-
label:
|
|
786
|
+
value: "center",
|
|
787
|
+
label: "center",
|
|
304
788
|
},
|
|
305
789
|
{
|
|
306
|
-
value:
|
|
307
|
-
label:
|
|
308
|
-
}
|
|
790
|
+
value: "right",
|
|
791
|
+
label: "right",
|
|
792
|
+
},
|
|
309
793
|
],
|
|
794
|
+
businessOptions,
|
|
795
|
+
userFields,
|
|
310
796
|
op: [
|
|
311
797
|
{
|
|
312
|
-
label:
|
|
798
|
+
label: "edit Format",
|
|
313
799
|
options: [
|
|
314
800
|
{
|
|
315
|
-
value:
|
|
316
|
-
label:
|
|
801
|
+
value: "editInput",
|
|
802
|
+
label: "文本输入框",
|
|
317
803
|
},
|
|
318
804
|
{
|
|
319
|
-
value:
|
|
320
|
-
label:
|
|
805
|
+
value: "editNumber",
|
|
806
|
+
label: "数字输入框",
|
|
321
807
|
},
|
|
322
808
|
{
|
|
323
|
-
value:
|
|
324
|
-
label:
|
|
809
|
+
value: "editDate",
|
|
810
|
+
label: "日期输入框",
|
|
325
811
|
},
|
|
326
812
|
{
|
|
327
|
-
value:
|
|
328
|
-
label:
|
|
813
|
+
value: "textarea",
|
|
814
|
+
label: "多行文本输入框",
|
|
329
815
|
},
|
|
330
816
|
{
|
|
331
|
-
value:
|
|
332
|
-
label:
|
|
817
|
+
value: "editScriptInput",
|
|
818
|
+
label: "脚本输入框",
|
|
333
819
|
},
|
|
334
820
|
{
|
|
335
|
-
value:
|
|
336
|
-
label:
|
|
821
|
+
value: "editSelect",
|
|
822
|
+
label: "下拉框",
|
|
337
823
|
},
|
|
338
824
|
{
|
|
339
|
-
value:
|
|
340
|
-
label:
|
|
825
|
+
value: "checkbox",
|
|
826
|
+
label: "复选框",
|
|
341
827
|
},
|
|
342
828
|
{
|
|
343
|
-
value:
|
|
344
|
-
label:
|
|
829
|
+
value: "radio",
|
|
830
|
+
label: "单选框",
|
|
345
831
|
},
|
|
346
832
|
{
|
|
347
|
-
value:
|
|
348
|
-
label:
|
|
833
|
+
value: "editAttachment",
|
|
834
|
+
label: "附件",
|
|
349
835
|
},
|
|
350
836
|
{
|
|
351
|
-
value:
|
|
352
|
-
label:
|
|
837
|
+
value: "editSearch",
|
|
838
|
+
label: "搜索框",
|
|
353
839
|
},
|
|
354
840
|
{
|
|
355
|
-
value:
|
|
356
|
-
label:
|
|
841
|
+
value: "editStatus",
|
|
842
|
+
label: "状态",
|
|
357
843
|
},
|
|
358
844
|
{
|
|
359
|
-
value:
|
|
360
|
-
label:
|
|
845
|
+
value: "text",
|
|
846
|
+
label: "文本",
|
|
361
847
|
},
|
|
362
848
|
{
|
|
363
|
-
value:
|
|
364
|
-
label:
|
|
365
|
-
}
|
|
366
|
-
|
|
849
|
+
value: "aText",
|
|
850
|
+
label: "超链接文本",
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
value: "widgetRender",
|
|
854
|
+
label: "自定义组件",
|
|
855
|
+
},
|
|
856
|
+
],
|
|
367
857
|
},
|
|
368
858
|
{
|
|
369
|
-
label:
|
|
859
|
+
label: "按钮控件",
|
|
370
860
|
options: [
|
|
371
861
|
{
|
|
372
|
-
value:
|
|
373
|
-
label:
|
|
862
|
+
value: "dropdown",
|
|
863
|
+
label: "下拉按钮",
|
|
374
864
|
},
|
|
375
865
|
{
|
|
376
|
-
value:
|
|
377
|
-
label:
|
|
866
|
+
value: "editDelete",
|
|
867
|
+
label: "删除按钮",
|
|
378
868
|
},
|
|
379
869
|
{
|
|
380
|
-
value:
|
|
381
|
-
label:
|
|
870
|
+
value: "editButton",
|
|
871
|
+
label: "查看按钮",
|
|
382
872
|
},
|
|
383
873
|
{
|
|
384
|
-
value:
|
|
385
|
-
label:
|
|
874
|
+
value: "aLink",
|
|
875
|
+
label: "超链接按钮",
|
|
386
876
|
},
|
|
387
877
|
{
|
|
388
|
-
value:
|
|
389
|
-
label:
|
|
390
|
-
}
|
|
391
|
-
|
|
878
|
+
value: "button",
|
|
879
|
+
label: "按钮",
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
value: "editTreeButtonGroup",
|
|
883
|
+
label: "编辑行按钮组",
|
|
884
|
+
},
|
|
885
|
+
],
|
|
392
886
|
},
|
|
393
887
|
{
|
|
394
|
-
label:
|
|
888
|
+
label: "树控件",
|
|
395
889
|
options: [
|
|
396
890
|
{
|
|
397
|
-
value:
|
|
398
|
-
label:
|
|
891
|
+
value: "addSiblingEditRow",
|
|
892
|
+
label: "新增兄弟节点",
|
|
399
893
|
},
|
|
400
894
|
{
|
|
401
|
-
value:
|
|
402
|
-
label:
|
|
895
|
+
value: "addChildTreeRow",
|
|
896
|
+
label: "新增子节点",
|
|
403
897
|
},
|
|
404
898
|
{
|
|
405
|
-
value:
|
|
406
|
-
label:
|
|
899
|
+
value: "moveUpRow",
|
|
900
|
+
label: "上移",
|
|
407
901
|
},
|
|
408
902
|
{
|
|
409
|
-
value:
|
|
410
|
-
label:
|
|
903
|
+
value: "moveDownRow",
|
|
904
|
+
label: "下移",
|
|
411
905
|
},
|
|
412
906
|
{
|
|
413
|
-
value:
|
|
414
|
-
label:
|
|
415
|
-
}
|
|
416
|
-
]
|
|
907
|
+
value: "removeTreeRow",
|
|
908
|
+
label: "删除树节点",
|
|
909
|
+
},
|
|
910
|
+
],
|
|
911
|
+
},
|
|
912
|
+
|
|
913
|
+
{
|
|
914
|
+
label: "业务模块",
|
|
915
|
+
options: businessOptions,
|
|
417
916
|
},
|
|
418
917
|
{
|
|
419
|
-
label:
|
|
918
|
+
label: "日期格式化",
|
|
420
919
|
options: [
|
|
421
920
|
{
|
|
422
|
-
value:
|
|
423
|
-
label:
|
|
921
|
+
value: "d1",
|
|
922
|
+
label: "yyyy-MM-dd",
|
|
424
923
|
},
|
|
425
924
|
{
|
|
426
|
-
value:
|
|
427
|
-
label:
|
|
925
|
+
value: "d2",
|
|
926
|
+
label: "yyyy/MM/dd",
|
|
428
927
|
},
|
|
429
928
|
{
|
|
430
|
-
value:
|
|
431
|
-
label:
|
|
929
|
+
value: "d3",
|
|
930
|
+
label: "yyyy年MM月dd日",
|
|
432
931
|
},
|
|
433
932
|
{
|
|
434
|
-
value:
|
|
435
|
-
label:
|
|
933
|
+
value: "d4",
|
|
934
|
+
label: "yyyy-MM-dd HH:mm:ss",
|
|
436
935
|
},
|
|
437
936
|
{
|
|
438
|
-
value:
|
|
439
|
-
label:
|
|
937
|
+
value: "d5",
|
|
938
|
+
label: "yyyy-MM-dd hh:mm:ss",
|
|
440
939
|
},
|
|
940
|
+
],
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
label: "数字格式化",
|
|
944
|
+
options: [
|
|
441
945
|
{
|
|
442
|
-
value:
|
|
443
|
-
label:
|
|
946
|
+
value: "n1",
|
|
947
|
+
label: "###,###,###,##0.######",
|
|
444
948
|
},
|
|
445
949
|
{
|
|
446
|
-
value:
|
|
447
|
-
label:
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
|
|
950
|
+
value: "n2",
|
|
951
|
+
label: "###,###,###,##0.00####",
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
value: "n3",
|
|
955
|
+
label: "###,###,###,##0.000000",
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
value: "n4",
|
|
959
|
+
label: "###,###,###,##0.000",
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
value: "n5",
|
|
963
|
+
label: "###,###,###,##0.00",
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
value: "n6",
|
|
967
|
+
label: "###,###,###,##0",
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
value: "n7",
|
|
971
|
+
label: "###,##0.00##%",
|
|
972
|
+
},
|
|
973
|
+
],
|
|
974
|
+
},
|
|
451
975
|
],
|
|
452
976
|
editOp: [
|
|
453
977
|
{
|
|
454
|
-
value:
|
|
455
|
-
label:
|
|
978
|
+
value: "editInput",
|
|
979
|
+
label: "文本输入框",
|
|
456
980
|
},
|
|
457
981
|
{
|
|
458
|
-
value:
|
|
459
|
-
label:
|
|
982
|
+
value: "editNumber",
|
|
983
|
+
label: "数字输入框",
|
|
460
984
|
},
|
|
461
985
|
{
|
|
462
|
-
value:
|
|
463
|
-
label:
|
|
986
|
+
value: "editDate",
|
|
987
|
+
label: "日期输入框",
|
|
464
988
|
},
|
|
465
989
|
{
|
|
466
|
-
value:
|
|
467
|
-
label:
|
|
990
|
+
value: "editSelect",
|
|
991
|
+
label: "下拉框",
|
|
468
992
|
},
|
|
469
993
|
{
|
|
470
|
-
value:
|
|
471
|
-
label:
|
|
994
|
+
value: "editAttachment",
|
|
995
|
+
label: "附件",
|
|
472
996
|
},
|
|
473
997
|
{
|
|
474
|
-
value:
|
|
475
|
-
label:
|
|
476
|
-
}
|
|
998
|
+
value: "editSearch",
|
|
999
|
+
label: "搜索框",
|
|
1000
|
+
},
|
|
477
1001
|
],
|
|
478
1002
|
showRenderDialogFlag: !1,
|
|
479
|
-
renderJson:
|
|
1003
|
+
renderJson: "",
|
|
480
1004
|
currentTableColumn: null,
|
|
1005
|
+
sourceData: null,
|
|
481
1006
|
|
|
482
1007
|
hideAfter: 1500,
|
|
483
1008
|
openDelay: 500,
|
|
484
|
-
tableData: []
|
|
1009
|
+
tableData: [], //树形结构数据转的数组
|
|
485
1010
|
tableDataArray: [],
|
|
486
1011
|
dragSort: null,
|
|
487
|
-
columnFormatMap
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
editDelete: 'a-link',
|
|
498
|
-
editButton: 'a-link',
|
|
499
|
-
button: 'button',
|
|
500
|
-
addSiblingEditRow: 'a-link',
|
|
501
|
-
addChildTreeRow: 'a-link',
|
|
502
|
-
moveUpRow: 'a-link',
|
|
503
|
-
moveDownRow: 'a-link',
|
|
504
|
-
removeTreeRow: 'a-link'
|
|
1012
|
+
columnFormatMap,
|
|
1013
|
+
|
|
1014
|
+
showFormEventDialogFlag: false,
|
|
1015
|
+
formEventHandlerCode: "",
|
|
1016
|
+
curEventName: "",
|
|
1017
|
+
curEventRow: null,
|
|
1018
|
+
|
|
1019
|
+
eventParamsMap: {
|
|
1020
|
+
footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
|
|
1021
|
+
columnShow: "columnShow(dataId,formCode,columnConfig) {",
|
|
505
1022
|
},
|
|
506
|
-
|
|
1023
|
+
|
|
1024
|
+
showColumnRenderDialog: false,
|
|
1025
|
+
|
|
1026
|
+
editRowData: null,
|
|
1027
|
+
rowData: null,
|
|
1028
|
+
rowDataIndex: 0,
|
|
1029
|
+
showRowEditDialog: false,
|
|
1030
|
+
labelTooltipDialogVisible: false,
|
|
1031
|
+
labelTooltipValue: "",
|
|
1032
|
+
sourceTableColumnsSnapshot: null,
|
|
1033
|
+
};
|
|
507
1034
|
},
|
|
508
1035
|
beforeDestroy() {
|
|
509
|
-
if (this.dragSort) this.dragSort.destroy()
|
|
1036
|
+
if (this.dragSort) this.dragSort.destroy();
|
|
510
1037
|
},
|
|
511
|
-
|
|
512
|
-
|
|
1038
|
+
computed: {
|
|
1039
|
+
showDialog: {
|
|
1040
|
+
get() {
|
|
1041
|
+
return this.visiable;
|
|
1042
|
+
},
|
|
1043
|
+
set(val) {
|
|
1044
|
+
this.$emit("update:visiable", val);
|
|
1045
|
+
},
|
|
1046
|
+
},
|
|
1047
|
+
shouldExpandAllTable() {
|
|
1048
|
+
return this.countTreeRows(this.tableData) <= 30;
|
|
1049
|
+
},
|
|
513
1050
|
},
|
|
1051
|
+
watch: {
|
|
1052
|
+
visiable(val) {
|
|
1053
|
+
if (val) {
|
|
1054
|
+
this.onDialogOpen();
|
|
1055
|
+
} else {
|
|
1056
|
+
this.onDialogClose();
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
},
|
|
1060
|
+
created() {},
|
|
514
1061
|
mounted() {
|
|
515
|
-
this.
|
|
1062
|
+
if (this.visiable) {
|
|
1063
|
+
this.onDialogOpen();
|
|
1064
|
+
}
|
|
516
1065
|
},
|
|
517
1066
|
methods: {
|
|
518
|
-
|
|
519
|
-
|
|
1067
|
+
countTreeRows(rows) {
|
|
1068
|
+
if (!Array.isArray(rows) || !rows.length) {
|
|
1069
|
+
return 0;
|
|
1070
|
+
}
|
|
1071
|
+
let count = 0;
|
|
1072
|
+
const walk = (list) => {
|
|
1073
|
+
list.forEach((item) => {
|
|
1074
|
+
count += 1;
|
|
1075
|
+
if (item.children && item.children.length) {
|
|
1076
|
+
walk(item.children);
|
|
1077
|
+
}
|
|
1078
|
+
});
|
|
1079
|
+
};
|
|
1080
|
+
walk(rows);
|
|
1081
|
+
return count;
|
|
1082
|
+
},
|
|
1083
|
+
cloneTableColumnsForEdit(columns) {
|
|
1084
|
+
if (!Array.isArray(columns)) {
|
|
1085
|
+
return [];
|
|
1086
|
+
}
|
|
1087
|
+
const refKeys = ["widget", "editWidget", "widgetList"];
|
|
1088
|
+
const cloneRow = (row) => {
|
|
1089
|
+
if (!row || typeof row !== "object") {
|
|
1090
|
+
return row;
|
|
1091
|
+
}
|
|
1092
|
+
const cloned = {};
|
|
1093
|
+
Object.keys(row).forEach((key) => {
|
|
1094
|
+
const val = row[key];
|
|
1095
|
+
if (key === "children" && Array.isArray(val) && val.length) {
|
|
1096
|
+
cloned.children = val.map(cloneRow);
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
if (refKeys.includes(key)) {
|
|
1100
|
+
cloned[key] = val;
|
|
1101
|
+
return;
|
|
1102
|
+
}
|
|
1103
|
+
if (key === "columnOption") {
|
|
1104
|
+
if (!row.widget) {
|
|
1105
|
+
cloned.columnOption =
|
|
1106
|
+
val !== null && typeof val === "object" ? deepClone(val) : val;
|
|
1107
|
+
}
|
|
1108
|
+
return;
|
|
1109
|
+
}
|
|
1110
|
+
if (key === "editColumnOption") {
|
|
1111
|
+
if (!row.editWidget) {
|
|
1112
|
+
cloned.editColumnOption =
|
|
1113
|
+
val !== null && typeof val === "object" ? deepClone(val) : val;
|
|
1114
|
+
}
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
if (val !== null && typeof val === "object") {
|
|
1118
|
+
try {
|
|
1119
|
+
cloned[key] = deepClone(val);
|
|
1120
|
+
} catch (e) {
|
|
1121
|
+
cloned[key] = val;
|
|
1122
|
+
}
|
|
1123
|
+
return;
|
|
1124
|
+
}
|
|
1125
|
+
cloned[key] = val;
|
|
1126
|
+
});
|
|
1127
|
+
if (row.widget && !cloned.widget) {
|
|
1128
|
+
cloned.widget = row.widget;
|
|
1129
|
+
}
|
|
1130
|
+
if (row.editWidget && !cloned.editWidget) {
|
|
1131
|
+
cloned.editWidget = row.editWidget;
|
|
1132
|
+
}
|
|
1133
|
+
return cloned;
|
|
1134
|
+
};
|
|
1135
|
+
return columns.map(cloneRow);
|
|
1136
|
+
},
|
|
1137
|
+
buildColumnWidgetMap(columns, map = {}) {
|
|
1138
|
+
if (!Array.isArray(columns)) {
|
|
1139
|
+
return map;
|
|
1140
|
+
}
|
|
1141
|
+
columns.forEach((col) => {
|
|
1142
|
+
if (col && col.columnId) {
|
|
1143
|
+
map[col.columnId] = col;
|
|
1144
|
+
}
|
|
1145
|
+
if (col.children && col.children.length) {
|
|
1146
|
+
this.buildColumnWidgetMap(col.children, map);
|
|
1147
|
+
}
|
|
1148
|
+
});
|
|
1149
|
+
return map;
|
|
1150
|
+
},
|
|
1151
|
+
restoreColumnWidgetRefs(columns, widgetMap) {
|
|
1152
|
+
if (!Array.isArray(columns)) {
|
|
1153
|
+
return [];
|
|
1154
|
+
}
|
|
1155
|
+
return columns.map((row) => {
|
|
1156
|
+
const next = Object.assign({}, row);
|
|
1157
|
+
const orig = widgetMap[next.columnId];
|
|
1158
|
+
if (orig) {
|
|
1159
|
+
// 仅 formatS 未变更时补回 widget,避免清空 formatS 后又被快照还原
|
|
1160
|
+
const formatUnchanged = next.formatS === orig.formatS;
|
|
1161
|
+
const editFormatUnchanged = next.editFormatS === orig.editFormatS;
|
|
1162
|
+
if (formatUnchanged && !next.widget && orig.widget) {
|
|
1163
|
+
next.widget = orig.widget;
|
|
1164
|
+
}
|
|
1165
|
+
if (editFormatUnchanged && !next.editWidget && orig.editWidget) {
|
|
1166
|
+
next.editWidget = orig.editWidget;
|
|
1167
|
+
}
|
|
1168
|
+
if (
|
|
1169
|
+
formatUnchanged &&
|
|
1170
|
+
next.formatS === "widgetRender" &&
|
|
1171
|
+
(!next.widgetList || !next.widgetList.length) &&
|
|
1172
|
+
orig.widgetList &&
|
|
1173
|
+
orig.widgetList.length
|
|
1174
|
+
) {
|
|
1175
|
+
next.widgetList = orig.widgetList;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
if (next.children && next.children.length) {
|
|
1179
|
+
next.children = this.restoreColumnWidgetRefs(
|
|
1180
|
+
next.children,
|
|
1181
|
+
widgetMap
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
return next;
|
|
1185
|
+
});
|
|
1186
|
+
},
|
|
1187
|
+
editFormEventHandler(row, index, eventName) {
|
|
1188
|
+
this.curEventRow = row;
|
|
1189
|
+
this.curEventName = eventName;
|
|
1190
|
+
this.curEventIndex = index;
|
|
1191
|
+
this.formEventHandlerCode = row[eventName];
|
|
1192
|
+
this.showFormEventDialogFlag = true;
|
|
1193
|
+
},
|
|
1194
|
+
|
|
1195
|
+
saveFormEventHandler() {
|
|
1196
|
+
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
1197
|
+
let syntaxErrorFlag = false;
|
|
1198
|
+
if (!!codeHints && codeHints.length > 0) {
|
|
1199
|
+
codeHints.forEach((chItem) => {
|
|
1200
|
+
if (chItem.type === "error") {
|
|
1201
|
+
syntaxErrorFlag = true;
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
|
|
1205
|
+
if (syntaxErrorFlag) {
|
|
1206
|
+
this.$message.error(
|
|
1207
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1208
|
+
);
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
this.curEventRow[this.curEventName] = this.formEventHandlerCode;
|
|
1213
|
+
this.showFormEventDialogFlag = false;
|
|
1214
|
+
},
|
|
1215
|
+
onDialogClose() {
|
|
1216
|
+
this.tableReady = false;
|
|
1217
|
+
this.sourceTableColumnsSnapshot = null;
|
|
1218
|
+
if (this.dragSort) {
|
|
1219
|
+
this.dragSort.destroy();
|
|
1220
|
+
this.dragSort = null;
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
onDialogOpen() {
|
|
1224
|
+
this.tableReady = false;
|
|
1225
|
+
if (this.dragSort) {
|
|
1226
|
+
this.dragSort.destroy();
|
|
1227
|
+
this.dragSort = null;
|
|
1228
|
+
}
|
|
520
1229
|
this.$nextTick(() => {
|
|
521
|
-
|
|
1230
|
+
const load = () => {
|
|
1231
|
+
this.loadTableData();
|
|
1232
|
+
this.tableReady = true;
|
|
1233
|
+
this.$nextTick(() => {
|
|
1234
|
+
requestAnimationFrame(() => {
|
|
1235
|
+
this.rowDrop();
|
|
1236
|
+
});
|
|
1237
|
+
});
|
|
1238
|
+
};
|
|
1239
|
+
if (typeof requestIdleCallback === "function") {
|
|
1240
|
+
requestIdleCallback(load, { timeout: 80 });
|
|
1241
|
+
} else {
|
|
1242
|
+
setTimeout(load, 0);
|
|
1243
|
+
}
|
|
522
1244
|
});
|
|
523
1245
|
},
|
|
1246
|
+
loadTableData() {
|
|
1247
|
+
const source = this.optionModel.tableColumns || [];
|
|
1248
|
+
this.sourceTableColumnsSnapshot = source;
|
|
1249
|
+
this.tableData = this.cloneTableColumnsForEdit(source);
|
|
1250
|
+
},
|
|
524
1251
|
colSubmit() {
|
|
525
1252
|
this.dialogVisible = !1;
|
|
526
|
-
|
|
1253
|
+
const widgetMap = this.buildColumnWidgetMap(
|
|
1254
|
+
this.sourceTableColumnsSnapshot || []
|
|
1255
|
+
);
|
|
1256
|
+
this.optionModel.tableColumns = this.restoreColumnWidgetRefs(
|
|
1257
|
+
this.tableData,
|
|
1258
|
+
widgetMap
|
|
1259
|
+
);
|
|
1260
|
+
this.sourceTableColumnsSnapshot = null;
|
|
527
1261
|
this.closeHandle();
|
|
528
1262
|
},
|
|
1263
|
+
openWidgetRenderDialog(row, sourceData) {
|
|
1264
|
+
this.currentTableColumn = row;
|
|
1265
|
+
this.sourceData = sourceData;
|
|
1266
|
+
|
|
1267
|
+
// this.widgetList =
|
|
1268
|
+
|
|
1269
|
+
// this.designer.widgetList
|
|
1270
|
+
|
|
1271
|
+
this.showColumnRenderDialog = true;
|
|
1272
|
+
},
|
|
1273
|
+
confirmWidgetRenderDialog(widgetList) {
|
|
1274
|
+
this.currentTableColumn.widgetList = widgetList;
|
|
1275
|
+
this.showColumnRenderDialog = false;
|
|
1276
|
+
},
|
|
529
1277
|
showRenderDialog: function (e) {
|
|
530
|
-
(
|
|
1278
|
+
/*if(e.formatS == 'widgetRender'){
|
|
1279
|
+
this.openWidgetRenderDialog(e);
|
|
1280
|
+
return
|
|
1281
|
+
}*/
|
|
1282
|
+
|
|
1283
|
+
(this.currentTableColumn = e),
|
|
1284
|
+
(this.renderJson = e.render || ""),
|
|
1285
|
+
(this.showRenderDialogFlag = !0);
|
|
531
1286
|
},
|
|
532
1287
|
saveColumnRender: function () {
|
|
533
|
-
this.$set(this.currentTableColumn,
|
|
1288
|
+
this.$set(this.currentTableColumn, "render", this.renderJson),
|
|
1289
|
+
(this.showRenderDialogFlag = !1);
|
|
534
1290
|
},
|
|
535
1291
|
closeHandle() {
|
|
536
|
-
this.$emit(
|
|
537
|
-
this.$emit(
|
|
1292
|
+
this.$emit("update:visiable", false);
|
|
1293
|
+
this.$emit("close");
|
|
538
1294
|
},
|
|
539
1295
|
// 添加同级节点
|
|
540
1296
|
onAddSibling(row, index) {
|
|
541
|
-
console.log(
|
|
542
|
-
const parentId = row.parentId || null
|
|
1297
|
+
console.log("onAddSibling", row, index);
|
|
1298
|
+
const parentId = row.parentId || null;
|
|
543
1299
|
// 先判断是不是根节点
|
|
544
1300
|
if (!parentId) {
|
|
545
1301
|
// 当前节点直接添加
|
|
546
1302
|
// this.tableData.push(this.generateRow(parentId))
|
|
547
|
-
let addIndex =
|
|
548
|
-
|
|
1303
|
+
let addIndex =
|
|
1304
|
+
this.tableData
|
|
1305
|
+
.filter((item) => !item.parentId)
|
|
1306
|
+
.findIndex((item) => item.columnId == row.columnId) + 1;
|
|
1307
|
+
this.tableData.splice(addIndex, 0, this.generateRow(parentId));
|
|
549
1308
|
} else {
|
|
550
|
-
this.handleAddOneRow(row, index,
|
|
1309
|
+
this.handleAddOneRow(row, index, "SIBLING");
|
|
551
1310
|
}
|
|
552
1311
|
},
|
|
553
1312
|
// 添加子节点 todo
|
|
554
1313
|
onAddChild(row, index) {
|
|
555
|
-
this.handleAddOneRow(row, index,
|
|
1314
|
+
this.handleAddOneRow(row, index, "CHILD");
|
|
556
1315
|
},
|
|
557
1316
|
/**
|
|
558
1317
|
* 处理添加一行数据
|
|
@@ -561,46 +1320,49 @@ export default {
|
|
|
561
1320
|
* @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
|
|
562
1321
|
*/
|
|
563
1322
|
handleAddOneRow(row, index, type) {
|
|
564
|
-
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
let curRow = {}
|
|
1323
|
+
const { parentId, columnId } = row;
|
|
1324
|
+
const curId = type === "SIBLING" ? parentId : columnId;
|
|
1325
|
+
let curRow = {};
|
|
568
1326
|
// 在 tableData 中,找到当前节点
|
|
569
1327
|
const findRow = (data) => {
|
|
570
1328
|
data.forEach((item) => {
|
|
571
1329
|
if (item.columnId === curId) {
|
|
572
|
-
curRow = item
|
|
1330
|
+
curRow = item;
|
|
573
1331
|
}
|
|
574
1332
|
if (item.children && item.children.length) {
|
|
575
|
-
findRow(item.children)
|
|
1333
|
+
findRow(item.children);
|
|
576
1334
|
}
|
|
577
|
-
})
|
|
578
|
-
}
|
|
1335
|
+
});
|
|
1336
|
+
};
|
|
579
1337
|
|
|
580
|
-
findRow(this.tableData)
|
|
1338
|
+
findRow(this.tableData);
|
|
581
1339
|
|
|
582
|
-
const {columnId: generateParentId, children} = curRow
|
|
1340
|
+
const { columnId: generateParentId, children } = curRow;
|
|
583
1341
|
|
|
584
|
-
let newRow = this.generateRow(generateParentId)
|
|
1342
|
+
let newRow = this.generateRow(generateParentId);
|
|
585
1343
|
if (children) {
|
|
586
|
-
if (type ===
|
|
587
|
-
let addIndex =
|
|
588
|
-
|
|
1344
|
+
if (type === "SIBLING") {
|
|
1345
|
+
let addIndex =
|
|
1346
|
+
children.findIndex((item) => item.columnId == row.columnId) + 1;
|
|
1347
|
+
children.splice(addIndex, 0, newRow);
|
|
589
1348
|
} else {
|
|
590
|
-
children.push(newRow)
|
|
1349
|
+
children.push(newRow);
|
|
591
1350
|
}
|
|
592
1351
|
} else {
|
|
593
|
-
this.$set(curRow,
|
|
1352
|
+
this.$set(curRow, "children", [newRow]);
|
|
594
1353
|
}
|
|
595
1354
|
},
|
|
596
1355
|
getUuid() {
|
|
597
1356
|
return new Date().getTime();
|
|
598
1357
|
},
|
|
1358
|
+
createRowAuthName(type) {
|
|
1359
|
+
return `row${type}` + generateId();
|
|
1360
|
+
},
|
|
599
1361
|
/**
|
|
600
1362
|
* 生成一行数据
|
|
601
1363
|
*/
|
|
602
1364
|
generateRow(parentId) {
|
|
603
|
-
let tmpId =
|
|
1365
|
+
let tmpId = "column" + generateId();
|
|
604
1366
|
let uuid = this.getUuid();
|
|
605
1367
|
var row = {
|
|
606
1368
|
columnId: uuid,
|
|
@@ -610,46 +1372,79 @@ export default {
|
|
|
610
1372
|
width: 150,
|
|
611
1373
|
prop: tmpId,
|
|
612
1374
|
label: tmpId,
|
|
613
|
-
align:
|
|
1375
|
+
align: "left",
|
|
614
1376
|
show: true,
|
|
615
1377
|
sortable: true,
|
|
616
|
-
|
|
1378
|
+
filterable: true,
|
|
1379
|
+
exportType: null,
|
|
1380
|
+
footerDataType: null,
|
|
1381
|
+
footerMethodConfg: null,
|
|
1382
|
+
widgetList: [],
|
|
1383
|
+
labelColor: null,
|
|
1384
|
+
rowAddAuthName: this.createRowAuthName("Add"),
|
|
1385
|
+
rowEditAuthName: this.createRowAuthName("Edit"),
|
|
1386
|
+
rowAddShow: null,
|
|
1387
|
+
rowEditShow: null,
|
|
1388
|
+
columnShow: null,
|
|
1389
|
+
utcTransformEnabled: false,
|
|
1390
|
+
labelIconClass: null,
|
|
1391
|
+
labelIconPosition: "rear",
|
|
1392
|
+
labelTooltip: null,
|
|
617
1393
|
// treeNode: false,
|
|
618
|
-
|
|
619
1394
|
};
|
|
620
1395
|
return row;
|
|
621
1396
|
},
|
|
1397
|
+
isUtcTransformColumn(row) {
|
|
1398
|
+
const formatS = row.formatS;
|
|
1399
|
+
if (!formatS) {
|
|
1400
|
+
return true;
|
|
1401
|
+
}
|
|
1402
|
+
return [
|
|
1403
|
+
"d1",
|
|
1404
|
+
"d2",
|
|
1405
|
+
"d3",
|
|
1406
|
+
"d4",
|
|
1407
|
+
"d5",
|
|
1408
|
+
"render",
|
|
1409
|
+
"create_date",
|
|
1410
|
+
"modify_date",
|
|
1411
|
+
].includes(formatS);
|
|
1412
|
+
},
|
|
622
1413
|
// 添加根节点
|
|
623
1414
|
onAddRoot() {
|
|
624
|
-
this.tableData.push(this.generateRow())
|
|
1415
|
+
this.tableData.push(this.generateRow());
|
|
625
1416
|
},
|
|
626
1417
|
// 删除当前节点及对应子节点数据
|
|
627
1418
|
onDelete(row) {
|
|
628
|
-
const {parentId, columnId} = row
|
|
1419
|
+
const { parentId, columnId } = row;
|
|
629
1420
|
// 根节点直接删除
|
|
630
1421
|
if (!parentId) {
|
|
631
|
-
const delIndex = this.tableData.findIndex(
|
|
632
|
-
|
|
1422
|
+
const delIndex = this.tableData.findIndex(
|
|
1423
|
+
(item) => item.columnId === columnId
|
|
1424
|
+
);
|
|
1425
|
+
this.tableData.splice(delIndex, 1);
|
|
633
1426
|
} else {
|
|
634
1427
|
// 找到父节点,通过父节点删除
|
|
635
|
-
let parentRow = {}
|
|
1428
|
+
let parentRow = {};
|
|
636
1429
|
const findRow = (data) => {
|
|
637
1430
|
data.forEach((item) => {
|
|
638
1431
|
if (item.columnId === parentId) {
|
|
639
|
-
parentRow = {...item}
|
|
1432
|
+
parentRow = { ...item };
|
|
640
1433
|
}
|
|
641
1434
|
if (item.children && item.children.length) {
|
|
642
|
-
findRow(item.children)
|
|
1435
|
+
findRow(item.children);
|
|
643
1436
|
}
|
|
644
|
-
})
|
|
645
|
-
}
|
|
646
|
-
findRow(this.tableData)
|
|
1437
|
+
});
|
|
1438
|
+
};
|
|
1439
|
+
findRow(this.tableData);
|
|
647
1440
|
|
|
648
|
-
const {children} = parentRow
|
|
1441
|
+
const { children } = parentRow;
|
|
649
1442
|
|
|
650
|
-
const delIndex = children.findIndex(
|
|
1443
|
+
const delIndex = children.findIndex(
|
|
1444
|
+
(item) => item.columnId === columnId
|
|
1445
|
+
);
|
|
651
1446
|
|
|
652
|
-
children.splice(delIndex, 1)
|
|
1447
|
+
children.splice(delIndex, 1);
|
|
653
1448
|
}
|
|
654
1449
|
},
|
|
655
1450
|
// 数据准备 生成 id 和 parentId
|
|
@@ -657,30 +1452,34 @@ export default {
|
|
|
657
1452
|
const tableFormat = (tableData, parentId) => {
|
|
658
1453
|
tableData.forEach((item) => {
|
|
659
1454
|
// item.parentId = parentId || null
|
|
660
|
-
if (!item.kid) item.kid = item.columnId
|
|
1455
|
+
if (!item.kid) item.kid = item.columnId;
|
|
661
1456
|
if (item.children && item.children.length > 0) {
|
|
662
|
-
tableFormat(item.children, item.columnId)
|
|
1457
|
+
tableFormat(item.children, item.columnId);
|
|
663
1458
|
}
|
|
664
|
-
})
|
|
665
|
-
}
|
|
1459
|
+
});
|
|
1460
|
+
};
|
|
666
1461
|
|
|
667
|
-
tableFormat(data)
|
|
668
|
-
return data
|
|
1462
|
+
tableFormat(data);
|
|
1463
|
+
return data;
|
|
669
1464
|
},
|
|
670
1465
|
//drag begin
|
|
671
1466
|
//行拖拽
|
|
672
1467
|
rowDrop() {
|
|
673
|
-
if (this.dragSort) this.dragSort.destroy() // 防止在Dom上重复绑定事件
|
|
1468
|
+
if (this.dragSort) this.dragSort.destroy(); // 防止在Dom上重复绑定事件
|
|
674
1469
|
// const tbody = document.querySelector('.drag .el-table__body-wrapper tbody');
|
|
675
|
-
var tbody = this.$refs.singleTable.$el.querySelectorAll(
|
|
1470
|
+
var tbody = this.$refs.singleTable.$el.querySelectorAll(
|
|
1471
|
+
".el-table__fixed-body-wrapper > table > tbody"
|
|
1472
|
+
)[0];
|
|
676
1473
|
const _this = this;
|
|
677
1474
|
this.dragSort = Sortable.create(tbody, {
|
|
678
|
-
ghostClass:
|
|
1475
|
+
ghostClass: "sortable-ghost",
|
|
1476
|
+
// draggable: ".drag-option", // 修改可拖拽元素
|
|
1477
|
+
handle: ".drag-option", // 指定拖动按钮
|
|
679
1478
|
setData: function (e) {
|
|
680
|
-
e.setData(
|
|
1479
|
+
e.setData("Text", "");
|
|
681
1480
|
},
|
|
682
|
-
onEnd({newIndex, oldIndex}) {
|
|
683
|
-
_this.rowDropEnd(newIndex, oldIndex)
|
|
1481
|
+
onEnd({ newIndex, oldIndex }) {
|
|
1482
|
+
_this.rowDropEnd(newIndex, oldIndex);
|
|
684
1483
|
},
|
|
685
1484
|
});
|
|
686
1485
|
},
|
|
@@ -691,7 +1490,7 @@ export default {
|
|
|
691
1490
|
data.forEach((item) => {
|
|
692
1491
|
const loop = (data) => {
|
|
693
1492
|
result.push({
|
|
694
|
-
...data
|
|
1493
|
+
...data,
|
|
695
1494
|
});
|
|
696
1495
|
let child = data.children;
|
|
697
1496
|
if (child) {
|
|
@@ -707,7 +1506,9 @@ export default {
|
|
|
707
1506
|
//数组转树
|
|
708
1507
|
arrToTree(arr, parentId) {
|
|
709
1508
|
return arr
|
|
710
|
-
.filter((item) =>
|
|
1509
|
+
.filter((item) =>
|
|
1510
|
+
!parentId ? !item.parentId : item.parentId === parentId
|
|
1511
|
+
)
|
|
711
1512
|
.map((item) => {
|
|
712
1513
|
item.children = this.arrToTree(arr, item.columnId);
|
|
713
1514
|
return item;
|
|
@@ -745,13 +1546,7 @@ export default {
|
|
|
745
1546
|
let newRow = this.tableDataArray[newIndex];
|
|
746
1547
|
|
|
747
1548
|
//判断是否把该行 拖拽到 自己的底级中
|
|
748
|
-
if (
|
|
749
|
-
this.isTreeBottom(
|
|
750
|
-
this.tableData,
|
|
751
|
-
oldRow.columnId,
|
|
752
|
-
newRow.columnId
|
|
753
|
-
)
|
|
754
|
-
) {
|
|
1549
|
+
if (this.isTreeBottom(this.tableData, oldRow.columnId, newRow.columnId)) {
|
|
755
1550
|
this.$message({
|
|
756
1551
|
type: "error",
|
|
757
1552
|
message: "不能放到子节点",
|
|
@@ -797,136 +1592,168 @@ export default {
|
|
|
797
1592
|
let isButtontCell = false;
|
|
798
1593
|
let widgetType = this.columnFormatMap[formatS];
|
|
799
1594
|
if (widgetType) {
|
|
800
|
-
isButtontCell =
|
|
1595
|
+
isButtontCell =
|
|
1596
|
+
widgetType === "a-link" ||
|
|
1597
|
+
widgetType === "button" ||
|
|
1598
|
+
widgetType === "dropdown";
|
|
801
1599
|
}
|
|
802
1600
|
return isButtontCell;
|
|
803
1601
|
},
|
|
804
1602
|
//drag end
|
|
805
|
-
changeFormatS(row) {
|
|
806
|
-
let
|
|
807
|
-
let
|
|
808
|
-
let
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
if (row.formatS == 'editTreeButtonGroup') {
|
|
816
|
-
row.prop = null;
|
|
817
|
-
row.label = null;
|
|
818
|
-
row.sortable = false;
|
|
819
|
-
row.width = 150;
|
|
820
|
-
} else if (isButtontCell) {
|
|
821
|
-
if (row.formatS == 'aLink' || row.formatS == 'button') {
|
|
822
|
-
if (!row.width || row.width == 47) row.width = 150;
|
|
1603
|
+
changeFormatS(row, isEdit) {
|
|
1604
|
+
let formatS = isEdit ? row.editFormatS : row.formatS;
|
|
1605
|
+
let isButtontCell = this.getIsButtontCell(formatS);
|
|
1606
|
+
let attachmentPrefix = this.designer.getAttachmentPrefix();
|
|
1607
|
+
let columnSelectedWidget = this.designer.createColumnWidget(row, isEdit);
|
|
1608
|
+
if (!isEdit) {
|
|
1609
|
+
if (columnSelectedWidget) {
|
|
1610
|
+
row.widget = columnSelectedWidget;
|
|
823
1611
|
} else {
|
|
824
|
-
row.
|
|
1612
|
+
row.widget = null;
|
|
825
1613
|
}
|
|
826
|
-
row.
|
|
827
|
-
row.label = null;
|
|
828
|
-
row.sortable = false;
|
|
1614
|
+
row.utcTransformEnabled = false;
|
|
829
1615
|
} else {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
1616
|
+
if (row.prop && row.prop.startsWith(attachmentPrefix)) {
|
|
1617
|
+
let suffix = row.prop.replace(attachmentPrefix, "");
|
|
1618
|
+
columnSelectedWidget.options.keyName = row.prop;
|
|
1619
|
+
columnSelectedWidget.options.keyNameSuffix = suffix;
|
|
1620
|
+
}
|
|
1621
|
+
if (columnSelectedWidget) {
|
|
1622
|
+
row.editWidget = columnSelectedWidget;
|
|
1623
|
+
} else {
|
|
1624
|
+
row.editWidget = null;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
835
1627
|
|
|
836
|
-
|
|
837
|
-
|
|
1628
|
+
if (!isEdit) {
|
|
1629
|
+
if (row.formatS == "editTreeButtonGroup") {
|
|
1630
|
+
row.prop = null;
|
|
1631
|
+
row.label = null;
|
|
1632
|
+
row.sortable = false;
|
|
1633
|
+
row.width = 150;
|
|
1634
|
+
row.widget = null;
|
|
1635
|
+
} else if (isButtontCell) {
|
|
1636
|
+
if (row.formatS == "dropdown") {
|
|
1637
|
+
row.width = 100;
|
|
1638
|
+
} else if (row.formatS == "aLink" || row.formatS == "button") {
|
|
1639
|
+
if (!row.width || row.width == 47) row.width = 150;
|
|
1640
|
+
} else {
|
|
1641
|
+
row.width = 47;
|
|
1642
|
+
}
|
|
1643
|
+
row.prop = null;
|
|
1644
|
+
row.label = null;
|
|
1645
|
+
row.sortable = false;
|
|
1646
|
+
row.filterable = false;
|
|
838
1647
|
} else {
|
|
839
|
-
let
|
|
840
|
-
row.
|
|
1648
|
+
let tmpId = "column" + generateId();
|
|
1649
|
+
if (!row.width || row.width == 47) row.width = 150;
|
|
1650
|
+
if (!row.prop) row.prop = tmpId;
|
|
1651
|
+
if (!row.label) row.label = tmpId;
|
|
1652
|
+
|
|
1653
|
+
if (this.userFields.includes(row.formatS)) {
|
|
1654
|
+
let item = this.businessOptions.find(
|
|
1655
|
+
(item) => item.value == row.formatS
|
|
1656
|
+
);
|
|
1657
|
+
if (item) {
|
|
1658
|
+
row.prop = item.value;
|
|
1659
|
+
row.label = item.label;
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
row.sortable = true;
|
|
1664
|
+
|
|
1665
|
+
if (!isEdit) {
|
|
1666
|
+
if (formatS == "editAttachment") {
|
|
1667
|
+
row.prop = columnSelectedWidget.options.keyName;
|
|
1668
|
+
} else {
|
|
1669
|
+
row.prop = row.prop.replaceAll(attachmentPrefix, "");
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
841
1672
|
}
|
|
842
1673
|
}
|
|
843
1674
|
},
|
|
844
1675
|
getColumnWidgetConfig(row, isChange, isEdit) {
|
|
845
|
-
let formatS = isEdit ? row.editFormatS : row.formatS
|
|
1676
|
+
let formatS = isEdit ? row.editFormatS : row.formatS;
|
|
846
1677
|
let columnSelectedWidget = null;
|
|
847
1678
|
let columnEditFields = null;
|
|
848
1679
|
|
|
849
1680
|
let type = this.columnFormatMap[formatS];
|
|
850
|
-
/*if (type == 'date') {
|
|
851
|
-
columnEditFields = ['type', 'format', 'valueFormat']
|
|
852
|
-
} else if (type == 'select') {
|
|
853
|
-
|
|
854
|
-
}
|
|
855
|
-
if (type == 'vabsearch') {
|
|
856
|
-
columnEditFields = ['vabSearchField', 'formCode', 'formVersion', 'required', 'showFormField', 'onSearchConfirm', 'onSearchClear']
|
|
857
|
-
}*/
|
|
858
1681
|
|
|
859
1682
|
if (type) {
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
if (
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
1683
|
+
const applyNewWidgetDefaults = (widget) => {
|
|
1684
|
+
widget.options.required = row.required || false;
|
|
1685
|
+
if ("editDelete" == formatS) {
|
|
1686
|
+
widget.options.prefixIcon = "el-icon-delete";
|
|
1687
|
+
widget.options.label = "删除";
|
|
1688
|
+
widget.options.labelHidden = true;
|
|
1689
|
+
widget.options.hiddenByWf = true;
|
|
1690
|
+
widget.options.onClick =
|
|
1691
|
+
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
|
|
1692
|
+
} else if ("editButton" == formatS) {
|
|
1693
|
+
widget.options.prefixIcon = "el-icon-edit";
|
|
1694
|
+
widget.options.label = "查看";
|
|
1695
|
+
widget.options.labelHidden = true;
|
|
1696
|
+
widget.options.onClick =
|
|
1697
|
+
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
|
|
1698
|
+
} else if ("addSiblingEditRow" == formatS) {
|
|
1699
|
+
widget.options.prefixIcon = "el-icon-plus";
|
|
1700
|
+
widget.options.label = "新增兄弟节点";
|
|
1701
|
+
widget.options.labelHidden = false;
|
|
1702
|
+
widget.options.onClick =
|
|
1703
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
|
|
1704
|
+
} else if ("addChildTreeRow" == formatS) {
|
|
1705
|
+
widget.options.prefixIcon = "el-icon-plus";
|
|
1706
|
+
widget.options.label = "新增子节点";
|
|
1707
|
+
widget.options.labelHidden = false;
|
|
1708
|
+
widget.options.onClick =
|
|
1709
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
|
|
1710
|
+
} else if ("moveUpRow" == formatS) {
|
|
1711
|
+
widget.options.label = "↑上移";
|
|
1712
|
+
widget.options.labelHidden = false;
|
|
1713
|
+
widget.options.onClick =
|
|
1714
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
|
|
1715
|
+
} else if ("moveDownRow" == formatS) {
|
|
1716
|
+
widget.options.label = "↓下移";
|
|
1717
|
+
widget.options.labelHidden = false;
|
|
1718
|
+
widget.options.onClick =
|
|
1719
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
|
|
1720
|
+
} else if ("removeTreeRow" == formatS) {
|
|
1721
|
+
widget.options.prefixIcon = "el-icon-delete";
|
|
1722
|
+
widget.options.label = "删除";
|
|
1723
|
+
widget.options.labelHidden = true;
|
|
1724
|
+
widget.options.onClick =
|
|
1725
|
+
"let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
|
|
880
1726
|
}
|
|
881
|
-
}
|
|
882
|
-
columnSelectedWidget.options.required = row.required || false;
|
|
1727
|
+
};
|
|
883
1728
|
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
columnSelectedWidget
|
|
888
|
-
columnSelectedWidget.options.
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
columnSelectedWidget
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
columnSelectedWidget
|
|
903
|
-
columnSelectedWidget.options.labelHidden = false;
|
|
904
|
-
columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
|
|
905
|
-
} else if ('moveUpRow' == formatS) {
|
|
906
|
-
// columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
|
907
|
-
columnSelectedWidget.options.label = "↑上移";
|
|
908
|
-
columnSelectedWidget.options.labelHidden = false;
|
|
909
|
-
columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
|
|
910
|
-
} else if ('moveDownRow' == formatS) {
|
|
911
|
-
// columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
|
912
|
-
columnSelectedWidget.options.label = "↓下移";
|
|
913
|
-
columnSelectedWidget.options.labelHidden = false;
|
|
914
|
-
columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
|
|
915
|
-
} else if ('removeTreeRow' == formatS) {
|
|
916
|
-
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
|
917
|
-
columnSelectedWidget.options.label = "删除";
|
|
918
|
-
columnSelectedWidget.options.labelHidden = true;
|
|
919
|
-
columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
|
|
1729
|
+
if (!isChange) {
|
|
1730
|
+
const sourceWidget = this.designer.getColumnWidget(row, isEdit);
|
|
1731
|
+
if (sourceWidget) {
|
|
1732
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(sourceWidget);
|
|
1733
|
+
columnSelectedWidget.options.required = row.required || false;
|
|
1734
|
+
if ("editDelete" == formatS) {
|
|
1735
|
+
columnSelectedWidget.options.hiddenByWf =
|
|
1736
|
+
columnSelectedWidget.options.hiddenByWf ?? true;
|
|
1737
|
+
columnSelectedWidget.options.prefixIcon =
|
|
1738
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-delete";
|
|
1739
|
+
} else if ("editButton" == formatS) {
|
|
1740
|
+
columnSelectedWidget.options.prefixIcon =
|
|
1741
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-edit";
|
|
1742
|
+
}
|
|
1743
|
+
} else {
|
|
1744
|
+
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
|
1745
|
+
this.designer.getFieldWidgetByType(type)
|
|
1746
|
+
);
|
|
1747
|
+
applyNewWidgetDefaults(columnSelectedWidget);
|
|
920
1748
|
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
1749
|
+
} else {
|
|
1750
|
+
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
|
1751
|
+
this.designer.getFieldWidgetByType(type)
|
|
1752
|
+
);
|
|
1753
|
+
applyNewWidgetDefaults(columnSelectedWidget);
|
|
924
1754
|
}
|
|
925
1755
|
|
|
926
|
-
|
|
927
|
-
// columnSelectedWidget.options.name = type + row.columnId;
|
|
928
|
-
// columnSelectedWidget.options.name = row.prop;
|
|
929
|
-
if (columnSelectedWidget.options.hasOwnProperty('keyName')) {
|
|
1756
|
+
if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
|
|
930
1757
|
columnSelectedWidget.options.keyName = row.prop;
|
|
931
1758
|
columnSelectedWidget.options.keyNameEnabled = true;
|
|
932
1759
|
} else {
|
|
@@ -938,122 +1765,335 @@ export default {
|
|
|
938
1765
|
columnSelectedWidget.options.labelHidden = true;
|
|
939
1766
|
}
|
|
940
1767
|
}
|
|
941
|
-
return {columnSelectedWidget, columnEditFields};
|
|
1768
|
+
return { columnSelectedWidget, columnEditFields };
|
|
1769
|
+
},
|
|
1770
|
+
findColumnByColumnId(columnList, columnId) {
|
|
1771
|
+
let result = null;
|
|
1772
|
+
if (columnList) {
|
|
1773
|
+
let column = columnList.find((item) => item.columnId == columnId);
|
|
1774
|
+
for (let column of columnList) {
|
|
1775
|
+
if (column.columnId == columnId) {
|
|
1776
|
+
result = column;
|
|
1777
|
+
break;
|
|
1778
|
+
} else if (column.children && column.children.length) {
|
|
1779
|
+
let subColumn = this.findColumnByColumnId(
|
|
1780
|
+
column.children,
|
|
1781
|
+
children
|
|
1782
|
+
);
|
|
1783
|
+
if (subColumn) {
|
|
1784
|
+
result = subColumn;
|
|
1785
|
+
break;
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
return result;
|
|
1791
|
+
},
|
|
1792
|
+
|
|
1793
|
+
getRowWidget(row) {
|
|
1794
|
+
let widget = row.widget;
|
|
1795
|
+
if (!widget) {
|
|
1796
|
+
widget.options.a = a;
|
|
1797
|
+
widget.options.a = a;
|
|
1798
|
+
}
|
|
1799
|
+
return widget;
|
|
1800
|
+
},
|
|
1801
|
+
confirmEditTreeButtonGroupConfig(rowConfig) {
|
|
1802
|
+
if (this.currentEditTreeButtonGroupRow) {
|
|
1803
|
+
Object.assign(this.currentEditTreeButtonGroupRow, rowConfig);
|
|
1804
|
+
}
|
|
1805
|
+
this.currentEditTreeButtonGroupRow = null;
|
|
1806
|
+
this.editTreeButtonGroupRowData = null;
|
|
942
1807
|
},
|
|
943
1808
|
openFormatConfigDialog(row, index) {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
option = columnSelectedWidget.options;
|
|
950
|
-
selectedWidget = columnSelectedWidget;
|
|
951
|
-
} else {
|
|
952
|
-
option = {}
|
|
953
|
-
selectedWidget = {};
|
|
1809
|
+
if (row.formatS === "editTreeButtonGroup") {
|
|
1810
|
+
this.currentEditTreeButtonGroupRow = row;
|
|
1811
|
+
this.editTreeButtonGroupRowData = this.$baseLodash.cloneDeep(row);
|
|
1812
|
+
this.showEditTreeButtonGroupConfigDialog = true;
|
|
1813
|
+
return;
|
|
954
1814
|
}
|
|
1815
|
+
if (row.formatS == "widgetRender") {
|
|
1816
|
+
let formWidgetList = deepClone(this.designer.widgetList);
|
|
1817
|
+
const widgetMap = this.buildColumnWidgetMap(
|
|
1818
|
+
this.sourceTableColumnsSnapshot || this.optionModel.tableColumns || []
|
|
1819
|
+
);
|
|
1820
|
+
let tableData = this.restoreColumnWidgetRefs(
|
|
1821
|
+
this.cloneTableColumnsForEdit(this.tableData),
|
|
1822
|
+
widgetMap
|
|
1823
|
+
);
|
|
1824
|
+
let columnId = row.columnId;
|
|
955
1825
|
|
|
956
|
-
|
|
957
|
-
row.columnOption = columnOption;
|
|
958
|
-
this.operateIndex = index;
|
|
1826
|
+
let dataTableName = this.optionModel.name;
|
|
959
1827
|
|
|
1828
|
+
let targetColumn = null;
|
|
1829
|
+
loopHandleWidget(formWidgetList, (item) => {
|
|
1830
|
+
if (item.options.name == dataTableName) {
|
|
1831
|
+
item.options.tableColumns = tableData;
|
|
1832
|
+
targetColumn = this.findColumnByColumnId(
|
|
1833
|
+
item.options.tableColumns,
|
|
1834
|
+
columnId
|
|
1835
|
+
);
|
|
1836
|
+
}
|
|
1837
|
+
});
|
|
1838
|
+
let getWidgetList = (subWidgetList = []) => {
|
|
1839
|
+
targetColumn.widgetList = this.$baseLodash.cloneDeep(subWidgetList);
|
|
1840
|
+
return formWidgetList;
|
|
1841
|
+
};
|
|
1842
|
+
let sourceData = {
|
|
1843
|
+
formWidgetList,
|
|
1844
|
+
dataTableName,
|
|
1845
|
+
columnId,
|
|
1846
|
+
getWidgetList,
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1849
|
+
this.openWidgetRenderDialog(row, sourceData);
|
|
1850
|
+
return;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
const { columnSelectedWidget, columnEditFields } =
|
|
1854
|
+
this.getColumnWidgetConfig(row);
|
|
1855
|
+
if (!columnSelectedWidget) {
|
|
1856
|
+
this.$message.warning(this.$t1("请先选择列格式化类型"));
|
|
1857
|
+
return;
|
|
1858
|
+
}
|
|
1859
|
+
columnSelectedWidget.options = this.$baseLodash.cloneDeep(
|
|
1860
|
+
columnSelectedWidget.options
|
|
1861
|
+
);
|
|
1862
|
+
this.operateIndex = index;
|
|
960
1863
|
this.openWidgetPropertyDialog({
|
|
961
1864
|
row: row,
|
|
962
|
-
columnSelectedWidget
|
|
1865
|
+
columnSelectedWidget,
|
|
1866
|
+
tableColumns: this.tableData,
|
|
963
1867
|
index: index,
|
|
964
|
-
columnEditFields
|
|
965
|
-
callback: (
|
|
966
|
-
this.confirmFormatConfigDialog(
|
|
967
|
-
}
|
|
968
|
-
})
|
|
1868
|
+
columnEditFields,
|
|
1869
|
+
callback: (confirmedWidget) => {
|
|
1870
|
+
this.confirmFormatConfigDialog(confirmedWidget, row);
|
|
1871
|
+
},
|
|
1872
|
+
});
|
|
969
1873
|
},
|
|
970
1874
|
getFieldKeyNameByOptions(options) {
|
|
971
1875
|
let o = options.name;
|
|
972
|
-
return (
|
|
973
|
-
(options.keyNameEnabled
|
|
974
|
-
&& options.keyName)
|
|
975
|
-
|| o
|
|
976
|
-
);
|
|
1876
|
+
return (options.keyNameEnabled && options.keyName) || o;
|
|
977
1877
|
},
|
|
978
|
-
confirmFormatConfigDialog(
|
|
979
|
-
|
|
980
|
-
|
|
1878
|
+
confirmFormatConfigDialog(columnSelectedWidget, row) {
|
|
1879
|
+
row.widget = columnSelectedWidget;
|
|
1880
|
+
const options = columnSelectedWidget.options;
|
|
1881
|
+
|
|
981
1882
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
|
982
1883
|
if (!isButtontCell) {
|
|
983
|
-
row.prop = this.getFieldKeyNameByOptions(
|
|
984
|
-
row.label =
|
|
985
|
-
row.required =
|
|
1884
|
+
row.prop = this.getFieldKeyNameByOptions(options);
|
|
1885
|
+
row.label = options.label;
|
|
1886
|
+
row.required = options.required;
|
|
986
1887
|
}
|
|
987
1888
|
},
|
|
988
1889
|
openEditFormatConfigDialog(row, index) {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
option = columnSelectedWidget.options;
|
|
995
|
-
selectedWidget = columnSelectedWidget;
|
|
996
|
-
} else {
|
|
997
|
-
option = {}
|
|
998
|
-
selectedWidget = {};
|
|
1890
|
+
const { columnSelectedWidget, columnEditFields } =
|
|
1891
|
+
this.getColumnWidgetConfig(row, false, true);
|
|
1892
|
+
if (!columnSelectedWidget) {
|
|
1893
|
+
this.$message.warning(this.$t1("请先选择编辑列格式化类型"));
|
|
1894
|
+
return;
|
|
999
1895
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1896
|
+
columnSelectedWidget.options = this.$baseLodash.cloneDeep(
|
|
1897
|
+
columnSelectedWidget.options
|
|
1898
|
+
);
|
|
1003
1899
|
this.operateIndex = index;
|
|
1004
|
-
|
|
1005
1900
|
this.openWidgetPropertyDialog({
|
|
1006
1901
|
row: row,
|
|
1007
|
-
|
|
1902
|
+
tableColumns: this.tableData,
|
|
1903
|
+
columnSelectedWidget,
|
|
1008
1904
|
index: index,
|
|
1009
|
-
columnEditFields
|
|
1010
|
-
callback: (
|
|
1011
|
-
this.confirmEditFormatConfigDialog(
|
|
1012
|
-
}
|
|
1013
|
-
})
|
|
1905
|
+
columnEditFields,
|
|
1906
|
+
callback: (confirmedWidget) => {
|
|
1907
|
+
this.confirmEditFormatConfigDialog(confirmedWidget, row);
|
|
1908
|
+
},
|
|
1909
|
+
});
|
|
1014
1910
|
},
|
|
1015
|
-
confirmEditFormatConfigDialog(
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
row.
|
|
1020
|
-
row.required = columnOption.required;*/
|
|
1911
|
+
confirmEditFormatConfigDialog(columnSelectedWidget, row) {
|
|
1912
|
+
row.editWidget = columnSelectedWidget;
|
|
1913
|
+
},
|
|
1914
|
+
openColumnShowDialog(row) {
|
|
1915
|
+
this.editFormEventHandler(row, this.rowDataIndex, "columnShow");
|
|
1021
1916
|
},
|
|
1022
1917
|
openTableColumnConfigDialog(row, index) {
|
|
1023
1918
|
this.operateIndex = index;
|
|
1919
|
+
this.currentTableColumn = row;
|
|
1024
1920
|
let eventName = "tableColumnConfig";
|
|
1025
|
-
let eventParams = ["dataId", "formCode"]
|
|
1026
|
-
this.tableColumnConfigHeader = `${
|
|
1027
|
-
|
|
1921
|
+
let eventParams = ["dataId", "formCode"];
|
|
1922
|
+
this.tableColumnConfigHeader = `${
|
|
1923
|
+
this.optionModel.name
|
|
1924
|
+
}.${eventName}(${eventParams.join(", ")}) {`;
|
|
1925
|
+
this.tableColumnConfigCode = this.$baseLodash.cloneDeep(
|
|
1926
|
+
row.tableColumnConfig || ""
|
|
1927
|
+
);
|
|
1028
1928
|
|
|
1029
1929
|
this.tableColumnConfigTitle = `自定义表格列属性配置(${row.label})`;
|
|
1030
1930
|
this.showTableColumnConfigDialog = true;
|
|
1031
1931
|
},
|
|
1032
1932
|
saveTableColumnConfigDialog() {
|
|
1033
|
-
let row = this.
|
|
1933
|
+
let row = this.currentTableColumn;
|
|
1034
1934
|
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
1035
1935
|
let syntaxErrorFlag = false;
|
|
1036
1936
|
if (!!codeHints && codeHints.length > 0) {
|
|
1037
|
-
codeHints.forEach(chItem => {
|
|
1038
|
-
if (chItem.type ===
|
|
1937
|
+
codeHints.forEach((chItem) => {
|
|
1938
|
+
if (chItem.type === "error") {
|
|
1039
1939
|
syntaxErrorFlag = true;
|
|
1040
1940
|
}
|
|
1041
1941
|
});
|
|
1042
1942
|
|
|
1043
1943
|
if (syntaxErrorFlag) {
|
|
1044
|
-
this.$message.error(
|
|
1944
|
+
this.$message.error(
|
|
1945
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1946
|
+
);
|
|
1045
1947
|
return;
|
|
1046
1948
|
}
|
|
1047
1949
|
}
|
|
1048
|
-
this.$set(
|
|
1950
|
+
this.$set(
|
|
1951
|
+
row,
|
|
1952
|
+
"tableColumnConfig",
|
|
1953
|
+
this.$baseLodash.cloneDeep(this.tableColumnConfigCode)
|
|
1954
|
+
);
|
|
1049
1955
|
this.showTableColumnConfigDialog = false;
|
|
1956
|
+
},
|
|
1957
|
+
changeRowLabel(row) {
|
|
1958
|
+
this.setRowWidgetAttars(row, "label", row.label);
|
|
1959
|
+
},
|
|
1960
|
+
changeRowProp(row) {
|
|
1961
|
+
this.setRowWidgetAttars(row, "keyName", row.prop);
|
|
1962
|
+
},
|
|
1963
|
+
changeRowRequired(row) {
|
|
1964
|
+
this.setRowWidgetAttars(row, "required", row.required);
|
|
1965
|
+
},
|
|
1966
|
+
setRowWidgetAttars(row, key, value) {
|
|
1967
|
+
let type1 = this.columnFormatMap[row.formatS];
|
|
1968
|
+
let type2 = this.columnFormatMap[row.editFormatS];
|
|
1969
|
+
let newWidget = type1
|
|
1970
|
+
? this.designer.copyNewFieldWidget(
|
|
1971
|
+
this.designer.getFieldWidgetByType(type1)
|
|
1972
|
+
)
|
|
1973
|
+
: null;
|
|
1050
1974
|
|
|
1975
|
+
let newEditWidget = type2
|
|
1976
|
+
? this.designer.copyNewFieldWidget(
|
|
1977
|
+
this.designer.getFieldWidgetByType(type2)
|
|
1978
|
+
)
|
|
1979
|
+
: null;
|
|
1980
|
+
|
|
1981
|
+
if (newWidget && newWidget.formItemFlag && row.widget) {
|
|
1982
|
+
if (row.widget.options[key] !== undefined) {
|
|
1983
|
+
row.widget.options[key] = value;
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
if (newEditWidget && newEditWidget.formItemFlag && row.editWidget) {
|
|
1988
|
+
if (row.editWidget.options[key] !== undefined) {
|
|
1989
|
+
row.editWidget.options[key] = value;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1051
1992
|
},
|
|
1052
|
-
|
|
1053
|
-
|
|
1993
|
+
openRowEditDialog(row, index) {
|
|
1994
|
+
this.editRowData = row;
|
|
1995
|
+
this.rowData = this.cloneTableColumnsForEdit([row])[0];
|
|
1996
|
+
this.rowDataIndex = index;
|
|
1997
|
+
this.showRowEditDialog = true;
|
|
1998
|
+
},
|
|
1999
|
+
submitRowEditDialog() {
|
|
2000
|
+
Object.assign(this.editRowData, this.rowData);
|
|
2001
|
+
if (this.rowData.widget) {
|
|
2002
|
+
this.editRowData.widget = this.rowData.widget;
|
|
2003
|
+
}
|
|
2004
|
+
if (this.rowData.editWidget) {
|
|
2005
|
+
this.editRowData.editWidget = this.rowData.editWidget;
|
|
2006
|
+
}
|
|
2007
|
+
if (this.rowData.widgetList && this.rowData.widgetList.length) {
|
|
2008
|
+
this.editRowData.widgetList = this.rowData.widgetList;
|
|
2009
|
+
}
|
|
2010
|
+
this.showRowEditDialog = false;
|
|
2011
|
+
this.labelTooltipDialogVisible = false;
|
|
2012
|
+
},
|
|
2013
|
+
closeRowEditDialog() {
|
|
2014
|
+
this.showRowEditDialog = false;
|
|
2015
|
+
this.labelTooltipDialogVisible = false;
|
|
2016
|
+
},
|
|
2017
|
+
openLabelTooltipDialog() {
|
|
2018
|
+
this.labelTooltipValue = this.rowData.labelTooltip || "";
|
|
2019
|
+
this.labelTooltipDialogVisible = true;
|
|
2020
|
+
},
|
|
2021
|
+
submitLabelTooltipDialog() {
|
|
2022
|
+
const value = (this.labelTooltipValue || "").trim();
|
|
2023
|
+
this.rowData.labelTooltip = value || null;
|
|
2024
|
+
this.labelTooltipDialogVisible = false;
|
|
2025
|
+
},
|
|
2026
|
+
},
|
|
2027
|
+
};
|
|
1054
2028
|
</script>
|
|
1055
2029
|
<style scoped lang="scss">
|
|
1056
2030
|
.icon-drag:before {
|
|
1057
|
-
content:
|
|
2031
|
+
content: "\e61d";
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
/* 固定弹框内容区高度,避免加载前后抖动 */
|
|
2035
|
+
::v-deep .table-column-config-dialog.el-dialog {
|
|
2036
|
+
.el-dialog__body {
|
|
2037
|
+
height: 532px;
|
|
2038
|
+
max-height: 532px;
|
|
2039
|
+
overflow: hidden;
|
|
2040
|
+
box-sizing: border-box;
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
.table-column-dialog-cont {
|
|
2045
|
+
height: 516px;
|
|
2046
|
+
min-height: 516px;
|
|
2047
|
+
max-height: 516px;
|
|
2048
|
+
overflow: hidden;
|
|
2049
|
+
box-sizing: border-box;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
/* 完整列配置弹框:挂到 body,内容区可滚动 */
|
|
2053
|
+
::v-deep .table-column-row-edit-dialog.el-dialog {
|
|
2054
|
+
.el-dialog__body {
|
|
2055
|
+
max-height: calc(90vh - 130px);
|
|
2056
|
+
overflow-y: auto;
|
|
2057
|
+
overflow-x: hidden;
|
|
2058
|
+
box-sizing: border-box;
|
|
2059
|
+
|
|
2060
|
+
.cont.table-column-row-edit-cont {
|
|
2061
|
+
overflow: visible;
|
|
2062
|
+
max-height: none;
|
|
2063
|
+
padding-bottom: 12px;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
.form-m2 {
|
|
2067
|
+
height: auto !important;
|
|
2068
|
+
overflow: visible !important;
|
|
2069
|
+
|
|
2070
|
+
.el-form-item.form-item-full:last-child {
|
|
2071
|
+
margin-bottom: 8px;
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
.table-column-row-edit-cont {
|
|
2078
|
+
box-sizing: border-box;
|
|
2079
|
+
|
|
2080
|
+
::v-deep .form-m2 {
|
|
2081
|
+
.form-item-full {
|
|
2082
|
+
width: calc(100% - 20px) !important;
|
|
2083
|
+
display: block;
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
.form-item-full .el-input {
|
|
2087
|
+
width: 100% !important;
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
::v-deep .custom-divider.el-divider--horizontal {
|
|
2092
|
+
margin: 10px 0;
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
::v-deep .label-tooltip-textarea textarea {
|
|
2097
|
+
min-height: 320px;
|
|
1058
2098
|
}
|
|
1059
2099
|
</style>
|