添加新功能

This commit is contained in:
yangjun 2024-08-01 08:35:49 +08:00
parent d08cc33ff4
commit a7aa31a923
14 changed files with 1418 additions and 714 deletions

View File

@ -81,7 +81,7 @@ const stuzy: AppRouteModule = {
{ {
path: 'zyhp', path: 'zyhp',
name: 'zyhp', name: 'zyhp',
component: () => import('/@/views/zy/zyInfoStudentHp/ZyInfoStudentHpList.vue'), component: () => import('/@/views/zy/zyInfoStudentHp/ZyhpMainList.vue'),
meta: { meta: {
title: '作业互评', title: '作业互评',
}, },

View File

@ -15,7 +15,7 @@
<a-col :lg="6"> <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">查询</a-button>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 新增</a-button> <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 新增</a-button>
<a-button type="primary" @click="handleZtyl(0)" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 预览</a-button> <a-button type="primary" @click="handleZtyl(0)" preIcon="ant-design:menu-unfold-outlined" style="margin-left: 8px"> 预览</a-button>
</a-col> </a-col>
</span> </span>
</a-col> </a-col>
@ -68,7 +68,7 @@
</div> </div>
<div v-if="!showYl"> <div v-if="!showYl">
<div> <div>
<a-button type="primary" @click="handleZtyl(1)" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 返回</a-button> <a-button type="primary" @click="handleZtyl(1)" preIcon="ant-design:arrow-left-outlined" style="margin-left: 8px"> 返回</a-button>
</div> </div>
<TeacherYulanList /> <TeacherYulanList />
</div> </div>

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="margin-top:20px;"> <div style="margin-top: 20px">
<!--查询区域--> <!--查询区域-->
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<!-- <a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <!-- <a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -20,7 +20,7 @@
</a-form> --> </a-form> -->
</div> </div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable" style="margin-top:-20px;"> <BasicTable @register="registerTable" style="margin-top: -20px">
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" /> <TableAction :actions="getTableAction(record)" />
@ -35,11 +35,23 @@
<span v-if="record.wwcc == '0'">-</span> <span v-if="record.wwcc == '0'">-</span>
<span v-else> <span v-else>
<template v-if="record.wwfilestateid == '3'"> <template v-if="record.wwfilestateid == '3'">
<span :title="record.wwmessage?record.wwmessage:'暂无原因,请联系管理员'" style="color:red;">检测失败</span> <span :title="record.wwmessage ? record.wwmessage : '暂无原因,请联系管理员'" style="color: red">检测失败</span>
</template> </template>
<template v-else> <template v-else>
<span v-if="text=='通过'" style="color: green;padding: 5px 15px;cursor:pointer" title="通过(点击可查看对比结果)" @click="handleYulan(record.wwpaperviewurl)">{{record.wwxsl}}%</span> <span
<span v-else-if="text=='未通过'" style="color: red;padding: 5px 15px;cursor:pointer" title="未通过(点击可查看对比结果)" @click="handleYulan(record.wwpaperviewurl)">{{record.wwxsl}}%</span> v-if="text == '通过'"
style="color: green; padding: 5px 15px; cursor: pointer"
title="通过(点击可查看对比结果)"
@click="handleYulan(record.wwpaperviewurl)"
>{{ record.wwxsl }}%</span
>
<span
v-else-if="text == '未通过'"
style="color: red; padding: 5px 15px; cursor: pointer"
title="未通过(点击可查看对比结果)"
@click="handleYulan(record.wwpaperviewurl)"
>{{ record.wwxsl }}%</span
>
<span v-else-if="text && text.indexOf('失败') > -1" style="color: red; padding: 5px 15px; cursor: pointer" :title="text">{{ text }}</span> <span v-else-if="text && text.indexOf('失败') > -1" style="color: red; padding: 5px 15px; cursor: pointer" :title="text">{{ text }}</span>
<span v-else> <span v-else>
<span v-if="record.filePath">检测中</span> <span v-if="record.filePath">检测中</span>
@ -52,11 +64,23 @@
<span v-if="record.nwcc == '0'">-</span> <span v-if="record.nwcc == '0'">-</span>
<span v-else> <span v-else>
<template v-if="record.zyfilestateid == '3'"> <template v-if="record.zyfilestateid == '3'">
<span :title="record.zymessage?record.zymessage:'暂无原因,请联系管理员'" style="color:red;">检测失败</span> <span :title="record.zymessage ? record.zymessage : '暂无原因,请联系管理员'" style="color: red">检测失败</span>
</template> </template>
<template v-else> <template v-else>
<span v-if="text=='通过'" style="color: green;padding: 5px 15px;cursor:pointer" title="通过(点击可查看对比结果)" @click="handleYulan(record.zypaperviewurl)">{{record.nwxsl}}%</span> <span
<span v-else-if="text=='未通过'" style="color: red;padding: 5px 15px;cursor:pointer" title="未通过(点击可查看对比结果)" @click="handleYulan(record.zypaperviewurl)">{{record.nwxsl}}%</span> v-if="text == '通过'"
style="color: green; padding: 5px 15px; cursor: pointer"
title="通过(点击可查看对比结果)"
@click="handleYulan(record.zypaperviewurl)"
>{{ record.nwxsl }}%</span
>
<span
v-else-if="text == '未通过'"
style="color: red; padding: 5px 15px; cursor: pointer"
title="未通过(点击可查看对比结果)"
@click="handleYulan(record.zypaperviewurl)"
>{{ record.nwxsl }}%</span
>
<span v-else-if="text && text.indexOf('失败') > -1" style="color: red; padding: 5px 15px; cursor: pointer" :title="text">{{ text }}</span> <span v-else-if="text && text.indexOf('失败') > -1" style="color: red; padding: 5px 15px; cursor: pointer" :title="text">{{ text }}</span>
<span v-else> <span v-else>
<span v-if="record.filePath">检测中</span> <span v-if="record.filePath">检测中</span>
@ -69,11 +93,23 @@
<span v-if="record.aigccc == '0'">-</span> <span v-if="record.aigccc == '0'">-</span>
<span v-else> <span v-else>
<template v-if="record.aigcfilestateid == '3'"> <template v-if="record.aigcfilestateid == '3'">
<span :title="record.aigcmessage?record.aigcmessage:'暂无原因,请联系管理员'" style="color:red;">检测失败</span> <span :title="record.aigcmessage ? record.aigcmessage : '暂无原因,请联系管理员'" style="color: red">检测失败</span>
</template> </template>
<template v-else> <template v-else>
<span v-if="text=='通过'" style="color: green;padding: 5px 15px;cursor:pointer" title="通过(点击可查看对比结果)" @click="handleYulan(record.aigcpaperviewurl)">{{record.aigcxsl}}%</span> <span
<span v-else-if="text=='未通过'" style="color: red;padding: 5px 15px;cursor:pointer" title="未通过(点击可查看对比结果)" @click="handleYulan(record.aigcpaperviewurl)">{{record.aigcxsl}}%</span> v-if="text == '通过'"
style="color: green; padding: 5px 15px; cursor: pointer"
title="通过(点击可查看对比结果)"
@click="handleYulan(record.aigcpaperviewurl)"
>{{ record.aigcxsl }}%</span
>
<span
v-else-if="text == '未通过'"
style="color: red; padding: 5px 15px; cursor: pointer"
title="未通过(点击可查看对比结果)"
@click="handleYulan(record.aigcpaperviewurl)"
>{{ record.aigcxsl }}%</span
>
<span v-else-if="text && text.indexOf('失败') > -1" style="color: red; padding: 5px 15px; cursor: pointer" :title="text">{{ text }}</span> <span v-else-if="text && text.indexOf('失败') > -1" style="color: red; padding: 5px 15px; cursor: pointer" :title="text">{{ text }}</span>
<span v-else> <span v-else>
<span v-if="record.filePath">检测中</span> <span v-if="record.filePath">检测中</span>
@ -86,11 +122,23 @@
<span v-if="record.xncc == '0'">-</span> <span v-if="record.xncc == '0'">-</span>
<span v-else> <span v-else>
<template v-if="record.xxfilestateid == '3'"> <template v-if="record.xxfilestateid == '3'">
<span :title="record.xxmessage?record.xxmessage:'暂无原因,请联系管理员'" style="color:red;">检测失败</span> <span :title="record.xxmessage ? record.xxmessage : '暂无原因,请联系管理员'" style="color: red">检测失败</span>
</template> </template>
<template v-else> <template v-else>
<span v-if="text=='通过'" style="color: green;padding: 5px 15px;cursor:pointer" title="通过(点击可查看对比结果)" @click="handleYulan(record.xxpaperviewurl)">{{record.xnxsl}}%</span> <span
<span v-else-if="text=='未通过'" style="color: red;padding: 5px 15px;cursor:pointer" title="未通过(点击可查看对比结果)" @click="handleYulan(record.xxpaperviewurl)">{{record.xnxsl}}%</span> v-if="text == '通过'"
style="color: green; padding: 5px 15px; cursor: pointer"
title="通过(点击可查看对比结果)"
@click="handleYulan(record.xxpaperviewurl)"
>{{ record.xnxsl }}%</span
>
<span
v-else-if="text == '未通过'"
style="color: red; padding: 5px 15px; cursor: pointer"
title="未通过(点击可查看对比结果)"
@click="handleYulan(record.xxpaperviewurl)"
>{{ record.xnxsl }}%</span
>
<span v-else-if="text && text.indexOf('失败') > -1" style="color: red; padding: 5px 15px; cursor: pointer" :title="text">{{ text }}</span> <span v-else-if="text && text.indexOf('失败') > -1" style="color: red; padding: 5px 15px; cursor: pointer" :title="text">{{ text }}</span>
<span v-else> <span v-else>
<span v-if="record.filePath">检测中</span> <span v-if="record.filePath">检测中</span>
@ -149,7 +197,6 @@
// const registerScoreModal = ref(); // const registerScoreModal = ref();
// const SzybStudentModalpage = ref(); // const SzybStudentModalpage = ref();
const registerModal = ref(); const registerModal = ref();
const ZyInfoStudentListModalPage = ref(); const ZyInfoStudentListModalPage = ref();
const ZyInfoStudentModalPage = ref(); const ZyInfoStudentModalPage = ref();
@ -172,23 +219,24 @@
order: 'ascend', order: 'ascend',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
params.column = 'createTime',params.order = 'desc';// (params.column = 'createTime'), (params.order = 'desc'); //
return Object.assign(params, queryParam.value); return Object.assign(params, queryParam.value);
}, },
}, },
exportConfig: { exportConfig: {
name: "学生作业信息", name: '学生作业信息',
url: getExportUrl, url: getExportUrl,
params: () => { params: () => {
return Object.assign({}, queryParam.value); return Object.assign({}, queryParam.value);
} },
}, },
importConfig: { importConfig: {
url: getImportUrl, url: getImportUrl,
success: handleSuccess success: handleSuccess,
}, },
}); });
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext; const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
tableContext;
const labelCol = reactive({ const labelCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 7 }, sm: { span: 7 },
@ -198,7 +246,6 @@
sm: { span: 16 }, sm: { span: 16 },
}); });
/** /**
* 详情 * 详情
*/ */
@ -215,14 +262,14 @@
createMessage.error('还未到提交作业时间!'); createMessage.error('还未到提交作业时间!');
return; return;
} }
let endTimestamp = Date.parse(record.endTime+" 23:59:59"); let endTimestamp = Date.parse(record.endTime + ' 23:59:59');
if (timestamp > endTimestamp) { if (timestamp > endTimestamp) {
createMessage.error('提交作业时间已过!'); createMessage.error('提交作业时间已过!');
return; return;
} }
ZyInfoStudentModalPage.value.disableSubmit = false; ZyInfoStudentModalPage.value.disableSubmit = false;
var param = {id:record.stuId,zyfj:record.filePath} var param = { id: record.stuId, zyfj: record.filePath };
ZyInfoStudentModalPage.value.edit(param); ZyInfoStudentModalPage.value.edit(param);
// createConfirm({ // createConfirm({
// iconType: 'warning', // iconType: 'warning',
@ -240,16 +287,15 @@
// //
function handlePreview(record) { function handlePreview(record) {
var url2 = getFileAccessHttpUrl(record.stuPdfPath) var url2 = getFileAccessHttpUrl(record.stuPdfPath);
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2); let url = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(url2);
window.open(url,"_blank") window.open(url, '_blank');
} }
function handleDownload(record) { function handleDownload(record) {
downloadFile(record.stuFilePath) downloadFile(record.stuFilePath);
} }
/** /**
* 成功回调 * 成功回调
*/ */
@ -266,14 +312,14 @@
* 操作栏 * 操作栏
*/ */
function getTableAction(record) { function getTableAction(record) {
console.log('👎', record);
// <a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;background:rgb(28, 132, 198);"></a-button> // <a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;background:rgb(28, 132, 198);"></a-button>
// <a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="!item.stuFilePath"></a-button> // <a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="!item.stuFilePath"></a-button>
// <a-button type="primary" @click="handleDownload(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.stuFilePath"></a-button> // <a-button type="primary" @click="handleDownload(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.stuFilePath"></a-button>
// <a-button type="primary" @click="handlePreview(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.stuFilePath"></a-button> // <a-button type="primary" @click="handlePreview(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.stuFilePath"></a-button>
if(record.filePath){ if (record.stuFilePath) {
var list = [ var list = [
{ {
label: '详情', label: '详情',
@ -302,10 +348,9 @@
]; ];
return list; return list;
} }
} }
function handleYulan(text) { function handleYulan(text) {
window.open(text,"_blank") window.open(text, '_blank');
} }
/** /**
@ -336,13 +381,9 @@ function handleYulan(text){
reload(); reload();
} }
defineExpose({ defineExpose({
init, init,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -359,7 +400,7 @@ function handleYulan(text){
.query-group-split-cust { .query-group-split-cust {
width: 30px; width: 30px;
display: inline-block; display: inline-block;
text-align: center text-align: center;
} }
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="background: #fff;height: calc(100vh - 225px);overflow-y: auto;overflow-x: hidden;margin: 10px 0;"> <div style="background: #fff; height: calc(100vh - 225px); overflow-y: auto; overflow-x: hidden; margin: 10px 0">
<!--查询区域--> <!--查询区域-->
<!-- <div class="jeecg-basic-table-form-container"> <!-- <div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -21,14 +21,14 @@
</a-form> </a-form>
</div> --> </div> -->
<a-row> <a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;"> <a-col :span="12" 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> <div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198)"></div>
<a-card style="height: 300px;border: 1px solid rgb(28, 132, 198);"> <a-card style="height: 300px; border: 1px solid rgb(28, 132, 198)">
<div class="rotate" :style="classFun(item)">{{ callText(item) }}</div> <div class="rotate" :style="classFun(item)">{{ callText(item) }}</div>
<a-row style="top: -48px;position: relative;"> <a-row style="top: -48px; position: relative">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;" :title="item.title"> <a-col :span="24" style="margin-bottom: 10px; height: 53px; overflow: hidden" :title="item.title">
<!-- <div style="font-size: 18px;font-weight: bold;" class="ellipsis">{{item.title}}</div> --> <!-- <div style="font-size: 18px;font-weight: bold;" class="ellipsis">{{item.title}}</div> -->
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div> <div style="font-size: 18px; font-weight: bold">{{ item.title }}</div>
</a-col> </a-col>
<a-col :span="24" class="zyCon">开始时间{{ dayjs(item.startTime).format('YYYY.MM.DD HH:mm') }}</a-col> <a-col :span="24" class="zyCon">开始时间{{ dayjs(item.startTime).format('YYYY.MM.DD HH:mm') }}</a-col>
<a-col :span="24" class="zyCon">结束时间{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</a-col> <a-col :span="24" class="zyCon">结束时间{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</a-col>
@ -36,25 +36,38 @@
<div style="float: left">评分{{ item.stuscore ? item.stuscore : '未评' }}</div> <div style="float: left">评分{{ item.stuscore ? item.stuscore : '未评' }}</div>
</a-col> </a-col>
<a-col :span="24" class="zyCon"> <a-col :span="24" class="zyCon">
<div style="float:left;" :title="item.wwsftg">网络查重:{{getCctype(item,"1")}}</div> <div style="float: left" :title="item.wwsftg">网络查重:{{ getCctype(item, '1') }}</div>
<div style="float:right" :title="item.nwsftg">作业查重:{{getCctype(item,"2")}}</div> <div style="float: right" :title="item.nwsftg">作业查重:{{ getCctype(item, '2') }}</div>
</a-col> </a-col>
<a-col :span="24" class="zyCon"> <a-col :span="24" class="zyCon">
<div style="float:left;" :title="item.aigcsftg">Aigc查重:{{getCctype(item,"3")}}</div> <div style="float: left" :title="item.aigcsftg">Aigc查重:{{ getCctype(item, '3') }}</div>
<div style="float:right" :title="item.xnsftg">校内查重:{{getCctype(item,"4")}}</div> <div style="float: right" :title="item.xnsftg">校内查重:{{ getCctype(item, '4') }}</div>
</a-col> </a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;"> <a-col :span="24" style="text-align: center; margin-top: 20px">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;background:rgb(28, 132, 198);">详情</a-button> <a-button type="primary" @click="handleDetail(item)" style="margin-left: 5px; background: rgb(28, 132, 198)">详情</a-button>
<a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="!item.stuFilePath">上传</a-button> <a-button
<a-button type="primary" @click="handleDownload(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.stuFilePath">下载</a-button> type="primary"
<a-button type="primary" @click="handlePreview(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.stuFilePath">预览</a-button> @click="handleShangchuan(item)"
style="margin-left: 5px; background: rgb(28, 132, 198)"
v-if="!item.stuFilePath"
>上传</a-button
>
<a-button type="primary" @click="handleDownload(item)" style="margin-left: 5px; background: rgb(28, 132, 198)" v-if="item.stuFilePath"
>下载</a-button
>
<a-button type="primary" @click="handlePreview(item)" style="margin-left: 5px; background: rgb(28, 132, 198)" v-if="item.stuFilePath"
>预览</a-button
>
<a-button type="primary" @click="handleHuping(item)" style="margin-left: 5px; background: rgb(28, 132, 198)" v-if="handleSfkshp(item)"
>互评</a-button
>
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<div v-show="tableData.length > 0"> <div v-show="tableData.length > 0">
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/> <a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right" />
</div> </div>
<div v-show="tableData.length == 0"> <div v-show="tableData.length == 0">
<a-empty /> <a-empty />
@ -75,7 +88,7 @@
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { Input, Popover, Pagination, Empty } from 'ant-design-vue'; import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage"; import { useMessage } from '/@/hooks/web/useMessage';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
@ -106,7 +119,7 @@
const tableData = ref<any>([]); const tableData = ref<any>([]);
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl; const baseApiUrl = globSetting.domainUrl;
let router = useRouter();
const labelCol = reactive({ const labelCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
@ -117,63 +130,80 @@ const baseApiUrl = globSetting.domainUrl;
sm: { span: 16 }, sm: { span: 16 },
}); });
function handleSfkshp(record){
var sfkshp = record.xshpkg;
var xshpkssj = new Date(record.xshpkssj);
var xshpjssj = new Date(record.xshpjssj);
var nowTime = new Date();
if(sfkshp == '1' && nowTime.getTime()>=xshpkssj.getTime() && nowTime.getTime()<=xshpjssj.getTime()){
return true;
}
return false;
}
function handleHuping(record) {
console.log('🧒', record);
var href = '/stuzy/zyhp';
router.push({ path: href, query: { rwbh, xqxn, type, teano, zyStuId: record.stuId, mainId: record.id } });
}
function getCctype(record, type) { function getCctype(record, type) {
var text="-"; var text = '-';
if (type == '1') { if (type == '1') {
if (record.wwcc == 'true') { if (record.wwcc == 'true') {
if (record.wwxsl) { if (record.wwxsl) {
text = record.wwxsl+"%"; text = record.wwxsl + '%';
}else if(record.wwsftg&&record.wwsftg.indexOf("失败")!=-1){ } else if (record.wwsftg && record.wwsftg.indexOf('失败') != -1) {
text = "失败"; text = '失败';
} else if (record.stuFilePath) { } else if (record.stuFilePath) {
text = "检测中"; text = '检测中';
} else { } else {
text = "待提交"; text = '待提交';
} }
} else { } else {
text = "不查重"; text = '不查重';
} }
} else if (type == '2') { } else if (type == '2') {
if (record.nwcc == 'true') { if (record.nwcc == 'true') {
if (record.nwxsl) { if (record.nwxsl) {
text = record.nwxsl+"%"; text = record.nwxsl + '%';
}else if(record.nwsftg&&record.nwsftg.indexOf("失败")!=-1){ } else if (record.nwsftg && record.nwsftg.indexOf('失败') != -1) {
text = "失败"; text = '失败';
} else if (record.stuFilePath) { } else if (record.stuFilePath) {
text = "检测中"; text = '检测中';
} else { } else {
text = "待提交"; text = '待提交';
} }
} else { } else {
text = "不查重"; text = '不查重';
} }
} else if (type == '3') { } else if (type == '3') {
if (record.aigccc == 'true') { if (record.aigccc == 'true') {
if (record.aigcxsl) { if (record.aigcxsl) {
text = record.aigcxsl+"%"; text = record.aigcxsl + '%';
}else if(record.aigcsftg&&record.aigcsftg.indexOf("失败")!=-1){ } else if (record.aigcsftg && record.aigcsftg.indexOf('失败') != -1) {
text = "失败"; text = '失败';
} else if (record.stuFilePath) { } else if (record.stuFilePath) {
text = "检测中"; text = '检测中';
} else { } else {
text = "待提交"; text = '待提交';
} }
} else { } else {
text = "不查重"; text = '不查重';
} }
} else if (type == '4') { } else if (type == '4') {
if (record.xncc == 'true') { if (record.xncc == 'true') {
if (record.xnxsl) { if (record.xnxsl) {
text = record.xnxsl+"%"; text = record.xnxsl + '%';
}else if(record.xnsftg&&record.xnsftg.indexOf("失败")!=-1){ } else if (record.xnsftg && record.xnsftg.indexOf('失败') != -1) {
text = "失败"; text = '失败';
} else if (record.stuFilePath) { } else if (record.stuFilePath) {
text = "检测中"; text = '检测中';
} else { } else {
text = "待提交"; text = '待提交';
} }
} else { } else {
text = "不查重"; text = '不查重';
} }
} }
return text; return text;
@ -181,20 +211,20 @@ const baseApiUrl = globSetting.domainUrl;
function classFun(record) { function classFun(record) {
if (record.stuscore) { if (record.stuscore) {
return "background: #18a689"; return 'background: #18a689';
} else if (record.stuFilePath) { } else if (record.stuFilePath) {
return "background: #c6c209"; return 'background: #c6c209';
} else { } else {
return "background: #fe1a1a"; return 'background: #fe1a1a';
} }
} }
function callText(record) { function callText(record) {
if (record.stuscore) { if (record.stuscore) {
return "已完成"; return '已完成';
} else if (record.stuFilePath) { } else if (record.stuFilePath) {
return "待评分"; return '待评分';
} else { } else {
return "待提交"; return '待提交';
} }
} }
/** /**
@ -213,14 +243,14 @@ const baseApiUrl = globSetting.domainUrl;
createMessage.error('还未到提交作业时间!'); createMessage.error('还未到提交作业时间!');
return; return;
} }
let endTimestamp = Date.parse(record.endTime+" 23:59:59"); let endTimestamp = Date.parse(record.endTime);
if (timestamp > endTimestamp) { if (timestamp > endTimestamp) {
createMessage.error('提交作业时间已过!'); createMessage.error('提交作业时间已过!');
return; return;
} }
ZyInfoStudentModalPage.value.disableSubmit = false; ZyInfoStudentModalPage.value.disableSubmit = false;
var param = {id:record.stuId,zyfj:record.filePath} var param = { id: record.stuId, zyfj: record.filePath };
ZyInfoStudentModalPage.value.edit(param); ZyInfoStudentModalPage.value.edit(param);
// createConfirm({ // createConfirm({
// iconType: 'warning', // iconType: 'warning',
@ -238,18 +268,18 @@ const baseApiUrl = globSetting.domainUrl;
// //
function handlePreview(record) { function handlePreview(record) {
var url2 = getFileAccessHttpUrl(record.stuPdfPath) var url2 = getFileAccessHttpUrl(record.stuPdfPath);
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2); let url = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(url2);
window.open(url,"_blank") window.open(url, '_blank');
} }
function handleDownload(record) { function handleDownload(record) {
downloadFile(record.stuFilePath) downloadFile(record.stuFilePath);
} }
// //
function openXkrs(record) { function openXkrs(record) {
console.log(`🚀 ~ openXkrs ~ record:`, record) console.log(`🚀 ~ openXkrs ~ record:`, record);
XxhbbksListModalPage.value.disableSubmit = false; XxhbbksListModalPage.value.disableSubmit = false;
XxhbbksListModalPage.value.init(record); XxhbbksListModalPage.value.init(record);
} }
@ -261,7 +291,6 @@ const baseApiUrl = globSetting.domainUrl;
reload(); reload();
} }
/** /**
* 查询 * 查询
*/ */
@ -287,9 +316,9 @@ const baseApiUrl = globSetting.domainUrl;
queryParam.value.xqxn = xqxn; queryParam.value.xqxn = xqxn;
queryParam.value.teano = teano; queryParam.value.teano = teano;
queryParam.value.zyStatus = '1,2,3,4'; queryParam.value.zyStatus = '1,2,3,4';
queryParam.value.column="createTime"; queryParam.value.column = 'createTime';
queryParam.value.order="desc"; queryParam.value.order = 'desc';
defHttp.get({ url: '/zyInfo/zyInfo/stuList', params: queryParam.value }).then(res => { defHttp.get({ url: '/zyInfo/zyInfo/stuList', params: queryParam.value }).then((res) => {
// console.log(`🚀 ~ defHttp.get ~ res:`, res) // console.log(`🚀 ~ defHttp.get ~ res:`, res)
total.value = res.total; total.value = res.total;
pageNo.value = res.pages; pageNo.value = res.pages;
@ -298,7 +327,6 @@ const baseApiUrl = globSetting.domainUrl;
}); });
} }
function handlePageChange(record) { function handlePageChange(record) {
current.value = record; current.value = record;
reload(); reload();
@ -307,7 +335,6 @@ const baseApiUrl = globSetting.domainUrl;
onMounted(() => { onMounted(() => {
searchQuery(); searchQuery();
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -326,7 +353,7 @@ const baseApiUrl = globSetting.domainUrl;
.query-group-split-cust { .query-group-split-cust {
width: 30px; width: 30px;
display: inline-block; display: inline-block;
text-align: center text-align: center;
} }
} }
.jeecg-basic-table-form-container .ant-form { .jeecg-basic-table-form-container .ant-form {
@ -350,7 +377,7 @@ const baseApiUrl = globSetting.domainUrl;
padding: 19px 10px 3px 10px; padding: 19px 10px 3px 10px;
position: relative; position: relative;
top: -54px; top: -54px;
right: -131px; right: -200px;
text-align: center; text-align: center;
font-size: 11px; font-size: 11px;
} }

View File

@ -121,7 +121,7 @@
<a-form-item label="是否允许学生查看" :labelCol="labelCol2" :wrapperCol="wrapperCol2"> <a-form-item label="是否允许学生查看" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
<j-dict-select-tag type="radio" v-model:value="zyInfo.sturead" dictCode="yn" placeholder="请选择评分标准是否允许学生查看" /> <j-dict-select-tag type="radio" v-model:value="zyInfo.sturead" dictCode="yn" placeholder="请选择评分标准是否允许学生查看" />
</a-form-item> </a-form-item>
<a-form-item label=""> <a-form-item label="" v-if="zyInfo.sturead == '1'">
<j-editor v-model:value="zyInfo.pfbz" v-if="pfbzShow" @blur="handlePfbzShow(0)" /> <j-editor v-model:value="zyInfo.pfbz" v-if="pfbzShow" @blur="handlePfbzShow(0)" />
<div v-html="zyInfo.pfbz" v-if="!pfbzShow"></div> <div v-html="zyInfo.pfbz" v-if="!pfbzShow"></div>
<div class="tishi" @click="handlePfbzShow(1)">温馨提示点击可编辑评分标准</div> <div class="tishi" @click="handlePfbzShow(1)">温馨提示点击可编辑评分标准</div>
@ -130,7 +130,7 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="学生互评"> <a-form-item label="学生互评">
<div class="tishi">温馨提示每份作业至少互评3次每个学生互评5份作业</div> <div class="tishi" v-if="zyInfo.xshpkg == '1'">温馨提示每份作业至少互评3次每个学生互评5份作业</div>
<j-dict-select-tag <j-dict-select-tag
type="radio" type="radio"
v-model:value="zyInfo.xshpkg" v-model:value="zyInfo.xshpkg"
@ -140,11 +140,11 @@
@change="handleXshpkg" @change="handleXshpkg"
/> />
<div v-if="zyInfo.xshpkg == '1'"> <div v-if="zyInfo.xshpkg == '1'">
<a-form-item label="设置互评人数" :labelCol="labelCol3" :wrapperCol="wrapperCol3" style="margin-top: 20px"> <!-- <a-form-item label="设置互评人数" :labelCol="labelCol3" :wrapperCol="wrapperCol3" style="margin-top: 20px">
<a-input-number v-model:value="zyInfo.xshprsq" placeholder="请设置互评人数" style="width: 60%" :max="100" :min="0"> <a-input-number v-model:value="zyInfo.xshprsq" placeholder="请设置互评人数" style="width: 60%" :max="100" :min="0">
<template #addonAfter></template> <template #addonAfter></template>
</a-input-number> </a-input-number>
</a-form-item> </a-form-item> -->
<a-form-item label="互评成绩" :labelCol="labelCol3" :wrapperCol="wrapperCol3" style="margin-top: 20px"> <a-form-item label="互评成绩" :labelCol="labelCol3" :wrapperCol="wrapperCol3" style="margin-top: 20px">
<a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default"> <a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default">
<a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio> <a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio>
@ -334,7 +334,7 @@
<template #extra> 待设置 </template> <template #extra> 待设置 </template>
<p class="sznrClass">尚未布置作业题目及具体要求</p> <p class="sznrClass">尚未布置作业题目及具体要求</p>
<div style="text-align: center"> <div style="text-align: center">
<a @click="handleSzzynr(item)">设置作业内容及要求</a> <a @click="handleEdit(item, false)">设置作业内容及要求</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDelete(item)">删除</a> <a @click="handleDelete(item)">删除</a>
</div> </div>
@ -705,7 +705,7 @@ async function batchHandleFabu() {
createMessage.warning('您有未填写的评分信息,不可一键发布,请检查您的评分数据!'); createMessage.warning('您有未填写的评分信息,不可一键发布,请检查您的评分数据!');
return; return;
} else { } else {
await batchFabu({ ids: selectedRowKeys.value }, handleSuccess2); await batchFabu({ ids: selectedRowKeys.value }, reload);
} }
} }
@ -780,7 +780,7 @@ function handleBatchAdd() {
sfjx = 1; sfjx = 1;
break; break;
} }
cjbfb = cjbfb + score; cjbfb = parseInt(cjbfb) + parseInt(score);
if (score < 0 || score > 100) { if (score < 0 || score > 100) {
createMessage.error('作业成绩百分比必须在0-100之间'); createMessage.error('作业成绩百分比必须在0-100之间');
sfjx = 1; sfjx = 1;
@ -790,6 +790,10 @@ function handleBatchAdd() {
if (sfjx == 1) { if (sfjx == 1) {
return; return;
} }
if(cjbfb>100){
createMessage.error('本次作业占期末总成绩的百分比不得超过100%,当前作业总百分比为:'+cjbfb+'%');
return;
}
createConfirm({ createConfirm({
iconType: 'warning', iconType: 'warning',
@ -877,6 +881,80 @@ async function submitForm() {
} }
console.log('👕', model); console.log('👕', model);
var xshpkg = model.xshpkg;
if (xshpkg == '1') {
var sfzzcj = model.sfzzcj;
if (!sfzzcj) {
createMessage.warning('请先设置互评成绩是否为最终成绩!');
confirmLoading.value = false;
return;
}
var xssfck = model.xssfck;
if (!xssfck) {
createMessage.warning('请先设置是否允许学生看到互评成绩!');
confirmLoading.value = false;
return;
}
var xshpkssj = model.xshpkssj;
if (!xshpkssj) {
createMessage.warning('请先设置互评开始时间!');
confirmLoading.value = false;
return;
}
var xshpjssj = model.xshpjssj;
if (!xshpjssj) {
createMessage.warning('请先设置互评结束时间!');
confirmLoading.value = false;
return;
}
}
var wwtgl = model.wwtgl;
var wwcc = model.wwcc;
var xncc = model.xncc;
var nwcc = model.nwcc;
var aigccc = model.aigccc;
console.log('🚶‍♂️', model);
if (wwtgl) {
if ((wwcc == false && xncc == false && nwcc == false && aigccc == false) || (!wwcc && !xncc && !nwcc && !aigccc)) {
createMessage.warning('您设置了检测通过率,但您没设置查重方式,请先设置查重方式');
confirmLoading.value = false;
return;
}
console.log('1111111111', wwtgl, wwcc, xncc, aigccc);
} else {
console.log('22222222222', wwtgl, wwcc, xncc, aigccc);
if (wwcc == true || xncc == true || nwcc == true || aigccc == true || wwcc == 'true' || xncc == 'true' || nwcc == 'true' || aigccc == 'true') {
createMessage.warning('您设置了查重方式,但您没设置检测通过率,请先设置检测通过率');
confirmLoading.value = false;
return;
}
}
var xshpkssj = model.xshpkssj;
var xshpjssj = model.xshpjssj;
if (xshpkssj && xshpjssj) {
var xshpkssjTimestamp = Date.parse(xshpkssj);
var xshpjssjTimestamp = Date.parse(xshpjssj);
if (xshpkssjTimestamp > xshpjssjTimestamp) {
createMessage.warning('互评开始时间不能大于互评结束时间!');
confirmLoading.value = false;
return;
}
}
var endTime = model.endTime;
var startTime = model.startTime;
if (endTime && startTime) {
var endTimestamp = Date.parse(endTime);
var startTimestamp = Date.parse(startTime);
if (endTimestamp < startTimestamp) {
createMessage.warning('作业发布时间不能小于作业截止时间!');
confirmLoading.value = false;
return;
}
}
await saveOrUpdate(model, isUpdate.value) await saveOrUpdate(model, isUpdate.value)
.then((res) => { .then((res) => {
if (res.success) { if (res.success) {
@ -1033,6 +1111,9 @@ function handleZyxx(record, type) {
zyInfo.value = record; zyInfo.value = record;
handleShowType(3); handleShowType(3);
queryType.value = type; queryType.value = type;
rowSelection.value = [];
selectedRowKeys.value = [];
console.log('🧟‍♀️', rowSelection);
queryParam.value = {}; queryParam.value = {};
queryParam.value.mainId = record.id; queryParam.value.mainId = record.id;
queryParam.value.queryType = type; queryParam.value.queryType = type;

View File

@ -9,7 +9,7 @@
import ZyInfoForm from './ZyInfoDetailForm.vue' import ZyInfoForm from './ZyInfoDetailForm.vue'
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('80%'); const width = ref<number>(1000);
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();

View File

@ -80,18 +80,36 @@ export const newcolumns: BasicColumn[] = [
dataIndex: 'createBy', dataIndex: 'createBy',
sorter: true, sorter: true,
}, },
// {
// title: '学生评分',
// align: "center",
// dataIndex: 'publishTime',
// sorter: true,
// },
{ {
title: '教师评分', title: '教师评分',
align: "center", align: "center",
dataIndex: 'score', dataIndex: 'score',
sorter: true, sorter: true,
}, },
{
title: '学生评分',
align: "center",
dataIndex: 'xshpfs',
sorter: true,
},
{
title: '绩效分',
align: "center",
dataIndex: 'jxzf',
},
// {
// title: '绩效分2',
// align: "center",
// dataIndex: 'jxfs2',
// sorter: true,
// },
{
title: '最终得分',
align: "center",
dataIndex: 'zzdf',
sorter: true,
},
{ {
title: '最高查重率', title: '最高查重率',
align: "center", align: "center",

View File

@ -6,6 +6,7 @@ const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/zyInfoStudentHp/zyInfoStudentHp/list', list = '/zyInfoStudentHp/zyInfoStudentHp/list',
getHpxxList = '/zyInfoStudent/zyInfoStudent/getHpxxList', getHpxxList = '/zyInfoStudent/zyInfoStudent/getHpxxList',
getHpxxYpyList = '/zyInfoStudent/zyInfoStudent/getHpxxYpyList',
save='/zyInfoStudentHp/zyInfoStudentHp/add', save='/zyInfoStudentHp/zyInfoStudentHp/add',
saveOne='/zyInfoStudentHp/zyInfoStudentHp/saveOne', saveOne='/zyInfoStudentHp/zyInfoStudentHp/saveOne',
saveTwo='/zyInfoStudentHp/zyInfoStudentHp/saveTwo', saveTwo='/zyInfoStudentHp/zyInfoStudentHp/saveTwo',
@ -33,6 +34,7 @@ export const getImportUrl = Api.importExcel;
*/ */
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
export const getHpxxList = (params) => defHttp.get({ url: Api.getHpxxList, params }); export const getHpxxList = (params) => defHttp.get({ url: Api.getHpxxList, params });
export const getHpxxYpyList = (params) => defHttp.get({ url: Api.getHpxxYpyList, params });
/** /**
* *

View File

@ -5,39 +5,20 @@ import { render } from '/@/utils/common/renderUtils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '作业id', title: '评分日期',
align: "center", align: "center",
dataIndex: 'zyStuId' dataIndex: 'createTime'
},
{
title: '学生id',
align: "center",
dataIndex: 'stuId'
}, },
{ {
title: '评分', title: '评分',
align: "center", align: "center",
dataIndex: 'stuScore' dataIndex: 'stuScore'
}, },
{
title: '第几次',
align: "center",
dataIndex: 'verType'
},
{ {
title: '学生姓名', title: '学生姓名',
align: "center", align: "center",
dataIndex: 'stuName' dataIndex: 'stuName',
}, slots: { customRender: 'stuNameSlot' },
{
title: '是否采纳',
align: "center",
dataIndex: 'sfcn'
},
{
title: '作业主id',
align: "center",
dataIndex: 'mainId'
}, },
]; ];
@ -53,19 +34,36 @@ export const columnsZyhp: BasicColumn[] = [
dataIndex: 'studentName' dataIndex: 'studentName'
}, },
{ {
title: '作业下载', title: '作业预览',
align: "center", align: "center",
dataIndex: 'filePath', dataIndex: 'pdfPath',
slots: { customRender: 'fileSlot' }, slots: { customRender: 'fileSlot' },
}, },
{
title: '是否完成',
align: "center",
dataIndex: 'sfpf',
slots: { customRender: 'sfpfSlot' },
},
]; ];
export const columnsZyhpYhp: BasicColumn[] = [
{
title: '作业名称',
align: "center",
dataIndex: 'zytitle'
},
{
title: '学生姓名',
align: "center",
dataIndex: 'studentName'
},
{
title: '作业预览',
align: "center",
dataIndex: 'pdfPath',
slots: { customRender: 'fileSlot' },
},
{
title: '评分',
align: "center",
dataIndex: 'stuScore',
},
];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
]; ];

View File

@ -24,26 +24,6 @@
</div> </div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<!--<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
-->
</template>
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" /> <TableAction :actions="getTableAction(record)" />
@ -62,7 +42,7 @@
</template>--> </template>-->
<template #fileSlot="{ text }"> <template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span> <span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> <a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="openPdf(text)">预览</a-button>
</template> </template>
</BasicTable> </BasicTable>
<!-- 表单区域 --> <!-- 表单区域 -->
@ -85,20 +65,26 @@ import ZyInfoStudentHpOneModal from '/@/views/zy/zyInfoStudentHp/components/ZyIn
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { JInput } from '/@/components/Form'; import { JInput } from '/@/components/Form';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting';
import { useMessage } from '/@/hooks/web/useMessage';
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const { createMessage } = useMessage();
// //
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
const { query } = unref(currentRoute); const { query } = unref(currentRoute);
const { rwbh, xqxn, type, teano } = query; // const { rwbh, xqxn, type, teano ,mainId,zyStuId} = query; //
const toggleSearchStatus = ref<boolean>(false); const toggleSearchStatus = ref<boolean>(false);
const queryParam = ref<any>({rwbh}); const queryParam = ref<any>({rwbh,mainId});
const registerModal = ref(); const registerModal = ref();
const registerZyxxModal = ref(); const registerZyxxModal = ref();
const registerOneModal = ref(); const registerOneModal = ref();
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
title: '学生成绩互评',
api: getHpxxList, api: getHpxxList,
columns: columnsZyhp, columns: columnsZyhp,
canResize: false, canResize: false,
@ -132,6 +118,16 @@ const wrapperCol = reactive({
sm: { span: 16 }, sm: { span: 16 },
}); });
function openPdf(record) {
console.log('🤢', record);
if (record) {
var url2 = getFileAccessHttpUrl(record);
let url = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(url2);
window.open(url, '_blank');
} else {
createMessage.warning('暂无文件');
}
}
/** /**
* 新增事件 * 新增事件
*/ */
@ -157,6 +153,7 @@ function handleDetail(record: Recordable) {
} }
function handleOneScore(record: Recordable) { function handleOneScore(record: Recordable) {
record.zyStuId = record.id; record.zyStuId = record.id;
record.rwbh = record.rwbh;
registerOneModal.value.disableSubmit = false; registerOneModal.value.disableSubmit = false;
registerOneModal.value.edit(record); registerOneModal.value.edit(record);
} }

View File

@ -0,0 +1,234 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{ text }">
<div v-html="text"></div>
</template>
<template #sfpfSlot="{ text }">
<div v-if="text == '0'"></div>
<div v-if="text == '1'"></div>
</template>
<template #stuNameSlot="{ text }">
匿名
</template>
<!--省市区字段回显插槽-->
<!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>-->
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<ZyInfoStudentHpModal ref="registerModal" @success="handleSuccess"></ZyInfoStudentHpModal>
<ZyInfoDetailModal ref="registerZyxxModal" @success="handleSuccess"></ZyInfoDetailModal>
<ZyInfoStudentHpOneModal ref="registerOneModal" @success="handleSuccess"></ZyInfoStudentHpOneModal>
</div>
</template>
<script lang="ts" name="zyInfoStudentHp-zyInfoStudentHp" setup>
import { ref, reactive, unref } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, columnsZyhp } from './ZyInfoStudentHp.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getHpxxYpyList } from './ZyInfoStudentHp.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyInfoStudentHpModal from './components/ZyInfoStudentHpModal.vue';
import ZyInfoDetailModal from '/@/views/zy/zyInfo/components/ZyInfoDetailModal.vue';
import ZyInfoStudentHpOneModal from '/@/views/zy/zyInfoStudentHp/components/ZyInfoStudentHpOneModal.vue';
import { defHttp } from '/@/utils/http/axios';
import { JInput } from '/@/components/Form';
import { useRouter } from 'vue-router';
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh, xqxn, type, teano ,mainId,zyStuId} = query; //
const toggleSearchStatus = ref<boolean>(false);
const queryParam = ref<any>({rwbh,zyStuId});
const registerModal = ref();
const registerZyxxModal = ref();
const registerOneModal = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
api: list,
columns: columns,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
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();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
function handleOneScore(record: Recordable) {
record.zyStuId = record.id;
record.rwbh = record.rwbh;
registerOneModal.value.disableSubmit = false;
registerOneModal.value.edit(record);
}
/**
* 删除事件
*/
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 handleZyxxDetail(record: Recordable) {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: record.mainId } }).then((res) => {
console.log('😒', res);
registerZyxxModal.value.disableSubmit = true;
registerZyxxModal.value.edit(res);
});
}
/**
* 操作栏
*/
function getTableAction(record) {
if(record.sfpf == '0'){
return [
{
label: '作业信息',
onClick: handleZyxxDetail.bind(null, record),
},
{
label: '评分',
onClick: handleOneScore.bind(null, record),
},
];
}else{
return [
{
label: '作业信息',
onClick: handleZyxxDetail.bind(null, record),
},
];
}
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
];
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
</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,268 @@
<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="8" :sm="24">
<a-form-item label="作业名称">
<a-input placeholder="请输入作业名称" v-model:value="queryParam.zytitle"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8" :sm="24">
<a-form-item label="学生姓名">
<j-input placeholder="请输入学生姓名" v-model:value="queryParam.studentName"></j-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="8" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{ text }">
<div v-html="text"></div>
</template>
<template #sfpfSlot="{ text }">
<div v-if="text == '0'"></div>
<div v-if="text == '1'"></div>
</template>
<!--省市区字段回显插槽-->
<!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>-->
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="openPdf(text)">预览</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<ZyInfoStudentHpModal ref="registerModal" @success="handleSuccess"></ZyInfoStudentHpModal>
<ZyInfoDetailModal ref="registerZyxxModal" @success="handleSuccess"></ZyInfoDetailModal>
<ZyInfoStudentHpOneModal ref="registerOneModal" @success="handleSuccess"></ZyInfoStudentHpOneModal>
</div>
</template>
<script lang="ts" name="zyInfoStudentHp-zyInfoStudentHp" setup>
import { ref, reactive, unref } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, columnsZyhpYhp } from './ZyInfoStudentHp.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getHpxxYpyList } from './ZyInfoStudentHp.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyInfoStudentHpModal from './components/ZyInfoStudentHpModal.vue';
import ZyInfoDetailModal from '/@/views/zy/zyInfo/components/ZyInfoDetailModal.vue';
import ZyInfoStudentHpOneModal from '/@/views/zy/zyInfoStudentHp/components/ZyInfoStudentHpOneModal.vue';
import { defHttp } from '/@/utils/http/axios';
import { JInput } from '/@/components/Form';
import { useRouter } from 'vue-router';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting';
import { useMessage } from '/@/hooks/web/useMessage';
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const { createMessage } = useMessage();
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh, xqxn, type, teano, mainId, zyStuId } = query; //
const toggleSearchStatus = ref<boolean>(false);
const queryParam = ref<any>({ rwbh, mainId });
const registerModal = ref();
const registerZyxxModal = ref();
const registerOneModal = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
api: getHpxxYpyList,
columns: columnsZyhpYhp,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
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 openPdf(record) {
console.log('🤢', record);
if (record) {
var url2 = getFileAccessHttpUrl(record);
let url = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(url2);
window.open(url, '_blank');
} else {
createMessage.warning('暂无文件');
}
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
function handleOneScore(record: Recordable) {
record.zyStuId = record.id;
record.rwbh = record.rwbh;
registerOneModal.value.disableSubmit = false;
registerOneModal.value.edit(record);
}
/**
* 删除事件
*/
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 handleZyxxDetail(record: Recordable) {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: record.mainId } }).then((res) => {
console.log('😒', res);
registerZyxxModal.value.disableSubmit = true;
registerZyxxModal.value.edit(res);
});
}
/**
* 操作栏
*/
function getTableAction(record) {
if (record.sfpf == '0') {
return [
{
label: '作业信息',
onClick: handleZyxxDetail.bind(null, record),
},
{
label: '评分',
onClick: handleOneScore.bind(null, record),
},
];
} else {
return [
{
label: '作业信息',
onClick: handleZyxxDetail.bind(null, record),
},
];
}
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
];
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
</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,40 @@
<template>
<div style="background: #fff; height: 97%; margin: 10px 0;padding:10px;">
<div style="text-align: right;width:100%;"><a-button type="primary" @click="handleback">返回</a-button></div>
<a-tabs v-model:activeKey="activeKey" @change="handleChange">
<a-tab-pane key="1" tab="待互评">
<ZyInfoStudentHpList />
</a-tab-pane>
<a-tab-pane key="2" tab="已互评" force-render>
<ZyInfoStudentHpYpyList />
</a-tab-pane>
<a-tab-pane key="3" tab="本次作业互评分数">
<ZyInfoStudentHpMyhpfsList />
</a-tab-pane>
</a-tabs>
</div>
</template>
<script lang="ts" name="zyInfo-zyInfo" setup>
import { ref, reactive, onMounted, unref } from 'vue';
import ZyInfoStudentHpList from '/@/views/zy/zyInfoStudentHp/ZyInfoStudentHpList.vue'
import ZyInfoStudentHpYpyList from '/@/views/zy/zyInfoStudentHp/ZyInfoStudentHpYpyList.vue'
import ZyInfoStudentHpMyhpfsList from '/@/views/zy/zyInfoStudentHp/ZyInfoStudentHpMyhpfsList.vue'
import { useRouter } from 'vue-router';
var activeKey = ref('1');
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh, xqxn, type, teano ,mainId,zyStuId} = query; //
let router = useRouter();
function handleChange(record) {
console.log('👩‍🚒', record);
}
function handleback(){
var href = "/stuzy/studentDqzy";
router.push({path:href,query: {rwbh,xqxn,type,teano}});
}
</script>
<style lang="less" scoped>
</style>

View File

@ -4,7 +4,7 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="评分" v-bind="validateInfos.stuScore"> <a-form-item label="评分" v-bind="validateInfos.stuScore">
<a-input v-model:value="formData.stuScore" placeholder="请输入评分" :disabled="disabled"></a-input> <a-input-number v-model:value="formData.stuScore" placeholder="请输入评分" :min="1" :max="100" style="width:300px;" :disabled="disabled"></a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -23,7 +23,7 @@
const props = defineProps({ const props = defineProps({
formDisabled: { type: Boolean, default: false }, formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => {} }, formData: { type: Object, default: () => {} },
formBpm: { type: Boolean, default: true } formBpm: { type: Boolean, default: true },
}); });
const formRef = ref(); const formRef = ref();
const useForm = Form.useForm; const useForm = Form.useForm;
@ -43,8 +43,7 @@
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } }); const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false); const confirmLoading = ref<boolean>(false);
// //
const validatorRules = { const validatorRules = {};
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true }); const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
// //
@ -59,7 +58,6 @@
return props.formDisabled; return props.formDisabled;
}); });
/** /**
* 新增 * 新增
*/ */
@ -102,6 +100,7 @@
} }
} }
} }
console.log('👚', model);
await saveOne(model, isUpdate.value) await saveOne(model, isUpdate.value)
.then((res) => { .then((res) => {
if (res.success) { if (res.success) {
@ -116,7 +115,6 @@
}); });
} }
defineExpose({ defineExpose({
add, add,
edit, edit,