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
aa2465a2
Commit
aa2465a2
authored
May 06, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
272c146c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
220 additions
and
183 deletions
+220
-183
index.js
src/api/duty/index.js
+17
-5
addClassList.vue
src/components/duty/addClassList.vue
+67
-72
addDutySet.vue
src/components/duty/addDutySet.vue
+42
-25
classListManagement.vue
src/components/duty/classListManagement.vue
+60
-27
dutyItemManagement.vue
src/components/duty/dutyItemManagement.vue
+22
-20
dutySetting.vue
src/components/duty/dutySetting.vue
+2
-21
dutyManagement.vue
src/pages/system/dutyManagement.vue
+10
-13
No files found.
src/api/duty/index.js
View file @
aa2465a2
import
request
from
'../../utils/request'
import
request
from
'../../utils/request'
/**
* 获取班次分页列表
* @param {JSON参数} data
*/
export
function
qyeryDutyFrequencyPage
(
data
)
{
return
request
({
url
:
'/Duty/GetDutyFrequencyPage'
,
method
:
'post'
,
data
})
}
/**
/**
* 获取班次列表
* 获取班次列表
* @param {JSON参数} data
* @param {JSON参数} data
...
@@ -25,12 +37,12 @@ export function removeFrequency(data) {
...
@@ -25,12 +37,12 @@ export function removeFrequency(data) {
}
}
/**
/**
* 新增班次
* 新增
修改
班次
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
getSetFrequencyModel
(
data
)
{
export
function
SetFrequency
(
data
)
{
return
request
({
return
request
({
url
:
'/Duty/GetSetFrequency
Model
'
,
url
:
'/Duty/GetSetFrequency'
,
method
:
'post'
,
method
:
'post'
,
data
data
})
})
...
@@ -124,9 +136,9 @@ export function getDutyConfigList(data) {
...
@@ -124,9 +136,9 @@ export function getDutyConfigList(data) {
* 新增/修改值班设置
* 新增/修改值班设置
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
getSetDutyConfigModel
(
data
)
{
export
function
saveDutyConfig
(
data
)
{
return
request
({
return
request
({
url
:
'/Duty/
GetSetDutyConfigModel
'
,
url
:
'/Duty/
SetDutyConfig
'
,
method
:
'post'
,
method
:
'post'
,
data
data
})
})
...
...
src/components/duty/addClassList.vue
View file @
aa2465a2
<
template
>
<
template
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width:
800px;max-width:8
00px;"
>
<q-card
style=
"width:
500px;max-width:5
00px;"
>
<q-card-section>
<q-card-section>
<div
class=
"text-h6"
>
{{
(
saveObj
&&
saveObj
.
Id
>
0
)?
"修改班次"
:
"新增班次"
}}
</div>
<div
class=
"text-h6"
>
{{
(
saveObj
&&
saveObj
.
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"
>
<div
class=
"col-
6
"
>
<div
class=
"col-
12
"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"msg.Name"
ref=
"Name"
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"msg.Name"
ref=
"Name"
class=
"col-
6
q-pr-lg q-pb-lg"
label=
"班次名称"
:rules=
"[val => !!val || '请填写班次名称']"
/>
class=
"col-
12
q-pr-lg q-pb-lg"
label=
"班次名称"
:rules=
"[val => !!val || '请填写班次名称']"
/>
</div>
</div>
<div
class=
"col-6"
>
</div>
<q-select
<div
class=
"row wrap"
>
v-model=
"schoolArr"
<div
class=
"col-12"
>
multiple
<q-select
v-model=
"schoolArr"
multiple
:options=
"schoolOptions"
color=
"primary"
filled
clearable
:options=
"schoolOptions"
class=
"col-12 q-pr-lg q-pb-lg"
label=
"选择校区"
option-label=
"SName"
option-value=
"SId"
ref=
"School_Ids"
color=
"primary"
@
input=
"changeschool"
/>
filled
clearable
label=
"选择校区"
option-label=
"SName"
option-value=
"SId"
ref=
"School_Ids"
@
input=
"changeschool"
:rules=
"[val => !!val || '请选择校区']"
/>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-12 q-gutter-sm row"
>
<div
class=
"q-gutter-sm row"
>
<q-input
filled
v-model=
"msg.StartTime"
label=
"开始时间"
mask=
"time"
:rules=
"['time']"
ref=
"StartTime"
<q-input
filled
v-model=
"msg.StartTime"
label=
"开始时间"
mask=
"time"
:rules=
"['time']"
ref=
"StartTime"
>
class=
"col-5 q-pr-lg q-pb-lg"
>
<template
v-slot:append
>
<template
v-slot:append
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-time
now-btn
v-model=
"msg.StartTime"
>
<q-time
now-btn
v-model=
"msg.StartTime"
>
<div
class=
"row items-center justify-end"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
/>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
/>
</div>
</div>
</q-time>
</q-time>
</q-popup-proxy>
</q-popup-proxy>
</q-icon>
</q-icon>
</
template
>
</
template
>
</q-input>
</q-input>
<q-input
filled
v-model=
"msg.EndTime"
label=
"结束时间"
mask=
"time"
:rules=
"['time']"
ref=
"EndTime"
<q-input
filled
v-model=
"msg.EndTime"
label=
"结束时间"
mask=
"time"
:rules=
"['time']"
ref=
"EndTime"
>
class=
"col-5 q-pr-lg q-pb-lg"
>
<
template
v-slot:append
>
<
template
v-slot:append
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-time
now-btn
v-model=
"msg.EndTime"
>
<q-time
now-btn
v-model=
"msg.EndTime"
>
<div
class=
"row items-center justify-end"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
/>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
/>
</div>
</div>
</q-time>
</q-time>
</q-popup-proxy>
</q-popup-proxy>
</q-icon>
</q-icon>
</
template
>
</
template
>
</q-input>
</q-input>
</div>
</div>
</div>
</div>
</q-card-section>
</q-card-section>
<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=
"closeRuleForm"
/>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeRuleForm"
/>
...
@@ -69,44 +60,46 @@
...
@@ -69,44 +60,46 @@
</template>
</template>
<
script
>
<
script
>
import
{
getSetFrequencyModel
}
from
"../../api/duty/index"
import
{
SetFrequency
}
from
"../../api/duty/index"
export
default
{
export
default
{
props
:
{
props
:
{
saveObj
:
{
saveObj
:
{
type
:
Object
,
type
:
Object
,
default
:
null
default
:
null
},
},
schoolOptions
:{
schoolOptions
:
{
type
:
Array
,
type
:
Array
,
default
:
[]
default
:
[]
}
}
},
},
data
()
{
data
()
{
return
{
return
{
schoolArr
:[],
schoolArr
:
[],
msg
:
{
msg
:
{
Id
:
0
,
Id
:
0
,
Name
:
""
,
Name
:
""
,
School_Ids
:
""
,
School_Ids
:
""
,
StartTime
:
''
,
StartTime
:
''
,
EndTime
:
""
,
EndTime
:
""
,
},
},
persistent
:
true
,
persistent
:
true
,
}
}
},
},
computed
:
{},
computed
:
{},
created
()
{},
created
()
{},
mounted
()
{
mounted
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
let
schoolids
=
this
.
saveObj
.
School_Ids
.
split
(
","
);
let
schoolids
=
this
.
saveObj
.
School_Ids
.
split
(
","
);
this
.
schoolArr
=
[]
this
.
schoolArr
=
[]
schoolids
.
map
((
item
)
=>
{
schoolids
.
map
((
item
)
=>
{
this
.
schoolOptions
.
map
((
_item
)
=>
{
this
.
schoolOptions
.
map
((
_item
)
=>
{
if
(
_item
.
SId
==
item
)
{
if
(
_item
.
SId
==
item
)
{
this
.
schoolArr
.
push
(
_item
)
this
.
schoolArr
.
push
(
_item
)
}
}
})
})
})
})
this
.
msg
.
Id
=
this
.
saveObj
.
Id
;
this
.
msg
.
Id
=
this
.
saveObj
.
Id
;
this
.
msg
.
Name
=
this
.
saveObj
.
Name
;
this
.
msg
.
Name
=
this
.
saveObj
.
Name
;
...
@@ -116,21 +109,23 @@
...
@@ -116,21 +109,23 @@
}
}
},
},
methods
:
{
methods
:
{
changeschool
(){
changeschool
()
{},
},
//保存信息
//保存信息
saveRule
()
{
saveRule
()
{
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
School_Ids
.
validate
();
this
.
$refs
.
School_Ids
.
validate
();
this
.
$refs
.
StartTime
.
validate
();
this
.
$refs
.
StartTime
.
validate
();
this
.
$refs
.
EndTime
.
validate
();
this
.
$refs
.
EndTime
.
validate
();
if
(
!
this
.
$refs
.
Name
.
hasError
&&
if
(
!
this
.
$refs
.
Name
.
hasError
&&
!
this
.
$refs
.
School_Ids
.
hasError
&&
!
this
.
$refs
.
School_Ids
.
hasError
&&
!
this
.
$refs
.
StartTime
.
hasError
&&
!
this
.
$refs
.
StartTime
.
hasError
&&
!
this
.
$refs
.
EndTime
.
hasError
)
{
!
this
.
$refs
.
EndTime
.
hasError
)
{
this
.
msg
.
School_Ids
=
this
.
schoolArr
.
map
(
item
=>
item
.
SId
).
toString
();
if
(
this
.
schoolArr
&&
this
.
schoolArr
.
length
>
0
)
{
getSetFrequencyModel
(
this
.
msg
).
then
(
res
=>
{
this
.
msg
.
School_Ids
=
this
.
schoolArr
.
map
(
item
=>
item
.
SId
).
toString
();
}
else
{
this
.
msg
.
School_Ids
=
""
;
}
SetFrequency
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
$emit
(
'success'
);
this
.
$emit
(
'success'
);
this
.
closeRuleForm
();
this
.
closeRuleForm
();
...
...
src/components/duty/addDutySet.vue
View file @
aa2465a2
...
@@ -17,16 +17,16 @@
...
@@ -17,16 +17,16 @@
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-select
stack-label
v-model=
"msg.School_Id"
:options=
"schoolOptions"
color=
"primary"
filled
label=
"校区"
option-label=
"SName"
option-value=
"SId"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
@
input=
"queryDutyFrequencyList(1)"
/>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-select
stack-label
v-model=
"ShiftsNameArr"
multiple
:options=
"frequencyOptions"
color=
"primary"
filled
<q-select
stack-label
v-model=
"ShiftsNameArr"
multiple
:options=
"frequencyOptions"
color=
"primary"
filled
clearable
label=
"班次"
option-label=
"Name"
option-value=
"Id"
ref=
"frequency"
clearable
label=
"班次"
option-label=
"Name"
option-value=
"Id"
ref=
"frequency"
:rules=
"[val => !!val || '请选择班次']"
class=
"col-6 q-pr-lg q-pb-lg"
/>
:rules=
"[val => !!val || '请选择班次']"
class=
"col-6 q-pr-lg q-pb-lg"
/>
</div>
</div>
<div
class=
"col-6"
>
<q-select
stack-label
v-model=
"msg.School_Id"
:options=
"schoolOptions"
color=
"primary"
filled
clearable
label=
"校区"
option-label=
"SName"
option-value=
"SId"
ref=
"school"
:rules=
"[val => !!val || '请选择校区']"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-select
v-model=
"SendEmployeeId"
:options=
"EmployeeListOption"
color=
"primary"
filled
multiple
clearable
<q-select
v-model=
"SendEmployeeId"
:options=
"EmployeeListOption"
color=
"primary"
filled
multiple
clearable
label=
"紧急事件抄送人员"
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeNameId"
emit-value
map-options
label=
"紧急事件抄送人员"
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeNameId"
emit-value
map-options
...
@@ -44,7 +44,8 @@
...
@@ -44,7 +44,8 @@
<
script
>
<
script
>
import
{
import
{
getSetDutyConfigModel
saveDutyConfig
,
getDutyFrequencyList
,
}
from
"../../api/duty/index"
}
from
"../../api/duty/index"
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -52,10 +53,6 @@
...
@@ -52,10 +53,6 @@
type
:
Object
,
type
:
Object
,
default
:
null
default
:
null
},
},
frequencyOptions
:
{
type
:
Array
,
default
:
[]
},
schoolOptions
:
{
schoolOptions
:
{
type
:
Array
,
type
:
Array
,
default
:
[]
default
:
[]
...
@@ -78,31 +75,52 @@
...
@@ -78,31 +75,52 @@
SendEmployeeIds
:
""
,
//突发事件抄送人员
SendEmployeeIds
:
""
,
//突发事件抄送人员
School_Id
:
-
1
,
School_Id
:
-
1
,
},
},
frequencyOptions
:
[],
//班次列表
persistent
:
true
,
persistent
:
true
,
}
}
},
},
computed
:
{},
created
()
{
created
()
{
},
},
mounted
()
{
mounted
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
let
ShiftsNameids
=
this
.
saveObj
.
Shifts
.
split
(
","
);
this
.
msg
.
School_Id
=
this
.
saveObj
.
School_Id
;
this
.
ShiftsNameArr
=
[]
this
.
queryDutyFrequencyList
(
2
);
ShiftsNameids
.
map
((
item
)
=>
{
this
.
frequencyOptions
.
map
((
_item
)
=>
{
if
(
_item
.
Id
==
item
)
{
this
.
ShiftsNameArr
.
push
(
_item
)
}
})
})
this
.
msg
.
Id
=
this
.
saveObj
.
Id
;
this
.
msg
.
Id
=
this
.
saveObj
.
Id
;
this
.
EmployeeNameArray
=
this
.
saveObj
.
EmployeeIdList
;
this
.
EmployeeNameArray
=
this
.
saveObj
.
EmployeeIdList
;
this
.
SendEmployeeId
=
this
.
saveObj
.
SendEmployeeIdList
;
this
.
SendEmployeeId
=
this
.
saveObj
.
SendEmployeeIdList
;
this
.
msg
.
MachineCode
=
this
.
saveObj
.
MachineCode
;
this
.
msg
.
MachineCode
=
this
.
saveObj
.
MachineCode
;
this
.
msg
.
School_Id
=
this
.
saveObj
.
School_Id
}
}
},
},
methods
:
{
methods
:
{
//获取班次列表
queryDutyFrequencyList
(
isclear
)
{
if
(
isclear
==
1
)
{
this
.
ShiftsNameArr
=
[];
}
this
.
frequencyOptions
=
[];
var
temp
=
[];
temp
.
push
(
this
.
msg
.
School_Id
);
getDutyFrequencyList
({
School_Ids
:
temp
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
frequencyOptions
=
res
.
Data
;
if
(
isclear
==
2
)
{
let
ShiftsNameids
=
this
.
saveObj
.
Shifts
.
split
(
","
);
this
.
ShiftsNameArr
=
[]
ShiftsNameids
.
map
((
item
)
=>
{
this
.
frequencyOptions
.
map
((
_item
)
=>
{
if
(
_item
.
Id
==
item
)
{
this
.
ShiftsNameArr
.
push
(
_item
)
}
})
})
}
}
})
},
//保存信息
//保存信息
saveRule
()
{
saveRule
()
{
if
(
this
.
SendEmployeeId
&&
this
.
SendEmployeeId
.
length
>
0
)
{
if
(
this
.
SendEmployeeId
&&
this
.
SendEmployeeId
.
length
>
0
)
{
...
@@ -114,13 +132,12 @@
...
@@ -114,13 +132,12 @@
this
.
$refs
.
EmployeeName
.
validate
();
this
.
$refs
.
EmployeeName
.
validate
();
this
.
$refs
.
frequency
.
validate
();
this
.
$refs
.
frequency
.
validate
();
this
.
$refs
.
MachineCode
.
validate
();
this
.
$refs
.
MachineCode
.
validate
();
this
.
$refs
.
school
.
validate
();
if
(
!
this
.
$refs
.
EmployeeName
.
hasError
&&
if
(
!
this
.
$refs
.
EmployeeName
.
hasError
&&
!
this
.
$refs
.
frequency
.
hasError
&&
!
this
.
$refs
.
frequency
.
hasError
&&
!
this
.
$refs
.
MachineCode
.
hasError
&&
!
this
.
$refs
.
MachineCode
.
hasError
)
{
!
this
.
$refs
.
school
.
hasError
)
{
this
.
msg
.
Shifts
=
this
.
ShiftsNameArr
.
map
(
item
=>
item
.
Id
).
toString
();
this
.
msg
.
Shifts
=
this
.
ShiftsNameArr
.
map
(
item
=>
item
.
Id
).
toString
();
getSetDutyConfigModel
(
this
.
msg
).
then
(
res
=>
{
saveDutyConfig
(
this
.
msg
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
$emit
(
'success'
);
this
.
$emit
(
'success'
);
this
.
closeRuleForm
();
this
.
closeRuleForm
();
...
...
src/components/duty/classListManagement.vue
View file @
aa2465a2
<
template
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
class=
"col-6 q-pr-lg q-pr-lg"
v-model=
"qMsg.Name"
label=
"名称"
maxlength=
"20"
@
clear=
"resetSearch"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
clearable
multiple
standout=
"bg-primary text-white"
option-value=
"SId"
option-label=
"SName"
v-model=
"qMsg.School_Ids"
:options=
"schoolOptions"
emit-value
map-options
label=
"校区"
@
clear=
"resetSearch"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content"
>
<q-table
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
:pagination=
'
pagination
'
<q-table
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
:pagination=
'
qMsg
'
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
班次管理
</div>
<div
class=
"col-2 q-table__title"
>
班次管理
</div>
<q-space
/>
<q-space
/>
<div
class=
"page-option"
>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"addModule(null)"
label=
"新增"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"addModule(null)"
label=
"新增"
/>
</div>
</div>
</
template
>
</
template
>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"qMsg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
style=
"width:200px;"
>
<q-td
:props=
"props"
style=
"width:200px;"
>
...
@@ -22,17 +37,20 @@
...
@@ -22,17 +37,20 @@
</q-td>
</q-td>
</
template
>
</
template
>
</q-table>
</q-table>
<AddClassList
v-if=
"isShowsetForm"
@
close=
"closeruleset"
:save-obj=
"ruleObj"
@
success=
"refreshRule"
:schoolOptions=
"schoolOptions"
>
<AddClassList
v-if=
"isShowsetForm"
@
close=
"closeruleset"
:save-obj=
"ruleObj"
@
success=
"refreshRule"
:schoolOptions=
"schoolOptions"
>
</AddClassList>
</AddClassList>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getDutyFrequencyList
,
qyeryDutyFrequencyPage
,
removeFrequency
,
removeFrequency
,
}
from
'../../api/duty/index'
;
}
from
'../../api/duty/index'
;
import
{
getSchoolDropdown
}
from
'../../api/school/index'
;
//获取校区列表
import
{
getSchoolDropdown
}
from
'../../api/school/index'
;
//获取校区列表
import
AddClassList
from
'./addClassList'
;
import
AddClassList
from
'./addClassList'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -43,11 +61,7 @@
...
@@ -43,11 +61,7 @@
loading
:
false
,
loading
:
false
,
isShowsetForm
:
false
,
isShowsetForm
:
false
,
ruleObj
:
{},
//传入参数
ruleObj
:
{},
//传入参数
pagination
:{
schoolOptions
:
[],
rowsPerPage
:
0
},
schoolOptions
:[],
columns
:
[{
columns
:
[{
name
:
'SchoolName'
,
name
:
'SchoolName'
,
label
:
'学校名称'
,
label
:
'学校名称'
,
...
@@ -60,13 +74,13 @@
...
@@ -60,13 +74,13 @@
field
:
'Name'
,
field
:
'Name'
,
align
:
'left'
,
align
:
'left'
,
},
},
{
{
name
:
'StartTime'
,
name
:
'StartTime'
,
label
:
'开始时间'
,
label
:
'开始时间'
,
field
:
'StartTime'
,
field
:
'StartTime'
,
align
:
'left'
,
align
:
'left'
,
},
},
{
{
name
:
'EndTime'
,
name
:
'EndTime'
,
label
:
'结束时间'
,
label
:
'结束时间'
,
field
:
'EndTime'
,
field
:
'EndTime'
,
...
@@ -78,32 +92,52 @@
...
@@ -78,32 +92,52 @@
field
:
'CreateByName'
,
field
:
'CreateByName'
,
align
:
'left'
,
align
:
'left'
,
},
},
{
{
name
:
'optioned'
,
name
:
'optioned'
,
label
:
'操作'
,
label
:
'操作'
,
field
:
'QuestionId'
field
:
'QuestionId'
}
}
],
],
qMsg
:
{
pageIndex
:
1
,
pageSize
:
10
,
rowsPerPage
:
10
,
Name
:
""
,
School_Ids
:
[],
},
pageCount
:
0
,
dataList
:
[],
dataList
:
[],
}
}
},
},
created
()
{
this
.
getCompanyList
();
},
mounted
()
{
mounted
()
{
this
.
getList
();
this
.
getList
();
this
.
getCompanyList
();
},
},
methods
:
{
methods
:
{
//获取数据
//重新查询
resetSearch
()
{
this
.
qMsg
.
pageIndex
=
1
;
this
.
getList
();
},
//翻页
changePage
(
val
)
{
this
.
qMsg
.
pageIndex
=
val
;
this
.
getList
();
},
//获取班次分页数据
getList
()
{
getList
()
{
getDutyFrequencyList
({}
).
then
(
res
=>
{
qyeryDutyFrequencyPage
(
this
.
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}
}
})
})
},
},
//删除班次
//删除班次
delClass
(
id
){
delClass
(
id
)
{
let
that
=
this
let
that
=
this
this
.
$q
.
dialog
({
this
.
$q
.
dialog
({
title
:
'提示信息'
,
title
:
'提示信息'
,
message
:
'是否确定删除?'
,
message
:
'是否确定删除?'
,
...
@@ -112,22 +146,21 @@
...
@@ -112,22 +146,21 @@
ok
:
"确定"
,
ok
:
"确定"
,
cancel
:
"取消"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
}).
onOk
(()
=>
{
removeFrequency
({
Id
:
id
.
toString
()}).
then
((
res
)
=>
{
removeFrequency
({
that
.
$q
.
notify
({
Id
:
id
.
toString
()
}).
then
((
res
)
=>
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
icon
:
'iconfont icon-chenggong'
,
// color: 'accent',
timeout
:
2000
,
timeout
:
2000
,
message
:
res
.
Message
,
message
:
res
.
Message
,
position
:
'top'
position
:
'top'
})
})
that
.
getList
()
that
.
getList
()
})
})
}).
onCancel
(()
=>
{
}).
onCancel
(()
=>
{
});
});
},
},
//关闭弹窗
//关闭弹窗
closeruleset
()
{
closeruleset
()
{
...
...
src/components/duty/dutyItemManagement.vue
View file @
aa2465a2
<
template
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
class=
"col-6 q-pr-lg q-pr-lg"
v-model=
"qMsg.ItemName"
label=
"事项名称"
maxlength=
"20"
@
clear=
"resetSearch"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
clearable
multiple
standout=
"bg-primary text-white"
option-value=
"SId"
option-label=
"SName"
v-model=
"qMsg.ItemSchools"
:options=
"schoolOptions"
emit-value
map-options
label=
"校区"
@
clear=
"resetSearch"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content"
>
<q-table
:pagination=
'qMsg'
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
<q-table
:pagination=
'qMsg'
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
...
@@ -107,8 +120,6 @@
...
@@ -107,8 +120,6 @@
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
isShowsetForm
:
false
,
ruleObj
:
{},
//传入参数
schoolOptions
:
[],
//校区
schoolOptions
:
[],
//校区
itemTypeOptions
:
[],
//事项类型
itemTypeOptions
:
[],
//事项类型
frequencyOptions
:
[],
//班次列表
frequencyOptions
:
[],
//班次列表
...
@@ -151,8 +162,10 @@
...
@@ -151,8 +162,10 @@
},
},
qMsg
:
{
qMsg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
5
,
pageSize
:
10
,
rowsPerPage
:
5
,
rowsPerPage
:
10
,
ItemName
:
""
,
//事项名称
ItemSchools
:
[],
//所属校区
},
},
pageCount
:
0
,
pageCount
:
0
,
}
}
...
@@ -172,6 +185,11 @@
...
@@ -172,6 +185,11 @@
}
}
})
})
},
},
//重新查询
resetSearch
()
{
this
.
qMsg
.
pageIndex
=
1
;
this
.
getList
();
},
//翻页
//翻页
changePage
(
val
)
{
changePage
(
val
)
{
this
.
qMsg
.
pageIndex
=
val
;
this
.
qMsg
.
pageIndex
=
val
;
...
@@ -215,19 +233,15 @@
...
@@ -215,19 +233,15 @@
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
that
.
$q
.
notify
({
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
icon
:
'iconfont icon-chenggong'
,
// color: 'accent',
timeout
:
2000
,
timeout
:
2000
,
message
:
res
.
Message
,
message
:
res
.
Message
,
position
:
'top'
position
:
'top'
})
})
that
.
getList
()
that
.
getList
()
})
})
}).
onCancel
(()
=>
{
}).
onCancel
(()
=>
{
});
});
},
},
//获取校区列表
//获取校区列表
...
@@ -253,33 +267,24 @@
...
@@ -253,33 +267,24 @@
}
}
msg
.
Shifts
=
item
.
Shifts
.
join
(
","
)
msg
.
Shifts
=
item
.
Shifts
.
join
(
","
)
msg
.
ItemSchools
=
item
.
ItemSchools
.
join
(
","
)
msg
.
ItemSchools
=
item
.
ItemSchools
.
join
(
","
)
getSetDutyItemModel
(
msg
).
then
((
res
)
=>
{
getSetDutyItemModel
(
msg
).
then
((
res
)
=>
{
this
.
getList
();
this
.
getList
();
})
})
},
},
//对话框
//对话框
show
()
{
show
()
{
this
.
$refs
.
dialog
.
show
();
this
.
$refs
.
dialog
.
show
();
},
},
hide
()
{
hide
()
{
this
.
$refs
.
dialog
.
hide
();
this
.
$refs
.
dialog
.
hide
();
},
},
onDialogHide
()
{
onDialogHide
()
{
// QDialog发出“hide”事件时
// 需要发出
this
.
$emit
(
"hide"
);
this
.
$emit
(
"hide"
);
},
},
onCancelClick
()
{
onCancelClick
()
{
// 我们只需要隐藏对话框
// 我们只需要隐藏对话框
this
.
hide
();
this
.
hide
();
},
},
onSubmit
()
{
onSubmit
()
{
this
.
$refs
.
addItemName
.
validate
();
this
.
$refs
.
addItemName
.
validate
();
this
.
$refs
.
addItemType
.
validate
();
this
.
$refs
.
addItemType
.
validate
();
...
@@ -293,14 +298,11 @@
...
@@ -293,14 +298,11 @@
msg
.
ItemSchools
=
this
.
msg
.
ItemSchools
.
toString
(),
msg
.
ItemSchools
=
this
.
msg
.
ItemSchools
.
toString
(),
msg
.
Shifts
=
this
.
msg
.
Shifts
.
toString
(),
msg
.
Shifts
=
this
.
msg
.
Shifts
.
toString
(),
getSetDutyItemModel
(
msg
).
then
((
res
)
=>
{
getSetDutyItemModel
(
msg
).
then
((
res
)
=>
{
this
.
getList
();
this
.
getList
();
this
.
hide
();
this
.
hide
();
})
})
}
}
},
},
}
}
}
}
...
...
src/components/duty/
s
etting.vue
→
src/components/duty/
dutyS
etting.vue
View file @
aa2465a2
...
@@ -7,8 +7,6 @@
...
@@ -7,8 +7,6 @@
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-body"
>
<div
class=
"page-content"
>
<div
class=
"page-content"
>
...
@@ -19,10 +17,6 @@
...
@@ -19,10 +17,6 @@
<q-space
/>
<q-space
/>
<div
class=
"page-option"
style=
"display:flex"
>
<div
class=
"page-option"
style=
"display:flex"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"addModule(null)"
label=
"新增"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"addModule(null)"
label=
"新增"
/>
<q-select
dense
filled
v-model=
"School_Id"
label-color=
"grey-11"
clearable
bg-color=
"primary"
emit-value
map-options
:options=
"schoolOptions"
label=
"选择校区"
option-label=
"SName"
option-value=
"SId"
class=
"chooseSchool"
@
input=
"changeSchool"
>
</q-select>
</div>
</div>
</
template
>
</
template
>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
...
@@ -38,7 +32,7 @@
...
@@ -38,7 +32,7 @@
</
template
>
</
template
>
</q-table>
</q-table>
<AddDutySet
v-if=
"isShowsetForm"
@
close=
"closeruleset"
:save-obj=
"ruleObj"
@
success=
"refreshRule"
<AddDutySet
v-if=
"isShowsetForm"
@
close=
"closeruleset"
:save-obj=
"ruleObj"
@
success=
"refreshRule"
:
frequencyOptions=
"frequencyOptions"
:
schoolOptions=
"schoolOptions"
:EmployeeListOption=
"EmployeeListOption"
>
:schoolOptions=
"schoolOptions"
:EmployeeListOption=
"EmployeeListOption"
>
</AddDutySet>
</AddDutySet>
</div>
</div>
</div>
</div>
...
@@ -46,7 +40,6 @@
...
@@ -46,7 +40,6 @@
<
script
>
<
script
>
import
{
import
{
getDutyConfigList
,
getDutyConfigList
,
getDutyFrequencyList
,
removeDutyConfig
removeDutyConfig
}
from
'../../api/duty/index'
;
}
from
'../../api/duty/index'
;
import
{
import
{
...
@@ -70,7 +63,6 @@
...
@@ -70,7 +63,6 @@
rowsPerPage
:
0
rowsPerPage
:
0
},
},
schoolOptions
:
[],
schoolOptions
:
[],
frequencyOptions
:
[],
EmployeeListOption
:
[],
EmployeeListOption
:
[],
columns
:
[{
columns
:
[{
name
:
'EmployeeName'
,
name
:
'EmployeeName'
,
...
@@ -114,7 +106,7 @@
...
@@ -114,7 +106,7 @@
mounted
()
{
mounted
()
{
this
.
getList
();
this
.
getList
();
this
.
getCompanyList
();
this
.
getCompanyList
();
this
.
getDutyFrequencyList
();
this
.
getEmployee
(
0
);
this
.
getEmployee
(
0
);
},
},
methods
:
{
methods
:
{
...
@@ -177,17 +169,6 @@
...
@@ -177,17 +169,6 @@
}
}
})
})
},
},
//获取班次列表
getDutyFrequencyList
()
{
getDutyFrequencyList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
frequencyOptions
=
res
.
Data
;
}
})
},
changeSchool
()
{
this
.
getList
();
},
//获取业务员
//获取业务员
getEmployee
(
id
)
{
getEmployee
(
id
)
{
var
qMsg
=
{
var
qMsg
=
{
...
...
src/pages/system/dutyManagement.vue
View file @
aa2465a2
...
@@ -10,30 +10,29 @@
...
@@ -10,30 +10,29 @@
<q-tab
:ripple=
"false"
name=
"third"
label=
"班次管理"
/>
<q-tab
:ripple=
"false"
name=
"third"
label=
"班次管理"
/>
</q-tabs>
</q-tabs>
<DutyItemManagement
v-if=
"tabCheck=='first'"
></DutyItemManagement>
<DutyItemManagement
v-if=
"tabCheck=='first'"
></DutyItemManagement>
<
Set
v-if=
"tabCheck=='second'"
></Set
>
<
DutySetting
v-if=
"tabCheck=='second'"
></DutySetting
>
<ClassListManagement
v-if=
"tabCheck=='third'"
></ClassListManagement>
<ClassListManagement
v-if=
"tabCheck=='third'"
></ClassListManagement>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
DutyItemManagement
from
"../../components/duty/dutyItemManagement"
import
DutyItemManagement
from
"../../components/duty/dutyItemManagement"
import
Set
from
"../../components/duty/s
etting"
import
DutySetting
from
"../../components/duty/dutyS
etting"
import
ClassListManagement
from
"../../components/duty/classListManagement"
import
ClassListManagement
from
"../../components/duty/classListManagement"
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
"值班管理"
title
:
"值班管理"
},
},
components
:
{
components
:
{
DutyItemManagement
,
DutyItemManagement
,
Set
,
DutySetting
,
ClassListManagement
ClassListManagement
},
},
data
()
{
data
()
{
return
{
return
{
tabCheck
:
'first'
,
tabCheck
:
'first'
,
}
}
},
},
mounted
()
{
mounted
()
{},
},
methods
:
{
methods
:
{
tabChange
()
{
tabChange
()
{
...
@@ -43,7 +42,5 @@ import ClassListManagement from "../../components/duty/classListManagement"
...
@@ -43,7 +42,5 @@ import ClassListManagement from "../../components/duty/classListManagement"
</
script
>
</
script
>
<
style
lang=
"sass"
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
@import
url('~assets/css/table.sass')
</
style
>
</
style
>
\ No newline at end of file
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