添加统计功能
This commit is contained in:
parent
371a47ffab
commit
74015562e6
|
@ -97,7 +97,7 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '思政课程',
|
||||
align: "center",
|
||||
dataIndex: 'col59'
|
||||
dataIndex: 'szkc_dictText'
|
||||
},
|
||||
{
|
||||
title: '评价日期',
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="思政课程">
|
||||
<j-dict-select-tag placeholder="请选择思政课程" v-model:value="queryParam.col59" dictCode="szkc"/>
|
||||
<j-dict-select-tag placeholder="请选择思政课程" v-model:value="queryParam.szkc" dictCode="yn"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/ktgl/kcKetangbiao/getKtcountList',
|
||||
save='/grab/imports/xxhbtkxx/add',
|
||||
edit='/grab/imports/xxhbtkxx/edit',
|
||||
deleteOne = '/grab/imports/xxhbtkxx/delete',
|
||||
deleteBatch = '/grab/imports/xxhbtkxx/deleteBatch',
|
||||
importExcel = '/grab/imports/xxhbtkxx/importExcel',
|
||||
exportXls = '/ktgl/kcKetangbiao/exportKcnumXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,319 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { log } from 'console';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '学年学期',
|
||||
align: "center",
|
||||
dataIndex: 'xnxq'
|
||||
},
|
||||
{
|
||||
title: '开课单位',
|
||||
align: "center",
|
||||
dataIndex: 'kkdw'
|
||||
},
|
||||
{
|
||||
title: '开课数量',
|
||||
align: "center",
|
||||
dataIndex: 'num'
|
||||
},
|
||||
];
|
||||
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
label: "学年学期",
|
||||
field: 'xqxn',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
field: 'xm',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "cjr",
|
||||
field: 'cjr',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "sjh",
|
||||
field: 'sjh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "tksy",
|
||||
field: 'tksy',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "xyjwmsshyj",
|
||||
field: 'xyjwmsshyj',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "yjxq",
|
||||
field: 'yjxq',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "sqrdw",
|
||||
field: 'sqrdw',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "bizbh",
|
||||
field: 'bizbh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "jwcsh",
|
||||
field: 'jwcsh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "szxyldshyj",
|
||||
field: 'szxyldshyj',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "shxq",
|
||||
field: 'shxq',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "lcjgbh",
|
||||
field: 'lcjgbh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "bkjh",
|
||||
field: 'bkjh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "时间戳",
|
||||
field: 'timestamps',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "课程名称",
|
||||
field: 'kcmc',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "pbh",
|
||||
field: 'pbh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "教材",
|
||||
field: 'jc',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "上课日期",
|
||||
field: 'skrq',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "kcxxbh",
|
||||
field: 'kcxxbh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "学期",
|
||||
field: 'xq',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "jsgh",
|
||||
field: 'jsgh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "编号",
|
||||
field: 'bh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "授课教师",
|
||||
field: 'skjs',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "lcbh",
|
||||
field: 'lcbh',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "1-调整时间,2-调整地点,3-更换教师,4-其他",
|
||||
field: 'tklx',
|
||||
component: 'Input',
|
||||
colProps: {span: 6},
|
||||
},
|
||||
];
|
||||
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '姓名',
|
||||
field: 'xm',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'cjr',
|
||||
field: 'cjr',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'sjh',
|
||||
field: 'sjh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'tksy',
|
||||
field: 'tksy',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'xyjwmsshyj',
|
||||
field: 'xyjwmsshyj',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'yjxq',
|
||||
field: 'yjxq',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'sqrdw',
|
||||
field: 'sqrdw',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'bizbh',
|
||||
field: 'bizbh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'jwcsh',
|
||||
field: 'jwcsh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'szxyldshyj',
|
||||
field: 'szxyldshyj',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'shxq',
|
||||
field: 'shxq',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'lcjgbh',
|
||||
field: 'lcjgbh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'bkjh',
|
||||
field: 'bkjh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '时间戳',
|
||||
field: 'timestamps',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '课程名称',
|
||||
field: 'kcmc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'pbh',
|
||||
field: 'pbh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '教材',
|
||||
field: 'jc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课日期',
|
||||
field: 'skrq',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'kcxxbh',
|
||||
field: 'kcxxbh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '学期',
|
||||
field: 'xq',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'jsgh',
|
||||
field: 'jsgh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '编号',
|
||||
field: 'bh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '授课教师',
|
||||
field: 'skjs',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: 'lcbh',
|
||||
field: 'lcbh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '1-调整时间,2-调整地点,3-更换教师,4-其他',
|
||||
field: 'tklx',
|
||||
component: 'Input',
|
||||
},
|
||||
// TODO 主键隐藏字段,目前写死为ID
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
];
|
|
@ -0,0 +1,150 @@
|
|||
<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="学年学期">
|
||||
<j-dict-select-tag placeholder="请选择学年学期" v-model:value="queryParam.xnxq" dictCode="kc_xqxn_history,title,title,true order by start_time desc"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--</template>-->
|
||||
<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-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px">导出</a-button>
|
||||
<!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
</a>-->
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction />
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template #htmlSlot="{text}">
|
||||
<div v-html="text"></div>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="kc-xxhbtkxx" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './KetangNum.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KetangNum.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { JInput } from '/@/components/Form';
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '课堂统计',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
// params.column = 'skrq',params.order = 'desc';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "课堂统计",
|
||||
url: getExportUrl,
|
||||
params: () => {
|
||||
let params:any = {};
|
||||
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 handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
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>
|
|
@ -99,11 +99,11 @@ const queryParam = ref<any>({});
|
|||
align: 'center',
|
||||
dataIndex: 'skrq',
|
||||
},
|
||||
{
|
||||
title: '听课人',
|
||||
align: 'center',
|
||||
dataIndex: 'username',
|
||||
},
|
||||
// {
|
||||
// title: '听课人',
|
||||
// align: 'center',
|
||||
// dataIndex: 'username',
|
||||
// },
|
||||
]);
|
||||
const dataSource: any = ref([]);
|
||||
|
||||
|
|
|
@ -117,11 +117,11 @@ const listTkjlApi = (params) => defHttp.get({ url: Api.listTkjl, params });
|
|||
align: 'center',
|
||||
dataIndex: 'skrq',
|
||||
},
|
||||
{
|
||||
title: '评课分数',
|
||||
align: 'center',
|
||||
dataIndex: 'score',
|
||||
},
|
||||
// {
|
||||
// title: '评课分数',
|
||||
// align: 'center',
|
||||
// dataIndex: 'score',
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
|
|
Loading…
Reference in New Issue