diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/controller/XxhbjwxtscwjxxController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/controller/XxhbjwxtscwjxxController.java index 206268e..7bd24cb 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/controller/XxhbjwxtscwjxxController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/controller/XxhbjwxtscwjxxController.java @@ -1,10 +1,7 @@ package org.jeecg.modules.demo.xxhbjwxtscwjxx.controller; import java.io.*; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; import java.net.URLDecoder; import java.util.zip.ZipEntry; @@ -89,6 +86,32 @@ public class XxhbjwxtscwjxxController extends JeecgController> khcllist(Xxhbjwxtscwjxx xxhbjwxtscwjxx, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtscwjxx, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = xxhbjwxtscwjxxService.page(page, queryWrapper); + + List list = pageList.getRecords(); + if(list.size()>0){ + List list2 = new ArrayList<>(); + String sorts[] = ("课程考核合理性审核记录单,课程目标达成情况评价报告,课程考核质量评价单,期未考试-试题(或内容及要求),期末考试-评分标准,历次过程性考核-内容及要求(或试题),历次过程性考核-评分标准").split(","); + for (String par : sorts){ + list2.add(list.stream().filter(item->item.getFjtype().equals(par)).findFirst().orElse(null)); + } + pageList.setRecords(list2); + pageList.getRecords().forEach(item->{ + item.setId(item.getPath()); + }); + } + return Result.OK(pageList); + } /** * 添加 diff --git a/jeecgboot-vue3/src/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList3.vue b/jeecgboot-vue3/src/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList3.vue index 46b4afe..024b5a5 100644 --- a/jeecgboot-vue3/src/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList3.vue +++ b/jeecgboot-vue3/src/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList3.vue @@ -13,17 +13,17 @@ - - - + + + - + @@ -63,7 +63,7 @@ /> - + 查询 @@ -133,6 +133,12 @@ --> + + + + + + @@ -190,7 +196,7 @@ --> - + 查询 重置 导出 @@ -406,7 +412,7 @@ function handleSuccess() { function getTableAction(record) { return [ { - label: '成绩单', + label: '学生成绩', onClick: handleCjd.bind(null, record), }, { diff --git a/jeecgboot-vue3/src/views/bl/xxhbjwxtscwjxx/Xxhbjwxtscwjxx.api.ts b/jeecgboot-vue3/src/views/bl/xxhbjwxtscwjxx/Xxhbjwxtscwjxx.api.ts index 028f9a8..1e62f1b 100644 --- a/jeecgboot-vue3/src/views/bl/xxhbjwxtscwjxx/Xxhbjwxtscwjxx.api.ts +++ b/jeecgboot-vue3/src/views/bl/xxhbjwxtscwjxx/Xxhbjwxtscwjxx.api.ts @@ -5,6 +5,7 @@ const { createConfirm } = useMessage(); enum Api { list = '/xxhbjwxtscwjxx/xxhbjwxtscwjxx/list', + khcllist = '/xxhbjwxtscwjxx/xxhbjwxtscwjxx/khcllist', save='/xxhbjwxtscwjxx/xxhbjwxtscwjxx/add', edit='/xxhbjwxtscwjxx/xxhbjwxtscwjxx/edit', deleteOne = '/xxhbjwxtscwjxx/xxhbjwxtscwjxx/delete', @@ -29,6 +30,7 @@ export const getImportUrl = Api.importExcel; * @param params */ export const list = (params) => defHttp.get({ url: Api.list, params }); +export const khcllist = (params) => defHttp.get({ url: Api.khcllist, params }); /** * 删除单个 diff --git a/jeecgboot-vue3/src/views/bl/xxhbjwxtscwjxx/XxhbjwxtscwjxxList.vue b/jeecgboot-vue3/src/views/bl/xxhbjwxtscwjxx/XxhbjwxtscwjxxList.vue index 1384fc8..dc4d67e 100644 --- a/jeecgboot-vue3/src/views/bl/xxhbjwxtscwjxx/XxhbjwxtscwjxxList.vue +++ b/jeecgboot-vue3/src/views/bl/xxhbjwxtscwjxx/XxhbjwxtscwjxxList.vue @@ -56,7 +56,7 @@ import { ref, reactive } from 'vue'; import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { useListPage } from '/@/hooks/system/useListPage'; import { columns, superQuerySchema } from './Xxhbjwxtscwjxx.data'; -import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Xxhbjwxtscwjxx.api'; +import { khcllist, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Xxhbjwxtscwjxx.api'; import { downloadFile,downloadFileLoacl } from '/@/utils/common/renderUtils'; import XxhbjwxtscwjxxModal from './components/XxhbjwxtscwjxxModal.vue'; import { useUserStore } from '/@/store/modules/user'; @@ -77,7 +77,7 @@ const emit = defineEmits(['callback']); //注册table数据 const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ tableProps: { - api: list, + api: khcllist, columns, canResize: false, useSearchForm: false, @@ -257,8 +257,7 @@ function searchReset() { function init(record) { queryParam.kcrwdm = record.kcrwdm; - queryParam.fjtype = - '历次过程性考核-评分标准,课程目标达成情况评价报告,课程考核合理性审核记录单,历次过程性考核-内容及要求(或试题),课程考核质量评价单,期未考试-试题(或内容及要求),期末考试-评分标准'; + queryParam.fjtype = '课程考核合理性审核记录单,课程目标达成情况评价报告,课程考核质量评价单,期未考试-试题(或内容及要求),期末考试-评分标准,历次过程性考核-内容及要求(或试题),历次过程性考核-评分标准'; // 平时成绩 // 期末成绩 // 期中成绩 diff --git a/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.data.ts b/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.data.ts index 3cb410d..fcec4a3 100644 --- a/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.data.ts +++ b/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.data.ts @@ -1,6 +1,6 @@ -import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; -import { rules} from '/@/utils/helper/validator'; +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { rules } from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 @@ -68,8 +68,8 @@ export const columns: BasicColumn[] = [ title: '成绩类型', dataIndex: 'cj1mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(0,text.indexOf("[")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(0, text.indexOf("[")) : ""); return text; }, }, @@ -82,8 +82,8 @@ export const columns: BasicColumn[] = [ title: '占比', dataIndex: 'cj1mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["),text.indexOf("]")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["), text.indexOf("]")) : ""); return text; } }, @@ -98,8 +98,8 @@ export const columns: BasicColumn[] = [ title: '成绩类型', dataIndex: 'cj2mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(0,text.indexOf("[")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(0, text.indexOf("[")) : ""); return text; }, }, @@ -112,8 +112,8 @@ export const columns: BasicColumn[] = [ title: '占比', dataIndex: 'cj2mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["),text.indexOf("]")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["), text.indexOf("]")) : ""); return text; } }, @@ -128,8 +128,8 @@ export const columns: BasicColumn[] = [ title: '成绩类型', dataIndex: 'cj3mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(0,text.indexOf("[")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(0, text.indexOf("[")) : ""); return text; }, }, @@ -142,8 +142,8 @@ export const columns: BasicColumn[] = [ title: '占比', dataIndex: 'cj3mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["),text.indexOf("]")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["), text.indexOf("]")) : ""); return text; } }, @@ -158,8 +158,8 @@ export const columns: BasicColumn[] = [ title: '成绩类型', dataIndex: 'cj5mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(0,text.indexOf("[")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(0, text.indexOf("[")) : ""); return text; }, }, @@ -172,8 +172,8 @@ export const columns: BasicColumn[] = [ title: '占比', dataIndex: 'cj4mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["),text.indexOf("]")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["), text.indexOf("]")) : ""); return text; } }, @@ -188,8 +188,8 @@ export const columns: BasicColumn[] = [ title: '成绩类型', dataIndex: 'cj5mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(0,text.indexOf("[")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(0, text.indexOf("[")) : ""); return text; }, }, @@ -202,8 +202,8 @@ export const columns: BasicColumn[] = [ title: '占比', dataIndex: 'cj4mc', width: 100, - customRender:({text}) =>{ - text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["),text.indexOf("]")) : ""); + customRender: ({ text }) => { + text = !text ? "" : (text.length > 0 ? text.substr(text.indexOf("["), text.indexOf("]")) : ""); return text; } }, @@ -286,24 +286,21 @@ export const columns3: BasicColumn[] = [ align: "center", dataIndex: 'cj1', width: 100, - // defaultHidden: ({text}) =>{ - // if(text){ - - // } - // return true; - // }, + defaultHidden: true, }, { title: '平时成绩2', align: "center", dataIndex: 'cj2', width: 100, + defaultHidden: true, }, { title: '平时成绩3', align: "center", dataIndex: 'cj3', width: 100, + defaultHidden: true, }, { title: '期中成绩', @@ -473,7 +470,7 @@ export const columns4: BasicColumn[] = [ // var c = parseInt(b)-parseInt(a); // text = !text ? "" : (text.length > 0 ? text.substr(a,c) : ""); // }catch(e){ - + // } // } // return text; @@ -527,27 +524,27 @@ export const columns5: BasicColumn[] = [ // 高级查询数据 export const superQuerySchema = { - kcrwdm: {title: 'kcrwdm',order: 0,view: 'text', type: 'string',}, - nj: {title: 'nj',order: 1,view: 'text', type: 'string',}, - xsztmc: {title: 'xsztmc',order: 2,view: 'text', type: 'string',}, - zymc: {title: 'zymc',order: 3,view: 'text', type: 'string',}, - xsbh: {title: 'xsbh',order: 4,view: 'text', type: 'string',}, - xsxm: {title: 'xsxm',order: 5,view: 'text', type: 'string',}, - kcmc: {title: 'kcmc',order: 6,view: 'text', type: 'string',}, - kclb: {title: 'kclb',order: 7,view: 'text', type: 'string',}, - teaxm: {title: 'teaxm',order: 8,view: 'text', type: 'string',}, - cj1: {title: 'cj1',order: 9,view: 'text', type: 'string',}, - cj2: {title: 'cj2',order: 10,view: 'text', type: 'string',}, - cj3: {title: 'cj3',order: 11,view: 'text', type: 'string',}, - cj4: {title: 'cj4',order: 12,view: 'text', type: 'string',}, - cj5: {title: 'cj5',order: 13,view: 'text', type: 'string',}, - cj1mc: {title: 'cj1mc',order: 14,view: 'text', type: 'string',}, - cj2mc: {title: 'cj2mc',order: 15,view: 'text', type: 'string',}, - cj3mc: {title: 'cj3mc',order: 16,view: 'text', type: 'string',}, - cj4mc: {title: 'cj4mc',order: 17,view: 'text', type: 'string',}, - cj5mc: {title: 'cj5mc',order: 18,view: 'text', type: 'string',}, - zcj: {title: 'zcj',order: 19,view: 'text', type: 'string',}, - cjfsmc: {title: 'cjfsmc',order: 20,view: 'text', type: 'string',}, - xdfsmc: {title: 'xdfsmc',order: 21,view: 'text', type: 'string',}, - ksxzmc: {title: 'ksxzmc',order: 22,view: 'text', type: 'string',}, + kcrwdm: { title: 'kcrwdm', order: 0, view: 'text', type: 'string', }, + nj: { title: 'nj', order: 1, view: 'text', type: 'string', }, + xsztmc: { title: 'xsztmc', order: 2, view: 'text', type: 'string', }, + zymc: { title: 'zymc', order: 3, view: 'text', type: 'string', }, + xsbh: { title: 'xsbh', order: 4, view: 'text', type: 'string', }, + xsxm: { title: 'xsxm', order: 5, view: 'text', type: 'string', }, + kcmc: { title: 'kcmc', order: 6, view: 'text', type: 'string', }, + kclb: { title: 'kclb', order: 7, view: 'text', type: 'string', }, + teaxm: { title: 'teaxm', order: 8, view: 'text', type: 'string', }, + cj1: { title: 'cj1', order: 9, view: 'text', type: 'string', }, + cj2: { title: 'cj2', order: 10, view: 'text', type: 'string', }, + cj3: { title: 'cj3', order: 11, view: 'text', type: 'string', }, + cj4: { title: 'cj4', order: 12, view: 'text', type: 'string', }, + cj5: { title: 'cj5', order: 13, view: 'text', type: 'string', }, + cj1mc: { title: 'cj1mc', order: 14, view: 'text', type: 'string', }, + cj2mc: { title: 'cj2mc', order: 15, view: 'text', type: 'string', }, + cj3mc: { title: 'cj3mc', order: 16, view: 'text', type: 'string', }, + cj4mc: { title: 'cj4mc', order: 17, view: 'text', type: 'string', }, + cj5mc: { title: 'cj5mc', order: 18, view: 'text', type: 'string', }, + zcj: { title: 'zcj', order: 19, view: 'text', type: 'string', }, + cjfsmc: { title: 'cjfsmc', order: 20, view: 'text', type: 'string', }, + xdfsmc: { title: 'xdfsmc', order: 21, view: 'text', type: 'string', }, + ksxzmc: { title: 'ksxzmc', order: 22, view: 'text', type: 'string', }, };