添加新功能
This commit is contained in:
parent
d08cc33ff4
commit
a7aa31a923
|
@ -81,7 +81,7 @@ const stuzy: AppRouteModule = {
|
|||
{
|
||||
path: 'zyhp',
|
||||
name: 'zyhp',
|
||||
component: () => import('/@/views/zy/zyInfoStudentHp/ZyInfoStudentHpList.vue'),
|
||||
component: () => import('/@/views/zy/zyInfoStudentHp/ZyhpMainList.vue'),
|
||||
meta: {
|
||||
title: '作业互评',
|
||||
},
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<a-col :lg="6">
|
||||
<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="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>
|
||||
</span>
|
||||
</a-col>
|
||||
|
@ -68,7 +68,7 @@
|
|||
</div>
|
||||
<div v-if="!showYl">
|
||||
<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>
|
||||
<TeacherYulanList />
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div style="margin-top:20px;">
|
||||
<div style="margin-top: 20px">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<!-- <a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
|
@ -20,27 +20,39 @@
|
|||
</a-form> -->
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" style="margin-top:-20px;">
|
||||
<BasicTable @register="registerTable" style="margin-top: -20px">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template #htmlSlot="{text}">
|
||||
<template #htmlSlot="{ text }">
|
||||
<div v-html="text"></div>
|
||||
</template>
|
||||
<!--省市区字段回显插槽-->
|
||||
|
||||
<template #wwsftgaction="{text,record}">
|
||||
<span v-if="record.wwcc=='0'">-</span>
|
||||
<template #wwsftgaction="{ text, record }">
|
||||
<span v-if="record.wwcc == '0'">-</span>
|
||||
<span v-else>
|
||||
<template v-if="record.wwfilestateid=='3'">
|
||||
<span :title="record.wwmessage?record.wwmessage:'暂无原因,请联系管理员'" style="color:red;">检测失败</span>
|
||||
<template v-if="record.wwfilestateid == '3'">
|
||||
<span :title="record.wwmessage ? record.wwmessage : '暂无原因,请联系管理员'" style="color: red">检测失败</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<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-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>
|
||||
<span v-if="record.filePath">检测中</span>
|
||||
<span v-else>未提交</span>
|
||||
|
@ -48,16 +60,28 @@
|
|||
</template>
|
||||
</span>
|
||||
</template>
|
||||
<template #nwsftgaction="{text,record}">
|
||||
<span v-if="record.nwcc=='0'">-</span>
|
||||
<template #nwsftgaction="{ text, record }">
|
||||
<span v-if="record.nwcc == '0'">-</span>
|
||||
<span v-else>
|
||||
<template v-if="record.zyfilestateid=='3'">
|
||||
<span :title="record.zymessage?record.zymessage:'暂无原因,请联系管理员'" style="color:red;">检测失败</span>
|
||||
<template v-if="record.zyfilestateid == '3'">
|
||||
<span :title="record.zymessage ? record.zymessage : '暂无原因,请联系管理员'" style="color: red">检测失败</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<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-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>
|
||||
<span v-if="record.filePath">检测中</span>
|
||||
<span v-else>未提交</span>
|
||||
|
@ -65,16 +89,28 @@
|
|||
</template>
|
||||
</span>
|
||||
</template>
|
||||
<template #aigcsftgaction="{text,record}">
|
||||
<span v-if="record.aigccc=='0'">-</span>
|
||||
<template #aigcsftgaction="{ text, record }">
|
||||
<span v-if="record.aigccc == '0'">-</span>
|
||||
<span v-else>
|
||||
<template v-if="record.aigcfilestateid=='3'">
|
||||
<span :title="record.aigcmessage?record.aigcmessage:'暂无原因,请联系管理员'" style="color:red;">检测失败</span>
|
||||
<template v-if="record.aigcfilestateid == '3'">
|
||||
<span :title="record.aigcmessage ? record.aigcmessage : '暂无原因,请联系管理员'" style="color: red">检测失败</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<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-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>
|
||||
<span v-if="record.filePath">检测中</span>
|
||||
<span v-else>未提交</span>
|
||||
|
@ -82,16 +118,28 @@
|
|||
</template>
|
||||
</span>
|
||||
</template>
|
||||
<template #xnsftgaction="{text,record}">
|
||||
<span v-if="record.xncc=='0'">-</span>
|
||||
<template #xnsftgaction="{ text, record }">
|
||||
<span v-if="record.xncc == '0'">-</span>
|
||||
<span v-else>
|
||||
<template v-if="record.xxfilestateid=='3'">
|
||||
<span :title="record.xxmessage?record.xxmessage:'暂无原因,请联系管理员'" style="color:red;">检测失败</span>
|
||||
<template v-if="record.xxfilestateid == '3'">
|
||||
<span :title="record.xxmessage ? record.xxmessage : '暂无原因,请联系管理员'" style="color: red">检测失败</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<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-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>
|
||||
<span v-if="record.filePath">检测中</span>
|
||||
<span v-else>未提交</span>
|
||||
|
@ -109,257 +157,250 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="zyInfoStudent-zyInfoStudent" setup>
|
||||
import { ref, reactive,defineExpose,unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columnsStu } from '/@/views/zy/zyInfoStudent/ZyInfoStudent.data';
|
||||
import { stuList, deleteOne, batchDelete, getImportUrl, getExportUrl,batchFabu } from '/@/views/zy/zyInfoStudent/ZyInfoStudent.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
import { ref, reactive, defineExpose, unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columnsStu } from '/@/views/zy/zyInfoStudent/ZyInfoStudent.data';
|
||||
import { stuList, deleteOne, batchDelete, getImportUrl, getExportUrl, batchFabu } from '/@/views/zy/zyInfoStudent/ZyInfoStudent.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
|
||||
// import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue'
|
||||
// import SzybStudentModal from '/@/views/zy/zyInfoStudent/components/SzybStudentModal.vue';
|
||||
// import ZyInfoStudentScoreModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentScoreModal.vue'
|
||||
// import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue'
|
||||
// import SzybStudentModal from '/@/views/zy/zyInfoStudent/components/SzybStudentModal.vue';
|
||||
// import ZyInfoStudentScoreModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentScoreModal.vue'
|
||||
|
||||
import ZyInfoDetailModal from './components/ZyInfoDetailModal.vue';
|
||||
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { JInput } from '/@/components/Form';
|
||||
import { useRouter } from 'vue-router';
|
||||
import ZyInfoDetailModal from './components/ZyInfoDetailModal.vue';
|
||||
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { JInput } from '/@/components/Form';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh,xqxn,type,teano } = query;//获取传递参数
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh, xqxn, type, teano } = query; //获取传递参数
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
const globSetting = useGlobSetting();
|
||||
const baseApiUrl = globSetting.domainUrl;
|
||||
const globSetting = useGlobSetting();
|
||||
const baseApiUrl = globSetting.domainUrl;
|
||||
|
||||
const queryParam = ref<any>({rwbh,xqxn,teano,zyStatus:'1,2,3,4'});
|
||||
const mainId = ref<string>('');
|
||||
const queryParam = ref<any>({ rwbh, xqxn, teano, zyStatus: '1,2,3,4' });
|
||||
const mainId = ref<string>('');
|
||||
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
// const registerModal = ref();
|
||||
// const registerScoreModal = ref();
|
||||
// const SzybStudentModalpage = ref();
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
// const registerModal = ref();
|
||||
// const registerScoreModal = ref();
|
||||
// const SzybStudentModalpage = ref();
|
||||
|
||||
const registerModal = ref();
|
||||
const ZyInfoStudentListModalPage = ref();
|
||||
const ZyInfoStudentModalPage = ref();
|
||||
const XxhbbksListModalPage = ref();
|
||||
|
||||
const registerModal = ref();
|
||||
const ZyInfoStudentListModalPage = ref();
|
||||
const ZyInfoStudentModalPage = ref();
|
||||
const XxhbbksListModalPage = ref();
|
||||
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
api: stuList,
|
||||
columns:columnsStu,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: '150px',
|
||||
fixed: 'right',
|
||||
},
|
||||
showTableSetting: true,
|
||||
defSort: {
|
||||
field: 'name',
|
||||
order: 'ascend',
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = 'createTime',params.order = 'desc';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
api: stuList,
|
||||
columns: columnsStu,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: '150px',
|
||||
fixed: 'right',
|
||||
},
|
||||
exportConfig: {
|
||||
name: "学生作业信息",
|
||||
url: getExportUrl,
|
||||
params: () => {
|
||||
return Object.assign({},queryParam.value);
|
||||
}
|
||||
showTableSetting: true,
|
||||
defSort: {
|
||||
field: 'name',
|
||||
order: 'ascend',
|
||||
},
|
||||
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 },
|
||||
});
|
||||
beforeFetch: (params) => {
|
||||
(params.column = 'createTime'), (params.order = 'desc'); //新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '学生作业信息',
|
||||
url: getExportUrl,
|
||||
params: () => {
|
||||
return Object.assign({}, queryParam.value);
|
||||
},
|
||||
},
|
||||
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 handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
//上传作业附件
|
||||
function handleShangchuan(record){
|
||||
let timestamp = new Date().getTime();
|
||||
let startTimestamp = Date.parse(record.startTime);
|
||||
if(timestamp<startTimestamp){
|
||||
createMessage.error('还未到提交作业时间!');
|
||||
return;
|
||||
}
|
||||
let endTimestamp = Date.parse(record.endTime+" 23:59:59");
|
||||
if(timestamp>endTimestamp){
|
||||
createMessage.error('提交作业时间已过!');
|
||||
return;
|
||||
}
|
||||
|
||||
ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
var param = {id:record.stuId,zyfj:record.filePath}
|
||||
ZyInfoStudentModalPage.value.edit(param);
|
||||
// createConfirm({
|
||||
// iconType: 'warning',
|
||||
// title: '确认上传',
|
||||
// content: '作业上传后,不可修改,请仔细检查后提交',
|
||||
// okText: '确认',
|
||||
// cancelText: '取消',
|
||||
// onOk: () => {
|
||||
// ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
// var param = {id:record.stuId,zyfj:record.filePath}
|
||||
// ZyInfoStudentModalPage.value.edit(param);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
//预览
|
||||
function handlePreview(record){
|
||||
var url2 = getFileAccessHttpUrl(record.stuPdfPath)
|
||||
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
|
||||
window.open(url,"_blank")
|
||||
}
|
||||
|
||||
function handleDownload(record){
|
||||
downloadFile(record.stuFilePath)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
selectedRowKeys.value = [];
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleDown(text){
|
||||
downloadFile(text);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
|
||||
|
||||
// <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="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>
|
||||
|
||||
if(record.filePath){
|
||||
var list = [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleDownload.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '预览',
|
||||
onClick: handlePreview.bind(null, record),
|
||||
},
|
||||
];
|
||||
return list;
|
||||
}else{
|
||||
var list = [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '上传',
|
||||
onClick: handleShangchuan.bind(null, record),
|
||||
},
|
||||
];
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
function handleYulan(text){
|
||||
window.open(text,"_blank")
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
selectedRowKeys.value = [];
|
||||
reload();
|
||||
//上传作业附件
|
||||
function handleShangchuan(record) {
|
||||
let timestamp = new Date().getTime();
|
||||
let startTimestamp = Date.parse(record.startTime);
|
||||
if (timestamp < startTimestamp) {
|
||||
createMessage.error('还未到提交作业时间!');
|
||||
return;
|
||||
}
|
||||
let endTimestamp = Date.parse(record.endTime + ' 23:59:59');
|
||||
if (timestamp > endTimestamp) {
|
||||
createMessage.error('提交作业时间已过!');
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
queryParam.value.mainId = mainId;
|
||||
//刷新数据
|
||||
reload();
|
||||
ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
var param = { id: record.stuId, zyfj: record.filePath };
|
||||
ZyInfoStudentModalPage.value.edit(param);
|
||||
// createConfirm({
|
||||
// iconType: 'warning',
|
||||
// title: '确认上传',
|
||||
// content: '作业上传后,不可修改,请仔细检查后提交',
|
||||
// okText: '确认',
|
||||
// cancelText: '取消',
|
||||
// onOk: () => {
|
||||
// ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
// var param = {id:record.stuId,zyfj:record.filePath}
|
||||
// ZyInfoStudentModalPage.value.edit(param);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
//预览
|
||||
function handlePreview(record) {
|
||||
var url2 = getFileAccessHttpUrl(record.stuPdfPath);
|
||||
let url = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(url2);
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
function handleDownload(record) {
|
||||
downloadFile(record.stuFilePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
selectedRowKeys.value = [];
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleDown(text) {
|
||||
downloadFile(text);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
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="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>
|
||||
|
||||
if (record.stuFilePath) {
|
||||
var list = [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleDownload.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '预览',
|
||||
onClick: handlePreview.bind(null, record),
|
||||
},
|
||||
];
|
||||
return list;
|
||||
} else {
|
||||
var list = [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '上传',
|
||||
onClick: handleShangchuan.bind(null, record),
|
||||
},
|
||||
];
|
||||
return list;
|
||||
}
|
||||
}
|
||||
function handleYulan(text) {
|
||||
window.open(text, '_blank');
|
||||
}
|
||||
|
||||
function init(record){
|
||||
selectedRowKeys.value = [];
|
||||
queryParam.value = {};
|
||||
queryParam.value.mainId = record.id;
|
||||
queryParam.value.queryType = record.queryType;
|
||||
mainId.value = record.id;
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
selectedRowKeys.value = [];
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
queryParam.value.mainId = mainId;
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
selectedRowKeys.value = [];
|
||||
queryParam.value = {};
|
||||
queryParam.value.mainId = record.id;
|
||||
queryParam.value.queryType = record.queryType;
|
||||
mainId.value = record.id;
|
||||
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
|
||||
}
|
||||
.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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<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">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
|
@ -21,43 +21,56 @@
|
|||
</a-form>
|
||||
</div> -->
|
||||
<a-row>
|
||||
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
|
||||
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
|
||||
<a-card style="height: 300px;border: 1px solid rgb(28, 132, 198);">
|
||||
<div class="rotate" :style="classFun(item)">{{callText(item)}}</div>
|
||||
<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="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>
|
||||
<a-card style="height: 300px; border: 1px solid rgb(28, 132, 198)">
|
||||
<div class="rotate" :style="classFun(item)">{{ callText(item) }}</div>
|
||||
<a-row style="top: -48px; position: relative">
|
||||
<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;">{{item.title}}</div>
|
||||
<div style="font-size: 18px; font-weight: bold">{{ item.title }}</div>
|
||||
</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.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">
|
||||
<div style="float:left" >评分:{{item.stuscore?item.stuscore:'未评'}}分</div>
|
||||
<div style="float: left">评分:{{ item.stuscore ? item.stuscore : '未评' }}分</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="zyCon">
|
||||
<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: left" :title="item.wwsftg">网络查重:{{ getCctype(item, '1') }}</div>
|
||||
<div style="float: right" :title="item.nwsftg">作业查重:{{ getCctype(item, '2') }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="zyCon">
|
||||
<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: left" :title="item.aigcsftg">Aigc查重:{{ getCctype(item, '3') }}</div>
|
||||
<div style="float: right" :title="item.xnsftg">校内查重:{{ getCctype(item, '4') }}</div>
|
||||
</a-col>
|
||||
<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="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-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="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-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 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 v-show="tableData.length == 0">
|
||||
<a-empty />
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -70,265 +83,279 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="zyInfo-zyInfo" setup>
|
||||
import { ref, reactive, onMounted,unref } from 'vue';
|
||||
import { list, deleteOne } from './ZyInfo.api';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { useRouter } from 'vue-router';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import dayjs from 'dayjs';
|
||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||
import ZyInfoDetailModal from './components/ZyInfoDetailModal.vue';
|
||||
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||
import { ref, reactive, onMounted, unref } from 'vue';
|
||||
import { list, deleteOne } from './ZyInfo.api';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import dayjs from 'dayjs';
|
||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||
import ZyInfoDetailModal from './components/ZyInfoDetailModal.vue';
|
||||
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh,xqxn,type,teano } = query;//获取传递参数
|
||||
const APagination = Pagination;
|
||||
const { createConfirm,createMessage } = useMessage();
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const ZyInfoStudentListModalPage = ref();
|
||||
const ZyInfoStudentModalPage = ref();
|
||||
const XxhbbksListModalPage = ref();
|
||||
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 { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh, xqxn, type, teano } = query; //获取传递参数
|
||||
const APagination = Pagination;
|
||||
const { createConfirm, createMessage } = useMessage();
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const ZyInfoStudentListModalPage = ref();
|
||||
const ZyInfoStudentModalPage = ref();
|
||||
const XxhbbksListModalPage = ref();
|
||||
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 globSetting = useGlobSetting();
|
||||
const baseApiUrl = globSetting.domainUrl;
|
||||
let router = useRouter();
|
||||
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
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) {
|
||||
var text = '-';
|
||||
if (type == '1') {
|
||||
if (record.wwcc == 'true') {
|
||||
if (record.wwxsl) {
|
||||
text = record.wwxsl + '%';
|
||||
} else if (record.wwsftg && record.wwsftg.indexOf('失败') != -1) {
|
||||
text = '失败';
|
||||
} else if (record.stuFilePath) {
|
||||
text = '检测中';
|
||||
} else {
|
||||
text = '待提交';
|
||||
}
|
||||
} else {
|
||||
text = '不查重';
|
||||
}
|
||||
} else if (type == '2') {
|
||||
if (record.nwcc == 'true') {
|
||||
if (record.nwxsl) {
|
||||
text = record.nwxsl + '%';
|
||||
} else if (record.nwsftg && record.nwsftg.indexOf('失败') != -1) {
|
||||
text = '失败';
|
||||
} else if (record.stuFilePath) {
|
||||
text = '检测中';
|
||||
} else {
|
||||
text = '待提交';
|
||||
}
|
||||
} else {
|
||||
text = '不查重';
|
||||
}
|
||||
} else if (type == '3') {
|
||||
if (record.aigccc == 'true') {
|
||||
if (record.aigcxsl) {
|
||||
text = record.aigcxsl + '%';
|
||||
} else if (record.aigcsftg && record.aigcsftg.indexOf('失败') != -1) {
|
||||
text = '失败';
|
||||
} else if (record.stuFilePath) {
|
||||
text = '检测中';
|
||||
} else {
|
||||
text = '待提交';
|
||||
}
|
||||
} else {
|
||||
text = '不查重';
|
||||
}
|
||||
} else if (type == '4') {
|
||||
if (record.xncc == 'true') {
|
||||
if (record.xnxsl) {
|
||||
text = record.xnxsl + '%';
|
||||
} else if (record.xnsftg && record.xnsftg.indexOf('失败') != -1) {
|
||||
text = '失败';
|
||||
} else if (record.stuFilePath) {
|
||||
text = '检测中';
|
||||
} else {
|
||||
text = '待提交';
|
||||
}
|
||||
} else {
|
||||
text = '不查重';
|
||||
}
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
function classFun(record) {
|
||||
if (record.stuscore) {
|
||||
return 'background: #18a689';
|
||||
} else if (record.stuFilePath) {
|
||||
return 'background: #c6c209';
|
||||
} else {
|
||||
return 'background: #fe1a1a';
|
||||
}
|
||||
}
|
||||
function callText(record) {
|
||||
if (record.stuscore) {
|
||||
return '已完成';
|
||||
} else if (record.stuFilePath) {
|
||||
return '待评分';
|
||||
} else {
|
||||
return '待提交';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
//上传作业附件
|
||||
function handleShangchuan(record) {
|
||||
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;
|
||||
}
|
||||
|
||||
ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
var param = { id: record.stuId, zyfj: record.filePath };
|
||||
ZyInfoStudentModalPage.value.edit(param);
|
||||
// createConfirm({
|
||||
// iconType: 'warning',
|
||||
// title: '确认上传',
|
||||
// content: '作业上传后,不可修改,请仔细检查后提交',
|
||||
// okText: '确认',
|
||||
// cancelText: '取消',
|
||||
// onOk: () => {
|
||||
// ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
// var param = {id:record.stuId,zyfj:record.filePath}
|
||||
// ZyInfoStudentModalPage.value.edit(param);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
//预览
|
||||
function handlePreview(record) {
|
||||
var url2 = getFileAccessHttpUrl(record.stuPdfPath);
|
||||
let url = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(url2);
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
function handleDownload(record) {
|
||||
downloadFile(record.stuFilePath);
|
||||
}
|
||||
|
||||
//获取选课人数
|
||||
function openXkrs(record) {
|
||||
console.log(`🚀 ~ openXkrs ~ record:`, record);
|
||||
XxhbbksListModalPage.value.disableSubmit = false;
|
||||
XxhbbksListModalPage.value.init(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调,用于增加、修改、发布和撤回
|
||||
*/
|
||||
function handleSuccess() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
total.value = 1;
|
||||
handlePageChange(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
//刷新数据
|
||||
total.value = 1;
|
||||
handlePageChange(1);
|
||||
}
|
||||
|
||||
function reload() {
|
||||
queryParam.value.pageNo = current.value;
|
||||
queryParam.value.pageSize = pageSize.value;
|
||||
queryParam.value.rwbh = rwbh;
|
||||
queryParam.value.xqxn = xqxn;
|
||||
queryParam.value.teano = teano;
|
||||
queryParam.value.zyStatus = '1,2,3,4';
|
||||
queryParam.value.column = 'createTime';
|
||||
queryParam.value.order = 'desc';
|
||||
defHttp.get({ url: '/zyInfo/zyInfo/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 getCctype(record,type){
|
||||
var text="-";
|
||||
if(type=='1'){
|
||||
if(record.wwcc=='true'){
|
||||
if(record.wwxsl){
|
||||
text = record.wwxsl+"%";
|
||||
}else if(record.wwsftg&&record.wwsftg.indexOf("失败")!=-1){
|
||||
text = "失败";
|
||||
}else if(record.stuFilePath){
|
||||
text = "检测中";
|
||||
}else{
|
||||
text = "待提交";
|
||||
}
|
||||
}else{
|
||||
text = "不查重";
|
||||
}
|
||||
}else if(type=='2'){
|
||||
if(record.nwcc=='true'){
|
||||
if(record.nwxsl){
|
||||
text = record.nwxsl+"%";
|
||||
}else if(record.nwsftg&&record.nwsftg.indexOf("失败")!=-1){
|
||||
text = "失败";
|
||||
}else if(record.stuFilePath){
|
||||
text = "检测中";
|
||||
}else{
|
||||
text = "待提交";
|
||||
}
|
||||
}else{
|
||||
text = "不查重";
|
||||
}
|
||||
}else if(type=='3'){
|
||||
if(record.aigccc=='true'){
|
||||
if(record.aigcxsl){
|
||||
text = record.aigcxsl+"%";
|
||||
}else if(record.aigcsftg&&record.aigcsftg.indexOf("失败")!=-1){
|
||||
text = "失败";
|
||||
}else if(record.stuFilePath){
|
||||
text = "检测中";
|
||||
}else{
|
||||
text = "待提交";
|
||||
}
|
||||
}else{
|
||||
text = "不查重";
|
||||
}
|
||||
}else if(type=='4'){
|
||||
if(record.xncc=='true'){
|
||||
if(record.xnxsl){
|
||||
text = record.xnxsl+"%";
|
||||
}else if(record.xnsftg&&record.xnsftg.indexOf("失败")!=-1){
|
||||
text = "失败";
|
||||
}else if(record.stuFilePath){
|
||||
text = "检测中";
|
||||
}else{
|
||||
text = "待提交";
|
||||
}
|
||||
}else{
|
||||
text = "不查重";
|
||||
}
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
function classFun(record){
|
||||
if(record.stuscore){
|
||||
return "background: #18a689";
|
||||
}else if(record.stuFilePath){
|
||||
return "background: #c6c209";
|
||||
}else{
|
||||
return "background: #fe1a1a";
|
||||
}
|
||||
}
|
||||
function callText(record){
|
||||
if(record.stuscore){
|
||||
return "已完成";
|
||||
}else if(record.stuFilePath){
|
||||
return "待评分";
|
||||
}else{
|
||||
return "待提交";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
//上传作业附件
|
||||
function handleShangchuan(record){
|
||||
let timestamp = new Date().getTime();
|
||||
let startTimestamp = Date.parse(record.startTime);
|
||||
if(timestamp<startTimestamp){
|
||||
createMessage.error('还未到提交作业时间!');
|
||||
return;
|
||||
}
|
||||
let endTimestamp = Date.parse(record.endTime+" 23:59:59");
|
||||
if(timestamp>endTimestamp){
|
||||
createMessage.error('提交作业时间已过!');
|
||||
return;
|
||||
}
|
||||
|
||||
ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
var param = {id:record.stuId,zyfj:record.filePath}
|
||||
ZyInfoStudentModalPage.value.edit(param);
|
||||
// createConfirm({
|
||||
// iconType: 'warning',
|
||||
// title: '确认上传',
|
||||
// content: '作业上传后,不可修改,请仔细检查后提交',
|
||||
// okText: '确认',
|
||||
// cancelText: '取消',
|
||||
// onOk: () => {
|
||||
// ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
// var param = {id:record.stuId,zyfj:record.filePath}
|
||||
// ZyInfoStudentModalPage.value.edit(param);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
//预览
|
||||
function handlePreview(record){
|
||||
var url2 = getFileAccessHttpUrl(record.stuPdfPath)
|
||||
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
|
||||
window.open(url,"_blank")
|
||||
}
|
||||
|
||||
function handleDownload(record){
|
||||
downloadFile(record.stuFilePath)
|
||||
}
|
||||
|
||||
//获取选课人数
|
||||
function openXkrs(record){
|
||||
console.log(`🚀 ~ openXkrs ~ record:`, record)
|
||||
XxhbbksListModalPage.value.disableSubmit = false;
|
||||
XxhbbksListModalPage.value.init(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调,用于增加、修改、发布和撤回
|
||||
*/
|
||||
function handleSuccess() {
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
total.value = 1;
|
||||
handlePageChange(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
//刷新数据
|
||||
total.value = 1;
|
||||
handlePageChange(1);
|
||||
}
|
||||
|
||||
function reload(){
|
||||
queryParam.value.pageNo = current.value;
|
||||
queryParam.value.pageSize = pageSize.value;
|
||||
queryParam.value.rwbh = rwbh;
|
||||
queryParam.value.xqxn = xqxn;
|
||||
queryParam.value.teano = teano;
|
||||
queryParam.value.zyStatus = '1,2,3,4';
|
||||
queryParam.value.column="createTime";
|
||||
queryParam.value.order="desc";
|
||||
defHttp.get({ url: '/zyInfo/zyInfo/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 handlePageChange(record){
|
||||
current.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
searchQuery();
|
||||
});
|
||||
function handlePageChange(record) {
|
||||
current.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
searchQuery();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
width: 99%;
|
||||
.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 {
|
||||
padding: 0;
|
||||
width: 99%;
|
||||
.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;
|
||||
|
@ -340,7 +367,7 @@ const baseApiUrl = globSetting.domainUrl;
|
|||
white-space: nowrap; /* 确保文本在一行内显示 */
|
||||
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
||||
}
|
||||
.zyCon{
|
||||
.zyCon {
|
||||
line-height: 30px;
|
||||
}
|
||||
.rotate {
|
||||
|
@ -350,7 +377,7 @@ const baseApiUrl = globSetting.domainUrl;
|
|||
padding: 19px 10px 3px 10px;
|
||||
position: relative;
|
||||
top: -54px;
|
||||
right: -131px;
|
||||
right: -200px;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<a-form-item label="是否允许学生查看" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<j-dict-select-tag type="radio" v-model:value="zyInfo.sturead" dictCode="yn" placeholder="请选择评分标准是否允许学生查看" />
|
||||
</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)" />
|
||||
<div v-html="zyInfo.pfbz" v-if="!pfbzShow"></div>
|
||||
<div class="tishi" @click="handlePfbzShow(1)">温馨提示:点击可编辑评分标准</div>
|
||||
|
@ -130,7 +130,7 @@
|
|||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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
|
||||
type="radio"
|
||||
v-model:value="zyInfo.xshpkg"
|
||||
|
@ -140,11 +140,11 @@
|
|||
@change="handleXshpkg"
|
||||
/>
|
||||
<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">
|
||||
<template #addonAfter>人</template>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
</a-form-item> -->
|
||||
<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 :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio>
|
||||
|
@ -334,7 +334,7 @@
|
|||
<template #extra> 待设置 </template>
|
||||
<p class="sznrClass">尚未布置作业题目及具体要求</p>
|
||||
<div style="text-align: center">
|
||||
<a @click="handleSzzynr(item)">设置作业内容及要求</a>
|
||||
<a @click="handleEdit(item, false)">设置作业内容及要求</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(item)">删除</a>
|
||||
</div>
|
||||
|
@ -705,7 +705,7 @@ async function batchHandleFabu() {
|
|||
createMessage.warning('您有未填写的评分信息,不可一键发布,请检查您的评分数据!');
|
||||
return;
|
||||
} else {
|
||||
await batchFabu({ ids: selectedRowKeys.value }, handleSuccess2);
|
||||
await batchFabu({ ids: selectedRowKeys.value }, reload);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -780,7 +780,7 @@ function handleBatchAdd() {
|
|||
sfjx = 1;
|
||||
break;
|
||||
}
|
||||
cjbfb = cjbfb + score;
|
||||
cjbfb = parseInt(cjbfb) + parseInt(score);
|
||||
if (score < 0 || score > 100) {
|
||||
createMessage.error('作业成绩百分比必须在0-100之间!');
|
||||
sfjx = 1;
|
||||
|
@ -790,6 +790,10 @@ function handleBatchAdd() {
|
|||
if (sfjx == 1) {
|
||||
return;
|
||||
}
|
||||
if(cjbfb>100){
|
||||
createMessage.error('本次作业占期末总成绩的百分比不得超过100%,当前作业总百分比为:'+cjbfb+'%');
|
||||
return;
|
||||
}
|
||||
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
|
@ -877,6 +881,80 @@ async function submitForm() {
|
|||
}
|
||||
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)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
|
@ -1033,6 +1111,9 @@ function handleZyxx(record, type) {
|
|||
zyInfo.value = record;
|
||||
handleShowType(3);
|
||||
queryType.value = type;
|
||||
rowSelection.value = [];
|
||||
selectedRowKeys.value = [];
|
||||
console.log('🧟♀️', rowSelection);
|
||||
queryParam.value = {};
|
||||
queryParam.value.mainId = record.id;
|
||||
queryParam.value.queryType = type;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import ZyInfoForm from './ZyInfoDetailForm.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('80%');
|
||||
const width = ref<number>(1000);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
|
|
|
@ -80,18 +80,36 @@ export const newcolumns: BasicColumn[] = [
|
|||
dataIndex: 'createBy',
|
||||
sorter: true,
|
||||
},
|
||||
// {
|
||||
// title: '学生评分',
|
||||
// align: "center",
|
||||
// dataIndex: 'publishTime',
|
||||
// sorter: true,
|
||||
// },
|
||||
{
|
||||
title: '教师评分',
|
||||
align: "center",
|
||||
dataIndex: 'score',
|
||||
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: '最高查重率',
|
||||
align: "center",
|
||||
|
|
|
@ -6,6 +6,7 @@ const { createConfirm } = useMessage();
|
|||
enum Api {
|
||||
list = '/zyInfoStudentHp/zyInfoStudentHp/list',
|
||||
getHpxxList = '/zyInfoStudent/zyInfoStudent/getHpxxList',
|
||||
getHpxxYpyList = '/zyInfoStudent/zyInfoStudent/getHpxxYpyList',
|
||||
save='/zyInfoStudentHp/zyInfoStudentHp/add',
|
||||
saveOne='/zyInfoStudentHp/zyInfoStudentHp/saveOne',
|
||||
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 getHpxxList = (params) => defHttp.get({ url: Api.getHpxxList, params });
|
||||
export const getHpxxYpyList = (params) => defHttp.get({ url: Api.getHpxxYpyList, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
|
|
|
@ -5,39 +5,20 @@ import { render } from '/@/utils/common/renderUtils';
|
|||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '作业id',
|
||||
title: '评分日期',
|
||||
align: "center",
|
||||
dataIndex: 'zyStuId'
|
||||
},
|
||||
{
|
||||
title: '学生id',
|
||||
align: "center",
|
||||
dataIndex: 'stuId'
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '评分',
|
||||
align: "center",
|
||||
dataIndex: 'stuScore'
|
||||
},
|
||||
{
|
||||
title: '第几次',
|
||||
align: "center",
|
||||
dataIndex: 'verType'
|
||||
},
|
||||
{
|
||||
title: '学生姓名',
|
||||
align: "center",
|
||||
dataIndex: 'stuName'
|
||||
},
|
||||
{
|
||||
title: '是否采纳',
|
||||
align: "center",
|
||||
dataIndex: 'sfcn'
|
||||
},
|
||||
{
|
||||
title: '作业主id',
|
||||
align: "center",
|
||||
dataIndex: 'mainId'
|
||||
dataIndex: 'stuName',
|
||||
slots: { customRender: 'stuNameSlot' },
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -53,19 +34,36 @@ export const columnsZyhp: BasicColumn[] = [
|
|||
dataIndex: 'studentName'
|
||||
},
|
||||
{
|
||||
title: '作业下载',
|
||||
title: '作业预览',
|
||||
align: "center",
|
||||
dataIndex: 'filePath',
|
||||
dataIndex: 'pdfPath',
|
||||
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[] = [
|
||||
];
|
||||
|
|
|
@ -24,26 +24,6 @@
|
|||
</div>
|
||||
<!--引用表格-->
|
||||
<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 }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
|
@ -62,7 +42,7 @@
|
|||
</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>
|
||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="openPdf(text)">预览</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
|
@ -85,20 +65,26 @@ import ZyInfoStudentHpOneModal from '/@/views/zy/zyInfoStudentHp/components/ZyIn
|
|||
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 } = query; //获取传递参数
|
||||
const { rwbh, xqxn, type, teano ,mainId,zyStuId} = query; //获取传递参数
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const queryParam = ref<any>({rwbh});
|
||||
const queryParam = ref<any>({rwbh,mainId});
|
||||
const registerModal = ref();
|
||||
const registerZyxxModal = ref();
|
||||
const registerOneModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '学生成绩互评',
|
||||
api: getHpxxList,
|
||||
columns: columnsZyhp,
|
||||
canResize: false,
|
||||
|
@ -132,6 +118,16 @@ const wrapperCol = reactive({
|
|||
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) {
|
||||
record.zyStuId = record.id;
|
||||
record.rwbh = record.rwbh;
|
||||
registerOneModal.value.disableSubmit = false;
|
||||
registerOneModal.value.edit(record);
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -4,7 +4,7 @@
|
|||
<a-row>
|
||||
<a-col :span="24">
|
||||
<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-col>
|
||||
</a-row>
|
||||
|
@ -13,121 +13,119 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate,saveOne } from '../ZyInfoStudentHp.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: ()=>{} },
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
zyStuId: '',
|
||||
stuId: '',
|
||||
stuScore: '',
|
||||
verType: '',
|
||||
stuName: '',
|
||||
sfcn: '',
|
||||
mainId: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = {
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate, saveOne } from '../ZyInfoStudentHp.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => {} },
|
||||
formBpm: { type: Boolean, default: true },
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
zyStuId: '',
|
||||
stuId: '',
|
||||
stuScore: '',
|
||||
verType: '',
|
||||
stuName: '',
|
||||
sfcn: '',
|
||||
mainId: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = {};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
//赋值
|
||||
Object.assign(formData, record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
//赋值
|
||||
Object.assign(formData, record);
|
||||
console.log('👚', model);
|
||||
await saveOne(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOne(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
min-height: 500px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
}
|
||||
.antd-modal-form {
|
||||
min-height: 500px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue