This commit is contained in:
1378012178@qq.com 2025-01-06 08:50:23 +08:00
parent 6521014e90
commit 359fb74a99
4 changed files with 790 additions and 493 deletions

View File

@ -2,250 +2,262 @@
<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="6">
<a-form-item label="学期学年">
<j-dict-select-tag ref="xqDictTag" placeholder="请选择学年学期" v-model:value="queryParam.xqxn" dictCode="kc_xqxn_history,title,title,true order by start_time desc"/>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item label="开课单位">
<JDictSelectTag placeholder="开课单位" v-model:value="queryParam.kkdw" :dictCode="`kc_kkdw_view,kkdw,kkdw`"/>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item label="授课教师">
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs"/>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item label="是否完成">
<a-select v-model:value="queryParam.sfwc" placeholder="是否完成" >
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item label="学期学年">
<j-dict-select-tag ref="xqDictTag" placeholder="请选择学年学期" v-model:value="queryParam.xqxn"
dictCode="kc_xqxn_history,title,title,true order by start_time desc" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item label="开课单位">
<JDictSelectTag placeholder="开课单位" v-model:value="queryParam.kkdw" :dictCode="`kc_kkdw_view,kkdw,kkdw`" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item label="授课教师">
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item label="是否完成">
<a-select v-model:value="queryParam.sfwc" placeholder="是否完成">
<a-select-option value="">全部</a-select-option>
<a-select-option :value="2"></a-select-option>
<a-select-option :value="1"></a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="6" :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:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
</BasicTable>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="6" :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:export-outlined" @click="onExportXls"
style="margin-left: 8px"> 导出</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
</BasicTable>
<!-- 表单区域 -->
<ZyJxdgModal ref="registerModal" @success="handleSuccess"></ZyJxdgModal>
</div>
</template>
<script lang="ts" name="zyJxdg-zyJxdg" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns3 } from './Kczygl.data';
import { sysStaticCyList, deleteOne, batchDelete, getImportUrl, getStaticCyExportUrl } from './Kczygl.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import { JInput, JDictSelectTag } from '/@/components/Form';
import ZyJxdgModal from './components/KczyglModal.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting';
import { ref, reactive,defineExpose } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns3 } from './Kczygl.data';
import { sysStaticCyList, deleteOne, batchDelete, getImportUrl, getStaticCyExportUrl } from './Kczygl.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import { JInput, JDictSelectTag } from '/@/components/Form';
import ZyJxdgModal from './components/KczyglModal.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting';
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const { createMessage } = useMessage();
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const activeKey = ref('1');
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
api: sysStaticCyList,
columns: columns3,
canResize:false,
useSearchForm: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const { createMessage } = useMessage();
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const activeKey = ref('1');
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
api: sysStaticCyList,
columns: columns3,
canResize: false,
useSearchForm: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
},
exportConfig: {
name: "课程测验情况统计",
url: getStaticCyExportUrl,
params: () => {
return Object.assign({},queryParam.value);
}
beforeFetch: (params) => {
params.column = '', params.order = '';//
return Object.assign(params, 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 handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
if(record.filePath){
if(!record.pdfPath){
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
},
exportConfig: {
name: "课程测验情况统计",
url: getStaticCyExportUrl,
params: () => {
return Object.assign({}, queryParam.value);
}
if(record.jxrlFilePath){
if(!record.jxrlPdfPath){
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
}
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
},
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){
if(record){
var url2 = getFileAccessHttpUrl(record)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}else{
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览")
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
if (record.filePath) {
if (!record.pdfPath) {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
if (record.jxrlFilePath) {
if (!record.jxrlPdfPath) {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
function openPdf(record) {
if (record) {
var url2 = getFileAccessHttpUrl(record)
let url = baseApiUrl + "/generic/web/viewer.html?file=" + encodeURIComponent(url2);
window.open(url, "_blank")
} else {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览")
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, 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) {
return [
{
label: '详情',
onClick: handleDetail.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();
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
function changeQueryParams(dwh) {
queryParam.value = {}
queryParam.value.kkdw = dwh
reload();
}
defineExpose({
changeQueryParams
});
</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>

View File

@ -2,13 +2,13 @@
<div>
<a-tabs v-model:activeKey="activeKey" type="card" style="background-color: white;">
<a-tab-pane key="1" tab="统计信息">
<TjsjList></TjsjList>
<TjsjList @toDetail="toDetail"></TjsjList>
</a-tab-pane>
<a-tab-pane key="2" tab="作业统计">
<ZyKctjList></ZyKctjList>
<ZyKctjList ref="zyKctjListRef"></ZyKctjList>
</a-tab-pane>
<a-tab-pane key="3" tab="测验统计">
<CyKctjList></CyKctjList>
<CyKctjList ref="cyKctjListRef"></CyKctjList>
</a-tab-pane>
<a-tab-pane key="4" tab="查重次数剩余数量">
<CccssyslList></CccssyslList>
@ -20,203 +20,220 @@
</template>
<script lang="ts" name="zyJxdg-zyJxdg" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns2 } from './Kczygl.data';
import { list2, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Kczygl.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import { JInput, JDictSelectTag } from '/@/components/Form';
import ZyJxdgModal from './components/KczyglModal.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting';
import TjsjList from '/@/views/zy/sysZy/kczygl/TjsjList.vue';
import ZyKctjList from '/@/views/zy/sysZy/kczygl/ZyKctjList.vue';
import CyKctjList from '/@/views/zy/sysZy/kczygl/CyKctjList.vue';
import CccssyslList from '/@/views/zy/sysZy/kczygl/CccssyslList.vue';
import { ref, reactive, nextTick } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns2 } from './Kczygl.data';
import { list2, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Kczygl.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import { JInput, JDictSelectTag } from '/@/components/Form';
import ZyJxdgModal from './components/KczyglModal.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting';
import TjsjList from '/@/views/zy/sysZy/kczygl/TjsjList.vue';
import ZyKctjList from '/@/views/zy/sysZy/kczygl/ZyKctjList.vue';
import CyKctjList from '/@/views/zy/sysZy/kczygl/CyKctjList.vue';
import CccssyslList from '/@/views/zy/sysZy/kczygl/CccssyslList.vue';
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const { createMessage } = useMessage();
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const activeKey = ref('1');
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
api: list2,
columns: columns2,
canResize:false,
useSearchForm: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const { createMessage } = useMessage();
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const activeKey = ref('1');
const zyKctjListRef = ref(null)
const cyKctjListRef = ref(null)
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
api: list2,
columns: columns2,
canResize: false,
useSearchForm: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
},
exportConfig: {
name: "课程作业管理",
url: getExportUrl,
params: () => {
return Object.assign({},queryParam.value);
}
beforeFetch: (params) => {
params.column = '', params.order = '';//
return Object.assign(params, 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 handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
if(record.filePath){
if(!record.pdfPath){
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
},
exportConfig: {
name: "课程作业管理",
url: getExportUrl,
params: () => {
return Object.assign({}, queryParam.value);
}
if(record.jxrlFilePath){
if(!record.jxrlPdfPath){
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
}
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
},
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){
if(record){
var url2 = getFileAccessHttpUrl(record)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}else{
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览")
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
if (record.filePath) {
if (!record.pdfPath) {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
if (record.jxrlFilePath) {
if (!record.jxrlPdfPath) {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
function openPdf(record) {
if (record) {
var url2 = getFileAccessHttpUrl(record)
let url = baseApiUrl + "/generic/web/viewer.html?file=" + encodeURIComponent(url2);
window.open(url, "_blank")
} else {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览")
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, 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) {
return [
{
label: '详情',
onClick: handleDetail.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();
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
async function toDetail(kkdw, tab) {
activeKey.value = tab + '';
await nextTick(); // DOM
if (tab == '2' || tab == 2) {
if (zyKctjListRef.value) {
zyKctjListRef.value.changeQueryParams(kkdw);
}
}
if (tab == '3' || tab == 3) {
if (cyKctjListRef.value) {
cyKctjListRef.value.changeQueryParams(kkdw);
}
}
}
</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>

View File

@ -1,122 +1,383 @@
<template>
<div>
<a-row>
<a-row>
<a-col :span="10">
<a-row>
<a-col :span="12" class="staticCol">
<a-card title="本学年使用情况">
<a-row>
<a-col :span="24" class="staticCol"><span>发布作业总次数</span><span>{{ staticInfo.xn_zy_syzcs
}}</span></a-col>
<a-col :span="24" class="staticCol"><span>其中作业互评总次数</span><span>{{ staticInfo.xn_zy_hpzcs
}}</span></a-col>
<a-col :span="24" class="staticCol"><span class="fbzycs">使用查重次数</span><span>{{ staticInfo.xn_zy_cccs
}}</span></a-col>
<a-col :span="24" class="staticCol"><span class="fbzycs">作业已完成总次数</span><span>{{
staticInfo.xn_zy_ywczcs
}}</span></a-col>
<a-col :span="24" class="staticCol" style="margin-top: 20px;"><span>发布测验总次数</span><span>{{
staticInfo.xn_cy_syzcs }}</span></a-col>
<a-col :span="24" class="staticCol"><span>其中测验已完成总次数</span><span>{{ staticInfo.xn_cy_ywczcs
}}</span></a-col>
</a-row>
</a-card>
</a-col>
<a-col :span="12" class="staticCol">
<a-card title="本学年使用情况">
<a-row>
<a-col :span="24" class="staticCol"><span>使用课程作业总学生人次</span><span>{{ staticInfo.xn_kc_zyzxsrc
}}</span></a-col>
<a-col :span="24" class="staticCol"><span>使用课程作业互评总学生人次</span><span>{{ staticInfo.xn_kc_zyhp
}}</span></a-col>
<a-col :span="24" class="staticCol"><span>使用课程作业查重总学生人次</span><span>{{ staticInfo.xn_kc_zycc
}}</span></a-col>
<a-col :span="24" class="staticCol"><span>完成课程作业总学生人次</span><span>{{ staticInfo.xn_kc_zywczxsrc
}}</span></a-col>
<a-col :span="24" class="staticCol" style="margin-top: 20px;"><span>使用课堂测验总学生人次</span><span>{{
staticInfo.xn_kc_ktcy }}</span></a-col>
<a-col :span="24" class="staticCol"><span>完成课堂测验总学生人次</span><span>{{ staticInfo.xn_kc_wccy
}}</span></a-col>
</a-row>
</a-card>
</a-col>
</a-row>
<a-row style="padding: 10px;">
<a-col :span="24">
<a-card title="今日使用情况">
<a-row>
<a-col :span="14">
<a-row>
<a-col :span="24" class="staticCol"><span>作业使用总次数</span><span>{{ staticInfo.jr_zy_syzcs
}}</span></a-col>
<a-col :span="24" class="staticCol"><span>作业互评总次数</span><span>{{ staticInfo.jr_zy_hpzcs
}}</span></a-col>
<a-col :span="24" class="staticCol"><span>作业已完成总次数</span><span>{{ staticInfo.jr_zy_ywczcs
}}</span></a-col>
</a-row>
</a-col>
<a-col :span="10">
<a-row>
<a-col :span="24" class="staticCol"><span>测验使用总次数</span><span>{{ staticInfo.jr_cy_syzcs
}}</span></a-col>
<a-col :span="24" class="staticCol"><span>测验已完成总次数</span><span>{{ staticInfo.jr_cy_ywczcs
}}</span></a-col>
</a-row>
</a-col>
</a-row>
</a-card>
</a-col>
</a-row>
</a-col>
<a-col :span="7" class="staticCol">
<a-card title="本学年各学院作业数">
<a-col>
<a-table :scroll="{ y: 470 }" :dataSource="staticInfo.xnxyzycs" :columns="xycolumns" :pagination="false"
:bordered="true">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="toDetail(record.kkdw, 2)">详情</a-button>
</template>
</template>
</a-table>
</a-col>
</a-card>
</a-col>
<a-col :span="7" class="staticCol">
<a-card title="本学年各学院测验数">
<a-col>
<a-table :scroll="{ y: 470 }" :dataSource="staticInfo.xnxycycs" :columns="xycolumns" :pagination="false"
:bordered="true">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="toDetail(record.kkdw, 3)">详情</a-button>
</template>
</template>
</a-table>
</a-col>
</a-card>
</a-col>
</a-row>
<a-row>
<a-col :span="6" class="staticCol">
<a-card title="本学年使用情况">
<a-row>
<a-col :span="24" class="staticCol"><span>作业使用总次数</span><span>{{staticInfo.xn_zy_syzcs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>作业互评总次数</span><span>{{staticInfo.xn_zy_hpzcs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>作业已完成总次数</span><span>{{staticInfo.xn_zy_ywczcs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>查重次数</span><span>{{staticInfo.xn_zy_cccs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>测验使用总次数</span><span>{{staticInfo.xn_cy_syzcs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>测验已完成总次数</span><span>{{staticInfo.xn_cy_ywczcs}}</span></a-col>
</a-row>
</a-card>
<a-card title="今日使用情况" style="margin-top: 20px;">
<a-row>
<a-col :span="24" class="staticCol"><span>作业使用总次数</span><span>{{staticInfo.jr_zy_syzcs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>作业互评总次数</span><span>{{staticInfo.jr_zy_hpzcs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>作业已完成总次数</span><span>{{staticInfo.jr_zy_ywczcs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>测验使用总次数</span><span>{{staticInfo.jr_cy_syzcs}}</span></a-col>
<a-col :span="24" class="staticCol"><span>测验已完成总次数</span><span>{{staticInfo.jr_cy_ywczcs}}</span></a-col>
</a-row>
</a-card>
</a-col>
<a-col :span="9" class="staticCol">
<div class="staticTitle">本学年作业使用排行TOP10</div>
<div class="staticTitle">
<span>本学年作业使用排行TOP10</span>
<a-button type="link" @click="exportData('xntop10')">导出</a-button>
</div>
<a-row>
<a-col>
<a-table :dataSource="staticInfo.xntop10" :columns="columns" :pagination="false" :bordered="true"/>
<a-table :scroll="{ y: 600 }" :dataSource="staticInfo.xntop10" :columns="columns" :pagination="false"
:bordered="true">
<template #footer v-if="zysytopShow">
<div class="custom-footer" style="padding: 0;">
<a-button type="link" @click="reloadTable('xntop10')"
style="display: inline-block; line-height: normal; padding: 0;">加载更多</a-button>
</div>
</template>
</a-table>
</a-col>
</a-row>
</a-col>
<a-col :span="9" class="staticCol">
<div class="staticTitle">本学年测验使用排行TOP10</div>
<a-col :span="6" class="staticCol">
<div class="staticTitle">
<span>本学年测验使用排行TOP10</span>
<a-button type="link" @click="exportData('jrtop10')">导出</a-button>
</div>
<a-row>
<a-col>
<a-table :dataSource="staticInfo.jrtop10" :columns="columns" :pagination="false" :bordered="true" />
<a-table :scroll="{ y: 600 }" :dataSource="staticInfo.jrtop10" :columns="columns" :pagination="false"
:bordered="true">
<template #footer v-if="cysytopShow">
<div class="custom-footer" style="padding: 0;">
<a-button type="link" @click="reloadTable('jrtop10')"
style="display: inline-block; line-height: normal; padding: 0;">加载更多</a-button>
</div>
</template>
</a-table>
</a-col>
</a-row>
</a-col>
</a-row>
<a-col :span="6" class="staticCol">
<div class="staticTitle">
<span>本学年课程使用排行TOP10</span>
<a-button type="link" @click="exportData('kctop10')">导出</a-button>
</div>
<a-row>
<a-col>
<a-table :scroll="{ y: 600 }" :dataSource="staticInfo.kctop10" :columns="kccolumns" :pagination="false"
:bordered="true">
<template #footer v-if="kcsytopShow">
<div class="custom-footer" style="padding: 0;">
<a-button type="link" @click="reloadTable('kctop10')"
style="display: inline-block; line-height: normal; padding: 0;">加载更多</a-button>
</div>
</template>
</a-table>
</a-col>
</a-row>
</a-col>
<a-col :span="6" class="staticCol">
<div class="staticTitle">
<span>本学年教师使用排行TOP10</span>
<a-button type="link" @click="exportData('jstop10')">导出</a-button>
</div>
<a-row>
<a-col>
<a-table :scroll="{ y: 600 }" :dataSource="staticInfo.jstop10" :columns="columns" :pagination="false"
:bordered="true">
<template #footer v-if="jssytopShow">
<div class="custom-footer" style="padding: 0;">
<a-button type="link" @click="reloadTable('jstop10')"
style="display: inline-block; line-height: normal; padding: 0;">加载更多</a-button>
</div>
</template>
</a-table>
</a-col>
</a-row>
</a-col>
</a-row>
</div>
</template>
<script lang="ts" name="zyJxdg-zyJxdg" setup>
import { ref, reactive,onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
const staticInfo = ref<any>({});
import { ref, reactive, onMounted, defineEmits } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMethods } from '/@/hooks/system/useMethods';
const columns = [
{
title: '序号',
dataIndex: 'rownum',
key: 'rownum',
width: 62,
align: 'center',
customRender: function ({ record,text }) {
return parseInt(text);
},
},
{
title: '姓名',
dataIndex: 'skjs',
key: 'skjs',
width: 80,
ellipsis: true,
},
{
title: '次数',
dataIndex: 'count',
key: 'count',
width: 62,
align: 'center'
},
{
title: '学院',
dataIndex: 'kkdw',
key: 'kkdw',
ellipsis: true,
},
]
const { handleExportXls, handleImportXls } = useMethods();
// Emits
const emit = defineEmits(['toDetail']);
const staticInfo = ref<any>({});
const zysytopShow = ref(true)
const cysytopShow = ref(true)
const kcsytopShow = ref(true)
const jssytopShow = ref(true)
function getStaticNo(){
defHttp.get({url:'/zyInfo/zyInfo/sysStaticNo'}).then(res=>{
const columns = [
{
title: '序号',
dataIndex: 'rownum',
key: 'rownum',
width: 64,
align: 'center',
customRender: function ({ record, text }) {
return parseInt(text);
},
},
{
title: '姓名',
dataIndex: 'skjs',
key: 'skjs',
width: 80,
ellipsis: true,
},
{
title: '次数',
dataIndex: 'count',
key: 'count',
width: 62,
align: 'center'
},
{
title: '学院',
dataIndex: 'kkdw',
key: 'kkdw',
ellipsis: true,
},
]
const kccolumns = [
{
title: '序号',
dataIndex: 'rownum',
key: 'rownum',
width: 64,
align: 'center',
customRender: function ({ record, text }) {
return parseInt(text);
},
},
{
title: '课程',
dataIndex: 'kcmc',
key: 'kcmc',
align: 'center',
ellipsis: false,
},
{
title: '次数',
dataIndex: 'count',
key: 'count',
width: 62,
align: 'center'
},
{
title: '学院',
dataIndex: 'kkdw',
key: 'kkdw',
align: 'center',
width: 110,
ellipsis: false,
},
]
const xycolumns = [
{
title: '序号',
dataIndex: 'rownum',
key: 'rownum',
width: 62,
align: 'center',
customRender: function ({ record, text }) {
return parseInt(text);
},
},
{
title: '学院',
dataIndex: 'kkdw',
key: 'kkdw',
ellipsis: true,
},
{
title: '次数',
dataIndex: 'count',
key: 'count',
width: 62,
align: 'center'
},
{
title: '操作',
key: 'action',
width: 80,
align: 'center'
},
]
function getStaticNo() {
defHttp.get({ url: '/zyInfo/zyInfo/sysStaticNo' }).then(res => {
staticInfo.value = res;
console.log("🚀 ~ defHttp.get ~ staticInfo.value:", staticInfo.value)
})
}
function toDetail(kkdw, tab) {
emit('toDetail', kkdw, tab)
}
function reloadTable(tag) {
defHttp.get({ url: '/zyInfo/zyInfo/getPHData', params: { tag } }).then(res => {
staticInfo.value[tag] = res;
if (tag == 'xntop10') zysytopShow.value = false
if (tag == 'jrtop10') cysytopShow.value = false
if (tag == 'kctop10') kcsytopShow.value = false
if (tag == 'jstop10') jssytopShow.value = false
})
}
function exportData(tag) {
let title = ''
if (tag == 'xntop10') {
title = '本学年作业使用排行'
}
if (tag == 'jrtop10') {
title = '本学年测验使用排行'
}
if (tag == 'kctop10') {
title = '本学年课程使用排行'
}
if (tag == 'jstop10') {
title = '本学年教师使用排行'
}
return handleExportXls(title, '/zyInfo/zyInfo/exportPHData', { tag });
}
onMounted(() => {
getStaticNo();
});
</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;
}
.staticCol{
padding: 10px;
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.staticTitle{
margin: 10px 0;
font-size: 16px;
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
}
.staticCol {
padding: 10px;
}
.staticTitle {
margin: 10px 0;
font-size: 16px;
}
.fbzycs {
margin-left: 42px;
}
/deep/ .ant-table-footer {
padding: 0 !important;
/* 移除默认的 padding */
}
.custom-footer {
display: flex;
justify-content: center;
align-items: center;
height: 32px;
margin: 0;
}
</style>

View File

@ -58,7 +58,7 @@
</template>
<script lang="ts" name="zyJxdg-zyJxdg" setup>
import { ref, reactive } from 'vue';
import { ref, reactive,defineExpose } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns2 } from './Kczygl.data';
@ -240,8 +240,15 @@ import { defHttp } from '/@/utils/http/axios';
reload();
}
function changeQueryParams(dwh){
queryParam.value = {}
queryParam.value.kkdw = dwh
reload();
}
defineExpose({
changeQueryParams
});
</script>