<!--
|
* @Author: 小明丶
|
* @Date: 2019-08-20 18:12:00
|
* @LastEditors: 小明丶
|
* @LastEditTime: 2020-11-17 09:41:11
|
* @Description: 账号管理列表页面
|
-->
|
<template>
|
<div class="account ">
|
<v-navbar title="账号管理" fixed></v-navbar>
|
<van-search v-model="value" class="search" placeholder="请输入姓名/手机号" shape='round'/>
|
|
<div class="item-box">
|
<div class="account-item flex-start-g" v-for="(item, index) in calcList" :key="index" @click="go(item.id)">
|
<p class="icon-box flex-center-g" :style="{background:$store.state.backColor}">
|
<svg class="icon" aria-hidden="true" style="width:25px;height:25px;fill:#fff" >
|
<use xlink:href="#iconyonghu"></use>
|
</svg>
|
</p>
|
|
<div>
|
<p class="name">{{item.name}}</p>
|
<p class="c-text-666-g font-12-g">{{item.mblNo}}</p>
|
</div>
|
</div>
|
</div>
|
|
<van-button class="btn" @click="$router.push('/mine/account-add?isAdd=1')" :style="{background:$store.state.backColor}">
|
<div class="inner" >
|
<van-icon name="plus"/>
|
<span class="text">新增</span>
|
</div>
|
</van-button>
|
</div>
|
</template>
|
|
<script>
|
import hList from '../../../components/common/h-list';
|
export default {
|
name: "account",
|
components:{
|
hList
|
},
|
data() {
|
return {
|
value:'',
|
list:[],
|
finished: false,
|
loading: false
|
}
|
},
|
computed:{
|
// 根据搜索关键字获取 对应的数据
|
calcList(){
|
let v = this.value;
|
let arr = this.list.filter(item=>{
|
return item.name.indexOf(v) > -1 || item.mblNo.indexOf(v) > -1;
|
})
|
if(arr){
|
return arr
|
}
|
return this.list;
|
}
|
},
|
created(){
|
this.init()
|
},
|
methods: {
|
saleOrderLoad(){
|
this.finished = true
|
},
|
go(id){
|
this.$router.push(`/mine/account-add?id=${id}`)
|
},
|
init(){
|
this.$api.getMgrList().then((res) => {
|
this.list = res.body ||[];
|
}).catch((err) => {
|
|
});
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="less">
|
.account {
|
background-color: @c-bg-f5;
|
padding-top: 44px;
|
|
.btn {
|
position: fixed;
|
width: 50px;
|
height: 50px;
|
padding: 0;
|
right: 8px;
|
bottom: 68px;
|
border-radius: 50%;
|
color: @c-text-f5;
|
z-index: @zIndex-50;
|
box-shadow: 0px 5px 9px 0px rgba(80, 47, 183, 0.2);
|
background: linear-gradient(0deg, rgba(106, 79, 188, 1), rgba(137, 110, 219, 1));
|
|
.inner {
|
display: flex;
|
flex-direction: column;
|
}
|
|
.text {
|
.lh(15px);
|
}
|
}
|
|
}
|
.search{
|
margin-top: 10px;
|
padding: 15px 8px;
|
}
|
.item-box{
|
background-color: @c-bg-fff;
|
padding-bottom: 25px;
|
}
|
.account-item{
|
height: 67px;
|
margin: 0 8px 10px;
|
padding-left: 12px;
|
box-shadow:0px 0px 5px 0px rgba(66,61,93,0.08);
|
border-radius:3px;
|
.icon-box{
|
width: 32px;
|
height: 32px;
|
margin-right: 15px;
|
border-radius: 50%;
|
background-color: @c-bg-black;
|
}
|
.name{
|
margin-bottom: 5px;
|
font-weight: bold;
|
}
|
}
|
</style>
|