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
f0efc191
Commit
f0efc191
authored
Dec 21, 2018
by
chenfenglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户列表查看详情新增编辑备注看课情况
parent
78661c04
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
316 additions
and
38 deletions
+316
-38
entrance.vue
src/components/notBuyClass/entrance.vue
+7
-25
index.vue
src/components/notBuyClass/index.vue
+4
-5
index.vue
src/components/userDetail/index.vue
+299
-6
index.vue
src/components/yunji/index.vue
+6
-2
No files found.
src/components/notBuyClass/entrance.vue
View file @
f0efc191
<
template
>
<el-dialog
:title=
"entranceObj.title"
:visible
.
sync=
"entranceObj.show"
center
width=
"80
%
"
>
width=
"80
0px
"
>
<el-tabs
v-model=
"activeName"
type=
"card"
style=
"line-height:1"
>
<el-tab-pane
label=
"商品名称"
name=
"first"
>
...
...
@@ -49,7 +49,7 @@
</el-dialog>
</
template
>
<
script
>
import
{
getConfigListApi
,
getGoodsListApi
,
getPeriodsApi
,
putConfigApi
,
getDefaultPeriodsApi
,
getLinkApi
}
from
"../../service/api"
;
import
{
getConfigListApi
,
getGoodsListApi
,
getPeriodsApi
,
putConfigApi
,
getDefaultPeriodsApi
}
from
"../../service/api"
;
import
{
GOODSTYPE
}
from
'../../util/wordbook'
;
export
default
{
name
:
"entrance"
,
...
...
@@ -73,8 +73,8 @@
value
:
''
,
},
selectedGoods
:[],
link1
:
"
"
,
link2
:
"
"
,
link1
:
"
https://w.url.cn/s/A45jJYk"
,
//商品链接
link2
:
"
https://w.url.cn/s/AJi1QsS"
,
//期数链接
}
},
mounted
(){
...
...
@@ -102,9 +102,7 @@
this
.
searchFrom2
.
value
=
''
;
}
this
.
searchFrom2
.
value
=
''
;
});
this
.
linkContent1
();
this
.
linkContent2
();
})
},
getGoodsList
(){
let
json
=
{
...
...
@@ -173,6 +171,7 @@
oInput
.
value
=
url
;
document
.
body
.
appendChild
(
oInput
);
oInput
.
select
();
// 选择对象;
console
.
log
(
oInput
.
value
)
document
.
execCommand
(
"Copy"
);
// 执行浏览器复制命令
this
.
$message
({
message
:
'已成功复制到剪切板'
,
...
...
@@ -180,30 +179,13 @@
});
oInput
.
remove
()
},
linkContent1
(){
let
json
=
{
}
json
.
url
=
"https://wechat.changchangenglish.com/api/client/login?goods_id=1%26redirect_url=https://wechat.changchangenglish.com"
getLinkApi
(
json
).
then
(
res
=>
{
this
.
link1
=
res
.
url
;
});
},
linkContent2
(){
let
json
=
{
}
json
.
url
=
"https://wechat.changchangenglish.com/api/client/login?goods_id=1%26redirect_url=https://wechat.changchangenglish.com"
getLinkApi
(
json
).
then
(
res
=>
{
this
.
link2
=
res
.
url
;
});
}
},
watch
:{
'entranceObj.show'
:
function
(
a
){
if
(
a
){
this
.
getPeriodsList
();
this
.
initPage
()
this
.
getGoodsList
();
this
.
getPeriodsList
();
}
}
}
...
...
src/components/notBuyClass/index.vue
View file @
f0efc191
...
...
@@ -11,12 +11,11 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"class_
id"
label=
"班级ID
"
>
<el-table-column
prop=
"class_
name"
label=
"班级名称
"
>
</el-table-column>
<el-table-column
label=
"商品ID/期数ID"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
goods_id
}}
/
{{
scope
.
row
.
periods_id
}}
</
template
>
<el-table-column
label=
"期数标题"
prop=
"periods_name"
>
</el-table-column>
<el-table-column
label=
"商品名称"
prop=
"goods_name"
>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
sortable
>
</el-table-column>
...
...
src/components/userDetail/index.vue
View file @
f0efc191
...
...
@@ -153,9 +153,9 @@
label=
"操作"
width=
"400px"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"showUser(scope.row)"
size=
"mini"
type=
"primary"
>
班级成员
</el-button>
<
!--
<el-button
size=
"mini"
type=
"warning
"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"primary"
>
备注
</el-button>
<el-button
size=
"mini"
type=
"primary"
>
看课情况
</el-button>
--
>
<
el-button
size=
"mini"
type=
"warning"
@
click=
"editPrivilege(scope.row)
"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"onGetUserDescList(scope.row)"
>
备注
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"userLook(scope.row)"
v-if=
"!$store.state.readonly"
>
看课情况
</el-button
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -266,12 +266,147 @@
<source-dialog
:dialogObj=
"sourceDialog"
/>
<refund-detail
:dialogObj=
"refundDetail"
/>
<coupon-dialog
:dialogObj=
"couponDetail"
/>
<!-- 编辑 -->
<el-dialog
:modal=
"false"
:visible
.
sync=
"privilegeDialog.show"
title=
"编辑权限"
>
<el-form
label-width=
"120px"
>
<el-form-item
label=
"是否添加老师"
>
<el-select
v-model=
"privilegeDialog.is_add_teacher"
placeholder=
"请选择"
>
<el-option
v-for=
"(data,index) in isAddTeacherList"
:key=
"index"
:label=
"data.label"
:value=
"data.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"看课权限"
>
<el-switch
v-model=
"privilegeDialog.isAllowView"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"意向等级"
>
<el-input-number
v-model=
"privilegeDialog.weight"
:min=
"0"
:step=
"1"
></el-input-number>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"privilegeDialog.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"changePrivilegeSub()"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 备注 -->
<el-dialog
:modal=
"false"
:visible
.
sync=
"descDialog.show"
title=
"备注列表"
width=
"60%"
>
<el-form
label-width=
"90px"
>
<el-form-item>
<el-button
style=
"float: right"
type=
"primary"
plain
@
click=
"editComment(descDialog.id)"
>
添加备注
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"descDialog.descList"
style=
"width: 100%"
>
<el-table-column
label=
"用户"
className=
"f-c"
min-width=
"150"
>
<
template
slot-scope=
"scope"
v-if=
"descDialog.userInfo"
>
<img
:src=
"descDialog.userInfo.avatar"
style=
"width: 40px;height: 40px;border-radius: 50px"
>
{{
descDialog
.
userInfo
.
nickname
}}
(ID:
{{
descDialog
.
userInfo
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
>
</el-table-column>
<el-table-column
prop=
"operator"
label=
"备注人"
>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
>
</el-table-column>
<el-table-column
prop=
"updated_at"
label=
"更新时间"
>
</el-table-column>
</el-table>
<page-desc
:nowPage=
"descDialog.nowPage"
:total=
"descDialog.total"
:limit=
"descDialog.limit"
@
pageChange=
"onDescDialogPageChange"
@
sizeChange=
"onDescDialogSizeChange"
/>
</el-dialog>
<!-- 看课情况 -->
<el-dialog
:modal=
"false"
:visible
.
sync=
"lookDetail.show"
>
<el-table
v-loading=
"lookDetail.loading"
:data=
"lookDetail.list"
style=
"width: 100%"
>
<el-table-column
prop=
"start_at"
label=
"日期"
>
</el-table-column>
<el-table-column
label=
"爸妈看一看"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.watch_list && scope.row.watch_list.length > 0 && scope.row.watch_list.find(i=>
{return i.page_id === 1})">
{{
scope
.
row
.
watch_list
.
find
(
i
=>
{
return
i
.
page_id
===
1
}
).
stay_time
}}
<
/span
>
<
span
v
-
if
=
"!scope.row.watch_list.find(i=>{return i.page_id === 1
}
)"
>
暂未上课
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"宝贝玩一玩"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
if
=
"scope.row.watch_list && scope.row.watch_list.length > 0 && scope.row.watch_list.find(i=>{return i.page_id === 2
}
)"
>
{{
scope
.
row
.
watch_list
.
find
(
i
=>
{
return
i
.
page_id
===
2
}
).
stay_time
}}
<
/span
>
<
span
v
-
if
=
"!scope.row.watch_list.find(i=>{return i.page_id === 2
}
)"
>
暂未上课
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"爸妈秀宝贝"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
if
=
"scope.row.watch_list && scope.row.watch_list.length > 0 && scope.row.watch_list.find(i=>{return i.page_id === 3
}
)"
>
<
div
v
-
html
=
"scope.row.watch_list.find(i=>{return i.page_id === 3
}
).learn_report"
><
/div
>
<
/span
>
<
span
v
-
if
=
"!scope.row.watch_list.find(i=>{return i.page_id === 3
}
)"
>
暂未秀宝贝
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"多元趣味课"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
if
=
"scope.row.watch_list && scope.row.watch_list.length > 0 && scope.row.watch_list.find(i=>{return i.page_id === 5
}
)"
>
{{
scope
.
row
.
watch_list
.
find
(
i
=>
{
return
i
.
page_id
===
5
}
).
stay_time
}}
<
/span
>
<
span
v
-
if
=
"!scope.row.watch_list.find(i=>{return i.page_id === 5
}
)"
>
暂未上课
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"分享"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
if
=
"scope.row.watch_list && scope.row.watch_list.length > 0 && scope.row.watch_list.find(i=>{return i.page_id === 4
}
)"
>
已分享
<
/span
>
<
span
v
-
if
=
"!scope.row.watch_list.find(i=>{return i.page_id === 4
}
)"
>
暂未分享
<
/span
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
page2
:
nowPage
=
"lookDetail.nowPage"
:
total
=
"lookDetail.total"
:
limit
=
"lookDetail.limit"
@
pageChange
=
"onLookDetailPageChange"
@
sizeChange
=
"onLookDetailSizeChange"
/>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
getOrderListApi
,
getUserDetailApi
,
getPeriodsStatisticsApi
,
getRefundListApi
}
from
"../../service/api"
;
import
{
getOrderListApi
,
getUserDetailApi
,
getPeriodsStatisticsApi
,
getRefundListApi
,
userLookApi
,
getUserDescListApi
,
addPeriodsClassUserDescApi
,
updateUserPrivilegeApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
page2
from
'../framework/page'
import
pageDesc
from
'../framework/page'
import
sourceDialog
from
'../order/sourceDialog'
import
refundDetail
from
'../order/refundDetail'
import
couponDialog
from
'../order/couponDialog'
...
...
@@ -312,7 +447,45 @@
classId
:
''
,
title
:
''
,
show
:
false
,
}
}
,
privilegeDialog
:
{
show
:
false
,
isAllowView
:
false
,
is_add_teacher
:
0
,
weight
:
0
,
id
:
''
}
,
descDialog
:
{
show
:
false
,
descList
:
[],
nowPage
:
1
,
limit
:
10
,
total
:
0
,
userInfo
:
null
}
,
lookDetail
:{
show
:
false
,
loading
:
false
,
list
:[],
nowPage
:
1
,
limit
:
10
,
total
:
0
}
,
isAddTeacherList
:
[
{
label
:
'未加好友'
,
value
:
0
}
,
{
label
:
'老师主动添加用户'
,
value
:
1
}
,
{
label
:
'用户主动添加老师'
,
value
:
2
}
],
}
}
,
components
:{
...
...
@@ -322,6 +495,8 @@
refundDetail
,
sourceDialog
,
couponDialog
,
page2
,
pageDesc
,
}
,
mounted
(){
this
.
id
=
this
.
$route
.
params
.
id
;
...
...
@@ -329,6 +504,39 @@
this
.
getUser
()
}
,
methods
:{
getUserLook
(){
if
(
!
this
.
lookDetail
.
data
)
return
;
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
loading
=
true
;
let
json
=
{
limit
:
this
.
lookDetail
.
limit
,
page
:
this
.
lookDetail
.
nowPage
}
let
data
=
this
.
lookDetail
.
data
;
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
this
.
lookDetail
.
list
=
res
.
list
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
total
=
res
.
total
;
}
)
}
,
onLookDetailPageChange
(
val
){
this
.
lookDetail
.
nowPage
=
val
this
.
getUserLook
();
}
,
onLookDetailSizeChange
(
val
){
this
.
lookDetail
.
limit
=
val
this
.
lookDetail
.
nowPage
=
1
;
this
.
getUserLook
();
}
,
onDescDialogPageChange
(
val
){
this
.
descDialog
.
nowPage
=
val
this
.
getUserDescList
()
}
,
onDescDialogSizeChange
(
val
){
this
.
descDialog
.
limit
=
val
this
.
descDialog
.
nowPage
=
1
;
this
.
getUserDescList
()
}
,
showRef
(
data
){
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
...
...
@@ -414,7 +622,92 @@
teacherId
:
data
.
teacher_id
,
periods_id
:
data
.
periods_id
}
}
}
,
//编辑备注 看课情况
editPrivilege
(
val
){
this
.
privilegeDialog
=
{
id
:
val
.
id
,
isAllowView
:
val
.
is_view_course
===
1
,
is_add_teacher
:
val
.
is_add_teacher
?
val
.
is_add_teacher
:
0
,
weight
:
val
.
weight
?
val
.
weight
:
0
,
show
:
true
}
}
,
onGetUserDescList
(
val
){
this
.
descDialog
.
show
=
true
;
this
.
descDialog
.
userInfo
=
{
user_id
:
val
.
user_id
,
avatar
:
this
.
detail
.
avatar
,
nickname
:
this
.
detail
.
nickname
}
;
this
.
descDialog
.
id
=
val
.
id
;
this
.
getUserDescList
();
}
,
getUserDescList
(){
let
json
=
{
page
:
this
.
descDialog
.
nowPage
,
limit
:
this
.
descDialog
.
limit
}
;
getUserDescListApi
(
this
.
descDialog
.
id
,
json
).
then
(
res
=>
{
this
.
descDialog
.
descList
=
res
.
list
;
this
.
descDialog
.
total
=
res
.
total
;
}
)
}
,
userLook
(
data
){
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
loading
=
true
;
let
json
=
{
limit
:
this
.
lookDetail
.
limit
,
page
:
this
.
lookDetail
.
nowPage
}
this
.
lookDetail
.
data
=
{
periods_id
:
data
.
periods_id
,
user_id
:
data
.
user_id
}
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
this
.
lookDetail
.
list
=
res
.
list
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
total
=
res
.
total
;
}
)
}
,
editComment
(
id
)
{
this
.
$prompt
(
''
,
'添加备注'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputValue
:
''
}
).
then
(({
value
}
)
=>
{
addPeriodsClassUserDescApi
(
id
,{
desc
:
value
}
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑备注成功'
}
)
this
.
getUserDescList
();
}
);
}
)
}
,
changePrivilegeSub
(){
this
.
$confirm
(
'此操作将修改用户权限?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
let
_json
=
{
is_view_course
:
this
.
privilegeDialog
.
isAllowView
?
1
:
0
,
is_add_teacher
:
this
.
privilegeDialog
.
is_add_teacher
,
weight
:
this
.
privilegeDialog
.
weight
}
updateUserPrivilegeApi
(
this
.
privilegeDialog
.
id
,
_json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
}
);
this
.
privilegeDialog
.
show
=
false
;
// this.getUser()
this
.
getDetail
()
}
);
}
);
}
,
}
,
filters
:{
payMentFilter
(
val
){
...
...
src/components/yunji/index.vue
View file @
f0efc191
...
...
@@ -74,13 +74,17 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"mobile"
prop=
"receiver_name"
label=
"姓名"
>
</el-table-column>
<el-table-column
prop=
"receiver_phone"
label=
"手机号"
>
</el-table-column>
<el-table-column
label=
"收货地址"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
receiver_
name
}}
{{
scope
.
row
.
receiver_phone
}}
{{
scope
.
row
.
receiver_
province
}}
{{
scope
.
row
.
receiver_city
}}
{{
scope
.
row
.
receiver_area
}}
{{
scope
.
row
.
receiver_address
}}
{{
scope
.
row
.
receiver_province
}}
{{
scope
.
row
.
receiver_city
}}
{{
scope
.
row
.
receiver_area
}}
{{
scope
.
row
.
receiver_address
}}
</
template
>
</el-table-column>
<el-table-column
...
...
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