添加切换功能
This commit is contained in:
parent
622ed8a4a1
commit
d10aee8470
|
@ -33,7 +33,7 @@ const zuoye: AppRouteModule = {
|
||||||
{
|
{
|
||||||
path: 'dqkcDqzy',
|
path: 'dqkcDqzy',
|
||||||
name: 'dqkcDqzy',
|
name: 'dqkcDqzy',
|
||||||
component: () => import('/@/views/zy/zyInfo/ZyInfoList.vue'),
|
component: () => import('/@/views/zy/zyInfo/ZyInfoMainList.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '当前作业',
|
title: '当前作业',
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,16 +9,11 @@ export const columns: BasicColumn[] = [
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'title'
|
dataIndex: 'title'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '类型',
|
// title: '类型',
|
||||||
align: "center",
|
// align: "center",
|
||||||
dataIndex: 'zyType_dictText'
|
// dataIndex: 'zyType_dictText'
|
||||||
},
|
// },
|
||||||
{
|
|
||||||
title: '描述',
|
|
||||||
align: "center",
|
|
||||||
dataIndex: 'content'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '开始时间',
|
title: '开始时间',
|
||||||
align: "center",
|
align: "center",
|
||||||
|
@ -38,7 +33,7 @@ export const columns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'zyStatus'
|
dataIndex: 'zyStatus_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '学年学期',
|
title: '学年学期',
|
||||||
|
@ -46,34 +41,25 @@ export const columns: BasicColumn[] = [
|
||||||
dataIndex: 'xnxq'
|
dataIndex: 'xnxq'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '外网是否查重',
|
title: '选课人数',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'wwcc_dictText'
|
dataIndex: 'xkxs'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '外网通过率',
|
title: '未提交人数',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'wwtgl'
|
dataIndex: 'wtjnum',
|
||||||
|
customRender:({text}) =>{
|
||||||
|
return text?text:"0";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '内网查重',
|
title: '已提交人数',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'nwcc_dictText'
|
dataIndex: 'ytjnum',
|
||||||
},
|
customRender:({text}) =>{
|
||||||
{
|
return text?text:"0";
|
||||||
title: '内网通过率',
|
},
|
||||||
align: "center",
|
|
||||||
dataIndex: 'nwtgl'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'aigc查重',
|
|
||||||
align: "center",
|
|
||||||
dataIndex: 'aigccc_dictText'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'aigc通过率',
|
|
||||||
align: "center",
|
|
||||||
dataIndex: 'aigctgl'
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -9,28 +9,18 @@
|
||||||
<a-input placeholder="请输入作业名称" v-model:value="queryParam.title"></a-input>
|
<a-input placeholder="请输入作业名称" v-model:value="queryParam.title"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</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>
|
|
||||||
<!--<template v-if="toggleSearchStatus">-->
|
|
||||||
<a-col :lg="8">
|
<a-col :lg="8">
|
||||||
<a-form-item label="状态">
|
<a-form-item label="状态">
|
||||||
<a-input placeholder="请输入状态" v-model:value="queryParam.zyStatus"></a-input>
|
<!-- <a-input placeholder="请输入状态" v-model:value="queryParam.zyStatus"></a-input> -->
|
||||||
|
<j-dict-select-tag placeholder="请选择状态" v-model:value="queryParam.zyStatus" dictCode="zy_status"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</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>
|
|
||||||
<!--</template>-->
|
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||||
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px;"> 新增</a-button>
|
||||||
<!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
<!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
||||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||||
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||||
|
@ -42,29 +32,10 @@
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
<BasicTable @register="registerTable" style="margin-top: -20px;">
|
||||||
<!--插槽:table标题-->
|
|
||||||
<template #tableTitle>
|
|
||||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
|
||||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
|
||||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
||||||
<template #overlay>
|
|
||||||
<a-menu>
|
|
||||||
<a-menu-item key="1" @click="batchHandleDelete">
|
|
||||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
|
||||||
删除
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</template>
|
|
||||||
<a-button>批量操作
|
|
||||||
<Icon icon="mdi:chevron-down"></Icon>
|
|
||||||
</a-button>
|
|
||||||
</a-dropdown>
|
|
||||||
</template>
|
|
||||||
<!--操作栏-->
|
<!--操作栏-->
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
<TableAction :actions="getTableAction(record)" />
|
||||||
</template>
|
</template>
|
||||||
<!--字段回显插槽-->
|
<!--字段回显插槽-->
|
||||||
<template #htmlSlot="{text}">
|
<template #htmlSlot="{text}">
|
||||||
|
@ -81,6 +52,7 @@
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
|
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
|
||||||
|
<ZyInfoStudentListModal ref="ZyInfoStudentListModalPage"></ZyInfoStudentListModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -92,21 +64,25 @@
|
||||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyInfo.api';
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyInfo.api';
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
import ZyInfoModal from './components/ZyInfoModal.vue'
|
import ZyInfoModal from './components/ZyInfoModal.vue'
|
||||||
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
|
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
|
||||||
const queryParam = ref<any>({});
|
const queryParam = ref<any>({});
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
const registerModal = ref();
|
const registerModal = ref();
|
||||||
|
const ZyInfoStudentListModalPage = ref();
|
||||||
|
const { createConfirm,createMessage } = useMessage();
|
||||||
//注册table数据
|
//注册table数据
|
||||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: '作业发布',
|
|
||||||
api: list,
|
api: list,
|
||||||
columns,
|
columns,
|
||||||
canResize:false,
|
canResize:false,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
width: 120,
|
width: 220,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
|
@ -182,29 +158,79 @@
|
||||||
* 操作栏
|
* 操作栏
|
||||||
*/
|
*/
|
||||||
function getTableAction(record) {
|
function getTableAction(record) {
|
||||||
return [
|
var list = [];
|
||||||
|
if(record.zyStatus=='0'){
|
||||||
|
list = [
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
onClick: handleEdit.bind(null, record),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '详情',
|
||||||
|
onClick: handleDetail.bind(null, record),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '发布',
|
||||||
|
onClick: handleFabu.bind(null, record),
|
||||||
|
}, {
|
||||||
|
label: '删除',
|
||||||
|
popConfirm: {
|
||||||
|
title: '是否确认删除',
|
||||||
|
confirm: handleDelete.bind(null, record),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
list = [
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '详情',
|
||||||
onClick: handleEdit.bind(null, record),
|
onClick: handleDetail.bind(null, record),
|
||||||
},
|
},
|
||||||
];
|
{
|
||||||
|
label: '作业',
|
||||||
|
onClick: handleZyxx.bind(null, record),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查看作业信息
|
||||||
|
function handleZyxx(record){
|
||||||
|
ZyInfoStudentListModalPage.value.disableSubmit = true;
|
||||||
|
ZyInfoStudentListModalPage.value.init(record);
|
||||||
|
|
||||||
|
}
|
||||||
|
//发布作业
|
||||||
|
async function handleFabu(record){
|
||||||
|
createConfirm({
|
||||||
|
iconType: 'warning',
|
||||||
|
title: '确认发布',
|
||||||
|
content: '是否发布作业数据',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
|
var url = "/zyInfo/zyInfo/edit";
|
||||||
|
var params = {id:record.id,zyStatus:'1'};
|
||||||
|
defHttp.post({ url: url, params }).then((res) => {
|
||||||
|
handleZySuccess(record.id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function handleZySuccess(zyid){
|
||||||
|
var url = "/zyInfo/zyInfo/editStudent";
|
||||||
|
defHttp.get({ url: url, params:{id:zyid} }).then((res) => {
|
||||||
|
});
|
||||||
|
setTimeout(()=>{handleSuccess()}, 1500);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 下拉操作栏
|
* 下拉操作栏
|
||||||
*/
|
*/
|
||||||
function getDropDownAction(record) {
|
function getDropDownAction(record) {
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
label: '详情',
|
|
||||||
onClick: handleDetail.bind(null, record),
|
|
||||||
}, {
|
|
||||||
label: '删除',
|
|
||||||
popConfirm: {
|
|
||||||
title: '是否确认删除',
|
|
||||||
confirm: handleDelete.bind(null, record),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
|
<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>
|
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
|
||||||
<a-card style="height: 210px;border: 1px solid rgb(28, 132, 198);">
|
<a-card style="height: 240px;border: 1px solid rgb(28, 132, 198);">
|
||||||
<div class="rotate" :style="classFun(item.zyStatus)">{{item.zyStatus_dictText}}</div>
|
<div class="rotate" :style="classFun(item.zyStatus)">{{item.zyStatus_dictText}}</div>
|
||||||
<a-row style="top: -48px;position: relative;">
|
<a-row style="top: -48px;position: relative;">
|
||||||
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;" :title="item.title">
|
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;" :title="item.title">
|
||||||
|
@ -47,6 +47,8 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="zyCon">时间:{{item.startTime}} - {{item.endTime}}</a-col>
|
<a-col :span="24" class="zyCon">时间:{{item.startTime}} - {{item.endTime}}</a-col>
|
||||||
<a-col :span="24" class="zyCon"><div style="float:left">{{item.xnxq}}</div><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkxs}}人选课</a></div></a-col>
|
<a-col :span="24" class="zyCon"><div style="float:left">{{item.xnxq}}</div><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkxs}}人选课</a></div></a-col>
|
||||||
|
<a-col :span="24" class="zyCon"><div style="float:left">未提交:{{item.wtjnum?item.wtjnum:0}}人;</div><div style="float:right;" >已提交:{{item.ytjnum?item.ytjnum:0}}人</div></a-col>
|
||||||
|
|
||||||
<a-col :span="24" style="text-align:center;margin-top:20px;">
|
<a-col :span="24" style="text-align:center;margin-top:20px;">
|
||||||
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">编辑</a-button>
|
<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="handleFabu(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">发布</a-button>
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
<template>
|
||||||
|
<div style="background: #fff;height: 97%;margin: 10px 0;">
|
||||||
|
<div style="text-align:right;width:100%;">
|
||||||
|
<a-switch v-model:checked="checked1" @change="onChange1"/>
|
||||||
|
</div>
|
||||||
|
<div v-show="checked1">
|
||||||
|
<ZyInfoList/>
|
||||||
|
</div>
|
||||||
|
<div v-show="!checked1">
|
||||||
|
<ZyInfoLiebiaoList/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="zyInfo-zyInfo" setup>
|
||||||
|
import { ref, reactive, onMounted,unref } from 'vue';
|
||||||
|
import ZyInfoLiebiaoList from '/@/views/zy/zyInfo/ZyInfoLiebiaoList.vue'
|
||||||
|
import ZyInfoList from '/@/views/zy/zyInfo/ZyInfoList.vue'
|
||||||
|
|
||||||
|
const checked1 = ref(true);
|
||||||
|
|
||||||
|
function onChange1(record){
|
||||||
|
console.log(`🚀 ~ onChange1 ~ record:`, record)
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
</style>
|
|
@ -19,6 +19,11 @@ export const columns: BasicColumn[] = [
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'createTime'
|
dataIndex: 'createTime'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '评分',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'score'
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// title: '作业附件',
|
// title: '作业附件',
|
||||||
// align: "center",
|
// align: "center",
|
||||||
|
|
Loading…
Reference in New Issue