pengjun 2 years ago
parent
commit
a33ae4cbb6
  1. 113
      src/views/Home.vue
  2. 84
      src/views/login/Login.vue

113
src/views/Home.vue

@ -1,16 +1,9 @@
<template> <template>
<div style="background: #F4F8FF"> <div style="background: #F4F8FF">
<el-container> <el-container>
<el-header
style="height:50px; line-height: 40px"
class="principalheader"
>
<el-header style="height:50px; line-height: 40px" class="principalheader">
<div class="navs"> <div class="navs">
<img
src="@/assets/images/logo2.png"
alt=""
style="width: 24px; height: 24px"
/>
<img src="@/assets/images/logo2.png" alt="" style="width: 24px; height: 24px" />
<div class="maintitle">神豚体检管理系统</div> <div class="maintitle">神豚体检管理系统</div>
<!--动态生成菜单 add by pengj 'text-align: center;width:' + (window.pageWidth - 280) + 'px;display:flex;'--> <!--动态生成菜单 add by pengj 'text-align: center;width:' + (window.pageWidth - 280) + 'px;display:flex;'-->
@ -30,11 +23,7 @@
</div> </div>
<!-- --> <!-- -->
<div class="btn"> <div class="btn">
<img
src="@/assets/images/me.png"
alt=""
class="currentuser"
/>
<img src="@/assets/images/me.png" alt="" class="currentuser" />
<!-- <i class="el-icon-arrow-down el-icon--right"></i> --> <!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
<el-dropdown> <el-dropdown>
<span class="el-dropdown-link" style="color:#222531;font-weight: 700;"> <span class="el-dropdown-link" style="color:#222531;font-weight: 700;">
@ -47,54 +36,28 @@
{{ user }} <i class="el-icon-arrow-down el-icon--right"></i> {{ user }} <i class="el-icon-arrow-down el-icon--right"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="logout"
>退出登录</el-dropdown-item
>
<el-dropdown-item @click.native="editpassword"
>修改密码</el-dropdown-item
>
<el-dropdown-item @click.native="toggleDevTools"
>调试工具</el-dropdown-item
>
<el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
<el-dropdown-item @click.native="editpassword">修改密码</el-dropdown-item>
<el-dropdown-item @click.native="toggleDevTools">调试工具</el-dropdown-item>
<el-dropdown-item @click.native="windowMin">最小化</el-dropdown-item>
<el-dropdown-item @click.native="windowMax">最大化</el-dropdown-item>
<el-dropdown-item @click.native="windowClose">关闭</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
</div> </div>
</el-header> </el-header>
<!-- 修改密码弹框 --> <!-- 修改密码弹框 -->
<el-dialog
title="修改密码"
:visible.sync="dialogVisible"
width="30%"
:close-on-click-modal="false"
>
<el-form
:model="form"
:rules="rules"
ref="ruleForm"
label-width="100px"
>
<el-dialog title="修改密码" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false">
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="旧密码" prop="oldPassWord"> <el-form-item label="旧密码" prop="oldPassWord">
<el-input
v-model="form.oldPassWord"
autocomplete="new-password"
show-password
></el-input>
<el-input v-model="form.oldPassWord" autocomplete="new-password" show-password></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码" prop="newPassWord"> <el-form-item label="新密码" prop="newPassWord">
<el-input
v-model="form.newPassWord"
autocomplete="new-password"
show-password
></el-input>
<el-input v-model="form.newPassWord" autocomplete="new-password" show-password></el-input>
</el-form-item> </el-form-item>
<el-form-item label="确认密码" prop="newPassWord"> <el-form-item label="确认密码" prop="newPassWord">
<el-input
v-model="confirmpassword"
type="password"
autocomplete="new-password"
show-password
></el-input>
<el-input v-model="confirmpassword" type="password" autocomplete="new-password" show-password></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -438,18 +401,44 @@ export default {
} }
this.$peisAPI.toggleDevTools(); this.$peisAPI.toggleDevTools();
}, },
//
windowMin() {
if (!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
this.$peisAPI.windowMin();
},
//
windowMax() {
if (!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
this.$peisAPI.windowMax();
},
windowClose() {
if (!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
this.$peisAPI.windowClose();
},
}, },
components: { router }, components: { router },
}; };
</script> </script>
<style scoped> <style scoped>
@import '../assets/css/global_card.css'; @import '../assets/css/global_card.css';
:deep .el-dropdown-menu__item { :deep .el-dropdown-menu__item {
color: #52555F; color: #52555F;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
font-family: "NotoSansSC-Regular"; font-family: "NotoSansSC-Regular";
} }
.dropdownmain:hover, .dropdownmain:hover,
.el-dropdown-menu__item:not(.is-disabled):hover { .el-dropdown-menu__item:not(.is-disabled):hover {
background-color: rgba(20, 96, 243, 0.1); background-color: rgba(20, 96, 243, 0.1);
@ -459,11 +448,13 @@ export default {
font-size: 14px; font-size: 14px;
font-family: "NotoSansSC-Bold"; font-family: "NotoSansSC-Bold";
} }
.titleimg :hover { .titleimg :hover {
width: 30px; width: 30px;
background-color: rgb(34, 149, 98); background-color: rgb(34, 149, 98);
z-index: 99; z-index: 99;
} }
.el-dropdown-link:hover { .el-dropdown-link:hover {
/* background-color: rgb(202, 249, 203); */ /* background-color: rgb(202, 249, 203); */
color: #396FFA; color: #396FFA;
@ -473,16 +464,20 @@ export default {
border-top-right-radius: 5px; */ border-top-right-radius: 5px; */
font-family: "NotoSansSC-Bold"; font-family: "NotoSansSC-Bold";
} }
::v-deep .el-menu--horizontal>.el-submenu .el-submenu__title { ::v-deep .el-menu--horizontal>.el-submenu .el-submenu__title {
font-size: 16px; font-size: 16px;
} }
.dropdowncolor { .dropdowncolor {
font-size: 12px; font-size: 12px;
} }
.el-dropdown { .el-dropdown {
color: rgb(140, 135, 134); color: rgb(140, 135, 134);
font-size: 12px; font-size: 12px;
} }
.currentuser { .currentuser {
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -493,6 +488,7 @@ export default {
font-size: 18px; font-size: 18px;
z-index: 99; z-index: 99;
} }
.registrationimgimges { .registrationimgimges {
width: 20px; width: 20px;
height: 20px; height: 20px;
@ -500,6 +496,7 @@ export default {
left: -15px; left: -15px;
top: 15px; top: 15px;
} }
.commonsettingimg { .commonsettingimg {
width: 20px; width: 20px;
height: 20px; height: 20px;
@ -507,21 +504,25 @@ export default {
left: -15px; left: -15px;
top: 15px; top: 15px;
} }
.chargeimg { .chargeimg {
position: absolute; position: absolute;
left: -15px; left: -15px;
top: 15px; top: 15px;
} }
.basicimg { .basicimg {
position: absolute; position: absolute;
left: -17px; left: -17px;
top: 15px; top: 15px;
} }
.iconimg { .iconimg {
position: absolute; position: absolute;
left: 0px; left: 0px;
top: 10px; top: 10px;
} }
.el-dropdown-link { .el-dropdown-link {
font-size: 14px; font-size: 14px;
margin: 0; margin: 0;
@ -529,6 +530,7 @@ export default {
color: #52555F; color: #52555F;
font-family: "NotoSansSC-Regular"; font-family: "NotoSansSC-Regular";
} }
.principalheader { .principalheader {
background-color: #fff; background-color: #fff;
opacity: 1; opacity: 1;
@ -580,11 +582,13 @@ export default {
/* justify-content: space-between; */ /* justify-content: space-between; */
flex-flow: 1; flex-flow: 1;
} }
::v-deep .el-card__body { ::v-deep .el-card__body {
/* height: 90vh; */ /* height: 90vh; */
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
} }
.maintitle { .maintitle {
width: 180px; width: 180px;
font-size: 20px; font-size: 20px;
@ -593,6 +597,7 @@ export default {
margin-left: 10px; margin-left: 10px;
font-family: "NotoSansSC-Bold"; font-family: "NotoSansSC-Bold";
} }
::v-deep .el-dropdown-menu item:not(.is-disabled) { ::v-deep .el-dropdown-menu item:not(.is-disabled) {
color: #fff; color: #fff;
} }
@ -600,14 +605,17 @@ export default {
.el-header { .el-header {
height: 40px; height: 40px;
} }
::v-deep .el-select-dropdown { ::v-deep .el-select-dropdown {
background: #ccc; background: #ccc;
} }
.operateimg { .operateimg {
position: relative; position: relative;
left: 0; left: 0;
top: 5px; top: 5px;
} }
.el-aside { .el-aside {
/* height: calc(100vh, -70px); */ /* height: calc(100vh, -70px); */
height: calc(100vh - 0px); height: calc(100vh - 0px);
@ -645,6 +653,7 @@ export default {
font-weight: 700; font-weight: 700;
color: #fff; color: #fff;
} }
/* .actived { /* .actived {
color: #396FFA!important; color: #396FFA!important;
border-bottom: 4px solid #396FFA; border-bottom: 4px solid #396FFA;
@ -655,6 +664,7 @@ export default {
font-weight: 700; font-weight: 700;
font-family: "NotoSansSC-Bold"; font-family: "NotoSansSC-Bold";
} }
.actived .el-dropdown-link:after { .actived .el-dropdown-link:after {
content: ''; content: '';
width: 100%; width: 100%;
@ -664,6 +674,7 @@ export default {
bottom: 4px; bottom: 4px;
left: 0; left: 0;
} }
/* .project-dropdown{ /* .project-dropdown{
max-height:300px; max-height:300px;
overflow: auto; overflow: auto;

84
src/views/login/Login.vue

@ -1,5 +1,13 @@
<template> <template>
<div class="bg"> <div class="bg">
<div style="display: flex;justify-content: space-between;padding-top: 5px;">
<div></div>
<div style="display: flex;">
<i class="el-icon-minus" @click="btnMin" style="padding-right: 5px;"></i>
<i class="el-icon-copy-document" @click="btnMax" style="padding-right: 5px;"></i>
<i class="el-icon-close" @click="btnClose" style="padding-right: 5px;"></i>
</div>
</div>
<div class="box"> <div class="box">
<div class="mainbody"> <div class="mainbody">
<div class="title"> <div class="title">
@ -7,40 +15,29 @@
<div>神豚体检管理系统</div> <div>神豚体检管理系统</div>
</div> </div>
<div class="userform"> <div class="userform">
<div style="color: #232748;font-size: 24px;font-weight: 700;margin-bottom: 20px;font-family: NotoSansSC-Bold;">登录账号</div>
<el-form
:model="form"
:rules="rules"
ref="form"
class="demo-ruleForm"
>
<div style="color: #232748;font-size: 24px;font-weight: 700;margin-bottom: 20px;font-family: NotoSansSC-Bold;">
登录账号</div>
<el-form :model="form" :rules="rules" ref="form" class="demo-ruleForm">
<el-form-item label="" prop="Username" style="margin-bottom: 20px"> <el-form-item label="" prop="Username" style="margin-bottom: 20px">
<div style="font-size:16px;font-weight: 400;color: #232748; line-height: 22px;margin-bottom: 10px;font-family: NotoSansSC-Regular;">用户名</div>
<el-input
class="inputcolor"
v-model="form.Username"
placeholder="请输入用户名"
prefix-icon="el-icon-s-custom"
style="color: #fff"
@keyup.native.enter="nextFocus('Username')"
></el-input>
<div
style="font-size:16px;font-weight: 400;color: #232748; line-height: 22px;margin-bottom: 10px;font-family: NotoSansSC-Regular;">
用户名</div>
<el-input class="inputcolor" v-model="form.Username" placeholder="请输入用户名" prefix-icon="el-icon-s-custom"
style="color: #fff" @keyup.native.enter="nextFocus('Username')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="" prop="Password" style="margin-bottom: 5px"> <el-form-item label="" prop="Password" style="margin-bottom: 5px">
<div style="font-size:16px;font-weight: 400;color: #232748;line-height: 22px;margin-bottom: 10px;font-family: NotoSansSC-Regular;">密码</div>
<el-input
v-model="form.Password"
placeholder="请输入密码"
type="password"
prefix-icon="el-icon-unlock"
@keyup.native.enter="nextFocus('Password')"
ref="password"
></el-input>
<div
style="font-size:16px;font-weight: 400;color: #232748;line-height: 22px;margin-bottom: 10px;font-family: NotoSansSC-Regular;">
密码</div>
<el-input v-model="form.Password" placeholder="请输入密码" type="password" prefix-icon="el-icon-unlock"
@keyup.native.enter="nextFocus('Password')" ref="password"></el-input>
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item> <el-form-item>
<el-checkbox></el-checkbox> <el-checkbox></el-checkbox>
<span style=" font-family: NotoSansSC-Regular;color: #232748;font-weight: 400;font-size: 14px;margin-left: 5px;">记住密码</span>
<span
style=" font-family: NotoSansSC-Regular;color: #232748;font-weight: 400;font-size: 14px;margin-left: 5px;">记住密码</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -94,6 +91,27 @@ export default {
} }
}, },
methods: { methods: {
btnMin(){
if(!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
this.$peisAPI.windowMin();
},
btnMax(){
if(!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
this.$peisAPI.windowMax();
},
btnClose(){
if(!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
this.$peisAPI.windowClose();
},
nextFocus(e) { nextFocus(e) {
if (e == 'Username') { if (e == 'Username') {
this.$refs['password'].focus() this.$refs['password'].focus()
@ -185,12 +203,15 @@ export default {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
} }
.el-form-item.is-error .el-input__inner { .el-form-item.is-error .el-input__inner {
color: none; color: none;
} }
.inputcolor { .inputcolor {
border: none; border: none;
} }
.box { .box {
position: absolute; position: absolute;
right: 140px; right: 140px;
@ -202,6 +223,7 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
.title { .title {
width: 443px; width: 443px;
height: 107px; height: 107px;
@ -209,16 +231,17 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
img { img {
width: 45.86px; width: 45.86px;
height: 45.86px; height: 45.86px;
} }
div { div {
font-size: 38px; font-size: 38px;
margin-left: 15px; margin-left: 15px;
color: #232748; color: #232748;
font-weight: 600
;
font-weight: 600;
} }
} }
} }
@ -230,12 +253,14 @@ export default {
border-radius: 12px; border-radius: 12px;
padding: 40px 32px; padding: 40px 32px;
} }
// .btn :hover { // .btn :hover {
// // background-color: rgb(0, 183, 92); // // background-color: rgb(0, 183, 92);
// } // }
::v-deep .el-input__icon { ::v-deep .el-input__icon {
font-size: 18px; font-size: 18px;
} }
.btn { .btn {
background-color: #396FFA; background-color: #396FFA;
; ;
@ -247,12 +272,15 @@ export default {
height: 40px; height: 40px;
width: 100%; width: 100%;
} }
:deep .el-input--prefix .el-input__inner { :deep .el-input--prefix .el-input__inner {
padding-left: 30px; padding-left: 30px;
} }
:deep .el-form-item { :deep .el-form-item {
margin-bottom: 22px; margin-bottom: 22px;
} }
:deep .el-button { :deep .el-button {
color: #fff; color: #fff;
} }

Loading…
Cancel
Save