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
c852c0ae
Commit
c852c0ae
authored
Apr 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cd991ea8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
141 deletions
+112
-141
addDutySet.vue
src/components/duty/addDutySet.vue
+58
-94
setting.vue
src/components/duty/setting.vue
+54
-47
No files found.
src/components/duty/addDutySet.vue
View file @
c852c0ae
...
...
@@ -6,61 +6,31 @@
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-select
v-model=
"EmployeeName"
:options=
"EmployeeListOption"
color=
"primary"
filled
stack-label
clearable
label=
"值班管理员"
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeName"
:rules=
"[val => !!val || '请选择值班管理员']"
class=
"col-6 q-pr-lg q-pb-lg"
/>
<q-select
v-model=
"EmployeeNameArray"
:options=
"EmployeeListOption"
color=
"primary"
filled
multiple
clearable
label=
"值班管理员"
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeName"
:rules=
"[val => !!val || '请选择值班管理员']"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"msg.MachineCode"
stack-label
ref=
"MachineCode"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"值班机器码"
:rules=
"[val => !!val || '请填写值班机器码']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"msg.MachineCode"
stack-label
ref=
"MachineCode"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"值班机器码"
:rules=
"[val => !!val || '请填写值班机器码']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-select
stack-label
v-model=
"ShiftsNameArr"
multiple
:options=
"frequencyOptions"
color=
"primary"
filled
clearable
label=
"班次"
option-label=
"Name"
option-value=
"Id"
ref=
"frequency"
:rules=
"[val => !!val || '请选择班次']"
class=
"col-6 q-pr-lg q-pb-lg"
/>
<q-select
stack-label
v-model=
"ShiftsNameArr"
multiple
:options=
"frequencyOptions"
color=
"primary"
filled
clearable
label=
"班次"
option-label=
"Name"
option-value=
"Id"
ref=
"frequency"
:rules=
"[val => !!val || '请选择班次']"
class=
"col-6 q-pr-lg q-pb-lg"
/>
</div>
<div
class=
"col-6"
>
<q-select
stack-label
v-model=
"schoolName"
: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"
/>
<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"
>
<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
class=
"col-6 q-pr-lg q-pb-lg"
/>
</div>
</div>
</q-card-section>
...
...
@@ -73,89 +43,84 @@
</
template
>
<
script
>
import
{
getSetDutyConfigModel
}
from
"../../api/duty/index"
import
{
getSetDutyConfigModel
}
from
"../../api/duty/index"
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
},
frequencyOptions
:{
type
:
Array
,
default
:
[]
frequencyOptions
:
{
type
:
Array
,
default
:
[]
},
schoolOptions
:{
type
:
Array
,
default
:
[]
schoolOptions
:
{
type
:
Array
,
default
:
[]
},
EmployeeListOption
:{
type
:
Array
,
default
:
[]
EmployeeListOption
:
{
type
:
Array
,
default
:
[]
}
},
data
()
{
return
{
ShiftsNameArr
:[],
EmployeeName
:
""
,
schoolName
:
[],
ShiftsNameArr
:
[],
EmployeeName
Array
:
[]
,
SendEmployeeId
:
[],
msg
:
{
Id
:
0
,
EmployeeIds
:
""
,
MachineCode
:
""
,
Shifts
:
''
,
EmployeeIds
:
""
,
MachineCode
:
""
,
Shifts
:
''
,
SendEmployeeIds
:
""
,
//突发事件抄送人员
School_Id
:
-
1
,
},
persistent
:
true
,
EmployeeList
:[]
}
},
computed
:
{},
created
()
{
console
.
log
(
"this.saveObj"
,
this
.
saveObj
);
},
mounted
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
let
ShiftsNameids
=
this
.
saveObj
.
Shifts
.
split
(
","
);
this
.
ShiftsNameArr
=
[]
ShiftsNameids
.
map
((
item
)
=>
{
this
.
frequencyOptions
.
map
((
_item
)
=>
{
if
(
_item
.
Id
==
item
)
{
this
.
ShiftsNameArr
.
push
(
_item
)
}
})
let
ShiftsNameids
=
this
.
saveObj
.
Shifts
.
split
(
","
);
this
.
ShiftsNameArr
=
[]
ShiftsNameids
.
map
((
item
)
=>
{
this
.
frequencyOptions
.
map
((
_item
)
=>
{
if
(
_item
.
Id
==
item
)
{
this
.
ShiftsNameArr
.
push
(
_item
)
}
})
})
this
.
msg
.
Id
=
this
.
saveObj
.
Id
;
this
.
msg
.
EmployeeName
=
this
.
saveObj
.
Name
;
this
.
EmployeeNameArray
=
this
.
saveObj
.
EmployeeIdList
;
this
.
SendEmployeeId
=
this
.
saveObj
.
SendEmployeeIdList
;
this
.
msg
.
MachineCode
=
this
.
saveObj
.
MachineCode
;
console
.
log
(
this
.
saveObj
)
let
res_schoolName
=
this
.
schoolOptions
.
filter
((
item
)
=>
{
return
item
.
SName
==
this
.
saveObj
.
SchoolName
})
this
.
schoolName
=
res_schoolName
[
0
]
let
res_EmployeeName
=
this
.
EmployeeListOption
.
filter
((
item
)
=>
{
return
item
.
EmployeeName
==
this
.
saveObj
.
EmployeeName
})
this
.
EmployeeName
=
res_EmployeeName
[
0
]
this
.
msg
.
School_Id
=
this
.
saveObj
.
School_Id
}
},
methods
:
{
//保存信息
saveRule
()
{
if
(
this
.
SendEmployeeId
&&
this
.
SendEmployeeId
.
length
>
0
)
{
this
.
msg
.
SendEmployeeIds
=
this
.
SendEmployeeId
.
toString
();
}
if
(
this
.
EmployeeNameArray
&&
this
.
EmployeeNameArray
.
length
>
0
)
{
this
.
msg
.
EmployeeIds
=
this
.
EmployeeNameArray
.
toString
();
}
this
.
$refs
.
EmployeeName
.
validate
();
this
.
$refs
.
frequency
.
validate
();
this
.
$refs
.
MachineCode
.
validate
();
this
.
$refs
.
school
.
validate
();
if
(
!
this
.
$refs
.
EmployeeName
.
hasError
&&
!
this
.
$refs
.
frequency
.
hasError
&&
!
this
.
$refs
.
MachineCode
.
hasError
&&
!
this
.
$refs
.
school
.
hasError
)
{
this
.
msg
.
EmployeeIds
=
this
.
EmployeeName
.
Id
||
""
this
.
msg
.
School_Id
=
this
.
schoolName
.
SId
||
""
this
.
msg
.
Shifts
=
this
.
ShiftsNameArr
.
map
(
item
=>
item
.
Id
).
toString
();
!
this
.
$refs
.
MachineCode
.
hasError
&&
!
this
.
$refs
.
school
.
hasError
)
{
this
.
msg
.
Shifts
=
this
.
ShiftsNameArr
.
map
(
item
=>
item
.
Id
).
toString
();
getSetDutyConfigModel
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$emit
(
'success'
);
...
...
@@ -169,7 +134,6 @@
this
.
$emit
(
'close'
);
this
.
persistent
=
false
},
},
}
...
...
src/components/duty/setting.vue
View file @
c852c0ae
<
style
lang=
"scss"
scoped
>
.chooseSchool
{
width
:
160px
;
.chooseSchool
{
width
:
160px
;
color
:
#FFF
;
border-radius
:
3px
;
overflow
:
hidden
;
}
border-radius
:
3px
;
overflow
:
hidden
;
}
</
style
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-content"
>
...
...
@@ -20,10 +18,11 @@
<div
class=
"col-2 q-table__title"
>
设置
</div>
<q-space
/>
<div
class=
"page-option"
style=
"display:flex"
>
<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-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>
</
template
>
<
template
v-slot:bottom
>
...
...
@@ -38,19 +37,24 @@
</q-td>
</
template
>
</q-table>
<AddDutySet
v-if=
"isShowsetForm"
@
close=
"closeruleset"
:save-obj=
"ruleObj"
@
success=
"refreshRule"
:frequencyOptions=
"frequencyOptions"
:schoolOptions=
"schoolOptions"
:EmployeeListOption=
"EmployeeListOption"
>
<AddDutySet
v-if=
"isShowsetForm"
@
close=
"closeruleset"
:save-obj=
"ruleObj"
@
success=
"refreshRule"
:frequencyOptions=
"frequencyOptions"
:schoolOptions=
"schoolOptions"
:EmployeeListOption=
"EmployeeListOption"
>
</AddDutySet>
</div>
</div>
</template>
<
script
>
import
{
getDutyConfigList
,
getDutyFrequencyList
,
removeDutyConfig
getDutyConfigList
,
getDutyFrequencyList
,
removeDutyConfig
}
from
'../../api/duty/index'
;
import
{
getSchoolDropdown
}
from
'../../api/school/index'
;
//获取校区列表
import
{
queryEmployee
}
from
'../../api/users/user'
;
//获取业务员
import
{
getSchoolDropdown
}
from
'../../api/school/index'
;
//获取校区列表
import
{
queryEmployee
}
from
'../../api/users/user'
;
//获取业务员
import
AddDutySet
from
'./addDutySet'
;
export
default
{
components
:
{
...
...
@@ -58,16 +62,16 @@
},
data
()
{
return
{
School_Id
:
""
,
School_Id
:
""
,
loading
:
false
,
isShowsetForm
:
false
,
ruleObj
:
{},
//传入参数
pagination
:{
rowsPerPage
:
0
pagination
:
{
rowsPerPage
:
0
},
schoolOptions
:[],
frequencyOptions
:[],
EmployeeListOption
:[],
schoolOptions
:
[],
frequencyOptions
:
[],
EmployeeListOption
:
[],
columns
:
[{
name
:
'EmployeeName'
,
label
:
'值班管理员:'
,
...
...
@@ -80,22 +84,28 @@
field
:
'MachineCode'
,
align
:
'left'
,
},
{
{
name
:
'ShiftsName'
,
label
:
'班次:'
,
field
:
'ShiftsName'
,
align
:
'left'
,
},
{
{
name
:
'SchoolName'
,
label
:
'校区'
,
field
:
'SchoolName'
,
align
:
'left'
,
},
{
name
:
'SendName'
,
label
:
'抄送人员'
,
field
:
'SendName'
,
align
:
'left'
,
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'
Question
Id'
field
:
'Id'
}
],
dataList
:
[],
...
...
@@ -110,16 +120,17 @@
methods
:
{
//获取数据
getList
()
{
getDutyConfigList
({
School_Id
:
this
.
School_Id
}).
then
(
res
=>
{
getDutyConfigList
({
School_Id
:
this
.
School_Id
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
console
.
log
(
res
)
this
.
dataList
=
res
.
Data
;
}
})
},
//删除班次
delSet
(
id
){
let
that
=
this
delSet
(
id
)
{
let
that
=
this
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除?'
,
...
...
@@ -128,21 +139,19 @@
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
removeDutyConfig
({
Id
:
id
.
toString
()}).
then
((
res
)
=>
{
that
.
$q
.
notify
({
removeDutyConfig
({
Id
:
id
.
toString
()
}).
then
((
res
)
=>
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
that
.
getList
()
})
that
.
getList
()
})
}).
onCancel
(()
=>
{
});
},
//关闭弹窗
closeruleset
()
{
...
...
@@ -169,29 +178,28 @@
}
})
},
//获取班次列表
getDutyFrequencyList
(){
//获取班次列表
getDutyFrequencyList
()
{
getDutyFrequencyList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
frequencyOptions
=
res
.
Data
;
}
})
},
changeSchool
(){
changeSchool
()
{
this
.
getList
();
},
//获取业务员
getEmployee
(
id
)
{
//获取业务员
getEmployee
(
id
)
{
var
qMsg
=
{
Dept_Id
:
0
}
qMsg
.
Dept_Id
=
id
;
qMsg
.
Dept_Id
=
id
;
queryEmployee
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
EmployeeListOption
=
res
.
Data
;
}
}).
catch
(()
=>
{
})
},
}
...
...
@@ -200,5 +208,4 @@
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
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