user-info.vue
3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<template>
<div class="container resource close-left-menu contaNEW">
<div class="pop-banner clearfix ">
<!-- <form class="search-bar" active="###" @submit.prevent="getData()">
<div class="search-btn" >
<input type="submit" value="搜索" >
</div>
<input type="text" v-model="search.search_LIKE_realname" placeholder="输入关键字" style="color: #373737;" >
</form> -->
<div class="operate-btns">
<a href="javascript:;" @click="getData(true)" class="fbtn fb-refresh" >刷新</a>
<a href="javascript:;" class="fbtn fb-add" v-if="'/distributor/user:insertUser' | myqx" v-link="{path:'/userInfoedit/0'}">添加</a>
</div>
<h3 class="current-module">人员信息管理</h3>
</div>
<form class="search-bar" active="###" v-on:submit.prevent>
<input type="text" placeholder="输入关键词" class='ipt'
v-model="search.search_LIKE_realname" placeholder="输入关键字">
<div class="search-btn">
<input type="button" @click="getData" value="搜索">
</div>
</form>
<table class="itable basic-user-info mt-30">
<thead>
<tr>
<th class="w60">序号</th>
<th class="w100">姓名</th>
<th class="w100">状态</th>
<th class="w130">手机号</th>
<th class="w130">负责商品大类</th>
<th class="w100">系统权限</th>
<th class="w100">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="distributorUser in distributorUserList">
<td>{{$index + 1}}</td>
<td>{{distributorUser.realname}}</td>
<td>
<template v-if="distributorUser.bizstate=='Y'">
有效
</template>
<template v-if="distributorUser.bizstate=='S'">
停用
</template>
<template v-if="distributorUser.bizstate=='N'">
作废
</template>
</td>
<td>{{distributorUser.mobiletel}}</td>
<td>{{distributorUser.name}}</td>
<td>
<template v-if="distributorUser.ismenupermissions=='Y'">
已设置
</template>
<template v-if="distributorUser.ismenupermissions=='N'||distributorUser.ismenupermissions==null">
<span class="text-color-yellow">未设置</span>
</template>
</td>
<td class="pt9"> <a class="btn button-green mar-none" v-link="{path:'/userInfoedit/'+distributorUser.guid}" >明细 </td>
</tr>
</tbody>
</table>
<pagination
@page-change="getData"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages"></pagination>
</div>
</template>
<script>
module.exports={
data: function(){
return {
distributorUserList: [],
search: {
pageSize: 10,
page: 1,
totalPages: 0,
search_LIKE_realname:''
}
};
},
methods: {
getData: function(isRefresh){
var self = this;
if(isRefresh) {
this.search.page = 1;
}
Ajax.get('/user', this.search)
.then(function (response){
var data = response.data.data;
self.$set('distributorUserList',data.list);
self.search.totalPages = data.totalPages;
})
}
},
route:{
activate : function(){
this.getData();
}
}
};
</script>