|
@@ -18,7 +18,17 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
<div style="height: 70vh">
|
|
|
- <vxe-grid v-bind="gridOptions" ref="gridRef"> </vxe-grid>
|
|
|
+ <vxe-grid v-bind="gridOptions" ref="gridRef">
|
|
|
+ <template #pager>
|
|
|
+ <pagination
|
|
|
+ @pagination="queryList"
|
|
|
+ :total="state.total"
|
|
|
+ v-model:current-page="state.queryParams.PageIndex"
|
|
|
+ v-model:page-size="state.queryParams.PageSize"
|
|
|
+ :disabled="state.loading"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </vxe-grid>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
@@ -36,12 +46,16 @@ import Other from '@/utils/other';
|
|
|
import { getTrainResultAnalysisData, getTrainCalcuteAnalysisData } from '@/api/examTrain/statistics';
|
|
|
|
|
|
const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
|
|
|
+const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
|
|
|
+
|
|
|
// 定义变量内容
|
|
|
const ruleFormRef = ref<RefType>(); // 表单ref
|
|
|
const state = reactive<any>({
|
|
|
queryParams: {
|
|
|
// 查询条件
|
|
|
- crTime: defaultDate, //
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 20,
|
|
|
+ crTime: defaultDate,
|
|
|
startTime: null,
|
|
|
endTime: null,
|
|
|
keyword: ''
|
|
@@ -100,7 +114,8 @@ const queryList = async () => {
|
|
|
Reflect.deleteProperty(requestParams.value, 'crTime');
|
|
|
getTrainResultAnalysisData(requestParams.value)
|
|
|
.then((res) => {
|
|
|
- gridOptions.data = res.result.item ?? [];
|
|
|
+ gridOptions.data = res.result.items ?? [];
|
|
|
+ state.total = res?.result.pagination.totalCount ?? 0;
|
|
|
});
|
|
|
getTrainCalcuteAnalysisData(requestParams.value)
|
|
|
.then((res) => {
|