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
0e18f48c
Commit
0e18f48c
authored
Oct 09, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c63d8c66
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
12 deletions
+61
-12
category-form.vue
src/components/course/category-form.vue
+24
-7
course-form.vue
src/components/course/course-form.vue
+13
-2
catagory.vue
src/pages/course/catagory.vue
+24
-3
No files found.
src/components/course/category-form.vue
View file @
0e18f48c
...
...
@@ -9,12 +9,17 @@
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"objOption.CateName"
ref=
"CateName"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"系列名称"
:rules=
"[val => !!val || '系列名称']"
/>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"objOption.SortNum"
ref=
"SortNum"
<q-select
filled
class=
"col-6 q-pr-lg q-pb-lg"
v-model=
"objOption.CourseSubject"
:options=
"CourseSubjectList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"所属科目"
clearable
/>
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"objOption.SortNum"
ref=
"SortNum"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"排序"
@
keyup
.
native=
"checkInteger(objOption,'SortNum')"
/>
<div
class=
"col-12 q-pr-lg q-pb-lg q-pt-lg"
>
<q-toggle
size=
"md"
label=
"状态"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"objOption.Status"
title=
"注意:关闭后,分类将无法正常使用."
/>
</div
>
</div
>
<div
class=
"col-12 q-pr-lg q-pb-lg q-pt-lg"
>
<q-toggle
size=
"md"
label=
"状态"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"objOption.Status"
title=
"注意:关闭后,分类将无法正常使用."
/
>
</div>
</q-card-section>
<q-separator
/>
...
...
@@ -30,7 +35,8 @@
import
{
queryCourseCategoryTree
,
queryCourseCategoryInfo
,
saveCourseCategoryInfo
saveCourseCategoryInfo
,
getCourseSubject
}
from
'../../api/course/index'
export
default
{
props
:
{
...
...
@@ -49,19 +55,29 @@
CateName
:
""
,
//系列名称
SortNum
:
0
,
//排序
Status
:
0
,
//状态(0-正常,1-禁用)},
CourseSubject
:
''
},
optionTitle
:
""
,
//树形课程分类列表
TreeCategoryList
:
[],
saveLoading
:
false
,
chooseCategroyArray
:
[],
CourseSubjectList
:[]
}
},
mounted
()
{
this
.
getCategoryTreeList
();
this
.
initObj
()
this
.
initObj
();
this
.
queryCourseSubject
();
},
methods
:
{
queryCourseSubject
()
{
getCourseSubject
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CourseSubjectList
=
res
.
Data
;
}
})
},
//获取树形课程分类列表
getCategoryTreeList
()
{
this
.
TreeCategoryList
=
[];
...
...
@@ -82,6 +98,7 @@
this
.
objOption
.
CateName
=
res
.
Data
.
CateName
;
this
.
objOption
.
SortNum
=
res
.
Data
.
SortNum
;
this
.
objOption
.
Status
=
res
.
Data
.
Status
;
this
.
objOption
.
CourseSubject
=
res
.
Data
.
CourseSubject
;
if
(
res
.
Data
.
ParentId
&&
res
.
Data
.
ParentId
>
0
)
{
this
.
chooseCategroyArray
.
push
(
res
.
Data
.
ParentId
);
}
...
...
src/components/course/course-form.vue
View file @
0e18f48c
...
...
@@ -87,14 +87,14 @@
ref=
"ClassHours"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"课时数量"
:rules=
"[(val) => !!val || '请填写课时信息']"
/>
</div>
<div
class=
"col-6"
>
<q-select
filled
stack-label
option-value=
"CateId"
option-label=
"CateName"
v-model=
"objOption.CateId"
<q-select
filled
stack-label
@
input=
"getCourseSubject(objOption.CateId)"
option-value=
"CateId"
option-label=
"CateName"
v-model=
"objOption.CateId"
ref=
"CateId"
:options=
"TreeCategoryList"
label=
"所属系列"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
:rules=
"[(val) => !!val || '请选择课程所属系列']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.CourseSubject"
<q-select
filled
stack-label
option-value=
"Id"
disable
option-label=
"Name"
v-model=
"objOption.CourseSubject"
ref=
"CourseSubject"
:options=
"courseSubjectList"
label=
"所属科目"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
...
...
@@ -237,6 +237,13 @@
this
.
initObj
();
},
methods
:
{
//根据系列改变获取所属科目
getCourseSubject
(
Id
){
if
(
Id
>
0
){
let
val
=
this
.
TreeCategoryList
.
find
(
x
=>
x
.
CateId
==
Id
);
this
.
objOption
.
CourseSubject
=
val
.
CourseSubject
;
}
},
//获取课程等级列表
getCourseRateList
()
{
getCourseRate
({}).
then
(
res
=>
{
...
...
@@ -297,6 +304,10 @@
var
qMsg
=
{};
queryCourseCategoryTree
(
qMsg
).
then
((
res
)
=>
{
this
.
TreeCategoryList
=
res
.
Data
;
if
(
this
.
objOption
.
CateId
>
0
){
let
val
=
this
.
TreeCategoryList
.
find
(
x
=>
x
.
CourseSubject
==
this
.
objOption
.
CateId
);
this
.
objOption
.
CourseSubject
=
val
.
CourseSubject
;
}
});
},
//新增阶梯定价
...
...
src/pages/course/catagory.vue
View file @
0e18f48c
...
...
@@ -3,9 +3,14 @@
<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
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.CateName"
label=
"系列名称"
<q-input
@
input=
"resetSearch"
clearable
filled
v-model=
"msg.CateName"
label=
"系列名称"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
filled
v-model=
"msg.CourseSubject"
:options=
"CourseSubjectList"
option-label=
"Name"
option-value=
"Id"
emit-value
map-options
label=
"所属科目"
clearable
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
...
...
@@ -45,7 +50,8 @@
<
script
>
import
{
queryCourseCategoryPage
,
deleteCourseCategory
deleteCourseCategory
,
getCourseSubject
}
from
'../../api/course/index'
import
categoryForm
from
'../../components/course/category-form'
...
...
@@ -64,7 +70,9 @@
rowsPerPage
:
10
,
PageCount
:
1
,
CateName
:
""
,
//系列名称
CourseSubject
:
''
//所属科目
},
CourseSubjectList
:
[],
//科目列表
currentUrl
:
""
,
dataList
:
[],
keyWords
:
''
,
...
...
@@ -73,6 +81,11 @@
categoryObj
:
{},
loading
:
true
,
columns
:
[{
name
:
'CourseSubjectName'
,
label
:
'所属科目'
,
field
:
'CourseSubjectName'
,
align
:
'left'
},{
name
:
'CateName'
,
label
:
'系列名称'
,
field
:
'CateName'
,
...
...
@@ -114,9 +127,17 @@
mounted
()
{
this
.
currentUrl
=
this
.
$route
.
path
this
.
getcategorypage
()
this
.
getcategorypage
();
this
.
queryCourseSubject
()
},
methods
:
{
queryCourseSubject
()
{
getCourseSubject
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CourseSubjectList
=
res
.
Data
;
}
})
},
//重新查询
resetSearch
()
{
this
.
msg
.
PageIndex
=
1
;
...
...
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