Compare commits
No commits in common. "1f96b9b09e6421ee2ea4a64c7e42a1f5e2ddd6aa" and "b5f824ceea484c3bc27f2ea5b0412a4650f8f940" have entirely different histories.
1f96b9b09e
...
b5f824ceea
|
@ -4,7 +4,7 @@
|
||||||
* @date 2024-11-26
|
* @date 2024-11-26
|
||||||
*/
|
*/
|
||||||
import { toRaw } from 'vue'
|
import { toRaw } from 'vue'
|
||||||
import type { Result } from './types' // 接口类型
|
import { Result } from '@/types' // 接口类型
|
||||||
import msgUtils from '@/plugins/modal' // 消息工具
|
import msgUtils from '@/plugins/modal' // 消息工具
|
||||||
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
||||||
import * as API_smarttalk from '@/api/file' // 相关api
|
import * as API_smarttalk from '@/api/file' // 相关api
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @description api 无store循环引用
|
* @description api 无store循环引用
|
||||||
* @author zdg
|
* @author zdg
|
||||||
*/
|
*/
|
||||||
import type { Result } from './types' // 接口类型
|
import { Result } from '@/types' // 接口类型
|
||||||
import msgUtils from '@/plugins/modal' // 消息工具
|
import msgUtils from '@/plugins/modal' // 消息工具
|
||||||
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@ export const processList = (row, aloneOption=false) => {
|
||||||
row[i].method = jjj.method
|
row[i].method = jjj.method
|
||||||
row[i].discuss = jjj.discuss
|
row[i].discuss = jjj.discuss
|
||||||
//row[i].discusscollapse = false;
|
//row[i].discusscollapse = false;
|
||||||
if (row[i].examdate && row[i].examdate != "") {
|
if (row[i].examdate !== null && row[i].examdate !== undefined) {
|
||||||
row[i].examdate = row[i].examdate.substring(0, 10)
|
row[i].examdate = row[i].examdate.substring(0, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 具体题型数据结构处理
|
// 具体题型数据结构处理
|
||||||
if (row[i].worktype == '复合题') {
|
if (row[i].worktype == '复合题') {
|
||||||
// 复合题 - 旧格式
|
// 旧类型
|
||||||
if (row[i].title.indexOf('!@#$%') !== -1) {
|
if (row[i].title.indexOf('!@#$%') !== -1) {
|
||||||
// 1.选项解析替换
|
// 1.选项解析替换
|
||||||
const options = JSON.parse(row[i].workdesc)
|
const options = JSON.parse(row[i].workdesc)
|
||||||
|
@ -129,9 +129,7 @@ export const processList = (row, aloneOption=false) => {
|
||||||
|
|
||||||
row[i].workanswerFormat = answer
|
row[i].workanswerFormat = answer
|
||||||
} else {
|
} else {
|
||||||
// 复合题 - 现格式
|
// 处理[题干显示] - 不再需要处理
|
||||||
|
|
||||||
// 处理[题干显示] - 不再需要处理(头部已处理)
|
|
||||||
// row[i].titleFormat = row[i].title; // 仅占位提示
|
// row[i].titleFormat = row[i].title; // 仅占位提示
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -224,7 +222,6 @@ export const processList = (row, aloneOption=false) => {
|
||||||
row[i].workanswerFormat = workAnswerHtml
|
row[i].workanswerFormat = workAnswerHtml
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
/** 主观题/非基础题(其中主要为第三方的各类解答题) */
|
|
||||||
row[i].worktype == '主观题' ||
|
row[i].worktype == '主观题' ||
|
||||||
(row[i].worktype !== '单选题' &&
|
(row[i].worktype !== '单选题' &&
|
||||||
row[i].worktype !== '多选题' &&
|
row[i].worktype !== '多选题' &&
|
||||||
|
@ -239,7 +236,7 @@ export const processList = (row, aloneOption=false) => {
|
||||||
row[i].workanswerFormat = JSON.parse(row[i].workanswer)
|
row[i].workanswerFormat = JSON.parse(row[i].workanswer)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 基础题: 单选题|多选题|填空题|判断题|主观题?(待确认是否归在这里)
|
// 单选题|多选题|填空题|判断题|主观题?(待确认是否归在这里)
|
||||||
// 通用选项结构 ['ABC123','ABC123'] | ['ABC123','ABC123'] | [](填空题无选项) | [](判断题无选项)
|
// 通用选项结构 ['ABC123','ABC123'] | ['ABC123','ABC123'] | [](填空题无选项) | [](判断题无选项)
|
||||||
let workDescArr = []
|
let workDescArr = []
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-form-item label="年份" label-width="70">
|
<el-form-item label="年份" label-width="70">
|
||||||
<el-select v-model="entpCourseWorkQueryParams.yearStr" placeholder="请选择">
|
<el-select v-model="entpCourseWorkQueryParams.yearStr" placeholder="请选择" >
|
||||||
<el-option v-for="(item, index) in entpCourseWorkYearList" :key="index" :label="item.label" :value="item.value"></el-option>
|
<el-option v-for="(item, index) in entpCourseWorkYearList" :key="index" :label="item.label" :value="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -16,16 +16,6 @@
|
||||||
<el-table-column align="center" prop="worktype" width="100"></el-table-column>
|
<el-table-column align="center" prop="worktype" width="100"></el-table-column>
|
||||||
<el-table-column align="center" prop="worktag" width="120"></el-table-column>
|
<el-table-column align="center" prop="worktag" width="120"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页-->
|
|
||||||
<div style="height: 48px;">
|
|
||||||
<el-pagination
|
|
||||||
v-show="paginationParams.total > 0"
|
|
||||||
v-model:page="paginationParams.pageNum"
|
|
||||||
v-model:limit="paginationParams.pageSize"
|
|
||||||
:total="paginationParams.total"
|
|
||||||
:style="{ position: 'relative', 'padding': '8px 20px 0 0' }"
|
|
||||||
@change="changePageNum" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 试题详细信息 -->
|
<!-- 试题详细信息 -->
|
||||||
<examDetailsDrawer ref="examDetailsDrawerRef"></examDetailsDrawer>
|
<examDetailsDrawer ref="examDetailsDrawerRef"></examDetailsDrawer>
|
||||||
|
@ -64,13 +54,11 @@ const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
listExamQuestion: {type: Array},
|
listExamQuestion: {type: Array},
|
||||||
loading: {type: Boolean},
|
loading: {type: Boolean}
|
||||||
paginationParams: {type: Object},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const activeExamInfoDrawer = ref(false);
|
const activeExamInfoDrawer = ref(false);
|
||||||
const activeExam = ref({});
|
const activeExam = ref({});
|
||||||
const emit = defineEmits(['updatePageNum'])
|
|
||||||
|
|
||||||
const showExamAnalyseDrawer = (row) => {
|
const showExamAnalyseDrawer = (row) => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
@ -81,17 +69,13 @@ const showExamAnalyseDrawer = (row) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const changePageNum = (pageNum) => {
|
|
||||||
emit('updatePageNum', pageNum);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.table-main {
|
.table-main {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 48px);
|
height: 100%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
.main-title {
|
.main-title {
|
||||||
|
|
|
@ -47,13 +47,10 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div :style="{'width': (viewportWidth - 400) + 'px','height': (viewportHeight-38) + 'px','overflow-y': 'auto'}"> -->
|
<div :style="{'width': (viewportWidth - 400) + 'px','height': (viewportHeight-38) + 'px','overflow-y': 'auto'}">
|
||||||
<div style="width: 100%; height: 100%; overflow-y: auto; border-radius: 10px;">
|
|
||||||
<examReview
|
<examReview
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:listExamQuestion="listExamQuestion"
|
:listExamQuestion="listExamQuestion"
|
||||||
:paginationParams="paginationParams"
|
|
||||||
@updatePageNum="updatePageNum"
|
|
||||||
v-if="curTask.viewkey=='真题回顾' "
|
v-if="curTask.viewkey=='真题回顾' "
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -80,15 +77,12 @@ import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||||
import {listEntpcoursework, listEntpcourseworkNew} from '@/api/education/entpCourseWork'
|
import {listEntpcoursework, listEntpcourseworkNew} from '@/api/education/entpCourseWork'
|
||||||
import { processList } from '@/hooks/useProcessList'
|
import { processList } from '@/hooks/useProcessList'
|
||||||
import { JYApiListCT} from "@/utils/examQuestion/jyeoo"
|
import { JYApiListCT} from "@/utils/examQuestion/jyeoo"
|
||||||
import useClassTaskStore from '@/store/modules/classTask'
|
|
||||||
|
|
||||||
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'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
const classTaskStore = useClassTaskStore();
|
|
||||||
|
|
||||||
const {proxy} = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
const sourceStore = useResoureStore();
|
const sourceStore = useResoureStore();
|
||||||
const viewportHeight = ref(0);
|
const viewportHeight = ref(0);
|
||||||
|
@ -97,11 +91,6 @@ const viewportWidth = ref(0);
|
||||||
const curNode = ref({});
|
const curNode = ref({});
|
||||||
// 试题集合
|
// 试题集合
|
||||||
const listExamQuestion = ref([]);
|
const listExamQuestion = ref([]);
|
||||||
const paginationParams = reactive({
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
total: 0,
|
|
||||||
});
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const curTask = reactive({
|
const curTask = reactive({
|
||||||
viewkey: '真题回顾',
|
viewkey: '真题回顾',
|
||||||
|
@ -118,22 +107,6 @@ const listWorkType = ref([{
|
||||||
value: 0,
|
value: 0,
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @desc: 翻页
|
|
||||||
* @return: {*}
|
|
||||||
* @param {*} pageNum
|
|
||||||
*/
|
|
||||||
const updatePageNum = (pageNum) => {
|
|
||||||
paginationParams.pageNum = pageNum;
|
|
||||||
queryExamQuestionByParams();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @desc: 具体获取试题及格式化
|
|
||||||
* @return: {*}
|
|
||||||
* @param {*} params
|
|
||||||
*/
|
|
||||||
const getCourseWorkList = async (params) => {
|
const getCourseWorkList = async (params) => {
|
||||||
const res = await listEntpcourseworkNew(params);
|
const res = await listEntpcourseworkNew(params);
|
||||||
if(res.data == null) {
|
if(res.data == null) {
|
||||||
|
@ -142,14 +115,7 @@ const getCourseWorkList = async (params) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
listExamQuestion.value = res.data;
|
listExamQuestion.value = res.data;
|
||||||
// 判断获取到的总数
|
// queryParams.total = res.total;
|
||||||
const total = parseInt(res.msg)
|
|
||||||
if (!isNaN(total)) {
|
|
||||||
paginationParams.total = total;
|
|
||||||
} else {
|
|
||||||
console.error('无法将 res.msg 转换为数字');
|
|
||||||
paginationParams.total = 0; // 重新设置默认值
|
|
||||||
}
|
|
||||||
// 格式化试题
|
// 格式化试题
|
||||||
processList(listExamQuestion.value);
|
processList(listExamQuestion.value);
|
||||||
}
|
}
|
||||||
|
@ -166,8 +132,7 @@ const getData = async (data) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
// 1.获取题型
|
// 1.获取题型
|
||||||
//getWorkType(data.node);
|
getWorkType(data.node);
|
||||||
listWorkType.value = classTaskStore.entpCourseWorkTypeList;
|
|
||||||
|
|
||||||
// 2.获取试题集合
|
// 2.获取试题集合
|
||||||
curNode.value = data.node;
|
curNode.value = data.node;
|
||||||
|
@ -201,8 +166,6 @@ const getData = async (data) => {
|
||||||
edusubject: curNode.value.edusubject,
|
edusubject: curNode.value.edusubject,
|
||||||
edustage: curNode.value.edustage,
|
edustage: curNode.value.edustage,
|
||||||
sectionName: curNode.value.itemtitle,
|
sectionName: curNode.value.itemtitle,
|
||||||
currentPage: paginationParams.pageNum,
|
|
||||||
pageSize: paginationParams.pageSize,
|
|
||||||
}
|
}
|
||||||
await getCourseWorkList(params);
|
await getCourseWorkList(params);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
@ -218,7 +181,6 @@ const changeTaskView = (item, key) => {
|
||||||
curTask.viewkey = item;
|
curTask.viewkey = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 目前暂不使用, 题型已通过classTaskStore获取
|
|
||||||
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}`
|
||||||
|
@ -269,8 +231,6 @@ const queryExamQuestionByParams = async () => {
|
||||||
edusubject: curNode.value.edusubject,
|
edusubject: curNode.value.edusubject,
|
||||||
edustage: curNode.value.edustage,
|
edustage: curNode.value.edustage,
|
||||||
sectionName: curNode.value.itemtitle,
|
sectionName: curNode.value.itemtitle,
|
||||||
currentPage: paginationParams.pageNum,
|
|
||||||
pageSize: paginationParams.pageSize,
|
|
||||||
}
|
}
|
||||||
await getCourseWorkList(params);
|
await getCourseWorkList(params);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
Loading…
Reference in New Issue