修改作业功能
This commit is contained in:
parent
0e385479a2
commit
29f113c066
|
@ -38,6 +38,14 @@ const zuoye: AppRouteModule = {
|
|||
title: '当前作业',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'dqkcLszy',
|
||||
name: 'dqkcLszy',
|
||||
component: () => import('/@/views/zy/zyInfo/ZyInfoHistoryList.vue'),
|
||||
meta: {
|
||||
title: '历史作业',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'dqkcGongju',
|
||||
name: 'dqkcGongju',
|
||||
|
|
|
@ -50,7 +50,7 @@ function toWeek(week){
|
|||
|
||||
function openKechengDetail(item){
|
||||
console.log(`🚀 ~ openKechengDetail ~ item:`, item)
|
||||
window.open(`/zy/dqkcDetail?rwbh=`+item.rwbh,"_blank");
|
||||
window.open('/zy/dqkcDetail?rwbh='+item.rwbh+'&xqxn='+getSysConfig().flag1+"&type=1","_blank");
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -52,17 +52,19 @@
|
|||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh } = query;//获取传递参数
|
||||
const { rwbh,xqxn,type } = query;//获取传递参数
|
||||
let router = useRouter();
|
||||
|
||||
|
||||
function getGzt(type){
|
||||
console.log(`🚀 ~ getGzt ~ type:`, type)
|
||||
function getGzt(zytype){
|
||||
console.log(`🚀 ~ getGzt ~ type:`, zytype)
|
||||
var href = "/zy/dqkcDqzy";
|
||||
if(type=='dqzy'){
|
||||
if(zytype=='dqzy'){
|
||||
href = "/zy/dqkcDqzy";
|
||||
}else if(zytype=='lszy'){
|
||||
href = "/zy/dqkcLszy";
|
||||
}
|
||||
router.push({path:href,query: {rwbh}});
|
||||
router.push({path:href,query: {rwbh,xqxn,type}});
|
||||
}
|
||||
|
||||
//进入就加载
|
||||
|
|
|
@ -0,0 +1,221 @@
|
|||
<template>
|
||||
<div style="background: #fff;height: 97%;margin: 10px 0;">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="作业名称">
|
||||
<a-input placeholder="请输入作业名称" v-model:value="queryParam.title"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="类型">
|
||||
<j-dict-select-tag placeholder="请选择类型" v-model:value="queryParam.zyType" dictCode="zy_type"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="状态">
|
||||
<j-dict-select-tag placeholder="请选择状态" v-model:value="queryParam.zyStatus" dictCode="zy_status"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="学年学期">
|
||||
<a-input placeholder="请输入学年学期" v-model:value="queryParam.xnxq"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-row>
|
||||
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 10px 5px ;">
|
||||
<a-card >
|
||||
<a-row>
|
||||
<a-col :span="24" style="font-size: 18px;font-weight: bold;margin-bottom: 20px;" class="ellipsis" :title="item.title">{{item.title}}</a-col>
|
||||
<a-col :span="24" class="zyCon">类型:{{item.zyType_dictText}}</a-col>
|
||||
<a-col :span="24" class="zyCon">开始时间:{{item.startTime}}</a-col>
|
||||
<a-col :span="24" class="zyCon">结束时间:{{item.endTime}}</a-col>
|
||||
<a-col :span="24" class="zyCon">状态:{{item.zyStatus_dictText}}</a-col>
|
||||
<a-col :span="24" class="zyCon">学年学期:{{item.xnxq}}</a-col>
|
||||
<a-col :span="24" style="text-align:center;margin-top:20px;">
|
||||
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;">详情</a-button>
|
||||
<a-button type="primary" @click="handleZyxx(item)" style="margin-left:5px;">作业信息</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div v-show="tableData.length>0">
|
||||
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
|
||||
</div>
|
||||
<div v-show="tableData.length==0">
|
||||
<a-empty/>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
|
||||
<ZyInfoStudentListModal ref="ZyInfoStudentListModalPage"></ZyInfoStudentListModal>
|
||||
<ZyInfoStudentModal ref="ZyInfoStudentModalPage"></ZyInfoStudentModal>
|
||||
</div>
|
||||
</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 ZyInfoModal from './components/ZyInfoModal.vue'
|
||||
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue'
|
||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue'
|
||||
|
||||
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh,xqxn,type } = 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 current = ref<number>(0);
|
||||
const total = ref<number>(0);
|
||||
const pageNo = ref<number>(0);
|
||||
const pageSize = ref<number>(6);
|
||||
const tableData = ref<any>([]);
|
||||
|
||||
|
||||
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 handleZyxx(record){
|
||||
ZyInfoStudentListModalPage.value.disableSubmit = true;
|
||||
ZyInfoStudentListModalPage.value.init(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
reload()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function reload(){
|
||||
queryParam.value.pageNo = pageNo;
|
||||
queryParam.value.pageSize = pageSize;
|
||||
queryParam.value.rwbh = rwbh;
|
||||
queryParam.value.xqxn = xqxn;
|
||||
queryParam.value.sflssj = '1';
|
||||
defHttp.get({ url: '/zyInfo/zyInfo/list', params: queryParam.value }).then(res => {
|
||||
console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||
total.value = res.total;
|
||||
pageNo.value = res.pages;
|
||||
current.value = res.current;
|
||||
tableData.value = res.records;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function handlePageChange(record){
|
||||
pageNo.value = record;
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
searchQuery();
|
||||
});
|
||||
|
||||
</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
|
||||
}
|
||||
}
|
||||
.ellipsis {
|
||||
overflow: hidden; /* 确保超出容器的内容被裁剪 */
|
||||
white-space: nowrap; /* 确保文本在一行内显示 */
|
||||
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
||||
}
|
||||
.zyCon{
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
|
@ -37,21 +37,23 @@
|
|||
</a-form>
|
||||
</div>
|
||||
<a-row>
|
||||
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 10px 5px ;">
|
||||
<a-card >
|
||||
<a-row>
|
||||
<a-col :span="24" style="font-size: 18px;font-weight: bold;" class="ellipsis" :title="item.title">{{item.title}}</a-col>
|
||||
<a-col :span="24">类型:{{item.zyType_dictText}}</a-col>
|
||||
<a-col :span="24">开始时间:{{item.startTime}}</a-col>
|
||||
<a-col :span="24">结束时间:{{item.endTime}}</a-col>
|
||||
<a-col :span="24">状态:{{item.zyStatus_dictText}}</a-col>
|
||||
<a-col :span="24">学年学期:{{item.xnxq}}</a-col>
|
||||
<a-col :span="24" style="text-align:center;">
|
||||
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;" v-if="item.zyStatus==0">编辑</a-button>
|
||||
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;" v-if="item.zyStatus==0">发布</a-button>
|
||||
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;">详情</a-button>
|
||||
<a-button type="primary" @click="handleZyxx(item)" style="margin-left:5px;" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">作业信息</a-button>
|
||||
<a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">上传</a-button>
|
||||
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
|
||||
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
|
||||
<a-card style="height: 210px;">
|
||||
<div class="rotate" >{{item.zyStatus_dictText}}</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.zyType_dictText}}】{{item.title}}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="zyCon">时间:{{item.startTime}} - {{item.endTime}}</a-col>
|
||||
<a-col :span="24" class="zyCon">{{item.xnxq}}-{{item.xkxs}}人选课</a-col>
|
||||
<a-col :span="24" style="text-align:center;margin-top:20px;">
|
||||
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">编辑</a-button>
|
||||
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">发布</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="handleZyxx(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">作业</a-button>
|
||||
<!-- <a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">上传</a-button> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
|
@ -89,7 +91,7 @@
|
|||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh } = query;//获取传递参数
|
||||
const { rwbh,xqxn,type } = query;//获取传递参数
|
||||
const APagination = Pagination;
|
||||
const { createConfirm,createMessage } = useMessage();
|
||||
const queryParam = ref<any>({});
|
||||
|
@ -145,7 +147,7 @@
|
|||
|
||||
function handleShangchuan(record){
|
||||
ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
var param = {mainId:record.id}
|
||||
var param = {mainId:record.id,zyfj:record.filePath}
|
||||
ZyInfoStudentModalPage.value.edit(param);
|
||||
}
|
||||
|
||||
|
@ -202,6 +204,10 @@
|
|||
queryParam.value.pageNo = pageNo;
|
||||
queryParam.value.pageSize = pageSize;
|
||||
queryParam.value.rwbh = rwbh;
|
||||
queryParam.value.xqxn = xqxn;
|
||||
queryParam.value.sflssj = '0';
|
||||
queryParam.value.column="startTime";
|
||||
queryParam.value.order="asc";
|
||||
defHttp.get({ url: '/zyInfo/zyInfo/list', params: queryParam.value }).then(res => {
|
||||
console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||
total.value = res.total;
|
||||
|
@ -225,6 +231,7 @@
|
|||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
|
@ -240,9 +247,29 @@
|
|||
text-align: center
|
||||
}
|
||||
}
|
||||
.jeecg-basic-table-form-container .ant-form {
|
||||
padding: 12px 10px 0px 10px;
|
||||
margin-bottom: 0px;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.ellipsis {
|
||||
overflow: hidden; /* 确保超出容器的内容被裁剪 */
|
||||
white-space: nowrap; /* 确保文本在一行内显示 */
|
||||
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
||||
}
|
||||
.zyCon{
|
||||
line-height: 30px;
|
||||
}
|
||||
.rotate {
|
||||
transform: rotate(45deg);
|
||||
background: rgb(28, 132, 198);
|
||||
color: #fff;
|
||||
padding: 19px 10px 3px 10px;
|
||||
position: relative;
|
||||
top: -54px;
|
||||
right: -131px;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
<a-textarea v-model:value="formData.content" placeholder="请输入描述" :disabled="disabled"></a-textarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="附件" v-bind="validateInfos.filePath" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<j-upload v-model:value="formData.filePath" :disabled="disabled" ></j-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开始时间" v-bind="validateInfos.startTime">
|
||||
<a-date-picker placeholder="请选择开始时间" v-model:value="formData.startTime" value-format="YYYY-MM-DD" style="width: 100%" :disabled="disabled"/>
|
||||
|
@ -71,6 +76,7 @@
|
|||
import { saveOrUpdate } from '../ZyInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
|
@ -89,6 +95,7 @@
|
|||
title: '',
|
||||
zyType: '0',
|
||||
content: '',
|
||||
filePath: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
wwcc: '0',
|
||||
|
@ -175,6 +182,29 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(model.wwcc=='1'){
|
||||
if(!model.wwtgl){
|
||||
createMessage.warning('外网通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.nwcc=='1'){
|
||||
if(!model.nwtgl){
|
||||
createMessage.warning('内网通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.aigccc=='1'){
|
||||
if(!model.aigctgl){
|
||||
createMessage.warning('AIGC通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
|
|
|
@ -9,6 +9,11 @@ export const columns: BasicColumn[] = [
|
|||
align: "center",
|
||||
dataIndex: 'studentName'
|
||||
},
|
||||
{
|
||||
title: '学生学号',
|
||||
align: "center",
|
||||
dataIndex: 'createBy'
|
||||
},
|
||||
{
|
||||
title: '作业附件',
|
||||
align: "center",
|
||||
|
|
Loading…
Reference in New Issue