[考试分析] - 优化显示解析

This commit is contained in:
“zouyf” 2024-09-09 16:44:24 +08:00
parent 555960b8bd
commit d1b7101ba5
4 changed files with 92 additions and 45 deletions

View File

@ -47,11 +47,8 @@ export const JYApiListCT = async (_this, name = '高中历史') => {
return []; return [];
} }
let arrCT = [{ let arrCT = [{
label: '不限', label: "不限",
value: { value: 0
"Value": "不限",
"Key": 0
}
}] }]
res.data.forEach(item=> { res.data.forEach(item=> {
if (item.Value === '选择题') { if (item.Value === '选择题') {
@ -59,10 +56,7 @@ export const JYApiListCT = async (_this, name = '高中历史') => {
} }
const tmp = { const tmp = {
label: item.Value, label: item.Value,
value: { value: item.Key,
"Value": item.Value,
"Key": item.Key
}
} }
arrCT.push(tmp); arrCT.push(tmp);
}) })

View File

@ -61,6 +61,7 @@ const showExamAnalyseDrawer = (row) => {
.table-main { .table-main {
width: 100%; width: 100%;
height: 100%; height: 100%;
text-align: left;
.main-title { .main-title {
overflow: hidden; overflow: hidden;
@ -91,9 +92,10 @@ const showExamAnalyseDrawer = (row) => {
padding: 1% 2%; padding: 1% 2%;
border: 2px dotted; border: 2px dotted;
display: flex; display: flex;
text-align: left;
.drawer-main-col{ .drawer-main-col{
padding: 6px 0px; padding: 10px 0px;
} }
} }
</style> </style>

View File

@ -8,7 +8,7 @@
<el-popover placement="top-start" title="真题回顾" trigger="hover" content="勾画、圈点,添加标记等,整理出本课的重点与难点,用于老师讲解和学生自主预习"> <el-popover placement="top-start" title="真题回顾" trigger="hover" content="勾画、圈点,添加标记等,整理出本课的重点与难点,用于老师讲解和学生自主预习">
<template #reference> <template #reference>
<el-button-group> <el-button-group>
<el-button @click="handleTaskView('真题回顾', index)" :type="curTask.viewkey=='真题回顾'?'primary':'default'" round>真题回顾</el-button> <el-button @click="changeTaskView('真题回顾', index)" :type="curTask.viewkey=='真题回顾'?'primary':'default'" round>真题回顾</el-button>
<el-button disabled :type="'default'" plain round ></el-button> <el-button disabled :type="'default'" plain round ></el-button>
</el-button-group> </el-button-group>
</template> </template>
@ -18,7 +18,7 @@
<el-popover disabled placement="top-start" title="考点分析" trigger="hover" content="勾画、圈点,添加标记等,整理出本课的重点与难点,用于老师讲解和学生自主预习"> <el-popover disabled placement="top-start" title="考点分析" trigger="hover" content="勾画、圈点,添加标记等,整理出本课的重点与难点,用于老师讲解和学生自主预习">
<template #reference> <template #reference>
<el-button-group> <el-button-group>
<el-button disabled @click="handleTaskView('考点分析', index)" :type="curTask.viewkey=='考点分析'?'primary':'default'" round>考点分析</el-button> <el-button disabled @click="changeTaskView('考点分析', index)" :type="curTask.viewkey=='考点分析'?'primary':'default'" round>考点分析</el-button>
<el-button disabled :type="'default'" plain round ></el-button> <el-button disabled :type="'default'" plain round ></el-button>
</el-button-group> </el-button-group>
</template> </template>
@ -28,7 +28,7 @@
<el-popover disabled placement="top-start" title="模拟命题" trigger="hover" content="勾画、圈点,添加标记等,整理出本课的重点与难点,用于老师讲解和学生自主预习"> <el-popover disabled placement="top-start" title="模拟命题" trigger="hover" content="勾画、圈点,添加标记等,整理出本课的重点与难点,用于老师讲解和学生自主预习">
<template #reference> <template #reference>
<el-button-group> <el-button-group>
<el-button disabled @click="handleTaskView('模拟命题', index)" :type="curTask.viewkey=='模拟命题'?'primary':'default'" round>模拟命题</el-button> <el-button disabled @click="changeTaskView('模拟命题', index)" :type="curTask.viewkey=='模拟命题'?'primary':'default'" round>模拟命题</el-button>
<el-button disabled :type="'default'" plain round ></el-button> <el-button disabled :type="'default'" plain round ></el-button>
</el-button-group> </el-button-group>
</template> </template>
@ -42,12 +42,12 @@
@change="queryExamQuestionByParams" @change="queryExamQuestionByParams"
> >
<template v-for="(item, index) in listWorkType" :key="index"> <template v-for="(item, index) in listWorkType" :key="index">
<el-option :label="item.label" :value="item.label" /> <el-option :label="item.label" :value="item" />
</template> </template>
</el-select> </el-select>
</div> </div>
<div :style="{'width': (viewportWidth - 400) + 'px','height': (viewportHeight) + 'px','overflow-y': 'auto'}"> <div :style="{'width': (viewportWidth - 400) + 'px','height': (viewportHeight-38) + 'px','overflow-y': 'auto'}">
<examReview <examReview
:loading="loading" :loading="loading"
:listExamQuestion="listExamQuestion" :listExamQuestion="listExamQuestion"
@ -74,13 +74,13 @@ import { ArrowRight } from '@element-plus/icons-vue'
import useResoureStore from '@/views/resource/store' import useResoureStore from '@/views/resource/store'
import ChooseTextbook from '@/components/choose-textbook/index.vue' import ChooseTextbook from '@/components/choose-textbook/index.vue'
import {listEntpcoursework} from '@/api/education/entpcoursework' import {listEntpcoursework, listEntpcourseworkNew} from '@/api/education/entpCourseWork'
import {processExamQuestion} from '@/utils/examQuestion/tool' import {processExamQuestion} from '@/utils/examQuestion/tool'
import { JYApiListCT} from "@/utils/examQuestion/jyeoo" import { JYApiListCT} from "@/utils/examQuestion/jyeoo"
import examReview from './container/examReview.vue' import examReview from './container/examReview.vue'
import pointAnalysis from './container/pointAnalysis.vue' import pointAnalysis from './container/pointAnalysis.vue'
import examMocks from './container/examMocks..vue' import examMocks from './container/examMocks.vue'
const {proxy} = getCurrentInstance(); const {proxy} = getCurrentInstance();
const sourceStore = useResoureStore(); const sourceStore = useResoureStore();
@ -95,14 +95,15 @@ const curTask = reactive({
viewkey: '真题回顾', viewkey: '真题回顾',
}); });
const queryParams = reactive({ const queryParams = reactive({
workType: '不限' workType: {
label: '不限',
value: 0,
},
total: 0,
}); });
const listWorkType = ref([{ const listWorkType = ref([{
label: '不限', label: '不限',
value: { value: 0,
Key: 0,
Value: '不限'
}
}]); }]);
/** /**
@ -121,22 +122,52 @@ const getData = async (data) => {
// 2. // 2.
curNode.value = data.node; curNode.value = data.node;
const queryParams = { //
pageNum: 1, // const params = {
pageSize: 100, // pageNum: 1,
// pageSize: 100,
// workgroup: '1',
// edusubject: curNode.value.edusubject,
// evalid: curNode.value.id,
// orderby: 'concat(worktype,worktag) DESC',
// }
// const res = await listEntpcoursework(params);
// listExamQuestion.value = res.rows;
// +()
const params = {
eid: curNode.value.id,
workgroup: '1', workgroup: '1',
worktype: '不限',
workTypeId: '0',
edusubject: curNode.value.edusubject, edusubject: curNode.value.edusubject,
evalid: curNode.value.id, edustage: curNode.value.edustage,
orderby: 'concat(worktype,worktag) DESC', sectionName: curNode.value.itemtitle,
} }
const res = await listEntpcoursework(queryParams); const res = await listEntpcourseworkNew(params);
listExamQuestion.value = res.rows; if(res.data == null) {
//this.queryParams.total = res.total; listExamQuestion.value = [];
// queryParams.total = 0
loading.value = false;
return;
}
listExamQuestion.value = res.data;
// queryParams.total = res.total;
// //
processExamQuestion(listExamQuestion.value); processExamQuestion(listExamQuestion.value);
loading.value = false; loading.value = false;
} }
/**
* @desc: 切换节点
* @return: {*}
* @param {*} item
* @param {*} key
*/
const changeTaskView = (item, key) => {
curTask.viewkey = item;
}
const getWorkType = async (data) => { const getWorkType = async (data) => {
const selName = `${data.edustage}${data.edusubject}` const selName = `${data.edustage}${data.edusubject}`
const curName = `${curNode.value.edustage}${curNode.value.edusubject}` const curName = `${curNode.value.edustage}${curNode.value.edusubject}`
@ -154,22 +185,42 @@ const getWorkType = async (data) => {
const queryExamQuestionByParams = async () => { const queryExamQuestionByParams = async () => {
loading.value = true; loading.value = true;
const params = { //
pageNum: 1, // const params = {
pageSize: 100, // pageNum: 1,
workgroup: '1', // pageSize: 100,
edusubject: curNode.value.edusubject, // workgroup: '1',
evalid: curNode.value.id, // edusubject: curNode.value.edusubject,
worktype: queryParams.workType, // evalid: curNode.value.id,
orderby: 'concat(worktype,worktag) DESC', // worktype: queryParams.workType.Value,
} // orderby: 'concat(worktype,worktag) DESC',
if (queryParams.workType == '不限') { // }
delete params.worktype; // if (queryParams.workType == '') {
} // delete params.worktype;
// }
const res = await listEntpcoursework(params); // const res = await listEntpcoursework(params);
listExamQuestion.value = res.rows; // listExamQuestion.value = res.rows;
//this.queryParams.total = res.total;
// +()
const params = {
eid: curNode.value.id,
workgroup: '1',
worktype: queryParams.workType.label,
workTypeId: queryParams.workType.value,
edusubject: curNode.value.edusubject,
edustage: curNode.value.edustage,
sectionName: curNode.value.itemtitle,
}
const res = await listEntpcourseworkNew(params);
if(res.data == null) {
listExamQuestion.value = [];
// queryParams.total = 0
loading.value = false;
return;
}
listExamQuestion.value = res.data;
// queryParams.total = res.total;
// //
processExamQuestion(listExamQuestion.value); processExamQuestion(listExamQuestion.value);
loading.value = false; loading.value = false;