浏览代码

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop5.0-tmd

CrazyIter_Bin 4 年之前
父节点
当前提交
e3b9dc9a01

+ 20 - 20
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -203,15 +203,15 @@ export default {
                     permission: 'schoolSetting-read|teacher-read|student-read|classroom-read|auth-read|course-read|syllabus-read|content-read|exercise-read|knowledge-read',
                     child: [
                         // 校本课纲
-                        {
-                            icon: 'iconfont icon-syllabus',
-                            name: this.$t('system.menu.scSyllabus'),
-                            router: '/home/syllabus',
-                            tag: this.$t('system.menu.preview'),
-                            role: 'admin|teacher',
-                            permission: 'syllabus-read|syllabus-upd',
-                            menuName: 'syllabus'
-                        },
+                        // {
+                        //     icon: 'iconfont icon-syllabus',
+                        //     name: this.$t('system.menu.scSyllabus'),
+                        //     router: '/home/syllabus',
+                        //     tag: this.$t('system.menu.preview'),
+                        //     role: 'admin|teacher',
+                        //     permission: 'syllabus-read|syllabus-upd',
+                        //     menuName: 'syllabus'
+                        // },
                         // 校本内容
                         {
                             icon: 'iconfont icon-file',
@@ -228,7 +228,7 @@ export default {
                             name: this.$t('system.menu.scQuBack'),
                             router: '/home/evaluation/schoolBank',
                             tag: '',
-                            role: 'admin|teacheradmin',
+                            role: 'admin|teacher',
                             permission: 'exercise-read|exercise-upd',
                             menuName: 'schoolBank'
                         },
@@ -361,16 +361,16 @@ export default {
                     permission: '',
                     subName: 'cusContent',
                     child: [
-                        {
-                            icon: 'iconfont icon-syllabus',
-                            name: this.$t('system.menu.prtSyllabus'),
-                            router: '/home/personalSyllabus',
-                            tag: this.$t('system.menu.preview'),
-                            role: 'teacher|admin',
-                            permission: '',
-                            menuName: 'personalSyllabus',
-                            isShow: true
-                        },
+                        // {
+                        //     icon: 'iconfont icon-syllabus',
+                        //     name: this.$t('system.menu.prtSyllabus'),
+                        //     router: '/home/personalSyllabus',
+                        //     tag: this.$t('system.menu.preview'),
+                        //     role: 'teacher|admin',
+                        //     permission: '',
+                        //     menuName: 'personalSyllabus',
+                        //     isShow: true
+                        // },
                         {
                             icon: 'iconfont icon-file',
                             name: this.$t('system.menu.prtContent'),

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/totalAnalysis.js

@@ -35,7 +35,7 @@ export default {
     condition5: '考试范围',
     condition6: '评测来源',
     condition7: '考试学科',
-
+	condition8: '发布年份',
     // totalIndex.vue
     ti_title1: '基本数据统计',
     ti_title2: '评测数据统计',

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/totalAnalysis.js

@@ -35,6 +35,7 @@ export default {
 	condition5: '考試範圍',
 	condition6: '評量來源',
 	condition7: '考試學科',
+	condition8: '發佈年份',
 
 	// totalIndex.vue
 	ti_title1: '基本資料統計',

+ 16 - 13
TEAMModelOS/ClientApp/src/view/evaluation/bank/index.vue

@@ -13,23 +13,26 @@
 		</Tabs>
 		<div class="ev-list-operation">
 			<div class="import-exercise common-save-btn">
-				<div class="ev-list-paper-tools" style="display: flex;"  v-show="currentTab === 'paper' && ($access.can('admin.*||exercise-upd') || !isSchool)">
+				<div class="ev-list-paper-tools" style="display: flex;"  v-show="currentTab === 'paper' ">
 					<span @click="onShowPaperList" class="bank-tools-btn" v-if="isShowBackList">
 						<Icon type="md-arrow-back" size="16"/>
 						<span>{{ $t('evaluation.index.backList') }}</span>
 					</span>
-					<span @click="goCreatePaper('auto')" class="bank-tools-btn">
-						<Icon type="md-cube" size="16"/>
-						<span>{{ $t('evaluation.index.autoCreate') }}</span>
-					</span>
-					<span @click="goCreatePaper('manual')" class="bank-tools-btn">
-						<Icon type="md-hand" size="16"/>
-						<span>{{ $t('evaluation.index.manualCreate') }}</span>
-					</span>
-					<span @click="goCreatePaper('import')" class="bank-tools-btn">
-						<Icon type="md-folder" size="16"/>
-						<span>{{ $t('evaluation.index.importCreate') }}</span>
-					</span>
+					<div style="display: flex;" v-show="($access.can('admin.*||exercise-upd') || !isSchool)">
+						<span @click="goCreatePaper('auto')" class="bank-tools-btn">
+							<Icon type="md-cube" size="16"/>
+							<span>{{ $t('evaluation.index.autoCreate') }}</span>
+						</span>
+						<span @click="goCreatePaper('manual')" class="bank-tools-btn">
+							<Icon type="md-hand" size="16"/>
+							<span>{{ $t('evaluation.index.manualCreate') }}</span>
+						</span>
+						<span @click="goCreatePaper('import')" class="bank-tools-btn">
+							<Icon type="md-folder" size="16"/>
+							<span>{{ $t('evaluation.index.importCreate') }}</span>
+						</span>
+					</div>
+					
 				</div>
 				
 				<span @click="goCreateExercise" v-show="currentTab === 'exercise' && ($access.can('admin.*||exercise-upd') || !isSchool)" class="bank-tools-btn">

+ 104 - 60
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/EvaluationList/TotalIndex.vue

@@ -71,36 +71,50 @@
 							<div class="el-filter-item">
 								<span class="el-filter-title">{{ $t("totalAnalysis.condition1") }}:</span>
 								<RadioGroup v-model="filterPeriod" type="button" @on-change="filterPeriodChange">
-									<Radio v-for="(item, index) in schoolData.period" :label="item.name" :key="index">{{ item.name }}</Radio>
+									<Radio v-for="(item, index) in schoolData.period" :label="item.name" :key="index">
+										{{ item.name }}</Radio>
 								</RadioGroup>
 							</div>
 							<div class="el-filter-item">
 								<span class="el-filter-title">{{ $t("totalAnalysis.condition2") }}:</span>
 								<RadioGroup v-model="filterGrade" type="button" @on-change="filterGradeChange">
 									<Radio :label="$t('totalAnalysis.all')">{{ $t('totalAnalysis.all') }}</Radio>
-									<Radio v-for="(item, index) in filterGradeList" :label="item.name" :key="index">{{ item.name }}</Radio>
+									<Radio v-for="(item, index) in filterGradeList" :label="item.name" :key="index">
+										{{ item.name }}</Radio>
+								</RadioGroup>
+							</div>
+							<div class="el-filter-item">
+								<span class="el-filter-title">{{ $t("totalAnalysis.condition8") }}:</span>
+								<RadioGroup v-model="filterYear" type="button" @on-change="filterYearChange">
+									<Radio :label="$t('totalAnalysis.all')">{{ $t('totalAnalysis.all') }}</Radio>
+									<Radio v-for="(item, index) in filterYearList" :label="item" :key="index">{{ item }}
+									</Radio>
 								</RadioGroup>
 							</div>
 							<div class="el-filter-item">
 								<span class="el-filter-title">{{ $t("totalAnalysis.condition7") }}:</span>
 								<RadioGroup v-model="filterSubject" type="button" @on-change="filterSubjectChange">
 									<Radio :label="$t('totalAnalysis.all')">{{ $t('totalAnalysis.all') }}</Radio>
-									<Radio v-for="(item, index) in filterSubjectList" :label="item.name" :key="index">{{ item.name }}</Radio>
+									<Radio v-for="(item, index) in filterSubjectList" :label="item.name" :key="index">
+										{{ item.name }}</Radio>
 								</RadioGroup>
 							</div>
 							<div class="el-filter-item">
 								<span class="el-filter-title">{{ $t("totalAnalysis.condition4") }}:</span>
 								<RadioGroup v-model="filterType" type="button" @on-change="filterTypeChange">
-									<Radio v-for="(item, index) in filterData.typeList" :label="item.name" :key="index">{{item.name }}</Radio>
+									<Radio v-for="(item, index) in filterData.typeList" :label="item.name" :key="index">
+										{{item.name }}</Radio>
 								</RadioGroup>
 							</div>
 							<div class="el-filter-item">
 								<span class="el-filter-title">{{ $t("totalAnalysis.condition3") }}:</span>
 								<RadioGroup v-model="filterTerm" type="button" @on-change="filterTermChange">
 									<Radio :label="$t('totalAnalysis.all')">{{ $t('totalAnalysis.all') }}</Radio>
-									<Radio v-for="(item, index) in filterTermList" :label="item.name" :key="index">{{ item.name }}</Radio>
+									<Radio v-for="(item, index) in filterTermList" :label="item.name" :key="index">
+										{{ item.name }}</Radio>
 								</RadioGroup>
 							</div>
+
 						</div>
 					</transition>
 					<div class="el-bread">
@@ -216,6 +230,7 @@
 				filterArea: vm.$t('totalAnalysis.all'),
 				filterFeedback: vm.$t('totalAnalysis.all'),
 				filterSubject: vm.$t('totalAnalysis.all'),
+				filterYear: vm.$t('totalAnalysis.all'),
 				schoolData: {
 					name: "",
 					period: []
@@ -229,41 +244,41 @@
 					simulation: vm.$t('totalAnalysis.ti_text7'),
 					normal: vm.$t('totalAnalysis.ti_text8')
 				},
-				typeList: [
-				  {
-				    "name": vm.$t('totalAnalysis.all'),
-				    "key": "all"
-				  },
-				  {
-				    "key": "regular",
-				    "name": vm.$t('totalAnalysis.ti_text6')
-				  },
-				  {
-				    "key": "simulation",
-				    "name": vm.$t('totalAnalysis.ti_text7')
-				  },
-				  {
-				    "key": "normal",
-				    "name": vm.$t('totalAnalysis.ti_text8')
-				  }
+				typeList: [{
+						"name": vm.$t('totalAnalysis.all'),
+						"key": "all"
+					},
+					{
+						"key": "regular",
+						"name": vm.$t('totalAnalysis.ti_text6')
+					},
+					{
+						"key": "simulation",
+						"name": vm.$t('totalAnalysis.ti_text7')
+					},
+					{
+						"key": "normal",
+						"name": vm.$t('totalAnalysis.ti_text8')
+					}
 				],
+				schoolClasses: [],
 			};
 		},
 		created() {
-			
+
 			this.getSchoolInfo();
 			// this.getHomePageData();
 			this.getExamList();
 			// this.filterData =
 		},
 		methods: {
-			goAnswerSheet(){
+			goAnswerSheet() {
 				this.$router.push({
 					name: 'answerSheet',
 					params: {
 						paper: {
-							name:'预设答题卡名称',
-							item:null
+							name: '预设答题卡名称',
+							item: null
 						}
 					}
 				})
@@ -273,31 +288,35 @@
 				this.$store.dispatch("user/getSchoolProfile").then((res) => {
 					let schoolBaseInfo = res.school_base;
 					if (schoolBaseInfo) {
+						this.schoolClasses = res.school_classes
 						this.schoolData = schoolBaseInfo;
-						
+
 						if (schoolBaseInfo.period.length) {
 							this.filterData.periodList = [this.defaultAll].concat(schoolBaseInfo.period);
 							this.filterData.gradeList = [this.defaultAll].concat(schoolBaseInfo.period[0].grades);
 							this.filterData.subjectList = [this.defaultAll].concat(schoolBaseInfo.period[0]
 								.subjects);
 							this.filterData.termList = [this.defaultAll].concat(schoolBaseInfo.period[0]
-							.semesters);
+								.semesters);
 							this.filterData.typeList = this.typeList;
 						}
-						
-						if(sessionStorage.getItem('filterConditions')){
+
+						if (sessionStorage.getItem('filterConditions')) {
 							this.filterConditions = JSON.parse(sessionStorage.getItem('filterConditions'))
 							this.filterPeriod = this.filterConditions.period || this.$t('totalAnalysis.all')
 							this.filterGrade = this.filterConditions.grade || this.$t('totalAnalysis.all')
 							this.filterSubject = this.filterConditions.subject || this.$t('totalAnalysis.all')
-							this.filterType = this.evType[this.filterConditions.type] || this.$t('totalAnalysis.all')
+							this.filterType = this.evType[this.filterConditions.type] || this.$t(
+								'totalAnalysis.all')
 							this.filterTerm = this.filterConditions.term || this.$t('totalAnalysis.all')
+							this.filterYear = this.filterConditions.year || this.$t('totalAnalysis.all')
 						}
 						console.log(this.filterConditions)
 						//默认选中第一个学段
-						if (this.schoolData.period && this.schoolData.period.length && !sessionStorage.getItem('filterConditions')) {
-								this.filterPeriod = this.schoolData.period[0].name
-								this.filterPeriodChange()
+						if (this.schoolData.period && this.schoolData.period.length && !sessionStorage.getItem(
+								'filterConditions')) {
+							this.filterPeriod = this.schoolData.period[0].name
+							this.filterPeriodChange()
 						}
 					}
 				});
@@ -345,7 +364,7 @@
 							this.searchList = this.examList.length ? this.examList.map((item) => item.name) : []
 							this.$store.commit("updateExamList", res.examInfo);
 							this.isLoadingList = false;
-							
+
 							this.doFilter()
 						} else {
 							this$Message.error('API ERROR!')
@@ -354,7 +373,7 @@
 				)
 			},
 
-			
+
 
 			handleSearch() {
 				let that = this;
@@ -409,6 +428,10 @@
 						this.filterSubject = this.$t('totalAnalysis.all');
 						this.filterConditions.subject = null;
 						break;
+					case "year":
+						this.filterYear = this.$t('totalAnalysis.all');
+						this.filterConditions.year = null;
+						break;
 					default:
 						break;
 				}
@@ -418,16 +441,17 @@
 			},
 
 			filterPeriodChange() {
-				this.filterConditions.period = this.filterPeriod === this.$t('totalAnalysis.all') ? null : this.filterPeriod;
+				this.filterConditions.period = this.filterPeriod === this.$t('totalAnalysis.all') ? null : this
+					.filterPeriod;
 				// 切换学科后年级会变化,需要初始化年级状态 默认选中全部
 				if (this.filterGradeList && this.filterGradeList.length) {
-				    this.filterGrade = this.$t('totalAnalysis.all')
-				    this.filterGradeChange()
+					this.filterGrade = this.$t('totalAnalysis.all')
+					this.filterGradeChange()
 				}
 				// 切换学科后学科会变化,需要初始化学科状态 默认选中全部
 				if (this.filterSubjectList && this.filterSubjectList.length) {
-				    this.filterSubject = this.$t('totalAnalysis.all')
-				    this.filterSubjectChange()
+					this.filterSubject = this.$t('totalAnalysis.all')
+					this.filterSubjectChange()
 				}
 				this.doFilter();
 			},
@@ -436,6 +460,11 @@
 					this.filterGrade === this.$t('totalAnalysis.all') ? null : this.filterGrade;
 				this.doFilter();
 			},
+			filterYearChange() {
+				this.filterConditions.year =
+					this.filterYear === this.$t('totalAnalysis.all') ? null : this.filterYear;
+				this.doFilter();
+			},
 			filterTermChange() {
 				this.filterConditions.term =
 					this.filterTerm === this.$t('totalAnalysis.all') ? null : this.filterTerm;
@@ -464,16 +493,17 @@
 			},
 
 			doFilter() {
-				sessionStorage.setItem('filterConditions',JSON.stringify(this.filterConditions))
+				sessionStorage.setItem('filterConditions', JSON.stringify(this.filterConditions))
 				// 将条件转换成数组便于渲染
 				this.filterList = this.objToArr(this.filterConditions);
 				this.originList.forEach(item => {
-					item.term = this.compareTerm(this.getTermRange(this.filterPeriod),this.$tools.formatTime(item.createTime,'MM-dd').split('-'))
+					item.term = this.compareTerm(this.getTermRange(this.filterPeriod), this.$tools.formatTime(item
+						.createTime, 'MM-dd').split('-'))
 				})
 				// 根据条件过滤所有的测验数据
 				this.examList = this.originList.filter((item) => {
 					return (
-						item.period.name.indexOf(this.filterConditions.period || "") >
+						JSON.stringify(item.period.name).indexOf(this.filterConditions.period || "") >
 						-1 &&
 						JSON.stringify(item.grades).indexOf(this.filterConditions.grade || "") >
 						-1 &&
@@ -482,36 +512,46 @@
 						item.type.indexOf(this.filterConditions.type || "") >
 						-1 &&
 						item.term.indexOf(this.filterConditions.term || "") >
+						-1 &&
+						JSON.stringify(this.getReleaseYear(item.createTime)).indexOf(this.filterConditions
+							.year || "") >
 						-1
 					);
 				});
 			},
-			
+
+			getReleaseYear(timestamp) {
+				return new Date(timestamp).getFullYear()
+			},
+
 			/* 获取当前学段学期时间范围 */
-			getTermRange(period){
+			getTermRange(period) {
 				let schoolBase = this.$store.state.user.schoolProfile.school_base
 				let curSemesters = schoolBase.period.filter(i => i.name === this.filterPeriod)[0].semesters
-				let range  = [] 
+				let range = []
 				for (var i = 0; i < curSemesters.length - 1; i++) {
-					range.push([[+curSemesters[i].month,+curSemesters[i].day],[+curSemesters[i + 1].month,+curSemesters[i + 1].day]])
+					range.push([
+						[+curSemesters[i].month, +curSemesters[i].day],
+						[+curSemesters[i + 1].month, +curSemesters[i + 1].day]
+					])
 				}
 				return range
 			},
-			
+
 			/* 对比评测时间和学期分界点时间 */
-			compareTerm(range,val){
+			compareTerm(range, val) {
 				let schoolBase = this.$store.state.user.schoolProfile.school_base
 				let curSemesters = schoolBase.period.filter(i => i.name === this.filterPeriod)[0].semesters
 				for (var i = 0; i < range.length; i++) {
-					if(this.tranNum(val) >= this.tranNum(range[i][0]) && this.tranNum(val) < this.tranNum(range[i][1])){
+					if (this.tranNum(val) >= this.tranNum(range[i][0]) && this.tranNum(val) < this.tranNum(range[i][1])) {
 						return curSemesters[i].name
 					}
 				}
 				return curSemesters[curSemesters.length - 1].name
 			},
-			
-			tranNum(val){
-				return Number((Number(val[0])) + '' +  (+val[1] > 10 ? +val[1] : '0' + (+val[1]))) 
+
+			tranNum(val) {
+				return Number((Number(val[0])) + '' + (+val[1] > 10 ? +val[1] : '0' + (+val[1])))
 			},
 
 			objToArr(obj) {
@@ -535,7 +575,7 @@
 
 			async handleChooseExam(item, index) {
 				this.isLoadingList = true
-				try{
+				try {
 					let examSummary = await this.getExamSummary(item)
 					this.$store.commit('clearAnalysis', null)
 					this.$store.dispatch('getAnalysisJson', {
@@ -553,11 +593,11 @@
 						this.$Message.error(this.$t('totalAnalysis.noData'))
 						this.isLoadingList = false
 					})
-				}catch(e){
+				} catch (e) {
 					this.isLoadingList = false
 					this.$Message.error('API ERROR!')
 				}
-				
+
 			},
 
 			/* 获取当前点击评测的详情数据 */
@@ -585,13 +625,14 @@
 			if (this.$route.params.tabName) {
 				this.tabName = this.$route.params.tabName;
 			}
-			
-			
+
+
 		},
 		computed: {
 			getJoinRate() {
 				return (item) => {
-					return item.stuCount === 0 ? 0 : ((item.stuCount - item.lostStu.length) / item.stuCount).toFixed(2) * 100 + "%";
+					return item.stuCount === 0 ? 0 : ((item.stuCount - item.lostStu.length) / item.stuCount).toFixed(
+						2) * 100 + "%";
 				};
 			},
 			filterGradeList() {
@@ -611,6 +652,9 @@
 					return item.name == this.filterConditions.period
 				})
 				return res ? res.semesters : []
+			},
+			filterYearList() {
+				return ['2018', '2019', '2020', '2021']
 			}
 		},
 		watch: {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/teachcontent/index.less

@@ -514,7 +514,7 @@
     margin-left: 10px;
     margin-top: 15px;
 }
-.filter-wrap{
+.content-filter-wrap{
     position: absolute;
     left: 50%;
     display: flex;

+ 1 - 1
TEAMModelOS/ClientApp/src/view/teachcontent/index.vue

@@ -82,7 +82,7 @@
                 <!--筛选、操作域-->
                 <div class="content-file-filter">
                     <ResBelong class="pd-filter-wrap" v-show="routerScope == 'school'" @pd-change="(data)=>{filterPeriod = data}"></ResBelong>
-                    <div class="filter-wrap">
+                    <div class="content-filter-wrap">
                         <Input v-model="keyWord" search size="small" :placeholder="$t('teachContent.searchText')" class="key-word-search" @on-change="searchKeyWord" @on-search="searchKeyWord" />
                         <CheckboxGroup v-model="extFilter"  @on-change="filterFileByExtension">
                             <Checkbox :label="item" v-for="(item ,index) in extensions" :key="index">