agilebuilder-ui 1.0.0
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/README.md +7 -0
- package/index.html +13 -0
- package/package.json +36 -0
- package/packages/IntervalSelection/index.js +6 -0
- package/packages/IntervalSelection/src/quarterScope.vue +405 -0
- package/packages/IntervalSelection/src/sectionDate.vue +475 -0
- package/packages/breadcrumb/index.js +6 -0
- package/packages/breadcrumb/src/breadcrumb.vue +81 -0
- package/packages/department-tree/index.js +6 -0
- package/packages/department-tree/src/department-tree.vue +114 -0
- package/packages/department-tree-inline/index.js +6 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +494 -0
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +367 -0
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
- package/packages/department-tree-inline/src/department-tree-service.js +344 -0
- package/packages/department-tree-inline/src/search-result.vue +238 -0
- package/packages/department-user-tree/index.js +6 -0
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +133 -0
- package/packages/department-user-tree/src/department-user-single-tree.vue +96 -0
- package/packages/department-user-tree/src/department-user-tree.vue +115 -0
- package/packages/department-user-tree-inline/index.js +9 -0
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +758 -0
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +358 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +87 -0
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +309 -0
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +180 -0
- package/packages/department-user-tree-inline/src/search-result.vue +286 -0
- package/packages/directives/prevent-reclick.js +22 -0
- package/packages/dynamic-source-select/index.js +6 -0
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +124 -0
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +857 -0
- package/packages/dynamic-source-select/src/events.js +77 -0
- package/packages/fs-preview/index.js +6 -0
- package/packages/fs-preview/src/fs-preview.vue +303 -0
- package/packages/fs-upload/index.js +6 -0
- package/packages/fs-upload/src/fs-upload-multi.vue +458 -0
- package/packages/fs-upload/src/fs-upload-single.vue +365 -0
- package/packages/fs-upload/src/fs-upload.vue +191 -0
- package/packages/fs-upload/src/see-big-picture.vue +67 -0
- package/packages/fs-upload-list/index.js +6 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +387 -0
- package/packages/hamburger/index.js +6 -0
- package/packages/hamburger/src/hamburger.vue +50 -0
- package/packages/index.js +124 -0
- package/packages/multipart-upload/index.js +6 -0
- package/packages/multipart-upload/src/index.vue +66 -0
- package/packages/multipart-upload/src/multipart-upload-form.vue +395 -0
- package/packages/multipart-upload/src/multipart-upload-list.vue +539 -0
- package/packages/organization-input/index.js +6 -0
- package/packages/organization-input/src/organization-input.vue +579 -0
- package/packages/plugins/export-data-new.js +630 -0
- package/packages/plugins/export-data.js +431 -0
- package/packages/plugins/index.js +15 -0
- package/packages/plugins/public-method.js +47 -0
- package/packages/remove-department/index.js +6 -0
- package/packages/remove-department/src/remove-department.vue +201 -0
- package/packages/remove-department/src/remove-dept-service.js +31 -0
- package/packages/remove-user/index.js +6 -0
- package/packages/remove-user/src/remove-user-service.js +31 -0
- package/packages/remove-user/src/remove-user.vue +227 -0
- package/packages/remove-workgroup/index.js +6 -0
- package/packages/remove-workgroup/src/remove-workgroup-service.js +31 -0
- package/packages/remove-workgroup/src/remove-workgroup.vue +184 -0
- package/packages/rich-editor/index.js +7 -0
- package/packages/rich-editor/index.vue +314 -0
- package/packages/rich-editor/tinymce/icons/default/icons.min.js +1 -0
- package/packages/rich-editor/tinymce/langs/README.md +3 -0
- package/packages/rich-editor/tinymce/langs/zh-Hans.js +1 -0
- package/packages/rich-editor/tinymce/license.txt +21 -0
- package/packages/rich-editor/tinymce/models/dom/model.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/accordion/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/advlist/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/anchor/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/autolink/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/autoresize/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/autosave/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/charmap/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/code/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/codesample/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/directionality/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
- package/packages/rich-editor/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
- package/packages/rich-editor/tinymce/plugins/emoticons/js/emojis.js +1 -0
- package/packages/rich-editor/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
- package/packages/rich-editor/tinymce/plugins/emoticons/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/fullscreen/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
- package/packages/rich-editor/tinymce/plugins/help/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/image/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/importcss/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/insertdatetime/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/link/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/lists/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/media/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/nonbreaking/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/pagebreak/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/preview/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/quickbars/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/save/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/searchreplace/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/table/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/template/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/visualblocks/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/visualchars/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/plugins/wordcount/plugin.min.js +4 -0
- package/packages/rich-editor/tinymce/skins/content/dark/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/content/dark/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/content/default/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/content/default/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/content/document/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/content/document/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/content/tinymce-5/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/content/tinymce-5/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/content/tinymce-5-dark/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/content/tinymce-5-dark/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/content/writer/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/content/writer/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide/content.inline.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide/skin.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.inline.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/packages/rich-editor/tinymce/themes/silver/theme.min.js +4 -0
- package/packages/rich-editor/tinymce/tinymce.d.ts +3238 -0
- package/packages/rich-editor/tinymce/tinymce.min.js +4 -0
- package/packages/rich-editor/tinymce/zh_CN.js +418 -0
- package/packages/rich-editor/viewer.vue +105 -0
- package/packages/scan-code-input/index.js +6 -0
- package/packages/scan-code-input/src/events.js +34 -0
- package/packages/scan-code-input/src/scan-code-input-colse.vue +140 -0
- package/packages/scan-code-input/src/scan-code-input.vue +132 -0
- package/packages/secret-info/index.js +7 -0
- package/packages/secret-info/index.vue +100 -0
- package/packages/super-grid/index.js +7 -0
- package/packages/super-grid/src/apis.js +1193 -0
- package/packages/super-grid/src/columns-config.vue +429 -0
- package/packages/super-grid/src/components/grid-icon.vue +162 -0
- package/packages/super-grid/src/components/hyperlinks.vue +114 -0
- package/packages/super-grid/src/custom-formatter.js +430 -0
- package/packages/super-grid/src/dynamic-input.vue +1473 -0
- package/packages/super-grid/src/eventBus.js +10 -0
- package/packages/super-grid/src/events.js +56 -0
- package/packages/super-grid/src/formValidatorUtil.js +300 -0
- package/packages/super-grid/src/formatter.js +196 -0
- package/packages/super-grid/src/group-column.vue +99 -0
- package/packages/super-grid/src/header-context-menu.vue +82 -0
- package/packages/super-grid/src/index-column.vue +69 -0
- package/packages/super-grid/src/normal-column.vue +1239 -0
- package/packages/super-grid/src/public-methods.js +30 -0
- package/packages/super-grid/src/row-operation.vue +193 -0
- package/packages/super-grid/src/search-button.vue +79 -0
- package/packages/super-grid/src/search-condition-input.vue +74 -0
- package/packages/super-grid/src/search-condition-list.vue +70 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +833 -0
- package/packages/super-grid/src/search-form-dialog.vue +77 -0
- package/packages/super-grid/src/search-form-item.vue +496 -0
- package/packages/super-grid/src/search-form-number.vue +111 -0
- package/packages/super-grid/src/search-form-open.vue +178 -0
- package/packages/super-grid/src/search-form-ordinarySearch.vue +248 -0
- package/packages/super-grid/src/search-form.vue +767 -0
- package/packages/super-grid/src/search-methods.js +591 -0
- package/packages/super-grid/src/selection-column.vue +46 -0
- package/packages/super-grid/src/store.js +3 -0
- package/packages/super-grid/src/super-grid-service.js +729 -0
- package/packages/super-grid/src/super-grid.vue +3025 -0
- package/packages/super-grid/src/utils.js +880 -0
- package/packages/super-grid/src/view-image-dialog.vue +190 -0
- package/packages/super-nine-grid/index.js +7 -0
- package/packages/super-nine-grid/src/apis.js +108 -0
- package/packages/super-nine-grid/src/custom-formatter.js +73 -0
- package/packages/super-nine-grid/src/formatter.js +134 -0
- package/packages/super-nine-grid/src/search-form-number.vue +35 -0
- package/packages/super-nine-grid/src/search-form.vue +704 -0
- package/packages/super-nine-grid/src/search-methods.js +151 -0
- package/packages/super-nine-grid/src/store.js +3 -0
- package/packages/super-nine-grid/src/super-grid-service.js +108 -0
- package/packages/super-nine-grid/src/super-nine-grid.vue +1211 -0
- package/packages/super-nine-grid/src/utils.js +264 -0
- package/packages/svg-icon/index.js +6 -0
- package/packages/svg-icon/src/svg-icon.vue +43 -0
- package/packages/utils/date-util.js +292 -0
- package/packages/utils/dom.js +227 -0
- package/packages/utils/gogocodeTransfer.js +59 -0
- package/packages/utils/memory-cache-utils.js +117 -0
- package/packages/utils/utils.js +180 -0
- package/packages/utils/value-set.js +97 -0
- package/packages/valid-code/index.js +7 -0
- package/packages/valid-code/src/valid-code.vue +104 -0
- package/packages/workflow-button/index.js +6 -0
- package/packages/workflow-button/src/workflow-button.vue +569 -0
- package/packages/workflow-history-list/index.js +6 -0
- package/packages/workflow-history-list/src/api.js +7 -0
- package/packages/workflow-history-list/src/workflow-history-list.vue +302 -0
- package/packages/workgroup-tree/index.js +6 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +87 -0
- package/packages/workgroup-tree-inline/index.js +6 -0
- package/packages/workgroup-tree-inline/src/search-result.vue +226 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +539 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +93 -0
- package/packages/workgroup-user-tree/index.js +6 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +104 -0
- package/packages/workgroup-user-tree-inline/index.js +9 -0
- package/packages/workgroup-user-tree-inline/src/search-result.vue +270 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +239 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +681 -0
- package/packages/year-range-picker/index.js +6 -0
- package/packages/year-range-picker/src/year-range-picker.vue +53 -0
- package/public/vite.svg +1 -0
- package/src/api/sso-service.js +193 -0
- package/src/api/tab.js +36 -0
- package/src/api/user-service.js +11 -0
- package/src/assets/401/401.gif +0 -0
- package/src/assets/404/404-cloud.png +0 -0
- package/src/assets/404/404.png +0 -0
- package/src/assets/cloud.png +0 -0
- package/src/assets/nonemessage.png +0 -0
- package/src/directives/permission/index.js +13 -0
- package/src/directives/permission/permission.js +20 -0
- package/src/i18n/i18n.js +16 -0
- package/src/i18n/langs/cn.js +266 -0
- package/src/i18n/langs/en.js +276 -0
- package/src/index.js +93 -0
- package/src/permission.js +242 -0
- package/src/plugins.js +18 -0
- package/src/router/index.js +92 -0
- package/src/store/getters.js +15 -0
- package/src/store/index.js +19 -0
- package/src/store/modules/app.js +54 -0
- package/src/store/modules/permission.js +143 -0
- package/src/store/modules/tab-content.js +36 -0
- package/src/store/modules/user.js +365 -0
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/element-ui.scss +29 -0
- package/src/styles/index.scss +157 -0
- package/src/styles/mixin.scss +27 -0
- package/src/styles/theme/black/font-style.scss +70 -0
- package/src/styles/theme/black/index.scss +306 -0
- package/src/styles/theme/black/sidebar.scss +189 -0
- package/src/styles/theme/blue/font-style.scss +46 -0
- package/src/styles/theme/blue/index.scss +172 -0
- package/src/styles/theme/blue/sidebar.scss +171 -0
- package/src/styles/theme/blue2/font-style.scss +70 -0
- package/src/styles/theme/blue2/index.scss +188 -0
- package/src/styles/theme/blue2/sidebar.scss +201 -0
- package/src/styles/theme/dark-blue/button.scss +78 -0
- package/src/styles/theme/dark-blue/card.scss +63 -0
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +9 -0
- package/src/styles/theme/dark-blue/dialog.scss +17 -0
- package/src/styles/theme/dark-blue/element-variables.scss +7 -0
- package/src/styles/theme/dark-blue/font.scss +71 -0
- package/src/styles/theme/dark-blue/form.scss +51 -0
- package/src/styles/theme/dark-blue/index.scss +277 -0
- package/src/styles/theme/dark-blue/input.scss +15 -0
- package/src/styles/theme/dark-blue/message.scss +8 -0
- package/src/styles/theme/dark-blue/pagination.scss +18 -0
- package/src/styles/theme/dark-blue/radio.scss +13 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +268 -0
- package/src/styles/theme/dark-blue/tab.scss +83 -0
- package/src/styles/theme/dark-blue/table.scss +60 -0
- package/src/styles/theme/dark-blue/tree.scss +57 -0
- package/src/styles/theme/dark-blue/var.scss +1028 -0
- package/src/styles/theme/gray/card-style.scss +54 -0
- package/src/styles/theme/gray/font-style.scss +70 -0
- package/src/styles/theme/gray/index.scss +172 -0
- package/src/styles/theme/gray/input-style.scss +19 -0
- package/src/styles/theme/gray/scrollbar-style.scss +32 -0
- package/src/styles/theme/gray/sidebar.scss +243 -0
- package/src/styles/theme/gray/tab-style.scss +81 -0
- package/src/styles/transition.scss +47 -0
- package/src/utils/auth-api.js +259 -0
- package/src/utils/auth.js +98 -0
- package/src/utils/calculator/calculator-factory-wf.js +558 -0
- package/src/utils/calculator/calculator-factory.js +145 -0
- package/src/utils/calculator/calculator-util.js +166 -0
- package/src/utils/common-util.js +474 -0
- package/src/utils/eventBus.js +10 -0
- package/src/utils/iconUtils.js +37 -0
- package/src/utils/index.js +102 -0
- package/src/utils/jump-page-utils.js +824 -0
- package/src/utils/local-storage.js +33 -0
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +31 -0
- package/src/utils/permissionAuth.js +121 -0
- package/src/utils/range-selector.js +204 -0
- package/src/utils/request.js +280 -0
- package/src/utils/restful-interface-utils.js +57 -0
- package/src/utils/util.js +910 -0
- package/src/utils/validate.js +34 -0
- package/src/utils/watermark.js +108 -0
- package/src/utils/workflow-util.js +104 -0
- package/src/views/404.vue +248 -0
- package/src/views/dsc-component/Sidebar/Item.vue +81 -0
- package/src/views/dsc-component/Sidebar/Link.vue +38 -0
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +197 -0
- package/src/views/dsc-component/Sidebar/index.vue +229 -0
- package/src/views/dsc-component/tabs/tab-content.vue +215 -0
- package/src/views/error-page/401.vue +106 -0
- package/src/views/error-page/404.vue +248 -0
- package/src/views/layout/EmptyLayout.vue +3 -0
- package/src/views/layout/Layout.vue +81 -0
- package/src/views/layout/NewLayout.vue +18 -0
- package/src/views/layout/components/AppMain.vue +39 -0
- package/src/views/layout/components/Breadcrumb/index.vue +158 -0
- package/src/views/layout/components/Menubar/Item.vue +79 -0
- package/src/views/layout/components/Menubar/Link.vue +38 -0
- package/src/views/layout/components/Menubar/SidebarItem.vue +261 -0
- package/src/views/layout/components/Menubar/index.vue +210 -0
- package/src/views/layout/components/Sidebar/Item.vue +53 -0
- package/src/views/layout/components/Sidebar/Link.vue +38 -0
- package/src/views/layout/components/Sidebar/SidebarItem.vue +135 -0
- package/src/views/layout/components/Sidebar/index.vue +141 -0
- package/src/views/layout/components/iframe-page.vue +38 -0
- package/src/views/layout/components/index.js +4 -0
- package/src/views/layout/components/tabs/tab-content.vue +214 -0
- package/src/views/layout/mixin/ResizeHandler.js +41 -0
- package/src/views/layout/tab-content-iframe-index.vue +38 -0
- package/src/views/layout/tab-content-index.vue +92 -0
- package/src/views/login/authredirect.vue +10 -0
- package/src/views/login/index.vue +296 -0
- package/src/views/login/update-password.vue +243 -0
- package/src/views/redirect/index.vue +14 -0
- package/src/views/svg-icon/index.js +6 -0
- package/src/views/svg-icon/src/svg-icon.vue +46 -0
- package/src/views/wf-history/tache-subprocess-history.vue +45 -0
- package/vite.config.js +37 -0
|
@@ -0,0 +1,1473 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="type && type.indexOf('custom:')>=0 && componentName != ''" :style="(row.validateErrorField && row.validateErrorField === column.prop) ?'border:1px solid red':''">
|
|
3
|
+
<component
|
|
4
|
+
:is="componentName"
|
|
5
|
+
ref="customItem"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:entity="row"
|
|
8
|
+
:grid-data="gridData"
|
|
9
|
+
:page-grid-data="pageGridData"
|
|
10
|
+
:parent="parentFormData"
|
|
11
|
+
:prop="column.prop"
|
|
12
|
+
:row="row"
|
|
13
|
+
:row-index="position?position.row:null"
|
|
14
|
+
:select-options="options"
|
|
15
|
+
:value="innerValue"
|
|
16
|
+
:additional-param-map="additionalParamMap"
|
|
17
|
+
@change="cellEvent('change',$event)"
|
|
18
|
+
@input="cellEvent('input',$event)"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-else :style="(row.validateErrorField && row.validateErrorField === column.prop) ?'border:1px solid red':''">
|
|
22
|
+
<!--必须有@input ,否则无法输入值-->
|
|
23
|
+
<el-date-picker
|
|
24
|
+
v-if="type==='year' || type==='month'"
|
|
25
|
+
ref="item"
|
|
26
|
+
v-model="innerValue"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:editable="false"
|
|
29
|
+
:format="isFormat()"
|
|
30
|
+
:placeholder="$t('imatrixUIMessage.selectTime')"
|
|
31
|
+
:type="type"
|
|
32
|
+
:value-format="isValueFormat()"
|
|
33
|
+
style="width: 100%;"
|
|
34
|
+
@blur="cellEvent('blur',$event)"
|
|
35
|
+
@change="cellEvent('change',$event)"
|
|
36
|
+
@focus="cellEvent('focus',$event)"
|
|
37
|
+
@input="cellEvent('input',$event)"
|
|
38
|
+
/>
|
|
39
|
+
<el-date-picker
|
|
40
|
+
v-if="type==='yearRange'"
|
|
41
|
+
ref="item"
|
|
42
|
+
v-model="innerValue"
|
|
43
|
+
:disabled="disabled"
|
|
44
|
+
:editable="false"
|
|
45
|
+
:placeholder="$t('imatrixUIMessage.selectYear')"
|
|
46
|
+
style="width: 100%;"
|
|
47
|
+
type="year"
|
|
48
|
+
value-format="YYYY"
|
|
49
|
+
@blur="cellEvent('blur',$event)"
|
|
50
|
+
@change="cellEvent('change',$event)"
|
|
51
|
+
@focus="cellEvent('focus',$event)"
|
|
52
|
+
@input="cellEvent('input',$event)"
|
|
53
|
+
/>
|
|
54
|
+
<!--必须有@input ,否则无法输入值-->
|
|
55
|
+
<el-date-picker
|
|
56
|
+
v-else-if="type==='dateTimePicker'"
|
|
57
|
+
ref="item"
|
|
58
|
+
v-model="innerValue"
|
|
59
|
+
:disabled="disabled"
|
|
60
|
+
:editable="false"
|
|
61
|
+
:format="isFormat()"
|
|
62
|
+
:placeholder="$t('imatrixUIMessage.selectTime')"
|
|
63
|
+
:value-format="isValueFormat()"
|
|
64
|
+
style="width: 100%;"
|
|
65
|
+
type="datetime"
|
|
66
|
+
@blur="cellEvent('blur',$event)"
|
|
67
|
+
@change="cellEvent('change',$event)"
|
|
68
|
+
@focus="cellEvent('focus',$event)"
|
|
69
|
+
@input="cellEvent('input',$event)"
|
|
70
|
+
/>
|
|
71
|
+
<el-date-picker
|
|
72
|
+
v-else-if="type==='date' || column.dataType === 'DATE'"
|
|
73
|
+
ref="item"
|
|
74
|
+
v-model="innerValue"
|
|
75
|
+
:disabled="disabled"
|
|
76
|
+
:editable="false"
|
|
77
|
+
:format="isFormat()"
|
|
78
|
+
:picker-options="pickerOptions"
|
|
79
|
+
:placeholder="$t('imatrixUIMessage.selectionDate')"
|
|
80
|
+
:value-format="isValueFormat()"
|
|
81
|
+
style="width: 100%;"
|
|
82
|
+
type="date"
|
|
83
|
+
@blur="cellEvent('blur',$event)"
|
|
84
|
+
@change="cellEvent('change',$event)"
|
|
85
|
+
@focus="cellEvent('focus',$event)"
|
|
86
|
+
@input="cellEvent('input',$event)"
|
|
87
|
+
/>
|
|
88
|
+
<!--必须有@input ,否则无法输入值-->
|
|
89
|
+
<el-date-picker
|
|
90
|
+
v-else-if="type==='time' || column.dataType === 'TIME'"
|
|
91
|
+
ref="item"
|
|
92
|
+
v-model="innerValue"
|
|
93
|
+
:disabled="disabled"
|
|
94
|
+
:editable="false"
|
|
95
|
+
:format="isFormat()"
|
|
96
|
+
:placeholder="$t('imatrixUIMessage.selectTime')"
|
|
97
|
+
:value-format="isValueFormat()"
|
|
98
|
+
style="width: 100%;"
|
|
99
|
+
type="datetime"
|
|
100
|
+
@blur="cellEvent('blur',$event)"
|
|
101
|
+
@change="cellEvent('change',$event)"
|
|
102
|
+
@focus="cellEvent('focus',$event)"
|
|
103
|
+
@input="cellEvent('input',$event)"
|
|
104
|
+
/>
|
|
105
|
+
<el-time-picker
|
|
106
|
+
v-else-if="type==='timePicker'"
|
|
107
|
+
ref="item"
|
|
108
|
+
v-model="innerValue"
|
|
109
|
+
:disabled="disabled"
|
|
110
|
+
:format="isFormat()"
|
|
111
|
+
:placeholder="$t('imatrixUIMessage.pleaseEnterATimePoint')"
|
|
112
|
+
:value-format="isValueFormat()"
|
|
113
|
+
style="width: 100%;"
|
|
114
|
+
@blur="cellEvent('blur',$event)"
|
|
115
|
+
@change="cellEvent('change',$event)"
|
|
116
|
+
@focus="cellEvent('focus',$event)"
|
|
117
|
+
@input="cellEvent('input',$event)"
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
<!--必须有@input ,否则无法输入值,如果是数字类型需要加上.number修饰符-->
|
|
121
|
+
<el-input
|
|
122
|
+
v-else-if="type==='input' && (column.dataType === 'INTEGER' || column.dataType === 'LONG' )"
|
|
123
|
+
ref="item"
|
|
124
|
+
v-model.number="innerValue"
|
|
125
|
+
:disabled="disabled"
|
|
126
|
+
:placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
|
|
127
|
+
:title="innerValue"
|
|
128
|
+
clearable
|
|
129
|
+
@blur="cellEvent('blur',$event)"
|
|
130
|
+
@change="cellEvent('change', $event)"
|
|
131
|
+
@clear="cellEvent('clear', $event)"
|
|
132
|
+
@focus="cellEvent('focus',$event)"
|
|
133
|
+
@input="cellEvent('input',$event,true)"
|
|
134
|
+
/>
|
|
135
|
+
<!--必须有@input ,否则无法输入值-->
|
|
136
|
+
<el-input
|
|
137
|
+
v-else-if="type==='input'"
|
|
138
|
+
ref="item"
|
|
139
|
+
v-model="innerValue"
|
|
140
|
+
:disabled="disabled"
|
|
141
|
+
:maxlength="controlConfig.maxlength?controlConfig.maxlength:''"
|
|
142
|
+
:minlength="controlConfig.minlength?controlConfig.minlength:''"
|
|
143
|
+
:placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
|
|
144
|
+
:title="innerValue"
|
|
145
|
+
clearable
|
|
146
|
+
@blur="cellEvent('blur',$event)"
|
|
147
|
+
@change="cellEvent('change', $event)"
|
|
148
|
+
@clear="cellEvent('clear', $event)"
|
|
149
|
+
@focus="cellEvent('focus',$event)"
|
|
150
|
+
@input="cellEvent('input',$event,true)"
|
|
151
|
+
/>
|
|
152
|
+
|
|
153
|
+
<el-input
|
|
154
|
+
v-else-if="type==='textarea'"
|
|
155
|
+
ref="item"
|
|
156
|
+
v-model="innerValue"
|
|
157
|
+
:disabled="disabled"
|
|
158
|
+
:maxlength="controlConfig.maxlength?controlConfig.maxlength:''"
|
|
159
|
+
:minlength="controlConfig.minlength?controlConfig.minlength:''"
|
|
160
|
+
:placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
|
|
161
|
+
:rows="1"
|
|
162
|
+
:title="innerValue"
|
|
163
|
+
clearable
|
|
164
|
+
type="textarea"
|
|
165
|
+
@blur="cellEvent('blur',$event)"
|
|
166
|
+
@change="cellEvent('change', $event)"
|
|
167
|
+
@clear="cellEvent('clear', $event)"
|
|
168
|
+
@focus="cellEvent('focus',$event)"
|
|
169
|
+
@input="cellEvent('input',$event)"
|
|
170
|
+
/>
|
|
171
|
+
<fs-upload-list
|
|
172
|
+
v-else-if="type==='annex'"
|
|
173
|
+
:custom-view-url="true"
|
|
174
|
+
:disabled="disabled"
|
|
175
|
+
:file-info="fileInfo"
|
|
176
|
+
:file-list="fileList"
|
|
177
|
+
:file-set-obj="fileSetObj"
|
|
178
|
+
:is-sql="isSql"
|
|
179
|
+
:row="row"
|
|
180
|
+
:value="innerValue"
|
|
181
|
+
@delete="deleteFile"
|
|
182
|
+
@delete-success="deleteSuccess"
|
|
183
|
+
@upload-success="uploadOnSuccess"
|
|
184
|
+
/>
|
|
185
|
+
<multipart-upload
|
|
186
|
+
v-else-if="type==='multipartUpload'"
|
|
187
|
+
:disabled="disabled"
|
|
188
|
+
:entity="row"
|
|
189
|
+
:file-info="fileInfo"
|
|
190
|
+
:file-list="fileList"
|
|
191
|
+
:file-set-obj="fileSetObj"
|
|
192
|
+
:value="innerValue"
|
|
193
|
+
type="list"
|
|
194
|
+
@delete="deleteFile"
|
|
195
|
+
@delete-success="deleteSuccess"
|
|
196
|
+
@upload-success="uploadOnSuccess"
|
|
197
|
+
/>
|
|
198
|
+
<!-- <el-input
|
|
199
|
+
v-else-if="type==='annex' && !fileMultiple"
|
|
200
|
+
ref="item"
|
|
201
|
+
:value="innerValue"
|
|
202
|
+
:readonly="true"
|
|
203
|
+
:disabled="disabled"
|
|
204
|
+
:placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
|
|
205
|
+
>
|
|
206
|
+
<el-button slot="append" size="default" :disabled="disabled" icon="el-icon-upload2" @click="openAnnexUpload" />
|
|
207
|
+
<el-button v-if="innerValue" slot="append" :disabled="disabled" size="default" icon="el-icon-zoom-in" @click="previewImg" />
|
|
208
|
+
</el-input>
|
|
209
|
+
|
|
210
|
+
<el-input
|
|
211
|
+
v-else-if="type==='annex' && fileMultiple"
|
|
212
|
+
ref="item"
|
|
213
|
+
:value="lastFileName"
|
|
214
|
+
:readonly="true"
|
|
215
|
+
:disabled="disabled"
|
|
216
|
+
:placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
|
|
217
|
+
>
|
|
218
|
+
<el-button slot="append" size="default" :disabled="disabled" icon="el-icon-upload2" @click="openAnnexUpload" />
|
|
219
|
+
<el-button v-if="innerValue" slot="append" :disabled="disabled" size="default" icon="el-icon-zoom-in" @click="previewImg" />
|
|
220
|
+
</el-input> -->
|
|
221
|
+
|
|
222
|
+
<!-- <custom-fma v-if="type==null ||type === ''" /> -->
|
|
223
|
+
<!-- v-model="newValue" -->
|
|
224
|
+
<!--必须有@input ,否则无法输入值-->
|
|
225
|
+
<el-select
|
|
226
|
+
v-else-if="type==='select' && !isDynamicDataSourceSource()"
|
|
227
|
+
ref="item"
|
|
228
|
+
v-model="innerValue"
|
|
229
|
+
:allow-create="controlConfig.allowCreate?true:false"
|
|
230
|
+
:clearable="controlConfig.clearable?true:false"
|
|
231
|
+
:default-first-option="controlConfig.allowCreate?true:false"
|
|
232
|
+
:disabled="disabled"
|
|
233
|
+
:filterable="controlConfig.filterable?true:false"
|
|
234
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
235
|
+
:title="getClassOptionTitle(innerValue)"
|
|
236
|
+
@blur="cellEvent('blur',$event)"
|
|
237
|
+
@change="cellEvent('change',$event)"
|
|
238
|
+
@clear="cellEvent('clear',$event)"
|
|
239
|
+
@focus="cellEvent('focus',$event)"
|
|
240
|
+
@input="cellEvent('input',$event)"
|
|
241
|
+
@visible-change="cellEvent('visible-change',$event)"
|
|
242
|
+
>
|
|
243
|
+
<el-option
|
|
244
|
+
v-for="item in options"
|
|
245
|
+
:key="item.value"
|
|
246
|
+
:label="item.label"
|
|
247
|
+
:value="item.value"
|
|
248
|
+
/>
|
|
249
|
+
</el-select>
|
|
250
|
+
<!--必须有@input ,否则无法输入值-->
|
|
251
|
+
<el-select
|
|
252
|
+
v-else-if="type==='multiselect' && !isDynamicDataSourceSource()"
|
|
253
|
+
ref="item"
|
|
254
|
+
v-model="innerValue"
|
|
255
|
+
:disabled="disabled"
|
|
256
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
257
|
+
:title="getClassOptionTitle(innerValue)"
|
|
258
|
+
clearable
|
|
259
|
+
collapse-tags
|
|
260
|
+
multiple
|
|
261
|
+
@blur="cellEvent('blur',$event)"
|
|
262
|
+
@change="multiselectChange"
|
|
263
|
+
@clear="cellEvent('clear',$event)"
|
|
264
|
+
@focus="cellEvent('focus',$event)"
|
|
265
|
+
@input="cellEvent('input',$event)"
|
|
266
|
+
@visible-change="cellEvent('visible-change',$event)"
|
|
267
|
+
@remove-tag="cellEvent('remove-tag',$event)"
|
|
268
|
+
>
|
|
269
|
+
<el-option :label="$t('superGrid.selectAll')" value="saveAll"/>
|
|
270
|
+
<el-option
|
|
271
|
+
v-for="item in options"
|
|
272
|
+
:key="item.value"
|
|
273
|
+
:label="item.label"
|
|
274
|
+
:value="item.value"
|
|
275
|
+
/>
|
|
276
|
+
</el-select>
|
|
277
|
+
<dynamic-source-select
|
|
278
|
+
v-else-if="(type==='multiselect' || type==='select') && isDynamicDataSourceSource()"
|
|
279
|
+
v-model:value="innerValue"
|
|
280
|
+
:base-props="{
|
|
281
|
+
multiple: type==='multiselect'?true:false,
|
|
282
|
+
disabled:disabled
|
|
283
|
+
}"
|
|
284
|
+
:column="column"
|
|
285
|
+
:entity="row"
|
|
286
|
+
:is-join-table="isJoinTable"
|
|
287
|
+
:list-code="listCode"
|
|
288
|
+
:list-toolbar-form-data="listToolbarFormData"
|
|
289
|
+
:options="{
|
|
290
|
+
dynamicDataSourceCode:dynamicDataSourceCode,
|
|
291
|
+
valueSetOptions:valueSetOptions,
|
|
292
|
+
isSql:isSql,
|
|
293
|
+
additionalParameter: additionalParamMap?JSON.stringify(additionalParamMap):null
|
|
294
|
+
}"
|
|
295
|
+
:parent="parentFormData"
|
|
296
|
+
:table-name="tableName"
|
|
297
|
+
@blur="cellEvent('blur',$event)"
|
|
298
|
+
@change="multiselectChange"
|
|
299
|
+
@clear="cellEvent('clear',$event)"
|
|
300
|
+
@focus="cellEvent('focus',$event)"
|
|
301
|
+
@input="cellEvent('input',$event)"
|
|
302
|
+
@visible-change="cellEvent('visible-change',$event)"
|
|
303
|
+
@remove-tag="cellEvent('remove-tag',$event)"
|
|
304
|
+
@set-value="setDynamicSourceSelectValue"
|
|
305
|
+
/>
|
|
306
|
+
|
|
307
|
+
<el-input-number
|
|
308
|
+
v-else-if="type==='inputNumber'"
|
|
309
|
+
ref="item"
|
|
310
|
+
v-model="innerValue"
|
|
311
|
+
:controls-position="inputNumberSet.position"
|
|
312
|
+
:disabled="disabled"
|
|
313
|
+
:max="inputNumberSet.max==0?0:(!inputNumberSet.max?Infinity:inputNumberSet.max)"
|
|
314
|
+
:min="inputNumberSet.min==0?0:(!inputNumberSet.min?-Infinity:inputNumberSet.min)"
|
|
315
|
+
:precision="inputNumberSet.precision"
|
|
316
|
+
:step="!inputNumberSet.step?1:inputNumberSet.step"
|
|
317
|
+
@blur="cellEvent('blur',$event)"
|
|
318
|
+
@change="cellEvent('change',$event)"
|
|
319
|
+
@focus="cellEvent('focus',$event)"
|
|
320
|
+
@input="cellEvent('input',$event)"
|
|
321
|
+
/>
|
|
322
|
+
<!--mysql数据库--->
|
|
323
|
+
<el-switch
|
|
324
|
+
v-else-if="(type==='switch' || column.dataType === 'BOOLEAN') && dataSourceType === 'mysql'"
|
|
325
|
+
ref="item"
|
|
326
|
+
v-model="innerValue"
|
|
327
|
+
:disabled="disabled"
|
|
328
|
+
active-color="#13ce66"
|
|
329
|
+
inactive-color="#ff4949"
|
|
330
|
+
@change="cellEvent('change',$event)"
|
|
331
|
+
@input="cellEvent('input',$event,true)"
|
|
332
|
+
/>
|
|
333
|
+
<!--oracle或sqlserver数据库--->
|
|
334
|
+
<el-switch
|
|
335
|
+
v-else-if="type==='switch' || column.dataType === 'BOOLEAN'"
|
|
336
|
+
ref="item"
|
|
337
|
+
v-model="innerValue"
|
|
338
|
+
:active-value="1"
|
|
339
|
+
:disabled="disabled"
|
|
340
|
+
:inactive-value="0"
|
|
341
|
+
active-color="#13ce66"
|
|
342
|
+
inactive-color="#ff4949"
|
|
343
|
+
@change="cellEvent('change',$event)"
|
|
344
|
+
@input="cellEvent('input',$event,true)"
|
|
345
|
+
/>
|
|
346
|
+
<el-slider
|
|
347
|
+
v-else-if="type==='slider'"
|
|
348
|
+
ref="item"
|
|
349
|
+
v-model="innerValue"
|
|
350
|
+
:disabled="disabled"
|
|
351
|
+
@change="cellEvent('change',$event)"
|
|
352
|
+
@input="cellEvent('input',$event,true)"
|
|
353
|
+
/>
|
|
354
|
+
|
|
355
|
+
<el-rate
|
|
356
|
+
v-else-if="type==='rate'"
|
|
357
|
+
ref="item"
|
|
358
|
+
v-model="innerValue"
|
|
359
|
+
:disabled="disabled"
|
|
360
|
+
@change="cellEvent('change',$event)"
|
|
361
|
+
@input="cellEvent('input',$event,true)"
|
|
362
|
+
/>
|
|
363
|
+
|
|
364
|
+
<organization-input
|
|
365
|
+
v-else-if="deptManTree || deptTree || wgManTree || wgTree"
|
|
366
|
+
:check-strictly="isCheckStrictly"
|
|
367
|
+
:department-info="departmentInfo"
|
|
368
|
+
:disabled="disabled"
|
|
369
|
+
:fields="fields"
|
|
370
|
+
:is-join-table="isJoinTable"
|
|
371
|
+
:models="row"
|
|
372
|
+
:multiple="isMultiTree"
|
|
373
|
+
:table-name="tableName"
|
|
374
|
+
:tree-type="deptManTree?'DeptUserTree':deptTree?'DeptTree':wgManTree?'WgTree':wgTree?'WgUserTree':null"
|
|
375
|
+
:value="innerValue"
|
|
376
|
+
@append="appendOrganizationInputEvent"
|
|
377
|
+
@clear="clearOrganizationInputEvent"
|
|
378
|
+
@focus="showOrganizationTree"
|
|
379
|
+
@replace="replaceOrganizationInputEvent"
|
|
380
|
+
@setValue="organizationInputEvent"
|
|
381
|
+
/>
|
|
382
|
+
|
|
383
|
+
<el-dialog
|
|
384
|
+
:append-to-body="true"
|
|
385
|
+
:show-close="true"
|
|
386
|
+
:title="$t('imatrixUIMessage.tips')"
|
|
387
|
+
:visible.sync="annexUploadFlag"
|
|
388
|
+
width="30%"
|
|
389
|
+
>
|
|
390
|
+
<el-upload
|
|
391
|
+
v-if="type==='annex' && annexUploadFlag"
|
|
392
|
+
:accept="fileSetObj&&fileSetObj.accept?fileSetObj.accept:null"
|
|
393
|
+
:action="defaultAction"
|
|
394
|
+
:before-upload="handleBeforeUpload"
|
|
395
|
+
:headers="headers"
|
|
396
|
+
:on-success="uploadOnSuccess"
|
|
397
|
+
:with-credentials="true"
|
|
398
|
+
name="file"
|
|
399
|
+
>
|
|
400
|
+
<el-button>{{ $t('imatrixUIMessage.upload') }}</el-button>
|
|
401
|
+
</el-upload>
|
|
402
|
+
</el-dialog>
|
|
403
|
+
<view-image-dialog
|
|
404
|
+
v-if="showSingleImgFlag"
|
|
405
|
+
:deleteable="!disabled"
|
|
406
|
+
:downloadable="!disabled"
|
|
407
|
+
:file-list="fileList"
|
|
408
|
+
@close="showSingleImgFlag = false"
|
|
409
|
+
@delete="deleteFile"
|
|
410
|
+
/>
|
|
411
|
+
</div>
|
|
412
|
+
</template>
|
|
413
|
+
<script>
|
|
414
|
+
import store from './store'
|
|
415
|
+
import {
|
|
416
|
+
analysisFileSetObj,
|
|
417
|
+
getAdditionalParamMap,
|
|
418
|
+
getFileList,
|
|
419
|
+
isDisableEdit,
|
|
420
|
+
isDynamicDataSourceSource,
|
|
421
|
+
isEditOptionFunction,
|
|
422
|
+
otherFilesToStandard
|
|
423
|
+
} from './utils'
|
|
424
|
+
import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select.vue'
|
|
425
|
+
import {getEntityFieldValue, setEntityFieldValue} from '../../../src/utils/util'
|
|
426
|
+
import {getToken} from '../../../src/utils/auth'
|
|
427
|
+
import apis from './apis'
|
|
428
|
+
import ViewImageDialog from './view-image-dialog'
|
|
429
|
+
import {$emit} from '../../utils/gogocodeTransfer'
|
|
430
|
+
|
|
431
|
+
export default {
|
|
432
|
+
name: 'DynamicInput',
|
|
433
|
+
components: {
|
|
434
|
+
dynamicSourceSelect,
|
|
435
|
+
ViewImageDialog
|
|
436
|
+
},
|
|
437
|
+
props: {
|
|
438
|
+
value: {
|
|
439
|
+
type: [String, Boolean, Number, Date, Array],
|
|
440
|
+
default: null
|
|
441
|
+
},
|
|
442
|
+
type: {
|
|
443
|
+
type: String,
|
|
444
|
+
default: 'input'
|
|
445
|
+
},
|
|
446
|
+
position: {
|
|
447
|
+
type: Object,
|
|
448
|
+
default: null
|
|
449
|
+
},
|
|
450
|
+
lineEdit: {
|
|
451
|
+
type: Object,
|
|
452
|
+
default: null
|
|
453
|
+
},
|
|
454
|
+
options: {
|
|
455
|
+
type: Array,
|
|
456
|
+
default: null
|
|
457
|
+
},
|
|
458
|
+
// 字段配置
|
|
459
|
+
column: {
|
|
460
|
+
type: Object,
|
|
461
|
+
default: null
|
|
462
|
+
},
|
|
463
|
+
// 行数据
|
|
464
|
+
row: {
|
|
465
|
+
type: Object,
|
|
466
|
+
default: null
|
|
467
|
+
},
|
|
468
|
+
listCode: {
|
|
469
|
+
type: String,
|
|
470
|
+
default: null
|
|
471
|
+
},
|
|
472
|
+
isSql: {
|
|
473
|
+
type: Boolean,
|
|
474
|
+
default: false
|
|
475
|
+
},
|
|
476
|
+
listToolbarFormData: {
|
|
477
|
+
type: Object,
|
|
478
|
+
default: null
|
|
479
|
+
},
|
|
480
|
+
rowIndex: {
|
|
481
|
+
type: Number,
|
|
482
|
+
default: -1
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
data() {
|
|
486
|
+
let innerValue = this.value
|
|
487
|
+
if (this.type && this.type === 'select') {
|
|
488
|
+
// 单选下拉框时值处理
|
|
489
|
+
if (this.column.dataType !== 'TEXT') {
|
|
490
|
+
innerValue = this.value && this.value !== null && typeof (this.value) !== 'string' ? this.value + '' : this.value
|
|
491
|
+
$emit(this, 'update:value', innerValue)
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
const defaultValue = this.getDefaultValue(innerValue)
|
|
495
|
+
if (defaultValue !== undefined && defaultValue !== null) {
|
|
496
|
+
innerValue = defaultValue
|
|
497
|
+
}
|
|
498
|
+
const disabled = isDisableEdit(this.column.prop, this.listCode, this.row)
|
|
499
|
+
const defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
|
|
500
|
+
if (!this.listCode) {
|
|
501
|
+
this.listCode = store.get('_list_code')
|
|
502
|
+
}
|
|
503
|
+
const gridParams = store.get(this.listCode)
|
|
504
|
+
let tableName
|
|
505
|
+
if (gridParams && gridParams.basicInfo && gridParams.basicInfo.tableName) {
|
|
506
|
+
tableName = gridParams.basicInfo.tableName
|
|
507
|
+
}
|
|
508
|
+
let isHasJoinTable
|
|
509
|
+
if (gridParams && gridParams.basicInfo && gridParams.basicInfo.hasJoinTable) {
|
|
510
|
+
isHasJoinTable = gridParams.basicInfo.hasJoinTable
|
|
511
|
+
}
|
|
512
|
+
let parentFormData
|
|
513
|
+
if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
|
|
514
|
+
parentFormData = gridParams.options.extraParam.entityMap
|
|
515
|
+
}
|
|
516
|
+
const headers = {Authorization: getToken()}
|
|
517
|
+
// 数据库类型,值为mysql、oracle、sqlserver,默认是mysql,el-switch组件值保存需要使用
|
|
518
|
+
let dataSourceType = 'mysql'
|
|
519
|
+
if (window.$vueApp.config.globalProperties.dataSourceType) {
|
|
520
|
+
dataSourceType = window.$vueApp.config.globalProperties.dataSourceType.toLowerCase()
|
|
521
|
+
}
|
|
522
|
+
const gridData = gridParams.gridData
|
|
523
|
+
const subTableData = gridParams.subTableData
|
|
524
|
+
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
525
|
+
let controlConfig = {}
|
|
526
|
+
if (this.column.controlConfig) {
|
|
527
|
+
controlConfig = JSON.parse(this.column.controlConfig)
|
|
528
|
+
}
|
|
529
|
+
const additionalParamMap = getAdditionalParamMap(gridParams)
|
|
530
|
+
return {
|
|
531
|
+
deptManTree: false, // 是否是部门人员树
|
|
532
|
+
isMultiTree: false, // 是否是多选树
|
|
533
|
+
isCheckStrictly: false, // 父子不互相关联也就是不选中子部门节点
|
|
534
|
+
deptTree: false, // 是否是部门树
|
|
535
|
+
wgManTree: false, // 是否是工作组人员树
|
|
536
|
+
wgTree: false, // 是否是工作组树
|
|
537
|
+
newValue: null,
|
|
538
|
+
disabled, // 当前用户是否禁止编辑该字段/ 是否新增行
|
|
539
|
+
componentName: '',
|
|
540
|
+
validateErrorField: '', // 保存行记录时,验证失败的字段名
|
|
541
|
+
annexUploadFlag: false,
|
|
542
|
+
defaultAction,
|
|
543
|
+
fileMultiple: false, // 文件是否多选
|
|
544
|
+
lastFileName: '',
|
|
545
|
+
fileList: [],
|
|
546
|
+
lastServerName: '',
|
|
547
|
+
fileSetObj: null,
|
|
548
|
+
showSingleImgFlag: false,
|
|
549
|
+
singleImgSrc: '',
|
|
550
|
+
fields: null,
|
|
551
|
+
innerValue, // 输入的内容
|
|
552
|
+
dynamicSourceSelectOptions: {},
|
|
553
|
+
valueSetOptions: null,
|
|
554
|
+
dynamicDataSourceCode: null,
|
|
555
|
+
tableName,
|
|
556
|
+
isJoinTable: isHasJoinTable, // 是否是关联表
|
|
557
|
+
departmentInfo: null, // 指定部门或分支
|
|
558
|
+
parentFormData,
|
|
559
|
+
headers,
|
|
560
|
+
dataSourceType,
|
|
561
|
+
inputNumberSet: {},
|
|
562
|
+
fileInfo: {showName: null, serverPath: null},
|
|
563
|
+
gridData: isSubTableShowPage ? subTableData : gridData,
|
|
564
|
+
pageGridData: isSubTableShowPage ? gridData : null,
|
|
565
|
+
additionalParamMap,
|
|
566
|
+
controlConfig,
|
|
567
|
+
// 设置日期选择器选择范围
|
|
568
|
+
pickerOptions: {
|
|
569
|
+
disabledDate: time => {
|
|
570
|
+
if (this.stateForbiddenTime && this.endForbiddenTime) {
|
|
571
|
+
return time.getTime() < this.stateForbiddenTime || time.getTime() > this.endForbiddenTime
|
|
572
|
+
} else if (this.stateForbiddenTime && !this.endForbiddenTime) {
|
|
573
|
+
return time.getTime() < this.stateForbiddenTime
|
|
574
|
+
} else if (!this.stateForbiddenTime && this.endForbiddenTime) {
|
|
575
|
+
return time.getTime() > this.endForbiddenTime
|
|
576
|
+
} else {
|
|
577
|
+
return false
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
stateForbiddenTime: null,
|
|
582
|
+
endForbiddenTime: null
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
computed: {},
|
|
586
|
+
watch: {
|
|
587
|
+
value: {
|
|
588
|
+
handler(newValue, oldValue) {
|
|
589
|
+
// this.value = newValue
|
|
590
|
+
// this.innerValue = this.value
|
|
591
|
+
if (this.type && this.type === 'multiselect') {
|
|
592
|
+
// 修改时多选下拉值回显 ,将字符串转换为数组
|
|
593
|
+
const tempMultData = this.value && this.value !== null && typeof (this.value) === 'string' ? this.value.split(',') : this.value
|
|
594
|
+
this.innerValue = tempMultData
|
|
595
|
+
} else {
|
|
596
|
+
if (this.type === 'yearRange') {
|
|
597
|
+
this.innerValue = '' + newValue
|
|
598
|
+
}
|
|
599
|
+
// else if (this.type === 'input' && newValue !== null) {
|
|
600
|
+
// // 不允许输入框首尾有空格及全空格处理
|
|
601
|
+
// if (newValue && typeof newValue === 'string') {
|
|
602
|
+
// newValue = newValue.trim()
|
|
603
|
+
// }
|
|
604
|
+
// if (newValue === '') {
|
|
605
|
+
// newValue = null
|
|
606
|
+
// }
|
|
607
|
+
// this.innerValue = newValue
|
|
608
|
+
// }
|
|
609
|
+
else {
|
|
610
|
+
this.innerValue = newValue
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
const gridParams = store.get(this.listCode)
|
|
614
|
+
if (gridParams.editProp === this.column.prop) {
|
|
615
|
+
// 如果是当前编辑的字段,且是自定义控件才需要手动获得一下焦点
|
|
616
|
+
this.$nextTick(() => {
|
|
617
|
+
if (this.$refs.customItem) {
|
|
618
|
+
this.$refs.customItem.focus()
|
|
619
|
+
}
|
|
620
|
+
})
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
deep: true,
|
|
624
|
+
immediate: true
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
created() {
|
|
628
|
+
const gridParams = store.get(this.listCode)
|
|
629
|
+
this.gridParams = gridParams
|
|
630
|
+
this.isCreateRow = gridParams.isCreateRow
|
|
631
|
+
this.setTreeType()
|
|
632
|
+
if (this.type && this.type.indexOf('custom:') >= 0) {
|
|
633
|
+
this.componentName = this.type.substring(this.type.indexOf(':') + 1)
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
if (this.column.fileSet && this.column.fileSet !== '' &&
|
|
637
|
+
(this.column.componentType === 'annex' || this.column.componentType === 'multipartUpload')) {
|
|
638
|
+
const fileSetObj = JSON.parse(this.column.fileSet)
|
|
639
|
+
this.fileInfo.showName = this.row[fileSetObj.showNameData.dbName]
|
|
640
|
+
this.fileInfo.serverPath = this.row[fileSetObj.serverNameData.dbName]
|
|
641
|
+
this.fileSetObj = fileSetObj
|
|
642
|
+
if (fileSetObj && fileSetObj.multiple) {
|
|
643
|
+
this.fileMultiple = true
|
|
644
|
+
}
|
|
645
|
+
this.fileList = getFileList(this.row, this.column, this.isSql)
|
|
646
|
+
this.packageFileNameWithFileList()
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
if (this.column.componentType === 'inputNumber') {
|
|
650
|
+
this.setInputNumberConfig()
|
|
651
|
+
}
|
|
652
|
+
// 如果是多选文件类型,需要解析(需要设置临时字段,判断文件还是图片,图片需要预览)
|
|
653
|
+
if (this.column.valueSetOptions && this.column.componentType !== 'inputNumber') {
|
|
654
|
+
const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
|
|
655
|
+
if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
|
|
656
|
+
this.valueSetOptions = valueSetOptionsObj.valueSetOptions
|
|
657
|
+
}
|
|
658
|
+
if (valueSetOptionsObj.dynamicDataSourceCode && valueSetOptionsObj.dynamicDataSourceCode !== '') {
|
|
659
|
+
this.dynamicDataSourceCode = valueSetOptionsObj.dynamicDataSourceCode
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
if (this.column.orgTreeSet) {
|
|
663
|
+
const orgTreeSet = JSON.parse(this.column.orgTreeSet)
|
|
664
|
+
if (this.type.indexOf('DeptTree') > 0 && orgTreeSet.checkStrictly) {
|
|
665
|
+
this.isCheckStrictly = orgTreeSet.checkStrictly
|
|
666
|
+
}
|
|
667
|
+
if (orgTreeSet.length) {
|
|
668
|
+
this.fields = orgTreeSet
|
|
669
|
+
} else {
|
|
670
|
+
if (orgTreeSet.orgTreeSetArr) {
|
|
671
|
+
this.fields = orgTreeSet.orgTreeSetArr
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
this.getDateAllowTime()
|
|
676
|
+
},
|
|
677
|
+
mounted() {
|
|
678
|
+
// 去掉该监听,否则导致焦点总是跳到第一个编辑框
|
|
679
|
+
// this.$watch('lineEdit.editingCell', function(newVal, oldVal) {
|
|
680
|
+
// this.focus()
|
|
681
|
+
// }, {
|
|
682
|
+
// immediate: true,
|
|
683
|
+
// deep: true
|
|
684
|
+
// })
|
|
685
|
+
},
|
|
686
|
+
methods: {
|
|
687
|
+
/**
|
|
688
|
+
* @author: 梁旭
|
|
689
|
+
* @description: 获取提示标题
|
|
690
|
+
* @Date: 2023-08-04 10:53:24
|
|
691
|
+
* @param {*}
|
|
692
|
+
* @return {*}
|
|
693
|
+
*/
|
|
694
|
+
getClassOptionTitle(val) {
|
|
695
|
+
if (val !== null && val !== undefined && val !== '' && val.length > 0) {
|
|
696
|
+
let selectTittle = ''
|
|
697
|
+
if (typeof val === 'string') {
|
|
698
|
+
// 单选
|
|
699
|
+
this.options.forEach(item => {
|
|
700
|
+
if (item.value === val) {
|
|
701
|
+
selectTittle = item.label
|
|
702
|
+
}
|
|
703
|
+
})
|
|
704
|
+
} else {
|
|
705
|
+
// 多选
|
|
706
|
+
this.options.forEach(item => {
|
|
707
|
+
val.forEach(Vtem => {
|
|
708
|
+
if (item.value === Vtem) {
|
|
709
|
+
selectTittle = selectTittle + item.label + ','
|
|
710
|
+
}
|
|
711
|
+
})
|
|
712
|
+
})
|
|
713
|
+
selectTittle = selectTittle.slice(0, selectTittle.length - 1)
|
|
714
|
+
}
|
|
715
|
+
return selectTittle
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
/**
|
|
719
|
+
* @description: 获取日期选择器可选时间范围
|
|
720
|
+
* @Date: 2023-07-20 13:18:14
|
|
721
|
+
* @param {*}
|
|
722
|
+
* @return {*}
|
|
723
|
+
*/
|
|
724
|
+
getDateAllowTime() {
|
|
725
|
+
if (this.column.valueSetOptions) {
|
|
726
|
+
const optionsObj = JSON.parse(this.column.valueSetOptions)
|
|
727
|
+
const nowTime = Date.now()
|
|
728
|
+
if (optionsObj.stateForbiddenTime) {
|
|
729
|
+
const stateDayNumber = optionsObj.stateForbiddenTime
|
|
730
|
+
this.stateForbiddenTime = nowTime - stateDayNumber * 24 * 60 * 60 * 1000
|
|
731
|
+
} else {
|
|
732
|
+
this.stateForbiddenTime = null
|
|
733
|
+
}
|
|
734
|
+
if (optionsObj.endForbiddenTime) {
|
|
735
|
+
const endDayNumber = optionsObj.endForbiddenTime
|
|
736
|
+
this.endForbiddenTime = nowTime + endDayNumber * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000
|
|
737
|
+
} else {
|
|
738
|
+
this.endForbiddenTime = null
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
focus() {
|
|
743
|
+
if (this.type !== 'slider' && this.type !== 'rate') {
|
|
744
|
+
// slider滑块组件 和 rate评分组件 没有focus方法
|
|
745
|
+
if (this.lineEdit.editingCell && this.position && this.position.row === this.lineEdit.editingCell.row && this.position.prop === this.lineEdit.editingCell.prop) {
|
|
746
|
+
if (this.$refs.item) {
|
|
747
|
+
this.$refs.item.focus()
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
handleBeforeUpload(file) {
|
|
753
|
+
let limitFileSize = this.fileSetObj.limitFileSize
|
|
754
|
+
if (limitFileSize === undefined) {
|
|
755
|
+
// 默认是30M
|
|
756
|
+
limitFileSize = 30
|
|
757
|
+
}
|
|
758
|
+
if (file.size > limitFileSize * 1024 * 1024) {
|
|
759
|
+
// 超过最大限制
|
|
760
|
+
this.$message({
|
|
761
|
+
type: 'warning',
|
|
762
|
+
message: this.$t('imatrixUIMessage.exceedFileSize', {fileSize: limitFileSize}),
|
|
763
|
+
showClose: true
|
|
764
|
+
})
|
|
765
|
+
// 返回false停止上传
|
|
766
|
+
return false
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
setTreeType() {
|
|
770
|
+
if (this.type) {
|
|
771
|
+
if (this.type.indexOf('single') >= 0 && this.type.indexOf('Tree') > 0) {
|
|
772
|
+
this.isMultiTree = false
|
|
773
|
+
} else {
|
|
774
|
+
this.isMultiTree = true
|
|
775
|
+
}
|
|
776
|
+
if (this.type.indexOf('DeptManTree') > 0) {
|
|
777
|
+
// 说明是部门人员树
|
|
778
|
+
this.deptManTree = true
|
|
779
|
+
}
|
|
780
|
+
if (this.type.indexOf('DeptTree') > 0) {
|
|
781
|
+
// 说明是部门树
|
|
782
|
+
this.deptTree = true
|
|
783
|
+
}
|
|
784
|
+
if (this.type.indexOf('WgManTree') > 0) {
|
|
785
|
+
// 说明是工作组人员树
|
|
786
|
+
this.wgManTree = true
|
|
787
|
+
}
|
|
788
|
+
if (this.type.indexOf('WgTree') > 0) {
|
|
789
|
+
// 说明是工作组树
|
|
790
|
+
this.wgTree = true
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
// 显示组织树时需要计算指定部门
|
|
795
|
+
showOrganizationTree() {
|
|
796
|
+
if (this.column.orgTreeSet) {
|
|
797
|
+
const orgTreeSet = JSON.parse(this.column.orgTreeSet)
|
|
798
|
+
if (orgTreeSet.length) {
|
|
799
|
+
this.fields = orgTreeSet
|
|
800
|
+
} else {
|
|
801
|
+
if (orgTreeSet.orgTreeSetArr) {
|
|
802
|
+
this.fields = orgTreeSet.orgTreeSetArr
|
|
803
|
+
}
|
|
804
|
+
if (orgTreeSet.specifyType) {
|
|
805
|
+
if (orgTreeSet.specifyType === 'dataTable') {
|
|
806
|
+
// 根据字段获取值
|
|
807
|
+
if (orgTreeSet.dataTableField) {
|
|
808
|
+
const dataTableFieldValue = getEntityFieldValue(this.row, orgTreeSet.dataTableField)
|
|
809
|
+
if (dataTableFieldValue && dataTableFieldValue !== '') {
|
|
810
|
+
this.departmentInfo = dataTableFieldValue.split(',')
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
} else if (orgTreeSet.specifyType === 'dept' || orgTreeSet.specifyType === 'workGroup') {
|
|
814
|
+
if (orgTreeSet.specifyDept && orgTreeSet.specifyDept !== '') {
|
|
815
|
+
if (typeof (orgTreeSet.specifyDept) === 'object') {
|
|
816
|
+
// 固定值
|
|
817
|
+
this.departmentInfo = orgTreeSet.specifyDept
|
|
818
|
+
} else {
|
|
819
|
+
this.departmentInfo = orgTreeSet.specifyDept.split(',')
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
// isInputEventUpdateValue input事件时是否更新value值
|
|
828
|
+
cellEvent(eventName, event, isInputEventUpdateValue) {
|
|
829
|
+
// console.log('cellEvent1---eventName=', eventName, 'this.innerValue=', this.innerValue)
|
|
830
|
+
let isInputVal = false
|
|
831
|
+
if (eventName === 'focus') {
|
|
832
|
+
$emit(this, 'focus', event)
|
|
833
|
+
}
|
|
834
|
+
if (eventName === 'input' && this.isDateControll()) {
|
|
835
|
+
// 如果是日期控件,如果使用blur事件来修改数据内容,清空文本框内容不会改变model的值,所以还是需要input事件时处理
|
|
836
|
+
let val = event
|
|
837
|
+
if (val === '') {
|
|
838
|
+
val = null
|
|
839
|
+
}
|
|
840
|
+
$emit(this, 'update:value', val)
|
|
841
|
+
isInputVal = true
|
|
842
|
+
// 在callCustomEvent方法中使用了innerValue属性
|
|
843
|
+
this.innerValue = val
|
|
844
|
+
} else if (eventName === 'input' && this.isSelectControll()) {
|
|
845
|
+
// 如果是下拉框选择器控件,如果使用blur事件来修改数据内容,有时会更新不到最新数据
|
|
846
|
+
// console.log('cellEvent2---this.innerValue=', this.innerValue)
|
|
847
|
+
if (this.type === 'multiselect' && this.innerValue && Object.prototype.toString.apply(this.innerValue) === '[object Array]') {
|
|
848
|
+
// 如果是多选下拉框,且值是数组
|
|
849
|
+
const saveAll = 'saveAll'
|
|
850
|
+
if (this.innerValue.indexOf(saveAll) < 0) {
|
|
851
|
+
// 不包含“全选”时才走input,全选是在multiselectchange中特殊处理的
|
|
852
|
+
$emit(this, 'update:value', this.innerValue.join(','))
|
|
853
|
+
}
|
|
854
|
+
} else {
|
|
855
|
+
$emit(this, 'update:value', this.innerValue)
|
|
856
|
+
}
|
|
857
|
+
isInputVal = true
|
|
858
|
+
} else if (eventName === 'input' && isInputEventUpdateValue !== undefined && isInputEventUpdateValue === true) {
|
|
859
|
+
// 表示input事件时更新值,switch、rate、slider组件时会走该分支
|
|
860
|
+
// 在callCustomEvent方法中使用了innerValue属性
|
|
861
|
+
this.innerValue = event
|
|
862
|
+
$emit(this, 'update:value', event)
|
|
863
|
+
isInputVal = true
|
|
864
|
+
} else if (eventName === 'blur' && !this.isSelectControll()) {
|
|
865
|
+
// 为了使输入时流畅,所以在blur时调用input,更改组件的数据
|
|
866
|
+
this.blurEvent()
|
|
867
|
+
isInputVal = true
|
|
868
|
+
if (this.innerValue && this.isInputControl() && this.column.dataType === 'TEXT') {
|
|
869
|
+
console.log('trim value', this.innerValue)
|
|
870
|
+
this.innerValue = this.innerValue.trim()
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
if (!isInputVal && eventName === 'change') {
|
|
874
|
+
// 走完chang事件,触发一次失焦事件
|
|
875
|
+
// this.$refs.item.blur()
|
|
876
|
+
this.blurEvent()
|
|
877
|
+
// 验证是否是合法的小数
|
|
878
|
+
// 保存时后台给出数字类型转换错误的验证,前台不提供了,因为会同时出现两个类型错误提示信息的问题
|
|
879
|
+
// this.checkDecimal()
|
|
880
|
+
}
|
|
881
|
+
if (eventName === 'clear') {
|
|
882
|
+
if ((this.type === 'multiselect' || this.type === 'select') && isDynamicDataSourceSource(this.column)) {
|
|
883
|
+
for (let index = 0; index < this.valueSetOptions.length; index++) {
|
|
884
|
+
if (this.column.prop !== this.valueSetOptions[index].valueColumn.dbColumnName) {
|
|
885
|
+
this.setCellValue(this.valueSetOptions[index].valueColumn.dbColumnName, null, 'input')
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
// 清空时,必须这样调用input事件 ,否则组件无法输入值
|
|
890
|
+
$emit(this, 'update:value', null)
|
|
891
|
+
}
|
|
892
|
+
const gridParams = store.get(this.listCode)
|
|
893
|
+
gridParams.editProp = this.column.prop
|
|
894
|
+
|
|
895
|
+
// console.log('cellEvent4---this.innerValue=', this.innerValue)
|
|
896
|
+
if (this.column.events && this.column.events[eventName]) {
|
|
897
|
+
// 事件回调
|
|
898
|
+
this.callCustomEvent(eventName)
|
|
899
|
+
} else if (isEditOptionFunction(eventName, this.listCode)) {
|
|
900
|
+
// 为了兼容历史版本保留了该判断
|
|
901
|
+
|
|
902
|
+
gridParams.options.lineEditOptions[eventName].call(this, event, this.row, this.column, gridParams.additionalParamMap)
|
|
903
|
+
}
|
|
904
|
+
$emit(this, 'findIndex')
|
|
905
|
+
// console.log('cellEvent5---this.innerValue=', this.innerValue)
|
|
906
|
+
},
|
|
907
|
+
blurEvent() {
|
|
908
|
+
if (this.innerValue === null || this.innerValue === undefined) {
|
|
909
|
+
this.innerValue = null
|
|
910
|
+
this.val = null
|
|
911
|
+
}
|
|
912
|
+
// 必须这样调用input事件 ,否则组件无法输入值
|
|
913
|
+
$emit(this, 'update:value', this.innerValue) // 现在的用法
|
|
914
|
+
},
|
|
915
|
+
// 是否是输入框
|
|
916
|
+
isInputControl() {
|
|
917
|
+
return (this.type === 'input' || this.type === 'textarea')
|
|
918
|
+
},
|
|
919
|
+
// 是否是日期时间选择器
|
|
920
|
+
isDateControll() {
|
|
921
|
+
return (this.type === 'date' || this.column.dataType === 'DATE') || (this.type === 'time' || this.column.dataType === 'TIME')
|
|
922
|
+
},
|
|
923
|
+
// 是否是下拉框选择器
|
|
924
|
+
isSelectControll() {
|
|
925
|
+
return this.type === 'select' || this.type === 'multiselect'
|
|
926
|
+
},
|
|
927
|
+
// 值设置是否是动态数据源类型的数据源
|
|
928
|
+
isDynamicDataSourceSource() {
|
|
929
|
+
return isDynamicDataSourceSource(this.column)
|
|
930
|
+
},
|
|
931
|
+
// 是否是小数类型字段
|
|
932
|
+
isDecimalDateType() {
|
|
933
|
+
return this.column.dataType && this.column.dataType === 'DOUBLE' || this.column.dataType === 'FLOAT'
|
|
934
|
+
},
|
|
935
|
+
// 调用自定义事件回调
|
|
936
|
+
callCustomEvent(eventName) {
|
|
937
|
+
this.callCustomEventWithParam(eventName, {
|
|
938
|
+
value: this.innerValue,
|
|
939
|
+
row: this.row,
|
|
940
|
+
column: this.column,
|
|
941
|
+
extendParams: this.extendParams
|
|
942
|
+
})
|
|
943
|
+
},
|
|
944
|
+
// 调用自定义事件回调
|
|
945
|
+
callCustomEventWithParam(eventName, param) {
|
|
946
|
+
// this.column.events 是个对象,key是事件名,value是options.eventCallBack中对应的方法名
|
|
947
|
+
if (this.column && this.column.events && this.column.events[eventName]) {
|
|
948
|
+
const funName = this.column.events[eventName]
|
|
949
|
+
if (!this.listCode) {
|
|
950
|
+
this.listCode = store.get('_list_code')
|
|
951
|
+
}
|
|
952
|
+
const gridParams = store.get(this.listCode)
|
|
953
|
+
if (gridParams.options && gridParams.options['eventCallBack'] &&
|
|
954
|
+
gridParams.options['eventCallBack'][funName] && typeof (gridParams.options['eventCallBack'][funName]) === 'function') {
|
|
955
|
+
if (!param) {
|
|
956
|
+
param = {}
|
|
957
|
+
}
|
|
958
|
+
param.formData = gridParams.options && gridParams.options.formData ? gridParams.options.formData : null
|
|
959
|
+
param.parent = this.parentFormData
|
|
960
|
+
param.rowIndex = this.rowIndex
|
|
961
|
+
param.additionalParamMap = gridParams.additionalParamMap
|
|
962
|
+
gridParams.options['eventCallBack'][funName].call(this, param)
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
// 验证是否是合法的小数
|
|
967
|
+
checkDecimal() {
|
|
968
|
+
if (this.isDecimalDateType() && this.innerValue && this.innerValue !== null) {
|
|
969
|
+
// 小数类型的字段,失去焦点时,判断输入的内容是否合法
|
|
970
|
+
const numberReg = /^(-?\d+)(\.\d+)?$/
|
|
971
|
+
if (!numberReg.test(this.innerValue + '')) {
|
|
972
|
+
// 表示该字段还未验证,或验证成功,需要再次验证
|
|
973
|
+
// 表示输入的不合法
|
|
974
|
+
this.$message({
|
|
975
|
+
type: 'warning',
|
|
976
|
+
message: this.$t('imatrixUIMessage.invalideDoubleValue', {num: this.innerValue}),
|
|
977
|
+
showClose: true
|
|
978
|
+
})
|
|
979
|
+
this.focus()
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
// 自定义编辑组件修改属性值
|
|
984
|
+
customFocus() {
|
|
985
|
+
apis.focus(this.position ? this.position.row : null)
|
|
986
|
+
},
|
|
987
|
+
openAnnexUpload() {
|
|
988
|
+
this.annexUploadFlag = true
|
|
989
|
+
},
|
|
990
|
+
previewImg() {
|
|
991
|
+
this.fileList = getFileList(this.row, this.column, this.isSql)
|
|
992
|
+
this.showSingleImgFlag = true
|
|
993
|
+
},
|
|
994
|
+
// 上传成功
|
|
995
|
+
uploadOnSuccess(response) {
|
|
996
|
+
if (response) {
|
|
997
|
+
const responseFile = {name: response.showName, serverPath: response.serverPath}
|
|
998
|
+
if (this.column.fileSet && this.column.fileSet !== '') {
|
|
999
|
+
const fileSetObj = JSON.parse(this.column.fileSet)
|
|
1000
|
+
if (fileSetObj) {
|
|
1001
|
+
// 判断单选还是多选
|
|
1002
|
+
if (this.fileMultiple) {
|
|
1003
|
+
this.multiStorage(fileSetObj, responseFile)
|
|
1004
|
+
} else {
|
|
1005
|
+
this.radioStorageFile(fileSetObj, responseFile)
|
|
1006
|
+
}
|
|
1007
|
+
this.fileList = getFileList(this.row, this.column, this.isSql)
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
this.annexUploadFlag = false
|
|
1012
|
+
},
|
|
1013
|
+
// eventNames 事件名称值为input或clear,input表示值改变时触发的事件,clear表示值清空时触发的事件
|
|
1014
|
+
setCellValue(prop, value, eventNames) {
|
|
1015
|
+
this.row[prop] = value
|
|
1016
|
+
if (eventNames) {
|
|
1017
|
+
eventNames.split(',').forEach(eventName => {
|
|
1018
|
+
this.callCustomEventWithParam(eventName, {value, row: this.row, column: this.column, prop})
|
|
1019
|
+
})
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
// 单选上传完成后存储
|
|
1023
|
+
radioStorageFile(fileSetObj, responseFile) {
|
|
1024
|
+
if (fileSetObj.showNameData) {
|
|
1025
|
+
if (this.isSql) {
|
|
1026
|
+
if (fileSetObj.showNameData.dbName) {
|
|
1027
|
+
this.setCellValue(fileSetObj.showNameData.dbName, responseFile.name, 'input')
|
|
1028
|
+
}
|
|
1029
|
+
} else {
|
|
1030
|
+
if (fileSetObj.showNameData.name) {
|
|
1031
|
+
this.setCellValue(fileSetObj.showNameData.name, responseFile.name, 'input')
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
if (fileSetObj.serverNameData) {
|
|
1036
|
+
if (this.isSql) {
|
|
1037
|
+
if (fileSetObj.serverNameData.dbName) {
|
|
1038
|
+
this.setCellValue(fileSetObj.serverNameData.dbName, responseFile.serverPath)
|
|
1039
|
+
}
|
|
1040
|
+
} else {
|
|
1041
|
+
if (fileSetObj.serverNameData.name) {
|
|
1042
|
+
this.setCellValue(fileSetObj.serverNameData.name, responseFile.serverPath)
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
this.packageFileNameWithFileList([{showName: responseFile.name, serverPath: responseFile.serverPath}])
|
|
1047
|
+
},
|
|
1048
|
+
// 多选上传完成后存储
|
|
1049
|
+
multiStorage(fileSetObj, responseFile) {
|
|
1050
|
+
const keyValueParam = analysisFileSetObj(fileSetObj, this.isSql)
|
|
1051
|
+
// 存储
|
|
1052
|
+
// 判断主表拼接还是子表保存
|
|
1053
|
+
if (fileSetObj.childAnnexDataTableCode) {
|
|
1054
|
+
// 存储子表
|
|
1055
|
+
// const lowerStr = fileSetObj.childAnnexDataTableCode.toLowerCase()
|
|
1056
|
+
let fileArr = this.row[this.column.prop]
|
|
1057
|
+
if (!fileArr) {
|
|
1058
|
+
fileArr = []
|
|
1059
|
+
}
|
|
1060
|
+
const fileObj = this.responseFileToFileObj(fileSetObj, responseFile)
|
|
1061
|
+
fileArr.push(fileObj)
|
|
1062
|
+
this.fileList = otherFilesToStandard(fileSetObj, keyValueParam, fileArr, null)
|
|
1063
|
+
this.setCellValue(this.column.prop, fileArr, 'input')
|
|
1064
|
+
} else {
|
|
1065
|
+
let showNameStr = ''
|
|
1066
|
+
let pathNameStr = ''
|
|
1067
|
+
// 存储主表
|
|
1068
|
+
if (fileSetObj.showNameData) {
|
|
1069
|
+
if (this.isSql) {
|
|
1070
|
+
if (fileSetObj.showNameData.dbName) {
|
|
1071
|
+
if (this.row) {
|
|
1072
|
+
if (this.row[fileSetObj.showNameData.dbName]) {
|
|
1073
|
+
let str = this.row[fileSetObj.showNameData.dbName]
|
|
1074
|
+
str += ',' + responseFile.name
|
|
1075
|
+
this.setCellValue(fileSetObj.showNameData.dbName, str, 'input')
|
|
1076
|
+
} else {
|
|
1077
|
+
this.setCellValue(fileSetObj.showNameData.dbName, responseFile.name, 'input')
|
|
1078
|
+
}
|
|
1079
|
+
showNameStr = this.row[fileSetObj.showNameData.dbName]
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
} else {
|
|
1083
|
+
if (fileSetObj.showNameData.name) {
|
|
1084
|
+
if (this.row) {
|
|
1085
|
+
if (this.row[fileSetObj.showNameData.name]) {
|
|
1086
|
+
let str = this.row[fileSetObj.showNameData.name]
|
|
1087
|
+
str += ',' + responseFile.name
|
|
1088
|
+
this.setCellValue(fileSetObj.showNameData.name, str, 'input')
|
|
1089
|
+
} else {
|
|
1090
|
+
this.setCellValue(fileSetObj.showNameData.name, responseFile.name, 'input')
|
|
1091
|
+
}
|
|
1092
|
+
showNameStr = this.row[fileSetObj.showNameData.name]
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
if (fileSetObj.serverNameData) {
|
|
1098
|
+
if (this.isSql) {
|
|
1099
|
+
if (fileSetObj.serverNameData.dbName) {
|
|
1100
|
+
if (this.row) {
|
|
1101
|
+
if (this.row[fileSetObj.serverNameData.dbName]) {
|
|
1102
|
+
let str = this.row[fileSetObj.serverNameData.dbName]
|
|
1103
|
+
str += ',' + responseFile.serverPath
|
|
1104
|
+
this.setCellValue(fileSetObj.serverNameData.dbName, str)
|
|
1105
|
+
} else {
|
|
1106
|
+
this.setCellValue(fileSetObj.serverNameData.dbName, responseFile.serverPath)
|
|
1107
|
+
}
|
|
1108
|
+
pathNameStr = this.row[fileSetObj.serverNameData.dbName]
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
} else {
|
|
1112
|
+
if (fileSetObj.serverNameData.name) {
|
|
1113
|
+
if (this.row) {
|
|
1114
|
+
if (this.row[fileSetObj.serverNameData.name]) {
|
|
1115
|
+
let str = this.row[fileSetObj.serverNameData.name]
|
|
1116
|
+
str += ',' + responseFile.serverPath
|
|
1117
|
+
this.setCellValue(fileSetObj.serverNameData.name, str)
|
|
1118
|
+
} else {
|
|
1119
|
+
this.setCellValue(fileSetObj.serverNameData.name, responseFile.serverPath)
|
|
1120
|
+
}
|
|
1121
|
+
pathNameStr = this.row[fileSetObj.serverNameData.name]
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
this.fileList = otherFilesToStandard(fileSetObj, keyValueParam, null, {
|
|
1127
|
+
'showName': showNameStr,
|
|
1128
|
+
'serverPath': pathNameStr
|
|
1129
|
+
})
|
|
1130
|
+
}
|
|
1131
|
+
this.packageFileNameWithFileList()
|
|
1132
|
+
},
|
|
1133
|
+
responseFileToFileObj(fileSetObj, responseFile) {
|
|
1134
|
+
const fileObj = {}
|
|
1135
|
+
if (fileSetObj.showNameData) {
|
|
1136
|
+
if (this.isSql) {
|
|
1137
|
+
if (fileSetObj.showNameData.dbName) {
|
|
1138
|
+
fileObj.fileSetObj.showNameData.dbName = responseFile.name
|
|
1139
|
+
}
|
|
1140
|
+
} else {
|
|
1141
|
+
if (fileSetObj.showNameData.name) {
|
|
1142
|
+
fileObj.fileSetObj.showNameData.name = responseFile.name
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
if (fileSetObj.serverNameData) {
|
|
1147
|
+
if (this.isSql) {
|
|
1148
|
+
if (fileSetObj.serverNameData.dbName) {
|
|
1149
|
+
fileObj.fileSetObj.serverNameData.dbName = responseFile.serverPath
|
|
1150
|
+
}
|
|
1151
|
+
} else {
|
|
1152
|
+
if (fileSetObj.serverNameData.name) {
|
|
1153
|
+
fileObj.fileSetObj.serverNameData.name = responseFile.serverPath
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
return fileObj
|
|
1158
|
+
},
|
|
1159
|
+
// 单选删除文件
|
|
1160
|
+
deleteAnnexFile(fileSetObj) {
|
|
1161
|
+
if (fileSetObj) {
|
|
1162
|
+
if (fileSetObj.showNameData) {
|
|
1163
|
+
if (this.isSql) {
|
|
1164
|
+
if (fileSetObj.showNameData.dbName) {
|
|
1165
|
+
this.setCellValue(fileSetObj.showNameData.dbName, null, 'input,clear')
|
|
1166
|
+
}
|
|
1167
|
+
} else {
|
|
1168
|
+
if (fileSetObj.showNameData.name) {
|
|
1169
|
+
this.setCellValue(fileSetObj.showNameData.name, null, 'input,clear')
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
if (fileSetObj.serverNameData) {
|
|
1174
|
+
if (this.isSql) {
|
|
1175
|
+
if (fileSetObj.serverNameData.dbName) {
|
|
1176
|
+
this.setCellValue(fileSetObj.serverNameData.dbName, null)
|
|
1177
|
+
}
|
|
1178
|
+
} else {
|
|
1179
|
+
if (fileSetObj.serverNameData.name) {
|
|
1180
|
+
this.setCellValue(fileSetObj.serverNameData.name, null)
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
deleteFile(fileList, index) {
|
|
1187
|
+
this.fileList = fileList
|
|
1188
|
+
if (index !== undefined && index !== -1) {
|
|
1189
|
+
this.fileList.splice(index, 1)
|
|
1190
|
+
}
|
|
1191
|
+
this.packageFileNameWithFileList()
|
|
1192
|
+
if (this.column.fileSet && this.column.fileSet !== '') {
|
|
1193
|
+
const fileSetObj = JSON.parse(this.column.fileSet)
|
|
1194
|
+
if (fileSetObj) {
|
|
1195
|
+
if (this.fileMultiple) {
|
|
1196
|
+
// 多选附件
|
|
1197
|
+
const keyValueParam = analysisFileSetObj(fileSetObj, this.isSql)
|
|
1198
|
+
this.standardToOtherFiles(fileSetObj, keyValueParam)
|
|
1199
|
+
} else {
|
|
1200
|
+
// 单选附件
|
|
1201
|
+
this.deleteAnnexFile(fileSetObj)
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1206
|
+
packageFileNameWithFileList(fileList) {
|
|
1207
|
+
if (!fileList) {
|
|
1208
|
+
fileList = this.fileList
|
|
1209
|
+
}
|
|
1210
|
+
if (fileList && fileList.length > 0) {
|
|
1211
|
+
let fileNames = ''
|
|
1212
|
+
let fileServerName = ''
|
|
1213
|
+
fileList.forEach(item => {
|
|
1214
|
+
fileNames += item.showName + ','
|
|
1215
|
+
fileServerName += item.serverPath + ','
|
|
1216
|
+
})
|
|
1217
|
+
if (fileNames && fileNames.indexOf(',') > 0) {
|
|
1218
|
+
this.lastFileName = fileNames.substring(0, fileNames.lastIndexOf(','))
|
|
1219
|
+
this.lastServerName = fileServerName.substring(0, fileServerName.lastIndexOf(','))
|
|
1220
|
+
}
|
|
1221
|
+
} else {
|
|
1222
|
+
this.lastFileName = null
|
|
1223
|
+
this.lastServerName = null
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
// fileList 赋值Row
|
|
1227
|
+
standardToOtherFiles(fileSetObj, keyValueParam) {
|
|
1228
|
+
if (fileSetObj.childAnnexDataTableCode) {
|
|
1229
|
+
// 子表
|
|
1230
|
+
let fileArr = null
|
|
1231
|
+
if (this.fileList && this.fileList.length > 0) {
|
|
1232
|
+
fileArr = []
|
|
1233
|
+
for (var i = 0; i < this.fileList.length; i++) {
|
|
1234
|
+
const file = this.fileList[i]
|
|
1235
|
+
const otherFile = {}
|
|
1236
|
+
otherFile.keyValueParam.showName = file.showName
|
|
1237
|
+
otherFile.keyValueParam.serverPath = file.serverPath
|
|
1238
|
+
fileArr.push(otherFile)
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
this.setCellValue(this.column.prop, fileArr, 'input')
|
|
1242
|
+
} else {
|
|
1243
|
+
// 主表
|
|
1244
|
+
let showNameStr = null
|
|
1245
|
+
let serverNameStr = null
|
|
1246
|
+
if (this.fileList && this.fileList.length > 0) {
|
|
1247
|
+
showNameStr = ''
|
|
1248
|
+
serverNameStr = ''
|
|
1249
|
+
for (var k = 0; k < this.fileList.length; k++) {
|
|
1250
|
+
const file = this.fileList[k]
|
|
1251
|
+
if (showNameStr !== '') {
|
|
1252
|
+
showNameStr += ','
|
|
1253
|
+
}
|
|
1254
|
+
if (serverNameStr !== '') {
|
|
1255
|
+
serverNameStr += ','
|
|
1256
|
+
}
|
|
1257
|
+
showNameStr += file.showName
|
|
1258
|
+
serverNameStr += file.serverPath
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
this.setCellValue(keyValueParam.showName, showNameStr, 'input')
|
|
1262
|
+
this.setCellValue(keyValueParam.serverPath, serverNameStr)
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1265
|
+
// 组织结构树文本框值改变事件
|
|
1266
|
+
organizationInputEvent(prop, value) {
|
|
1267
|
+
// console.log('organizationInputEvent1---prop=', prop, 'this.column.prop=', this.column.prop, 'value=', value)
|
|
1268
|
+
if (this.isSql && prop && prop.indexOf('.') < 0) {
|
|
1269
|
+
if (prop !== this.column.prop && this.tableName) {
|
|
1270
|
+
const replaceDot = '__'
|
|
1271
|
+
prop = this.tableName + replaceDot + prop
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
setEntityFieldValue(this.row, prop, value)
|
|
1275
|
+
if (prop && prop === this.column.prop) {
|
|
1276
|
+
// 必须手动调用一下input事件,否则不会更新组件的值
|
|
1277
|
+
// console.log('organizationInputEvent2---prop=', prop, 'value=', value)
|
|
1278
|
+
this.callCustomEventWithParam('input', {value, row: this.row, column: this.column, prop})
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
// 组织结构树文本框值清空事件
|
|
1282
|
+
clearOrganizationInputEvent(prop) {
|
|
1283
|
+
if (this.isSql) {
|
|
1284
|
+
// sql处理时在后台会把空串当做null处理
|
|
1285
|
+
// this.$set(this.row, prop, '')
|
|
1286
|
+
setEntityFieldValue(this.row, prop, '')
|
|
1287
|
+
} else {
|
|
1288
|
+
// 非sql处理时需要设为null,否则保存时后台可能会报字段类型不正确,无法保存
|
|
1289
|
+
// this.$set(this.row, prop, null)
|
|
1290
|
+
setEntityFieldValue(this.row, prop, null)
|
|
1291
|
+
}
|
|
1292
|
+
if (prop && prop === this.column.prop) {
|
|
1293
|
+
// 必须手动调用一下input事件,否则不会更新组件的值
|
|
1294
|
+
this.callCustomEventWithParam('clear', {row: this.row, column: this.column, prop})
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
// 组织结构树文本框值追加事件
|
|
1298
|
+
appendOrganizationInputEvent(prop, originalValue, appendValue, separator, finallyValue) {
|
|
1299
|
+
// this.$set(this.row, prop, finallyValue)
|
|
1300
|
+
setEntityFieldValue(this.row, prop, finallyValue)
|
|
1301
|
+
if (prop && prop === this.column.prop) {
|
|
1302
|
+
this.callCustomEventWithParam('append', {
|
|
1303
|
+
originalValue,
|
|
1304
|
+
appendValue,
|
|
1305
|
+
separator,
|
|
1306
|
+
finallyValue,
|
|
1307
|
+
row: this.row,
|
|
1308
|
+
column: this.column,
|
|
1309
|
+
prop
|
|
1310
|
+
})
|
|
1311
|
+
}
|
|
1312
|
+
},
|
|
1313
|
+
// 组织结构树文本框值替换事件
|
|
1314
|
+
replaceOrganizationInputEvent(prop, originalValue, newValue) {
|
|
1315
|
+
// this.$set(this.row, prop, newValue)
|
|
1316
|
+
setEntityFieldValue(this.row, prop, newValue)
|
|
1317
|
+
if (prop && prop === this.column.prop) {
|
|
1318
|
+
this.callCustomEventWithParam('replace', {originalValue, newValue, row: this.row, column: this.column, prop})
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
setDynamicSourceSelectValue({value, sourceColumnName, targetColumnName, options, selectedItem}) {
|
|
1322
|
+
if (targetColumnName) {
|
|
1323
|
+
this.setCellValue(targetColumnName, value, 'input')
|
|
1324
|
+
this.callCustomEventWithParam('input', {
|
|
1325
|
+
value,
|
|
1326
|
+
extendParams: selectedItem,
|
|
1327
|
+
row: this.row,
|
|
1328
|
+
column: this.column,
|
|
1329
|
+
targetColumnName
|
|
1330
|
+
})
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
multiselectChange(arr, selectedItem) {
|
|
1334
|
+
// console.log('multiselectChange1---arr=', arr)
|
|
1335
|
+
this.extendParams = selectedItem
|
|
1336
|
+
let isSaveAll = false
|
|
1337
|
+
if (arr && arr.length > 0) {
|
|
1338
|
+
const saveAll = 'saveAll'
|
|
1339
|
+
if (arr.indexOf(saveAll) !== -1) {
|
|
1340
|
+
const length = arr.length
|
|
1341
|
+
if (length - 1 >= this.options.length) {
|
|
1342
|
+
this.innerValue = null
|
|
1343
|
+
// 取消全选
|
|
1344
|
+
} else {
|
|
1345
|
+
// 全选
|
|
1346
|
+
if (!this.innerValue || this.innerValue.indexOf(saveAll) >= 0) {
|
|
1347
|
+
this.innerValue = []
|
|
1348
|
+
}
|
|
1349
|
+
this.options.forEach(item => {
|
|
1350
|
+
if (this.innerValue.indexOf(item.value) === -1) {
|
|
1351
|
+
this.innerValue.push(item.value)
|
|
1352
|
+
}
|
|
1353
|
+
})
|
|
1354
|
+
}
|
|
1355
|
+
isSaveAll = true
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
// console.log('multiselectChange2---this.innerValue=', this.innerValue)
|
|
1359
|
+
if (this.innerValue && typeof this.innerValue !== 'number' && this.innerValue.indexOf('saveAll') !== -1) {
|
|
1360
|
+
this.innerValue.splice(this.innerValue.indexOf('saveAll'), 1)
|
|
1361
|
+
}
|
|
1362
|
+
// console.log('multiselectChange3---this.innerValue=', this.innerValue)
|
|
1363
|
+
if (isSaveAll) {
|
|
1364
|
+
this.cellEvent('input', this.innerValue)
|
|
1365
|
+
}
|
|
1366
|
+
this.cellEvent('change', arr)
|
|
1367
|
+
},
|
|
1368
|
+
getDefaultValue(val) {
|
|
1369
|
+
// 表示当前字段的是空的,但是有默认值时,给当前字段设置值
|
|
1370
|
+
// if (val === undefined || val === null || val === '') {
|
|
1371
|
+
if (this.isInvalidValue(val)) {
|
|
1372
|
+
// 没有值的时候才设置默认值
|
|
1373
|
+
if (this.column.componentType === 'select' && !isDynamicDataSourceSource(this.column) && this.column.valueSet) {
|
|
1374
|
+
// TODO 不知道为什么这个方法调用了三遍, 需要看下
|
|
1375
|
+
// 如果没有给字段设置默认值时,如果是选项组则选项组如果有默认选中,则将默认选中值赋值给当前字段
|
|
1376
|
+
// console.log(this.column.valueSet.find(element => element.selected === true), 'xxxxxxxxxxx')
|
|
1377
|
+
const defaultSelected = this.column.valueSet.find(element => element.selected === true)
|
|
1378
|
+
if (defaultSelected) {
|
|
1379
|
+
setEntityFieldValue(this.row, this.column.prop, defaultSelected.value)
|
|
1380
|
+
return defaultSelected.value
|
|
1381
|
+
}
|
|
1382
|
+
} else if (this.column.componentType === 'inputNumber') {
|
|
1383
|
+
let defaultValue = 0
|
|
1384
|
+
if (this.column.valueSetOptions && this.column.valueSetOptions !== '' && this.column.componentType === 'inputNumber') {
|
|
1385
|
+
const inputNumberSetting = JSON.parse(this.column.valueSetOptions)
|
|
1386
|
+
if (inputNumberSetting.min) {
|
|
1387
|
+
defaultValue = inputNumberSetting.min
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
setEntityFieldValue(this.row, this.column.prop, defaultValue)
|
|
1391
|
+
return defaultValue
|
|
1392
|
+
}
|
|
1393
|
+
} else {
|
|
1394
|
+
if (this.column.componentType === 'inputNumber') {
|
|
1395
|
+
// 因为新增行记录时 getNewRow时 如果有默认值,赋值的是字符串类型,会让校验不通过,所以需要转为number
|
|
1396
|
+
const numberValue = Number(val)
|
|
1397
|
+
setEntityFieldValue(this.row, this.column.prop, numberValue)
|
|
1398
|
+
return numberValue
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
refresData(data) {
|
|
1403
|
+
$emit(this, 'refresData', data)
|
|
1404
|
+
},
|
|
1405
|
+
refresPortData(port, value) {
|
|
1406
|
+
$emit(this, 'refresPortData', port, value)
|
|
1407
|
+
},
|
|
1408
|
+
refresPortsData(map) {
|
|
1409
|
+
$emit(this, 'refresPortsData', map)
|
|
1410
|
+
},
|
|
1411
|
+
refresMainTableFields(map) {
|
|
1412
|
+
$emit(this, 'refresMainTableFields', map)
|
|
1413
|
+
},
|
|
1414
|
+
deleteSuccess(deleteFile) {
|
|
1415
|
+
console.log('deleteSuccess', deleteFile, this.fileInfo)
|
|
1416
|
+
},
|
|
1417
|
+
// 时间格式判断是否是字符串类型,如果是字符串类型使用格式化的数据,如果是时间格式的显示时间搓
|
|
1418
|
+
isValueFormat() {
|
|
1419
|
+
if (this.column.dataType === 'TEXT' || this.column.dataType === 'text') {
|
|
1420
|
+
return this.isFormat()
|
|
1421
|
+
}
|
|
1422
|
+
// timestamp毫秒值为x
|
|
1423
|
+
return 'x'
|
|
1424
|
+
},
|
|
1425
|
+
// 时间格式判断是否是字符串类型,显示格式
|
|
1426
|
+
isFormat() {
|
|
1427
|
+
if (this.type === 'time' && this.column.dataType === 'TIME') {
|
|
1428
|
+
return 'YYYY-MM-DD HH:mm:ss'
|
|
1429
|
+
} else if (this.type === 'dateTimePicker') {
|
|
1430
|
+
return 'YYYY-MM-DD HH:mm:ss'
|
|
1431
|
+
} else if (this.type === 'date' && this.column.dataType === 'DATE') {
|
|
1432
|
+
return 'YYYY-MM-DD'
|
|
1433
|
+
} else if (this.type === 'timePicker') {
|
|
1434
|
+
if (this.column.originalFormat) {
|
|
1435
|
+
return this.column.originalFormat
|
|
1436
|
+
}
|
|
1437
|
+
return 'hh:mm:ss'
|
|
1438
|
+
} else if (this.type === 'year') {
|
|
1439
|
+
return 'YYYY'
|
|
1440
|
+
} else if (this.type === 'month') {
|
|
1441
|
+
return 'MM'
|
|
1442
|
+
}
|
|
1443
|
+
return 'YYYY-MM-DD'
|
|
1444
|
+
},
|
|
1445
|
+
fnProhibitToEdit(entity) {
|
|
1446
|
+
$emit(this, 'prohibitToEdit', entity)
|
|
1447
|
+
},
|
|
1448
|
+
setInputNumberConfig() {
|
|
1449
|
+
if (this.column.componentType === 'inputNumber') {
|
|
1450
|
+
if (this.column.valueSetOptions && this.column.valueSetOptions !== '' && this.column.componentType === 'inputNumber') {
|
|
1451
|
+
const inputNumberSetting = JSON.parse(this.column.valueSetOptions)
|
|
1452
|
+
this.inputNumberSet = inputNumberSetting
|
|
1453
|
+
} else {
|
|
1454
|
+
this.inputNumberSet = {
|
|
1455
|
+
min: null,
|
|
1456
|
+
max: null,
|
|
1457
|
+
step: 1,
|
|
1458
|
+
precision: 0,
|
|
1459
|
+
position: ''
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
isValidValue(value) {
|
|
1465
|
+
return value !== undefined && value !== null && value !== ''
|
|
1466
|
+
},
|
|
1467
|
+
isInvalidValue(value) {
|
|
1468
|
+
return value === undefined || value === null || value === ''
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
</script>
|