This commit is contained in:
yangjun 2025-01-06 08:54:03 +08:00
commit c1c10ed4fe
4 changed files with 790 additions and 493 deletions

View File

@ -6,7 +6,8 @@
<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"/>
<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">
@ -32,7 +33,8 @@
<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-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"
style="margin-left: 8px"> 导出</a-button>
</a-col>
</span>
</a-col>
@ -52,7 +54,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 { columns3 } from './Kczygl.data';
@ -227,7 +229,15 @@
}
function changeQueryParams(dwh) {
queryParam.value = {}
queryParam.value.kkdw = dwh
reload();
}
defineExpose({
changeQueryParams
});
</script>
@ -238,10 +248,12 @@
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;

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,7 +20,7 @@
</template>
<script lang="ts" name="zyJxdg-zyJxdg" setup>
import { ref, reactive } from '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';
@ -43,6 +43,8 @@
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: {
@ -198,7 +200,20 @@
}
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>
@ -209,10 +224,12 @@
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;

View File

@ -1,41 +1,177 @@
<template>
<div>
<a-row>
<a-col :span="6" class="staticCol">
<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>作业已完成总次数</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-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">
<div class="staticTitle">
<span>本学年作业使用排行TOP10</span>
<a-button type="link" @click="exportData('xntop10')">导出</a-button>
</div>
<a-row>
<a-col>
<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-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>
<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.xntop10" :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-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('kctop10')">导出</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.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>
@ -45,17 +181,26 @@
</template>
<script lang="ts" name="zyJxdg-zyJxdg" setup>
import { ref, reactive,onMounted } from 'vue';
import { ref, reactive, onMounted, defineEmits } from 'vue';
import { defHttp } from '/@/utils/http/axios';
const staticInfo = ref<any>({});
import { useMethods } from '/@/hooks/system/useMethods';
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)
const columns = [
{
title: '序号',
dataIndex: 'rownum',
key: 'rownum',
width: 62,
width: 64,
align: 'center',
customRender: function ({ record, text }) {
return parseInt(text);
@ -82,14 +227,109 @@
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();
});
@ -102,21 +342,42 @@ onMounted(() => {
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
}
}
.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>