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
386615f0
Commit
386615f0
authored
May 06, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
e8d062bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
25 deletions
+75
-25
schedu.js
src/api/scheduling/schedu.js
+9
-0
schedul-form.vue
src/components/schedul/schedul-form.vue
+32
-24
schedulingPlan.vue
src/pages/scheduling/schedulingPlan.vue
+34
-1
No files found.
src/api/scheduling/schedu.js
View file @
386615f0
...
...
@@ -20,6 +20,15 @@ export function GetDutyPlanPage(data) {
})
}
//删除值班计划
export
function
RemoveDutyPlan
(
data
)
{
return
request
({
url
:
'/DutyPlan/RemoveDutyPlan'
,
method
:
'post'
,
data
})
}
//保存排课计划
export
function
SaveDutyPlan
(
data
)
{
return
request
({
...
...
src/components/schedul/schedul-form.vue
View file @
386615f0
...
...
@@ -17,7 +17,7 @@
</q-input>
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"objOption.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
:rules=
"[val =>
!!val
|| '请选择所属校区']"
@
input=
"getDutyFrequencyList()"
/>
map-options
:rules=
"[val =>
val!=-1
|| '请选择所属校区']"
@
input=
"getDutyFrequencyList()"
/>
</div>
<div
class=
"row wrap"
style=
"margin:20px 0;"
>
<div
class=
"col-6"
>
...
...
@@ -83,7 +83,7 @@
objOption
:
{
Id
:
0
,
Date
:
''
,
//值班时间
School_Id
:
''
,
//校区
School_Id
:
-
1
,
//校区
PlanDetails
:
[]
//班次列表
},
optionTitle
:
""
,
...
...
@@ -119,7 +119,7 @@
}
else
{
this
.
objOption
.
Id
=
0
;
this
.
objOption
.
Date
=
''
;
this
.
objOption
.
School_Id
=
''
;
this
.
objOption
.
School_Id
=
-
1
;
this
.
objOption
.
PlanDetails
=
[];
}
},
...
...
@@ -127,6 +127,11 @@
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
;
let
obj
=
{
SId
:
-
1
,
SName
:
'请选择'
}
this
.
schoolList
.
unshift
(
obj
);
this
.
$forceUpdate
();
})
},
...
...
@@ -136,27 +141,30 @@
},
//保存排班
savePlan
()
{
SaveDutyPlan
(
this
.
objOption
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
this
.
$refs
.
School_Id
.
validate
();
if
(
!
this
.
$refs
.
School_Id
.
hasError
)
{
SaveDutyPlan
(
this
.
objOption
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
}
},
//点击新增排班计划
addScheduPlan
()
{
...
...
src/pages/scheduling/schedulingPlan.vue
View file @
386615f0
...
...
@@ -61,7 +61,7 @@
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;"
color=
"edit"
class=
"q-mr-xs"
label=
"修改"
@
click=
"EditSchedu(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
style=
"font-weight:400;"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
""
/>
@
click=
"
RemovePlan(props.row.Id)
"
/>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-View"
style=
"font-weight:400;"
class=
"q-mr-xs"
label=
"查看"
@
click=
""
/>
</q-td>
</
template
>
...
...
@@ -80,6 +80,7 @@
<
script
>
import
{
GetDutyPlanPage
,
RemoveDutyPlan
}
from
'../../api/scheduling/schedu'
import
schedulForm
from
'../../components/schedul/schedul-form'
...
...
@@ -164,6 +165,38 @@
}
})
},
//删除排班计划
RemovePlan
(
Id
){
this
.
$q
.
dialog
({
title
:
"确定删除排班计划"
,
message
:
''
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
let
msg
=
{
Id
:
Id
}
RemoveDutyPlan
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功'
,
position
:
'top'
})
this
.
getList
();
}
})
});
},
//分页改变
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
...
...
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