Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
online-edu
online-edu-admin
Commits
805ead0e
Commit
805ead0e
authored
May 18, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finished 客户管理
parent
d7633775
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
225 additions
and
1 deletion
+225
-1
member.js
src/api/biz/member.js
+13
-0
index.vue
src/views/biz/institution/index.vue
+1
-1
index.vue
src/views/biz/member/index.vue
+211
-0
No files found.
src/api/biz/member.js
0 → 100644
View file @
805ead0e
/******************
* 客户管理
*****************/
// 导入请求公用方法
import
{
request
}
from
'../../utils/axiosFun'
;
export
const
fetchList
=
(
query
)
=>
{
return
request
(
'post'
,
'/api/mgr/member/list'
,
query
)
}
\ No newline at end of file
src/views/biz/institution/index.vue
View file @
805ead0e
...
@@ -225,7 +225,7 @@ export default {
...
@@ -225,7 +225,7 @@ export default {
})
})
},
},
handleTableChange
(
pagination
,
filters
,
sorter
){
handleTableChange
(
pagination
,
filters
,
sorter
){
console
.
log
(
this
.
searchPage
)
//
console.log(this.searchPage)
let
queryParam
=
{...
this
.
searchPage
}
let
queryParam
=
{...
this
.
searchPage
}
queryParam
.
pageIndex
=
pagination
.
current
queryParam
.
pageIndex
=
pagination
.
current
queryParam
.
pageSize
=
pagination
.
pageSize
queryParam
.
pageSize
=
pagination
.
pageSize
...
...
src/views/biz/member/index.vue
0 → 100644
View file @
805ead0e
<
template
>
<div
class=
"template_content"
>
<!-- 搜索 -->
<div
class=
"search_box"
>
<a-form
layout=
"inline"
>
<a-form-item
label=
"用户手机号"
>
<a-input
v-model=
"searchPage.username"
placeholder=
"请输入用户手机号"
allowClear
></a-input>
</a-form-item>
<a-form-item>
<a-button
type=
"primary"
icon=
"search"
@
click=
"handlSearch"
>
查询
</a-button>
</a-form-item>
</a-form>
</div>
<!-- 表格内容 -->
<div
class=
"content_box"
>
<a-table
:columns=
"columns"
:dataSource=
"data"
:loading=
"loading"
:pagination=
"pagination"
bordered
size=
"small"
@
change=
"handleTableChange"
rowKey=
"id"
>
<!-- 用户 -->
<div
slot=
"nickName"
slot-scope=
"text,record"
>
<a-row>
<!-- 头像 -->
<a-col
:span=
"4"
>
<a-avatar
v-if=
"!record.avatarUrl || record.avatarUrl == ''"
shape=
"square"
:size=
"64"
icon=
"user"
/>
<a-avatar
v-if=
"record.avatarUrl && record.avatarUrl != ''"
shape=
"square"
:size=
"64"
:src=
"record.avatarUrl"
/>
</a-col>
<!-- 用户姓名、昵称,注册时间 -->
<a-col
:span=
"19"
offset=
"1"
>
<a-row>
<a-col
:span=
"24"
><span>
昵称:
{{
record
.
nickName
}}
</span></a-col>
<a-col
:span=
"24"
><span>
注册时间:
{{
timestampToTime
(
record
.
createTime
)
}}
</span></a-col>
</a-row>
</a-col>
</a-row>
</div>
<!-- 用户状态 -->
<div
slot=
"status"
slot-scope=
"text,record"
>
<a-tag
v-if=
"record.status == 'ENABLE'"
color=
"green"
>
启用
</a-tag>
<a-tag
v-if=
"record.status == 'DISABLE'"
color=
"red"
>
禁用
</a-tag>
<a-tag
v-if=
"record.status == 'UNACTIVATE'"
color=
"orange"
>
未激活
</a-tag>
</div>
</a-table>
</div>
</div>
</
template
>
<
script
>
import
{
fetchList
}
from
'@/api/biz/member'
import
{
disposereq
,
timestampToTime
}
from
'@/utils/util'
let
columns
=
[
{
title
:
"用户"
,
dataIndex
:
"nickName"
,
align
:
"left"
,
width
:
'30%'
,
scopedSlots
:
{
customRender
:
'nickName'
}
},
{
title
:
"注册手机号"
,
dataIndex
:
"username"
,
align
:
"center"
,
},
{
title
:
"用户身份"
,
dataIndex
:
"type"
,
align
:
"center"
,
customRender
:
(
text
,
record
)
=>
{
let
str
=
''
console
.
log
(
text
)
console
.
log
(
record
)
if
(
record
.
type
==
'USER'
){
str
=
'普通用户'
}
else
if
(
record
.
type
==
'VIP'
){
str
=
'会员'
}
else
if
(
record
.
type
==
'ENTERPRISE_VIP'
){
str
=
'企业会员'
}
if
(
record
.
enterpriseName
){
str
=
str
+
'('
+
record
.
enterpriseName
+
')'
}
return
str
;
}
},
{
title
:
'最后登陆时间'
,
dataIndex
:
'lastLoginTime'
,
align
:
'center'
,
customRender
:
(
text
)
=>
{
return
text
?
timestampToTime
(
text
)
:
'-'
}
},
{
title
:
'用户状态'
,
dataIndex
:
'status'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'status'
}
},
{
title
:
'会员生效时间'
,
dataIndex
:
'vipStartTime'
,
align
:
'center'
,
customRender
:
(
text
)
=>
{
return
text
?
timestampToTime
(
text
)
:
'-'
}
},
{
title
:
'会员失效时间'
,
dataIndex
:
'vipEndTime'
,
align
:
'center'
,
customRender
:
(
text
)
=>
{
return
text
?
timestampToTime
(
text
)
:
'-'
}
},
]
export
default
{
data
(){
return
{
columns
:
columns
,
data
:
[],
searchPage
:
{
pageIndex
:
1
,
pageSize
:
10
,
username
:
''
},
pagination
:
{
showQuickJumper
:
true
,
showSizeChanger
:
true
},
loading
:
false
,
}
},
// 创建完毕
created
()
{
this
.
getList
(
this
.
searchPage
);
},
// 即将更新渲染
beforeUpdate
()
{
},
methods
:
{
getList
(
query
){
this
.
loading
=
true
;
fetchList
(
query
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
data
=
res
.
data
let
paper
=
{...
this
.
pagination
}
paper
.
current
=
query
.
pageIndex
paper
.
total
=
res
.
count
this
.
pagination
=
paper
}
else
{
this
.
$message
.
info
(
res
.
resp_msg
)
}
this
.
loading
=
false
;
}).
catch
(
err
=>
{
this
.
loading
=
false
;
disposereq
(
this
,
err
)
})
},
handleTableChange
(){
let
queryParam
=
{...
this
.
searchPage
}
queryParam
.
pageIndex
=
pagination
.
current
queryParam
.
pageSize
=
pagination
.
pageSize
this
.
getList
(
queryParam
)
},
handlSearch
(){
let
queryParam
=
{...
this
.
searchPage
}
this
.
getList
(
queryParam
)
},
timestampToTime
}
}
</
script
>
<
style
>
.template_content
{
background-color
:
#f0f2f5
;
width
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
}
.search_box
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
14px
;
background-color
:
#fff
;
}
.content_box
{
width
:
100%
;
background-color
:
#fff
;
margin-top
:
10px
;
padding
:
14px
;
}
.table_top
{
padding-bottom
:
14px
;
}
.btn_margin
{
margin
:
0px
5px
;
}
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment