Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
new-sing
admin-base
Commits
3248225d
Commit
3248225d
authored
Dec 28, 2018
by
chenfenglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
老系统用户列表
parent
cfff4f2a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
178 additions
and
1 deletion
+178
-1
index.vue
src/components/oldUser/index.vue
+154
-0
refundDialog.vue
src/components/order/refundDialog.vue
+2
-1
api.js
src/service/api.js
+11
-0
menuList.js
src/util/menuList.js
+11
-0
No files found.
src/components/oldUser/index.vue
0 → 100644
View file @
3248225d
<
template
>
<div
class=
"user"
v-loading=
"loading"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"80px"
inline
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.old_user_id"
></el-input>
</el-form-item>
<el-form-item
label=
"课程名称"
>
<el-input
v-model=
"searchFrom.course_title"
></el-input>
</el-form-item>
<el-form-item
label=
"手机号"
>
<el-input
v-model=
"searchFrom.mobile"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getUser"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"userList"
style=
"width: 100%"
>
<el-table-column
className=
"f-c"
label=
"用户"
>
<template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.headimgurl"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
old_user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号"
>
</el-table-column>
<el-table-column
prop=
"course_title"
label=
"课程名字"
>
</el-table-column>
<el-table-column
prop=
"start_time"
label=
"开课时间"
sortable
>
</el-table-column>
<el-table-column
label=
"操作"
v-if=
"!$store.state.readonly"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"danger"
@
click=
"deleteOption(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</div>
</template>
<
script
>
import
{
getOldListApi
,
delOldUseApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
export
default
{
name
:
"index"
,
data
(){
return
{
searchFrom
:{
nickName
:
''
,
mobile
:
''
,
level
:
''
,
userId
:
''
},
userList
:[],
total
:
0
,
nowPage
:
1
,
limit
:
10
,
showDetail
:
false
,
showId
:
''
,
loading
:
false
}
},
components
:{
page
,
},
mounted
(){
this
.
getUser
()
},
methods
:{
onPageChange
(
val
){
this
.
nowPage
=
val
this
.
getUser
()
},
onSizeChange
(
val
){
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
getUser
()
},
getUser
(){
let
json
=
{
page
:
this
.
nowPage
,
limit
:
this
.
limit
}
if
(
this
.
searchFrom
.
old_user_id
)
{
json
.
old_user_id
=
this
.
searchFrom
.
old_user_id
}
if
(
this
.
searchFrom
.
course_title
)
{
json
.
course_title
=
this
.
searchFrom
.
course_title
}
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
}
console
.
log
(
json
)
getOldListApi
(
json
).
then
(
res
=>
{
this
.
userList
=
res
.
list
;
this
.
total
=
res
.
total
})
},
deleteOption
(
id
){
this
.
$confirm
(
'确定删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delOldUseApi
(
id
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功'
});
this
.
getUser
();
});
});
},
}
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.avatar {
width: 50px;
margin-right: 5px;
border-radius: 50%;
height: 50px;
}
.user{
height: 100%;
overflow: auto;
padding: 20px 0;
.btn-content{
text-align: center;
}
}
</
style
>
<
style
>
.f-c
>
div
{
display
:
flex
!important
;
flex-flow
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
}
</
style
>
src/components/order/refundDialog.vue
View file @
3248225d
...
...
@@ -88,7 +88,8 @@
if
(
valid
){
let
json
=
{
refund_money
:
parseFloat
(
this
.
form
.
money
)
*
100
,
desc
:
this
.
form
.
desc
desc
:
this
.
form
.
desc
,
refund_type
:
this
.
form
.
refund_type
};
refundApi
(
this
.
dialogObj
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
...
...
src/service/api.js
View file @
3248225d
...
...
@@ -812,3 +812,14 @@ export const getTeacherClassApi = function(json,id) {
return
Vue
.
prototype
.
$fetch
(
`
${
getTeacherClassUrl
}${
id
}
`
,
json
)
}
//老系统用户列表
const
getOldListUrl
=
`/api//admin/student/course/old/sys/`
;
export
const
getOldListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
getOldListUrl
,
json
)
}
//删除老系统用户
const
delOldUseUrl
=
`/api/admin/student/course/old/sys/`
;
export
const
delOldUseApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$del
(
`
${
delOldUseUrl
}${
id
}
`
)
}
src/util/menuList.js
View file @
3248225d
...
...
@@ -101,6 +101,17 @@ export default [{
name
:
'user'
,
component
:
e
=>
require
([
'@/components/user'
],
e
),
}
},
{
value
:
'老系统用户列表'
,
routerName
:
'oldUser'
,
path
:
'/oldUser'
,
cover
:
'3-3'
,
router
:
{
path
:
'/oldUser'
,
name
:
'oldUser'
,
component
:
e
=>
require
([
'@/components/oldUser/'
],
e
),
}
}
]
},
{
...
...
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