Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mobi
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
1
Merge Requests
1
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
wbx-PCAndMobi
mobi
Commits
1c6022fc
Commit
1c6022fc
authored
Apr 07, 2021
by
Gakki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主项目日期跳转
parent
d9959f68
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
10 deletions
+31
-10
home.vue
src/views/home.vue
+31
-10
No files found.
src/views/home.vue
View file @
1c6022fc
...
...
@@ -428,6 +428,10 @@ export default {
})
},
created
()
{
let
_this
=
this
window
.
clickDate
=
_this
.
clickDate
},
computed
:
{
validRange
(){
//限制日历只展示当前月的日期
let
year
=
this
.
$moment
(
new
Date
()).
format
(
'YYYY'
)
...
...
@@ -453,7 +457,6 @@ export default {
methods
:
{
//日历组件
myCanlendar
(){
let
dateArr
=
[...
this
.
$moment
(
new
Date
()).
format
(
'YYYY-MM-DD'
).
split
(
'-'
)]
// console.log('获取当前日期:'dateArr)
...
...
@@ -493,8 +496,7 @@ export default {
}
tab
+=
'<td style="border-radius:20%;text-align:center;border:4px solid #fff;background:'
+
color
+
'">'
+
i
+
'</td>'
tab
+=
'<td onclick=clickDate('
+
i
+
') style="border-radius:20%;text-align:center;border:4px solid #fff; cursor: pointer; background:'
+
color
+
'">'
+
i
+
'</td>'
if
((
i
-
(
8
-
firstDay
))
%
7
==
0
){
tab
+=
'</tr><tr>'
}
...
...
@@ -515,6 +517,25 @@ export default {
tab
+=
'</tr>'
this
.
$refs
.
calendar
.
innerHTML
=
tab
},
clickDate
(
i
)
{
let
date
=
''
let
month
=
''
if
(
i
>
10
)
{
date
=
i
.
toString
()
}
else
{
date
=
'0'
+
i
}
month
=
new
Date
().
getMonth
()
<
10
?
'0'
+
(
new
Date
().
getMonth
()
+
1
)
+
'-'
+
date
:
(
new
Date
().
getMonth
()
+
1
)
+
'-'
+
date
let
finalDate
=
(
new
Date
().
getFullYear
()
+
'-'
+
month
)
this
.
$router
.
push
({
'path'
:
'/documents/fiveSearch/managerSelfCheckList'
,
query
:
{
month
:
finalDate
+
','
+
finalDate
// month: time+'-'+parseInt(item.name) > 10 ? parseInt(item.name): '0' + parseInt(item.name)
}
})
},
/**
* 获取dashboard数据
*/
...
...
@@ -801,13 +822,13 @@ export default {
break
}
let
parseDateInfo
=
(
parseInt
(
item
.
name
)
>
10
?
time
+
'-'
+
parseInt
(
item
.
name
)
+
'-01,'
+
time
+
'-'
+
parseInt
(
item
.
name
)
+
'-31'
:
time
+
'-'
+
'0'
+
parseInt
(
item
.
name
)
+
'-01,'
+
time
+
'-'
+
'0'
+
parseInt
(
item
.
name
)
+
'-31'
)
//
this.$router.push({
//
'path': '/documents/fiveSearch/managerSelfCheckList',
//
query: {
//
month: parseDateInfo
//
// month: time+'-'+parseInt(item.name) > 10 ? parseInt(item.name): '0' + parseInt(item.name)
//
}
//
})
this
.
$router
.
push
({
'path'
:
'/documents/fiveSearch/managerSelfCheckList'
,
query
:
{
month
:
parseDateInfo
// month: time+'-'+parseInt(item.name) > 10 ? parseInt(item.name): '0' + parseInt(item.name)
}
})
},
/**
* 获取房办月查统计
...
...
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