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
a643dc4f
Commit
a643dc4f
authored
Oct 31, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
overtime work
parent
2e121744
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
200 additions
and
230 deletions
+200
-230
index.vue
pages/basicData/calendar/overtime/index.vue
+142
-153
index.vue
pages/basicData/calendar/work/index.vue
+58
-77
No files found.
pages/basicData/calendar/overtime/index.vue
View file @
a643dc4f
...
...
@@ -104,6 +104,12 @@ export default {
high
:
true
,
align
:
'left'
},
{
key
:
'mesHolidayIds'
,
title
:
this
.
l
(
'mesHolidayIds'
),
hide
:
true
,
align
:
'left'
},
{
key
:
'creationTime'
,
title
:
this
.
l
(
'creationTime'
),
...
...
@@ -154,171 +160,154 @@ export default {
]
}
},
//获取公休日数组
getweekList
()
{
let
parmse
=
{
conditions
:
[],
isDesc
:
true
,
pageSize
:
10
created
()
{
this
.
getWeekTypeListFn
()
this
.
tableHeight
=
window
.
innerHeight
-
230
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
Api
.
getWeekTypeList
(
parmse
).
then
((
res
)
=>
{
console
.
log
(
res
.
result
)
this
.
weekTypeList
=
res
.
result
})
},
//设置公休日
radioChange
(
a
)
{
console
.
log
(
a
)
let
datArray
=
this
.
weekTypeList
datArray
.
map
(
u
=>
{
if
(
a
==
u
.
weekendTypeName
)
{
this
.
weekTypeid
=
u
.
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
}
})
let
id
=
this
.
weekTypeid
Api
.
setweek
({
id
:
id
}).
then
((
res
)
=>
{
Api
.
getWeekTypeList
(
parmse
).
then
((
res
)
=>
{
console
.
log
(
res
.
result
)
this
.
weekTypeList
=
res
.
result
})
},
//设置公休日
radioChange
(
a
)
{
console
.
log
(
a
)
let
datArray
=
this
.
weekTypeList
datArray
.
map
(
u
=>
{
if
(
a
==
u
.
weekendTypeName
)
{
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
(
'设置失败'
)
}
},
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
},
})
},
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_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
}
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
}
}
}
</
script
>
<
style
lang=
"less"
>
...
...
pages/basicData/calendar/work/index.vue
View file @
a643dc4f
...
...
@@ -198,85 +198,66 @@ export default {
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
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
(
"删除成功"
);
}
});
},
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
;
},
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
;
},
},
};
</
script
>
<
style
lang=
"less"
>
...
...
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