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,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2020.11.29 lyt 整理
|
|
3
|
+
* 工具类集合,适用于平时开发
|
|
4
|
+
* 新增多行注释信息,鼠标放到方法名即可查看
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* 小数或整数(不可以负数)
|
|
8
|
+
* @param val 当前值字符串
|
|
9
|
+
* @returns 返回处理后的字符串
|
|
10
|
+
*/
|
|
11
|
+
export function verifyNumberIntegerAndFloat(val: string) {
|
|
12
|
+
// 匹配空格
|
|
13
|
+
let v = val.replace(/(^\s*)|(\s*$)/g, '');
|
|
14
|
+
// 只能是数字和小数点,不能是其他输入
|
|
15
|
+
v = v.replace(/[^\d.]/g, '');
|
|
16
|
+
// 以0开始只能输入一个
|
|
17
|
+
v = v.replace(/^0{2}$/g, '0');
|
|
18
|
+
// 保证第一位只能是数字,不能是点
|
|
19
|
+
v = v.replace(/^\./g, '');
|
|
20
|
+
// 小数只能出现1位
|
|
21
|
+
v = v.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.');
|
|
22
|
+
// 小数点后面保留2位
|
|
23
|
+
v = v.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
|
|
24
|
+
// 返回结果
|
|
25
|
+
return v;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 验证百分比(不可以小数)
|
|
29
|
+
* @param val 当前值字符串
|
|
30
|
+
* @returns 返回处理后的字符串
|
|
31
|
+
*/
|
|
32
|
+
export function verifyNumberPercentage(val: string): string {
|
|
33
|
+
// 匹配空格
|
|
34
|
+
let v = val.replace(/(^\s*)|(\s*$)/g, '');
|
|
35
|
+
// 只能是数字和小数点,不能是其他输入
|
|
36
|
+
v = v.replace(/[^\d]/g, '');
|
|
37
|
+
// 不能以0开始
|
|
38
|
+
v = v.replace(/^0/g, '');
|
|
39
|
+
// 数字超过100,赋值成最大值100
|
|
40
|
+
v = v.replace(/^[1-9]\d\d{1,3}$/, '100');
|
|
41
|
+
// 返回结果
|
|
42
|
+
return v;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 验证百分比(可以小数)
|
|
47
|
+
* @param val 当前值字符串
|
|
48
|
+
* @returns 返回处理后的字符串
|
|
49
|
+
*/
|
|
50
|
+
export function verifyNumberPercentageFloat(val: string): string {
|
|
51
|
+
let v = verifyNumberIntegerAndFloat(val);
|
|
52
|
+
// 数字超过100,赋值成最大值100
|
|
53
|
+
v = v.replace(/^[1-9]\d\d{1,3}$/, '100');
|
|
54
|
+
// 超过100之后不给再输入值
|
|
55
|
+
v = v.replace(/^100\.$/, '100');
|
|
56
|
+
// 返回结果
|
|
57
|
+
return v;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 正整数验证
|
|
62
|
+
* @param val 当前值字符串
|
|
63
|
+
* @returns 返回处理后的字符串
|
|
64
|
+
*/
|
|
65
|
+
export function verifiyNumberInteger(val: string) {
|
|
66
|
+
// 匹配空格
|
|
67
|
+
let v = val.replace(/(^\s*)|(\s*$)/g, '');
|
|
68
|
+
// 去掉 '.' , 防止贴贴的时候出现问题 如 0.1.12.12
|
|
69
|
+
v = v.replace(/[\.]*/g, '');
|
|
70
|
+
// 去掉以 0 开始后面的数, 防止贴贴的时候出现问题 如 00121323
|
|
71
|
+
v = v.replace(/(^0[\d]*)$/g, '0');
|
|
72
|
+
// 首位是0,只能出现一次
|
|
73
|
+
v = v.replace(/^0\d$/g, '0');
|
|
74
|
+
// 只匹配数字
|
|
75
|
+
v = v.replace(/[^\d]/g, '');
|
|
76
|
+
// 返回结果
|
|
77
|
+
return v;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 去掉中文及空格
|
|
82
|
+
* @param val 当前值字符串
|
|
83
|
+
* @returns 返回处理后的字符串
|
|
84
|
+
*/
|
|
85
|
+
export function verifyCnAndSpace(val: string) {
|
|
86
|
+
// 匹配中文与空格
|
|
87
|
+
let v = val.replace(/[\u4e00-\u9fa5\s]+/g, '');
|
|
88
|
+
// 匹配空格
|
|
89
|
+
v = v.replace(/(^\s*)|(\s*$)/g, '');
|
|
90
|
+
// 返回结果
|
|
91
|
+
return v;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 去掉英文及空格
|
|
96
|
+
* @param val 当前值字符串
|
|
97
|
+
* @returns 返回处理后的字符串
|
|
98
|
+
*/
|
|
99
|
+
export function verifyEnAndSpace(val: string) {
|
|
100
|
+
// 匹配英文与空格
|
|
101
|
+
let v = val.replace(/[a-zA-Z]+/g, '');
|
|
102
|
+
// 匹配空格
|
|
103
|
+
v = v.replace(/(^\s*)|(\s*$)/g, '');
|
|
104
|
+
// 返回结果
|
|
105
|
+
return v;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* 禁止输入空格
|
|
110
|
+
* @param val 当前值字符串
|
|
111
|
+
* @returns 返回处理后的字符串
|
|
112
|
+
*/
|
|
113
|
+
export function verifyAndSpace(val: string) {
|
|
114
|
+
// 匹配空格
|
|
115
|
+
let v = val.replace(/(^\s*)|(\s*$)/g, '');
|
|
116
|
+
// 返回结果
|
|
117
|
+
return v;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 金额用 `,` 区分开
|
|
122
|
+
* @param val 当前值字符串
|
|
123
|
+
* @returns 返回处理后的字符串
|
|
124
|
+
*/
|
|
125
|
+
export function verifyNumberComma(val: string) {
|
|
126
|
+
// 调用小数或整数(不可以负数)方法
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
|
+
let v: any = verifyNumberIntegerAndFloat(val);
|
|
129
|
+
// 字符串转成数组
|
|
130
|
+
v = v.toString().split('.');
|
|
131
|
+
// \B 匹配非单词边界,两边都是单词字符或者两边都是非单词字符
|
|
132
|
+
v[0] = v[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
133
|
+
// 数组转字符串
|
|
134
|
+
v = v.join('.');
|
|
135
|
+
// 返回结果
|
|
136
|
+
return v;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* 匹配文字变色(搜索时)
|
|
141
|
+
* @param val 当前值字符串
|
|
142
|
+
* @param text 要处理的字符串值
|
|
143
|
+
* @param color 搜索到时字体高亮颜色
|
|
144
|
+
* @returns 返回处理后的字符串
|
|
145
|
+
*/
|
|
146
|
+
export function verifyTextColor(val: string, text = '', color = 'red') {
|
|
147
|
+
// 返回内容,添加颜色
|
|
148
|
+
let v = text.replace(new RegExp(val, 'gi'), `<span style='color: ${color}'>${val}</span>`);
|
|
149
|
+
// 返回结果
|
|
150
|
+
return v;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* 数字转中文大写
|
|
155
|
+
* @param val 当前值字符串
|
|
156
|
+
* @param unit 默认:仟佰拾亿仟佰拾万仟佰拾元角分
|
|
157
|
+
* @returns 返回处理后的字符串
|
|
158
|
+
*/
|
|
159
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
160
|
+
export function verifyNumberCnUppercase(val: any, unit = '仟佰拾亿仟佰拾万仟佰拾元角分', v = '') {
|
|
161
|
+
// 当前内容字符串添加 2个0,为什么??
|
|
162
|
+
val += '00';
|
|
163
|
+
// 返回某个指定的字符串值在字符串中首次出现的位置,没有出现,则该方法返回 -1
|
|
164
|
+
let lookup = val.indexOf('.');
|
|
165
|
+
// substring:不包含结束下标内容,substr:包含结束下标内容
|
|
166
|
+
if (lookup >= 0) val = val.substring(0, lookup) + val.substr(lookup + 1, 2);
|
|
167
|
+
// 根据内容 val 的长度,截取返回对应大写
|
|
168
|
+
unit = unit.substr(unit.length - val.length);
|
|
169
|
+
// 循环截取拼接大写
|
|
170
|
+
for (let i = 0; i < val.length; i++) {
|
|
171
|
+
v += '零壹贰叁肆伍陆柒捌玖'.substr(val.substr(i, 1), 1) + unit.substr(i, 1);
|
|
172
|
+
}
|
|
173
|
+
// 正则处理
|
|
174
|
+
v = v
|
|
175
|
+
.replace(/零角零分$/, '整')
|
|
176
|
+
.replace(/零[仟佰拾]/g, '零')
|
|
177
|
+
.replace(/零{2,}/g, '零')
|
|
178
|
+
.replace(/零([亿|万])/g, '$1')
|
|
179
|
+
.replace(/零+元/, '元')
|
|
180
|
+
.replace(/亿零{0,3}万/, '亿')
|
|
181
|
+
.replace(/^元/, '零元');
|
|
182
|
+
// 返回结果
|
|
183
|
+
return v;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* 手机号码
|
|
188
|
+
* @param val 当前值字符串
|
|
189
|
+
* @returns 返回 true: 手机号码正确
|
|
190
|
+
*/
|
|
191
|
+
export function verifyPhone(val: string) {
|
|
192
|
+
// false: 手机号码不正确
|
|
193
|
+
if (!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(val)) return false;
|
|
194
|
+
// true: 手机号码正确
|
|
195
|
+
else return true;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* 国内电话号码
|
|
200
|
+
* @param val 当前值字符串
|
|
201
|
+
* @returns 返回 true: 国内电话号码正确
|
|
202
|
+
*/
|
|
203
|
+
export function verifyTelPhone(val: string) {
|
|
204
|
+
// false: 国内电话号码不正确
|
|
205
|
+
if (!/\d{3}-\d{8}|\d{4}-\d{7}/.test(val)) return false;
|
|
206
|
+
// true: 国内电话号码正确
|
|
207
|
+
else return true;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 登录账号 (字母开头,允许5-16字节,允许字母数字下划线)
|
|
212
|
+
* @param val 当前值字符串
|
|
213
|
+
* @returns 返回 true: 登录账号正确
|
|
214
|
+
*/
|
|
215
|
+
export function verifyAccount(val: string) {
|
|
216
|
+
// false: 登录账号不正确
|
|
217
|
+
if (!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(val)) return false;
|
|
218
|
+
// true: 登录账号正确
|
|
219
|
+
else return true;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* 密码 (以字母开头,长度在6~16之间,只能包含字母、数字和下划线)
|
|
224
|
+
* @param val 当前值字符串
|
|
225
|
+
* @returns 返回 true: 密码正确
|
|
226
|
+
*/
|
|
227
|
+
export function verifyPassword(val: string) {
|
|
228
|
+
// false: 密码不正确
|
|
229
|
+
if (!/^[a-zA-Z]\w{5,15}$/.test(val)) return false;
|
|
230
|
+
// true: 密码正确
|
|
231
|
+
else return true;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* 强密码 (字母+数字+特殊字符,长度在6-16之间)
|
|
236
|
+
* @param val 当前值字符串
|
|
237
|
+
* @returns 返回 true: 强密码正确
|
|
238
|
+
*/
|
|
239
|
+
export function verifyPasswordPowerful(val: string) {
|
|
240
|
+
// false: 强密码不正确
|
|
241
|
+
if (!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val))
|
|
242
|
+
return false;
|
|
243
|
+
// true: 强密码正确
|
|
244
|
+
else return true;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* 密码强度
|
|
249
|
+
* @param val 当前值字符串
|
|
250
|
+
* @description 弱:纯数字,纯字母,纯特殊字符
|
|
251
|
+
* @description 中:字母+数字,字母+特殊字符,数字+特殊字符
|
|
252
|
+
* @description 强:字母+数字+特殊字符
|
|
253
|
+
* @returns 返回处理后的字符串:弱、中、强
|
|
254
|
+
*/
|
|
255
|
+
export function verifyPasswordStrength(val: string) {
|
|
256
|
+
let v = '';
|
|
257
|
+
// 弱:纯数字,纯字母,纯特殊字符
|
|
258
|
+
if (/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(val)) v = '弱';
|
|
259
|
+
// 中:字母+数字,字母+特殊字符,数字+特殊字符
|
|
260
|
+
if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val)) v = '中';
|
|
261
|
+
// 强:字母+数字+特殊字符
|
|
262
|
+
if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val))
|
|
263
|
+
v = '强';
|
|
264
|
+
// 返回结果
|
|
265
|
+
return v;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* IP地址
|
|
270
|
+
* @param val 当前值字符串
|
|
271
|
+
* @returns 返回 true: IP地址正确
|
|
272
|
+
*/
|
|
273
|
+
export function verifyIPAddress(val: string) {
|
|
274
|
+
// false: IP地址不正确
|
|
275
|
+
if (
|
|
276
|
+
!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
|
277
|
+
val
|
|
278
|
+
)
|
|
279
|
+
)
|
|
280
|
+
return false;
|
|
281
|
+
// true: IP地址正确
|
|
282
|
+
else return true;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* 邮箱
|
|
287
|
+
* @param val 当前值字符串
|
|
288
|
+
* @returns 返回 true: 邮箱正确
|
|
289
|
+
*/
|
|
290
|
+
export function verifyEmail(val: string) {
|
|
291
|
+
// false: 邮箱不正确
|
|
292
|
+
if (
|
|
293
|
+
!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
|
|
294
|
+
val
|
|
295
|
+
)
|
|
296
|
+
)
|
|
297
|
+
return false;
|
|
298
|
+
// true: 邮箱正确
|
|
299
|
+
else return true;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* 身份证
|
|
304
|
+
* @param val 当前值字符串
|
|
305
|
+
* @returns 返回 true: 身份证正确
|
|
306
|
+
*/
|
|
307
|
+
export function verifyIdCard(val: string) {
|
|
308
|
+
// false: 身份证不正确
|
|
309
|
+
if (!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(val)) return false;
|
|
310
|
+
// true: 身份证正确
|
|
311
|
+
else return true;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* 姓名
|
|
316
|
+
* @param val 当前值字符串
|
|
317
|
+
* @returns 返回 true: 姓名正确
|
|
318
|
+
*/
|
|
319
|
+
export function verifyFullName(val: string) {
|
|
320
|
+
// false: 姓名不正确
|
|
321
|
+
if (!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(val)) return false;
|
|
322
|
+
// true: 姓名正确
|
|
323
|
+
else return true;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* 邮政编码
|
|
328
|
+
* @param val 当前值字符串
|
|
329
|
+
* @returns 返回 true: 邮政编码正确
|
|
330
|
+
*/
|
|
331
|
+
export function verifyPostalCode(val: string) {
|
|
332
|
+
// false: 邮政编码不正确
|
|
333
|
+
if (!/^[1-9][0-9]{5}$/.test(val)) return false;
|
|
334
|
+
// true: 邮政编码正确
|
|
335
|
+
else return true;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* url 处理
|
|
340
|
+
* @param val 当前值字符串
|
|
341
|
+
* @returns 返回 true: url 正确
|
|
342
|
+
*/
|
|
343
|
+
export function verifyUrl(val: string) {
|
|
344
|
+
// false: url不正确
|
|
345
|
+
if (
|
|
346
|
+
!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(
|
|
347
|
+
val
|
|
348
|
+
)
|
|
349
|
+
)
|
|
350
|
+
return false;
|
|
351
|
+
// true: url正确
|
|
352
|
+
else return true;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* 车牌号
|
|
357
|
+
* @param val 当前值字符串
|
|
358
|
+
* @returns 返回 true:车牌号正确
|
|
359
|
+
*/
|
|
360
|
+
export function verifyCarNum(val: string) {
|
|
361
|
+
// false: 车牌号不正确
|
|
362
|
+
if (
|
|
363
|
+
!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(
|
|
364
|
+
val
|
|
365
|
+
)
|
|
366
|
+
)
|
|
367
|
+
return false;
|
|
368
|
+
// true:车牌号正确
|
|
369
|
+
else return true;
|
|
370
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// 页面添加水印效果
|
|
2
|
+
const setWatermark = (str: string) => {
|
|
3
|
+
const id = '1.23452384164.123412416';
|
|
4
|
+
if (document.getElementById(id) !== null) document.body.removeChild(<HTMLElement>document.getElementById(id));
|
|
5
|
+
const can = document.createElement('canvas');
|
|
6
|
+
can.width = 200;
|
|
7
|
+
can.height = 130;
|
|
8
|
+
const cans = <CanvasRenderingContext2D>can.getContext('2d');
|
|
9
|
+
cans.rotate((-20 * Math.PI) / 180);
|
|
10
|
+
cans.font = '12px Vedana';
|
|
11
|
+
cans.fillStyle = 'rgba(200, 200, 200, 0.30)';
|
|
12
|
+
cans.textBaseline = 'middle';
|
|
13
|
+
cans.fillText(str, can.width / 10, can.height / 2);
|
|
14
|
+
const div = document.createElement('div');
|
|
15
|
+
div.id = id;
|
|
16
|
+
div.style.pointerEvents = 'none';
|
|
17
|
+
div.style.top = '0px';
|
|
18
|
+
div.style.left = '0px';
|
|
19
|
+
div.style.position = 'fixed';
|
|
20
|
+
div.style.zIndex = '10000000';
|
|
21
|
+
div.style.width = `${document.documentElement.clientWidth}px`;
|
|
22
|
+
div.style.height = `${document.documentElement.clientHeight}px`;
|
|
23
|
+
div.style.background = `url(${can.toDataURL('image/png')}) left top repeat`;
|
|
24
|
+
document.body.appendChild(div);
|
|
25
|
+
return id;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 页面添加水印效果
|
|
30
|
+
* @method set 设置水印
|
|
31
|
+
* @method del 删除水印
|
|
32
|
+
*/
|
|
33
|
+
const watermark = {
|
|
34
|
+
// 设置水印
|
|
35
|
+
set: (str: string) => {
|
|
36
|
+
let id = setWatermark(str);
|
|
37
|
+
if (document.getElementById(id) === null) id = setWatermark(str);
|
|
38
|
+
},
|
|
39
|
+
// 删除水印
|
|
40
|
+
del: () => {
|
|
41
|
+
let id = '1.23452384164.123412416';
|
|
42
|
+
if (document.getElementById(id) !== null) document.body.removeChild(<HTMLElement>document.getElementById(id));
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// 导出方法
|
|
47
|
+
export default watermark;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="error layout-padding">
|
|
3
|
+
<div class="layout-padding-auto layout-padding-view">
|
|
4
|
+
<div class="error-flex">
|
|
5
|
+
<div class="left">
|
|
6
|
+
<div class="left-item">
|
|
7
|
+
<div class="left-item-animation left-item-num">401</div>
|
|
8
|
+
<div class="left-item-animation left-item-title">您未被授权,没有操作权限~</div>
|
|
9
|
+
<div class="left-item-animation left-item-msg">联系方式:加QQ群探讨 665452019</div>
|
|
10
|
+
<div class="left-item-animation left-item-btn">
|
|
11
|
+
<el-button type="primary" size="default" round @click="onSetAuth">重新授权</el-button>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="right">
|
|
16
|
+
<img src="https://i.hd-r.cn/2cf0d2e192660eec23eb9d0655753e7d.png" />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts" name="noPower">
|
|
24
|
+
import { Session } from '/@/utils/storage';
|
|
25
|
+
|
|
26
|
+
const onSetAuth = () => {
|
|
27
|
+
// 清除缓存/token等
|
|
28
|
+
Session.clear();
|
|
29
|
+
// 使用 reload 时,不需要调用 resetRoute() 重置路由
|
|
30
|
+
window.location.reload();
|
|
31
|
+
};
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style scoped lang="scss">
|
|
35
|
+
.error {
|
|
36
|
+
height: 100%;
|
|
37
|
+
.error-flex {
|
|
38
|
+
margin: auto;
|
|
39
|
+
display: flex;
|
|
40
|
+
height: 350px;
|
|
41
|
+
width: 900px;
|
|
42
|
+
.left {
|
|
43
|
+
flex: 1;
|
|
44
|
+
height: 100%;
|
|
45
|
+
align-items: center;
|
|
46
|
+
display: flex;
|
|
47
|
+
.left-item {
|
|
48
|
+
.left-item-animation {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
animation-name: error-num;
|
|
51
|
+
animation-duration: 0.5s;
|
|
52
|
+
animation-fill-mode: forwards;
|
|
53
|
+
}
|
|
54
|
+
.left-item-num {
|
|
55
|
+
color: var(--el-color-info);
|
|
56
|
+
font-size: 55px;
|
|
57
|
+
}
|
|
58
|
+
.left-item-title {
|
|
59
|
+
font-size: 20px;
|
|
60
|
+
color: var(--el-text-color-primary);
|
|
61
|
+
margin: 15px 0 5px 0;
|
|
62
|
+
animation-delay: 0.1s;
|
|
63
|
+
}
|
|
64
|
+
.left-item-msg {
|
|
65
|
+
color: var(--el-text-color-secondary);
|
|
66
|
+
font-size: 12px;
|
|
67
|
+
margin-bottom: 30px;
|
|
68
|
+
animation-delay: 0.2s;
|
|
69
|
+
}
|
|
70
|
+
.left-item-btn {
|
|
71
|
+
animation-delay: 0.2s;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.right {
|
|
76
|
+
flex: 1;
|
|
77
|
+
opacity: 0;
|
|
78
|
+
animation-name: error-img;
|
|
79
|
+
animation-duration: 2s;
|
|
80
|
+
animation-fill-mode: forwards;
|
|
81
|
+
img {
|
|
82
|
+
width: 100%;
|
|
83
|
+
height: 100%;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="error layout-padding">
|
|
3
|
+
<div class="layout-padding-auto layout-padding-view">
|
|
4
|
+
<div class="error-flex">
|
|
5
|
+
<div class="left">
|
|
6
|
+
<div class="left-item">
|
|
7
|
+
<div class="left-item-animation left-item-num">404</div>
|
|
8
|
+
<div class="left-item-animation left-item-title">页面不存在</div>
|
|
9
|
+
<div class="left-item-animation left-item-msg">您可以先检查网址,然后重新输入或给我们反馈问题。</div>
|
|
10
|
+
<div class="left-item-animation left-item-btn">
|
|
11
|
+
<el-button type="primary" size="default" round @click="onGoHome">返回首页</el-button>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="right">
|
|
16
|
+
<img :src="error404" />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts" name="notFound">
|
|
24
|
+
import { useRouter } from 'vue-router';
|
|
25
|
+
import error404 from '/@/assets/404.png';
|
|
26
|
+
// 定义变量内容
|
|
27
|
+
const router = useRouter();
|
|
28
|
+
|
|
29
|
+
// 返回首页
|
|
30
|
+
const onGoHome = () => {
|
|
31
|
+
router.push('/');
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style scoped lang="scss">
|
|
36
|
+
.error {
|
|
37
|
+
height: 100%;
|
|
38
|
+
.error-flex {
|
|
39
|
+
margin: auto;
|
|
40
|
+
display: flex;
|
|
41
|
+
height: 350px;
|
|
42
|
+
width: 900px;
|
|
43
|
+
.left {
|
|
44
|
+
flex: 1;
|
|
45
|
+
height: 100%;
|
|
46
|
+
align-items: center;
|
|
47
|
+
display: flex;
|
|
48
|
+
.left-item {
|
|
49
|
+
.left-item-animation {
|
|
50
|
+
opacity: 0;
|
|
51
|
+
animation-name: error-num;
|
|
52
|
+
animation-duration: 0.5s;
|
|
53
|
+
animation-fill-mode: forwards;
|
|
54
|
+
}
|
|
55
|
+
.left-item-num {
|
|
56
|
+
color: var(--el-color-info);
|
|
57
|
+
font-size: 55px;
|
|
58
|
+
}
|
|
59
|
+
.left-item-title {
|
|
60
|
+
font-size: 20px;
|
|
61
|
+
color: var(--el-text-color-primary);
|
|
62
|
+
margin: 15px 0 5px 0;
|
|
63
|
+
animation-delay: 0.1s;
|
|
64
|
+
}
|
|
65
|
+
.left-item-msg {
|
|
66
|
+
color: var(--el-text-color-secondary);
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
margin-bottom: 30px;
|
|
69
|
+
animation-delay: 0.2s;
|
|
70
|
+
}
|
|
71
|
+
.left-item-btn {
|
|
72
|
+
animation-delay: 0.2s;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
.right {
|
|
77
|
+
flex: 1;
|
|
78
|
+
opacity: 0;
|
|
79
|
+
animation-name: error-img;
|
|
80
|
+
animation-duration: 2s;
|
|
81
|
+
animation-fill-mode: forwards;
|
|
82
|
+
img {
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 100%;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<hs-bc-table @row-click="onRowClick" @cell-contextmenu="onCellContextmenu">
|
|
4
|
+
<template v-slot:[state.info]="{ row, column, rowIndex, columnIndex }">
|
|
5
|
+
<span>自定义插槽</span>
|
|
6
|
+
</template>
|
|
7
|
+
<template v-slot:[state.name]="{ row, column, rowIndex, columnIndex }">
|
|
8
|
+
<!-- <el-button>{{ column }}</el-button> -->
|
|
9
|
+
</template>
|
|
10
|
+
</hs-bc-table>
|
|
11
|
+
<!-- <hs-test @row-click="onRowClick" @cell-contextmenu="onCellContextmenu"></hs-test> -->
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
<script setup lang="ts" name="home">
|
|
15
|
+
import { reactive, onMounted, ref, watch, nextTick, onActivated } from 'vue';
|
|
16
|
+
import { storeToRefs } from 'pinia';
|
|
17
|
+
import { useThemeConfig } from '/@/stores/themeConfig';
|
|
18
|
+
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
|
19
|
+
import { column } from 'element-plus/es/components/table-v2/src/common';
|
|
20
|
+
|
|
21
|
+
// 定义变量内容
|
|
22
|
+
const homeLineRef = ref();
|
|
23
|
+
const homePieRef = ref();
|
|
24
|
+
const homeBarRef = ref();
|
|
25
|
+
const storesTagsViewRoutes = useTagsViewRoutes();
|
|
26
|
+
const storesThemeConfig = useThemeConfig();
|
|
27
|
+
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
28
|
+
const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
|
|
29
|
+
|
|
30
|
+
const state = reactive({
|
|
31
|
+
info: 'info',
|
|
32
|
+
name: 'name',
|
|
33
|
+
});
|
|
34
|
+
// 页面加载时
|
|
35
|
+
onMounted(() => {});
|
|
36
|
+
// 由于页面缓存原因,keep-alive
|
|
37
|
+
onActivated(() => {});
|
|
38
|
+
// 单元格点击事件
|
|
39
|
+
const onRowClick = (row: Element, column: Element, event: Element) => {
|
|
40
|
+
console.debug('父页面获取子组件事件:', 'row', row, 'column:', column, 'event:', event);
|
|
41
|
+
};
|
|
42
|
+
const onCellContextmenu = (row: Element, column: Element, cell: Element, event: Element) => {
|
|
43
|
+
console.debug('鼠标右键:', 'row', row, 'column:', column, 'cell:', cell, 'event:', event);
|
|
44
|
+
};
|
|
45
|
+
// 监听 pinia 中的 tagsview 开启全屏变化,重新 resize 图表,防止不出现/大小不变等
|
|
46
|
+
watch(
|
|
47
|
+
() => isTagsViewCurrenFull.value,
|
|
48
|
+
() => {}
|
|
49
|
+
);
|
|
50
|
+
// 监听 pinia 中是否开启深色主题
|
|
51
|
+
watch(
|
|
52
|
+
() => themeConfig.value.isIsDark,
|
|
53
|
+
(isIsDark) => {
|
|
54
|
+
nextTick(() => {});
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
deep: true,
|
|
58
|
+
immediate: true,
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
</script>
|
|
62
|
+
<style scoped lang="scss"></style>
|