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
59917b0d
Commit
59917b0d
authored
Sep 16, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式化
parent
c8a450eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
824 additions
and
760 deletions
+824
-760
userList.vue
src/components/class/userList.vue
+776
-742
role.vue
src/components/system/role.vue
+48
-18
No files found.
src/components/class/userList.vue
View file @
59917b0d
<
template
>
<div>
<el-dialog
:title=
"userObj.title"
:visible
.
sync=
"userObj.show"
:modal=
"false"
:fullscreen=
"true"
>
<div>
<el-form
label-width=
"120px"
inline
>
<el-form-item
label=
"课程开课时间"
>
<el-date-picker
type=
"daterange"
v-model=
"timeLang"
range-separator=
"至"
value-format=
"yyyy-MM-dd"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"searchList2()"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
/>
</el-form-item>
<el-form-item
label=
"是否添加老师"
>
<el-select
v-model=
"searchFrom.is_add_teacher"
placeholder=
"请选择"
@
change=
"searchList2()"
clearable
>
<el-option
label=
"老师主动添加"
:value=
"1"
>
</el-option>
<el-option
label=
"用户主动添加"
:value=
"2"
>
</el-option>
<el-option
label=
"待通过"
:value=
"3"
>
</el-option>
<el-option
label=
"手机号不是微信号"
:value=
"4"
>
</el-option>
<el-option
label=
"用户已拒绝"
:value=
"5"
>
</el-option>
<el-option
label=
"暂未处理"
:value=
"0"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"是否可看课"
>
<el-select
v-model=
"searchFrom.is_view_course"
placeholder=
"请选择"
@
change=
"searchList2()"
>
<el-option
label=
"全部"
value=
""
>
</el-option>
<el-option
label=
"是"
value=
"1"
>
</el-option>
<el-option
label=
"否"
value=
"0"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"searchList2(classUserLimit)"
>
搜索
</el-button>
<el-button
type=
"success"
@
click=
"changeClass"
v-if=
"!$store.state.readonly"
>
切换班级
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"$store.state.orderRefund&&userObj.type==2&&userObj.watch_num
<60
&&!$
store
.
state
.
classManageUnlimited
"
>
+添加用户
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"$store.state.classManage&&userObj.type==1&&userObj.watch_num
<60
&&!$
store
.
state
.
classTakeUnlimited
"
>
+添加用户
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"$store.state.classTakeUnlimited&&userObj.type==1"
>
+添加用户
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"$store.state.classManageUnlimited&&userObj.type==2"
>
+添加用户
</el-button>
<el-button
type=
"primary"
@
click=
"exportTable(userTable)"
v-if=
"$store.state.export"
>
导出
</el-button>
<el-button
type=
"success"
@
click=
"onRank()"
>
看课排行
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"[statistics]"
border
size=
"mini"
style=
"width: 100%;margin: 20px 0"
>
<el-table-column
label=
"到课率"
:render-header=
"rendertip"
>
<template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
arrive_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"看课率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
watch_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"完课率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"打卡率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
clock_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"全勤打卡率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_clock_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"转化率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
transform_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"老师主动添加用户数"
prop=
"teacher_add_user_num"
>
</el-table-column>
<el-table-column
label=
"用户主动添加老师数"
prop=
"user_add_teacher_num"
>
</el-table-column>
</el-table>
<el-table
:data=
"userTable"
v-loading=
"loadingFlag"
size=
"mini"
@
selection-change=
"handleSelectionChange123"
style=
"width: 100%"
fixed
>
<el-table-column
type=
"selection"
width=
"30"
>
</el-table-column>
<el-table-column
width=
"120"
label=
"沟通情况"
>
<
template
slot-scope=
"scope"
>
<teacher-desc
:row=
"scope.row"
:typeFlag=
"true"
:descType=
"2"
@
onSuccess=
"searchList()"
></teacher-desc>
</
template
>
</el-table-column>
<el-table-column
label=
"用户"
className=
"f-c"
min-width=
"180"
sortable
prop=
"user_id"
>
<
template
slot-scope=
"scope"
>
<img
:src=
"scope.row.avatar"
style=
"width: 40px;min-width:40px;height: 40px;border-radius: 50px"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
<br>
Tel:
{{
scope
.
row
.
mobile
}}
</
template
>
</el-table-column>
<el-table-column
label=
"看课权限"
v-if=
"!userObj.classPage"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.is_view_course"
size=
"mini"
@
change=
"changeView(scope.row)"
>
<el-option
label=
"否"
:value=
"0"
>
</el-option>
<el-option
label=
"是"
:value=
"1"
>
</el-option>
</el-select>
</
template
>
<!-- classPage -->
</el-table-column>
<el-table-column
label=
"看课权限"
v-if=
"userObj.classPage"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_view_course
==
1
?
'是'
:
'否'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"时间"
sortable
min-width=
"200"
prop=
"last_login_at"
>
<
template
slot-scope=
"scope"
>
最后登录:
{{
scope
.
row
.
last_login_at
}}
<br>
进班时间:
{{
scope
.
row
.
created_at
}}
</
template
>
</el-table-column>
<el-table-column
label=
"看课率"
sortable
prop=
"watch_course_rate"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
watch_course_rate
|
percent
}}
</
template
>
</el-table-column>
<el-table-column
label=
"看课次数"
sortable
prop=
"watch_course_num"
min-width=
"95"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
watch_course_num
}}
</
template
>
</el-table-column>
<el-table-column
label=
"学习时长(分)"
sortable
min-width=
"120"
prop=
"watch_course_time"
>
<
template
slot-scope=
"scope"
>
{{
Math
.
round
(
scope
.
row
.
watch_course_time
/
60
*
100
)
/
100
}}
</
template
>
</el-table-column>
<el-table-column
label=
"打卡率"
sortable
prop=
"clock_rate"
min-width=
"80"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
clock_rate
|
percent
}}
</
template
>
</el-table-column>
<el-table-column
label=
"续费情况"
sortable
prop=
"is_continue_buy"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_continue_buy
|
isOrNot
}}
</
template
>
</el-table-column>
<el-table-column
label=
"是否添加老师"
min-width=
"155"
sortable
prop=
"is_add_teacher"
v-if=
"!userObj.classPage"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.is_add_teacher"
size=
"mini"
@
change=
"changeAddTeacher(scope.row)"
>
<div>
<el-dialog
:title=
"userObj.title"
:visible
.
sync=
"userObj.show"
:modal=
"false"
:fullscreen=
"true"
>
<div>
<el-form
label-width=
"120px"
inline
>
<el-form-item
label=
"课程开课时间"
>
<el-date-picker
type=
"daterange"
v-model=
"timeLang"
range-separator=
"至"
value-format=
"yyyy-MM-dd"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"searchList2()"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
/>
</el-form-item>
<el-form-item
label=
"是否添加老师"
>
<el-select
v-model=
"searchFrom.is_add_teacher"
placeholder=
"请选择"
@
change=
"searchList2()"
clearable
>
<el-option
label=
"老师主动添加"
:value=
"1"
>
</el-option>
<el-option
label=
"用户主动添加"
:value=
"2"
>
...
...
@@ -206,329 +32,521 @@
<el-option
label=
"暂未处理"
:value=
"0"
>
</el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"是否添加老师"
min-width=
"155"
sortable
prop=
"is_add_teacher"
v-if=
"userObj.classPage"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_add_teacher
|
isteacher
}}
</
template
>
</el-table-column>
<el-table-column
label=
"意向等级"
sortable
min-width=
"95"
prop=
"weight"
v-if=
"userObj.classPage"
>
</el-form-item>
<el-form-item
label=
"是否可看课"
>
<el-select
v-model=
"searchFrom.is_view_course"
placeholder=
"请选择"
@
change=
"searchList2()"
>
<el-option
label=
"全部"
value=
""
>
</el-option>
<el-option
label=
"是"
value=
"1"
>
</el-option>
<el-option
label=
"否"
value=
"0"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"searchList2(classUserLimit)"
>
搜索
</el-button>
<el-button
type=
"success"
@
click=
"changeClass"
v-if=
"!$store.state.readonly"
>
切换班级
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"$store.state.orderRefund&&userObj.type==2&&userObj.watch_num
<60
&&!$
store
.
state
.
classManageUnlimited
"
>
+添加用户
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"$store.state.classManage&&userObj.type==1&&userObj.watch_num
<60
&&!$
store
.
state
.
classTakeUnlimited
"
>
+添加用户
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"$store.state.classTakeUnlimited&&userObj.type==1"
>
+添加用户
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"$store.state.classManageUnlimited&&userObj.type==2"
>
+添加用户
</el-button>
<el-button
type=
"primary"
@
click=
"exportTable(userTable)"
v-if=
"$store.state.export"
>
导出
</el-button>
<el-button
type=
"success"
@
click=
"onRank()"
>
看课排行
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"[statistics]"
border
size=
"mini"
style=
"width: 100%;margin: 20px 0"
>
<el-table-column
label=
"到课率"
:render-header=
"rendertip"
>
<template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
arrive_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"看课率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
watch_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"完课率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_course_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"打卡率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
clock_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"全勤打卡率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
over_clock_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"转化率"
:render-header=
"rendertip"
>
<
template
slot-scope=
"scope2"
>
<span>
{{
scope2
.
row
.
transform_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"老师主动添加用户数"
prop=
"teacher_add_user_num"
>
</el-table-column>
<el-table-column
label=
"用户主动添加老师数"
prop=
"user_add_teacher_num"
>
</el-table-column>
</el-table>
<el-table
:data=
"userTable"
v-loading=
"loadingFlag"
size=
"mini"
@
selection-change=
"handleSelectionChange123"
style=
"width: 100%"
fixed
>
<el-table-column
type=
"selection"
width=
"30"
>
</el-table-column>
<el-table-column
width=
"120"
label=
"沟通情况"
>
<
template
slot-scope=
"scope"
>
<teacher-desc
:row=
"scope.row"
:typeFlag=
"true"
:descType=
"2"
@
onSuccess=
"searchList()"
></teacher-desc>
</
template
>
</el-table-column>
<el-table-column
label=
"用户"
className=
"f-c"
min-width=
"180"
sortable
prop=
"user_id"
>
<
template
slot-scope=
"scope"
>
<img
:src=
"scope.row.avatar"
style=
"width: 40px;min-width:40px;height: 40px;border-radius: 50px"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
<br>
Tel:
{{
scope
.
row
.
mobile
}}
</
template
>
</el-table-column>
<el-table-column
label=
"看课权限"
v-if=
"!userObj.classPage"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.is_view_course"
size=
"mini"
@
change=
"changeView(scope.row)"
>
<el-option
label=
"否"
:value=
"0"
></el-option>
<el-option
label=
"是"
:value=
"1"
></el-option>
</el-select>
</
template
>
<!-- classPage -->
</el-table-column>
<el-table-column
label=
"看课权限"
v-if=
"userObj.classPage"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_view_course
==
1
?
'是'
:
'否'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"时间"
sortable
min-width=
"200"
prop=
"last_login_at"
>
<
template
slot-scope=
"scope"
>
最后登录:
{{
scope
.
row
.
last_login_at
}}
<br>
进班时间:
{{
scope
.
row
.
created_at
}}
</
template
>
</el-table-column>
<el-table-column
label=
"看课率"
sortable
prop=
"watch_course_rate"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
watch_course_rate
|
percent
}}
</
template
>
</el-table-column>
<el-table-column
label=
"看课次数"
sortable
prop=
"watch_course_num"
min-width=
"95"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
watch_course_num
}}
</
template
>
</el-table-column>
<el-table-column
label=
"学习时长(分)"
sortable
min-width=
"120"
prop=
"watch_course_time"
>
<
template
slot-scope=
"scope"
>
{{
Math
.
round
(
scope
.
row
.
watch_course_time
/
60
*
100
)
/
100
}}
</
template
>
</el-table-column>
<el-table-column
label=
"打卡率"
sortable
prop=
"clock_rate"
min-width=
"80"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
clock_rate
|
percent
}}
</
template
>
</el-table-column>
<el-table-column
label=
"续费情况"
sortable
prop=
"is_continue_buy"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_continue_buy
|
isOrNot
}}
</
template
>
</el-table-column>
<el-table-column
label=
"是否添加老师"
min-width=
"155"
sortable
prop=
"is_add_teacher"
v-if=
"!userObj.classPage"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.is_add_teacher"
size=
"mini"
@
change=
"changeAddTeacher(scope.row)"
>
<el-option
label=
"老师主动添加"
:value=
"1"
>
</el-option>
<el-option
label=
"用户主动添加"
:value=
"2"
>
</el-option>
<el-option
label=
"待通过"
:value=
"3"
>
</el-option>
<el-option
label=
"手机号不是微信号"
:value=
"4"
>
</el-option>
<el-option
label=
"用户已拒绝"
:value=
"5"
>
</el-option>
<el-option
label=
"暂未处理"
:value=
"0"
>
</el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"是否添加老师"
min-width=
"155"
sortable
prop=
"is_add_teacher"
v-if=
"userObj.classPage"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_add_teacher
|
isteacher
}}
</
template
>
</el-table-column>
<el-table-column
label=
"意向等级"
sortable
min-width=
"95"
prop=
"weight"
v-if=
"userObj.classPage"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
weight
|
userWeightf
}}
<!--
<user-weight
:row=
"scope.row"
@
onSuccess=
"searchList"
></user-weight>
-->
</
template
>
</el-table-column>
<el-table-column
label=
"意向等级"
sortable
min-width=
"95"
prop=
"weight"
v-if=
"!userObj.classPage"
>
</el-table-column>
<el-table-column
label=
"意向等级"
sortable
min-width=
"95"
prop=
"weight"
v-if=
"!userObj.classPage"
>
<
template
slot-scope=
"scope"
>
<user-weight
:row=
"scope.row"
@
onSuccess=
"searchList"
></user-weight>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"200"
>
<div
style=
"text-align: center"
>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"showSourceByDate(scope.row)"
>
看课情况
</el-button>
<el-button
type=
"danger"
size=
"mini"
plain
@
click=
"onDel(scope.row)"
v-if=
"$store.state.deletePermission && !$store.state.readonly"
>
删除
</el-button>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<div
style=
"text-align: center"
>
<el-pagination
@
size-change=
"searchList"
:page-sizes=
"[20,50,100,200,500,1000]"
:page-size=
"classUserLimit"
:current-page
.
sync=
"classUserNowPage"
layout=
"total , sizes, prev, pager, next, jumper"
:total=
"classUserTotal"
>
</el-pagination>
</el-table-column>
<el-table-column
label=
"操作"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"200"
>
<div
style=
"text-align: center"
>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"showSourceByDate(scope.row)"
>
看课情况
</el-button>
<el-button
type=
"danger"
size=
"mini"
plain
@
click=
"onDel(scope.row)"
v-if=
"$store.state.deletePermission && !$store.state.readonly"
>
删除
</el-button>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<div
style=
"text-align: center"
>
<el-pagination
@
size-change=
"searchList"
:page-sizes=
"[20,50,100,200,500,1000]"
:page-size=
"classUserLimit"
:current-page
.
sync=
"classUserNowPage"
layout=
"total , sizes, prev, pager, next, jumper"
:total=
"classUserTotal"
>
</el-pagination>
</div>
</div>
</div>
<el-dialog
:modal=
"false"
:visible
.
sync=
"addShow"
>
<el-form
label-width=
"90px"
>
<!--<el-form-item label="用户id">-->
<el-dialog
:modal=
"false"
:visible
.
sync=
"addShow"
>
<el-form
label-width=
"90px"
>
<!--<el-form-item label="用户id">-->
<!--<el-input v-model="addId"></el-input>-->
<!--</el-form-item>-->
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"ID"
>
<el-input
v-model=
"searchFrom.userId"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"昵称"
>
<el-input
v-model=
"searchFrom.nickName"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"电话"
>
<el-input
v-model=
"searchFrom.mobile"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
:offset=
"16"
>
<el-form-item>
<el-button
style=
"float: right"
type=
"primary"
plain
@
click=
"getUser"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data=
"userList"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
style=
"width: 100%"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
className=
"f-c"
label=
"用户"
>
<
template
slot-scope=
"scope"
>
<img
style=
"margin-right:5px;width: 50px;height: 50px;border-radius: 50px"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号"
>
</el-table-column>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<span
slot=
"footer"
class=
"dialog-footer"
>
<!--</el-form-item>-->
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"ID"
>
<el-input
v-model=
"searchFrom.userId"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"昵称"
>
<el-input
v-model=
"searchFrom.nickName"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"电话"
>
<el-input
v-model=
"searchFrom.mobile"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
:offset=
"16"
>
<el-form-item>
<el-button
style=
"float: right"
type=
"primary"
plain
@
click=
"getUser"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data=
"userList"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
style=
"width: 100%"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
className=
"f-c"
label=
"用户"
>
<
template
slot-scope=
"scope"
>
<img
style=
"margin-right:5px;width: 50px;height: 50px;border-radius: 50px"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号"
>
</el-table-column>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"addShow = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"onAdd"
>
确 定
</el-button>
</span>
</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"
>
</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
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"
>
<
/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
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"
>
<
/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
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"
>
<
/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
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"
>
<
/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
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
>
<
el
-
dialog
:
modal
=
"false"
:
visible
.
sync
=
"changeClassObj.show"
title
=
"切换班级"
>
<
el
-
form
>
<
el
-
form
-
item
>
<
el
-
cascader
:
options
=
"changeClassObj.periods_list"
:
props
=
"{value:'id',label:'title'
}
"
@
active
-
item
-
change
=
"handleItemChange"
@
change
=
"changePeriods"
v
-
model
=
"changeClassObj.selectedGoods"
>
<
/el-cascader
>
<
/el-form-item
>
<
/el-form
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
page2
:
nowPage
=
"lookDetail.nowPage"
:
total
=
"lookDetail.total"
:
limit
=
"lookDetail.limit"
@
pageChange
=
"onLookDetailPageChange"
@
sizeChange
=
"onLookDetailSizeChange"
/>
<
/el-dialog
>
<
el
-
dialog
:
modal
=
"false"
:
visible
.
sync
=
"changeClassObj.show"
title
=
"切换班级"
>
<
el
-
form
>
<
el
-
form
-
item
>
<
el
-
cascader
:
options
=
"changeClassObj.periods_list"
:
props
=
"{value:'id',label:'title'
}
"
@
active
-
item
-
change
=
"handleItemChange"
@
change
=
"changePeriods"
v
-
model
=
"changeClassObj.selectedGoods"
>
<
/el-cascader
>
<
/el-form-item
>
<
/el-form
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"changeClassObj.show = false"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"changeClassSub()"
>
确
定
<
/el-button
>
<
/span
>
<
/el-dialog
>
<
el
-
dialog
:
modal
=
"false"
width
=
"1100px"
:
visible
.
sync
=
"rank.show"
title
=
"看课排行"
>
<
el
-
form
label
-
width
=
"100px"
inline
>
<
el
-
form
-
item
label
=
"看课时间"
>
<
el
-
date
-
picker
type
=
"daterange"
v
-
model
=
"timerank"
range
-
separator
=
"至"
value
-
format
=
"yyyy-MM-dd"
start
-
placeholder
=
"开始日期"
end
-
placeholder
=
"结束日期"
@
change
=
"onRank()"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"排名人数"
>
<
el
-
input
style
=
"width:100px;"
v
-
model
=
"rankParams.limit"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"排名类型"
>
<
el
-
select
style
=
"width:100px;"
v
-
model
=
"rankParams.type"
placeholder
=
"请选择"
@
change
=
"onRank()"
>
<
el
-
option
label
=
"按天数"
value
=
"day"
>
<
/el-option
>
<
el
-
option
label
=
"按时长"
value
=
"time"
>
<
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
>
<
el
-
button
type
=
"primary"
@
click
=
"onRank()"
>
搜索
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
el
-
table
border
size
=
"mini"
style
=
"display: block;margin: 20px auto;background: transparent"
:
data
=
"rank.list"
>
<
el
-
table
-
column
label
=
"排名"
type
=
"index"
<
/el-dialog
>
<
el
-
dialog
:
modal
=
"false"
width
=
"1100px"
:
visible
.
sync
=
"rank.show"
title
=
"看课排行"
>
<
el
-
form
label
-
width
=
"100px"
inline
>
<
el
-
form
-
item
label
=
"看课时间"
>
<
el
-
date
-
picker
type
=
"daterange"
v
-
model
=
"timerank"
range
-
separator
=
"至"
value
-
format
=
"yyyy-MM-dd"
start
-
placeholder
=
"开始日期"
end
-
placeholder
=
"结束日期"
@
change
=
"onRank()"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"排名人数"
>
<
el
-
input
style
=
"width:100px;"
v
-
model
=
"rankParams.limit"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"排名类型"
>
<
el
-
select
style
=
"width:100px;"
v
-
model
=
"rankParams.type"
placeholder
=
"请选择"
@
change
=
"onRank()"
>
<
el
-
option
label
=
"按天数"
value
=
"day"
>
<
/el-option
>
<
el
-
option
label
=
"按时长"
value
=
"time"
>
<
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
>
<
el
-
button
type
=
"primary"
@
click
=
"onRank()"
>
搜索
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
el
-
table
border
size
=
"mini"
style
=
"display: block;margin: 20px auto;background: transparent"
:
data
=
"rank.list"
>
<
el
-
table
-
column
label
=
"排名"
type
=
"index"
>
<
/el-table-column
>
<
el
-
table
-
column
className
=
"f-c"
label
=
"用户"
>
<
template
slot
-
scope
=
"scope"
>
<
img
class
=
"avatar"
:
src
=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
(
ID
:{{
scope
.
row
.
user_id
}}
)
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"总天数"
prop
=
"total_day"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"总时长(分)"
prop
=
"total_time"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
total_time
/
60
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"手机号"
prop
=
"mobile"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"最后登录时间"
prop
=
"last_login_at"
>
<
/el-table-column
>
<
/el-table
>
<
/el-dialog
>
<
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-table-column
>
<
el
-
table
-
column
className
=
"f-c"
label
=
"用户"
>
<
template
slot
-
scope
=
"scope"
>
<
img
class
=
"avatar"
:
src
=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
(
ID
:{{
scope
.
row
.
user_id
}}
)
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"总天数"
prop
=
"total_day"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"总时长(分)"
prop
=
"total_time"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
total_time
/
60
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"手机号"
prop
=
"mobile"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"最后登录时间"
prop
=
"last_login_at"
>
<
/el-table-column
>
<
/el-table
>
<
/el-dialog
>
<
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
=
"沟通情况列表"
>-->
<
/el-dialog
>
<!--
<
el
-
dialog
:
modal
=
"false"
:
visible
.
sync
=
"descDialog.show"
title
=
"沟通情况列表"
>-->
<!--
<
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
-
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>--
>
<!--
:
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>--
>
<!--
<
page
-
desc
:
nowPage
=
"descDialog.nowPage"
:
total
=
"descDialog.total"
:
limit
=
"descDialog.limit"
@
pageChange
=
"onDescDialogPageChange"
@
sizeChange
=
"onDescDialogSizeChange"
/>-->
<!--
<
/el-dialog>--
>
<
/el-dialog
>
<
sourceByDateDialog
:
dialogObj
=
sourceByDateDialogJson
ref
=
"sourceByDateDialogDom"
><
/sourceByDateDialog
>
<!--
<
/el-dialog>--
>
<
/el-dialog
>
<
sourceByDateDialog
:
dialogObj
=
sourceByDateDialogJson
ref
=
"sourceByDateDialogDom"
><
/sourceByDateDialog
>
<
/div
>
<
/template
>
<
script
>
import
{
getLookRankApi
,
addClassUesrApi
,
editUserViewCourseApi
,
editUserWeightApi
,
changeAddTeacherApi
,
getClassUserApi
,
changeUserApi
,
delClassUserApi
,
getUserListApi
,
addPeriodsClassUserDescApi
,
getClassStatisticsApi
,
userLookApi
,
getPeriodsApi
,
changeClassApi
,
getClassListApi
,
addUserTeacherApi
,
getUserDescListApi
,
updateUserPrivilegeApi
,
teacherBindUserApi
,
getJoinNumApi
,
exportExcelApi
}
from
"../../service/api"
;
import
{
getLookRankApi
,
addClassUesrApi
,
editUserViewCourseApi
,
editUserWeightApi
,
changeAddTeacherApi
,
getClassUserApi
,
changeUserApi
,
delClassUserApi
,
getUserListApi
,
addPeriodsClassUserDescApi
,
getClassStatisticsApi
,
userLookApi
,
getPeriodsApi
,
changeClassApi
,
getClassListApi
,
addUserTeacherApi
,
getUserDescListApi
,
updateUserPrivilegeApi
,
teacherBindUserApi
,
getJoinNumApi
,
exportExcelApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
page2
from
'../framework/page'
import
pageDesc
from
'../framework/page'
...
...
@@ -536,75 +554,76 @@
import
teacherDesc
from
'../framework/teacherDesc'
import
userWeight
from
'../framework/userWeight'
import
sourceByDateDialog
from
'../teacherDetail/sourceByDateDialog'
import
{
tipArr
}
from
"../../util/tipArr"
;
import
{
tipArr
}
from
"../../util/tipArr"
;
export
default
{
name
:
"userList"
,
props
:[
props
:
[
'userObj'
],
data
(){
data
()
{
let
nowDate
=
this
.
formatTime
(
new
Date
());
return
{
nowDate
:
nowDate
,
rank
:{
show
:
false
,
list
:[]
nowDate
:
nowDate
,
rank
:
{
show
:
false
,
list
:
[]
}
,
rankParams
:{
type
:
'time'
,
start_date
:
''
,
end_date
:
''
,
limit
:
10
rankParams
:
{
type
:
'time'
,
start_date
:
''
,
end_date
:
''
,
limit
:
10
}
,
sourceByDateDialogJson
:{
}
,
userTable
:[],
addId
:
''
,
loadingFlag
:
false
,
statistics
:{
arrive_course_rate
:
0
,
clock_rate
:
0
,
over_clock_rate
:
0
,
over_course_rate
:
0
,
over_work_rate
:
0
,
transform_rate
:
0
,
watch_course_rate
:
0
,
work_rate
:
0
,
teacher_add_user_num
:
0
,
user_add_teacher_num
:
0
sourceByDateDialogJson
:
{
}
,
userTable
:
[],
addId
:
''
,
loadingFlag
:
false
,
statistics
:
{
arrive_course_rate
:
0
,
clock_rate
:
0
,
over_clock_rate
:
0
,
over_course_rate
:
0
,
over_work_rate
:
0
,
transform_rate
:
0
,
watch_course_rate
:
0
,
work_rate
:
0
,
teacher_add_user_num
:
0
,
user_add_teacher_num
:
0
}
,
lookDetail
:{
show
:
false
,
loading
:
false
,
list
:[],
lookDetail
:
{
show
:
false
,
loading
:
false
,
list
:
[],
nowPage
:
1
,
limit
:
5
,
total
:
0
total
:
0
}
,
classUserLimit
:
20
,
classUserTotal
:
0
,
classUserNowPage
:
1
,
changeClassObj
:{
show
:
false
,
new_periods_id
:
''
,
new_class_id
:
''
,
periods_user_class_id
:
''
,
periods_list
:[],
selectedGoods
:[]
classUserLimit
:
20
,
classUserTotal
:
0
,
classUserNowPage
:
1
,
changeClassObj
:
{
show
:
false
,
new_periods_id
:
''
,
new_class_id
:
''
,
periods_user_class_id
:
''
,
periods_list
:
[],
selectedGoods
:
[]
}
,
selectUserList
:[],
addShow
:
false
,
selectUserList
:
[],
addShow
:
false
,
userList
:
[],
nowPage
:
1
,
limit
:
1000
,
total
:
0
,
timeLang
:[],
timerank
:[],
total
:
0
,
timeLang
:
[],
timerank
:
[],
searchFrom
:
{
user_id
:
''
,
user_id
:
''
,
is_add_teacher
:
''
,
is_view_course
:
''
,
start_at
:
''
,
end_at
:
''
start_at
:
''
,
end_at
:
''
}
,
multipleSelection
:
[],
descDialog
:
{
...
...
@@ -612,7 +631,7 @@
descList
:
[],
nowPage
:
1
,
limit
:
10
,
total
:
0
,
total
:
0
,
userInfo
:
null
}
,
privilegeDialog
:
{
...
...
@@ -651,7 +670,7 @@
isBindUser
:
false
}
}
,
components
:{
components
:
{
page
,
page2
,
teacherDesc
,
...
...
@@ -659,178 +678,180 @@
pageDesc
,
sourceByDateDialog
}
,
filters
:{
isOrNot
(
value
){
filters
:
{
isOrNot
(
value
)
{
return
ISORNOT
[
value
]
}
,
percent
(
val
){
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
percent
(
val
)
{
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
}
,
isteacher
(
val
){
isteacher
(
val
)
{
// console.log(val)
// debugger
if
(
val
==
1
)
{
if
(
val
==
1
)
{
return
'老师主动添加'
}
else
if
(
val
==
2
)
{
}
else
if
(
val
==
2
)
{
return
'用户主动添加'
}
else
if
(
val
==
3
)
{
}
else
if
(
val
==
3
)
{
return
'待通过'
}
else
if
(
val
==
4
)
{
}
else
if
(
val
==
4
)
{
return
'手机号不是微信号'
}
else
if
(
val
==
5
)
{
}
else
if
(
val
==
5
)
{
return
'用户已拒绝'
}
else
if
(
val
==
0
)
{
}
else
if
(
val
==
0
)
{
return
'暂未处理'
}
}
,
userWeightf
(
val
){
userWeightf
(
val
)
{
console
.
log
(
val
)
if
(
val
==
1
)
{
if
(
val
==
1
)
{
return
'1'
}
else
if
(
val
==
2
)
{
}
else
if
(
val
==
2
)
{
return
'2'
}
else
if
(
val
==
3
)
{
}
else
if
(
val
==
3
)
{
return
'3'
}
else
if
(
val
==
100
)
{
}
else
if
(
val
==
100
)
{
return
'无法成为意向'
}
else
{
}
else
{
return
'默认'
}
}
}
,
methods
:{
rendertip
(
h
,
{
column
}
)
{
// common.tipFilter(h,column,tipArr2)
return
h
(
"span"
,
[
h
(
"span"
,
column
.
label
),
h
(
"el-tooltip"
,
{
props
:
{
effect
:
"dark"
,
content
:
tipArr
[
column
.
label
],
placement
:
"top"
}
}
,
[
h
(
"i"
,
{
class
:
"el-icon-question"
,
style
:
"color:#409eff;display:block;"
}
)
]
)
]);
}
,
onRank
(){
methods
:
{
rendertip
(
h
,
{
column
}
)
{
// common.tipFilter(h,column,tipArr2)
return
h
(
"span"
,
[
h
(
"span"
,
column
.
label
),
h
(
"el-tooltip"
,
{
props
:
{
effect
:
"dark"
,
content
:
tipArr
[
column
.
label
],
placement
:
"top"
}
}
,
[
h
(
"i"
,
{
class
:
"el-icon-question"
,
style
:
"color:#409eff;display:block;"
}
)
]
)
]);
}
,
onRank
()
{
console
.
log
(
this
.
timerank
)
let
json
=
{
}
if
(
this
.
timerank
&&
this
.
timerank
.
length
>
1
)
{
if
(
this
.
timerank
&&
this
.
timerank
.
length
>
1
)
{
json
.
start_at
=
this
.
timerank
[
0
];
json
.
end_at
=
this
.
timerank
[
1
];
}
if
(
this
.
rankParams
.
type
)
{
if
(
this
.
rankParams
.
type
)
{
json
.
type
=
this
.
rankParams
.
type
}
if
(
this
.
rankParams
.
start_date
)
{
if
(
this
.
rankParams
.
start_date
)
{
json
.
start_date
=
this
.
rankParams
.
start_date
}
if
(
this
.
rankParams
.
end_date
)
{
if
(
this
.
rankParams
.
end_date
)
{
json
.
end_date
=
this
.
rankParams
.
end_date
}
if
(
this
.
rankParams
.
limit
)
{
if
(
this
.
rankParams
.
limit
)
{
json
.
limit
=
this
.
rankParams
.
limit
}
getLookRankApi
(
this
.
userObj
.
classId
,
json
).
then
(
res
=>
{
getLookRankApi
(
this
.
userObj
.
classId
,
json
).
then
(
res
=>
{
this
.
rank
.
show
=
true
this
.
rank
.
list
=
res
// console.log(res)
}
)
}
,
showSourceByDate
(
row
){
this
.
sourceByDateDialogJson
=
{
"periods_id"
:
row
.
periods_id
,
"user_id"
:
row
.
user_id
,
json
:{
showSourceByDate
(
row
)
{
this
.
sourceByDateDialogJson
=
{
"periods_id"
:
row
.
periods_id
,
"user_id"
:
row
.
user_id
,
json
:
{
limit
:
10
,
page
:
0
page
:
0
}
}
this
.
$refs
.
sourceByDateDialogDom
.
dialogShow
=
true
//
}
,
changeView
(
data
){
editUserViewCourseApi
(
data
.
id
,
data
.
is_view_course
).
then
(()
=>
{
changeView
(
data
)
{
editUserViewCourseApi
(
data
.
id
,
data
.
is_view_course
).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'数据更改成功'
type
:
'success'
,
message
:
'数据更改成功'
}
);
this
.
searchList
()
}
)
}
,
changeWeight
(
data
){
editUserWeightApi
(
data
.
id
,
data
.
weight
).
then
(()
=>
{
changeWeight
(
data
)
{
editUserWeightApi
(
data
.
id
,
data
.
weight
).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'数据更改成功'
type
:
'success'
,
message
:
'数据更改成功'
}
);
this
.
searchList
()
}
)
}
,
changeAddTeacher
(
data
){
changeAddTeacherApi
(
data
.
id
,
data
.
is_add_teacher
).
then
(()
=>
{
changeAddTeacher
(
data
)
{
changeAddTeacherApi
(
data
.
id
,
data
.
is_add_teacher
).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'数据更改成功'
type
:
'success'
,
message
:
'数据更改成功'
}
);
this
.
searchList
()
}
)
}
,
handleItemChange
(
value
){
handleItemChange
(
value
)
{
console
.
log
(
this
.
userObj
)
// debugger
getClassListApi
(
value
[
0
],
{
limit
:
999
,
type
:
this
.
userObj
.
type
}
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
getClassListApi
(
value
[
0
],
{
limit
:
999
,
type
:
this
.
userObj
.
type
}
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
title
=
i
.
class_name
}
);
this
.
changeClassObj
.
periods_list
.
find
(
i
=>
{
return
i
.
id
===
value
[
0
]
}
).
children
=
res
.
list
this
.
changeClassObj
.
periods_list
.
find
(
i
=>
{
return
i
.
id
===
value
[
0
]
}
).
children
=
res
.
list
}
)
// debugger
}
,
changeClassSub
(){
this
.
changeClassObj
.
periods_user_class_id
=
[]
this
.
selectUserList
.
forEach
(
i
=>
{
changeClassSub
()
{
this
.
changeClassObj
.
periods_user_class_id
=
[]
this
.
selectUserList
.
forEach
(
i
=>
{
this
.
changeClassObj
.
periods_user_class_id
.
push
(
i
.
id
)
}
);
let
json
=
{
new_periods_id
:
this
.
changeClassObj
.
new_periods_id
,
new_class_id
:
this
.
changeClassObj
.
new_class_id
,
periods_user_class_id
:
this
.
changeClassObj
.
periods_user_class_id
.
toString
()
new_periods_id
:
this
.
changeClassObj
.
new_periods_id
,
new_class_id
:
this
.
changeClassObj
.
new_class_id
,
periods_user_class_id
:
this
.
changeClassObj
.
periods_user_class_id
.
toString
()
}
;
changeClassApi
(
json
).
then
(
res
=>
{
changeClassApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
res
type
:
'success'
,
message
:
res
}
);
this
.
userObj
.
show
=
false
;
this
.
$emit
(
'reflash'
)
}
)
}
,
changePeriods
(
data
){
if
(
data
.
length
>
1
)
{
changePeriods
(
data
)
{
if
(
data
.
length
>
1
)
{
this
.
changeClassObj
.
new_periods_id
=
data
[
0
];
this
.
changeClassObj
.
new_class_id
=
data
[
1
];
}
}
,
changeClass
(){
if
(
this
.
selectUserList
.
length
<
1
)
{
changeClass
()
{
if
(
this
.
selectUserList
.
length
<
1
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请先选择用户'
type
:
'error'
,
message
:
'请先选择用户'
}
)
}
else
{
let
goods_id
=
this
.
selectUserList
[
0
].
goods_id
;
getPeriodsApi
({
goods_id
:
goods_id
,
limit
:
999
}
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
}
else
{
let
goods_id
=
this
.
selectUserList
[
0
].
goods_id
;
getPeriodsApi
({
goods_id
:
goods_id
,
limit
:
999
}
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
children
=
[]
}
);
this
.
changeClassObj
.
periods_list
=
res
.
list
;
...
...
@@ -838,24 +859,33 @@
}
);
}
}
,
defaultClass
(){
this
.
changeClassObj
.
selectedGoods
=
[
parseInt
(
this
.
userObj
.
periods_id
),
parseInt
(
this
.
userObj
.
classId
)];
getClassListApi
(
this
.
changeClassObj
.
selectedGoods
[
0
],{
limit
:
999
,
type
:
this
.
userObj
.
type
}
,
this
.
userObj
.
type
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
title
=
i
.
class_name
;
}
);
this
.
changeClassObj
.
periods_list
.
find
(
i
=>
{
return
i
.
id
===
this
.
changeClassObj
.
selectedGoods
[
0
]
}
).
children
=
res
.
list
let
nowGoods
=
this
.
changeClassObj
.
periods_list
.
find
(
i
=>
{
return
i
.
id
===
this
.
changeClassObj
.
selectedGoods
[
0
]
}
);
this
.
periods
=
nowGoods
.
children
.
find
(
i
=>
{
return
i
.
id
===
this
.
changeClassObj
.
selectedGoods
[
1
]
}
);
this
.
changeClassObj
.
new_class_id
=
this
.
userObj
.
classId
;
this
.
changeClassObj
.
new_periods_id
=
this
.
userObj
.
periods_id
;
}
)
defaultClass
()
{
this
.
changeClassObj
.
selectedGoods
=
[
parseInt
(
this
.
userObj
.
periods_id
),
parseInt
(
this
.
userObj
.
classId
)];
getClassListApi
(
this
.
changeClassObj
.
selectedGoods
[
0
],
{
limit
:
999
,
type
:
this
.
userObj
.
type
}
,
this
.
userObj
.
type
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
title
=
i
.
class_name
;
}
);
this
.
changeClassObj
.
periods_list
.
find
(
i
=>
{
return
i
.
id
===
this
.
changeClassObj
.
selectedGoods
[
0
]
}
).
children
=
res
.
list
let
nowGoods
=
this
.
changeClassObj
.
periods_list
.
find
(
i
=>
{
return
i
.
id
===
this
.
changeClassObj
.
selectedGoods
[
0
]
}
);
this
.
periods
=
nowGoods
.
children
.
find
(
i
=>
{
return
i
.
id
===
this
.
changeClassObj
.
selectedGoods
[
1
]
}
);
this
.
changeClassObj
.
new_class_id
=
this
.
userObj
.
classId
;
this
.
changeClassObj
.
new_periods_id
=
this
.
userObj
.
periods_id
;
}
)
}
,
handleSelectionChange123
(
a
){
handleSelectionChange123
(
a
)
{
this
.
selectUserList
=
a
}
,
userLook
(
data
){
userLook
(
data
)
{
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
loading
=
true
;
let
json
=
{
...
...
@@ -863,17 +893,17 @@
page
:
this
.
lookDetail
.
nowPage
}
this
.
lookDetail
.
data
=
{
periods_id
:
data
.
periods_id
,
periods_id
:
data
.
periods_id
,
user_id
:
data
.
user_id
}
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
this
.
lookDetail
.
list
=
res
.
list
;
this
.
lookDetail
.
loading
=
false
;
this
.
lookDetail
.
total
=
res
.
total
;
}
)
}
,
getUserLook
(){
if
(
!
this
.
lookDetail
.
data
)
return
;
getUserLook
()
{
if
(
!
this
.
lookDetail
.
data
)
return
;
this
.
lookDetail
.
show
=
true
;
this
.
lookDetail
.
loading
=
true
;
let
json
=
{
...
...
@@ -881,26 +911,26 @@
page
:
this
.
lookDetail
.
nowPage
}
let
data
=
this
.
lookDetail
.
data
;
userLookApi
(
data
.
periods_id
,
data
.
user_id
,
json
).
then
(
res
=>
{
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
){
onLookDetailPageChange
(
val
)
{
this
.
lookDetail
.
nowPage
=
val
this
.
getUserLook
();
}
,
onLookDetailSizeChange
(
val
){
onLookDetailSizeChange
(
val
)
{
this
.
lookDetail
.
limit
=
val
this
.
lookDetail
.
nowPage
=
1
;
this
.
getUserLook
();
}
,
searchList2
(){
searchList2
()
{
this
.
classUserNowPage
=
1
this
.
searchList
()
}
,
searchList
(
value
){
searchList
(
value
)
{
console
.
log
(
value
)
if
(
value
)
{
this
.
classUserLimit
=
value
;
...
...
@@ -908,27 +938,27 @@
}
this
.
loadingFlag
=
true
;
let
json
=
{
page
:
this
.
classUserNowPage
,
limit
:
this
.
classUserLimit
page
:
this
.
classUserNowPage
,
limit
:
this
.
classUserLimit
}
;
let
json2
=
{
}
;
if
(
this
.
timeLang
&&
this
.
timeLang
.
length
>
1
)
{
if
(
this
.
timeLang
&&
this
.
timeLang
.
length
>
1
)
{
json
.
start_at
=
this
.
timeLang
[
0
];
json
.
end_at
=
this
.
timeLang
[
1
];
json2
.
start_at
=
this
.
timeLang
[
0
];
json2
.
end_at
=
this
.
timeLang
[
1
];
}
if
(
this
.
searchFrom
.
user_id
)
{
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
}
if
(
this
.
searchFrom
.
is_add_teacher
||
this
.
searchFrom
.
is_add_teacher
===
0
)
{
if
(
this
.
searchFrom
.
is_add_teacher
||
this
.
searchFrom
.
is_add_teacher
===
0
)
{
json
.
is_add_teacher
=
this
.
searchFrom
.
is_add_teacher
}
if
(
this
.
searchFrom
.
is_view_course
)
{
if
(
this
.
searchFrom
.
is_view_course
)
{
json
.
is_view_course
=
this
.
searchFrom
.
is_view_course
}
getClassStatisticsApi
(
this
.
userObj
.
periods_id
,
this
.
userObj
.
classId
,
json2
).
then
(
res
=>
{
getClassStatisticsApi
(
this
.
userObj
.
periods_id
,
this
.
userObj
.
classId
,
json2
).
then
(
res
=>
{
this
.
statistics
.
arrive_course_rate
=
res
.
arrive_course_rate
;
this
.
statistics
.
clock_rate
=
res
.
clock_rate
;
this
.
statistics
.
over_clock_rate
=
res
.
over_clock_rate
;
...
...
@@ -938,79 +968,79 @@
this
.
statistics
.
watch_course_rate
=
res
.
watch_course_rate
;
this
.
statistics
.
work_rate
=
res
.
work_rate
;
}
);
getClassListApi
(
this
.
userObj
.
periods_id
,
{
page
:
1
,
limit
:
100
}
).
then
(
res
=>
{
getClassListApi
(
this
.
userObj
.
periods_id
,
{
page
:
1
,
limit
:
100
}
).
then
(
res
=>
{
// console.log(res)
this
.
userObj
.
watch_num
=
res
.
periods
.
watch_num
console
.
log
(
this
.
$store
.
state
.
orderRefund
)
console
.
log
(
this
.
userObj
)
// debugger
}
)
getJoinNumApi
(
this
.
userObj
.
classId
).
then
(
res
=>
{
let
_list
=
res
||
[];
_list
.
forEach
((
_data
)
=>
{
if
(
_data
.
is_add_teacher
===
1
)
{
this
.
statistics
.
teacher_add_user_num
=
_data
.
num
}
else
if
(
_data
.
is_add_teacher
===
2
)
{
this
.
statistics
.
user_add_teacher_num
=
_data
.
num
}
}
)
getJoinNumApi
(
this
.
userObj
.
classId
).
then
(
res
=>
{
let
_list
=
res
||
[];
_list
.
forEach
((
_data
)
=>
{
if
(
_data
.
is_add_teacher
===
1
)
{
this
.
statistics
.
teacher_add_user_num
=
_data
.
num
}
else
if
(
_data
.
is_add_teacher
===
2
)
{
this
.
statistics
.
user_add_teacher_num
=
_data
.
num
}
}
)
}
);
getClassUserApi
(
this
.
userObj
.
classId
,
json
).
then
(
res
=>
{
this
.
classUserTotal
=
res
.
total
;
getClassUserApi
(
this
.
userObj
.
classId
,
json
).
then
(
res
=>
{
this
.
classUserTotal
=
res
.
total
;
this
.
userTable
=
res
.
list
;
this
.
loadingFlag
=
false
;
}
);
this
.
changeClassObj
=
{
show
:
false
,
new_periods_id
:
''
,
new_class_id
:
''
,
periods_user_class_id
:
''
,
periods_list
:[],
selectedGoods
:[]
this
.
changeClassObj
=
{
show
:
false
,
new_periods_id
:
''
,
new_class_id
:
''
,
periods_user_class_id
:
''
,
periods_list
:
[],
selectedGoods
:
[]
}
}
,
initPage
(){
initPage
()
{
console
.
log
(
this
.
userObj
)
this
.
timerank
[
0
]
=
this
.
nowDate
this
.
timerank
[
1
]
=
this
.
nowDate
this
.
timerank
[
0
]
=
this
.
nowDate
this
.
timerank
[
1
]
=
this
.
nowDate
// this.timeLang[0]='2019-04-17'
console
.
log
(
this
.
timerank
)
// debugger
this
.
searchFrom
=
{
user_id
:
''
,
is_add_teacher
:
''
,
is_view_course
:
''
,
start_at
:
''
,
end_at
:
''
,
user_id
:
''
,
is_add_teacher
:
''
,
is_view_course
:
''
,
start_at
:
''
,
end_at
:
''
,
}
;
this
.
statistics
=
{
arrive_course_rate
:
0
,
clock_rate
:
0
,
over_clock_rate
:
0
,
over_course_rate
:
0
,
over_work_rate
:
0
,
transform_rate
:
0
,
watch_course_rate
:
0
,
work_rate
:
0
,
teacher_add_user_num
:
0
,
user_add_teacher_num
:
0
this
.
statistics
=
{
arrive_course_rate
:
0
,
clock_rate
:
0
,
over_clock_rate
:
0
,
over_course_rate
:
0
,
over_work_rate
:
0
,
transform_rate
:
0
,
watch_course_rate
:
0
,
work_rate
:
0
,
teacher_add_user_num
:
0
,
user_add_teacher_num
:
0
}
;
this
.
classUserLimit
=
20
;
this
.
classUserTotal
=
0
;
this
.
classUserNowPage
=
1
;
this
.
classUserLimit
=
20
;
this
.
classUserTotal
=
0
;
this
.
classUserNowPage
=
1
;
this
.
searchList
()
}
,
changeUser
(
data
){
changeUser
(
data
)
{
this
.
$confirm
(
'此操作将修改成员看课权限?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
changeUserApi
(
data
.
id
,
{
is_view_course
:
data
.
is_view_course
===
0
?
1
:
0
}
).
then
(
res
=>
{
changeUserApi
(
data
.
id
,
{
is_view_course
:
data
.
is_view_course
===
0
?
1
:
0
}
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
...
...
@@ -1019,13 +1049,13 @@
}
);
}
);
}
,
addTeacher
(
data
){
addTeacher
(
data
)
{
this
.
$confirm
(
'此操作将修改是否添加老师权限?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
addUserTeacherApi
(
data
.
id
,
{
is_add_teacher
:
data
.
is_add_teacher
===
0
?
1
:
0
}
).
then
(
res
=>
{
addUserTeacherApi
(
data
.
id
,
{
is_add_teacher
:
data
.
is_add_teacher
===
0
?
1
:
0
}
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
...
...
@@ -1034,13 +1064,13 @@
}
);
}
);
}
,
onDel
(
data
){
onDel
(
data
)
{
this
.
$confirm
(
'此操作将删除该成员?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
delClassUserApi
(
data
.
id
).
then
(
res
=>
{
delClassUserApi
(
data
.
id
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
...
...
@@ -1049,17 +1079,17 @@
}
);
}
);
}
,
onAdd
(){
onAdd
()
{
let
json
=
{
is_buy
:
0
}
if
(
this
.
multipleSelection
.
length
===
0
)
{
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择用户!'
}
);
return
}
else
if
(
this
.
multipleSelection
.
length
!==
1
){
}
else
if
(
this
.
multipleSelection
.
length
!==
1
)
{
this
.
$message
({
type
:
'error'
,
message
:
'只能选择一个用户!'
...
...
@@ -1068,10 +1098,10 @@
}
this
.
addId
=
this
.
multipleSelection
[
0
].
user_id
;
if
(
!
this
.
addId
)
{
return
return
}
if
(
!
this
.
isBindUser
)
{
addClassUesrApi
(
this
.
userObj
.
classId
,
this
.
addId
,
json
).
then
(
res
=>
{
addClassUesrApi
(
this
.
userObj
.
classId
,
this
.
addId
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'添加成功!'
...
...
@@ -1080,7 +1110,7 @@
this
.
searchList
()
}
)
}
else
{
teacherBindUserApi
(
this
.
userObj
.
teacherId
,
{
user_id
:
this
.
addId
}
).
then
(
res
=>
{
teacherBindUserApi
(
this
.
userObj
.
teacherId
,
{
user_id
:
this
.
addId
}
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'绑定成功!'
...
...
@@ -1090,12 +1120,12 @@
}
}
,
onAddUser
(
flag
){
onAddUser
(
flag
)
{
this
.
isBindUser
=
flag
;
this
.
addShow
=
true
;
this
.
getUser
();
}
,
getUser
(){
getUser
()
{
let
json
=
{
page
:
this
.
nowPage
,
limit
:
5
...
...
@@ -1109,16 +1139,16 @@
if
(
this
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
searchFrom
.
mobile
}
getUserListApi
(
json
).
then
(
res
=>
{
getUserListApi
(
json
).
then
(
res
=>
{
this
.
userList
=
res
.
list
;
this
.
total
=
res
.
total
;
}
)
}
,
onPageChange
(
val
){
onPageChange
(
val
)
{
this
.
nowPage
=
val
this
.
getUser
()
}
,
onSizeChange
(
val
){
onSizeChange
(
val
)
{
this
.
limit
=
val
this
.
nowPage
=
1
;
this
.
getUser
()
...
...
@@ -1131,8 +1161,8 @@
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputValue
:
''
}
).
then
(({
value
}
)
=>
{
addPeriodsClassUserDescApi
(
id
,
{
desc
:
value
}
).
then
(
res
=>
{
}
).
then
(({
value
}
)
=>
{
addPeriodsClassUserDescApi
(
id
,
{
desc
:
value
}
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑沟通情况成功'
...
...
@@ -1142,7 +1172,7 @@
}
);
}
)
}
,
onGetUserDescList
(
val
){
onGetUserDescList
(
val
)
{
this
.
descDialog
.
show
=
true
;
this
.
descDialog
.
userInfo
=
{
user_id
:
val
.
user_id
,
...
...
@@ -1152,26 +1182,26 @@
this
.
descDialog
.
id
=
val
.
id
;
this
.
getUserDescList
();
}
,
getUserDescList
(){
getUserDescList
()
{
let
json
=
{
page
:
this
.
descDialog
.
nowPage
,
limit
:
this
.
descDialog
.
limit
}
;
getUserDescListApi
(
this
.
descDialog
.
id
,
json
).
then
(
res
=>
{
getUserDescListApi
(
this
.
descDialog
.
id
,
json
).
then
(
res
=>
{
this
.
descDialog
.
descList
=
res
.
list
;
this
.
descDialog
.
total
=
res
.
total
;
}
)
}
,
onDescDialogPageChange
(
val
){
onDescDialogPageChange
(
val
)
{
this
.
descDialog
.
nowPage
=
val
this
.
getUserDescList
()
}
,
onDescDialogSizeChange
(
val
){
onDescDialogSizeChange
(
val
)
{
this
.
descDialog
.
limit
=
val
this
.
descDialog
.
nowPage
=
1
;
this
.
getUserDescList
()
}
,
editPrivilege
(
val
){
editPrivilege
(
val
)
{
this
.
privilegeDialog
=
{
id
:
val
.
id
,
isAllowView
:
val
.
is_view_course
===
1
,
...
...
@@ -1180,7 +1210,7 @@
show
:
true
}
}
,
changePrivilegeSub
(){
changePrivilegeSub
()
{
this
.
$confirm
(
'此操作将修改用户权限?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -1191,7 +1221,7 @@
is_add_teacher
:
this
.
privilegeDialog
.
is_add_teacher
,
weight
:
this
.
privilegeDialog
.
weight
}
updateUserPrivilegeApi
(
this
.
privilegeDialog
.
id
,
_json
).
then
(
res
=>
{
updateUserPrivilegeApi
(
this
.
privilegeDialog
.
id
,
_json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
...
...
@@ -1201,47 +1231,47 @@
}
);
}
);
}
,
exportTable
(
data
){
if
(
data
.
length
>
0
)
{
let
json
=
{
}
;
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
}
if
(
this
.
searchFrom
.
is_add_teacher
)
{
json
.
is_add_teacher
=
this
.
searchFrom
.
is_add_teacher
}
if
(
this
.
searchFrom
.
is_view_course
)
{
json
.
is_view_course
=
this
.
searchFrom
.
is_view_course
}
if
(
this
.
timeLang
&&
this
.
timeLang
.
length
>
0
)
{
json
.
pay_start_at
=
this
.
timeLang
[
0
];
json
.
pay_end_at
=
this
.
timeLang
[
1
]
}
exportExcelApi
(
`api/admin/class/user/export/${this.userObj.classId
}
`
,
json
,
'用户列表'
);
exportTable
(
data
)
{
if
(
data
.
length
>
0
)
{
let
json
=
{
}
;
if
(
this
.
searchFrom
.
user_id
)
{
json
.
user_id
=
this
.
searchFrom
.
user_id
}
if
(
this
.
searchFrom
.
is_add_teacher
)
{
json
.
is_add_teacher
=
this
.
searchFrom
.
is_add_teacher
}
if
(
this
.
searchFrom
.
is_view_course
)
{
json
.
is_view_course
=
this
.
searchFrom
.
is_view_course
}
if
(
this
.
timeLang
&&
this
.
timeLang
.
length
>
0
)
{
json
.
pay_start_at
=
this
.
timeLang
[
0
];
json
.
pay_end_at
=
this
.
timeLang
[
1
]
}
exportExcelApi
(
`api/admin/class/user/export/${this.userObj.classId
}
`
,
json
,
'用户列表'
);
}
}
,
formatTime
(
date
){
formatTime
(
date
)
{
let
year
=
date
.
getFullYear
();
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
)
{
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
)
{
Month
=
`0${Month
}
`
}
let
Day
=
date
.
getDate
();
if
(
Day
<
10
)
Day
=
`0${Day
}
`
;
if
(
Day
<
10
)
Day
=
`0${Day
}
`
;
return
`${year
}
-${Month
}
-${Day
}
`
;
}
,
}
,
watch
:{
'userObj.show'
(
value
){
if
(
value
)
{
watch
:
{
'userObj.show'
(
value
)
{
if
(
value
)
{
this
.
initPage
()
}
}
,
'classUserNowPage'
(
value
){
'classUserNowPage'
(
value
)
{
this
.
searchList
()
}
,
"changeClassObj.show"
(
val
){
if
(
val
)
{
"changeClassObj.show"
(
val
)
{
if
(
val
)
{
this
.
defaultClass
()
}
}
...
...
@@ -1249,21 +1279,25 @@
}
<
/script
>
<
style
scoped
lang
=
"less"
>
@
import
"../../util/public"
;
@
import
"../../util/public"
;
.
avatar
{
width
:
50
px
;
margin
-
right
:
5
px
;
border
-
radius
:
50
%
;
height
:
50
px
;
}
.
user
{
.
user
{
/*height: 100%;*/
overflow
:
auto
;
padding
:
20
px
0
;
.
btn
-
content
{
.
btn
-
content
{
text
-
align
:
center
;
}
}
.
flexRow
{
display
:
flex
;
flex
-
flow
:
row
;
...
...
@@ -1273,10 +1307,10 @@
<
/style
>
<
style
>
.
f
-
c
>
div
{
display
:
flex
;
flex
-
flow
:
row
nowrap
;
justify
-
content
:
flex
-
start
;
align
-
items
:
center
;
}
.
f
-
c
>
div
{
display
:
flex
;
flex
-
flow
:
row
nowrap
;
justify
-
content
:
flex
-
start
;
align
-
items
:
center
;
}
<
/style
>
src/components/system/role.vue
View file @
59917b0d
...
...
@@ -13,8 +13,14 @@
<el-table-column
prop=
"created_at"
label=
"创建时间"
sortable
></el-table-column>
<el-table-column
v-if=
"!$store.state.readonly"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"primary"
v-if=
"!$store.state.readonly"
@
click=
"edit(scope.row)"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"danger"
plain
@
click=
"del(scope.row)"
v-if=
"$store.state.deletePermission && !$store.state.readonly"
>
删除
</el-button>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"edit(scope.row)"
v-if=
"!$store.state.readonly"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"danger"
plain
@
click=
"del(scope.row)"
v-if=
"$store.state.deletePermission && !$store.state.readonly"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -39,19 +45,43 @@
<span
class=
"custom-tree-node"
slot-scope=
"{ node, data }"
>
<span>
{{ node.label }}
</span>
<span
v-if=
"data.pid !== 0"
>
<el-checkbox
v-model=
"data.refund"
v-if=
"data.cover ==='5-1'|| data.cover=== '5-10'|| data.cover=== '5-9'"
>
退款
</el-checkbox>
<el-checkbox
v-model=
"data.refund"
v-if=
"data.cover ==='10-1' "
>
类别管理
</el-checkbox>
<el-checkbox
v-model=
"data.promoter"
v-if=
"data.cover ==='5-1' "
>
编辑推广人
</el-checkbox>
<el-checkbox
v-model=
"data.refund"
v-if=
"data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' "
>
添加观摩班用户
</el-checkbox>
<el-checkbox
v-model=
"data.classManage"
v-if=
"data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' "
>
添加带班班用户
</el-checkbox>
<el-checkbox
v-model=
"data.classManageUnlimited"
v-if=
"data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' "
>
添加观摩班(无限制)
</el-checkbox>
<el-checkbox
v-model=
"data.classTakeUnlimited"
v-if=
"data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' "
>
添加带班班(无限制)
</el-checkbox>
<el-checkbox
v-model=
"data.distribution"
v-if=
"data.cover ==='5-9'||data.cover ==='7-9'"
@
change=
"distribution"
>
批量分配
</el-checkbox>
<el-checkbox
v-model=
"data.exportFinish"
v-if=
"data.cover === '2-3'"
>
导出完课用户
</el-checkbox>
<el-checkbox
v-model=
"data.import"
v-if=
"data.cover ==='6-3'||data.cover ==='5-3'||data.cover ==='5-9'||data.cover ==='6-4'"
>
导入
</el-checkbox>
<el-checkbox
v-model=
"data.export"
v-if=
"exportMenuList.indexOf(data.cover) >-1"
>
导出
</el-checkbox>
<el-checkbox
v-model=
"data.readonly"
>
只读
</el-checkbox>
<el-checkbox
v-model=
"data.delete"
>
删除
</el-checkbox>
<el-checkbox
v-model=
"data.refund"
v-if=
"data.cover ==='5-1'|| data.cover=== '5-10'|| data.cover=== '5-9'"
>
退款
</el-checkbox>
<el-checkbox
v-model=
"data.refund"
v-if=
"data.cover ==='10-1' "
>
类别管理
</el-checkbox>
<el-checkbox
v-model=
"data.promoter"
v-if=
"data.cover ==='5-1' "
>
编辑推广人
</el-checkbox>
<el-checkbox
v-model=
"data.refund"
v-if=
"data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' "
>
添加观摩班用户
</el-checkbox>
<el-checkbox
v-model=
"data.classManage"
v-if=
"data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' "
>
添加带班班用户
</el-checkbox>
<el-checkbox
v-model=
"data.classManageUnlimited"
v-if=
"data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' "
>
添加观摩班(无限制)
</el-checkbox>
<el-checkbox
v-model=
"data.classTakeUnlimited"
v-if=
"data.cover ==='2-3'|| data.cover=== '3-1'|| data.cover=== '3-2' || data.cover=== '3-6' || data.cover=== '3-7' "
>
添加带班班(无限制)
</el-checkbox>
<el-checkbox
v-model=
"data.distribution"
v-if=
"data.cover ==='5-9'||data.cover ==='7-9'"
@
change=
"distribution"
>
批量分配
</el-checkbox>
<el-checkbox
v-model=
"data.exportFinish"
v-if=
"data.cover === '2-3'"
>
导出完课用户
</el-checkbox>
<el-checkbox
v-model=
"data.import"
v-if=
"data.cover ==='6-3'||data.cover ==='5-3'||data.cover ==='5-9'||data.cover ==='6-4'"
>
导入
</el-checkbox>
<el-checkbox
v-model=
"data.export"
v-if=
"exportMenuList.indexOf(data.cover) >-1"
>
导出
</el-checkbox>
<el-checkbox
v-model=
"data.readonly"
>
只读
</el-checkbox>
<el-checkbox
v-model=
"data.delete"
>
删除
</el-checkbox>
</span>
</span>
</el-tree>
...
...
@@ -128,7 +158,7 @@
j
.
delete
=
false
;
if
(
this
.
exportMenuList
.
indexOf
(
j
.
cover
)
>
-
1
)
j
.
export
=
false
;
if
(
j
.
cover
===
"5-9"
||
j
.
cover
===
"7-9"
)
j
.
distribution
=
false
;
if
(
j
.
cover
===
"6-3"
||
j
.
cover
===
"5-3"
||
j
.
cover
===
"5-9"
||
j
.
cover
===
"6-4"
)
j
.
import
=
false
;
if
(
j
.
cover
===
"6-3"
||
j
.
cover
===
"5-3"
||
j
.
cover
===
"5-9"
||
j
.
cover
===
"6-4"
)
j
.
import
=
false
;
if
(
j
.
name
===
'月课订单列表'
||
j
.
name
===
'日课订单列表'
||
j
.
name
===
"来源码管理"
||
j
.
cover
===
"5-9"
||
j
.
cover
===
"2-3"
||
j
.
cover
===
"3-1"
||
j
.
cover
===
'3-2'
||
j
.
cover
===
"3-6"
||
j
.
cover
===
"3-7"
)
j
.
refund
=
false
;
if
(
j
.
cover
===
"2-3"
||
j
.
cover
===
"3-1"
||
j
.
cover
===
'3-2'
||
j
.
cover
===
"3-6"
||
j
.
cover
===
"3-7"
)
{
...
...
@@ -179,7 +209,7 @@
j
.
delete
=
false
;
if
(
this
.
exportMenuList
.
indexOf
(
j
.
cover
)
>
-
1
)
j
.
export
=
false
;
if
(
j
.
cover
===
"5-9"
||
j
.
cover
===
"7-9"
)
j
.
distribution
=
false
;
if
(
j
.
cover
===
"6-3"
||
j
.
cover
===
"5-3"
||
j
.
cover
===
"5-9"
||
j
.
cover
===
"6-4"
)
j
.
import
=
false
;
if
(
j
.
cover
===
"6-3"
||
j
.
cover
===
"5-3"
||
j
.
cover
===
"5-9"
||
j
.
cover
===
"6-4"
)
j
.
import
=
false
;
if
(
j
.
name
===
'月课订单列表'
||
j
.
name
===
'日课订单列表'
||
j
.
name
===
"来源码管理"
||
j
.
cover
===
"5-9"
||
j
.
cover
===
"2-3"
||
j
.
cover
===
"3-1"
||
j
.
cover
===
'3-2'
||
j
.
cover
===
"3-6"
||
j
.
cover
===
"3-7"
)
j
.
refund
=
false
;
if
(
j
.
cover
===
"2-3"
||
j
.
cover
===
"3-1"
||
j
.
cover
===
'3-2'
||
j
.
cover
===
"3-6"
||
j
.
cover
===
"3-7"
)
{
...
...
@@ -219,7 +249,7 @@
x
.
classManageUnlimited
=
!!
i
.
classManageUnlimited
;
x
.
classTakeUnlimited
=
!!
i
.
classTakeUnlimited
;
}
if
(
i
.
cover
===
"6-3"
||
i
.
cover
===
"5-3"
||
i
.
cover
===
"5-9"
||
i
.
cover
===
"6-4"
)
{
if
(
i
.
cover
===
"6-3"
||
i
.
cover
===
"5-3"
||
i
.
cover
===
"5-9"
||
i
.
cover
===
"6-4"
)
{
x
.
import
=
!!
i
.
import
;
}
if
(
i
.
cover
===
"5-9"
||
i
.
cover
===
"7-9"
)
{
...
...
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