添加历史课程

This commit is contained in:
yangjun 2024-05-16 21:27:01 +08:00
parent 53aca81311
commit 8f9fed7395
8 changed files with 1175 additions and 0 deletions

View File

@ -0,0 +1,53 @@
import type { AppRouteModule } from '/@/router/types';
// import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';
const zuoyehistory: AppRouteModule = {
path: '/history',
name: 'history',
component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/history/kcHistoryMain.vue'),
redirect: '/history/hismain',
meta: {
isAddStaticPath: true,//是否静态引入不用配置menu表
orderNo: 106,
title: '历史作业',
},
children: [
{
path: 'hismain',
name: 'zuoyeHistoryMain',
meta: {
title: '课程介绍',
},
component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/history/kcHistoryDetail.vue'),
},
{
path: 'hisTzgg',
name: 'hisTzgg',
component: () => import('/@/views/zy/zyGonggao/StudentGonggaoList.vue'),
meta: {
title: '通知公告',
},
},
{
path: 'hisKczy',
name: 'hisKczy',
component: () => import('/@/views/zy/zyInfo/ZyInfoHisMainList.vue'),
meta: {
title: '课程作业',
},
},
{
path: 'hisdksbl',
name: 'hisdksbl',
component: () => import('/@/views/kc/detection/zyZhjsList.vue'),
meta: {
title: '到课识别率',
},
},
]
}
export default zuoyehistory;

View File

@ -0,0 +1,143 @@
<template>
<a-card>
<a-row>
<a-col :span="24">
<a-row>
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 8 }" >
<a-form-item label="学年学期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag placeholder="学年学期" v-model:value="queryParam.xqxn" dictCode="kc_xqxn_history,title,title,true order by start_time desc" style="width:90%;"/>
</a-form-item>
</a-col>
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 8 }" >
<a-form-item label="课程名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-input placeholder="课程名称" v-model:value="queryParam.kcmc" style="width:90%;"/>
</a-form-item>
</a-col>
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 8 }" >
<a-button type="primary" preIcon="ant-design:search-outlined" @click="loadData">查询</a-button>
</a-col>
</a-row>
</a-col>
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 8 }" :key="index" v-for="(item, index) in allList" >
<div class="ketangCard ketangCardcol" >
<div class="rjkcTopDiv">
<div style="text-align: left;"><span>{{ item.sksj }}</span></div>
</div>
<div class="rjkcBodyDiv">
<div class="kcmcDiv">{{ item.kcmc }}</div>
<div class="skddDiv" style="margin-top:20px;">{{ item.skdd }}</div>
<div class="xkrsDiv" style="margin-top:20px;">{{ item.xqxn }}</div>
<div class="xkrsDiv">{{ item.xkrs }}人选课&nbsp;&nbsp;&nbsp;<a-button class="buttonClass" @click="openKechengDetail(item)">进入课程</a-button></div>
</div>
</div>
</a-col>
</a-row>
</a-card>
</template>
<script lang="ts" setup>
import { ref, onMounted } from 'vue';
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
import { defHttp } from '/@/utils/http/axios';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JInput } from '/@/components/Form';
import { router } from '/@/router';
import { useRouter } from 'vue-router';
const queryParam = ref<any>({});
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const allList = ref<any>([]);
const weebMap = {
'1': '星期一',
'2': '星期二',
'3': '星期三',
'4': '星期四',
'5': '星期五',
'6': '星期六',
'7': '星期日',
}
function toWeek(week){
return weebMap[week];
}
function loadData(){
queryParam.value.checkType = '1';
defHttp.get({ url: '/ktgl/kcKechengbiao/getKechengbiaolist',params:queryParam.value}).then((res) => {
console.log(res);
allList.value = res.records;
});
}
//
onMounted(() => {
loadData()
});
function openKechengDetail(item){
console.log(`🚀 ~ openKechengDetail ~ item:`, item)
window.open('/history/hismain?rwbh='+item.rwbh+'&xqxn='+getSysConfig().flag1+"&type=0","_blank");
}
</script>
<style lang="less" scoped>
.ketangCard {
margin: .5rem;
}
.ketangCardcol{
background-color: #f3f3f3;
padding: 1px;
}
.rjkcTopDiv {
background: #fff;
padding: .9rem;
color: #1ab394;
font-size: 18px;
font-weight: bold;
text-align:right;
}
.nDayDiv {
top: -14px;
right: -14px;
position: relative;
background: #1ab394;
color: #fff;
font-weight: 200;
padding: 2px 6px 2px 6px;
border-radius: 0 0 0 5px;
text-align:left;
}
.rjkcBodyDiv {
margin-top: 1px;
background: #fff;
padding: 1rem 2rem 2rem 2rem;
}
.kcmcDiv {
font-size: 24px;
font-weight: bold;
}
.skddDiv {
color: #1c84c6;
font-size: 16px;
// font-weight: bold;
}
.xkrsDiv {
padding-top: 2.5rem;
font-size: 18px;
font-weight: bold;
text-align: right;
}
.buttonClass {
background: #1c84c6;
font-weight: 600;
color: #fff;
border-radius: 5px;
line-height: 23px;
&[disabled] {
background: #6cafda;
}
}
</style>

View File

@ -0,0 +1,202 @@
<template>
<div style="margin-top:10px;background:#fff;height:642px;overflow:auto;">
<a-card>
<div>
<a-row>
<a-col :span="3" style="font-size: 18px;font-weight: bold;">课程介绍</a-col>
<a-col :span="20">{{jxdgInfo.kcjs}}</a-col>
</a-row>
</div>
</a-card>
<a-card>
<div>
<span style="float: left;line-height: 30px; font-size: 18px; font-weight: bold;">教学大纲</span>
<span style="width:300px;float: left;margin-top: 3px;">
<span v-if="jxdgInfo.filePath">
<a-button :ghost="true" type="primary" preIcon="ant-design:download" size="small" @click="downloadFile(jxdgInfo.filePath)"> 下载 </a-button>
</span>
<span v-else>暂无内容</span>
</span>
<span style="float: right;" v-if="jxdgInfo.filePath">
<a-button type="primary" style="margin-left:10px;" @click="openPdf(jxdgInfo)">预览</a-button>
</span>
</div>
<!-- <div>
<JeecgPdfView/>
</div> -->
</a-card>
<a-card>
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
<span style="float: left;">常见问题</span>
</div>
<a-row style="margin-top: 50px;width:100%;display: block;">
<a-col :span="24" v-for="(item,index) in cjwtSource" :key="index">
<a-row>
<a-col :span="24">
<span style="float: left;">{{index+1}}.{{item.question}}</span>
</a-col>
<a-col :span="24"><span><Icon icon="ant-design:caret-right-outlined" />{{item.answer}}</span></a-col>
<a-col :span="24">
<a-divider />
</a-col>
</a-row>
</a-col>
<a-col :span="24" v-show="cjwtSource.length>0">
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
</a-col>
<a-col :span="24" v-show="cjwtSource.length==0">
<a-empty/>
</a-col>
</a-row>
</a-card>
<a-card>
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
<span style="float: left;">往届学生评价</span>
</div>
<studentPjjgTeaList :queryParam="{ pageSize: 3, ...tkzjParam,kcbh:'' }" style="max-height: 106px;"/>
</a-card>
<ZyCjwtModal ref="ZyCjwtModalPage" @success="handleCjwtOk" />
<ZyJxdgListModal ref="ZyJxdgListModalPage" />
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, unref } from 'vue';
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
import { defHttp } from '/@/utils/http/axios';
import { useRouter } from 'vue-router';
import { Icon } from '/@/components/Icon';
import { Pagination, Empty } from 'ant-design-vue';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import { deleteOne } from '/@/views/zy/zyCjwt/ZyCjwt.api';
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import studentPjjgTeaList from '/@/views/site/pjjgPage/studentPjjgTeaList.vue';
import ZyCjwtModal from '/@/views/zy/zyCjwt/components/ZyCjwtModal.vue';
import { useMessage } from '/@/hooks/web/useMessage';
import ZyJxdgListModal from '/@/views/zy/zyJxdg/ZyJxdgListModal.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import JeecgPdfView from '/@/views/demo/jeecg/JeecgPdfView.vue';
import { useGlobSetting } from '/@/hooks/setting';
import { downloadFile } from '/@/utils/common/renderUtils';
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn } = query;//
const APagination = Pagination;
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(3);
const tkzjParam = ref({rwbh:rwbh});
const ZyCjwtModalPage = ref();
const ZyJxdgListModalPage = ref();
const cjwtSource = ref([]);
let router = useRouter();
const { createMessage } = useMessage();
const jxdgInfo = ref({
id:'',
filePath:'',
kcjs:''
});
//
function handleYinyong(){
var record = {xqxn,rwbh}
ZyJxdgListModalPage.value.disableSubmit = true;
ZyJxdgListModalPage.value.init(record);
}
//
function addCjwtHanle(){
var params = { rwbh:rwbh,xqxn:xqxn };
ZyCjwtModalPage.value.disableSubmit = false;
ZyCjwtModalPage.value.add(params);
}
/**
* 常见问题编辑事件
*/
function handleEdit(record: Recordable) {
ZyCjwtModalPage.value.disableSubmit = false;
ZyCjwtModalPage.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleCjwtOk);
}
function openPdf(record){
var url2 = getFileAccessHttpUrl(record.filePath)
console.log(`🚀 ~ openPdf ~ url2:`, url2)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}
//
function handleCjwtOk() {
console.log('--------cjwt ok -----------')
cjwtData(1);
}
//
function handlePageChange(page: number) {
cjwtData(page);
}
function cjwtData(arg){
defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { pageSize: 3,pageNo:arg, rwbh:rwbh,xqxn:xqxn } }).then((res) => {
console.log(`🚀 ~ defHttp.get ~ res:`, res)
cjwtSource.value = res.records;
console.log(`🚀 ~ defHttp.get ~ cjwtSource:`, cjwtSource)
});
}
//
function getKcjsJxdg(){
defHttp.get({ url: '/zyJxdg/zyJxdg/getKcjsJxdg', params: { rwbh:rwbh} }).then((res) => {
console.log(`🚀 1111111111111~ getKcjsJxdg ~ res:`, res)
if(res){
jxdgInfo.value = res;
}
});
}
function addKcjsHandle(type){
const isUpdate = true;
var model = jxdgInfo.value;
model.rwbh = rwbh;
model.xqxn = xqxn;
console.log(`🚀 ~ addKcjsHandle ~ model:`, model)
if(model.id){
if(type=='1'){
model.filePath = '';
}
defHttp.post({ url: '/zyJxdg/zyJxdg/edit', params: model }).then((res) => {
console.log(`🚀 ~ defHttp.post 111~ res:`, res)
getKcjsJxdg();
});
}else{
if(type=='1'){
model.filePath = '';
}
defHttp.post({ url: '/zyJxdg/zyJxdg/add', params: model }).then((res) => {
console.log(`🚀 ~ defHttp.post 222~ res:`, res)
getKcjsJxdg();
});
}
}
//
onMounted(() => {
getKcjsJxdg();
cjwtData(1);
});
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,90 @@
<template>
<div id="siteMain">
<div id="maxSite">
<a-layout style="height: calc(100vh - 30px)">
<headerPage/>
<a-row>
<a-col :span="24">
<div style="width:100%;background: #fff;font-size: 18px;font-weight: bold;margin-top:10px;padding: 10px;">课程名称{{kcxxInfo.kcmc}}</div>
</a-col>
<a-col :span="5">
<dqxqkcMenu/>
</a-col>
<a-col :span="19">
<RouterView/>
</a-col>
</a-row>
<footerPage/>
</a-layout>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, unref } from 'vue';
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
import { defHttp } from '/@/utils/http/axios';
import { useRouter } from 'vue-router';
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import dqxqkcMenu from './kcHistoryMenu.vue';
const maxClassName = ref<any>({});
const selectedKeys = ref<string[]>([]);
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn } = query;//
let router = useRouter();
const kcxxInfo = ref<string>('');
//
onMounted(() => {
defHttp.get({ url: '/ktgl/kcKechengbiao/getKcxxByRwbhXqxn', params: { rwbh: rwbh,xqxn:xqxn } }).then((res) => {
kcxxInfo.value = res;
});
});
</script>
<style lang="less" scoped>
#siteMain {
// font-size: ;
// height: 100%;
background: #f3f3f4;
#maxSite {
//
max-width: 1070px;
min-height: calc(100vh);
//
margin: 0 auto;
.rowGutter{
margin-top: 1rem;
margin-bottom: 1rem;
}
.ant-layout-header {
color: #fff;
background: #1ab394;
}
.ant-layout-footer {
line-height: 1.5;
background: #FFF;
}
.ant-layout-sider {
color: #fff;
line-height: 120px;
background: #3ba0e9;
}
.ant-layout-content {
min-height: 120px;
color: #000;
line-height: 120px;
background: #f3f3f4;
}
}
}
</style>

View File

@ -0,0 +1,121 @@
<template>
<div id="siteMain" style="min-height: calc(100vh - 160px);">
<a-row>
<a-col :span="24">
<a-menu
v-model:selectedKeys="selectedKeys"
style="width: 98%;min-height: calc(100vh - 142px);margin: 10px 0;"
mode="inline"
>
<a-sub-menu key="sub1">
<template #title>教学内容</template>
<a-menu-item key="1" @click="getGzt('kcjs')">课程介绍</a-menu-item>
<a-menu-item key="2" @click="getGzt('gonggao')">通知公告</a-menu-item>
<a-menu-item key="3" @click="getGzt('jxdynr')">教学单元内容</a-menu-item>
</a-sub-menu>
<a-sub-menu key="sub2">
<template #title>测验/作业</template>
<a-menu-item key="4" @click="getGzt('kczy')">课程作业</a-menu-item>
<a-menu-item key="5" @click="getGzt('kccy')">课程测验</a-menu-item>
</a-sub-menu>
<a-sub-menu key="sub3">
<template #title>教学工具</template>
<a-menu-item key="6" @click="getGzt('wjdc')">问卷调查</a-menu-item>
<a-menu-item key="7" @click="getGzt('dksbl')">到课率识别</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub4">
<span>教学资源库</span>
</a-menu-item>
</a-menu>
</a-col>
</a-row>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, unref } from 'vue';
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
import { defHttp } from '/@/utils/http/axios';
import { useRouter } from 'vue-router';
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import dqxqkc from '/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue';
const maxClassName = ref<any>({});
const selectedKeys = ref<string[]>([]);
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,type } = query;//
let router = useRouter();
function getGzt(zytype){
var param = {rwbh,xqxn,type};
var href = "";
if(zytype=='kcjs'){//
href = "/history/hismain";
}else if(zytype=='gonggao'){//
href = "/history/hisTzgg";
}else if(zytype=='jxdynr'){//
// href = "/history/dqkcDqzy";
}else if(zytype=='kczy'){//
href = "/history/hisKczy";
}else if(zytype=='kccy'){//
href = "/history/dqkcLszy";
}else if(zytype=='wjdc'){//
href = "/history/ceshiWenjuan";
}else if(zytype=='dksbl'){//
href = "/history/hisdksbl";
}
router.push({path:href,query: {rwbh,xqxn,type}});
}
//
onMounted(() => {
console.log('rwbh:',rwbh);
});
</script>
<style lang="less" scoped>
#siteMain {
// font-size: ;
// height: 100%;
background: #f3f3f4;
#maxSite {
//
max-width: 1070px;
min-height: 730px;
//
margin: 0 auto;
.rowGutter{
margin-top: 1rem;
margin-bottom: 1rem;
}
.ant-layout-header {
color: #fff;
background: #1ab394;
}
.ant-layout-footer {
line-height: 1.5;
background: #FFF;
}
.ant-layout-sider {
color: #fff;
line-height: 120px;
background: #3ba0e9;
}
.ant-layout-content {
min-height: 120px;
color: #000;
line-height: 120px;
background: #f3f3f4;
}
}
}
</style>

View File

@ -0,0 +1,291 @@
<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.zyStatus" dictCode="zy_status"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 240px;border: 1px solid rgb(28, 132, 198);">
<div class="rotate" :style="classFun(item.zyStatus)">{{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;">{{item.title}}</div>
</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.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-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);" >作业</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>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</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';
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.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 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 labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
function classFun(type){
if(type == '0'){
return "background: #a7a6a6";
}else if(type == '1'){
return "background: #18a689";
}
}
/**
* 新增事件
*/
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 handleShangchuan(record){
ZyInfoStudentModalPage.value.disableSubmit = false;
var param = {mainId:record.id,zyfj:record.filePath}
ZyInfoStudentModalPage.value.edit(param);
}
//
function openXkrs(record){
console.log(`🚀 ~ openXkrs ~ record:`, record)
ZyInfoStudentModalPage.value.disableSubmit = true;
XxhbbksListModalPage.value.init(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
//
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 handleSuccess() {
reload()
}
function handleZySuccess(zyid){
setTimeout(()=>{handleSuccess()}, 1500);
var url = "/zyInfo/zyInfo/editStudent";
defHttp.get({ url: url, params:{id:zyid} }).then((res) => {
});
}
/**
* 查询
*/
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 = '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;
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 {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
.jeecg-basic-table-form-container .ant-form {
padding: 12px 10px 0px 10px;
margin-bottom: 0px;
background-color: #fff;
border-radius: 2px;
}
.ellipsis {
overflow: hidden; /* 确保超出容器的内容被裁剪 */
white-space: nowrap; /* 确保文本在一行内显示 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.zyCon{
line-height: 30px;
}
.rotate {
transform: rotate(45deg);
// background: rgb(28, 132, 198);
color: #fff;
padding: 19px 10px 3px 10px;
position: relative;
top: -54px;
right: -131px;
text-align: center;
font-size: 11px;
}
</style>

View File

@ -0,0 +1,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/ZyInfoLiebiaoHisList.vue'
import ZyInfoList from '/@/views/zy/zyInfo/ZyInfoHisList.vue'
const checked1 = ref(true);
function onChange1(record){
console.log(`🚀 ~ onChange1 ~ record:`, record)
}
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,246 @@
<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">
<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.zyStatus" dictCode="zy_status"/>
</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>
<!--引用表格-->
<BasicTable @register="registerTable" style="margin-top: -20px;">
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></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="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
<ZyInfoStudentListModal ref="ZyInfoStudentListModalPage"></ZyInfoStudentListModal>
</div>
</template>
<script lang="ts" name="zyInfo-zyInfo" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './ZyInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyInfoModal from './components/ZyInfoModal.vue'
import { useMessage } from "/@/hooks/web/useMessage";
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 toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const ZyInfoStudentListModalPage = ref();
const { createConfirm,createMessage } = useMessage();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 220,
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);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
var list = [
{
label: '详情',
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) {
return [
]
}
/**
* 查询
*/
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>