Commit 9a63ee89 by 王志慧

Merge branch 'wangzh_dev_3.11.0' into v3.11.0

2 parents bfc8b987 c0894448
......@@ -56,7 +56,6 @@ export default {
},
watch: {
calendarData(newVal) {
console.log(newVal)
this.handleSelectCalendar(newVal)
}
},
......@@ -73,7 +72,6 @@ export default {
this.createCalendar(this.current.year, this.current.month)
},
handleShowCalendar() {
console.log(111)
this.$parent.$parent.handleShowCalendar(1)
},
plusMonth: function() {
......
......@@ -31,7 +31,7 @@
<script>
import Calendar from '@toast-ui/calendar'
import * as dayjs from 'dayjs'
import { mapState } from 'vuex'
import { mapState,mapActions } from 'vuex'
export default {
data() {
return {
......@@ -53,16 +53,20 @@ export default {
let container = this.$refs.calendar
this.calendar = new Calendar(container, this.options)
this.calendar.on('clickEvent', e => {
// console.log(e)
this.setActivityInfo({
id:e.event.calendarId,
type: 'calendar'
})
})
this.getCalendarData()
},
methods: {
...mapActions('marketing', ['setActivityInfo']),
close(){
this.$parent.handleShowCalendar(0)
},
getCalendarData() {
let colors=['#BFEFD5','#FEE9CC','#FEDCCF','#CAF2F1','#ECD0FF']
let colors=['#BFEFD5','#FEE9CC','#FEDCCF','','#CAF2F1','#ECD0FF']
let { eventList, calendarData, calendar, currentDate } = this
eventList = calendarData.map(item => {
return {
......@@ -72,7 +76,7 @@ export default {
start: item.startTime.replace('/', '-'),
end: item.endTime,
color: '#333333',
backgroundColor: colors[item.marketingType],
backgroundColor: colors[item.marketingType-1],
// dragBackgroundColor: '#3c056d',
customStyle: {
fontSize: '12px;',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!