Compare commits
13 Commits
5fe9359d64
...
1f96b9b09e
Author | SHA1 | Date |
---|---|---|
zouyf | 1f96b9b09e | |
“zouyf” | 35c088c25a | |
“zouyf” | 028eb0f752 | |
zhengdegang | 9a68661fb0 | |
zdg | b28abdff50 | |
zdg | b428260703 | |
lyc | b5f824ceea | |
lyc | d3b3e3bcb5 | |
zhengdegang | dcabb80757 | |
zdg | 53f26d96d4 | |
zdg | 7d7b50fa3e | |
baigl | eae2171c70 | |
“zouyf” | 7b59d78ce3 |
|
@ -60,14 +60,6 @@ window.addEventListener('unload', () => {
|
||||||
const newDiscardedDB = JSON.stringify(discardedDBList)
|
const newDiscardedDB = JSON.stringify(discardedDBList)
|
||||||
localStorage.setItem(LOCALSTORAGE_KEY_DISCARDED_DB, newDiscardedDB)
|
localStorage.setItem(LOCALSTORAGE_KEY_DISCARDED_DB, newDiscardedDB)
|
||||||
})
|
})
|
||||||
/** 接口类型 */
|
|
||||||
interface Result {
|
|
||||||
code?: number,
|
|
||||||
msg?: string,
|
|
||||||
data?: any
|
|
||||||
rows?: Array<any>,
|
|
||||||
total?: number
|
|
||||||
}
|
|
||||||
// 获取参数
|
// 获取参数
|
||||||
const initLoad: Function = () => {
|
const initLoad: Function = () => {
|
||||||
// 获取缓存的ppt 资源数据
|
// 获取缓存的ppt 资源数据
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
* @date 2024-11-26
|
* @date 2024-11-26
|
||||||
*/
|
*/
|
||||||
import { toRaw } from 'vue'
|
import { toRaw } from 'vue'
|
||||||
|
import type { 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,6 +2,7 @@
|
||||||
* @description api 无store循环引用
|
* @description api 无store循环引用
|
||||||
* @author zdg
|
* @author zdg
|
||||||
*/
|
*/
|
||||||
|
import type { 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
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
/** 返回-接口类型 */
|
||||||
|
export interface Result {
|
||||||
|
code?: number,
|
||||||
|
msg?: string,
|
||||||
|
data?: any
|
||||||
|
rows?: Array<any>,
|
||||||
|
total?: number
|
||||||
|
}
|
|
@ -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 !== null && row[i].examdate !== undefined) {
|
if (row[i].examdate && row[i].examdate != "") {
|
||||||
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,7 +129,9 @@ 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; // 仅占位提示
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -222,6 +224,7 @@ 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 !== '多选题' &&
|
||||||
|
@ -236,7 +239,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,6 +16,16 @@
|
||||||
<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>
|
||||||
|
@ -54,11 +64,13 @@ 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(() => {
|
||||||
|
@ -69,13 +81,17 @@ 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: 100%;
|
height: calc(100% - 48px);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
.main-title {
|
.main-title {
|
||||||
|
|
|
@ -47,10 +47,13 @@
|
||||||
</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=='真题回顾' "
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -77,12 +80,15 @@ 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);
|
||||||
|
@ -91,6 +97,11 @@ 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: '真题回顾',
|
||||||
|
@ -107,6 +118,22 @@ 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) {
|
||||||
|
@ -115,7 +142,14 @@ 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);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +166,8 @@ 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;
|
||||||
|
@ -166,6 +201,8 @@ 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;
|
||||||
|
@ -181,6 +218,7 @@ 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}`
|
||||||
|
@ -231,6 +269,8 @@ 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;
|
||||||
|
|
|
@ -129,7 +129,6 @@ const dataset_id = ref('')
|
||||||
|
|
||||||
// 上传成功
|
// 上传成功
|
||||||
const onSuccess = async (response) => {
|
const onSuccess = async (response) => {
|
||||||
console.log(response, 'response')
|
|
||||||
let data = {
|
let data = {
|
||||||
url: response.url,
|
url: response.url,
|
||||||
dataset_id: dataset_id.value
|
dataset_id: dataset_id.value
|
||||||
|
@ -174,13 +173,10 @@ const clickItem = (index, item) => {
|
||||||
|
|
||||||
const prevItem = reactive({})
|
const prevItem = reactive({})
|
||||||
const onPrevItem = (item) => {
|
const onPrevItem = (item) => {
|
||||||
console.log(item)
|
|
||||||
Object.assign(prevItem, item)
|
Object.assign(prevItem, item)
|
||||||
prevVisible.value = true
|
prevVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
let data = sessionStore.get('subject.curNode')
|
let data = sessionStore.get('subject.curNode')
|
||||||
Object.assign(curNode, data);
|
Object.assign(curNode, data);
|
||||||
|
|
Loading…
Reference in New Issue