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
5c09df87
Commit
5c09df87
authored
Apr 08, 2020
by
康振飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日历
parent
1d0d4953
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
752 additions
and
56 deletions
+752
-56
add.vue
pages/basicData/calendar/class/add.vue
+4
-2
index.vue
pages/basicData/calendar/class/index.vue
+61
-54
add copy.vue
pages/basicData/calendar/holiday/class/add copy.vue
+112
-0
add.vue
pages/basicData/calendar/holiday/class/add.vue
+112
-0
api.js
pages/basicData/calendar/holiday/class/api.js
+20
-0
detail.vue
pages/basicData/calendar/holiday/class/detail.vue
+52
-0
edit.vue
pages/basicData/calendar/holiday/class/edit.vue
+93
-0
index.vue
pages/basicData/calendar/holiday/class/index.vue
+235
-0
search.vue
pages/basicData/calendar/holiday/class/search.vue
+63
-0
No files found.
pages/basicData/calendar/class/add.vue
View file @
5c09df87
...
...
@@ -13,12 +13,14 @@
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStart')"
prop=
"shiftStart"
>
<DatePicker
type=
"date"
v-model=
"entity.shiftStart"
></DatePicker>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStart"
placeholder=
"选择开始时间"
style=
"width: 130px"
></TimePicker>
<!--
<DatePicker
type=
"date"
></DatePicker>
-->
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftEnd')"
prop=
"shiftEnd"
>
<DatePicker
type=
"date"
v-model=
"entity.shiftEnd"
></DatePicker>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftEnd"
placeholder=
"选择结束时间"
style=
"width: 130px"
></TimePicker>
<!--
<DatePicker
type=
"date"
></DatePicker>
-->
</FormItem>
</Col>
<!--
<Col
:span=
"12"
>
...
...
pages/basicData/calendar/class/index.vue
View file @
5c09df87
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
><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
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<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
>
...
...
@@ -32,60 +40,59 @@ import Edit from './edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:{
name
:
'list'
,
components
:{
Add
,
Edit
,
Detail
,
Search
},
data
()
{
return
{
action
:
Api
.
index
,
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
:
"shiftStart"
,
title
:
this
.
l
(
"shiftStart"
)
,
align
:
"left"
,
high
:
true
},
{
key
:
"shiftEnd"
,
title
:
this
.
l
(
"shiftEnd"
)
,
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
},
{
key
:
"shiftWorkSchedPk1"
,
title
:
this
.
l
(
"shiftWorkSchedPk1"
)
,
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
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"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
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
)
}
},
'删除'
)
])
}
},
]
}
},
mounted
(){
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:{
op
:
"shiftWorkSchedCode,shiftName"
,
value
:
null
}
},
methods
:{
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
:
"shiftStart"
,
title
:
this
.
l
(
"shiftStart"
)
,
align
:
"left"
,
high
:
true
},
{
key
:
"shiftEnd"
,
title
:
this
.
l
(
"shiftEnd"
)
,
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
},
{
key
:
"shiftWorkSchedPk1"
,
title
:
this
.
l
(
"shiftWorkSchedPk1"
)
,
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
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"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
)
,
hide
:
true
,
align
:
"left"
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
)
,
hide
:
true
,
align
:
"left"
},
{
title
:
'操作'
,
key
:
'id'
,
width
:
140
,
align
:
'center'
,
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
)
}
},
'删除'
)
])
}
},],
}
},
mounted
(){
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
...
...
pages/basicData/calendar/holiday/class/add copy.vue
0 → 100644
View file @
5c09df87
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
span=
"24"
>
<FormItem
:label=
"l('shiftWorkSchedCode')"
prop=
"shiftWorkSchedCode"
>
<Input
v-model=
"entity.shiftWorkSchedCode"
></Input>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('shiftName')"
prop=
"shiftName"
>
<Input
v-model=
"entity.shiftName"
></Input>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('startendTime')"
prop=
"startTime"
>
<TimePicker
type=
"timerange"
format=
"HH:mm"
v-model=
"entity.startendTime"
placeholder=
"请选择时间段"
></TimePicker>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
rules
:
{
shiftWorkSchedCode
:
[{
required
:
true
,
message
:
'请填写编号'
,
trigger
:
'blur'
}],
shiftName
:
[{
required
:
true
,
message
:
'请填写班次名称'
,
trigger
:
'blur'
}],
}
}
},
props
:
{
v
:
Object
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
// let parmes = {
// pageIndex: 1,
// pageSize: 20,
// conditions: [
// {
// fieldName: 'keys',
// fieldValue: this.entity.title,
// conditionalType: 'title'
// }
// ],
// total: 4
// }
// Api.paged(parmes).then((r) => {
// console.log(r.success)
// if(r.success){
// this.$Message.error("该班次名称已存在!")
// this.disabled = true
// return
// }else{
let
pames
=
{
title
:
this
.
entity
.
title
,
startendTime
:
this
.
entity
.
startendTime
.
join
(
'-'
)
}
Api
.
create
(
pames
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
// this.disabled = false
this
.
$Message
.
success
(
'保存成功'
)
this
.
entity
=
{}
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
// }
// })
},
handleClose
()
{
this
.
entity
=
{}
this
.
disabled
=
true
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'calendar_class'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/calendar/holiday/class/add.vue
0 → 100644
View file @
5c09df87
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
span=
"24"
>
<FormItem
:label=
"l('shiftWorkSchedCode')"
prop=
"shiftWorkSchedCode"
>
<Input
v-model=
"entity.shiftWorkSchedCode"
></Input>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('shiftName')"
prop=
"shiftName"
>
<Input
v-model=
"entity.shiftName"
></Input>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('startendTime')"
prop=
"startTime"
>
<TimePicker
type=
"timerange"
format=
"HH:mm"
v-model=
"entity.startendTime"
placeholder=
"请选择时间段"
></TimePicker>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
rules
:
{
shiftWorkSchedCode
:
[{
required
:
true
,
message
:
'请填写编号'
,
trigger
:
'blur'
}],
shiftName
:
[{
required
:
true
,
message
:
'请填写班次名称'
,
trigger
:
'blur'
}],
}
}
},
props
:
{
v
:
Object
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
// let parmes = {
// pageIndex: 1,
// pageSize: 20,
// conditions: [
// {
// fieldName: 'keys',
// fieldValue: this.entity.title,
// conditionalType: 'title'
// }
// ],
// total: 4
// }
// Api.paged(parmes).then((r) => {
// console.log(r.success)
// if(r.success){
// this.$Message.error("该班次名称已存在!")
// this.disabled = true
// return
// }else{
let
pames
=
{
title
:
this
.
entity
.
title
,
startendTime
:
this
.
entity
.
startendTime
.
join
(
'-'
)
}
Api
.
create
(
pames
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
// this.disabled = false
this
.
$Message
.
success
(
'保存成功'
)
this
.
entity
=
{}
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
// }
// })
},
handleClose
()
{
this
.
entity
=
{}
this
.
disabled
=
true
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'calendar_class'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/calendar/holiday/class/api.js
0 → 100644
View file @
5c09df87
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
systemUrl
}
/messhiftworksched/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/messhiftworksched/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/messhiftworksched/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/messhiftworksched/create`
,
params
);
},
update
(
params
){
return
Api
.
put
(
`
${
systemUrl
}
/messhiftworksched/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/messhiftworksched/delete`
,{
params
:
params
});
},
}
\ No newline at end of file
pages/basicData/calendar/holiday/class/detail.vue
0 → 100644
View file @
5c09df87
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('startTime')"
>
{{
entity
.
startTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('endTime')"
>
{{
entity
.
endTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('workHours')"
>
{{
entity
.
workHours
}}
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
code
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"calendar_class"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/calendar/holiday/class/edit.vue
0 → 100644
View file @
5c09df87
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
span=
"24"
>
<FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
></Input>
</FormItem>
</Col>
<Col
span=
"24"
>
<!-- prop="startendTime" -->
<FormItem
:label=
"l('startendTime')"
>
<TimePicker
type=
"timerange"
format=
"HH:mm"
v-model=
"entity.startendTime"
placeholder=
"请选择时间段"
></TimePicker>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Edit'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
rules
:
{
title
:
[{
required
:
true
,
message
:
'请填写班次名称'
,
trigger
:
'blur'
}],
// startendTime: [{ required: true, message: '请选择时间段', trigger: 'blur' }],
}
}
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
r
.
result
.
startendTime
=
r
.
result
.
startendTime
.
split
(
'-'
)
this
.
entity
=
r
.
result
this
.
$emit
(
'on-load'
)
})
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
let
startendTime
=
this
.
entity
.
startendTime
let
pames
=
{
title
:
this
.
entity
.
title
,
startendTime
:
startendTime
.
join
(
'-'
),
workHours
:
this
.
entity
.
workHours
,
creationTime
:
this
.
entity
.
creationTime
,
creatorUserId
:
this
.
entity
.
creatorUserId
,
id
:
this
.
entity
.
id
,
}
Api
.
update
(
pames
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'calendar_class'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
}
}
}
</
script
>
\ No newline at end of file
pages/basicData/calendar/holiday/class/index.vue
0 → 100644
View file @
5c09df87
<
template
>
<div
class=
"classview"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:height=
"tableHeight"
@
on-selection-change=
"selectionChange"
:high=
"false"
>
<!-- :height="tabheight" -->
<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>
项
</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"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
<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'
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
:
'shiftWorkSchedCode'
,
title
:
this
.
l
(
'shiftWorkSchedCode'
),
high
:
true
,
align
:
'left'
},
{
key
:
'shiftName'
,
title
:
this
.
l
(
'shiftName'
),
high
:
true
,
align
:
'left'
},
{
key
:
'shiftStart'
,
title
:
this
.
l
(
'shiftStart'
),
high
:
true
,
align
:
'left'
},
{
key
:
'shiftEnd'
,
title
:
this
.
l
(
'shiftEnd'
),
high
:
true
,
align
:
'left'
},
{
key
:
'workingLong'
,
title
:
this
.
l
(
'workingLong'
),
high
:
true
,
align
:
'left'
},
{
key
:
'shiftWorkSchedPk1'
,
title
:
this
.
l
(
'shiftWorkSchedPk1'
),
hide
:
true
,
align
:
'left'
},
{
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
()
{
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
.
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
.
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_class:{
id:'',
shiftWorkSchedCode:'编号',
shiftName:'班次名称',
shiftStart:'班次开始时间',
shiftEnd:'班次结束时间',
status:'状态',
workingLong:'工作时长',
shiftWorkSchedPk1:'班次id',
}
*/
let
vkey
=
'calendar_class'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
.classview{
height: 100%;
.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
pages/basicData/calendar/holiday/class/search.vue
0 → 100644
View file @
5c09df87
<
template
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
:v-if=
"condition.id.show"
><FormItem
:label=
"l('id')"
prop=
"id"
>
<Input
v-model=
"condition.id.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.creationTime.show"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.creationTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.creatorUserId.show"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<Input
v-model=
"condition.creatorUserId.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.lastModificationTime.show"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.lastModificationTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.lastModifierUserId.show"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<Input
v-model=
"condition.lastModifierUserId.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.isDeleted.show"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<Input
v-model=
"condition.isDeleted.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.deletionTime.show"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.deletionTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.deleterUserId.show"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<Input
v-model=
"condition.deleterUserId.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.title.show"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"condition.title.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.startTime.show"
><FormItem
:label=
"l('startTime')"
prop=
"startTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.startTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.endTime.show"
><FormItem
:label=
"l('endTime')"
prop=
"endTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.endTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.workHours.show"
><FormItem
:label=
"l('workHours')"
prop=
"workHours"
>
<Input
v-model=
"condition.workHours.value"
>
</Input>
</FormItem></Col>
</Row>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
condition
:
{
id
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
creationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
creatorUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
lastModificationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
lastModifierUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
isDeleted
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
deletionTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
deleterUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
title
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
startTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
endTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
workHours
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
},
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"calendar_class"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
}
}
</
script
>
\ 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