Commit 62f6c900 authored by 李静's avatar 李静

a

parent 0363dcad
...@@ -240,6 +240,7 @@ ...@@ -240,6 +240,7 @@
*dateChange事件:用户点击一个带有日程安排的日期时触发(重复点击同一日期仅触发一次),将返回该日程数据; *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 (中国标准时间) *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{ export default{
data() { data() {
return { return {
...@@ -252,7 +253,23 @@ ...@@ -252,7 +253,23 @@
event: '' 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: { computed: {
showTimeStr() { showTimeStr() {
var result = '' var result = ''
...@@ -453,8 +470,15 @@ ...@@ -453,8 +470,15 @@
const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月' const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
const D = date.getDate() + '日' const D = date.getDate() + '日'
return Y + M + D return Y + M + D
},
getDailyEvent() {
const self = this
console.log(self.schema)
} }
}, },
created() {
this.getDailyEvent()
},
mounted() { mounted() {
this.initData() this.initData()
} }
......
...@@ -3,19 +3,16 @@ ...@@ -3,19 +3,16 @@
<hm-full-calendar <hm-full-calendar
:width="width" :width="width"
:schedules="schedules" :schedules="schedules"
:schema="schema['HmUser']"
@dateChange="datechange" @dateChange="datechange"
@monthChange="monthchange" @monthChange="monthchange"
></hm-full-calendar> ></hm-full-calendar>
<!--<div v-if="show" class="incident">-->
<!--<p>{{currentDate}}</p>-->
<!--<span>{{event}}</span>-->
<!--<span class="close" @click="closeEvent">X</span>-->
<!--</div>-->
</div> </div>
</template> </template>
<script> <script>
import HmFullCalendar from './HmFullCalendar.vue' import HmFullCalendar from './HmFullCalendar.vue'
import schema from '../../schemas/hm_org_schema'
export default { export default {
name: 'HmFullCalendar', name: 'HmFullCalendar',
// 继承其他组件 // 继承其他组件
...@@ -35,9 +32,15 @@ ...@@ -35,9 +32,15 @@
}, },
created() { created() {
this.schema = schema
}, },
methods: { methods: {
datechange(data) {
console.log(data)
},
monthchange(data) {
console.log(data)
}
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment