问卷星:试卷页面调整、学生答卷结果查询

This commit is contained in:
曹磊 2024-05-13 23:04:21 +08:00
parent ccc8f37b85
commit 4925a18323
24 changed files with 2076 additions and 160 deletions

View File

@ -2,7 +2,7 @@ import type { AppRouteModule } from '/@/router/types';
// import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';
const stuzy: AppRouteModule = {
path: '/stuzy',
name: 'stuzy',
@ -38,7 +38,22 @@ const stuzy: AppRouteModule = {
},
component: () => import('/@/views/zy/zyInfo/SutdentZyInfoHistoryList.vue'),
},
{
path: 'stuCeshiWenjuan',
name: 'stuCeshiWenjuan',
component: () => import('/@/views/kc/wjxCswj/WjxCswjStuList.vue'),
meta: {
title: '测试问卷',
},
},
{
path: 'stuDcwjWenjuan',
name: 'stuDcwjWenjuan',
component: () => import('/@/views/kc/wjxDcwj/WjxDcwjStuList.vue'),
meta: {
title: '调查问卷',
},
},
]
}

View File

@ -62,17 +62,22 @@ const zuoye: AppRouteModule = {
title: '公告',
},
},
{
path: 'dqkcWenjuan',
name: 'dqkcWenjuan',
component: () => import('/@/views/kc/wjxWjxx/WjxWjxxList.vue'),
path: 'ceshiWenjuan',
name: 'ceshiWenjuan',
component: () => import('/@/views/kc/wjxCswj/WjxCswjMainList.vue'),
meta: {
title: '当前问卷',
title: '测试问卷',
},
},
{
path: 'dcwjWenjuan',
name: 'dcwjWenjuan',
component: () => import('/@/views/kc/wjxDcwj/WjxDcwjMainList.vue'),
meta: {
title: '调查问卷',
},
},
]
}

View File

@ -12,6 +12,7 @@
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.qpublish">
<a-select-option value="">全部</a-select-option>
<a-select-option value="0">未发布</a-select-option>
<a-select-option value="1">已发布</a-select-option>
</a-select>
@ -33,7 +34,7 @@
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 280px;">
<div class="rotate" >{{item.qpublish =='0'? '待发布':'已发布'}}</div>
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish =='0'? '待发布':'已发布'}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div>
@ -51,7 +52,13 @@
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="12" class="zyCon">{{item.xqxn}}</a-col>
<a-col :span="12" class="zyCon">{{item.xkrs}}人选课</a-col>
<a-col :span="12" class="zyCon"><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkrs}}人选课</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="12" class="zyCon"><div style="float:left;" @click="handleDjjgs(item,'0')" v-if="item.wwcrs>0"><a>未提交{{item.wwcrs}}</a></div></a-col>
<a-col :span="12" class="zyCon"><div style="float:right;" @click="handleDjjgs(item,'1')" v-if="item.ywcrs>0"><a>已提交{{item.ywcrs}}</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
@ -61,12 +68,12 @@
<a-button type="primary" @click="handleDelete(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">删除</a-button>
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">详情</a-button>
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">配置</a-button>
<a-button type="primary" @click="handleDjjgs(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>
<a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">查看答卷</a-button>
<!-- <a-button type="primary" @click="handleDjjgs(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>-->
</a-col>
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->
<!-- <a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">查看答卷</a-button>-->
<!-- </a-col>-->
</a-row>
</a-card>
</a-col>
@ -83,8 +90,8 @@
<WjxWjxxModal ref="registerModal" @success="handleSuccess"></WjxWjxxModal>
<WjxWjxxTmlbModal ref="WjxWjxxTmlbModalPage" @success="handleSuccess"></WjxWjxxTmlbModal>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
<WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</div>
</template>
@ -92,18 +99,18 @@
import {ref, reactive, defineExpose, unref, onMounted} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './WjxWjxx.api';
import WjxWjxxModal from './components/WjxWjxxModal.vue'
import { list ,deleteOne } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn } = query;//
const { rwbh,xqxn,typa } = query;//
const APagination = Pagination;
const queryParam = ref<any>({});
@ -116,8 +123,9 @@
const registerModal = ref();
const WjxWjxxTmlbModalPage = ref();
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgModalPage = ref();
const WjxWjxxTmlbDjjgsModalPage = ref();
const WjxWjxxTmlbDjjgsModalPage = ref()
const WjxWjxxTmlbDjjgsDcModalPage = ref();
const XxhbbksListModalPage = ref();
const labelCol = reactive({
xs: { span: 24 },
@ -144,12 +152,21 @@
registerModal.value.edit(record);
}
/**
* 获取选课人数
*/
function openXkrs(record){
// console.log(`🚀 ~ openXkrs ~ record:`, record)
XxhbbksListModalPage.value.disableSubmit = true;
XxhbbksListModalPage.value.init(record);
}
/**
* 配置
*/
function handlePeizhi(record: Recordable) {
WjxWjxxTmlbModalPage.value.disableSubmit = false;
WjxWjxxTmlbModalPage.value.edit(record);
WjxWjxxTmlbModalPage.value.edit(record,"6");
}
/**
@ -157,31 +174,31 @@
*/
function handlePeizhiXq(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjModalPage.value.edit(record,true);
WjxWjxxTmlbDjModalPage.value.edit(record,true,"6",'ls');
}
/**
* 答卷详
*/
function handleDj(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
WjxWjxxTmlbDjModalPage.value.edit(record,false);
}
// /**
// *
// */
// function handleDj(record: Recordable) {
// WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
// WjxWjxxTmlbDjModalPage.value.edit(record,false);
// }
/**
* 答卷详
*/
function handleDjjg(record: Recordable) {
WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
}
// /**
// *
// */
// function handleDjjg(record: Recordable) {
// WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
// WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
// }
/**
* 学生答卷列表
*/
function handleDjjgs(record: Recordable) {
function handleDjjgs(record: Recordable,flag) {
WjxWjxxTmlbDjjgsModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgsModalPage.value.edit(record,false);
WjxWjxxTmlbDjjgsModalPage.value.edit(record,flag);
}
/**
@ -196,7 +213,7 @@
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id } }).then(res => {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => {
total.value = 1;
pageNo.value = 0;
reload();
@ -259,6 +276,14 @@
searchQuery();
});
function classFun(type){
if(type == '0'){
return "background: #a7a6a6";
}else if(type == '1'){
return "background: #18a689";
}
}
</script>
<style lang="less" scoped>

View File

@ -0,0 +1,27 @@
<template>
<div style="background: #fff;height: 97%;margin: 10px 0;">
<div style="text-align:right;width:100%;">
<a-switch v-model:checked="checked1" @change="onChange1"/>
</div>
<div v-show="checked1">
<WjxCswjList/>
</div>
<div v-show="!checked1">
<WjxCswjTableList/>
</div>
</div>
</template>
<script lang="ts" name="wjx-cswj" setup>
import { ref, reactive, onMounted,unref } from 'vue';
import WjxCswjTableList from '/@/views/kc/wjxCswj/WjxCswjTableList.vue'
import WjxCswjList from '/@/views/kc/wjxCswj/WjxCswjList.vue'
const checked1 = ref(true);
function onChange1(record){
}
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,252 @@
<template>
<div style="background: #fff;height: 97%;margin: 10px 0;">
<!--查询区域-->
<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-col :lg="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.flag">
<a-select-option value="">全部</a-select-option>
<a-select-option value="-1">待提交</a-select-option>
<a-select-option value="0">已提交</a-select-option>
<a-select-option value="1">已完成</a-select-option>
</a-select>
</a-form-item>
</a-col>
<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:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 210px;">
<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;">
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="6" class="zyCon">时间
</a-col>
<a-col :span="16" class="zyCon">
<a-col :span="24" class="zyCon">{{item.startTime}}</a-col>
<a-col :span="24" class="zyCon">{{item.endTime}}</a-col>
</a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<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-col>
</a-row>
</a-card>
</a-col>
<a-col :span="24">
<div v-show="tableData.length>0">
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
</div>
<div v-show="tableData.length==0">
<a-empty/>
</div>
</a-col>
</a-row>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref, onMounted} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import {useRouter} from "vue-router";
import {useMessage} from "/@/hooks/web/useMessage";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa } = query;//
const { createMessage } = useMessage();
const APagination = Pagination;
const queryParam = ref<any>({});
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(6);
const tableData = ref<any>([]);
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgModalPage = ref();
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 答卷详情
*/
function handleDj(record: Recordable) {
let timestamp = new Date().getTime();
let startTimestamp = Date.parse(record.startTime);
if(timestamp<startTimestamp){
createMessage.error('还未到答卷时间!');
return;
}
let endTimestamp = Date.parse(record.endTime);
if(timestamp>endTimestamp){
createMessage.error('答卷时间已过!');
return;
}
WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
WjxWjxxTmlbDjModalPage.value.edit(record,false,"6",'xs');
}
/**
* 答卷详情
*/
function handleDjjg(record: Recordable) {
WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgModalPage.value.edit(record.djId,false);
}
function reload(){
queryParam.value.pageNo = pageNo;
queryParam.value.pageSize = pageSize;
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "6";
defHttp.get({ url: '/wjxWjxx/wjxWjxx/stuList', params: queryParam.value }).then(res => {
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
total.value = res.total;
pageNo.value = res.pages;
current.value = res.current;
tableData.value = res.records;
});
}
/**
* 成功回调
*/
function handleSuccess() {
total.value = 1;
pageNo.value = 0;
reload();
}
/**
* 查询
*/
function searchQuery() {
pageNo.value = 0;
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
total.value = 1;
handlePageChange(1);
}
function handlePageChange(record){
pageNo.value = record;
reload();
}
onMounted(() => {
searchQuery();
});
function classFun(type){
if(type == '-1'){
return "background: #a7a6a6";
}else if(type == '0'){
return "background: #1c84c6";
}else if(type == '1'){
return "background: #18a689";
}
}
function getStatus(flag){
if(flag == '-1'){
return "待答卷";
}else if(flag == '0'){
return "待批卷";
}else if(flag == '1'){
return "已完成";
}
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
.jeecg-basic-table-form-container .ant-form {
padding: 12px 10px 0px 10px;
margin-bottom: 0px;
background-color: #fff;
border-radius: 2px;
}
.ellipsis {
overflow: hidden; /* 确保超出容器的内容被裁剪 */
white-space: nowrap; /* 确保文本在一行内显示 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.zyCon{
line-height: 30px;
}
.rotate {
transform: rotate(45deg);
background: rgb(28, 132, 198);
color: #fff;
padding: 19px 10px 3px 10px;
position: relative;
top: -54px;
right: -131px;
text-align: center;
font-size: 11px;
}
</style>

View File

@ -0,0 +1,313 @@
<template>
<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">
<a-col :lg="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.qpublish">
<a-select-option value="">全部</a-select-option>
<a-select-option value="0">未发布</a-select-option>
<a-select-option value="1">已发布</a-select-option>
</a-select>
</a-form-item>
</a-col>
<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:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleAdd" style="margin-left: 8px"> 新增</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
<!-- 表单区域 -->
<WjxWjxxModal ref="registerModal" @success="handleSuccess"></WjxWjxxModal>
<WjxWjxxTmlbModal ref="WjxWjxxTmlbModalPage" @success="handleSuccess"></WjxWjxxTmlbModal>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
<WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref} from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { defHttp } from '/@/utils/http/axios';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from '/@/views/kc/wjxWjxx/WjxWjxx.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa} = query;//
const queryParam = ref<any>({rwbh : rwbh,xqxn : xqxn,atype : "6"});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const WjxWjxxTmlbModalPage = ref();
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgsModalPage = ref();
const XxhbbksListModalPage = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 280,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: "问卷信息",
url: getExportUrl,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add("6");
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 配置
*/
function handlePeizhi(record: Recordable) {
WjxWjxxTmlbModalPage.value.disableSubmit = false;
WjxWjxxTmlbModalPage.value.edit(record,"6");
}
/**
* 配置详情
*/
function handlePeizhiXq(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjModalPage.value.edit(record,true,"6",'ls');
}
// /**
// *
// */
// function handlePeizhiDj(record: Recordable) {
// WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
// WjxWjxxTmlbDjModalPage.value.edit(record,false);
// }
//
// /**
// *
// */
// function handlePeizhiDjjg(record: Recordable) {
// WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
// WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
// }
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 学生答卷列表
*/
function handleDjjgs(record: Recordable,flag) {
WjxWjxxTmlbDjjgsModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgsModalPage.value.edit(record, flag);
}
/**
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => {
reload();
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
if(record.qpublish == '1'){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '配置详情',
onClick: handlePeizhiXq.bind(null, record),
},
{
label: '学生列表',
onClick: handleDjjgs.bind(null, record,"1"),
},
]
}else{
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
},
{
label: '配置',
onClick: handlePeizhi.bind(null, record),
},
{
label: '发布',
onClick: handleFabu.bind(null, record),
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
};
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "6";
selectedRowKeys.value = [];
//
reload();
}
function init(){
defHttp.get({url:'/wjxWjxx/wjxWjxx/getWjxLogin',params:{}}).then(res =>{
})
}
defineExpose({
init
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -0,0 +1,335 @@
<template>
<div style="background: #fff;height: 97%;margin: 10px 0;">
<!--查询区域-->
<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-col :lg="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.qpublish">
<a-select-option value="">全部</a-select-option>
<a-select-option value="0">未发布</a-select-option>
<a-select-option value="1">已发布</a-select-option>
</a-select>
</a-form-item>
</a-col>
<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:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleAdd" style="margin-left: 8px"> 新增</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 280px;">
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish =='0'? '待发布':'已发布'}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="6" class="zyCon">时间
</a-col>
<a-col :span="16" class="zyCon">
<a-col :span="24" class="zyCon">{{item.startTime}}</a-col>
<a-col :span="24" class="zyCon">{{item.endTime}}</a-col>
</a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="12" class="zyCon">{{item.xqxn}}</a-col>
<a-col :span="12" class="zyCon"><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkrs}}人选课</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="12" class="zyCon"><div style="float:left;" @click="handleDjjgs(item,'0')" v-if="item.wwcrs>0"><a>未提交{{item.wwcrs}}</a></div></a-col>
<a-col :span="12" class="zyCon"><div style="float:right;" @click="handleDjjgs(item,'1')" v-if="item.ywcrs>0"><a>已提交{{item.ywcrs}}</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">编辑</a-button>
<a-button type="primary" @click="handlePeizhi(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">配置</a-button>
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">发布</a-button>
<a-button type="primary" @click="handleDelete(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">删除</a-button>
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">详情</a-button>
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">配置</a-button>
<!-- <a-button type="primary" @click="handleDjjgs(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>-->
</a-col>
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->
<!-- <a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">查看答卷</a-button>-->
<!-- </a-col>-->
</a-row>
</a-card>
</a-col>
<a-col :span="24">
<div v-show="tableData.length>0">
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
</div>
<div v-show="tableData.length==0">
<a-empty/>
</div>
</a-col>
</a-row>
<!-- 表单区域 -->
<WjxWjxxModal ref="registerModal" @success="handleSuccess"></WjxWjxxModal>
<WjxWjxxTmlbModal ref="WjxWjxxTmlbModalPage" @success="handleSuccess"></WjxWjxxTmlbModal>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
<WjxWjxxTmlbDjjgsDcModal ref="WjxWjxxTmlbDjjgsDcModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsDcModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref, onMounted} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
import { list ,deleteOne } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import WjxWjxxTmlbDjjgsDcModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa} = query;//
const APagination = Pagination;
const queryParam = ref<any>({});
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(6);
const tableData = ref<any>([]);
const registerModal = ref();
const WjxWjxxTmlbModalPage = ref();
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgsDcModalPage = ref();
const XxhbbksListModalPage = ref();
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add("1");
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 获取选课人数
*/
function openXkrs(record){
// console.log(`🚀 ~ openXkrs ~ record:`, record)
XxhbbksListModalPage.value.disableSubmit = true;
XxhbbksListModalPage.value.init(record);
}
/**
* 配置
*/
function handlePeizhi(record: Recordable) {
WjxWjxxTmlbModalPage.value.disableSubmit = false;
WjxWjxxTmlbModalPage.value.edit(record,"1");
}
/**
* 配置详情
*/
function handlePeizhiXq(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjModalPage.value.edit(record,true,"1",'ls');
}
// /**
// *
// */
// function handleDj(record: Recordable) {
// WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
// WjxWjxxTmlbDjModalPage.value.edit(record,false);
// }
/**
* 答卷详情
*/
// function handleDjjg(record: Recordable) {
// WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
// WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
// }
/**
* 学生答卷列表
*/
function handleDjjgs(record: Recordable,flag) {
WjxWjxxTmlbDjjgsDcModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgsDcModalPage.value.edit(record, flag);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "1" } }).then(res => {
total.value = 1;
pageNo.value = 0;
reload();
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
function reload(){
queryParam.value.pageNo = pageNo;
queryParam.value.pageSize = pageSize;
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "1";
defHttp.get({ url: '/wjxWjxx/wjxWjxx/list', params: queryParam.value }).then(res => {
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
total.value = res.total;
pageNo.value = res.pages;
current.value = res.current;
tableData.value = res.records;
});
}
/**
* 成功回调
*/
function handleSuccess() {
total.value = 1;
pageNo.value = 0;
reload();
}
/**
* 查询
*/
function searchQuery() {
pageNo.value = 0;
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
total.value = 1;
handlePageChange(1);
}
function handlePageChange(record){
pageNo.value = record;
reload();
}
onMounted(() => {
searchQuery();
});
function classFun(type){
if(type == '0'){
return "background: #a7a6a6";
}else if(type == '1'){
return "background: #18a689";
}
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
.jeecg-basic-table-form-container .ant-form {
padding: 12px 10px 0px 10px;
margin-bottom: 0px;
background-color: #fff;
border-radius: 2px;
}
.ellipsis {
overflow: hidden; /* 确保超出容器的内容被裁剪 */
white-space: nowrap; /* 确保文本在一行内显示 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.zyCon{
line-height: 30px;
}
.rotate {
transform: rotate(45deg);
background: rgb(28, 132, 198);
color: #fff;
padding: 19px 10px 3px 10px;
position: relative;
top: -54px;
right: -131px;
text-align: center;
font-size: 11px;
}
</style>

View File

@ -0,0 +1,27 @@
<template>
<div style="background: #fff;height: 97%;margin: 10px 0;">
<div style="text-align:right;width:100%;">
<a-switch v-model:checked="checked1" @change="onChange1"/>
</div>
<div v-show="checked1">
<WjxDcwjList/>
</div>
<div v-show="!checked1">
<WjxDcwjTableList/>
</div>
</div>
</template>
<script lang="ts" name="wjx-dcwj" setup>
import { ref, reactive, onMounted,unref } from 'vue';
import WjxDcwjTableList from '/@/views/kc/wjxDcwj/WjxDcwjTableList.vue'
import WjxDcwjList from '/@/views/kc/wjxDcwj/WjxDcwjList.vue'
const checked1 = ref(true);
function onChange1(record){
}
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,252 @@
<template>
<div style="background: #fff;height: 97%;margin: 10px 0;">
<!--查询区域-->
<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-col :lg="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.flag">
<a-select-option value="">全部</a-select-option>
<a-select-option value="-1">待提交</a-select-option>
<a-select-option value="0">已提交</a-select-option>
<a-select-option value="1">已完成</a-select-option>
</a-select>
</a-form-item>
</a-col>
<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:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 210px;">
<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;">
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="6" class="zyCon">时间
</a-col>
<a-col :span="16" class="zyCon">
<a-col :span="24" class="zyCon">{{item.startTime}}</a-col>
<a-col :span="24" class="zyCon">{{item.endTime}}</a-col>
</a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<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);" 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-col>
</a-row>
</a-card>
</a-col>
<a-col :span="24">
<div v-show="tableData.length>0">
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
</div>
<div v-show="tableData.length==0">
<a-empty/>
</div>
</a-col>
</a-row>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref, onMounted} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import {useRouter} from "vue-router";
import {useMessage} from "/@/hooks/web/useMessage";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa } = query;//
const { createMessage } = useMessage();
const APagination = Pagination;
const queryParam = ref<any>({});
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(6);
const tableData = ref<any>([]);
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgModalPage = ref();
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 答卷详情
*/
function handleDj(record: Recordable) {
let timestamp = new Date().getTime();
let startTimestamp = Date.parse(record.startTime);
if(timestamp<startTimestamp){
createMessage.error('还未到答卷时间!');
return;
}
let endTimestamp = Date.parse(record.endTime);
if(timestamp>endTimestamp){
createMessage.error('答卷时间已过!');
return;
}
WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
WjxWjxxTmlbDjModalPage.value.edit(record,false,"1",'xs');
}
/**
* 答卷详情
*/
function handleDjjg(record: Recordable) {
WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgModalPage.value.edit(record.djId,false);
}
function reload(){
queryParam.value.pageNo = pageNo;
queryParam.value.pageSize = pageSize;
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "1";
defHttp.get({ url: '/wjxWjxx/wjxWjxx/stuList', params: queryParam.value }).then(res => {
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
total.value = res.total;
pageNo.value = res.pages;
current.value = res.current;
tableData.value = res.records;
});
}
/**
* 成功回调
*/
function handleSuccess() {
total.value = 1;
pageNo.value = 0;
reload();
}
/**
* 查询
*/
function searchQuery() {
pageNo.value = 0;
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
total.value = 1;
handlePageChange(1);
}
function handlePageChange(record){
pageNo.value = record;
reload();
}
onMounted(() => {
searchQuery();
});
function classFun(type){
if(type == '-1'){
return "background: #a7a6a6";
}else if(type == '0'){
return "background: #1c84c6";
}else if(type == '1'){
return "background: #18a689";
}
}
function getStatus(flag){
if(flag == '-1'){
return "待答卷";
}else if(flag == '0'){
return "待批卷";
}else if(flag == '1'){
return "已完成";
}
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
.jeecg-basic-table-form-container .ant-form {
padding: 12px 10px 0px 10px;
margin-bottom: 0px;
background-color: #fff;
border-radius: 2px;
}
.ellipsis {
overflow: hidden; /* 确保超出容器的内容被裁剪 */
white-space: nowrap; /* 确保文本在一行内显示 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.zyCon{
line-height: 30px;
}
.rotate {
transform: rotate(45deg);
background: rgb(28, 132, 198);
color: #fff;
padding: 19px 10px 3px 10px;
position: relative;
top: -54px;
right: -131px;
text-align: center;
font-size: 11px;
}
</style>

View File

@ -0,0 +1,313 @@
<template>
<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">
<a-col :lg="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.qpublish">
<a-select-option value="">全部</a-select-option>
<a-select-option value="0">未发布</a-select-option>
<a-select-option value="1">已发布</a-select-option>
</a-select>
</a-form-item>
</a-col>
<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:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleAdd" style="margin-left: 8px"> 新增</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
<!-- 表单区域 -->
<WjxWjxxModal ref="registerModal" @success="handleSuccess"></WjxWjxxModal>
<WjxWjxxTmlbModal ref="WjxWjxxTmlbModalPage" @success="handleSuccess"></WjxWjxxTmlbModal>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
<WjxWjxxTmlbDjjgsDcModal ref="WjxWjxxTmlbDjjgsDcModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsDcModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref} from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { defHttp } from '/@/utils/http/axios';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from '/@/views/kc/wjxWjxx/WjxWjxx.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import WjxWjxxTmlbDjjgsDcModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa} = query;//
const queryParam = ref<any>({rwbh : rwbh,xqxn : xqxn,atype : "1"});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const WjxWjxxTmlbModalPage = ref();
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgsDcModalPage = ref();
const XxhbbksListModalPage = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 280,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: "问卷信息",
url: getExportUrl,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add("1");
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 配置
*/
function handlePeizhi(record: Recordable) {
WjxWjxxTmlbModalPage.value.disableSubmit = false;
WjxWjxxTmlbModalPage.value.edit(record,"1");
}
/**
* 配置详情
*/
function handlePeizhiXq(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjModalPage.value.edit(record,true,"1",'ls');
}
// /**
// *
// */
// function handlePeizhiDj(record: Recordable) {
// WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
// WjxWjxxTmlbDjModalPage.value.edit(record,false);
// }
//
// /**
// *
// */
// function handlePeizhiDjjg(record: Recordable) {
// WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
// WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
// }
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 学生答卷列表
*/
function handleDjjgs(record: Recordable,flag) {
WjxWjxxTmlbDjjgsDcModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgsDcModalPage.value.edit(record, flag);
}
/**
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "1" } }).then(res => {
reload();
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
if(record.qpublish == '1'){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '配置详情',
onClick: handlePeizhiXq.bind(null, record),
},
{
label: '学生列表',
onClick: handleDjjgs.bind(null, record,"1"),
},
]
}else{
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
},
{
label: '配置',
onClick: handlePeizhi.bind(null, record),
},
{
label: '发布',
onClick: handleFabu.bind(null, record),
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
};
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "1";
selectedRowKeys.value = [];
//
reload();
}
function init(){
defHttp.get({url:'/wjxWjxx/wjxWjxx/getWjxLogin',params:{}}).then(res =>{
})
}
defineExpose({
init
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -4,46 +4,16 @@ import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
// {
// title: '创建人',
// align: "center",
// dataIndex: 'createBy'
// },
// {
// title: '创建时间',
// align: "center",
// dataIndex: 'createTime',
// customRender:({text}) =>{
// return !text?"":(text.length>10?text.substr(0,10):text);
// },
// },
{
title: '学年学期',
title: '是否发布问卷',
align: "center",
dataIndex: 'xnxq'
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
dataIndex: 'qpublish_dictText'
},
{
title: '问卷名称',
align: "center",
dataIndex: 'title'
},
{
title: '问卷类型',
align: "center",
dataIndex: 'atype',
customRender: ({ text }) => {
let dictMap = {
'1': '调查',
'6': '随堂练',
}
return dictMap[text??''];
}
},
{
title: '开始时间',
align: "center",
@ -55,14 +25,24 @@ export const columns: BasicColumn[] = [
dataIndex: 'endTime'
},
{
title: '问卷描述',
title: '学期学年',
align: "center",
dataIndex: 'content'
dataIndex: 'xqxn'
},
{
title: '是否发布问卷',
title: '选课人数',
align: "center",
dataIndex: 'qpublish_dictText'
dataIndex: 'xkrs'
},
{
title: '未提交',
align: "center",
dataIndex: 'wwcrs'
},
{
title: '已提交',
align: "center",
dataIndex: 'ywcrs'
},
];

View File

@ -15,9 +15,9 @@
<span>{{index+1}}</span><span v-html:value="item.wjTitle" style="white-space:pre-wrap;word-wrap : break-word"></span>
</template>
<template #extra>
<span style="margin-left: 40px;">题目分值 {{item.wjScore}} </span>
<span style="margin-left: 40px;" v-if="isShow">题目分值 {{item.wjScore}} </span>
</template>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="disabled" >
<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">
<a-radio :value="tmxx.itemIndex+``" style="width: 100%;margin-bottom: 5px;">
<span v-html:value="tmxx.itemTitle" style="width:80%;font-size: 16px;"></span>
@ -34,9 +34,9 @@
<span>{{index+1}}</span><span v-html:value="item.wjTitle" style="white-space:pre-wrap;word-wrap : break-word"/>
</template>
<template #extra>
<span style="margin-left: 40px;">题目分值 {{item.wjScore}} </span>
<span style="margin-left: 40px;" v-if="isShow">题目分值 {{item.wjScore}} </span>
</template>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="disabled" >
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="disabled">
<a-row>
<a-col :span="24" v-for="(tmxx,index) in item.wjxWjxxTmxxList">
<a-checkbox :value="tmxx.itemIndex" style="width: 100%;margin-bottom: 5px;">
@ -47,6 +47,23 @@
</a-checkbox-group>
</a-card>
</div>
<!-- 多选题 -->
<div style="width: 100%;" v-else-if="item.wjType==5">
<div style="text-align: left;width: 100%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</div>
<a-card >
<template #title>
<span>{{index+1}}</span><span v-html:value="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>
</template>
<a-row>
<a-col :span="24">
<a-textarea placeholder="请填写答案" v-model:value="item.wjAnswer" style="width:100%;" :auto-size="{ minRows: 2, maxRows: 5 }" :disabled="disabled"/>
</a-col>
</a-row>
</a-card>
</div>
<div v-else>
无对应类型
</div>
@ -69,6 +86,7 @@ import {
} from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api';
const title = ref<string>('');
const mainId = ref<string>('');
const isShow = ref<boolean>(false);
const disabled = ref<boolean>(false);
const confirmLoading = ref<boolean>(false);
const tiganData = ref<any>([]);
@ -79,29 +97,38 @@ const { createMessage } = useMessage();
const emit = defineEmits(['ok', 'closeLoading']);
//
function edit(record,isDisabled){
function edit(record,isDisabled,type,flag){
openTime.value = getCurrentTimeFormat();
tiganData.value = [];
disabled.value = isDisabled;
if(type == '6'){
isShow.value = true;
}else if(type == '1'){
isShow.value = false;
}
title.value = record.title;
mainId.value = record.id;
defHttp.get({url:'/wjxWjxxTmlb/wjxWjxxTmlb/queryByMainId',params:{id:record.id}}).then(res =>{
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
var list = res;
for(var i=0;i<list.length;i++){
var par = list[i];
if(disabled.value){
if(par.wjType==4){
var lssj = par.itemSelected.split(",");
const numArray = lssj.map(str => parseInt(str));
list[i].itemSelected = numArray;
if(flag == 'ls'){
defHttp.get({url:'/wjxWjxxTmlb/wjxWjxxTmlb/queryByMainId',params:{id:record.id}}).then(res =>{
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
let list = res;
for(let i=0;i<list.length;i++){
let par = list[i];
if(disabled.value){
if(par.wjType==4){
let lssj = par.itemSelected.split(",");
const numArray = lssj.map(str => parseInt(str));
list[i].itemSelected = numArray;
}
}
}else{
par.itemSelected = null;
}
}
tiganData.value = res;
})
tiganData.value = res;
})
}else{
defHttp.get({url:'/wjxWjxxTmlb/wjxWjxxTmlb/queryDjByMainId',params:{id:record.id}}).then(res =>{
tiganData.value = res;
})
}
}
//
@ -109,14 +136,22 @@ async function submitForm(){
const data = tiganData.value;
// console.log(`🚀 ~ submitForm ~ data:`, data)
const values = Object.assign([], data);
for(var i=0;i<values.length;i++){
var param = values[i];
if(param.itemSelected == null){
emit('closeLoading');
createMessage.warning("有题目没有作答,请检查试卷,完成所有作答!");
return;
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("有题目没有作答,请检查试卷,完成所有作答!");
return;
}
values[i].itemSelected = param.itemSelected+"";
}else if(param.wjType == 5){
if(param.wjAnswer == null){
emit('closeLoading');
createMessage.warning("有题目没有作答,请检查试卷,完成所有作答!");
return;
}
}
values[i].itemSelected = param.itemSelected+"";
values[i].openTime = openTime.value;
}
const isUpdate = false

View File

@ -20,12 +20,12 @@
* 编辑
* @param record
*/
function edit(record,isDisabled) {
title.value = disableSubmit.value ? '详情' : '编辑';
function edit(record,isDisabled,type,flag) {
title.value = disableSubmit.value ? '配置详情' : '答卷';
visible.value = true;
loading.value = false;
nextTick(() => {
registerForm.value.edit(record,isDisabled);
registerForm.value.edit(record,isDisabled,type,flag);
});
}

View File

@ -54,6 +54,24 @@
</a-checkbox-group>
</a-card>
</div>
<!-- 填空题 -->
<div style="width: 100%;" v-else-if="item.wjType==5">
<div style="text-align: left;width: 100%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</div>
<a-card >
<template #title>
<span>{{index+1}}</span><span v-html:value="item.wjTitle" style="white-space:pre-wrap;word-wrap : break-word"/>
</template>
<template #extra v-if="djxxData.atype == 6">
<div style="margin-left: 40px;">题目分值 {{item.wjScore}} </div>
<div style="margin-left: 40px;">所得分值 {{item.itemScore}} </div>
</template>
<a-row>
<a-col :span="24">
<a-textarea v-model:value="item.answerText" style="width:100%;" :auto-size="{ minRows: 2, maxRows: 5 }" disabled/>
</a-col>
</a-row>
</a-card>
</div>
<div v-else>
无对应类型
</div>
@ -84,10 +102,10 @@ const { createMessage } = useMessage();
const emit = defineEmits(['register', 'success']);
//
function edit(record){
function edit(id){
tiganData.value = [];
mainId.value = record.id;
defHttp.get({url:'/wjxDjxx/queryByMainId',params:{id:record.id}}).then(res =>{
mainId.value = id;
defHttp.get({url:'/wjxDjxx/queryByMainId',params:{id:id}}).then(res =>{
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
let djxx = res;
let list = djxx.wjxDjxxTmxxList;

View File

@ -19,11 +19,11 @@
* 编辑
* @param record
*/
function edit(record) {
function edit(id) {
title.value = disableSubmit.value ? '答卷结果' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
registerForm.value.edit(id);
});
}

View File

@ -10,6 +10,12 @@ export const columns: BasicColumn[] = [
dataIndex: 'title',
width: 200
},
{
title: '学号',
align: "center",
dataIndex: 'userId',
width: 100
},
{
title: '学生',
align: "center",
@ -78,6 +84,75 @@ export const columns: BasicColumn[] = [
},
];
export const dccolumns: BasicColumn[] = [
{
title: '问卷名称',
align: "center",
dataIndex: 'title',
width: 200
},
{
title: '学号',
align: "center",
dataIndex: 'userId',
width: 100
},
{
title: '学生',
align: "center",
dataIndex: 'userName',
width: 100
},
{
title: '答卷时间',
align: "center",
dataIndex: 'openTime',
width: 150
},
{
title: '交卷时间',
align: "center",
dataIndex: 'commitTime',
width: 150
},
{
title: '答卷用时',
align: "center",
dataIndex: 'answerSfm',
width: 80
},
{
title: '学期学年',
align: "center",
dataIndex: 'xqxn',
width: 80
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc',
width: 200
},
{
title: '开始时间',
align: "center",
dataIndex: 'startTime',
width: 150
},
{
title: '结束时间',
align: "center",
dataIndex: 'endTime',
width: 150
},
{
title: '问卷描述',
align: "center",
dataIndex: 'content',
width: 200
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];

View File

@ -0,0 +1,108 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--操作栏-->
<template #action="{ record }" v-if="isFinished=='1'">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
<!-- 表单区域 -->
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref} from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { defHttp } from '/@/utils/http/axios';
import { useListPage } from '/@/hooks/system/useListPage';
import {dccolumns} from './WjxWjxxTmlbDjjgs.data';
import { list } from './WjxWjxxTmlbDjjgs.api';
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
const queryParam = ref<any>({});
const isFinished = ref<string>('');
const toggleSearchStatus = ref<boolean>(false);
const WjxWjxxTmlbDjjgModalPage = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '',
api: list,
columns:dccolumns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
}
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 答卷详情
*/
function handlePeizhiDjjg(record: Recordable) {
WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgModalPage.value.edit(record.id,false);
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '答卷结果',
onClick: handlePeizhiDjjg.bind(null, record),
}
]
}
function init(record,flag){
queryParam.value.id = record.id;
queryParam.value.rwbh = record.rwbh;
queryParam.value.isFinished = flag;
isFinished.value = flag;
reload();
}
defineExpose({
init
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -0,0 +1,67 @@
<template>
<a-modal :title="title" :width="width" centered :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<WjxWjxxTmlbDjjgsDcList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></WjxWjxxTmlbDjjgsDcList>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import WjxWjxxTmlbDjjgsDcList from './WjxWjxxTmlbDjjgsDcList.vue'
const title = ref<string>('');
const width = ref<string>('90%');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 编辑
* @param record
*/
function edit(record,flag) {
if(flag == '1'){
title.value = '已完成答卷学生列表';
}else{
title.value = '已完成答卷学生列表';
}
visible.value = true;
nextTick(() => {
registerForm.value.init(record,flag);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -3,7 +3,7 @@
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--操作栏-->
<template #action="{ record }">
<template #action="{ record }" v-if="isFinished=='1'">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
@ -22,6 +22,7 @@ import {ref, reactive, defineExpose, unref} from 'vue';
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
const queryParam = ref<any>({});
const isFinished = ref<string>('');
const toggleSearchStatus = ref<boolean>(false);
const WjxWjxxTmlbDjjgModalPage = ref();
//table
@ -57,7 +58,7 @@ import {ref, reactive, defineExpose, unref} from 'vue';
*/
function handlePeizhiDjjg(record: Recordable) {
WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
WjxWjxxTmlbDjjgModalPage.value.edit(record.id,false);
}
/**
@ -72,8 +73,11 @@ import {ref, reactive, defineExpose, unref} from 'vue';
]
}
function init(record){
function init(record,flag){
queryParam.value.id = record.id;
queryParam.value.rwbh = record.rwbh;
queryParam.value.isFinished = flag;
isFinished.value = flag;
reload();
}

View File

@ -19,11 +19,15 @@
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '学生答卷结果列表' : '编辑';
function edit(record,flag) {
if(flag == '1'){
title.value = '已完成答卷学生列表';
}else{
title.value = '已完成答卷学生列表';
}
visible.value = true;
nextTick(() => {
registerForm.value.init(record);
registerForm.value.init(record,flag);
});
}

View File

@ -6,6 +6,7 @@
<a-card title="可选题型" style="height: 450px;border: 1px solid #e8e8e8;">
<p><a-button type="primary" preIcon="ant-design:check-circle-outlined" @click="addTigan(3)">单选</a-button></p>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(4)">多选</a-button></p>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(5)">填空</a-button></p>
</a-card>
</a-col>
<a-col :span="20" style="overflow-y: scroll;height: calc(80vh);">
@ -17,10 +18,10 @@
<div style="width: 100%;" v-if="item.wjType==3">
<a-card >
<template #title>
<span>{{index+1}}</span><a-textarea placeholder="请填写单选题题干" v-model:value="item.wjTitle" style="width: 75%" auto-size/>
<span>{{index+1}}</span><a-textarea placeholder="请填写单选题题干" v-model:value="item.wjTitle" style="width: 75%" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</template>
<template #extra>
<a-tooltip placement="topRight" title="题目分数">
<a-tooltip placement="topRight" title="题目分数" v-if="isShow">
<a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数">
<a-select-option value="5">5</a-select-option>
<a-select-option value="4">4</a-select-option>
@ -31,7 +32,12 @@
</a-tooltip >
<a-tooltip placement="topRight" title="删除此题"><Icon icon="ant-design:delete-outlined" style="cursor: pointer;font-size: 20px;margin: 10px" @click="handleDelTigan(item,index)" /></a-tooltip >
</template>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default">
<a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey;font-size: 13px;">
选中即为正确答案
</a-col>
</a-row>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="!isShow">
<div style="width: 100%" v-for="(tmxx,index) in item.wjxWjxxTmxxList">
<a-radio :value="tmxx.itemIndex+``" style="width: 100%"><a-input placeholder="请填写标题" v-model:value="tmxx.itemTitle" :bordered="false" style="width:80%;"/>
<a-tooltip placement="topLeft" title="在下方添加新的选项"><Icon icon="ant-design:plus-circle-outlined" style="cursor: pointer;margin:5px;font-size:20px;color: #1890ff;" @click="handleAddTmxx(tmxx,index,item.wjxWjxxTmxxList)" /></a-tooltip >
@ -45,10 +51,10 @@
<div style="width: 100%;" v-else-if="item.wjType==4">
<a-card >
<template #title>
<span>{{index+1}}</span><a-textarea placeholder="请填写多选题题干" v-model:value="item.wjTitle" style="width: 75%" auto-size/>
<span>{{index+1}}</span><a-textarea placeholder="请填写多选题题干" v-model:value="item.wjTitle" style="width: 75%" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</template>
<template #extra>
<a-tooltip placement="topRight" title="题目分数">
<a-tooltip placement="topRight" title="题目分数" v-if="isShow">
<a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数">
<a-select-option value="5">5</a-select-option>
<a-select-option value="4">4</a-select-option>
@ -59,7 +65,12 @@
</a-tooltip >
<a-tooltip placement="topRight" title="删除此题"><Icon icon="ant-design:delete-outlined" style="cursor: pointer;font-size: 20px;margin: 10px" @click="handleDelTigan(item,index)" /></a-tooltip >
</template>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%">
<a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey;font-size: 13px;">
选中即为正确答案
</a-col>
</a-row>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" :disabled="!isShow">
<a-row>
<a-col :span="24" v-for="(tmxx,index) in item.wjxWjxxTmxxList">
<a-checkbox :value="tmxx.itemIndex"><a-input placeholder="请填写标题" v-model:value="tmxx.itemTitle" :bordered="false" style="width:80%;"/></a-checkbox>
@ -70,6 +81,31 @@
</a-checkbox-group>
</a-card>
</div>
<!-- 填空题 -->
<div style="width: 100%;" v-else-if="item.wjType==5">
<a-card >
<template #title>
<span>{{index+1}}</span><a-textarea placeholder="请填写填空题题干" v-model:value="item.wjTitle" style="width: 75%" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</template>
<template #extra>
<a-tooltip placement="topRight" title="题目分数" v-if="isShow">
<a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数">
<a-select-option value="5">5</a-select-option>
<a-select-option value="4">4</a-select-option>
<a-select-option value="3">3</a-select-option>
<a-select-option value="2">2</a-select-option>
<a-select-option value="1">1</a-select-option>
</a-select>
</a-tooltip >
<a-tooltip placement="topRight" title="删除此题"><Icon icon="ant-design:delete-outlined" style="cursor: pointer;font-size: 20px;margin: 10px" @click="handleDelTigan(item,index)" /></a-tooltip >
</template>
<a-row v-if="isShow">
<a-col :span="24">
<a-textarea placeholder="请填写答案" v-model:value="item.wjAnswer" :bordered="true" style="width:100%;" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</a-col>
</a-row>
</a-card>
</div>
<div v-else>
无对应类型
</div>
@ -87,6 +123,7 @@ import { defHttp } from '/@/utils/http/axios';
import { queryWjxWjxxTmxxListByMainId, queryDataById, saveOrUpdate } from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api';
const title = ref<string>('');
const mainId = ref<string>('');
const isShow = ref<boolean>(false);
const confirmLoading = ref<boolean>(false);
const tiganData = ref<any>([]);
const tmxxPar = ref<any>({});
@ -97,30 +134,40 @@ const emit = defineEmits(['register', 'success']);
function addTigan(type){
var list = tiganData.value;
if(type==3){
var params = {
let params = {
wjType:parseInt(type),
wjIndex:list.length+1,
mainId:mainId,
wjTitle:null,
wjScore:null,
itemSelected:'1',
// itemSelected:'1',
wjxWjxxTmxxList:[{itemTitle:null,itemIndex:'1'},{itemTitle:null,itemIndex:'2'}],
}
list.push(params);
tiganData.value = [...list];
}else if(type==4){
var params = {
let params = {
wjType:parseInt(type),
wjIndex:list.length+1,
mainId:mainId,
wjTitle:null,
wjScore:null,
itemSelected:['1'],
// itemSelected:['1'],
wjxWjxxTmxxList:[{itemTitle:null,itemIndex:'1'},{itemTitle:null,itemIndex:'2'}],
}
list.push(params);
tiganData.value = [...list];
}else if(type==5){
let params = {
wjType:parseInt(type),
wjIndex:list.length+1,
mainId:mainId,
wjTitle:null,
wjScore:null,
wjAnswer:null,
}
list.push(params);
tiganData.value = [...list];
}
}
//
@ -148,10 +195,15 @@ function getType(value,type){
}
}
//
function edit(record){
function edit(record,type){
tiganData.value = [];
title.value = record.title;
mainId.value = record.id;
if(type == '6'){
isShow.value = true;
}else if(type == '1'){
isShow.value = false;
}
defHttp.get({url:'/wjxWjxxTmlb/wjxWjxxTmlb/queryByMainId',params:{id:record.id}}).then(res =>{
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
var list = res;
@ -172,15 +224,18 @@ async function submitForm(){
const data = tiganData.value;
// console.log(`🚀 ~ submitForm ~ data:`, data)
const values = Object.assign([], data);
for(var i=0;i<values.length;i++){
var param = values[i];
values[i].itemSelected = param.itemSelected+"";
if(values.length>0){
for(let i=0;i<values.length;i++){
let param = values[i];
values[i].itemSelected = param.itemSelected+"";
}
const isUpdate = false
await saveOrUpdate(values, isUpdate);
//
emit('ok');
}else{
createMessage.error('至少创建一个试题');
}
const isUpdate = false
await saveOrUpdate(values, isUpdate);
//
emit('ok');
}
defineExpose({

View File

@ -7,7 +7,7 @@
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import WjxWjxxTmlbForm from './WjxWjxxTmlbForm.vue'
const title = ref<string>('');
const width = ref<string>('100%');
const visible = ref<boolean>(false);
@ -15,19 +15,19 @@
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 编辑
* @param record
*/
function edit(record) {
function edit(record,type) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
registerForm.value.edit(record,type);
});
}
/**
* 确定按钮点击事件
*/

View File

@ -20,7 +20,7 @@
</a-sub-menu>
<a-sub-menu key="sub3">
<template #title>教学工具</template>
<a-menu-item key="6" @click="getGzt('dqwj')">问卷调查</a-menu-item>
<a-menu-item key="6" @click="getGzt('dcwj')">问卷调查</a-menu-item>
<a-menu-item key="7" @click="getGzt('gongju')">到课率识别</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub4">
@ -65,12 +65,13 @@
function getGzt(zytype){
console.log(`🚀 ~ getGzt ~ type:`, zytype)
var param = {rwbh,xqxn,type};
// console.log(`🚀 ~ getGzt ~ type:`, zytype)
var href = "/zy/dqkcDqzy";
if(zytype=='dqzy'){
href = "/zy/dqkcDqzy";
}else if(zytype=='dqwj'){
href = "/zy/dqkcWenjuan";
}else if(zytype=='dcwj'){
href = "/zy/dcwjWenjuan";
}else if(zytype=='lszy'){
href = "/zy/dqkcLszy";
}else if(zytype=='gonggao'){
@ -78,11 +79,11 @@
}else if(zytype=='kcjs'){
href = "/zy/dqkcDetail";
}else if(zytype=='kcjc'){
href = "/zy/dqkcWenjuan";
href = "/zy/ceshiWenjuan";
}else if(zytype=='gongju'){
href = "/zy/dqkcGongju";
}
console.log('href---->',href);
router.push({path:href,query: {rwbh,xqxn,type}});
}

View File

@ -16,15 +16,15 @@
<a-sub-menu key="sub4">
<template #title>测验/作业</template>
<a-menu-item key="4" @click="getGzt('dqzy')">课程作业</a-menu-item>
<a-menu-item key="5" @click="getGzt('lszy')">课程测验</a-menu-item>
<a-menu-item key="5" @click="getGzt('kcjc')">课程测验</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub5">
<span>问卷调查</span>
<span @click="getGzt('dcwj')">问卷调查</span>
</a-menu-item>
<!-- <a-menu-item key="sub5">
<!-- <a-menu-item key="sub6">
<span>讨论区</span>
</a-menu-item> -->
</a-menu-item>
-->
</a-menu>
</a-col>
</a-row>
@ -42,7 +42,7 @@
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import dqxqkc from '/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue';
const maxClassName = ref<any>({});
const selectedKeys = ref<string[]>([]);
//
@ -50,8 +50,8 @@
const { query } = unref(currentRoute);
const { rwbh,xqxn,type } = query;//
let router = useRouter();
function getGzt(zytype){
console.log(`🚀 ~ getGzt ~ type:`, zytype)
var href = "";
@ -61,6 +61,11 @@
// else if(zytype=='lszy'){
// href = "/stuzy/studentLszy";
// }
else if(zytype=='dcwj'){
href = "/stuzy/stuDcwjWenjuan";
}else if(zytype=='kcjc'){
href = "/stuzy/stuCeshiWenjuan";
}
router.push({path:href,query: {rwbh,xqxn,type}});
}
@ -68,7 +73,7 @@
onMounted(() => {
console.log('rwbh:',rwbh);
});
</script>
<style lang="less" scoped>
#siteMain {
@ -107,4 +112,4 @@
}
}
}
</style>
</style>