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
05a11e55
Commit
05a11e55
authored
Feb 07, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c29d0ed7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
class-form.vue
src/components/course/class-form.vue
+15
-3
No files found.
src/components/course/class-form.vue
View file @
05a11e55
...
...
@@ -90,9 +90,9 @@
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=
"CourseId"
option-label=
"CourseName"
v-model=
"objOption.CouseId
"
ref=
"CouseId"
:options=
"CourseList"
label=
"关联课程"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
@
input=
"changeCourse()"
/>
<q-select
filled
stack-label
use-input
option-value=
"CourseId"
option-label=
"CourseName
"
v-model=
"objOption.CouseId"
ref=
"CouseId"
:options=
"CourseList"
label=
"关联课程"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
@
filter=
"filterCourse"
@
input=
"changeCourse()"
/>
</div>
</div>
<div
class=
"row wrap"
>
...
...
@@ -442,6 +442,7 @@
optionTitle
:
""
,
saveCourseLoading
:
false
,
CourseList
:
[],
//关联课程下拉数据
AllCourseList
:
[],
//所有课程列表
TeacherList
:
[],
//关联教师下拉数据
SchoolList
:
[],
//关联校区下拉数据
ClassRoomList
:
[],
//教室下拉数据
...
...
@@ -521,6 +522,16 @@
this
.
initObj
()
},
methods
:
{
filterCourse
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
CourseList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllCourseList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
CourseList
=
this
.
AllCourseList
.
filter
(
v
=>
v
.
CourseName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
//选择课程改变事件
changeCourse
()
{
if
(
this
.
objOption
.
CouseId
>
0
&&
this
.
CourseList
&&
this
.
CourseList
.
length
>
0
)
{
...
...
@@ -752,6 +763,7 @@
CourseId
:
0
}
this
.
CourseList
.
unshift
(
obj
);
this
.
AllCourseList
=
res
.
Data
;
}
})
},
...
...
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