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
6c3d06b6
Commit
6c3d06b6
authored
Apr 28, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cc62ade9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
19 deletions
+73
-19
schedu.js
src/api/scheduling/schedu.js
+11
-2
schedul-form.vue
src/components/schedul/schedul-form.vue
+62
-17
No files found.
src/api/scheduling/schedu.js
View file @
6c3d06b6
...
@@ -3,9 +3,9 @@ import request from '../../utils/request'
...
@@ -3,9 +3,9 @@ import request from '../../utils/request'
* 获取日语培训列表
* 获取日语培训列表
*
*
*/
*/
export
function
GetDutyFrequencyList
(
data
)
{
export
function
queryDutyFrequencyBySchoolIds
(
data
)
{
return
request
({
return
request
({
url
:
'/Duty/GetDutyFrequency
List
'
,
url
:
'/Duty/GetDutyFrequency
BySchoolIds
'
,
method
:
'post'
,
method
:
'post'
,
data
data
})
})
...
@@ -28,3 +28,12 @@ export function SaveDutyPlan(data) {
...
@@ -28,3 +28,12 @@ export function SaveDutyPlan(data) {
data
data
})
})
}
}
//获取排班计划信息
export
function
queryDutyPlanInfo
(
data
)
{
return
request
({
url
:
'/DutyPlan/GetDutyPlan'
,
method
:
'post'
,
data
})
}
src/components/schedul/schedul-form.vue
View file @
6c3d06b6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
T
Id
==
0
?
'新增排班计划'
:
'修改排班计划'
}}
</div>
<div
class=
"text-h6"
>
{{
objOption
.
Id
==
0
?
'新增排班计划'
:
'修改排班计划'
}}
</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"
>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
...
@@ -21,20 +21,19 @@
...
@@ -21,20 +21,19 @@
</div>
</div>
<div
class=
"row wrap"
style=
"margin:20px 0;"
>
<div
class=
"row wrap"
style=
"margin:20px 0;"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
新增
计划
新增
排班
<q-btn
style=
"margin-left:30px;"
size=
"10px"
@
click=
"addScheduPlan()"
round
color=
"primary"
<q-btn
style=
"margin-left:30px;"
size=
"10px"
@
click=
"addScheduPlan()"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
icon=
"iconfont icon-img_haha"
/>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
v-for=
"(item,index) in objOption.PlanDetails"
:key=
"index"
>
<div
class=
"row wrap"
v-for=
"(item,index) in objOption.PlanDetails"
:key=
"index"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"
objOption.Shift"
ref=
"CateId
"
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"
item.Shift"
:options=
"ClassList
"
:options=
"ClassList"
label=
"班次"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
label=
"班次"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
</div>
<div
class=
"col-6"
style=
"position:relative;"
>
<div
class=
"col-6"
style=
"position:relative;"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"EmployeeName"
v-model=
"
objOption
.DutyMan"
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"EmployeeName"
v-model=
"
item
.DutyMan"
ref=
"CateId"
:options=
"EmployeeList"
label=
"值班人员"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
:options=
"EmployeeList"
label=
"值班人员"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-btn
style=
"position:absolute;right:-5px;top:20px;"
size=
"6px"
@
click=
"delStepPlan(index)"
round
<q-btn
style=
"position:absolute;right:-5px;top:20px;"
size=
"6px"
@
click=
"delStepPlan(index)"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
</div>
</div>
...
@@ -43,7 +42,7 @@
...
@@ -43,7 +42,7 @@
<q-separator
/>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"save
Teacher
"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"save
Plan
"
/>
</q-card-actions>
</q-card-actions>
</q-card>
</q-card>
</q-dialog>
</q-dialog>
...
@@ -54,11 +53,14 @@
...
@@ -54,11 +53,14 @@
getSchoolDropdown
getSchoolDropdown
}
from
'../../api/school/index'
}
from
'../../api/school/index'
import
{
import
{
GetDutyFrequencyList
queryDutyFrequencyBySchoolIds
,
SaveDutyPlan
,
queryDutyPlanInfo
}
from
'../../api/scheduling/schedu'
}
from
'../../api/scheduling/schedu'
import
{
import
{
queryEmployee
//员工列表
queryEmployee
//员工列表
}
from
'../../api/users/user'
}
from
'../../api/users/user'
export
default
{
export
default
{
components
:
{},
components
:
{},
props
:
{
props
:
{
...
@@ -80,10 +82,10 @@
...
@@ -80,10 +82,10 @@
schoolList
:
[],
schoolList
:
[],
ClassList
:
[{
//班次数据
ClassList
:
[{
//班次数据
Id
:
1
,
Id
:
1
,
Name
:
'
1
班'
Name
:
'
早
班'
},
{
},
{
Id
:
2
,
Id
:
2
,
Name
:
'
2
班'
Name
:
'
午
班'
}],
}],
EmployeeList
:
[],
//员工数据
EmployeeList
:
[],
//员工数据
}
}
...
@@ -91,12 +93,35 @@
...
@@ -91,12 +93,35 @@
created
()
{
created
()
{
this
.
getSchool
();
this
.
getSchool
();
this
.
Employee
();
this
.
Employee
();
//
this.getDutyFrequencyList();
this
.
getDutyFrequencyList
();
},
},
mounted
()
{
mounted
()
{
//
this.initObj()
this
.
initObj
()
},
},
methods
:
{
methods
:
{
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
queryDutyPlanInfo
({
Id
:
this
.
saveObj
.
Id
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
tempData
=
res
.
Data
;
this
.
objOption
.
Id
=
tempData
.
Id
;
this
.
objOption
.
Date
=
tempData
.
Date
;
this
.
objOption
.
School_Id
=
tempData
.
School_Id
;
if
(
tempData
.
PlanDetails
&&
tempData
.
PlanDetails
.
length
>
0
)
{
this
.
objOption
.
PlanDetails
=
tempData
.
PlanDetails
;
}
}
});
}
else
{
this
.
objOption
.
Id
=
0
;
this
.
objOption
.
Date
=
''
;
this
.
objOption
.
School_Id
=
''
;
this
.
objOption
.
PlanDetails
=
[];
}
},
//获取校区
getSchool
()
{
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
;
this
.
schoolList
=
res
.
Data
;
...
@@ -107,8 +132,29 @@
...
@@ -107,8 +132,29 @@
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
this
.
persistent
=
false
this
.
persistent
=
false
},
},
saveTeacher
()
{
//保存排班
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'
})
}
})
},
},
//点击新增排班计划
//点击新增排班计划
addScheduPlan
()
{
addScheduPlan
()
{
...
@@ -126,7 +172,7 @@
...
@@ -126,7 +172,7 @@
},
},
//获取班次信息
//获取班次信息
getDutyFrequencyList
()
{
getDutyFrequencyList
()
{
GetDutyFrequencyList
().
then
(
res
=>
{
queryDutyFrequencyBySchoolIds
().
then
(
res
=>
{
console
.
log
(
res
,
'数据来也'
);
console
.
log
(
res
,
'数据来也'
);
})
})
},
},
...
@@ -141,7 +187,6 @@
...
@@ -141,7 +187,6 @@
}
}
})
})
},
},
},
},
}
}
...
...
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