习题筛选修改
This commit is contained in:
parent
48571086c3
commit
ef5dfc8ed1
|
@ -6,9 +6,34 @@ import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuesti
|
||||||
const useClassTaskStore = defineStore('classTask',{
|
const useClassTaskStore = defineStore('classTask',{
|
||||||
state: () => ({
|
state: () => ({
|
||||||
classListIds: [],
|
classListIds: [],
|
||||||
jyCT: [],
|
entpCourseWorkTypeList: [
|
||||||
jySO: [],
|
{value: 0, label: "不限"},
|
||||||
jyYear: [],
|
{value: 1, label: "单选题"},
|
||||||
|
{value: 2, label: "填空题"},
|
||||||
|
{value: 3, label: "多选题"},
|
||||||
|
{value: 4, label: "判断题"},
|
||||||
|
{value: 5, label: "主观题"},
|
||||||
|
{value: 6, label: "复合题"},
|
||||||
|
], // 习题查询条件 - 题型
|
||||||
|
entpCourseWorkGroupList: [{
|
||||||
|
Key: -1,
|
||||||
|
Value: '不限',
|
||||||
|
}, {
|
||||||
|
Key: 1,
|
||||||
|
Value: '真题',
|
||||||
|
}, {
|
||||||
|
Key: 0,
|
||||||
|
Value: '非真题',
|
||||||
|
}
|
||||||
|
], // 习题查询条件 - 题源
|
||||||
|
entpCourseWorkYearList: [
|
||||||
|
{label: '不限', value: '-1'},
|
||||||
|
{label: '2024', value: '2024'},
|
||||||
|
{label: '2023', value: '2023'},
|
||||||
|
{label: '2022', value: '2022'},
|
||||||
|
{label: '2021', value: '2021'},
|
||||||
|
{label: '2020', value: '2020'},
|
||||||
|
], // 习题查询条件 - 年份
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
listClassmain(params) {
|
listClassmain(params) {
|
||||||
|
@ -32,15 +57,12 @@ const useClassTaskStore = defineStore('classTask',{
|
||||||
Promise.all([getJYYear(), getJYSO(education), getJYCT(education)])
|
Promise.all([getJYYear(), getJYSO(education), getJYCT(education)])
|
||||||
.then(results => {
|
.then(results => {
|
||||||
console.log('更新第三方题源+题型succ:', results);
|
console.log('更新第三方题源+题型succ:', results);
|
||||||
this.jyYear = results[0];
|
this.entpCourseWorkYearList = results[0];
|
||||||
this.jyCT = results[2];
|
this.entpCourseWorkTypeList = results[2];
|
||||||
this.jySO = results[1];
|
this.entpCourseWorkGroupList = results[1];
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('更新第三方题源+题型err:', error);
|
console.error('更新第三方题源+题型err:', error);
|
||||||
this.jyYear = [];
|
|
||||||
this.jySO = [];
|
|
||||||
this.jyCT = [];
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -294,8 +294,8 @@ import FileUpload from "@/components/FileUpload/index.vue";
|
||||||
import whiteboard from '@/components/whiteboard/whiteboard.vue'
|
import whiteboard from '@/components/whiteboard/whiteboard.vue'
|
||||||
import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue'
|
import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue'
|
||||||
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
||||||
import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuestion/jyeoo"
|
|
||||||
|
|
||||||
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
import {throttle,debounce } from '@/utils/comm'
|
import {throttle,debounce } from '@/utils/comm'
|
||||||
import { useToolState } from '@/store/modules/tool'
|
import { useToolState } from '@/store/modules/tool'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
@ -303,6 +303,11 @@ const userStore = useUserStore().user
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const toolStore = useToolState()
|
const toolStore = useToolState()
|
||||||
|
const {
|
||||||
|
entpCourseWorkTypeList,
|
||||||
|
entpCourseWorkGroupList,
|
||||||
|
entpCourseWorkYearList
|
||||||
|
} = useClassTaskStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookobj: {
|
bookobj: {
|
||||||
|
@ -326,39 +331,11 @@ const props = defineProps({
|
||||||
const prevReadMsgDialogRef = ref(null);// 预览框ref
|
const prevReadMsgDialogRef = ref(null);// 预览框ref
|
||||||
|
|
||||||
const classWorkFormRef = ref(null);
|
const classWorkFormRef = ref(null);
|
||||||
const entpCourseWorkTypeList = ref([
|
|
||||||
{value: 0, label: "不限"},
|
|
||||||
{value: 1, label: "单选题"},
|
|
||||||
{value: 2, label: "填空题"},
|
|
||||||
{value: 3, label: "多选题"},
|
|
||||||
{value: 4, label: "判断题"},
|
|
||||||
{value: 5, label: "主观题"},
|
|
||||||
{value: 6, label: "复合题"},
|
|
||||||
]); // 习题查询条件 - 题型
|
|
||||||
|
|
||||||
const entpCourseWorkGroupList = ref([{
|
|
||||||
Key: -1,
|
|
||||||
Value: '不限',
|
|
||||||
}, {
|
|
||||||
Key: 1,
|
|
||||||
Value: '真题',
|
|
||||||
}, {
|
|
||||||
Key: 0,
|
|
||||||
Value: '非真题',
|
|
||||||
}]); // 习题查询条件 - 题源
|
|
||||||
|
|
||||||
const entpCourseWorkPointList = ref([
|
const entpCourseWorkPointList = ref([
|
||||||
{label: '不限', value: []},
|
{label: '不限', value: []},
|
||||||
]); // 习题查询条件 - 知识点
|
]); // 习题查询条件 - 知识点
|
||||||
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
||||||
const entpCourseWorkYearList =ref([
|
|
||||||
{label: '不限', value: '-1'},
|
|
||||||
{label: '2024', value: '2024'},
|
|
||||||
{label: '2023', value: '2023'},
|
|
||||||
{label: '2022', value: '2022'},
|
|
||||||
{label: '2021', value: '2021'},
|
|
||||||
{label: '2020', value: '2020'},
|
|
||||||
]); // 习题查询条件 - 年份
|
|
||||||
|
|
||||||
|
|
||||||
const paginationParams = reactive({
|
const paginationParams = reactive({
|
||||||
|
@ -1006,18 +983,6 @@ const initPageParams = () => {
|
||||||
|
|
||||||
|
|
||||||
onMounted(async() => {
|
onMounted(async() => {
|
||||||
// 获取当前学科下的试题题型
|
|
||||||
const name = userStore.edustage + userStore.edusubject;
|
|
||||||
const jyCT = await JYApiListCT(name);
|
|
||||||
if (jyCT.length == 0) {
|
|
||||||
ElMessage.error('获取题型失败!');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
entpCourseWorkTypeList.value = jyCT;
|
|
||||||
// 获取当前学科下的试题年份
|
|
||||||
entpCourseWorkYearList.value = JYApiListOriginYear();
|
|
||||||
entpCourseWorkGroupList.value = await JYApiListSO(name);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// const refreshData = () => {
|
// const refreshData = () => {
|
||||||
|
|
|
@ -139,7 +139,11 @@ const router = useRouter()
|
||||||
const emit = defineEmits(['addQuiz'])
|
const emit = defineEmits(['addQuiz'])
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
const classTaskStore = useClassTaskStore();
|
const {
|
||||||
|
entpCourseWorkTypeList,
|
||||||
|
entpCourseWorkGroupList,
|
||||||
|
entpCourseWorkYearList
|
||||||
|
} = useClassTaskStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookobj: {
|
bookobj: {
|
||||||
|
@ -148,37 +152,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const entpCourseWorkTypeList = ref([
|
|
||||||
{value: 0, label: "不限"},
|
|
||||||
{value: 1, label: "单选题"},
|
|
||||||
{value: 2, label: "填空题"},
|
|
||||||
{value: 3, label: "多选题"},
|
|
||||||
{value: 4, label: "判断题"},
|
|
||||||
{value: 5, label: "主观题"},
|
|
||||||
{value: 6, label: "复合题"},
|
|
||||||
]); // 习题查询条件 - 题型
|
|
||||||
|
|
||||||
const entpCourseWorkGroupList = ref([{
|
|
||||||
Key: -1,
|
|
||||||
Value: '不限',
|
|
||||||
}, {
|
|
||||||
Key: 1,
|
|
||||||
Value: '真题',
|
|
||||||
}, {
|
|
||||||
Key: 0,
|
|
||||||
Value: '非真题',
|
|
||||||
}]); // 习题查询条件 - 题源
|
|
||||||
|
|
||||||
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
||||||
const entpCourseWorkYearList =ref([
|
|
||||||
{label: '不限', value: '-1'},
|
|
||||||
{label: '2024', value: '2024'},
|
|
||||||
{label: '2023', value: '2023'},
|
|
||||||
{label: '2022', value: '2022'},
|
|
||||||
{label: '2021', value: '2021'},
|
|
||||||
{label: '2020', value: '2020'},
|
|
||||||
]); // 习题查询条件 - 年份
|
|
||||||
|
|
||||||
|
|
||||||
// 习题查询参数条件
|
// 习题查询参数条件
|
||||||
|
@ -224,16 +198,6 @@ const dlgImportSingle = reactive({
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (classTaskStore.jyCT.length>0) {
|
|
||||||
entpCourseWorkTypeList.value = classTaskStore.jyCT;
|
|
||||||
}
|
|
||||||
if (classTaskStore.jySO.length>0) {
|
|
||||||
entpCourseWorkGroupList.value = classTaskStore.jySO;
|
|
||||||
}
|
|
||||||
if (classTaskStore.jyYear.length>0) {
|
|
||||||
entpCourseWorkYearList.value = classTaskStore.jyYear;
|
|
||||||
}
|
|
||||||
|
|
||||||
debounceQueryData(); // 查询习题列表
|
debounceQueryData(); // 查询习题列表
|
||||||
})
|
})
|
||||||
/** 前往习题上传页面 */
|
/** 前往习题上传页面 */
|
||||||
|
|
|
@ -417,7 +417,11 @@ import useUserStore from '@/store/modules/user'
|
||||||
import useClassTaskStore from '@/store/modules/classTask'
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
|
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
const classTaskStore = useClassTaskStore();
|
const {
|
||||||
|
entpCourseWorkTypeList,
|
||||||
|
entpCourseWorkGroupList,
|
||||||
|
entpCourseWorkYearList
|
||||||
|
} = useClassTaskStore();
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
|
@ -619,15 +623,15 @@ onMounted(() => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// 更新第三方题型、题源
|
// 更新第三方题型、题源
|
||||||
if (classTaskStore.jyCT.length>0) {
|
if (entpCourseWorkTypeList.length>0) {
|
||||||
const flagDict = ['单选题', '多选题', '判断题', '填空题'];
|
const flagDict = ['单选题', '多选题', '判断题', '填空题'];
|
||||||
fromOptions.type = classTaskStore.jyCT.filter(item => flagDict.includes(item.label));
|
fromOptions.type = entpCourseWorkTypeList.filter(item => flagDict.includes(item.label));
|
||||||
}
|
}
|
||||||
if (classTaskStore.jySO.length>0) {
|
if (entpCourseWorkGroupList.length>0) {
|
||||||
fromOptions.flag = classTaskStore.jySO;
|
fromOptions.flag = entpCourseWorkGroupList;
|
||||||
}
|
}
|
||||||
// if (classTaskStore.jyYear.length>0) {
|
// if (entpCourseWorkYearList.length>0) {
|
||||||
// yearList.value = classTaskStore.jyYear;
|
// yearList.value = entpCourseWorkYearList;
|
||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,11 @@ import useClassTaskStore from '@/store/modules/classTask'
|
||||||
const emit = defineEmits(['addQuiz'])
|
const emit = defineEmits(['addQuiz'])
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
const classTaskStore = useClassTaskStore();
|
const {
|
||||||
|
entpCourseWorkTypeList,
|
||||||
|
entpCourseWorkGroupList,
|
||||||
|
entpCourseWorkYearList
|
||||||
|
} = useClassTaskStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookobj: {
|
bookobj: {
|
||||||
|
@ -134,41 +138,11 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const entpCourseWorkTypeList = ref([
|
|
||||||
{value: 0, label: "不限"},
|
|
||||||
{value: 1, label: "单选题"},
|
|
||||||
{value: 2, label: "填空题"},
|
|
||||||
{value: 3, label: "多选题"},
|
|
||||||
{value: 4, label: "判断题"},
|
|
||||||
{value: 5, label: "主观题"},
|
|
||||||
{value: 6, label: "复合题"},
|
|
||||||
]); // 习题查询条件 - 题型
|
|
||||||
|
|
||||||
const entpCourseWorkGroupList = ref([{
|
|
||||||
Key: -1,
|
|
||||||
Value: '不限',
|
|
||||||
}, {
|
|
||||||
Key: 1,
|
|
||||||
Value: '真题',
|
|
||||||
}, {
|
|
||||||
Key: 0,
|
|
||||||
Value: '非真题',
|
|
||||||
}]); // 习题查询条件 - 题源
|
|
||||||
|
|
||||||
const entpCourseWorkPointList = ref([
|
const entpCourseWorkPointList = ref([
|
||||||
{label: '不限', value: []},
|
{label: '不限', value: []},
|
||||||
]); // 习题查询条件 - 知识点
|
]); // 习题查询条件 - 知识点
|
||||||
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
||||||
//const knowledgePointProps = ref({value: 'thirdId', label: 'knowTitle'});
|
//const knowledgePointProps = ref({value: 'thirdId', label: 'knowTitle'});
|
||||||
const entpCourseWorkYearList =ref([
|
|
||||||
{label: '不限', value: '-1'},
|
|
||||||
{label: '2024', value: '2024'},
|
|
||||||
{label: '2023', value: '2023'},
|
|
||||||
{label: '2022', value: '2022'},
|
|
||||||
{label: '2021', value: '2021'},
|
|
||||||
{label: '2020', value: '2020'},
|
|
||||||
]); // 习题查询条件 - 年份
|
|
||||||
|
|
||||||
|
|
||||||
// 习题查询参数条件
|
// 习题查询参数条件
|
||||||
|
@ -209,16 +183,6 @@ const workResource = reactive({
|
||||||
}); // 作业资源
|
}); // 作业资源
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (classTaskStore.jyCT.length>0) {
|
|
||||||
entpCourseWorkTypeList.value = classTaskStore.jyCT;
|
|
||||||
}
|
|
||||||
if (classTaskStore.jySO.length>0) {
|
|
||||||
entpCourseWorkGroupList.value = classTaskStore.jySO;
|
|
||||||
}
|
|
||||||
if (classTaskStore.jyYear.length>0) {
|
|
||||||
entpCourseWorkYearList.value = classTaskStore.jyYear;
|
|
||||||
}
|
|
||||||
|
|
||||||
debounceQueryData(); // 查询习题列表
|
debounceQueryData(); // 查询习题列表
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue