用户页
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
<router-view :key="$route.name" v-if="$route.meta.keepAlive"/>
|
<router-view :key="$route.name" v-if="$route.meta.keepAlive"/>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<router-view :key="$route.name" v-if="!$route.meta.keepAlive"/>
|
<router-view :key="$route.name" v-if="!$route.meta.keepAlive"/>
|
||||||
<router-link v-if="$route.path !== '/home' && $route.path !== '/setup'" class="back_home" to="/home"></router-link>
|
<!-- <router-link v-if="$route.path !== '/home' && $route.path !== '/setup'" class="back_home" to="/home"></router-link>
|
||||||
<button v-if="$route.path === '/home'" class="back_exit" @click="_exit"></button>
|
<button v-if="$route.path === '/home'" class="back_exit" @click="_exit"></button> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,144 @@
|
|||||||
|
<template>
|
||||||
|
<div class="right_side">
|
||||||
|
<div class="buttons_wrapper">
|
||||||
|
<div class="row">
|
||||||
|
<button class="button button--primary" @click="addData">添加用户</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid_wrapper">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>序号</th>
|
||||||
|
<th>任务号</th>
|
||||||
|
<th>姓名</th>
|
||||||
|
<th>电话</th>
|
||||||
|
<th>性别</th>
|
||||||
|
<th>创建日期</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
<tr v-for="(e, i) in datalist" :key="i">
|
||||||
|
<td>{{i+1}}</td>
|
||||||
|
<td></td>
|
||||||
|
<td>{{e.name}}</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div v-if="active" class="dialog_wrapper">
|
||||||
|
<div class="dialog">
|
||||||
|
<div class="dialog_header">
|
||||||
|
<span class="dialog_title">添加用户</span>
|
||||||
|
<button class="dialog_headerbtn">
|
||||||
|
<i class="iconfont icon_close"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="dialog_body">
|
||||||
|
<div class="form">
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label"><i>*</i>用户名</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<input type="text" class="form_item__input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label">电话</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<input type="text" class="form_item__input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form">
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label">姓名</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<input type="text" class="form_item__input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label">性别</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<div class="form_item__radio">
|
||||||
|
<div class="radio__input"><i class="iconfont icon_radio icon_radio_checked"></i></div>
|
||||||
|
<div class="radio__label">男</div>
|
||||||
|
</div>
|
||||||
|
<div class="form_item__radio">
|
||||||
|
<div class="radio__input"><i class="iconfont icon_radio"></i></div>
|
||||||
|
<div class="radio__label">女</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form">
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label"><i>*</i>密码</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<input type="text" class="form_item__input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label">角色</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<el-select v-model="value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dialog_footer">
|
||||||
|
<button class="button button--primary" @click="toCancle">取消</button>
|
||||||
|
<button class="button button--primary">确定</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="active" class="modal"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
datalist: [{name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'ac'}, {name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'a'}, {name: 'ad'}],
|
||||||
|
options: [{
|
||||||
|
value: '选项1',
|
||||||
|
label: '超级管理员'
|
||||||
|
}, {
|
||||||
|
value: '选项2',
|
||||||
|
label: '系统管理员'
|
||||||
|
}, {
|
||||||
|
value: '选项3',
|
||||||
|
label: '普通用户'
|
||||||
|
}, {
|
||||||
|
value: '选项4',
|
||||||
|
label: '开发人员'
|
||||||
|
}],
|
||||||
|
value: '',
|
||||||
|
active: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addData () {
|
||||||
|
this.active = true
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.active = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
@import '~@style/mixin'
|
||||||
|
.grid_wrapper
|
||||||
|
height calc(100% - 50px)
|
||||||
|
overflow-y auto
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -21,21 +21,21 @@
|
|||||||
|
|
||||||
::-webkit-scrollbar-track
|
::-webkit-scrollbar-track
|
||||||
{
|
{
|
||||||
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
-webkit-box-shadow: inset 0 0 0px rgba(0,0,0,0.3);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #F5F5F5;
|
background-color: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar
|
::-webkit-scrollbar
|
||||||
{
|
{
|
||||||
width: 12px;
|
width: 0px;
|
||||||
background-color: #F5F5F5;
|
background-color: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb
|
::-webkit-scrollbar-thumb
|
||||||
{
|
{
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
-webkit-box-shadow: inset 0 0 0px rgba(0,0,0,.3);
|
||||||
background-color: #e5e5e5;
|
background-color: #e5e5e5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,8 +53,6 @@
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
.left_side
|
.left_side
|
||||||
_wh(2.72rem, 100%)
|
_wh(2.72rem, 100%)
|
||||||
.right_side
|
|
||||||
_wh(100%, 100%)
|
|
||||||
|
|
||||||
.filter-table
|
.filter-table
|
||||||
width 100%
|
width 100%
|
||||||
@@ -108,3 +106,223 @@
|
|||||||
white-space pre-line
|
white-space pre-line
|
||||||
word-break break-all
|
word-break break-all
|
||||||
overflow-y auto
|
overflow-y auto
|
||||||
|
|
||||||
|
// 公用
|
||||||
|
.row:before, .row:before
|
||||||
|
display table
|
||||||
|
content ""
|
||||||
|
.row:after
|
||||||
|
clear: both
|
||||||
|
.button
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
color: #606266;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
outline: none;
|
||||||
|
margin: 0;
|
||||||
|
transition: .1s;
|
||||||
|
font-weight: 500;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
padding: 12px 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 18px;
|
||||||
|
.button+.button
|
||||||
|
margin-left: 10px;
|
||||||
|
.button--primary
|
||||||
|
color: #fff;
|
||||||
|
background-color: $red;
|
||||||
|
border-color: $red1;
|
||||||
|
.button--info
|
||||||
|
color: #fff;
|
||||||
|
background-color: $gray;
|
||||||
|
border-color: $gray1;
|
||||||
|
.modal
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: .5;
|
||||||
|
background: #000;
|
||||||
|
z-index: 101;
|
||||||
|
.dialog_wrapper
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow: auto;
|
||||||
|
z-index: 102;
|
||||||
|
.dialog
|
||||||
|
position: relative;
|
||||||
|
margin: 0 auto 50px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,.3);
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 65%;
|
||||||
|
margin-top: 15vh;
|
||||||
|
.dialog_header
|
||||||
|
padding: 20px 20px 10px;
|
||||||
|
.dialog_title
|
||||||
|
line-height: 24px;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #303133;
|
||||||
|
.dialog_headerbtn
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
padding: 0;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
.dialog_body
|
||||||
|
padding: 30px 20px;
|
||||||
|
color: #606266;
|
||||||
|
font-size: 14px;
|
||||||
|
word-break: break-all;
|
||||||
|
.form
|
||||||
|
width 100%
|
||||||
|
_fj(flex-start)
|
||||||
|
.form_item
|
||||||
|
width 48%
|
||||||
|
margin-bottom: 20px
|
||||||
|
.form_item+.form_item
|
||||||
|
margin-left 4%
|
||||||
|
.form_item__label
|
||||||
|
width: 86px;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: middle;
|
||||||
|
float: left;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #606266;
|
||||||
|
line-height: 40px;
|
||||||
|
padding: 0 12px 0 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
i
|
||||||
|
color $red2
|
||||||
|
.form_item__content
|
||||||
|
width: calc(100% - 86px)
|
||||||
|
margin-left: 86px;
|
||||||
|
line-height: 40px;
|
||||||
|
position: relative;
|
||||||
|
font-size: 14px;
|
||||||
|
.form_item__input
|
||||||
|
width 100%
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background-color: #fff;
|
||||||
|
background-image: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid $gray1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #696969;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 14px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
outline: none;
|
||||||
|
padding: 0 15px;
|
||||||
|
transition: border-color .2s cubic-bezier(.645,.045,.355,1);
|
||||||
|
width: 100%;
|
||||||
|
.form_item__radio
|
||||||
|
color: #606266;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1;
|
||||||
|
position: relative;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
white-space: nowrap;
|
||||||
|
outline: none;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 30px;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
.radio__input
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
outline: none;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px
|
||||||
|
position: relative;
|
||||||
|
vertical-align: middle;
|
||||||
|
border 1px solid $gray1
|
||||||
|
border-radius 50%
|
||||||
|
.radio__label
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 14px;
|
||||||
|
padding-left: 10px;
|
||||||
|
.icon_radio_checked
|
||||||
|
color $red2
|
||||||
|
.el-select
|
||||||
|
width 100%
|
||||||
|
.el-select:hover .el-input__inner, .el-input__inner
|
||||||
|
border-color $gray1
|
||||||
|
.el-select .el-input__inner:focus, .el-select .el-input.is-focus .el-input__inner
|
||||||
|
border-color $red1
|
||||||
|
.el-select-dropdown__item.selected
|
||||||
|
color $red2
|
||||||
|
.el-input__inner
|
||||||
|
color #696969
|
||||||
|
.dialog_footer
|
||||||
|
padding: 10px 20px 20px;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
// 用户管理
|
||||||
|
.right_side
|
||||||
|
_wh(100%, 100%)
|
||||||
|
padding 20px 20px 30px 20px
|
||||||
|
.buttons_wrapper
|
||||||
|
.row
|
||||||
|
margin-bottom 10px
|
||||||
|
.grid_wrapper
|
||||||
|
width 100%
|
||||||
|
table
|
||||||
|
table-layout: fixed;
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-spacing: 0;
|
||||||
|
border: 0
|
||||||
|
th
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background: #d7d7d7;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 23px;
|
||||||
|
color: #323232;
|
||||||
|
font-weight: bold;
|
||||||
|
z-index: 100;
|
||||||
|
padding 12px 10px;
|
||||||
|
td
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding: 12px 10px;
|
||||||
|
border-bottom: 1px dashed $gray1;
|
||||||
|
border-right: 1px dashed $gray1;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 23px;
|
||||||
|
color: #323232;
|
||||||
|
background: #fff;
|
||||||
|
&:last-child
|
||||||
|
border-right: none;
|
||||||
|
|||||||
@@ -9,4 +9,12 @@
|
|||||||
content: '\ee34'
|
content: '\ee34'
|
||||||
.icon_admin
|
.icon_admin
|
||||||
&::before
|
&::before
|
||||||
content: '\e7a3'
|
content: '\e7a3'
|
||||||
|
.icon_close
|
||||||
|
color: #909399
|
||||||
|
&::before
|
||||||
|
content '\e659'
|
||||||
|
.icon_radio
|
||||||
|
color #ffffff
|
||||||
|
&::before
|
||||||
|
content '\e608'
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
$red = #e74f1a
|
$red = #FD6A35
|
||||||
|
$red1 = #E74F19
|
||||||
|
$red2 = #FA6400
|
||||||
$green = #6CBE8B
|
$green = #6CBE8B
|
||||||
$yellow = #E9B451
|
$yellow = #E9B451
|
||||||
$blue = #6798ef
|
$blue = #6798ef
|
||||||
$gray = #c9c9c9
|
$gray = #989EBB
|
||||||
|
$gray1 = #8B90A6
|
||||||
|
$gray2 = #DFE1E6
|
||||||
$fc1 = #464646
|
$fc1 = #464646
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user