Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
254acaaa
Commit
254acaaa
authored
Mar 09, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改课程相关信息
parent
722e86f8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
974 additions
and
520 deletions
+974
-520
course-form.vue
src/components/course/course-form.vue
+458
-276
courseprice-form.vue
src/components/course/courseprice-form.vue
+342
-212
catagory.vue
src/pages/course/catagory.vue
+68
-10
course.vue
src/pages/course/course.vue
+38
-7
courseList.vue
src/pages/sale/courseList.vue
+68
-15
No files found.
src/components/course/course-form.vue
View file @
254acaaa
This diff is collapsed.
Click to expand it.
src/components/course/courseprice-form.vue
View file @
254acaaa
This diff is collapsed.
Click to expand it.
src/pages/course/catagory.vue
View file @
254acaaa
...
...
@@ -3,19 +3,16 @@
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
ref=
"filter"
filled
v-model=
"keyWords"
label=
"
分类
名称"
>
<q-input
ref=
"filter"
filled
v-model=
"keyWords"
label=
"
系列
名称"
>
<template
v-slot:append
>
<q-icon
v-if=
"keyWords !== ''"
name=
"clear"
class=
"cursor-pointer"
@
click=
"resetFilter"
/>
</
template
>
</q-input>
</div>
</div>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增分类"
@
click=
"EditCategory(null)"
/>
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"q-pa-md q-gutter-sm"
>
<
!--<
div class="q-pa-md q-gutter-sm">
<q-tree v-if="isShow" :nodes="data" node-key="CateId" label-key="CateName" children-key="ChildList"
:filter="keyWords" :filter-method="myFilterMethod" default-expand-all no-results-label="暂无相关数据">
<template v-slot:default-header="prop">
...
...
@@ -30,7 +27,31 @@
</div>
</template>
</q-tree>
</div>
</div>-->
<q-table
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<
template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
系列信息
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增系列"
@
click=
"EditCategory(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Status=
"props"
>
<q-td
:props=
"props"
>
<q-badge
:color=
"props.value==1?'negative':'primary'"
:label=
"props.value==0?'正常':'禁用'"
/>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditCategory(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400;display:none;"
label=
"详情"
@
click=
"deleteCategory(props.row.CateId)"
/>
</q-td>
</
template
>
</q-table>
<category-form
v-if=
"isShowCategory"
:save-obj=
"categoryObj"
@
close=
"closeCagegoryForm"
@
success=
"refreshPage"
>
</category-form>
</div>
...
...
@@ -39,12 +60,12 @@
<
script
>
import
{
queryCourseCategory
Tre
e
queryCourseCategory
Pag
e
}
from
'../../api/course/index'
import
categoryForm
from
'../../components/course/category-form'
export
default
{
meta
:
{
title
:
"课程
分
类"
title
:
"课程
系
类"
},
components
:
{
categoryForm
,
...
...
@@ -57,6 +78,39 @@
isShowCategory
:
false
,
isShow
:
false
,
categoryObj
:
{},
loading
:
true
,
columns
:
[
{
name
:
'CateName'
,
label
:
'系列名称'
,
field
:
'CateName'
,
align
:
'left'
},
{
name
:
'CourseCount'
,
label
:
'关联课程'
,
align
:
'left'
,
field
:
row
=>
row
.
CourseCount
},
{
name
:
'Status'
,
label
:
'状态'
,
align
:
'left'
,
field
:
row
=>
row
.
Status
},
{
name
:
'UpdateByName'
,
label
:
'修改人'
,
align
:
'left'
,
field
:
row
=>
row
.
UpdateByName
},
{
name
:
'UpdateTimeStr'
,
label
:
'修改时间'
,
align
:
'left'
,
field
:
row
=>
row
.
UpdateTimeStr
}
],
}
},
mounted
()
{
...
...
@@ -80,9 +134,13 @@
//获取课程分类树形结构
getcoursecategorytree
()
{
this
.
isShow
=
false
;
queryCourseCategoryTree
({}).
then
(
res
=>
{
queryCourseCategoryPage
({
PageSize
:
50
,
pageIndex
:
1
}).
then
(
res
=>
{
this
.
isShow
=
true
;
this
.
data
=
res
.
Data
;
this
.
loading
=
false
;
this
.
data
=
res
.
Data
.
PageData
;
})
},
//新增修改角色
...
...
src/pages/course/course.vue
View file @
254acaaa
...
...
@@ -8,7 +8,7 @@
</div>
<div
class=
"col-3"
>
<select-tree
:treeData=
'TreeCategoryList'
:defaultArray=
"returnString"
nodeKey=
"CateId"
:multiple=
"true"
labelKey=
"CateName"
childrenKey=
"ChildList"
tipText=
"课程
分类
"
@
getChild=
"getChild"
></select-tree>
labelKey=
"CateName"
childrenKey=
"ChildList"
tipText=
"课程
系列
"
@
getChild=
"getChild"
></select-tree>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.Status"
:options=
"ShowOpts"
...
...
@@ -44,25 +44,41 @@
</
template
>
<
template
v-slot:body-cell-PreferentialList=
"props"
>
<q-td
:props=
"props"
style=
"padding-right:0px"
>
<div
v-for=
"x in props.value"
>
<div
v-for=
"x in props.value"
>
<div
class=
"border-bottom"
v-if=
"x.PriceDiscountType==1"
>
买
{{
x
.
BuyNum
}}
送
{{
x
.
SendNum
}}
</div>
<div
class=
"border-bottom"
v-if=
"x.PriceDiscountType==2"
>
单人报名享
{{
100
-
x
.
PriceMoney
}}
折优惠
</div>
<div
class=
"border-bottom"
v-if=
"x.PriceDiscountType==3"
>
双人报名享
{{
100
-
x
.
PriceMoney
}}
折优惠
</div>
<div
class=
"border-bottom"
v-if=
"x.PriceDiscountType==4"
>
续费享
{{
100
-
x
.
PriceMoney
}}
折优惠
</div>
<div
class=
"remark-font"
v-if=
"x.PriceDiscountType==0"
>
暂无优惠政策
</div>
</div>
<div
v-if=
"!props.value || props.value.length==0"
>
<div
class=
"remark-font"
>
暂无优惠政策
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-PreferentialListSellCommission=
"props"
>
<q-td
:props=
"props"
style=
"padding-right:0px;padding-left:0px"
>
<div
v-for=
"x in props.value"
>
<div
class=
"border-bottom"
style=
"padding-left: 16px;padding-right: 16px"
>
{{
x
.
SaleCommissionMoney
}}
%
</div>
<div
class=
"border-bottom"
style=
"padding-left: 16px;padding-right: 16px"
:class=
"
{'text-red':x.SaleCommissionType==1}" v-if="x.PriceDiscountType!=0">
{{
x
.
SaleCommissionType
==
1
?
'¥'
:
''
}}{{
x
.
SaleCommissionMoney
}}{{
x
.
SaleCommissionType
==
0
?
'%'
:
''
}}
</div>
<div
v-if=
"x.PriceDiscountType==0"
>
<div
class=
"remark-font"
>
暂无佣金信息
</div>
</div>
</div>
<div
v-if=
"!props.value || props.value.length==0"
>
<div
class=
"remark-font"
>
暂无佣金信息
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-PreferentialListB2BCommission=
"props"
>
<q-td
:props=
"props"
style=
"padding-left:0px"
>
<div
v-for=
"x in props.value"
>
<div
class=
"border-bottom"
style=
"padding-left: 16px"
>
{{
x
.
B2BCommissionMoney
}}
%
</div>
<div
class=
"border-bottom"
style=
"padding-left: 16px"
:class=
"
{'text-red':x.B2BCommissionType==1}" v-if="x.PriceDiscountType!=0">
{{
x
.
B2BCommissionType
==
1
?
'¥'
:
''
}}{{
x
.
B2BCommissionMoney
}}{{
x
.
B2BCommissionType
==
0
?
'%'
:
''
}}
</div>
<div
v-if=
"x.PriceDiscountType==0"
>
<div
class=
"remark-font"
>
暂无佣金信息
</div>
</div>
</div>
<div
v-if=
"!props.value || props.value.length==0"
>
<div
class=
"remark-font"
>
暂无佣金信息
</div>
</div>
</q-td>
</
template
>
...
...
@@ -135,6 +151,13 @@
align
:
'left'
,
field
:
row
=>
row
.
CourseName
},
{
name
:
'CateName'
,
required
:
true
,
label
:
'系列'
,
align
:
'left'
,
field
:
row
=>
row
.
CateName
},
{
name
:
'OriginalPrice'
,
required
:
true
,
...
...
@@ -170,6 +193,14 @@
align
:
'left'
,
field
:
row
=>
row
.
PreferentialList
},
{
name
:
"ClassHours"
,
label
:
"课时长度"
,
field
:
"ClassHours"
,
align
:
"left"
,
format
:
(
val
,
row
)
=>
`
${
val
}
课时`
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
...
...
@@ -177,9 +208,9 @@
align
:
'left'
},
{
name
:
'
Cre
ateTimeStr'
,
label
:
'
创建
时间'
,
field
:
'
Cre
ateTimeStr'
,
name
:
'
Upd
ateTimeStr'
,
label
:
'
更新
时间'
,
field
:
'
Upd
ateTimeStr'
,
align
:
'left'
},
{
...
...
src/pages/sale/courseList.vue
View file @
254acaaa
...
...
@@ -174,9 +174,6 @@ li {
>
</q-img>
</q-td>
<q-td
v-else-if=
"col.name == 'CourseIntro'"
>
<span
v-html=
"col.value"
></span>
</q-td>
<q-td
v-else-if=
"col.name == 'PreferentialList'"
style=
"padding-right:0px"
...
...
@@ -194,6 +191,12 @@ li {
<div
class=
"border-bottom"
v-if=
"x.PriceDiscountType == 4"
>
续费享
{{
100
-
x
.
PriceMoney
}}
折优惠
</div>
<div
class=
"remark-font"
v-if=
"x.PriceDiscountType == 0"
>
暂无优惠政策
</div>
</div>
<div
v-if=
"!col.value || col.value.length == 0"
>
<div
class=
"remark-font"
>
暂无优惠政策
</div>
</div>
</q-td>
<q-td
...
...
@@ -201,12 +204,13 @@ li {
style=
"padding-right:0px;padding-left:0px"
>
<div
v-for=
"x in col.value"
>
<div
class=
"border-bottom"
style=
"padding-left: 16px;padding-right: 16px"
>
{{
x
.
SaleCommissionMoney
}}
%
</div>
<div
class=
"border-bottom"
style=
"padding-left: 16px;padding-right: 16px"
:class=
"
{'text-red':x.SaleCommissionType==1}" v-if="x.PriceDiscountType!=0">
{{
x
.
SaleCommissionType
==
1
?
'¥'
:
''
}}{{
x
.
SaleCommissionMoney
}}{{
x
.
SaleCommissionType
==
0
?
'%'
:
''
}}
</div>
<div
v-if=
"x.PriceDiscountType == 0"
>
<div
class=
"remark-font"
>
暂无佣金信息
</div>
</div>
</div>
<div
v-if=
"!col.value || col.value.length==0"
>
<div
class=
"remark-font"
>
暂无佣金信息
</div>
</div>
</q-td>
<q-td
...
...
@@ -214,9 +218,14 @@ li {
style=
"padding-left:0px"
>
<div
v-for=
"x in col.value"
>
<div
class=
"border-bottom"
style=
"padding-left: 16px"
>
{{
x
.
B2BCommissionMoney
}}
%
</div>
<div
class=
"border-bottom"
style=
"padding-left: 16px"
:class=
"
{'text-red':x.B2BCommissionType==1}" v-if="x.PriceDiscountType!=0">
{{
x
.
B2BCommissionType
==
1
?
'¥'
:
''
}}{{
x
.
B2BCommissionMoney
}}{{
x
.
B2BCommissionType
==
0
?
'%'
:
''
}}
</div>
<div
v-if=
"x.PriceDiscountType == 0"
>
<div
class=
"remark-font"
>
暂无佣金信息
</div>
</div>
</div>
<div
v-if=
"!col.value || col.value.length==0"
>
<div
class=
"remark-font"
>
暂无佣金信息
</div>
</div>
</q-td>
<q-td
v-else-if=
"col.name == 'TeacherList'"
>
...
...
@@ -230,6 +239,9 @@ li {
</q-chip>
</div>
</q-td>
<q-td
v-else-if=
"col.name=='CourseIntro'"
>
<q-btn
flat
color=
"primary"
label=
"查看详情"
@
click=
"showContentDialog(col.value)"
/>
</q-td>
<q-td
v-else-if=
"col.name != 'CourseFeature'"
:key=
"col.name"
...
...
@@ -245,7 +257,10 @@ li {
<q-badge
color=
"negative"
class=
"q-mr-md"
>
课程特色
</q-badge>
<div
v-html=
"props.row.CourseFeature"
class=
"text-left col text-negative"
></div>
<div
v-html=
"props.row.CourseFeature"
class=
"text-left col text-negative"
></div>
</div>
</q-td>
</q-tr>
...
...
@@ -262,6 +277,16 @@ li {
</
template
>
</q-table>
</div>
<q-dialog
v-model=
"carousel"
>
<q-card
style=
"width: 600px;max-height:70vh;"
class=
"q-px-sm q-pb-md scroll"
>
<q-card-section>
<div
class=
"text-h6"
>
课程详情
</div>
</q-card-section>
<q-card-section>
<div
v-html=
"showContent"
></div>
</q-card-section>
</q-card>
</q-dialog>
</div>
</template>
<
script
>
...
...
@@ -276,6 +301,8 @@ export default {
currentUrl
:
""
,
data
:
[],
loading
:
true
,
carousel
:
false
,
showContent
:
''
,
columns
:
[
{
name
:
"CourseFeature"
,
...
...
@@ -302,6 +329,13 @@ export default {
align
:
"left"
,
field
:
row
=>
row
.
CourseName
},
{
name
:
"CateName"
,
required
:
true
,
label
:
"系列"
,
align
:
"left"
,
field
:
row
=>
row
.
CateName
},
{
name
:
"OriginalPrice"
,
required
:
true
,
...
...
@@ -349,6 +383,18 @@ export default {
field
:
"ClassHours"
,
align
:
"left"
,
format
:
(
val
,
row
)
=>
`
${
val
}
课时`
},
{
name
:
"CourseIntro"
,
label
:
"课程详情"
,
field
:
"CourseIntro"
,
align
:
"left"
},
{
name
:
"UpdateTimeStr"
,
label
:
"更新时间"
,
field
:
"UpdateTimeStr"
,
align
:
"left"
}
],
msg
:
{
...
...
@@ -369,6 +415,10 @@ export default {
this
.
getcourselist
();
},
methods
:
{
showContentDialog
(
content
){
this
.
showContent
=
content
;
this
.
carousel
=
true
},
//重新查询
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
...
...
@@ -387,8 +437,11 @@ export default {
this
.
loading
=
false
;
res
.
Data
.
PageData
.
forEach
(
x
=>
{
x
.
expand
=
false
;
x
.
CourseFeature
=
x
.
CourseFeature
.
replace
(
new
RegExp
(
'
\
n'
,
"gm"
),
'<br/>'
)
console
.
log
(
x
.
CourseFeature
)
x
.
CourseFeature
=
x
.
CourseFeature
.
replace
(
new
RegExp
(
"
\n
"
,
"gm"
),
"<br/>"
);
console
.
log
(
x
.
CourseFeature
);
});
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
...
...
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