|
|
@@ -23,6 +23,15 @@
|
|
|
<el-button :disabled="!canBtnClick" type="primary" size="medium"
|
|
|
@click="downloadWrongQuestions(1)">下载个性化提升手册</el-button>
|
|
|
</template>
|
|
|
+ <template v-if="isShowExportBtns">
|
|
|
+ <el-button size="medium" @click="ExportQuestions" type="primary" class="export_btn">
|
|
|
+ <i class="iconfont icon_export"></i> 导出精准提升试题
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <el-button v-if="showOneStudOneCase && activeBtn === pathFourth" size="medium" type="primary"
|
|
|
+ @click="EditOneStudOneCase" style="width: 96px;">{{
|
|
|
+ !isEditOneStudOneCase ? `${stuCaseIsEdited ? '编辑' : '开始编辑'}` : `${stuCaseIsEdited ? '重新提交' : '提交'}`
|
|
|
+ }}</el-button>
|
|
|
<!-- <el-button v-if="isShowPadfBtn" style="margin-left: 10px;" size="medium" type="primary" :loading="stuPdfLoading" @click="StuDownloadPDF">下载PDF</el-button> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -35,20 +44,30 @@
|
|
|
<div class="left">
|
|
|
<button class="mm_btn mb_10" :class="{ active: activeBtn === pathOne }"
|
|
|
@click="toPage(pathOne)">成绩分析</button>
|
|
|
+ <!-- v-if="isShowKnowledgeButtons" -->
|
|
|
+ <template v-if="!isTotalScore">
|
|
|
+ <button class="mm_btn mb_10" :class="{ active: activeBtn === pathTwo }"
|
|
|
+ @click="toPage(pathTwo)">举一反三</button>
|
|
|
|
|
|
- <button v-if="isShowKnowledgeButtons" class="mm_btn mb_10"
|
|
|
- :class="{ active: activeBtn === pathTwo }" @click="toPage(pathTwo)">举一反三</button>
|
|
|
- <button class="mm_btn mb_10" :class="{ active: activeBtn === pathThree }"
|
|
|
+ <button class="mm_btn mb_10" :class="{ active: activeBtn === pathThree }"
|
|
|
@click="toPage(pathThree)">个人画像</button>
|
|
|
+ </template>
|
|
|
+ <button class="mm_btn mb_10" v-if="showOneStudOneCase"
|
|
|
+ :class="{ active: activeBtn === pathFourth }"
|
|
|
+ @click="toPage(pathFourth)">一生一案</button>
|
|
|
+ <button class="mm_btn" :class="{ active: activeBtn === pathFive }"
|
|
|
+ @click="toPage(pathFive)">报告打印</button>
|
|
|
</div>
|
|
|
-
|
|
|
+ <!-- 520929546006958081 -->
|
|
|
<div class="right">
|
|
|
- <div class="page_filter" ref="filterContent">
|
|
|
+ <div class="page_filter" ref="filterContent"
|
|
|
+ v-if="activeBtn != pathFourth && activeBtn != pathFive">
|
|
|
<FiltersItem :filtersData="filteredFilterData" @selectItem="ChangeFilters">
|
|
|
</FiltersItem>
|
|
|
</div>
|
|
|
<router-view ref="child" @isPdfDataLoadEnd="isPdfDataLoadEnd"
|
|
|
- @closePdfLoading="closePdfLoading"></router-view>
|
|
|
+ @closePdfLoading="closePdfLoading"
|
|
|
+ @StudentCaseIsEdited="StudentCaseIsEdited"></router-view>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -93,15 +112,14 @@ export default {
|
|
|
filteredFilterData() {
|
|
|
// 检查当前是否在个人画像页面
|
|
|
const isPersonalProfilePage = this.$route.path === '/studentAnalysisReport/reportDetails/personalProfile';
|
|
|
-
|
|
|
- if (!isPersonalProfilePage) {
|
|
|
+ const isPersonalWrongQuestions = this.$route.path === this.pathTwo;
|
|
|
+ if (!isPersonalProfilePage && !isPersonalWrongQuestions) {
|
|
|
// 非个人画像页面,返回原始数据
|
|
|
return this.filterData;
|
|
|
}
|
|
|
-
|
|
|
// 深拷贝原始数据,避免直接修改
|
|
|
const updatedFilterData = JSON.parse(JSON.stringify(this.filterData));
|
|
|
-
|
|
|
+
|
|
|
// 遍历筛选数据,找到科目名称筛选项
|
|
|
updatedFilterData.forEach(filterItem => {
|
|
|
if (filterItem.type === 'subjectName') {
|
|
|
@@ -109,17 +127,21 @@ export default {
|
|
|
filterItem.list = filterItem.list.filter(item => item.isTotal !== 1 && item.subjectGroupType !== 1);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
return updatedFilterData;
|
|
|
},
|
|
|
canBtnClick() {
|
|
|
return this.$store.state.question.canDownloanBtnClick;
|
|
|
+ },
|
|
|
+ showOneStudOneCase() {//是否开启了一生一案显示
|
|
|
+ return this.$store.state.report.examSelectItem.oneStudOneCase
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
isShowFilter: false, //是否显示筛选条件
|
|
|
isShowBtn: false, //是否显示下载按钮
|
|
|
+ isShowExportBtns: false,//是否显示导出精准提升试题按钮
|
|
|
isShowPadfBtn: false,//是否显示下载pdf按钮
|
|
|
isPdfLoadEnd: false,//报告册数据是否加载完成
|
|
|
filterData: [
|
|
|
@@ -135,9 +157,13 @@ export default {
|
|
|
pathOne: '/studentAnalysisReport/reportDetails/scrolReport',
|
|
|
pathTwo: '/studentAnalysisReport/reportDetails/personalWrongQuestions',
|
|
|
pathThree: '/studentAnalysisReport/reportDetails/personalProfile',//个人画像
|
|
|
+ pathFourth: '/studentAnalysisReport/reportDetails/studentCase',//一生一案
|
|
|
+ pathFive: '/studentAnalysisReport/reportDetails/studentReport',//一生一案
|
|
|
isLianXiao: false,//是否联校
|
|
|
stuPdfLoading: false,
|
|
|
schoolId: this.$store.state.user.userInfo.id,
|
|
|
+ isEditOneStudOneCase: false,//是否编辑
|
|
|
+ stuCaseIsEdited: true,//判断一生一案是否是已经状态
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -244,6 +270,13 @@ export default {
|
|
|
this.$refs.child.GetScrollTop(scrollTop);
|
|
|
}
|
|
|
}
|
|
|
+ if (path === '/studentAnalysisReport/reportDetails/personalProfile') {
|
|
|
+ this.isShowExportBtns = (scrollTop >= 150);
|
|
|
+ if (this.$refs.child && typeof this.$refs.child.GetScrollTop === 'function') {
|
|
|
+ this.$refs.child.GetScrollTop(scrollTop);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//重置滚动条
|
|
|
ResetScroll() {
|
|
|
@@ -257,7 +290,10 @@ export default {
|
|
|
downloadWrongQuestions(type) {
|
|
|
this.$store.commit("question/SET_VARIANTION", type);
|
|
|
},
|
|
|
-
|
|
|
+ //导出精准提升试题
|
|
|
+ ExportQuestions() {
|
|
|
+ this.$refs.child.ExportQuestions();
|
|
|
+ },
|
|
|
//返回按钮点击
|
|
|
GoBack() {
|
|
|
const schoolType = sessionStorage.getItem('schoolType');
|
|
|
@@ -286,21 +322,21 @@ export default {
|
|
|
handleFilterDataUpdate() {
|
|
|
// 检查当前是否在个人画像页面
|
|
|
const isPersonalProfilePage = this.$route.path === '/studentAnalysisReport/reportDetails/personalProfile';
|
|
|
-
|
|
|
+
|
|
|
if (isPersonalProfilePage) {
|
|
|
// 深拷贝原始数据,避免直接修改props
|
|
|
const updatedFilterData = JSON.parse(JSON.stringify(this.filterData));
|
|
|
-
|
|
|
+
|
|
|
// 遍历筛选数据,找到科目名称筛选项
|
|
|
updatedFilterData.forEach((filterItem, index) => {
|
|
|
if (filterItem.type === 'subjectName') {
|
|
|
// 过滤掉总分选项(isTotal为1的选项)
|
|
|
const nonTotalItems = filterItem.list.filter(item => item.isTotal !== 1 && item.subjectGroupType !== 1);
|
|
|
-
|
|
|
+
|
|
|
// 检查当前选中的是否是总分选项
|
|
|
const currentSelected = filterItem.list.find(item => item.value === filterItem.value);
|
|
|
const isCurrentTotal = currentSelected && (currentSelected.isTotal === 1 || currentSelected.subjectGroupType === 1);
|
|
|
-
|
|
|
+
|
|
|
// 如果当前选中的是总分选项且有其他选项,切换到第一个非总分选项
|
|
|
if (isCurrentTotal && nonTotalItems.length > 0) {
|
|
|
this.ChangeFilters({ index, value: nonTotalItems[0].value });
|
|
|
@@ -309,6 +345,14 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ //编辑一生一案
|
|
|
+ EditOneStudOneCase() {
|
|
|
+ this.isEditOneStudOneCase = !this.isEditOneStudOneCase;
|
|
|
+ this.$refs.child.EditOneStudOneCase(this.isEditOneStudOneCase);
|
|
|
+ },
|
|
|
+ StudentCaseIsEdited(id) {
|
|
|
+ this.stuCaseIsEdited = id ? true : false;
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
'$route'(to, from) {
|
|
|
@@ -365,4 +409,34 @@ export default {
|
|
|
width: calc(100% - 180px);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.export_btn {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 5px;
|
|
|
+ width: 152px;
|
|
|
+ height: 36px;
|
|
|
+ line-height: 36px;
|
|
|
+ background: #2E64FA;
|
|
|
+ color: white;
|
|
|
+ border: none;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ padding: 0;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #5883fb;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:active {
|
|
|
+ background: #2E64FA;
|
|
|
+ }
|
|
|
+
|
|
|
+ .iconfont {
|
|
|
+ width: 14px;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|