Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
71021c4c
Commit
71021c4c
authored
Jan 29, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在线分类
parent
35b0c9b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
516 additions
and
0 deletions
+516
-0
addclassify.vue
src/components/education/addclassify.vue
+276
-0
educationIndex.vue
src/components/education/educationIndex.vue
+3
-0
onlineclassifyList.vue
src/components/education/onlineclassifyList.vue
+225
-0
index.js
src/router/index.js
+12
-0
No files found.
src/components/education/addclassify.vue
0 → 100644
View file @
71021c4c
<
template
>
<div
v-loading=
"loading"
class=
"addclassify"
>
<div
class=
"head-title"
>
<span
@
click=
"CommonJump('onlineclassifyList')"
class=
"blue point"
>
分类管理
</span>
/ 编辑分类管理
</div>
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
style=
"width:50%"
>
<el-form-item
label=
"课程类型"
prop=
"CourseClassType"
class=
"is-required"
>
<el-select
class=
"w400"
style=
"margin-right: 10px;"
v-model=
"addMsg.CourseClassType"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in CourseClassList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"上课人数"
prop=
"StudentNumType"
class=
"is-required"
>
<el-select
class=
"w400"
style=
"margin-right: 10px;"
v-model=
"addMsg.StudentNumType"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in StudentList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"是否为公开课"
>
<el-radio
v-model=
"addMsg.IsPublic"
:label=
"0"
>
否
</el-radio>
<el-radio
v-model=
"addMsg.IsPublic"
:label=
"1"
>
是
</el-radio>
</el-form-item>
<el-form-item
label=
"是否免费"
>
<el-radio
v-model=
"addMsg.IsFree"
:label=
"0"
>
否
</el-radio>
<el-radio
v-model=
"addMsg.IsFree"
:label=
"1"
>
是
</el-radio>
</el-form-item>
<el-form-item
label=
"点数"
prop=
"PointNum"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.PointNum"
placeholder=
"请输入点数"
class=
"w400"
type=
"number"
:min=
"0"
/>
</el-form-item>
<el-form-item
label=
"时长"
prop=
"Duration"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.Duration"
placeholder=
"请输入时长"
class=
"w400"
type=
"number"
:min=
"0"
/>
</el-form-item>
<el-form-item
label=
"时长单位"
prop=
"DurationUnit"
class=
"is-required"
>
<el-select
class=
"w400"
style=
"margin-right: 10px;"
v-model=
"addMsg.DurationUnit"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in DurationList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
</div>
</div>
</
template
>
<
script
>
export
default
{
components
:
{
},
data
()
{
return
{
addMsg
:
{
ID
:
0
,
CourseClassType
:
''
,
//课程类型(枚举)
StudentNumType
:
''
,
//上课人数(枚举)
IsPublic
:
0
,
//是否为公开课0-否,1-是
IsFree
:
0
,
//是否免费0-否,1-是
PointNum
:
0
,
//点数
Duration
:
0
,
//时长
DurationUnit
:
''
,
//时长单位(枚举)
},
rules
:
{
CourseClassType
:
[{
required
:
true
,
message
:
'请选择课程类型'
,
trigger
:
'blur'
}],
PointNum
:
[{
required
:
true
,
message
:
'请输入点数'
,
trigger
:
'blur'
}],
StudentNumType
:
[{
required
:
true
,
message
:
'请选择上课人数'
,
trigger
:
'blur'
}],
Duration
:
[{
required
:
true
,
message
:
'时长不能为空'
,
trigger
:
'blur'
}],
DurationUnit
:
[{
required
:
true
,
message
:
'请选择时长单位'
,
trigger
:
'blur'
}],
},
loading
:
false
,
CourseClassList
:[],
DurationList
:[],
StudentList
:[],
};
},
created
()
{
if
(
this
.
$route
.
query
.
ID
){
this
.
getData
(
this
.
$route
.
query
.
ID
)
}
this
.
getCourseClassList
()
//课程分类枚举
this
.
getDurationList
()
//课程时长单位枚举
this
.
getStudentList
()
//上课人数枚举
},
methods
:
{
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
addMsg
.
IsFree
==
0
&&
this
.
addMsg
.
PointNum
==
0
){
this
.
Error
(
'点数需大于0'
)
return
false
}
this
.
addMsg
.
PointNum
=
Number
(
this
.
addMsg
.
PointNum
)
this
.
addMsg
.
Duration
=
Number
(
this
.
addMsg
.
Duration
)
this
.
apipost
(
"/api/Point/SetPointCourseClass"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CommonJump
(
'onlineclassifyList'
);
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
});
},
getCourseClassList
(){
this
.
apipost
(
"/api/Point/GetCourseClassTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
CourseClassList
=
res
.
data
.
data
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
getDurationList
(){
this
.
apipost
(
"/api/Point/GetDurationUnitEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
DurationList
=
res
.
data
.
data
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
getStudentList
(){
this
.
apipost
(
"/api/Point/GetStudentNumTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
StudentList
=
res
.
data
.
data
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
getData
(
ID
)
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/Point/GetPointCourseClassModel"
,
{
ID
:
ID
},
res
=>
{
this
.
loading
=
false
;
this
.
addMsg
=
res
.
data
.
data
;
})
},
},
mounted
()
{
}
};
</
script
>
<
style
>
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#FAFAFA
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#E8EAEE
;
border-radius
:
5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
overflow
:
scroll
;
height
:
400px
;
}
.addclassify
.blue
{
color
:
#409EFF
;
}
.addclassify
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.addclassify
.gez_list
{
/*width: 650px;*/
margin-bottom
:
12px
;
padding
:
20px
;
border
:
1px
solid
#EBEEF5
;
background-color
:
#FFF
;
color
:
#303133
;
}
.addclassify
.quyu
{
background-color
:
#f4f4f5
;
color
:
#909399
;
padding
:
10px
;
line-height
:
30px
;
height
:
30px
;
font-size
:
12px
;
border-radius
:
4px
;
white-space
:
nowrap
;
margin
:
5px
;
}
.addclassify
.el-tag
+
.el-tag
{
margin-left
:
10px
;
}
.addclassify
.button-new-tag
{
margin-left
:
10px
;
height
:
32px
;
line-height
:
30px
;
padding-top
:
0
;
padding-bottom
:
0
;
}
.addclassify
.input-new-tag
{
width
:
90px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
}
</
style
>
src/components/education/educationIndex.vue
View file @
71021c4c
...
...
@@ -199,6 +199,9 @@
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/pointList'}" @click="isChecked='/pointList',CommonJump('pointList')">
<i
class=
"el-icon-menu"
></i><span>
点数列表
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/onlineclassifyList'}" @click="isChecked='/onlineclassifyList',CommonJump('onlineclassifyList')">
<i
class=
"el-icon-menu"
></i><span>
在线分类列表
</span>
</li>
</ul>
</div>
</div>
...
...
src/components/education/onlineclassifyList.vue
0 → 100644
View file @
71021c4c
<
template
>
<div
class=
"onlineclassifyList"
>
<div
class=
"el-card__header"
>
<span>
在线分类管理
</span>
<div
style=
"display: flex;flex-direction: row;align-items: center"
>
<el-button
type=
"primary"
class=
"el-button--small"
@
click=
"addRecharge"
>
新增
</el-button>
</div>
</div>
<div
style=
"padding: 20px;background: #fff;margin-top: 20px"
>
<el-table
:data=
"tableData"
header-cell-class-name=
"headClass"
style=
"width: 100%"
border
>
<el-table-column
prop=
"ID"
label=
"ID"
width=
"100"
>
</el-table-column>
<el-table-column
prop=
"CourseClassName"
label=
"分类类型"
>
</el-table-column>
<el-table-column
prop=
"Duration"
label=
"课程时长"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
Duration
}}{{
scope
.
row
.
DurationUnitStr
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"PointNum"
label=
"点数"
>
</el-table-column>
<el-table-column
prop=
"IsGive"
label=
"是否免费"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.IsFree==0"
type=
"info"
>
不免费
</el-tag>
<el-tag
v-if=
"scope.row.IsFree==1"
type=
"success"
>
免费
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"StudentNumTypeStr"
label=
"上课人数"
>
</el-table-column>
<el-table-column
prop=
"IsPublic"
label=
"是否为公开课"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
IsPublic
==
0
?
'不是'
:
'是'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
src=
"../../assets/img/setup/edit.png"
alt=
""
class=
"imgstyle"
@
click=
"Edit(scope.row)"
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
src=
"../../assets/img/setup/del.png"
alt=
""
class=
"imgstyle"
@
click=
"delete_b(scope.row)"
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"count"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
export
default
{
name
:
"onlineclassifyList"
,
data
(){
return
{
msg
:{
pageIndex
:
1
,
pageSize
:
15
,
},
changeState
:
false
,
dateList
:[],
tableData
:[],
count
:
0
,
loading
:
false
,
EnableMsg
:{
Ids
:
''
,
TeacherStatus
:
0
,
},
}
},
created
(){
this
.
getDateList
();
//获取数据
},
methods
:{
getDateList
(){
this
.
loading
=
true
;
this
.
apipost
(
"/api/Point/GetPointCourseClassPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
tableData
=
res
.
data
.
data
.
pageData
;
this
.
count
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
addRecharge
(){
this
.
$router
.
push
(
'/addclassify'
);
},
Edit
(
row
){
this
.
$router
.
push
({
name
:
'addclassify'
,
query
:
{
ID
:
row
.
ID
,
blank
:
"y"
}
});
},
delete_b
(
row
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Point/DeletePointCourseClass"
,
{
Id
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getDateList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
});
},
getList
(){
this
.
msg
.
pageIndex
=
1
this
.
getDateList
()
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getDateList
();
},
},
}
</
script
>
<
style
>
.onlineclassifyList
.el-card__header
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#fff
;
}
.onlineclassifyList
.el-button--small
{
padding
:
9px
15px
;
}
.onlineclassifyList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
/*margin-left: 10px;*/
}
.onlineclassifyList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.onlineclassifyList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
}
.onlineclassifyList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
15px
;
box-sizing
:
border-box
;
}
.onlineclassifyList
.el-tag
{
margin-right
:
5px
;
}
.onlineclassifyList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
</
style
>
src/router/index.js
View file @
71021c4c
...
...
@@ -397,6 +397,18 @@ export default new Router({
path
:
'/addpoint'
,
name
:
'addpoint'
,
component
:
resolve
=>
require
([
'@/components/education/addpoint'
],
resolve
),
},
//网课 在线分类列表
{
path
:
'/onlineclassifyList'
,
name
:
'onlineclassifyList'
,
component
:
resolve
=>
require
([
'@/components/education/onlineclassifyList'
],
resolve
),
},
//网课 新增、修改分类
{
path
:
'/addclassify'
,
name
:
'addclassify'
,
component
:
resolve
=>
require
([
'@/components/education/addclassify'
],
resolve
),
}
]
},
...
...
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