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
0581545d
Commit
0581545d
authored
Apr 28, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增值班管理
parent
90162978
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
484 additions
and
0 deletions
+484
-0
index.js
src/api/duty/index.js
+37
-0
addClassList.vue
src/components/duty/addClassList.vue
+151
-0
classListManagement.vue
src/components/duty/classListManagement.vue
+173
-0
dutyItemManagement.vue
src/components/duty/dutyItemManagement.vue
+0
-0
setting.vue
src/components/duty/setting.vue
+71
-0
dutyManagement.vue
src/pages/system/dutyManagement.vue
+47
-0
routes.js
src/router/routes.js
+5
-0
No files found.
src/api/duty/index.js
0 → 100644
View file @
0581545d
import
request
from
'../../utils/request'
/**
* 获取班次列表
* @param {JSON参数} data
*/
export
function
getDutyFrequencyList
(
data
)
{
return
request
({
url
:
'/Duty/GetDutyFrequencyList'
,
method
:
'post'
,
data
})
}
/**
* 删除班次
* @param {JSON参数} data
*/
export
function
removeFrequency
(
data
)
{
return
request
({
url
:
'/Duty/RemoveFrequency'
,
method
:
'post'
,
data
})
}
/**
* 新增班次
* @param {JSON参数} data
*/
export
function
getSetFrequencyModel
(
data
)
{
return
request
({
url
:
'/Duty/GetSetFrequencyModel'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/duty/addClassList.vue
0 → 100644
View file @
0581545d
<
template
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:800px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
(
saveObj
&&
saveObj
.
Id
>
0
)?
"修改班次"
:
"新增班次"
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<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 || '请填写班次名称']"
/>
</div>
<div
class=
"col-6"
>
<q-select
v-model=
"schoolArr"
multiple
:options=
"schoolOptions"
color=
"primary"
filled
clearable
label=
"选择校区"
option-label=
"SName"
option-value=
"SId"
ref=
"School_Ids"
@
input=
"changeschool"
:rules=
"[val => !!val || '请选择校区']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"q-gutter-sm row"
>
<q-input
filled
v-model=
"msg.StartTime"
label=
"开始时间"
mask=
"time"
:rules=
"['time']"
ref=
"StartTime"
>
<template
v-slot:append
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-time
now-btn
v-model=
"msg.StartTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
/>
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-input
filled
v-model=
"msg.EndTime"
label=
"结束时间"
mask=
"time"
:rules=
"['time']"
ref=
"EndTime"
>
<
template
v-slot:append
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-time
now-btn
v-model=
"msg.EndTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
/>
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</div>
</q-card-section>
<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=
"保存"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"saveRule"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
getSetFrequencyModel
}
from
"../../api/duty/index"
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
},
schoolOptions
:{
type
:
Array
,
default
:[]
}
},
data
()
{
return
{
schoolArr
:[],
msg
:
{
Id
:
0
,
Name
:
""
,
School_Ids
:
""
,
StartTime
:
''
,
EndTime
:
""
,
},
persistent
:
true
,
}
},
computed
:
{},
created
()
{},
mounted
()
{
console
.
log
(
this
.
msg
.
Name
)
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
let
schoolids
=
this
.
saveObj
.
School_Ids
.
split
(
","
);
this
.
schoolArr
=
[]
schoolids
.
map
((
item
)
=>
{
this
.
schoolOptions
.
map
((
_item
)
=>
{
if
(
_item
.
SId
==
item
){
this
.
schoolArr
.
push
(
_item
)
}
})
})
this
.
msg
.
Id
=
this
.
saveObj
.
Id
;
this
.
msg
.
Name
=
this
.
saveObj
.
Name
;
this
.
msg
.
School_Ids
=
this
.
saveObj
.
School_Ids
;
this
.
msg
.
StartTime
=
this
.
saveObj
.
StartTime
;
this
.
msg
.
EndTime
=
this
.
saveObj
.
EndTime
;
}
},
methods
:
{
changeschool
(){
console
.
log
(
this
.
msg
.
School_Ids
)
},
//保存信息
saveRule
()
{
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
School_Ids
.
validate
();
this
.
$refs
.
StartTime
.
validate
();
this
.
$refs
.
EndTime
.
validate
();
if
(
!
this
.
$refs
.
Name
.
hasError
&&
!
this
.
$refs
.
School_Ids
.
hasError
&&
!
this
.
$refs
.
StartTime
.
hasError
&&
!
this
.
$refs
.
EndTime
.
hasError
)
{
this
.
msg
.
School_Ids
=
this
.
schoolArr
.
map
(
item
=>
item
.
SId
).
toString
();
getSetFrequencyModel
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$emit
(
'success'
);
this
.
closeRuleForm
();
}
})
}
},
//关闭窗口
closeRuleForm
()
{
this
.
$emit
(
'close'
);
this
.
persistent
=
false
}
},
}
</
script
>
src/components/duty/classListManagement.vue
0 → 100644
View file @
0581545d
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-content"
>
<q-table
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
班级列表管理
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"addModule(null)"
label=
"新增"
/>
</div>
</
template
>
<
template
v-slot:bottom
>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
style=
"width:200px;"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"negative"
style=
"font-weight:400"
@
click=
"delClass(props.row.Id)"
label=
"删除"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
@
click=
"addModule(props.row)"
label=
"编辑"
/>
</q-btn>
</q-td>
</
template
>
</q-table>
<AddClassList
v-if=
"isShowsetForm"
@
close=
"closeruleset"
:save-obj=
"ruleObj"
@
success=
"refreshRule"
:schoolOptions=
"schoolOptions"
>
</AddClassList>
</div>
</div>
</template>
<
script
>
import
{
getDutyFrequencyList
,
removeFrequency
,
}
from
'../../api/duty/index'
;
import
{
getSchoolDropdown
}
from
'../../api/school/index'
;
//获取校区列表
import
AddClassList
from
'./addClassList'
;
export
default
{
components
:
{
AddClassList
},
data
()
{
return
{
loading
:
false
,
isShowsetForm
:
false
,
ruleObj
:
{},
//传入参数
schoolOptions
:[],
columns
:
[{
name
:
'SchoolName'
,
label
:
'学校名称'
,
field
:
'SchoolName'
,
align
:
'left'
},
{
name
:
'Name'
,
label
:
'班次名称'
,
field
:
'Name'
,
align
:
'left'
,
},
{
name
:
'StartTime'
,
label
:
'开始时间'
,
field
:
'StartTime'
,
align
:
'left'
,
},
{
name
:
'EndTime'
,
label
:
'结束时间'
,
field
:
'EndTime'
,
align
:
'left'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
field
:
'CreateByName'
,
align
:
'left'
,
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'QuestionId'
}
],
dataList
:
[],
}
},
mounted
()
{
this
.
getList
();
this
.
getCompanyList
();
},
methods
:
{
//获取数据
getList
()
{
getDutyFrequencyList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
console
.
log
(
res
)
this
.
dataList
=
res
.
Data
;
}
})
},
//删除班次
delClass
(
id
){
let
that
=
this
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
removeFrequency
({
Id
:
id
.
toString
()}).
then
((
res
)
=>
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
// color: 'accent',
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
that
.
getList
()
})
}).
onCancel
(()
=>
{
});
},
//关闭弹窗
closeruleset
()
{
this
.
isShowsetForm
=
false
;
},
//刷新列表
refreshRule
()
{
this
.
getList
();
},
//1启用 2禁用 3删除
getStart
(
item
,
type
)
{
let
msg
=
{
RuleId
:
item
.
Id
,
Type
:
type
}
SetOKRRuleState
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
getList
();
}
})
},
//新增
addModule
(
obj
)
{
if
(
obj
)
{
this
.
ruleObj
=
obj
}
else
{
this
.
ruleObj
=
null
}
this
.
isShowsetForm
=
true
},
//获取校区列表
getCompanyList
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
schoolOptions
=
res
.
Data
;
}
})
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/components/duty/dutyItemManagement.vue
0 → 100644
View file @
0581545d
src/components/duty/setting.vue
0 → 100644
View file @
0581545d
<
style
lang=
"scss"
scoped
>
.watchSet
{
.chooseSchool
{
width
:
160px
;
color
:
#FFF
;
border-radius
:
3px
;
overflow
:
hidden
;
}
.schoolChooseBox
{
display
:
flex
;
justify-content
:
flex-end
;
}
.Period-rules
{
display
:
flex
;
margin-bottom
:
24px
;
padding-left
:
20px
;
}
}
</
style
>
<
template
>
<div
class=
"watchSet"
>
<div
class=
"schoolChooseBox"
>
<q-select
dense
filled
v-model=
"model"
label-color=
"grey-11"
clearable
bg-color=
"primary"
:options=
"schoolOptions"
label=
"选择校区"
option-label=
"SName"
option-value=
"SId"
class=
"chooseSchool"
>
</q-select>
</div>
<div
class=
"set"
>
<div
v-for=
"item in dataList"
:key=
"item.id"
>
<div
class=
"set-title"
>
值班管理员:
<span
class=
"set-con"
>
{{}}
</span></div>
<div
class=
"set-title"
>
值班管理员:
<span
class=
"set-con"
>
{{}}
</span></div>
<div
class=
"set-title"
>
值班管理员:
<span
class=
"set-con"
>
{{}}
</span></div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getSchoolDropdown
}
from
'../../api/school/index'
;
//获取校区列表
export
default
{
meta
:
{
title
:
""
},
// components: {
// basecycleForm
// },
data
()
{
return
{
schoolOptions
:[],
model
:
""
,
dataList
:[{}]
}
},
mounted
()
{
this
.
getCompanyList
();
},
methods
:
{
getCompanyList
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
schoolOptions
=
res
.
Data
;
}
})
},
}
}
</
script
>
src/pages/system/dutyManagement.vue
0 → 100644
View file @
0581545d
<
style
>
</
style
>
<
template
>
<div
class=
"page-body"
>
<q-tabs
style=
"margin-bottom:20px;"
v-model=
"tabCheck"
@
input=
"tabChange()"
narrow-indicator
dense
align=
"left"
class=
"text-primary"
>
<q-tab
:ripple=
"false"
name=
"first"
label=
"值班事项管理"
/>
<q-tab
:ripple=
"false"
name=
"second"
label=
"设置"
/>
<q-tab
:ripple=
"false"
name=
"third"
label=
"班級列表管理"
/>
</q-tabs>
<Set
v-if=
"tabCheck=='second'"
></Set>
<ClassListManagement
v-if=
"tabCheck=='third'"
></ClassListManagement>
</div>
</
template
>
<
script
>
import
Set
from
"../../components/duty/setting"
import
ClassListManagement
from
"../../components/duty/classListManagement"
export
default
{
meta
:
{
title
:
"值班管理"
},
components
:
{
Set
,
ClassListManagement
},
data
()
{
return
{
tabCheck
:
'first'
,
}
},
mounted
()
{
},
methods
:
{
tabChange
()
{
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/router/routes.js
View file @
0581545d
...
...
@@ -152,6 +152,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/system/jobapplyManage.vue"
)
},
{
path
:
"/system/dutyManagement"
,
//值班管理
component
:
()
=>
import
(
"pages/system/dutyManagement.vue"
)
},
{
path
:
"/course/catagory"
,
//课程分类
component
:
()
=>
...
...
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