@farris/jit-engine 1.4.10 → 1.4.12
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 +4 -0
- package/lib/mobileapp/vue/code-generator/devkit-manager/app-indexvue-manager.js +2 -1
- package/lib/mobileapp/vue/code-generator/devkit-manager/app-indexvue-manager.js.map +1 -1
- package/lib/mobileapp/vue/code-generator/file-generator/app-generator/vue-app-index-vue-generator.js +6 -5
- package/lib/mobileapp/vue/code-generator/file-generator/app-generator/vue-app-index-vue-generator.js.map +1 -1
- package/lib/mobileapp/vue/domstructure/internal-entity/vue-app-index-vue-parameter.js.map +1 -1
- package/lib/mobileapp/vue/domstructure/ui/action-bar/action-bar.js +57 -0
- package/lib/mobileapp/vue/domstructure/ui/action-bar/action-bar.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/action-bar/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/action-bar/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/approval/approval-info.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/approval/approval-info.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/approval/approval-logs.js +46 -0
- package/lib/mobileapp/vue/domstructure/ui/approval/approval-logs.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/approval/index.js +15 -0
- package/lib/mobileapp/vue/domstructure/ui/approval/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/attachment-entry.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/attachment-entry.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/attachment-file.js +29 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/attachment-file.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/attachment-uploader.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/attachment-uploader.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/attachment.js +29 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/attachment.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/image-uploader.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/image-uploader.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/index.js +18 -0
- package/lib/mobileapp/vue/domstructure/ui/attachment/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/banner/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/banner/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/banner/vue-banner.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/banner/vue-banner.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/basic/label/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/basic/label/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/basic/label/label.js +35 -0
- package/lib/mobileapp/vue/domstructure/ui/basic/label/label.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/basic/tag/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/basic/tag/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/basic/tag/tag.js +42 -0
- package/lib/mobileapp/vue/domstructure/ui/basic/tag/tag.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/button/button.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/button/button.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/button/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/button/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/calendar/calendar-input.js +28 -0
- package/lib/mobileapp/vue/domstructure/ui/calendar/calendar-input.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/calendar/calendar.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/calendar/calendar.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/calendar/index.js +16 -0
- package/lib/mobileapp/vue/domstructure/ui/calendar/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/calendar/schedule.js +32 -0
- package/lib/mobileapp/vue/domstructure/ui/calendar/schedule.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/card/card.js +45 -0
- package/lib/mobileapp/vue/domstructure/ui/card/card.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/card/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/card/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/checkbox/checkbox-group.js +32 -0
- package/lib/mobileapp/vue/domstructure/ui/checkbox/checkbox-group.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/checkbox/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/checkbox/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/common/vue-background.js +38 -0
- package/lib/mobileapp/vue/domstructure/ui/common/vue-background.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/common/vue-border-radius.js +29 -0
- package/lib/mobileapp/vue/domstructure/ui/common/vue-border-radius.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/common/vue-visible.js +57 -0
- package/lib/mobileapp/vue/domstructure/ui/common/vue-visible.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/container/vue-layout-container-col.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/container/vue-layout-container-col.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/container/vue-layout-container-row.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/container/vue-layout-container-row.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/container/vue-layout-container.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/container/vue-layout-container.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/container/vue-template-container.js +28 -0
- package/lib/mobileapp/vue/domstructure/ui/container/vue-template-container.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/form/display/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/form/display/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/form/display/vue-display-fiels.js +33 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/form/display/vue-display-fiels.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/form/index.js +15 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/form/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/form/vue-form-field.js +56 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/form/vue-form-field.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/data/fields/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/data/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/data/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/data/vue-data.js +38 -0
- package/lib/mobileapp/vue/domstructure/ui/data/vue-data.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/date-time-picker/date-picker.js +28 -0
- package/lib/mobileapp/vue/domstructure/ui/date-time-picker/date-picker.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/date-time-picker/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/date-time-picker/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/display/avatar/avatar.js +57 -0
- package/lib/mobileapp/vue/domstructure/ui/display/avatar/avatar.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/display/avatar/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/display/avatar/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/display/show-image/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/display/show-image/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/display/show-image/show-image.js +46 -0
- package/lib/mobileapp/vue/domstructure/ui/display/show-image/show-image.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/display/text/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/display/text/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/display/text/vue-text.js +47 -0
- package/lib/mobileapp/vue/domstructure/ui/display/text/vue-text.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/field-set/field-set.js +42 -0
- package/lib/mobileapp/vue/domstructure/ui/field-set/field-set.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/field-set/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/field-set/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/filter/filter.js +41 -0
- package/lib/mobileapp/vue/domstructure/ui/filter/filter.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/filter/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/filter/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/footer/footer.js +42 -0
- package/lib/mobileapp/vue/domstructure/ui/footer/footer.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/footer/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/footer/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/html-preview/html-preview.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/html-preview/html-preview.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/html-preview/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/html-preview/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/html-template/html-template.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/html-template/html-template.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/html-template/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/html-template/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/image/image.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/image/image.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/image/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/image/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/list-view/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/list-view/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/list-view/vue-list-view.js +39 -0
- package/lib/mobileapp/vue/domstructure/ui/list-view/vue-list-view.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/lookup/index.js +16 -0
- package/lib/mobileapp/vue/domstructure/ui/lookup/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/lookup/lookup-department.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/lookup/lookup-department.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/lookup/lookup-employee.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/lookup/lookup-employee.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/lookup/lookup-input.js +33 -0
- package/lib/mobileapp/vue/domstructure/ui/lookup/lookup-input.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/nav-bar/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/nav-bar/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/nav-bar/vue-nav-bar.js +45 -0
- package/lib/mobileapp/vue/domstructure/ui/nav-bar/vue-nav-bar.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/number/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/number/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/number/number.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/number/number.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/picker/area-picker.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/picker/area-picker.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/picker/index.js +15 -0
- package/lib/mobileapp/vue/domstructure/ui/picker/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/picker/picker.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/picker/picker.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/radio/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/radio/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/radio/radio-group.js +32 -0
- package/lib/mobileapp/vue/domstructure/ui/radio/radio-group.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/rich-text-editor/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/rich-text-editor/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/rich-text-editor/rich-text-editor.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/rich-text-editor/rich-text-editor.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/section/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/section/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/section/vue-section.js +46 -0
- package/lib/mobileapp/vue/domstructure/ui/section/vue-section.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/sidebar/index.js +15 -0
- package/lib/mobileapp/vue/domstructure/ui/sidebar/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/sidebar/sidebar-item.js +42 -0
- package/lib/mobileapp/vue/domstructure/ui/sidebar/sidebar-item.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/sidebar/sidebar.js +42 -0
- package/lib/mobileapp/vue/domstructure/ui/sidebar/sidebar.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/staff-info/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/staff-info/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/staff-info/staff-info.js +49 -0
- package/lib/mobileapp/vue/domstructure/ui/staff-info/staff-info.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/static-text/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/static-text/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/static-text/static-text.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/static-text/static-text.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/switch/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/switch/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/switch/switch-input.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/switch/switch-input.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/tab/index.js +16 -0
- package/lib/mobileapp/vue/domstructure/ui/tab/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/tab/vue-tab-bar.js +33 -0
- package/lib/mobileapp/vue/domstructure/ui/tab/vue-tab-bar.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/tab/vue-tab-page.js +45 -0
- package/lib/mobileapp/vue/domstructure/ui/tab/vue-tab-page.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/tab/vue-tabs.js +45 -0
- package/lib/mobileapp/vue/domstructure/ui/tab/vue-tabs.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/text-area/index.js +14 -0
- package/lib/mobileapp/vue/domstructure/ui/text-area/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/text-area/text-area.js +37 -0
- package/lib/mobileapp/vue/domstructure/ui/text-area/text-area.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/index.js +17 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/text-box-external.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/text-box-external.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/text-box.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/text-box.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/text-scan.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/text-scan.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/text-telphone.js +27 -0
- package/lib/mobileapp/vue/domstructure/ui/text-box/text-telphone.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/toolbar/index.js +16 -0
- package/lib/mobileapp/vue/domstructure/ui/toolbar/index.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/toolbar/vue-toolbar-area.js +35 -0
- package/lib/mobileapp/vue/domstructure/ui/toolbar/vue-toolbar-area.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/toolbar/vue-toolbar-item.js +32 -0
- package/lib/mobileapp/vue/domstructure/ui/toolbar/vue-toolbar-item.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/toolbar/vue-toolbar.js +42 -0
- package/lib/mobileapp/vue/domstructure/ui/toolbar/vue-toolbar.js.map +1 -0
- package/lib/mobileapp/vue/domstructure/ui/vue-input-component.js +81 -0
- package/lib/mobileapp/vue/domstructure/ui/vue-input-component.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/i-project-data.js +3 -0
- package/lib/mobileapp/vue/internal-entity/i-project-data.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/index.js +14 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/index.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/vue-page-flow-convertor.js +11 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/vue-page-flow-convertor.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/vue-page-flow-entity.js +44 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/vue-page-flow-entity.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/vue-page-flow-page.js +27 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/vue-page-flow-page.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/vue-page-flow-project.js +27 -0
- package/lib/mobileapp/vue/internal-entity/page-flow/vue-page-flow-project.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/vue-app-index-vue-parameter.js +7 -0
- package/lib/mobileapp/vue/internal-entity/vue-app-index-vue-parameter.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/vue-app-router-entity.js +15 -0
- package/lib/mobileapp/vue/internal-entity/vue-app-router-entity.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/vue-engine-context.js +7 -0
- package/lib/mobileapp/vue/internal-entity/vue-engine-context.js.map +1 -0
- package/lib/mobileapp/vue/internal-entity/vue-page-component-generate-parameter.js +7 -0
- package/lib/mobileapp/vue/internal-entity/vue-page-component-generate-parameter.js.map +1 -0
- package/lib/mobileapp/vue/utility/devkit/vue-viewmodels-creator.js +1 -0
- package/lib/mobileapp/vue/utility/devkit/vue-viewmodels-creator.js.map +1 -1
- package/lib/template/ui/mobileapprove/content-container.pug +6 -3
- package/lib/template/ui/mobileapprove/detailheader-for-mobileapprove.pug +2 -1
- package/lib/template/ui/mobileapprove/panel-for-mobileapprove.pug +8 -0
- package/lib/template/ui/mobileapprove/statictext-for-mobileapprove.pug +15 -20
- package/lib/template/ui/mobilevue/area-picker.pug +53 -0
- package/lib/template/ui/mobilevue/avatar.pug +19 -0
- package/lib/template/ui/mobilevue/common/text-common.pug +80 -0
- package/lib/template/ui/mobilevue/fm-staff-info.pug +10 -0
- package/lib/template/ui/mobilevue/footer.pug +10 -0
- package/lib/template/ui/mobilevue/label.pug +12 -0
- package/lib/template/ui/mobilevue/layout-container-col.pug +11 -0
- package/lib/template/ui/mobilevue/layout-container-row.pug +12 -0
- package/lib/template/ui/mobilevue/layout-container.pug +11 -0
- package/lib/template/ui/mobilevue/page-content-container.pug +10 -0
- package/lib/template/ui/mobilevue/page-footer-container.pug +10 -0
- package/lib/template/ui/mobilevue/page-header-container.pug +10 -0
- package/lib/template/ui/mobilevue/show-image.pug +22 -0
- package/lib/template/ui/mobilevue/tag.pug +33 -0
- package/lib/template/ui/mobilevue/text.pug +118 -0
- package/lib/template/ui/mobilevue/vant-tabpage.pug +6 -0
- package/lib/template/ui/mobilevue/vant-tabs.pug +6 -0
- package/lib/utility/mobile-approve/config-helper/form-jsonfile-reader.js +16 -16
- package/lib/utility/mobile-approve/config-helper/formatter-function-generator.js +67 -67
- package/lib/utility/mobile-approve/entity/attachment-panel-for-mobileapprove.js +51 -51
- package/lib/utility/mobile-approve/entity/base-mobile-approve.js +36 -36
- package/lib/utility/mobile-approve/entity/binding.js +25 -25
- package/lib/utility/mobile-approve/entity/child-detail-template.js +10 -10
- package/lib/utility/mobile-approve/entity/child-table-primary-relation.js +6 -6
- package/lib/utility/mobile-approve/entity/component-ref.js +33 -33
- package/lib/utility/mobile-approve/entity/component.js +55 -55
- package/lib/utility/mobile-approve/entity/content-container.js +61 -42
- package/lib/utility/mobile-approve/entity/content-container.js.map +1 -1
- package/lib/utility/mobile-approve/entity/detail-header-for-mobileapprove.js +123 -122
- package/lib/utility/mobile-approve/entity/detail-header-for-mobileapprove.js.map +1 -1
- package/lib/utility/mobile-approve/entity/detail-header-item.js +32 -32
- package/lib/utility/mobile-approve/entity/field-binding-parameter.js +24 -24
- package/lib/utility/mobile-approve/entity/fieldset-for-mobileapprove.js +42 -42
- package/lib/utility/mobile-approve/entity/fieldset-for-mobileapprove.js.map +1 -1
- package/lib/utility/mobile-approve/entity/flow-process-for-mobileapprove.js +34 -34
- package/lib/utility/mobile-approve/entity/flow-process-for-mobileapprove.js.map +1 -1
- package/lib/utility/mobile-approve/entity/html-panel-for-mobileapprove.js +48 -48
- package/lib/utility/mobile-approve/entity/html-template.js +25 -25
- package/lib/utility/mobile-approve/entity/index.js +31 -27
- package/lib/utility/mobile-approve/entity/index.js.map +1 -1
- package/lib/utility/mobile-approve/entity/module.js +39 -39
- package/lib/utility/mobile-approve/entity/panel-for-mobileapprove.js +101 -101
- package/lib/utility/mobile-approve/entity/panel-for-mobileapprove.js.map +1 -1
- package/lib/utility/mobile-approve/entity/panel-item-for-mobileapprove.js +38 -38
- package/lib/utility/mobile-approve/entity/person-avatar.js +24 -24
- package/lib/utility/mobile-approve/entity/static-text-for-mobileapprove.js +71 -71
- package/lib/utility/mobile-approve/entity/static-text-for-mobileapprove.js.map +1 -1
- package/lib/utility/mobile-approve/generator/dom-generator.js +20 -20
- package/lib/utility/mobile-approve/mobile-approve-manager.js +54 -50
- package/lib/utility/mobile-approve/mobile-approve-manager.js.map +1 -1
- package/lib/utility/mobile-approve/recuresive-generate-mobileapprove.js +442 -430
- package/lib/utility/mobile-approve/recuresive-generate-mobileapprove.js.map +1 -1
- package/lib/utility/mobile-approve/template-generator/abstract-template-generator.js +6 -6
- package/lib/utility/mobile-approve/template-generator/component-template-generator.js +10 -10
- package/lib/utility/mobile-approve/template-generator/content-container-template-generator.js +10 -10
- package/lib/utility/mobile-approve/template-generator/detailheader-for-mobileapprove-template-generator.js +10 -10
- package/lib/utility/mobile-approve/template-generator/i-template-generator.js +2 -2
- package/lib/utility/mobile-approve/template-generator/index-html-generator.js +585 -582
- package/lib/utility/mobile-approve/template-generator/index-html-generator.js.map +1 -1
- package/lib/utility/mobile-approve/template-generator/index.js +17 -13
- package/lib/utility/mobile-approve/template-generator/index.js.map +1 -1
- package/lib/utility/mobile-approve/template-generator/mobile-approve-templateconfig.js +39 -39
- package/lib/utility/mobile-approve/template-generator/panel-for-mobileapprove-template-generator.js +10 -10
- package/lib/utility/mobile-approve/template-generator/static-text-for-mobileapprove-template-generator.js +10 -10
- package/lib/utility/mobile-approve/template-generator/template-generator-factory.js +39 -39
- package/lib/utility/mobile-approve/template-generator/template-generator-manager.js +31 -31
- package/lib/utility/mobile-approve/template-generator/template-generator-type.js +11 -11
- package/package.json +1 -1
- package/lib/mobileapp/vue/static/.gitignore +0 -13
|
@@ -1,583 +1,586 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IndexHtmlGenerator = void 0;
|
|
4
|
-
const abstract_template_generator_1 = require("./abstract-template-generator");
|
|
5
|
-
const toolhepler_1 = require("../../toolhepler");
|
|
6
|
-
class IndexHtmlGenerator extends abstract_template_generator_1.AbstractTemplateGenerator {
|
|
7
|
-
generate(variable) {
|
|
8
|
-
const processInstanceParameter = this.generateFormConfigParameter(variable.module);
|
|
9
|
-
let isSubDefaultCollapse = toolhepler_1.ToolHelper.isNullOrUndefined(variable.isSubDefaultCollapse) ? true : variable.isSubDefaultCollapse;
|
|
10
|
-
const childDetailTemplate = variable.childDetailTemplate;
|
|
11
|
-
const childTablePrimary = variable.childTablePrimary;
|
|
12
|
-
isSubDefaultCollapse = !isSubDefaultCollapse;
|
|
13
|
-
let afterLoadData = "undefined";
|
|
14
|
-
if (variable.afterLoadData) {
|
|
15
|
-
afterLoadData = `${variable.afterLoadData}`;
|
|
16
|
-
}
|
|
17
|
-
let generateString = `
|
|
18
|
-
window.getMobileApprovalFormConfig = function() {
|
|
19
|
-
return {
|
|
20
|
-
${processInstanceParameter ? processInstanceParameter : ""}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
window.getAfterLoadDataFunc =function(context) {
|
|
25
|
-
${afterLoadData}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
window.getMobileApprovalFormTemplate = function() {
|
|
29
|
-
return \`
|
|
30
|
-
${variable.content}
|
|
31
|
-
\`;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
window.registerCollapseHandler = function (id,modelData) {
|
|
35
|
-
var $ParentEl;
|
|
36
|
-
if (id) {
|
|
37
|
-
$ParentEl = document.getElementById(id);
|
|
38
|
-
} else {
|
|
39
|
-
$ParentEl = document.getElementsByClassName("fm-page-approveformat")[0];
|
|
40
|
-
}
|
|
41
|
-
// 主表数据面板
|
|
42
|
-
var $MainGridPanelEl;
|
|
43
|
-
// 收起主表的収折条
|
|
44
|
-
var $CollapseMainAreaEl;
|
|
45
|
-
// 主表绑定
|
|
46
|
-
defineGridCollapseBinds(addMainCollapseAreaFunc, bindMainCollapseEventsFunc);
|
|
47
|
-
// 只有在未启用整体子表収折的时候,才启用子表独立収折
|
|
48
|
-
defindIsIndepPanelCollaspe();
|
|
49
|
-
// 分组支持収折
|
|
50
|
-
mainGridGroupFunc();
|
|
51
|
-
|
|
52
|
-
// 是否启用子表点击查看详情页
|
|
53
|
-
subGridPanelCompleteInfo();
|
|
54
|
-
|
|
55
|
-
function defineGridCollapseBinds(addCollapseAreaFunc, bindEventsFunc) {
|
|
56
|
-
var collapseId = "collapseMainArea";
|
|
57
|
-
collapsePanelCls = ".fm-apply-main";
|
|
58
|
-
collapseAttr = "data-enableMainCollapse";
|
|
59
|
-
defaultCollapseAttr = "data-isMainDefaultCollapse";
|
|
60
|
-
// 是否已生成过
|
|
61
|
-
if ($ParentEl.querySelector(collapseId)) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
// 数据面板
|
|
65
|
-
var $GridPanelEl = $ParentEl.querySelector(collapsePanelCls);
|
|
66
|
-
// 不存在数据
|
|
67
|
-
if (!$GridPanelEl || !$GridPanelEl.querySelector('.fm-apply-panel-list')) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (!$ParentEl.attributes.getNamedItem(collapseAttr) || $ParentEl.getAttribute(collapseAttr) + "" == "false") {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
$MainGridPanelEl = $GridPanelEl;
|
|
74
|
-
// 个性设置
|
|
75
|
-
if (addCollapseAreaFunc) {
|
|
76
|
-
addCollapseAreaFunc();
|
|
77
|
-
}
|
|
78
|
-
// 有设定
|
|
79
|
-
if ($ParentEl.attributes.getNamedItem(collapseAttr) && $ParentEl.getAttribute(defaultCollapseAttr) + "" == "true") {
|
|
80
|
-
// 初始收起
|
|
81
|
-
collapseOrExpand(false);
|
|
82
|
-
} else {
|
|
83
|
-
// 初始展开
|
|
84
|
-
collapseOrExpand(true);
|
|
85
|
-
}
|
|
86
|
-
if (bindEventsFunc) {
|
|
87
|
-
bindEventsFunc();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// 定义主表収折
|
|
92
|
-
function addMainCollapseAreaFunc() {
|
|
93
|
-
$CollapseMainAreaEl = document.createElement("div");
|
|
94
|
-
$CollapseMainAreaEl.id = "collapseMainArea";
|
|
95
|
-
$CollapseMainAreaEl.className = "fm-apply-collapse-only-icon fm-state-expand";
|
|
96
|
-
var expandHTMLTex = ' <span class="fm-icon fm-icon-arrow-chevron-down collapse--icon"></span>';
|
|
97
|
-
$CollapseMainAreaEl.innerHTML = expandHTMLTex;
|
|
98
|
-
$MainGridPanelEl.appendChild($CollapseMainAreaEl);
|
|
99
|
-
}
|
|
100
|
-
function bindMainCollapseEventsFunc() {
|
|
101
|
-
// 绑定事件
|
|
102
|
-
$CollapseMainAreaEl.addEventListener('click', function () {
|
|
103
|
-
if (this.className.indexOf('fm-state-collaps') > -1) {
|
|
104
|
-
collapseOrExpand(true);
|
|
105
|
-
} else {
|
|
106
|
-
collapseOrExpand(false);
|
|
107
|
-
}
|
|
108
|
-
}, false);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// 定义面板独立収折
|
|
112
|
-
function addIndepPanelCollapseAreaFunc(parentNodeEl) {
|
|
113
|
-
var $panelList=parentNodeEl.querySelectorAll('.fm-apply-panel');
|
|
114
|
-
if ($panelList.length<2) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
$panelList[0].classList.add("fm-panel-collapse--summary");
|
|
118
|
-
$panelList[1].classList.add("fm-panel-collapse--detail");
|
|
119
|
-
var $indepCollapseAreaEl = document.createElement("div");
|
|
120
|
-
$indepCollapseAreaEl.className = "panel-list--footer details-grid-collapse-area";
|
|
121
|
-
var expandHTMLText = ' <span class="collapse-text fm-state-collapse">查看明细信息</span>';
|
|
122
|
-
expandHTMLText += '<span class="collapse-text fm-state-expand">收起明细信息</span>';
|
|
123
|
-
$indepCollapseAreaEl.innerHTML = expandHTMLText;
|
|
124
|
-
parentNodeEl.appendChild($indepCollapseAreaEl);
|
|
125
|
-
// 初始化状态
|
|
126
|
-
if (parentNodeEl.getAttribute('data-isIndepPanelDefaultCollaspe') + "" == "true") {
|
|
127
|
-
GroupCollapseOrExpand(false, parentNodeEl);
|
|
128
|
-
} else {
|
|
129
|
-
GroupCollapseOrExpand(true, parentNodeEl);
|
|
130
|
-
}
|
|
131
|
-
// 绑定事件
|
|
132
|
-
$indepCollapseAreaEl.addEventListener('click', function () {
|
|
133
|
-
var $GroupNode = this.parentNode;
|
|
134
|
-
if ($GroupNode.className.indexOf('fm-state-collaps') > -1) {
|
|
135
|
-
GroupCollapseOrExpand(true, $GroupNode);
|
|
136
|
-
} else {
|
|
137
|
-
GroupCollapseOrExpand(false, $GroupNode);
|
|
138
|
-
}
|
|
139
|
-
}, false);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
//收起展开
|
|
143
|
-
function collapseOrExpand(expand) {
|
|
144
|
-
var $CollapsePanel = $MainGridPanelEl;
|
|
145
|
-
$CollapseArea = $CollapseMainAreaEl;
|
|
146
|
-
// 主表未启用収折
|
|
147
|
-
if (!$CollapseArea) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
if (expand) {
|
|
151
|
-
$CollapsePanel.classList.remove("fm-state-collapse");
|
|
152
|
-
$CollapseArea.classList.remove("fm-state-collapse");
|
|
153
|
-
$CollapseArea.classList.add("fm-state-expand");
|
|
154
|
-
$CollapsePanel.classList.add("fm-state-expand");
|
|
155
|
-
} else {
|
|
156
|
-
$CollapsePanel.classList.remove("fm-state-expand");
|
|
157
|
-
$CollapseArea.classList.remove("fm-state-expand");
|
|
158
|
-
$CollapseArea.classList.add("fm-state-collapse");
|
|
159
|
-
$CollapsePanel.classList.add("fm-state-collapse");
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
// 定义主表分组収折
|
|
163
|
-
function mainGridGroupFunc() {
|
|
164
|
-
var collapsePanelCls = ".fm-apply-main";
|
|
165
|
-
var enableCollapseAttr = "data-enableGroupCollapse";
|
|
166
|
-
var isDefaultCollapsAttr = "data-isDefaultGroupCollapse";
|
|
167
|
-
// 数据面板
|
|
168
|
-
var $GridPanelEl = $ParentEl.querySelector(collapsePanelCls);
|
|
169
|
-
// 不存在数据
|
|
170
|
-
if (!$GridPanelEl || !$GridPanelEl.querySelector('.fm-apply-panel-list')) {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
// 存在启用了収折的分组
|
|
174
|
-
var $FieldSetGroups = $GridPanelEl.querySelectorAll('.fm-panel-list-items-group');
|
|
175
|
-
if ($FieldSetGroups.length == 0) {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
// 绑定事件
|
|
179
|
-
for (var k = 0; k < $FieldSetGroups.length; k++) {
|
|
180
|
-
// 当前是否启用
|
|
181
|
-
if ($FieldSetGroups[k].attributes.getNamedItem(enableCollapseAttr) && $FieldSetGroups[k].getAttribute(enableCollapseAttr) + "" == "true") {
|
|
182
|
-
var $GroupHeader = $FieldSetGroups[k].querySelector('.items-group--legend');
|
|
183
|
-
if ($GroupHeader) {
|
|
184
|
-
// 启用
|
|
185
|
-
$FieldSetGroups[k].classList.add("items-group--enable-collapse");
|
|
186
|
-
// 默认状态
|
|
187
|
-
if ($FieldSetGroups[k].getAttribute(isDefaultCollapsAttr) + "" == "true") {
|
|
188
|
-
//收起
|
|
189
|
-
GroupCollapseOrExpand(false, $FieldSetGroups[k]);
|
|
190
|
-
} else {
|
|
191
|
-
// 展开
|
|
192
|
-
GroupCollapseOrExpand(true, $FieldSetGroups[k]);
|
|
193
|
-
}
|
|
194
|
-
// 绑定事件
|
|
195
|
-
$GroupHeader.addEventListener('click', function () {
|
|
196
|
-
var $GroupNode = this.parentNode;
|
|
197
|
-
if ($GroupNode.className.indexOf('fm-state-collaps') > -1) {
|
|
198
|
-
GroupCollapseOrExpand(true, $GroupNode);
|
|
199
|
-
} else {
|
|
200
|
-
GroupCollapseOrExpand(false, $GroupNode);
|
|
201
|
-
}
|
|
202
|
-
}, false);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
function GroupCollapseOrExpand(expand, groupNode) {
|
|
210
|
-
if (expand) {
|
|
211
|
-
groupNode.classList.remove("fm-state-collapse");
|
|
212
|
-
groupNode.classList.add("fm-state-expand");
|
|
213
|
-
} else {
|
|
214
|
-
groupNode.classList.remove("fm-state-expand");
|
|
215
|
-
groupNode.classList.add("fm-state-collapse");
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
// 独立子表収折
|
|
219
|
-
function defindIsIndepPanelCollaspe() {
|
|
220
|
-
var enableCollapseAttr = "data-enableIndepPanelCollaspe";
|
|
221
|
-
$CollapsePanelEl = $ParentEl.querySelector('.fm-apply-details');
|
|
222
|
-
// 不存在子表数据
|
|
223
|
-
var $detailListGroup = $CollapsePanelEl.querySelectorAll('.fm-apply-panel-list');
|
|
224
|
-
if ($detailListGroup.length < 1) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
for (var m = 0; m < $detailListGroup.length; m++) {
|
|
228
|
-
if ($detailListGroup[m].attributes.getNamedItem(enableCollapseAttr) && $detailListGroup[m].getAttribute(enableCollapseAttr) + "" == "true") {
|
|
229
|
-
addIndepPanelCollapseAreaFunc($detailListGroup[m]);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function subGridPanelCompleteInfo() {
|
|
235
|
-
var enableAttr = "data-enableCompleteInfo";
|
|
236
|
-
$CollapsePanelEl = $ParentEl.querySelector('.fm-apply-details');
|
|
237
|
-
// 不存在子表数据
|
|
238
|
-
var $detailListGroup = $CollapsePanelEl.querySelectorAll('.fm-apply-panel-list');
|
|
239
|
-
if ($detailListGroup.length == 0) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
// 构造容器
|
|
243
|
-
createComplteInfoContainer();
|
|
244
|
-
for (var m = 0; m < $detailListGroup.length; m++) {
|
|
245
|
-
if ($detailListGroup[m].attributes.getNamedItem(enableAttr) && $detailListGroup[m].getAttribute(enableAttr) + "" == "true") {
|
|
246
|
-
// 绑定事件
|
|
247
|
-
$detailListGroup[m].classList.add('panel--can-click')
|
|
248
|
-
// 只有概要详情才能点击穿透,假定是第一个
|
|
249
|
-
var $detailPanelEl = $detailListGroup[m].querySelector(".fm-apply-panel");
|
|
250
|
-
$detailPanelEl.addEventListener('click', function (ev) {
|
|
251
|
-
var applylistEl = (elFindParentNode(ev.target));
|
|
252
|
-
if (applylistEl && applylistEl.attributes.getNamedItem('data-dataIDCompleteInfo')) {
|
|
253
|
-
var panelListEl = elFindParentNode(applylistEl, 'fm-apply-panel-list');
|
|
254
|
-
if (panelListEl && panelListEl.id && panelListEl.attributes.getNamedItem('data-sourceCompleteInfo')) {
|
|
255
|
-
createCompleteInfo(panelListEl.id, panelListEl.getAttribute('data-sourceCompleteInfo'), applylistEl.getAttribute('data-dataIDCompleteInfo'),applylistEl.getAttribute('data-dataIDPrimaryKey'));
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// 创建完整信息容器
|
|
266
|
-
function createComplteInfoContainer() {
|
|
267
|
-
if (document.getElementById("complete-info-container")) {
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
var $complteInfoContainerEl = document.createElement("div");
|
|
271
|
-
$complteInfoContainerEl.className = "fm-subgrid-complete-info-container fm-state-collapse";
|
|
272
|
-
$complteInfoContainerEl.id = "complete-info-container";
|
|
273
|
-
var infoHtml = ' <div class="fm-subgrid-complete-info">';
|
|
274
|
-
infoHtml += '<div class="complete-info--header"><h5>详情</h5></div>';
|
|
275
|
-
infoHtml += '<div class="toolbar collapse-area"><i class="fm-icon fm-icon-close"></i></div>';
|
|
276
|
-
infoHtml += '<div class="complete-info--content"></div>';
|
|
277
|
-
infoHtml += '</div> <div class="complete-info--overlay"></div></div>';
|
|
278
|
-
$complteInfoContainerEl.innerHTML = infoHtml;
|
|
279
|
-
//document.getElementsByTagName('body')[0].append($complteInfoContainerEl);
|
|
280
|
-
$ParentEl.append($complteInfoContainerEl);
|
|
281
|
-
// 遮罩层
|
|
282
|
-
$complteInfoContainerEl.querySelector(".complete-info--overlay").addEventListener('click', function () {
|
|
283
|
-
var parentEl = this.parentNode;
|
|
284
|
-
toggleElState(parentEl, false);
|
|
285
|
-
}, false);
|
|
286
|
-
// 关闭按钮
|
|
287
|
-
$complteInfoContainerEl.querySelector(".collapse-area").addEventListener('click', function () {
|
|
288
|
-
var parentEl = this.parentNode.parentNode;
|
|
289
|
-
toggleElState(parentEl, false);
|
|
290
|
-
}, false);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
function elFindParentNode(el, classname) {
|
|
294
|
-
// 父级标签是否是body,是着停止返回集合,反之继续
|
|
295
|
-
if (elhasSpecialCls(el, classname)) {
|
|
296
|
-
return el;
|
|
297
|
-
} else if ('BODY' !== el.parentNode.nodeName) {
|
|
298
|
-
var parentN = el.parentNode;
|
|
299
|
-
if (elhasSpecialCls(parentN, classname)) {
|
|
300
|
-
return parentN;
|
|
301
|
-
} else {
|
|
302
|
-
return elFindParentNode(parentN, classname);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
// 返回集合,结束
|
|
306
|
-
return null;
|
|
307
|
-
}
|
|
308
|
-
function elhasSpecialCls(el, classname) {
|
|
309
|
-
if (el) {
|
|
310
|
-
classname = classname ? classname : 'fm-apply-list';
|
|
311
|
-
var classNameList = el.classList;
|
|
312
|
-
var findCls = false;
|
|
313
|
-
for (var k = 0; k < classNameList.length; k++) {
|
|
314
|
-
if (classNameList[k] == classname) {
|
|
315
|
-
findCls = true;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
return findCls;
|
|
320
|
-
}
|
|
321
|
-
return false;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
function createCompleteInfo(tmplID, gridID, infoID,primaryKey) {
|
|
325
|
-
var templateText = getTmplateByPanelID(tmplID);
|
|
326
|
-
if (templateText) {
|
|
327
|
-
var dataInfo = GetDataByGridIDandDataID(gridID, infoID,primaryKey);
|
|
328
|
-
doT.templateSettings.varname = 'itemData,model';
|
|
329
|
-
var templFn = doT.template(templateText);
|
|
330
|
-
var resultText = templFn(dataInfo,modelData);
|
|
331
|
-
upadateCompleteInfo(resultText);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
function getTmplateByPanelID(panelID){
|
|
336
|
-
var allTmplate={};
|
|
337
|
-
${this.generateTemplateByPanelIdFunction(childDetailTemplate)}
|
|
338
|
-
if(allTmplate.hasOwnProperty(panelID)){
|
|
339
|
-
return allTmplate[panelID]();
|
|
340
|
-
}
|
|
341
|
-
return '未找到模板信息';
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
function GetDataByGridIDandDataID(gridID,dataID,primaryKey){
|
|
345
|
-
if(!modelData){
|
|
346
|
-
return {};
|
|
347
|
-
}
|
|
348
|
-
var gridDatas=modelData.formData[gridID];
|
|
349
|
-
if(gridDatas){
|
|
350
|
-
for(var k=0;k<gridDatas.length;k++){
|
|
351
|
-
if(gridDatas[k][primaryKey]==dataID){
|
|
352
|
-
break;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
if(k==gridDatas.length){
|
|
356
|
-
return {};
|
|
357
|
-
}
|
|
358
|
-
}else{
|
|
359
|
-
return {};
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
return gridDatas[k];
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* 更新完整信息infoHTML
|
|
367
|
-
*/
|
|
368
|
-
function upadateCompleteInfo(infoHTML) {
|
|
369
|
-
var infoContainerEl = document.getElementById("complete-info-container");
|
|
370
|
-
var contentEl = infoContainerEl.querySelector(".complete-info--content");
|
|
371
|
-
contentEl.innerHTML = infoHTML;
|
|
372
|
-
toggleElState(infoContainerEl, true);
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
*
|
|
376
|
-
* @param {*} el 元素
|
|
377
|
-
* @param {*} expand 展开
|
|
378
|
-
*/
|
|
379
|
-
function toggleElState(el, expand) {
|
|
380
|
-
if (el) {
|
|
381
|
-
if (expand) {
|
|
382
|
-
el.classList.remove("fm-state-collapse");
|
|
383
|
-
el.classList.add("fm-state-expand");
|
|
384
|
-
} else {
|
|
385
|
-
el.classList.remove("fm-state-expand");
|
|
386
|
-
el.classList.add("fm-state-collapse");
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
`;
|
|
394
|
-
generateString += `
|
|
395
|
-
window.getTablePrimaryByTableName=function(tableName){
|
|
396
|
-
var allTableRelations={};
|
|
397
|
-
${this.generateTablePrimaryRelationFunction(childTablePrimary)}
|
|
398
|
-
if(allTableRelations.hasOwnProperty(tableName)){
|
|
399
|
-
return allTableRelations[tableName]();
|
|
400
|
-
}
|
|
401
|
-
console.info('移动审批:未找到子表主键信息,对应子表为:'+tableName);
|
|
402
|
-
return "";
|
|
403
|
-
}`;
|
|
404
|
-
return generateString;
|
|
405
|
-
}
|
|
406
|
-
generateTemplateByPanelIdFunction(childDetailTemplate) {
|
|
407
|
-
let generateString = "";
|
|
408
|
-
if (toolhepler_1.ToolHelper.isArray(childDetailTemplate, false)) {
|
|
409
|
-
childDetailTemplate.forEach((item) => {
|
|
410
|
-
generateString += `
|
|
411
|
-
allTmplate['${item.templateId}']=function(){
|
|
412
|
-
var templateHtml=\` <div class="fm-apply-panel"><div class="fm-apply-list">${item.templateHtml}</div></div>\`;
|
|
413
|
-
return templateHtml;
|
|
414
|
-
}`;
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
return generateString;
|
|
418
|
-
}
|
|
419
|
-
generateTablePrimaryRelationFunction(childTablePrimary) {
|
|
420
|
-
let generateString = "";
|
|
421
|
-
if (toolhepler_1.ToolHelper.isArray(childTablePrimary, false)) {
|
|
422
|
-
childTablePrimary.forEach((item) => {
|
|
423
|
-
generateString += `
|
|
424
|
-
allTableRelations['${item.tableName}']=function(){
|
|
425
|
-
return '${item.primary}';
|
|
426
|
-
}`;
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
return generateString;
|
|
430
|
-
}
|
|
431
|
-
generateFormConfigParameter(moduleJson) {
|
|
432
|
-
const processInstance = moduleJson.components.find((t) => {
|
|
433
|
-
return t.componentType == "flowProcessForMobileApprove";
|
|
434
|
-
});
|
|
435
|
-
const detailHeaderComponent = moduleJson.components.find((t) => {
|
|
436
|
-
return t.componentType == "detailHeaderForMobileApprove";
|
|
437
|
-
});
|
|
438
|
-
let generateString = "";
|
|
439
|
-
if (processInstance) {
|
|
440
|
-
const flowProcessInstance = processInstance.contents.find((t) => {
|
|
441
|
-
return t.type == "FlowProcessForMobileApprove";
|
|
442
|
-
});
|
|
443
|
-
const beID = this.readBeId(moduleJson);
|
|
444
|
-
const voID = this.readVoId(moduleJson);
|
|
445
|
-
const eapiId = this.readEapiId(moduleJson);
|
|
446
|
-
const getDataMethod = this.readGetDataMethod(moduleJson);
|
|
447
|
-
const baseUri = this.readBaseUri(moduleJson);
|
|
448
|
-
if (flowProcessInstance) {
|
|
449
|
-
generateString += `
|
|
450
|
-
beId:"${beID}",
|
|
451
|
-
voId:"${voID}",
|
|
452
|
-
eapiId:"${eapiId}",
|
|
453
|
-
baseUri:"${baseUri}",
|
|
454
|
-
getDataMethod:"${getDataMethod}",
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IndexHtmlGenerator = void 0;
|
|
4
|
+
const abstract_template_generator_1 = require("./abstract-template-generator");
|
|
5
|
+
const toolhepler_1 = require("../../toolhepler");
|
|
6
|
+
class IndexHtmlGenerator extends abstract_template_generator_1.AbstractTemplateGenerator {
|
|
7
|
+
generate(variable) {
|
|
8
|
+
const processInstanceParameter = this.generateFormConfigParameter(variable.module);
|
|
9
|
+
let isSubDefaultCollapse = toolhepler_1.ToolHelper.isNullOrUndefined(variable.isSubDefaultCollapse) ? true : variable.isSubDefaultCollapse;
|
|
10
|
+
const childDetailTemplate = variable.childDetailTemplate;
|
|
11
|
+
const childTablePrimary = variable.childTablePrimary;
|
|
12
|
+
isSubDefaultCollapse = !isSubDefaultCollapse;
|
|
13
|
+
let afterLoadData = "undefined";
|
|
14
|
+
if (variable.afterLoadData) {
|
|
15
|
+
afterLoadData = `${variable.afterLoadData}`;
|
|
16
|
+
}
|
|
17
|
+
let generateString = `
|
|
18
|
+
window.getMobileApprovalFormConfig = function() {
|
|
19
|
+
return {
|
|
20
|
+
${processInstanceParameter ? processInstanceParameter : ""}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
window.getAfterLoadDataFunc =function(context) {
|
|
25
|
+
${afterLoadData}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
window.getMobileApprovalFormTemplate = function() {
|
|
29
|
+
return \`
|
|
30
|
+
${variable.content}
|
|
31
|
+
\`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
window.registerCollapseHandler = function (id,modelData) {
|
|
35
|
+
var $ParentEl;
|
|
36
|
+
if (id) {
|
|
37
|
+
$ParentEl = document.getElementById(id);
|
|
38
|
+
} else {
|
|
39
|
+
$ParentEl = document.getElementsByClassName("fm-page-approveformat")[0];
|
|
40
|
+
}
|
|
41
|
+
// 主表数据面板
|
|
42
|
+
var $MainGridPanelEl;
|
|
43
|
+
// 收起主表的収折条
|
|
44
|
+
var $CollapseMainAreaEl;
|
|
45
|
+
// 主表绑定
|
|
46
|
+
defineGridCollapseBinds(addMainCollapseAreaFunc, bindMainCollapseEventsFunc);
|
|
47
|
+
// 只有在未启用整体子表収折的时候,才启用子表独立収折
|
|
48
|
+
defindIsIndepPanelCollaspe();
|
|
49
|
+
// 分组支持収折
|
|
50
|
+
mainGridGroupFunc();
|
|
51
|
+
|
|
52
|
+
// 是否启用子表点击查看详情页
|
|
53
|
+
subGridPanelCompleteInfo();
|
|
54
|
+
|
|
55
|
+
function defineGridCollapseBinds(addCollapseAreaFunc, bindEventsFunc) {
|
|
56
|
+
var collapseId = "collapseMainArea";
|
|
57
|
+
collapsePanelCls = ".fm-apply-main";
|
|
58
|
+
collapseAttr = "data-enableMainCollapse";
|
|
59
|
+
defaultCollapseAttr = "data-isMainDefaultCollapse";
|
|
60
|
+
// 是否已生成过
|
|
61
|
+
if ($ParentEl.querySelector(collapseId)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// 数据面板
|
|
65
|
+
var $GridPanelEl = $ParentEl.querySelector(collapsePanelCls);
|
|
66
|
+
// 不存在数据
|
|
67
|
+
if (!$GridPanelEl || !$GridPanelEl.querySelector('.fm-apply-panel-list')) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (!$ParentEl.attributes.getNamedItem(collapseAttr) || $ParentEl.getAttribute(collapseAttr) + "" == "false") {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
$MainGridPanelEl = $GridPanelEl;
|
|
74
|
+
// 个性设置
|
|
75
|
+
if (addCollapseAreaFunc) {
|
|
76
|
+
addCollapseAreaFunc();
|
|
77
|
+
}
|
|
78
|
+
// 有设定
|
|
79
|
+
if ($ParentEl.attributes.getNamedItem(collapseAttr) && $ParentEl.getAttribute(defaultCollapseAttr) + "" == "true") {
|
|
80
|
+
// 初始收起
|
|
81
|
+
collapseOrExpand(false);
|
|
82
|
+
} else {
|
|
83
|
+
// 初始展开
|
|
84
|
+
collapseOrExpand(true);
|
|
85
|
+
}
|
|
86
|
+
if (bindEventsFunc) {
|
|
87
|
+
bindEventsFunc();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// 定义主表収折
|
|
92
|
+
function addMainCollapseAreaFunc() {
|
|
93
|
+
$CollapseMainAreaEl = document.createElement("div");
|
|
94
|
+
$CollapseMainAreaEl.id = "collapseMainArea";
|
|
95
|
+
$CollapseMainAreaEl.className = "fm-apply-collapse-only-icon fm-state-expand";
|
|
96
|
+
var expandHTMLTex = ' <span class="fm-icon fm-icon-arrow-chevron-down collapse--icon"></span>';
|
|
97
|
+
$CollapseMainAreaEl.innerHTML = expandHTMLTex;
|
|
98
|
+
$MainGridPanelEl.appendChild($CollapseMainAreaEl);
|
|
99
|
+
}
|
|
100
|
+
function bindMainCollapseEventsFunc() {
|
|
101
|
+
// 绑定事件
|
|
102
|
+
$CollapseMainAreaEl.addEventListener('click', function () {
|
|
103
|
+
if (this.className.indexOf('fm-state-collaps') > -1) {
|
|
104
|
+
collapseOrExpand(true);
|
|
105
|
+
} else {
|
|
106
|
+
collapseOrExpand(false);
|
|
107
|
+
}
|
|
108
|
+
}, false);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// 定义面板独立収折
|
|
112
|
+
function addIndepPanelCollapseAreaFunc(parentNodeEl) {
|
|
113
|
+
var $panelList=parentNodeEl.querySelectorAll('.fm-apply-panel');
|
|
114
|
+
if ($panelList.length<2) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
$panelList[0].classList.add("fm-panel-collapse--summary");
|
|
118
|
+
$panelList[1].classList.add("fm-panel-collapse--detail");
|
|
119
|
+
var $indepCollapseAreaEl = document.createElement("div");
|
|
120
|
+
$indepCollapseAreaEl.className = "panel-list--footer details-grid-collapse-area";
|
|
121
|
+
var expandHTMLText = ' <span class="collapse-text fm-state-collapse">查看明细信息</span>';
|
|
122
|
+
expandHTMLText += '<span class="collapse-text fm-state-expand">收起明细信息</span>';
|
|
123
|
+
$indepCollapseAreaEl.innerHTML = expandHTMLText;
|
|
124
|
+
parentNodeEl.appendChild($indepCollapseAreaEl);
|
|
125
|
+
// 初始化状态
|
|
126
|
+
if (parentNodeEl.getAttribute('data-isIndepPanelDefaultCollaspe') + "" == "true") {
|
|
127
|
+
GroupCollapseOrExpand(false, parentNodeEl);
|
|
128
|
+
} else {
|
|
129
|
+
GroupCollapseOrExpand(true, parentNodeEl);
|
|
130
|
+
}
|
|
131
|
+
// 绑定事件
|
|
132
|
+
$indepCollapseAreaEl.addEventListener('click', function () {
|
|
133
|
+
var $GroupNode = this.parentNode;
|
|
134
|
+
if ($GroupNode.className.indexOf('fm-state-collaps') > -1) {
|
|
135
|
+
GroupCollapseOrExpand(true, $GroupNode);
|
|
136
|
+
} else {
|
|
137
|
+
GroupCollapseOrExpand(false, $GroupNode);
|
|
138
|
+
}
|
|
139
|
+
}, false);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
//收起展开
|
|
143
|
+
function collapseOrExpand(expand) {
|
|
144
|
+
var $CollapsePanel = $MainGridPanelEl;
|
|
145
|
+
$CollapseArea = $CollapseMainAreaEl;
|
|
146
|
+
// 主表未启用収折
|
|
147
|
+
if (!$CollapseArea) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (expand) {
|
|
151
|
+
$CollapsePanel.classList.remove("fm-state-collapse");
|
|
152
|
+
$CollapseArea.classList.remove("fm-state-collapse");
|
|
153
|
+
$CollapseArea.classList.add("fm-state-expand");
|
|
154
|
+
$CollapsePanel.classList.add("fm-state-expand");
|
|
155
|
+
} else {
|
|
156
|
+
$CollapsePanel.classList.remove("fm-state-expand");
|
|
157
|
+
$CollapseArea.classList.remove("fm-state-expand");
|
|
158
|
+
$CollapseArea.classList.add("fm-state-collapse");
|
|
159
|
+
$CollapsePanel.classList.add("fm-state-collapse");
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// 定义主表分组収折
|
|
163
|
+
function mainGridGroupFunc() {
|
|
164
|
+
var collapsePanelCls = ".fm-apply-main";
|
|
165
|
+
var enableCollapseAttr = "data-enableGroupCollapse";
|
|
166
|
+
var isDefaultCollapsAttr = "data-isDefaultGroupCollapse";
|
|
167
|
+
// 数据面板
|
|
168
|
+
var $GridPanelEl = $ParentEl.querySelector(collapsePanelCls);
|
|
169
|
+
// 不存在数据
|
|
170
|
+
if (!$GridPanelEl || !$GridPanelEl.querySelector('.fm-apply-panel-list')) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
// 存在启用了収折的分组
|
|
174
|
+
var $FieldSetGroups = $GridPanelEl.querySelectorAll('.fm-panel-list-items-group');
|
|
175
|
+
if ($FieldSetGroups.length == 0) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
// 绑定事件
|
|
179
|
+
for (var k = 0; k < $FieldSetGroups.length; k++) {
|
|
180
|
+
// 当前是否启用
|
|
181
|
+
if ($FieldSetGroups[k].attributes.getNamedItem(enableCollapseAttr) && $FieldSetGroups[k].getAttribute(enableCollapseAttr) + "" == "true") {
|
|
182
|
+
var $GroupHeader = $FieldSetGroups[k].querySelector('.items-group--legend');
|
|
183
|
+
if ($GroupHeader) {
|
|
184
|
+
// 启用
|
|
185
|
+
$FieldSetGroups[k].classList.add("items-group--enable-collapse");
|
|
186
|
+
// 默认状态
|
|
187
|
+
if ($FieldSetGroups[k].getAttribute(isDefaultCollapsAttr) + "" == "true") {
|
|
188
|
+
//收起
|
|
189
|
+
GroupCollapseOrExpand(false, $FieldSetGroups[k]);
|
|
190
|
+
} else {
|
|
191
|
+
// 展开
|
|
192
|
+
GroupCollapseOrExpand(true, $FieldSetGroups[k]);
|
|
193
|
+
}
|
|
194
|
+
// 绑定事件
|
|
195
|
+
$GroupHeader.addEventListener('click', function () {
|
|
196
|
+
var $GroupNode = this.parentNode;
|
|
197
|
+
if ($GroupNode.className.indexOf('fm-state-collaps') > -1) {
|
|
198
|
+
GroupCollapseOrExpand(true, $GroupNode);
|
|
199
|
+
} else {
|
|
200
|
+
GroupCollapseOrExpand(false, $GroupNode);
|
|
201
|
+
}
|
|
202
|
+
}, false);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function GroupCollapseOrExpand(expand, groupNode) {
|
|
210
|
+
if (expand) {
|
|
211
|
+
groupNode.classList.remove("fm-state-collapse");
|
|
212
|
+
groupNode.classList.add("fm-state-expand");
|
|
213
|
+
} else {
|
|
214
|
+
groupNode.classList.remove("fm-state-expand");
|
|
215
|
+
groupNode.classList.add("fm-state-collapse");
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// 独立子表収折
|
|
219
|
+
function defindIsIndepPanelCollaspe() {
|
|
220
|
+
var enableCollapseAttr = "data-enableIndepPanelCollaspe";
|
|
221
|
+
$CollapsePanelEl = $ParentEl.querySelector('.fm-apply-details');
|
|
222
|
+
// 不存在子表数据
|
|
223
|
+
var $detailListGroup = $CollapsePanelEl.querySelectorAll('.fm-apply-panel-list');
|
|
224
|
+
if ($detailListGroup.length < 1) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
for (var m = 0; m < $detailListGroup.length; m++) {
|
|
228
|
+
if ($detailListGroup[m].attributes.getNamedItem(enableCollapseAttr) && $detailListGroup[m].getAttribute(enableCollapseAttr) + "" == "true") {
|
|
229
|
+
addIndepPanelCollapseAreaFunc($detailListGroup[m]);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function subGridPanelCompleteInfo() {
|
|
235
|
+
var enableAttr = "data-enableCompleteInfo";
|
|
236
|
+
$CollapsePanelEl = $ParentEl.querySelector('.fm-apply-details');
|
|
237
|
+
// 不存在子表数据
|
|
238
|
+
var $detailListGroup = $CollapsePanelEl.querySelectorAll('.fm-apply-panel-list');
|
|
239
|
+
if ($detailListGroup.length == 0) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
// 构造容器
|
|
243
|
+
createComplteInfoContainer();
|
|
244
|
+
for (var m = 0; m < $detailListGroup.length; m++) {
|
|
245
|
+
if ($detailListGroup[m].attributes.getNamedItem(enableAttr) && $detailListGroup[m].getAttribute(enableAttr) + "" == "true") {
|
|
246
|
+
// 绑定事件
|
|
247
|
+
$detailListGroup[m].classList.add('panel--can-click')
|
|
248
|
+
// 只有概要详情才能点击穿透,假定是第一个
|
|
249
|
+
var $detailPanelEl = $detailListGroup[m].querySelector(".fm-apply-panel");
|
|
250
|
+
$detailPanelEl.addEventListener('click', function (ev) {
|
|
251
|
+
var applylistEl = (elFindParentNode(ev.target));
|
|
252
|
+
if (applylistEl && applylistEl.attributes.getNamedItem('data-dataIDCompleteInfo')) {
|
|
253
|
+
var panelListEl = elFindParentNode(applylistEl, 'fm-apply-panel-list');
|
|
254
|
+
if (panelListEl && panelListEl.id && panelListEl.attributes.getNamedItem('data-sourceCompleteInfo')) {
|
|
255
|
+
createCompleteInfo(panelListEl.id, panelListEl.getAttribute('data-sourceCompleteInfo'), applylistEl.getAttribute('data-dataIDCompleteInfo'),applylistEl.getAttribute('data-dataIDPrimaryKey'));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// 创建完整信息容器
|
|
266
|
+
function createComplteInfoContainer() {
|
|
267
|
+
if (document.getElementById("complete-info-container")) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
var $complteInfoContainerEl = document.createElement("div");
|
|
271
|
+
$complteInfoContainerEl.className = "fm-subgrid-complete-info-container fm-state-collapse";
|
|
272
|
+
$complteInfoContainerEl.id = "complete-info-container";
|
|
273
|
+
var infoHtml = ' <div class="fm-subgrid-complete-info">';
|
|
274
|
+
infoHtml += '<div class="complete-info--header"><h5>详情</h5></div>';
|
|
275
|
+
infoHtml += '<div class="toolbar collapse-area"><i class="fm-icon fm-icon-close"></i></div>';
|
|
276
|
+
infoHtml += '<div class="complete-info--content"></div>';
|
|
277
|
+
infoHtml += '</div> <div class="complete-info--overlay"></div></div>';
|
|
278
|
+
$complteInfoContainerEl.innerHTML = infoHtml;
|
|
279
|
+
//document.getElementsByTagName('body')[0].append($complteInfoContainerEl);
|
|
280
|
+
$ParentEl.append($complteInfoContainerEl);
|
|
281
|
+
// 遮罩层
|
|
282
|
+
$complteInfoContainerEl.querySelector(".complete-info--overlay").addEventListener('click', function () {
|
|
283
|
+
var parentEl = this.parentNode;
|
|
284
|
+
toggleElState(parentEl, false);
|
|
285
|
+
}, false);
|
|
286
|
+
// 关闭按钮
|
|
287
|
+
$complteInfoContainerEl.querySelector(".collapse-area").addEventListener('click', function () {
|
|
288
|
+
var parentEl = this.parentNode.parentNode;
|
|
289
|
+
toggleElState(parentEl, false);
|
|
290
|
+
}, false);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function elFindParentNode(el, classname) {
|
|
294
|
+
// 父级标签是否是body,是着停止返回集合,反之继续
|
|
295
|
+
if (elhasSpecialCls(el, classname)) {
|
|
296
|
+
return el;
|
|
297
|
+
} else if ('BODY' !== el.parentNode.nodeName) {
|
|
298
|
+
var parentN = el.parentNode;
|
|
299
|
+
if (elhasSpecialCls(parentN, classname)) {
|
|
300
|
+
return parentN;
|
|
301
|
+
} else {
|
|
302
|
+
return elFindParentNode(parentN, classname);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// 返回集合,结束
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
function elhasSpecialCls(el, classname) {
|
|
309
|
+
if (el) {
|
|
310
|
+
classname = classname ? classname : 'fm-apply-list';
|
|
311
|
+
var classNameList = el.classList;
|
|
312
|
+
var findCls = false;
|
|
313
|
+
for (var k = 0; k < classNameList.length; k++) {
|
|
314
|
+
if (classNameList[k] == classname) {
|
|
315
|
+
findCls = true;
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return findCls;
|
|
320
|
+
}
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function createCompleteInfo(tmplID, gridID, infoID,primaryKey) {
|
|
325
|
+
var templateText = getTmplateByPanelID(tmplID);
|
|
326
|
+
if (templateText) {
|
|
327
|
+
var dataInfo = GetDataByGridIDandDataID(gridID, infoID,primaryKey);
|
|
328
|
+
doT.templateSettings.varname = 'itemData,model';
|
|
329
|
+
var templFn = doT.template(templateText);
|
|
330
|
+
var resultText = templFn(dataInfo,modelData);
|
|
331
|
+
upadateCompleteInfo(resultText);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function getTmplateByPanelID(panelID){
|
|
336
|
+
var allTmplate={};
|
|
337
|
+
${this.generateTemplateByPanelIdFunction(childDetailTemplate)}
|
|
338
|
+
if(allTmplate.hasOwnProperty(panelID)){
|
|
339
|
+
return allTmplate[panelID]();
|
|
340
|
+
}
|
|
341
|
+
return '未找到模板信息';
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function GetDataByGridIDandDataID(gridID,dataID,primaryKey){
|
|
345
|
+
if(!modelData){
|
|
346
|
+
return {};
|
|
347
|
+
}
|
|
348
|
+
var gridDatas=modelData.formData[gridID];
|
|
349
|
+
if(gridDatas){
|
|
350
|
+
for(var k=0;k<gridDatas.length;k++){
|
|
351
|
+
if(gridDatas[k][primaryKey]==dataID){
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
if(k==gridDatas.length){
|
|
356
|
+
return {};
|
|
357
|
+
}
|
|
358
|
+
}else{
|
|
359
|
+
return {};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return gridDatas[k];
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* 更新完整信息infoHTML
|
|
367
|
+
*/
|
|
368
|
+
function upadateCompleteInfo(infoHTML) {
|
|
369
|
+
var infoContainerEl = document.getElementById("complete-info-container");
|
|
370
|
+
var contentEl = infoContainerEl.querySelector(".complete-info--content");
|
|
371
|
+
contentEl.innerHTML = infoHTML;
|
|
372
|
+
toggleElState(infoContainerEl, true);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
*
|
|
376
|
+
* @param {*} el 元素
|
|
377
|
+
* @param {*} expand 展开
|
|
378
|
+
*/
|
|
379
|
+
function toggleElState(el, expand) {
|
|
380
|
+
if (el) {
|
|
381
|
+
if (expand) {
|
|
382
|
+
el.classList.remove("fm-state-collapse");
|
|
383
|
+
el.classList.add("fm-state-expand");
|
|
384
|
+
} else {
|
|
385
|
+
el.classList.remove("fm-state-expand");
|
|
386
|
+
el.classList.add("fm-state-collapse");
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
`;
|
|
394
|
+
generateString += `
|
|
395
|
+
window.getTablePrimaryByTableName=function(tableName){
|
|
396
|
+
var allTableRelations={};
|
|
397
|
+
${this.generateTablePrimaryRelationFunction(childTablePrimary)}
|
|
398
|
+
if(allTableRelations.hasOwnProperty(tableName)){
|
|
399
|
+
return allTableRelations[tableName]();
|
|
400
|
+
}
|
|
401
|
+
console.info('移动审批:未找到子表主键信息,对应子表为:'+tableName);
|
|
402
|
+
return "";
|
|
403
|
+
}`;
|
|
404
|
+
return generateString;
|
|
405
|
+
}
|
|
406
|
+
generateTemplateByPanelIdFunction(childDetailTemplate) {
|
|
407
|
+
let generateString = "";
|
|
408
|
+
if (toolhepler_1.ToolHelper.isArray(childDetailTemplate, false)) {
|
|
409
|
+
childDetailTemplate.forEach((item) => {
|
|
410
|
+
generateString += `
|
|
411
|
+
allTmplate['${item.templateId}']=function(){
|
|
412
|
+
var templateHtml=\` <div class="fm-apply-panel"><div class="fm-apply-list">${item.templateHtml}</div></div>\`;
|
|
413
|
+
return templateHtml;
|
|
414
|
+
}`;
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
return generateString;
|
|
418
|
+
}
|
|
419
|
+
generateTablePrimaryRelationFunction(childTablePrimary) {
|
|
420
|
+
let generateString = "";
|
|
421
|
+
if (toolhepler_1.ToolHelper.isArray(childTablePrimary, false)) {
|
|
422
|
+
childTablePrimary.forEach((item) => {
|
|
423
|
+
generateString += `
|
|
424
|
+
allTableRelations['${item.tableName}']=function(){
|
|
425
|
+
return '${item.primary}';
|
|
426
|
+
}`;
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
return generateString;
|
|
430
|
+
}
|
|
431
|
+
generateFormConfigParameter(moduleJson) {
|
|
432
|
+
const processInstance = moduleJson.components.find((t) => {
|
|
433
|
+
return t.componentType == "flowProcessForMobileApprove";
|
|
434
|
+
});
|
|
435
|
+
const detailHeaderComponent = moduleJson.components.find((t) => {
|
|
436
|
+
return t.componentType == "detailHeaderForMobileApprove";
|
|
437
|
+
});
|
|
438
|
+
let generateString = "";
|
|
439
|
+
if (processInstance) {
|
|
440
|
+
const flowProcessInstance = processInstance.contents.find((t) => {
|
|
441
|
+
return t.type == "FlowProcessForMobileApprove";
|
|
442
|
+
});
|
|
443
|
+
const beID = this.readBeId(moduleJson);
|
|
444
|
+
const voID = this.readVoId(moduleJson);
|
|
445
|
+
const eapiId = this.readEapiId(moduleJson);
|
|
446
|
+
const getDataMethod = this.readGetDataMethod(moduleJson);
|
|
447
|
+
const baseUri = this.readBaseUri(moduleJson);
|
|
448
|
+
if (flowProcessInstance) {
|
|
449
|
+
generateString += `
|
|
450
|
+
beId:"${beID}",
|
|
451
|
+
voId:"${voID}",
|
|
452
|
+
eapiId:"${eapiId}",
|
|
453
|
+
baseUri:"${baseUri}",
|
|
454
|
+
getDataMethod:"${getDataMethod}",
|
|
455
|
+
approvalLogTitle: "${flowProcessInstance.title}",
|
|
456
|
+
approvalLogShowPresetTitle: ${flowProcessInstance.showPresetTitle},
|
|
457
|
+
isShowApprovalLogs: ${flowProcessInstance.visible.value},
|
|
458
|
+
isIncludeHistory: ${flowProcessInstance.isIncludeHistory},
|
|
459
|
+
processInstanceIdPath: '${flowProcessInstance.processInstance.bindingPath}',
|
|
460
|
+
formDataSortConfig : ${this.generateChildSortFields(moduleJson)},
|
|
461
|
+
i18n : ${this.generatei18nResources(moduleJson)}`;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if (detailHeaderComponent) {
|
|
465
|
+
const detailHeaderForMobileApprove = detailHeaderComponent.contents.find((t) => {
|
|
466
|
+
return t.type == "DetailHeaderForMobileApprove";
|
|
467
|
+
});
|
|
468
|
+
if (detailHeaderForMobileApprove && detailHeaderForMobileApprove.enablePersonAvatar) {
|
|
469
|
+
if (generateString) {
|
|
470
|
+
generateString += ",";
|
|
471
|
+
}
|
|
472
|
+
generateString += `
|
|
473
|
+
enablePersonAvatar: ${detailHeaderForMobileApprove.enablePersonAvatar},
|
|
474
|
+
personAvatarPath: '${detailHeaderForMobileApprove.headerPersonAvatar ? detailHeaderForMobileApprove.headerPersonAvatar.bindingPath : ""}'`;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
generateString = this.addConfig(generateString, moduleJson);
|
|
478
|
+
return generateString;
|
|
479
|
+
}
|
|
480
|
+
addConfig(generateString, moduleJson) {
|
|
481
|
+
generateString += ",";
|
|
482
|
+
const config = this.readFrameConfig(moduleJson);
|
|
483
|
+
return generateString += `${config}`;
|
|
484
|
+
}
|
|
485
|
+
readBeId(moduleJson) {
|
|
486
|
+
if (moduleJson && toolhepler_1.ToolHelper.isArray(moduleJson.schemas, false)) {
|
|
487
|
+
let beId = moduleJson.schemas[0].beId;
|
|
488
|
+
if (!beId) {
|
|
489
|
+
beId = "";
|
|
490
|
+
}
|
|
491
|
+
return beId;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
readVoId(moduleJson) {
|
|
495
|
+
if (moduleJson && toolhepler_1.ToolHelper.isArray(moduleJson.schemas, false)) {
|
|
496
|
+
let voId = moduleJson.schemas[0].id;
|
|
497
|
+
if (!voId) {
|
|
498
|
+
voId = "";
|
|
499
|
+
}
|
|
500
|
+
return voId;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
readEapiId(moduleJson) {
|
|
504
|
+
if (moduleJson && toolhepler_1.ToolHelper.isArray(moduleJson.schemas, false)) {
|
|
505
|
+
let eapiId = moduleJson.schemas[0].eapiId;
|
|
506
|
+
if (!eapiId) {
|
|
507
|
+
eapiId = "";
|
|
508
|
+
}
|
|
509
|
+
return eapiId;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
readGetDataMethod(moduleJson) {
|
|
513
|
+
if (moduleJson && toolhepler_1.ToolHelper.isArray(moduleJson.schemas, false)) {
|
|
514
|
+
let dataMethod = moduleJson.schemas[0].getDataMethod;
|
|
515
|
+
if (!dataMethod) {
|
|
516
|
+
dataMethod = "";
|
|
517
|
+
}
|
|
518
|
+
return dataMethod;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
readBaseUri(moduleJson) {
|
|
522
|
+
if (moduleJson && toolhepler_1.ToolHelper.isArray(moduleJson.schemas, false)) {
|
|
523
|
+
let baseUri = moduleJson.schemas[0].baseUri;
|
|
524
|
+
if (!baseUri) {
|
|
525
|
+
baseUri = "";
|
|
526
|
+
}
|
|
527
|
+
return baseUri;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
getComponentByType(moduleJson, type) {
|
|
531
|
+
return moduleJson.components.find((t) => {
|
|
532
|
+
return t.componentType === type;
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
readFrameConfig(moduleJson) {
|
|
536
|
+
const frameComponent = this.getComponentByType(moduleJson, "Frame");
|
|
537
|
+
const containContent = frameComponent.contents.find((t) => {
|
|
538
|
+
return t.type == "ContentContainer";
|
|
539
|
+
});
|
|
540
|
+
return `
|
|
541
|
+
enableNavigation:${containContent.contents[0].enableNavigation},
|
|
542
|
+
navigationType:"${containContent.contents[0].navigationType}"`;
|
|
543
|
+
}
|
|
544
|
+
generateChildSortFields(currentModuleJson) {
|
|
545
|
+
let generateString = "";
|
|
546
|
+
if (!currentModuleJson || toolhepler_1.ToolHelper.isArray(currentModuleJson.components, false) == false) {
|
|
547
|
+
return generateString;
|
|
548
|
+
}
|
|
549
|
+
const sortFieldsJson = {};
|
|
550
|
+
currentModuleJson.components.forEach((itemComponent) => {
|
|
551
|
+
if (toolhepler_1.ToolHelper.isArray(itemComponent.contents, false)) {
|
|
552
|
+
if (itemComponent.contents[0].type == "PanelForMobileApprove" && toolhepler_1.ToolHelper.isArray(itemComponent.contents[0].sortFields, false)) {
|
|
553
|
+
const componentViewModel = itemComponent.viewModel;
|
|
554
|
+
if (toolhepler_1.ToolHelper.isArray(currentModuleJson.viewmodels, false)) {
|
|
555
|
+
const findViewModel = currentModuleJson.viewmodels.find((itemViewModel) => {
|
|
556
|
+
return itemViewModel.id == componentViewModel;
|
|
557
|
+
});
|
|
558
|
+
if (findViewModel) {
|
|
559
|
+
sortFieldsJson[findViewModel.bindTo] = [];
|
|
560
|
+
itemComponent.contents[0].sortFields.forEach((itemSortField) => {
|
|
561
|
+
sortFieldsJson[findViewModel.bindTo].push({
|
|
562
|
+
sortField: itemSortField.label,
|
|
563
|
+
sortType: itemSortField.sortType
|
|
564
|
+
});
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
generateString = JSON.stringify(sortFieldsJson);
|
|
572
|
+
return generateString;
|
|
573
|
+
}
|
|
574
|
+
generatei18nResources(currentModuleJson) {
|
|
575
|
+
let generateString = "";
|
|
576
|
+
const i18n = currentModuleJson.i18n;
|
|
577
|
+
if (!currentModuleJson || !i18n) {
|
|
578
|
+
return JSON.stringify({});
|
|
579
|
+
}
|
|
580
|
+
const i18nJson = { 'zh-CN': i18n['zh-CN'], 'en': i18n.en, 'zh-CHT': i18n['zh-CHT'] };
|
|
581
|
+
generateString = JSON.stringify(i18nJson);
|
|
582
|
+
return generateString;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
exports.IndexHtmlGenerator = IndexHtmlGenerator;
|
|
583
586
|
//# sourceMappingURL=index-html-generator.js.map
|