@arkxos/arkos-system 0.1.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 +36 -0
- package/ark_dist/664d11f069eab128.css +2 -0
- package/ark_dist/ArkOsConfig.js +136 -0
- package/ark_dist/ark-meta.json +92 -0
- package/ark_dist/ark_userChunk_1.js +3 -0
- package/ark_dist/ark_userChunk_2.js +5 -0
- package/ark_dist/ark_userChunk_3.js +49 -0
- package/ark_dist/config.js +75 -0
- package/ark_dist/css/views/views-flow-flow.ca26b106.css +5784 -0
- package/ark_dist/favicon.ico +0 -0
- package/ark_dist/fonts/bpmn.5d33bee4.eot +0 -0
- package/ark_dist/fonts/bpmn.67058807.woff2 +0 -0
- package/ark_dist/fonts/bpmn.b5c9250d.ttf +0 -0
- package/ark_dist/fonts/bpmn.e9e7d076.woff +0 -0
- package/ark_dist/img/404.png +0 -0
- package/ark_dist/img/auth_banner.jpg +0 -0
- package/ark_dist/img/avatar.jpg +0 -0
- package/ark_dist/img/avatar2.gif +0 -0
- package/ark_dist/img/avatar3.gif +0 -0
- package/ark_dist/img/bpmn.74eea12b.svg +224 -0
- package/ark_dist/img/loginbg.svg +1 -0
- package/ark_dist/img/logo-r.png +0 -0
- package/ark_dist/img/logo.png +0 -0
- package/ark_dist/img/mobile-bg.d055fadc.png +0 -0
- package/ark_dist/img/no-widgets.svg +57 -0
- package/ark_dist/img/tasks-example.png +0 -0
- package/ark_dist/img/ver.svg +236 -0
- package/ark_dist/index.html +118 -0
- package/ark_dist/js/app.e39a548a.js +1 -0
- package/ark_dist/js/views/views-flow-flow.84dc5300.js +3 -0
- package/ark_dist/js/views/views-flow-flow.84dc5300.js.LICENSE.txt +182 -0
- package/ark_dist/js/views/views-flow-flow.84dc5300.js.map +1 -0
- package/ark_proxy/entry.js +28 -0
- package/ark_proxy_es/entry.js +16 -0
- package/package.json +173 -0
- package/scripts/check.js +13 -0
- package/scripts/meta.js +21 -0
- package/scripts/prepublishOnly.js +28 -0
- package/src/admin/App.vue +13 -0
- package/src/admin/bpmn/custom/context-pad.js +405 -0
- package/src/admin/bpmn/custom/index.js +8 -0
- package/src/admin/bpmn/custom/palette.js +159 -0
- package/src/admin/bpmn/properties-panel/PropertiesView.vue +620 -0
- package/src/admin/bpmn/translate.js +23 -0
- package/src/admin/bpmn/translations.js +211 -0
- package/src/admin/components/affix/index.vue +385 -0
- package/src/admin/components/area-select/index.vue +52 -0
- package/src/admin/components/buttons/index.vue +47 -0
- package/src/admin/components/checkbox/index.vue +83 -0
- package/src/admin/components/code/code.js +149 -0
- package/src/admin/components/code/index.vue +450 -0
- package/src/admin/components/color/index.vue +30 -0
- package/src/admin/components/color-picker/index.vue +57 -0
- package/src/admin/components/color-scheme/index.vue +234 -0
- package/src/admin/components/condition-list/index.vue +170 -0
- package/src/admin/components/date/index.vue +29 -0
- package/src/admin/components/datetime/index.vue +45 -0
- package/src/admin/components/default-value-tips/index.vue +44 -0
- package/src/admin/components/dict-buttons/index.vue +53 -0
- package/src/admin/components/dict-checkbox/index.vue +45 -0
- package/src/admin/components/dict-radio/index.vue +68 -0
- package/src/admin/components/dict-select/index.vue +93 -0
- package/src/admin/components/dict-selects/index.vue +105 -0
- package/src/admin/components/dict-switch/index.vue +64 -0
- package/src/admin/components/dict-tree/index.vue +17 -0
- package/src/admin/components/dm-tree/index.vue +224 -0
- package/src/admin/components/edit-table/index.vue +171 -0
- package/src/admin/components/employee-tree/index.vue +247 -0
- package/src/admin/components/employees-tree/index.vue +80 -0
- package/src/admin/components/entp-tree/index.vue +266 -0
- package/src/admin/components/file/index.vue +310 -0
- package/src/admin/components/form/index.vue +141 -0
- package/src/admin/components/icon/index.vue +77 -0
- package/src/admin/components/icon-buttons/index.vue +52 -0
- package/src/admin/components/icon-select/index.vue +140 -0
- package/src/admin/components/image/index.vue +207 -0
- package/src/admin/components/index.js +16 -0
- package/src/admin/components/input/index.vue +41 -0
- package/src/admin/components/local-img/index.vue +49 -0
- package/src/admin/components/multiple-input/index.vue +64 -0
- package/src/admin/components/multiple-number/index.vue +70 -0
- package/src/admin/components/number/index.vue +134 -0
- package/src/admin/components/organization/index.vue +303 -0
- package/src/admin/components/organization-tree/index.vue +269 -0
- package/src/admin/components/page/index.vue +149 -0
- package/src/admin/components/password/index.vue +21 -0
- package/src/admin/components/radio/index.vue +46 -0
- package/src/admin/components/region-tree/index.vue +269 -0
- package/src/admin/components/remote-select/index.vue +315 -0
- package/src/admin/components/rich-editor/index.vue +152 -0
- package/src/admin/components/role-select/index.vue +58 -0
- package/src/admin/components/script-input/index.vue +97 -0
- package/src/admin/components/select/index.vue +105 -0
- package/src/admin/components/selects/index.vue +100 -0
- package/src/admin/components/style-list/index.vue +500 -0
- package/src/admin/components/switch/index.vue +54 -0
- package/src/admin/components/table/index.vue +920 -0
- package/src/admin/components/textarea/index.vue +28 -0
- package/src/admin/components/tree/index.vue +247 -0
- package/src/admin/components/tree-selects/index.vue +66 -0
- package/src/admin/components/unit-tree/index.vue +269 -0
- package/src/admin/console/index.vue +122 -0
- package/src/admin/layout/console/index.vue +15 -0
- package/src/admin/layout/fullscreen/index.vue +32 -0
- package/src/admin/layout/home/index.vue +11 -0
- package/src/admin/layout/index.vue +139 -0
- package/src/admin/layout/menu/index.vue +102 -0
- package/src/admin/layout/personnel/index.vue +166 -0
- package/src/admin/layout/search/index.vue +78 -0
- package/src/admin/main.js +30 -0
- package/src/admin/pinia/router.js +179 -0
- package/src/admin/router.js +91 -0
- package/src/admin/visual/comp-data.vue +1107 -0
- package/src/admin/visual/comp-event.vue +1677 -0
- package/src/admin/visual/components/app/list/goods/double.vue +184 -0
- package/src/admin/visual/components/app/list/nav/image.vue +114 -0
- package/src/admin/visual/components/app/list/nav/text.vue +130 -0
- package/src/admin/visual/components/button/index.vue +58 -0
- package/src/admin/visual/components/container/index.vue +37 -0
- package/src/admin/visual/components/custom-list/index.vue +127 -0
- package/src/admin/visual/components/data/index.vue +46 -0
- package/src/admin/visual/components/data-table/index.vue +203 -0
- package/src/admin/visual/components/echarts/annular.vue +140 -0
- package/src/admin/visual/components/echarts/bar.vue +115 -0
- package/src/admin/visual/components/echarts/funnel.vue +115 -0
- package/src/admin/visual/components/echarts/gauge.vue +158 -0
- package/src/admin/visual/components/echarts/line.vue +110 -0
- package/src/admin/visual/components/echarts/map.vue +150 -0
- package/src/admin/visual/components/echarts/pie.vue +114 -0
- package/src/admin/visual/components/echarts/radar.vue +145 -0
- package/src/admin/visual/components/echarts/scatter.vue +106 -0
- package/src/admin/visual/components/edit-table/index.vue +71 -0
- package/src/admin/visual/components/form/affix.vue +107 -0
- package/src/admin/visual/components/form/area.vue +76 -0
- package/src/admin/visual/components/form/buttons.vue +90 -0
- package/src/admin/visual/components/form/checkbox.vue +85 -0
- package/src/admin/visual/components/form/date-range.vue +61 -0
- package/src/admin/visual/components/form/date.vue +59 -0
- package/src/admin/visual/components/form/datetime.vue +59 -0
- package/src/admin/visual/components/form/employee-tree.vue +88 -0
- package/src/admin/visual/components/form/employees-tree.vue +6 -0
- package/src/admin/visual/components/form/image.vue +103 -0
- package/src/admin/visual/components/form/index.vue +59 -0
- package/src/admin/visual/components/form/input.vue +84 -0
- package/src/admin/visual/components/form/item.vue +68 -0
- package/src/admin/visual/components/form/number.vue +130 -0
- package/src/admin/visual/components/form/organization-tree.vue +88 -0
- package/src/admin/visual/components/form/password.vue +74 -0
- package/src/admin/visual/components/form/radio.vue +87 -0
- package/src/admin/visual/components/form/rate.vue +66 -0
- package/src/admin/visual/components/form/region-tree.vue +88 -0
- package/src/admin/visual/components/form/rich-editor.vue +94 -0
- package/src/admin/visual/components/form/select.vue +156 -0
- package/src/admin/visual/components/form/switch.vue +85 -0
- package/src/admin/visual/components/form/textarea.vue +62 -0
- package/src/admin/visual/components/form/unit-tree.vue +88 -0
- package/src/admin/visual/components/icon/index.vue +65 -0
- package/src/admin/visual/components/image/index.vue +170 -0
- package/src/admin/visual/components/index.js +44 -0
- package/src/admin/visual/components/list/block.vue +160 -0
- package/src/admin/visual/components/list/button.vue +80 -0
- package/src/admin/visual/components/list/card.vue +101 -0
- package/src/admin/visual/components/list/custom.vue +150 -0
- package/src/admin/visual/components/list/image.vue +116 -0
- package/src/admin/visual/components/list/news.vue +138 -0
- package/src/admin/visual/components/page/index.vue +88 -0
- package/src/admin/visual/components/page-comp/index.vue +110 -0
- package/src/admin/visual/components/portal-menu/index.vue +92 -0
- package/src/admin/visual/components/qrcode/index.vue +77 -0
- package/src/admin/visual/components/router-view/index.vue +12 -0
- package/src/admin/visual/components/row/index.vue +139 -0
- package/src/admin/visual/components/search/index.vue +40 -0
- package/src/admin/visual/components/tabs/index.vue +125 -0
- package/src/admin/visual/components/text/index.vue +64 -0
- package/src/admin/visual/components/video/index.vue +41 -0
- package/src/admin/visual/draggable.vue +49 -0
- package/src/admin/visual/editor.vue +602 -0
- package/src/admin/visual/js/app-form.config.js +1301 -0
- package/src/admin/visual/js/app.config.js +86 -0
- package/src/admin/visual/js/common.config.js +687 -0
- package/src/admin/visual/js/component.config.js +741 -0
- package/src/admin/visual/js/echarts.config.js +2440 -0
- package/src/admin/visual/js/form.config.js +2837 -0
- package/src/admin/visual/js/list.config.js +578 -0
- package/src/admin/visual/js/menu.config.js +62 -0
- package/src/admin/visual/js/visual-comp.js +48 -0
- package/src/admin/visual/tool.vue +1223 -0
- package/src/assets/images/background.jpg +0 -0
- package/src/assets/images/login-bg.jpg +0 -0
- package/src/assets/images/mobile-bg.png +0 -0
- package/src/assets/images/no-data.png +0 -0
- package/src/assets/style/base.css +48 -0
- package/src/assets/style/business.css +5 -0
- package/src/assets/style/code.css +36 -0
- package/src/assets/style/codeless.css +195 -0
- package/src/assets/style/flow.css +12 -0
- package/src/assets/style/global/blue.css +83 -0
- package/src/assets/style/global/default.css +71 -0
- package/src/assets/style/global/green.css +83 -0
- package/src/assets/style/global/purple.css +83 -0
- package/src/assets/style/global/red.css +83 -0
- package/src/assets/style/main.css +608 -0
- package/src/assets/style/menu/black.css +9 -0
- package/src/assets/style/menu/default.css +9 -0
- package/src/assets/style/menu/grey.css +9 -0
- package/src/assets/style/visual.css +204 -0
- package/src/auto-imports.d.ts +307 -0
- package/src/business/App.vue +131 -0
- package/src/business/components/dict-select/index.vue +88 -0
- package/src/business/components/index.js +13 -0
- package/src/business/components/input/index.vue +38 -0
- package/src/business/components/table/index.vue +928 -0
- package/src/business/home/index.vue +45 -0
- package/src/business/iframe/index.vue +63 -0
- package/src/business/layout/aside/history/history.vue +518 -0
- package/src/business/layout/aside/index.vue +116 -0
- package/src/business/layout/aside/menu/index.vue +47 -0
- package/src/business/layout/aside/menu/menuItem.vue +83 -0
- package/src/business/layout/aside/menu/submenu.vue +88 -0
- package/src/business/layout/fullscreen/index.vue +41 -0
- package/src/business/layout/header/index.vue +81 -0
- package/src/business/layout/header/menu/index.vue +47 -0
- package/src/business/layout/header/menu/menuItem.vue +43 -0
- package/src/business/layout/header/menu/submenu.vue +34 -0
- package/src/business/layout/home/index.vue +20 -0
- package/src/business/layout/index.vue +330 -0
- package/src/business/layout/message/index.vue +250 -0
- package/src/business/layout/personnel/index.vue +549 -0
- package/src/business/layout/search/index.vue +75 -0
- package/src/business/layout/subsystem/index.vue +124 -0
- package/src/business/main.js +36 -0
- package/src/business/pinia/menuBadge.js +58 -0
- package/src/business/pinia/router.js +190 -0
- package/src/business/router.js +98 -0
- package/src/choose/App.vue +203 -0
- package/src/choose/main.js +22 -0
- package/src/choose/router.js +33 -0
- package/src/codeless/components/affix/index.vue +393 -0
- package/src/codeless/components/affix-view/index.vue +244 -0
- package/src/codeless/components/buttons/index.vue +59 -0
- package/src/codeless/components/checkbox/index.vue +107 -0
- package/src/codeless/components/date/index.vue +105 -0
- package/src/codeless/components/datetime/index.vue +65 -0
- package/src/codeless/components/dialog-select/index.vue +170 -0
- package/src/codeless/components/dict-buttons/index.vue +97 -0
- package/src/codeless/components/dict-radio/index.vue +94 -0
- package/src/codeless/components/dict-select/index.vue +181 -0
- package/src/codeless/components/dict-selects/index.vue +145 -0
- package/src/codeless/components/dict-switch/index.vue +94 -0
- package/src/codeless/components/dict-tree/index.vue +116 -0
- package/src/codeless/components/edit-table/index.vue +160 -0
- package/src/codeless/components/employee-tree/index.vue +254 -0
- package/src/codeless/components/employees-tree/index.vue +87 -0
- package/src/codeless/components/entp-tree/index.vue +261 -0
- package/src/codeless/components/entps-tree/index.vue +93 -0
- package/src/codeless/components/icon/index.vue +65 -0
- package/src/codeless/components/image/index.vue +298 -0
- package/src/codeless/components/index.js +16 -0
- package/src/codeless/components/input/index.vue +63 -0
- package/src/codeless/components/number/index.vue +150 -0
- package/src/codeless/components/organization-tree/index.vue +262 -0
- package/src/codeless/components/organizations-tree/index.vue +79 -0
- package/src/codeless/components/password/index.vue +42 -0
- package/src/codeless/components/radio/index.vue +57 -0
- package/src/codeless/components/region-tree/index.vue +262 -0
- package/src/codeless/components/remote-distinct/index.vue +354 -0
- package/src/codeless/components/remote-select/index.vue +363 -0
- package/src/codeless/components/rich-editor/index.vue +159 -0
- package/src/codeless/components/roles/index.vue +68 -0
- package/src/codeless/components/select/index.vue +95 -0
- package/src/codeless/components/selects/index.vue +116 -0
- package/src/codeless/components/show-dict/index.vue +52 -0
- package/src/codeless/components/show-employees/index.vue +29 -0
- package/src/codeless/components/show-organizations/index.vue +29 -0
- package/src/codeless/components/show-roles/index.vue +45 -0
- package/src/codeless/components/signature-pad/index.vue +224 -0
- package/src/codeless/components/switch/index.vue +56 -0
- package/src/codeless/components/textarea/index.vue +37 -0
- package/src/codeless/components/tree/index.vue +244 -0
- package/src/codeless/components/unit-tree/index.vue +262 -0
- package/src/codeless/components/units-tree/index.vue +93 -0
- package/src/codeless/components/video/index.vue +255 -0
- package/src/codeless/components/video-view/index.vue +130 -0
- package/src/codeless/js/codeless.js +47 -0
- package/src/codeless/view/form-auto.vue +192 -0
- package/src/codeless/view/form-custom.vue +10 -0
- package/src/codeless/view/form-model.vue +421 -0
- package/src/codeless/view/form-query.vue +171 -0
- package/src/codeless/view/form.vue +575 -0
- package/src/codeless/view/page-comp.vue +1318 -0
- package/src/codeless/view/page.vue +280 -0
- package/src/codeless/view/table-edit-item.vue +184 -0
- package/src/codeless/view/table-edit.vue +490 -0
- package/src/codeless/view/table.vue +1606 -0
- package/src/codeless/view/tree.vue +431 -0
- package/src/configs/subApp.ts +9 -0
- package/src/directives/collapse/index.js +123 -0
- package/src/directives/drag/index.js +43 -0
- package/src/directives/index.js +9 -0
- package/src/directives/resize/index.js +23 -0
- package/src/entrance/libProperties.ts +24 -0
- package/src/entrance/libTypes.ts +26 -0
- package/src/error/404.vue +23 -0
- package/src/flow/chart.vue +130 -0
- package/src/flow/deal.vue +776 -0
- package/src/flow/signature.vue +216 -0
- package/src/flow/start.vue +18 -0
- package/src/http/api.js +192 -0
- package/src/http/request.js +81 -0
- package/src/login/App.vue +421 -0
- package/src/login/main.js +30 -0
- package/src/login/router.js +33 -0
- package/src/main.ts +20 -0
- package/src/mobile/App.vue +51 -0
- package/src/mobile/home/index.vue +34 -0
- package/src/mobile/main.js +26 -0
- package/src/mobile/router.js +101 -0
- package/src/mobile/view/page.vue +99 -0
- package/src/pinia/index.js +5 -0
- package/src/pinia/modules/dataField.js +77 -0
- package/src/pinia/modules/dataForm.js +46 -0
- package/src/pinia/modules/dataTable.js +46 -0
- package/src/pinia/modules/dictionary.js +66 -0
- package/src/pinia/modules/employee.js +46 -0
- package/src/pinia/modules/icon.js +46 -0
- package/src/pinia/modules/keepAlive.js +35 -0
- package/src/pinia/modules/organization.js +189 -0
- package/src/pinia/modules/page.js +46 -0
- package/src/pinia/modules/pageButton.js +44 -0
- package/src/pinia/modules/pageComp.js +46 -0
- package/src/pinia/modules/role.js +46 -0
- package/src/pinia/modules/setting.js +56 -0
- package/src/pinia/modules/subsystem.js +64 -0
- package/src/pinia/modules/user.js +177 -0
- package/src/plugins/index.ts +24 -0
- package/src/portal/App.vue +27 -0
- package/src/portal/home/index.vue +52 -0
- package/src/portal/main.js +31 -0
- package/src/portal/page/index.vue +39 -0
- package/src/portal/pinia/router.js +176 -0
- package/src/portal/router.js +86 -0
- package/src/router/constantRoutes.ts +13 -0
- package/src/router/loadComponent.ts +29 -0
- package/src/router/readme.txt +21 -0
- package/src/sso/sso.js +19 -0
- package/src/sso/sso.vue +138 -0
- package/src/types/axios.d.ts +13 -0
- package/src/types/func.ts +14 -0
- package/src/types/global.d.ts +108 -0
- package/src/types/layout.d.ts +59 -0
- package/src/types/mitt.d.ts +40 -0
- package/src/types/pinia.d.ts +93 -0
- package/src/types/views.d.ts +27 -0
- package/src/types/window.d.ts +8 -0
- package/src/utils/aes.js +75 -0
- package/src/utils/browser.js +13 -0
- package/src/utils/bus.js +4 -0
- package/src/utils/cache.js +6 -0
- package/src/utils/codeless.js +92 -0
- package/src/utils/color.js +274 -0
- package/src/utils/date.js +180 -0
- package/src/utils/loading.js +22 -0
- package/src/utils/page.js +36 -0
- package/src/utils/progress.js +19 -0
- package/src/utils/system.js +92 -0
- package/src/utils/theme.js +79 -0
- package/src/utils/tool.js +431 -0
- package/src/utils/websocket.js +124 -0
- package/src/views/codeless/appVersion.vue +593 -0
- package/src/views/codeless/dataFormEdit.vue +1463 -0
- package/src/views/codeless/dataModel.vue +2584 -0
- package/src/views/codeless/dataModelPage.vue +535 -0
- package/src/views/codeless/dataTableEdit.vue +1678 -0
- package/src/views/codeless/datasource.vue +308 -0
- package/src/views/codeless/interface.vue +833 -0
- package/src/views/codeless/interfaceToken.vue +255 -0
- package/src/views/codeless/page.vue +752 -0
- package/src/views/codeless/pageButton.vue +255 -0
- package/src/views/codeless/pageCompEdit.vue +2330 -0
- package/src/views/codeless/pageEdit.vue +661 -0
- package/src/views/codeless/relationPage.vue +349 -0
- package/src/views/codeless/scriptGroovy.vue +736 -0
- package/src/views/codeless/scriptGroovyEdit.vue +248 -0
- package/src/views/codeless/scriptGroovyExecute.vue +212 -0
- package/src/views/codeless/scriptGroovySimple.vue +1057 -0
- package/src/views/codeless/scriptTool.vue +563 -0
- package/src/views/codeless/subsystem.vue +309 -0
- package/src/views/codeless/template.vue +739 -0
- package/src/views/codeless/variable.vue +727 -0
- package/src/views/codeless/view.vue +738 -0
- package/src/views/codeless/viewEdit.vue +244 -0
- package/src/views/codeless/viewSimple.vue +1034 -0
- package/src/views/collect/task.vue +898 -0
- package/src/views/collect/taskLog.vue +238 -0
- package/src/views/dictionary/dictionary.vue +866 -0
- package/src/views/employee/employee.vue +355 -0
- package/src/views/flow/flow.vue +369 -0
- package/src/views/flow/flowInst.vue +73 -0
- package/src/views/flow/flowLineBranch.vue +406 -0
- package/src/views/flow/flowNodeMan.vue +426 -0
- package/src/views/flow/flowOpinion.vue +188 -0
- package/src/views/icon/icon.vue +242 -0
- package/src/views/log/loginLog.vue +41 -0
- package/src/views/log/operatorLog.vue +176 -0
- package/src/views/menu/menu.vue +883 -0
- package/src/views/menu/menuList.vue +858 -0
- package/src/views/message/message.vue +299 -0
- package/src/views/mobile/editor.vue +1100 -0
- package/src/views/mobile/mobile.vue +568 -0
- package/src/views/mobile/tool.vue +1258 -0
- package/src/views/monitor/database.vue +11 -0
- package/src/views/monitor/details-diskspace.vue +56 -0
- package/src/views/monitor/details-gc.vue +93 -0
- package/src/views/monitor/details-memory.vue +143 -0
- package/src/views/monitor/details-process.vue +132 -0
- package/src/views/monitor/details-threads.vue +106 -0
- package/src/views/monitor/line-chart.vue +93 -0
- package/src/views/monitor/mem-chart.vue +22 -0
- package/src/views/monitor/panel.vue +90 -0
- package/src/views/monitor/performance.vue +36 -0
- package/src/views/monitor/threads-chart.vue +16 -0
- package/src/views/operation/backup.vue +593 -0
- package/src/views/operation/center.vue +420 -0
- package/src/views/operation/restore.vue +94 -0
- package/src/views/organization/organization.vue +366 -0
- package/src/views/role/role.vue +502 -0
- package/src/views/schedule/schedule.vue +338 -0
- package/src/views/schedule/scheduleLog.vue +40 -0
- package/src/views/sequence/sequence.vue +283 -0
- package/src/views/setting/setting.vue +371 -0
- package/src/visual/components/app/list/goods/double.vue +241 -0
- package/src/visual/components/app/list/nav/image.vue +135 -0
- package/src/visual/components/app/list/nav/text.vue +159 -0
- package/src/visual/components/button/index.vue +95 -0
- package/src/visual/components/container/index.vue +128 -0
- package/src/visual/components/data/index.vue +60 -0
- package/src/visual/components/data-table/index.vue +260 -0
- package/src/visual/components/echarts/annular.vue +173 -0
- package/src/visual/components/echarts/bar.vue +172 -0
- package/src/visual/components/echarts/funnel.vue +167 -0
- package/src/visual/components/echarts/gauge.vue +186 -0
- package/src/visual/components/echarts/line.vue +172 -0
- package/src/visual/components/echarts/map.vue +206 -0
- package/src/visual/components/echarts/pie.vue +158 -0
- package/src/visual/components/echarts/radar.vue +196 -0
- package/src/visual/components/echarts/scatter.vue +153 -0
- package/src/visual/components/edit-table/index.vue +71 -0
- package/src/visual/components/form/affix.vue +440 -0
- package/src/visual/components/form/area.vue +134 -0
- package/src/visual/components/form/buttons.vue +120 -0
- package/src/visual/components/form/checkbox.vue +126 -0
- package/src/visual/components/form/date-range.vue +97 -0
- package/src/visual/components/form/date.vue +88 -0
- package/src/visual/components/form/datetime.vue +87 -0
- package/src/visual/components/form/employee-tree.vue +300 -0
- package/src/visual/components/form/employees-tree.vue +91 -0
- package/src/visual/components/form/image.vue +440 -0
- package/src/visual/components/form/index.vue +85 -0
- package/src/visual/components/form/input.vue +116 -0
- package/src/visual/components/form/item.vue +68 -0
- package/src/visual/components/form/number.vue +157 -0
- package/src/visual/components/form/organization-tree.vue +300 -0
- package/src/visual/components/form/password.vue +103 -0
- package/src/visual/components/form/radio.vue +122 -0
- package/src/visual/components/form/rate.vue +93 -0
- package/src/visual/components/form/region-tree.vue +300 -0
- package/src/visual/components/form/rich-editor.vue +114 -0
- package/src/visual/components/form/select.vue +172 -0
- package/src/visual/components/form/switch.vue +105 -0
- package/src/visual/components/form/textarea.vue +91 -0
- package/src/visual/components/form/unit-tree.vue +300 -0
- package/src/visual/components/icon/index.vue +73 -0
- package/src/visual/components/image/index.vue +445 -0
- package/src/visual/components/index.js +26 -0
- package/src/visual/components/list/block.vue +234 -0
- package/src/visual/components/list/button.vue +123 -0
- package/src/visual/components/list/card.vue +129 -0
- package/src/visual/components/list/custom.vue +214 -0
- package/src/visual/components/list/image.vue +182 -0
- package/src/visual/components/list/news.vue +174 -0
- package/src/visual/components/page-comp/index.vue +67 -0
- package/src/visual/components/portal-menu/index.vue +191 -0
- package/src/visual/components/qrcode/index.vue +98 -0
- package/src/visual/components/router-view/index.vue +51 -0
- package/src/visual/components/row/index.vue +175 -0
- package/src/visual/components/search/index.vue +96 -0
- package/src/visual/components/tabs/index.vue +103 -0
- package/src/visual/components/text/index.vue +111 -0
- package/src/visual/components/video/index.vue +93 -0
- package/src/visual/js/echarts.js +220 -0
- package/src/visual/js/event.js +476 -0
- package/src/visual/js/visual-comp.js +48 -0
- package/src/visual/js/visual.js +508 -0
- package/src/visual/view/page.vue +357 -0
|
@@ -0,0 +1,1463 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-container">
|
|
3
|
+
<el-form
|
|
4
|
+
ref="dataForm"
|
|
5
|
+
label-width="140px"
|
|
6
|
+
:model="formData"
|
|
7
|
+
class="fit-box full-height"
|
|
8
|
+
:rules="rules"
|
|
9
|
+
>
|
|
10
|
+
<el-tabs v-model="tabName" class="fit-box full-height" @tabClick="changeTab">
|
|
11
|
+
<el-tab-pane name="form" label="基础信息" class="fit-box full-height">
|
|
12
|
+
<div style="width: 400px">
|
|
13
|
+
<el-row>
|
|
14
|
+
<el-col :span="24">
|
|
15
|
+
<el-form-item label="表单名称" prop="name">
|
|
16
|
+
<el-input v-model="formData.name" />
|
|
17
|
+
</el-form-item>
|
|
18
|
+
</el-col>
|
|
19
|
+
</el-row>
|
|
20
|
+
<el-row>
|
|
21
|
+
<el-col :span="24">
|
|
22
|
+
<el-form-item label="布局方式" prop="layoutType">
|
|
23
|
+
<ac-buttons v-model="formData.layoutType" options="自动" />
|
|
24
|
+
<ac-icon
|
|
25
|
+
v-if="formData.layoutType === '自定义'"
|
|
26
|
+
iconId="018dca6db20c6a3aaf68"
|
|
27
|
+
style="margin-left: 10px;"
|
|
28
|
+
/>
|
|
29
|
+
</el-form-item>
|
|
30
|
+
</el-col>
|
|
31
|
+
</el-row>
|
|
32
|
+
<el-row v-if="formData.layoutType === '自动'">
|
|
33
|
+
<el-col :span="24">
|
|
34
|
+
<el-form-item label="显示方式" prop="showModel">
|
|
35
|
+
<ac-buttons v-model="formData.showModel" options="普通,标签,分割线" />
|
|
36
|
+
</el-form-item>
|
|
37
|
+
</el-col>
|
|
38
|
+
</el-row>
|
|
39
|
+
<el-row v-if="formData.layoutType === '自动'">
|
|
40
|
+
<el-col :span="24" v-if="formData.showModel === '分割线'">
|
|
41
|
+
<el-form-item label="分割线样式" prop="dividerStyle">
|
|
42
|
+
<ac-buttons v-model="formData.dividerStyle" options="无,实线,虚线,标签" />
|
|
43
|
+
</el-form-item>
|
|
44
|
+
</el-col>
|
|
45
|
+
</el-row>
|
|
46
|
+
<el-row v-if="formData.layoutType === '自动'">
|
|
47
|
+
<el-col :span="24" v-if="formData.showModel === '分割线'">
|
|
48
|
+
<el-form-item label="内容位置" prop="dividerPosition">
|
|
49
|
+
<ac-buttons v-model="formData.dividerPosition" options="居左,居中,居右" />
|
|
50
|
+
</el-form-item>
|
|
51
|
+
</el-col>
|
|
52
|
+
</el-row>
|
|
53
|
+
<el-row v-if="formData.layoutType === '自动'">
|
|
54
|
+
<el-col :span="24">
|
|
55
|
+
<el-form-item label="批量编辑" prop="batchEdit">
|
|
56
|
+
<ac-dict-switch v-model="formData.batchEdit" dictCode="dictYesNo" />
|
|
57
|
+
</el-form-item>
|
|
58
|
+
</el-col>
|
|
59
|
+
</el-row>
|
|
60
|
+
<el-row v-if="formData.layoutType === '自动' && formData.batchEdit === '1'">
|
|
61
|
+
<el-col :span="24">
|
|
62
|
+
<el-form-item label="显示操作按钮" prop="showOperateButton">
|
|
63
|
+
<ac-dict-switch v-model="formData.showOperateButton" dictCode="dictYesNo" />
|
|
64
|
+
</el-form-item>
|
|
65
|
+
</el-col>
|
|
66
|
+
</el-row>
|
|
67
|
+
<el-row v-if="formData.layoutType === '自动' && formData.batchEdit === '1'">
|
|
68
|
+
<el-col :span="24">
|
|
69
|
+
<el-form-item label="是否必填" prop="required">
|
|
70
|
+
<ac-dict-switch v-model="formData.required" dictCode="dictYesNo" />
|
|
71
|
+
</el-form-item>
|
|
72
|
+
</el-col>
|
|
73
|
+
</el-row>
|
|
74
|
+
<el-row>
|
|
75
|
+
<el-col :span="24">
|
|
76
|
+
<el-form-item label="初始化脚本" prop="initScriptId">
|
|
77
|
+
<ac-tree
|
|
78
|
+
v-model="formData.initScriptId"
|
|
79
|
+
data-url="/system/scriptGroovy/queryTree"
|
|
80
|
+
type-select="script"
|
|
81
|
+
/>
|
|
82
|
+
</el-form-item>
|
|
83
|
+
</el-col>
|
|
84
|
+
</el-row>
|
|
85
|
+
</div>
|
|
86
|
+
</el-tab-pane>
|
|
87
|
+
<el-tab-pane
|
|
88
|
+
v-if="formData.layoutType === '自动'"
|
|
89
|
+
name="field"
|
|
90
|
+
label="表单字段"
|
|
91
|
+
class="fit-box full-height"
|
|
92
|
+
style="padding-right: 5px;overflow: auto"
|
|
93
|
+
>
|
|
94
|
+
<el-row v-if="formData.batchEdit !== '1'">
|
|
95
|
+
<el-col :span="24">
|
|
96
|
+
<el-button
|
|
97
|
+
type="success"
|
|
98
|
+
@click="addModel"
|
|
99
|
+
>添加分段</el-button>
|
|
100
|
+
</el-col>
|
|
101
|
+
</el-row>
|
|
102
|
+
<el-row
|
|
103
|
+
v-for="(model, index) in formData.modelList"
|
|
104
|
+
:key="index"
|
|
105
|
+
style="margin-top: 15px;"
|
|
106
|
+
>
|
|
107
|
+
<el-col :span="24">
|
|
108
|
+
<el-row>
|
|
109
|
+
<el-col :span="5">
|
|
110
|
+
<el-form-item label="分段名称">
|
|
111
|
+
<el-input v-model="model.name" />
|
|
112
|
+
</el-form-item>
|
|
113
|
+
</el-col>
|
|
114
|
+
<el-col :span="4" v-if="formData.batchEdit !== '1'">
|
|
115
|
+
<el-form-item label="标签宽度" prop="labelWidth">
|
|
116
|
+
<ac-number v-model="model.labelWidth" :point="0" />
|
|
117
|
+
</el-form-item>
|
|
118
|
+
</el-col>
|
|
119
|
+
<el-col :span="4" v-if="formData.batchEdit !== '1'">
|
|
120
|
+
<el-form-item label="对齐方式" prop="labelAlign">
|
|
121
|
+
<ac-select v-model="model.labelAlign" options="居左,居中,居右" />
|
|
122
|
+
</el-form-item>
|
|
123
|
+
</el-col>
|
|
124
|
+
<el-col :span="4">
|
|
125
|
+
<el-form-item label="排序" prop="ordinal" label-width="80">
|
|
126
|
+
<ac-number v-model="model.ordinal" :point="0" />
|
|
127
|
+
</el-form-item>
|
|
128
|
+
</el-col>
|
|
129
|
+
<el-col :span="formData.batchEdit !== '1' ? 7 : 15" style="text-align: right;">
|
|
130
|
+
<el-button
|
|
131
|
+
v-if="(!sortableInst || sortingId !== (model.id || model.rowFlag))
|
|
132
|
+
&& (model.fieldList || []).length > 1"
|
|
133
|
+
type="primary"
|
|
134
|
+
@click="sortDataField(model)"
|
|
135
|
+
>开启排序</el-button>
|
|
136
|
+
<el-button
|
|
137
|
+
v-if="sortableInst && sortingId === (model.id || model.rowFlag)"
|
|
138
|
+
type="info"
|
|
139
|
+
@click="unSortDataField"
|
|
140
|
+
>关闭排序</el-button>
|
|
141
|
+
<el-button
|
|
142
|
+
type="success"
|
|
143
|
+
@click="addModelField(model)"
|
|
144
|
+
>添加字段</el-button>
|
|
145
|
+
<el-button
|
|
146
|
+
v-if="formData.batchEdit !== '1'"
|
|
147
|
+
type="danger"
|
|
148
|
+
@click="deleteModel(model)"
|
|
149
|
+
>删除分段</el-button>
|
|
150
|
+
</el-col>
|
|
151
|
+
</el-row>
|
|
152
|
+
<el-table
|
|
153
|
+
:ref="el => setRefs(el, model)"
|
|
154
|
+
:show-overflow-tooltip="false"
|
|
155
|
+
tooltip-effect="light"
|
|
156
|
+
class="field-table edit-table"
|
|
157
|
+
style="margin-bottom: 20px"
|
|
158
|
+
width="100%"
|
|
159
|
+
:row-key="getFieldRowKey"
|
|
160
|
+
:data="model.fieldList"
|
|
161
|
+
:border="true"
|
|
162
|
+
:stripe="false"
|
|
163
|
+
>
|
|
164
|
+
<el-table-column
|
|
165
|
+
header-align="center"
|
|
166
|
+
align="center"
|
|
167
|
+
label="字段名称"
|
|
168
|
+
:min-width="120"
|
|
169
|
+
prop="fieldName"
|
|
170
|
+
/>
|
|
171
|
+
<el-table-column
|
|
172
|
+
header-align="center"
|
|
173
|
+
label="显示名称"
|
|
174
|
+
:min-width="120"
|
|
175
|
+
prop="aliasName"
|
|
176
|
+
>
|
|
177
|
+
<template #default="scope">
|
|
178
|
+
<el-input v-model="scope.row.aliasName" />
|
|
179
|
+
</template>
|
|
180
|
+
</el-table-column>
|
|
181
|
+
<el-table-column
|
|
182
|
+
header-align="center"
|
|
183
|
+
align="center"
|
|
184
|
+
label="标签颜色"
|
|
185
|
+
width="100"
|
|
186
|
+
prop="labelColor"
|
|
187
|
+
>
|
|
188
|
+
<template #default="scope">
|
|
189
|
+
<el-color-picker v-model="scope.row.labelColor" />
|
|
190
|
+
</template>
|
|
191
|
+
</el-table-column>
|
|
192
|
+
<el-table-column
|
|
193
|
+
header-align="center"
|
|
194
|
+
label="默认值"
|
|
195
|
+
:min-width="120"
|
|
196
|
+
prop="defaultValue"
|
|
197
|
+
>
|
|
198
|
+
<template #header>
|
|
199
|
+
<span style="margin-right: 5px">默认值</span>
|
|
200
|
+
<ac-default-value-tips />
|
|
201
|
+
</template>
|
|
202
|
+
<template #default="scope">
|
|
203
|
+
<ac-input
|
|
204
|
+
v-if="scope.row.manually === '1'"
|
|
205
|
+
v-model="scope.row.defaultValue"
|
|
206
|
+
/>
|
|
207
|
+
<component
|
|
208
|
+
v-else-if="getComponent(scope.row.fieldName) !== 'ac-affix'
|
|
209
|
+
&& getComponent(scope.row.fieldName) !== 'ac-image'
|
|
210
|
+
&& getComponent(scope.row.fieldName) !== 'ac-video'"
|
|
211
|
+
v-model="scope.row.defaultValue"
|
|
212
|
+
:is="getComponent(scope.row.fieldName)"
|
|
213
|
+
v-bind="getOptions(scope.row.fieldName)"
|
|
214
|
+
/>
|
|
215
|
+
<ac-dict-switch
|
|
216
|
+
v-if="getComponent(scope.row.fieldName) !== 'ac-affix'
|
|
217
|
+
&& getComponent(scope.row.fieldName) !== 'ac-image'
|
|
218
|
+
&& getComponent(scope.row.fieldName) !== 'ac-video'"
|
|
219
|
+
v-model="scope.row.manually"
|
|
220
|
+
dictCode="dictYesNo"
|
|
221
|
+
style="margin: 0 5px;"
|
|
222
|
+
title="手动录入"
|
|
223
|
+
/>
|
|
224
|
+
</template>
|
|
225
|
+
</el-table-column>
|
|
226
|
+
<el-table-column
|
|
227
|
+
header-align="center"
|
|
228
|
+
:width="100"
|
|
229
|
+
prop="colCnt"
|
|
230
|
+
>
|
|
231
|
+
<template #header>
|
|
232
|
+
<div v-if="formData.batchEdit !== '1'">
|
|
233
|
+
<span style="margin-right: 5px">所占列数</span>
|
|
234
|
+
<el-tooltip content="每行切分为24列">
|
|
235
|
+
<ac-icon iconId="018dca8ec9890493be26" />
|
|
236
|
+
</el-tooltip>
|
|
237
|
+
</div>
|
|
238
|
+
<div v-else>
|
|
239
|
+
<span style="margin-right: 5px">列宽</span>
|
|
240
|
+
<el-tooltip content="0时为自动宽度,负数时为最小宽度">
|
|
241
|
+
<ac-icon iconId="018dca8ec9890493be26" />
|
|
242
|
+
</el-tooltip>
|
|
243
|
+
</div>
|
|
244
|
+
</template>
|
|
245
|
+
<template #default="scope">
|
|
246
|
+
<ac-number
|
|
247
|
+
v-model="scope.row.colCnt"
|
|
248
|
+
:point="0"
|
|
249
|
+
:min="formData.batchEdit !== '1' ? 0 : -200"
|
|
250
|
+
/>
|
|
251
|
+
</template>
|
|
252
|
+
</el-table-column>
|
|
253
|
+
<el-table-column
|
|
254
|
+
header-align="center"
|
|
255
|
+
label="字段说明"
|
|
256
|
+
:min-width="120"
|
|
257
|
+
prop="description"
|
|
258
|
+
>
|
|
259
|
+
<template #default="scope">
|
|
260
|
+
<el-input v-model="scope.row.description" />
|
|
261
|
+
</template>
|
|
262
|
+
</el-table-column>
|
|
263
|
+
<el-table-column
|
|
264
|
+
header-align="center"
|
|
265
|
+
align="center"
|
|
266
|
+
label="是否只读"
|
|
267
|
+
:width="80"
|
|
268
|
+
prop="readonly"
|
|
269
|
+
>
|
|
270
|
+
<template #default="scope">
|
|
271
|
+
<ac-dict-switch v-model="scope.row.readonly" dictCode="dictYesNo" />
|
|
272
|
+
</template>
|
|
273
|
+
</el-table-column>
|
|
274
|
+
<el-table-column
|
|
275
|
+
header-align="center"
|
|
276
|
+
align="center"
|
|
277
|
+
label="是否必填"
|
|
278
|
+
:width="80"
|
|
279
|
+
prop="required"
|
|
280
|
+
>
|
|
281
|
+
<template #default="scope">
|
|
282
|
+
<ac-dict-switch v-model="scope.row.required" dictCode="dictYesNo" />
|
|
283
|
+
</template>
|
|
284
|
+
</el-table-column>
|
|
285
|
+
<el-table-column
|
|
286
|
+
header-align="center"
|
|
287
|
+
align="center"
|
|
288
|
+
label="是否隐藏"
|
|
289
|
+
:width="80"
|
|
290
|
+
prop="hide"
|
|
291
|
+
>
|
|
292
|
+
<template #default="scope">
|
|
293
|
+
<ac-dict-switch v-model="scope.row.hide" dictCode="dictYesNo" />
|
|
294
|
+
</template>
|
|
295
|
+
</el-table-column>
|
|
296
|
+
<el-table-column
|
|
297
|
+
header-align="center"
|
|
298
|
+
align="center"
|
|
299
|
+
label="操作"
|
|
300
|
+
:width="120"
|
|
301
|
+
prop="ordinal"
|
|
302
|
+
>
|
|
303
|
+
<template #default="scope">
|
|
304
|
+
<el-button
|
|
305
|
+
v-if="canFilter(scope.row.fieldName)"
|
|
306
|
+
type="primary"
|
|
307
|
+
@click="editFieldDialog(scope.row)"
|
|
308
|
+
link
|
|
309
|
+
>选择配置</el-button>
|
|
310
|
+
<el-button
|
|
311
|
+
type="danger"
|
|
312
|
+
@click="deleteModelField(model, scope.row)"
|
|
313
|
+
link
|
|
314
|
+
>删除</el-button>
|
|
315
|
+
</template>
|
|
316
|
+
</el-table-column>
|
|
317
|
+
</el-table>
|
|
318
|
+
</el-col>
|
|
319
|
+
</el-row>
|
|
320
|
+
</el-tab-pane>
|
|
321
|
+
<el-tab-pane
|
|
322
|
+
name="autofill"
|
|
323
|
+
label="自动填充"
|
|
324
|
+
class="fit-box full-height"
|
|
325
|
+
style="padding-right: 5px;overflow: auto"
|
|
326
|
+
>
|
|
327
|
+
<el-row>
|
|
328
|
+
<el-col :span="24">
|
|
329
|
+
<el-button
|
|
330
|
+
type="success"
|
|
331
|
+
@click="addAutofill"
|
|
332
|
+
>添加自动填充</el-button>
|
|
333
|
+
</el-col>
|
|
334
|
+
</el-row>
|
|
335
|
+
<el-row v-for="(autofill, index) in formData.autofillList" :key="index">
|
|
336
|
+
<el-col :span="24">
|
|
337
|
+
<el-divider />
|
|
338
|
+
<el-row>
|
|
339
|
+
<el-col :span="6">
|
|
340
|
+
<el-form-item label="触发字段" prop="triggerFieldName">
|
|
341
|
+
<ac-select v-model="autofill.triggerFieldName" :options="fieldNameOptions" />
|
|
342
|
+
</el-form-item>
|
|
343
|
+
</el-col>
|
|
344
|
+
<el-col :span="6">
|
|
345
|
+
<el-form-item label="来源数据模型" prop="dataModelId">
|
|
346
|
+
<ac-tree
|
|
347
|
+
v-model="autofill.dataModelId"
|
|
348
|
+
data-url="/system/dataModel/queryTree"
|
|
349
|
+
type-select="model"
|
|
350
|
+
@change="changeDataModel(autofill)"
|
|
351
|
+
/>
|
|
352
|
+
</el-form-item>
|
|
353
|
+
</el-col>
|
|
354
|
+
<el-col :span="6">
|
|
355
|
+
<el-form-item label="匹配字段" prop="compareFieldName">
|
|
356
|
+
<ac-select v-model="autofill.compareFieldName" :options="autofill.dataModelFieldOptions"/>
|
|
357
|
+
</el-form-item>
|
|
358
|
+
</el-col>
|
|
359
|
+
<el-col :span="6" style="text-align: right">
|
|
360
|
+
<el-button
|
|
361
|
+
type="success"
|
|
362
|
+
@click="addAutofillField(autofill)"
|
|
363
|
+
>添加填充字段</el-button>
|
|
364
|
+
<el-button
|
|
365
|
+
type="danger"
|
|
366
|
+
@click="deleteAutofill(autofill)"
|
|
367
|
+
>删除自动填充</el-button>
|
|
368
|
+
</el-col>
|
|
369
|
+
</el-row>
|
|
370
|
+
<el-row v-for="(field, index2) in autofill.fieldList" :key="index2">
|
|
371
|
+
<el-col :span="6">
|
|
372
|
+
<el-form-item label="填充字段" prop="autofillFieldName">
|
|
373
|
+
<ac-select v-model="field.autofillFieldName" :options="fieldNameOptions" />
|
|
374
|
+
</el-form-item>
|
|
375
|
+
</el-col>
|
|
376
|
+
<el-col :span="6">
|
|
377
|
+
<el-form-item label="来源字段" prop="sourceFieldName">
|
|
378
|
+
<ac-select v-model="field.sourceFieldName" :options="autofill.dataModelFieldOptions"/>
|
|
379
|
+
</el-form-item>
|
|
380
|
+
</el-col>
|
|
381
|
+
<el-col :span="12" style="text-align: right">
|
|
382
|
+
<el-button
|
|
383
|
+
type="danger"
|
|
384
|
+
@click="deleteAutofillField(autofill, field)"
|
|
385
|
+
>删除填充字段</el-button>
|
|
386
|
+
</el-col>
|
|
387
|
+
</el-row>
|
|
388
|
+
</el-col>
|
|
389
|
+
</el-row>
|
|
390
|
+
</el-tab-pane>
|
|
391
|
+
<el-tab-pane
|
|
392
|
+
name="display"
|
|
393
|
+
label="显隐禁用"
|
|
394
|
+
class="fit-box full-height"
|
|
395
|
+
style="padding-right: 5px;overflow: auto"
|
|
396
|
+
>
|
|
397
|
+
<el-row>
|
|
398
|
+
<el-col :span="24">
|
|
399
|
+
<el-button
|
|
400
|
+
type="success"
|
|
401
|
+
@click="addDisplay"
|
|
402
|
+
>添加显隐禁用</el-button>
|
|
403
|
+
</el-col>
|
|
404
|
+
</el-row>
|
|
405
|
+
<el-row v-for="(display, index3) in formData.displayList" :key="index3">
|
|
406
|
+
<el-col :span="24">
|
|
407
|
+
<el-divider />
|
|
408
|
+
<el-row>
|
|
409
|
+
<el-col :span="5">
|
|
410
|
+
<el-form-item label="操作字段" prop="fieldName">
|
|
411
|
+
<ac-select v-model="display.fieldName" :options="fieldNameOptions" />
|
|
412
|
+
</el-form-item>
|
|
413
|
+
</el-col>
|
|
414
|
+
<el-col :span="8">
|
|
415
|
+
<el-form-item label="显隐类型" prop="type">
|
|
416
|
+
<ac-buttons v-model="display.type" options="显示,隐藏,禁用" />
|
|
417
|
+
</el-form-item>
|
|
418
|
+
</el-col>
|
|
419
|
+
<el-col :span="11" style="text-align: right">
|
|
420
|
+
<el-button
|
|
421
|
+
type="success"
|
|
422
|
+
@click="addDisplayRule(display)"
|
|
423
|
+
>添加条件</el-button>
|
|
424
|
+
<el-button
|
|
425
|
+
type="danger"
|
|
426
|
+
@click="deleteDisplay(display)"
|
|
427
|
+
>删除显隐禁用</el-button>
|
|
428
|
+
</el-col>
|
|
429
|
+
</el-row>
|
|
430
|
+
<el-row v-for="(rule, index4) in display.ruleList" :key="index4">
|
|
431
|
+
<el-col :span="5">
|
|
432
|
+
<el-form-item label="条件分组" prop="grouping">
|
|
433
|
+
<template #label>
|
|
434
|
+
<span style="margin-right: 5px">条件分组</span>
|
|
435
|
+
<el-tooltip content="同一分组为 and 条件,不同分组间为 or 条件">
|
|
436
|
+
<ac-icon iconId="018dca8ec9890493be26" />
|
|
437
|
+
</el-tooltip>
|
|
438
|
+
</template>
|
|
439
|
+
<ac-number v-model="rule.grouping" :point="0" />
|
|
440
|
+
</el-form-item>
|
|
441
|
+
</el-col>
|
|
442
|
+
<el-col :span="5">
|
|
443
|
+
<el-form-item label="条件字段" prop="fieldName">
|
|
444
|
+
<ac-select v-model="rule.fieldName" :options="fieldNameOptions"/>
|
|
445
|
+
</el-form-item>
|
|
446
|
+
</el-col>
|
|
447
|
+
<el-col :span="5">
|
|
448
|
+
<el-form-item label="条件类型" prop="type">
|
|
449
|
+
<ac-select v-model="rule.type" options="包含,不包含,等于,不等于,大于,大于等于,小于,小于等于" />
|
|
450
|
+
</el-form-item>
|
|
451
|
+
</el-col>
|
|
452
|
+
<el-col :span="5">
|
|
453
|
+
<el-form-item label="条件值" prop="value">
|
|
454
|
+
<component
|
|
455
|
+
v-model="rule.value"
|
|
456
|
+
:is="getComponent(rule.fieldName)"
|
|
457
|
+
v-bind="getOptions(rule.fieldName)"
|
|
458
|
+
/>
|
|
459
|
+
</el-form-item>
|
|
460
|
+
</el-col>
|
|
461
|
+
<el-col :span="4" style="text-align: right">
|
|
462
|
+
<el-button
|
|
463
|
+
type="danger"
|
|
464
|
+
@click="deleteDisplayRule(display, rule)"
|
|
465
|
+
>删除条件</el-button>
|
|
466
|
+
</el-col>
|
|
467
|
+
</el-row>
|
|
468
|
+
</el-col>
|
|
469
|
+
</el-row>
|
|
470
|
+
</el-tab-pane>
|
|
471
|
+
<el-tab-pane name="tips" label="提示信息" class="fit-box full-height">
|
|
472
|
+
<el-row>
|
|
473
|
+
<el-col :span="6">
|
|
474
|
+
<el-form-item label="位置" prop="tipsPosition" label-width="80">
|
|
475
|
+
<ac-buttons v-model="formData.tipsPosition" options="顶部,底部" />
|
|
476
|
+
</el-form-item>
|
|
477
|
+
</el-col>
|
|
478
|
+
<el-col :span="6">
|
|
479
|
+
<el-form-item label="来源" prop="tipsOrigin" label-width="80">
|
|
480
|
+
<ac-buttons v-model="formData.tipsOrigin" options="输入,脚本" />
|
|
481
|
+
</el-form-item>
|
|
482
|
+
</el-col>
|
|
483
|
+
<el-col :span="6" v-if="formData.tipsOrigin === '脚本'">
|
|
484
|
+
<el-form-item label="脚本" prop="tipsScriptId" label-width="80">
|
|
485
|
+
<ac-tree
|
|
486
|
+
v-model="formData.tipsScriptId"
|
|
487
|
+
data-url="/system/scriptGroovy/queryTree"
|
|
488
|
+
type-select="script"
|
|
489
|
+
/>
|
|
490
|
+
</el-form-item>
|
|
491
|
+
</el-col>
|
|
492
|
+
</el-row>
|
|
493
|
+
<ac-rich-editor v-if="formData.tipsOrigin === '输入'" v-model="formData.tipsHtml" />
|
|
494
|
+
</el-tab-pane>
|
|
495
|
+
<el-tab-pane name="script" label="页面脚本" class="fit-box full-height">
|
|
496
|
+
<template #label>
|
|
497
|
+
<span style="margin-right: 5px">页面脚本</span>
|
|
498
|
+
<el-tooltip>
|
|
499
|
+
<template #content>
|
|
500
|
+
<el-input
|
|
501
|
+
v-model="scriptTips"
|
|
502
|
+
class="script-tips-box"
|
|
503
|
+
type="textarea"
|
|
504
|
+
readonly
|
|
505
|
+
resize="none"
|
|
506
|
+
/>
|
|
507
|
+
</template>
|
|
508
|
+
<ac-icon iconId="018dca8ec9890493be26" />
|
|
509
|
+
</el-tooltip>
|
|
510
|
+
</template>
|
|
511
|
+
<div class="script-box">
|
|
512
|
+
<div class="script-left-box">
|
|
513
|
+
<ac-code
|
|
514
|
+
ref="codeRef"
|
|
515
|
+
v-model="formData.scriptContent"
|
|
516
|
+
:fullscreen="false"
|
|
517
|
+
title="页面脚本"
|
|
518
|
+
mode="javascript"
|
|
519
|
+
/>
|
|
520
|
+
</div>
|
|
521
|
+
<div class="script-right-box">
|
|
522
|
+
<div class="field-box">
|
|
523
|
+
<div
|
|
524
|
+
v-for="field in fieldList"
|
|
525
|
+
:key="field.fieldName"
|
|
526
|
+
class="field-item"
|
|
527
|
+
>{{field.showName}}【{{field.fieldName}}】: {{field.fieldType}}</div>
|
|
528
|
+
</div>
|
|
529
|
+
</div>
|
|
530
|
+
</div>
|
|
531
|
+
</el-tab-pane>
|
|
532
|
+
</el-tabs>
|
|
533
|
+
</el-form>
|
|
534
|
+
</div>
|
|
535
|
+
|
|
536
|
+
<!-- 添加字段 -->
|
|
537
|
+
<el-dialog
|
|
538
|
+
v-model="fieldAddVisible"
|
|
539
|
+
title="添加字段"
|
|
540
|
+
class="no-padding"
|
|
541
|
+
:close-on-click-modal="false"
|
|
542
|
+
destroy-on-close
|
|
543
|
+
fullscreen
|
|
544
|
+
draggable
|
|
545
|
+
>
|
|
546
|
+
<div class="page-container">
|
|
547
|
+
<el-table
|
|
548
|
+
ref="fieldAddTable"
|
|
549
|
+
:show-overflow-tooltip="false"
|
|
550
|
+
tooltip-effect="light"
|
|
551
|
+
class="field-table fit-table"
|
|
552
|
+
width="100%"
|
|
553
|
+
@row-click="rowClick"
|
|
554
|
+
:data="fieldList"
|
|
555
|
+
:border="true"
|
|
556
|
+
:stripe="false"
|
|
557
|
+
>
|
|
558
|
+
<el-table-column
|
|
559
|
+
header-align="center"
|
|
560
|
+
align="center"
|
|
561
|
+
type="selection"
|
|
562
|
+
width="55"
|
|
563
|
+
/>
|
|
564
|
+
<el-table-column
|
|
565
|
+
header-align="center"
|
|
566
|
+
label="字段名称"
|
|
567
|
+
:min-width="120"
|
|
568
|
+
prop="fieldName"
|
|
569
|
+
sortable
|
|
570
|
+
/>
|
|
571
|
+
<el-table-column
|
|
572
|
+
header-align="center"
|
|
573
|
+
label="显示名称"
|
|
574
|
+
:min-width="120"
|
|
575
|
+
prop="showName"
|
|
576
|
+
sortable
|
|
577
|
+
/>
|
|
578
|
+
<el-table-column
|
|
579
|
+
header-align="center"
|
|
580
|
+
align="center"
|
|
581
|
+
label="是否主键"
|
|
582
|
+
:width="100"
|
|
583
|
+
prop="primaryKey"
|
|
584
|
+
>
|
|
585
|
+
<template #default="scope">
|
|
586
|
+
<ac-dict-radio showText v-model="scope.row.primaryKey" dictCode="dictYesNo" />
|
|
587
|
+
</template>
|
|
588
|
+
</el-table-column>
|
|
589
|
+
<el-table-column
|
|
590
|
+
header-align="center"
|
|
591
|
+
align="center"
|
|
592
|
+
label="字段类型"
|
|
593
|
+
:width="120"
|
|
594
|
+
prop="fieldType"
|
|
595
|
+
/>
|
|
596
|
+
<el-table-column
|
|
597
|
+
header-align="center"
|
|
598
|
+
align="center"
|
|
599
|
+
label="是否必填"
|
|
600
|
+
:width="100"
|
|
601
|
+
prop="required"
|
|
602
|
+
>
|
|
603
|
+
<template #default="scope">
|
|
604
|
+
<ac-dict-radio showText v-model="scope.row.required" dictCode="dictYesNo" />
|
|
605
|
+
</template>
|
|
606
|
+
</el-table-column>
|
|
607
|
+
</el-table>
|
|
608
|
+
</div>
|
|
609
|
+
<template #footer>
|
|
610
|
+
<el-button
|
|
611
|
+
size="default"
|
|
612
|
+
type="info"
|
|
613
|
+
@click="fieldAddVisible=false"
|
|
614
|
+
>取消</el-button>
|
|
615
|
+
<el-button
|
|
616
|
+
type="primary"
|
|
617
|
+
size="default"
|
|
618
|
+
@click="submitFieldAddForm"
|
|
619
|
+
>确定</el-button>
|
|
620
|
+
</template>
|
|
621
|
+
</el-dialog>
|
|
622
|
+
|
|
623
|
+
<!-- 编辑字段 -->
|
|
624
|
+
<el-dialog
|
|
625
|
+
v-model="fieldVisible"
|
|
626
|
+
width="650px"
|
|
627
|
+
title="选择配置"
|
|
628
|
+
class="no-padding"
|
|
629
|
+
:close-on-click-modal="false"
|
|
630
|
+
destroy-on-close
|
|
631
|
+
draggable
|
|
632
|
+
>
|
|
633
|
+
<div class="page-container">
|
|
634
|
+
<el-form
|
|
635
|
+
ref="fieldForm"
|
|
636
|
+
label-width="130px"
|
|
637
|
+
:model="fieldData"
|
|
638
|
+
style="height: 100%;"
|
|
639
|
+
>
|
|
640
|
+
<el-row>
|
|
641
|
+
<el-col :span="22">
|
|
642
|
+
<el-form-item label="选择方式" prop="choose">
|
|
643
|
+
<ac-radio v-model="fieldData.choose" options="下拉框,弹窗" @change="changeChoose" />
|
|
644
|
+
</el-form-item>
|
|
645
|
+
</el-col>
|
|
646
|
+
</el-row>
|
|
647
|
+
<el-row v-if="fieldData.choose === '弹窗'">
|
|
648
|
+
<el-col :span="22">
|
|
649
|
+
<el-form-item label="弹窗页面" prop="pageId">
|
|
650
|
+
<ac-tree
|
|
651
|
+
v-model="fieldData.pageId"
|
|
652
|
+
data-url="/system/page/queryTree"
|
|
653
|
+
typeSelect="page"
|
|
654
|
+
@change="changePage"
|
|
655
|
+
/>
|
|
656
|
+
</el-form-item>
|
|
657
|
+
</el-col>
|
|
658
|
+
</el-row>
|
|
659
|
+
<el-row
|
|
660
|
+
v-if="fieldData.choose === '弹窗'
|
|
661
|
+
&& fieldData.pageId
|
|
662
|
+
&& fieldData.paramList
|
|
663
|
+
&& fieldData.paramList.length > 0"
|
|
664
|
+
>
|
|
665
|
+
<el-col :span="22">
|
|
666
|
+
<el-form-item
|
|
667
|
+
v-if="fieldData.paramList && fieldData.paramList.length > 0"
|
|
668
|
+
label="出参配置"
|
|
669
|
+
prop="pageId"
|
|
670
|
+
>
|
|
671
|
+
<div style="display: flex;flex-direction: column">
|
|
672
|
+
<div
|
|
673
|
+
class="param-item"
|
|
674
|
+
v-for="(param, index) in fieldData.paramList"
|
|
675
|
+
:key="index"
|
|
676
|
+
>
|
|
677
|
+
<div class="param-field">
|
|
678
|
+
<ac-select
|
|
679
|
+
v-if="!param.manually"
|
|
680
|
+
v-model="param.fieldId"
|
|
681
|
+
:options="fieldIdOptions"
|
|
682
|
+
allow-create
|
|
683
|
+
/>
|
|
684
|
+
<ac-input v-if="param.manually" v-model="param.filterValue" />
|
|
685
|
+
<ac-switch
|
|
686
|
+
style="margin-left: 5px"
|
|
687
|
+
v-model="param.manually"
|
|
688
|
+
:options="[{key: true, value: ''}, {key: false, value: ''}]"
|
|
689
|
+
/>
|
|
690
|
+
</div>
|
|
691
|
+
<div class="param-split"><ac-icon iconId="018eecae20bd010c2adf" /></div>
|
|
692
|
+
<div class="param-page">
|
|
693
|
+
<el-input v-model="param.pageParamName" disabled />
|
|
694
|
+
</div>
|
|
695
|
+
</div>
|
|
696
|
+
</div>
|
|
697
|
+
</el-form-item>
|
|
698
|
+
</el-col>
|
|
699
|
+
</el-row>
|
|
700
|
+
<el-row v-if="fieldData.choose === '弹窗'">
|
|
701
|
+
<el-col :span="22">
|
|
702
|
+
<el-form-item label="全屏弹窗" prop="fullscreen">
|
|
703
|
+
<ac-dict-switch v-model="fieldData.fullscreen" dictCode="dictYesNo" />
|
|
704
|
+
</el-form-item>
|
|
705
|
+
</el-col>
|
|
706
|
+
</el-row>
|
|
707
|
+
<el-row v-if="fieldData.choose === '弹窗'">
|
|
708
|
+
<el-col :span="22" v-if="fieldData.fullscreen !== '1'">
|
|
709
|
+
<el-form-item label="弹窗大小" prop="width">
|
|
710
|
+
<ac-number v-model="fieldData.width" :point="0" />
|
|
711
|
+
</el-form-item>
|
|
712
|
+
</el-col>
|
|
713
|
+
</el-row>
|
|
714
|
+
<div v-if="fieldData.choose === '下拉框'">
|
|
715
|
+
<el-row>
|
|
716
|
+
<el-col :span="22">
|
|
717
|
+
<el-form-item label="参数配置">
|
|
718
|
+
<el-button type="success" @click="addFieldFilter">添加过滤参数</el-button>
|
|
719
|
+
<div style="display: flex;flex-direction: column;margin-top: 5px;">
|
|
720
|
+
<div
|
|
721
|
+
class="param-item"
|
|
722
|
+
v-for="(param, index) in fieldData.filterList"
|
|
723
|
+
:key="index"
|
|
724
|
+
>
|
|
725
|
+
<div class="param-field">
|
|
726
|
+
<ac-select
|
|
727
|
+
v-if="!param.manually"
|
|
728
|
+
v-model="param.filterValueFieldId"
|
|
729
|
+
:options="fieldIdOptions"
|
|
730
|
+
/>
|
|
731
|
+
<ac-input v-if="param.manually" v-model="param.filterValue" />
|
|
732
|
+
<ac-switch
|
|
733
|
+
style="margin-left: 5px"
|
|
734
|
+
v-model="param.manually"
|
|
735
|
+
:options="[{key: true, value: ''}, {key: false, value: ''}]"
|
|
736
|
+
/>
|
|
737
|
+
</div>
|
|
738
|
+
<div class="param-split"><ac-icon iconId="018eecae20bd010c2adf" /></div>
|
|
739
|
+
<div class="param-page">
|
|
740
|
+
<ac-select
|
|
741
|
+
v-model="param.filterFieldId"
|
|
742
|
+
:options="filterFieldIdOptions"
|
|
743
|
+
/>
|
|
744
|
+
</div>
|
|
745
|
+
<div style="margin-left: 5px;cursor: pointer">
|
|
746
|
+
<ac-icon
|
|
747
|
+
size="14"
|
|
748
|
+
color="red"
|
|
749
|
+
iconId="018dc9c3efd3a0502886"
|
|
750
|
+
title="删除"
|
|
751
|
+
@click.stop="deleteFieldFilter(param)"
|
|
752
|
+
/>
|
|
753
|
+
</div>
|
|
754
|
+
</div>
|
|
755
|
+
</div>
|
|
756
|
+
</el-form-item>
|
|
757
|
+
</el-col>
|
|
758
|
+
</el-row>
|
|
759
|
+
</div>
|
|
760
|
+
</el-form>
|
|
761
|
+
</div>
|
|
762
|
+
<template #footer>
|
|
763
|
+
<el-button
|
|
764
|
+
size="default"
|
|
765
|
+
type="info"
|
|
766
|
+
@click="fieldVisible=false"
|
|
767
|
+
>取消</el-button>
|
|
768
|
+
<el-button
|
|
769
|
+
type="primary"
|
|
770
|
+
size="default"
|
|
771
|
+
@click="submitFieldForm"
|
|
772
|
+
>确定</el-button>
|
|
773
|
+
</template>
|
|
774
|
+
</el-dialog>
|
|
775
|
+
</template>
|
|
776
|
+
|
|
777
|
+
<script setup>
|
|
778
|
+
import { ref, onMounted, watch, nextTick } from 'vue';
|
|
779
|
+
import api from '@/http/api';
|
|
780
|
+
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
781
|
+
import tool from '@/utils/tool';
|
|
782
|
+
import Sortable from 'sortablejs';
|
|
783
|
+
import loading from '@/utils/loading';
|
|
784
|
+
|
|
785
|
+
const emit = defineEmits(['afterSubmit'])
|
|
786
|
+
const props = defineProps({
|
|
787
|
+
options: {
|
|
788
|
+
type: Object,
|
|
789
|
+
default: () => {
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
const tabName = ref('form');
|
|
795
|
+
const formData = ref({});
|
|
796
|
+
const dataForm = ref();
|
|
797
|
+
const scriptTips = ref('');
|
|
798
|
+
const codeRef = ref();
|
|
799
|
+
const rowFlag = ref(0);
|
|
800
|
+
|
|
801
|
+
const fieldList = ref([]);
|
|
802
|
+
const fieldIdOptions = ref([]);
|
|
803
|
+
const fieldNameOptions = ref([]);
|
|
804
|
+
|
|
805
|
+
const fieldAddVisible = ref(false);
|
|
806
|
+
const fieldAddTable = ref();
|
|
807
|
+
const currModel = ref();
|
|
808
|
+
|
|
809
|
+
const fieldVisible = ref(false);
|
|
810
|
+
const fieldForm = ref();
|
|
811
|
+
const fieldData = ref({});
|
|
812
|
+
|
|
813
|
+
const modelRefs = ref([]);
|
|
814
|
+
const sortingId = ref();
|
|
815
|
+
const sortableInst = ref();
|
|
816
|
+
|
|
817
|
+
const rules = ref({
|
|
818
|
+
name: [
|
|
819
|
+
{ required: true, message: '表单名称不能为空!' },
|
|
820
|
+
{ max: 100, message: '长度必须小于等于 100 个字符!', trigger: ['change', 'blur'] }
|
|
821
|
+
],
|
|
822
|
+
});
|
|
823
|
+
|
|
824
|
+
const init = (options) => {
|
|
825
|
+
formData.value = {
|
|
826
|
+
id: options.id || '',
|
|
827
|
+
layoutType: '自动',
|
|
828
|
+
showModel: '普通',
|
|
829
|
+
batchEdit: '0',
|
|
830
|
+
showOperateButton: '1',
|
|
831
|
+
modelId: options.modelId || '',
|
|
832
|
+
modelList: [{
|
|
833
|
+
name: '',
|
|
834
|
+
labelAlign: '居右',
|
|
835
|
+
labelWidth: 120,
|
|
836
|
+
fieldList: [],
|
|
837
|
+
rowFlag: ++rowFlag.value
|
|
838
|
+
}]
|
|
839
|
+
};
|
|
840
|
+
loadDataForm(options.id);
|
|
841
|
+
loadDataField(options.modelId || '-1');
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
const loadDataForm = (id) => {
|
|
845
|
+
if (id) {
|
|
846
|
+
loading.showLoading();
|
|
847
|
+
api.post('/system/dataForm/queryBy', { id: id }).then(res => {
|
|
848
|
+
const data = res.data || {};
|
|
849
|
+
(data.autofillList || []).forEach(autofill => changeDataModel(autofill));
|
|
850
|
+
formData.value = data;
|
|
851
|
+
loading.hideLoading();
|
|
852
|
+
}).catch(() => loading.hideLoading());
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
const getFieldRowKey = row => {
|
|
857
|
+
return row.id || row.rowFlag;
|
|
858
|
+
};
|
|
859
|
+
|
|
860
|
+
const setRefs = (el, model) => {
|
|
861
|
+
if (el) {
|
|
862
|
+
modelRefs.value['modelTable_' + (model.id || model.rowFlag)] = el;
|
|
863
|
+
}
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
const sortDataField = (model) => {
|
|
867
|
+
if (sortableInst.value) {
|
|
868
|
+
sortableInst.value.destroy();
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
const ref = modelRefs.value['modelTable_' + (model.id || model.rowFlag)];
|
|
872
|
+
if (ref) {
|
|
873
|
+
const el = ref.$el.querySelector('.el-table__body-wrapper tbody');
|
|
874
|
+
sortableInst.value = Sortable.create(el, {
|
|
875
|
+
handle: '.el-table__row',
|
|
876
|
+
onEnd: ({ newIndex, oldIndex }) => {
|
|
877
|
+
const list = tool.deepClone(model.fieldList);
|
|
878
|
+
const currRow = list.splice(oldIndex, 1)[0];
|
|
879
|
+
list.splice(newIndex, 0, currRow);
|
|
880
|
+
nextTick(() => {
|
|
881
|
+
model.fieldList = list;
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
sortingId.value = model.id || model.rowFlag;
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
const unSortDataField = () => {
|
|
890
|
+
if (sortableInst.value) {
|
|
891
|
+
sortableInst.value.destroy();
|
|
892
|
+
}
|
|
893
|
+
sortableInst.value = null;
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
const addModel = () => {
|
|
897
|
+
if (!formData.value.modelList) {
|
|
898
|
+
formData.value.modelList = [];
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
formData.value.modelList.push({
|
|
902
|
+
name: '',
|
|
903
|
+
labelWidth: 120,
|
|
904
|
+
labelAlign: '居右',
|
|
905
|
+
fieldList: [],
|
|
906
|
+
rowFlag: ++rowFlag.value
|
|
907
|
+
});
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
const deleteModel = (data) => {
|
|
911
|
+
ElMessageBox.confirm('请确认是否删除' + (data.name ? ('【' + data.name + '】') : '') + '?', '提示', { type: 'warning' }).then(() => {
|
|
912
|
+
const index = formData.value.modelList
|
|
913
|
+
.findIndex(item => data.id ? item.id === data.id : item.rowFlag === data.rowFlag);
|
|
914
|
+
formData.value.modelList.splice(index, 1);
|
|
915
|
+
}).catch(() => {});
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
const changeTab = (tabName) => {
|
|
919
|
+
if (tabName.paneName === 'script') {
|
|
920
|
+
codeRef.value && codeRef.value.refresh();
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
const rowClick = (row) => {
|
|
925
|
+
fieldAddTable.value.toggleRowSelection(row);
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
const addModelField = (model) => {
|
|
929
|
+
currModel.value = model;
|
|
930
|
+
fieldAddVisible.value = true;
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
const submitFieldAddForm = () => {
|
|
934
|
+
if (!currModel.value) {
|
|
935
|
+
return;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
fieldAddTable.value.getSelectionRows().forEach(row => {
|
|
939
|
+
if (currModel.value.fieldList.findIndex(item => item.fieldId === row.id) < 0) {
|
|
940
|
+
const data = tool.deepClone(row);
|
|
941
|
+
data.id = null;
|
|
942
|
+
data.rowFlag = ++rowFlag.value;
|
|
943
|
+
data.fieldId = row.id;
|
|
944
|
+
data.fieldName = row.fieldName;
|
|
945
|
+
data.aliasName = row.showName;
|
|
946
|
+
data.defaultValue = row.defaultValue;
|
|
947
|
+
data.labelColor = '';
|
|
948
|
+
data.colCnt = formData.value.batchEdit === '1' ? 120 : 11;
|
|
949
|
+
data.hide = '0';
|
|
950
|
+
data.required = row.required;
|
|
951
|
+
currModel.value.fieldList.push(data);
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
fieldAddVisible.value = false;
|
|
955
|
+
currModel.value = null;
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
const canFilter = (fieldName) => {
|
|
959
|
+
const field = fieldList.value.find(item => item.fieldName === fieldName);
|
|
960
|
+
return !!(field &&
|
|
961
|
+
field.fieldType === '联动' &&
|
|
962
|
+
(field.relevanceType === '数据模型' || field.relevanceType.includes('字典')));
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
const currField = ref({});
|
|
966
|
+
const rowFieldFlag = ref(1);
|
|
967
|
+
const filterFieldIdOptions = ref([]);
|
|
968
|
+
const editFieldDialog = (data) => {
|
|
969
|
+
currField.value = data;
|
|
970
|
+
fieldData.value = data.dialogJson ? JSON.parse(data.dialogJson) : { choose: '弹窗', fullscreen: '1' };
|
|
971
|
+
fieldData.value.pageId = fieldData.value.pageId || data.dialogPageId || '';
|
|
972
|
+
fieldVisible.value = true;
|
|
973
|
+
filterFieldIdOptions.value = [];
|
|
974
|
+
|
|
975
|
+
(fieldData.value.filterList || []).forEach(item => {
|
|
976
|
+
item.rowFlag = rowFlag.value++;
|
|
977
|
+
});
|
|
978
|
+
changeChoose();
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
const changeChoose = () => {
|
|
982
|
+
if (fieldData.value.choose === '弹窗') {
|
|
983
|
+
changePage();
|
|
984
|
+
} else {
|
|
985
|
+
loadFieldDataField();
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
const changePage = () => {
|
|
990
|
+
if (!fieldData.value.pageId) {
|
|
991
|
+
fieldData.value.paramList = [];
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
api.post('/system/pageParam/queryList', { pageId: fieldData.value.pageId }).then(res => {
|
|
996
|
+
const pageParamList = res.data || [];
|
|
997
|
+
const paramList = fieldData.value.paramList || [];
|
|
998
|
+
pageParamList.forEach(pageParam => {
|
|
999
|
+
const fieldParam = paramList.find(item => item.pageParamId === pageParam.id);
|
|
1000
|
+
if (fieldParam) {
|
|
1001
|
+
fieldParam.pageParamName = pageParam.name;
|
|
1002
|
+
} else {
|
|
1003
|
+
paramList.push({ pageParamId: pageParam.id, pageParamName: pageParam.name });
|
|
1004
|
+
}
|
|
1005
|
+
});
|
|
1006
|
+
|
|
1007
|
+
fieldData.value.paramList = paramList.filter(param => pageParamList.find(item => item.id === param.pageParamId));
|
|
1008
|
+
});
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
const loadFieldDataField = () => {
|
|
1012
|
+
const field = fieldList.value.find(item => item.id === currField.value.fieldId);
|
|
1013
|
+
|
|
1014
|
+
if (field && field.relevanceType.includes('字典')) {
|
|
1015
|
+
filterFieldIdOptions.value.push({ key: 'pid', value: '父键' });
|
|
1016
|
+
} else if (field && field.relevanceList && field.relevanceList.length > 0) {
|
|
1017
|
+
const modelId = field.relevanceList[field.relevanceList.length - 1].dataModelId;
|
|
1018
|
+
api.post('/system/dataField/queryList', { modelId: modelId }).then(res => {
|
|
1019
|
+
(res.data || []).forEach(fieldItem => {
|
|
1020
|
+
filterFieldIdOptions.value.push({ key: fieldItem.id, value: fieldItem.showName });
|
|
1021
|
+
});
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
const addFieldFilter = () => {
|
|
1027
|
+
if (!fieldData.value.filterList) {
|
|
1028
|
+
fieldData.value.filterList = [];
|
|
1029
|
+
}
|
|
1030
|
+
fieldData.value.filterList.push({ rowFlag: rowFieldFlag.value++, manually: false });
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
const deleteFieldFilter = (param) => {
|
|
1034
|
+
if (!fieldData.value.filterList) return;
|
|
1035
|
+
const index = fieldData.value.filterList.findIndex(item => item.rowFlag === param.rowFlag);
|
|
1036
|
+
fieldData.value.filterList.splice(index, 1);
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
const submitFieldForm = () => {
|
|
1040
|
+
const result = { choose: fieldData.value.choose };
|
|
1041
|
+
if (result.choose === '弹窗') {
|
|
1042
|
+
currField.value.dialogPageId = fieldData.value.pageId;
|
|
1043
|
+
|
|
1044
|
+
result.pageId = fieldData.value.pageId;
|
|
1045
|
+
result.fullscreen = fieldData.value.fullscreen;
|
|
1046
|
+
result.width = fieldData.value.width;
|
|
1047
|
+
result.paramList = fieldData.value.paramList.map(param => {
|
|
1048
|
+
if (param.manually) {
|
|
1049
|
+
return {
|
|
1050
|
+
manually: param.manually,
|
|
1051
|
+
fieldId: param.fieldId,
|
|
1052
|
+
filterValue: param.filterValue,
|
|
1053
|
+
pageParamId: param.pageParamId,
|
|
1054
|
+
pageParamName: param.pageParamName
|
|
1055
|
+
}
|
|
1056
|
+
} else {
|
|
1057
|
+
const field = fieldList.value.find(item => item.id === param.fieldId);
|
|
1058
|
+
return {
|
|
1059
|
+
manually: param.manually,
|
|
1060
|
+
fieldId: param.fieldId,
|
|
1061
|
+
fieldName: field ? field.fieldName : '',
|
|
1062
|
+
pageParamId: param.pageParamId,
|
|
1063
|
+
pageParamName: param.pageParamName
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
} else {
|
|
1068
|
+
currField.value.dialogPageId = null;
|
|
1069
|
+
result.filterList = fieldData.value.filterList;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
currField.value.dialogJson = JSON.stringify(result);
|
|
1073
|
+
fieldVisible.value = false;
|
|
1074
|
+
};
|
|
1075
|
+
|
|
1076
|
+
const deleteModelField = (model, data) => {
|
|
1077
|
+
ElMessageBox.confirm('请确认是否删除【' + data.aliasName + '】?', '提示', { type: 'warning' }).then(() => {
|
|
1078
|
+
const index = model.fieldList
|
|
1079
|
+
.findIndex(item => item.id ? item.id === data.id : item.rowFlag === data.rowFlag);
|
|
1080
|
+
model.fieldList.splice(index, 1);
|
|
1081
|
+
}).catch(() => {});
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
const addAutofill = () => {
|
|
1085
|
+
if (!formData.value.autofillList) {
|
|
1086
|
+
formData.value.autofillList = [];
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
formData.value.autofillList.push({
|
|
1090
|
+
name: '',
|
|
1091
|
+
rowFlag: ++rowFlag.value,
|
|
1092
|
+
fieldList: [{ rowFlag: ++rowFlag.value }]
|
|
1093
|
+
});
|
|
1094
|
+
};
|
|
1095
|
+
|
|
1096
|
+
const deleteAutofill = (data) => {
|
|
1097
|
+
ElMessageBox.confirm('请确认是否删除?', '提示', { type: 'warning' }).then(() => {
|
|
1098
|
+
const index = formData.value.autofillList
|
|
1099
|
+
.findIndex(item => data.id ? item.id === data.id : item.rowFlag === data.rowFlag);
|
|
1100
|
+
formData.value.autofillList.splice(index, 1);
|
|
1101
|
+
}).catch(() => {});
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
const changeDataModel = (autofill) => {
|
|
1105
|
+
autofill.dataModelFieldOptions = [];
|
|
1106
|
+
|
|
1107
|
+
if (autofill.dataModelId) {
|
|
1108
|
+
api.post('/system/dataField/queryList', { modelId: autofill.dataModelId }).then(res => {
|
|
1109
|
+
const options = [];
|
|
1110
|
+
(res.data || []).forEach(field => options.push({ key: field.fieldName, value: field.showName }));
|
|
1111
|
+
autofill.dataModelFieldOptions = options;
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
const addAutofillField = (autofill) => {
|
|
1117
|
+
if (!autofill.fieldList) {
|
|
1118
|
+
autofill.fieldList = [];
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
autofill.fieldList.push({
|
|
1122
|
+
rowFlag: ++rowFlag.value
|
|
1123
|
+
});
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
const deleteAutofillField = (autofill, data) => {
|
|
1127
|
+
ElMessageBox.confirm('请确认是否删除?', '提示', { type: 'warning' }).then(() => {
|
|
1128
|
+
const index = autofill.fieldList
|
|
1129
|
+
.findIndex(item => item.id ? item.id === data.id : item.rowFlag === data.rowFlag);
|
|
1130
|
+
autofill.fieldList.splice(index, 1);
|
|
1131
|
+
}).catch(() => {});
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
const addDisplay = () => {
|
|
1135
|
+
if (!formData.value.displayList) {
|
|
1136
|
+
formData.value.displayList = [];
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
formData.value.displayList.push({
|
|
1140
|
+
name: '',
|
|
1141
|
+
rowFlag: ++rowFlag.value,
|
|
1142
|
+
ruleList: [{ rowFlag: ++rowFlag.value }]
|
|
1143
|
+
});
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
const deleteDisplay = (data) => {
|
|
1147
|
+
ElMessageBox.confirm('请确认是否删除?', '提示', { type: 'warning' }).then(() => {
|
|
1148
|
+
const index = formData.value.displayList
|
|
1149
|
+
.findIndex(item => data.id ? item.id === data.id : item.rowFlag === data.rowFlag);
|
|
1150
|
+
formData.value.displayList.splice(index, 1);
|
|
1151
|
+
}).catch(() => {});
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
const addDisplayRule = (display) => {
|
|
1155
|
+
if (!display.fieldList) {
|
|
1156
|
+
display.fieldList = [];
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
display.ruleList.push({
|
|
1160
|
+
rowFlag: ++rowFlag.value
|
|
1161
|
+
});
|
|
1162
|
+
};
|
|
1163
|
+
|
|
1164
|
+
const deleteDisplayRule = (display, data) => {
|
|
1165
|
+
ElMessageBox.confirm('请确认是否删除?', '提示', { type: 'warning' }).then(() => {
|
|
1166
|
+
const index = display.ruleList
|
|
1167
|
+
.findIndex(item => item.id ? item.id === data.id : item.rowFlag === data.rowFlag);
|
|
1168
|
+
display.ruleList.splice(index, 1);
|
|
1169
|
+
}).catch(() => {});
|
|
1170
|
+
};
|
|
1171
|
+
|
|
1172
|
+
const component = ref({
|
|
1173
|
+
单行文本框: 'ac-input',
|
|
1174
|
+
密码文本框: 'ac-password',
|
|
1175
|
+
多行文本框: 'ac-input',
|
|
1176
|
+
富文本框: 'ac-input',
|
|
1177
|
+
单选框: 'ac-select',
|
|
1178
|
+
下拉框: 'ac-select',
|
|
1179
|
+
多选框: 'ac-select',
|
|
1180
|
+
多选下拉框: 'ac-select',
|
|
1181
|
+
开关: 'ac-switch',
|
|
1182
|
+
字符: 'ac-input',
|
|
1183
|
+
整数: 'ac-input',
|
|
1184
|
+
小数: 'ac-number',
|
|
1185
|
+
日期: 'ac-date',
|
|
1186
|
+
时间: 'ac-datetime',
|
|
1187
|
+
图片: 'ac-image',
|
|
1188
|
+
视频: 'ac-video',
|
|
1189
|
+
附件: 'ac-affix',
|
|
1190
|
+
下拉选择: 'ac-remote-select',
|
|
1191
|
+
树形控件: 'ac-dm-tree',
|
|
1192
|
+
区划树: 'ac-region-tree',
|
|
1193
|
+
单位树: 'ac-unit-tree',
|
|
1194
|
+
企业树: 'ac-entp-tree',
|
|
1195
|
+
部门树: 'ac-organization-tree',
|
|
1196
|
+
人员树: 'ac-employee-tree',
|
|
1197
|
+
字典树: 'ac-dict-tree',
|
|
1198
|
+
字典开关: 'ac-dict-switch',
|
|
1199
|
+
字典单选框: 'ac-dict-select',
|
|
1200
|
+
字典下拉框: 'ac-dict-select',
|
|
1201
|
+
});
|
|
1202
|
+
const getComponent = (fieldName) => {
|
|
1203
|
+
const field = fieldList.value.find(item => item.fieldName === fieldName);
|
|
1204
|
+
if (!field) return 'ac-input';
|
|
1205
|
+
|
|
1206
|
+
if (field.fieldType === '字符') {
|
|
1207
|
+
if (field.enumerate === '1' && field.enumerateType) {
|
|
1208
|
+
return component.value[field.enumerateType];
|
|
1209
|
+
} else if (field.inputType) {
|
|
1210
|
+
return component.value[field.inputType];
|
|
1211
|
+
} else {
|
|
1212
|
+
return 'ac-input';
|
|
1213
|
+
}
|
|
1214
|
+
} else if ('整数、小数、日期、时间、图片、视频、附件'.indexOf(field.fieldType) >= 0) {
|
|
1215
|
+
return component.value[field.fieldType];
|
|
1216
|
+
} else if (field.fieldType === '联动') {
|
|
1217
|
+
if (field.relevanceType === '数据模型') {
|
|
1218
|
+
return component.value['树形控件'];
|
|
1219
|
+
} else {
|
|
1220
|
+
return component.value[field.relevanceType];
|
|
1221
|
+
}
|
|
1222
|
+
} else if (field.fieldType === '大文本') {
|
|
1223
|
+
return component.value[field.inputType];
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
return 'ac-input';
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
const getOptions = (fieldName) => {
|
|
1230
|
+
const field = fieldList.value.find(item => item.fieldName === fieldName);
|
|
1231
|
+
if (!field) return {};
|
|
1232
|
+
|
|
1233
|
+
if (field.fieldType === '字符') {
|
|
1234
|
+
if (field.autoCreate === '1') {
|
|
1235
|
+
return {};
|
|
1236
|
+
} else if (field.enumerate === '1') {
|
|
1237
|
+
return { options: field.enumerateValue || '' };
|
|
1238
|
+
} else {
|
|
1239
|
+
return { max: field.fieldSize || 100 };
|
|
1240
|
+
}
|
|
1241
|
+
} else if ('整数、小数'.indexOf(field.fieldType) >= 0) {
|
|
1242
|
+
return {
|
|
1243
|
+
point: field.fieldType === '整数' ? 0 : field.fieldPrecision || 0,
|
|
1244
|
+
max: field.maxValue,
|
|
1245
|
+
min: field.minValue
|
|
1246
|
+
};
|
|
1247
|
+
} else if ('日期'.indexOf(field.fieldType) >= 0) {
|
|
1248
|
+
return { format: field.format || undefined, valueFormat: field.format || undefined };
|
|
1249
|
+
} else if (field.fieldType === '图片') {
|
|
1250
|
+
return { limit: 1, maxSize: field.imageMaxSize };
|
|
1251
|
+
} else if (field.fieldType === '视频') {
|
|
1252
|
+
return { limit: 1, maxSize: field.imageMaxSize };
|
|
1253
|
+
} else if (field.fieldType === '联动') {
|
|
1254
|
+
if (field.relevanceType === '数据模型') {
|
|
1255
|
+
const relevanceList = field.relevanceList || [];
|
|
1256
|
+
return {
|
|
1257
|
+
dataFieldId: field.id,
|
|
1258
|
+
leafSelect: relevanceList.length > 1,
|
|
1259
|
+
typeSelect: relevanceList[relevanceList.length - 1].id
|
|
1260
|
+
};
|
|
1261
|
+
} else {
|
|
1262
|
+
return { dictCode: field.relevanceDict || '' };
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
return {};
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
|
+
const submitData = () => {
|
|
1270
|
+
dataForm.value && dataForm.value.validate((valid) => {
|
|
1271
|
+
if (valid) {
|
|
1272
|
+
ElMessageBox.confirm('请确认是否提交?', '提示', { type: 'info' }).then(() => {
|
|
1273
|
+
loading.showLoading();
|
|
1274
|
+
api.post('/system/dataForm/save', formData.value).then(res => {
|
|
1275
|
+
ElMessage.success(res.message);
|
|
1276
|
+
emit('afterSubmit');
|
|
1277
|
+
loading.hideLoading();
|
|
1278
|
+
}).catch(() => loading.hideLoading());
|
|
1279
|
+
}).catch(() => {});
|
|
1280
|
+
} else {
|
|
1281
|
+
ElMessage.error('数据录入不正确,请重新检查!');
|
|
1282
|
+
}
|
|
1283
|
+
});
|
|
1284
|
+
};
|
|
1285
|
+
|
|
1286
|
+
const loadDataField = (modelId) => {
|
|
1287
|
+
fieldList.value = [];
|
|
1288
|
+
fieldIdOptions.value = [];
|
|
1289
|
+
fieldNameOptions.value = [];
|
|
1290
|
+
|
|
1291
|
+
api.post('/system/dataField/queryList', { modelId: modelId }).then(res => {
|
|
1292
|
+
fieldList.value = res.data || [];
|
|
1293
|
+
fieldList.value.forEach(field => {
|
|
1294
|
+
fieldIdOptions.value.push({ key: field.id, value: field.showName });
|
|
1295
|
+
fieldNameOptions.value.push({ key: field.fieldName, value: field.showName });
|
|
1296
|
+
});
|
|
1297
|
+
refreshFieldName();
|
|
1298
|
+
});
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
const refreshFieldName = () => {
|
|
1302
|
+
formData.value.modelList.forEach(model => {
|
|
1303
|
+
model.fieldList.forEach(field => {
|
|
1304
|
+
const find = fieldList.value.find(item => item.id === field.fieldId);
|
|
1305
|
+
if (find) {
|
|
1306
|
+
field.fieldName = find.fieldName;
|
|
1307
|
+
} else {
|
|
1308
|
+
field.fieldName = '';
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
});
|
|
1312
|
+
};
|
|
1313
|
+
|
|
1314
|
+
watch(() => props.options, (options) => {
|
|
1315
|
+
init(options || {});
|
|
1316
|
+
});
|
|
1317
|
+
|
|
1318
|
+
onMounted(() => {
|
|
1319
|
+
init(props.options || {});
|
|
1320
|
+
});
|
|
1321
|
+
|
|
1322
|
+
scriptTips.value = "\
|
|
1323
|
+
此页面脚本为页面执行的javascript脚本。可声名的函数:\n\
|
|
1324
|
+
\n\
|
|
1325
|
+
context.getUser():获取用户数据\n\
|
|
1326
|
+
context.getOrg():获取组织机构数据\n\
|
|
1327
|
+
context.getPageData():获取整个页面数据\n\
|
|
1328
|
+
context.runScript(id, params):id:脚本id,params:参数\n\
|
|
1329
|
+
\n\
|
|
1330
|
+
/*\n\
|
|
1331
|
+
* 表单初始化时执行此函数(必须是以function开头声名的函数,异步函数时在function前加上: async)\n\
|
|
1332
|
+
* @param args为页面参数\n\
|
|
1333
|
+
*/\n\
|
|
1334
|
+
function initData(formData, context)\n\
|
|
1335
|
+
\n\
|
|
1336
|
+
/*\n\
|
|
1337
|
+
* 字段名称对应值变更后执行此函数(必须是以function开头声名的函数)\n\
|
|
1338
|
+
* @param data为表单数据显示后的值\n\
|
|
1339
|
+
* @return object 以Object方式返回修改后的值\n\
|
|
1340
|
+
*/\n\
|
|
1341
|
+
function change_字段名称(data, context)\n\
|
|
1342
|
+
\n\
|
|
1343
|
+
/*\n\
|
|
1344
|
+
* 表单数据变更后执行此函数(必须是以function开头声名的函数)\n\
|
|
1345
|
+
* @param data为表单数据显示后的值\n\
|
|
1346
|
+
* @return object 以Object方式返回修改后的值\n\
|
|
1347
|
+
*/\n\
|
|
1348
|
+
function change(data, context)\n\
|
|
1349
|
+
\n\
|
|
1350
|
+
/*\n\
|
|
1351
|
+
* 字段名称对应值变更时执行此校验函数(必须是以function开头声名的函数)\n\
|
|
1352
|
+
* @param data为表单数据显示后的值\n\
|
|
1353
|
+
*/\n\
|
|
1354
|
+
function validate_字段名称(data, callback, context)\n\
|
|
1355
|
+
\n\
|
|
1356
|
+
/*\n\
|
|
1357
|
+
* 表单提交前执行此校验函数(必须是以function开头声名的函数)\n\
|
|
1358
|
+
* @param data为表单数据显示后的值\n\
|
|
1359
|
+
* @return boolean 通过校验返回true,否则返回Error\n\
|
|
1360
|
+
*/\n\
|
|
1361
|
+
function validate(data, context)\n\
|
|
1362
|
+
\n\
|
|
1363
|
+
示例:\n\
|
|
1364
|
+
function change(data, context) {\n\
|
|
1365
|
+
const result = {};\n\
|
|
1366
|
+
if (data['age'] < 1) {\n\
|
|
1367
|
+
result['stage'] = '婴儿';\n\
|
|
1368
|
+
} else if (data['age'] < 3) {\n\
|
|
1369
|
+
result['stage'] = '幼儿';\n\
|
|
1370
|
+
} else if (data['age'] < 59) {\n\
|
|
1371
|
+
result['stage'] = '中年';\n\
|
|
1372
|
+
} else if (data['age'] >= 60) {\n\
|
|
1373
|
+
result['stage'] = '老年';\n\
|
|
1374
|
+
} else if (data['age'] >= 200) {\n\
|
|
1375
|
+
return new Error('年龄错误!');\n\
|
|
1376
|
+
}\n\
|
|
1377
|
+
return result;\n\
|
|
1378
|
+
}\n\
|
|
1379
|
+
\n\
|
|
1380
|
+
function validate_age(data, callback, context) {\n\
|
|
1381
|
+
if (data['age'] >= 200) {\n\
|
|
1382
|
+
callback(new Error('年龄不能越过200'));\n\
|
|
1383
|
+
} else {\n\
|
|
1384
|
+
callback();\n\
|
|
1385
|
+
}\n\
|
|
1386
|
+
}\n\
|
|
1387
|
+
\n\
|
|
1388
|
+
function validate(data, context) {\n\
|
|
1389
|
+
if (data['age'] >= 200) {\n\
|
|
1390
|
+
return new Error('年龄不能越过200');\n\
|
|
1391
|
+
} else {\n\
|
|
1392
|
+
return true;\n\
|
|
1393
|
+
}\n\
|
|
1394
|
+
}";
|
|
1395
|
+
|
|
1396
|
+
defineExpose({ submitData });
|
|
1397
|
+
</script>
|
|
1398
|
+
|
|
1399
|
+
<style scoped lang="scss">
|
|
1400
|
+
.script-tips-box {
|
|
1401
|
+
width: 800px;
|
|
1402
|
+
height: 500px!important;
|
|
1403
|
+
border: none!important;
|
|
1404
|
+
:deep(.el-textarea__inner) {
|
|
1405
|
+
height: 100%!important;
|
|
1406
|
+
background: transparent!important;
|
|
1407
|
+
border: none!important;
|
|
1408
|
+
box-shadow: 0 0 0 0!important;
|
|
1409
|
+
font-size: 16px;
|
|
1410
|
+
color: #d2cfcf !important;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
.script-box {
|
|
1414
|
+
height: 1px;
|
|
1415
|
+
flex-grow: 1;
|
|
1416
|
+
display: flex;
|
|
1417
|
+
flex-direction: row;
|
|
1418
|
+
.script-left-box {
|
|
1419
|
+
width: 1px;
|
|
1420
|
+
flex-grow: 1;
|
|
1421
|
+
}
|
|
1422
|
+
.script-right-box {
|
|
1423
|
+
width: 350px;
|
|
1424
|
+
display: flex;
|
|
1425
|
+
flex-direction: column;
|
|
1426
|
+
.field-box {
|
|
1427
|
+
padding: 5px 10px;
|
|
1428
|
+
background: rgb(40, 42, 54);
|
|
1429
|
+
height: 1px;
|
|
1430
|
+
flex-grow: 1;
|
|
1431
|
+
overflow: auto;
|
|
1432
|
+
.field-item {
|
|
1433
|
+
color: #f1fa8c;
|
|
1434
|
+
font-size: 14px;
|
|
1435
|
+
line-height: 22px;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
.param-item {
|
|
1441
|
+
display: flex;
|
|
1442
|
+
flex-direction: row;
|
|
1443
|
+
.param-field {
|
|
1444
|
+
width: 220px;
|
|
1445
|
+
display: flex;
|
|
1446
|
+
flex-direction: row;
|
|
1447
|
+
flex-shrink: 0;
|
|
1448
|
+
}
|
|
1449
|
+
.param-split {
|
|
1450
|
+
width: 44px;
|
|
1451
|
+
display: flex;
|
|
1452
|
+
justify-content: center;
|
|
1453
|
+
align-items: center;
|
|
1454
|
+
font-size: 20px;
|
|
1455
|
+
}
|
|
1456
|
+
.param-page {
|
|
1457
|
+
flex-grow: 1;
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
.param-item+.param-item {
|
|
1461
|
+
margin-top: 5px;
|
|
1462
|
+
}
|
|
1463
|
+
</style>
|