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
a0e8aa92
Commit
a0e8aa92
authored
Dec 04, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
75f1cf97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
93 deletions
+88
-93
class-form.vue
src/components/course/class-form.vue
+88
-93
No files found.
src/components/course/class-form.vue
View file @
a0e8aa92
...
@@ -8,41 +8,49 @@
...
@@ -8,41 +8,49 @@
background
:
transparent
;
background
:
transparent
;
border
:
0
;
border
:
0
;
}
}
.common_Style
{
.common_Style
{
display
:
inline-block
;
display
:
inline-block
;
width
:
30px
;
width
:
30px
;
height
:
30px
;
height
:
30px
;
border-radius
:
50%
;
border-radius
:
50%
;
text-align
:
center
;
text-align
:
center
;
line-height
:
30px
;
line-height
:
30px
;
}
}
.classForm_monday
{
.classForm_monday
{
background-color
:
#ced9f8
;
background-color
:
#ced9f8
;
color
:
#2961FE
;
color
:
#2961FE
;
}
}
.classForm_tuesday
{
.classForm_tuesday
{
background-color
:
#d9f3ff
;
background-color
:
#d9f3ff
;
color
:
#3FC4FF
;
color
:
#3FC4FF
;
}
}
.classForm_wednesday
{
.classForm_wednesday
{
background-color
:
#f6e2cb
;
background-color
:
#f6e2cb
;
color
:
#F28C1D
;
color
:
#F28C1D
;
}
}
.classForm_thursday
{
.classForm_thursday
{
background-color
:
#ccf3eb
;
background-color
:
#ccf3eb
;
color
:
#02C499
;
color
:
#02C499
;
}
}
.classForm_friday
{
.classForm_friday
{
background-color
:
#f7cfd6
;
background-color
:
#f7cfd6
;
color
:
#F72E52
;
color
:
#F72E52
;
}
}
.classForm_saturday
{
.classForm_saturday
{
background-color
:
#fff5cc
;
background-color
:
#fff5cc
;
color
:
#FFCC00
;
color
:
#FFCC00
;
}
}
.classForm_sunday
{
.classForm_sunday
{
background-color
:
#e6e3fe
;
background-color
:
#e6e3fe
;
color
:
#8175FB
;
color
:
#8175FB
;
}
}
</
style
>
</
style
>
...
@@ -181,13 +189,10 @@
...
@@ -181,13 +189,10 @@
<div
class=
"row wrap"
v-if=
"objOption.ClassStyle==1"
>
<div
class=
"row wrap"
v-if=
"objOption.ClassStyle==1"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
multiple
option-value=
"value"
option-label=
"label"
v-model=
"checkedArr"
<q-select
filled
stack-label
multiple
option-value=
"value"
option-label=
"label"
v-model=
"checkedArr"
ref=
"ClassStyle"
:options=
"weekList"
label=
"选择周几"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
ref=
"ClassStyle"
:options=
"weekList"
label=
"选择周几"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
emit-value
map-options
>
map-options
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<q-item
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section
avatar
>
<q-item-section
avatar
>
<span
v-if=
"opt.icon==1"
class=
"common_Style classForm_monday"
>
月
</span>
<span
v-if=
"opt.icon==1"
class=
"common_Style classForm_monday"
>
月
</span>
<span
v-if=
"opt.icon==2"
class=
"common_Style classForm_tuesday"
>
火
</span>
<span
v-if=
"opt.icon==2"
class=
"common_Style classForm_tuesday"
>
火
</span>
...
@@ -203,7 +208,6 @@
...
@@ -203,7 +208,6 @@
<q-item-section
side
>
<q-item-section
side
>
<i
style=
"color:#2961FE"
v-if=
"selected"
class=
"iconfont icon-chenggong"
></i>
<i
style=
"color:#2961FE"
v-if=
"selected"
class=
"iconfont icon-chenggong"
></i>
</q-item-section>
</q-item-section>
</q-item>
</q-item>
</
template
>
</
template
>
</q-select>
</q-select>
...
@@ -237,7 +241,9 @@
...
@@ -237,7 +241,9 @@
}
from
'../../api/course/index'
}
from
'../../api/course/index'
import
{
import
{
getTeacherDropDownList
,
getTeacherDropDownList
,
getSchoolDropdown
getSchoolDropdown
,
saveClass
,
getClassInfo
}
from
'../../api/school/index'
}
from
'../../api/school/index'
export
default
{
export
default
{
components
:
{},
components
:
{},
...
@@ -249,7 +255,6 @@
...
@@ -249,7 +255,6 @@
},
},
data
()
{
data
()
{
return
{
return
{
aa
:
3
,
persistent
:
true
,
persistent
:
true
,
objOption
:
{
objOption
:
{
ClassId
:
0
,
//班级编号
ClassId
:
0
,
//班级编号
...
@@ -284,94 +289,84 @@
...
@@ -284,94 +289,84 @@
optionTitle
:
""
,
optionTitle
:
""
,
defaultArray
:
[],
defaultArray
:
[],
saveCourseLoading
:
false
,
saveCourseLoading
:
false
,
ClassList
:
[],
//关联课程下拉数据
ClassList
:
[],
//关联课程下拉数据
TeacherList
:
[],
//关联教师下拉数据
TeacherList
:
[],
//关联教师下拉数据
SchoolList
:
[],
//关联校区下拉数据
SchoolList
:
[],
//关联校区下拉数据
classRoomList
:
[],
// 关联教室
classRoomList
:
[],
// 关联教室
ladderPriceList
:
[{
//阶梯定价数组
ladderPriceList
:
[{
//阶梯定价数组
pnumber
:
2
,
pnumber
:
2
,
price
:
''
price
:
''
}],
}],
checkedArr
:[],
checkedArr
:
[],
//上课设置
//上课设置
classSetList
:[{
classSetList
:
[{
Name
:
'按周排课'
,
Name
:
'按周排课'
,
Id
:
1
Id
:
1
},{
},
{
Name
:
'按月排课'
,
Name
:
'按月排课'
,
Id
:
2
Id
:
2
},{
},
{
Name
:
'固定日期'
,
Name
:
'固定日期'
,
Id
:
3
Id
:
3
},{
},
{
Name
:
'约课'
,
Name
:
'约课'
,
Id
:
4
Id
:
4
}],
}],
//周几
//周几
weekList
:[{
weekList
:
[{
label
:
'周一'
,
label
:
'周一'
,
value
:
'周一'
,
value
:
'周一'
,
icon
:
1
icon
:
1
},{
},
{
label
:
'周二'
,
label
:
'周二'
,
value
:
'周二'
,
value
:
'周二'
,
icon
:
2
icon
:
2
},{
},
{
label
:
'周三'
,
label
:
'周三'
,
value
:
'周三'
,
value
:
'周三'
,
icon
:
3
icon
:
3
},{
},
{
label
:
'周四'
,
label
:
'周四'
,
value
:
'周四'
,
value
:
'周四'
,
icon
:
4
icon
:
4
},{
},
{
label
:
'周五'
,
label
:
'周五'
,
value
:
'周五'
,
value
:
'周五'
,
icon
:
5
icon
:
5
},{
},
{
label
:
'周六'
,
label
:
'周六'
,
value
:
'周六'
,
value
:
'周六'
,
icon
:
6
icon
:
6
},{
},
{
label
:
'周日'
,
label
:
'周日'
,
value
:
'周日'
,
value
:
'周日'
,
icon
:
7
icon
:
7
}],
}],
//选中日期
//选中日期
checkedDays
:[]
checkedDays
:
[]
}
}
},
},
mounted
()
{
created
()
{
this
.
getSchool
();
this
.
CourseList
();
this
.
CourseList
();
this
.
GetTeacherList
();
this
.
GetTeacherList
();
this
.
getSchool
();
},
mounted
()
{
this
.
initObj
()
this
.
initObj
()
},
},
methods
:
{
methods
:
{
//初始化表单
//初始化表单
initObj
()
{
initObj
()
{
this
.
defaultArray
=
[];
this
.
defaultArray
=
[];
if
(
this
.
saveObj
&&
this
.
saveObj
.
C
ourse
Id
>
0
)
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
C
lass
Id
>
0
)
{
queryCourse
Info
({
getClass
Info
({
C
ourseId
:
this
.
saveObj
.
Course
Id
C
lassId
:
this
.
saveObj
.
Class
Id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
objOption
.
CourseId
=
res
.
Data
.
CourseId
;
console
.
log
(
"rees"
,
res
.
Data
);
this
.
objOption
.
CoverImg
=
res
.
Data
.
CoverImg
;
this
.
objOption
.
CourseName
=
res
.
Data
.
CourseName
;
this
.
objOption
.
CourseIntro
=
res
.
Data
.
CourseIntro
;
this
.
objOption
.
CateId
=
res
.
Data
.
CateId
;
this
.
defaultArray
.
push
(
res
.
Data
.
CateId
);
})
})
this
.
optionTitle
=
"修改
课程
信息"
this
.
optionTitle
=
"修改
班级
信息"
}
else
{
}
else
{
this
.
optionTitle
=
"新增课程"
this
.
optionTitle
=
"新增班级"
this
.
objOption
.
CourseId
=
0
;
this
.
objOption
.
CoverImg
=
""
;
this
.
objOption
.
CourseName
=
""
;
this
.
objOption
.
CourseIntro
=
""
;
this
.
objOption
.
CateId
=
0
;
}
}
},
},
//关闭弹窗
//关闭弹窗
...
@@ -379,10 +374,10 @@
...
@@ -379,10 +374,10 @@
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
this
.
persistent
=
false
this
.
persistent
=
false
},
},
//保存
菜单
//保存
班级
saveCourse
()
{
saveCourse
()
{
this
.
saveCourseLoading
=
true
this
.
saveCourseLoading
=
true
saveC
ourseInfo
(
this
.
objOption
).
then
(
res
=>
{
saveC
lass
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveCourseLoading
=
false
this
.
saveCourseLoading
=
false
this
.
$q
.
notify
({
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
icon
:
'iconfont icon-chenggong'
,
...
...
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