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
2e121744
Commit
2e121744
authored
Oct 31, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'portal' of git.mes123.com:zhouyx/mes-ui into portal
parents
0099d2fb
65b2e67c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
309 additions
and
263 deletions
+309
-263
index.vue
pages/basicData/calendar/overtime/index.vue
+153
-134
add.vue
pages/basicData/calendar/work/add.vue
+2
-0
index.vue
pages/basicData/calendar/work/index.vue
+154
-129
No files found.
pages/basicData/calendar/overtime/index.vue
View file @
2e121744
...
@@ -154,152 +154,171 @@ export default {
...
@@ -154,152 +154,171 @@ export default {
]
]
}
}
},
},
created
()
{
//获取公休日数组
this
.
getWeekTypeListFn
()
getweekList
()
{
this
.
tableHeight
=
window
.
innerHeight
-
230
let
parmse
=
{
},
conditions
:
[],
mounted
()
{
isDesc
:
true
,
window
.
onresize
=
()
=>
{
pageSize
:
10
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
}
Api
.
getWeekTypeList
(
parmse
).
then
((
res
)
=>
{
console
.
log
(
res
.
result
)
this
.
weekTypeList
=
res
.
result
})
},
},
async
fetch
({
//设置公休日
store
,
radioChange
(
a
)
{
params
console
.
log
(
a
)
})
{
let
datArray
=
this
.
weekTypeList
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
datArray
.
map
(
u
=>
{
},
if
(
a
==
u
.
weekendTypeName
)
{
methods
:
{
this
.
weekTypeid
=
u
.
id
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
let
id
=
this
.
weekTypeid
})
Api
.
setweek
({
},
id
:
id
//设置公休日
}).
then
((
res
)
=>
{
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
)
{
if
(
res
.
success
)
{
this
.
weekFlag
=
true
this
.
weekFlag
=
true
}
else
{
}
else
{
this
.
weekFlag
=
false
this
.
weekFlag
=
false
console
.
log
(
'设置失败'
)
console
.
log
(
'设置失败'
)
}
}
})
},
},
async
fetch
({
addOk
()
{
store
,
this
.
$refs
.
grid
.
load
()
params
this
.
addModal
=
false
})
{
this
.
editModal
=
false
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
this
.
curId
=
0
},
},
methods
:
{
search
()
{
getWeekTypeListFn
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
Api
.
getsetweek
().
then
((
res
)
=>
{
},
if
(
res
.
success
)
{
edit
(
id
)
{
this
.
getweekList
()
this
.
editModal
=
true
this
.
weekType
=
res
.
result
.
weekendTypeName
this
.
curId
=
id
}
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
)
{
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
deletelModal
=
true
this
.
curId
=
id
this
.
curId
=
id
},
},
removeOk
()
{
removeOk
()
{
Api
.
delete
({
Api
.
delete
({
id
:
this
.
curId
id
:
this
.
curId
}).
then
((
r
)
=>
{
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
$refs
.
grid
.
load
()
this
.
deletelModal
=
false
this
.
deletelModal
=
false
this
.
$Message
.
success
(
'删除成功'
)
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
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
...
...
pages/basicData/calendar/work/add.vue
View file @
2e121744
...
@@ -149,7 +149,9 @@ export default {
...
@@ -149,7 +149,9 @@ export default {
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
console
.
log
(
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
this
.
selectAry
();
},
},
},
},
};
};
...
...
pages/basicData/calendar/work/index.vue
View file @
2e121744
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<div
class=
"footer02"
v-if=
"footerModel"
>
<div
class=
"footer02"
v-if=
"footerModel"
>
<span
class=
"span"
>
<span
class=
"span"
>
已选择
已选择
<b
class=
"span02"
>
{{
selectedRows.length
}}
</b>
项
<b
class=
"span02"
>
{{
selectedRows.length
}}
</b>
项
</span>
</span>
<Button
@
click=
"deleteMore"
class=
"span ml20"
>
<Button
@
click=
"deleteMore"
class=
"span ml20"
>
<Icon
type=
"md-close"
/>
批量删除
<Icon
type=
"md-close"
/>
批量删除
...
@@ -37,221 +37,246 @@
...
@@ -37,221 +37,246 @@
<p>
确定删除?
</p>
<p>
确定删除?
</p>
</Modal>
</Modal>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<p>
确定删除这{{
selectedRows.length
}}项么?
</p>
<p>
确定删除这{{
selectedRows.length
}}项么?
</p>
</Modal>
</Modal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
import
Add
from
'./add'
import
Add
from
"./add"
;
import
Edit
from
'./edit'
import
Edit
from
"./edit"
;
import
Detail
from
'./detail'
import
Detail
from
"./detail"
;
import
Search
from
'./search'
import
Search
from
"./search"
;
export
default
{
export
default
{
name
:
'list'
,
name
:
"list"
,
components
:
{
components
:
{
Add
,
Add
,
Edit
,
Edit
,
Detail
,
Detail
,
Search
Search
,
},
},
data
()
{
data
()
{
return
{
return
{
action
:
Api
.
index
,
action
:
Api
.
index
,
easySearch
:
{
easySearch
:
{
keys
:
{
keys
:
{
op
:
'title,calendarClassTitle'
,
op
:
"title,calendarClassTitle"
,
value
:
null
value
:
null
}
}
,
},
},
addModal
:
false
,
addModal
:
false
,
editModal
:
false
,
editModal
:
false
,
deletelModal
:
false
,
deletelModal
:
false
,
selectedRows
:
[],
//表格选中项
selectedRows
:
[],
//表格选中项
tableHeight
:
''
,
tableHeight
:
""
,
footerModel
:
false
,
footerModel
:
false
,
deletelMore
:
false
,
deletelMore
:
false
,
curId
:
0
,
curId
:
0
,
columns
:
[
columns
:
[
// { type: 'selection', width: 70, align: 'center'},
// { type: 'selection', width: 70, align: 'center'},
{
{
key
:
'calId'
,
key
:
"id"
,
title
:
this
.
l
(
'calId'
),
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"calId"
,
title
:
this
.
l
(
"calId"
),
high
:
true
,
high
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'calName'
,
key
:
"calName"
,
title
:
this
.
l
(
'calName'
),
title
:
this
.
l
(
"calName"
),
high
:
true
,
high
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'shiftName'
,
key
:
"shiftName"
,
title
:
this
.
l
(
'shiftName'
),
title
:
this
.
l
(
"shiftName"
),
high
:
true
,
high
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'mesShiftWorkSchedIds'
,
key
:
"mesShiftWorkSchedIds"
,
title
:
this
.
l
(
'mesShiftWorkSchedIds'
),
title
:
this
.
l
(
"mesShiftWorkSchedIds"
),
hide
:
true
,
hide
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'workingLong'
,
key
:
"workingLong"
,
title
:
this
.
l
(
'workingLong'
),
title
:
this
.
l
(
"workingLong"
),
high
:
true
,
high
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'creationTime'
,
key
:
"creationTime"
,
title
:
this
.
l
(
'creationTime'
),
title
:
this
.
l
(
"creationTime"
),
hide
:
true
,
hide
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'creatorUserId'
,
key
:
"creatorUserId"
,
title
:
this
.
l
(
'creatorUserId'
),
title
:
this
.
l
(
"creatorUserId"
),
hide
:
true
,
hide
:
true
,
align
:
'left'
,
align
:
"left"
,
type
:
'user'
},
},
{
{
title
:
'操作'
,
title
:
"操作"
,
key
:
'id'
,
key
:
"id"
,
width
:
140
,
width
:
140
,
align
:
'center'
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
return
h
(
"div"
,
{
class
:
'action'
class
:
"action"
},
[
},
[
h
(
h
(
'op'
,
{
"op"
,
{
attrs
:
{
attrs
:
{
oprate
:
'edit'
oprate
:
"edit"
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
}
,
},
},
'编辑'
"编辑"
),
),
h
(
h
(
'op'
,
{
"op"
,
{
attrs
:
{
attrs
:
{
oprate
:
'remove'
oprate
:
"remove"
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
}
,
},
},
'删除'
"删除"
)
)
,
])
])
;
}
}
,
}
}
,
]
]
,
}
}
;
},
},
created
()
{
created
()
{
this
.
tableHeight
=
window
.
innerHeight
-
230
this
.
tableHeight
=
window
.
innerHeight
-
230
;
// this.$refs.addModal.entity = {}
},
},
mounted
()
{
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
window
.
screenHeight
=
window
.
innerHeight
;
this
.
tableHeight
=
window
.
screenHeight
-
230
this
.
tableHeight
=
window
.
screenHeight
-
230
;
})()
})()
;
}
}
;
},
},
async
fetch
({
async
fetch
({
store
,
store
,
params
params
})
{
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
},
methods
:
{
methods
:
{
addOk
()
{
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
$refs
.
grid
.
load
()
;
this
.
addModal
=
false
this
.
addModal
=
false
;
this
.
$refs
.
addModal
.
entity
=
{}
this
.
$refs
.
addModal
.
entity
=
{}
;
this
.
editModal
=
false
this
.
editModal
=
false
;
this
.
curId
=
0
this
.
curId
=
0
;
},
},
addFn
()
{
addFn
()
{
this
.
addModal
=
true
this
.
addModal
=
true
;
this
.
$refs
.
addmodal
.
entity
=
{}
this
.
$refs
.
addmodal
.
entity
=
{};
this
.
$refs
.
addModal
.
selectAry
();
},
},
search
()
{
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
;
},
},
edit
(
id
)
{
edit
(
id
)
{
this
.
editModal
=
true
this
.
editModal
=
true
;
this
.
curId
=
id
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
)
{
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
deletelModal
=
true
;
this
.
curId
=
id
this
.
curId
=
id
;
},
},
removeOk
()
{
removeOk
()
{
Api
.
delete
({
Api
.
delete
({
id
:
this
.
curId
id
:
this
.
curId
}).
then
((
r
)
=>
{
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
'删除成功'
)
this
.
$Message
.
success
(
"删除成功"
);
}
}
})
});
},
},
removeCancel
()
{
removeCancel
()
{
this
.
deletelModal
=
false
this
.
deletelModal
=
false
;
},
},
cancel
()
{
cancel
()
{
this
.
curId
=
0
this
.
curId
=
0
;
this
.
addModal
=
false
this
.
addModal
=
false
;
this
.
$refs
.
addModal
.
entity
=
{}
this
.
$refs
.
addModal
.
entity
=
{};
this
.
detailModal
=
false
this
.
detailModal
=
false
;
this
.
editModal
=
false
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
this
.
deletedlModal
=
false
;
this
.
deletelMore
=
false
this
.
deletelMore
=
false
;
},
},
//多选处理--表格选择项变化方法
//多选处理--表格选择项变化方法
selectionChange
(
selection
)
{
selectionChange
(
selection
)
{
this
.
selectedRows
=
selection
this
.
selectedRows
=
selection
;
this
.
footerModel
=
selection
.
length
>
0
this
.
footerModel
=
selection
.
length
>
0
;
},
},
deleteMore
()
{
deleteMore
()
{
this
.
deletelMore
=
true
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
;
},
},
},
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
>
</
script
>
<
style
lang=
"less"
>
<
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