This commit is contained in:
kbing1981 2024-08-12 17:01:25 +08:00
parent 386bfa5d51
commit c805646669
4 changed files with 93 additions and 49 deletions

View File

@ -3,7 +3,7 @@
<!--查询区域-->
<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">
<a-row :gutter="24" style="margin-top:-10px">
<a-col :lg="7">
<a-form-item label="测验名称">
<a-input placeholder="请输入测验名称" v-model:value="queryParam.title"></a-input>
@ -22,7 +22,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询1111</a-button>
</a-col>
</span>
</a-col>
@ -31,8 +31,8 @@
</div>
<a-row>
<a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 130px;border: 1px solid rgb(28, 132, 198);">
<div style="width: 100%; "></div>
<a-card style="height: 130px;border: 1px solid #eef1f2; border-radius:5px; margin:3px 5px">
<div class="rotate" :style="classFun(item.flag)">{{getStatus(item.flag)}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
@ -40,13 +40,13 @@
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="18" class="zyCon">
<a-col :span="18" class="zyCon" style=" color: #666;">
时间{{dayjs(item.startTime).format('MM.DD HH-mm')}} - {{dayjs(item.endTime).format('MM.DD HH-mm')}}
</a-col>
<a-col :span="6" style="text-align:center;">
<a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='-1'">开始测验</a-button>
<a-button type="primary" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);color:#ffffff" v-if="item.flag=='0'" disabled>正在批卷</a-button>
<a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='1'">查看结果</a-button>
<a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:#1ab394;" v-if="item.flag=='-1'">开始测验</a-button>
<a-button type="primary" style="margin-left:5px;padding: 0px 8px;background:#1ab394;color:#ffffff" v-if="item.flag=='0'" disabled>正在批卷</a-button>
<a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:#1ab394;" v-if="item.flag=='1'">查看结果</a-button>
</a-col>
</a-row>
</a-col>
@ -184,14 +184,13 @@
function classFun(type){
if(type == '-1'){
return "background: #fe1a1a";
return 'background: linear-gradient(180deg, #4ad5b9, #18a689);';
}else if(type == '0'){
return "background: #c6c209";
return 'background: linear-gradient(180deg, #fea317, #ff7d28);';
}else if(type == '1'){
return "background: #18a689";
return 'background: linear-gradient(180deg, #f84444, #d40505)';
}
}
function getStatus(flag){
if(flag == '-1'){
return "待提交";
@ -240,14 +239,14 @@
line-height: 30px;
}
.rotate {
transform: rotate(45deg);
background: rgb(28, 132, 198);
color: #fff;
padding: 19px 10px 3px 10px;
position: relative;
top: -54px;
right: -408px;
text-align: center;
font-size: 11px;
}
transform: rotate(45deg);
background: linear-gradient(90deg, #93d861, #8ddc53, #35c495);
color: #fff;
padding: 17px 10px 10px 10px;
position: relative;
top: -33px;
right: -404px;
text-align: center;
font-size: 12px;
}
</style>

View File

@ -436,13 +436,20 @@
</a-col>
<a-col :span="24">
<a-row>
<a-col :span="12" class="tjfx-col"> 测验名称{{ zyInfo.title }} </a-col>
<a-col :span="12" class="tjfx-col">
测验时间{{ dayjs(zyInfo.startTime).format('MM.DD HH:mm') }} ~ {{ dayjs(zyInfo.endTime).format('MM.DD HH:mm') }}
</a-col>
<a-col :span="8" class="tjfx-col"> 总人数{{ zyInfo.xkrs }} </a-col>
<a-col :span="8" class="tjfx-col"> 已完成人数{{ zyInfo.ywcrs }} </a-col>
<a-col :span="8" class="tjfx-col"> 未完成人数{{ zyInfo.wwcrs }} </a-col>
<div style="width:100%; height:130px; background:#fff;">
<div style="display: flex; justify-content:space-between; padding-top:5px">
<span class="tjfx-col-title"> 测验名称{{ zyInfo.title }} </span>
<span class="tjfx-col"> 测验时间{{ dayjs(zyInfo.startTime).format('MM.DD HH:mm') }} ~ {{ dayjs(zyInfo.endTime).format('MM.DD HH:mm') }}</span>
</div>
<div style="display: flex; ">
<div class="tjfx-line"><span class="tjfx-colt" >{{ zyInfo.xkrs }}</span><span class="tjfx-colw"> 总人数</span></div>
<div class="tjfx-line"><span class="tjfx-colt">{{ zyInfo.ywcrs }}</span><span class="tjfx-colw"> 已完成人数</span></div>
<div class="tjfx-line"><span class="tjfx-colt">{{ zyInfo.wwcrs }}</span><span class="tjfx-colw"> 未完成人数</span></div>
</div>
<!-- <div class="tjfx-col"> 总人数{{ zyInfo.xkrs }} </div>
<div class="tjfx-col"> 已完成人数{{ zyInfo.ywcrs }} </div>
<div class="tjfx-col"> 未完成人数{{ zyInfo.wwcrs }} </div> -->
</div>
<a-col :span="24">
<div class="region-title">基本信息</div>
</a-col>
@ -1710,14 +1717,40 @@ onMounted(() => {
color: #029c88;
padding: 8px 20px;
border-left: 5px solid #029c88;
margin-bottom: 20px;
margin: 10px;
border-radius:5px;
background: #fff;
}
.tjfx-col {
font-size: 16px;
font-size: 12px;
padding: 8px 20px;
line-height: 25px;
}
.tjfx-col-title {
font-size: 16px;
padding: 8px 20px;
line-height: 25px;
font-weight: bold;
}
.tjfx-line{
width: 30%;
text-align: center;
display: flex;
flex-direction: column;
background: #f7f7f7;
border-radius: 5px;
margin:0 15px;
padding: 8px 0;
}
.tjfx-colt{
font-size:22px;
font-weight: bold;
color: #1ab394;
}
.tjfx-colw{
font-size: 14px;
color: #666;
}
.tjfx-title {
width: 90%;
float: left;
@ -1743,9 +1776,10 @@ onMounted(() => {
padding: 20px;
}
.question-type{
background: #353535;
color: #fff;
background: #eaf9f6;
color: #1ab394;
padding:0 5px;
border-radius: 3px;
border:1px solid #1ab394;
}
</style>

View File

@ -7,20 +7,20 @@
<!-- 主体部分 -->
<a-layout-content>
<a-spin :spinning="confirmLoading" v-if="showType == 1">
<a-row style="min-height: calc(80vh)">
<a-col :span="24" style="overflow-y: scroll">
<a-row style="min-height: calc(80vh);background:#fcfcfc;">
<a-col :span="24" style="overflow-y: scroll; " >
<div style="text-align: center; width: 100%; font-weight: bold; font-size: 20px"> {{ title }}</div>
<!-- 题干信息 -->
<div style="width: 100%" v-for="(item, index) in tiganData" :key="index">
<div style="width:100%; padding:0 40px; margin:0 auto;" v-for="(item, index) in tiganData" :key="index">
<!-- 单选题 -->
<div style="width: 100%" v-if="item.wjType == 3">
<div style="text-align: left; width: 100%; font-weight: bold; font-size: 18px">单选题</div>
<div style="text-align: left; width: 100%; font-weight: bold; line-height:80px; font-size: 18px">单选题</div>
<a-card>
<template #title>
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span>
</template>
<template #extra>
<span style="margin-left: 40px" v-if="isShow">题目分值 {{ item.wjScore }} </span>
<span style="margin-left: 40px" v-if="isShow">题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span>
</template>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="disabled">
<div style="width: 100%" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index">
@ -33,13 +33,13 @@
</div>
<!-- 多选题 -->
<div style="width: 100%" v-else-if="item.wjType == 4">
<div style="text-align: left; width: 100%; font-weight: bold; font-size: 18px">多选题</div>
<div style="text-align: left; width: 100%; font-weight: bold; line-height:80px; font-size: 18px">多选题</div>
<a-card>
<template #title>
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
</template>
<template #extra>
<span style="margin-left: 40px" v-if="isShow">题目分值 {{ item.wjScore }} </span>
<span style="margin-left: 40px" v-if="isShow">题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span>
</template>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="disabled">
<a-row>
@ -54,13 +54,13 @@
</div>
<!-- 多选题 -->
<div style="width: 100%" v-else-if="item.wjType == 5">
<div style="text-align: left; width: 100%; font-weight: bold; font-size: 18px">填空题</div>
<div style="text-align: left; width: 100%; font-weight: bold; line-height:80px; font-size: 18px">填空题</div>
<a-card>
<template #title>
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style=" font-weight: bold;white-space: pre-wrap; word-wrap: break-word" />
</template>
<template #extra>
<span style="margin-left: 40px" v-if="isShow">题目分值 {{ item.wjScore }} </span>
<span style="margin-left: 40px" v-if="isShow">题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span>
</template>
<a-row>
<a-col :span="24">
@ -83,9 +83,10 @@
</a-col>
</a-row>
</a-spin>
<div v-if="showType == 2" style="width: 100%; text-align: center;min-height: 500px;">
<div style="margin-top: 200px;"
>您已提交了测验请勿重复提交<a-button
<div v-if="showType == 2" style="width: 100%; background:#fff; text-align: center;min-height: 500px;">
<div style="padding-top: 200px;"
> <img class="work-img-img" src="../../../../assets/images/homework.png" />
<span style="color:#666">您已提交了测验请勿重复提交</span><br><a-button
type="primary"
@click="
() => {
@ -97,8 +98,9 @@
</div>
</div>
<div v-if="showType == 3" style="width: 100%; text-align: center;min-height: 500px;">
<div style="margin-top: 200px;"
>提交成功请返回首页<a-button
<div>
<img class="work-img-img" src="../../../assets/images/homework.png" />
<span>1111提交成功请返回首页</span><a-button
type="primary"
@click="
() => {
@ -328,4 +330,13 @@ defineExpose({
}
}
}
.answer-word{
color: #ff8710;
font-weight: bold;
}
.work-img-img {
margin: 0 auto;
width: 180px;
height: 139px;
}
</style>

View File

@ -15,7 +15,7 @@
import WjxWjxxTmlbAllDjjgsList from './WjxWjxxTmlbAllDjjgsList.vue'
const title = ref<string>('');
const width = ref<string>('90%');
const width = ref<string>('65%');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();