|
|
|
|
@ -14,27 +14,31 @@
|
|
|
|
|
inactive-action-icon="Sunny" @change="toggleDark" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-form style="width: 400px;" ref="ruleFormRef" status-icon class="demo-ruleForm">
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<span style="font-size: 22px;">登录您的账户</span>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-input v-model.number="username" ref="usernameRef" @keyup.enter="focusNextTo()" :prefix-icon="User" placeholder="用户名" size="large" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-input v-model="pwd" type="password" ref="passwordRef" @keyup.enter="login()" autocomplete="off" placeholder="密码" size="large"
|
|
|
|
|
:prefix-icon="Lock" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button style="width: 100%;" type="primary" @click="login(ruleFormRef)"
|
|
|
|
|
size="large">登录</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<div style="height: 160px;"></div>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div style="margin-top: -100px;">
|
|
|
|
|
<div style="font-size: 36px; margin-left: -100px;margin-bottom: 50px;">深圳市南山区妇幼保健院医技检查预约系统</div>
|
|
|
|
|
<el-form style="width: 400px;" ref="ruleFormRef" status-icon class="demo-ruleForm">
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<span style="font-size: 22px;">登录您的账户</span>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-input v-model.number="username" ref="usernameRef" @keyup.enter="focusNextTo()"
|
|
|
|
|
:prefix-icon="User" placeholder="用户名" size="large" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-input v-model="pwd" type="password" ref="passwordRef" @keyup.enter="login()"
|
|
|
|
|
autocomplete="off" placeholder="密码" size="large" :prefix-icon="Lock" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button style="width: 100%;" type="primary" @click="login(ruleFormRef)"
|
|
|
|
|
size="large">登录</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<div style="height: 160px;"></div>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="right_bottom"></div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<div style="width: 100% ;text-align: center;height: 20px;">深圳市南山区妇幼保健院 版权所有</div>
|
|
|
|
|
<div style="width: 100% ;text-align: center;height: 20px;">深圳市南山区妇幼保健院 版权所有</div>
|
|
|
|
|
</el-container>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
@ -48,12 +52,16 @@
|
|
|
|
|
ElMessage
|
|
|
|
|
} from 'element-plus'
|
|
|
|
|
import {
|
|
|
|
|
ref,nextTick,onMounted
|
|
|
|
|
ref,
|
|
|
|
|
nextTick,
|
|
|
|
|
onMounted
|
|
|
|
|
} from 'vue'
|
|
|
|
|
import {
|
|
|
|
|
Lock,
|
|
|
|
|
User,
|
|
|
|
|
Iphone,RefreshRight,Key
|
|
|
|
|
Iphone,
|
|
|
|
|
RefreshRight,
|
|
|
|
|
Key
|
|
|
|
|
} from '@element-plus/icons-vue'
|
|
|
|
|
import {
|
|
|
|
|
useToggle
|
|
|
|
|
@ -65,7 +73,7 @@
|
|
|
|
|
|
|
|
|
|
const isDark = useDark()
|
|
|
|
|
const toggleDark = () => useToggle(isDark)
|
|
|
|
|
let loading=ref(false);
|
|
|
|
|
let loading = ref(false);
|
|
|
|
|
let username = ref('')
|
|
|
|
|
let pwd = ref('')
|
|
|
|
|
|
|
|
|
|
@ -75,10 +83,10 @@
|
|
|
|
|
username: username.value,
|
|
|
|
|
password: pwd.value,
|
|
|
|
|
}
|
|
|
|
|
loading.value=true
|
|
|
|
|
loading.value = true
|
|
|
|
|
//调用登录接口
|
|
|
|
|
Login(data).then(res => {
|
|
|
|
|
loading.value=false
|
|
|
|
|
loading.value = false
|
|
|
|
|
if (res.data.status == 'ok') {
|
|
|
|
|
sessionStorage.setItem('token', res.data.token);
|
|
|
|
|
sessionStorage.setItem('refreshToken', res.data.refresh_token);
|
|
|
|
|
@ -95,17 +103,16 @@
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let usernameRef=ref(null);
|
|
|
|
|
let passwordRef=ref(null);
|
|
|
|
|
const focusNextTo=()=>{
|
|
|
|
|
let usernameRef = ref(null);
|
|
|
|
|
let passwordRef = ref(null);
|
|
|
|
|
const focusNextTo = () => {
|
|
|
|
|
passwordRef.value.focus()
|
|
|
|
|
}
|
|
|
|
|
onMounted(()=>{
|
|
|
|
|
nextTick(()=>{
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
usernameRef.value.focus()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
@ -113,8 +120,8 @@
|
|
|
|
|
/* border: 10px solid red; */
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(100vh - 30px);
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.common-layout .el-main {
|
|
|
|
|
@ -153,5 +160,4 @@ flex-direction: column;
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
padding-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|