Commit 9a63ee89 by 王志慧

Merge branch 'wangzh_dev_3.11.0' into v3.11.0

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