@maketribe/ms-app 3.0.38 → 3.0.40
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/dist/cjs/core/UserInfo.d.ts +1 -1
- package/dist/cjs/core/UserInfo.js +2 -1
- package/dist/cjs/core/UserInfo.js.map +1 -1
- package/dist/esm/core/UserInfo.d.ts +1 -1
- package/dist/esm/core/UserInfo.js +2 -1
- package/dist/esm/core/UserInfo.js.map +1 -1
- package/dist/style/index.css +1 -1
- package/dist/style/layouts/default/header.css +1 -1
- package/dist/style/layouts/default/index.css +1 -1
- package/dist/style/layouts/index.css +1 -1
- package/dist/style/src/layouts/default/header.scss +1 -0
- package/package.json +1 -1
- package/src/components/button/button-options.ts +0 -22
- package/src/components/button/button.tsx +0 -37
- package/src/components/button/index.ts +0 -7
- package/src/components/column-components/column-action/column-action-options.ts +0 -11
- package/src/components/column-components/column-action/column-action.tsx +0 -36
- package/src/components/column-components/column-action/index.ts +0 -4
- package/src/components/column-components/column-date/column-date-options.ts +0 -12
- package/src/components/column-components/column-date/column-date.tsx +0 -47
- package/src/components/column-components/column-date/index.ts +0 -6
- package/src/components/column-components/column-image/column-image-options.ts +0 -9
- package/src/components/column-components/column-image/column-image.tsx +0 -20
- package/src/components/column-components/column-image/index.ts +0 -4
- package/src/components/column-components/column-json/column-json-options.ts +0 -13
- package/src/components/column-components/column-json/column-json.tsx +0 -41
- package/src/components/column-components/column-json/index.ts +0 -8
- package/src/components/column-components/column-link/column-link-options.ts +0 -34
- package/src/components/column-components/column-link/column-link.tsx +0 -27
- package/src/components/column-components/column-link/index.ts +0 -7
- package/src/components/column-components/column-object-mapping-text/column-object-mapping-text-options.ts +0 -12
- package/src/components/column-components/column-object-mapping-text/column-object-mapping-text.tsx +0 -22
- package/src/components/column-components/column-object-mapping-text/index.ts +0 -6
- package/src/components/column-components/column-select/column-select-header-options.ts +0 -8
- package/src/components/column-components/column-select/column-select-header.tsx +0 -57
- package/src/components/column-components/column-select/column-select-options.ts +0 -9
- package/src/components/column-components/column-select/column-select.tsx +0 -74
- package/src/components/column-components/column-select/index.ts +0 -5
- package/src/components/column-components/column-switch/column-switch-options.ts +0 -16
- package/src/components/column-components/column-switch/column-switch.tsx +0 -37
- package/src/components/column-components/column-switch/index.ts +0 -6
- package/src/components/column-components/column-tag/column-tag-options.ts +0 -42
- package/src/components/column-components/column-tag/column-tag.tsx +0 -59
- package/src/components/column-components/column-tag/index.ts +0 -6
- package/src/components/column-components/column-text/column-text-options.ts +0 -10
- package/src/components/column-components/column-text/column-text.tsx +0 -18
- package/src/components/column-components/column-text/index.ts +0 -6
- package/src/components/column-components/index.ts +0 -10
- package/src/components/condition-components/condition-date/condition-date-options.ts +0 -25
- package/src/components/condition-components/condition-date/condition-date.tsx +0 -70
- package/src/components/condition-components/condition-date/index.ts +0 -7
- package/src/components/condition-components/condition-input/condition-input-options.ts +0 -10
- package/src/components/condition-components/condition-input/condition-input.tsx +0 -41
- package/src/components/condition-components/condition-input/index.ts +0 -7
- package/src/components/condition-components/condition-number/condition-number-options.ts +0 -22
- package/src/components/condition-components/condition-number/condition-number.tsx +0 -74
- package/src/components/condition-components/condition-number/index.ts +0 -7
- package/src/components/condition-components/condition-select/condition-select-options.ts +0 -31
- package/src/components/condition-components/condition-select/condition-select.tsx +0 -56
- package/src/components/condition-components/condition-select/index.ts +0 -7
- package/src/components/condition-components/index.ts +0 -4
- package/src/components/config-provider/config-provider-options.ts +0 -24
- package/src/components/config-provider/config-provider.tsx +0 -21
- package/src/components/config-provider/constants.ts +0 -8
- package/src/components/config-provider/index.ts +0 -9
- package/src/components/config-provider/use-global-config.ts +0 -70
- package/src/components/data-model/data-filter-form/composables/index.ts +0 -1
- package/src/components/data-model/data-filter-form/composables/use-condition.ts +0 -68
- package/src/components/data-model/data-filter-form/data-filter-form-item/data-filter-form-item-options.ts +0 -11
- package/src/components/data-model/data-filter-form/data-filter-form-item/data-filter-form-item.tsx +0 -183
- package/src/components/data-model/data-filter-form/data-filter-form-item/index.ts +0 -7
- package/src/components/data-model/data-filter-form/data-filter-form-options.ts +0 -15
- package/src/components/data-model/data-filter-form/data-filter-form.tsx +0 -103
- package/src/components/data-model/data-filter-form/index.ts +0 -13
- package/src/components/data-model/data-filter-form/operator-options.ts +0 -48
- package/src/components/data-model/data-filter-form/token.ts +0 -30
- package/src/components/data-model/data-filter-popover/data-filter-popover-options.ts +0 -6
- package/src/components/data-model/data-filter-popover/data-filter-popover.tsx +0 -52
- package/src/components/data-model/data-filter-popover/index.ts +0 -8
- package/src/components/data-model/data-form/composables/index.ts +0 -1
- package/src/components/data-model/data-form/composables/use-form-item.ts +0 -40
- package/src/components/data-model/data-form/data-form-item/data-form-item-options.ts +0 -11
- package/src/components/data-model/data-form/data-form-item/data-form-item.tsx +0 -140
- package/src/components/data-model/data-form/data-form-item/index.ts +0 -6
- package/src/components/data-model/data-form/data-form-options.ts +0 -43
- package/src/components/data-model/data-form/data-form.tsx +0 -113
- package/src/components/data-model/data-form/index.ts +0 -13
- package/src/components/data-model/data-form/token.ts +0 -16
- package/src/components/data-model/data-form/views/form/form-options.ts +0 -16
- package/src/components/data-model/data-form/views/form/form.tsx +0 -206
- package/src/components/data-model/data-form/views/form/index.ts +0 -6
- package/src/components/data-model/data-form/views/form-view/form-view-options.ts +0 -17
- package/src/components/data-model/data-form/views/form-view/form-view.tsx +0 -68
- package/src/components/data-model/data-form/views/form-view/index.ts +0 -6
- package/src/components/data-model/data-form/views/index.ts +0 -2
- package/src/components/data-model/data-form-page/data-form-page-options.ts +0 -20
- package/src/components/data-model/data-form-page/data-form-page.tsx +0 -57
- package/src/components/data-model/data-form-page/index.ts +0 -7
- package/src/components/data-model/data-table/composables/index.ts +0 -1
- package/src/components/data-model/data-table/composables/use-column.ts +0 -23
- package/src/components/data-model/data-table/data-table-column/data-table-column-options.ts +0 -11
- package/src/components/data-model/data-table/data-table-column/data-table-column.tsx +0 -18
- package/src/components/data-model/data-table/data-table-column/index.ts +0 -7
- package/src/components/data-model/data-table/data-table-column-component/data-table-column-component-options.ts +0 -13
- package/src/components/data-model/data-table/data-table-column-component/data-table-column-component.tsx +0 -38
- package/src/components/data-model/data-table/data-table-column-component/index.ts +0 -7
- package/src/components/data-model/data-table/data-table-options.ts +0 -24
- package/src/components/data-model/data-table/data-table.tsx +0 -102
- package/src/components/data-model/data-table/index.ts +0 -17
- package/src/components/data-model/data-table/token.ts +0 -10
- package/src/components/data-model/data-table/views/index.ts +0 -5
- package/src/components/data-model/data-table/views/table/index.ts +0 -8
- package/src/components/data-model/data-table/views/table/table-options.ts +0 -12
- package/src/components/data-model/data-table/views/table/table.tsx +0 -98
- package/src/components/data-model/data-table/views/table-tree/index.ts +0 -8
- package/src/components/data-model/data-table/views/table-tree/table-tree-options.ts +0 -12
- package/src/components/data-model/data-table/views/table-tree/table-tree.tsx +0 -104
- package/src/components/data-model/data-table/views/table-view/classify-search/classify-search-item/classify-search-item-options.ts +0 -34
- package/src/components/data-model/data-table/views/table-view/classify-search/classify-search-item/classify-search-item.tsx +0 -97
- package/src/components/data-model/data-table/views/table-view/classify-search/classify-search-item/index.ts +0 -5
- package/src/components/data-model/data-table/views/table-view/classify-search/classify-search.tsx +0 -40
- package/src/components/data-model/data-table/views/table-view/classify-search/index.ts +0 -7
- package/src/components/data-model/data-table/views/table-view/index.ts +0 -8
- package/src/components/data-model/data-table/views/table-view/table-view-options.ts +0 -13
- package/src/components/data-model/data-table/views/table-view/table-view.tsx +0 -126
- package/src/components/data-model/data-table/views/tree/index.ts +0 -8
- package/src/components/data-model/data-table/views/tree/tree-options.ts +0 -14
- package/src/components/data-model/data-table/views/tree/tree.tsx +0 -131
- package/src/components/data-model/data-table/views/tree-view/index.ts +0 -8
- package/src/components/data-model/data-table/views/tree-view/tree-view-options.ts +0 -16
- package/src/components/data-model/data-table/views/tree-view/tree-view.tsx +0 -81
- package/src/components/data-model/data-table-page/data-table-page-options.ts +0 -11
- package/src/components/data-model/data-table-page/data-table-page.tsx +0 -26
- package/src/components/data-model/data-table-page/index.ts +0 -6
- package/src/components/data-model/data-table-pagination/data-table-pagination-options.ts +0 -14
- package/src/components/data-model/data-table-pagination/data-table-pagination.tsx +0 -22
- package/src/components/data-model/data-table-pagination/index.ts +0 -7
- package/src/components/data-model/filter-panel/composables/index.ts +0 -1
- package/src/components/data-model/filter-panel/composables/use-condition.ts +0 -66
- package/src/components/data-model/filter-panel/filter-panel-item/filter-panel-item-options.ts +0 -11
- package/src/components/data-model/filter-panel/filter-panel-item/filter-panel-item.tsx +0 -187
- package/src/components/data-model/filter-panel/filter-panel-item/index.ts +0 -7
- package/src/components/data-model/filter-panel/filter-panel-options.ts +0 -15
- package/src/components/data-model/filter-panel/filter-panel.tsx +0 -102
- package/src/components/data-model/filter-panel/index.ts +0 -11
- package/src/components/data-model/filter-panel/operator-options.ts +0 -48
- package/src/components/data-model/filter-panel/token.ts +0 -17
- package/src/components/data-model/index.ts +0 -5
- package/src/components/data-select/data-select-options.ts +0 -43
- package/src/components/data-select/data-select.tsx +0 -87
- package/src/components/data-select/index.ts +0 -7
- package/src/components/data-table-select/data-table-select-options.ts +0 -43
- package/src/components/data-table-select/data-table-select.tsx +0 -190
- package/src/components/data-table-select/index.ts +0 -6
- package/src/components/data-table-select-dialog/data-table-select-dialog-options.ts +0 -33
- package/src/components/data-table-select-dialog/data-table-select-dialog.tsx +0 -154
- package/src/components/data-table-select-dialog/index.ts +0 -7
- package/src/components/file-view/file-view-options.ts +0 -8
- package/src/components/file-view/file-view.tsx +0 -40
- package/src/components/file-view/index.ts +0 -7
- package/src/components/form-components/form-data-select/form-data-select-options.ts +0 -23
- package/src/components/form-components/form-data-select/form-data-select.tsx +0 -28
- package/src/components/form-components/form-data-select/index.ts +0 -7
- package/src/components/form-components/form-data-table-select/form-data-table-select-options.ts +0 -19
- package/src/components/form-components/form-data-table-select/form-data-table-select.tsx +0 -32
- package/src/components/form-components/form-data-table-select/index.ts +0 -7
- package/src/components/form-components/form-date-picker/form-date-picker-options.ts +0 -18
- package/src/components/form-components/form-date-picker/form-date-picker.tsx +0 -49
- package/src/components/form-components/form-date-picker/index.ts +0 -8
- package/src/components/form-components/form-detail/form-detail-options.ts +0 -15
- package/src/components/form-components/form-detail/form-detail.tsx +0 -112
- package/src/components/form-components/form-detail/index.ts +0 -7
- package/src/components/form-components/form-detail-select/form-detail-select-options.ts +0 -39
- package/src/components/form-components/form-detail-select/form-detail-select.tsx +0 -68
- package/src/components/form-components/form-detail-select/index.ts +0 -5
- package/src/components/form-components/form-icon-select/form-icon-select-options.ts +0 -9
- package/src/components/form-components/form-icon-select/form-icon-select.tsx +0 -71
- package/src/components/form-components/form-icon-select/index.ts +0 -5
- package/src/components/form-components/form-image-upload/form-image-upload-options.ts +0 -11
- package/src/components/form-components/form-image-upload/form-image-upload.tsx +0 -22
- package/src/components/form-components/form-image-upload/index.ts +0 -5
- package/src/components/form-components/form-radio-box/form-radio-box-options.ts +0 -32
- package/src/components/form-components/form-radio-box/form-radio-box.tsx +0 -83
- package/src/components/form-components/form-radio-box/index.ts +0 -7
- package/src/components/form-components/form-rich-text-editor/form-rich-text-editor-options.ts +0 -6
- package/src/components/form-components/form-rich-text-editor/form-rich-text-editor.tsx +0 -22
- package/src/components/form-components/form-rich-text-editor/index.ts +0 -7
- package/src/components/form-components/index.ts +0 -9
- package/src/components/image-select/image-select-option.ts +0 -11
- package/src/components/image-select/image-select.tsx +0 -44
- package/src/components/image-select/index.ts +0 -6
- package/src/components/image-view/image-view-options.ts +0 -14
- package/src/components/image-view/image-view.tsx +0 -30
- package/src/components/image-view/index.ts +0 -7
- package/src/components/index.ts +0 -23
- package/src/components/json-editor/index.ts +0 -8
- package/src/components/json-editor/json-editor-options.ts +0 -21
- package/src/components/json-editor/json-editor.tsx +0 -28
- package/src/components/markdown-editor/index.ts +0 -10
- package/src/components/markdown-editor/markdown-editor-options.ts +0 -17
- package/src/components/markdown-editor/markdown-editor.tsx +0 -136
- package/src/components/material-list/index.ts +0 -7
- package/src/components/material-list/material-group-form-popover.vue +0 -78
- package/src/components/material-list/material-group.vue +0 -145
- package/src/components/material-list/material-item.vue +0 -26
- package/src/components/material-list/material-list-options.ts +0 -24
- package/src/components/material-list/material-list.vue +0 -153
- package/src/components/material-select/index.ts +0 -17
- package/src/components/material-select/material-select-api.ts +0 -55
- package/src/components/material-select/material-select-options.ts +0 -22
- package/src/components/material-select/material-select-type.ts +0 -21
- package/src/components/material-select/material-select.tsx +0 -106
- package/src/components/pagination/index.ts +0 -7
- package/src/components/pagination/pagination-options.tsx +0 -30
- package/src/components/pagination/pagination.tsx +0 -41
- package/src/components/rich-text-editor/index.ts +0 -10
- package/src/components/rich-text-editor/langs/zh-Hans.js +0 -1
- package/src/components/rich-text-editor/rich-text-editor-options.ts +0 -21
- package/src/components/rich-text-editor/rich-text-editor.tsx +0 -111
- package/src/components/role-permission-config/index.ts +0 -7
- package/src/components/role-permission-config/role-permission-config-options.ts +0 -20
- package/src/components/role-permission-config/role-permission-config.tsx +0 -269
- package/src/components/svg-icon/index.ts +0 -5
- package/src/components/svg-icon/svg-icon-options.ts +0 -21
- package/src/components/svg-icon/svg-icon.tsx +0 -48
- package/src/components/system-provider/index.ts +0 -5
- package/src/components/system-provider/system-provider.tsx +0 -95
- package/src/components/upload-file/context/MaterialUploadContext.ts +0 -33
- package/src/components/upload-file/context/UploadContext.ts +0 -21
- package/src/components/upload-file/context/WebFileUploadContext.ts +0 -77
- package/src/components/upload-file/context/index.ts +0 -7
- package/src/components/upload-file/context/material-upload-context-options.ts +0 -13
- package/src/components/upload-file/context/material-upload-context.tsx +0 -34
- package/src/components/upload-file/context/web-file-upload-context-options.ts +0 -16
- package/src/components/upload-file/context/web-file-upload-context.tsx +0 -37
- package/src/components/upload-file/index.ts +0 -11
- package/src/components/upload-file/ui/index.ts +0 -1
- package/src/components/upload-file/ui/upload-image/index.ts +0 -7
- package/src/components/upload-file/ui/upload-image/upload-image-options.ts +0 -25
- package/src/components/upload-file/ui/upload-image/upload-image.tsx +0 -337
- package/src/components/upload-file/upload-file-options.ts +0 -22
- package/src/components/upload-file/upload-file.tsx +0 -69
- package/src/components/verify-dialog/index.ts +0 -5
- package/src/components/verify-dialog/verify-dialog-option.ts +0 -24
- package/src/components/verify-dialog/verify-dialog.tsx +0 -179
- package/src/components/video-view/index.ts +0 -7
- package/src/components/video-view/video-view-options.ts +0 -10
- package/src/components/video-view/video-view.tsx +0 -115
- package/src/composables/create-data-form.ts +0 -6
- package/src/composables/create-data-table.ts +0 -8
- package/src/composables/index.ts +0 -17
- package/src/composables/on-tab-before-close.ts +0 -8
- package/src/composables/on-tab-before-switch.ts +0 -8
- package/src/composables/on-tab-refresh.ts +0 -8
- package/src/composables/use-column-component.ts +0 -184
- package/src/composables/use-current-tab.ts +0 -4
- package/src/composables/use-http-request.ts +0 -5
- package/src/composables/use-i18n.ts +0 -7
- package/src/composables/use-ms-app-client.ts +0 -10
- package/src/composables/use-user-info.ts +0 -4
- package/src/constants/index.ts +0 -6
- package/src/constants/log.ts +0 -5
- package/src/constants/menu.ts +0 -5
- package/src/constants/pattern.ts +0 -4
- package/src/constants/region.ts +0 -6
- package/src/constants/route.ts +0 -4
- package/src/constants/token.ts +0 -5
- package/src/core/DataModelDefines.ts +0 -72
- package/src/core/MSAppClient.ts +0 -260
- package/src/core/PageManager.ts +0 -169
- package/src/core/PermissionPointManager.ts +0 -26
- package/src/core/Router.ts +0 -150
- package/src/core/UserInfo.ts +0 -66
- package/src/core/UserSession.ts +0 -215
- package/src/core/component/ConfigComponents.ts +0 -32
- package/src/core/component/DataFilterComponents.ts +0 -40
- package/src/core/component/DataFormComponents.ts +0 -93
- package/src/core/component/DataTableComponents.ts +0 -91
- package/src/core/component/MaterialComponents.ts +0 -32
- package/src/core/component/index.ts +0 -5
- package/src/core/index.ts +0 -11
- package/src/core/menu/Menu.ts +0 -143
- package/src/core/menu/MenuNode.ts +0 -53
- package/src/core/menu/index.ts +0 -2
- package/src/core/resolver/ITypeResolver.ts +0 -5
- package/src/core/tabs/Tab.ts +0 -59
- package/src/core/tabs/Tabs.ts +0 -187
- package/src/core/tabs/index.ts +0 -2
- package/src/dataview/config/ConfigForm.ts +0 -142
- package/src/dataview/config/ConfigTable.ts +0 -72
- package/src/dataview/config/index.ts +0 -2
- package/src/dataview/deny-ip-access-list/DenyIPAccessListForm.ts +0 -33
- package/src/dataview/deny-ip-access-list/DenyIPAccessListTable.ts +0 -84
- package/src/dataview/deny-ip-access-list/index.ts +0 -2
- package/src/dataview/department/DepartmentForm.ts +0 -41
- package/src/dataview/department/DepartmentTable.ts +0 -64
- package/src/dataview/department/DepartmentTree.ts +0 -47
- package/src/dataview/department/index.ts +0 -3
- package/src/dataview/index.ts +0 -11
- package/src/dataview/ip-white-list/IPWhitelistForm.ts +0 -38
- package/src/dataview/ip-white-list/IPWhitelistTable.ts +0 -81
- package/src/dataview/ip-white-list/index.ts +0 -2
- package/src/dataview/log/index.ts +0 -4
- package/src/dataview/log/local-log/LocalLogTree.ts +0 -77
- package/src/dataview/log/local-log/index.ts +0 -1
- package/src/dataview/log/login-log/LoginLogTable.ts +0 -55
- package/src/dataview/log/login-log/index.ts +0 -1
- package/src/dataview/log/operate-log/OperateLogTable.ts +0 -20
- package/src/dataview/log/operate-log/index.ts +0 -1
- package/src/dataview/log/request-log/RequestLogTable.ts +0 -82
- package/src/dataview/log/request-log/index.ts +0 -1
- package/src/dataview/material/MaterialForm.ts +0 -49
- package/src/dataview/material/MaterialMan.ts +0 -203
- package/src/dataview/material/MaterialTable.ts +0 -125
- package/src/dataview/material/index.ts +0 -4
- package/src/dataview/material/material-group/MaterialGroupForm.ts +0 -27
- package/src/dataview/material/material-group/MaterialGroupTable.ts +0 -57
- package/src/dataview/material/material-group/MaterialGroupTree.ts +0 -72
- package/src/dataview/material/material-group/index.ts +0 -3
- package/src/dataview/member/MemberForm.ts +0 -124
- package/src/dataview/member/MemberTable.tsx +0 -263
- package/src/dataview/member/index.ts +0 -2
- package/src/dataview/member/member-role/MemberRoleTable.ts +0 -23
- package/src/dataview/menu/MenuForm.ts +0 -192
- package/src/dataview/menu/MenuTable.ts +0 -40
- package/src/dataview/menu/MenuTree.ts +0 -112
- package/src/dataview/menu/index.ts +0 -4
- package/src/dataview/menu/permission-point/PermissionPointDefineForm.ts +0 -30
- package/src/dataview/menu/permission-point/PermissionPointDefineTable.ts +0 -32
- package/src/dataview/menu/permission-point/index.ts +0 -2
- package/src/dataview/region/RegionForm.ts +0 -52
- package/src/dataview/region/RegionTable.ts +0 -64
- package/src/dataview/region/index.ts +0 -2
- package/src/dataview/role/RoleForm.ts +0 -34
- package/src/dataview/role/RolePermissionConfigTable.ts +0 -476
- package/src/dataview/role/RoleTable.ts +0 -70
- package/src/dataview/role/index.ts +0 -5
- package/src/dataview/role/role-permission-point/RolePermissionPointTable.ts +0 -29
- package/src/dataview/role/role-permission-point/index.ts +0 -1
- package/src/dataview/role/role-route/RoleRouteTable.ts +0 -30
- package/src/dataview/role/role-route/index.ts +0 -1
- package/src/dataview/route/RouteForm.ts +0 -94
- package/src/dataview/route/RouteTable.ts +0 -73
- package/src/dataview/route/index.ts +0 -2
- package/src/define-data-form.ts +0 -12
- package/src/define-data-table.ts +0 -12
- package/src/define-data-tree.ts +0 -12
- package/src/index.ts +0 -19
- package/src/init-application.ts +0 -83
- package/src/installer.ts +0 -73
- package/src/layouts/components/bar/index.tsx +0 -102
- package/src/layouts/components/dialogs/dialogs.tsx +0 -100
- package/src/layouts/components/dialogs/index.ts +0 -5
- package/src/layouts/components/header/index.tsx +0 -23
- package/src/layouts/components/header/tools.tsx +0 -60
- package/src/layouts/components/index.ts +0 -3
- package/src/layouts/components/lock/index.ts +0 -5
- package/src/layouts/components/lock/lock.tsx +0 -92
- package/src/layouts/components/menu/index.tsx +0 -61
- package/src/layouts/components/menu/menu-item.tsx +0 -63
- package/src/layouts/container/default.tsx +0 -85
- package/src/layouts/index.ts +0 -6
- package/src/layouts/layout.tsx +0 -11
- package/src/message-impl/DialogerImpl.ts +0 -84
- package/src/message-impl/MessagerImpl.ts +0 -17
- package/src/message-impl/NotificationerImpl.ts +0 -17
- package/src/message-impl/index.ts +0 -3
- package/src/page/index/404.vue +0 -3
- package/src/page/index/dv/default/add.vue +0 -50
- package/src/page/index/dv/default/edit.vue +0 -56
- package/src/page/index/dv/default/single/list/dialog.vue +0 -155
- package/src/page/index/dv/default/single/list/normal.vue +0 -128
- package/src/page/index/dv/default/single/table-tree/dialog.vue +0 -60
- package/src/page/index/dv/default/single/tree/dialog.vue +0 -174
- package/src/page/index/dv/default/table.vue +0 -52
- package/src/page/index/dv/local-log/index.vue +0 -98
- package/src/page/index/dv/ms-member/index.vue +0 -33
- package/src/page/index/dv/ms-role/index.vue +0 -32
- package/src/page/index/material/index.vue +0 -16
- package/src/page/index.vue +0 -9
- package/src/page/login/index.vue +0 -196
- package/src/page/signup/index.vue +0 -157
- package/src/router-middleware/auth.ts +0 -31
- package/src/router-middleware/index.ts +0 -1
- package/src/tokens/index.ts +0 -1
- package/src/tokens/ms-app-client.ts +0 -10
- package/src/utils.ts +0 -233
package/src/core/MSAppClient.ts
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createRouter,
|
|
3
|
-
createWebHashHistory,
|
|
4
|
-
Router as VueRouter,
|
|
5
|
-
} from "vue-router";
|
|
6
|
-
import {
|
|
7
|
-
DataViewRequest,
|
|
8
|
-
DVQueryable,
|
|
9
|
-
HttpRequest,
|
|
10
|
-
R,
|
|
11
|
-
WebHttpRequest,
|
|
12
|
-
} from "@maketribe/request";
|
|
13
|
-
import { IComponents, DataModel, Components } from "@maketribe/dm";
|
|
14
|
-
import { I18n } from "@maketribe/locale";
|
|
15
|
-
|
|
16
|
-
import { Event, md5 } from "@maketribe/utils";
|
|
17
|
-
import { UserSession } from "./UserSession";
|
|
18
|
-
import { authBeforeEach } from "../router-middleware";
|
|
19
|
-
import { PageManager } from "./PageManager";
|
|
20
|
-
import { ACCESS_TOKEN_HEADER, X_ACCESS_TOKEN_HEADER } from "../constants";
|
|
21
|
-
|
|
22
|
-
export type LoginResult = {
|
|
23
|
-
account: string;
|
|
24
|
-
email: string;
|
|
25
|
-
nickName: string;
|
|
26
|
-
avatarPath: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export interface MSAppClientOptions {
|
|
30
|
-
pageManager?: PageManager;
|
|
31
|
-
projectName: string;
|
|
32
|
-
httpRequest?: HttpRequest;
|
|
33
|
-
origin: string;
|
|
34
|
-
appID: string;
|
|
35
|
-
logo?: string;
|
|
36
|
-
locale?: string;
|
|
37
|
-
vueRouter?: VueRouter;
|
|
38
|
-
dataTableComponents?: IComponents;
|
|
39
|
-
dataFormComponents?: IComponents;
|
|
40
|
-
dataFilterComponents?: IComponents;
|
|
41
|
-
whereFilterComponents?: IComponents;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export class MSAppClient {
|
|
45
|
-
static instance: MSAppClient | null = null;
|
|
46
|
-
|
|
47
|
-
origin: string = "";
|
|
48
|
-
|
|
49
|
-
private _options: Required<MSAppClientOptions>;
|
|
50
|
-
|
|
51
|
-
projectName: string;
|
|
52
|
-
|
|
53
|
-
logo: string;
|
|
54
|
-
|
|
55
|
-
appID: string;
|
|
56
|
-
|
|
57
|
-
userSession: UserSession | null = null;
|
|
58
|
-
|
|
59
|
-
httpRequest: HttpRequest;
|
|
60
|
-
|
|
61
|
-
ready: boolean = false;
|
|
62
|
-
|
|
63
|
-
initd: boolean = false;
|
|
64
|
-
|
|
65
|
-
pageManager: PageManager;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated
|
|
69
|
-
* @description 使用 MSAppClient.instance.userSession.userInfo
|
|
70
|
-
*/
|
|
71
|
-
get userInfo() {
|
|
72
|
-
return this.userSession?.userInfo ?? null;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
i18n: I18n;
|
|
76
|
-
|
|
77
|
-
dataTableComponents: IComponents;
|
|
78
|
-
dataFormComponents: IComponents;
|
|
79
|
-
dataFilterComponents: IComponents;
|
|
80
|
-
whereFilterComponents: IComponents;
|
|
81
|
-
|
|
82
|
-
vueRouter: VueRouter;
|
|
83
|
-
|
|
84
|
-
beforeInitUserSessionEvent: Event<{ userSession: UserSession }> = new Event();
|
|
85
|
-
|
|
86
|
-
userSessionChangeEvent: Event<{ userSession: UserSession | null }> =
|
|
87
|
-
new Event();
|
|
88
|
-
|
|
89
|
-
constructor(options: MSAppClientOptions) {
|
|
90
|
-
this._options = this._normalizeOptions(options);
|
|
91
|
-
|
|
92
|
-
this.appID = this._options.appID;
|
|
93
|
-
|
|
94
|
-
this.logo = this._options.logo;
|
|
95
|
-
|
|
96
|
-
this.projectName = options.projectName;
|
|
97
|
-
|
|
98
|
-
this.i18n = I18n.instance;
|
|
99
|
-
this.i18n.setCurrentLanguageName(this._options.locale);
|
|
100
|
-
|
|
101
|
-
this.dataTableComponents = this._options.dataTableComponents;
|
|
102
|
-
this.dataFormComponents = this._options.dataFormComponents;
|
|
103
|
-
this.dataFilterComponents = this._options.dataFilterComponents;
|
|
104
|
-
this.whereFilterComponents = this._options.whereFilterComponents;
|
|
105
|
-
|
|
106
|
-
this.vueRouter = this._options.vueRouter;
|
|
107
|
-
|
|
108
|
-
this.pageManager = this._options.pageManager;
|
|
109
|
-
|
|
110
|
-
HttpRequest.appID = this.appID;
|
|
111
|
-
|
|
112
|
-
this.httpRequest = this._options.httpRequest;
|
|
113
|
-
|
|
114
|
-
DataModel.setHttpRequest(this.httpRequest);
|
|
115
|
-
DVQueryable.setDefaultDataViewRequest(
|
|
116
|
-
new DataViewRequest({ httpRequest: this.httpRequest })
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
setUserSession(userSession: UserSession | null) {
|
|
121
|
-
if (this.userSession) {
|
|
122
|
-
this.userSession.dispose();
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
this.userSession = userSession;
|
|
126
|
-
|
|
127
|
-
this.userSessionChangeEvent.emit({ userSession });
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
private _normalizeOptions(
|
|
131
|
-
options: MSAppClientOptions
|
|
132
|
-
): Required<MSAppClientOptions> {
|
|
133
|
-
return {
|
|
134
|
-
appID: options.appID,
|
|
135
|
-
projectName: options.projectName,
|
|
136
|
-
httpRequest: options.httpRequest ?? new WebHttpRequest(),
|
|
137
|
-
origin: options.origin,
|
|
138
|
-
logo: options.logo || "",
|
|
139
|
-
locale: options.locale || "zh-cn",
|
|
140
|
-
vueRouter:
|
|
141
|
-
options.vueRouter ??
|
|
142
|
-
createRouter({
|
|
143
|
-
history: createWebHashHistory(),
|
|
144
|
-
routes: [],
|
|
145
|
-
}),
|
|
146
|
-
pageManager: options.pageManager ?? new PageManager(),
|
|
147
|
-
dataTableComponents: options.dataTableComponents ?? new Components(),
|
|
148
|
-
dataFormComponents: options.dataFormComponents ?? new Components(),
|
|
149
|
-
dataFilterComponents: options.dataFilterComponents ?? new Components(),
|
|
150
|
-
whereFilterComponents: options.whereFilterComponents ?? new Components(),
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
getI18n() {
|
|
154
|
-
return this.i18n;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
getOptions() {
|
|
158
|
-
return this._options;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
async loadCurrentUserSession(options?: {
|
|
162
|
-
accessToken: string;
|
|
163
|
-
xAccessToken: string;
|
|
164
|
-
}) {
|
|
165
|
-
const userSession = (this.userSession = new UserSession({
|
|
166
|
-
msAppClient: this,
|
|
167
|
-
...options,
|
|
168
|
-
}));
|
|
169
|
-
this.userSession = null;
|
|
170
|
-
|
|
171
|
-
this.beforeInitUserSessionEvent.emit({ userSession });
|
|
172
|
-
const userSessionInitResult = await userSession.init();
|
|
173
|
-
|
|
174
|
-
if (userSessionInitResult?.data.code !== 200) {
|
|
175
|
-
userSession.dispose();
|
|
176
|
-
return userSessionInitResult!;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
this.setUserSession(userSession);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
async init() {
|
|
183
|
-
if (this.initd) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
this.vueRouter.beforeEach(async (to, from, next) => {
|
|
188
|
-
const route = await authBeforeEach(this, to, from);
|
|
189
|
-
|
|
190
|
-
if (route) {
|
|
191
|
-
next(route);
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
next();
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
this.pageManager.init();
|
|
199
|
-
this.pageManager.setMSAppCLient(this);
|
|
200
|
-
|
|
201
|
-
this.httpRequest.getInterceptors().response.use((config) => {
|
|
202
|
-
if (config.data.code === 401) {
|
|
203
|
-
this.vueRouter.push({ name: "login" });
|
|
204
|
-
// if (this.userSession) {
|
|
205
|
-
// this.userSession.lock();
|
|
206
|
-
// } else {
|
|
207
|
-
// this.vueRouter.push({ name: "login" });
|
|
208
|
-
// }
|
|
209
|
-
}
|
|
210
|
-
return config;
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
this.initd = true;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
async login(account: string, password: string, code: string) {
|
|
217
|
-
const response = await this.httpRequest.request<R<LoginResult>>({
|
|
218
|
-
url: "/api/ms-login/login",
|
|
219
|
-
method: "POST",
|
|
220
|
-
data: { account, password: md5(`mkbl#${password}`), vCode: code },
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
if (response.data.code === 200) {
|
|
224
|
-
await this.loadCurrentUserSession({
|
|
225
|
-
accessToken: response.headers[ACCESS_TOKEN_HEADER],
|
|
226
|
-
xAccessToken: response.headers[X_ACCESS_TOKEN_HEADER],
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
return response;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
formatURL(url: string) {
|
|
234
|
-
return url;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
async modifyPassword(account: string, code: string) {
|
|
238
|
-
type LoginResult = {
|
|
239
|
-
account: string;
|
|
240
|
-
email: string;
|
|
241
|
-
nickName: string;
|
|
242
|
-
avatarPath: string;
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
const response = await this.httpRequest.request<R<LoginResult>>({
|
|
246
|
-
url: "/api/ms-login/modify-password",
|
|
247
|
-
method: "POST",
|
|
248
|
-
data: { account, vCode: code },
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
return response;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
async logout() {
|
|
255
|
-
this.userSession?.dispose();
|
|
256
|
-
this.setUserSession(null);
|
|
257
|
-
|
|
258
|
-
return this.httpRequest.get("/api/ms-login/logout");
|
|
259
|
-
}
|
|
260
|
-
}
|
package/src/core/PageManager.ts
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { RouteRecordRaw } from "vue-router";
|
|
2
|
-
import type { MSAppClient } from "./MSAppClient";
|
|
3
|
-
import { Disposable, Event, createDisposable } from "@maketribe/utils";
|
|
4
|
-
|
|
5
|
-
export class PageManager {
|
|
6
|
-
normalPages: RouteRecordRaw[] = [];
|
|
7
|
-
|
|
8
|
-
extendsPages: RouteRecordRaw[] = [];
|
|
9
|
-
|
|
10
|
-
msAppClient: MSAppClient | null = null;
|
|
11
|
-
|
|
12
|
-
msAppClientChangeEvent: Event<{ msAppClient: MSAppClient | null }> =
|
|
13
|
-
new Event();
|
|
14
|
-
|
|
15
|
-
msAppClientDisposable: Disposable | null = null;
|
|
16
|
-
|
|
17
|
-
setMSAppCLient(msAppClient: MSAppClient | null) {
|
|
18
|
-
this.msAppClientDisposable?.dispose();
|
|
19
|
-
|
|
20
|
-
this.msAppClientDisposable = new Disposable();
|
|
21
|
-
|
|
22
|
-
this.msAppClient = msAppClient;
|
|
23
|
-
|
|
24
|
-
this.msAppClientChangeEvent.emit({ msAppClient });
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
addNormalPage(normalPage: RouteRecordRaw) {
|
|
28
|
-
this.normalPages.push(normalPage);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
addExtendsPage(extendsPage: RouteRecordRaw) {
|
|
32
|
-
this.extendsPages.push(extendsPage);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
init() {
|
|
36
|
-
this.addNormalPage({
|
|
37
|
-
name: "mk-ms-layout",
|
|
38
|
-
path: "/",
|
|
39
|
-
component: () => import("../page/index.vue"),
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
this.addNormalPage({
|
|
43
|
-
name: "login",
|
|
44
|
-
path: "/login",
|
|
45
|
-
meta: {
|
|
46
|
-
isAuthorization: false,
|
|
47
|
-
},
|
|
48
|
-
component: () => import("../page/login/index.vue"),
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
this.addNormalPage({
|
|
52
|
-
name: "signup",
|
|
53
|
-
path: "/signup",
|
|
54
|
-
meta: {
|
|
55
|
-
isAuthorization: false,
|
|
56
|
-
},
|
|
57
|
-
component: () => import("../page/signup/index.vue"),
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
this.addExtendsPage({
|
|
61
|
-
name: "dv/ms-material/list",
|
|
62
|
-
path: "/material-list",
|
|
63
|
-
component: () => import("../page/index/material/index.vue"),
|
|
64
|
-
meta: { name: "ms-material" },
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
this.addExtendsPage({
|
|
68
|
-
name: "dv/ms-member/single/list/normal",
|
|
69
|
-
path: "/dv/ms-member",
|
|
70
|
-
component: () => import("../page/index/dv/ms-member/index.vue"),
|
|
71
|
-
meta: { name: "ms-member" },
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
this.addExtendsPage({
|
|
75
|
-
name: "dv/ms-role/single/list/dialog",
|
|
76
|
-
path: "/dv/ms-role",
|
|
77
|
-
component: () => import("../page/index/dv/ms-role/index.vue"),
|
|
78
|
-
meta: { name: "ms-role" },
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
this.addExtendsPage({
|
|
82
|
-
name: "dv/local-log/single/tree/dialog",
|
|
83
|
-
path: "/log/local",
|
|
84
|
-
component: () => import("../page/index/dv/local-log/index.vue"),
|
|
85
|
-
meta: { name: "local-log" },
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
this.msAppClientChangeEvent.on(({ msAppClient }) => {
|
|
89
|
-
if (!msAppClient) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const vueRouter = msAppClient.vueRouter;
|
|
94
|
-
const vueRoutes = vueRouter.getRoutes();
|
|
95
|
-
|
|
96
|
-
const addedNormalPageNames: string[] = [];
|
|
97
|
-
|
|
98
|
-
for (const normalPage of this.normalPages) {
|
|
99
|
-
const vueRoute = vueRoutes.find(
|
|
100
|
-
(vueRoute) => vueRoute.name === normalPage.name
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
if (!vueRoute) {
|
|
104
|
-
addedNormalPageNames.push(normalPage.name as string);
|
|
105
|
-
vueRouter.addRoute(normalPage);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
this.msAppClientDisposable?.register(
|
|
110
|
-
createDisposable(() => {
|
|
111
|
-
for (const addedNormalPageName of addedNormalPageNames) {
|
|
112
|
-
vueRouter.removeRoute(addedNormalPageName);
|
|
113
|
-
}
|
|
114
|
-
})
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
this.msAppClientDisposable?.register(
|
|
118
|
-
msAppClient.beforeInitUserSessionEvent.on(({ userSession }) => {
|
|
119
|
-
if (!userSession) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
userSession.beforeInitRouterEvent.on(() => {
|
|
124
|
-
const router = userSession.router;
|
|
125
|
-
|
|
126
|
-
const addedExtendsPageNames: string[] = [];
|
|
127
|
-
|
|
128
|
-
for (const extendsPage of this.extendsPages) {
|
|
129
|
-
const routeInfo = router.getRouteByName(
|
|
130
|
-
extendsPage.name as string
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
if (!routeInfo) {
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const vueRoute = vueRoutes.find(
|
|
138
|
-
(vueRoute) => vueRoute.name === extendsPage.name
|
|
139
|
-
);
|
|
140
|
-
|
|
141
|
-
if (!vueRoute) {
|
|
142
|
-
extendsPage.path = routeInfo.route || extendsPage.path;
|
|
143
|
-
addedExtendsPageNames.push(extendsPage.name as string);
|
|
144
|
-
vueRouter.addRoute("mk-ms-layout", extendsPage);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (!this.extendsPages.find((page) => page.name === "notFound")) {
|
|
149
|
-
this.addExtendsPage({
|
|
150
|
-
name: "notFound",
|
|
151
|
-
// path: ":pathMatch(.*)*",
|
|
152
|
-
path: "",
|
|
153
|
-
component: () => import("../page/index/404.vue"),
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
userSession.register(
|
|
158
|
-
createDisposable(() => {
|
|
159
|
-
for (const addedExtendsPageName of addedExtendsPageNames) {
|
|
160
|
-
vueRouter.removeRoute(addedExtendsPageName);
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
);
|
|
164
|
-
});
|
|
165
|
-
})
|
|
166
|
-
);
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface PermissionPoint {
|
|
2
|
-
id: number;
|
|
3
|
-
menuId: string;
|
|
4
|
-
key: string;
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export class PermissionPointManager {
|
|
9
|
-
permissionPoints: PermissionPoint[];
|
|
10
|
-
|
|
11
|
-
constructor() {
|
|
12
|
-
this.permissionPoints = [];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
setPermissionPoints(permissionPoints: PermissionPoint[]) {
|
|
16
|
-
this.permissionPoints = permissionPoints;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
init() {}
|
|
20
|
-
|
|
21
|
-
getPermissionPointsByMenuID(menuID: string): PermissionPoint[] {
|
|
22
|
-
return this.permissionPoints.filter(
|
|
23
|
-
(permissionPoint) => permissionPoint.menuId === menuID
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
}
|
package/src/core/Router.ts
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { Disposable, Event, createDisposable } from "@maketribe/utils";
|
|
2
|
-
import { Route } from "../dataview";
|
|
3
|
-
import type { UserSession } from "./UserSession";
|
|
4
|
-
|
|
5
|
-
const NORMALIZE_ROUTE_NAME_REG = /^dv\/([^/]+)\/([^/]+)(\/.+)?$/;
|
|
6
|
-
|
|
7
|
-
export class Router extends Disposable {
|
|
8
|
-
userSession: UserSession;
|
|
9
|
-
|
|
10
|
-
routes: Route[] = [];
|
|
11
|
-
|
|
12
|
-
constructor(userSession: UserSession) {
|
|
13
|
-
super();
|
|
14
|
-
|
|
15
|
-
this.userSession = userSession;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
setRoutes(routes: Route[]) {
|
|
19
|
-
this.routes = routes;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
init() {
|
|
23
|
-
const vueRouter = this.userSession.vueRouter;
|
|
24
|
-
const vueRoutes = vueRouter.getRoutes();
|
|
25
|
-
|
|
26
|
-
// 给有权限访问的页面,注册默认页面
|
|
27
|
-
const defaultPageRoutes = this.routes.filter(
|
|
28
|
-
(route) => !vueRoutes.find((item) => item.name === route.name)
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
for (const defaultPageRoute of defaultPageRoutes) {
|
|
32
|
-
const match = defaultPageRoute.name.match(NORMALIZE_ROUTE_NAME_REG);
|
|
33
|
-
|
|
34
|
-
if (match) {
|
|
35
|
-
const name = match[1];
|
|
36
|
-
const action = match[2];
|
|
37
|
-
|
|
38
|
-
switch (action) {
|
|
39
|
-
case "single":
|
|
40
|
-
const [listType, type] = match[3].slice(1).split("/");
|
|
41
|
-
|
|
42
|
-
switch (listType) {
|
|
43
|
-
case "list":
|
|
44
|
-
switch (type) {
|
|
45
|
-
case "normal":
|
|
46
|
-
vueRouter.addRoute("mk-ms-layout", {
|
|
47
|
-
name: defaultPageRoute.name,
|
|
48
|
-
path: defaultPageRoute.route || `/dv/${name}`,
|
|
49
|
-
component: () =>
|
|
50
|
-
import(
|
|
51
|
-
"../page/index/dv/default/single/list/normal.vue"
|
|
52
|
-
),
|
|
53
|
-
meta: { name },
|
|
54
|
-
});
|
|
55
|
-
break;
|
|
56
|
-
case "dialog":
|
|
57
|
-
vueRouter.addRoute("mk-ms-layout", {
|
|
58
|
-
name: defaultPageRoute.name,
|
|
59
|
-
path: defaultPageRoute.route || `/dv/${name}`,
|
|
60
|
-
component: () =>
|
|
61
|
-
import(
|
|
62
|
-
"../page/index/dv/default/single/list/dialog.vue"
|
|
63
|
-
),
|
|
64
|
-
meta: { name },
|
|
65
|
-
});
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
break;
|
|
70
|
-
case "tree":
|
|
71
|
-
switch (type) {
|
|
72
|
-
case "dialog":
|
|
73
|
-
vueRouter.addRoute("mk-ms-layout", {
|
|
74
|
-
name: defaultPageRoute.name,
|
|
75
|
-
path: defaultPageRoute.route || `/dv/${name}`,
|
|
76
|
-
component: () =>
|
|
77
|
-
import(
|
|
78
|
-
"../page/index/dv/default/single/tree/dialog.vue"
|
|
79
|
-
),
|
|
80
|
-
meta: { name },
|
|
81
|
-
});
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
break;
|
|
85
|
-
case "table-tree":
|
|
86
|
-
switch (type) {
|
|
87
|
-
case "dialog":
|
|
88
|
-
vueRouter.addRoute("mk-ms-layout", {
|
|
89
|
-
name: defaultPageRoute.name,
|
|
90
|
-
path: defaultPageRoute.route || `/dv/${name}`,
|
|
91
|
-
component: () =>
|
|
92
|
-
import(
|
|
93
|
-
"../page/index/dv/default/single/table-tree/dialog.vue"
|
|
94
|
-
),
|
|
95
|
-
meta: { name },
|
|
96
|
-
});
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
break;
|
|
102
|
-
case "list":
|
|
103
|
-
vueRouter.addRoute("mk-ms-layout", {
|
|
104
|
-
name: defaultPageRoute.name,
|
|
105
|
-
path: defaultPageRoute.route || `/dv/${name}`,
|
|
106
|
-
component: () => import("../page/index/dv/default/table.vue"),
|
|
107
|
-
meta: { name },
|
|
108
|
-
});
|
|
109
|
-
break;
|
|
110
|
-
case "edit":
|
|
111
|
-
vueRouter.addRoute("mk-ms-layout", {
|
|
112
|
-
name: defaultPageRoute.name,
|
|
113
|
-
path: defaultPageRoute.route || `/dv/${name}/:id`,
|
|
114
|
-
component: () => import("../page/index/dv/default/edit.vue"),
|
|
115
|
-
meta: { name },
|
|
116
|
-
});
|
|
117
|
-
break;
|
|
118
|
-
case "add":
|
|
119
|
-
vueRouter.addRoute("mk-ms-layout", {
|
|
120
|
-
name: defaultPageRoute.name,
|
|
121
|
-
path: defaultPageRoute.route || `/dv/${name}/add`,
|
|
122
|
-
component: () => import("../page/index/dv/default/add.vue"),
|
|
123
|
-
meta: { name },
|
|
124
|
-
});
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
this.register(
|
|
131
|
-
createDisposable(() => {
|
|
132
|
-
for (const defaultPageRoute of defaultPageRoutes) {
|
|
133
|
-
vueRouter.removeRoute(defaultPageRoute.name);
|
|
134
|
-
}
|
|
135
|
-
})
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
getRouteByName(name: string): Route | null {
|
|
140
|
-
return this.routes.find((route) => route.name === name) ?? null;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
getRouteByID(id: string): Route | null {
|
|
144
|
-
return this.routes.find((route) => route.id === id) ?? null;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
getRoutesByMenuID(menuId: Route["menuId"]): Route[] {
|
|
148
|
-
return this.routes.filter((route) => route.menuId === menuId);
|
|
149
|
-
}
|
|
150
|
-
}
|
package/src/core/UserInfo.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { MSAppClient } from "./MSAppClient";
|
|
2
|
-
import { PermissionPoint } from "./PermissionPointManager";
|
|
3
|
-
import { Role } from "../dataview/role/RoleForm";
|
|
4
|
-
|
|
5
|
-
export interface MemberInfo {
|
|
6
|
-
id: number;
|
|
7
|
-
account: string;
|
|
8
|
-
email: string;
|
|
9
|
-
nickName: string;
|
|
10
|
-
avatarPath: string;
|
|
11
|
-
isSuper: string;
|
|
12
|
-
errorCount: string;
|
|
13
|
-
errorDatetime: string;
|
|
14
|
-
isLock: string;
|
|
15
|
-
unlockDatetime: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export class UserInfo {
|
|
19
|
-
id: number;
|
|
20
|
-
account: string;
|
|
21
|
-
email: string;
|
|
22
|
-
nickName: string;
|
|
23
|
-
avatar: string;
|
|
24
|
-
isLocked: boolean;
|
|
25
|
-
isSuper: boolean;
|
|
26
|
-
payload: any;
|
|
27
|
-
|
|
28
|
-
roles: Role[];
|
|
29
|
-
permissionPoints: PermissionPoint[];
|
|
30
|
-
|
|
31
|
-
constructor(
|
|
32
|
-
msAppClient: MSAppClient,
|
|
33
|
-
payload: MemberInfo,
|
|
34
|
-
roles: Role[],
|
|
35
|
-
permissionPoints: PermissionPoint[]
|
|
36
|
-
) {
|
|
37
|
-
this.id = payload.id;
|
|
38
|
-
this.account = payload.account;
|
|
39
|
-
this.email = payload.email;
|
|
40
|
-
this.nickName = payload.nickName;
|
|
41
|
-
this.isLocked = payload.isLock === "1";
|
|
42
|
-
this.isSuper = payload.isSuper === "1";
|
|
43
|
-
this.roles = roles;
|
|
44
|
-
this.permissionPoints = permissionPoints;
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
this.avatar = payload.avatarPath
|
|
48
|
-
? new URL(payload.avatarPath, msAppClient.origin).toString()
|
|
49
|
-
: "";
|
|
50
|
-
} catch (e) {
|
|
51
|
-
this.avatar = "";
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
this.payload = payload;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
hasRole(name: Role["name"]): boolean {
|
|
58
|
-
return !!this.roles.find((role) => role.name === name);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
hasPermissionPoint(key: PermissionPoint["key"]) {
|
|
62
|
-
return !!this.permissionPoints.find(
|
|
63
|
-
(permissionPoint) => permissionPoint.key === key
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
}
|