|
@@ -77,14 +77,14 @@
|
|
<div class="el-filter-item">
|
|
<div class="el-filter-item">
|
|
<span class="el-filter-title">{{ $t("totalAnalysis.condition2") }}:</span>
|
|
<span class="el-filter-title">{{ $t("totalAnalysis.condition2") }}:</span>
|
|
<RadioGroup v-model="filterGrade" type="button" @on-change="filterGradeChange">
|
|
<RadioGroup v-model="filterGrade" type="button" @on-change="filterGradeChange">
|
|
- <Radio label="全部">全部</Radio>
|
|
|
|
|
|
+ <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>
|
|
</RadioGroup>
|
|
</div>
|
|
</div>
|
|
<div class="el-filter-item">
|
|
<div class="el-filter-item">
|
|
<span class="el-filter-title">{{ $t("totalAnalysis.condition7") }}:</span>
|
|
<span class="el-filter-title">{{ $t("totalAnalysis.condition7") }}:</span>
|
|
<RadioGroup v-model="filterSubject" type="button" @on-change="filterSubjectChange">
|
|
<RadioGroup v-model="filterSubject" type="button" @on-change="filterSubjectChange">
|
|
- <Radio label="全部">全部</Radio>
|
|
|
|
|
|
+ <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>
|
|
</RadioGroup>
|
|
</div>
|
|
</div>
|
|
@@ -100,22 +100,6 @@
|
|
<Radio v-for="(item, index) in filterData.termList" :label="item.name" :key="index">{{ item.name }}</Radio>
|
|
<Radio v-for="(item, index) in filterData.termList" :label="item.name" :key="index">{{ item.name }}</Radio>
|
|
</RadioGroup>
|
|
</RadioGroup>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <!-- 考试范围暂未实际有效字段 -->
|
|
|
|
- <!-- <div class="el-filter-item">
|
|
|
|
- <span class="el-filter-title">{{ $t("totalAnalysis.condition5") }}:</span>
|
|
|
|
- <RadioGroup v-model="filterArea" type="button" @on-change="filterAreaChange">
|
|
|
|
- <Radio v-for="(item, index) in filterData.areaList" :label="item.name" :key="index">{{ item.name }}</Radio>
|
|
|
|
- </RadioGroup>
|
|
|
|
- </div> -->
|
|
|
|
- <!-- 评测来源暂未实际有效字段 -->
|
|
|
|
- <!-- <div class="el-filter-item">
|
|
|
|
- <span class="el-filter-title">{{ $t("totalAnalysis.condition6") }}:</span>
|
|
|
|
- <RadioGroup v-model="filterFeedback" type="button" @on-change="filterFeedbackChange">
|
|
|
|
- <Radio v-for="(item, index) in filterData.feedbackList" :label="item.name" :key="index">{{ item.name }}</Radio>
|
|
|
|
- </RadioGroup>
|
|
|
|
- </div> -->
|
|
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
</transition>
|
|
<div class="el-bread">
|
|
<div class="el-bread">
|
|
@@ -160,11 +144,15 @@
|
|
<!-- 暂无参与率数据 -->
|
|
<!-- 暂无参与率数据 -->
|
|
{{ getJoinRate(item) }}
|
|
{{ getJoinRate(item) }}
|
|
</span>
|
|
</span>
|
|
|
|
+ <span>{{ $t("totalAnalysis.sca_chart_text1") }}:
|
|
|
|
+ <!-- 得分率数据 -->
|
|
|
|
+ <!-- {{ item.score.toFixed(2) + '%' }} -->
|
|
|
|
+ </span>
|
|
<!-- <span>{{ $t("totalAnalysis.echarts_text15") }}:
|
|
<!-- <span>{{ $t("totalAnalysis.echarts_text15") }}:
|
|
</span> -->
|
|
</span> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <Page size="small" />
|
|
|
|
|
|
+ <!-- <Page size="small" /> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -187,7 +175,7 @@
|
|
BaseSubjectBar,
|
|
BaseSubjectBar,
|
|
BaseClassBar,
|
|
BaseClassBar,
|
|
},
|
|
},
|
|
- data() {
|
|
|
|
|
|
+ data(vm) {
|
|
return {
|
|
return {
|
|
currentPanel: "",
|
|
currentPanel: "",
|
|
isLoadingList: false,
|
|
isLoadingList: false,
|
|
@@ -199,7 +187,6 @@
|
|
classList: new Array(11).fill("1"),
|
|
classList: new Array(11).fill("1"),
|
|
gradeList: [],
|
|
gradeList: [],
|
|
geniusLineData: null,
|
|
geniusLineData: null,
|
|
- semesterList: ["2019上学期", "2019下学期"],
|
|
|
|
activeGradeIndex: null,
|
|
activeGradeIndex: null,
|
|
arrowLeft: 0,
|
|
arrowLeft: 0,
|
|
selectSemester: 0,
|
|
selectSemester: 0,
|
|
@@ -217,29 +204,48 @@
|
|
filterData: {},
|
|
filterData: {},
|
|
searchValue: "",
|
|
searchValue: "",
|
|
searchList: [],
|
|
searchList: [],
|
|
- filterPeriod: "全部",
|
|
|
|
- filterGrade: "全部",
|
|
|
|
- filterTerm: "全部",
|
|
|
|
- filterType: "全部",
|
|
|
|
- filterArea: "全部",
|
|
|
|
- filterFeedback: "全部",
|
|
|
|
- filterSubject: "全部",
|
|
|
|
|
|
+ filterPeriod: vm.$t('totalAnalysis.all'),
|
|
|
|
+ filterGrade: vm.$t('totalAnalysis.all'),
|
|
|
|
+ filterTerm: vm.$t('totalAnalysis.all'),
|
|
|
|
+ filterType: vm.$t('totalAnalysis.all'),
|
|
|
|
+ filterArea: vm.$t('totalAnalysis.all'),
|
|
|
|
+ filterFeedback: vm.$t('totalAnalysis.all'),
|
|
|
|
+ filterSubject: vm.$t('totalAnalysis.all'),
|
|
schoolData: {
|
|
schoolData: {
|
|
name: "",
|
|
name: "",
|
|
period: []
|
|
period: []
|
|
},
|
|
},
|
|
defaultAll: {
|
|
defaultAll: {
|
|
- name: '全部',
|
|
|
|
|
|
+ name: vm.$t('totalAnalysis.all'),
|
|
id: '0'
|
|
id: '0'
|
|
},
|
|
},
|
|
evType: {
|
|
evType: {
|
|
- regular: '正规考',
|
|
|
|
- simulation: '模拟考',
|
|
|
|
- normal: '普通考'
|
|
|
|
- }
|
|
|
|
|
|
+ regular: vm.$t('totalAnalysis.ti_text6'),
|
|
|
|
+ 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')
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+
|
|
this.getSchoolInfo();
|
|
this.getSchoolInfo();
|
|
// this.getHomePageData();
|
|
// this.getHomePageData();
|
|
this.getExamList();
|
|
this.getExamList();
|
|
@@ -252,18 +258,7 @@
|
|
let schoolBaseInfo = res.school_base;
|
|
let schoolBaseInfo = res.school_base;
|
|
if (schoolBaseInfo) {
|
|
if (schoolBaseInfo) {
|
|
this.schoolData = schoolBaseInfo;
|
|
this.schoolData = schoolBaseInfo;
|
|
- //默认选中第一个学段
|
|
|
|
- if (this.schoolData.period && this.schoolData.period.length) {
|
|
|
|
- this.filterPeriod = this.schoolData.period[0].name
|
|
|
|
- this.filterPeriodChange()
|
|
|
|
- }
|
|
|
|
- //年级和学科默认选中全部
|
|
|
|
- // if (this.filterConditions.period && this.schoolData.period[0].grades.length) {
|
|
|
|
- // this.filterGrade = this.schoolData.period[0].grades[0].name
|
|
|
|
- // this.filterGradeChange()
|
|
|
|
- // }
|
|
|
|
- console.log(this.filterConditions)
|
|
|
|
- let filterJson = this.$store.state.totalAnalysis.filterData
|
|
|
|
|
|
+
|
|
if (schoolBaseInfo.period.length) {
|
|
if (schoolBaseInfo.period.length) {
|
|
this.filterData.periodList = [this.defaultAll].concat(schoolBaseInfo.period);
|
|
this.filterData.periodList = [this.defaultAll].concat(schoolBaseInfo.period);
|
|
this.filterData.gradeList = [this.defaultAll].concat(schoolBaseInfo.period[0].grades);
|
|
this.filterData.gradeList = [this.defaultAll].concat(schoolBaseInfo.period[0].grades);
|
|
@@ -271,9 +266,22 @@
|
|
.subjects);
|
|
.subjects);
|
|
this.filterData.termList = [this.defaultAll].concat(schoolBaseInfo.period[0]
|
|
this.filterData.termList = [this.defaultAll].concat(schoolBaseInfo.period[0]
|
|
.semesters);
|
|
.semesters);
|
|
- this.filterData.typeList = filterJson.typeList;
|
|
|
|
- this.filterData.areaList = filterJson.areaList;
|
|
|
|
- this.filterData.feedbackList = filterJson.feedbackList;
|
|
|
|
|
|
+ this.filterData.typeList = this.typeList;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(localStorage.getItem('filterConditions')){
|
|
|
|
+ this.filterConditions = JSON.parse(localStorage.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.filterTerm = this.filterConditions.term || this.$t('totalAnalysis.all')
|
|
|
|
+ }
|
|
|
|
+ console.log(this.filterConditions)
|
|
|
|
+ //默认选中第一个学段
|
|
|
|
+ if (this.schoolData.period && this.schoolData.period.length && !localStorage.getItem('filterConditions')) {
|
|
|
|
+ this.filterPeriod = this.schoolData.period[0].name
|
|
|
|
+ this.filterPeriodChange()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -292,7 +300,7 @@
|
|
this.gradeList = res.result.data;
|
|
this.gradeList = res.result.data;
|
|
this.geniusLineData = res.result.data[0];
|
|
this.geniusLineData = res.result.data[0];
|
|
} else {
|
|
} else {
|
|
- this.$Message.warning("暂无有效数据返回");
|
|
|
|
|
|
+ this.$Message.warning(this.$t('totalAnalysis.noData'));
|
|
}
|
|
}
|
|
this.isLoadingList = false;
|
|
this.isLoadingList = false;
|
|
// this.$refs.geniusLine.dataLoading = false
|
|
// this.$refs.geniusLine.dataLoading = false
|
|
@@ -300,7 +308,7 @@
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
console.log(err);
|
|
console.log(err);
|
|
this.isLoadingList = false;
|
|
this.isLoadingList = false;
|
|
- this.$Message.error("服务器繁忙,请稍后重试!");
|
|
|
|
|
|
+ this.$Message.error(this.$t('http.error500'));
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -321,9 +329,7 @@
|
|
this.searchList = this.examList.length ? this.examList.map((item) => item.name) : []
|
|
this.searchList = this.examList.length ? this.examList.map((item) => item.name) : []
|
|
this.$store.commit("updateExamList", res.examInfo);
|
|
this.$store.commit("updateExamList", res.examInfo);
|
|
this.isLoadingList = false;
|
|
this.isLoadingList = false;
|
|
- // setTimeout(() => {
|
|
|
|
- // this.doFilter()
|
|
|
|
- // }, 2000);
|
|
|
|
|
|
+
|
|
this.doFilter()
|
|
this.doFilter()
|
|
} else {
|
|
} else {
|
|
this$Message.error('API ERROR!')
|
|
this$Message.error('API ERROR!')
|
|
@@ -364,27 +370,27 @@
|
|
// this.filterConditions.period = null;
|
|
// this.filterConditions.period = null;
|
|
break;
|
|
break;
|
|
case "grade":
|
|
case "grade":
|
|
- this.filterGrade = "全部";
|
|
|
|
|
|
+ this.filterGrade = this.$t('totalAnalysis.all');
|
|
this.filterConditions.grade = null;
|
|
this.filterConditions.grade = null;
|
|
break;
|
|
break;
|
|
case "term":
|
|
case "term":
|
|
- this.filterTerm = "全部";
|
|
|
|
|
|
+ this.filterTerm = this.$t('totalAnalysis.all');
|
|
this.filterConditions.term = null;
|
|
this.filterConditions.term = null;
|
|
break;
|
|
break;
|
|
case "type":
|
|
case "type":
|
|
- this.filterType = "全部";
|
|
|
|
|
|
+ this.filterType = this.$t('totalAnalysis.all');
|
|
this.filterConditions.type = null;
|
|
this.filterConditions.type = null;
|
|
break;
|
|
break;
|
|
case "area":
|
|
case "area":
|
|
- this.filterArea = "全部";
|
|
|
|
|
|
+ this.filterArea = this.$t('totalAnalysis.all');
|
|
this.filterConditions.area = null;
|
|
this.filterConditions.area = null;
|
|
break;
|
|
break;
|
|
case "feedback":
|
|
case "feedback":
|
|
- this.filterFeedback = "全部";
|
|
|
|
|
|
+ this.filterFeedback = this.$t('totalAnalysis.all');
|
|
this.filterConditions.feedback = null;
|
|
this.filterConditions.feedback = null;
|
|
break;
|
|
break;
|
|
case "subject":
|
|
case "subject":
|
|
- this.filterSubject = "全部";
|
|
|
|
|
|
+ this.filterSubject = this.$t('totalAnalysis.all');
|
|
this.filterConditions.subject = null;
|
|
this.filterConditions.subject = null;
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
@@ -396,27 +402,27 @@
|
|
},
|
|
},
|
|
|
|
|
|
filterPeriodChange() {
|
|
filterPeriodChange() {
|
|
- this.filterConditions.period = this.filterPeriod === "全部" ? null : this.filterPeriod;
|
|
|
|
|
|
+ this.filterConditions.period = this.filterPeriod === this.$t('totalAnalysis.all') ? null : this.filterPeriod;
|
|
// 切换学科后年级会变化,需要初始化年级状态 默认选中全部
|
|
// 切换学科后年级会变化,需要初始化年级状态 默认选中全部
|
|
if (this.filterGradeList && this.filterGradeList.length) {
|
|
if (this.filterGradeList && this.filterGradeList.length) {
|
|
- this.filterGrade = "全部"
|
|
|
|
|
|
+ this.filterGrade = this.$t('totalAnalysis.all')
|
|
this.filterGradeChange()
|
|
this.filterGradeChange()
|
|
}
|
|
}
|
|
// 切换学科后学科会变化,需要初始化学科状态 默认选中全部
|
|
// 切换学科后学科会变化,需要初始化学科状态 默认选中全部
|
|
if (this.filterSubjectList && this.filterSubjectList.length) {
|
|
if (this.filterSubjectList && this.filterSubjectList.length) {
|
|
- this.filterSubject = "全部"
|
|
|
|
|
|
+ this.filterSubject = this.$t('totalAnalysis.all')
|
|
this.filterSubjectChange()
|
|
this.filterSubjectChange()
|
|
}
|
|
}
|
|
this.doFilter();
|
|
this.doFilter();
|
|
},
|
|
},
|
|
filterGradeChange() {
|
|
filterGradeChange() {
|
|
this.filterConditions.grade =
|
|
this.filterConditions.grade =
|
|
- this.filterGrade === "全部" ? null : this.filterGrade;
|
|
|
|
|
|
+ this.filterGrade === this.$t('totalAnalysis.all') ? null : this.filterGrade;
|
|
this.doFilter();
|
|
this.doFilter();
|
|
},
|
|
},
|
|
filterTermChange() {
|
|
filterTermChange() {
|
|
this.filterConditions.term =
|
|
this.filterConditions.term =
|
|
- this.filterTerm === "全部" ? null : this.filterTerm;
|
|
|
|
|
|
+ this.filterTerm === this.$t('totalAnalysis.all') ? null : this.filterTerm;
|
|
this.doFilter();
|
|
this.doFilter();
|
|
},
|
|
},
|
|
filterTypeChange() {
|
|
filterTypeChange() {
|
|
@@ -424,7 +430,7 @@
|
|
// this.filterConditions.type =
|
|
// this.filterConditions.type =
|
|
// this.filterType === "全部" ? null : this.filterType;
|
|
// this.filterType === "全部" ? null : this.filterType;
|
|
console.log(this.filterType)
|
|
console.log(this.filterType)
|
|
- if (this.filterType === "全部") {
|
|
|
|
|
|
+ if (this.filterType === this.$t('totalAnalysis.all')) {
|
|
this.filterConditions.type = null
|
|
this.filterConditions.type = null
|
|
} else {
|
|
} else {
|
|
let res = this.filterData.typeList.find(item => {
|
|
let res = this.filterData.typeList.find(item => {
|
|
@@ -437,11 +443,12 @@
|
|
|
|
|
|
filterSubjectChange() {
|
|
filterSubjectChange() {
|
|
this.filterConditions.subject =
|
|
this.filterConditions.subject =
|
|
- this.filterSubject === "全部" ? null : this.filterSubject;
|
|
|
|
|
|
+ this.filterSubject === this.$t('totalAnalysis.all') ? null : this.filterSubject;
|
|
this.doFilter();
|
|
this.doFilter();
|
|
},
|
|
},
|
|
|
|
|
|
doFilter() {
|
|
doFilter() {
|
|
|
|
+ localStorage.setItem('filterConditions',JSON.stringify(this.filterConditions))
|
|
// 将条件转换成数组便于渲染
|
|
// 将条件转换成数组便于渲染
|
|
this.filterList = this.objToArr(this.filterConditions);
|
|
this.filterList = this.objToArr(this.filterConditions);
|
|
// 根据条件过滤所有的测验数据
|
|
// 根据条件过滤所有的测验数据
|
|
@@ -480,22 +487,28 @@
|
|
|
|
|
|
async handleChooseExam(item, index) {
|
|
async handleChooseExam(item, index) {
|
|
this.isLoadingList = true
|
|
this.isLoadingList = true
|
|
- let examSummary = await this.getExamSummary(item)
|
|
|
|
- this.$store.commit('clearAnalysis', null)
|
|
|
|
- this.$store.dispatch('getAnalysisJson', {
|
|
|
|
- code: item.code.replace('Exam-', ''),
|
|
|
|
- id: item.id
|
|
|
|
- }).then(res => {
|
|
|
|
- console.log(res)
|
|
|
|
- localStorage.setItem('curExam', JSON.stringify(examSummary))
|
|
|
|
- this.isLoadingList = false
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/total"
|
|
|
|
- });
|
|
|
|
- }).catch(err => {
|
|
|
|
- this.$Message.error('该评测班级数据获取异常,请稍后再试!')
|
|
|
|
|
|
+ try{
|
|
|
|
+ let examSummary = await this.getExamSummary(item)
|
|
|
|
+ this.$store.commit('clearAnalysis', null)
|
|
|
|
+ this.$store.dispatch('getAnalysisJson', {
|
|
|
|
+ code: item.code.replace('Exam-', ''),
|
|
|
|
+ id: item.id
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ localStorage.setItem('curExam', JSON.stringify(examSummary))
|
|
|
|
+ this.isLoadingList = false
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/total"
|
|
|
|
+ });
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ this.$Message.error(this.$t('totalAnalysis.noData'))
|
|
|
|
+ this.isLoadingList = false
|
|
|
|
+ })
|
|
|
|
+ }catch(e){
|
|
this.isLoadingList = false
|
|
this.isLoadingList = false
|
|
- })
|
|
|
|
|
|
+ this.$Message.error('API ERROR!')
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
/* 获取当前点击评测的详情数据 */
|
|
/* 获取当前点击评测的详情数据 */
|
|
@@ -514,7 +527,6 @@
|
|
},
|
|
},
|
|
err => {
|
|
err => {
|
|
j(err)
|
|
j(err)
|
|
- this.$Message.error('API ERROR!')
|
|
|
|
}
|
|
}
|
|
)
|
|
)
|
|
})
|
|
})
|
|
@@ -524,11 +536,13 @@
|
|
if (this.$route.params.tabName) {
|
|
if (this.$route.params.tabName) {
|
|
this.tabName = this.$route.params.tabName;
|
|
this.tabName = this.$route.params.tabName;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
getJoinRate() {
|
|
getJoinRate() {
|
|
return (item) => {
|
|
return (item) => {
|
|
- return (item.stuCount / item.stuCount).toFixed(2) * 100 + "%";
|
|
|
|
|
|
+ return item.stuCount === 0 ? 0 : (item.stuCount / item.stuCount).toFixed(2) * 100 + "%";
|
|
};
|
|
};
|
|
},
|
|
},
|
|
filterGradeList() {
|
|
filterGradeList() {
|