Commit efa0acbb authored by 罗成兵's avatar 罗成兵

分配记录

parent 1c20918c
...@@ -8,9 +8,14 @@ ...@@ -8,9 +8,14 @@
</div> </div>
<a-form-model :model="formData" :rules="formRules" class="login_form" ref="formRef"> <a-form-model :model="formData" :rules="formRules" class="login_form" ref="formRef">
<a-form-model-item prop="username"> <a-form-model-item prop="username">
<a-input placeholder="请输入用户名" v-model="formData.username" size="large" @keyup.enter="login"> <!-- <a-input placeholder="请输入用户名" v-model="formData.username" size="large" @keyup.enter="login">-->
<a-icon slot="prefix" type="user"/> <!-- <a-icon slot="prefix" type="user"/>-->
</a-input> <!-- </a-input>-->
<a-select v-model="formData.username" size="large" @change="userChange">
<a-select-option v-for="(i,index) in userList" :key="i.userName" :value="index">
{{i.unitName+"("+i.userName+")"}}
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item prop="password"> <a-form-model-item prop="password">
<a-input-password placeholder="请输入密码" v-model="formData.password" size="large" <a-input-password placeholder="请输入密码" v-model="formData.password" size="large"
...@@ -55,7 +60,8 @@ ...@@ -55,7 +60,8 @@
components: {Verify}, components: {Verify},
data() { data() {
return { return {
formData: {username: "530000yyb", password: "ynby2020"}, userList: [],
formData: {},
formRules: {}, formRules: {},
captchaVerificationVis: true, captchaVerificationVis: true,
captchaVerification: {}, captchaVerification: {},
...@@ -63,13 +69,26 @@ ...@@ -63,13 +69,26 @@
} }
}, },
created() { created() {
let unitNames = ["云南省妇幼保健院", "昆明市妇幼保健院", "五华区妇幼保健院", "五华区普吉大普吉社区卫生服务中心",
"五华区普吉新村社区卫生服务站", "五华区普吉林家院社区卫生服务站", "五华区大观社区卫生服务中心", "五华区护国南通街社区卫生服务站",
"五华区大观新闻里社区卫生服务中心"];
let userNames = ["3163915418", "3458022605", "4040050358", "0892676849", "7381485204", "4681975615",
"0580382354", "2409311755", "7531945226"];
let passwords = ["079231", "078730", "073657", "07473X", "072179", "074991", "076479", "079813", "076831"];
unitNames.forEach((x, index) => {
this.userList.push({unitName: x, userName: userNames[index], password: passwords[index]});
})
}, },
methods: { methods: {
userChange(value) {
this.formData.username=this.userList[value].userName;
this.formData.password=this.userList[value].password;
},
login() { login() {
this.loading = true; this.loading = true;
let fromData = new FormData(); let fromData = new FormData();
fromData.append("username", aesEncrypt(this.formData.username)); fromData.append("username", aesEncrypt("9028584165"));
fromData.append("password", aesEncrypt(this.formData.password)); fromData.append("password", aesEncrypt("074332"));
fromData.append( fromData.append(
"captchaVerification", "captchaVerification",
this.captchaVerification.captchaVerification this.captchaVerification.captchaVerification
...@@ -80,7 +99,7 @@ ...@@ -80,7 +99,7 @@
sessionStorage.setItem('token', 'bearer' + ' ' + res.data.data.token); sessionStorage.setItem('token', 'bearer' + ' ' + res.data.data.token);
this.$router.push('/') this.$router.push('/')
this.$message.success(res.data.msg) this.$message.success(res.data.msg)
}else { } else {
this.$message.error(res.data.msg) this.$message.error(res.data.msg)
} }
this.loading = false; this.loading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment