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
27e97dcd
Commit
27e97dcd
authored
Mar 21, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改日历列表数据
parent
c2ad4645
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
33 deletions
+35
-33
calholiday.js
src/api/mes/cal/calholiday.js
+5
-5
calendarType.vue
src/views/mes/cal/calendar/calendarType.vue
+9
-11
team.vue
src/views/mes/cal/calendar/team.vue
+8
-10
index.vue
src/views/mes/cal/holiday/index.vue
+13
-7
No files found.
src/api/mes/cal/calholiday.js
View file @
27e97dcd
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
// 查询
节假
日设置列表
// 查询
工作
日设置列表
export
function
listCalholiday
(
query
)
{
export
function
listCalholiday
(
query
)
{
return
request
({
return
request
({
url
:
'/mes/cal/calholiday/list'
,
url
:
"/mes/cal/calendar/list"
,
method
:
'get'
,
method
:
"get"
,
params
:
query
params
:
query
,
})
})
;
}
}
// 查询上班数据工作单元列表
// 查询上班数据工作单元列表
...
...
src/views/mes/cal/calendar/calendarType.vue
View file @
27e97dcd
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
<div
class=
"lunar"
:class=
"
{ festival : isFestival(date, data) }">
{{
solarDate2lunar
(
data
.
day
)
}}
</div>
<div
class=
"lunar"
:class=
"
{ festival : isFestival(date, data) }">
{{
solarDate2lunar
(
data
.
day
)
}}
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-tag
v-if=
"holidayList.indexOf(data.day) ==
-1"
effect=
"dark"
>
班
</el-tag>
<el-tag
v-if=
"workdayList.indexOf(data.day)>
-1"
effect=
"dark"
>
班
</el-tag>
<el-tag
v-else
effect=
"dark"
type=
"success"
>
休
</el-tag>
<el-tag
v-else-if=
"holidayList.indexOf(data.day) > -1"
effect=
"dark"
type=
"success"
>
休
</el-tag>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-for=
"calendarDay in calendarDayList "
:key=
"calendarDay.theDay"
>
<el-row
v-for=
"calendarDay in calendarDayList "
:key=
"calendarDay.theDay"
>
...
@@ -55,9 +55,7 @@ export default {
...
@@ -55,9 +55,7 @@ export default {
},
},
queryParams
:
{
queryParams
:
{
theDay
:
null
,
theDay
:
null
,
holidayType
:
null
,
isWork
:
1
startTime
:
null
,
endTime
:
null
,
},
},
}
}
},
},
...
@@ -66,11 +64,11 @@ export default {
...
@@ -66,11 +64,11 @@ export default {
handler
(
newVal
,
oldVal
){
handler
(
newVal
,
oldVal
){
console
.
log
(
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
());
console
.
log
(
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
());
this
.
teamShiftQueryParams
.
theDay
=
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
();
this
.
teamShiftQueryParams
.
theDay
=
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
();
this
.
loading
=
true
;
this
.
queryParams
.
theDay
=
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
()
;
listCalendars
(
this
.
teamShiftQueryParams
).
then
(
response
=>
{
listCalendars
(
this
.
teamShiftQueryParams
).
then
(
response
=>
{
this
.
calendarDayList
=
response
.
data
;
this
.
calendarDayList
=
response
.
data
;
this
.
loading
=
false
;
});
});
this
.
getList
();
}
}
}
}
},
},
...
@@ -89,7 +87,7 @@ export default {
...
@@ -89,7 +87,7 @@ export default {
response
.
data
.
forEach
(
theDay
=>
{
response
.
data
.
forEach
(
theDay
=>
{
if
(
theDay
.
holidayType
==
'HOLIDAY'
){
if
(
theDay
.
holidayType
==
'HOLIDAY'
){
that
.
holidayList
.
push
(
theDay
.
theDay
);
that
.
holidayList
.
push
(
theDay
.
theDay
);
}
else
{
}
else
if
(
theDay
.
holidayType
==
'WORKDAY'
)
{
that
.
workdayList
.
push
(
theDay
.
theDay
);
that
.
workdayList
.
push
(
theDay
.
theDay
);
}
}
});
});
...
...
src/views/mes/cal/calendar/team.vue
View file @
27e97dcd
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
<div
class=
"lunar"
:class=
"
{ festival : isFestival(date, data) }">
{{
solarDate2lunar
(
data
.
day
)
}}
</div>
<div
class=
"lunar"
:class=
"
{ festival : isFestival(date, data) }">
{{
solarDate2lunar
(
data
.
day
)
}}
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-tag
v-if=
"holidayList.indexOf(data.day) ==
-1"
effect=
"dark"
>
班
</el-tag>
<el-tag
v-if=
"workdayList.indexOf(data.day)>
-1"
effect=
"dark"
>
班
</el-tag>
<el-tag
v-else
effect=
"dark"
type=
"success"
>
休
</el-tag>
<el-tag
v-else-if=
"holidayList.indexOf(data.day) > -1"
effect=
"dark"
type=
"success"
>
休
</el-tag>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-for=
"calendarDay in calendarDayList "
:key=
"calendarDay.theDay"
>
<el-row
v-for=
"calendarDay in calendarDayList "
:key=
"calendarDay.theDay"
>
...
@@ -66,9 +66,7 @@ export default {
...
@@ -66,9 +66,7 @@ export default {
},
},
queryParams
:
{
queryParams
:
{
theDay
:
null
,
theDay
:
null
,
holidayType
:
null
,
isWork
:
1
startTime
:
null
,
endTime
:
null
,
}
}
}
}
},
},
...
@@ -77,11 +75,11 @@ export default {
...
@@ -77,11 +75,11 @@ export default {
handler
(
newVal
,
oldVal
){
handler
(
newVal
,
oldVal
){
console
.
log
(
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
());
console
.
log
(
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
());
this
.
teamShiftQueryParams
.
theDay
=
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
();
this
.
teamShiftQueryParams
.
theDay
=
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
();
this
.
loading
=
true
;
this
.
queryParams
.
theDay
=
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
()
;
listCalendars
(
this
.
teamShiftQueryParams
).
then
(
response
=>
{
listCalendars
(
this
.
teamShiftQueryParams
).
then
(
response
=>
{
this
.
calendarDayList
=
response
.
data
;
this
.
calendarDayList
=
response
.
data
;
this
.
loading
=
false
;
});
});
this
.
getList
();
}
}
}
}
},
},
...
@@ -106,7 +104,7 @@ export default {
...
@@ -106,7 +104,7 @@ export default {
response
.
data
.
forEach
(
theDay
=>
{
response
.
data
.
forEach
(
theDay
=>
{
if
(
theDay
.
holidayType
==
'HOLIDAY'
){
if
(
theDay
.
holidayType
==
'HOLIDAY'
){
that
.
holidayList
.
push
(
theDay
.
theDay
);
that
.
holidayList
.
push
(
theDay
.
theDay
);
}
else
{
}
else
if
(
theDay
.
holidayType
==
'WORKDAY'
)
{
that
.
workdayList
.
push
(
theDay
.
theDay
);
that
.
workdayList
.
push
(
theDay
.
theDay
);
}
}
});
});
...
...
src/views/mes/cal/holiday/index.vue
View file @
27e97dcd
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-tag
v-if=
"
holidayList.indexOf(data.day) ==
-1"
effect=
"dark"
>
班
</el-tag>
<el-tag
v-if=
"
workdayList.indexOf(data.day)>
-1"
effect=
"dark"
>
班
</el-tag>
<el-tag
v-else
effect=
"dark"
type=
"success"
>
休
</el-tag>
<el-tag
v-else
-if=
"holidayList.indexOf(data.day) > -1"
effect=
"dark"
type=
"success"
>
休
</el-tag>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
...
@@ -79,9 +79,7 @@ export default {
...
@@ -79,9 +79,7 @@ export default {
theDay
:
null
,
theDay
:
null
,
queryParams
:
{
queryParams
:
{
theDay
:
null
,
theDay
:
null
,
holidayType
:
null
,
isWork
:
1
startTime
:
null
,
endTime
:
null
,
},
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
...
@@ -91,6 +89,15 @@ export default {
...
@@ -91,6 +89,15 @@ export default {
}
}
}
}
},
},
watch
:{
date
:{
handler
(
newVal
,
oldVal
){
console
.
log
(
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
());
this
.
queryParams
.
theDay
=
newVal
.
getFullYear
()
+
'-'
+
(
newVal
.
getMonth
()
+
1
)
+
'-'
+
newVal
.
getDate
();
this
.
getList
()
}
}
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
},
},
...
@@ -102,12 +109,11 @@ export default {
...
@@ -102,12 +109,11 @@ export default {
this
.
workdayList
=
[];
this
.
workdayList
=
[];
let
that
=
this
;
let
that
=
this
;
listCalholiday
(
this
.
queryParams
).
then
(
response
=>
{
listCalholiday
(
this
.
queryParams
).
then
(
response
=>
{
debugger
;
if
(
response
.
data
!=
null
){
if
(
response
.
data
!=
null
){
response
.
data
.
forEach
(
theDay
=>
{
response
.
data
.
forEach
(
theDay
=>
{
if
(
theDay
.
holidayType
==
'HOLIDAY'
){
if
(
theDay
.
holidayType
==
'HOLIDAY'
){
that
.
holidayList
.
push
(
theDay
.
theDay
);
that
.
holidayList
.
push
(
theDay
.
theDay
);
}
else
{
}
else
if
(
theDay
.
holidayType
==
'WORKDAY'
)
{
that
.
workdayList
.
push
(
theDay
.
theDay
);
that
.
workdayList
.
push
(
theDay
.
theDay
);
}
}
});
});
...
...
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