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,972 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<!--工具栏-->
|
|
4
|
+
<div class="head-container">
|
|
5
|
+
<div v-if="crud.props.searchToggle">
|
|
6
|
+
<!-- 搜索 -->
|
|
7
|
+
<el-input
|
|
8
|
+
v-model="query.name"
|
|
9
|
+
clearable
|
|
10
|
+
size="small"
|
|
11
|
+
placeholder="请输入姓名"
|
|
12
|
+
style="width: 200px"
|
|
13
|
+
class="filter-item"
|
|
14
|
+
@keyup.enter.native="crud.toQuery" />
|
|
15
|
+
<el-select
|
|
16
|
+
v-model="query.roleId"
|
|
17
|
+
clearable
|
|
18
|
+
size="small"
|
|
19
|
+
placeholder="请选择角色"
|
|
20
|
+
class="filter-item"
|
|
21
|
+
style="width: 150px"
|
|
22
|
+
@change="crud.toQuery">
|
|
23
|
+
<el-option
|
|
24
|
+
v-for="item in roles"
|
|
25
|
+
:key="item.name"
|
|
26
|
+
:disabled="level !== 1 && item.level <= level"
|
|
27
|
+
:label="item.name"
|
|
28
|
+
:value="item.id" />
|
|
29
|
+
</el-select>
|
|
30
|
+
<rrOperation />
|
|
31
|
+
</div>
|
|
32
|
+
<crudOperation show="" :permission="permission" />
|
|
33
|
+
</div>
|
|
34
|
+
<!--表单渲染-->
|
|
35
|
+
<el-dialog
|
|
36
|
+
append-to-body
|
|
37
|
+
:close-on-click-modal="false"
|
|
38
|
+
:before-close="crud.cancelCU"
|
|
39
|
+
:visible.sync="crud.status.cu > 0"
|
|
40
|
+
:title="crud.status.title"
|
|
41
|
+
width="850px">
|
|
42
|
+
<el-form
|
|
43
|
+
ref="form"
|
|
44
|
+
:inline="true"
|
|
45
|
+
:model="addData"
|
|
46
|
+
:rules="rules"
|
|
47
|
+
size="small"
|
|
48
|
+
label-width="100px">
|
|
49
|
+
<el-form-item label="角色" prop="roleDatas">
|
|
50
|
+
<el-select
|
|
51
|
+
ref="roleselect"
|
|
52
|
+
:multiple-limit="multiplelimit"
|
|
53
|
+
v-model="roleDatas"
|
|
54
|
+
style="width: 260px"
|
|
55
|
+
multiple
|
|
56
|
+
placeholder="请选择"
|
|
57
|
+
@remove-tag="deleteTag"
|
|
58
|
+
@change="changeRole">
|
|
59
|
+
<el-option
|
|
60
|
+
v-for="item in roles"
|
|
61
|
+
:key="item.name"
|
|
62
|
+
:disabled="level !== 1 && item.level <= level"
|
|
63
|
+
:label="item.name"
|
|
64
|
+
:value="item.id" />
|
|
65
|
+
</el-select>
|
|
66
|
+
</el-form-item>
|
|
67
|
+
<el-form-item label="用户名" prop="username">
|
|
68
|
+
<el-input v-model="addData.username" :disabled="isDisabled" style="width: 260px" />
|
|
69
|
+
</el-form-item>
|
|
70
|
+
<el-form-item label="姓名" prop="name">
|
|
71
|
+
<el-input v-model="addData.name" style="width: 260px" />
|
|
72
|
+
</el-form-item>
|
|
73
|
+
<el-form-item v-if="!isDisabled" label="密码" prop="password">
|
|
74
|
+
<el-input v-model="addData.password" style="width: 260px" />
|
|
75
|
+
</el-form-item>
|
|
76
|
+
<el-form-item label="手机号" prop="phone">
|
|
77
|
+
<el-input v-model.number="addData.phone" style="width: 260px" />
|
|
78
|
+
</el-form-item>
|
|
79
|
+
<el-form-item label="单位" prop="company">
|
|
80
|
+
<el-input v-model.number="addData.company" style="width: 260px" />
|
|
81
|
+
</el-form-item>
|
|
82
|
+
<el-form-item label="职务" prop="duty">
|
|
83
|
+
<el-input v-model.number="addData.duty" style="width: 260px" />
|
|
84
|
+
</el-form-item>
|
|
85
|
+
<el-form-item style="display: block" label="管辖区域" prop="managerArea">
|
|
86
|
+
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
87
|
+
<el-tab-pane label="省" name="province">
|
|
88
|
+
<el-select
|
|
89
|
+
ref="selectUser"
|
|
90
|
+
v-model="addData.province"
|
|
91
|
+
style="width: 260px"
|
|
92
|
+
placeholder="请选择省"
|
|
93
|
+
@remove-tag="deleteTag"
|
|
94
|
+
@change="queryCity">
|
|
95
|
+
<el-option
|
|
96
|
+
v-for="item in provinceOptions"
|
|
97
|
+
:key="item.saleid"
|
|
98
|
+
:label="item.province"
|
|
99
|
+
:value="item.saleid" />
|
|
100
|
+
</el-select>
|
|
101
|
+
</el-tab-pane>
|
|
102
|
+
<el-tab-pane label="市" name="city">
|
|
103
|
+
<el-row :gutter="20">
|
|
104
|
+
<el-col :span="12">
|
|
105
|
+
<el-select
|
|
106
|
+
ref="selectAppType"
|
|
107
|
+
v-model="addData.province"
|
|
108
|
+
style="width: 260px"
|
|
109
|
+
placeholder="请选择省"
|
|
110
|
+
@remove-tag="deleteTag"
|
|
111
|
+
@change="queryCity">
|
|
112
|
+
<el-option
|
|
113
|
+
v-for="item in provinceOptions"
|
|
114
|
+
:key="item.saleid"
|
|
115
|
+
:label="item.province"
|
|
116
|
+
:value="item.saleid" />
|
|
117
|
+
</el-select>
|
|
118
|
+
</el-col>
|
|
119
|
+
<el-col :span="12">
|
|
120
|
+
<el-select
|
|
121
|
+
ref="selectAppType"
|
|
122
|
+
v-model="addData.city"
|
|
123
|
+
style="width: 260px"
|
|
124
|
+
placeholder="请选择市"
|
|
125
|
+
@remove-tag="deleteTag"
|
|
126
|
+
@change="queryCounty">
|
|
127
|
+
<el-option
|
|
128
|
+
v-for="item in cityOptions"
|
|
129
|
+
:key="item.saleid"
|
|
130
|
+
:label="item.city"
|
|
131
|
+
:value="item.saleid" />
|
|
132
|
+
</el-select>
|
|
133
|
+
</el-col>
|
|
134
|
+
</el-row>
|
|
135
|
+
</el-tab-pane>
|
|
136
|
+
<el-tab-pane label="区/县" name="county">
|
|
137
|
+
<el-row :gutter="20">
|
|
138
|
+
<el-col :span="8">
|
|
139
|
+
<el-select
|
|
140
|
+
ref="selectAppType"
|
|
141
|
+
v-model="addData.province"
|
|
142
|
+
style="width: 160px"
|
|
143
|
+
placeholder="请选择省"
|
|
144
|
+
@remove-tag="deleteTag"
|
|
145
|
+
@change="queryCity">
|
|
146
|
+
<el-option
|
|
147
|
+
v-for="item in provinceOptions"
|
|
148
|
+
:key="item.saleid"
|
|
149
|
+
:label="item.province"
|
|
150
|
+
:value="item.saleid" />
|
|
151
|
+
</el-select>
|
|
152
|
+
</el-col>
|
|
153
|
+
<el-col :span="8">
|
|
154
|
+
<el-select
|
|
155
|
+
ref="selectAppType"
|
|
156
|
+
v-model="addData.city"
|
|
157
|
+
style="width: 160px"
|
|
158
|
+
placeholder="请选择市"
|
|
159
|
+
@remove-tag="deleteTag"
|
|
160
|
+
@change="queryCounty">
|
|
161
|
+
<el-option
|
|
162
|
+
v-for="item in cityOptions"
|
|
163
|
+
:key="item.saleid"
|
|
164
|
+
:label="item.city"
|
|
165
|
+
:value="item.saleid" />
|
|
166
|
+
</el-select>
|
|
167
|
+
</el-col>
|
|
168
|
+
<el-col :span="8">
|
|
169
|
+
<el-select
|
|
170
|
+
ref="selectAppType"
|
|
171
|
+
v-model="addData.county"
|
|
172
|
+
style="width: 160px"
|
|
173
|
+
placeholder="请选择区/县"
|
|
174
|
+
@remove-tag="deleteTag"
|
|
175
|
+
@change="queryHosTeam">
|
|
176
|
+
<el-option
|
|
177
|
+
v-for="item in countyOptions"
|
|
178
|
+
:key="item.saleid"
|
|
179
|
+
:label="item.county"
|
|
180
|
+
:value="item.saleid" />
|
|
181
|
+
</el-select>
|
|
182
|
+
</el-col>
|
|
183
|
+
</el-row>
|
|
184
|
+
</el-tab-pane>
|
|
185
|
+
<el-tab-pane label="医院/团队" name="hospital">
|
|
186
|
+
<!-- <el-select-->
|
|
187
|
+
<!-- multiple-->
|
|
188
|
+
<!-- filterable-->
|
|
189
|
+
<!-- ref="selectAppType"-->
|
|
190
|
+
<!-- v-model="addData.hospital"-->
|
|
191
|
+
<!-- style="width: 260px"-->
|
|
192
|
+
<!-- placeholder="请选择医院"-->
|
|
193
|
+
<!-- @remove-tag="deleteTag"-->
|
|
194
|
+
<!-- @change="changehospital"-->
|
|
195
|
+
|
|
196
|
+
<!-- >-->
|
|
197
|
+
<!-- <el-option-->
|
|
198
|
+
<!-- v-for="item in hospitalList"-->
|
|
199
|
+
<!-- :key="item.scenceID"-->
|
|
200
|
+
<!-- :label="item.hospitalName"-->
|
|
201
|
+
<!-- :value="item.scenceID"-->
|
|
202
|
+
<!-- />-->
|
|
203
|
+
<!-- </el-select>-->
|
|
204
|
+
<el-select
|
|
205
|
+
multiple
|
|
206
|
+
filterable
|
|
207
|
+
:multiple-limit="baseLineRole === 58 ? multiplelimit : 0"
|
|
208
|
+
ref="hosselect"
|
|
209
|
+
v-model="addData.hospital"
|
|
210
|
+
style="width: 260px"
|
|
211
|
+
placeholder="请选择医院"
|
|
212
|
+
@remove-tag="deleteTag"
|
|
213
|
+
@change="changehospital">
|
|
214
|
+
<el-option
|
|
215
|
+
v-for="item in hospitalList"
|
|
216
|
+
:key="item.scenceID"
|
|
217
|
+
:label="item.hospitalName"
|
|
218
|
+
:value="item.scenceID" />
|
|
219
|
+
</el-select>
|
|
220
|
+
<el-select
|
|
221
|
+
multiple
|
|
222
|
+
filterable
|
|
223
|
+
:disabled="baseLineRole === 58"
|
|
224
|
+
ref="selectAppType"
|
|
225
|
+
v-model="addData.team"
|
|
226
|
+
style="width: 260px"
|
|
227
|
+
placeholder="请选择团队"
|
|
228
|
+
@remove-tag="deleteTag"
|
|
229
|
+
@change="changeTeam">
|
|
230
|
+
<el-option
|
|
231
|
+
v-for="item in teamList"
|
|
232
|
+
:key="item.groupId"
|
|
233
|
+
:label="item.groupName"
|
|
234
|
+
:value="item.groupId" />
|
|
235
|
+
</el-select>
|
|
236
|
+
</el-tab-pane>
|
|
237
|
+
</el-tabs>
|
|
238
|
+
</el-form-item>
|
|
239
|
+
</el-form>
|
|
240
|
+
<div slot="footer" class="dialog-footer">
|
|
241
|
+
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
|
242
|
+
<!-- <el-button v-if="!isDisabled" :loading="crud.status.cu === 2" type="primary" @click="submitAdd">确认</el-button>-->
|
|
243
|
+
<!-- <el-button v-else :loading="crud.status.cu === 2" type="primary" @click="submitedit">修改</el-button>-->
|
|
244
|
+
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU"
|
|
245
|
+
>确定</el-button
|
|
246
|
+
>
|
|
247
|
+
</div>
|
|
248
|
+
</el-dialog>
|
|
249
|
+
<!--表格渲染-->
|
|
250
|
+
<el-table
|
|
251
|
+
ref="table"
|
|
252
|
+
v-loading="crud.loading"
|
|
253
|
+
:data="crud.data"
|
|
254
|
+
style="width: 100%"
|
|
255
|
+
:cell-style="{ textAlign: 'center' }"
|
|
256
|
+
:header-cell-style="{ textAlign: 'center' }"
|
|
257
|
+
@selection-change="crud.selectionChangeHandler"
|
|
258
|
+
@row-click="handleCurrentChange">
|
|
259
|
+
<el-table-column label="序号" type="index" align="center">
|
|
260
|
+
<template slot-scope="scope">
|
|
261
|
+
<span>{{ (crud.page.page - 1) * crud.page.size + scope.$index + 1 }}</span>
|
|
262
|
+
</template>
|
|
263
|
+
</el-table-column>
|
|
264
|
+
<el-table-column :show-overflow-tooltip="true" prop="name" label="姓名" />
|
|
265
|
+
<el-table-column :show-overflow-tooltip="true" prop="username" label="用户名" />
|
|
266
|
+
<el-table-column :show-overflow-tooltip="true" prop="roles" label="角色">
|
|
267
|
+
<template slot-scope="scope">
|
|
268
|
+
<div v-for="(item, index) in scope.row.roles" :key="index">
|
|
269
|
+
{{ item.name || omitData }}
|
|
270
|
+
</div>
|
|
271
|
+
</template>
|
|
272
|
+
</el-table-column>
|
|
273
|
+
<el-table-column
|
|
274
|
+
:show-overflow-tooltip="true"
|
|
275
|
+
class="tc"
|
|
276
|
+
v-for="(item, index) in checkTables"
|
|
277
|
+
:key="index.key"
|
|
278
|
+
:label="item.label"
|
|
279
|
+
:prop="item.prop"
|
|
280
|
+
:width="item.width">
|
|
281
|
+
<template slot-scope="scope">
|
|
282
|
+
<div class="long_title" v-if="item.prop === 'administer'">
|
|
283
|
+
{{ scope.row.administer || omitData }}
|
|
284
|
+
</div>
|
|
285
|
+
<div v-else>
|
|
286
|
+
{{ scope.row[scope.column.property] || omitData }}
|
|
287
|
+
</div>
|
|
288
|
+
</template>
|
|
289
|
+
</el-table-column>
|
|
290
|
+
<el-table-column
|
|
291
|
+
v-if="checkPer(['admin', 'user:edit', 'user:del'])"
|
|
292
|
+
label="操作"
|
|
293
|
+
width="250"
|
|
294
|
+
align="center"
|
|
295
|
+
fixed="right">
|
|
296
|
+
<template slot-scope="scope">
|
|
297
|
+
<urOperation
|
|
298
|
+
:data="scope.row"
|
|
299
|
+
:permission="permission"
|
|
300
|
+
:disabled-dle="scope.row.id === 1" />
|
|
301
|
+
</template>
|
|
302
|
+
</el-table-column>
|
|
303
|
+
</el-table>
|
|
304
|
+
<!--分页组件-->
|
|
305
|
+
<pagination />
|
|
306
|
+
</div>
|
|
307
|
+
</template>
|
|
308
|
+
|
|
309
|
+
<script>
|
|
310
|
+
import crudHospital, { queryNation, checkHosRepetition } from '@/api/system/hospital';
|
|
311
|
+
import crudUser, { addUsers, editUsers } from '@/api/system/user';
|
|
312
|
+
import { getHospitals } from '@/api/system/hospital';
|
|
313
|
+
import { getAll, getLevel } from '@/api/system/role';
|
|
314
|
+
import CRUD, { presenter, header, form, crud } from '@crud/crud';
|
|
315
|
+
import rrOperation from '@crud/RR.operation';
|
|
316
|
+
import crudOperation from '@crud/CRUD.operation';
|
|
317
|
+
import udOperation from '@crud/UD.operation';
|
|
318
|
+
import urOperation from '@crud/user/UR.operation';
|
|
319
|
+
import pagination from '@crud/Pagination';
|
|
320
|
+
import DateRangePicker from '@/components/DateRangePicker';
|
|
321
|
+
import { getToken } from '@/utils/auth';
|
|
322
|
+
import { getExamManages } from '@/api/system/examManage';
|
|
323
|
+
import { checkUserNameValidate, validatePhone } from '@/utils/validate';
|
|
324
|
+
import { validatePassword } from '@/utils/validate';
|
|
325
|
+
import { mapGetters } from 'vuex';
|
|
326
|
+
import '@riophae/vue-treeselect/dist/vue-treeselect.css';
|
|
327
|
+
import { queryHospital, queryAllGroupList } from '../../../api/system/user';
|
|
328
|
+
let formRoleSign;
|
|
329
|
+
let userRoles = [];
|
|
330
|
+
const defaultForm = {};
|
|
331
|
+
let HospitalList;
|
|
332
|
+
export default {
|
|
333
|
+
name: 'User',
|
|
334
|
+
components: { crudOperation, rrOperation, urOperation, pagination, DateRangePicker, udOperation },
|
|
335
|
+
cruds() {
|
|
336
|
+
return CRUD({
|
|
337
|
+
title: '用户',
|
|
338
|
+
url: 'api/users',
|
|
339
|
+
sort: ['updateTime,desc'],
|
|
340
|
+
crudMethod: { ...crudUser },
|
|
341
|
+
params: { loginType: defaultForm.loginType },
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
mixins: [presenter(), header(), form(defaultForm), crud()],
|
|
345
|
+
// 数据字典
|
|
346
|
+
dicts: ['user_status', 'sex', 'job_title', 'position', 'exam_type'],
|
|
347
|
+
data() {
|
|
348
|
+
const validRole = (rule, value, callback) => {
|
|
349
|
+
if (this.roleDatas.length <= 0) {
|
|
350
|
+
callback(new Error('请选择角色'));
|
|
351
|
+
}
|
|
352
|
+
{
|
|
353
|
+
callback();
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
const managerAreaRequried = (rule, value, callback) => {
|
|
357
|
+
if (
|
|
358
|
+
this.addData.province === null &&
|
|
359
|
+
this.addData.city === null &&
|
|
360
|
+
this.addData.county === null &&
|
|
361
|
+
this.addData.hospital.length === 0 &&
|
|
362
|
+
this.addData.team.length === 0
|
|
363
|
+
) {
|
|
364
|
+
callback(new Error('请选择管辖区域'));
|
|
365
|
+
} else if (this.newroleSign === 1) {
|
|
366
|
+
if (this.addData.province === null) {
|
|
367
|
+
callback(new Error('请选择管辖区域'));
|
|
368
|
+
} else {
|
|
369
|
+
callback();
|
|
370
|
+
}
|
|
371
|
+
} else if (this.newroleSign === 2) {
|
|
372
|
+
if (this.addData.province === null || this.addData.city === null) {
|
|
373
|
+
callback(new Error('请选择管辖区域'));
|
|
374
|
+
} else {
|
|
375
|
+
callback();
|
|
376
|
+
}
|
|
377
|
+
} else if (this.newroleSign === 3) {
|
|
378
|
+
if (
|
|
379
|
+
this.addData.province === null ||
|
|
380
|
+
this.addData.city === null ||
|
|
381
|
+
this.addData.county === null
|
|
382
|
+
) {
|
|
383
|
+
callback(new Error('请选择管辖区域'));
|
|
384
|
+
} else {
|
|
385
|
+
callback();
|
|
386
|
+
}
|
|
387
|
+
} else if (this.baseLineRole === 58) {
|
|
388
|
+
if (this.addData.hospital.length === 0) {
|
|
389
|
+
callback(new Error('请选择管辖区域'));
|
|
390
|
+
} else {
|
|
391
|
+
callback();
|
|
392
|
+
}
|
|
393
|
+
} else {
|
|
394
|
+
callback();
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
const passwordValidator = (rule, value, callback) => {
|
|
398
|
+
if (value) {
|
|
399
|
+
if (validatePassword(value)) {
|
|
400
|
+
callback();
|
|
401
|
+
} else {
|
|
402
|
+
callback(new Error('密码必须含有大小写字母、数字,且不得少于8位'));
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
{
|
|
406
|
+
callback(new Error('请输入密码'));
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
return {
|
|
410
|
+
height: document.documentElement.clientHeight - 180 + 'px;',
|
|
411
|
+
level: 3,
|
|
412
|
+
roles: [],
|
|
413
|
+
//roleDatas: [], // 多选时使用
|
|
414
|
+
defaultProps: { children: 'children', label: 'name', isLeaf: 'leaf' },
|
|
415
|
+
permission: {
|
|
416
|
+
add: ['admin', 'user:add'],
|
|
417
|
+
edit: ['admin', 'user:edit'],
|
|
418
|
+
del: ['admin', 'user:del'],
|
|
419
|
+
},
|
|
420
|
+
enabledTypeOptions: [
|
|
421
|
+
{ key: 'true', display_name: '启用' },
|
|
422
|
+
{ key: 'false', display_name: '禁用' },
|
|
423
|
+
],
|
|
424
|
+
rules: {
|
|
425
|
+
username: [
|
|
426
|
+
{
|
|
427
|
+
required: true,
|
|
428
|
+
|
|
429
|
+
validator: (rule, value, callback) => {
|
|
430
|
+
checkUserNameValidate(rule, value, callback, this.addData.id);
|
|
431
|
+
},
|
|
432
|
+
trigger: 'change',
|
|
433
|
+
},
|
|
434
|
+
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
|
435
|
+
],
|
|
436
|
+
name: [
|
|
437
|
+
{ required: true, message: '请输入姓名', trigger: 'blur' },
|
|
438
|
+
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'change' },
|
|
439
|
+
],
|
|
440
|
+
|
|
441
|
+
phone: [{ required: false, trigger: 'change', validator: validatePhone }],
|
|
442
|
+
roleDatas: [
|
|
443
|
+
{ required: true, message: '请选择角色', trigger: 'change', validator: validRole },
|
|
444
|
+
],
|
|
445
|
+
managerArea: [{ required: true, validator: managerAreaRequried, trigger: 'blur' }],
|
|
446
|
+
password: [
|
|
447
|
+
{ required: true, validator: passwordValidator, trigger: 'blur' },
|
|
448
|
+
// { required: true, message: '请输入密码', trigger: 'blur' }
|
|
449
|
+
],
|
|
450
|
+
},
|
|
451
|
+
headers: { Authorization: getToken() },
|
|
452
|
+
sexDictTypeDropDown: [],
|
|
453
|
+
hospitalList: [],
|
|
454
|
+
signPath: null,
|
|
455
|
+
idCardFront: null,
|
|
456
|
+
idCardBack: null,
|
|
457
|
+
doctorLicence: null,
|
|
458
|
+
multiplelimit: 1,
|
|
459
|
+
radio: 1,
|
|
460
|
+
examModality: [],
|
|
461
|
+
checkAll: false,
|
|
462
|
+
modalityOptions: [],
|
|
463
|
+
activeName: 'province',
|
|
464
|
+
provinceOptions: [],
|
|
465
|
+
cityOptions: [],
|
|
466
|
+
countyOptions: [],
|
|
467
|
+
addData: {
|
|
468
|
+
roleId: [],
|
|
469
|
+
roleSign: '',
|
|
470
|
+
phone: '',
|
|
471
|
+
username: '',
|
|
472
|
+
name: '',
|
|
473
|
+
company: '',
|
|
474
|
+
duty: '',
|
|
475
|
+
managerArea: '',
|
|
476
|
+
province: '',
|
|
477
|
+
city: null,
|
|
478
|
+
county: null,
|
|
479
|
+
hospital: [],
|
|
480
|
+
password: '',
|
|
481
|
+
team: [],
|
|
482
|
+
},
|
|
483
|
+
params: [],
|
|
484
|
+
isDisabled: false,
|
|
485
|
+
teamList: [],
|
|
486
|
+
roleDatas: [],
|
|
487
|
+
checkTables: [
|
|
488
|
+
{ label: '管辖区域', prop: 'administer', width: '400px' },
|
|
489
|
+
{ label: '更新时间', prop: 'updateTime' },
|
|
490
|
+
],
|
|
491
|
+
omitData: '-',
|
|
492
|
+
hosName: [],
|
|
493
|
+
teamName: [],
|
|
494
|
+
currentRow: [],
|
|
495
|
+
baseLineRole: '',
|
|
496
|
+
};
|
|
497
|
+
},
|
|
498
|
+
computed: {
|
|
499
|
+
...mapGetters(['user', 'baseApi', 'fileUploadApi']),
|
|
500
|
+
|
|
501
|
+
roleSign() {
|
|
502
|
+
this.newroleSign = this.$store.state.user.user.roleSign;
|
|
503
|
+
return this.$store.state.user.user.roleSign;
|
|
504
|
+
},
|
|
505
|
+
id() {
|
|
506
|
+
return this.$store.state.user.user.id;
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
|
|
510
|
+
created() {
|
|
511
|
+
this.crud.msg.add = '新增成功';
|
|
512
|
+
this.getRoles();
|
|
513
|
+
this.queryHospital();
|
|
514
|
+
},
|
|
515
|
+
mounted: function () {
|
|
516
|
+
const that = this;
|
|
517
|
+
window.onresize = function temp() {
|
|
518
|
+
that.height = document.documentElement.clientHeight - 180 + 'px;';
|
|
519
|
+
};
|
|
520
|
+
// this.getHospitalList()
|
|
521
|
+
},
|
|
522
|
+
watch: {
|
|
523
|
+
currentRow() {},
|
|
524
|
+
},
|
|
525
|
+
methods: {
|
|
526
|
+
handleClick(tab) {
|
|
527
|
+
if (tab.name === 'county') {
|
|
528
|
+
this.newroleSign = 3;
|
|
529
|
+
this.addData.city = null;
|
|
530
|
+
this.addData.county = null;
|
|
531
|
+
this.countyOptions = [];
|
|
532
|
+
} else if (tab.name === 'city') {
|
|
533
|
+
this.newroleSign = 2;
|
|
534
|
+
this.addData.city = null;
|
|
535
|
+
this.addData.county = null;
|
|
536
|
+
this.countyOptions = [];
|
|
537
|
+
} else if (tab.name === 'province') {
|
|
538
|
+
this.newroleSign = 1;
|
|
539
|
+
this.addData.city = null;
|
|
540
|
+
this.addData.county = null;
|
|
541
|
+
} else if (tab.name === 'hospital') {
|
|
542
|
+
this.newroleSign = 4;
|
|
543
|
+
this.addData.city = null;
|
|
544
|
+
this.addData.county = null;
|
|
545
|
+
this.addData.province = null;
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
queryProvince() {
|
|
549
|
+
queryNation({ parent: 1 }).then(res => {
|
|
550
|
+
this.provinceOptions = res.content;
|
|
551
|
+
this.addData.province = res.content[0].saleid;
|
|
552
|
+
this.queryCity(res.content[0].saleid);
|
|
553
|
+
});
|
|
554
|
+
this.$forceUpdate();
|
|
555
|
+
},
|
|
556
|
+
async queryCity(row) {
|
|
557
|
+
this.cityOptions = [];
|
|
558
|
+
this.countyOptions = [];
|
|
559
|
+
await queryNation({ parent: row }).then(res => {
|
|
560
|
+
this.cityOptions = res.content;
|
|
561
|
+
});
|
|
562
|
+
this.$forceUpdate();
|
|
563
|
+
},
|
|
564
|
+
async queryCounty(row, isEcho) {
|
|
565
|
+
if (!isEcho) this.addData.county = null;
|
|
566
|
+
await queryNation({ parent: row }).then(res => {
|
|
567
|
+
this.countyOptions = res.content;
|
|
568
|
+
});
|
|
569
|
+
},
|
|
570
|
+
async queryHosTeam(row) {},
|
|
571
|
+
//查询医院
|
|
572
|
+
queryHospital() {
|
|
573
|
+
const params = {};
|
|
574
|
+
queryHospital(params).then(res => {
|
|
575
|
+
this.hospitalList = res.content;
|
|
576
|
+
HospitalList = JSON.stringify(res.content);
|
|
577
|
+
});
|
|
578
|
+
queryAllGroupList(params).then(res => {
|
|
579
|
+
this.teamList = res.content;
|
|
580
|
+
});
|
|
581
|
+
},
|
|
582
|
+
changehospital(row) {
|
|
583
|
+
this.hosName = [];
|
|
584
|
+
row.forEach((i, v) => {
|
|
585
|
+
i = String(i);
|
|
586
|
+
this.hospitalList.forEach((item, index) => {
|
|
587
|
+
if (item.scenceID === i) {
|
|
588
|
+
const newitem = item;
|
|
589
|
+
newitem['hospitalId'] = item['scenceID'];
|
|
590
|
+
delete item['scenceID'];
|
|
591
|
+
this.hosName.push(newitem);
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
});
|
|
595
|
+
this.hospitalList = JSON.parse(HospitalList);
|
|
596
|
+
let _this = this;
|
|
597
|
+
if (this.baseLineRole === 58) {
|
|
598
|
+
setTimeout(function () {
|
|
599
|
+
_this.$refs.hosselect.blur();
|
|
600
|
+
}, 50);
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
changeTeam(row) {
|
|
604
|
+
this.teamName = [];
|
|
605
|
+
row.forEach((i, v) => {
|
|
606
|
+
i = String(i);
|
|
607
|
+
this.teamList.forEach((item, index) => {
|
|
608
|
+
if (item.groupId === i) {
|
|
609
|
+
this.teamName.push(item);
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
});
|
|
613
|
+
},
|
|
614
|
+
changeRole(value) {
|
|
615
|
+
this.baseLineRole = value[0];
|
|
616
|
+
if (this.baseLineRole === 58) {
|
|
617
|
+
this.activeName = 'hospital';
|
|
618
|
+
this.newroleSign = 4;
|
|
619
|
+
this.addData.city = null;
|
|
620
|
+
this.addData.county = null;
|
|
621
|
+
this.addData.province = null;
|
|
622
|
+
this.hosName = [];
|
|
623
|
+
this.teamName = [];
|
|
624
|
+
this.addData.hospital = [];
|
|
625
|
+
this.addData.team = [];
|
|
626
|
+
}
|
|
627
|
+
userRoles = [];
|
|
628
|
+
value.forEach(function (data, index) {
|
|
629
|
+
const role = { id: data };
|
|
630
|
+
userRoles.push(role);
|
|
631
|
+
});
|
|
632
|
+
this.$forceUpdate();
|
|
633
|
+
let _this = this;
|
|
634
|
+
setTimeout(function () {
|
|
635
|
+
_this.$refs.roleselect.blur();
|
|
636
|
+
}, 50);
|
|
637
|
+
},
|
|
638
|
+
deleteTag(value) {
|
|
639
|
+
userRoles.forEach(function (data, index) {
|
|
640
|
+
if (data.id === value) {
|
|
641
|
+
userRoles.splice(index, value);
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
this.$forceUpdate();
|
|
645
|
+
},
|
|
646
|
+
// 刷新 - 之前
|
|
647
|
+
[CRUD.HOOK.beforeRefresh](crud, form) {},
|
|
648
|
+
// 新增与编辑前做的操作
|
|
649
|
+
[CRUD.HOOK.afterToCU](crud, form) {
|
|
650
|
+
this.queryProvince();
|
|
651
|
+
this.queryCity(this.addData.province);
|
|
652
|
+
const isEcho = true;
|
|
653
|
+
this.queryCounty(this.addData.city, isEcho);
|
|
654
|
+
this.queryHospital();
|
|
655
|
+
|
|
656
|
+
//回显数据
|
|
657
|
+
},
|
|
658
|
+
async handleCurrentChange(row) {
|
|
659
|
+
this.currentRow = row;
|
|
660
|
+
this.dataEcho(this.currentRow);
|
|
661
|
+
this.isDisabled = true;
|
|
662
|
+
this.roleDatas = [];
|
|
663
|
+
this.addData.hospital = [];
|
|
664
|
+
this.addData.team = [];
|
|
665
|
+
const _this = this;
|
|
666
|
+
userRoles = [];
|
|
667
|
+
if (this.currentRow.roles) {
|
|
668
|
+
this.currentRow.roles.forEach(function (role, index) {
|
|
669
|
+
_this.roleDatas.push(role.id);
|
|
670
|
+
const rol = { id: role.id };
|
|
671
|
+
userRoles.push(rol);
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
if (this.currentRow.hospitalIds) {
|
|
676
|
+
this.currentRow.hospitalIds.forEach(function (item, index) {
|
|
677
|
+
if (item !== null) _this.addData.hospital.push(String(item));
|
|
678
|
+
// console.log(_this.addData.hospital)
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
if (this.currentRow.groupIds) {
|
|
682
|
+
this.currentRow.groupIds.forEach(function (item, index) {
|
|
683
|
+
if (item !== null) _this.addData.team.push(String(item));
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
dataEcho(form) {
|
|
688
|
+
this.hosName = [];
|
|
689
|
+
this.teamName = [];
|
|
690
|
+
this.addData.hospital = [];
|
|
691
|
+
this.addData.team = [];
|
|
692
|
+
formRoleSign = form.roleSign;
|
|
693
|
+
if (form.roleSign === 1) this.activeName = 'province';
|
|
694
|
+
if (form.roleSign === 2) this.activeName = 'city';
|
|
695
|
+
if (form.roleSign === 3) this.activeName = 'county';
|
|
696
|
+
if (form.roleSign === 4) this.activeName = 'hospital';
|
|
697
|
+
this.addData.roleSign = form.roleSign;
|
|
698
|
+
this.addData.phone = form.phone;
|
|
699
|
+
this.addData.username = form.username;
|
|
700
|
+
this.addData.name = form.name;
|
|
701
|
+
this.addData.company = form.company;
|
|
702
|
+
this.addData.duty = form.duty;
|
|
703
|
+
this.addData.hospital = form.hospitalIds;
|
|
704
|
+
this.addData.team = form.groupIds;
|
|
705
|
+
this.addData.id = form.id;
|
|
706
|
+
this.addData.roleId = form.roles;
|
|
707
|
+
if (form.hospitalIds) this.changehospital(form.hospitalIds);
|
|
708
|
+
if (form.groupIds) this.changeTeam(form.groupIds);
|
|
709
|
+
this.newroleSign = form.roleSign;
|
|
710
|
+
if (form.pcd && form.pcd.length !== 0) this.addData.county = form.pcd[0].county;
|
|
711
|
+
if (form.pcd && form.pcd.length !== 0) this.addData.city = form.pcd[0].city;
|
|
712
|
+
if (form.pcd && form.pcd.length !== 0) this.addData.province = form.pcd[0].province;
|
|
713
|
+
this.$forceUpdate();
|
|
714
|
+
},
|
|
715
|
+
// 新增前将多选的值设置为空
|
|
716
|
+
[CRUD.HOOK.beforeToAdd](crud, form) {
|
|
717
|
+
this.addData.hospital = [];
|
|
718
|
+
this.addData.team = [];
|
|
719
|
+
this.addData.password = '';
|
|
720
|
+
this.isDisabled = false;
|
|
721
|
+
this.activeName = 'province';
|
|
722
|
+
this.newroleSign = 1;
|
|
723
|
+
this.roleDatas = [];
|
|
724
|
+
Object.keys(this.addData).forEach(key => {
|
|
725
|
+
if (key === 'city' || key === 'county') {
|
|
726
|
+
this.addData[key] = null;
|
|
727
|
+
} else {
|
|
728
|
+
this.addData[key] = '';
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
Object.keys(this.form).forEach(key => {
|
|
732
|
+
if (key === 'city' || key === 'county') {
|
|
733
|
+
this.form[key] = null;
|
|
734
|
+
} else {
|
|
735
|
+
this.form[key] = '';
|
|
736
|
+
}
|
|
737
|
+
});
|
|
738
|
+
this.hosName = [];
|
|
739
|
+
this.teamName = [];
|
|
740
|
+
this.cityOptions = [];
|
|
741
|
+
this.countyOptions = [];
|
|
742
|
+
if (this.$refs.form) this.$refs.form.resetFields();
|
|
743
|
+
},
|
|
744
|
+
[CRUD.HOOK.afterAddCancel]() {
|
|
745
|
+
this.signPath = null;
|
|
746
|
+
this.idCardFront = null;
|
|
747
|
+
this.idCardBack = null;
|
|
748
|
+
this.doctorLicence = null;
|
|
749
|
+
},
|
|
750
|
+
[CRUD.HOOK.afterEditCancel]() {
|
|
751
|
+
this.signPath = null;
|
|
752
|
+
this.idCardFront = null;
|
|
753
|
+
this.idCardBack = null;
|
|
754
|
+
this.doctorLicence = null;
|
|
755
|
+
},
|
|
756
|
+
[CRUD.HOOK.afterSubmit]() {
|
|
757
|
+
this.addData.roleId = [];
|
|
758
|
+
this.addData.roleDatas = '';
|
|
759
|
+
},
|
|
760
|
+
// 初始化编辑时候的角色与岗位
|
|
761
|
+
[CRUD.HOOK.beforeToEdit](crud, form) {
|
|
762
|
+
// console.log(form)
|
|
763
|
+
if (form.roles && form.roles[0].id === 58) this.baseLineRole = 58;
|
|
764
|
+
},
|
|
765
|
+
// 提交前做的操作
|
|
766
|
+
[CRUD.HOOK.afterValidateCU](crud) {
|
|
767
|
+
this.paramsInit();
|
|
768
|
+
},
|
|
769
|
+
// 改变状态
|
|
770
|
+
changeEnabled(data, val) {
|
|
771
|
+
this.$confirm(
|
|
772
|
+
'此操作将 "' + this.dict.label.user_status[val] + '" ' + data.username + ', 是否继续?',
|
|
773
|
+
'提示',
|
|
774
|
+
{
|
|
775
|
+
confirmButtonText: '确定',
|
|
776
|
+
cancelButtonText: '取消',
|
|
777
|
+
type: 'warning',
|
|
778
|
+
}
|
|
779
|
+
)
|
|
780
|
+
.then(() => {
|
|
781
|
+
crudUser
|
|
782
|
+
.edit(data)
|
|
783
|
+
.then(res => {
|
|
784
|
+
this.crud.notify(
|
|
785
|
+
this.dict.label.user_status[val] + '成功',
|
|
786
|
+
CRUD.NOTIFICATION_TYPE.SUCCESS
|
|
787
|
+
);
|
|
788
|
+
})
|
|
789
|
+
.catch(() => {
|
|
790
|
+
data.enabled = !data.enabled;
|
|
791
|
+
});
|
|
792
|
+
})
|
|
793
|
+
.catch(() => {
|
|
794
|
+
data.enabled = !data.enabled;
|
|
795
|
+
});
|
|
796
|
+
},
|
|
797
|
+
// 获取弹窗内角色数据
|
|
798
|
+
getRoles() {
|
|
799
|
+
getAll({ loginType: defaultForm.loginType })
|
|
800
|
+
.then(res => {
|
|
801
|
+
this.roles = res;
|
|
802
|
+
})
|
|
803
|
+
.catch(() => {});
|
|
804
|
+
},
|
|
805
|
+
// 获取权限级别
|
|
806
|
+
getRoleLevel() {
|
|
807
|
+
getLevel()
|
|
808
|
+
.then(res => {
|
|
809
|
+
this.level = res.level;
|
|
810
|
+
})
|
|
811
|
+
.catch(() => {});
|
|
812
|
+
},
|
|
813
|
+
checkboxT(row, rowIndex) {
|
|
814
|
+
return row.id !== this.user.id;
|
|
815
|
+
},
|
|
816
|
+
sexFilter(sex) {
|
|
817
|
+
return this.dict.label.sex[sex];
|
|
818
|
+
},
|
|
819
|
+
handleAvatarSuccess(source) {
|
|
820
|
+
this.signPath = source.datas;
|
|
821
|
+
},
|
|
822
|
+
idCardFrontSuccess(source) {
|
|
823
|
+
this.idCardFront = source.datas;
|
|
824
|
+
},
|
|
825
|
+
idCardBackSuccess(source) {
|
|
826
|
+
this.idCardBack = source.datas;
|
|
827
|
+
},
|
|
828
|
+
doctorLicenceSuccess(source) {
|
|
829
|
+
this.doctorLicence = source.datas;
|
|
830
|
+
},
|
|
831
|
+
beforeAvatarUpload(file) {
|
|
832
|
+
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
833
|
+
if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
|
|
834
|
+
this.$message.error('上传头像图片只能是 JPG、PNG格式!');
|
|
835
|
+
return false;
|
|
836
|
+
}
|
|
837
|
+
if (!isLt2M) {
|
|
838
|
+
this.$message.error('上传头像图片大小不能超过 2MB!');
|
|
839
|
+
return false;
|
|
840
|
+
}
|
|
841
|
+
return file.type && isLt2M;
|
|
842
|
+
},
|
|
843
|
+
getModality() {
|
|
844
|
+
let info = {
|
|
845
|
+
page: 0,
|
|
846
|
+
size: 9999,
|
|
847
|
+
type: 1,
|
|
848
|
+
examTypeId: this.radio,
|
|
849
|
+
};
|
|
850
|
+
getExamManages(info).then(res => {
|
|
851
|
+
this.examModality = res.content;
|
|
852
|
+
this.checkAll = true;
|
|
853
|
+
this.examModality.forEach(item => {
|
|
854
|
+
if (this.form.modalityIds.indexOf(item.id) < 0) {
|
|
855
|
+
this.checkAll = false;
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
if (this.examModality.length === 0) {
|
|
859
|
+
this.checkAll = false;
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
},
|
|
863
|
+
handleCheckedModalityChange(value) {
|
|
864
|
+
this.checkAll = true;
|
|
865
|
+
this.examModality.forEach(item => {
|
|
866
|
+
if (value.indexOf(item.id) < 0) {
|
|
867
|
+
this.checkAll = false;
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
},
|
|
871
|
+
handleCheckAllChange(val) {
|
|
872
|
+
if (this.form.modalityIds.length === 0) {
|
|
873
|
+
this.examModality.forEach(options => {
|
|
874
|
+
this.form.modalityIds.push(options.id);
|
|
875
|
+
});
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
for (let i = 0; i < this.form.modalityIds.length; i++) {
|
|
879
|
+
for (let j = 0; j < this.examModality.length; j++) {
|
|
880
|
+
if (this.checkAll) {
|
|
881
|
+
if (this.form.modalityIds.indexOf(this.examModality[j].id) < 0) {
|
|
882
|
+
this.form.modalityIds.push(this.examModality[j].id);
|
|
883
|
+
}
|
|
884
|
+
} else {
|
|
885
|
+
if (this.form.modalityIds[i] == this.examModality[j].id) {
|
|
886
|
+
if (this.form.modalityIds.indexOf(this.examModality[j].id) > -1) {
|
|
887
|
+
this.form.modalityIds.splice(i, 1);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
//处理添加用户的参数
|
|
895
|
+
paramsInit() {
|
|
896
|
+
userRoles = [];
|
|
897
|
+
this.roleDatas.forEach(function (data, index) {
|
|
898
|
+
const role = { id: data };
|
|
899
|
+
userRoles.push(role);
|
|
900
|
+
});
|
|
901
|
+
// this.roleDatas = userRoles
|
|
902
|
+
|
|
903
|
+
this.managerArea = {
|
|
904
|
+
province: this.addData.province,
|
|
905
|
+
city: this.addData.city,
|
|
906
|
+
county: this.addData.county,
|
|
907
|
+
};
|
|
908
|
+
if (
|
|
909
|
+
this.addData.province === null &&
|
|
910
|
+
this.addData.city === null &&
|
|
911
|
+
this.addData.county === null
|
|
912
|
+
) {
|
|
913
|
+
this.managerArea = null;
|
|
914
|
+
}
|
|
915
|
+
if (this.newroleSign !== 4) {
|
|
916
|
+
this.teamName = [];
|
|
917
|
+
this.hosName = [];
|
|
918
|
+
}
|
|
919
|
+
if (this.hosName.length != 0 || this.teamName.length != 0) this.managerArea = null;
|
|
920
|
+
((this.form.roles = userRoles),
|
|
921
|
+
(this.form.roleSign = this.newroleSign),
|
|
922
|
+
(this.form.phone = this.addData.phone),
|
|
923
|
+
(this.form.username = this.addData.username),
|
|
924
|
+
(this.form.name = this.addData.name),
|
|
925
|
+
(this.form.duty = this.addData.duty),
|
|
926
|
+
(this.form.managerArea = this.managerArea),
|
|
927
|
+
(this.form.id = this.addData.id),
|
|
928
|
+
(this.form.company = this.addData.company),
|
|
929
|
+
(this.form.password = this.addData.password),
|
|
930
|
+
(this.form.hospitalIds = this.hosName),
|
|
931
|
+
(this.form.groupIds = this.teamName));
|
|
932
|
+
},
|
|
933
|
+
},
|
|
934
|
+
};
|
|
935
|
+
</script>
|
|
936
|
+
|
|
937
|
+
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
938
|
+
::v-deep .vue-treeselect__control,
|
|
939
|
+
::v-deep .vue-treeselect__placeholder,
|
|
940
|
+
::v-deep .vue-treeselect__single-value {
|
|
941
|
+
height: 30px;
|
|
942
|
+
line-height: 30px;
|
|
943
|
+
}
|
|
944
|
+
.upload .el-upload {
|
|
945
|
+
border: 1px dashed #d9d9d9;
|
|
946
|
+
border-radius: 6px;
|
|
947
|
+
cursor: pointer;
|
|
948
|
+
position: relative;
|
|
949
|
+
overflow: hidden;
|
|
950
|
+
}
|
|
951
|
+
.upload .el-upload:hover {
|
|
952
|
+
border-color: #409eff;
|
|
953
|
+
}
|
|
954
|
+
.upload-icon {
|
|
955
|
+
font-size: 28px;
|
|
956
|
+
color: #8c939d;
|
|
957
|
+
width: 178px;
|
|
958
|
+
height: 178px;
|
|
959
|
+
line-height: 178px;
|
|
960
|
+
text-align: center;
|
|
961
|
+
}
|
|
962
|
+
.avatar {
|
|
963
|
+
width: 178px;
|
|
964
|
+
height: 178px;
|
|
965
|
+
display: block;
|
|
966
|
+
}
|
|
967
|
+
.long_title {
|
|
968
|
+
overflow: hidden;
|
|
969
|
+
text-overflow: ellipsis;
|
|
970
|
+
white-space: nowrap;
|
|
971
|
+
}
|
|
972
|
+
</style>
|