添加简答题及判断题

This commit is contained in:
yangjun 2024-11-27 14:36:58 +08:00
parent 2f806eac97
commit d0bfba96ae
5 changed files with 31 additions and 21 deletions

View File

@ -1,5 +1,5 @@
<template>
<div>
<div >
<div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
@ -37,6 +37,7 @@
</a-row>
</a-form>
</div>
<a-spin :spinning="loadingCeshi">
<!--引用表格-->
<BasicTable @register="registerTable">
<!--操作栏-->
@ -44,6 +45,7 @@
<TableAction :actions="getTableAction(record)" />
</template>
</BasicTable>
</a-spin>
<!-- 表单区域 -->
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="reload"></WjxWjxxTmlbDjjgModal>
<ZgtpfModal ref="ZgtpfModalPage" @success="reload"></ZgtpfModal>
@ -66,6 +68,7 @@ const toggleSearchStatus = ref<boolean>(false);
const WjxWjxxTmlbDjjgModalPage = ref();
const ZgtpfModalPage = ref();
const sjxxInfo = ref<any>({});
const loadingCeshi = ref<boolean>(false);
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
@ -124,12 +127,15 @@ function handleZgtpf() {
function handleHqjg(record){
console.log(record);
defHttp.post({url:'/wjxDjxx/updateDjjg',params:record}).then(res=>{
console.log('-->',res)
})
// defHttp.post({url:'/wjxDjxx/getDjjg',params:record}).then(res=>{
// defHttp.post({url:'/wjxDjxx/updateDjjg',params:record}).then(res=>{
// console.log('-->',res)
// })
loadingCeshi.value = true;
defHttp.post({url:'/wjxDjxx/getDjjg',params:record}).then(res=>{
console.log('-->',res)
loadingCeshi.value = false;
reload();
})
}
/**
@ -142,10 +148,11 @@ function getTableAction(record) {
label: '答卷结果',
onClick: handlePeizhiDjjg.bind(null, record),
},
//{
// label: '',
// onClick: handleHqjg.bind(null, record),
//},
{
label: '获取结果',
onClick: handleHqjg.bind(null, record),
ifShow: record.answerSeconds == 0,
},
{
label: '主观题评分',
onClick: handleZgypf.bind(null, record),

View File

@ -309,19 +309,26 @@ function edit(record, isDisabled, type, flag) {
async function submitForm() {
const data = tiganData.value;
const values = Object.assign([], data);
console.log("🚀 ~ submitForm ~ values:", values)
for (let i = 0; i < values.length; i++) {
let param = values[i];
if (param.wjType == 3 || param.wjType == 4) {
if (param.itemSelected == null) {
emit('closeLoading');
createMessage.warning('有题目没有作答,请检查试卷,完成所有作答!');
createMessage.warning('第'+(i+1)+'题没有作答,请检查试卷,完成所有作答!');
return;
}
values[i].itemSelected = param.itemSelected + '';
} else if (param.wjType == 5) {
if (param.wjAnswer == null || param.wjAnswer == '') {
emit('closeLoading');
createMessage.warning('有题目没有作答,请检查试卷,完成所有作答!');
createMessage.warning('第'+(i+1)+'题没有作答,请检查试卷,完成所有作答!');
return;
}
} else if (param.wjType == 8) {
if (param.wjAnswer == null || param.wjAnswer == '') {
emit('closeLoading');
createMessage.warning('第'+(i+1)+'题没有作答,请检查试卷,完成所有作答!');
return;
}
}

View File

@ -220,32 +220,28 @@ async function submitForm() {
var list = tiganData.value;
console.log('👩‍🎤', list);
for (var i = 0; i < list.length; i++) {
if (!(list[i].itemScore+"")) {
console.log("🚀 ~ submitForm ~ list[i].itemScore:", list[i].itemScore+"")
if (!(list[i].itemScore+"")||(list[i].itemScore+"")=='null'||(list[i].itemScore+"")==null) {
createMessage.warning('第【'+(i+1)+'】题您未填写评分,请填写评分!');
return;
}
}
// console.log(list);
console.log("🚀 ~ submitForm ~ list:", list)
defHttp.post({ url: '/wjxDjxx/editSdpf', params: list }).then((res) => {
console.log('😕', res);
// createMessage.success('');
emit('ok');
});
}
async function submitNextForm() {
var list = tiganData.value;
console.log('👩‍🎤', list);
console.log("🚀 ~ submitNextForm ~ list:", list)
for (var i = 0; i < list.length; i++) {
if (!(list[i].itemScore+"")) {
if (!(list[i].itemScore+"")||(list[i].itemScore+"")=='null'||(list[i].itemScore+"")==null) {
createMessage.warning('第【'+(i+1)+'】题您未填写评分,请填写评分!');
return;
}
}
defHttp.post({ url: '/wjxDjxx/editSdpf', params: list }).then((res) => {
console.log('😕', res);
// createMessage.success('');
edit({ vid: infoData.value.vid });
});
}

View File

@ -39,7 +39,7 @@
<span style="margin-left:15px;">
<a-tooltip placement="topRight">
<template #title>
<span>平台分别在三个时间节点上课后10分钟课中50分钟下课前10分钟抓取学生全景图片进行AI人流量识别当前显示的人数为最近一个时间的人数识别</span>
<span>平台分别在三个时间节点上课后10分钟课中50分钟下课前10分钟抓取学生全景图片进行AI人流量识别当前显示的人数为最近一个时间的人数识别目前部分教室摄像头拍摄画面广角待更新AI识别出勤人数仅供参考</span>
</template>
<!-- <Icon icon="ant-design:question-circle-outlined" /> -->
<span class="helpClass">?</span>

View File

@ -49,10 +49,10 @@
<BlockOutlined />
<span>课程资源</span>
</a-menu-item>
<a-menu-item key="sub7" @click="getGzt('khcl')">
<!-- <a-menu-item key="sub7" @click="getGzt('khcl')">
<BlockOutlined />
<span>上传考核材料</span>
</a-menu-item>
</a-menu-item> -->
<!-- <a-menu-item key="sub6">
<template #icon>
<BlockOutlined />