diff --git a/src/api/basic/basicpracticeclassplan.ts b/src/api/basic/basicpracticeclassplan.ts
new file mode 100644
index 0000000..6e76947
--- /dev/null
+++ b/src/api/basic/basicpracticeclassplan.ts
@@ -0,0 +1,98 @@
+import request from '/@/utils/request';
+
+/**
+ * 分页查询顶岗班级计划
+ * @param query 查询参数
+ */
+export const fetchList = (query?: any) => {
+ return request({
+ url: '/basic/basicpracticeclassplan/page',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 通过id查询顶岗班级计划
+ * @param id 主键id
+ */
+export const getObj = (id: string) => {
+ return request({
+ url: '/basic/basicpracticeclassplan/detail',
+ method: 'get',
+ params: { id },
+ });
+};
+
+/**
+ * 新增顶岗班级计划
+ * @param obj 数据对象
+ */
+export const addObj = (obj: any) => {
+ return request({
+ url: '/basic/basicpracticeclassplan',
+ method: 'post',
+ data: obj,
+ });
+};
+
+/**
+ * 修改顶岗班级计划
+ * @param obj 数据对象
+ */
+export const putObj = (obj: any) => {
+ return request({
+ url: '/basic/basicpracticeclassplan/edit',
+ method: 'post',
+ data: obj,
+ });
+};
+
+/**
+ * 删除顶岗班级计划
+ * @param ids id数组
+ */
+export const delObj = (ids: string[]) => {
+ return request({
+ url: '/basic/basicpracticeclassplan/delete',
+ method: 'post',
+ data: ids,
+ });
+};
+
+/**
+ * 下载导入模板
+ */
+export const downloadImportTemplate = () => {
+ return request({
+ url: '/basic/basicpracticeclassplan/importTemplate',
+ method: 'get',
+ responseType: 'blob',
+ });
+};
+
+/**
+ * 导入顶岗班级计划
+ * @param formData 文件表单数据
+ */
+export const importData = (formData: FormData) => {
+ return request({
+ url: '/basic/basicpracticeclassplan/import',
+ method: 'post',
+ data: formData,
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+};
+
+/**
+ * 导出模板
+ */
+export const exportTemplate = () => {
+ return request({
+ url: '/basic/basicpracticeclassplan/exportTemplate',
+ method: 'get',
+ responseType: 'blob',
+ });
+};
\ No newline at end of file
diff --git a/src/api/basic/basicstudent.ts b/src/api/basic/basicstudent.ts
index dca1daa..9aadd91 100644
--- a/src/api/basic/basicstudent.ts
+++ b/src/api/basic/basicstudent.ts
@@ -460,7 +460,7 @@ export const queryStuBaseByNo = (obj: string | number) => {
*/
export const queryStuindex = (query?: any) => {
return request({
- url: '/basic/basicstudent/queryStuindex',
+ url: '/basic/basicstudentinfo/queryXJDataByPage',
method: 'get',
params: query,
});
diff --git a/src/api/basic/basicstudentavatar.ts b/src/api/basic/basicstudentavatar.ts
index d54a600..0525c67 100644
--- a/src/api/basic/basicstudentavatar.ts
+++ b/src/api/basic/basicstudentavatar.ts
@@ -6,7 +6,7 @@ import request from '/@/utils/request';
*/
export const fetchList = (query?: any) => {
return request({
- url: '/basic/basicstudent/avatar/list',
+ url: '/basic/basicstudent/avatar/page',
method: 'get',
params: query,
});
diff --git a/src/api/purchase/purchasingrequisition.ts b/src/api/purchase/purchasingrequisition.ts
index 5e654cf..d2ebaf1 100644
--- a/src/api/purchase/purchasingrequisition.ts
+++ b/src/api/purchase/purchasingrequisition.ts
@@ -437,3 +437,12 @@ export function getSupplementFilesByApplyId(applyId: string) {
params: { purchaseId: applyId },
});
}
+
+export function exportPurchaseApply(params?: any) {
+ return request({
+ url: '/purchase/purchasingapply/export',
+ method: 'get',
+ params,
+ responseType: 'blob',
+ });
+}
diff --git a/src/api/stuwork/classmasterjobapply.ts b/src/api/stuwork/classmasterjobapply.ts
new file mode 100644
index 0000000..23d1d56
--- /dev/null
+++ b/src/api/stuwork/classmasterjobapply.ts
@@ -0,0 +1,61 @@
+import request from '/@/utils/request';
+
+/**
+ * 分页查询班主任任职/调换申请
+ * @param query
+ */
+export const fetchList = (query?: any) => {
+ return request({
+ url: '/stuwork/classmasterjobapply/page',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取详情
+ * @param id
+ */
+export const getDetail = (id: string) => {
+ return request({
+ url: '/stuwork/classmasterjobapply/detail',
+ method: 'get',
+ params: { id },
+ });
+};
+
+/**
+ * 新增班主任任职/调换申请
+ * @param data
+ */
+export const addObj = (data: any) => {
+ return request({
+ url: '/stuwork/classmasterjobapply/add',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 班主任任职/调换申请审批/撤回
+ * @param data
+ */
+export const auditObj = (data: any) => {
+ return request({
+ url: '/stuwork/classmasterjobapply/audit',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 删除班主任任职/调换申请
+ * @param ids
+ */
+export const delObj = (ids: string[]) => {
+ return request({
+ url: '/stuwork/classmasterjobapply/delete',
+ method: 'post',
+ data: ids,
+ });
+};
\ No newline at end of file
diff --git a/src/api/stuwork/dininghall.ts b/src/api/stuwork/dininghall.ts
new file mode 100644
index 0000000..c534099
--- /dev/null
+++ b/src/api/stuwork/dininghall.ts
@@ -0,0 +1,66 @@
+import request from '/@/utils/request';
+
+/**
+ * 分页查询食堂列表
+ */
+export const fetchList = (query?: any) => {
+ return request({
+ url: '/stuwork/dininghall/page',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取食堂列表(不分页)
+ */
+export const getList = () => {
+ return request({
+ url: '/stuwork/dininghall/list',
+ method: 'get',
+ });
+};
+
+/**
+ * 获取食堂详情
+ */
+export const getObj = (id: string) => {
+ return request({
+ url: '/stuwork/dininghall/detail',
+ method: 'get',
+ params: { id },
+ });
+};
+
+/**
+ * 新增食堂
+ */
+export const addObj = (data: any) => {
+ return request({
+ url: '/stuwork/dininghall',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 修改食堂
+ */
+export const putObj = (data: any) => {
+ return request({
+ url: '/stuwork/dininghall/edit',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 删除食堂
+ */
+export const delObjs = (ids: string[]) => {
+ return request({
+ url: '/stuwork/dininghall/delete',
+ method: 'post',
+ data: ids,
+ });
+};
\ No newline at end of file
diff --git a/src/api/stuwork/dininghallvote.ts b/src/api/stuwork/dininghallvote.ts
new file mode 100644
index 0000000..eeb51f4
--- /dev/null
+++ b/src/api/stuwork/dininghallvote.ts
@@ -0,0 +1,66 @@
+import request from '/@/utils/request';
+
+/**
+ * 分页查询食堂调查题目列表
+ */
+export const fetchList = (query?: any) => {
+ return request({
+ url: '/stuwork/dininghallvote/page',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取食堂调查题目详情
+ */
+export const getObj = (id: string) => {
+ return request({
+ url: '/stuwork/dininghallvote/detail',
+ method: 'get',
+ params: { id },
+ });
+};
+
+/**
+ * 新增食堂调查题目
+ */
+export const addObj = (data: any) => {
+ return request({
+ url: '/stuwork/dininghallvote',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 修改食堂调查题目
+ */
+export const putObj = (data: any) => {
+ return request({
+ url: '/stuwork/dininghallvote/edit',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 删除食堂调查题目
+ */
+export const delObjs = (ids: string[]) => {
+ return request({
+ url: '/stuwork/dininghallvote/delete',
+ method: 'post',
+ data: ids,
+ });
+};
+
+/**
+ * 获取题目类型字典
+ */
+export const getQuestionnaireDict = () => {
+ return request({
+ url: '/admin/dict/type/questionnaire',
+ method: 'get',
+ });
+};
\ No newline at end of file
diff --git a/src/api/stuwork/dininghallvoteresult.ts b/src/api/stuwork/dininghallvoteresult.ts
new file mode 100644
index 0000000..f6487b8
--- /dev/null
+++ b/src/api/stuwork/dininghallvoteresult.ts
@@ -0,0 +1,22 @@
+import request from '/@/utils/request';
+
+/**
+ * 分页查询食堂调查明细
+ */
+export const fetchList = (query?: any) => {
+ return request({
+ url: '/stuwork/dininghallvoteresult/page',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取食堂列表
+ */
+export const getDiningHallList = () => {
+ return request({
+ url: '/stuwork/dininghall/list',
+ method: 'get',
+ });
+};
\ No newline at end of file
diff --git a/src/api/stuwork/dininghallvoteresultanalysis.ts b/src/api/stuwork/dininghallvoteresultanalysis.ts
new file mode 100644
index 0000000..280e1b6
--- /dev/null
+++ b/src/api/stuwork/dininghallvoteresultanalysis.ts
@@ -0,0 +1,23 @@
+import request from '/@/utils/request';
+
+/**
+ * 获取学生统计列表
+ */
+export const getStatisticsList = (query?: any) => {
+ return request({
+ url: '/stuwork/dininghallvoteresultanalysis/getStatisticsList',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取教职工统计列表
+ */
+export const getStatisticsListByTea = (query?: any) => {
+ return request({
+ url: '/stuwork/dininghallvoteresultanalysis/getStatisticsListByTea',
+ method: 'get',
+ params: query,
+ });
+};
\ No newline at end of file
diff --git a/src/api/stuwork/employmentinformationsurvey.ts b/src/api/stuwork/employmentinformationsurvey.ts
new file mode 100644
index 0000000..709e199
--- /dev/null
+++ b/src/api/stuwork/employmentinformationsurvey.ts
@@ -0,0 +1,44 @@
+import request from '/@/utils/request';
+
+/**
+ * 获取部门统计列表
+ */
+export const getStatisticsDept = (query?: any) => {
+ return request({
+ url: '/stuwork/employmentinformationsurvey/getStatisticsDept',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取班级统计列表
+ */
+export const getStatisticsClass = (query?: any) => {
+ return request({
+ url: '/stuwork/employmentinformationsurvey/getStatisticsClass',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取班级学生信息
+ */
+export const getClassStudentInfo = (query?: any) => {
+ return request({
+ url: '/stuwork/employmentinformationsurvey/getClassStudentInfo',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取班主任班级列表
+ */
+export const queryMasterClass = () => {
+ return request({
+ url: '/basic/basicclass/queryMasterClass',
+ method: 'get',
+ });
+};
\ No newline at end of file
diff --git a/src/api/stuwork/stuturnoverlossconfig.ts b/src/api/stuwork/stuturnoverlossconfig.ts
new file mode 100644
index 0000000..775adf2
--- /dev/null
+++ b/src/api/stuwork/stuturnoverlossconfig.ts
@@ -0,0 +1,83 @@
+import request from '/@/utils/request';
+
+/**
+ * 分页查询学籍异动流失配置
+ * @param query
+ */
+export const fetchList = (query?: any) => {
+ return request({
+ url: '/stuwork/stuturnoverlossconfig/page',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 获取详情
+ * @param id
+ */
+export const getDetail = (id: string) => {
+ return request({
+ url: '/stuwork/stuturnoverlossconfig/detail',
+ method: 'get',
+ params: { id },
+ });
+};
+
+/**
+ * 新增学籍异动流失配置
+ * @param data
+ */
+export const addObj = (data: any) => {
+ return request({
+ url: '/stuwork/stuturnoverlossconfig',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 编辑学籍异动流失配置
+ * @param data
+ */
+export const editObj = (data: any) => {
+ return request({
+ url: '/stuwork/stuturnoverlossconfig/edit',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 删除学籍异动流失配置
+ * @param ids
+ */
+export const delObj = (ids: string[]) => {
+ return request({
+ url: '/stuwork/stuturnoverlossconfig/delete',
+ method: 'post',
+ data: ids,
+ });
+};
+
+/**
+ * 获取所有流失类型的异动配置
+ */
+export const getAllLossTurnoverTypes = () => {
+ return request({
+ url: '/stuwork/stuturnoverlossconfig/getAllLossTurnoverTypes',
+ method: 'get',
+ });
+};
+
+/**
+ * 根据异动类型判断是否属于流失
+ * @param turnoverType
+ */
+export const isTurnoverTypeLoss = (turnoverType: string) => {
+ return request({
+ url: '/stuwork/stuturnoverlossconfig/isTurnoverTypeLoss',
+ method: 'get',
+ params: { turnoverType },
+ });
+};
\ No newline at end of file
diff --git a/src/api/stuwork/stuturnoverrule.ts b/src/api/stuwork/stuturnoverrule.ts
new file mode 100644
index 0000000..14453d1
--- /dev/null
+++ b/src/api/stuwork/stuturnoverrule.ts
@@ -0,0 +1,83 @@
+import request from '/@/utils/request';
+
+/**
+ * 分页查询异动规则配置列表
+ * @param query
+ */
+export const fetchList = (query?: any) => {
+ return request({
+ url: '/stuwork/stuturnoverrule/page',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 新增异动规则配置
+ * @param data
+ */
+export const addObj = (data: any) => {
+ return request({
+ url: '/stuwork/stuturnoverrule',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 获取详情
+ * @param id
+ */
+export const getDetail = (id: string) => {
+ return request({
+ url: '/stuwork/stuturnoverrule/detail',
+ method: 'get',
+ params: { id },
+ });
+};
+
+/**
+ * 编辑异动规则配置
+ * @param data
+ */
+export const editObj = (data: any) => {
+ return request({
+ url: '/stuwork/stuturnoverrule/edit',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 删除异动规则配置
+ * @param ids
+ */
+export const delObj = (ids: string[]) => {
+ return request({
+ url: '/stuwork/stuturnoverrule/delete',
+ method: 'post',
+ data: ids,
+ });
+};
+
+/**
+ * 获取所有启用的异动规则
+ */
+export const getAllActiveRules = () => {
+ return request({
+ url: '/stuwork/stuturnoverrule/getAllActiveRules',
+ method: 'get',
+ });
+};
+
+/**
+ * 根据异动类型获取规则
+ * @param turnoverType 异动类型
+ */
+export const getRulesByTurnoverType = (turnoverType: string) => {
+ return request({
+ url: '/stuwork/stuturnoverrule/getRulesByTurnoverType',
+ method: 'get',
+ params: { turnoverType },
+ });
+};
\ No newline at end of file
diff --git a/src/api/stuwork/watermonthreport.ts b/src/api/stuwork/watermonthreport.ts
index 72334e7..4de78e0 100644
--- a/src/api/stuwork/watermonthreport.ts
+++ b/src/api/stuwork/watermonthreport.ts
@@ -1,14 +1,86 @@
import request from '/@/utils/request';
/**
- * 查看水电明细
- * @param roomNo 宿舍号
+ * 分页查询宿舍水电月明细
+ * @param query
*/
-export const lookDetails = (roomNo: string) => {
+export const fetchList = (query?: any) => {
+ return request({
+ url: '/stuwork/watermonthreport/page',
+ method: 'get',
+ params: query,
+ });
+};
+
+/**
+ * 新增宿舍水电月明细
+ * @param data
+ */
+export const addObj = (data: any) => {
+ return request({
+ url: '/stuwork/watermonthreport',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 获取详情
+ * @param id
+ */
+export const getDetail = (id: string) => {
+ return request({
+ url: '/stuwork/watermonthreport/detail',
+ method: 'get',
+ params: { id },
+ });
+};
+
+/**
+ * 编辑宿舍水电月明细
+ * @param data
+ */
+export const editObj = (data: any) => {
+ return request({
+ url: '/stuwork/watermonthreport/edit',
+ method: 'post',
+ data,
+ });
+};
+
+/**
+ * 删除宿舍水电月明细
+ * @param ids
+ */
+export const delObj = (ids: string[]) => {
+ return request({
+ url: '/stuwork/watermonthreport/delete',
+ method: 'post',
+ data: ids,
+ });
+};
+
+/**
+ * 查看水电明细
+ * @param params 查询参数
+ */
+export const lookDetails = (params: any) => {
return request({
url: '/stuwork/watermonthreport/lookDetails',
method: 'get',
- params: { roomNo },
+ params,
+ });
+};
+
+/**
+ * 根据角色查看明细
+ * @param params 查询参数
+ */
+export const lookDetail = (params: any) => {
+ return request({
+ url: '/stuwork/watermonthreport/lookDetail',
+ method: 'get',
+ params,
});
};
@@ -46,4 +118,4 @@ export const getFloorStats = (params: any) => {
method: 'get',
params,
});
-};
+};
\ No newline at end of file
diff --git a/src/views/basic/basicclass/detail.vue b/src/views/basic/basicclass/detail.vue
index e3eb4cc..2e49acf 100644
--- a/src/views/basic/basicclass/detail.vue
+++ b/src/views/basic/basicclass/detail.vue
@@ -96,6 +96,29 @@
暂无数据
+
+
+
+
+
+
+
+
+
+ {{ getPracticeStatusLabel(scope.row.status) }}
+
+
+
+
+
+ {{ scope.row.needRemind === '1' ? '是' : '否' }}
+
+
+
+
+
+ 暂无数据
+
@@ -108,13 +131,13 @@
\ No newline at end of file
diff --git a/src/views/basic/basicpracticeclassplan/index.vue b/src/views/basic/basicpracticeclassplan/index.vue
new file mode 100644
index 0000000..cf2c2a2
--- /dev/null
+++ b/src/views/basic/basicpracticeclassplan/index.vue
@@ -0,0 +1,355 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
新增
+
导入
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 序号
+
+
+ {{ $index + 1 + ((state.pagination?.current || 1) - 1) * (state.pagination?.size || 10) }}
+
+
+
+
+
+ {{ col.label }}
+
+
+
+ {{ getStatusLabel(scope.row.status) }}
+
+
+
+
+ {{ scope.row.needRemind === '1' ? '是' : '否' }}
+
+
+
+ {{ scope.row[col.prop] || '-' }}
+
+
+
+
+
+ 操作
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/basic/basicstudent/queryStuindex.vue b/src/views/basic/basicstudent/queryStuindex.vue
index 91c61f7..cda1147 100644
--- a/src/views/basic/basicstudent/queryStuindex.vue
+++ b/src/views/basic/basicstudent/queryStuindex.vue
@@ -168,7 +168,10 @@
-
+
+
@@ -231,16 +234,14 @@ const state: BasicTableProps = reactive({
createdIsNeed: true,
});
-const { getDataList, sortChangeHandle, tableStyle } = useTable(state);
+const { getDataList, sortChangeHandle, sizeChangeHandle, currentChangeHandle, tableStyle } = useTable(state);
const handleSearch = () => {
- state.page = 1;
getDataList();
};
const handleReset = () => {
searchFormRef.value?.resetFields();
- state.page = 1;
getDataList();
};
@@ -252,4 +253,9 @@ const handleReset = () => {
.mb12 {
margin-bottom: 12px;
}
+.pagination-wrapper {
+ margin-top: 20px;
+ display: flex;
+ justify-content: flex-end;
+}
diff --git a/src/views/basic/basicstudentavatar/index.vue b/src/views/basic/basicstudentavatar/index.vue
index f6592ee..f9de007 100644
--- a/src/views/basic/basicstudentavatar/index.vue
+++ b/src/views/basic/basicstudentavatar/index.vue
@@ -150,44 +150,10 @@ const searchForm = reactive({
classCode: '',
});
-// 配置 useTable - 接口返回的数据结构是 { classes: [], students: [] }
+// 配置 useTable - 标准分页查询
const state: BasicTableProps = reactive({
queryForm: searchForm,
- pageList: async (queryParams: any) => {
- const res = await fetchList(queryParams);
- // 接口返回的数据结构是 { classes: [], students: [] }
- // 需要将 students 数组转换为表格数据,并关联班级信息
- if (res.data && res.data.students) {
- const students = res.data.students || [];
- const classes = res.data.classes || [];
- const classMap = new Map();
- classes.forEach((cls: any) => {
- classMap.set(cls.classCode, cls);
- });
-
- // 将学生数据与班级信息合并
- const dataList = students.map((stu: any) => {
- const classInfo = classMap.get(stu.classCode);
- return {
- ...stu,
- className: classInfo ? classInfo.classNo : stu.className || '',
- classNo: classInfo ? classInfo.classNo : '',
- };
- });
-
- return {
- ...res,
- data: {
- records: dataList,
- total: dataList.length,
- current: 1,
- size: dataList.length,
- pages: 1,
- },
- };
- }
- return res;
- },
+ pageList: fetchList,
props: {
item: 'records',
totalCount: 'total',
diff --git a/src/views/purchase/purchasingrequisition/PurchaseContractDetailDialog.vue b/src/views/purchase/purchasingrequisition/PurchaseContractDetailDialog.vue
index 147f492..9c0cc4c 100644
--- a/src/views/purchase/purchasingrequisition/PurchaseContractDetailDialog.vue
+++ b/src/views/purchase/purchasingrequisition/PurchaseContractDetailDialog.vue
@@ -75,7 +75,7 @@
审核流程
-
+
@@ -91,11 +91,13 @@
diff --git a/src/views/stuwork/classfeelog/index.vue b/src/views/stuwork/classfeelog/index.vue
index 0da7b61..0dd7535 100644
--- a/src/views/stuwork/classfeelog/index.vue
+++ b/src/views/stuwork/classfeelog/index.vue
@@ -140,6 +140,13 @@
-
+
+
+
+ ¥{{ scope.row.termBalance.toFixed(2) }}
+
+ -
+
@@ -328,6 +335,7 @@ const tableColumns = [
{ prop: 'operatTime', label: '发生时间', icon: Calendar, width: 180 },
{ prop: 'type', label: '类型', icon: Collection },
{ prop: 'money', label: '金额', icon: Money },
+ { prop: 'termBalance', label: '学期班费结余', icon: Money, width: 120 },
{ prop: 'operator', label: '经办人', icon: User },
{ prop: 'purpose', label: '用途', icon: Document, minWidth: 150 },
{ prop: 'attachment', label: '附件', width: 100 },
@@ -345,7 +353,41 @@ const state: BasicTableProps = reactive({
classCode: '',
type: '',
},
- pageList: fetchList,
+ pageList: async (params: any) => {
+ const res = await fetchList(params);
+ // 后端返回数据结构:IPage
+ // ClassFeeLogRelationVO 包含 moneyTotal 和 classFeeLogVOList
+ if (res.data && res.data.records) {
+ // 展开所有班级的班费记录
+ const allRecords: any[] = [];
+ let totalMoney: number = 0;
+
+ res.data.records.forEach((item: any) => {
+ if (item.classFeeLogVOList && Array.isArray(item.classFeeLogVOList)) {
+ item.classFeeLogVOList.forEach((log: any) => {
+ allRecords.push({
+ ...log,
+ moneyTotal: item.moneyTotal // 添加班费结余到每条记录
+ });
+ });
+ }
+ // 记录总班费结余
+ if (item.moneyTotal !== undefined) {
+ totalMoney = item.moneyTotal;
+ }
+ });
+
+ return {
+ ...res,
+ data: {
+ records: allRecords,
+ total: allRecords.length,
+ moneyTotal: totalMoney // 保留总结余
+ }
+ };
+ }
+ return res;
+ },
props: {
item: 'records',
totalCount: 'total',
diff --git a/src/views/stuwork/classmasterjobapply/index.vue b/src/views/stuwork/classmasterjobapply/index.vue
new file mode 100644
index 0000000..adf34b8
--- /dev/null
+++ b/src/views/stuwork/classmasterjobapply/index.vue
@@ -0,0 +1,515 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $index + 1 + ((state.pagination?.current || 1) - 1) * (state.pagination?.size || 10) }}
+
+
+
+
+
+ {{ scope.row.applyType === '1' ? '任职' : '调换' }}
+
+
+
+
+
+ {{ scope.row.classNo }} - {{ scope.row.className }}
+
+
+
+
+ {{ scope.row.fromTeacherNo }} - {{ scope.row.fromTeacherName || '-' }}
+
+
+
+
+ {{ scope.row.toTeacherNo }} - {{ scope.row.toTeacherName || '-' }}
+
+
+
+
+
+ {{ formatDateTime(scope.row.effectTime) }}
+
+
+
+
+
+ {{ getStatusLabel(scope.row.status) }}
+
+
+
+
+
+ {{ formatDateTime(scope.row.createTime) }}
+
+
+
+
+
+ 审批通过
+
+
+ 驳回
+
+
+ 撤回
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 任职
+ 调换
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 提交申请
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/dininghall/form.vue b/src/views/stuwork/dininghall/form.vue
new file mode 100644
index 0000000..1dc4a91
--- /dev/null
+++ b/src/views/stuwork/dininghall/form.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/dininghall/index.vue b/src/views/stuwork/dininghall/index.vue
new file mode 100644
index 0000000..f7aedfe
--- /dev/null
+++ b/src/views/stuwork/dininghall/index.vue
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜 索
+ 重 置
+
+
+
+
+
+
+ {{ $index + 1 }}
+
+
+
+
+
+
+
+ {{ row.period === '1' ? '第一学期' : row.period === '2' ? '第二学期' : '-' }}
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/dininghallvote/form.vue b/src/views/stuwork/dininghallvote/form.vue
new file mode 100644
index 0000000..d4185d6
--- /dev/null
+++ b/src/views/stuwork/dininghallvote/form.vue
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/dininghallvote/index.vue b/src/views/stuwork/dininghallvote/index.vue
new file mode 100644
index 0000000..089659e
--- /dev/null
+++ b/src/views/stuwork/dininghallvote/index.vue
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜 索
+ 重 置
+
+
+
+
+
+
+ {{ $index + 1 }}
+
+
+
+
+
+
+
+ {{ row.period === '1' ? '第一学期' : row.period === '2' ? '第二学期' : '-' }}
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/dininghallvoteStatistics/index.vue b/src/views/stuwork/dininghallvoteStatistics/index.vue
new file mode 100644
index 0000000..3751301
--- /dev/null
+++ b/src/views/stuwork/dininghallvoteStatistics/index.vue
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜 索
+ 重 置
+
+
+
+
+
+
+
+
+
+
+ {{ row.allNum }}
+
+
+
+
+ {{ row.completed }}
+
+
+
+
+ {{ row.noCompleted }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜 索
+ 重 置
+
+
+
+
+
+
+
+
+
+
+ {{ row.allNum }}
+
+
+
+
+ {{ row.completed }}
+
+
+
+
+ {{ row.noCompleted }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/dininghallvoteresult/index.vue b/src/views/stuwork/dininghallvoteresult/index.vue
new file mode 100644
index 0000000..5e9a349
--- /dev/null
+++ b/src/views/stuwork/dininghallvoteresult/index.vue
@@ -0,0 +1,164 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜 索
+ 重 置
+
+
+
+
+
+
+ {{ $index + 1 }}
+
+
+
+
+
+
+ {{ row.period === '1' ? '第一学期' : row.period === '2' ? '第二学期' : '-' }}
+
+
+
+
+
+ {{ row.diningHallVoteScore }}
+
+
+
+
+
+ {{ row.isUnderstand === 1 ? '是' : '否' }}
+
+
+
+
+
+
+ {{ row.isStu === 1 ? '学生' : '教职工' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/employmentinformationsurvey/completionRateDept.vue b/src/views/stuwork/employmentinformationsurvey/completionRateDept.vue
new file mode 100644
index 0000000..aec0d79
--- /dev/null
+++ b/src/views/stuwork/employmentinformationsurvey/completionRateDept.vue
@@ -0,0 +1,283 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜 索
+ 重 置
+
+
+
+
+
+
+
+
+ {{ row.shouldFilled }}
+
+
+
+
+ {{ row.hasFilled }}
+
+
+
+
+ {{ row.noFilled }}
+
+
+
+
+
+
+
+
+
+ 查看班级
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.shouldFilled }}
+
+
+
+
+ {{ row.hasFilled }}
+
+
+
+
+ {{ row.noFilled }}
+
+
+
+
+
+
+
+
+
+ 查看学生
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.isWrite === 1 ? '已填写' : '未填写' }}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/gradustu/analyse.vue b/src/views/stuwork/gradustu/analyse.vue
index e53c6a4..cee8431 100644
--- a/src/views/stuwork/gradustu/analyse.vue
+++ b/src/views/stuwork/gradustu/analyse.vue
@@ -1,214 +1,437 @@
-
-
+
+
-
+
-
-
+
+
- 查询统计
+ 查询
+ 重置
-
-
-
+
+
+
- 毕业生总数
- {{ summary.total }}
+
+
+
+
+
+
{{ statistics.total }}
+
毕业生总数
+
+
-
-
- 确认毕业
- {{ summary.confirmed }}
+
+
+
+
+
+
+
+
{{ statistics.confirmed }}
+
确认毕业
+
+
-
-
- 待确认
- {{ summary.pending }}
+
+
+
+
+
+
+
+
{{ statistics.pending }}
+
待确认
+
+
-
-
- 不可毕业
- {{ summary.rejected }}
+
+
+
+
+
+
+
+
{{ statistics.rejected }}
+
不可毕业
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
-
- {{ scope.row.completionRate }}
-
+ {{ scope.row.confirmed }}
+
+
+
+
+ {{ scope.row.pending }}
+
+
+
+
+ {{ scope.row.rejected }}
+
+
+
+
+
-
-
-
+
+.table-card {
+ .card-header {
+ display: flex;
+ align-items: center;
+ }
+
+ .card-title {
+ font-size: 16px;
+ font-weight: 500;
+ }
+}
+
\ No newline at end of file
diff --git a/src/views/stuwork/stuconduct/indexTerm.vue b/src/views/stuwork/stuconduct/indexTerm.vue
index 97b204b..214fcb1 100644
--- a/src/views/stuwork/stuconduct/indexTerm.vue
+++ b/src/views/stuwork/stuconduct/indexTerm.vue
@@ -1,9 +1,17 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
发送预警
-
+
-
-
+
+
+
+
+
+
+
@@ -73,50 +91,52 @@
-
-
-
+
-
-
-
-
+
+
+
+
+
- {{ scope.row.score !== null && scope.row.score !== undefined ? scope.row.score.toFixed(2) : '-' }}
+ {{ formatScore(scope.row[month.prop]) }}
-
+
+
- 查看
+
+ {{ formatScore(scope.row.scoreOneTerm) }}
+
+
+
+
+
+ 查看
-
+
-
-
+
+
-
+
{{ viewRow.stuNo }}
{{ viewRow.realName }}
- {{ queryForm.schoolYear }}
- {{ formatSchoolTerm(queryForm.schoolTerm) }}
-
- {{ viewRow.score != null && viewRow.score !== undefined ? Number(viewRow.score).toFixed(2) : '-' }}
+
+
+ {{ formatScore(viewRow.scoreOneTerm) }}
+
@@ -124,14 +144,13 @@
-
-
+
@@ -144,8 +163,8 @@
{{ scope.row.score != null && scope.row.score !== undefined ? Number(scope.row.score) : '-' }}
-
-
+
+
@@ -156,16 +175,17 @@
\ No newline at end of file
diff --git a/src/views/stuwork/stuconduct/indexYear.vue b/src/views/stuwork/stuconduct/indexYear.vue
index 50b2e97..48df8a0 100644
--- a/src/views/stuwork/stuconduct/indexYear.vue
+++ b/src/views/stuwork/stuconduct/indexYear.vue
@@ -1,9 +1,17 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -19,15 +27,25 @@
重置
-
+
-
-
+
+
+
+
+
+
+
@@ -38,60 +56,106 @@
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+ {{ formatScore(scope.row[month.prop]) }}
+
+
+
+
+
+ {{ formatScore(scope.row.scoreOneTerm) }}
+
+
+
+
+
+
+
+
+ {{ formatScore(scope.row[month.prop]) }}
+
+
+
+
+
+ {{ formatScore(scope.row.scoreTwoTerm) }}
+
+
+
+
+
+
- {{ scope.row.score !== null && scope.row.score !== undefined ? scope.row.score.toFixed(2) : '-' }}
+
+ {{ formatScore(scope.row.scoreYear) }}
+
-
+
- 查看
+ 查看
-
+
-
-
+
+
-
+
{{ viewRow.stuNo }}
{{ viewRow.realName }}
- {{ queryForm.schoolYear }}
- {{ viewRow.score != null && viewRow.score !== undefined ? Number(viewRow.score).toFixed(2) : '-' }}
+
+ {{ formatScore(viewRow.scoreYear) }}
+
+
+
+ {{ formatScore(viewRow.scoreOneTerm) }}
+
+
+
+
+ {{ formatScore(viewRow.scoreTwoTerm) }}
+
+
+ {{ queryForm.schoolYear }}
考核记录
+ :header-cell-style="tableStyle.headerCellStyle">
-
-
+
+
+ {{ scope.row.schoolTerm === '1' ? '第一学期' : '第二学期' }}
+
+
+
@@ -104,8 +168,8 @@
{{ scope.row.score != null && scope.row.score !== undefined ? Number(scope.row.score) : '-' }}
-
-
+
+
@@ -120,11 +184,12 @@ import { getStuConductYear, queryDataByStuNo } from '/@/api/stuwork/stuconduct';
import { getClassListByRole } from '/@/api/basic/basicclass';
import { queryAllSchoolYear } from '/@/api/basic/basicyear';
import { useMessage } from '/@/hooks/message';
+import { Search, Document } from '@element-plus/icons-vue';
-// 表格样式 - 在组件内部定义,不从外部导入
+// 表格样式
const tableStyle = {
- cellStyle: { padding: '8px 0' },
- headerCellStyle: { background: '#f5f7fa', color: '#606266', fontWeight: 'bold' },
+ cellStyle: { padding: '8px 0', textAlign: 'center' },
+ headerCellStyle: { background: '#f5f7fa', color: '#606266', fontWeight: 'bold', textAlign: 'center' },
};
// 定义变量内容
@@ -145,28 +210,60 @@ const queryForm = reactive({
classCode: '',
});
+// 第一学期月份列(9月-1月)
+const firstTermMonths = [
+ { label: '9月', prop: 'scoreOneMonth' },
+ { label: '10月', prop: 'scoreTwoMonth' },
+ { label: '11月', prop: 'scoreThreeMonth' },
+ { label: '12月', prop: 'scoreFourMonth' },
+ { label: '1月', prop: 'scoreFiveMonth' },
+];
+
+// 第二学期月份列(2月-6月)
+const secondTermMonths = [
+ { label: '2月', prop: 'scoreSixMonth' },
+ { label: '3月', prop: 'scoreSevenMonth' },
+ { label: '4月', prop: 'scoreEightMonth' },
+ { label: '5月', prop: 'scoreNineMonth' },
+ { label: '6月', prop: 'scoreTenMonth' },
+];
+
+// 格式化分数
+const formatScore = (score: any) => {
+ if (score === null || score === undefined || score === '') return '-';
+ return Number(score).toFixed(2);
+};
+
+// 根据分数获取标签类型
+const getScoreType = (score: any) => {
+ if (score === null || score === undefined) return 'info';
+ const num = Number(score);
+ if (num >= 90) return 'success';
+ if (num >= 80) return 'primary';
+ if (num >= 60) return 'warning';
+ return 'danger';
+};
+
// 统计表格数据
const statisticsData = computed(() => {
if (studentList.value.length === 0) {
return [];
}
- // 计算各等级人数
- // 优秀:>=90,良好:80-89,及格:60-79,不及格:<60
- let excellent = 0; // 优秀
- let good = 0; // 良好
- let pass = 0; // 及格
- let fail = 0; // 不及格
+ let excellent = 0;
+ let good = 0;
+ let pass = 0;
+ let fail = 0;
const total = studentList.value.length;
studentList.value.forEach((student: any) => {
- const score = student.score;
+ const score = student.scoreYear;
if (score !== null && score !== undefined) {
- if (score >= 90) {
+ if (Number(score) >= 90) {
excellent++;
- } else if (score >= 80) {
+ } else if (Number(score) >= 80) {
good++;
- } else if (score >= 60) {
+ } else if (Number(score) >= 60) {
pass++;
} else {
fail++;
@@ -174,52 +271,19 @@ const statisticsData = computed(() => {
}
});
- // 计算比率
const excellentRate = total > 0 ? ((excellent / total) * 100).toFixed(2) + '%' : '0%';
const goodRate = total > 0 ? ((good / total) * 100).toFixed(2) + '%' : '0%';
const passRate = total > 0 ? ((pass / total) * 100).toFixed(2) + '%' : '0%';
const failRate = total > 0 ? ((fail / total) * 100).toFixed(2) + '%' : '0%';
+ const excellentGoodRate = total > 0 ? (((excellent + good) / total) * 100).toFixed(2) + '%' : '0%';
- // 优良率 = (优秀 + 良好) / 总人数
- const excellentGoodCount = excellent + good;
- const excellentGoodRate = total > 0 ? ((excellentGoodCount / total) * 100).toFixed(2) + '%' : '0%';
-
- // 获取班级名称
const classNo = studentList.value.length > 0 ? studentList.value[0].classNo || '-' : '-';
return [
- {
- label: '人数',
- classNo: classNo,
- excellent: excellent,
- good: good,
- pass: pass,
- fail: fail,
- },
- {
- label: '比率',
- classNo: classNo,
- excellent: excellentRate,
- good: goodRate,
- pass: passRate,
- fail: failRate,
- },
- {
- label: '优良率',
- classNo: classNo,
- excellent: excellentGoodRate,
- good: '-',
- pass: '-',
- fail: '-',
- },
- {
- label: '备注',
- classNo: classNo,
- excellent: '-',
- good: '-',
- pass: '-',
- fail: '-',
- },
+ { label: '人数', classNo, excellent, good, pass, fail },
+ { label: '比率', classNo, excellent: excellentRate, good: goodRate, pass: passRate, fail: failRate },
+ { label: '优良率', classNo, excellent: excellentGoodRate, good: '-', pass: '-', fail: '-' },
+ { label: '备注', classNo, excellent: '-', good: '-', pass: '-', fail: '-' },
];
});
@@ -238,34 +302,18 @@ const getDataList = async () => {
});
if (res.data && Array.isArray(res.data)) {
- // 处理返回的数据,提取学生列表
- // 根据API文档,返回的是StuConductYearVO数组
const tempList: any[] = [];
-
res.data.forEach((item: any) => {
- // 如果返回的数据结构中有basicStudentVOList,需要展开
- if (item.basicStudentVOList && Array.isArray(item.basicStudentVOList) && item.basicStudentVOList.length > 0) {
+ if (item.basicStudentVOList && Array.isArray(item.basicStudentVOList)) {
item.basicStudentVOList.forEach((student: any) => {
tempList.push({
- stuNo: student.stuNo || item.stuNo,
- realName: student.realName || item.realName,
- score: item.score, // 学年总评分数
+ ...student,
classNo: item.classNo,
classCode: item.classCode,
});
});
- } else {
- // 直接使用item作为学生信息
- tempList.push({
- stuNo: item.stuNo,
- realName: item.realName,
- score: item.score,
- classNo: item.classNo,
- classCode: item.classCode,
- });
}
});
-
studentList.value = tempList;
} else {
studentList.value = [];
@@ -285,7 +333,7 @@ const handleReset = () => {
studentList.value = [];
};
-// 查看详情(接口:GET /stuwork/stuconduct/queryDataByStuNo,通过学年学号查看详情)
+// 查看详情
const handleView = async (row: any) => {
if (!queryForm.schoolYear || !row.stuNo) {
useMessage().warning('缺少学年或学号');
@@ -312,11 +360,7 @@ const handleView = async (row: any) => {
const getSchoolYearList = async () => {
try {
const res = await queryAllSchoolYear();
- if (res.data && Array.isArray(res.data)) {
- schoolYearList.value = res.data;
- } else {
- schoolYearList.value = [];
- }
+ schoolYearList.value = res.data && Array.isArray(res.data) ? res.data : [];
} catch (err) {
schoolYearList.value = [];
}
@@ -326,11 +370,7 @@ const getSchoolYearList = async () => {
const getClassListData = async () => {
try {
const res = await getClassListByRole();
- if (res.data && Array.isArray(res.data)) {
- classList.value = res.data;
- } else {
- classList.value = [];
- }
+ classList.value = res.data && Array.isArray(res.data) ? res.data : [];
} catch (err) {
classList.value = [];
}
@@ -344,15 +384,7 @@ onMounted(() => {
+
\ No newline at end of file
diff --git a/src/views/stuwork/stuturnoverlossconfig/index.vue b/src/views/stuwork/stuturnoverlossconfig/index.vue
new file mode 100644
index 0000000..2b3d7a9
--- /dev/null
+++ b/src/views/stuwork/stuturnoverlossconfig/index.vue
@@ -0,0 +1,306 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $index + 1 + ((state.pagination?.current || 1) - 1) * (state.pagination?.size || 10) }}
+
+
+
+
+
+
+
+ {{ scope.row.isLoss === '1' ? '是' : '否' }}
+
+
+
+
+
+
+ {{ scope.row.createTime || '-' }}
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/stuturnoverrule/form.vue b/src/views/stuwork/stuturnoverrule/form.vue
new file mode 100644
index 0000000..ad89b7a
--- /dev/null
+++ b/src/views/stuwork/stuturnoverrule/form.vue
@@ -0,0 +1,271 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/stuturnoverrule/index.vue b/src/views/stuwork/stuturnoverrule/index.vue
new file mode 100644
index 0000000..9ed70be
--- /dev/null
+++ b/src/views/stuwork/stuturnoverrule/index.vue
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $index + 1 + ((state.pagination?.current || 1) - 1) * (state.pagination?.size || 10) }}
+
+
+
+
+
+
+ {{ col.label }}
+
+
+
+
+ {{ formatTurnoverType(scope.row.turnoverType) }}
+
+
+
+
+
+ {{ scope.row.isActive === '1' ? '启用' : '禁用' }}
+
+
+
+
+ {{ scope.row.minIntervalDays ?? '-' }} 天
+
+
+ {{ scope.row.maxDurationDays ?? '-' }} 天
+
+
+ {{ scope.row.remindDays ?? '-' }} 天
+
+
+
+
+
+
+ 操作
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/stuworkstudyalternate/index.vue b/src/views/stuwork/stuworkstudyalternate/index.vue
index f73cde9..d60c653 100644
--- a/src/views/stuwork/stuworkstudyalternate/index.vue
+++ b/src/views/stuwork/stuworkstudyalternate/index.vue
@@ -13,17 +13,17 @@
-
+ v-for="(item, index) in schoolYearList"
+ :key="item.year || item.id || index"
+ :label="item.year || item.schoolYear || item.name || item"
+ :value="item.year || item.schoolYear || item.name || item">
@@ -303,23 +303,38 @@ const searchForm = reactive({
dateRange: null as [string, string] | null
})
-// 配置 useTable(接口返回 data.tableData.records / data.tableData.total,需包装以适配 hook 的 res.data[props.item] 取数)
+// 配置 useTable(接口返回 data.tableData.records / data.tableData.total)
const state: BasicTableProps = reactive({
queryForm: searchForm,
pageList: async (params: any) => {
- const res = await fetchList(params)
- const data = res?.data
- const tableData = data?.tableData
- return {
- data: {
- 'tableData.records': tableData?.records ?? [],
- 'tableData.total': tableData?.total ?? data?.total ?? 0
+ // 处理查询参数
+ const queryParams: any = { ...params }
+ // 处理日期范围
+ if (searchForm.dateRange && searchForm.dateRange.length === 2) {
+ queryParams.dateRangeStr = `${searchForm.dateRange[0]},${searchForm.dateRange[1]}`
+ }
+ delete queryParams.dateRange
+ // 处理学年数组
+ if (queryParams.schoolYear) {
+ queryParams.schoolYear = [queryParams.schoolYear]
+ }
+
+ const res = await fetchList(queryParams)
+ // 将嵌套的 tableData 提升到 data 层级,适配 useTable hook
+ if (res.data && res.data.tableData) {
+ return {
+ ...res,
+ data: {
+ records: res.data.tableData.records || [],
+ total: res.data.tableData.total || 0
+ }
}
}
+ return res
},
props: {
- item: 'tableData.records',
- totalCount: 'tableData.total'
+ item: 'records',
+ totalCount: 'total'
},
createdIsNeed: true
})
@@ -334,20 +349,6 @@ const {
// 查询
const handleSearch = () => {
- // 处理日期范围
- const params: any = { ...searchForm }
- if (searchForm.dateRange && searchForm.dateRange.length === 2) {
- params.dateRangeStr = `${searchForm.dateRange[0]},${searchForm.dateRange[1]}`
- }
- delete params.dateRange
-
- // 处理学年数组
- if (params.schoolYear) {
- params.schoolYear = [params.schoolYear]
- }
-
- // 更新查询参数
- Object.assign(searchForm, params)
getDataList()
}
@@ -394,10 +395,20 @@ const getDeptListData = async () => {
const getSchoolYearList = async () => {
try {
const res = await queryAllSchoolYear()
- if (res.data && Array.isArray(res.data)) {
- schoolYearList.value = res.data
+ if (res.data) {
+ // 兼容多种数据格式
+ if (Array.isArray(res.data)) {
+ schoolYearList.value = res.data
+ } else if (res.data.records && Array.isArray(res.data.records)) {
+ schoolYearList.value = res.data.records
+ } else {
+ schoolYearList.value = []
+ }
+ } else {
+ schoolYearList.value = []
}
} catch (err) {
+ console.error('获取学年列表失败', err)
schoolYearList.value = []
}
}
diff --git a/src/views/stuwork/stuworkstudyalternate/teacher.vue b/src/views/stuwork/stuworkstudyalternate/teacher.vue
index 4b2a668..5eacb0c 100644
--- a/src/views/stuwork/stuworkstudyalternate/teacher.vue
+++ b/src/views/stuwork/stuworkstudyalternate/teacher.vue
@@ -12,31 +12,31 @@
label-width="120px"
v-loading="loading">
-
+ v-for="(item, index) in schoolYearList"
+ :key="item.year || item.id || index"
+ :label="item.year || item.schoolYear || item.name || item"
+ :value="item.year || item.schoolYear || item.name || item">
-
+ :key="item.value || item.dictValue"
+ :label="item.label || item.dictLabel || item.name"
+ :value="item.value || item.dictValue">
@@ -48,18 +48,20 @@
style="width: 100%" />
-
+ remote
+ :remote-method="handleTeacherSearch"
+ :loading="teacherLoading"
+ style="width: 100%">
+ :key="item.teacherNo || item.id"
+ :label="`${item.realName || item.name}(${item.teacherNo || item.id})`"
+ :value="item.teacherNo || item.id">
@@ -87,6 +89,7 @@ const emit = defineEmits(['refresh'])
const dataFormRef = ref()
const visible = ref(false)
const loading = ref(false)
+const teacherLoading = ref(false)
const schoolYearList = ref([])
const schoolTermList = ref([])
const teacherList = ref([])
@@ -117,17 +120,29 @@ const dataRules = {
// 教师搜索
const handleTeacherSearch = async (keyword: string) => {
- if (!keyword) {
+ if (!keyword || keyword.length < 1) {
teacherList.value = []
return
}
+ teacherLoading.value = true
try {
const res = await getTeacherInfoCommon({ searchKeywords: keyword })
- if (res.data && Array.isArray(res.data)) {
- teacherList.value = res.data
+ if (res.data) {
+ if (Array.isArray(res.data)) {
+ teacherList.value = res.data
+ } else if (res.data.records && Array.isArray(res.data.records)) {
+ teacherList.value = res.data.records
+ } else {
+ teacherList.value = []
+ }
+ } else {
+ teacherList.value = []
}
} catch (err) {
+ console.error('获取教师列表失败', err)
teacherList.value = []
+ } finally {
+ teacherLoading.value = false
}
}
@@ -174,10 +189,19 @@ const onSubmit = async () => {
const getSchoolYearList = async () => {
try {
const res = await queryAllSchoolYear()
- if (res.data && Array.isArray(res.data)) {
- schoolYearList.value = res.data
+ if (res.data) {
+ if (Array.isArray(res.data)) {
+ schoolYearList.value = res.data
+ } else if (res.data.records && Array.isArray(res.data.records)) {
+ schoolYearList.value = res.data.records
+ } else {
+ schoolYearList.value = []
+ }
+ } else {
+ schoolYearList.value = []
}
} catch (err) {
+ console.error('获取学年列表失败', err)
schoolYearList.value = []
}
}
@@ -187,9 +211,15 @@ const getSchoolTermList = async () => {
try {
const res = await getDicts('school_term')
if (res.data && Array.isArray(res.data)) {
- schoolTermList.value = res.data
+ schoolTermList.value = res.data.map((item: any) => ({
+ label: item.label ?? item.dictLabel ?? item.name,
+ value: item.value ?? item.dictValue
+ }))
+ } else {
+ schoolTermList.value = []
}
} catch (err) {
+ console.error('获取学期列表失败', err)
schoolTermList.value = []
}
}
diff --git a/src/views/stuwork/watermonthreport/form.vue b/src/views/stuwork/watermonthreport/form.vue
new file mode 100644
index 0000000..5114d6c
--- /dev/null
+++ b/src/views/stuwork/watermonthreport/form.vue
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stuwork/watermonthreport/index.vue b/src/views/stuwork/watermonthreport/index.vue
new file mode 100644
index 0000000..9b832be
--- /dev/null
+++ b/src/views/stuwork/watermonthreport/index.vue
@@ -0,0 +1,328 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $index + 1 + ((state.pagination?.current || 1) - 1) * (state.pagination?.size || 10) }}
+
+
+
+
+
+
+ {{ col.label }}
+
+
+
+
+ {{ scope.row.flag === 2 ? '用电' : '用水' }}
+
+
+
+
+ {{ formatMeterNum(scope.row.meterNum) }}
+
+
+
+ {{ scope.row.subiMonthSum ?? '-' }} {{ scope.row.flag === 2 ? '度' : '吨' }}
+
+
+
+ ¥{{ scope.row.subWatFlagSum ?? '0' }}
+
+
+
+ {{ scope.row.month }}月
+
+
+
+
+
+
+ 操作
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file