1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<template>
<div class="layout">
<div class="global_nav">
<div class="toolbar_nav container">
<div class="item_nav">
<a-icon type="star" /><span>收藏</span>
</div>
</div>
<div class="header_s">
</div>
<div class="meau_nav ">
<div class="nav_box container">
<ul>
<li class="active">主页</li>
<li>通知公告</li>
<li>下载</li>
</ul>
</div>
</div>
<div class="content container">
<div class="head_lines">
<div style="background: #f5f5f5;">
<span href="" style="display:block;position: relative;height:40px">
<img style=" position:absolute;top:11px;left:14px;" src="../../../static/images/tz.png">
<a style="position:absolute;top: 9px;left:40px" href="/News/View/17e2b271-c362-4203-afc7-b00fc36c1b65" title="更新时间:2023-04-24" target="_blank">省卫生健康委关于做好住院医师 规范化培训招录工作的通知</a>
</span>
</div>
</div>
<div class="notice_nav">
<div style="display:flex;">
<div style="width:600px;height:280px;padding: 0px 4px 0px 4px;">
<div class="card_box notice_box">
<div class="card_title">
</div>
</div>
</div>
<div style="width:300px;padding: 0px 4px;">
<div class="card_box login_box">
<div class="card_title">
</div>
<div class="login_ct">
<a-form-model :model="formData" ref="formData" :rules="rules" class="login_fm">
<a-row>
<a-col :span="24">
<a-form-model-item ref="username" prop="username">
<a-icon type="user" />
<a-input placeholder="用户名" AUTOCOMPLETE="off" v-model="formData.username" :readOnly="readOnly" @click="() => {this.readOnly=false }" @check="() => {this.readOnly=false }" @blur="() => {$refs.username.onFieldBlur();this.readOnly=false }" style="width:200px;">
</a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-model-item ref="password" prop="password">
<a-icon type="lock" />
<a-input-password placeholder="密码" v-model="formData.password" size="large" @keyup.enter="login" style="width:200px;">
</a-input-password>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-model-item prop="code">
<a-icon type="exclamation-circle" />
<a-input placeholder="验证码" v-model="formData.code" size="large" @keyup.enter="login" style="width:106px" />
<img style="cursor:pointer;" :src="codeUrl" @click="getCode">
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24" style="line-height: 44px;margin-top:4px">
<a-button @click="login" type="primary" class="btn" block size="large" :loading="loading" @keyup.enter="login">登录</a-button>
</a-col>
</a-row>
</a-form-model>
</div>
<div class="login-foot">
<a href="#" @click="clickRegister" style="margin-right: 32px;">注册</a>
<a href="#" @click="clickReset">忘记密码?</a>
</div>
</div>
</div>
</div>
</div>
<div class="download_nav">
<div style="display:flex;">
<div style="width:450px;height:280px;padding: 0px 4px 0px 0px;">
<div class="card_box download_box">
<div class="card_title">
</div>
</div>
</div>
<div style="width:450px;padding: 0px 0px 0px 4px;">
<div class="card_box q_box">
<div class="card_title">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="global_foot">
</div>
</div>
</div>
</template>
<script>
export default {
name: "web",
components: {
},
data () {
return {
formData: { username: "", password: "", code: "", uuid: "" },
rules: {
username: { required: true, message: '*', trigger: 'blur' },
password: { required: true, message: '*', trigger: 'blur' },
code: { required: true, message: '*', trigger: 'blur' },
},
codeUrl: "",
readOnly: true,
loading: false
}
},
props: {
},
created () {
this.getCode()
},
methods: {
login () {
this.$refs.formData.validate(valid => {
if (valid) {
this.loading = true;
this.$api.base.login(isEmptyParams(this.formData)).then(({ data = {} }) => {
if (data) {
this.$message.success('登录成功!');
setToken(data.access_token)
this.$router.push({ path: '/home' })
}
else {
this.getCode()
}
this.loading = false;
}).catch((er) => {
this.getCode()
this.loading = false;
})
} else {
return false
}
})
},
getCode () {
this.$api.base.getCode().then(({ data = {} }) => {
if (data) {
this.formData.uuid = data.uuid
this.codeUrl = data.img
}
}).catch(() => { })
},
clickRegister () {
this.$router.push('/register')
},
clickReset () {
this.$router.push('/reset')
},
},
}
</script>
<style lang="less" scoped>
.layout {
width: 100%;
height: 100vh;
overflow: auto;
background-image: url(../../../static/images/htmlbg.jpg);
font-size: 14px;
}
.container {
width: 900px;
margin: 0 auto;
}
.global_nav {
position: relative;
height: 30px;
background-color: #fbfbfb;
border-bottom: 1px solid #e8e8e8;
.toolbar_nav {
position: relative;
height: 30px;
.item_nav {
position: absolute;
top: 5px;
right: 15px;
cursor: pointer;
.anticon {
font-size: 14px;
margin-right: 2px;
color: rgb(155, 148, 57);
}
span {
font-size: 14px;
}
}
}
}
.header_s {
height: 80px;
background: #fff;
}
::v-deep .meau_nav {
height: 40px;
background: #56abe4;
.nav_box {
height: 40px;
}
.nav_box ul {
margin: 0;
padding: 0;
}
.nav_box ul li {
width: 14.2%;
display: inline-block;
line-height: 40px;
color: #fff;
text-align: center;
}
.nav_box ul li:hover {
background: #75cbff9c;
color: #fff;
cursor: pointer;
}
.active {
background: #75cbff9c;
color: #fff;
}
}
.content {
background: #fff;
padding: 6px 2px;
margin-top: 6px;
.head_lines {
padding: 0 4px;
min-height: 40px;
width: 100%;
color: #000;
}
.notice_nav {
width: 100%;
margin: 6px 0px;
.notice_box {
border: 1px solid #e6ebf5;
}
.login_box {
border: 1px solid #e6ebf5;
/deep/.login_ct {
padding: 16px 0px 0px 0px;
.login_fm {
.ant-row-flex,
.ant-row {
.ant-col {
padding: 0px 5px;
height: 45px;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
.ant-row .ant-col {
border: 0;
}
.ant-form-item {
padding: 0;
border: 0;
margin-bottom: 0px !important;
}
}
}
.ant-form-explain {
margin-left: 6px;
display: inline-block;
}
.ant-input {
height: 32px !important;
font-size: 14px !important;
}
.ant-input-lg {
height: 32px !important;
font-size: 14px !important;
}
.anticon {
margin-right: 6px;
}
img {
margin-left: 4px;
width: 90px;
height: 32px;
}
.ant-btn-primary {
background-color: #56abe4;
border-color: #56abe4;
}
}
}
.login-foot {
padding: 0 20px;
text-align: right;
}
}
}
.download_nav {
margin: 0 4px;
.download_box {
border: 1px solid #e6ebf5;
}
.q_box {
border: 1px solid #e6ebf5;
}
}
}
.global_foot {
background: #fff;
padding: 6px 2px;
margin-top: 10px;
height: calc(100vh - 790px);
min-height: 100px;
background: #dbdbdb;
border-top: 1px solid #b4b2b7;
}
.card_box {
border-radius: 8px;
width: 100%;
height: 100%;
}
.card_title {
border-radius: 8px 8px 0 0;
// background: #e9f8ff;
background: linear-gradient(180deg, #eff2ff 0%, #dfe6ff 100%);
width: 100%;
height: 40px;
}
</style>