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

@ -6,22 +6,23 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="6">
<a-form-item label="学期学年"> <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-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item label="开课单位"> <a-form-item label="开课单位">
<JDictSelectTag placeholder="开课单位" v-model:value="queryParam.kkdw" :dictCode="`kc_kkdw_view,kkdw,kkdw`"/> <JDictSelectTag placeholder="开课单位" v-model:value="queryParam.kkdw" :dictCode="`kc_kkdw_view,kkdw,kkdw`" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item label="授课教师"> <a-form-item label="授课教师">
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs"/> <a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item label="是否完成"> <a-form-item label="是否完成">
<a-select v-model:value="queryParam.sfwc" placeholder="是否完成" > <a-select v-model:value="queryParam.sfwc" placeholder="是否完成">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option :value="2"></a-select-option> <a-select-option :value="2"></a-select-option>
<a-select-option :value="1"></a-select-option> <a-select-option :value="1"></a-select-option>
@ -32,7 +33,8 @@
<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: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> </a-col>
</span> </span>
</a-col> </a-col>
@ -40,7 +42,7 @@
</a-form> </a-form>
</div> </div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable" > <BasicTable @register="registerTable">
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" /> <TableAction :actions="getTableAction(record)" />
@ -52,32 +54,32 @@
</template> </template>
<script lang="ts" name="zyJxdg-zyJxdg" setup> <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 { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns3 } from './Kczygl.data'; import { columns3 } from './Kczygl.data';
import { sysStaticCyList, deleteOne, batchDelete, getImportUrl, getStaticCyExportUrl } from './Kczygl.api'; import { sysStaticCyList, deleteOne, batchDelete, getImportUrl, getStaticCyExportUrl } from './Kczygl.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import { JInput, JDictSelectTag } from '/@/components/Form'; import { JInput, JDictSelectTag } from '/@/components/Form';
import ZyJxdgModal from './components/KczyglModal.vue' import ZyJxdgModal from './components/KczyglModal.vue'
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting'; import { useGlobSetting } from '/@/hooks/setting';
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl; const baseApiUrl = globSetting.domainUrl;
const { createMessage } = useMessage(); const { createMessage } = useMessage();
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 activeKey = ref('1'); const activeKey = ref('1');
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
api: sysStaticCyList, api: sysStaticCyList,
columns: columns3, columns: columns3,
canResize:false, canResize: false,
useSearchForm: false, useSearchForm: false,
showActionColumn: false, showActionColumn: false,
actionColumn: { actionColumn: {
@ -85,7 +87,7 @@
fixed: 'right', fixed: 'right',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
params.column = '',params.order = '';// params.column = '', params.order = '';//
return Object.assign(params, queryParam.value); return Object.assign(params, queryParam.value);
}, },
}, },
@ -93,108 +95,108 @@
name: "课程测验情况统计", name: "课程测验情况统计",
url: getStaticCyExportUrl, url: getStaticCyExportUrl,
params: () => { params: () => {
return Object.assign({},queryParam.value); return Object.assign({}, queryParam.value);
} }
}, },
importConfig: { importConfig: {
url: getImportUrl, url: getImportUrl,
success: handleSuccess success: handleSuccess
}, },
}); });
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext; const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({ const labelCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 7 }, sm: { span: 7 },
}); });
const wrapperCol = reactive({ const wrapperCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 16 }, sm: { span: 16 },
}); });
/** /**
* 新增事件 * 新增事件
*/ */
function handleAdd() { function handleAdd() {
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.add(); registerModal.value.add();
} }
/** /**
* 编辑事件 * 编辑事件
*/ */
function handleEdit(record: Recordable) { function handleEdit(record: Recordable) {
if(record.filePath){ if (record.filePath) {
if(!record.pdfPath){ if (!record.pdfPath) {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑") createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return; return;
} }
} }
if(record.jxrlFilePath){ if (record.jxrlFilePath) {
if(!record.jxrlPdfPath){ if (!record.jxrlPdfPath) {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑") createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return; return;
} }
} }
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
function openPdf(record){ function openPdf(record) {
if(record){ if (record) {
var url2 = getFileAccessHttpUrl(record) var url2 = getFileAccessHttpUrl(record)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2); let url = baseApiUrl + "/generic/web/viewer.html?file=" + encodeURIComponent(url2);
window.open(url,"_blank") window.open(url, "_blank")
}else{ } else {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览") createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览")
} }
} }
/** /**
* 详情 * 详情
*/ */
function handleDetail(record: Recordable) { function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true; registerModal.value.disableSubmit = true;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 删除事件 * 删除事件
*/ */
async function handleDelete(record) { async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess); await deleteOne({ id: record.id }, handleSuccess);
} }
/** /**
* 批量删除事件 * 批量删除事件
*/ */
async function batchHandleDelete() { async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess); await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
} }
/** /**
* 成功回调 * 成功回调
*/ */
function handleSuccess() { function handleSuccess() {
(selectedRowKeys.value = []) && reload(); (selectedRowKeys.value = []) && reload();
} }
/** /**
* 操作栏 * 操作栏
*/ */
function getTableAction(record) { function getTableAction(record) {
return [ return [
{ {
label: '详情', label: '详情',
onClick: handleDetail.bind(null, record), onClick: handleDetail.bind(null, record),
}, },
]; ];
} }
/** /**
* 下拉操作栏 * 下拉操作栏
*/ */
function getDropDownAction(record) { function getDropDownAction(record) {
return [ return [
{ {
label: '详情', label: '详情',
@ -207,45 +209,55 @@
} }
} }
] ]
} }
/** /**
* 查询 * 查询
*/ */
function searchQuery() { function searchQuery() {
reload(); reload();
} }
/** /**
* 重置 * 重置
*/ */
function searchReset() { function searchReset() {
queryParam.value = {}; queryParam.value = {};
selectedRowKeys.value = []; selectedRowKeys.value = [];
// //
reload(); reload();
} }
function changeQueryParams(dwh) {
queryParam.value = {}
queryParam.value.kkdw = dwh
reload();
}
defineExpose({
changeQueryParams
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
.table-page-search-submitButtons { .table-page-search-submitButtons {
display: block; display: block;
margin-bottom: 24px; margin-bottom: 24px;
white-space: nowrap; white-space: nowrap;
} }
.query-group-cust{
.query-group-cust {
width: calc(50% - 15px); width: calc(50% - 15px);
min-width: 100px !important; min-width: 100px !important;
} }
.query-group-split-cust{
.query-group-split-cust {
width: 30px; width: 30px;
display: inline-block; display: inline-block;
text-align: center text-align: center
} }
} }
</style> </style>

View File

@ -2,13 +2,13 @@
<div> <div>
<a-tabs v-model:activeKey="activeKey" type="card" style="background-color: white;"> <a-tabs v-model:activeKey="activeKey" type="card" style="background-color: white;">
<a-tab-pane key="1" tab="统计信息"> <a-tab-pane key="1" tab="统计信息">
<TjsjList></TjsjList> <TjsjList @toDetail="toDetail"></TjsjList>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="作业统计"> <a-tab-pane key="2" tab="作业统计">
<ZyKctjList></ZyKctjList> <ZyKctjList ref="zyKctjListRef"></ZyKctjList>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="3" tab="测验统计"> <a-tab-pane key="3" tab="测验统计">
<CyKctjList></CyKctjList> <CyKctjList ref="cyKctjListRef"></CyKctjList>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="4" tab="查重次数剩余数量"> <a-tab-pane key="4" tab="查重次数剩余数量">
<CccssyslList></CccssyslList> <CccssyslList></CccssyslList>
@ -20,35 +20,37 @@
</template> </template>
<script lang="ts" name="zyJxdg-zyJxdg" setup> <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 { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns2 } from './Kczygl.data'; import { columns2 } from './Kczygl.data';
import { list2, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Kczygl.api'; import { list2, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Kczygl.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import { JInput, JDictSelectTag } from '/@/components/Form'; import { JInput, JDictSelectTag } from '/@/components/Form';
import ZyJxdgModal from './components/KczyglModal.vue' import ZyJxdgModal from './components/KczyglModal.vue'
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting'; import { useGlobSetting } from '/@/hooks/setting';
import TjsjList from '/@/views/zy/sysZy/kczygl/TjsjList.vue'; import TjsjList from '/@/views/zy/sysZy/kczygl/TjsjList.vue';
import ZyKctjList from '/@/views/zy/sysZy/kczygl/ZyKctjList.vue'; import ZyKctjList from '/@/views/zy/sysZy/kczygl/ZyKctjList.vue';
import CyKctjList from '/@/views/zy/sysZy/kczygl/CyKctjList.vue'; import CyKctjList from '/@/views/zy/sysZy/kczygl/CyKctjList.vue';
import CccssyslList from '/@/views/zy/sysZy/kczygl/CccssyslList.vue'; import CccssyslList from '/@/views/zy/sysZy/kczygl/CccssyslList.vue';
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl; const baseApiUrl = globSetting.domainUrl;
const { createMessage } = useMessage(); const { createMessage } = useMessage();
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 activeKey = ref('1'); const activeKey = ref('1');
//table const zyKctjListRef = ref(null)
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const cyKctjListRef = ref(null)
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
api: list2, api: list2,
columns: columns2, columns: columns2,
canResize:false, canResize: false,
useSearchForm: false, useSearchForm: false,
showActionColumn: false, showActionColumn: false,
actionColumn: { actionColumn: {
@ -56,7 +58,7 @@
fixed: 'right', fixed: 'right',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
params.column = '',params.order = '';// params.column = '', params.order = '';//
return Object.assign(params, queryParam.value); return Object.assign(params, queryParam.value);
}, },
}, },
@ -64,108 +66,108 @@
name: "课程作业管理", name: "课程作业管理",
url: getExportUrl, url: getExportUrl,
params: () => { params: () => {
return Object.assign({},queryParam.value); return Object.assign({}, queryParam.value);
} }
}, },
importConfig: { importConfig: {
url: getImportUrl, url: getImportUrl,
success: handleSuccess success: handleSuccess
}, },
}); });
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext; const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({ const labelCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 7 }, sm: { span: 7 },
}); });
const wrapperCol = reactive({ const wrapperCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 16 }, sm: { span: 16 },
}); });
/** /**
* 新增事件 * 新增事件
*/ */
function handleAdd() { function handleAdd() {
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.add(); registerModal.value.add();
} }
/** /**
* 编辑事件 * 编辑事件
*/ */
function handleEdit(record: Recordable) { function handleEdit(record: Recordable) {
if(record.filePath){ if (record.filePath) {
if(!record.pdfPath){ if (!record.pdfPath) {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑") createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return; return;
} }
} }
if(record.jxrlFilePath){ if (record.jxrlFilePath) {
if(!record.jxrlPdfPath){ if (!record.jxrlPdfPath) {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑") createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return; return;
} }
} }
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
function openPdf(record){ function openPdf(record) {
if(record){ if (record) {
var url2 = getFileAccessHttpUrl(record) var url2 = getFileAccessHttpUrl(record)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2); let url = baseApiUrl + "/generic/web/viewer.html?file=" + encodeURIComponent(url2);
window.open(url,"_blank") window.open(url, "_blank")
}else{ } else {
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览") createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览")
} }
} }
/** /**
* 详情 * 详情
*/ */
function handleDetail(record: Recordable) { function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true; registerModal.value.disableSubmit = true;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 删除事件 * 删除事件
*/ */
async function handleDelete(record) { async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess); await deleteOne({ id: record.id }, handleSuccess);
} }
/** /**
* 批量删除事件 * 批量删除事件
*/ */
async function batchHandleDelete() { async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess); await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
} }
/** /**
* 成功回调 * 成功回调
*/ */
function handleSuccess() { function handleSuccess() {
(selectedRowKeys.value = []) && reload(); (selectedRowKeys.value = []) && reload();
} }
/** /**
* 操作栏 * 操作栏
*/ */
function getTableAction(record) { function getTableAction(record) {
return [ return [
{ {
label: '详情', label: '详情',
onClick: handleDetail.bind(null, record), onClick: handleDetail.bind(null, record),
}, },
]; ];
} }
/** /**
* 下拉操作栏 * 下拉操作栏
*/ */
function getDropDownAction(record) { function getDropDownAction(record) {
return [ return [
{ {
label: '详情', label: '详情',
@ -178,45 +180,60 @@
} }
} }
] ]
} }
/** /**
* 查询 * 查询
*/ */
function searchQuery() { function searchQuery() {
reload(); reload();
} }
/** /**
* 重置 * 重置
*/ */
function searchReset() { function searchReset() {
queryParam.value = {}; queryParam.value = {};
selectedRowKeys.value = []; selectedRowKeys.value = [];
// //
reload(); 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
.table-page-search-submitButtons { .table-page-search-submitButtons {
display: block; display: block;
margin-bottom: 24px; margin-bottom: 24px;
white-space: nowrap; white-space: nowrap;
} }
.query-group-cust{
.query-group-cust {
width: calc(50% - 15px); width: calc(50% - 15px);
min-width: 100px !important; min-width: 100px !important;
} }
.query-group-split-cust{
.query-group-split-cust {
width: 30px; width: 30px;
display: inline-block; display: inline-block;
text-align: center text-align: center
} }
} }
</style> </style>

View File

@ -1,41 +1,177 @@
<template> <template>
<div> <div>
<a-row> <a-row>
<a-col :span="6" class="staticCol"> <a-col :span="10">
<a-row>
<a-col :span="12" class="staticCol">
<a-card title="本学年使用情况"> <a-card title="本学年使用情况">
<a-row> <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_syzcs
<a-col :span="24" class="staticCol"><span>作业互评总次数</span><span>{{staticInfo.xn_zy_hpzcs}}</span></a-col> }}</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_hpzcs
<a-col :span="24" class="staticCol"><span>查重次数</span><span>{{staticInfo.xn_zy_cccs}}</span></a-col> }}</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 class="fbzycs">使用查重次数</span><span>{{ staticInfo.xn_zy_cccs
<a-col :span="24" class="staticCol"><span>测验已完成总次数</span><span>{{staticInfo.xn_cy_ywczcs}}</span></a-col> }}</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-row>
</a-card> </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-col :span="6" class="staticCol">
<a-row> <div class="staticTitle">
<a-col :span="24" class="staticCol"><span>作业使用总次数</span><span>{{staticInfo.jr_zy_syzcs}}</span></a-col> <span>本学年测验使用排行TOP10</span>
<a-col :span="24" class="staticCol"><span>作业互评总次数</span><span>{{staticInfo.jr_zy_hpzcs}}</span></a-col> <a-button type="link" @click="exportData('jrtop10')">导出</a-button>
<a-col :span="24" class="staticCol"><span>作业已完成总次数</span><span>{{staticInfo.jr_zy_ywczcs}}</span></a-col> </div>
<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-row> <a-row>
<a-col> <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-col>
</a-row> </a-row>
</a-col> </a-col>
<a-col :span="9" class="staticCol"> <a-col :span="6" class="staticCol">
<div class="staticTitle">本学年测验使用排行TOP10</div> <div class="staticTitle">
<span>本学年课程使用排行TOP10</span>
<a-button type="link" @click="exportData('kctop10')">导出</a-button>
</div>
<a-row> <a-row>
<a-col> <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-col>
</a-row> </a-row>
</a-col> </a-col>
@ -45,19 +181,28 @@
</template> </template>
<script lang="ts" name="zyJxdg-zyJxdg" setup> <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'; import { defHttp } from '/@/utils/http/axios';
const staticInfo = ref<any>({}); import { useMethods } from '/@/hooks/system/useMethods';
const columns = [ 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: '序号', title: '序号',
dataIndex: 'rownum', dataIndex: 'rownum',
key: 'rownum', key: 'rownum',
width: 62, width: 64,
align: 'center', align: 'center',
customRender: function ({ record,text }) { customRender: function ({ record, text }) {
return parseInt(text); return parseInt(text);
}, },
}, },
@ -81,42 +226,158 @@
key: 'kkdw', key: 'kkdw',
ellipsis: true, 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(){ function getStaticNo() {
defHttp.get({url:'/zyInfo/zyInfo/sysStaticNo'}).then(res=>{ defHttp.get({ url: '/zyInfo/zyInfo/sysStaticNo' }).then(res => {
staticInfo.value = 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(() => { onMounted(() => {
getStaticNo(); getStaticNo();
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
.table-page-search-submitButtons { .table-page-search-submitButtons {
display: block; display: block;
margin-bottom: 24px; margin-bottom: 24px;
white-space: nowrap; white-space: nowrap;
} }
.query-group-cust{
.query-group-cust {
width: calc(50% - 15px); width: calc(50% - 15px);
min-width: 100px !important; min-width: 100px !important;
} }
.query-group-split-cust{
.query-group-split-cust {
width: 30px; width: 30px;
display: inline-block; display: inline-block;
text-align: center text-align: center
} }
} }
.staticCol{
.staticCol {
padding: 10px; padding: 10px;
} }
.staticTitle{
.staticTitle {
margin: 10px 0; margin: 10px 0;
font-size: 16px; 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> </style>

View File

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