export default {
	data() {
		return {
			courseWeekday: [],
			// 上课时间
			// 上午
			timeAM: [{
					value: 'A1',
					name: '1',
					checked: false

				},
				{
					name: '2',
					value: 'A2',
					checked: false
				},
				{
					name: '3',
					value: 'A3',
					checked: false
				},
				{
					name: '4',
					value: 'A4',
					checked: false
				},
				{
					name: '5',
					value: 'A5',
					checked: false
				},
				{
					name: '6',
					value: 'A6',
					checked: false
				},
				{
					name: '7',
					value: 'A7',
					checked: false
				}
			],
			// 下午
			timePM: [{
					value: 'P1',
					name: '1',
					checked: false
				},
				{
					name: '2',
					value: 'P2',
					checked: false
				},
				{
					name: '3',
					value: 'P3',
					checked: false
				},
				{
					name: '4',
					value: 'P4',
					checked: false
				},
				{
					name: '5',
					value: 'P5',
					checked: false
				},
				{
					name: '6',
					value: 'P6',
					checked: false
				},
				{
					name: '7',
					value: 'P7',
					checked: false
				}
			],
			// 晚上
			timeEvening: [{
					name: '1',
					value: 'E1',
					checked: false
				},
				{
					name: '2',
					value: 'E2',
					checked: false
				},
				{
					name: '3',
					value: 'E3',
					checked: false
				},
				{
					name: '4',
					value: 'E4',
					checked: false
				},
				{
					name: '5',
					value: 'E5',
					checked: false
				},
				{
					name: '6',
					value: 'E6',
					checked: false
				},
				{
					name: '7',
					value: 'E7',
					checked: false
				}
			],
		}
	},
	methods: {
		// 上课表格格式化
		parseCourseWeekday() {
			for (let i = 0; i < this.courseWeekday.length; i++) {
				for (let x = 0; x < this.timeAM.length; x++) {
					if (this.courseWeekday[i] == this.timeAM[x].value) {
						this.timeAM[x].checked = true
					}
				}
				for (let y = 0; y < this.timePM.length; y++) {
					if (this.courseWeekday[i] == this.timePM[y].value) {
						this.timePM[y].checked = true
					}
				}
				for (let z = 0; z < this.timeEvening.length; z++) {
					if (this.courseWeekday[i] == this.timeEvening[z].value) {
						this.timeEvening[z].checked = true
					}
				}
			}
		},
	}
}
