Merge branch 'dev' of https://gitea.dykj.co/sundongyu/dykj-college-back-office-management-system into dev
This commit is contained in:
commit
9041591d98
|
@ -1,6 +1,8 @@
|
||||||
import sdy from './modules/sdy'
|
import sdy from './modules/sdy'
|
||||||
import ycy from './modules/ycy'
|
import ycy from './modules/ycy'
|
||||||
|
import lcz from './modules/lcz'
|
||||||
export default [
|
export default [
|
||||||
...sdy,
|
...sdy,
|
||||||
...ycy
|
...ycy,
|
||||||
|
...lcz,
|
||||||
]
|
]
|
40
mock/modules/lcz.js
Normal file
40
mock/modules/lcz.js
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
import Mock from "mockjs";
|
||||||
|
|
||||||
|
function randomGender() {
|
||||||
|
return ['男', '女'][Math.floor(Math.random() * 2)];
|
||||||
|
}
|
||||||
|
const student = Mock.mock({
|
||||||
|
"list|100": [
|
||||||
|
{
|
||||||
|
id: '@id',
|
||||||
|
name: '@cname',
|
||||||
|
gender: randomGender(),
|
||||||
|
studentId: '@id',
|
||||||
|
department: function () {
|
||||||
|
return ['计算机科学系', '数学系', '物理系', '化学系'][this.random(0, 3)];
|
||||||
|
},
|
||||||
|
major: function () {
|
||||||
|
return ['计算机科学与技术', '数学', '物理学', '化学', '生物学', '经济学'][this.random(0, 5)];
|
||||||
|
},
|
||||||
|
classes: function () {
|
||||||
|
return ['一班', '二班', '三班', '四班', '五班'][this.random(0, 4)];
|
||||||
|
},
|
||||||
|
status: function () {
|
||||||
|
return ['休学', '退学', '复学'][this.random(0, 2)];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
url: '/api/student',
|
||||||
|
method: 'post',
|
||||||
|
response: (config) => {
|
||||||
|
return {
|
||||||
|
code: 200,
|
||||||
|
data: student.list
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
|
@ -13,7 +13,22 @@ const data = Mock.mock({
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
const loans = Mock.mock({
|
||||||
|
"list|45": [
|
||||||
|
{
|
||||||
|
"id|+1": 1,
|
||||||
|
'proposer': '@cname',
|
||||||
|
'student': '@integer(100000000,999999999)',
|
||||||
|
'allowance': '@integer(10000,50000)',
|
||||||
|
'department': '@pick(["机电工程系","护理分院","建筑系","材料科学与工程系","环境科学与工程系"])',
|
||||||
|
'cation': '@pick(["2021-2022学年度","2022-2023学年度"])',
|
||||||
|
'loanTerm': '@pick(["已放款","未放款"])',
|
||||||
|
'timeofapplication': '@date("yyyy-MM-dd")',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
export default [
|
export default [
|
||||||
|
// 应收管理
|
||||||
{
|
{
|
||||||
url: '/get-sdy-managment-list',
|
url: '/get-sdy-managment-list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -24,6 +39,7 @@ export default [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 查找应收管理
|
||||||
{
|
{
|
||||||
url: '/post-sdy-managment-find',
|
url: '/post-sdy-managment-find',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
@ -58,5 +74,38 @@ export default [
|
||||||
code: 200,
|
code: 200,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 借款管理
|
||||||
|
{
|
||||||
|
url: '/get-sdy-loan-list',
|
||||||
|
method: 'get',
|
||||||
|
response: () => {
|
||||||
|
return {
|
||||||
|
code: 200,
|
||||||
|
data: loans
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 添加借款人
|
||||||
|
{
|
||||||
|
url: '/post-sdy-loan-add',
|
||||||
|
method: 'post',
|
||||||
|
response: (req) => {
|
||||||
|
const newLoan = {
|
||||||
|
id: loans.list.length + 1,
|
||||||
|
proposer: req.body.proposer,
|
||||||
|
student: req.body.student,
|
||||||
|
allowance: req.body.allowance,
|
||||||
|
department: req.body.department,
|
||||||
|
cation: req.body.cation,
|
||||||
|
loanTerm: req.body.loanTerm,
|
||||||
|
timeofapplication: req.body.timeofapplication,
|
||||||
|
}
|
||||||
|
loans.list.push(newLoan)
|
||||||
|
return {
|
||||||
|
code: 200,
|
||||||
|
data: newLoan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
908
package-lock.json
generated
908
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -11,6 +11,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
|
"exceljs": "^4.4.0",
|
||||||
"less": "^4.2.0",
|
"less": "^4.2.0",
|
||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
// 收款管理
|
||||||
export function APIReceivablesList() {
|
export function APIReceivablesList() {
|
||||||
return request.get('/get-sdy-managment-list')
|
return request.get('/get-sdy-managment-list')
|
||||||
}
|
}
|
||||||
|
//查询收款
|
||||||
export function APIReceivablesAdd(data) {
|
export function APIReceivablesAdd(data) {
|
||||||
return request.post('/post-sdy-managment-find', data)
|
return request.post('/post-sdy-managment-find', data)
|
||||||
}
|
}
|
||||||
|
//贷款管理
|
||||||
|
export function APILoansList() {
|
||||||
|
return request.get('/get-sdy-loan-list')
|
||||||
|
}
|
||||||
|
//查询贷款
|
||||||
|
export function APILoansAdd(data) {
|
||||||
|
return request.post('/post-sdy-loan-add', data)
|
||||||
|
}
|
|
@ -1,7 +1,5 @@
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
// 统一管理接口
|
|
||||||
const API = {
|
|
||||||
STUDENT_URL: "/api/student",
|
|
||||||
};
|
|
||||||
|
|
||||||
export const reqStudent = () => request.post(API.STUDENT_URL);
|
export function APIStudent(data) {
|
||||||
|
return request.post('/api/student', data)
|
||||||
|
}
|
|
@ -42,6 +42,9 @@
|
||||||
<t-menu-item value="3-2" to="/billCollected">
|
<t-menu-item value="3-2" to="/billCollected">
|
||||||
<span>学生收款</span>
|
<span>学生收款</span>
|
||||||
</t-menu-item>
|
</t-menu-item>
|
||||||
|
<t-menu-item value="3-3" to="/student-loan">
|
||||||
|
<span>助学贷款</span>
|
||||||
|
</t-menu-item>
|
||||||
</t-submenu>
|
</t-submenu>
|
||||||
<t-submenu value="4" title="学生管理">
|
<t-submenu value="4" title="学生管理">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
|
|
|
@ -180,7 +180,7 @@ const InvoiceData = ref({
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="less" scoped>
|
||||||
.headeRight {
|
.headeRight {
|
||||||
width: 240px;
|
width: 240px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -199,6 +199,7 @@ const columns = ref([
|
||||||
{ colKey: 'major', title: '专业' },
|
{ colKey: 'major', title: '专业' },
|
||||||
{ colKey: 'grade', title: '班级' },
|
{ colKey: 'grade', title: '班级' },
|
||||||
{ colKey: 'tuition', title: '是否缴费' },
|
{ colKey: 'tuition', title: '是否缴费' },
|
||||||
|
{ colKey: 'tuition', title: '学贷款缴费' },
|
||||||
{ colKey: 'action', title: '操作', align: 'center' }
|
{ colKey: 'action', title: '操作', align: 'center' }
|
||||||
])
|
])
|
||||||
// 表格分页数据
|
// 表格分页数据
|
||||||
|
|
202
src/pages/receivables-management/studentLoan.vue
Normal file
202
src/pages/receivables-management/studentLoan.vue
Normal file
|
@ -0,0 +1,202 @@
|
||||||
|
<template>
|
||||||
|
<div class="back-color">
|
||||||
|
<!-- 表单 -->
|
||||||
|
<div class="search-form">
|
||||||
|
<t-form
|
||||||
|
ref="form"
|
||||||
|
:data="formData"
|
||||||
|
reset-type="initial"
|
||||||
|
colon
|
||||||
|
@reset="onReset"
|
||||||
|
@submit="onSubmit"
|
||||||
|
>
|
||||||
|
<t-row>
|
||||||
|
<t-col :span="3">
|
||||||
|
<t-form-item label="学生姓名" name="name">
|
||||||
|
<t-input v-model="formData.name"></t-input>
|
||||||
|
</t-form-item>
|
||||||
|
</t-col>
|
||||||
|
<t-col :span="3">
|
||||||
|
<t-form-item label="学号" name="studentnumber">
|
||||||
|
<t-input v-model="formData.studentnumber"></t-input>
|
||||||
|
</t-form-item>
|
||||||
|
</t-col>
|
||||||
|
<t-col :push="4" :span="2">
|
||||||
|
<t-button type="submit" class="button" style="margin-left: -0.5rem"
|
||||||
|
>搜索</t-button
|
||||||
|
>
|
||||||
|
<t-button type="reset" style="margin-left: 1.5rem">重置</t-button>
|
||||||
|
</t-col>
|
||||||
|
</t-row>
|
||||||
|
</t-form>
|
||||||
|
</div>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<t-row>
|
||||||
|
<t-col :span="3" :offset="10" style="margin-bottom: 0.5rem">
|
||||||
|
<t-button theme="default" variant="text" @click="onClick"
|
||||||
|
>申请助学贷款</t-button
|
||||||
|
>
|
||||||
|
</t-col>
|
||||||
|
</t-row>
|
||||||
|
</div>
|
||||||
|
<t-table
|
||||||
|
row-key="id"
|
||||||
|
:data="data"
|
||||||
|
:columns="columns"
|
||||||
|
table-layout="fixed"
|
||||||
|
size="medium"
|
||||||
|
:pagination="pagination"
|
||||||
|
:show-header="true"
|
||||||
|
cell-empty-content="-"
|
||||||
|
resizable
|
||||||
|
lazy-load
|
||||||
|
:loading="loading"
|
||||||
|
@row-click="handleRowClick"
|
||||||
|
@page-change="onPageChange"
|
||||||
|
>
|
||||||
|
</t-table>
|
||||||
|
</div>
|
||||||
|
<!-- 弹出框 -->
|
||||||
|
<div>
|
||||||
|
<t-space>
|
||||||
|
<t-dialog
|
||||||
|
v-model:visible="visible"
|
||||||
|
header="申请贷款"
|
||||||
|
width="20%"
|
||||||
|
:on-cancel="onCancel"
|
||||||
|
:on-close-btn-click="onCloseBtnClick"
|
||||||
|
:on-confirm="onConfirmAnother"
|
||||||
|
:close-on-overlay-click="false"
|
||||||
|
>
|
||||||
|
<t-space direction="vertical" style="width: 100%">
|
||||||
|
<t-space direction="vertical" size="large">
|
||||||
|
<t-form
|
||||||
|
ref="form"
|
||||||
|
:data="formData"
|
||||||
|
reset-type="initial"
|
||||||
|
colon
|
||||||
|
@reset="onReset"
|
||||||
|
>
|
||||||
|
<t-form-item label="申请人" name="name">
|
||||||
|
<t-input v-model="addData.proposer"></t-input>
|
||||||
|
</t-form-item>
|
||||||
|
<t-form-item label="学号" name="RoutingAddress">
|
||||||
|
<t-input v-model="addData.student"></t-input>
|
||||||
|
</t-form-item>
|
||||||
|
<t-form-item label="所在部门" name="RoutingAddress">
|
||||||
|
<t-input v-model="addData.department"></t-input>
|
||||||
|
</t-form-item>
|
||||||
|
<t-form-item label="助学金额" name="RoutingAddress">
|
||||||
|
<t-input v-model="addData.allowance"></t-input>
|
||||||
|
</t-form-item>
|
||||||
|
<t-form-item label="是否下款" name="RoutingAddress">
|
||||||
|
<t-input v-model="addData.loanTerm"></t-input>
|
||||||
|
</t-form-item>
|
||||||
|
<t-form-item label="申请时间" name="RoutingAddress">
|
||||||
|
<t-input v-model="addData.timeofapplication"></t-input>
|
||||||
|
</t-form-item>
|
||||||
|
</t-form>
|
||||||
|
</t-space>
|
||||||
|
</t-space>
|
||||||
|
</t-dialog>
|
||||||
|
</t-space>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import {
|
||||||
|
APILoansList,
|
||||||
|
APILoansAdd
|
||||||
|
} from '@/api/receivables-management/management'
|
||||||
|
|
||||||
|
const data = ref([])
|
||||||
|
// 搜索框
|
||||||
|
const formData = ref({
|
||||||
|
name: '',
|
||||||
|
studentnumber: ''
|
||||||
|
})
|
||||||
|
// 加载状态
|
||||||
|
const loading = ref(false)
|
||||||
|
//表头数据
|
||||||
|
const columns = ref([
|
||||||
|
{ colKey: 'proposer', title: '申请人', width: '100' },
|
||||||
|
{ colKey: 'student', title: '学号', width: '100' },
|
||||||
|
{ colKey: 'department', title: '所在部门', width: '100' },
|
||||||
|
{ colKey: 'allowance', title: '助学金额', width: '100' },
|
||||||
|
{ colKey: 'loanTerm', title: '是否下款', width: '100' },
|
||||||
|
{ colKey: 'timeofapplication', title: '申请时间', width: '100' },
|
||||||
|
{ colKey: 'status', title: '操作', width: '100' }
|
||||||
|
])
|
||||||
|
//页码
|
||||||
|
const pagination = ref({
|
||||||
|
defaultCurrent: 1,
|
||||||
|
defaultPageSize: 10,
|
||||||
|
total: 30
|
||||||
|
})
|
||||||
|
//弹出框
|
||||||
|
const visible = ref(false)
|
||||||
|
//弹出框表单数据
|
||||||
|
const addData = ref({
|
||||||
|
proposer: '',
|
||||||
|
student: '',
|
||||||
|
department: '',
|
||||||
|
allowance: '',
|
||||||
|
loanTerm: '',
|
||||||
|
timeofapplication: ''
|
||||||
|
})
|
||||||
|
const handleRowClick = e => {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
//监听页码变化了
|
||||||
|
const onPageChange = () => {
|
||||||
|
loading.value = true
|
||||||
|
const timerId = setTimeout(() => {
|
||||||
|
loading.value = false
|
||||||
|
clearInterval(timerId)
|
||||||
|
}, 300)
|
||||||
|
}
|
||||||
|
//发送请求
|
||||||
|
const LoansList = async () => {
|
||||||
|
const res = await APILoansList()
|
||||||
|
data.value = res.data.list
|
||||||
|
pagination.value.total = res.data.list.length
|
||||||
|
}
|
||||||
|
//表单重置
|
||||||
|
const onReset = () => {
|
||||||
|
LoansList()
|
||||||
|
}
|
||||||
|
//表单提交
|
||||||
|
const onSubmit = async () => {}
|
||||||
|
//弹出框
|
||||||
|
const onClick = context => {
|
||||||
|
console.log('点击了确认按钮,弹出弹窗', context)
|
||||||
|
visible.value = true
|
||||||
|
}
|
||||||
|
const onConfirmAnother = async context => {
|
||||||
|
console.log('点击了确认按钮', context)
|
||||||
|
await APILoansAdd(addData.value)
|
||||||
|
visible.value = false
|
||||||
|
}
|
||||||
|
const onCancel = context => {
|
||||||
|
console.log('点击了取消按钮', context)
|
||||||
|
}
|
||||||
|
const onCloseBtnClick = context => {
|
||||||
|
console.log('点击了关闭按钮', context)
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
LoansList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.search-form {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
background-color: #fff;
|
||||||
|
height: 4rem;
|
||||||
|
padding-top: 1rem;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,28 +1,44 @@
|
||||||
<template>
|
<template>
|
||||||
<t-space direction="vertical">
|
<div class="back-color">
|
||||||
<t-form ref="searchForm" @reset="onReset">
|
<t-layout style="height: 90%; background-color: #f5f7fb">
|
||||||
|
<t-header class="scarch-box">
|
||||||
|
<t-modal
|
||||||
|
v-model="isModalVisible"
|
||||||
|
@confirm="onSave"
|
||||||
|
@cancel="onModalCancel"
|
||||||
|
title="修改学生信息"
|
||||||
|
>
|
||||||
|
<t-form ref="searchForm" @reset="onReset" class="scarch-from">
|
||||||
|
<div style="margin-left: 1rem">
|
||||||
<t-form-item label="姓名" name="name">
|
<t-form-item label="姓名" name="name">
|
||||||
<t-input v-model="searchCriteria.name" placeholder="请输入姓名"></t-input>
|
<t-input
|
||||||
|
v-model="searchCriteria.name"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
></t-input>
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 1rem">
|
||||||
<t-form-item label="学号" name="studentId">
|
<t-form-item label="学号" name="studentId">
|
||||||
<t-input v-model="searchCriteria.studentId" placeholder="请输入学号"></t-input>
|
<t-input
|
||||||
|
v-model="searchCriteria.studentId"
|
||||||
|
placeholder="请输入学号"
|
||||||
|
></t-input>
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item>
|
</div>
|
||||||
|
<t-form-item style="margin-right: 1rem">
|
||||||
<t-space size="10px">
|
<t-space size="10px">
|
||||||
<t-button theme="primary" type="submit" @click="onSearch">查询</t-button>
|
<t-button theme="primary" type="submit" @click="onSearch"
|
||||||
<t-button theme="default" variant="base" type="reset">重置</t-button>
|
>查询</t-button
|
||||||
|
>
|
||||||
|
<t-button theme="default" variant="base" type="reset"
|
||||||
|
>重置</t-button
|
||||||
|
>
|
||||||
</t-space>
|
</t-space>
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
</t-form>
|
</t-form>
|
||||||
|
</t-modal>
|
||||||
<t-space>
|
</t-header>
|
||||||
<t-checkbox v-model="stripe">显示斑马纹</t-checkbox>
|
<t-content class="table-box">
|
||||||
<t-checkbox v-model="bordered">显示表格边框</t-checkbox>
|
|
||||||
<t-checkbox v-model="hover">显示悬浮效果</t-checkbox>
|
|
||||||
<t-checkbox v-model="tableLayout">宽度自适应</t-checkbox>
|
|
||||||
<t-checkbox v-model="showHeader">显示表头</t-checkbox>
|
|
||||||
</t-space>
|
|
||||||
|
|
||||||
<t-table
|
<t-table
|
||||||
rowKey="studentId"
|
rowKey="studentId"
|
||||||
:data="studentList"
|
:data="studentList"
|
||||||
|
@ -36,94 +52,142 @@
|
||||||
:showHeader="showHeader"
|
:showHeader="showHeader"
|
||||||
cellEmptyContent="-"
|
cellEmptyContent="-"
|
||||||
resizable
|
resizable
|
||||||
></t-table>
|
>
|
||||||
</t-space>
|
<template #operation="slotProps">
|
||||||
<!-- 动态操作列 -->
|
<t-button
|
||||||
<!-- <t-table-column label="操作">
|
theme="default"
|
||||||
<template #default="{ row }">
|
variant="text"
|
||||||
<t-button-group>
|
size="small"
|
||||||
<t-button @click="handleLeave(row)">休学</t-button>
|
@click="showEditModal(slotProps)"
|
||||||
<t-button @click="handleWithdraw(row)">退学</t-button>
|
>修改</t-button
|
||||||
<t-button @click="handleReturn(row)">复学</t-button>
|
>
|
||||||
</t-button-group>
|
|
||||||
</template>
|
</template>
|
||||||
</t-table-column> -->
|
</t-table>
|
||||||
|
</t-content>
|
||||||
|
</t-layout>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, computed } from 'vue';
|
import { ref, reactive, computed } from "vue";
|
||||||
import { MessagePlugin } from "tdesign-vue-next";
|
import { MessagePlugin } from "tdesign-vue-next";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { reqStudent } from "@/api/students";
|
// import { reqStudent } from "@/api/students";
|
||||||
|
import { APIStudent } from "@/api/students";
|
||||||
|
|
||||||
|
const isModalVisible = ref(false);
|
||||||
|
const editStudent = ref({});
|
||||||
|
|
||||||
|
// 显示编辑弹出框的方法
|
||||||
|
const showEditModal = (student) => {
|
||||||
|
isModalVisible.value = true;
|
||||||
|
editStudent.value = Object.assign({}, student);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 确认修改的回调方法
|
||||||
|
const onSave = () => {
|
||||||
|
// 调用 API 更新学生状态(这里假设有个 updateStudent 方法)
|
||||||
|
updateStudent(editStudent.value).then(() => {
|
||||||
|
// 更新成功后关闭模态框,同时更新表格数据
|
||||||
|
isModalVisible.value = false;
|
||||||
|
// 重新获取或更新 studentList 数据
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 取消编辑的回调方法
|
||||||
|
const onModalCancel = () => {
|
||||||
|
isModalVisible.value = false;
|
||||||
|
editStudent.value = {};
|
||||||
|
};
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const searchForm = ref(null);
|
const searchForm = ref(null);
|
||||||
const initialStudentData = [];
|
const initialStudentData = [];
|
||||||
const total = 28;
|
const total = 28;
|
||||||
for (let i = 0; i < total; i++) {
|
for (let i = 0; i < total; i++) {
|
||||||
|
let statusValue = ["休学", "退学", "复学"][i % 3];
|
||||||
initialStudentData.push({
|
initialStudentData.push({
|
||||||
studentId: `${'S'}${i + 1}`,
|
Id: `${i + 1}`,
|
||||||
name: ['贾明', '张三', '王芳'][i % 3],
|
name: ["贾明", "张三", "王芳"][i % 3],
|
||||||
gender: ['男', '女'][i % 2],
|
gender: ["男", "女"][i % 2],
|
||||||
departmentCode: 'D' + (i % 4 + 1),
|
studentId: i + 1000000000,
|
||||||
department: ['计算机科学系', '数学系', '物理系', '化学系'][i % 4],
|
department: ["计算机科学系", "数学系", "物理系", "化学系"][i % 4],
|
||||||
className: 'C' + (i % 5 + 1),
|
major: ["计算机科学与技术", "数学", "物理学", "化学", "生物学", "经济学"][
|
||||||
majorCode: 'M' + (i % 6 + 1),
|
i % 6
|
||||||
major: ['计算机科学与技术', '数学', '物理学', '化学', '生物学', '经济学'][i % 6],
|
],
|
||||||
classCode: 'C' + (i % 5 + 1),
|
classes: ["一班", "二班", "三班", "四班", "五班"][i % 5],
|
||||||
classes: ['一班', '二班', '三班', '四班', '五班'][i % 5],
|
status: statusValue,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const searchCriteria = reactive({ name: '', studentId: '' });
|
const searchCriteria = reactive({ name: "", studentId: "" });
|
||||||
|
|
||||||
// 学生列表数据
|
// 学生列表数据
|
||||||
const studentList = computed(() => {
|
const studentList = computed(() => {
|
||||||
return initialStudentData.filter(student =>
|
return initialStudentData.filter(
|
||||||
|
(student) =>
|
||||||
(!searchCriteria.name || student.name.includes(searchCriteria.name)) &&
|
(!searchCriteria.name || student.name.includes(searchCriteria.name)) &&
|
||||||
(!searchCriteria.studentId || student.studentId === searchCriteria.studentId)
|
(!searchCriteria.studentId ||
|
||||||
|
student.studentId === searchCriteria.studentId)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 表格列定义
|
// 表格列定义
|
||||||
const studentColumns = ref([
|
const studentColumns = ref([
|
||||||
{
|
{
|
||||||
colKey: 'studentId',
|
colKey: "Id",
|
||||||
title: '学号',
|
title: "序号",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
colKey: 'name',
|
colKey: "name",
|
||||||
title: '姓名',
|
title: "姓名",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
colKey: 'gender',
|
colKey: "gender",
|
||||||
title: '性别',
|
title: "性别",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
colKey: 'department',
|
colKey: "studentId",
|
||||||
title: '系院',
|
title: "学号",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
colKey: 'major',
|
colKey: "department",
|
||||||
title: '专业',
|
title: "系院",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
colKey: 'classes',
|
colKey: "major",
|
||||||
title: '班级',
|
title: "专业",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colKey: "classes",
|
||||||
|
title: "班级",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colKey: "status",
|
||||||
|
title: "状态",
|
||||||
|
formatter: (value) => {
|
||||||
|
switch (value) {
|
||||||
|
case "休学":
|
||||||
|
return "休学";
|
||||||
|
case "退学":
|
||||||
|
return "退学";
|
||||||
|
case "复学":
|
||||||
|
return "复学";
|
||||||
|
default:
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colKey: "operation",
|
||||||
|
title: "操作",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const size = ref('medium');
|
|
||||||
const tableLayout = ref(false);
|
|
||||||
const stripe = ref(false);
|
|
||||||
const bordered = ref(false);
|
|
||||||
const hover = ref(true);
|
|
||||||
const showHeader = ref(true);
|
|
||||||
|
|
||||||
const pagination = reactive({
|
const pagination = reactive({
|
||||||
defaultCurrent: 1,
|
defaultCurrent: 1,
|
||||||
defaultPageSize: 5,
|
defaultPageSize: 10,
|
||||||
total: initialStudentData.length,
|
total: initialStudentData.length,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -133,14 +197,36 @@ const onSearch = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onReset = () => {
|
const onReset = () => {
|
||||||
searchCriteria.name = '';
|
searchCriteria.name = "";
|
||||||
searchCriteria.studentId = '';
|
searchCriteria.studentId = "";
|
||||||
pagination.defaultCurrent = 1;
|
pagination.defaultCurrent = 1;
|
||||||
MessagePlugin.success("重置成功");
|
MessagePlugin.success("重置成功");
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
.scarch-box {
|
||||||
|
width: 100%;
|
||||||
|
background-color: @base-white-color;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
.scarch-from {
|
||||||
|
height: 3.75rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-box {
|
||||||
|
height: 42rem;
|
||||||
|
background-color: @base-white-color;
|
||||||
|
padding: 1rem;
|
||||||
|
padding-top: 0;
|
||||||
|
.table-header {
|
||||||
|
height: 3rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -25,6 +25,12 @@ const ReceivablesManagement = [
|
||||||
name: "BillBill",
|
name: "BillBill",
|
||||||
component: () => import("@/pages/receivables-management/Bill.vue"),
|
component: () => import("@/pages/receivables-management/Bill.vue"),
|
||||||
meta: { title: "票据", hidden: false },
|
meta: { title: "票据", hidden: false },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/student-loan",
|
||||||
|
name: "StudentLoan",
|
||||||
|
component: () => import("@/pages/receivables-management/studentLoan.vue"),
|
||||||
|
meta: { title: "助学贷款", },
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user