浏览代码

登录二维码

李帅 2 月之前
父节点
当前提交
b01fb3dbe1

二进制
src/assets/images/口腔医院.png


二进制
src/assets/images/背景牙.png


二进制
src/assets/images/视慧口腔.png


+ 2 - 3
src/utils/request.js

@@ -23,7 +23,7 @@ const service = axios.create({
23 23
   // axios中请求配置有baseURL选项,表示请求URL公共部分
24 24
   // baseURL: "http://192.168.3.142:8080/api",
25 25
   // baseURL: "http://192.168.3.90:8080/api",
26
-  // baseURL: "http://172.16.100.153:8080/api",
26
+  // baseURL: "http://172.16.100.153:8081/api",
27 27
   // baseURL: "http://j41711d831.wicp.vip/api",
28 28
   // 超时
29 29
   timeout: 10000
@@ -31,8 +31,7 @@ const service = axios.create({
31 31
 
32 32
 // request拦截器
33 33
 service.interceptors.request.use(config => {
34
-
35
-  if(config.url.startsWith("/chat/getMsg")){
34
+  if(config.url.startsWith("/chat/getMsg") || config.url.startsWith("/diagnosis-manage/page")){
36 35
   }else {
37 36
     // 在发送请求之前显示loading
38 37
     downloadLoadingInstance = Loading.service({ fullscreen: true });

+ 107 - 55
src/views/login.vue

@@ -1,6 +1,11 @@
1 1
 <template>
2 2
   <div class="login">
3
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
3
+    <el-form
4
+      ref="loginForm"
5
+      :model="loginForm"
6
+      :rules="loginRules"
7
+      class="login-form"
8
+    >
4 9
       <h3 class="title">智汇口腔医院管理系统</h3>
5 10
       <el-form-item prop="username">
6 11
         <el-input
@@ -9,7 +14,11 @@
9 14
           auto-complete="off"
10 15
           placeholder="账号"
11 16
         >
12
-          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
17
+          <svg-icon
18
+            slot="prefix"
19
+            icon-class="user"
20
+            class="el-input__icon input-icon"
21
+          />
13 22
         </el-input>
14 23
       </el-form-item>
15 24
       <el-form-item prop="password">
@@ -20,7 +29,11 @@
20 29
           placeholder="密码"
21 30
           @keyup.enter.native="handleLogin"
22 31
         >
23
-          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
32
+          <svg-icon
33
+            slot="prefix"
34
+            icon-class="password"
35
+            class="el-input__icon input-icon"
36
+          />
24 37
         </el-input>
25 38
       </el-form-item>
26 39
       <el-form-item prop="code" v-if="captchaEnabled">
@@ -31,63 +44,93 @@
31 44
           style="width: 63%"
32 45
           @keyup.enter.native="handleLogin"
33 46
         >
34
-          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
47
+          <svg-icon
48
+            slot="prefix"
49
+            icon-class="validCode"
50
+            class="el-input__icon input-icon"
51
+          />
35 52
         </el-input>
36 53
         <div class="login-code">
37
-          <img :src="codeUrl" @click="getCode" class="login-code-img"/>
54
+          <img :src="codeUrl" @click="getCode" class="login-code-img" />
38 55
         </div>
39 56
       </el-form-item>
40 57
       <!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> -->
41
-      <el-form-item style="width:100%;">
58
+      <el-form-item style="width: 100%">
42 59
         <el-button
43 60
           :loading="loading"
44 61
           size="medium"
45 62
           type="primary"
46
-          style="width:100%;"
63
+          style="width: 100%"
47 64
           @click.native.prevent="handleLogin"
48 65
         >
49 66
           <span v-if="!loading">登 录</span>
50 67
           <span v-else>登 录 中...</span>
51 68
         </el-button>
52
-        <div style="float: right;" v-if="register">
53
-          <router-link class="link-type" :to="'/register'">立即注册</router-link>
69
+        <div style="float: right" v-if="register">
70
+          <router-link class="link-type" :to="'/register'"
71
+            >立即注册</router-link
72
+          >
54 73
         </div>
55 74
       </el-form-item>
75
+      <div style="text-align: right">
76
+        <el-popover placement="bottom" width="270px" trigger="click">
77
+          <div style="display: flex;">
78
+            <div style="display: flex;flex-direction: column;align-items: center;">
79
+              <img src="@/assets/images/视慧口腔.png" style="width: 100px;height: 100px;">
80
+              <p>视慧口腔</p>
81
+            </div>
82
+            <div style="display: flex;flex-direction: column;align-items: center;margin-left: 20px;">
83
+              <img src="@/assets/images/口腔医院.png" style="width: 100px;height: 100px;">
84
+              <p>口腔医院</p>
85
+            </div>
86
+          </div>
87
+          <span style="color: #897d7d; cursor: pointer" slot="reference"
88
+            >App下载</span
89
+          >
90
+        </el-popover>
91
+      </div>
56 92
     </el-form>
57 93
     <!--  底部  -->
58 94
     <div class="el-login-footer">
59
-      <span style="font-size: 15px;font-weight: 700;">
60
-        使用推荐:谷歌浏览器 <a href="https://www.google.cn/chrome/"  style="color: #f00;" target="_blank">(点此下载)</a> 推荐屏幕分辨率1920 * 1080
95
+      <span style="font-size: 15px; font-weight: 700">
96
+        使用推荐:谷歌浏览器
97
+        <a
98
+          href="https://www.google.cn/chrome/"
99
+          style="color: #f00"
100
+          target="_blank"
101
+          >(点此下载)</a
102
+        >
103
+        推荐屏幕分辨率1920 * 1080
61 104
       </span>
62 105
     </div>
63 106
   </div>
64 107
 </template>
65 108
 
66 109
 <script>
67
-import { getCodeImg } from "@/api/login";
68
-import Cookies from "js-cookie";
110
+import { getCodeImg } from '@/api/login'
111
+import Cookies from 'js-cookie'
69 112
 import { encrypt, decrypt } from '@/utils/jsencrypt'
70 113
 
71 114
 export default {
72
-  name: "Login",
115
+  name: 'Login',
73 116
   data() {
74 117
     return {
75
-      codeUrl: "",
118
+      codeUrl: '',
76 119
       loginForm: {
77
-        username: "",
78
-        password: "",
120
+        username: '',
121
+        password: '',
79 122
         rememberMe: false,
80
-        code: "",
81
-        uuid: ""
123
+        code: '',
124
+        uuid: ''
82 125
       },
83 126
       loginRules: {
84 127
         username: [
85
-          { required: true, trigger: "blur", message: "请输入您的账号" }
128
+          { required: true, trigger: 'blur', message: '请输入您的账号' }
86 129
         ],
87 130
         password: [
88
-          { required: true, trigger: "blur", message: "请输入您的密码" }
131
+          { required: true, trigger: 'blur', message: '请输入您的密码' }
89 132
         ],
90
-        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
133
+        code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
91 134
       },
92 135
       loading: false,
93 136
       // 验证码开关
@@ -95,66 +138,75 @@ export default {
95 138
       // 注册开关
96 139
       register: false,
97 140
       redirect: undefined
98
-    };
141
+    }
99 142
   },
100 143
   watch: {
101 144
     $route: {
102
-      handler: function(route) {
103
-        this.redirect = route.query && route.query.redirect;
145
+      handler: function (route) {
146
+        this.redirect = route.query && route.query.redirect
104 147
       },
105 148
       immediate: true
106 149
     }
107 150
   },
108 151
   created() {
109
-    this.getCode();
110
-    this.getCookie();
152
+    this.getCode()
153
+    this.getCookie()
111 154
   },
112 155
   methods: {
113 156
     getCode() {
114
-      getCodeImg().then(res => {
115
-        this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
157
+      getCodeImg().then((res) => {
158
+        this.captchaEnabled =
159
+          res.captchaEnabled === undefined ? true : res.captchaEnabled
116 160
         if (this.captchaEnabled) {
117
-          this.codeUrl = "data:image/gif;base64," + res.img;
118
-          this.loginForm.uuid = res.uuid;
161
+          this.codeUrl = 'data:image/gif;base64,' + res.img
162
+          this.loginForm.uuid = res.uuid
119 163
         }
120
-      });
164
+      })
121 165
     },
122 166
     getCookie() {
123
-      const username = Cookies.get("username");
124
-      const password = Cookies.get("password");
167
+      const username = Cookies.get('username')
168
+      const password = Cookies.get('password')
125 169
       const rememberMe = Cookies.get('rememberMe')
126 170
       this.loginForm = {
127 171
         username: username === undefined ? this.loginForm.username : username,
128
-        password: password === undefined ? this.loginForm.password : decrypt(password),
172
+        password:
173
+          password === undefined ? this.loginForm.password : decrypt(password),
129 174
         rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
130
-      };
175
+      }
131 176
     },
132 177
     handleLogin() {
133
-      this.$refs.loginForm.validate(valid => {
178
+      this.$refs.loginForm.validate((valid) => {
134 179
         if (valid) {
135
-          this.loading = true;
180
+          this.loading = true
136 181
           if (this.loginForm.rememberMe) {
137
-            Cookies.set("username", this.loginForm.username, { expires: 30 });
138
-            Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
139
-            Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
182
+            Cookies.set('username', this.loginForm.username, { expires: 30 })
183
+            Cookies.set('password', encrypt(this.loginForm.password), {
184
+              expires: 30
185
+            })
186
+            Cookies.set('rememberMe', this.loginForm.rememberMe, {
187
+              expires: 30
188
+            })
140 189
           } else {
141
-            Cookies.remove("username");
142
-            Cookies.remove("password");
143
-            Cookies.remove('rememberMe');
190
+            Cookies.remove('username')
191
+            Cookies.remove('password')
192
+            Cookies.remove('rememberMe')
144 193
           }
145
-          this.$store.dispatch("Login", this.loginForm).then(() => {
146
-            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
147
-          }).catch(() => {
148
-            this.loading = false;
149
-            if (this.captchaEnabled) {
150
-              this.getCode();
151
-            }
152
-          });
194
+          this.$store
195
+            .dispatch('Login', this.loginForm)
196
+            .then(() => {
197
+              this.$router.push({ path: this.redirect || '/' }).catch(() => {})
198
+            })
199
+            .catch(() => {
200
+              this.loading = false
201
+              if (this.captchaEnabled) {
202
+                this.getCode()
203
+              }
204
+            })
153 205
         }
154
-      });
206
+      })
155 207
     }
156 208
   }
157
-};
209
+}
158 210
 </script>
159 211
 
160 212
 <style rel="stylesheet/scss" lang="scss">
@@ -163,7 +215,7 @@ export default {
163 215
   justify-content: center;
164 216
   align-items: center;
165 217
   height: 100%;
166
-  background-image: url("https://p0.itc.cn/q_70/images01/20230524/6b270ac81ed14eba8b32184ef268358f.jpeg");
218
+  background-image: url('https://p0.itc.cn/q_70/images01/20230524/6b270ac81ed14eba8b32184ef268358f.jpeg');
167 219
   background-size: cover;
168 220
 }
169 221
 

+ 21 - 2
src/views/settingsPage/clinicOverview/index.vue

@@ -62,11 +62,15 @@
62 62
         </el-col>
63 63
         <el-col :span="8">
64 64
           <el-image
65
+            v-if="tableData.logoPic"
65 66
             style="width: 100px; height: 100px"
66 67
             :src="baseUrl + tableData.logoPic"
67 68
             :preview-src-list="(baseUrl + tableData.logoPic).split()"
68 69
           >
69 70
           </el-image>
71
+          <div v-else style="width: 100px;color: #c0c4cc; background-color: #f5f7fa;height: 100px;display: flex;justify-content: center;align-items: center;">
72
+            暂无图片
73
+          </div>
70 74
         </el-col>
71 75
       </el-row>
72 76
 
@@ -128,6 +132,7 @@
128 132
         <el-col :span="12" style="display: flex">
129 133
           <div class="right_Pic">
130 134
             <el-image
135
+              v-if="tableData.medicalInstitutionOccupationalLicense"
131 136
               class="img_pic"
132 137
               :src="baseUrl + tableData.medicalInstitutionOccupationalLicense"
133 138
               :preview-src-list="
@@ -137,10 +142,14 @@
137 142
               "
138 143
             >
139 144
             </el-image>
145
+            <div v-else class="img_pic" style="width: 250px;color: #c0c4cc; background-color: #f5f7fa;height: 150px;display: flex;justify-content: center;align-items: center;">
146
+              暂无图片
147
+            </div>
140 148
             <p>医疗机构职业许可证</p>
141 149
           </div>
142 150
           <div class="right_Pic" style="margin-left: 20px">
143 151
             <el-image
152
+            v-if="tableData.scannedCopyBusinessLicense"
144 153
               class="img_pic"
145 154
               :src="baseUrl + tableData.scannedCopyBusinessLicense"
146 155
               :preview-src-list="
@@ -148,6 +157,9 @@
148 157
               "
149 158
             >
150 159
             </el-image>
160
+            <div v-else class="img_pic" style="width: 250px;color: #c0c4cc; background-color: #f5f7fa;height: 150px;display: flex;justify-content: center;align-items: center;">
161
+              暂无图片
162
+            </div>
151 163
             <p>营业执照扫描件</p>
152 164
           </div>
153 165
         </el-col>
@@ -164,7 +176,6 @@
164 176
             </li>
165 177
             <li class="li_box_special">
166 178
               <span class="width_fixed"> banner图: </span>
167
-              <span>
168 179
                 <el-image
169 180
                   v-if="tableData.bannerPic1"
170 181
                   class="img_box"
@@ -172,6 +183,9 @@
172 183
                   :preview-src-list="(baseUrl + tableData.bannerPic1).split()"
173 184
                 >
174 185
                 </el-image>
186
+                <div v-else class="img_box" style="width: 300px;color: #c0c4cc; background-color: #f5f7fa;height: 150px;display: flex;justify-content: center;align-items: center;">
187
+                  暂无图片
188
+                </div>
175 189
 
176 190
                 <el-image
177 191
                   v-if="tableData.bannerPic2"
@@ -180,6 +194,9 @@
180 194
                   :preview-src-list="(baseUrl + tableData.bannerPic2).split()"
181 195
                 >
182 196
                 </el-image>
197
+                <div v-else class="img_box" style="width: 300px;color: #c0c4cc; background-color: #f5f7fa;height: 150px;display: flex;justify-content: center;align-items: center;">
198
+                  暂无图片
199
+                </div>
183 200
 
184 201
                 <el-image
185 202
                   v-if="tableData.bannerPic3"
@@ -188,7 +205,9 @@
188 205
                   :preview-src-list="(baseUrl + tableData.bannerPic3).split()"
189 206
                 >
190 207
                 </el-image>
191
-              </span>
208
+                <div v-else style="width: 300px;margin-left: 20px;color: #c0c4cc; background-color: #f5f7fa;height: 150px;display: flex;justify-content: center;align-items: center;">
209
+                  暂无图片
210
+                </div>
192 211
             </li>
193 212
           </ul>
194 213
         </el-col>

+ 54 - 4
src/views/system/medicalRecord/addTemplateDialog.vue

@@ -33,6 +33,9 @@
33 33
               v-model="ruleForm.diagnosisManageId"
34 34
               filterable
35 35
               style="width: 350px"
36
+              remote 
37
+              :remote-method="handleRemota"
38
+              v-lazy-load-dropdown="handleScrollDropdown"
36 39
             >
37 40
               <el-option
38 41
                 :label="item.diagnosisName"
@@ -40,6 +43,15 @@
40 43
                 v-for="item in diagnosisNameOptions"
41 44
                 :key="item.id"
42 45
               ></el-option>
46
+              <!-- <pagination
47
+                v-show="total > 0"
48
+                :total="total"
49
+                :page.sync="pageNum"
50
+                :limit.sync="pageSize"
51
+                @pagination="initOptions"
52
+                layout="prev, pager, next"
53
+                :small="true"
54
+              /> -->
43 55
             </el-select>
44 56
           </el-form-item>
45 57
           <el-form-item label="模板描述:" prop="templateDesc">
@@ -188,7 +200,8 @@
188 200
 import {
189 201
   diagnosisManageOptions,
190 202
   diagnosisTypetemplateAdd,
191
-  diagnosisTypetemplateUpdate
203
+  diagnosisTypetemplateUpdate,
204
+  diagnosisManageList
192 205
 } from '@/api/allApi.js'
193 206
 import { deptTreeSelect } from '@/api/system/user'
194 207
 
@@ -215,6 +228,19 @@ export default {
215 228
       default: {}
216 229
     }
217 230
   },
231
+  directives: {
232
+        'lazy-load-dropdown': {
233
+            bind(el, binding) {
234
+                const SELECT_DOM = el.querySelector('.el-select-dropdown .el-scrollbar__wrap')
235
+                // SELECT_DOM 获取到的dmo节点 下面需要用到dmo节点的clientHeight
236
+                SELECT_DOM.addEventListener('scroll', () => {
237
+                    if (SELECT_DOM.scrollTop + SELECT_DOM.clientHeight >= SELECT_DOM.scrollHeight) {
238
+                        binding.value()
239
+                    }
240
+                })
241
+            }
242
+        }
243
+    },
218 244
   data() {
219 245
     return {
220 246
       addTemplateDialogVisible: false,
@@ -268,7 +294,11 @@ export default {
268 294
           { required: true, message: '请输入处置', trigger: 'blur' }
269 295
         ]
270 296
       },
271
-      diagnosisNameOptions: []
297
+      diagnosisParam: "",
298
+      pageNum: 1,
299
+      pageSize: 10,
300
+      diagnosisNameOptions: [],
301
+      total: 0
272 302
     }
273 303
   },
274 304
   watch: {
@@ -287,10 +317,30 @@ export default {
287 317
   },
288 318
 
289 319
   methods: {
320
+    // 给自定义指令用的方法
321
+    handleScrollDropdown() {
322
+      this.pageSize += 10
323
+      // 这一步是做了一个容错判断 在pageNum>total 时 return出去
324
+      if (this.pageNum > this.pageSize) return
325
+      // 获取列表接口
326
+      this.initOptions()
327
+    },
328
+   // 远程搜索
329
+   handleRemota(val) {
330
+      if (val !== '') {
331
+          this.diagnosisParam = val
332
+          this.initOptions()
333
+      }
334
+  },
290 335
     async initOptions() {
291
-      const res = await diagnosisManageOptions()
336
+      const res = await diagnosisManageList({
337
+        pageSize: this.pageSize,
338
+        pageNum:  this.pageNum,
339
+        diagnosisParam: this.diagnosisParam
340
+      })
292 341
       if (res.code !== 200) return this.$message.error(res.msg)
293
-      this.diagnosisNameOptions = res.data
342
+      this.diagnosisNameOptions = res.rows
343
+      this.total = res.total
294 344
     },
295 345
     /** 查询科室下拉树结构 */
296 346
     getDeptTree() {

+ 1 - 1
src/views/system/medicalRecord/index.vue

@@ -199,7 +199,7 @@
199 199
           :total="total"
200 200
           :page.sync="pageNum"
201 201
           :limit.sync="pageSize"
202
-          @pagination="diagnosisTypetemplatePage"
202
+          @pagination="initList"
203 203
         />
204 204
       </el-col>
205 205
     </el-row>