hs-admin-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +11 -0
- package/.env.development +5 -0
- package/.env.production +5 -0
- package/.eslintignore +18 -0
- package/.eslintrc.js +104 -0
- package/.prettierrc.js +39 -0
- package/.vite/deps_temp_3669a513/chunk-FVXAE7ZR.js +11400 -0
- package/.vite/deps_temp_3669a513/chunk-ZS7NZCD4.js +36 -0
- package/.vite/deps_temp_3669a513/default-passive-events.js +25 -0
- package/.vite/deps_temp_3669a513/element-plus.js +65013 -0
- package/.vite/deps_temp_3669a513/lodash.js +5497 -0
- package/.vite/deps_temp_3669a513/package.json +3 -0
- package/.vite/deps_temp_3669a513/vue.js +324 -0
- package/.vite/deps_temp_3669a513/vxe-table.js +32336 -0
- package/CHANGELOG.md +1 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/directoryList.md +180 -0
- package/package.json +78 -0
- package/postcss.config.js +7 -0
- package/src/App.vue +88 -0
- package/src/api/fieldConfigController/index.ts +76 -0
- package/src/api/fieldConfigController/type.ts +44 -0
- package/src/api/login/index.ts +78 -0
- package/src/api/loginController/index.ts +74 -0
- package/src/api/menu/index.ts +34 -0
- package/src/api/menu/index2.ts +291 -0
- package/src/api/menuController/index.ts +189 -0
- package/src/api/systemController/index.ts +26 -0
- package/src/api/systemController/type.ts +16 -0
- package/src/api/test/index.ts +22 -0
- package/src/api/user/index.ts +30 -0
- package/src/assets/404.png +0 -0
- package/src/assets/logo-main.svg +12 -0
- package/src/assets/logo-mini.svg +12 -0
- package/src/components/base/hsAffix/src/hsAffix.vue +22 -0
- package/src/components/base/hsAlert/src/hsAlert.vue +15 -0
- package/src/components/base/hsAutocomplete/src/hsAutocomplete.vue +36 -0
- package/src/components/base/hsButton/src/hsButton.vue +26 -0
- package/src/components/base/hsButton/src/hsButtonGroup.vue +8 -0
- package/src/components/base/hsButton/useButtonEvents.ts +19 -0
- package/src/components/base/hsCalendar/src/hsCalendar.vue +36 -0
- package/src/components/base/hsCarousel/src/hsCarousel.vue +15 -0
- package/src/components/base/hsCarousel/src/hsCarouselItem.vue +15 -0
- package/src/components/base/hsCascader/src/hsCascader.vue +36 -0
- package/src/components/base/hsCascader/src/hsCascaderPanel.vue +29 -0
- package/src/components/base/hsCheckbox/src/hsCheckbox.vue +32 -0
- package/src/components/base/hsCheckbox/src/hsCheckboxButton.vue +18 -0
- package/src/components/base/hsCheckbox/src/hsCheckboxGroup.vue +32 -0
- package/src/components/base/hsCol/src/hsCol.vue +20 -0
- package/src/components/base/hsCollapse/src/hsCollapse.vue +36 -0
- package/src/components/base/hsCollapse/src/hsCollapseItem.vue +22 -0
- package/src/components/base/hsColorPicker/src/hsColorPicker.vue +32 -0
- package/src/components/base/hsDatePicker/src/hsDatePicker.vue +40 -0
- package/src/components/base/hsDialog/src/hsDialog.vue +36 -0
- package/src/components/base/hsDrawer/src/hsDrawer.vue +29 -0
- package/src/components/base/hsDropdown/src/hsDropdown.vue +15 -0
- package/src/components/base/hsDropdown/src/hsDropdownItem.vue +15 -0
- package/src/components/base/hsDropdown/src/hsDropdownMenu.vue +15 -0
- package/src/components/base/hsForm/src/hsForm.vue +23 -0
- package/src/components/base/hsForm/src/hsFormItem.vue +22 -0
- package/src/components/base/hsGetApi/src/hsGetApis.vue +231 -0
- package/src/components/base/hsGetApi/useGetApis.ts +158 -0
- package/src/components/base/hsInput/src/hsInput.vue +40 -0
- package/src/components/base/hsInput/useInputEvents.ts +52 -0
- package/src/components/base/hsInputNumber/src/hsInputNumber.vue +31 -0
- package/src/components/base/hsPopconfirm/src/hsPopconfirm.vue +15 -0
- package/src/components/base/hsPopover/src/hsPopover.vue +22 -0
- package/src/components/base/hsProgress/src/hsProgress.vue +15 -0
- package/src/components/base/hsRadio/src/hsRadio.vue +32 -0
- package/src/components/base/hsRadio/src/hsRadioButton.vue +18 -0
- package/src/components/base/hsRadio/src/hsRadioGroup.vue +32 -0
- package/src/components/base/hsRate/src/hsRate.vue +33 -0
- package/src/components/base/hsResult/src/hsResult.vue +15 -0
- package/src/components/base/hsRow/src/hsRow.vue +20 -0
- package/src/components/base/hsScrollbar/src/hsScrollbar.vue +22 -0
- package/src/components/base/hsSelect/src/hsOption.vue +8 -0
- package/src/components/base/hsSelect/src/hsOptionGroup.vue +8 -0
- package/src/components/base/hsSelect/src/hsSelect.vue +42 -0
- package/src/components/base/hsSelect/useSelectEvents.ts +60 -0
- package/src/components/base/hsSlider/src/hsSlider.vue +25 -0
- package/src/components/base/hsSteps/src/hsStep.vue +15 -0
- package/src/components/base/hsSteps/src/hsSteps.vue +15 -0
- package/src/components/base/hsSwitch/src/hsSwitch.vue +35 -0
- package/src/components/base/hsTable/hsBCTable.vue +116 -0
- package/src/components/base/hsTable/hsTable copy.vue +226 -0
- package/src/components/base/hsTable/hsTable.vue +213 -0
- package/src/components/base/hsTable/useHsTableConfig.ts +95 -0
- package/src/components/base/hsTable/useTableEvents.ts +118 -0
- package/src/components/base/hsTabs/src/hsTabPane.vue +15 -0
- package/src/components/base/hsTabs/src/hsTabs.vue +29 -0
- package/src/components/base/hsTag/src/hsCheckTag.vue +16 -0
- package/src/components/base/hsTag/src/hsTag.vue +15 -0
- package/src/components/base/hsTest/HsTest.vue +320 -0
- package/src/components/base/hsTooltip/src/hsTooltip.vue +22 -0
- package/src/components/base/hsTour/src/hsTour.vue +31 -0
- package/src/components/base/hsTour/src/hsTourStep.vue +15 -0
- package/src/components/base/hsTransfer/src/hsTransfer.vue +36 -0
- package/src/components/base/hsTree/src/hsTree.vue +24 -0
- package/src/components/base/hsTreeSelect/src/hsTreeSelect.vue +39 -0
- package/src/components/base/hsUpload/src/hsUpload.vue +32 -0
- package/src/components/base/hsWatermark/src/hsWatermark.vue +15 -0
- package/src/components/business/bcAutoComplete/bcAutoComplete.vue +38 -0
- package/src/components/business/bcAutoComplete/defaultData.ts +25 -0
- package/src/components/business/bcAutoComplete/useAutoComplete.ts +65 -0
- package/src/components/business/bcBtn/bcBtn.vue +40 -0
- package/src/components/business/bcForm/bcForm.vue +113 -0
- package/src/components/business/bcForm/bcFormDrag.vue +104 -0
- package/src/components/business/bcForm/bcFormSearch.vue +154 -0
- package/src/components/business/bcForm/components/sortForm/index.ts +18 -0
- package/src/components/business/bcForm/components/sortForm/sortForm.vue +92 -0
- package/src/components/business/bcFormConfig/bcFormConfig.vue +196 -0
- package/src/components/business/bcFormTable/bcFormTable.vue +91 -0
- package/src/components/business/bcFormTable/components/bcTabs/bcTabs.vue +53 -0
- package/src/components/business/bcFormTable/components/contextBody/contextBody.vue +67 -0
- package/src/components/business/bcFormTable/components/contextBody/useContextMenu.ts +53 -0
- package/src/components/business/bcFormTable/components/formSearchBtn/formSearchBtn.vue +21 -0
- package/src/components/business/bcFormTable/methods/cellDetailMethod.ts +5 -0
- package/src/components/business/bcFormTable/methods/filterAgeMethod.ts +5 -0
- package/src/components/business/bcFormTable/methods/footerMethod.ts +25 -0
- package/src/components/business/bcFormTable/methods/index.ts +10 -0
- package/src/components/business/bcFormTable/utils/onFormKey.ts +121 -0
- package/src/components/business/bcFormTable/utils/onTableKey.ts +119 -0
- package/src/components/business/bcFormTable/utils/parseTable.ts +201 -0
- package/src/components/business/bcFormTable/utils/useButon.ts +20 -0
- package/src/components/business/bcFormTable/utils/useTableHeight.ts +44 -0
- package/src/components/business/bcPageConfig/bcPageConfig.vue +79 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsAttrBtn.vue +39 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnItemConfig.vue +32 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnPanel.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useAttrBtn.ts +58 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useBtnConfigList.ts +71 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useBtnItemConfig.ts +35 -0
- package/src/components/business/bcPageConfig/components/hsExpand/src/hsExpand.vue +33 -0
- package/src/components/business/bcPageConfig/components/hsExpand/useExpand.ts +9 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsAttrForm.vue +54 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormPanel.vue +64 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormParse.vue +24 -0
- package/src/components/business/bcPageConfig/components/hsForm/useAttrForm.ts +108 -0
- package/src/components/business/bcPageConfig/components/hsForm/useFormListConfig.ts +69 -0
- package/src/components/business/bcPageConfig/components/hsForm/useFormParse.ts +120 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/src/saveForm.vue +48 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/useSaveForm.ts +148 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsAttrTable.vue +122 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfig.vue +51 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfigList.vue +46 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTablePanel.vue +68 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableParse.vue +24 -0
- package/src/components/business/bcPageConfig/components/hsTables/useAttrTable.ts +218 -0
- package/src/components/business/bcPageConfig/components/hsTables/useTableConfigList.ts +77 -0
- package/src/components/business/bcPageConfig/components/hsTables/useTableParse.ts +78 -0
- package/src/components/business/bcPageConfig/default/apis.json +24712 -0
- package/src/components/business/bcPageConfig/default/baseBtnConfig.ts +256 -0
- package/src/components/business/bcPageConfig/default/baseFormConfig.ts +380 -0
- package/src/components/business/bcPageConfig/default/baseTableConfig.ts +2399 -0
- package/src/components/business/bcPageConfig/usePageConfig.ts +469 -0
- package/src/components/business/bcSelect/bcSelect.vue +50 -0
- package/src/components/business/bcSwitchSystems/bcSwitchSystems.vue +36 -0
- package/src/components/business/bcSwitchSystems/useSwitchSystems.ts +74 -0
- package/src/components/business/bcTable/bcTable.vue +63 -0
- package/src/components/business/bcTable/components/sortColumn/index.ts +19 -0
- package/src/components/business/bcTable/components/sortColumn/sortColumn.vue +107 -0
- package/src/components/business/bcTable/useTable.ts +51 -0
- package/src/components/business/bcTable/useTableHeight.ts +24 -0
- package/src/components/business/bcTreeSelect/bcTreeSelect.vue +12 -0
- package/src/components/business/cardID/cardID.vue +24 -0
- package/src/components/business/cardID/type.ts +0 -0
- package/src/components/business/cardID/useCardID.ts +0 -0
- package/src/components/component.ts +188 -0
- package/src/components/config/autocompleteAttrConfig/autocompleteAttrConfig.vue +26 -0
- package/src/components/config/autocompleteAttrConfig/config.ts +170 -0
- package/src/components/config/baseForm.vue +175 -0
- package/src/components/config/buttonAttrConfig/buttonAttrConfig.vue +26 -0
- package/src/components/config/buttonAttrConfig/config.ts +261 -0
- package/src/components/config/cascaderAttrConfig/cascaderAttrConfig.vue +26 -0
- package/src/components/config/cascaderAttrConfig/config.ts +287 -0
- package/src/components/config/cascaderPanelAttrConfig/cascaderPanelAttrConfig.vue +26 -0
- package/src/components/config/cascaderPanelAttrConfig/config.ts +278 -0
- package/src/components/config/checkboxAttrConfig/checkboxAttrConfig.vue +26 -0
- package/src/components/config/checkboxAttrConfig/config.ts +301 -0
- package/src/components/config/datePickerAttrConfig/config.ts +256 -0
- package/src/components/config/datePickerAttrConfig/datePickerAttrConfig.vue +26 -0
- package/src/components/config/inputAttrConfig/config.ts +322 -0
- package/src/components/config/inputAttrConfig/inputAttrConfig.vue +33 -0
- package/src/components/config/inputAttrConfig/inputEventConfig.vue +35 -0
- package/src/components/config/inputNumberAttrConfig/config.ts +177 -0
- package/src/components/config/inputNumberAttrConfig/inputNumberAttrConfig.vue +26 -0
- package/src/components/config/radioAttrConfig/config.ts +212 -0
- package/src/components/config/radioAttrConfig/radioAttrConfig.vue +26 -0
- package/src/components/config/selectAttrConfig/config.ts +478 -0
- package/src/components/config/selectAttrConfig/selectAttrConfig.vue +26 -0
- package/src/components/config/switchAttrConfig/config.ts +195 -0
- package/src/components/config/switchAttrConfig/switchAttrConfig.vue +26 -0
- package/src/components/config/treeSelectAttrConfig/config.ts +625 -0
- package/src/components/config/treeSelectAttrConfig/treeSelectAttrConfig.vue +26 -0
- package/src/components/config/type/formType.ts +25 -0
- package/src/components/config/uploadAttrConfig/config.ts +250 -0
- package/src/components/config/uploadAttrConfig/uploadAttrConfig.vue +26 -0
- package/src/components/iconSelector/index.vue +247 -0
- package/src/components/iconSelector/list.vue +84 -0
- package/src/components/svgIcon/index.vue +61 -0
- package/src/directive/authDirective.ts +40 -0
- package/src/directive/customDirective.ts +178 -0
- package/src/directive/index.ts +18 -0
- package/src/hooks/useCrypto.ts +36 -0
- package/src/hooks/useExpose.ts +60 -0
- package/src/layout/component/aside.vue +160 -0
- package/src/layout/component/columnsAside.vue +299 -0
- package/src/layout/component/header.vue +18 -0
- package/src/layout/component/main.vue +65 -0
- package/src/layout/footer/index.vue +25 -0
- package/src/layout/index.vue +53 -0
- package/src/layout/lockScreen/index.vue +352 -0
- package/src/layout/logo/index.vue +75 -0
- package/src/layout/main/classic.vue +73 -0
- package/src/layout/main/columns.vue +73 -0
- package/src/layout/main/defaults.vue +73 -0
- package/src/layout/main/transverse.vue +60 -0
- package/src/layout/navBars/index.vue +35 -0
- package/src/layout/navBars/tagsView/contextmenu.vue +133 -0
- package/src/layout/navBars/tagsView/tagsView.vue +737 -0
- package/src/layout/navBars/topBar/breadcrumb.vue +146 -0
- package/src/layout/navBars/topBar/closeFull.vue +53 -0
- package/src/layout/navBars/topBar/index.vue +107 -0
- package/src/layout/navBars/topBar/search.vue +123 -0
- package/src/layout/navBars/topBar/setings.vue +789 -0
- package/src/layout/navBars/topBar/user.vue +222 -0
- package/src/layout/navBars/topBar/userNews.vue +107 -0
- package/src/layout/navMenu/horizontal.vue +138 -0
- package/src/layout/navMenu/subItem.vue +49 -0
- package/src/layout/navMenu/vertical.vue +100 -0
- package/src/layout/routerView/iframes.vue +101 -0
- package/src/layout/routerView/link.vue +93 -0
- package/src/layout/routerView/parent.vue +104 -0
- package/src/layout/upgrade/index.vue +147 -0
- package/src/main.ts +70 -0
- package/src/router/backEnd.ts +173 -0
- package/src/router/frontEnd.ts +155 -0
- package/src/router/index.ts +138 -0
- package/src/router/route.ts +94 -0
- package/src/stores/index.ts +8 -0
- package/src/stores/keepAliveNames.ts +38 -0
- package/src/stores/requestOldRoutes.ts +16 -0
- package/src/stores/routesList.ts +26 -0
- package/src/stores/tagsViewRoutes.ts +23 -0
- package/src/stores/themeConfig.ts +142 -0
- package/src/stores/userInfo.ts +65 -0
- package/src/style/index.scss +0 -0
- package/src/style/tailwind.css +29 -0
- package/src/theme/app.scss +333 -0
- package/src/theme/common/transition.scss +147 -0
- package/src/theme/dark.scss +255 -0
- package/src/theme/element.scss +321 -0
- package/src/theme/iconSelector.scss +31 -0
- package/src/theme/index.scss +8 -0
- package/src/theme/loading.scss +51 -0
- package/src/theme/media/chart.scss +94 -0
- package/src/theme/media/cityLinkage.scss +10 -0
- package/src/theme/media/date.scss +25 -0
- package/src/theme/media/dialog.scss +12 -0
- package/src/theme/media/error.scss +45 -0
- package/src/theme/media/form.scss +31 -0
- package/src/theme/media/home.scss +23 -0
- package/src/theme/media/index.scss +15 -0
- package/src/theme/media/layout.scss +63 -0
- package/src/theme/media/login.scss +74 -0
- package/src/theme/media/media.scss +13 -0
- package/src/theme/media/pagination.scss +15 -0
- package/src/theme/media/personal.scss +16 -0
- package/src/theme/media/scrollbar.scss +56 -0
- package/src/theme/media/tagsView.scss +11 -0
- package/src/theme/mixins/index.scss +56 -0
- package/src/theme/other.scss +36 -0
- package/src/theme/tableTool.scss +27 -0
- package/src/theme/waves.scss +101 -0
- package/src/types/auth.d.ts +44 -0
- package/src/types/axios.d.ts +13 -0
- package/src/types/components.d.ts +30 -0
- package/src/types/customData.d.ts +163 -0
- package/src/types/form.ts +68 -0
- package/src/types/formItem/autocomplete.ts +43 -0
- package/src/types/formItem/button.ts +39 -0
- package/src/types/formItem/input.ts +66 -0
- package/src/types/formItem/inputNumber.ts +42 -0
- package/src/types/formItem/selelct.ts +54 -0
- package/src/types/formItem/treeSelect.ts +37 -0
- package/src/types/formTable.d.ts +210 -0
- package/src/types/global.d.ts +118 -0
- package/src/types/layout.d.ts +59 -0
- package/src/types/mitt.d.ts +38 -0
- package/src/types/pinia.d.ts +92 -0
- package/src/types/views.d.ts +331 -0
- package/src/utils/arrayOperation.ts +65 -0
- package/src/utils/authFunction.ts +38 -0
- package/src/utils/build.ts +124 -0
- package/src/utils/commonFunction.ts +64 -0
- package/src/utils/formatTime.ts +137 -0
- package/src/utils/getDataType.ts +136 -0
- package/src/utils/getStyleSheets.ts +101 -0
- package/src/utils/loading.ts +44 -0
- package/src/utils/mitt.ts +8 -0
- package/src/utils/other.ts +214 -0
- package/src/utils/request.ts +82 -0
- package/src/utils/setIconfont.ts +48 -0
- package/src/utils/showMessage.ts +57 -0
- package/src/utils/showMessageBox.ts +39 -0
- package/src/utils/showNotification.ts +50 -0
- package/src/utils/showPopup.ts +81 -0
- package/src/utils/storage.ts +137 -0
- package/src/utils/theme.ts +65 -0
- package/src/utils/toolsValidate.ts +370 -0
- package/src/utils/watermark.ts +47 -0
- package/src/views/error/401.vue +88 -0
- package/src/views/error/404.vue +89 -0
- package/src/views/home/index.vue +62 -0
- package/src/views/login/component/account.vue +172 -0
- package/src/views/login/component/mobile.vue +72 -0
- package/src/views/login/component/scan.vue +63 -0
- package/src/views/login/index.vue +254 -0
- package/src/views/system/auth/index.vue +48 -0
- package/src/views/system/auth/list.ts +50 -0
- package/src/views/system/auth/useAuth.ts +34 -0
- package/src/views/system/dept/dialog.vue +167 -0
- package/src/views/system/dept/index.vue +135 -0
- package/src/views/system/dic/dialog.vue +150 -0
- package/src/views/system/dic/index.vue +132 -0
- package/src/views/system/form/data.json +360 -0
- package/src/views/system/form/index.vue +24 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsAttrBtn.vue +58 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsBtnPanel.vue +51 -0
- package/src/views/system/formSetting/components/hsBtn/useAttrBtn.ts +129 -0
- package/src/views/system/formSetting/components/hsBtn/useBtnConfigList.ts +73 -0
- package/src/views/system/formSetting/components/hsExpand/src/hsExpand.vue +27 -0
- package/src/views/system/formSetting/components/hsExpand/useExpand.ts +9 -0
- package/src/views/system/formSetting/components/hsForm/src/hsAttrForm.vue +124 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormPanel.vue +152 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormParse.vue +33 -0
- package/src/views/system/formSetting/components/hsForm/useAttrForm.ts +109 -0
- package/src/views/system/formSetting/components/hsForm/useFormListConfig.ts +70 -0
- package/src/views/system/formSetting/components/hsPageTree/configData.ts +3700 -0
- package/src/views/system/formSetting/components/hsPageTree/src/hsPageTree.vue +30 -0
- package/src/views/system/formSetting/components/hsPageTree/usePageTree.ts +50 -0
- package/src/views/system/formSetting/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/views/system/formSetting/components/hsSaveForm/src/saveForm.vue +47 -0
- package/src/views/system/formSetting/components/hsSaveForm/useSaveForm.ts +122 -0
- package/src/views/system/formSetting/components/hsTables/src/hsAttrTable.vue +91 -0
- package/src/views/system/formSetting/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableConfig.vue +39 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTablePanel.vue +56 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableParse.vue +29 -0
- package/src/views/system/formSetting/components/hsTables/useAttrTable.ts +125 -0
- package/src/views/system/formSetting/components/hsTables/useTableConfigList.ts +77 -0
- package/src/views/system/formSetting/components/selectConfig/config.ts +476 -0
- package/src/views/system/formSetting/components/selectConfig/selectConfig.vue +30 -0
- package/src/views/system/formSetting/data.json +360 -0
- package/src/views/system/formSetting/default/baseBtnConfig.ts +216 -0
- package/src/views/system/formSetting/default/baseFormConfig.ts +567 -0
- package/src/views/system/formSetting/default/baseTableConfig.ts +2353 -0
- package/src/views/system/formSetting/formConfig.vue +108 -0
- package/src/views/system/formSetting/index.vue +35 -0
- package/src/views/system/formSetting/menuType.d.ts +12 -0
- package/src/views/system/formSetting/panelConfig.json +164 -0
- package/src/views/system/formSetting/useForm.ts +89 -0
- package/src/views/system/formSetting/useFormConfig.ts +192 -0
- package/src/views/system/menu/dialog.vue +285 -0
- package/src/views/system/menu/index.vue +180 -0
- package/src/views/system/page/components/hsPageTree/configData.ts +3700 -0
- package/src/views/system/page/components/hsPageTree/src/hsPageTree.vue +30 -0
- package/src/views/system/page/components/hsPageTree/usePageTree.ts +49 -0
- package/src/views/system/page/index.vue +32 -0
- package/src/views/system/page/menuType.d.ts +12 -0
- package/src/views/system/page/usePage.ts +125 -0
- package/src/views/system/role/dialog.vue +236 -0
- package/src/views/system/role/index.vue +146 -0
- package/src/views/system/table/data.json +747 -0
- package/src/views/system/table/formate.js +49 -0
- package/src/views/system/table/index.vue +53 -0
- package/src/views/system/user/dialog.vue +187 -0
- package/src/views/system/user/index.vue +161 -0
- package/src/views/test/test/components/hsBtn/src/hsAttrBtn.vue +58 -0
- package/src/views/test/test/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/views/test/test/components/hsBtn/src/hsBtnPanel.vue +51 -0
- package/src/views/test/test/components/hsBtn/useAttrBtn.ts +129 -0
- package/src/views/test/test/components/hsBtn/useBtnConfigList.ts +73 -0
- package/src/views/test/test/components/hsExpand/src/hsExpand.vue +27 -0
- package/src/views/test/test/components/hsExpand/useExpand.ts +9 -0
- package/src/views/test/test/components/hsForm/src/hsAttrForm.vue +124 -0
- package/src/views/test/test/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/views/test/test/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/views/test/test/components/hsForm/src/hsFormPanel.vue +152 -0
- package/src/views/test/test/components/hsForm/src/hsFormParse.vue +33 -0
- package/src/views/test/test/components/hsForm/useAttrForm.ts +109 -0
- package/src/views/test/test/components/hsForm/useFormListConfig.ts +70 -0
- package/src/views/test/test/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/views/test/test/components/hsSaveForm/src/saveForm.vue +47 -0
- package/src/views/test/test/components/hsSaveForm/useSaveForm.ts +122 -0
- package/src/views/test/test/components/hsTables/src/hsAttrTable.vue +91 -0
- package/src/views/test/test/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/views/test/test/components/hsTables/src/hsTableConfig.vue +39 -0
- package/src/views/test/test/components/hsTables/src/hsTableConfigList.vue +45 -0
- package/src/views/test/test/components/hsTables/src/hsTablePanel.vue +56 -0
- package/src/views/test/test/components/hsTables/src/hsTableParse.vue +29 -0
- package/src/views/test/test/components/hsTables/useAttrTable.ts +125 -0
- package/src/views/test/test/components/hsTables/useTableConfigList.ts +77 -0
- package/src/views/test/test/components/selectConfig/config.ts +476 -0
- package/src/views/test/test/components/selectConfig/selectConfig.vue +30 -0
- package/src/views/test/test/data.json +360 -0
- package/src/views/test/test/default/baseBtnConfig.ts +216 -0
- package/src/views/test/test/default/baseFormConfig.ts +567 -0
- package/src/views/test/test/default/baseTableConfig.ts +2353 -0
- package/src/views/test/test/formConfig.vue +102 -0
- package/src/views/test/test/test.vue +28 -0
- package/src/views/test/test/test3.vue +24 -0
- package/src/views/test/test/test4.vue +107 -0
- package/src/views/test/test/test/345/211/257/346/234/254.vue +2424 -0
- package/src/views/test/test/useFormConfig.ts +192 -0
- package/src/views/test/test2/test2.vue +17 -0
- package/src/views/test/test3/test.vue +20 -0
- package/tailwind.config.js +12 -0
- package/tsconfig.json +75 -0
- package/vite.config.ts +123 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="system-user-container layout-padding">
|
|
3
|
+
<el-card shadow="hover" class="layout-padding-auto">
|
|
4
|
+
<div class="system-user-search mb15">
|
|
5
|
+
<el-button size="default" type="primary" class="ml10" @click="onAddDatas">
|
|
6
|
+
<el-icon>
|
|
7
|
+
<ele-Search />
|
|
8
|
+
</el-icon>
|
|
9
|
+
模拟数据
|
|
10
|
+
</el-button>
|
|
11
|
+
<el-button size="default" type="success" class="ml10" @click="onclearDatas">
|
|
12
|
+
<el-icon>
|
|
13
|
+
<ele-FolderAdd />
|
|
14
|
+
</el-icon>
|
|
15
|
+
清除数据
|
|
16
|
+
</el-button>
|
|
17
|
+
</div>
|
|
18
|
+
<el-form :model="state.form" size="default" label-width="100px" class="mt35 mb35">
|
|
19
|
+
<el-row :gutter="35">
|
|
20
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
21
|
+
<el-form-item label="姓名">
|
|
22
|
+
<el-input v-model="state.form.name" placeholder="请输入姓名" clearable></el-input>
|
|
23
|
+
</el-form-item>
|
|
24
|
+
</el-col>
|
|
25
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
26
|
+
<el-form-item label="用户归属部门">
|
|
27
|
+
<el-input v-model="state.form.email" placeholder="请输入用户归属部门" clearable></el-input>
|
|
28
|
+
</el-form-item>
|
|
29
|
+
</el-col>
|
|
30
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
31
|
+
<el-form-item label="登陆账户名">
|
|
32
|
+
<el-input v-model="state.form.autograph" placeholder="请输入登陆账户名" clearable></el-input>
|
|
33
|
+
</el-form-item>
|
|
34
|
+
</el-col>
|
|
35
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
36
|
+
<el-form-item label="职务">
|
|
37
|
+
<el-select v-model="state.form.occupation" placeholder="请选择职务" clearable class="w100">
|
|
38
|
+
<el-option label="计算机 / 互联网 / 通信" value="1"></el-option>
|
|
39
|
+
<el-option label="生产 / 工艺 / 制造" value="2"></el-option>
|
|
40
|
+
<el-option label="医疗 / 护理 / 制药" value="3"></el-option>
|
|
41
|
+
</el-select>
|
|
42
|
+
</el-form-item>
|
|
43
|
+
</el-col>
|
|
44
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20" v-if="item.show">
|
|
45
|
+
<el-form-item label="手机">
|
|
46
|
+
<el-input v-model="state.form.phone" placeholder="请输入手机" clearable></el-input>
|
|
47
|
+
</el-form-item>
|
|
48
|
+
</el-col>
|
|
49
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20" v-if="item.show">
|
|
50
|
+
<el-form-item label="性别">
|
|
51
|
+
<el-select v-model="state.form.sex" placeholder="请选择性别" clearable class="w100">
|
|
52
|
+
<el-option label="男" value="1"></el-option>
|
|
53
|
+
<el-option label="女" value="2"></el-option>
|
|
54
|
+
</el-select>
|
|
55
|
+
</el-form-item>
|
|
56
|
+
</el-col>
|
|
57
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20" v-if="item.show">
|
|
58
|
+
<el-form-item label="登录密码">
|
|
59
|
+
<el-input v-model="state.form.phone1" placeholder="请输入登录密码" clearable></el-input>
|
|
60
|
+
</el-form-item>
|
|
61
|
+
</el-col>
|
|
62
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20" v-if="item.show">
|
|
63
|
+
<el-form-item label="权限角色">
|
|
64
|
+
<el-input v-model="state.form.phone2" placeholder="请输入权限角色" clearable></el-input>
|
|
65
|
+
</el-form-item>
|
|
66
|
+
</el-col>
|
|
67
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20" v-if="item.show">
|
|
68
|
+
<el-form-item label="创建用户">
|
|
69
|
+
<el-input v-model="state.form.phone3" placeholder="请输入创建用户" clearable></el-input>
|
|
70
|
+
</el-form-item>
|
|
71
|
+
</el-col>
|
|
72
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20" v-if="item.show">
|
|
73
|
+
<el-form-item label="修改用户">
|
|
74
|
+
<el-input v-model="state.form.phone4" placeholder="请输入修改用户" clearable></el-input>
|
|
75
|
+
</el-form-item>
|
|
76
|
+
</el-col>
|
|
77
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20" v-if="item.show">
|
|
78
|
+
<el-form-item label="所属用户">
|
|
79
|
+
<el-input v-model="state.form.phone5" placeholder="请输入所属用户" clearable></el-input>
|
|
80
|
+
</el-form-item>
|
|
81
|
+
</el-col>
|
|
82
|
+
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20" v-if="item.show">
|
|
83
|
+
<el-form-item label="所属部门">
|
|
84
|
+
<el-input v-model="state.form.phone6" placeholder="请输入所属部门" clearable></el-input>
|
|
85
|
+
</el-form-item>
|
|
86
|
+
</el-col>
|
|
87
|
+
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
88
|
+
<el-form-item>
|
|
89
|
+
<el-button type="primary" @click="hideShowForm">
|
|
90
|
+
<SvgIcon name="iconfont icon-biaodan" />
|
|
91
|
+
{{ item.show ? '隐藏' : '显示' }}
|
|
92
|
+
</el-button>
|
|
93
|
+
</el-form-item>
|
|
94
|
+
</el-col>
|
|
95
|
+
</el-row>
|
|
96
|
+
</el-form>
|
|
97
|
+
<el-table @row-click="onRowClick" @cell-contextmenu="onCllContextmenu" :data="state.tableData.data" v-loading="state.tableData.loading">
|
|
98
|
+
<el-table-column type="selection" width="55" />
|
|
99
|
+
<el-table-column type="index" label="序号" width="60" :index="(state.tableData.param.pageNum - 1) * state.tableData.param.pageSize + 1" />
|
|
100
|
+
<el-table-column
|
|
101
|
+
:prop="column.prop"
|
|
102
|
+
:label="column.label"
|
|
103
|
+
show-overflow-tooltip
|
|
104
|
+
v-for="(column, index) in state.columns"
|
|
105
|
+
:key="index"
|
|
106
|
+
></el-table-column>
|
|
107
|
+
<!-- <el-table-column prop="userNickname" label="用户昵称" show-overflow-tooltip></el-table-column>
|
|
108
|
+
<el-table-column prop="roleSign" label="关联角色" show-overflow-tooltip></el-table-column>
|
|
109
|
+
<el-table-column prop="department" label="部门" show-overflow-tooltip></el-table-column>
|
|
110
|
+
<el-table-column prop="phone" label="手机号" show-overflow-tooltip></el-table-column>
|
|
111
|
+
<el-table-column prop="email" label="邮箱" show-overflow-tooltip></el-table-column> -->
|
|
112
|
+
<el-table-column prop="status" label="用户状态" show-overflow-tooltip>
|
|
113
|
+
<template #default="scope">
|
|
114
|
+
<el-tag type="success" v-if="scope.row.status">启用</el-tag>
|
|
115
|
+
<el-tag type="info" v-else>禁用</el-tag>
|
|
116
|
+
</template>
|
|
117
|
+
</el-table-column>
|
|
118
|
+
<!-- <el-table-column prop="describe" label="用户描述" show-overflow-tooltip></el-table-column>
|
|
119
|
+
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column> -->
|
|
120
|
+
<el-table-column label="操作" width="100">
|
|
121
|
+
<template #default="scope">
|
|
122
|
+
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary" @click="onOpenEditUser('edit', scope.row)"
|
|
123
|
+
>修改</el-button
|
|
124
|
+
>
|
|
125
|
+
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary" @click="onRowDel(scope.row)">删除</el-button>
|
|
126
|
+
</template>
|
|
127
|
+
</el-table-column>
|
|
128
|
+
</el-table>
|
|
129
|
+
<el-pagination
|
|
130
|
+
@size-change="onHandleSizeChange"
|
|
131
|
+
@current-change="onHandleCurrentChange"
|
|
132
|
+
class="mt15"
|
|
133
|
+
:pager-count="5"
|
|
134
|
+
:page-sizes="[10, 20, 30]"
|
|
135
|
+
v-model:current-page="state.tableData.param.pageNum"
|
|
136
|
+
background
|
|
137
|
+
v-model:page-size="state.tableData.param.pageSize"
|
|
138
|
+
layout="total, sizes, prev, pager, next, jumper"
|
|
139
|
+
:total="state.tableData.total"
|
|
140
|
+
>
|
|
141
|
+
</el-pagination>
|
|
142
|
+
</el-card>
|
|
143
|
+
<!-- <UserDialog ref="userDialogRef" @refresh="getTableData()" /> -->
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
146
|
+
|
|
147
|
+
<script setup lang="ts" name="systemUser">
|
|
148
|
+
import { reactive, onMounted, ref } from 'vue';
|
|
149
|
+
import { ElMessageBox, ElMessage } from 'element-plus';
|
|
150
|
+
import { useTableEvents } from '/@/components/base/hsTable/useTableEvents';
|
|
151
|
+
// 引入组件
|
|
152
|
+
// const UserDialog = defineAsyncComponent(() => import('/@/views/system/user/dialog.vue'));
|
|
153
|
+
|
|
154
|
+
// 定义变量内容
|
|
155
|
+
const userDialogRef = ref();
|
|
156
|
+
// const state = reactive({
|
|
157
|
+
// form: {
|
|
158
|
+
// name: '',
|
|
159
|
+
// email: '',
|
|
160
|
+
// autograph: '',
|
|
161
|
+
// occupation: '',
|
|
162
|
+
// phone: '',
|
|
163
|
+
// sex: '',
|
|
164
|
+
// phone1: '',
|
|
165
|
+
// phone2: '',
|
|
166
|
+
// phone3: '',
|
|
167
|
+
// phone4: '',
|
|
168
|
+
// phone5: '',
|
|
169
|
+
// phone6: '',
|
|
170
|
+
// },
|
|
171
|
+
// });
|
|
172
|
+
let item = reactive({
|
|
173
|
+
show: false,
|
|
174
|
+
});
|
|
175
|
+
const hideShowForm = () => {
|
|
176
|
+
item.show = !item.show;
|
|
177
|
+
};
|
|
178
|
+
const state = reactive({
|
|
179
|
+
columns: [],
|
|
180
|
+
form: {
|
|
181
|
+
name: '',
|
|
182
|
+
email: '',
|
|
183
|
+
autograph: '',
|
|
184
|
+
occupation: '',
|
|
185
|
+
phone: '',
|
|
186
|
+
sex: '',
|
|
187
|
+
phone1: '',
|
|
188
|
+
phone2: '',
|
|
189
|
+
phone3: '',
|
|
190
|
+
phone4: '',
|
|
191
|
+
phone5: '',
|
|
192
|
+
phone6: '',
|
|
193
|
+
},
|
|
194
|
+
tableData: {
|
|
195
|
+
data: [],
|
|
196
|
+
total: 0,
|
|
197
|
+
loading: false,
|
|
198
|
+
param: {
|
|
199
|
+
pageNum: 1,
|
|
200
|
+
pageSize: 300,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
interface columnType {
|
|
205
|
+
prop: string;
|
|
206
|
+
label: string;
|
|
207
|
+
}
|
|
208
|
+
const data: Array<columnType> = [];
|
|
209
|
+
// 初始化表格数据
|
|
210
|
+
const getTableData = () => {
|
|
211
|
+
state.tableData.loading = true;
|
|
212
|
+
|
|
213
|
+
for (let i = 0; i < 162; i++) {
|
|
214
|
+
let a: any = {};
|
|
215
|
+
for (let j = 0; j <= 7; j++) {
|
|
216
|
+
//
|
|
217
|
+
a['test' + j] = i + '测试数据' + j;
|
|
218
|
+
}
|
|
219
|
+
data.push(a);
|
|
220
|
+
|
|
221
|
+
// data.push({
|
|
222
|
+
// userName: i === 0 ? 'admin' : 'test',
|
|
223
|
+
// userNickname: i === 0 ? '我是管理员' : '我是普通用户',
|
|
224
|
+
// roleSign: i === 0 ? 'admin' : 'common',
|
|
225
|
+
// department: i === 0 ? ['vueNextAdmin', 'IT外包服务'] : ['vueNextAdmin', '资本控股'],
|
|
226
|
+
// phone: '12345678910',
|
|
227
|
+
// email: 'vueNextAdmin@123.com',
|
|
228
|
+
// sex: '女',
|
|
229
|
+
// password: '123456',
|
|
230
|
+
// overdueTime: new Date(),
|
|
231
|
+
// status: true,
|
|
232
|
+
// describe: i === 0 ? '不可删除' : '测试用户',
|
|
233
|
+
// createTime: new Date().toLocaleString(),
|
|
234
|
+
// });
|
|
235
|
+
}
|
|
236
|
+
setTimeout(() => {
|
|
237
|
+
state.tableData.loading = false;
|
|
238
|
+
}, 500);
|
|
239
|
+
};
|
|
240
|
+
const onAddDatas = () => {
|
|
241
|
+
state.tableData.data = data;
|
|
242
|
+
state.tableData.total = state.tableData.data.length;
|
|
243
|
+
};
|
|
244
|
+
const onclearDatas = () => {
|
|
245
|
+
state.tableData.data = [];
|
|
246
|
+
};
|
|
247
|
+
// 打开新增用户弹窗
|
|
248
|
+
// const onOpenAddUser = (type: string) => {
|
|
249
|
+
// userDialogRef.value.openDialog(type);
|
|
250
|
+
// };
|
|
251
|
+
// 打开修改用户弹窗
|
|
252
|
+
const onOpenEditUser = (type: string, row: RowUserType) => {
|
|
253
|
+
userDialogRef.value.openDialog(type, row);
|
|
254
|
+
};
|
|
255
|
+
// 删除用户
|
|
256
|
+
const onRowDel = (row: RowUserType) => {
|
|
257
|
+
ElMessageBox.confirm(`此操作将永久删除账户名称:“${row.userName}”,是否继续?`, '提示', {
|
|
258
|
+
confirmButtonText: '确认',
|
|
259
|
+
cancelButtonText: '取消',
|
|
260
|
+
type: 'warning',
|
|
261
|
+
})
|
|
262
|
+
.then(() => {
|
|
263
|
+
getTableData();
|
|
264
|
+
ElMessage.success('删除成功');
|
|
265
|
+
})
|
|
266
|
+
.catch(() => {});
|
|
267
|
+
};
|
|
268
|
+
// 分页改变
|
|
269
|
+
const onHandleSizeChange = (val: number) => {
|
|
270
|
+
state.tableData.param.pageSize = val;
|
|
271
|
+
getTableData();
|
|
272
|
+
};
|
|
273
|
+
// 分页改变
|
|
274
|
+
const onHandleCurrentChange = (val: number) => {
|
|
275
|
+
state.tableData.param.pageNum = val;
|
|
276
|
+
getTableData();
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
let columns: Array<columnType> = [];
|
|
280
|
+
const setTableColumns = () => {
|
|
281
|
+
columns = [];
|
|
282
|
+
for (let i = 0; i <= 7; i++) {
|
|
283
|
+
columns.push({
|
|
284
|
+
prop: 'test' + i,
|
|
285
|
+
label: '测试' + i,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
console.debug('columns:', columns);
|
|
289
|
+
state.columns = columns;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
const emit = defineEmits(['onSelect', 'onSelectAll', 'onRowClick']);
|
|
293
|
+
const { onRowClick, onCllContextmenu } = useTableEvents(emit);
|
|
294
|
+
// const onRowClick
|
|
295
|
+
// 页面加载时
|
|
296
|
+
onMounted(() => {
|
|
297
|
+
console.debug("document.getElementsByClassName('el-card__body')", document.getElementsByClassName('el-card__body'));
|
|
298
|
+
setTableColumns();
|
|
299
|
+
getTableData();
|
|
300
|
+
});
|
|
301
|
+
</script>
|
|
302
|
+
|
|
303
|
+
<style scoped lang="scss">
|
|
304
|
+
.system-user-container {
|
|
305
|
+
:deep(.el-card__body) {
|
|
306
|
+
display: flex;
|
|
307
|
+
flex-direction: column;
|
|
308
|
+
flex: 1;
|
|
309
|
+
overflow: auto;
|
|
310
|
+
.el-table {
|
|
311
|
+
flex: 1;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
.hs-table_option {
|
|
315
|
+
display: flex;
|
|
316
|
+
flex-direction: row;
|
|
317
|
+
justify-content: flex-end;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-tooltip ref="tooltipRef">
|
|
3
|
+
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
|
4
|
+
<slot :name="item" v-bind="data || {}"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</el-tooltip>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts" name="hsTooltip">
|
|
10
|
+
import { ref, onMounted, getCurrentInstance } from 'vue';
|
|
11
|
+
import { useExposeProperties } from '/@/hooks/useExpose';
|
|
12
|
+
// 获取ref
|
|
13
|
+
const tooltipRef = ref(null);
|
|
14
|
+
// 获取实例方法
|
|
15
|
+
const instance = getCurrentInstance();
|
|
16
|
+
|
|
17
|
+
onMounted(() => {
|
|
18
|
+
useExposeProperties(tooltipRef, instance);
|
|
19
|
+
});
|
|
20
|
+
// 暴露给外部的 ref
|
|
21
|
+
defineExpose({ ...instance!.exposed });
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-tour v-model="innerValue" v-model:current="current" ref="tourRef">
|
|
3
|
+
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
|
4
|
+
<slot :name="item" v-bind="data || {}"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</el-tour>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts" name="hsTour">
|
|
10
|
+
import { ref } from 'vue';
|
|
11
|
+
// props 属性
|
|
12
|
+
// const props = defineProps({
|
|
13
|
+
// value: {
|
|
14
|
+
// type: [Boolean],
|
|
15
|
+
// default: false,
|
|
16
|
+
// },
|
|
17
|
+
// current: {
|
|
18
|
+
// type: [Number],
|
|
19
|
+
// default: 0,
|
|
20
|
+
// },
|
|
21
|
+
// });
|
|
22
|
+
// emit 事件
|
|
23
|
+
const emit = defineEmits(['update:value', 'update:current']);
|
|
24
|
+
|
|
25
|
+
const innerValue = defineModel<boolean>('value', (val: boolean) => emit('update:value', val));
|
|
26
|
+
const current = defineModel<number>('current', (val: number) => emit('update:current', val));
|
|
27
|
+
// 获取ref
|
|
28
|
+
const tourRef = ref(null);
|
|
29
|
+
// 暴露给外部的 ref
|
|
30
|
+
defineExpose({ tourRef });
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-tour-step ref="tourStepRef">
|
|
3
|
+
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
|
4
|
+
<slot :name="item" v-bind="data || {}"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</el-tour-step>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts" name="hsTourStep">
|
|
10
|
+
import { ref } from 'vue';
|
|
11
|
+
// 获取ref
|
|
12
|
+
const tourStepRef = ref(null);
|
|
13
|
+
// // 暴露给外部的 ref
|
|
14
|
+
defineExpose({ tourStepRef });
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-transfer v-model="innerValue" ref="transferRef">
|
|
3
|
+
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
|
4
|
+
<slot :name="item" v-bind="data || {}"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</el-transfer>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts" name="hsTransfer">
|
|
10
|
+
import { ref, onMounted, getCurrentInstance } from 'vue';
|
|
11
|
+
import { useExposeProperties } from '/@/hooks/useExpose';
|
|
12
|
+
// props 属性
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
value: {
|
|
15
|
+
type: [Array],
|
|
16
|
+
default: () => [],
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
// emit 事件
|
|
20
|
+
const emit = defineEmits(['update:value']);
|
|
21
|
+
|
|
22
|
+
const innerValue = defineModel<Array<string | number>>(
|
|
23
|
+
() => props.value,
|
|
24
|
+
(val: Array<string | number>) => emit('update:value', val)
|
|
25
|
+
);
|
|
26
|
+
// 获取ref
|
|
27
|
+
const transferRef = ref(null);
|
|
28
|
+
// 获取实例方法
|
|
29
|
+
const instance = getCurrentInstance();
|
|
30
|
+
|
|
31
|
+
onMounted(() => {
|
|
32
|
+
useExposeProperties(transferRef, instance);
|
|
33
|
+
});
|
|
34
|
+
// 暴露给外部的 ref
|
|
35
|
+
defineExpose({ ...instance!.exposed });
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-tree ref="treeRef">
|
|
3
|
+
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
|
4
|
+
<slot :name="item" v-bind="data || {}"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</el-tree>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { ref, getCurrentInstance, defineComponent } from 'vue';
|
|
11
|
+
|
|
12
|
+
export default defineComponent({
|
|
13
|
+
name: 'hsTree',
|
|
14
|
+
setup() {
|
|
15
|
+
const treeRef = ref<HTMLElement | null>(null);
|
|
16
|
+
const instance = getCurrentInstance();
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
treeRef,
|
|
20
|
+
...instance!.exposed,
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="focusRef" class="w-full">
|
|
3
|
+
<el-tree-select v-model="innerValue" v-bind="$attrs" ref="treeSelectRef">
|
|
4
|
+
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
|
5
|
+
<slot :name="item" v-bind="data || {}"></slot>
|
|
6
|
+
</template>
|
|
7
|
+
</el-tree-select>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts" name="hsTreeSelect">
|
|
12
|
+
import { ref, onMounted, getCurrentInstance } from 'vue';
|
|
13
|
+
import { useExposeProperties, useFocusElement } from '/@/hooks/useExpose';
|
|
14
|
+
// props 属性
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
value: {
|
|
17
|
+
type: [String, Number, Boolean, Object, Array],
|
|
18
|
+
default: '',
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
// emit 事件
|
|
22
|
+
const emit = defineEmits(['update:value']);
|
|
23
|
+
|
|
24
|
+
const innerValue = defineModel<string | number | boolean | object | []>(
|
|
25
|
+
() => props.value,
|
|
26
|
+
(val: string | number | boolean | object | []) => emit('update:value', val)
|
|
27
|
+
);
|
|
28
|
+
// 获取ref
|
|
29
|
+
const treeSelectRef = ref(null);
|
|
30
|
+
// 获取实例方法
|
|
31
|
+
const instance = getCurrentInstance();
|
|
32
|
+
const { focusRef, activeElement } = useFocusElement();
|
|
33
|
+
|
|
34
|
+
onMounted(() => {
|
|
35
|
+
useExposeProperties(treeSelectRef, instance);
|
|
36
|
+
});
|
|
37
|
+
// 暴露给外部的 ref
|
|
38
|
+
defineExpose({ ...instance!.exposed, activeElement });
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-upload v-model:file-list="fileList" ref="uploadRef">
|
|
3
|
+
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
|
4
|
+
<slot :name="item" v-bind="data || {}"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</el-upload>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts" name="hsUpload">
|
|
10
|
+
import { ref, onMounted, getCurrentInstance } from 'vue';
|
|
11
|
+
import { useExposeProperties, useVModel } from '/@/hooks/useExpose';
|
|
12
|
+
// props 属性
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
fileList: {
|
|
15
|
+
type: [Array],
|
|
16
|
+
default: () => [],
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
// emit 事件
|
|
20
|
+
const emit = defineEmits(['update:fileList']);
|
|
21
|
+
const fileList = useVModel(props, 'fileList', emit);
|
|
22
|
+
// 获取ref
|
|
23
|
+
const uploadRef = ref(null);
|
|
24
|
+
// 获取实例方法
|
|
25
|
+
const instance = getCurrentInstance();
|
|
26
|
+
|
|
27
|
+
onMounted(() => {
|
|
28
|
+
useExposeProperties(uploadRef, instance);
|
|
29
|
+
});
|
|
30
|
+
// 暴露给外部的 ref
|
|
31
|
+
defineExpose({ ...instance!.exposed });
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-watermark ref="watermarkRef">
|
|
3
|
+
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
|
4
|
+
<slot :name="item" v-bind="data || {}"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</el-watermark>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts" name="hsWatermark">
|
|
10
|
+
import { ref } from 'vue';
|
|
11
|
+
// 获取ref
|
|
12
|
+
const watermarkRef = ref(null);
|
|
13
|
+
// 暴露给外部的 ref
|
|
14
|
+
defineExpose({ watermarkRef });
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<hs-autocomplete
|
|
3
|
+
v-model="value"
|
|
4
|
+
clearable
|
|
5
|
+
class="inline-input w-50"
|
|
6
|
+
placeholder="请输入"
|
|
7
|
+
ref="hsAutocompleteRef"
|
|
8
|
+
:fetch-suggestions="querySearchAsync"
|
|
9
|
+
@select="handleSelect"
|
|
10
|
+
value-key="field_name"
|
|
11
|
+
></hs-autocomplete>
|
|
12
|
+
</template>
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { useBcAutoComplete } from './useAutoComplete';
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
// 初始化请求地址
|
|
17
|
+
url: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: '',
|
|
20
|
+
},
|
|
21
|
+
// 请求参数
|
|
22
|
+
params: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => {},
|
|
25
|
+
},
|
|
26
|
+
type: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'btn',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
// 双向绑定的value值
|
|
32
|
+
const value = defineModel('');
|
|
33
|
+
// 定义emit事件
|
|
34
|
+
const emits = defineEmits(['change']);
|
|
35
|
+
const { handleSelect, querySearchAsync } = useBcAutoComplete(props, emits);
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import IFormData from '/@/types/form';
|
|
2
|
+
|
|
3
|
+
// 数据池
|
|
4
|
+
const field_pool_json: Record<string, IFormData.Data> = {
|
|
5
|
+
form: [
|
|
6
|
+
{ field_name: '姓名', field_code: 'name' },
|
|
7
|
+
{ field_name: '年龄', field_code: 'age' },
|
|
8
|
+
{ field_name: '手机号', field_code: 'phone' },
|
|
9
|
+
], // 表单
|
|
10
|
+
table: [
|
|
11
|
+
{ field_name: '姓名', field_code: 'name' },
|
|
12
|
+
{ field_name: '性别', field_code: 'gender' },
|
|
13
|
+
{ field_name: '手机号', field_code: 'phone' },
|
|
14
|
+
], // 表格
|
|
15
|
+
btn: [
|
|
16
|
+
{ field_name: '新增', field_code: 'add' },
|
|
17
|
+
{ field_name: '查询', field_code: 'search' },
|
|
18
|
+
{ field_name: '刷新', field_code: 'refresh' },
|
|
19
|
+
{ field_name: '充值', field_code: 'recharge' },
|
|
20
|
+
{ field_name: '重制', field_code: 'reset' },
|
|
21
|
+
{ field_name: '一键解析', field_code: 'analysis' },
|
|
22
|
+
{ field_name: '开始接诊', field_code: 'clinical_reception' },
|
|
23
|
+
], // 按钮
|
|
24
|
+
};
|
|
25
|
+
export { field_pool_json };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import bcAutoComplete from './bcAutoComplete.vue';
|
|
2
|
+
import ComponentAttr from '/@/types/components';
|
|
3
|
+
import IFormData from '/@/types/form';
|
|
4
|
+
import { ref, watch } from 'vue';
|
|
5
|
+
import { field_pool_json } from './defaultData';
|
|
6
|
+
|
|
7
|
+
export function useBcAutoComplete(props: ComponentAttr.Props<typeof bcAutoComplete>, emits: (event: 'change', ...args: IFormData.Data[]) => void) {
|
|
8
|
+
let list = ref<Record<string, IFormData.Data>[]>([]);
|
|
9
|
+
/**
|
|
10
|
+
* 刷新数据
|
|
11
|
+
*/
|
|
12
|
+
const refreshData = () => {
|
|
13
|
+
list.value = field_pool_json[props.type];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* 监听参数的变化,调用初始化的方法
|
|
17
|
+
*/
|
|
18
|
+
watch(
|
|
19
|
+
() => props.params,
|
|
20
|
+
(value) => {
|
|
21
|
+
console.log('value', value);
|
|
22
|
+
// 调用查询数据的方法
|
|
23
|
+
refreshData();
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
immediate: true,
|
|
27
|
+
deep: true,
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
// 定时器实例
|
|
32
|
+
let timeout: ReturnType<typeof setTimeout>;
|
|
33
|
+
/**
|
|
34
|
+
* 查询方法
|
|
35
|
+
* @param queryString
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
const createFilter = (queryString: string) => {
|
|
39
|
+
return (restaurant: Record<string, IFormData.Data>) => {
|
|
40
|
+
return restaurant.field_name && restaurant.field_name.indexOf(queryString) === 0;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* 查询按钮函数回调
|
|
45
|
+
* @param queryString
|
|
46
|
+
* @param cb
|
|
47
|
+
*/
|
|
48
|
+
const querySearchAsync = (queryString: string, cb: (arg: IFormData.Data) => void) => {
|
|
49
|
+
// 执行查询方法
|
|
50
|
+
const results = queryString ? list.value.filter(createFilter(queryString)) : list.value;
|
|
51
|
+
cb(results);
|
|
52
|
+
// 清除定时器
|
|
53
|
+
clearTimeout(timeout);
|
|
54
|
+
timeout = setTimeout(() => {}, 1000 * Math.random());
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 切换选择按钮事件
|
|
58
|
+
* @param item
|
|
59
|
+
*/
|
|
60
|
+
const handleSelect = (item: Record<string, IFormData.Data>) => {
|
|
61
|
+
// console.debug('handleSelect', item);
|
|
62
|
+
emits('change', item);
|
|
63
|
+
};
|
|
64
|
+
return { handleSelect, querySearchAsync };
|
|
65
|
+
}
|