diff --git a/src/api/paper/question/index.ts b/src/api/paper/question/index.ts index c035210..6c6d8b9 100644 --- a/src/api/paper/question/index.ts +++ b/src/api/paper/question/index.ts @@ -9,10 +9,30 @@ export interface QuestionQueryVO { export const getQuestionList = (params: QuestionQueryVO) => { return request.get({ url: '/exam/question/list', params }) } + +export const getQuestionSendList = (params: QuestionQueryVO) => { + return request.get({ url: '/exam/question/sendList', params }) +} + +export const getQuestionAuditList = (params: QuestionQueryVO) => { + return request.get({ url: '/exam/question/auditList', params }) +} + + +export async function auditQuestion(data) { + return await request.post({ url: '/rabbitmq/send' ,data }) +} +export async function rabbitmqConnect() { + return await request.post({ url: '/rabbitmq/connect' }) +} + // 获取试题详情 export const getQuestion = (id: number) => { return request.get({ url: '/exam/question/' + id }) } +export const getQuestionnotId = (id: number) => { + return request.get({ url: '/exam/question/notId/' + id }) +} // 获取题库列表 @@ -33,4 +53,52 @@ export function addQuestion(data: any) { // 修改试题 export function editQuestion(data: any) { return request.put({url: '/exam/question', data}); +} + + +export const getQuestionExamineList = (params: QuestionQueryVO) => { + return request.get({ url: '/exam/question/auditList', params }) +} +export const getSchoolName = (params) => { + return request.get({ url: '/exam/question/getSchoolName',params }) +} +export const receiveAll = () => { + return request.get({ url: '/rabbitmq/receiveAll' }) +} +export const syncUniversities = (ids: string[]) => { + return request.post({ + url: '/rabbitmq/receiveSchoolAll', + data: ids + }) +} + +export const doPush = (data) => { + return request.post({ + url: '/rabbitmq/doPush', + data: data + }); +} + + + +export const connectSchoolAll = (ids: string[]) => { + return request.post({ + url: '/rabbitmq/connectSchoolAll', + data: ids + }) +} + + +export const auditQue = (ids: string[]) => { + return request.post({ + url: '/exam/question/auditQue', + data: ids + }) +} + +export const noauditQue = (ids: string[]) => { + return request.post({ + url: '/exam/question/noauditQue', + data: ids + }) } \ No newline at end of file diff --git a/src/api/system/session/index.ts b/src/api/system/session/index.ts index 92319fb..18be71d 100644 --- a/src/api/system/session/index.ts +++ b/src/api/system/session/index.ts @@ -24,6 +24,13 @@ export async function getSession(id) { return await request.get({ url: '/exam/session/' + id }) } +export async function getTime(id) { + + return await request.get({ url: '/exam/session/getTime/' + id }) + +} + + /** * 添加试卷场次 diff --git a/src/views/monitor/monitor/index.vue b/src/views/monitor/monitor/index.vue index 39d25a0..74ab4c9 100644 --- a/src/views/monitor/monitor/index.vue +++ b/src/views/monitor/monitor/index.vue @@ -248,11 +248,12 @@ import * as ClassApi from '@/api/exam/class' import { ref } from 'vue' const selectedTaskId = ref(null) - +const fixedTaskId = ref('') // 接收子组件传递的taskId const handleTaskSelected = (taskId: string) => { + fixedTaskId.value = taskId queryParams.taskId = taskId - console.log('父组件接收到的taskId:', taskId) + console.log('父组件接收到的taskId:', queryParams.taskId) } /** 监控管理 列表 */ defineOptions({ name: 'Monitor' }) @@ -290,12 +291,14 @@ const taskTypeyOptions = ref([]) /** 查询列表 */ const getList = async () => { loading.value = true - classNameList.value = await ClassApi.ClassApi.getClassName() try { + queryParams.taskId = fixedTaskId.value const data = await MonitorApi.getMonitorPage(queryParams) - queryParams.taskId = '' + // queryParams.taskId = '' list.value = data.list total.value = data.total + classNameList.value = await ClassApi.ClassApi.getClassName() + } finally { loading.value = false } @@ -432,14 +435,13 @@ const handleNextStep = () => { } const handleNextStepCancel = () => { queryParams.taskId = '' - getList() + // getList() initDialogVisible.value = false } /** 初始化 **/ onMounted(() => { - initDialogVisible.value = true; // 显示初始弹框 }) \ No newline at end of file diff --git a/src/views/monitor/monitor/task-monitor.vue b/src/views/monitor/monitor/task-monitor.vue index 2871a40..7224418 100644 --- a/src/views/monitor/monitor/task-monitor.vue +++ b/src/views/monitor/monitor/task-monitor.vue @@ -61,7 +61,7 @@ - + +
+ + +
+ + +
+
试题题目
+
+ +
+
+
+
答题程序模板
+ +
+
+
基本信息
+ + + + + +

测试测试

+
+ +

测试测试

+
+ +

测试测试

+
+ +

测试测试

+
+ +

测试测试

+
+ +

测试测试

+
+
+
+
+ +
+
测试程序(参考答案)
+
+
+

此处的程序可以用来验证测试用例的有效性,非自动判分的试题在人工批阅时可作为批阅的参考答案。 +
+ 注意: 为确保系统能正确捕获程序运行的输出结果,要求 scanf() 函数不能加参数, + 不能采用类似 scanf("请输入: %s") 的形式

+
+ +
+ 添加为关键字 + 上传程序文件 + 运行并测试 +
+ +
+
+
+
测试用例
+
+
+ +
+ 编译得分比例: + + + +
+
+
+ +
+
+ +
+
+

判分时,测试用例得分比例 = 100% - 关键字得分比例 - 编译得分比例;默认最小 + 10% 得分比例;
+ 设置“测试用例全对时直接得满分”,测试用例结果全对时,忽略关键字得分,直接获得试题满分;否则按上述条件计算得分。

+
+ + 测试用例部分对时得分 + 测试用例全对时得分 + +
+ 添加用例 + 导入用例 + 导出模板 + 删除全部 + 测试所有用例 + 均分权重 +
+ + + + + + + + + + + + +
+
+
+
+
+
代码关键字
+
+
+ +
+ 关键字得分比例: + + + +
+
+ 关键字得分临界值: + + + +
+
+
+

提示:关键字支持正则表达式匹配方式,在新建或编辑中设置。
+ 判分时,关键字正确比例小于关键字得分临界值时,忽略验证编译及测试用例得分比例,仅获得关键字正确比例分数。
+ 判分时,关键字正确比例大于等于关键字得分临界值,编译通过且测试用例结果全对时,忽略关键字得分,直接获得试题满分。
+ 判分时,关键字正确比例大于等于关键字得分临界值,编译不一定通过且测试用例不一定全对时,获得分数 + = 关键字得分 + 编译得分 + 测试用例结果得分。

+
+
+ 新建 + 导入 + 删除全部 + 校验关键字 +
+ + + + + + + + + +
+
+
+
其它选项
+
+
+ 时间限制: + + (ms,毫秒,1秒 等于 1000毫秒) +
+
+ 内存限制: + + (MB) +
+
+ 代码长度限制: + + (KB) +
+
+
+
+ +
+ +
+
+ + +
+ + + + + + +
+ + +
+
+
+
+ + +
+ + + + + + + + +
+
+
+
+
+ +
+
+ + + + diff --git a/src/views/paper/audit/ChoiceForm.vue b/src/views/paper/audit/ChoiceForm.vue new file mode 100644 index 0000000..583bcfb --- /dev/null +++ b/src/views/paper/audit/ChoiceForm.vue @@ -0,0 +1,626 @@ + + + \ No newline at end of file diff --git a/src/views/paper/audit/DeptTree.vue b/src/views/paper/audit/DeptTree.vue new file mode 100644 index 0000000..ab8ba06 --- /dev/null +++ b/src/views/paper/audit/DeptTree.vue @@ -0,0 +1,63 @@ + + + diff --git a/src/views/paper/audit/SpecialtyTree.vue b/src/views/paper/audit/SpecialtyTree.vue new file mode 100644 index 0000000..7daeeea --- /dev/null +++ b/src/views/paper/audit/SpecialtyTree.vue @@ -0,0 +1,62 @@ + + + diff --git a/src/views/paper/audit/UserAssignRoleForm.vue b/src/views/paper/audit/UserAssignRoleForm.vue new file mode 100644 index 0000000..67a5ddb --- /dev/null +++ b/src/views/paper/audit/UserAssignRoleForm.vue @@ -0,0 +1,96 @@ + + diff --git a/src/views/paper/audit/UserImportForm.vue b/src/views/paper/audit/UserImportForm.vue new file mode 100644 index 0000000..87eaea9 --- /dev/null +++ b/src/views/paper/audit/UserImportForm.vue @@ -0,0 +1,138 @@ + + diff --git a/src/views/paper/audit/components/el-textarea.vue b/src/views/paper/audit/components/el-textarea.vue new file mode 100644 index 0000000..49cb511 --- /dev/null +++ b/src/views/paper/audit/components/el-textarea.vue @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/src/views/paper/audit/index.vue b/src/views/paper/audit/index.vue new file mode 100644 index 0000000..3e469e7 --- /dev/null +++ b/src/views/paper/audit/index.vue @@ -0,0 +1,708 @@ + + diff --git a/src/views/paper/question/index.vue b/src/views/paper/question/index.vue index 6cdf84f..6e447e0 100644 --- a/src/views/paper/question/index.vue +++ b/src/views/paper/question/index.vue @@ -37,21 +37,31 @@ - - - - - - - - - - - - - - - + + + + + 全部 + 审核通过 + 未审核 + 待审核 + 审核未通过 + + @@ -71,7 +81,11 @@ @click="openForm('create')" > 新增 + + + 连接服务器 + 同步试题 @@ -90,41 +104,22 @@
+ + + + 推送试题 + + + - - - - - - - + + + + + + + - + + + + + + + + { await getList() } + /** 表格选中数据 */ + const selections = ref([]); + + const selectedRows = ref([]) +const handleAudit = async () => { + try { + const rows = selections.value; + if (!rows.length) { + message.error('请至少选择一条数据'); + return; + } + + selectedRows.value = rows.map((d: any) => d.quId); + console.log(selectedRows.value) + + const requestBody = { + type: '0', + quIds: selectedRows.value +} + await QuestionApi.auditQuestion(requestBody) + message.success(t('推送成功')) + // 刷新列表 + await getList() + } catch {} +} +const connectTent = async () => { + try { + const res = await QuestionApi.rabbitmqConnect(); + console.log(res) + message.success(t(res)); + } catch (error) { + message.error(t(`连接失败: ${error?.message || '未知错误'}`)); + } +} + +const connectTong = async () => { + try { + const res = await QuestionApi.receiveAll(); + message.success(t('同步成功')); + } catch (error) { + message.error(t(`连接失败: ${error?.message || '未知错误'}`)); + } +} + + + + interface Tree { id: number name: string diff --git a/src/views/paper/send/CdesignForm.vue b/src/views/paper/send/CdesignForm.vue new file mode 100644 index 0000000..0e2aff8 --- /dev/null +++ b/src/views/paper/send/CdesignForm.vue @@ -0,0 +1,644 @@ + + + + diff --git a/src/views/paper/send/ChoiceForm.vue b/src/views/paper/send/ChoiceForm.vue new file mode 100644 index 0000000..c0c3cb2 --- /dev/null +++ b/src/views/paper/send/ChoiceForm.vue @@ -0,0 +1,626 @@ + + + \ No newline at end of file diff --git a/src/views/paper/send/DeptTree.vue b/src/views/paper/send/DeptTree.vue new file mode 100644 index 0000000..ab8ba06 --- /dev/null +++ b/src/views/paper/send/DeptTree.vue @@ -0,0 +1,63 @@ + + + diff --git a/src/views/paper/send/SpecialtyTree.vue b/src/views/paper/send/SpecialtyTree.vue new file mode 100644 index 0000000..7daeeea --- /dev/null +++ b/src/views/paper/send/SpecialtyTree.vue @@ -0,0 +1,62 @@ + + + diff --git a/src/views/paper/send/UserAssignRoleForm.vue b/src/views/paper/send/UserAssignRoleForm.vue new file mode 100644 index 0000000..67a5ddb --- /dev/null +++ b/src/views/paper/send/UserAssignRoleForm.vue @@ -0,0 +1,96 @@ + + diff --git a/src/views/paper/send/UserImportForm.vue b/src/views/paper/send/UserImportForm.vue new file mode 100644 index 0000000..87eaea9 --- /dev/null +++ b/src/views/paper/send/UserImportForm.vue @@ -0,0 +1,138 @@ + + diff --git a/src/views/paper/send/components/el-textarea.vue b/src/views/paper/send/components/el-textarea.vue new file mode 100644 index 0000000..49cb511 --- /dev/null +++ b/src/views/paper/send/components/el-textarea.vue @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/src/views/paper/send/index.vue b/src/views/paper/send/index.vue new file mode 100644 index 0000000..5b78536 --- /dev/null +++ b/src/views/paper/send/index.vue @@ -0,0 +1,426 @@ + + diff --git a/src/views/task/exam/components/steps/step3/index.vue b/src/views/task/exam/components/steps/step3/index.vue index 0416f21..aae1937 100644 --- a/src/views/task/exam/components/steps/step3/index.vue +++ b/src/views/task/exam/components/steps/step3/index.vue @@ -116,6 +116,8 @@ + + + + + + + + + + + + + + + + + + + + 分钟传一次,断联直接交卷 diff --git a/src/views/task/exam/components/steps/step4/components/step-edit.vue b/src/views/task/exam/components/steps/step4/components/step-edit.vue index b3fdd5d..5614c1b 100644 --- a/src/views/task/exam/components/steps/step4/components/step-edit.vue +++ b/src/views/task/exam/components/steps/step4/components/step-edit.vue @@ -19,7 +19,14 @@ - + + + @@ -97,7 +105,7 @@ diff --git a/src/views/task/trans/components/steps/step3/index.vue b/src/views/task/trans/components/steps/step3/index.vue index 0416f21..aae1937 100644 --- a/src/views/task/trans/components/steps/step3/index.vue +++ b/src/views/task/trans/components/steps/step3/index.vue @@ -116,6 +116,8 @@ + + + + + + + + + + + + + + + + + + + + 分钟传一次,断联直接交卷 diff --git a/src/views/task/trans/components/steps/step4/components/step-edit.vue b/src/views/task/trans/components/steps/step4/components/step-edit.vue index 7a3c866..32a6974 100644 --- a/src/views/task/trans/components/steps/step4/components/step-edit.vue +++ b/src/views/task/trans/components/steps/step4/components/step-edit.vue @@ -19,7 +19,14 @@ - + + + @@ -97,7 +105,7 @@