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
b3c8d146
Commit
b3c8d146
authored
Jul 09, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增调课表单
parent
503704e1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
215 additions
and
39 deletions
+215
-39
App.vue
src/App.vue
+4
-0
changeClassForm.vue
src/components/teacher/changeClassForm.vue
+211
-39
No files found.
src/App.vue
View file @
b3c8d146
...
...
@@ -28,6 +28,10 @@ body,
.q-position-engine
{
z-index
:
9999
;
}
.el-date-picker
,
.time-select
{
z-index
:
999999
!important
;
}
.remark-font
{
font-size
:
12px
;
font-family
:
Poppins
,
Helvetica
,
sans-serif
;
...
...
src/components/teacher/changeClassForm.vue
View file @
b3c8d146
...
...
@@ -35,18 +35,19 @@
@
input=
"changeTypeResult"
/>
</div>
<div
class=
"row items-center"
>
<div
class=
"text-caption q-my-lg q-px-md text-grey-6 col"
>
变更内容
</div>
<div
class=
"text-caption q-my-lg q-px-md text-grey-6 col"
>
变更内容
注意:需要对变更的内容进行打钩
</div>
<div
class=
"row items-center"
>
<div
class=
"text-grey-6"
>
变更范围:
</div>
<q-radio
size=
"xs"
v-model=
"msg.SettingType"
val=
"1"
label=
"单个或多个"
/>
<q-radio
size=
"xs"
v-model=
"msg.SettingType"
val=
"2"
label=
"全局"
/>
</div>
</div>
<div
v-if=
"msg.SettingType==
1
"
class=
"row items-center"
>
<div
v-if=
"msg.SettingType==
'1'
"
class=
"row items-center"
>
<div
class=
"col"
>
<q-table
no-data-label=
"暂无相关数据"
flat
style=
"height: 300px;"
class=
"sticky-column-table sticky-header-column-table"
separator=
"none"
:data=
"currentClass"
:columns=
"columns"
row-key=
"name"
>
<q-table
no-data-label=
"暂无相关数据"
flat
style=
"max-height: 300px;"
:pagination=
"pages"
class=
"sticky-column-table sticky-header-column-table"
separator=
"none"
:data=
"currentClass"
:columns=
"msg.ChangeType==1?columns:columns2"
row-key=
"ClassPlanId"
selection=
"multiple"
:selected
.
sync=
"selected"
>
<
template
v-slot:body-cell-TimeList=
"props"
>
<q-td
auto-width
:props=
"props"
>
...
...
@@ -55,38 +56,91 @@
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-CheckNum=
"props"
>
<q-td>
<div
v-for=
"(item,index) in props.row.TimeList"
class=
"lessForm_Class"
>
<span
style=
"color:green;"
>
{{
item
.
CheckNum
}}
</span>
/
<span
style=
"color:red;"
>
{{
item
.
NoCheckNum
}}
</span>
</div>
<
template
v-slot:body-cell-TargetClassDate=
"props"
>
<q-td
auto-width
:props=
"props"
style=
"border-left:1xp solid #000;"
>
{{
props
.
row
.
NewPlan
.
ClassDate
}}
<q-popup-edit
v-model=
"props.row.NewPlan.ClassDate"
title=
"变更日期"
persistent
buttons
label-set=
"确认"
label-cancel=
"取消"
>
<el-date-picker
v-model=
"props.row.NewPlan.ClassDate"
type=
"date"
:picker-options=
"pickerOptions"
:clearable=
"false"
value-format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
</q-popup-edit>
</q-td>
</
template
>
</q-table>
</div>
<div
class=
"col"
>
<q-table
no-data-label=
"暂无相关数据"
flat
style=
"height: 300px;"
class=
"sticky-column-table sticky-header-column-table"
separator=
"none"
:data=
"currentClass"
:columns=
"columns2"
row-key=
"name"
>
<
template
v-slot:body-cell-TimeList=
"props"
>
<
template
v-slot:body-cell-TargetTimeList=
"props"
>
<q-td
auto-width
:props=
"props"
>
<div
v-for=
"(item,index) in props.row.TimeList"
class=
"lessForm_Class"
>
<div
v-for=
"(item,index) in props.row.
NewPlan.
TimeList"
class=
"lessForm_Class"
>
{{
index
+
1
}}
节课
{{
item
.
StartTime
}}
-
{{
item
.
EndTime
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-CheckNum=
"props"
>
<q-td>
<div
v-for=
"(item,index) in props.row.TimeList"
class=
"lessForm_Class"
>
<span
style=
"color:green;"
>
{{
item
.
CheckNum
}}
</span>
/
<span
style=
"color:red;"
>
{{
item
.
NoCheckNum
}}
</span>
<q-popup-edit
:validate=
"proteinRangeValidation"
persistent
v-model=
"props.row.NewPlan.TimeList"
title=
"变更时间"
buttons
label-set=
"确认"
label-cancel=
"取消"
>
<div
v-for=
"(item,index) in props.row.NewPlan.TimeList"
class=
"q-mb-md row items-center"
style=
"width:430px"
>
<div
class=
"lessForm_Class col"
>
{{
index
+
1
}}
节课
</div>
<div
class=
"row items-center"
>
<el-time-select
placeholder=
"起始时间"
v-model=
"item.StartTime"
style=
"width:100px"
:picker-options=
"pickers"
>
</el-time-select>
<el-time-select
placeholder=
"结束时间"
v-model=
"item.EndTime"
style=
"width:100px;margin-left:12px;"
:picker-options=
"
{
start: '09:00',
step: '00:15',
end: '22:30',
minTime: item.StartTime
}">
</el-time-select>
<q-input
filled
v-model=
"item.TimeHour"
size=
"xs"
mask=
"#.#"
fill-mask=
"0.0"
label=
"有效课时"
suffix=
"课时"
style=
"width:100px;margin-left:12px"
/>
<q-btn
v-if=
"props.row.NewPlan.TimeList.length>1"
round
color=
"negative"
class=
"q-ml-md"
size=
"xs"
icon=
"iconfont icon-guanbi1"
@
click=
"removeTime(props.row.NewPlan,index)"
></q-btn>
</div>
</div>
<q-btn
round
color=
"primary"
size=
"xs"
icon=
"iconfont icon-img_haha"
@
click=
"addTime(props.row.NewPlan)"
></q-btn>
</q-popup-edit>
</q-td>
</
template
>
<
template
v-slot:bottom
></
template
>
</q-table>
</div>
</div>
<div
v-if=
"msg.ChangeType==3"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6 col"
>
目标教室
</div>
<div
class=
"row"
>
<q-select
standout=
"bg-dark text-white"
option-value=
"RoomId"
option-label=
"RoomName"
v-model=
"msg.TargetRoom"
:options=
"roomList"
emit-value
map-options
label=
"教室"
class=
"col-6"
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section>
<q-item-label
v-html=
"opt.RoomName"
></q-item-label>
</q-item-section>
<q-item-section
side
>
<q-item-label
v-html=
"opt.SchoolName"
></q-item-label>
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
<div
v-if=
"msg.ChangeType==2"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6 col"
>
目标老师
</div>
<div
class=
"row"
>
<q-select
standout=
"bg-dark text-white"
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"msg.TargetTeacherId"
:options=
"TeacherList"
emit-value
map-options
label=
"老师"
class=
"col-6"
>
</q-select>
</div>
</div>
</q-scroll-area>
</q-card-section>
...
...
@@ -104,7 +158,9 @@
<
script
>
import
{
getClassDropDownList
,
getSchoolDropdown
getSchoolDropdown
,
queryClassRoomPage
,
getTeacherDropDownList
}
from
"../../api/school/index"
;
import
{
queryCourseDropdownList
,
...
...
@@ -113,10 +169,25 @@
export
default
{
data
()
{
return
{
TeacherList
:[],
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
();
}
},
pages
:{
rowsPerPage
:
100000
},
persistent
:
true
,
saveLoading
:
false
,
contentStyle
:
{},
contentActiveStyle
:
{},
pickers
:
{
start
:
'09:00'
,
step
:
'00:15'
,
end
:
'22:30'
},
thumbStyle
:
{
right
:
'2px'
,
borderRadius
:
'5px'
,
...
...
@@ -129,9 +200,11 @@
SchoolId
:
-
1
,
CouseId
:
0
,
ChangeType
:
1
,
SettingType
:
1
SettingType
:
"1"
,
TargetRoom
:
0
,
TargetTeacherId
:
0
},
selected
:
[],
classList
:
[],
schoolList
:
[],
courseList
:
[],
...
...
@@ -144,7 +217,7 @@
IsQuerySurplusPlan
:
1
},
currentClass
:
[],
columns
:
[{
columns
2
:
[{
name
:
'RoomName'
,
label
:
'教室名称'
,
field
:
'RoomName'
,
...
...
@@ -168,17 +241,40 @@
align
:
'left'
}
],
columns2
:
[{
columns
:
[{
name
:
'RoomName'
,
label
:
'教室名称'
,
field
:
'RoomName'
,
align
:
'left'
,
},
{
name
:
'ClassDate'
,
label
:
'
目标
日期'
,
label
:
'
上课
日期'
,
field
:
'ClassDate'
,
align
:
'left'
},
{
name
:
'TeacherName'
,
label
:
'老师'
,
field
:
'TeacherName'
,
align
:
'left'
},
{
name
:
'TimeList'
,
label
:
'
目标
时间'
,
label
:
'
上课
时间'
,
field
:
'TimeList'
,
align
:
'left'
},
{
name
:
'TargetClassDate'
,
label
:
'目标日期'
,
field
:
'TargetClassDate'
,
align
:
'left'
},
{
name
:
'TargetTimeList'
,
label
:
'目标时间'
,
field
:
'TargetTimeList'
,
align
:
'left'
}
],
changeType
:
[{
...
...
@@ -197,7 +293,8 @@
Id
:
4
,
Name
:
"取消上课"
}
]
],
roomList
:[]
}
},
mounted
()
{
...
...
@@ -208,18 +305,86 @@
this
.
getClass
()
this
.
getSchool
()
this
.
getCourseList
()
this
.
getClassRoomPage
()
this
.
GetTeacherList
()
},
methods
:
{
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
var
obj
=
{
TeacherName
:
'请选择'
,
TId
:
0
}
this
.
TeacherList
.
unshift
(
obj
);
}
})
},
getClassRoomPage
()
{
queryClassRoomPage
({
pageIndex
:
1
,
pageSize
:
10000
,
RoomName
:
""
,
School_Id
:
0
,
//校区编号
Status
:
'-1'
,
//状态
}).
then
(
res
=>
{
this
.
roomList
=
res
.
Data
.
PageData
;
var
obj
=
{
RoomName
:
'请选择'
,
RoomId
:
0
,
SchoolName
:
""
}
this
.
roomList
.
push
(
obj
)
})
},
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
save
()
{
},
proteinRangeValidation
(
val
){
let
newList
=
[]
let
errorMsg
=
""
val
.
forEach
(
x
=>
{
if
(
x
.
StartTime
&&
x
.
EndTime
&&
x
.
TimeHour
&&
x
.
StartTime
!=
""
&&
x
.
EndTime
!=
""
&&
x
.
TimeHour
!=
"0.0"
){
newList
.
push
({
StartTime
:
x
.
StartTime
,
EndTime
:
x
.
EndTime
,
TimeHour
:
x
.
TimeHour
});
}
else
{
errorMsg
=
"存在不完善的数据,请完善数据信息"
}
})
if
(
errorMsg
!=
""
){
this
.
$q
.
notify
({
icon
:
'iconfont icon-guanbi1'
,
color
:
'negative'
,
timeout
:
2000
,
message
:
errorMsg
,
position
:
'top'
})
}
console
.
log
(
val
)
return
errorMsg
==
""
},
removeTime
(
plan
,
i
){
plan
.
TimeList
.
splice
(
i
,
1
)
},
addTime
(
plan
){
let
obj
=
{
EndTime
:
""
,
StartTime
:
""
,
TimeHour
:
0
}
plan
.
TimeList
.
push
(
plan
)
},
changeClass
(
val
)
{
this
.
currentClass
=
this
.
classList
.
find
(
x
=>
{
return
x
.
ClassId
==
val
this
.
currentClass
=
this
.
classList
.
find
(
x
=>
{
return
x
.
ClassId
==
val
}).
PlanList
console
.
log
(
this
.
currentClass
)
},
...
...
@@ -237,6 +402,13 @@
this
.
classList
=
[];
this
.
msg
.
classId
=
0
if
(
res
.
Code
==
1
)
{
res
.
Data
.
forEach
(
x
=>
{
x
.
PlanList
.
forEach
(
y
=>
{
let
newPlan
=
JSON
.
parse
(
JSON
.
stringify
(
y
))
y
.
NewPlan
=
newPlan
})
})
this
.
classList
=
res
.
Data
;
var
obj
=
{
ClassName
:
'请选择'
,
...
...
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