|
@@ -95,12 +95,19 @@
|
|
|
<li v-for="(item,index) in monthEnList" :key="index">
|
|
|
<span class="time-label">{{item}}.</span>
|
|
|
<span class="time-dot">
|
|
|
- <span class="time-inner-dot" :class="index + 1 >= schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month && index < 12 ? 'bg-color-check':'bg-color-uncheck'"></span>
|
|
|
+ <span v-if="auto" class="time-inner-dot" :class="index + 1 >= schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month && index < endMonth ? 'bg-color-check':'bg-color-uncheck'"></span>
|
|
|
+ <span v-else class="time-inner-dot" :class="index + 1 >= schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month || index < endMonth ? 'bg-color-check':'bg-color-uncheck'"></span>
|
|
|
<span class="time-line-tail"></span>
|
|
|
</span>
|
|
|
<div>
|
|
|
- <Icon class="first-arrow" size="22" type="ios-arrow-back" v-if="index + 1 == schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month || index == 12" />
|
|
|
- <Icon class="second-arrow" size="22" :class="index + 1 < 11 ? 'color-check':'color-uncheck'" type="ios-arrow-back" v-if="index + 1 == schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month || index == 12" />
|
|
|
+ <Icon class="first-arrow" size="22" type="ios-arrow-back" v-if="index + 1 == schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month || index + 1 == endMonth" />
|
|
|
+ <!--<Icon class="second-arrow" size="22" :class="index < endMonth ? 'color-check':'color-uncheck'" type="ios-arrow-back" v-if="index + 1 == schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month || index + 1 == endMonth" />-->
|
|
|
+ <span v-if="auto">
|
|
|
+ <Icon class="second-arrow" size="22" :class="index < endMonth ? 'color-check':'color-uncheck'" type="ios-arrow-back" v-if="index + 1 == schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month || index + 1 == endMonth" />
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <Icon class="second-arrow" size="22" :class="index + 1 >= endMonth ? 'color-check':'color-uncheck'" type="ios-arrow-back" v-if="index + 1 == schoolSetting.systems[currentSchoolSysIndex].semester[currentSemesterIndex].month || index + 1 == endMonth" />
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -162,6 +169,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ auto:true,
|
|
|
currentSchoolSysIndex:0,
|
|
|
currentSemesterIndex:0,
|
|
|
schoolSetting: {
|
|
@@ -221,6 +229,8 @@
|
|
|
this.currentSchoolSysIndex = 0;
|
|
|
}
|
|
|
if (this.schoolSetting.systems.length > 1) {
|
|
|
+ this.currentSchoolSysIndex = 0;
|
|
|
+ this.currentSemesterIndex = 0;
|
|
|
this.schoolSetting.systems.splice(index, 1);
|
|
|
} else {
|
|
|
this.$Message.warning('至少需要保留一项!');
|
|
@@ -228,6 +238,8 @@
|
|
|
},
|
|
|
delSemester(index) {
|
|
|
if (this.schoolSetting.systems[this.currentSchoolSysIndex].semester.length > 1) {
|
|
|
+ this.currentSchoolSysIndex = 0;
|
|
|
+ this.currentSemesterIndex = 0;
|
|
|
this.schoolSetting.systems[this.currentSchoolSysIndex].semester.splice(index, 1);
|
|
|
} else {
|
|
|
this.$Message.warning('至少需要保留一项!');
|
|
@@ -351,7 +363,7 @@
|
|
|
{
|
|
|
name: "预设学期",
|
|
|
studentCount: "学生人数",
|
|
|
- month: 2,
|
|
|
+ month: this.schoolSetting.systems[this.currentSchoolSysIndex].semester[this.currentSemesterIndex].month + 1,
|
|
|
day:26
|
|
|
}
|
|
|
],
|
|
@@ -381,7 +393,7 @@
|
|
|
this.schoolSetting.systems[this.currentSchoolSysIndex].semester.push({
|
|
|
name: "预设学期",
|
|
|
studentCount: "学生人数",
|
|
|
- month: 2,
|
|
|
+ month: this.schoolSetting.systems[this.currentSchoolSysIndex].semester[this.currentSemesterIndex].month + 1,
|
|
|
day: 26
|
|
|
});
|
|
|
} else {
|
|
@@ -422,14 +434,30 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.initData();
|
|
|
- this.monthList = [...Array(11).keys()];
|
|
|
+ this.monthList = [...Array(12).keys()];
|
|
|
this.gradeList = ['一年级','二年级','三年级','四年级','五年级'];
|
|
|
this.subjectList = ['语文','数学','外语','化学','物理','语文','数学','外语','化学','物理'];
|
|
|
this.dayList = [...Array(30).keys()];
|
|
|
- this.monthEnList = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC', 'JAN'];
|
|
|
+ this.monthEnList = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'];
|
|
|
this.colorList = ['#F16C6A', '#68CDF1', '#00796B', '#7C4DFF', '#0288D1', '#D32F2F', '#00796B', '#7C4DFF','#0288D1', '#D32F2F', '#00796B', '#7C4DFF'];
|
|
|
-
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ endMonth() {
|
|
|
+ let end = 1;
|
|
|
+ if(this.schoolSetting.systems[this.currentSchoolSysIndex].semester.length == 1){
|
|
|
+ end = 12;
|
|
|
+ this.auto = true;
|
|
|
+ } else if (this.currentSemesterIndex + 1 < this.schoolSetting.systems[this.currentSchoolSysIndex].semester.length) {
|
|
|
+ end = this.schoolSetting.systems[this.currentSchoolSysIndex].semester[this.currentSemesterIndex + 1].month;
|
|
|
+ this.auto = true;
|
|
|
+ } else if (this.currentSemesterIndex + 1 == this.schoolSetting.systems[this.currentSchoolSysIndex].semester.length){
|
|
|
+ end = this.schoolSetting.systems[this.currentSchoolSysIndex].semester[0].month;
|
|
|
+ this.auto = false;
|
|
|
+ }
|
|
|
+ return end;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -452,6 +480,6 @@
|
|
|
}
|
|
|
|
|
|
.term-item-start .ivu-select-arrow {
|
|
|
- top:72%;
|
|
|
+ /*top:72%;*/
|
|
|
}
|
|
|
</style>
|