|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div class="bottom">
|
||||
<div class="bs-card">
|
||||
<div class="bs-card__title jc-between">
|
||||
<p class="bs-card__title--text">医院</p>
|
||||
|
||||
<div class="color-white">
|
||||
<span class="color-word">1</span>
|
||||
<span>/</span>
|
||||
<span>10</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bs-card__body">
|
||||
<img src="@/assets/bigScreen/bkg.png" alt="">
|
||||
<div class="img-title">常州武进中医院</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bs-card">
|
||||
<div class="bs-card__title jc-between">
|
||||
<p class="bs-card__title--text">物业</p>
|
||||
|
||||
<div class="color-white">
|
||||
<span class="color-word">1</span>
|
||||
<span>/</span>
|
||||
<span>10</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bs-card__body">
|
||||
<img src="@/assets/bigScreen/bkg.png" alt="">
|
||||
<div class="img-title">常州武进中医院</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bs-card">
|
||||
<div class="bs-card__title jc-between">
|
||||
<p class="bs-card__title--text">分公司</p>
|
||||
|
||||
<div class="color-white">
|
||||
<span class="color-word">1</span>
|
||||
<span>/</span>
|
||||
<span>10</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bs-card__body">
|
||||
<img src="@/assets/bigScreen/bkg.png" alt="">
|
||||
<div class="img-title">常州武进中医院</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bs-card">
|
||||
<div class="bs-card__title jc-between">
|
||||
<p class="bs-card__title--text">站点</p>
|
||||
|
||||
<div class="color-white">
|
||||
<span class="color-word">1</span>
|
||||
<span>/</span>
|
||||
<span>10</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bs-card__body">
|
||||
<img src="@/assets/bigScreen/bkg.png" alt="">
|
||||
<div class="img-title">常州武进中医院</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.bottom {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 30px;
|
||||
margin: 25px 0;
|
||||
.bs-card {
|
||||
flex-basis: calc((100% - 30px * 3) / 4);
|
||||
|
||||
&__body {
|
||||
width: 372px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
position: relative;
|
||||
|
||||
& > img {
|
||||
object-fit: cover;
|
||||
width: 372px;
|
||||
}
|
||||
|
||||
.img-title {
|
||||
width: 100%;
|
||||
line-height: 29px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
background-color: rgba(1, 16, 57, 0.8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div class="ccenter">
|
||||
<div class="top">
|
||||
<div class="bs-card">
|
||||
<div class="card-icon">
|
||||
<img :src="require('@/assets/bigScreen/img1.png')" alt="">
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<p class="color-word">护工人数</p>
|
||||
<p>
|
||||
<span class="color-white fw-b" style="font-size: 42px;">10000</span>
|
||||
<span class="color-word" style="padding-left: 5px">人次/年</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bs-card">
|
||||
<div class="card-icon">
|
||||
<img :src="require('@/assets/bigScreen/img2.png')" alt="">
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<p class="color-word">服务驿站</p>
|
||||
<p>
|
||||
<span class="color-white fw-b" style="font-size: 42px;">658</span>
|
||||
<span class="color-word" style="padding-left: 5px">家</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bs-card">
|
||||
<div class="card-icon">
|
||||
<img :src="require('@/assets/bigScreen/img3.png')" alt="">
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<p class="color-word">总服务时长</p>
|
||||
<p>
|
||||
<span class="color-white fw-b" style="font-size: 42px;">10000</span>
|
||||
<span class="color-word" style="padding-left: 5px">小时</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom">
|
||||
<video ref="video">
|
||||
<source src="https://highlight-video.cdn.bcebos.com/video/6s/fa06ca8e-536b-11ef-8efc-7cd30ab516e3.mp4">
|
||||
</video>
|
||||
|
||||
<img class="video-btn" :src="require('@/assets/bigScreen/video-btn.png')" alt="" @click="playVideo">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isPaused: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
playVideo () {
|
||||
if (this.$refs['video'].paused) {
|
||||
this.isPaused = false;
|
||||
this.$refs['video'].play()
|
||||
} else {
|
||||
this.isPaused = true;
|
||||
this.$refs['video'].pause()
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.ccenter {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
|
||||
.bs-card {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20px 15px;
|
||||
|
||||
.card-icon {
|
||||
width: 62px;
|
||||
height: 58px;
|
||||
|
||||
& > img {
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
.card-text {
|
||||
flex: 1;
|
||||
padding-left: 10px;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.bs-card + .bs-card {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 30px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 6px;
|
||||
box-sizing: border-box;
|
||||
background: conic-gradient(#5470ec, #506bec, #77cbf1, #3d58ca, #3b56ca, #6fbbf0, #6aa3f2);
|
||||
position: relative;
|
||||
|
||||
video {
|
||||
object-fit: cover;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
bottom: 6px;
|
||||
filter: brightness(65%);
|
||||
height: calc(100% - 12px);
|
||||
width: calc(100% - 12px);
|
||||
}
|
||||
.video-btn {
|
||||
cursor: pointer;
|
||||
width: 230px;
|
||||
height: 230px;
|
||||
position: absolute;
|
||||
top: calc(50% - 115px);
|
||||
left: calc(50% - 115px);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,261 @@
|
||||
<template>
|
||||
<div class="center-left">
|
||||
<div class="bs-card business-buy">
|
||||
<div class="bs-card__title jc-between">
|
||||
<p class="bs-card__title--text">
|
||||
政府购买服务
|
||||
</p>
|
||||
<p>
|
||||
<span class="color-word">658</span>
|
||||
<span class="color-white">人次/每分钟</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="business-buy__body">
|
||||
<div class="digital">
|
||||
<p class="digital-item">60%</p>
|
||||
<p class="digital-item">18%</p>
|
||||
<p class="digital-item">22%</p>
|
||||
<img :src="require('@/assets/bigScreen/business-buy.png')" alt="">
|
||||
</div>
|
||||
|
||||
<div class="progress">
|
||||
<div class="progress-item" v-for="i in 3">
|
||||
<svg viewBox="0 0 100 100" style="transform: rotate(-90deg)">
|
||||
<path d="M 50 50 m 0 47a 47 47 0 1 1 0 -94a 47 47 0 1 1 0 94"
|
||||
stroke="#f56c6c"
|
||||
stroke-width="8"
|
||||
fill="none"
|
||||
style="stroke-dasharray: 5,4; stroke-dashoffset: -36.9137px;"></path>
|
||||
<path d="M 50 50 m 0 47 a 47 47 0 1 1 0 -94 a 47 47 0 1 1 0 94"
|
||||
stroke="#0e2168"
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-width="8"
|
||||
style="stroke-dasharray: 74.1482px, 295.31px; stroke-dashoffset: -36.9137px; transition: stroke-dasharray 0.6s, stroke 0.6s;"></path>
|
||||
</svg>
|
||||
|
||||
<div class="progress-name">
|
||||
长护
|
||||
</div>
|
||||
<div class="progress-rate">
|
||||
30%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bs-card property">
|
||||
<div class="bs-card__title jc-between">
|
||||
<p class="bs-card__title--text">
|
||||
物业
|
||||
</p>
|
||||
<div class="chart-legend">
|
||||
<div class="chart-legend__item">
|
||||
<div style="background: #00d9d5;"></div>
|
||||
<p class="color-white">商业服务面积</p>
|
||||
</div>
|
||||
<div class="chart-legend__item">
|
||||
<div style="background: linear-gradient(0deg, #e67725 0%, #ff9d62 100%);"></div>
|
||||
<p class="color-white">住宅服务面积</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div id="property-line-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(document.querySelector('#property-line-chart'), 'macarons');
|
||||
this.setOptions(this.chartData);
|
||||
},
|
||||
setOptions(chartdata) {
|
||||
this.chart.setOption({
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '3%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [{
|
||||
type: 'value',
|
||||
}],
|
||||
yAxis: [{
|
||||
type: 'category',
|
||||
date: ['商业服务面积','住宅服务面积']
|
||||
}],
|
||||
series: [{
|
||||
name: '商业服务面积',
|
||||
type: 'bar',
|
||||
barWidth: '30%',
|
||||
data: [550],
|
||||
itemStyle: {
|
||||
color: "#00d9d5",
|
||||
barBorderRadius: [0,4,4,0],
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: 'right',
|
||||
color: '#31abe3',
|
||||
fontWeight: 'bold',
|
||||
formatter: '{c}㎡'
|
||||
},
|
||||
animationDuration: 3000
|
||||
},{
|
||||
name: '住宅服务面积',
|
||||
type: 'bar',
|
||||
barWidth: '30%',
|
||||
data: [550],
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(1, 0.5, 0, 0.5, [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#e67725'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ff9d62'
|
||||
}
|
||||
]),
|
||||
barBorderRadius: [0,4,4,0],
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: 'right',
|
||||
color: '#31abe3',
|
||||
fontWeight: 'bold',
|
||||
formatter: '{c}㎡'
|
||||
},
|
||||
animationDuration: 3000
|
||||
}]
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.center-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.business-buy {
|
||||
height: 382px;
|
||||
|
||||
&__body {
|
||||
|
||||
.digital {
|
||||
width: 205px;
|
||||
height: 188px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
& > img {
|
||||
width: 205px;
|
||||
height: 188px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&-item {
|
||||
font-size: 20px;
|
||||
color: #31abe3;
|
||||
font-weight: bold;
|
||||
z-index: 2;
|
||||
position: absolute;
|
||||
}
|
||||
&-item:nth-child(1) {
|
||||
top: 46%;
|
||||
right: -36%;
|
||||
}
|
||||
&-item:nth-child(2) {
|
||||
left: 50%;
|
||||
bottom: 10%;
|
||||
}
|
||||
&-item:nth-child(3) {
|
||||
left: -20%;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
padding: 0 15px;
|
||||
|
||||
&-item {
|
||||
width: 91px;
|
||||
position: relative;
|
||||
}
|
||||
&-name {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
width: 52px;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
background-color: #0052e9;
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
left: calc(50% - 26px);
|
||||
}
|
||||
&-rate {
|
||||
color: #00deff;
|
||||
font-size: 20px;
|
||||
transform: translate(-50%, -50%);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.property {
|
||||
height: 243px;
|
||||
|
||||
.chart-legend {
|
||||
display: flex;
|
||||
|
||||
&__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 18px;
|
||||
& > div {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 4px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
& > p {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#property-line-chart {
|
||||
height: 140px;
|
||||
width: 388px;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class="top">
|
||||
<img class="title-img" :src="require('@/assets/bigScreen/title.png')" alt="">
|
||||
|
||||
<div class="line">
|
||||
<img :src="require('@/assets/bigScreen/line.png')" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.top {
|
||||
flex: 0;
|
||||
height: calc(28px + 72px + 18px);
|
||||
position: relative;
|
||||
}
|
||||
.title-img {
|
||||
height: 72px;
|
||||
width: 477px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
.line {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
height: 3px;
|
||||
background: linear-gradient(to right, #334067, #4f5a7c);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 31%;
|
||||
}
|
||||
&::after {
|
||||
content: "";
|
||||
height: 3px;
|
||||
background: linear-gradient(to right, #28376c, #9bbbe5);
|
||||
filter: drop-shadow(0 -1px 2px #204fd6);
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 32.1%;
|
||||
}
|
||||
& > img {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<div id="big-screen">
|
||||
<div ref="appRef" class="container">
|
||||
<top></top>
|
||||
|
||||
<div class="center">
|
||||
<CenterLeft style="grid-area: left"></CenterLeft>
|
||||
<Center style="grid-area: center;"></Center>
|
||||
<CenterRight style="grid-area: right;"></CenterRight>
|
||||
</div>
|
||||
|
||||
<Bottom></Bottom>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import drawMixin from './mixin'
|
||||
import top from './component/top.vue'
|
||||
import CenterLeft from "./component/CenterLeft.vue";
|
||||
import Center from "./component/Center.vue";
|
||||
import CenterRight from "./component/CenterRight.vue";
|
||||
import Bottom from "./component/Bottom.vue";
|
||||
export default {
|
||||
mixins: [drawMixin],
|
||||
components: {
|
||||
top,
|
||||
CenterLeft,
|
||||
Center,
|
||||
CenterRight,
|
||||
Bottom
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "~@/styles/bigscreen.scss";
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
#big-screen {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
background: url("~@/assets/bigScreen/bkg.png") no-repeat;
|
||||
background-size: cover;
|
||||
overflow: hidden;
|
||||
|
||||
.container {
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
transform-origin: 0 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
position: relative;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
|
||||
.center {
|
||||
flex: 0;
|
||||
height: 648px;
|
||||
display: grid;
|
||||
grid-template-areas: "left center center right";
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-column-gap: 30px;
|
||||
padding: 0 30px;
|
||||
margin-top: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,242 +1,243 @@
|
||||
|
||||
<template>
|
||||
<div class="login-container">
|
||||
|
||||
<vue-particles color="#ffffff" :particleOpacity="0.7" :particlesNumber="80" shapeType="circle" :particleSize="4"
|
||||
linesColor="#ffffff" :linesWidth="1" :lineLinked="true" :lineOpacity="0.4" :linesDistance="150" :moveSpeed="3"
|
||||
:hoverEffect="true" hoverMode="grab" :clickEffect="true" clickMode="push"> </vue-particles>
|
||||
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on"
|
||||
label-position="left">
|
||||
|
||||
<div class="title-container">
|
||||
<h3 class="title">四世同堂业务管理系统</h3>
|
||||
</div>
|
||||
|
||||
<el-form-item prop="username">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="user" />
|
||||
</span>
|
||||
<el-input ref="username" v-model="loginForm.username" placeholder="请输入登录名" name="username" type="text"
|
||||
tabindex="1" auto-complete="on" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="password" />
|
||||
</span>
|
||||
<el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType"
|
||||
placeholder="请输入密码" name="password" tabindex="2" auto-complete="on" @keyup.enter.native="handleLogin" />
|
||||
<span class="show-pwd" @click="showPwd">
|
||||
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;"
|
||||
@click.native.prevent="handleLogin">登录</el-button>
|
||||
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
validUsername
|
||||
} from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
if (!validUsername(value)) {
|
||||
callback(new Error('请正确输入登录名'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const validatePassword = (rule, value, callback) => {
|
||||
if (value.length < 6) {
|
||||
callback(new Error('密码输入错误'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: validateUsername
|
||||
}],
|
||||
password: [{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: validatePassword
|
||||
}]
|
||||
},
|
||||
loading: false,
|
||||
passwordType: 'password',
|
||||
redirect: undefined
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function(route) {
|
||||
this.redirect = route.query && route.query.redirect
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPwd() {
|
||||
if (this.passwordType === 'password') {
|
||||
this.passwordType = ''
|
||||
} else {
|
||||
this.passwordType = 'password'
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.password.focus()
|
||||
})
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.$store.dispatch('user/login', this.loginForm).then(() => {
|
||||
|
||||
this.$router.push({
|
||||
path: this.redirect || '/'
|
||||
})
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#particles-js {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* 修复input 背景不协调 和光标变色 */
|
||||
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
|
||||
|
||||
$bg:#122583;
|
||||
$light_gray:#122583;
|
||||
$cursor: #122583;
|
||||
|
||||
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
|
||||
.login-container .el-input input {
|
||||
color: $cursor;
|
||||
}
|
||||
}
|
||||
|
||||
/* reset element-ui css */
|
||||
.login-container {
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
width: 85%;
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0px;
|
||||
padding: 12px 5px 12px 15px;
|
||||
color: $light_gray;
|
||||
height: 47px;
|
||||
caret-color: $cursor;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$bg:#122583;
|
||||
$dark_gray:#122583;
|
||||
$light_gray:#122583;
|
||||
|
||||
.login-container {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
//background-color: $bg;
|
||||
background: url("../../assets/bg.jpg") no-repeat;
|
||||
overflow: hidden;
|
||||
|
||||
.login-form {
|
||||
position: relative;
|
||||
width: 520px;
|
||||
max-width: 100%;
|
||||
padding: 20px 35px 0;
|
||||
margin: 160px auto;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.svg-container {
|
||||
padding: 6px 5px 6px 15px;
|
||||
color: $dark_gray;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title-container {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
font-size: 26px;
|
||||
color: $light_gray;
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 7px;
|
||||
font-size: 16px;
|
||||
color: $dark_gray;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
<template>
|
||||
<div class="login-container">
|
||||
|
||||
<vue-particles color="#ffffff" :particleOpacity="0.7" :particlesNumber="80" shapeType="circle" :particleSize="4"
|
||||
linesColor="#ffffff" :linesWidth="1" :lineLinked="true" :lineOpacity="0.4" :linesDistance="150" :moveSpeed="3"
|
||||
:hoverEffect="true" hoverMode="grab" :clickEffect="true" clickMode="push"> </vue-particles>
|
||||
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on"
|
||||
label-position="left">
|
||||
|
||||
<div class="title-container">
|
||||
<h3 class="title">四世同堂业务管理系统</h3>
|
||||
</div>
|
||||
|
||||
<el-form-item prop="username">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="user" />
|
||||
</span>
|
||||
<el-input ref="username" v-model="loginForm.username" placeholder="请输入登录名" name="username" type="text"
|
||||
tabindex="1" auto-complete="on" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="password" />
|
||||
</span>
|
||||
<el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType"
|
||||
placeholder="请输入密码" name="password" tabindex="2" auto-complete="on" @keyup.enter.native="handleLogin" />
|
||||
<span class="show-pwd" @click="showPwd">
|
||||
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;"
|
||||
@click.native.prevent="handleLogin">登录</el-button>
|
||||
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
validUsername
|
||||
} from '@/utils/validate'
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
if (!validUsername(value)) {
|
||||
callback(new Error('请正确输入登录名'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const validatePassword = (rule, value, callback) => {
|
||||
if (value.length < 6) {
|
||||
callback(new Error('密码输入错误'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: validateUsername
|
||||
}],
|
||||
password: [{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: validatePassword
|
||||
}]
|
||||
},
|
||||
loading: false,
|
||||
passwordType: 'password',
|
||||
redirect: undefined
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function(route) {
|
||||
this.redirect = route.query && route.query.redirect
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPwd() {
|
||||
if (this.passwordType === 'password') {
|
||||
this.passwordType = ''
|
||||
} else {
|
||||
this.passwordType = 'password'
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.password.focus()
|
||||
})
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.$store.dispatch('user/login', this.loginForm).then(() => {
|
||||
this.$store.dispatch('app/getVillageCodes')
|
||||
this.$router.push({
|
||||
path: this.redirect || '/'
|
||||
})
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#particles-js {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* 修复input 背景不协调 和光标变色 */
|
||||
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
|
||||
|
||||
$bg:#122583;
|
||||
$light_gray:#122583;
|
||||
$cursor: #122583;
|
||||
|
||||
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
|
||||
.login-container .el-input input {
|
||||
color: $cursor;
|
||||
}
|
||||
}
|
||||
|
||||
/* reset element-ui css */
|
||||
.login-container {
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
width: 85%;
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0px;
|
||||
padding: 12px 5px 12px 15px;
|
||||
color: $light_gray;
|
||||
height: 47px;
|
||||
caret-color: $cursor;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$bg:#122583;
|
||||
$dark_gray:#122583;
|
||||
$light_gray:#122583;
|
||||
|
||||
.login-container {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
//background-color: $bg;
|
||||
background: url("../../assets/bg.jpg") no-repeat;
|
||||
overflow: hidden;
|
||||
|
||||
.login-form {
|
||||
position: relative;
|
||||
width: 520px;
|
||||
max-width: 100%;
|
||||
padding: 20px 35px 0;
|
||||
margin: 160px auto;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.svg-container {
|
||||
padding: 6px 5px 6px 15px;
|
||||
color: $dark_gray;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title-container {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
font-size: 26px;
|
||||
color: $light_gray;
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 7px;
|
||||
font-size: 16px;
|
||||
color: $dark_gray;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||