OnePsycho 1 gadu atpakaļ
vecāks
revīzija
9f60857bf2

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -866,6 +866,7 @@ const LANG_EN_US = {
         tips1: 'Modify Information'
     },
     newCusMgt: {
+        configCourse: 'Courses already set for this semester',
         recommendFiles: 'Lesson Backup data',
         sort: 'Sort by',
         sortType0: 'Sort by grade',

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -866,6 +866,7 @@ const LANG_ZH_CN = {
         tips1: '修改信息'
     },
     newCusMgt: {
+        configCourse: '本学期已配置课程',
         recommendFiles: '课程备用资料',
         sort: '排序方式',
         sortType0: '按年级排序',

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -866,6 +866,7 @@ const LANG_ZH_TW = {
         tips1: '修改資訊'
     },
     newCusMgt: {
+        configCourse: '本學期已配置課程',
         recommendFiles: '課程備用數據',
         sort: '排序方式',
         sortType0: '依年級排序',

+ 21 - 1
TEAMModelOS/ClientApp/src/view/coursemgt/NewCusMgt.vue

@@ -35,7 +35,8 @@
 						<Poptip trigger="hover" :title="$t('totalAnalysis.echarts_text10')" placement="bottom" @on-popper-show="canEmitSelectChange = true" @on-popper-hide="canEmitSelectChange = false" v-if="originCourseList.length">
 							<Icon type="ios-funnel" :title="$t('syllabus.search')" @click="doAction('search')" />
 							<div slot="content">
-								<p>{{ $t("courseManage.syllabus.grade") }}</p>
+								<Checkbox v-model="onlyShowConfigCourse" @on-change="onFilterConfig">{{ $t('newCusMgt.configCourse') }}</Checkbox>
+								<p style="margin-top: 10px;">{{ $t("courseManage.syllabus.grade") }}</p>
 								<Select v-model="filterGrade" clearable @on-change="onFilterGrade" :placeholder="$t('courseManage.syllabus.placeHolder3')" style="margin: 10px 0">
 									<Option v-for="(item, index) in curPeriod.grades" :value="index" :key="index">{{ item }}</Option>
 								</Select>
@@ -207,6 +208,7 @@
 		},
 		data() {
 			return {
+				onlyShowConfigCourse:false,
 				guideModal:false,
 				sortValue:'grade',
 				taskGroups:[],
@@ -595,6 +597,20 @@
 				this.sortValue = 'grade'
 				this.canEmitSelectChange = false
 			},	
+			onFilterConfig(val){
+				console.error(val)
+				if(!this.canEmitSelectChange) return
+				let gradeCond = this.filterGrade > -1
+				let subjectCond = this.filterSubjectIndex > -1
+				let nowList = this.originCourseList.filter((i) => (gradeCond ? i.grade === this.filterGrade : true) && (subjectCond ? i.subject.id === this.curPeriod.subjects[this.filterSubjectIndex].id : true));
+				console.error(nowList)
+				this.courseList = !val ? this._.cloneDeep(nowList) : nowList.filter(i => i.count > 0)
+				console.error(this.courseList)
+				if(this.courseList.length){
+					this.onFilterSort(this.sortValue)
+					this.onCourseClick(this.courseList[0], 0);
+				}
+			},
 			/* 排序方式 */
 			onFilterSort(val){
 				console.log(this.canEmitSelectChange)
@@ -870,6 +886,10 @@
 				color: #8a8a8a;
 
 				.tools {
+
+					.ivu-checkbox-wrapper{
+						white-space: break-spaces;
+					}
 					.ivu-icon {
 						font-size: 16px;
 						margin-left: 10px;