ylyx-cli 1.0.15 → 1.0.16
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/bin/ylyx.js +168 -168
- package/lib/config.js +283 -299
- package/lib/deploy.js +529 -495
- package/lib/generator.js +192 -192
- package/lib/index.js +113 -113
- package/lib/interactive.js +87 -87
- package/lib/remote.js +179 -179
- package/lib/template.js +174 -174
- package/lib/utils.js +148 -148
- package/package.json +5 -5
- package/templates/react-app/files/README.md +23 -23
- package/templates/react-app/files/package.json +28 -28
- package/templates/react-app/files/public/index.html +11 -11
- package/templates/react-app/files/src/App.css +15 -15
- package/templates/react-app/files/src/App.js +15 -15
- package/templates/react-app/files/src/index.css +10 -10
- package/templates/react-app/files/src/index.js +11 -11
- package/templates/react-app/template.json +11 -11
- package/templates/react-component/files/Component.module.css +5 -5
- package/templates/react-component/files/Component.tsx +31 -31
- package/templates/react-component/files/index.ts +2 -2
- package/templates/react-component/template.json +48 -48
- package/templates/vue-app/files/.editorconfig +14 -14
- package/templates/vue-app/files/.env.development +21 -21
- package/templates/vue-app/files/.env.production +18 -18
- package/templates/vue-app/files/.eslintignore +5 -5
- package/templates/vue-app/files/.eslintrc.js +267 -267
- package/templates/vue-app/files/.prettierignore +11 -11
- package/templates/vue-app/files/.travis.yml +5 -5
- package/templates/vue-app/files/.vscode/extensions.json +7 -7
- package/templates/vue-app/files/.vscode/settings.json +39 -39
- package/templates/vue-app/files/LICENSE +191 -191
- package/templates/vue-app/files/README.md +87 -87
- package/templates/vue-app/files/babel.config.js +11 -11
- package/templates/vue-app/files/jest.config.js +24 -24
- package/templates/vue-app/files/package.json +136 -136
- package/templates/vue-app/files/plopfile.js +7 -7
- package/templates/vue-app/files/postcss.config.js +5 -5
- package/templates/vue-app/files/public/default.js +25 -25
- package/templates/vue-app/files/public/index.html +26 -26
- package/templates/vue-app/files/src/App.vue +54 -54
- package/templates/vue-app/files/src/api/bigDataV/index.js +198 -198
- package/templates/vue-app/files/src/api/data.js +42 -42
- package/templates/vue-app/files/src/api/dataArchive/index.js +186 -186
- package/templates/vue-app/files/src/api/generator/genConfig.js +16 -16
- package/templates/vue-app/files/src/api/generator/generator.js +32 -32
- package/templates/vue-app/files/src/api/indexManagement/index.js +39 -39
- package/templates/vue-app/files/src/api/institutionMonitor/index.js +396 -396
- package/templates/vue-app/files/src/api/institutionSet/index.js +120 -120
- package/templates/vue-app/files/src/api/login.js +44 -44
- package/templates/vue-app/files/src/api/selfStatistics/index.js +50 -50
- package/templates/vue-app/files/src/api/system/code.js +15 -15
- package/templates/vue-app/files/src/api/system/dict.js +34 -34
- package/templates/vue-app/files/src/api/system/dictDetail.js +52 -52
- package/templates/vue-app/files/src/api/system/equipment.js +35 -35
- package/templates/vue-app/files/src/api/system/examManage.js +49 -49
- package/templates/vue-app/files/src/api/system/examProject.js +48 -48
- package/templates/vue-app/files/src/api/system/hosModel.js +35 -35
- package/templates/vue-app/files/src/api/system/hospital.js +88 -88
- package/templates/vue-app/files/src/api/system/job.js +40 -40
- package/templates/vue-app/files/src/api/system/menu.js +67 -67
- package/templates/vue-app/files/src/api/system/model.js +42 -42
- package/templates/vue-app/files/src/api/system/risConfig.js +9 -9
- package/templates/vue-app/files/src/api/system/role.js +64 -64
- package/templates/vue-app/files/src/api/system/sysSet.js +19 -19
- package/templates/vue-app/files/src/api/system/timing.js +41 -41
- package/templates/vue-app/files/src/api/system/user.js +121 -121
- package/templates/vue-app/files/src/api/tools/alipay.js +25 -25
- package/templates/vue-app/files/src/api/tools/email.js +24 -24
- package/templates/vue-app/files/src/api/tools/localStorage.js +27 -27
- package/templates/vue-app/files/src/api/tools/qiniu.js +40 -40
- package/templates/vue-app/files/src/assets/css/font-awesome.css +2342 -2342
- package/templates/vue-app/files/src/assets/css/font-awesome.min.css +2336 -2336
- package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.svg +2671 -2671
- package/templates/vue-app/files/src/assets/icons/index.js +9 -9
- package/templates/vue-app/files/src/assets/icons/svg/hospital.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/hospital1.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/loginOne.svg +35 -35
- package/templates/vue-app/files/src/assets/icons/svg/loginOneWhite.svg +19 -19
- package/templates/vue-app/files/src/assets/icons/svg/loginOr.svg +93 -93
- package/templates/vue-app/files/src/assets/icons/svg/loginUp.svg +96 -96
- package/templates/vue-app/files/src/assets/icons/svg/monitor.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/offline.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/online.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/system.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svgo.yml +21 -21
- package/templates/vue-app/files/src/assets/styles/btn.scss +103 -103
- package/templates/vue-app/files/src/assets/styles/eladmin.scss +124 -124
- package/templates/vue-app/files/src/assets/styles/element-ui.scss +217 -217
- package/templates/vue-app/files/src/assets/styles/element-variables.scss +31 -31
- package/templates/vue-app/files/src/assets/styles/global.scss +73 -73
- package/templates/vue-app/files/src/assets/styles/index.scss +220 -220
- package/templates/vue-app/files/src/assets/styles/mixin.scss +60 -60
- package/templates/vue-app/files/src/assets/styles/publicStyle.scss +224 -224
- package/templates/vue-app/files/src/assets/styles/sidebar.scss +239 -239
- package/templates/vue-app/files/src/assets/styles/transition.scss +48 -48
- package/templates/vue-app/files/src/assets/styles/variables.scss +44 -44
- package/templates/vue-app/files/src/common/flexible.js +145 -145
- package/templates/vue-app/files/src/components/Breadcrumb/index.vue +87 -87
- package/templates/vue-app/files/src/components/Crud/CRUD.operation.vue +248 -248
- package/templates/vue-app/files/src/components/Crud/Pagination.vue +20 -20
- package/templates/vue-app/files/src/components/Crud/RR.operation.vue +39 -39
- package/templates/vue-app/files/src/components/Crud/UD.operation.vue +106 -106
- package/templates/vue-app/files/src/components/Crud/crud.js +907 -907
- package/templates/vue-app/files/src/components/Crud/user/UR.operation.vue +154 -154
- package/templates/vue-app/files/src/components/DateRangePicker/index.vue +42 -42
- package/templates/vue-app/files/src/components/DateRangePickerProhibitNext/index.vue +42 -42
- package/templates/vue-app/files/src/components/DateRangePickerProhibitTodayNext/index.vue +48 -48
- package/templates/vue-app/files/src/components/Dict/Dict.js +31 -31
- package/templates/vue-app/files/src/components/Dict/index.js +29 -29
- package/templates/vue-app/files/src/components/Doc/index.vue +16 -16
- package/templates/vue-app/files/src/components/Echarts/BarChart.vue +115 -115
- package/templates/vue-app/files/src/components/Echarts/Category.vue +768 -768
- package/templates/vue-app/files/src/components/Echarts/Funnel.vue +120 -120
- package/templates/vue-app/files/src/components/Echarts/Gauge.vue +74 -74
- package/templates/vue-app/files/src/components/Echarts/Graph.vue +101 -101
- package/templates/vue-app/files/src/components/Echarts/HeatMap.vue +301 -301
- package/templates/vue-app/files/src/components/Echarts/Line3D.vue +110 -110
- package/templates/vue-app/files/src/components/Echarts/PieChart.vue +84 -84
- package/templates/vue-app/files/src/components/Echarts/Point.vue +161 -161
- package/templates/vue-app/files/src/components/Echarts/RadarChart.vue +123 -123
- package/templates/vue-app/files/src/components/Echarts/Rich.vue +160 -160
- package/templates/vue-app/files/src/components/Echarts/Sankey.vue +114 -114
- package/templates/vue-app/files/src/components/Echarts/Scatter.vue +192 -192
- package/templates/vue-app/files/src/components/Echarts/Sunburst.vue +127 -127
- package/templates/vue-app/files/src/components/Echarts/ThemeRiver.vue +233 -233
- package/templates/vue-app/files/src/components/Echarts/WordCloud.vue +201 -201
- package/templates/vue-app/files/src/components/GithubCorner/index.vue +55 -55
- package/templates/vue-app/files/src/components/Hamburger/index.vue +44 -44
- package/templates/vue-app/files/src/components/HeaderSearch/index.vue +196 -196
- package/templates/vue-app/files/src/components/IconSelect/index.vue +74 -74
- package/templates/vue-app/files/src/components/IconSelect/requireIcons.js +10 -10
- package/templates/vue-app/files/src/components/Iframe/index.vue +30 -30
- package/templates/vue-app/files/src/components/JavaEdit/index.vue +78 -78
- package/templates/vue-app/files/src/components/Pagination/index.vue +100 -100
- package/templates/vue-app/files/src/components/PanThumb/index.vue +149 -149
- package/templates/vue-app/files/src/components/ParentView/index.vue +3 -3
- package/templates/vue-app/files/src/components/Permission/index.js +13 -13
- package/templates/vue-app/files/src/components/Permission/permission.js +21 -21
- package/templates/vue-app/files/src/components/RightPanel/index.vue +149 -149
- package/templates/vue-app/files/src/components/Screenfull/index.vue +60 -60
- package/templates/vue-app/files/src/components/SizeSelect/index.vue +60 -60
- package/templates/vue-app/files/src/components/SvgIcon/index.vue +66 -66
- package/templates/vue-app/files/src/components/ThemePicker/index.vue +177 -177
- package/templates/vue-app/files/src/components/UploadExcel/index.vue +149 -149
- package/templates/vue-app/files/src/components/WaterMark/setWaterMark.js +68 -68
- package/templates/vue-app/files/src/components/WaterMark/waterMark.vue +69 -69
- package/templates/vue-app/files/src/components/Xgplayer/index.vue +49 -49
- package/templates/vue-app/files/src/components/YamlEdit/index.vue +81 -81
- package/templates/vue-app/files/src/layout/components/AppMain.vue +67 -67
- package/templates/vue-app/files/src/layout/components/Navbar.vue +209 -209
- package/templates/vue-app/files/src/layout/components/Settings/index.vue +125 -125
- package/templates/vue-app/files/src/layout/components/Sidebar/FixiOSBug.js +26 -26
- package/templates/vue-app/files/src/layout/components/Sidebar/Item.vue +29 -29
- package/templates/vue-app/files/src/layout/components/Sidebar/Link.vue +35 -35
- package/templates/vue-app/files/src/layout/components/Sidebar/Logo.vue +93 -93
- package/templates/vue-app/files/src/layout/components/Sidebar/SidebarItem.vue +104 -104
- package/templates/vue-app/files/src/layout/components/Sidebar/index.vue +79 -79
- package/templates/vue-app/files/src/layout/components/TagsView/ScrollPane.vue +90 -90
- package/templates/vue-app/files/src/layout/components/TagsView/index.vue +299 -299
- package/templates/vue-app/files/src/layout/components/index.js +5 -5
- package/templates/vue-app/files/src/layout/index.vue +119 -119
- package/templates/vue-app/files/src/layout/mixin/ResizeHandler.js +45 -45
- package/templates/vue-app/files/src/main.js +89 -89
- package/templates/vue-app/files/src/mixins/crud.js +348 -348
- package/templates/vue-app/files/src/router/index.js +156 -156
- package/templates/vue-app/files/src/router/routers.js +203 -203
- package/templates/vue-app/files/src/settings.js +57 -57
- package/templates/vue-app/files/src/store/getters.js +29 -29
- package/templates/vue-app/files/src/store/index.js +25 -25
- package/templates/vue-app/files/src/store/modules/api.js +33 -33
- package/templates/vue-app/files/src/store/modules/app.js +55 -55
- package/templates/vue-app/files/src/store/modules/permission.js +79 -79
- package/templates/vue-app/files/src/store/modules/register.js +17 -17
- package/templates/vue-app/files/src/store/modules/settings.js +46 -46
- package/templates/vue-app/files/src/store/modules/tagsView.js +168 -168
- package/templates/vue-app/files/src/store/modules/user.js +119 -119
- package/templates/vue-app/files/src/utils/auth.js +18 -18
- package/templates/vue-app/files/src/utils/base64ToFile.js +27 -27
- package/templates/vue-app/files/src/utils/clipboard.js +36 -36
- package/templates/vue-app/files/src/utils/datetime.js +289 -289
- package/templates/vue-app/files/src/utils/getBlobFile.js +10 -10
- package/templates/vue-app/files/src/utils/getTime.js +29 -29
- package/templates/vue-app/files/src/utils/index.js +520 -520
- package/templates/vue-app/files/src/utils/permission.js +29 -29
- package/templates/vue-app/files/src/utils/pinyin.js +450 -450
- package/templates/vue-app/files/src/utils/request.js +139 -139
- package/templates/vue-app/files/src/utils/rsaEncrypt.js +37 -37
- package/templates/vue-app/files/src/utils/shortcuts.js +210 -210
- package/templates/vue-app/files/src/utils/upload.js +12 -12
- package/templates/vue-app/files/src/utils/validate.js +262 -262
- package/templates/vue-app/files/src/views/components/Echarts.vue +124 -124
- package/templates/vue-app/files/src/views/components/Editor.vue +75 -75
- package/templates/vue-app/files/src/views/components/MarkDown.vue +44 -44
- package/templates/vue-app/files/src/views/components/UVideo.vue +37 -37
- package/templates/vue-app/files/src/views/components/YamlEdit.vue +206 -206
- package/templates/vue-app/files/src/views/components/camera/camera.vue +115 -115
- package/templates/vue-app/files/src/views/components/camera/cameraTest.vue +158 -158
- package/templates/vue-app/files/src/views/components/excel/upload-excel.vue +41 -41
- package/templates/vue-app/files/src/views/components/icons/element-icons.js +74 -74
- package/templates/vue-app/files/src/views/components/icons/index.vue +106 -106
- package/templates/vue-app/files/src/views/components/icons/svg-icons.js +10 -10
- package/templates/vue-app/files/src/views/components/scroll/index.vue +107 -107
- package/templates/vue-app/files/src/views/components/scrollFull/index.vue +99 -99
- package/templates/vue-app/files/src/views/dashboard/LineChart.vue +138 -138
- package/templates/vue-app/files/src/views/dashboard/PanelGroup.vue +173 -173
- package/templates/vue-app/files/src/views/dashboard/mixins/resize.js +57 -57
- package/templates/vue-app/files/src/views/dataArchive/delTable.vue +354 -354
- package/templates/vue-app/files/src/views/dataArchive/exportDetail.vue +121 -121
- package/templates/vue-app/files/src/views/dataArchive/exportList.vue +160 -160
- package/templates/vue-app/files/src/views/dataArchive/index.vue +2104 -2104
- package/templates/vue-app/files/src/views/features/401.vue +83 -83
- package/templates/vue-app/files/src/views/features/404.vue +226 -226
- package/templates/vue-app/files/src/views/features/redirect.vue +12 -12
- package/templates/vue-app/files/src/views/generator/config.vue +348 -348
- package/templates/vue-app/files/src/views/generator/index.vue +143 -143
- package/templates/vue-app/files/src/views/generator/preview.vue +39 -39
- package/templates/vue-app/files/src/views/home.vue +80 -80
- package/templates/vue-app/files/src/views/indexManagement/index.vue +422 -422
- package/templates/vue-app/files/src/views/indexManagement/other.vue +286 -286
- package/templates/vue-app/files/src/views/institutionMonitor/components/LineChart.vue +191 -191
- package/templates/vue-app/files/src/views/institutionMonitor/index.scss +339 -339
- package/templates/vue-app/files/src/views/institutionMonitor/index.vue +1385 -1385
- package/templates/vue-app/files/src/views/institutionMonitor/mixins/resize.js +57 -57
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/checkProjectCode.vue +267 -267
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/imageAbnormalMonitor.vue +361 -361
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/index.vue +686 -686
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/leakageAnomaly.vue +270 -270
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/moveMonitore.vue +114 -114
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/qualityMonitore.vue +338 -338
- package/templates/vue-app/files/src/views/institutionSet/cloudSet.vue +534 -534
- package/templates/vue-app/files/src/views/institutionSet/index.vue +2550 -2550
- package/templates/vue-app/files/src/views/login.vue +243 -243
- package/templates/vue-app/files/src/views/qualityLogin.vue +280 -280
- package/templates/vue-app/files/src/views/selfStatistics/components/LineChart.vue +296 -296
- package/templates/vue-app/files/src/views/selfStatistics/hospitalDetail/index.vue +533 -533
- package/templates/vue-app/files/src/views/selfStatistics/index.scss +447 -447
- package/templates/vue-app/files/src/views/selfStatistics/index.vue +903 -903
- package/templates/vue-app/files/src/views/selfStatistics/mixins/resize.js +57 -57
- package/templates/vue-app/files/src/views/selfStatistics/monitorDetail/index.vue +285 -285
- package/templates/vue-app/files/src/views/selfStatistics/offlineDetail/index.vue +104 -104
- package/templates/vue-app/files/src/views/selfStatistics/selfActiveDetail/index.vue +104 -104
- package/templates/vue-app/files/src/views/selfStatistics/selfMonitorDetail/index.vue +420 -420
- package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/setWaterMark.js +68 -68
- package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/waterMark.vue +69 -69
- package/templates/vue-app/files/src/views/system/dept/index.vue +144 -144
- package/templates/vue-app/files/src/views/system/dict/dictDetail.vue +146 -146
- package/templates/vue-app/files/src/views/system/dict/index.vue +159 -159
- package/templates/vue-app/files/src/views/system/examModality/index.vue +174 -174
- package/templates/vue-app/files/src/views/system/examPart/index.vue +184 -184
- package/templates/vue-app/files/src/views/system/examProject/index.vue +321 -321
- package/templates/vue-app/files/src/views/system/examine/index.vue +66 -66
- package/templates/vue-app/files/src/views/system/job/index.vue +119 -119
- package/templates/vue-app/files/src/views/system/job/module/form.vue +72 -72
- package/templates/vue-app/files/src/views/system/job/module/header.vue +48 -48
- package/templates/vue-app/files/src/views/system/menu/index.vue +327 -327
- package/templates/vue-app/files/src/views/system/model/index.vue +285 -285
- package/templates/vue-app/files/src/views/system/role/index.vue +434 -434
- package/templates/vue-app/files/src/views/system/sysSet/index.vue +84 -84
- package/templates/vue-app/files/src/views/system/timing/index.vue +289 -289
- package/templates/vue-app/files/src/views/system/timing/log.vue +143 -143
- package/templates/vue-app/files/src/views/system/user/admin.vue +414 -414
- package/templates/vue-app/files/src/views/system/user/center/updateEmail.vue +146 -146
- package/templates/vue-app/files/src/views/system/user/center/updatePass.vue +168 -168
- package/templates/vue-app/files/src/views/system/user/center.vue +140 -140
- package/templates/vue-app/files/src/views/system/user/index.vue +972 -972
- package/templates/vue-app/files/src/views/systemSet/role/index.vue +314 -314
- package/templates/vue-app/files/src/views/systemSet/user/admin.vue +414 -414
- package/templates/vue-app/files/src/views/systemSet/user/center/updateEmail.vue +146 -146
- package/templates/vue-app/files/src/views/systemSet/user/center/updatePass.vue +115 -115
- package/templates/vue-app/files/src/views/systemSet/user/center.vue +351 -351
- package/templates/vue-app/files/src/views/systemSet/user/index.vue +928 -928
- package/templates/vue-app/files/src/views/tools/aliPay/config.vue +102 -102
- package/templates/vue-app/files/src/views/tools/aliPay/index.vue +48 -48
- package/templates/vue-app/files/src/views/tools/aliPay/toPay.vue +91 -91
- package/templates/vue-app/files/src/views/tools/email/config.vue +91 -91
- package/templates/vue-app/files/src/views/tools/email/index.vue +42 -42
- package/templates/vue-app/files/src/views/tools/email/send.vue +159 -159
- package/templates/vue-app/files/src/views/tools/storage/index.vue +35 -35
- package/templates/vue-app/files/src/views/tools/storage/local/index.vue +207 -207
- package/templates/vue-app/files/src/views/tools/storage/qiniu/form.vue +108 -108
- package/templates/vue-app/files/src/views/tools/storage/qiniu/index.vue +241 -241
- package/templates/vue-app/files/src/views/tools/swagger/index.vue +14 -14
- package/templates/vue-app/files/vue.config.js +173 -173
- package/templates/vue-app/template.json +29 -29
|
@@ -1,351 +1,351 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="app-container">
|
|
3
|
-
<el-row :gutter="20">
|
|
4
|
-
<el-col :xs="24" :sm="24" :md="8" :lg="6" :xl="5" style="margin-bottom: 10px">
|
|
5
|
-
<el-card class="box-card">
|
|
6
|
-
<div slot="header" class="clearfix">
|
|
7
|
-
<span>个人信息</span>
|
|
8
|
-
</div>
|
|
9
|
-
<div>
|
|
10
|
-
<div style="text-align: center">
|
|
11
|
-
<div class="el-upload">
|
|
12
|
-
<img
|
|
13
|
-
:src="user.avatarName ? baseApi + '/avatar/' + user.avatarName : Avatar"
|
|
14
|
-
title="点击上传头像"
|
|
15
|
-
class="avatar"
|
|
16
|
-
@click="toggleShow" />
|
|
17
|
-
<myUpload
|
|
18
|
-
v-model="show"
|
|
19
|
-
:headers="headers"
|
|
20
|
-
:url="updateAvatarApi"
|
|
21
|
-
@crop-upload-success="cropUploadSuccess" />
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<ul class="user-info">
|
|
25
|
-
<li>
|
|
26
|
-
<div style="height: 100%">
|
|
27
|
-
<svg-icon icon-class="login" /> 用户名
|
|
28
|
-
<div class="user-right">{{ user.username }}</div>
|
|
29
|
-
</div>
|
|
30
|
-
</li>
|
|
31
|
-
<li>
|
|
32
|
-
<svg-icon icon-class="user1" /> 姓名
|
|
33
|
-
<div class="user-right">{{ user.name }}</div>
|
|
34
|
-
</li>
|
|
35
|
-
<!-- <li><svg-icon icon-class="dept" /> 所属部门 <div class="user-right"> {{ user.dept.name }}</div></li>-->
|
|
36
|
-
<li>
|
|
37
|
-
<svg-icon icon-class="phone" /> 手机号码
|
|
38
|
-
<div class="user-right">{{ user.phone }}</div>
|
|
39
|
-
</li>
|
|
40
|
-
<!-- <li><svg-icon icon-class="email" /> 用户邮箱 <div class="user-right">{{ user.email }}</div></li>-->
|
|
41
|
-
<li>
|
|
42
|
-
<svg-icon icon-class="anq" /> 安全设置
|
|
43
|
-
<div class="user-right">
|
|
44
|
-
<a @click="$refs.pass.dialog = true">修改密码</a>
|
|
45
|
-
</div>
|
|
46
|
-
</li>
|
|
47
|
-
</ul>
|
|
48
|
-
</div>
|
|
49
|
-
</el-card>
|
|
50
|
-
</el-col>
|
|
51
|
-
<el-col :xs="24" :sm="24" :md="16" :lg="18" :xl="19">
|
|
52
|
-
<!-- 用户资料 -->
|
|
53
|
-
<el-card class="box-card">
|
|
54
|
-
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
55
|
-
<el-tab-pane label="用户资料" name="first">
|
|
56
|
-
<el-form
|
|
57
|
-
ref="form"
|
|
58
|
-
:model="form"
|
|
59
|
-
:rules="rules"
|
|
60
|
-
style="margin-top: 10px"
|
|
61
|
-
size="small"
|
|
62
|
-
label-width="80px">
|
|
63
|
-
<el-form-item label="用户名" prop="username">
|
|
64
|
-
<el-input v-model="form.username" style="width: 35%" :disabled="true" />
|
|
65
|
-
</el-form-item>
|
|
66
|
-
<el-form-item label="姓名" prop="name">
|
|
67
|
-
<el-input v-model="form.name" style="width: 35%" />
|
|
68
|
-
<span style="color: #c0c0c0; margin-left: 10px">用户姓名不作为登录使用</span>
|
|
69
|
-
</el-form-item>
|
|
70
|
-
<el-form-item label="手机号" prop="phone">
|
|
71
|
-
<el-input v-model="form.phone" style="width: 35%" />
|
|
72
|
-
</el-form-item>
|
|
73
|
-
<el-form-item label="性别" prop="sex">
|
|
74
|
-
<el-radio-group v-model="form.sex" style="width: 178px">
|
|
75
|
-
<el-radio label="M">男</el-radio>
|
|
76
|
-
<el-radio label="F">女</el-radio>
|
|
77
|
-
</el-radio-group>
|
|
78
|
-
</el-form-item>
|
|
79
|
-
<el-form-item label="医院" prop="hospitalId">
|
|
80
|
-
<el-select v-model="form.hospitalId" style="width: 35%" :disabled="true">
|
|
81
|
-
<el-option
|
|
82
|
-
v-for="item in hospitalList"
|
|
83
|
-
:key="item.id"
|
|
84
|
-
:label="item.hospitalName"
|
|
85
|
-
:value="item.hospitalId" />
|
|
86
|
-
</el-select>
|
|
87
|
-
</el-form-item>
|
|
88
|
-
<el-form-item label="角色" prop="roleDatas">
|
|
89
|
-
<el-select
|
|
90
|
-
ref="selectAppType"
|
|
91
|
-
v-model="roleDatas"
|
|
92
|
-
multiple
|
|
93
|
-
style="width: 350px"
|
|
94
|
-
:disabled="true">
|
|
95
|
-
<el-option
|
|
96
|
-
v-for="item in roles"
|
|
97
|
-
:key="item.name"
|
|
98
|
-
:label="item.name"
|
|
99
|
-
:value="item.id" />
|
|
100
|
-
</el-select>
|
|
101
|
-
</el-form-item>
|
|
102
|
-
<el-form-item label="职称" prop="jobTitle">
|
|
103
|
-
<el-select v-model="form.jobTitle" style="width: 350px" placeholder="请选择职称">
|
|
104
|
-
<el-option
|
|
105
|
-
v-for="item in dict.job_title"
|
|
106
|
-
:key="item.id"
|
|
107
|
-
:label="item.label"
|
|
108
|
-
:value="item.value" />
|
|
109
|
-
</el-select>
|
|
110
|
-
</el-form-item>
|
|
111
|
-
<el-form-item label="职位" prop="position">
|
|
112
|
-
<el-select v-model="form.position" style="width: 350px" placeholder="请选择职位">
|
|
113
|
-
<el-option
|
|
114
|
-
v-for="item in dict.position"
|
|
115
|
-
:key="item.id"
|
|
116
|
-
:label="item.label"
|
|
117
|
-
:value="item.value" />
|
|
118
|
-
</el-select>
|
|
119
|
-
</el-form-item>
|
|
120
|
-
<el-form-item label="签名">
|
|
121
|
-
<el-upload
|
|
122
|
-
ref="upload"
|
|
123
|
-
:show-file-list="false"
|
|
124
|
-
:auto-upload="true"
|
|
125
|
-
:action="fileUploadApi + '?prefix=signature'"
|
|
126
|
-
:headers="headers"
|
|
127
|
-
:on-success="handleAvatarSuccess"
|
|
128
|
-
:before-upload="beforeAvatarUpload">
|
|
129
|
-
<img
|
|
130
|
-
v-if="signPath"
|
|
131
|
-
:src="this.baseApi + '/file/' + signPath"
|
|
132
|
-
class="avatar"
|
|
133
|
-
v-model="form.signPath" />
|
|
134
|
-
<i v-else class="el-icon-plus upload-icon"></i>
|
|
135
|
-
</el-upload>
|
|
136
|
-
</el-form-item>
|
|
137
|
-
<el-form-item label="">
|
|
138
|
-
<el-button :loading="saveLoading" size="mini" type="primary" @click="doSubmit"
|
|
139
|
-
>保存配置</el-button
|
|
140
|
-
>
|
|
141
|
-
</el-form-item>
|
|
142
|
-
</el-form>
|
|
143
|
-
</el-tab-pane>
|
|
144
|
-
<!-- 操作日志 -->
|
|
145
|
-
<el-tab-pane label="操作日志" name="second">
|
|
146
|
-
<el-table v-loading="loading" :data="data" style="width: 100%">
|
|
147
|
-
<el-table-column prop="description" label="行为" />
|
|
148
|
-
<el-table-column prop="requestIp" label="IP" />
|
|
149
|
-
<el-table-column :show-overflow-tooltip="true" prop="address" label="IP来源" />
|
|
150
|
-
<el-table-column prop="browser" label="浏览器" />
|
|
151
|
-
<el-table-column prop="time" label="请求耗时" align="center">
|
|
152
|
-
<template slot-scope="scope">
|
|
153
|
-
<el-tag v-if="scope.row.time <= 300">{{ scope.row.time }}ms</el-tag>
|
|
154
|
-
<el-tag v-else-if="scope.row.time <= 1000" type="warning"
|
|
155
|
-
>{{ scope.row.time }}ms</el-tag
|
|
156
|
-
>
|
|
157
|
-
<el-tag v-else type="danger">{{ scope.row.time }}ms</el-tag>
|
|
158
|
-
</template>
|
|
159
|
-
</el-table-column>
|
|
160
|
-
<el-table-column align="right">
|
|
161
|
-
<template slot="header">
|
|
162
|
-
<div style="display: inline-block; float: right; cursor: pointer" @click="init">
|
|
163
|
-
创建日期<i class="el-icon-refresh" style="margin-left: 40px" />
|
|
164
|
-
</div>
|
|
165
|
-
</template>
|
|
166
|
-
<template slot-scope="scope">
|
|
167
|
-
<span>{{ scope.row.createTime }}</span>
|
|
168
|
-
</template>
|
|
169
|
-
</el-table-column>
|
|
170
|
-
</el-table>
|
|
171
|
-
<!--分页组件-->
|
|
172
|
-
<el-pagination
|
|
173
|
-
:total="total"
|
|
174
|
-
:current-page="page + 1"
|
|
175
|
-
style="margin-top: 8px"
|
|
176
|
-
layout="total, prev, pager, next, sizes"
|
|
177
|
-
@size-change="sizeChange"
|
|
178
|
-
@current-change="pageChange" />
|
|
179
|
-
</el-tab-pane>
|
|
180
|
-
</el-tabs>
|
|
181
|
-
</el-card>
|
|
182
|
-
</el-col>
|
|
183
|
-
</el-row>
|
|
184
|
-
<!-- <updateEmail ref="email" :email="user.email" />-->
|
|
185
|
-
<updatePass ref="pass" />
|
|
186
|
-
</div>
|
|
187
|
-
</template>
|
|
188
|
-
|
|
189
|
-
<script>
|
|
190
|
-
import myUpload from 'vue-image-crop-upload';
|
|
191
|
-
import { getHospitals } from '@/api/system/hospital';
|
|
192
|
-
import { getAll, getLevel } from '@/api/system/role';
|
|
193
|
-
import { mapGetters } from 'vuex';
|
|
194
|
-
import updatePass from './center/updatePass';
|
|
195
|
-
import updateEmail from './center/updateEmail';
|
|
196
|
-
import { getToken } from '@/utils/auth';
|
|
197
|
-
import store from '@/store';
|
|
198
|
-
import { isvalidPhone } from '@/utils/validate';
|
|
199
|
-
import crud from '@/mixins/crud';
|
|
200
|
-
import { editUser, getCenterUser } from '@/api/system/user';
|
|
201
|
-
import Avatar from '@/assets/images/avatar.png';
|
|
202
|
-
|
|
203
|
-
export default {
|
|
204
|
-
name: 'Center',
|
|
205
|
-
components: { updatePass, updateEmail, myUpload },
|
|
206
|
-
mixins: [crud],
|
|
207
|
-
dicts: ['user_status', 'sex', 'job_title', 'position'],
|
|
208
|
-
data() {
|
|
209
|
-
// 自定义验证
|
|
210
|
-
const validPhone = (rule, value, callback) => {
|
|
211
|
-
if (!value) {
|
|
212
|
-
callback(new Error('请输入电话号码'));
|
|
213
|
-
} else if (!isvalidPhone(value)) {
|
|
214
|
-
callback(new Error('请输入正确的11位手机号码'));
|
|
215
|
-
} else {
|
|
216
|
-
callback();
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
return {
|
|
220
|
-
show: false,
|
|
221
|
-
Avatar: Avatar,
|
|
222
|
-
activeName: 'first',
|
|
223
|
-
saveLoading: false,
|
|
224
|
-
headers: {
|
|
225
|
-
Authorization: getToken(),
|
|
226
|
-
},
|
|
227
|
-
form: {},
|
|
228
|
-
rules: {
|
|
229
|
-
name: [
|
|
230
|
-
{ required: true, message: '请输入姓名', trigger: 'blur' },
|
|
231
|
-
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
|
232
|
-
],
|
|
233
|
-
sex: [{ required: true, message: '请选择性别', trigger: 'blur' }],
|
|
234
|
-
},
|
|
235
|
-
hospitalList: [],
|
|
236
|
-
roles: [],
|
|
237
|
-
roleDatas: [],
|
|
238
|
-
signPath: null,
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
computed: {
|
|
242
|
-
...mapGetters(['user', 'updateAvatarApi', 'baseApi', 'fileUploadApi']),
|
|
243
|
-
},
|
|
244
|
-
created() {
|
|
245
|
-
this.getRoles();
|
|
246
|
-
this.getHospitalList();
|
|
247
|
-
this.centerUser();
|
|
248
|
-
},
|
|
249
|
-
methods: {
|
|
250
|
-
centerUser() {
|
|
251
|
-
getCenterUser().then(res => {
|
|
252
|
-
this.form = res;
|
|
253
|
-
let roles = [];
|
|
254
|
-
this.form.roles.forEach((role, index) => {
|
|
255
|
-
roles.push(role.id);
|
|
256
|
-
});
|
|
257
|
-
this.roleDatas = roles;
|
|
258
|
-
this.signPath = this.form.signPath;
|
|
259
|
-
});
|
|
260
|
-
},
|
|
261
|
-
/**
|
|
262
|
-
* 获取所有医院
|
|
263
|
-
*/
|
|
264
|
-
getHospitalList() {
|
|
265
|
-
getHospitals().then(res => {
|
|
266
|
-
this.hospitalList = res.content;
|
|
267
|
-
});
|
|
268
|
-
},
|
|
269
|
-
// 获取弹窗内角色数据
|
|
270
|
-
getRoles() {
|
|
271
|
-
getAll({ loginType: this.user.loginType })
|
|
272
|
-
.then(res => {
|
|
273
|
-
this.roles = res;
|
|
274
|
-
})
|
|
275
|
-
.catch(() => {});
|
|
276
|
-
},
|
|
277
|
-
toggleShow() {
|
|
278
|
-
this.show = !this.show;
|
|
279
|
-
},
|
|
280
|
-
handleClick(tab, event) {
|
|
281
|
-
if (tab.name === 'second') {
|
|
282
|
-
this.init();
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
beforeInit() {
|
|
286
|
-
this.url = 'api/logs/user';
|
|
287
|
-
return true;
|
|
288
|
-
},
|
|
289
|
-
cropUploadSuccess(jsonData, field) {
|
|
290
|
-
store.dispatch('GetInfo').then(() => {});
|
|
291
|
-
},
|
|
292
|
-
doSubmit() {
|
|
293
|
-
if (this.$refs['form']) {
|
|
294
|
-
this.$refs['form'].validate(valid => {
|
|
295
|
-
if (valid) {
|
|
296
|
-
this.saveLoading = true;
|
|
297
|
-
editUser(this.form)
|
|
298
|
-
.then(() => {
|
|
299
|
-
this.editSuccessNotify();
|
|
300
|
-
store.dispatch('GetInfo').then(() => {});
|
|
301
|
-
this.saveLoading = false;
|
|
302
|
-
})
|
|
303
|
-
.catch(() => {
|
|
304
|
-
this.saveLoading = false;
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
handleAvatarSuccess(source) {
|
|
311
|
-
this.signPath = source.datas;
|
|
312
|
-
this.form.signPath = source.datas;
|
|
313
|
-
},
|
|
314
|
-
beforeAvatarUpload(file) {
|
|
315
|
-
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
316
|
-
if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
|
|
317
|
-
this.$message.error('上传头像图片只能是 JPG、PNG格式!');
|
|
318
|
-
return false;
|
|
319
|
-
}
|
|
320
|
-
if (!isLt2M) {
|
|
321
|
-
this.$message.error('上传头像图片大小不能超过 2MB!');
|
|
322
|
-
return false;
|
|
323
|
-
}
|
|
324
|
-
return file.type && isLt2M;
|
|
325
|
-
},
|
|
326
|
-
},
|
|
327
|
-
};
|
|
328
|
-
</script>
|
|
329
|
-
|
|
330
|
-
<style rel="stylesheet/scss" lang="scss">
|
|
331
|
-
.avatar {
|
|
332
|
-
width: 120px;
|
|
333
|
-
height: 120px;
|
|
334
|
-
border-radius: 50%;
|
|
335
|
-
}
|
|
336
|
-
.user-info {
|
|
337
|
-
padding-left: 0;
|
|
338
|
-
list-style: none;
|
|
339
|
-
li {
|
|
340
|
-
border-bottom: 1px solid #f0f3f4;
|
|
341
|
-
padding: 11px 0;
|
|
342
|
-
font-size: 13px;
|
|
343
|
-
}
|
|
344
|
-
.user-right {
|
|
345
|
-
float: right;
|
|
346
|
-
a {
|
|
347
|
-
color: #317ef3;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<el-row :gutter="20">
|
|
4
|
+
<el-col :xs="24" :sm="24" :md="8" :lg="6" :xl="5" style="margin-bottom: 10px">
|
|
5
|
+
<el-card class="box-card">
|
|
6
|
+
<div slot="header" class="clearfix">
|
|
7
|
+
<span>个人信息</span>
|
|
8
|
+
</div>
|
|
9
|
+
<div>
|
|
10
|
+
<div style="text-align: center">
|
|
11
|
+
<div class="el-upload">
|
|
12
|
+
<img
|
|
13
|
+
:src="user.avatarName ? baseApi + '/avatar/' + user.avatarName : Avatar"
|
|
14
|
+
title="点击上传头像"
|
|
15
|
+
class="avatar"
|
|
16
|
+
@click="toggleShow" />
|
|
17
|
+
<myUpload
|
|
18
|
+
v-model="show"
|
|
19
|
+
:headers="headers"
|
|
20
|
+
:url="updateAvatarApi"
|
|
21
|
+
@crop-upload-success="cropUploadSuccess" />
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<ul class="user-info">
|
|
25
|
+
<li>
|
|
26
|
+
<div style="height: 100%">
|
|
27
|
+
<svg-icon icon-class="login" /> 用户名
|
|
28
|
+
<div class="user-right">{{ user.username }}</div>
|
|
29
|
+
</div>
|
|
30
|
+
</li>
|
|
31
|
+
<li>
|
|
32
|
+
<svg-icon icon-class="user1" /> 姓名
|
|
33
|
+
<div class="user-right">{{ user.name }}</div>
|
|
34
|
+
</li>
|
|
35
|
+
<!-- <li><svg-icon icon-class="dept" /> 所属部门 <div class="user-right"> {{ user.dept.name }}</div></li>-->
|
|
36
|
+
<li>
|
|
37
|
+
<svg-icon icon-class="phone" /> 手机号码
|
|
38
|
+
<div class="user-right">{{ user.phone }}</div>
|
|
39
|
+
</li>
|
|
40
|
+
<!-- <li><svg-icon icon-class="email" /> 用户邮箱 <div class="user-right">{{ user.email }}</div></li>-->
|
|
41
|
+
<li>
|
|
42
|
+
<svg-icon icon-class="anq" /> 安全设置
|
|
43
|
+
<div class="user-right">
|
|
44
|
+
<a @click="$refs.pass.dialog = true">修改密码</a>
|
|
45
|
+
</div>
|
|
46
|
+
</li>
|
|
47
|
+
</ul>
|
|
48
|
+
</div>
|
|
49
|
+
</el-card>
|
|
50
|
+
</el-col>
|
|
51
|
+
<el-col :xs="24" :sm="24" :md="16" :lg="18" :xl="19">
|
|
52
|
+
<!-- 用户资料 -->
|
|
53
|
+
<el-card class="box-card">
|
|
54
|
+
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
55
|
+
<el-tab-pane label="用户资料" name="first">
|
|
56
|
+
<el-form
|
|
57
|
+
ref="form"
|
|
58
|
+
:model="form"
|
|
59
|
+
:rules="rules"
|
|
60
|
+
style="margin-top: 10px"
|
|
61
|
+
size="small"
|
|
62
|
+
label-width="80px">
|
|
63
|
+
<el-form-item label="用户名" prop="username">
|
|
64
|
+
<el-input v-model="form.username" style="width: 35%" :disabled="true" />
|
|
65
|
+
</el-form-item>
|
|
66
|
+
<el-form-item label="姓名" prop="name">
|
|
67
|
+
<el-input v-model="form.name" style="width: 35%" />
|
|
68
|
+
<span style="color: #c0c0c0; margin-left: 10px">用户姓名不作为登录使用</span>
|
|
69
|
+
</el-form-item>
|
|
70
|
+
<el-form-item label="手机号" prop="phone">
|
|
71
|
+
<el-input v-model="form.phone" style="width: 35%" />
|
|
72
|
+
</el-form-item>
|
|
73
|
+
<el-form-item label="性别" prop="sex">
|
|
74
|
+
<el-radio-group v-model="form.sex" style="width: 178px">
|
|
75
|
+
<el-radio label="M">男</el-radio>
|
|
76
|
+
<el-radio label="F">女</el-radio>
|
|
77
|
+
</el-radio-group>
|
|
78
|
+
</el-form-item>
|
|
79
|
+
<el-form-item label="医院" prop="hospitalId">
|
|
80
|
+
<el-select v-model="form.hospitalId" style="width: 35%" :disabled="true">
|
|
81
|
+
<el-option
|
|
82
|
+
v-for="item in hospitalList"
|
|
83
|
+
:key="item.id"
|
|
84
|
+
:label="item.hospitalName"
|
|
85
|
+
:value="item.hospitalId" />
|
|
86
|
+
</el-select>
|
|
87
|
+
</el-form-item>
|
|
88
|
+
<el-form-item label="角色" prop="roleDatas">
|
|
89
|
+
<el-select
|
|
90
|
+
ref="selectAppType"
|
|
91
|
+
v-model="roleDatas"
|
|
92
|
+
multiple
|
|
93
|
+
style="width: 350px"
|
|
94
|
+
:disabled="true">
|
|
95
|
+
<el-option
|
|
96
|
+
v-for="item in roles"
|
|
97
|
+
:key="item.name"
|
|
98
|
+
:label="item.name"
|
|
99
|
+
:value="item.id" />
|
|
100
|
+
</el-select>
|
|
101
|
+
</el-form-item>
|
|
102
|
+
<el-form-item label="职称" prop="jobTitle">
|
|
103
|
+
<el-select v-model="form.jobTitle" style="width: 350px" placeholder="请选择职称">
|
|
104
|
+
<el-option
|
|
105
|
+
v-for="item in dict.job_title"
|
|
106
|
+
:key="item.id"
|
|
107
|
+
:label="item.label"
|
|
108
|
+
:value="item.value" />
|
|
109
|
+
</el-select>
|
|
110
|
+
</el-form-item>
|
|
111
|
+
<el-form-item label="职位" prop="position">
|
|
112
|
+
<el-select v-model="form.position" style="width: 350px" placeholder="请选择职位">
|
|
113
|
+
<el-option
|
|
114
|
+
v-for="item in dict.position"
|
|
115
|
+
:key="item.id"
|
|
116
|
+
:label="item.label"
|
|
117
|
+
:value="item.value" />
|
|
118
|
+
</el-select>
|
|
119
|
+
</el-form-item>
|
|
120
|
+
<el-form-item label="签名">
|
|
121
|
+
<el-upload
|
|
122
|
+
ref="upload"
|
|
123
|
+
:show-file-list="false"
|
|
124
|
+
:auto-upload="true"
|
|
125
|
+
:action="fileUploadApi + '?prefix=signature'"
|
|
126
|
+
:headers="headers"
|
|
127
|
+
:on-success="handleAvatarSuccess"
|
|
128
|
+
:before-upload="beforeAvatarUpload">
|
|
129
|
+
<img
|
|
130
|
+
v-if="signPath"
|
|
131
|
+
:src="this.baseApi + '/file/' + signPath"
|
|
132
|
+
class="avatar"
|
|
133
|
+
v-model="form.signPath" />
|
|
134
|
+
<i v-else class="el-icon-plus upload-icon"></i>
|
|
135
|
+
</el-upload>
|
|
136
|
+
</el-form-item>
|
|
137
|
+
<el-form-item label="">
|
|
138
|
+
<el-button :loading="saveLoading" size="mini" type="primary" @click="doSubmit"
|
|
139
|
+
>保存配置</el-button
|
|
140
|
+
>
|
|
141
|
+
</el-form-item>
|
|
142
|
+
</el-form>
|
|
143
|
+
</el-tab-pane>
|
|
144
|
+
<!-- 操作日志 -->
|
|
145
|
+
<el-tab-pane label="操作日志" name="second">
|
|
146
|
+
<el-table v-loading="loading" :data="data" style="width: 100%">
|
|
147
|
+
<el-table-column prop="description" label="行为" />
|
|
148
|
+
<el-table-column prop="requestIp" label="IP" />
|
|
149
|
+
<el-table-column :show-overflow-tooltip="true" prop="address" label="IP来源" />
|
|
150
|
+
<el-table-column prop="browser" label="浏览器" />
|
|
151
|
+
<el-table-column prop="time" label="请求耗时" align="center">
|
|
152
|
+
<template slot-scope="scope">
|
|
153
|
+
<el-tag v-if="scope.row.time <= 300">{{ scope.row.time }}ms</el-tag>
|
|
154
|
+
<el-tag v-else-if="scope.row.time <= 1000" type="warning"
|
|
155
|
+
>{{ scope.row.time }}ms</el-tag
|
|
156
|
+
>
|
|
157
|
+
<el-tag v-else type="danger">{{ scope.row.time }}ms</el-tag>
|
|
158
|
+
</template>
|
|
159
|
+
</el-table-column>
|
|
160
|
+
<el-table-column align="right">
|
|
161
|
+
<template slot="header">
|
|
162
|
+
<div style="display: inline-block; float: right; cursor: pointer" @click="init">
|
|
163
|
+
创建日期<i class="el-icon-refresh" style="margin-left: 40px" />
|
|
164
|
+
</div>
|
|
165
|
+
</template>
|
|
166
|
+
<template slot-scope="scope">
|
|
167
|
+
<span>{{ scope.row.createTime }}</span>
|
|
168
|
+
</template>
|
|
169
|
+
</el-table-column>
|
|
170
|
+
</el-table>
|
|
171
|
+
<!--分页组件-->
|
|
172
|
+
<el-pagination
|
|
173
|
+
:total="total"
|
|
174
|
+
:current-page="page + 1"
|
|
175
|
+
style="margin-top: 8px"
|
|
176
|
+
layout="total, prev, pager, next, sizes"
|
|
177
|
+
@size-change="sizeChange"
|
|
178
|
+
@current-change="pageChange" />
|
|
179
|
+
</el-tab-pane>
|
|
180
|
+
</el-tabs>
|
|
181
|
+
</el-card>
|
|
182
|
+
</el-col>
|
|
183
|
+
</el-row>
|
|
184
|
+
<!-- <updateEmail ref="email" :email="user.email" />-->
|
|
185
|
+
<updatePass ref="pass" />
|
|
186
|
+
</div>
|
|
187
|
+
</template>
|
|
188
|
+
|
|
189
|
+
<script>
|
|
190
|
+
import myUpload from 'vue-image-crop-upload';
|
|
191
|
+
import { getHospitals } from '@/api/system/hospital';
|
|
192
|
+
import { getAll, getLevel } from '@/api/system/role';
|
|
193
|
+
import { mapGetters } from 'vuex';
|
|
194
|
+
import updatePass from './center/updatePass';
|
|
195
|
+
import updateEmail from './center/updateEmail';
|
|
196
|
+
import { getToken } from '@/utils/auth';
|
|
197
|
+
import store from '@/store';
|
|
198
|
+
import { isvalidPhone } from '@/utils/validate';
|
|
199
|
+
import crud from '@/mixins/crud';
|
|
200
|
+
import { editUser, getCenterUser } from '@/api/system/user';
|
|
201
|
+
import Avatar from '@/assets/images/avatar.png';
|
|
202
|
+
|
|
203
|
+
export default {
|
|
204
|
+
name: 'Center',
|
|
205
|
+
components: { updatePass, updateEmail, myUpload },
|
|
206
|
+
mixins: [crud],
|
|
207
|
+
dicts: ['user_status', 'sex', 'job_title', 'position'],
|
|
208
|
+
data() {
|
|
209
|
+
// 自定义验证
|
|
210
|
+
const validPhone = (rule, value, callback) => {
|
|
211
|
+
if (!value) {
|
|
212
|
+
callback(new Error('请输入电话号码'));
|
|
213
|
+
} else if (!isvalidPhone(value)) {
|
|
214
|
+
callback(new Error('请输入正确的11位手机号码'));
|
|
215
|
+
} else {
|
|
216
|
+
callback();
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
return {
|
|
220
|
+
show: false,
|
|
221
|
+
Avatar: Avatar,
|
|
222
|
+
activeName: 'first',
|
|
223
|
+
saveLoading: false,
|
|
224
|
+
headers: {
|
|
225
|
+
Authorization: getToken(),
|
|
226
|
+
},
|
|
227
|
+
form: {},
|
|
228
|
+
rules: {
|
|
229
|
+
name: [
|
|
230
|
+
{ required: true, message: '请输入姓名', trigger: 'blur' },
|
|
231
|
+
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
|
232
|
+
],
|
|
233
|
+
sex: [{ required: true, message: '请选择性别', trigger: 'blur' }],
|
|
234
|
+
},
|
|
235
|
+
hospitalList: [],
|
|
236
|
+
roles: [],
|
|
237
|
+
roleDatas: [],
|
|
238
|
+
signPath: null,
|
|
239
|
+
};
|
|
240
|
+
},
|
|
241
|
+
computed: {
|
|
242
|
+
...mapGetters(['user', 'updateAvatarApi', 'baseApi', 'fileUploadApi']),
|
|
243
|
+
},
|
|
244
|
+
created() {
|
|
245
|
+
this.getRoles();
|
|
246
|
+
this.getHospitalList();
|
|
247
|
+
this.centerUser();
|
|
248
|
+
},
|
|
249
|
+
methods: {
|
|
250
|
+
centerUser() {
|
|
251
|
+
getCenterUser().then(res => {
|
|
252
|
+
this.form = res;
|
|
253
|
+
let roles = [];
|
|
254
|
+
this.form.roles.forEach((role, index) => {
|
|
255
|
+
roles.push(role.id);
|
|
256
|
+
});
|
|
257
|
+
this.roleDatas = roles;
|
|
258
|
+
this.signPath = this.form.signPath;
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
/**
|
|
262
|
+
* 获取所有医院
|
|
263
|
+
*/
|
|
264
|
+
getHospitalList() {
|
|
265
|
+
getHospitals().then(res => {
|
|
266
|
+
this.hospitalList = res.content;
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
// 获取弹窗内角色数据
|
|
270
|
+
getRoles() {
|
|
271
|
+
getAll({ loginType: this.user.loginType })
|
|
272
|
+
.then(res => {
|
|
273
|
+
this.roles = res;
|
|
274
|
+
})
|
|
275
|
+
.catch(() => {});
|
|
276
|
+
},
|
|
277
|
+
toggleShow() {
|
|
278
|
+
this.show = !this.show;
|
|
279
|
+
},
|
|
280
|
+
handleClick(tab, event) {
|
|
281
|
+
if (tab.name === 'second') {
|
|
282
|
+
this.init();
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
beforeInit() {
|
|
286
|
+
this.url = 'api/logs/user';
|
|
287
|
+
return true;
|
|
288
|
+
},
|
|
289
|
+
cropUploadSuccess(jsonData, field) {
|
|
290
|
+
store.dispatch('GetInfo').then(() => {});
|
|
291
|
+
},
|
|
292
|
+
doSubmit() {
|
|
293
|
+
if (this.$refs['form']) {
|
|
294
|
+
this.$refs['form'].validate(valid => {
|
|
295
|
+
if (valid) {
|
|
296
|
+
this.saveLoading = true;
|
|
297
|
+
editUser(this.form)
|
|
298
|
+
.then(() => {
|
|
299
|
+
this.editSuccessNotify();
|
|
300
|
+
store.dispatch('GetInfo').then(() => {});
|
|
301
|
+
this.saveLoading = false;
|
|
302
|
+
})
|
|
303
|
+
.catch(() => {
|
|
304
|
+
this.saveLoading = false;
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
handleAvatarSuccess(source) {
|
|
311
|
+
this.signPath = source.datas;
|
|
312
|
+
this.form.signPath = source.datas;
|
|
313
|
+
},
|
|
314
|
+
beforeAvatarUpload(file) {
|
|
315
|
+
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
316
|
+
if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
|
|
317
|
+
this.$message.error('上传头像图片只能是 JPG、PNG格式!');
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
if (!isLt2M) {
|
|
321
|
+
this.$message.error('上传头像图片大小不能超过 2MB!');
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
return file.type && isLt2M;
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
};
|
|
328
|
+
</script>
|
|
329
|
+
|
|
330
|
+
<style rel="stylesheet/scss" lang="scss">
|
|
331
|
+
.avatar {
|
|
332
|
+
width: 120px;
|
|
333
|
+
height: 120px;
|
|
334
|
+
border-radius: 50%;
|
|
335
|
+
}
|
|
336
|
+
.user-info {
|
|
337
|
+
padding-left: 0;
|
|
338
|
+
list-style: none;
|
|
339
|
+
li {
|
|
340
|
+
border-bottom: 1px solid #f0f3f4;
|
|
341
|
+
padding: 11px 0;
|
|
342
|
+
font-size: 13px;
|
|
343
|
+
}
|
|
344
|
+
.user-right {
|
|
345
|
+
float: right;
|
|
346
|
+
a {
|
|
347
|
+
color: #317ef3;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
</style>
|