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
62f6c900
Commit
62f6c900
authored
Apr 20, 2018
by
李静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
0363dcad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
7 deletions
+34
-7
HmFullCalendar.vue
src/views/haomo/components/calendar/HmFullCalendar.vue
+25
-1
index.vue
src/views/haomo/components/calendar/index.vue
+9
-6
No files found.
src/views/haomo/components/calendar/HmFullCalendar.vue
View file @
62f6c900
...
...
@@ -240,6 +240,7 @@
*dateChange事件:用户点击一个带有日程安排的日期时触发(重复点击同一日期仅触发一次),将返回该日程数据;
*monthChange事件,切换月份时触发,刷新日历显示,并传回当前月份的数组,包含该月第一天的0:0:0 和 该月最后一天的23:59:59 的时间戳,例如,7月,返回 [1498838400000,1501516799000] ,对应:Sat Jul 01 2017 00:00:00 GMT+0800 (中国标准时间) 和 Mon Jul 31 2017 23:59:59 GMT+0800 (中国标准时间)
*/
// import request from '@/utils/request'
export
default
{
data
()
{
return
{
...
...
@@ -252,7 +253,23 @@
event
:
''
}
},
props
:
[
'width'
,
'schedules'
,
'initTime'
,
'showActive'
],
props
:
{
schema
:
{
type
:
Object
,
required
:
true
},
width
:
{
type
:
String
,
required
:
false
},
initTime
:
{
required
:
false
},
schedules
:
{
type
:
Array
,
required
:
false
}
},
computed
:
{
showTimeStr
()
{
var
result
=
''
...
...
@@ -453,8 +470,15 @@
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'月'
const
D
=
date
.
getDate
()
+
'日'
return
Y
+
M
+
D
},
getDailyEvent
()
{
const
self
=
this
console
.
log
(
self
.
schema
)
}
},
created
()
{
this
.
getDailyEvent
()
},
mounted
()
{
this
.
initData
()
}
...
...
src/views/haomo/components/calendar/index.vue
View file @
62f6c900
...
...
@@ -3,19 +3,16 @@
<hm-full-calendar
:width=
"width"
:schedules=
"schedules"
:schema=
"schema['HmUser']"
@
dateChange=
"datechange"
@
monthChange=
"monthchange"
></hm-full-calendar>
<!--
<div
v-if=
"show"
class=
"incident"
>
-->
<!--
<p>
{{
currentDate
}}
</p>
-->
<!--
<span>
{{
event
}}
</span>
-->
<!--
<span
class=
"close"
@
click=
"closeEvent"
>
X
</span>
-->
<!--
</div>
-->
</div>
</
template
>
<
script
>
import
HmFullCalendar
from
'./HmFullCalendar.vue'
import
schema
from
'../../schemas/hm_org_schema'
export
default
{
name
:
'HmFullCalendar'
,
// 继承其他组件
...
...
@@ -35,9 +32,15 @@
},
created
()
{
this
.
schema
=
schema
},
methods
:
{
datechange
(
data
)
{
console
.
log
(
data
)
},
monthchange
(
data
)
{
console
.
log
(
data
)
}
}
}
</
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