ylyx-cli 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/README.md +184 -0
- package/bin/ylyx.js +95 -0
- package/lib/generator.js +192 -0
- package/lib/index.js +113 -0
- package/lib/interactive.js +87 -0
- package/lib/remote.js +179 -0
- package/lib/template.js +174 -0
- package/lib/utils.js +134 -0
- package/package.json +56 -0
- package/templates/react-app/files/README.md +23 -0
- package/templates/react-app/files/package.json +29 -0
- package/templates/react-app/files/public/index.html +11 -0
- package/templates/react-app/files/src/App.css +15 -0
- package/templates/react-app/files/src/App.js +15 -0
- package/templates/react-app/files/src/index.css +10 -0
- package/templates/react-app/files/src/index.js +11 -0
- package/templates/react-app/template.json +12 -0
- package/templates/react-component/files/Component.module.css +5 -0
- package/templates/react-component/files/Component.tsx +31 -0
- package/templates/react-component/files/index.ts +2 -0
- package/templates/react-component/template.json +49 -0
- package/templates/vue-app/files/.editorconfig +14 -0
- package/templates/vue-app/files/.env.development +21 -0
- package/templates/vue-app/files/.env.production +18 -0
- package/templates/vue-app/files/.eslintignore +5 -0
- package/templates/vue-app/files/.eslintrc.js +267 -0
- package/templates/vue-app/files/.prettierignore +12 -0
- package/templates/vue-app/files/.travis.yml +5 -0
- package/templates/vue-app/files/.vscode/extensions.json +7 -0
- package/templates/vue-app/files/.vscode/settings.json +39 -0
- package/templates/vue-app/files/LICENSE +191 -0
- package/templates/vue-app/files/README.md +87 -0
- package/templates/vue-app/files/babel.config.js +11 -0
- package/templates/vue-app/files/jest.config.js +24 -0
- package/templates/vue-app/files/package.json +136 -0
- package/templates/vue-app/files/plopfile.js +7 -0
- package/templates/vue-app/files/postcss.config.js +5 -0
- package/templates/vue-app/files/prettier.config.js +36 -0
- package/templates/vue-app/files/public/default.js +26 -0
- package/templates/vue-app/files/public/favicon.ico +0 -0
- package/templates/vue-app/files/public/index.html +26 -0
- package/templates/vue-app/files/src/App.vue +54 -0
- package/templates/vue-app/files/src/api/bigDataV/index.js +198 -0
- package/templates/vue-app/files/src/api/data.js +42 -0
- package/templates/vue-app/files/src/api/dataArchive/index.js +186 -0
- package/templates/vue-app/files/src/api/generator/genConfig.js +16 -0
- package/templates/vue-app/files/src/api/generator/generator.js +32 -0
- package/templates/vue-app/files/src/api/indexManagement/index.js +39 -0
- package/templates/vue-app/files/src/api/institutionMonitor/index.js +396 -0
- package/templates/vue-app/files/src/api/institutionSet/index.js +120 -0
- package/templates/vue-app/files/src/api/login.js +44 -0
- package/templates/vue-app/files/src/api/selfStatistics/index.js +50 -0
- package/templates/vue-app/files/src/api/system/code.js +15 -0
- package/templates/vue-app/files/src/api/system/dict.js +34 -0
- package/templates/vue-app/files/src/api/system/dictDetail.js +52 -0
- package/templates/vue-app/files/src/api/system/equipment.js +35 -0
- package/templates/vue-app/files/src/api/system/examManage.js +49 -0
- package/templates/vue-app/files/src/api/system/examProject.js +48 -0
- package/templates/vue-app/files/src/api/system/hosModel.js +35 -0
- package/templates/vue-app/files/src/api/system/hospital.js +88 -0
- package/templates/vue-app/files/src/api/system/job.js +40 -0
- package/templates/vue-app/files/src/api/system/menu.js +67 -0
- package/templates/vue-app/files/src/api/system/model.js +42 -0
- package/templates/vue-app/files/src/api/system/risConfig.js +9 -0
- package/templates/vue-app/files/src/api/system/role.js +64 -0
- package/templates/vue-app/files/src/api/system/sysSet.js +19 -0
- package/templates/vue-app/files/src/api/system/timing.js +41 -0
- package/templates/vue-app/files/src/api/system/user.js +121 -0
- package/templates/vue-app/files/src/api/tools/alipay.js +25 -0
- package/templates/vue-app/files/src/api/tools/email.js +24 -0
- package/templates/vue-app/files/src/api/tools/localStorage.js +27 -0
- package/templates/vue-app/files/src/api/tools/qiniu.js +40 -0
- package/templates/vue-app/files/src/assets/401_images/401.gif +0 -0
- package/templates/vue-app/files/src/assets/404_images/404.png +0 -0
- package/templates/vue-app/files/src/assets/404_images/404_cloud.png +0 -0
- package/templates/vue-app/files/src/assets/css/font-awesome.css +2342 -0
- package/templates/vue-app/files/src/assets/css/font-awesome.min.css +2336 -0
- package/templates/vue-app/files/src/assets/fonts/FontAwesome.otf +0 -0
- package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.eot +0 -0
- package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.svg +2671 -0
- package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.ttf +0 -0
- package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.woff +0 -0
- package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.woff2 +0 -0
- package/templates/vue-app/files/src/assets/icons/index.js +9 -0
- package/templates/vue-app/files/src/assets/icons/svg/Steve-Jobs.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/achive.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/alipay.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/anq.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/app.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/archive.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/backup.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/chain.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/chart.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/codeConsole.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/dashboard.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/database.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/date.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/deploy.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/dept.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/dev.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/develop.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/dictionary.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/doc.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/download.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/edit.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/education.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/email.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/equSet.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/error.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/exit-fullscreen.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/fullscreen.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/fwb.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/github.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/goBack.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/gonggao.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/hospital.svg +2 -0
- package/templates/vue-app/files/src/assets/icons/svg/hospital1.svg +2 -0
- package/templates/vue-app/files/src/assets/icons/svg/hospitalTotal.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/icon.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/image.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/index.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/international.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/ipvisits.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/java.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/link.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/list.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/lock.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/log.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/login.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/loginOne.svg +35 -0
- package/templates/vue-app/files/src/assets/icons/svg/loginOneWhite.svg +19 -0
- package/templates/vue-app/files/src/assets/icons/svg/loginOr.svg +93 -0
- package/templates/vue-app/files/src/assets/icons/svg/loginUp.svg +96 -0
- package/templates/vue-app/files/src/assets/icons/svg/markdown.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/menu.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/message.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/mnt.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/money.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/monitor.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/nested.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/network.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/offline.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/online.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/password.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/people.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/peoples.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/perSet.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/permission.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/phone.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/piechart.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/qiniu.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/redis.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/resetpassword.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/resetpassword1.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/role.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/search.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/server.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/shopping.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/size.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/skill.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/source.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/sqlMonitor.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/statistical.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/swagger.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/sys-tools.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/system.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/system1.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/tab.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/teams.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/theme.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/timing.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/tools.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/tree-table.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/tree.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/unlock.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/user.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/user1.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/validCode.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/visits.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/web.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/wechat.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/weixin.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svg/zujian.svg +1 -0
- package/templates/vue-app/files/src/assets/icons/svgo.yml +21 -0
- package/templates/vue-app/files/src/assets/images/archive.png +0 -0
- package/templates/vue-app/files/src/assets/images/archive_icon.png +0 -0
- package/templates/vue-app/files/src/assets/images/avatar.png +0 -0
- package/templates/vue-app/files/src/assets/images/background.jpg +0 -0
- package/templates/vue-app/files/src/assets/images/bg.png +0 -0
- package/templates/vue-app/files/src/assets/images/gongan.png +0 -0
- package/templates/vue-app/files/src/assets/images/hospital_icon.png +0 -0
- package/templates/vue-app/files/src/assets/images/location.png +0 -0
- package/templates/vue-app/files/src/assets/images/logintitle.jpg +0 -0
- package/templates/vue-app/files/src/assets/images/logo-copy1.png +0 -0
- package/templates/vue-app/files/src/assets/images/logo.png +0 -0
- package/templates/vue-app/files/src/assets/images/logoBg.png +0 -0
- package/templates/vue-app/files/src/assets/images/offline-bg.png +0 -0
- package/templates/vue-app/files/src/assets/images/position.png +0 -0
- package/templates/vue-app/files/src/assets/images/qualityBg.jpg +0 -0
- package/templates/vue-app/files/src/assets/images/self-bg.png +0 -0
- package/templates/vue-app/files/src/assets/images/self-bg2.png +0 -0
- package/templates/vue-app/files/src/assets/images/triAngel.png +0 -0
- package/templates/vue-app/files/src/assets/images/triAngelNormal.png +0 -0
- package/templates/vue-app/files/src/assets/styles/btn.scss +103 -0
- package/templates/vue-app/files/src/assets/styles/eladmin.scss +124 -0
- package/templates/vue-app/files/src/assets/styles/element-ui.scss +217 -0
- package/templates/vue-app/files/src/assets/styles/element-variables.scss +31 -0
- package/templates/vue-app/files/src/assets/styles/global.scss +73 -0
- package/templates/vue-app/files/src/assets/styles/index.scss +220 -0
- package/templates/vue-app/files/src/assets/styles/mixin.scss +60 -0
- package/templates/vue-app/files/src/assets/styles/publicStyle.scss +224 -0
- package/templates/vue-app/files/src/assets/styles/sidebar.scss +239 -0
- package/templates/vue-app/files/src/assets/styles/transition.scss +48 -0
- package/templates/vue-app/files/src/assets/styles/variables.scss +44 -0
- package/templates/vue-app/files/src/common/flexible.js +145 -0
- package/templates/vue-app/files/src/components/Breadcrumb/index.vue +87 -0
- package/templates/vue-app/files/src/components/Crud/CRUD.operation.vue +248 -0
- package/templates/vue-app/files/src/components/Crud/Pagination.vue +20 -0
- package/templates/vue-app/files/src/components/Crud/RR.operation.vue +39 -0
- package/templates/vue-app/files/src/components/Crud/UD.operation.vue +106 -0
- package/templates/vue-app/files/src/components/Crud/crud.js +907 -0
- package/templates/vue-app/files/src/components/Crud/user/UR.operation.vue +154 -0
- package/templates/vue-app/files/src/components/DateRangePicker/index.vue +42 -0
- package/templates/vue-app/files/src/components/DateRangePickerProhibitNext/index.vue +42 -0
- package/templates/vue-app/files/src/components/DateRangePickerProhibitTodayNext/index.vue +48 -0
- package/templates/vue-app/files/src/components/Dict/Dict.js +31 -0
- package/templates/vue-app/files/src/components/Dict/index.js +29 -0
- package/templates/vue-app/files/src/components/Doc/index.vue +16 -0
- package/templates/vue-app/files/src/components/Echarts/BarChart.vue +115 -0
- package/templates/vue-app/files/src/components/Echarts/Category.vue +768 -0
- package/templates/vue-app/files/src/components/Echarts/Funnel.vue +120 -0
- package/templates/vue-app/files/src/components/Echarts/Gauge.vue +74 -0
- package/templates/vue-app/files/src/components/Echarts/Graph.vue +101 -0
- package/templates/vue-app/files/src/components/Echarts/HeatMap.vue +301 -0
- package/templates/vue-app/files/src/components/Echarts/Line3D.vue +110 -0
- package/templates/vue-app/files/src/components/Echarts/PieChart.vue +84 -0
- package/templates/vue-app/files/src/components/Echarts/Point.vue +161 -0
- package/templates/vue-app/files/src/components/Echarts/RadarChart.vue +123 -0
- package/templates/vue-app/files/src/components/Echarts/Rich.vue +160 -0
- package/templates/vue-app/files/src/components/Echarts/Sankey.vue +114 -0
- package/templates/vue-app/files/src/components/Echarts/Scatter.vue +192 -0
- package/templates/vue-app/files/src/components/Echarts/Sunburst.vue +127 -0
- package/templates/vue-app/files/src/components/Echarts/ThemeRiver.vue +233 -0
- package/templates/vue-app/files/src/components/Echarts/WordCloud.vue +201 -0
- package/templates/vue-app/files/src/components/GithubCorner/index.vue +55 -0
- package/templates/vue-app/files/src/components/Hamburger/index.vue +44 -0
- package/templates/vue-app/files/src/components/HeaderSearch/index.vue +196 -0
- package/templates/vue-app/files/src/components/IconSelect/index.vue +74 -0
- package/templates/vue-app/files/src/components/IconSelect/requireIcons.js +10 -0
- package/templates/vue-app/files/src/components/Iframe/index.vue +30 -0
- package/templates/vue-app/files/src/components/JavaEdit/index.vue +78 -0
- package/templates/vue-app/files/src/components/Pagination/index.vue +100 -0
- package/templates/vue-app/files/src/components/PanThumb/index.vue +149 -0
- package/templates/vue-app/files/src/components/ParentView/index.vue +3 -0
- package/templates/vue-app/files/src/components/Permission/index.js +13 -0
- package/templates/vue-app/files/src/components/Permission/permission.js +21 -0
- package/templates/vue-app/files/src/components/RightPanel/index.vue +149 -0
- package/templates/vue-app/files/src/components/Screenfull/index.vue +60 -0
- package/templates/vue-app/files/src/components/SizeSelect/index.vue +60 -0
- package/templates/vue-app/files/src/components/SvgIcon/index.vue +66 -0
- package/templates/vue-app/files/src/components/ThemePicker/index.vue +177 -0
- package/templates/vue-app/files/src/components/UploadExcel/index.vue +149 -0
- package/templates/vue-app/files/src/components/WaterMark/setWaterMark.js +68 -0
- package/templates/vue-app/files/src/components/WaterMark/waterMark.vue +69 -0
- package/templates/vue-app/files/src/components/Xgplayer/index.vue +49 -0
- package/templates/vue-app/files/src/components/YamlEdit/index.vue +81 -0
- package/templates/vue-app/files/src/layout/components/AppMain.vue +67 -0
- package/templates/vue-app/files/src/layout/components/Navbar.vue +209 -0
- package/templates/vue-app/files/src/layout/components/Settings/index.vue +125 -0
- package/templates/vue-app/files/src/layout/components/Sidebar/FixiOSBug.js +26 -0
- package/templates/vue-app/files/src/layout/components/Sidebar/Item.vue +29 -0
- package/templates/vue-app/files/src/layout/components/Sidebar/Link.vue +35 -0
- package/templates/vue-app/files/src/layout/components/Sidebar/Logo.vue +93 -0
- package/templates/vue-app/files/src/layout/components/Sidebar/SidebarItem.vue +104 -0
- package/templates/vue-app/files/src/layout/components/Sidebar/index.vue +79 -0
- package/templates/vue-app/files/src/layout/components/TagsView/ScrollPane.vue +90 -0
- package/templates/vue-app/files/src/layout/components/TagsView/index.vue +299 -0
- package/templates/vue-app/files/src/layout/components/index.js +5 -0
- package/templates/vue-app/files/src/layout/index.vue +119 -0
- package/templates/vue-app/files/src/layout/mixin/ResizeHandler.js +45 -0
- package/templates/vue-app/files/src/main.js +89 -0
- package/templates/vue-app/files/src/mixins/crud.js +348 -0
- package/templates/vue-app/files/src/router/index.js +156 -0
- package/templates/vue-app/files/src/router/routers.js +203 -0
- package/templates/vue-app/files/src/settings.js +57 -0
- package/templates/vue-app/files/src/store/getters.js +29 -0
- package/templates/vue-app/files/src/store/index.js +25 -0
- package/templates/vue-app/files/src/store/modules/api.js +33 -0
- package/templates/vue-app/files/src/store/modules/app.js +55 -0
- package/templates/vue-app/files/src/store/modules/permission.js +79 -0
- package/templates/vue-app/files/src/store/modules/register.js +17 -0
- package/templates/vue-app/files/src/store/modules/settings.js +46 -0
- package/templates/vue-app/files/src/store/modules/tagsView.js +168 -0
- package/templates/vue-app/files/src/store/modules/user.js +119 -0
- package/templates/vue-app/files/src/utils/auth.js +18 -0
- package/templates/vue-app/files/src/utils/base64ToFile.js +27 -0
- package/templates/vue-app/files/src/utils/clipboard.js +36 -0
- package/templates/vue-app/files/src/utils/datetime.js +289 -0
- package/templates/vue-app/files/src/utils/getBlobFile.js +10 -0
- package/templates/vue-app/files/src/utils/getTime.js +29 -0
- package/templates/vue-app/files/src/utils/index.js +520 -0
- package/templates/vue-app/files/src/utils/permission.js +29 -0
- package/templates/vue-app/files/src/utils/pinyin.js +450 -0
- package/templates/vue-app/files/src/utils/request.js +139 -0
- package/templates/vue-app/files/src/utils/rsaEncrypt.js +37 -0
- package/templates/vue-app/files/src/utils/shortcuts.js +210 -0
- package/templates/vue-app/files/src/utils/upload.js +12 -0
- package/templates/vue-app/files/src/utils/validate.js +262 -0
- package/templates/vue-app/files/src/views/components/Echarts.vue +124 -0
- package/templates/vue-app/files/src/views/components/Editor.vue +75 -0
- package/templates/vue-app/files/src/views/components/MarkDown.vue +44 -0
- package/templates/vue-app/files/src/views/components/UVideo.vue +37 -0
- package/templates/vue-app/files/src/views/components/YamlEdit.vue +206 -0
- package/templates/vue-app/files/src/views/components/camera/camera.vue +115 -0
- package/templates/vue-app/files/src/views/components/camera/cameraTest.vue +158 -0
- package/templates/vue-app/files/src/views/components/excel/upload-excel.vue +41 -0
- package/templates/vue-app/files/src/views/components/icons/element-icons.js +74 -0
- package/templates/vue-app/files/src/views/components/icons/index.vue +106 -0
- package/templates/vue-app/files/src/views/components/icons/svg-icons.js +10 -0
- package/templates/vue-app/files/src/views/components/scroll/index.vue +107 -0
- package/templates/vue-app/files/src/views/components/scrollFull/index.vue +99 -0
- package/templates/vue-app/files/src/views/dashboard/LineChart.vue +138 -0
- package/templates/vue-app/files/src/views/dashboard/PanelGroup.vue +173 -0
- package/templates/vue-app/files/src/views/dashboard/mixins/resize.js +57 -0
- package/templates/vue-app/files/src/views/dataArchive/delTable.vue +354 -0
- package/templates/vue-app/files/src/views/dataArchive/exportDetail.vue +121 -0
- package/templates/vue-app/files/src/views/dataArchive/exportList.vue +160 -0
- package/templates/vue-app/files/src/views/dataArchive/index.vue +2104 -0
- package/templates/vue-app/files/src/views/features/401.vue +83 -0
- package/templates/vue-app/files/src/views/features/404.vue +226 -0
- package/templates/vue-app/files/src/views/features/redirect.vue +12 -0
- package/templates/vue-app/files/src/views/generator/config.vue +348 -0
- package/templates/vue-app/files/src/views/generator/index.vue +143 -0
- package/templates/vue-app/files/src/views/generator/preview.vue +39 -0
- package/templates/vue-app/files/src/views/home.vue +80 -0
- package/templates/vue-app/files/src/views/indexManagement/index.vue +422 -0
- package/templates/vue-app/files/src/views/indexManagement/other.vue +286 -0
- package/templates/vue-app/files/src/views/institutionMonitor/components/LineChart.vue +191 -0
- package/templates/vue-app/files/src/views/institutionMonitor/index.scss +339 -0
- package/templates/vue-app/files/src/views/institutionMonitor/index.vue +1385 -0
- package/templates/vue-app/files/src/views/institutionMonitor/mixins/resize.js +57 -0
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/checkProjectCode.vue +267 -0
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/imageAbnormalMonitor.vue +361 -0
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/index.vue +686 -0
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/leakageAnomaly.vue +270 -0
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/moveMonitore.vue +114 -0
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/qualityMonitore.vue +338 -0
- package/templates/vue-app/files/src/views/institutionSet/cloudSet.vue +534 -0
- package/templates/vue-app/files/src/views/institutionSet/index.vue +2550 -0
- package/templates/vue-app/files/src/views/login.vue +243 -0
- package/templates/vue-app/files/src/views/qualityLogin.vue +280 -0
- package/templates/vue-app/files/src/views/selfStatistics/components/LineChart.vue +296 -0
- package/templates/vue-app/files/src/views/selfStatistics/hospitalDetail/index.vue +533 -0
- package/templates/vue-app/files/src/views/selfStatistics/index.scss +447 -0
- package/templates/vue-app/files/src/views/selfStatistics/index.vue +903 -0
- package/templates/vue-app/files/src/views/selfStatistics/mixins/resize.js +57 -0
- package/templates/vue-app/files/src/views/selfStatistics/monitorDetail/index.vue +285 -0
- package/templates/vue-app/files/src/views/selfStatistics/offlineDetail/index.vue +104 -0
- package/templates/vue-app/files/src/views/selfStatistics/selfActiveDetail/index.vue +104 -0
- package/templates/vue-app/files/src/views/selfStatistics/selfMonitorDetail/index.vue +420 -0
- package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/setWaterMark.js +68 -0
- package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/waterMark.vue +69 -0
- package/templates/vue-app/files/src/views/system/dept/index.vue +144 -0
- package/templates/vue-app/files/src/views/system/dict/dictDetail.vue +146 -0
- package/templates/vue-app/files/src/views/system/dict/index.vue +159 -0
- package/templates/vue-app/files/src/views/system/examModality/index.vue +174 -0
- package/templates/vue-app/files/src/views/system/examPart/index.vue +184 -0
- package/templates/vue-app/files/src/views/system/examProject/index.vue +321 -0
- package/templates/vue-app/files/src/views/system/examine/index.vue +66 -0
- package/templates/vue-app/files/src/views/system/job/index.vue +119 -0
- package/templates/vue-app/files/src/views/system/job/module/form.vue +72 -0
- package/templates/vue-app/files/src/views/system/job/module/header.vue +48 -0
- package/templates/vue-app/files/src/views/system/menu/index.vue +327 -0
- package/templates/vue-app/files/src/views/system/model/index.vue +285 -0
- package/templates/vue-app/files/src/views/system/role/index.vue +434 -0
- package/templates/vue-app/files/src/views/system/sysSet/index.vue +84 -0
- package/templates/vue-app/files/src/views/system/timing/index.vue +289 -0
- package/templates/vue-app/files/src/views/system/timing/log.vue +143 -0
- package/templates/vue-app/files/src/views/system/user/admin.vue +414 -0
- package/templates/vue-app/files/src/views/system/user/center/updateEmail.vue +146 -0
- package/templates/vue-app/files/src/views/system/user/center/updatePass.vue +168 -0
- package/templates/vue-app/files/src/views/system/user/center.vue +140 -0
- package/templates/vue-app/files/src/views/system/user/index.vue +972 -0
- package/templates/vue-app/files/src/views/systemSet/role/index.vue +314 -0
- package/templates/vue-app/files/src/views/systemSet/user/admin.vue +414 -0
- package/templates/vue-app/files/src/views/systemSet/user/center/updateEmail.vue +146 -0
- package/templates/vue-app/files/src/views/systemSet/user/center/updatePass.vue +115 -0
- package/templates/vue-app/files/src/views/systemSet/user/center.vue +351 -0
- package/templates/vue-app/files/src/views/systemSet/user/index.vue +928 -0
- package/templates/vue-app/files/src/views/tools/aliPay/config.vue +102 -0
- package/templates/vue-app/files/src/views/tools/aliPay/index.vue +48 -0
- package/templates/vue-app/files/src/views/tools/aliPay/toPay.vue +91 -0
- package/templates/vue-app/files/src/views/tools/email/config.vue +91 -0
- package/templates/vue-app/files/src/views/tools/email/index.vue +42 -0
- package/templates/vue-app/files/src/views/tools/email/send.vue +159 -0
- package/templates/vue-app/files/src/views/tools/storage/index.vue +35 -0
- package/templates/vue-app/files/src/views/tools/storage/local/index.vue +207 -0
- package/templates/vue-app/files/src/views/tools/storage/qiniu/form.vue +108 -0
- package/templates/vue-app/files/src/views/tools/storage/qiniu/index.vue +241 -0
- package/templates/vue-app/files/src/views/tools/swagger/index.vue +14 -0
- package/templates/vue-app/files/vue.config.js +173 -0
- package/templates/vue-app/template.json +30 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { initData, download } from '@/api/data';
|
|
2
|
+
import { parseTime, downloadFile } from '@/utils/index';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
// 表格数据
|
|
8
|
+
data: [],
|
|
9
|
+
// 排序规则,默认 id 降序, 支持多字段排序 ['id,desc', 'createTime,asc']
|
|
10
|
+
sort: ['id,desc'],
|
|
11
|
+
// 页码
|
|
12
|
+
page: 0,
|
|
13
|
+
// 每页数据条数
|
|
14
|
+
size: 10,
|
|
15
|
+
// 总数据条数
|
|
16
|
+
total: 0,
|
|
17
|
+
// 请求数据的url
|
|
18
|
+
url: '',
|
|
19
|
+
// 查询数据的参数
|
|
20
|
+
params: {},
|
|
21
|
+
// 待查询的对象
|
|
22
|
+
query: {},
|
|
23
|
+
// 等待时间
|
|
24
|
+
time: 50,
|
|
25
|
+
// 是否为新增类型的表单
|
|
26
|
+
isAdd: false,
|
|
27
|
+
// 导出的 Loading
|
|
28
|
+
downloadLoading: false,
|
|
29
|
+
// 表格 Loading 属性
|
|
30
|
+
loading: true,
|
|
31
|
+
// 删除 Loading 属性
|
|
32
|
+
delLoading: false,
|
|
33
|
+
delAllLoading: false,
|
|
34
|
+
// 弹窗属性
|
|
35
|
+
dialog: false,
|
|
36
|
+
// Form 表单
|
|
37
|
+
form: {},
|
|
38
|
+
// 重置表单
|
|
39
|
+
resetForm: {},
|
|
40
|
+
// 标题
|
|
41
|
+
title: '',
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
parseTime,
|
|
46
|
+
downloadFile,
|
|
47
|
+
async init() {
|
|
48
|
+
if (!(await this.beforeInit())) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
return new Promise((resolve, reject) => {
|
|
52
|
+
this.loading = true;
|
|
53
|
+
// 请求数据
|
|
54
|
+
initData(this.url, this.getQueryParame())
|
|
55
|
+
.then(data => {
|
|
56
|
+
this.total = data.totalElements;
|
|
57
|
+
this.data = data.content;
|
|
58
|
+
// time 毫秒后显示表格
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
this.loading = false;
|
|
61
|
+
}, this.time);
|
|
62
|
+
resolve(data);
|
|
63
|
+
})
|
|
64
|
+
.catch(err => {
|
|
65
|
+
this.loading = false;
|
|
66
|
+
reject(err);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
beforeInit() {
|
|
71
|
+
return true;
|
|
72
|
+
},
|
|
73
|
+
getQueryParame: function () {
|
|
74
|
+
return {
|
|
75
|
+
page: this.page,
|
|
76
|
+
size: this.size,
|
|
77
|
+
sort: this.sort,
|
|
78
|
+
...this.query,
|
|
79
|
+
...this.params,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
// 改变页码
|
|
83
|
+
pageChange(e) {
|
|
84
|
+
this.page = e - 1;
|
|
85
|
+
this.init();
|
|
86
|
+
},
|
|
87
|
+
// 改变每页显示数
|
|
88
|
+
sizeChange(e) {
|
|
89
|
+
this.page = 0;
|
|
90
|
+
this.size = e;
|
|
91
|
+
this.init();
|
|
92
|
+
},
|
|
93
|
+
// 预防删除第二页最后一条数据时,或者多选删除第二页的数据时,页码错误导致请求无数据
|
|
94
|
+
dleChangePage(size) {
|
|
95
|
+
if (size === undefined) {
|
|
96
|
+
size = 1;
|
|
97
|
+
}
|
|
98
|
+
if (this.data.length === size && this.page !== 0) {
|
|
99
|
+
this.page = this.page - 1;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
// 查询方法
|
|
103
|
+
toQuery() {
|
|
104
|
+
this.page = 0;
|
|
105
|
+
this.init();
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* 通用的提示封装
|
|
109
|
+
*/
|
|
110
|
+
submitSuccessNotify() {
|
|
111
|
+
this.$notify({
|
|
112
|
+
title: '提交成功',
|
|
113
|
+
type: 'success',
|
|
114
|
+
duration: 2500,
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
addSuccessNotify() {
|
|
118
|
+
this.$notify({
|
|
119
|
+
title: '新增成功',
|
|
120
|
+
type: 'success',
|
|
121
|
+
duration: 2500,
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
editSuccessNotify() {
|
|
125
|
+
this.$notify({
|
|
126
|
+
title: '编辑成功',
|
|
127
|
+
type: 'success',
|
|
128
|
+
duration: 2500,
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
delSuccessNotify() {
|
|
132
|
+
this.$notify({
|
|
133
|
+
title: '删除成功',
|
|
134
|
+
type: 'success',
|
|
135
|
+
duration: 2500,
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
notify(title, type) {
|
|
139
|
+
this.$notify({
|
|
140
|
+
title: title,
|
|
141
|
+
type: type,
|
|
142
|
+
duration: 2500,
|
|
143
|
+
});
|
|
144
|
+
},
|
|
145
|
+
/**
|
|
146
|
+
* 删除前可以调用 beforeDelMethod 做一些操作
|
|
147
|
+
*/
|
|
148
|
+
beforeDelMethod() {
|
|
149
|
+
return true;
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* 通用的删除
|
|
153
|
+
*/
|
|
154
|
+
delMethod(id) {
|
|
155
|
+
if (!this.beforeDelMethod()) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
this.delLoading = true;
|
|
159
|
+
this.crudMethod
|
|
160
|
+
.del(id)
|
|
161
|
+
.then(() => {
|
|
162
|
+
this.delLoading = false;
|
|
163
|
+
this.$refs[id].doClose();
|
|
164
|
+
this.dleChangePage();
|
|
165
|
+
this.delSuccessNotify();
|
|
166
|
+
this.afterDelMethod();
|
|
167
|
+
this.init();
|
|
168
|
+
})
|
|
169
|
+
.catch(() => {
|
|
170
|
+
this.delLoading = false;
|
|
171
|
+
this.$refs[id].doClose();
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
afterDelMethod() {},
|
|
175
|
+
/**
|
|
176
|
+
* 多选删除提示
|
|
177
|
+
*/
|
|
178
|
+
beforeDelAllMethod() {
|
|
179
|
+
this.$confirm('你确定删除选中的数据吗?', '提示', {
|
|
180
|
+
confirmButtonText: '确定',
|
|
181
|
+
cancelButtonText: '取消',
|
|
182
|
+
type: 'warning',
|
|
183
|
+
}).then(() => {
|
|
184
|
+
this.delAllMethod();
|
|
185
|
+
});
|
|
186
|
+
},
|
|
187
|
+
/**
|
|
188
|
+
* 多选删除
|
|
189
|
+
*/
|
|
190
|
+
delAllMethod() {
|
|
191
|
+
this.delAllLoading = true;
|
|
192
|
+
const data = this.$refs.table.selection;
|
|
193
|
+
const ids = [];
|
|
194
|
+
for (let i = 0; i < data.length; i++) {
|
|
195
|
+
ids.push(data[i].id);
|
|
196
|
+
}
|
|
197
|
+
this.crudMethod
|
|
198
|
+
.delAll(ids)
|
|
199
|
+
.then(() => {
|
|
200
|
+
this.delAllLoading = false;
|
|
201
|
+
this.dleChangePage(ids.length);
|
|
202
|
+
this.init();
|
|
203
|
+
this.$notify({
|
|
204
|
+
title: '删除成功',
|
|
205
|
+
type: 'success',
|
|
206
|
+
duration: 2500,
|
|
207
|
+
});
|
|
208
|
+
})
|
|
209
|
+
.catch(() => {
|
|
210
|
+
this.delAllLoading = false;
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* 显示新增弹窗前可以调用该方法
|
|
215
|
+
*/
|
|
216
|
+
beforeShowAddForm() {},
|
|
217
|
+
/**
|
|
218
|
+
* 显示新增弹窗
|
|
219
|
+
*/
|
|
220
|
+
showAddFormDialog() {
|
|
221
|
+
this.isAdd = true;
|
|
222
|
+
this.resetForm = JSON.parse(JSON.stringify(this.form));
|
|
223
|
+
this.beforeShowAddForm();
|
|
224
|
+
this.dialog = true;
|
|
225
|
+
},
|
|
226
|
+
/**
|
|
227
|
+
* 显示编辑弹窗前可以调用该方法
|
|
228
|
+
*/
|
|
229
|
+
beforeShowEditForm(data) {},
|
|
230
|
+
/**
|
|
231
|
+
* 显示编辑弹窗
|
|
232
|
+
*/
|
|
233
|
+
showEditFormDialog(data = '') {
|
|
234
|
+
this.isAdd = false;
|
|
235
|
+
if (data) {
|
|
236
|
+
this.resetForm = JSON.parse(JSON.stringify(this.form));
|
|
237
|
+
this.form = JSON.parse(JSON.stringify(data));
|
|
238
|
+
}
|
|
239
|
+
this.beforeShowEditForm(data);
|
|
240
|
+
this.dialog = true;
|
|
241
|
+
},
|
|
242
|
+
/**
|
|
243
|
+
* 新增方法
|
|
244
|
+
*/
|
|
245
|
+
addMethod() {
|
|
246
|
+
this.crudMethod
|
|
247
|
+
.add(this.form)
|
|
248
|
+
.then(() => {
|
|
249
|
+
this.addSuccessNotify();
|
|
250
|
+
this.loading = false;
|
|
251
|
+
this.afterAddMethod();
|
|
252
|
+
this.cancel();
|
|
253
|
+
this.init();
|
|
254
|
+
})
|
|
255
|
+
.catch(() => {
|
|
256
|
+
this.loading = false;
|
|
257
|
+
this.afterAddErrorMethod();
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
/**
|
|
261
|
+
* 新增后可以调用该方法
|
|
262
|
+
*/
|
|
263
|
+
afterAddMethod() {},
|
|
264
|
+
/**
|
|
265
|
+
* 新增失败后调用该方法
|
|
266
|
+
*/
|
|
267
|
+
afterAddErrorMethod() {},
|
|
268
|
+
/**
|
|
269
|
+
* 通用的编辑方法
|
|
270
|
+
*/
|
|
271
|
+
editMethod() {
|
|
272
|
+
this.crudMethod
|
|
273
|
+
.edit(this.form)
|
|
274
|
+
.then(() => {
|
|
275
|
+
this.editSuccessNotify();
|
|
276
|
+
this.loading = false;
|
|
277
|
+
this.afterEditMethod();
|
|
278
|
+
this.cancel();
|
|
279
|
+
this.init();
|
|
280
|
+
})
|
|
281
|
+
.catch(() => {
|
|
282
|
+
this.loading = false;
|
|
283
|
+
});
|
|
284
|
+
},
|
|
285
|
+
/**
|
|
286
|
+
* 编辑后可以调用该方法
|
|
287
|
+
*/
|
|
288
|
+
afterEditMethod() {},
|
|
289
|
+
/**
|
|
290
|
+
* 提交前可以调用该方法
|
|
291
|
+
*/
|
|
292
|
+
beforeSubmitMethod() {
|
|
293
|
+
return true;
|
|
294
|
+
},
|
|
295
|
+
/**
|
|
296
|
+
* 提交
|
|
297
|
+
*/
|
|
298
|
+
submitMethod() {
|
|
299
|
+
if (!this.beforeSubmitMethod()) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (this.$refs['form']) {
|
|
303
|
+
this.$refs['form'].validate(valid => {
|
|
304
|
+
if (valid) {
|
|
305
|
+
this.loading = true;
|
|
306
|
+
if (this.isAdd) {
|
|
307
|
+
this.addMethod();
|
|
308
|
+
} else this.editMethod();
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
/**
|
|
314
|
+
* 隐藏弹窗
|
|
315
|
+
*/
|
|
316
|
+
cancel() {
|
|
317
|
+
this.dialog = false;
|
|
318
|
+
if (this.$refs['form']) {
|
|
319
|
+
this.$refs['form'].clearValidate();
|
|
320
|
+
this.form = this.resetForm;
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
/**
|
|
324
|
+
* 获取弹窗的标题
|
|
325
|
+
*/
|
|
326
|
+
getFormTitle() {
|
|
327
|
+
return this.isAdd ? `新增${this.title}` : `编辑${this.title}`;
|
|
328
|
+
},
|
|
329
|
+
/**
|
|
330
|
+
* 通用导出
|
|
331
|
+
*/
|
|
332
|
+
downloadMethod() {
|
|
333
|
+
this.beforeInit();
|
|
334
|
+
this.downloadLoading = true;
|
|
335
|
+
download(this.url + '/download', this.params)
|
|
336
|
+
.then(result => {
|
|
337
|
+
this.downloadFile(result, this.title + '数据', 'xlsx');
|
|
338
|
+
this.downloadLoading = false;
|
|
339
|
+
})
|
|
340
|
+
.catch(() => {
|
|
341
|
+
this.downloadLoading = false;
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
filters: {
|
|
346
|
+
parseTime,
|
|
347
|
+
},
|
|
348
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import router from './routers';
|
|
2
|
+
import store from '@/store';
|
|
3
|
+
import Config from '@/settings';
|
|
4
|
+
import Cookies from 'js-cookie';
|
|
5
|
+
import NProgress from 'nprogress'; // progress bar
|
|
6
|
+
import 'nprogress/nprogress.css'; // progress bar style
|
|
7
|
+
import { getToken } from '@/utils/auth'; // getToken from cookie
|
|
8
|
+
import { buildMenus } from '@/api/system/menu';
|
|
9
|
+
import { filterAsyncRouter } from '@/store/modules/permission';
|
|
10
|
+
import { getUserDefaultHomePage } from '@/api/login';
|
|
11
|
+
|
|
12
|
+
NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
|
13
|
+
const { VUE_APP_LOGIN_URL, IS_DEV, SYS_ID } = window.config;
|
|
14
|
+
const { VUE_APP_PUBLIC_URL } = process.env;
|
|
15
|
+
const whiteList = ['/login', '/qualityLogin', '/system/dict']; // no redirect whitelist
|
|
16
|
+
|
|
17
|
+
if (IS_DEV) {
|
|
18
|
+
Cookies.set('sysId', 294);
|
|
19
|
+
Cookies.set(
|
|
20
|
+
'IU-TOKEN',
|
|
21
|
+
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ6aGFveWkiLCJhdXRoIjoiYWRtaW4iLCJ1c2VyIjoie1wicm9sZUlkXCI6OCxcImNvbXBhbnlcIjpcIlwiLFwiZHV0eVwiOlwiXCIsXCJpZFwiOjEwMDM4LFwidXNlcm5hbWVcIjpcInpoYW95aVwiLFwibmFtZVwiOlwi6LW16Im677yI55yB5aSW5rWL6K-V546v5aKD77yJXCIsXCJwaG9uZVwiOlwiXCIsXCJwYXNzd29yZFwiOlwidjdRZmVUMjNGTC9NT1hlS2tjSEtheTlBdU9VPVwiLFwiZW5hYmxlZFwiOnRydWUsXCJpc0FkbWluXCI6dHJ1ZSxcImxvZ2luVHlwZVwiOjAsXCJyb2xlU2lnblwiOjEsXCJyb2xlVW5pcXVlTGlzdFwiOltcIkpJR1VBTl9QVVRPTkdcIixcIldZSFRfQURNSU5cIixcInN5c3RlbVJvbGVcIixcIkFJ6LSo5o6nLeeuoeeQhuWRmFwiLFwiQklMTF9BRE1JTlwiLFwiYWRtaW5cIixcInBjQWRtaW5cIixcInN5c3RlbVJvbGVcIl0sXCJkZWZhdWx0SG9tZVBhZ2VcIjpcImRpZ2l0YWxJbWFnZVwiLFwiZXhwaXJlZFRpbWVcIjoyMTQzNDY4ODAwMDAwLFwidXNlclR5cGVcIjowLFwiY3JlYXRlVGltZVwiOjE2Nzk0NzEzNDAwMDAsXCJ1cGRhdGVUaW1lXCI6MTc2NjExMzgzNDgxNX0iLCJqdGkiOiI0MDdmODk3MDk0ZTY0NGY0OTJkNDFmN2FkZmE5OTM3MCJ9.LlU6sxMEc3lyr6htNfhcqB2FsJlnjVAfpoZyqqoIoEEshtU5ASUBXmMfrux4bKV-z64vZukwQAxkivm_65h4DQ'
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const sysId = SYS_ID || Cookies.get('sysId');
|
|
26
|
+
Cookies.set('sysId', sysId);
|
|
27
|
+
router.beforeEach((to, from, next) => {
|
|
28
|
+
if (to.meta.title) {
|
|
29
|
+
document.title = to.meta.title + ' - ' + Config.title;
|
|
30
|
+
}
|
|
31
|
+
NProgress.start();
|
|
32
|
+
const hasBase = to.path.includes(VUE_APP_PUBLIC_URL);
|
|
33
|
+
let path = to.path;
|
|
34
|
+
if (hasBase) {
|
|
35
|
+
const pathArr = path.split(VUE_APP_PUBLIC_URL);
|
|
36
|
+
const _length = pathArr.length;
|
|
37
|
+
if (_length) {
|
|
38
|
+
path = '/' + pathArr[_length - 1];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (getToken()) {
|
|
42
|
+
// 已登录且要跳转的页面是登录页
|
|
43
|
+
if (path === '/login') {
|
|
44
|
+
next({ path: '/login' });
|
|
45
|
+
NProgress.done();
|
|
46
|
+
} else {
|
|
47
|
+
if (store.getters.roles.length === 0) {
|
|
48
|
+
// 判断当前用户是否已拉取完user_info信息
|
|
49
|
+
store
|
|
50
|
+
.dispatch('GetInfo')
|
|
51
|
+
.then(() => {
|
|
52
|
+
// 拉取user_info
|
|
53
|
+
// 动态路由,拉取菜单
|
|
54
|
+
loadMenus(next, path, to);
|
|
55
|
+
})
|
|
56
|
+
.catch(() => {
|
|
57
|
+
store.dispatch('LogOut').then(() => {
|
|
58
|
+
location.reload(); // 为了重新实例化vue-router对象 避免bug
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
// 登录时未拉取 菜单,在此处拉取
|
|
62
|
+
} else if (store.getters.loadMenus) {
|
|
63
|
+
// 修改成false,防止死循环
|
|
64
|
+
store.dispatch('updateLoadMenus');
|
|
65
|
+
loadMenus(next, path, to);
|
|
66
|
+
} else {
|
|
67
|
+
next();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
} else {
|
|
71
|
+
next();
|
|
72
|
+
loadMenus(next, path);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export const loadMenus = (next, path, to) => {
|
|
77
|
+
if (sysId == null || sysId === '') {
|
|
78
|
+
Cookies.remove('homePageDefault');
|
|
79
|
+
store.dispatch('SetSidebarRouters', router.options.routes);
|
|
80
|
+
if (!IS_DEV) {
|
|
81
|
+
window.location.href = VUE_APP_LOGIN_URL;
|
|
82
|
+
}
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const data = {
|
|
86
|
+
sysId: sysId,
|
|
87
|
+
};
|
|
88
|
+
buildMenus(data)
|
|
89
|
+
.then(({ content }) => {
|
|
90
|
+
const routeData = []; // 判断是否菜单路由是否修改,导致默认首页为空
|
|
91
|
+
let sdata = JSON.parse(JSON.stringify(content));
|
|
92
|
+
//清理路由
|
|
93
|
+
const rdata = JSON.parse(JSON.stringify(content));
|
|
94
|
+
const sidebarRoutes = filterAsyncRouter(sdata);
|
|
95
|
+
const rewriteRoutes = filterAsyncRouter(rdata, true);
|
|
96
|
+
console.log('sidebarRoutes', sidebarRoutes);
|
|
97
|
+
// rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
|
98
|
+
store.dispatch('GenerateRoutes', rewriteRoutes).then(() => {
|
|
99
|
+
// 存储路由
|
|
100
|
+
router.addRoutes(rewriteRoutes); // 动态添加可访问路由表
|
|
101
|
+
next({ path, replace: true });
|
|
102
|
+
});
|
|
103
|
+
store.dispatch('SetSidebarRouters', sidebarRoutes);
|
|
104
|
+
// 默认首页
|
|
105
|
+
// 如果路由跳转 /dashboard, 开始修改默认首页
|
|
106
|
+
if (to.path == '/dashboard' || !Cookies.get('homePageDefault')) {
|
|
107
|
+
Cookies.set('homePageDefault', true);
|
|
108
|
+
getUserDefaultHomePage(data)
|
|
109
|
+
.then(res => {
|
|
110
|
+
const routes = store.state.permission.addRouters;
|
|
111
|
+
routes.forEach((tmp, index) => {
|
|
112
|
+
// 一级菜单
|
|
113
|
+
if (res.defaultHomePage) {
|
|
114
|
+
if (tmp.path == '/' + res.defaultHomePage) {
|
|
115
|
+
routeData.push(tmp);
|
|
116
|
+
next(res.defaultHomePage + '/' + tmp.children[0].path);
|
|
117
|
+
} else {
|
|
118
|
+
// 二级菜单
|
|
119
|
+
tmp.children.forEach(childrenTmp => {
|
|
120
|
+
if (childrenTmp.path == res.defaultHomePage) {
|
|
121
|
+
routeData.push(tmp);
|
|
122
|
+
next(tmp.path + '/' + childrenTmp.path);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
// 没有设置默认首页,直接路由一级第一个当作默认首页
|
|
128
|
+
if (index == 0) {
|
|
129
|
+
routeData.push(tmp);
|
|
130
|
+
next(tmp.path + '/' + tmp.children[0].path);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
if (routeData.length == 0) {
|
|
135
|
+
next(routes[0].path + '/' + routes[0].children[0].path);
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
.catch(err => {
|
|
139
|
+
if (routeData.length == 0) {
|
|
140
|
+
next(routes[0].path + '/' + routes[0].children[0].path);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
.catch(res => {
|
|
146
|
+
Cookies.remove('homePageDefault');
|
|
147
|
+
store.dispatch('SetSidebarRouters', router.options.routes);
|
|
148
|
+
if (!IS_DEV) {
|
|
149
|
+
window.location.href = VUE_APP_LOGIN_URL;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
router.afterEach(() => {
|
|
155
|
+
NProgress.done(); // finish progress bar
|
|
156
|
+
});
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import Router from 'vue-router';
|
|
3
|
+
import Layout from '../layout/index';
|
|
4
|
+
|
|
5
|
+
Vue.use(Router);
|
|
6
|
+
|
|
7
|
+
const { BASE_URL, VUE_APP_PUBLIC_URL } = process.env;
|
|
8
|
+
export const constantRouterMap = [
|
|
9
|
+
{
|
|
10
|
+
path: '/login',
|
|
11
|
+
meta: { title: '登录', noCache: true },
|
|
12
|
+
component: resolve => require(['@/views/login'], resolve),
|
|
13
|
+
hidden: true,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
path: '/',
|
|
17
|
+
component: Layout,
|
|
18
|
+
redirect: '/dashboard',
|
|
19
|
+
hidden: true,
|
|
20
|
+
children: [
|
|
21
|
+
{
|
|
22
|
+
path: 'dashboard',
|
|
23
|
+
component: resolve => require(['@/views/home'], resolve),
|
|
24
|
+
name: 'Dashboard',
|
|
25
|
+
meta: {
|
|
26
|
+
title: '首页',
|
|
27
|
+
icon: 'index',
|
|
28
|
+
affix: true,
|
|
29
|
+
noCache: true,
|
|
30
|
+
istagsView: false,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
path: '/404',
|
|
37
|
+
component: resolve => require(['@/views/features/404'], resolve),
|
|
38
|
+
hidden: true,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: '/401',
|
|
42
|
+
component: resolve => require(['@/views/features/401'], resolve),
|
|
43
|
+
hidden: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: '/redirect',
|
|
47
|
+
component: Layout,
|
|
48
|
+
hidden: true,
|
|
49
|
+
children: [
|
|
50
|
+
{
|
|
51
|
+
path: '/redirect/:path*',
|
|
52
|
+
component: resolve => require(['@/views/features/redirect'], resolve),
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
//暂时更改首页
|
|
57
|
+
{
|
|
58
|
+
path: '/bigDataV',
|
|
59
|
+
component: Layout,
|
|
60
|
+
hidden: true,
|
|
61
|
+
name: 'bigDataV',
|
|
62
|
+
// redirect: '/dashboard',
|
|
63
|
+
children: [
|
|
64
|
+
{
|
|
65
|
+
path: 'index',
|
|
66
|
+
// @/views/home
|
|
67
|
+
component: resolve => require(['@/views/system/role/index'], resolve),
|
|
68
|
+
name: 'bigDataV',
|
|
69
|
+
meta: {
|
|
70
|
+
title: '大屏页',
|
|
71
|
+
icon: 'index',
|
|
72
|
+
noCache: false,
|
|
73
|
+
affix: true,
|
|
74
|
+
guidePath: true,
|
|
75
|
+
jumpPath: '/bigDataV/index/index',
|
|
76
|
+
istagsView: false,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
{
|
|
83
|
+
path: '/institutionSet',
|
|
84
|
+
name: 'institutionSet',
|
|
85
|
+
component: Layout,
|
|
86
|
+
hidden: true,
|
|
87
|
+
children: [
|
|
88
|
+
{
|
|
89
|
+
path: 'index',
|
|
90
|
+
name: 'institutionSet',
|
|
91
|
+
component: resolve => require(['@/views/institutionSet/index'], resolve),
|
|
92
|
+
meta: { title: '机构管理', icon: 'hospital', noCache: true },
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
path: 'cloudSet',
|
|
96
|
+
component: resolve => require(['@/views/institutionSet/cloudSet'], resolve),
|
|
97
|
+
name: 'cloudSet',
|
|
98
|
+
hidden: true,
|
|
99
|
+
meta: {
|
|
100
|
+
title: '云配置详情',
|
|
101
|
+
icon: 'hospital',
|
|
102
|
+
noCache: false,
|
|
103
|
+
guidePath: true,
|
|
104
|
+
jumpPath: '/institutionSet/cloudSet',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
path: '/institutionMonitor',
|
|
111
|
+
component: Layout,
|
|
112
|
+
name: 'institutionMonitor',
|
|
113
|
+
hidden: true,
|
|
114
|
+
children: [
|
|
115
|
+
{
|
|
116
|
+
path: 'index',
|
|
117
|
+
name: 'institutionMonitor',
|
|
118
|
+
component: resolve => require(['@/views/institutionMonitor/index'], resolve),
|
|
119
|
+
meta: {
|
|
120
|
+
title: '机构监测',
|
|
121
|
+
icon: 'hospital',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
path: 'monitorDetail/:scenceId',
|
|
126
|
+
name: 'monitorDetail',
|
|
127
|
+
component: resolve => require(['@/views/institutionMonitor/monitorDetail/index'], resolve),
|
|
128
|
+
hidden: true,
|
|
129
|
+
meta: {
|
|
130
|
+
title: '监测详情',
|
|
131
|
+
noCache: false,
|
|
132
|
+
guidePath: true,
|
|
133
|
+
jumpPath: '/institutionMonitor/index',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
path: '/dataArchive',
|
|
140
|
+
name: 'dataArchive',
|
|
141
|
+
component: Layout,
|
|
142
|
+
hidden: true,
|
|
143
|
+
children: [
|
|
144
|
+
{
|
|
145
|
+
path: 'index',
|
|
146
|
+
name: 'dataArchive',
|
|
147
|
+
component: resolve => require(['@/views/dataArchive/index'], resolve),
|
|
148
|
+
meta: {
|
|
149
|
+
title: '归档列表',
|
|
150
|
+
icon: 'dictionary',
|
|
151
|
+
noCache: true,
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
path: '/indexManagement',
|
|
158
|
+
name: 'indexManagement',
|
|
159
|
+
component: Layout,
|
|
160
|
+
hidden: true,
|
|
161
|
+
meta: { title: '索引管理', icon: 'role' },
|
|
162
|
+
children: [
|
|
163
|
+
{
|
|
164
|
+
path: 'index',
|
|
165
|
+
component: resolve => require(['@/views/indexManagement/index'], resolve),
|
|
166
|
+
name: 'indexManagement',
|
|
167
|
+
meta: { title: 'IUVIEWER', icon: 'role', noCache: true },
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
path: 'other',
|
|
171
|
+
component: resolve => require(['@/views/indexManagement/other'], resolve),
|
|
172
|
+
name: 'otherManagement',
|
|
173
|
+
meta: { title: '省外(其它)', icon: 'role', noCache: true },
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
path: '/dictionary',
|
|
179
|
+
name: 'dictionary',
|
|
180
|
+
component: Layout,
|
|
181
|
+
hidden: true,
|
|
182
|
+
children: [
|
|
183
|
+
{
|
|
184
|
+
path: 'index',
|
|
185
|
+
name: 'dictionary',
|
|
186
|
+
component: resolve => require(['@/views/system/dict/index'], resolve),
|
|
187
|
+
meta: {
|
|
188
|
+
title: '字典维护',
|
|
189
|
+
icon: 'dictionary',
|
|
190
|
+
noCache: true,
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
export default new Router({
|
|
198
|
+
// mode: 'hash',
|
|
199
|
+
// mode: 'history',
|
|
200
|
+
base: BASE_URL + VUE_APP_PUBLIC_URL, // 项目名
|
|
201
|
+
scrollBehavior: () => ({ y: 0 }),
|
|
202
|
+
routes: constantRouterMap,
|
|
203
|
+
});
|