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
89095de1
Commit
89095de1
authored
Jul 29, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
f0207acc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
196 deletions
+120
-196
classconflict-form.vue
src/components/course/classconflict-form.vue
+120
-196
No files found.
src/components/course/classconflict-form.vue
View file @
89095de1
...
@@ -23,11 +23,11 @@
...
@@ -23,11 +23,11 @@
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
class=
"CLM-Form"
>
<q-card
style=
"width: 800px;max-width:900px;"
class=
"CLM-Form"
>
<q-card-section>
<q-card-section>
<div
class=
"text-h6"
>
上课计划冲突调整 【
{{
msg
.
ClassName
}}
(
{{
m
sg
.
ClassNo
}}
)】
</div>
<div
class=
"text-h6"
>
上课计划冲突调整 【
{{
showMsg
.
ClassName
}}
(
{{
showM
sg
.
ClassNo
}}
)】
</div>
</q-card-section>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<q-table
:pagination=
"
p
Msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
selection=
"multiple"
flat
<q-table
:pagination=
"
show
Msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
selection=
"multiple"
flat
:selected
.
sync=
"selected"
class=
"sticky-column-table sticky-header-column-table"
separator=
"none"
:selected
.
sync=
"selected
All
"
class=
"sticky-column-table sticky-header-column-table"
separator=
"none"
style=
"max-height: 450px"
:data=
"dataList"
:columns=
"columns"
row-key=
"ClassPlanId"
hide-bottom
>
style=
"max-height: 450px"
:data=
"dataList"
:columns=
"columns"
row-key=
"ClassPlanId"
hide-bottom
>
<template
v-slot:top=
"props"
>
<template
v-slot:top=
"props"
>
<div
class=
"text-caption q-my-lg q-px-md text-grey-6 col"
>
<div
class=
"text-caption q-my-lg q-px-md text-grey-6 col"
>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<div
class=
"page-option"
>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"isShowClassForm=true"
label=
"全部重排"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"isShowClassForm=true"
label=
"全部重排"
/>
<q-select
filled
stack-label
style=
"display:inline-block;width:150px;"
option-value=
"Id"
<q-select
filled
stack-label
style=
"display:inline-block;width:150px;"
option-value=
"Id"
option-label=
"Name"
v-model=
"
m
sg.ChangeType"
:options=
"changeTypeList"
label=
"变更类型"
:dense=
"false"
option-label=
"Name"
v-model=
"
postM
sg.ChangeType"
:options=
"changeTypeList"
label=
"变更类型"
:dense=
"false"
class=
"col-6"
emit-value
map-options
/>
class=
"col-6"
emit-value
map-options
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -99,8 +99,7 @@
...
@@ -99,8 +99,7 @@
</q-banner>
</q-banner>
</q-popup-proxy>
</q-popup-proxy>
</span>
</span>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400;"
label=
"编辑"
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400;"
label=
"编辑"
@
click=
"getInfo()"
>
@
click=
"getInfo(props.row)"
>
<q-popup-proxy>
<q-popup-proxy>
<q-banner
v-if=
"isShowEdit"
>
<q-banner
v-if=
"isShowEdit"
>
<div
class=
"classConflitDialog"
>
<div
class=
"classConflitDialog"
>
...
@@ -184,21 +183,21 @@
...
@@ -184,21 +183,21 @@
</q-table>
</q-table>
<div
class=
"row wrap"
style=
"margin-top:20px;"
>
<div
class=
"row wrap"
style=
"margin-top:20px;"
>
<div
class=
"col-4"
>
<div
class=
"col-4"
>
<
template
v-if=
"
m
sg.ChangeType==1"
>
<
template
v-if=
"
postM
sg.ChangeType==1"
>
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"postMsg.TeacherId"
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"postMsg.TeacherId"
ref=
"Teacher_Id"
:options=
"TeacherList"
label=
"关联教师"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
ref=
"Teacher_Id"
:options=
"TeacherList"
label=
"关联教师"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
/>
map-options
/>
</
template
>
</
template
>
<
template
v-if=
"
m
sg.ChangeType==2"
>
<
template
v-if=
"
postM
sg.ChangeType==2"
>
<q-select
filled
stack-label
option-value=
"RoomId"
option-label=
"RoomName"
v-model=
"postMsg.ClassRoomId"
<q-select
filled
stack-label
option-value=
"RoomId"
option-label=
"RoomName"
v-model=
"postMsg.ClassRoomId"
ref=
"ClassRoomId"
:options=
"ClassRoomList"
label=
"关联教室"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
ref=
"ClassRoomId"
:options=
"ClassRoomList"
label=
"关联教室"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
/>
map-options
/>
</
template
>
</
template
>
</div>
</div>
<
template
v-if=
"
m
sg.ChangeType==3"
>
<
template
v-if=
"
postM
sg.ChangeType==3"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<div
style=
"display:flex;justify-content:flex-end;margin-bottom:20px;"
>
<div
style=
"display:flex;justify-content:flex-end;margin-bottom:20px;"
>
<q-btn
@
click=
"addStep
Two(
)"
size=
"10px"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
<q-btn
@
click=
"addStep
One(postMsg
)"
size=
"10px"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
</div>
</div>
<div
class=
"row wrap"
style=
"position:relative;"
v-for=
"(subItem,subIndex) in postMsg.TimeList"
<div
class=
"row wrap"
style=
"position:relative;"
v-for=
"(subItem,subIndex) in postMsg.TimeList"
:key=
"subIndex"
>
:key=
"subIndex"
>
...
@@ -240,14 +239,12 @@
...
@@ -240,14 +239,12 @@
@
keyup
.
native=
"checkPrice(subItem,'TimeHour')"
/>
@
keyup
.
native=
"checkPrice(subItem,'TimeHour')"
/>
</div>
</div>
<div
class=
"delBtnStyle"
>
<div
class=
"delBtnStyle"
>
<i
@
click=
"delStep
Two(
subIndex)"
class=
"iconfont icon-guanbi"
></i>
<i
@
click=
"delStep
One(postMsg,
subIndex)"
class=
"iconfont icon-guanbi"
></i>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
</div>
</div>
</q-card-section>
</q-card-section>
<q-separator
/>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-card-actions
align=
"right"
class=
"bg-white"
>
...
@@ -268,7 +265,6 @@
...
@@ -268,7 +265,6 @@
UpdateClassPlanSingle
,
UpdateClassPlanSingle
,
BatchUpdateClassPlan
BatchUpdateClassPlan
}
from
"../../api/school/index"
;
}
from
"../../api/school/index"
;
export
default
{
export
default
{
props
:
{
props
:
{
ClassId
:
{
ClassId
:
{
...
@@ -280,6 +276,10 @@
...
@@ -280,6 +276,10 @@
return
{
return
{
persistent
:
true
,
persistent
:
true
,
changeTypeList
:
[{
changeTypeList
:
[{
Id
:
0
,
Name
:
"课程"
,
},
{
Id
:
1
,
Id
:
1
,
Name
:
"老师"
,
Name
:
"老师"
,
},
{
},
{
...
@@ -323,56 +323,27 @@
...
@@ -323,56 +323,27 @@
],
],
dataList
:
[],
dataList
:
[],
loading
:
true
,
loading
:
true
,
selected
:
[],
//全选数据
selectedAll
:
[],
//全选数据
pMsg
:
{
showMsg
:
{
rowsPerPage
:
1000
,
},
msg
:
{
ClassId
:
53
,
ClassName
:
""
,
ClassName
:
""
,
ClassNo
:
""
,
ClassNo
:
""
,
ChangeType
:
1
,
rowsPerPage
:
1000
,
},
},
isShowEdit
:
false
,
isShowEdit
:
false
,
//单行修改参数
addMsg
:
{
ClassPlanId
:
0
,
ClassId
:
0
,
ClassDate
:
""
,
ClassDateStr
:
""
,
ClassRoomId
:
0
,
RoomName
:
""
,
TeacherId
:
0
,
TeacherName
:
""
,
UserIcon
:
""
,
PlanTimeList
:
[{
ClassTimeId
:
0
,
StartTime
:
""
,
EndTime
:
""
,
TimeHour
:
0
,
}]
},
TeacherList
:
[],
//老师下拉数据
TeacherList
:
[],
//老师下拉数据
ClassRoomList
:
[],
//教室下拉数据
ClassRoomList
:
[],
//教室下拉数据
saveLoading
:
false
,
saveLoading
:
false
,
isShowClassForm
:
false
,
isShowClassForm
:
false
,
isShowConForm
:
false
,
//选中传入对象
selectObj
:
{
ClassId
:
53
,
ChangeType
:
1
,
selected
:
[]
},
saveClassLoading
:
false
,
saveClassLoading
:
false
,
//提交参数
//提交参数
postMsg
:
{
postMsg
:
{
ClassId
:
0
,
ClassId
:
0
,
ChangeType
:
1
,
//调动类型(1-老师,2-教室,3-时段)
ChangeType
:
0
,
//调动类型(1-老师,2-教室,3-时段)
ClassPlanIdList
:
[],
//选中的ClassPlanId数组
ClassPlanIdList
:
[],
//选中的ClassPlanId数组
ClassRoomId
:
0
,
//全局调整--教室编号
PlanList
:
[],
TeacherId
:
0
,
//全局调整--教师编号
ClassRoomId
:
""
,
//全局调整--教室编号
TimeList
:
[{
TeacherId
:
""
,
//全局调整--教师编号
PlanTimeList
:
[{
StartTime
:
""
,
//开始时间
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
EndTime
:
""
,
//结束时间
TimeHour
:
0
,
//消耗课时
TimeHour
:
0
,
//消耗课时
...
@@ -383,19 +354,15 @@
...
@@ -383,19 +354,15 @@
created
()
{
created
()
{
this
.
GetTeacherList
();
this
.
GetTeacherList
();
this
.
getClassRoomList
();
this
.
getClassRoomList
();
},
computed
:
{
},
},
mounted
()
{
mounted
()
{
if
(
this
.
ClassId
)
{
if
(
this
.
ClassId
)
{
this
.
msg
.
ClassId
=
this
.
ClassId
;
this
.
postMsg
.
ClassId
=
this
.
ClassId
;
this
.
selectObj
.
ClassId
=
this
.
ClassId
;
}
}
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
//点击新增
//点击新增
上课时间段
addStepOne
(
item
)
{
addStepOne
(
item
)
{
var
obj
=
{
var
obj
=
{
StartTime
:
""
,
//开始时间
StartTime
:
""
,
//开始时间
...
@@ -404,27 +371,15 @@
...
@@ -404,27 +371,15 @@
}
}
item
.
PlanTimeList
.
push
(
obj
);
item
.
PlanTimeList
.
push
(
obj
);
},
},
//删除
//删除
上课时间段
delStepOne
(
item
,
index
)
{
delStepOne
(
item
,
index
)
{
item
.
PlanTimeList
.
splice
(
index
,
1
);
item
.
PlanTimeList
.
splice
(
index
,
1
);
},
},
//新增
//获取老师名称
addStepTwo
()
{
var
obj
=
{
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
TimeHour
:
0
,
//消耗课时
}
this
.
postMsg
.
TimeList
.
push
(
obj
);
},
//删除
delStepTwo
(
index
)
{
this
.
postMsg
.
TimeList
.
splice
(
index
,
1
);
},
getTeacherName
(
teacherId
)
{
getTeacherName
(
teacherId
)
{
let
obj
=
{};
let
obj
=
{};
obj
=
this
.
TeacherList
.
find
(
item
=>
{
obj
=
this
.
TeacherList
.
find
(
item
=>
{
return
item
.
TId
===
teacherId
;
//筛选出匹配数据
return
item
.
TId
===
teacherId
;
});
});
var
tName
=
""
;
var
tName
=
""
;
if
(
obj
)
{
if
(
obj
)
{
...
@@ -432,10 +387,11 @@
...
@@ -432,10 +387,11 @@
}
}
return
tName
;
return
tName
;
},
},
//获取教室名称
getClassRoomName
(
ClassRoomId
)
{
getClassRoomName
(
ClassRoomId
)
{
let
obj
=
{};
let
obj
=
{};
obj
=
this
.
ClassRoomList
.
find
(
item
=>
{
obj
=
this
.
ClassRoomList
.
find
(
item
=>
{
return
item
.
RoomId
===
ClassRoomId
;
//筛选出匹配数据
return
item
.
RoomId
===
ClassRoomId
;
});
});
var
tName
=
""
;
var
tName
=
""
;
if
(
obj
)
{
if
(
obj
)
{
...
@@ -448,29 +404,25 @@
...
@@ -448,29 +404,25 @@
this
.
$emit
(
'close'
);
this
.
$emit
(
'close'
);
this
.
persistent
=
false
;
this
.
persistent
=
false
;
},
},
//获取冲突的数据列表
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
dataList
=
[];
this
.
dataList
=
[];
GetRepeatClassPlan
(
this
.
msg
).
then
(
res
=>
{
this
.
selectedAll
=
[];
GetRepeatClassPlan
({
ClassId
:
this
.
ClassId
}).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
.
RepeatList
;
this
.
dataList
=
res
.
Data
.
RepeatList
;
this
.
msg
.
ClassNo
=
res
.
Data
.
ClassNo
;
this
.
showMsg
.
ClassNo
=
res
.
Data
.
ClassNo
;
this
.
msg
.
ClassName
=
res
.
Data
.
ClassName
;
this
.
showMsg
.
ClassName
=
res
.
Data
.
ClassName
;
this
.
selected
=
[];
}
}
})
})
},
},
//编辑修改
//编辑修改
getInfo
(
item
)
{
getInfo
()
{
this
.
isShowEdit
=
true
;
this
.
isShowEdit
=
true
;
var
Obj
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
this
.
addMsg
.
ClassPlanId
=
Obj
.
ClassPlanId
;
this
.
addMsg
.
ClassId
=
Obj
.
ClassId
;
this
.
addMsg
.
ClassDate
=
Obj
.
ClassDate
;
this
.
addMsg
.
ClassRoomId
=
Obj
.
ClassRoomId
;
this
.
addMsg
.
TeacherId
=
Obj
.
TeacherId
;
this
.
addMsg
.
PlanTimeList
=
Obj
.
PlanTimeList
;
},
},
//获取教师下拉
//获取教师下拉
GetTeacherList
()
{
GetTeacherList
()
{
...
@@ -488,42 +440,43 @@
...
@@ -488,42 +440,43 @@
}
}
})
})
},
},
//点击新增
addStep
()
{
//关闭弹窗
var
obj
=
{
closeClassSaveForm
()
{
ClassTimeId
:
0
,
this
.
isShowClassForm
=
false
;
StartTime
:
''
,
EndTime
:
''
,
TimeHour
:
0
}
this
.
addMsg
.
PlanTimeList
.
push
(
obj
);
},
},
//删除
//刷新页面
delStep
(
index
)
{
refreshPage
()
{
this
.
addMsg
.
PlanTimeList
.
splice
(
index
,
1
);
this
.
isShowClassForm
=
false
;
this
.
getList
();
},
},
//保存
saveSteps
()
{
//保存信息
for
(
let
i
=
0
;
i
<
this
.
addMsg
.
PlanTimeList
.
length
;
i
++
)
{
saveClass
(
)
{
if
(
this
.
addMsg
.
PlanTimeList
[
i
].
StartTime
==
''
)
{
if
(
this
.
selectedAll
.
length
==
0
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
position
:
"top"
,
position
:
"top"
,
message
:
`请选择第
${
i
+
1
}
节课开始时间
`
message
:
`请勾选需要修改的数据!
`
})
})
return
return
}
}
if
(
this
.
addMsg
.
PlanTimeList
[
i
].
EndTime
==
''
)
{
this
.
postMsg
.
PlanList
=
[];
this
.
$q
.
notify
({
this
.
postMsg
.
ClassPlanIdList
=
[];
type
:
'negative'
,
if
(
this
.
postMsg
.
ChangeType
==
0
)
{
position
:
"top"
,
this
.
selectedAll
.
forEach
(
x
=>
{
message
:
`请选择第
${
i
+
1
}
节课结束时间`
this
.
postMsg
.
PlanList
.
push
(
x
);
})
}
else
{
this
.
selectedAll
.
forEach
(
x
=>
{
this
.
postMsg
.
ClassPlanIdList
.
push
(
x
.
ClassPlanId
);
})
})
return
}
}
}
this
.
saveLoading
=
true
if
(
this
.
postMsg
.
ChangeType
==
0
)
{
UpdateClassPlanSingle
(
this
.
addMsg
).
then
(
res
=>
{
this
.
saveLoading
=
true
;
UpdateClassPlanSingle
({
PlanList
:
this
.
postMsg
.
PlanList
}).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
saveLoading
=
false
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
isShowEdit
=
false
;
this
.
isShowEdit
=
false
;
...
@@ -539,37 +492,7 @@
...
@@ -539,37 +492,7 @@
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
saveLoading
=
false
this
.
saveLoading
=
false
})
})
},
//关闭弹窗
closeClassSaveForm
()
{
this
.
isShowClassForm
=
false
;
this
.
isShowConForm
=
false
;
},
//刷新页面
refreshPage
()
{
this
.
isShowClassForm
=
false
;
this
.
getList
();
},
//点击修改教师 老师 时段
getCommonEdit
(
type
)
{
if
(
this
.
selected
.
length
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请勾选需要修改的数据!`
})
return
}
else
{
}
else
{
this
.
selectObj
.
selected
=
[];
this
.
selectObj
.
ChangeType
=
type
;
this
.
selected
.
forEach
(
x
=>
{
this
.
selectObj
.
selected
.
push
(
x
.
ClassPlanId
);
})
this
.
isShowConForm
=
true
;
}
},
//保存信息
saveClass
()
{
if
(
this
.
postMsg
.
ChangeType
==
1
&&
this
.
postMsg
.
TeacherId
==
0
)
{
if
(
this
.
postMsg
.
ChangeType
==
1
&&
this
.
postMsg
.
TeacherId
==
0
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
...
@@ -606,7 +529,7 @@
...
@@ -606,7 +529,7 @@
}
}
}
}
}
}
this
.
postMsg
.
ClassPlanIdList
=
this
.
saveObj
.
selected
;
this
.
postMsg
.
ClassId
=
this
.
ClassId
;
this
.
postMsg
.
ClassId
=
this
.
ClassId
;
BatchUpdateClassPlan
(
this
.
postMsg
).
then
(
res
=>
{
BatchUpdateClassPlan
(
this
.
postMsg
).
then
(
res
=>
{
if
(
res
.
Code
===
1
)
{
if
(
res
.
Code
===
1
)
{
...
@@ -623,6 +546,7 @@
...
@@ -623,6 +546,7 @@
this
.
Error
(
res
.
Message
);
this
.
Error
(
res
.
Message
);
}
}
})
})
}
},
},
}
}
}
}
...
...
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