Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
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
mes-ui
Commits
82d33f60
Commit
82d33f60
authored
Jun 06, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排版日历
parent
8a66b8a5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
calholiday.js
src/api/mes/cal/calholiday.js
+10
-1
team.vue
src/views/mes/cal/calendar/team.vue
+24
-3
No files found.
src/api/mes/cal/calholiday.js
View file @
82d33f60
...
@@ -5,7 +5,16 @@ export function listCalholiday(query) {
...
@@ -5,7 +5,16 @@ export function listCalholiday(query) {
return
request
({
return
request
({
url
:
"/mes/cal/calendar/list"
,
url
:
"/mes/cal/calendar/list"
,
method
:
"get"
,
method
:
"get"
,
params
:
query
,
params
:
query
});
}
// 查询工作日设置列表
export
function
getCalWorkunits
(
query
)
{
return
request
({
url
:
"/mes/cal/calendar/getCalWorkunits"
,
method
:
"post"
,
data
:
query
});
});
}
}
...
...
src/views/mes/cal/calendar/team.vue
View file @
82d33f60
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
<
script
>
<
script
>
import
{
listAllTeam
}
from
"@/api/mes/cal/team"
;
import
{
listAllTeam
}
from
"@/api/mes/cal/team"
;
import
{
listCalholiday
}
from
"@/api/mes/cal/calholiday"
;
import
{
listCalholiday
,
getCalWorkunits
}
from
"@/api/mes/cal/calholiday"
;
import
calendar
from
'@/utils/calendar'
;
import
calendar
from
'@/utils/calendar'
;
export
default
{
export
default
{
name
:
'TeamView'
,
name
:
'TeamView'
,
...
@@ -106,7 +106,7 @@ export default {
...
@@ -106,7 +106,7 @@ export default {
});
});
},
},
/** 查询节假日设置列表 */
/** 查询节假日设置列表 */
getList
()
{
getList
(
type
)
{
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
holidayList
=
[];
this
.
holidayList
=
[];
this
.
workdayList
=
[];
this
.
workdayList
=
[];
...
@@ -114,7 +114,13 @@ export default {
...
@@ -114,7 +114,13 @@ export default {
if
(
this
.
teamShiftQueryParams
.
workunitName
)
{
if
(
this
.
teamShiftQueryParams
.
workunitName
)
{
this
.
queryParams
.
workunitName
=
this
.
teamShiftQueryParams
.
workunitName
this
.
queryParams
.
workunitName
=
this
.
teamShiftQueryParams
.
workunitName
}
}
listCalholiday
(
this
.
queryParams
).
then
(
response
=>
{
if
(
type
)
{
delete
this
.
queryParams
.
workunitName
}
else
{
delete
this
.
queryParams
.
workunitIds
}
const
fn
=
type
?
getCalWorkunits
:
listCalholiday
fn
(
this
.
queryParams
).
then
(
response
=>
{
this
.
calendarDayList
=
response
.
data
;
this
.
calendarDayList
=
response
.
data
;
if
(
response
.
data
!=
null
){
if
(
response
.
data
!=
null
){
response
.
data
.
forEach
(
theDay
=>
{
response
.
data
.
forEach
(
theDay
=>
{
...
@@ -128,6 +134,16 @@ export default {
...
@@ -128,6 +134,16 @@ export default {
}
}
});
});
},
},
getGroupId
(
data
)
{
return
data
.
reduce
((
pre
,
{
id
,
children
})
=>
{
if
(
children
&&
children
.
length
){
pre
=
[...
pre
,
...
this
.
getGroupId
(
children
)]
}
else
{
pre
.
push
(
id
)
}
return
pre
},[])
},
//点击班组类型
//点击班组类型
onSelected
(
data
){
onSelected
(
data
){
if
(
data
[
'level'
]
===
4
){
if
(
data
[
'level'
]
===
4
){
...
@@ -135,6 +151,11 @@ export default {
...
@@ -135,6 +151,11 @@ export default {
this
.
queryParams
.
workunitName
=
data
[
'label'
];
this
.
queryParams
.
workunitName
=
data
[
'label'
];
this
.
queryParams
.
theDay
=
this
.
date
.
getFullYear
()
+
'-'
+
(
this
.
date
.
getMonth
()
+
1
)
+
'-'
+
this
.
date
.
getDate
();
this
.
queryParams
.
theDay
=
this
.
date
.
getFullYear
()
+
'-'
+
(
this
.
date
.
getMonth
()
+
1
)
+
'-'
+
this
.
date
.
getDate
();
this
.
getList
()
this
.
getList
()
}
else
if
(
data
[
'level'
]
===
2
||
data
[
'level'
]
===
3
){
this
.
loading
=
true
;
this
.
queryParams
.
workunitIds
=
this
.
getGroupId
(
data
.
children
);
this
.
queryParams
.
theDay
=
this
.
date
.
getFullYear
()
+
'-'
+
(
this
.
date
.
getMonth
()
+
1
)
+
'-'
+
this
.
date
.
getDate
();
this
.
getList
(
'id'
)
}
}
},
},
isFestival
(
slotDate
,
slotData
)
{
isFestival
(
slotDate
,
slotData
)
{
...
...
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