Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
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
JIRA
JIRA
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
黄瑜
VueElementTemplate
Commits
0363dcad
Commit
0363dcad
authored
Apr 20, 2018
by
李静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
e5c9c3db
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
+27
-27
HmFullCalendar.vue
src/views/haomo/components/calendar/HmFullCalendar.vue
+27
-4
index.vue
src/views/haomo/components/calendar/index.vue
+0
-23
No files found.
src/views/haomo/components/calendar/HmFullCalendar.vue
View file @
0363dcad
...
...
@@ -28,8 +28,8 @@
</div>
</div>
<div
v-if=
"show"
class=
"incident"
>
<
!--
<p>
{{
currentDate
}}
</p>
--
>
<
!--
<span>
{{
event
}}
</span>
--
>
<
p>
{{
currentDate
}}
</p
>
<
span>
{{
event
}}
</span
>
<span
class=
"close"
@
click=
"closeEvent"
>
X
</span>
</div>
</el-dialog>
...
...
@@ -246,10 +246,13 @@
componentW
:
''
,
// 组件宽度
showTimeData
:
''
,
// 展示时间,时间戳格式
dateItems
:
''
,
// 当前月份所有日期的数据
dialogTableVisible
:
false
dialogTableVisible
:
false
,
show
:
false
,
currentDate
:
''
,
event
:
''
}
},
props
:
[
'width'
,
'schedules'
,
'initTime'
,
'showActive'
,
'show'
],
props
:
[
'width'
,
'schedules'
,
'initTime'
,
'showActive'
],
computed
:
{
showTimeStr
()
{
var
result
=
''
...
...
@@ -365,6 +368,7 @@
this
.
dateItems
=
arr
},
dateChange
(
dateItem
)
{
this
.
show
=
true
// console.log(dateItem)
var
dateObj
=
new
Date
(
this
.
showTimeData
)
var
year
=
dateObj
.
getFullYear
()
...
...
@@ -378,6 +382,12 @@
}
if
(
!
dateItem
.
schedule
)
{
// 点击没有行程的,不作反应
console
.
log
(
result
)
if
(
result
.
schedule
)
{
const
currentTime
=
this
.
timestampToTime
(
result
.
schedule
.
date
)
console
.
log
(
currentTime
)
this
.
currentDate
=
currentTime
this
.
event
=
result
.
schedule
.
title
}
// this.$emit('dateChange', result)
return
}
else
{
...
...
@@ -409,6 +419,12 @@
}
// 向上发送本次点击的行程数据
console
.
log
(
result
)
if
(
result
.
schedule
)
{
const
currentTime
=
this
.
timestampToTime
(
result
.
schedule
.
date
)
console
.
log
(
currentTime
)
this
.
currentDate
=
currentTime
this
.
event
=
result
.
schedule
.
title
}
// this.$emit('dateChange', result)
}
else
{
// 已激活行程提示的,不作反应
return
...
...
@@ -430,6 +446,13 @@
},
closeEvent
()
{
this
.
show
=
false
},
timestampToTime
(
timestamp
)
{
var
date
=
new
Date
(
timestamp
)
// 时间戳为10位需*1000,时间戳为13位的话不需乘1000
const
Y
=
date
.
getFullYear
()
+
'年'
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'月'
const
D
=
date
.
getDate
()
+
'日'
return
Y
+
M
+
D
}
},
mounted
()
{
...
...
src/views/haomo/components/calendar/index.vue
View file @
0363dcad
...
...
@@ -5,7 +5,6 @@
:schedules=
"schedules"
@
dateChange=
"datechange"
@
monthChange=
"monthchange"
:show=
"show"
></hm-full-calendar>
<!--
<div
v-if=
"show"
class=
"incident"
>
-->
<!--
<p>
{{
currentDate
}}
</p>
-->
...
...
@@ -29,8 +28,6 @@
return
{
show
:
false
,
width
:
'300px'
,
currentDate
:
''
,
event
:
''
,
schedules
:
[{
date
:
1524043625000
,
title
:
'个梵蒂是的舞蹈服可接受的看似简单计算的话束带结发会计师对海口市记得回复是框架的看就好山东矿机会计师发送的甲方是看得见看见的说法开始冈地方'
},
{
date
:
1523955299000
,
title
:
'个梵蒂冈地方'
}]
}
},
...
...
@@ -41,26 +38,6 @@
},
methods
:
{
datechange
(
data
)
{
this
.
show
=
true
console
.
log
(
data
)
if
(
data
.
schedule
)
{
const
currentTime
=
this
.
timestampToTime
(
data
.
schedule
.
date
)
console
.
log
(
currentTime
)
this
.
currentDate
=
currentTime
this
.
event
=
data
.
schedule
.
title
}
},
monthchange
(
data
)
{
console
.
log
(
data
,
'--------'
)
},
timestampToTime
(
timestamp
)
{
var
date
=
new
Date
(
timestamp
)
// 时间戳为10位需*1000,时间戳为13位的话不需乘1000
const
Y
=
date
.
getFullYear
()
+
'年'
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'月'
const
D
=
date
.
getDate
()
+
'日'
return
Y
+
M
+
D
}
}
}
</
script
>
...
...
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