Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
0099d2fb
Commit
0099d2fb
authored
Oct 31, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
basicData/calendar 工作日历 节日假日 加班日历
parent
2b147d97
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
956 additions
and
860 deletions
+956
-860
index.vue
pages/basicData/calendar/class/index.vue
+193
-127
index.vue
pages/basicData/calendar/holiday/index.vue
+245
-230
index.vue
pages/basicData/calendar/overtime/index.vue
+282
-286
index.vue
pages/basicData/calendar/work/index.vue
+236
-217
No files found.
pages/basicData/calendar/class/index.vue
View file @
0099d2fb
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:height=
"tableHeight"
:high=
"false"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字编号/班次名称"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
ref=
"addModal"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
</div>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:height=
"tableHeight"
:high=
"false"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字编号/班次名称"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
ref=
"addModal"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
...
...
@@ -40,111 +40,176 @@ import Edit from './edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
tableHeight
:
''
,
// 表格高度
easySearch
:
{
keys
:{
op
:
"shiftWorkSchedCode,shiftName"
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"shiftWorkSchedCode"
,
title
:
this
.
l
(
"shiftWorkSchedCode"
)
,
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"shiftName"
,
title
:
this
.
l
(
"shiftName"
)
,
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"shiftStartEnd"
,
title
:
this
.
l
(
"shiftStartEnd"
)
,
align
:
"left"
,
high
:
true
},
{
key
:
"shiftStart"
,
title
:
this
.
l
(
"shiftStart"
)
,
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
key
:
"shiftEnd"
,
title
:
this
.
l
(
"shiftEnd"
)
,
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
)
,
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
key
:
"workingLong"
,
title
:
this
.
l
(
"workingLong"
)
,
align
:
"left"
,
high
:
true
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action"
},
[
// h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.detail(params.row.id) } }, '查看'),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
name
:
'list'
,
components
:
{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
tableHeight
:
''
,
// 表格高度
easySearch
:
{
keys
:
{
op
:
"shiftWorkSchedCode,shiftName"
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
columns
:
[{
key
:
"shiftWorkSchedCode"
,
title
:
this
.
l
(
"shiftWorkSchedCode"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"shiftName"
,
title
:
this
.
l
(
"shiftName"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"shiftStartEnd"
,
title
:
this
.
l
(
"shiftStartEnd"
),
align
:
"left"
,
high
:
true
},
{
key
:
"shiftStart"
,
title
:
this
.
l
(
"shiftStart"
),
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
key
:
"shiftEnd"
,
title
:
this
.
l
(
"shiftEnd"
),
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
key
:
"workingLong"
,
title
:
this
.
l
(
"workingLong"
),
align
:
"left"
,
high
:
true
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action"
},
[
// h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.detail(params.row.id) } }, '查看'),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
},
],
}
},
created
(){
created
()
{
this
.
tableHeight
=
window
.
innerHeight
-
230
},
mounted
()
{
// console.log(this);
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
$emit
(
'on-ok'
)
this
.
$refs
.
addModal
.
entity
=
{}
this
.
detailModal
=
false
this
.
editModal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
detail
(
id
)
{
this
.
detailModal
=
true
;
this
.
curId
=
id
;
},
edit
(
id
)
{
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
$emit
(
'on-ok'
)
this
.
$refs
.
addModal
.
entity
=
{}
this
.
detailModal
=
false
this
.
editModal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
detail
(
id
)
{
this
.
detailModal
=
true
;
this
.
curId
=
id
;
},
edit
(
id
)
{
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
remove
(
id
)
{
this
.
deletelModal
=
true
;
this
.
curId
=
id
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
this
.
$refs
.
addModal
.
entity
=
{}
this
.
detailModal
=
false
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
l
(
key
)
{
/*
remove
(
id
)
{
this
.
deletelModal
=
true
;
this
.
curId
=
id
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
this
.
$refs
.
addModal
.
entity
=
{}
this
.
detailModal
=
false
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
l
(
key
)
{
/*
mes_shift_work_sched:{
id:'',
shiftWorkSchedCode:'编号',
...
...
@@ -163,11 +228,12 @@ data() {
deleterUserId:'',
}
*/
let
vkey
=
"mes_shift_work_sched"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
}
let
vkey
=
"mes_shift_work_sched"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
</
style
>
pages/basicData/calendar/holiday/index.vue
View file @
0099d2fb
<
template
>
<div
class=
"holiday"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
:height=
"tableHeight"
@
on-selection-change=
"selectionChange"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字节日名称"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
<div
class=
"holiday"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
:height=
"tableHeight"
@
on-selection-change=
"selectionChange"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字节日名称"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
</DataGrid>
<div
class=
"footer02"
v-if=
"footerModel"
>
<span
class=
"span"
>
已选择
<b
class=
"span02"
>
{{selectedRows.length}}
</b>
项
已选择
<b
class=
"span02"
>
{{selectedRows.length}}
</b>
项
</span>
<Button
@
click=
"deleteMore"
class=
"span ml20"
><Icon
type=
"md-close"
/>
批量删除
</Button>
<Button
@
click=
"deleteMore"
class=
"span ml20"
>
<Icon
type=
"md-close"
/>
批量删除
</Button>
</div>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
ref=
"addmodal"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
<Add
ref=
"addmodal"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
<p>
确定删除?
</p>
</Modal>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<p>
确定删除这{{selectedRows.length}}项么?
</p>
</Modal>
</div>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<p>
确定删除这{{selectedRows.length}}项么?
</p>
</Modal>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
...
...
@@ -47,219 +49,232 @@ import Edit from './edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:
{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
'title'
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
deletelModal
:
false
,
selectedRows
:
[],
//表格选中项
footerModel
:
false
,
deletelMore
:
false
,
tableHeight
:
''
,
curId
:
0
,
columns
:
[
// { type: 'selection', width: 70, align: 'center'},
{
key
:
'id'
,
title
:
this
.
l
(
'id'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'holidayId'
,
title
:
this
.
l
(
'holidayId'
),
high
:
true
,
align
:
'left'
},
{
key
:
'holidayName'
,
title
:
this
.
l
(
'holidayName'
),
high
:
true
,
align
:
'left'
},
{
key
:
'holidayStart'
,
title
:
this
.
l
(
'holidayStart'
),
high
:
true
,
align
:
'left'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'span'
,
{},
params
.
row
.
holidayStart
.
slice
(
0
,
10
)
)
])
}
},
{
key
:
'holidayEnd'
,
title
:
this
.
l
(
'holidayEnd'
),
high
:
true
,
align
:
'left'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'span'
,
{},
params
.
row
.
holidayEnd
.
slice
(
0
,
10
)
)
])
}
},
{
key
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'deletionTime'
,
title
:
this
.
l
(
'deletionTime'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'creatorUserId'
,
title
:
this
.
l
(
'creatorUserId'
),
hide
:
true
,
align
:
'left'
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'op'
,
name
:
'list'
,
components
:
{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
'title'
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
deletelModal
:
false
,
selectedRows
:
[],
//表格选中项
footerModel
:
false
,
deletelMore
:
false
,
tableHeight
:
''
,
curId
:
0
,
columns
:
[
// { type: 'selection', width: 70, align: 'center'},
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
key
:
'holidayId'
,
title
:
this
.
l
(
'holidayId'
),
high
:
true
,
align
:
'left'
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
key
:
'holidayName'
,
title
:
this
.
l
(
'holidayName'
),
high
:
true
,
align
:
'left'
},
'删除'
)
])
}
{
key
:
'holidayStart'
,
title
:
this
.
l
(
'holidayStart'
),
high
:
true
,
align
:
'left'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'span'
,
{},
params
.
row
.
holidayStart
.
slice
(
0
,
10
)
)
])
}
},
{
key
:
'holidayEnd'
,
title
:
this
.
l
(
'holidayEnd'
),
high
:
true
,
align
:
'left'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'span'
,
{},
params
.
row
.
holidayEnd
.
slice
(
0
,
10
)
)
])
}
},
{
key
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'creatorUserId'
,
title
:
this
.
l
(
'creatorUserId'
),
hide
:
true
,
align
:
'left'
,
type
:
'user'
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
}
]
}
]
}
},
created
(){
this
.
tableHeight
=
window
.
innerHeight
-
230
},
mounted
()
{
// console.log(this)
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
$refs
.
addmodal
.
entity
=
{}
this
.
editModal
=
false
this
.
curId
=
0
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
created
()
{
this
.
tableHeight
=
window
.
innerHeight
-
230
},
edit
(
id
)
{
this
.
editModal
=
true
this
.
curId
=
id
},
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
curId
=
id
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
deletelModal
=
false
this
.
$Message
.
success
(
'删除成功'
)
mounted
()
{
// console.log(this)
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
},
cancel
()
{
this
.
curId
=
0
this
.
addModal
=
false
this
.
$refs
.
addmodal
.
entity
=
{}
this
.
editModal
=
false
this
.
deletedlModal
=
false
this
.
deletelMore
=
false
},
//多选处理--表格选择项变化方法
selectionChange
(
selection
)
{
this
.
selectedRows
=
selection
this
.
footerModel
=
selection
.
length
>
0
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
deleteMore
(){
this
.
deletelMore
=
true
},
l
(
key
)
{
/*
calendar_holiday:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'节日名称',
startTime:'开始时间',
days:'工作时长(小时)',
status:'状态',
endTime:'结束时间',
}
*/
let
vkey
=
'calendar_holiday'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
$refs
.
addmodal
.
entity
=
{}
this
.
editModal
=
false
this
.
curId
=
0
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
edit
(
id
)
{
this
.
editModal
=
true
this
.
curId
=
id
},
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
curId
=
id
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
deletelModal
=
false
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
},
cancel
()
{
this
.
curId
=
0
this
.
addModal
=
false
this
.
$refs
.
addmodal
.
entity
=
{}
this
.
editModal
=
false
this
.
deletedlModal
=
false
this
.
deletelMore
=
false
},
//多选处理--表格选择项变化方法
selectionChange
(
selection
)
{
this
.
selectedRows
=
selection
this
.
footerModel
=
selection
.
length
>
0
},
deleteMore
()
{
this
.
deletelMore
=
true
},
l
(
key
)
{
/*
calendar_holiday:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'节日名称',
startTime:'开始时间',
days:'工作时长(小时)',
status:'状态',
endTime:'结束时间',
}
*/
let
vkey
=
'calendar_holiday'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
}
</
script
>
<
style
lang=
"less"
>
.holiday{
.footer02
{
background: #4c5968;
opacity: 0.9;
position: absolute;
bottom: 9px;
box-shadow: 0px -5px 6px rgba(0,0,0,
0.3);
width: 86%;
z-index: 99;
padding: 10px;
color: #fff;
margin: 10px 0 10px 0;
}
.holiday
{
.footer02
{
background: #4c5968;
opacity: 0.9;
position: absolute;
bottom: 9px;
box-shadow: 0px -5px 6px rgba(0, 0, 0,
0.3);
width: 86%;
z-index: 99;
padding: 10px;
color: #fff;
margin: 10px 0 10px 0;
}
}
</
style
>
\ No newline at end of file
</
style
>
pages/basicData/calendar/overtime/index.vue
View file @
0099d2fb
<
template
>
<div
class=
"overtime"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:height=
"tableHeight"
:action=
"action"
:high=
"false"
@
on-selection-change=
"selectionChange"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字日历名称"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<span>
公休日设置:
</span>
<RadioGroup
v-model=
"weekType"
@
on-change=
"radioChange"
>
<Radio
v-for=
"(item,index) in weekTypeList"
:key=
"index"
:label=
"item.weekendTypeName"
border
></Radio>
</RadioGroup>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
<div
class=
"overtime"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:height=
"tableHeight"
:action=
"action"
:high=
"false"
@
on-selection-change=
"selectionChange"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字日历名称"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<span>
公休日设置:
</span>
<RadioGroup
v-model=
"weekType"
@
on-change=
"radioChange"
>
<Radio
v-for=
"(item,index) in weekTypeList"
:key=
"index"
:label=
"item.weekendTypeName"
border
></Radio>
</RadioGroup>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
</DataGrid>
<div
class=
"footer02"
v-if=
"footerModel"
>
<span
class=
"span"
>
已选择
<b
class=
"span02"
>
{{selectedRows.length}}
</b>
项
</span>
<Button
@
click=
"deleteMore"
class=
"span ml20"
>
<Icon
type=
"md-close"
/>
批量删除
</Button>
<span
class=
"span"
>
已选择
<b
class=
"span02"
>
{{selectedRows.length}}
</b>
项
</span>
<Button
@
click=
"deleteMore"
class=
"span ml20"
>
<Icon
type=
"md-close"
/>
批量删除
</Button>
</div>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
<p>
确定删除?
</p>
</Modal>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<p>
确定删除这{{selectedRows.length}}项么?
</p>
<p>
确定删除这{{selectedRows.length}}项么?
</p>
</Modal>
</div>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
...
...
@@ -61,264 +55,266 @@ import Edit from './edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:
{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
'title'
,
value
:
null
}
},
weekType
:
''
,
weekTypeid
:
0
,
weekFlag
:
false
,
weekTypeList
:
[],
tableHeight
:
''
,
addModal
:
false
,
editModal
:
false
,
deletelModal
:
false
,
selectedRows
:
[],
//表格选中项
footerModel
:
false
,
deletelMore
:
false
,
curId
:
0
,
columns
:
[
// { type: 'selection', width: 70, align: 'center'},
// { key: 'id', title: this.l('id'), hide: true, align: 'left' },
{
key
:
'holidayCalId'
,
title
:
this
.
l
(
'holidayCalId'
),
high
:
true
,
align
:
'left'
},
{
key
:
'holidayCalName'
,
title
:
this
.
l
(
'holidayCalName'
),
high
:
true
,
align
:
'left'
},
{
key
:
'mesHolidayTitles'
,
title
:
this
.
l
(
'mesHolidayTitles'
),
high
:
true
,
align
:
'left'
},
{
key
:
'mesHolidayIds'
,
title
:
this
.
l
(
'mesHolidayIds'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'creatorUserId'
,
title
:
this
.
l
(
'creatorUserId'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'lastModificationTime'
,
title
:
this
.
l
(
'lastModificationTime'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'lastModifierUserId'
,
title
:
this
.
l
(
'lastModifierUserId'
),
align
:
'left'
,
hide
:
true
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'op'
,
name
:
'list'
,
components
:
{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
'title'
,
value
:
null
}
},
weekType
:
''
,
weekTypeid
:
0
,
weekFlag
:
false
,
weekTypeList
:
[],
tableHeight
:
''
,
addModal
:
false
,
editModal
:
false
,
deletelModal
:
false
,
selectedRows
:
[],
//表格选中项
footerModel
:
false
,
deletelMore
:
false
,
curId
:
0
,
columns
:
[
// { type: 'selection', width: 70, align: 'center'},
// { key: 'id', title: this.l('id'), hide: true, align: 'left' },
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
key
:
'holidayCalId'
,
title
:
this
.
l
(
'holidayCalId'
),
high
:
true
,
align
:
'left'
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
key
:
'holidayCalName'
,
title
:
this
.
l
(
'holidayCalName'
),
high
:
true
,
align
:
'left'
},
'删除'
)
])
}
}
]
}
},
created
()
{
this
.
getWeekTypeListFn
()
this
.
tableHeight
=
window
.
innerHeight
-
230
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
getWeekTypeListFn
()
{
Api
.
getsetweek
().
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
getweekList
()
this
.
weekType
=
res
.
result
.
weekendTypeName
}
else
{
let
parmse
=
{
conditions
:
[],
isDesc
:
true
,
pageSize
:
10
}
Api
.
getWeekTypeList
(
parmse
).
then
((
res
)
=>
{
this
.
weekTypeList
=
res
.
result
this
.
weekTypeList
.
map
((
v
)
=>
{
if
((
v
.
isvalid
=
1
))
{
this
.
weekType
=
v
.
weekendTypeName
}
else
{
this
.
weekType
=
0
}
})
})
{
key
:
'mesHolidayTitles'
,
title
:
this
.
l
(
'mesHolidayTitles'
),
high
:
true
,
align
:
'left'
},
{
key
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'creatorUserId'
,
title
:
this
.
l
(
'creatorUserId'
),
hide
:
true
,
align
:
'left'
,
type
:
'user'
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
}
]
}
})
},
//获取公休日数组
getweekList
()
{
let
parmse
=
{
conditions
:
[],
isDesc
:
true
,
pageSize
:
10
}
Api
.
getWeekTypeList
(
parmse
).
then
((
res
)
=>
{
this
.
weekTypeList
=
res
.
result
})
created
()
{
this
.
getWeekTypeListFn
()
this
.
tableHeight
=
window
.
innerHeight
-
230
},
//设置公休日
radioChange
(
a
)
{
let
datArray
=
this
.
weekTypeList
datArray
.
map
(
u
=>
{
if
(
a
==
u
.
title
){
this
.
weekTypeid
=
u
.
id
}
})
let
id
=
this
.
weekTypeid
Api
.
setweek
({
id
:
id
}).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
weekFlag
=
true
}
else
{
this
.
weekFlag
=
false
console
.
log
(
'设置失败'
)
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
})
},
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
editModal
=
false
this
.
curId
=
0
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
edit
(
id
)
{
this
.
editModal
=
true
this
.
curId
=
id
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
getWeekTypeListFn
()
{
Api
.
getsetweek
().
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
getweekList
()
this
.
weekType
=
res
.
result
.
weekendTypeName
}
else
{
let
parmse
=
{
conditions
:
[],
isDesc
:
true
,
pageSize
:
10
}
Api
.
getWeekTypeList
(
parmse
).
then
((
res
)
=>
{
this
.
weekTypeList
=
res
.
result
this
.
weekTypeList
.
map
((
v
)
=>
{
if
((
v
.
isvalid
=
1
))
{
this
.
weekType
=
v
.
weekendTypeName
}
else
{
this
.
weekType
=
0
}
})
})
}
})
},
//获取公休日数组
getweekList
()
{
let
parmse
=
{
conditions
:
[],
isDesc
:
true
,
pageSize
:
10
}
Api
.
getWeekTypeList
(
parmse
).
then
((
res
)
=>
{
this
.
weekTypeList
=
res
.
result
})
},
//设置公休日
radioChange
(
a
)
{
let
datArray
=
this
.
weekTypeList
datArray
.
map
(
u
=>
{
if
(
a
==
u
.
title
)
{
this
.
weekTypeid
=
u
.
id
}
})
let
id
=
this
.
weekTypeid
Api
.
setweek
({
id
:
id
}).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
weekFlag
=
true
}
else
{
this
.
weekFlag
=
false
console
.
log
(
'设置失败'
)
}
})
},
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
editModal
=
false
this
.
curId
=
0
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
edit
(
id
)
{
this
.
editModal
=
true
this
.
curId
=
id
},
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
curId
=
id
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
deletelModal
=
false
this
.
$Message
.
success
(
'删除成功'
)
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
curId
=
id
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
deletelModal
=
false
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
},
cancel
()
{
this
.
curId
=
0
this
.
addModal
=
false
this
.
editModal
=
false
this
.
deletedlModal
=
false
this
.
deletelMore
=
false
},
//多选处理--表格选择项变化方法
selectionChange
(
selection
)
{
this
.
selectedRows
=
selection
this
.
footerModel
=
selection
.
length
>
0
},
deleteMore
()
{
this
.
deletelMore
=
true
},
l
(
key
)
{
/*
calendar_overtime:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'日历名称',
restType:'关联节假日',
holidayId:'',
holidayTitle:'',
holidayStartendTime:'',
status:'',
}
*/
let
vkey
=
'calendar_overtime'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
},
cancel
()
{
this
.
curId
=
0
this
.
addModal
=
false
this
.
editModal
=
false
this
.
deletedlModal
=
false
this
.
deletelMore
=
false
},
//多选处理--表格选择项变化方法
selectionChange
(
selection
)
{
this
.
selectedRows
=
selection
this
.
footerModel
=
selection
.
length
>
0
},
deleteMore
()
{
this
.
deletelMore
=
true
},
l
(
key
)
{
/*
calendar_overtime:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'日历名称',
restType:'关联节假日',
holidayId:'',
holidayTitle:'',
holidayStartendTime:'',
status:'',
}
*/
let
vkey
=
'calendar_overtime'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
.overtime {
.footer02 {
background: #4c5968;
opacity: 0.9;
position: absolute;
bottom: 9px;
box-shadow: 0px -5px 6px rgba(0, 0, 0, 0.3);
width: 86%;
z-index: 99;
padding: 10px;
color: #fff;
margin: 10px 0 10px 0;
}
.footer02 {
background: #4c5968;
opacity: 0.9;
position: absolute;
bottom: 9px;
box-shadow: 0px -5px 6px rgba(0, 0, 0, 0.3);
width: 86%;
z-index: 99;
padding: 10px;
color: #fff;
margin: 10px 0 10px 0;
}
}
</
style
>
\ No newline at end of file
</
style
>
pages/basicData/calendar/work/index.vue
View file @
0099d2fb
<
template
>
<div
class=
"workiview"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
:height=
"tableHeight"
@
on-selection-change=
"selectionChange"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字日历名称/"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addFn"
>
新增
</Button>
</
template
>
<div
class=
"workiview"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
:height=
"tableHeight"
@
on-selection-change=
"selectionChange"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字日历名称/"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addFn"
>
新增
</Button>
</
template
>
</DataGrid>
<div
class=
"footer02"
v-if=
"footerModel"
>
<span
class=
"span"
>
已选择
<b
class=
"span02"
>
{{selectedRows.length}}
</b>
项
已选择
<b
class=
"span02"
>
{{selectedRows.length}}
</b>
项
</span>
<Button
@
click=
"deleteMore"
class=
"span ml20"
><Icon
type=
"md-close"
/>
批量删除
</Button>
<Button
@
click=
"deleteMore"
class=
"span ml20"
>
<Icon
type=
"md-close"
/>
批量删除
</Button>
</div>
<Modal
v-model=
"addModal"
ref=
"addmodal"
title=
"新增"
footer-hide
>
<Add
ref=
"addModal"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
<Add
ref=
"addModal"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
<p>
确定删除?
</p>
</Modal>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<p>
确定删除这{{selectedRows.length}}项么?
</p>
</Modal>
</div>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<p>
确定删除这{{selectedRows.length}}项么?
</p>
</Modal>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
...
...
@@ -47,207 +49,224 @@ import Edit from './edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:
{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
'title,calendarClassTitle'
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
deletelModal
:
false
,
selectedRows
:
[],
//表格选中项
tableHeight
:
''
,
footerModel
:
false
,
deletelMore
:
false
,
curId
:
0
,
columns
:
[
// { type: 'selection', width: 70, align: 'center'},
{
key
:
'id'
,
title
:
this
.
l
(
'id'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'calId'
,
title
:
this
.
l
(
'calId'
),
high
:
true
,
align
:
'left'
},
{
key
:
'calName'
,
title
:
this
.
l
(
'calName'
),
high
:
true
,
align
:
'left'
},
{
key
:
'shiftName'
,
title
:
this
.
l
(
'shiftName'
),
high
:
true
,
align
:
'left'
},
{
key
:
'mesShiftWorkSchedIds'
,
title
:
this
.
l
(
'mesShiftWorkSchedIds'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'workingLong'
,
title
:
this
.
l
(
'workingLong'
),
high
:
true
,
align
:
'left'
},
{
key
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'creatorUserId'
,
title
:
this
.
l
(
'creatorUserId'
),
hide
:
true
,
align
:
'left'
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'op'
,
name
:
'list'
,
components
:
{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
'title,calendarClassTitle'
,
value
:
null
}
},
addModal
:
false
,
editModal
:
false
,
deletelModal
:
false
,
selectedRows
:
[],
//表格选中项
tableHeight
:
''
,
footerModel
:
false
,
deletelMore
:
false
,
curId
:
0
,
columns
:
[
// { type: 'selection', width: 70, align: 'center'},
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
key
:
'calId'
,
title
:
this
.
l
(
'calId'
),
high
:
true
,
align
:
'left'
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
key
:
'calName'
,
title
:
this
.
l
(
'calName'
),
high
:
true
,
align
:
'left'
},
'删除'
)
])
}
{
key
:
'shiftName'
,
title
:
this
.
l
(
'shiftName'
),
high
:
true
,
align
:
'left'
},
{
key
:
'mesShiftWorkSchedIds'
,
title
:
this
.
l
(
'mesShiftWorkSchedIds'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'workingLong'
,
title
:
this
.
l
(
'workingLong'
),
high
:
true
,
align
:
'left'
},
{
key
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'creatorUserId'
,
title
:
this
.
l
(
'creatorUserId'
),
hide
:
true
,
align
:
'left'
,
type
:
'user'
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'remove'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
}
]
}
]
}
},
created
(){
this
.
tableHeight
=
window
.
innerHeight
-
230
// this.$refs.addModal.entity = {}
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
$refs
.
addModal
.
entity
=
{}
this
.
editModal
=
false
this
.
curId
=
0
},
addFn
()
{
this
.
addModal
=
true
this
.
$refs
.
addm
odal
.
entity
=
{}
created
()
{
this
.
tableHeight
=
window
.
innerHeight
-
230
// this.$refs.addM
odal.entity = {}
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
},
edit
(
id
)
{
this
.
editModal
=
true
this
.
curId
=
id
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
$refs
.
addModal
.
entity
=
{}
this
.
editModal
=
false
this
.
curId
=
0
},
addFn
()
{
this
.
addModal
=
true
this
.
$refs
.
addmodal
.
entity
=
{}
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
edit
(
id
)
{
this
.
editModal
=
true
this
.
curId
=
id
},
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
curId
=
id
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
deletelModal
=
false
this
.
$Message
.
success
(
'删除成功'
)
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
curId
=
id
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
deletelModal
=
false
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
},
cancel
()
{
this
.
curId
=
0
this
.
addModal
=
false
this
.
$refs
.
addModal
.
entity
=
{}
this
.
detailModal
=
false
this
.
editModal
=
false
this
.
deletedlModal
=
false
this
.
deletelMore
=
false
},
//多选处理--表格选择项变化方法
selectionChange
(
selection
)
{
this
.
selectedRows
=
selection
this
.
footerModel
=
selection
.
length
>
0
},
deleteMore
()
{
this
.
deletelMore
=
true
},
l
(
key
)
{
/*
calendar_work:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'日历名称',
calendarClassId:'关联班次',
calendarClassTitle:'',
calendarClassStart:'',
calendarClassEnd:'',
workHours:'工作时长',
}
*/
let
vkey
=
'calendar_work'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
})
},
removeCancel
()
{
this
.
deletelModal
=
false
},
cancel
()
{
this
.
curId
=
0
this
.
addModal
=
false
this
.
$refs
.
addModal
.
entity
=
{}
this
.
detailModal
=
false
this
.
editModal
=
false
this
.
deletedlModal
=
false
this
.
deletelMore
=
false
},
//多选处理--表格选择项变化方法
selectionChange
(
selection
)
{
this
.
selectedRows
=
selection
this
.
footerModel
=
selection
.
length
>
0
},
deleteMore
(){
this
.
deletelMore
=
true
},
l
(
key
)
{
/*
calendar_work:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'日历名称',
calendarClassId:'关联班次',
calendarClassTitle:'',
calendarClassStart:'',
calendarClassEnd:'',
workHours:'工作时长',
}
*/
let
vkey
=
'calendar_work'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
.workiview{
.footer02
{
background: #4c5968;
opacity: 0.9;
position: absolute;
bottom: 9px;
box-shadow: 0px -5px 6px rgba(0,0,0,
0.3);
width: 86%;
z-index: 99;
padding: 10px;
color: #fff;
margin: 10px 0 10px 0;
}
.workiview
{
.footer02
{
background: #4c5968;
opacity: 0.9;
position: absolute;
bottom: 9px;
box-shadow: 0px -5px 6px rgba(0, 0, 0,
0.3);
width: 86%;
z-index: 99;
padding: 10px;
color: #fff;
margin: 10px 0 10px 0;
}
}
</
style
>
\ No newline at end of file
</
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