教材管理
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 教材管理:教材信息(JCXX 实体)
|
||||
// 接口依据 api.txt:/teachingMaterial/*(前端 baseURL 为 /api,此处不重复 /api 前缀)
|
||||
|
||||
/**
|
||||
* 教材信息分页查询
|
||||
* GET /teachingMaterial/list
|
||||
* 查询参数(TeachingMaterialMapper.xml 支持):bh/mc/isbn/cbs/zz 模糊,jcfl/jclx 等值,ty 等值
|
||||
*/
|
||||
export function listTeachingMaterial(params) {
|
||||
return request({
|
||||
url: '/teachingMaterial/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/** 根据编号查询 GET /teachingMaterial/getByBh?bh= */
|
||||
export function getTeachingMaterialByBh(bh) {
|
||||
return request({
|
||||
url: '/teachingMaterial/getByBh',
|
||||
method: 'get',
|
||||
params: { bh }
|
||||
})
|
||||
}
|
||||
|
||||
/** 根据ID查询 GET /teachingMaterial/getById?id= */
|
||||
export function getTeachingMaterialById(id) {
|
||||
return request({
|
||||
url: '/teachingMaterial/getById',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/** 新增教材信息 POST /teachingMaterial/add */
|
||||
export function addTeachingMaterial(data) {
|
||||
return request({
|
||||
url: '/teachingMaterial/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/** 根据ID修改 POST /teachingMaterial/update(body 需携带 id) */
|
||||
export function updateTeachingMaterial(data) {
|
||||
return request({
|
||||
url: '/teachingMaterial/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除 POST /teachingMaterial/delete?id= */
|
||||
export function deleteTeachingMaterial(id) {
|
||||
return request({
|
||||
url: '/teachingMaterial/delete',
|
||||
method: 'post',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/** 教材导入模板下载 GET /teachingMaterial/template */
|
||||
export function downloadTeachingMaterialTemplate() {
|
||||
return request({
|
||||
url: '/teachingMaterial/template',
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
/** 教材导入 POST /teachingMaterial/import(form-data,字段名 file) */
|
||||
export function importTeachingMaterial(file) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
return request({
|
||||
url: '/teachingMaterial/import',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 教材库存:库存单(JCKCD)+ 库存明细项(JCKCMXX)
|
||||
// 接口依据 api.txt:/teachingStock/*(前端 baseURL 为 /api,此处不重复 /api 前缀)
|
||||
|
||||
// ==================== 教材库存单(JCKCD) ====================
|
||||
|
||||
/**
|
||||
* 分页查询库存单
|
||||
* GET /teachingStock/list
|
||||
* 查询参数(TeachingStockMapper.xml 支持):bh/mc 模糊,lb/zb/zt 等值
|
||||
*/
|
||||
export function listTeachingStock(params) {
|
||||
return request({
|
||||
url: '/teachingStock/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/** 根据ID查询库存单 GET /teachingStock/get?id= */
|
||||
export function getTeachingStock(id) {
|
||||
return request({
|
||||
url: '/teachingStock/get',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/** 新增库存单 POST /teachingStock/add(bh 留空由后端自动生成) */
|
||||
export function addTeachingStock(data) {
|
||||
return request({
|
||||
url: '/teachingStock/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/** 修改库存单 POST /teachingStock/update(body 需携带 id) */
|
||||
export function updateTeachingStock(data) {
|
||||
return request({
|
||||
url: '/teachingStock/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除库存单 POST /teachingStock/delete?id= */
|
||||
export function deleteTeachingStock(id) {
|
||||
return request({
|
||||
url: '/teachingStock/delete',
|
||||
method: 'post',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 教材库存明细项(JCKCMXX) ====================
|
||||
|
||||
/**
|
||||
* 分页查询库存明细项
|
||||
* GET /teachingStock/detail/list
|
||||
* 查询参数(TeachingStockDetailMapper.xml 支持):bh 模糊,jckcdbbh 等值,jcxxbh 模糊,hwbw 等值
|
||||
*/
|
||||
export function listTeachingStockDetail(params) {
|
||||
return request({
|
||||
url: '/teachingStock/detail/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/** 根据ID查询库存明细项 GET /teachingStock/detail/get?id= */
|
||||
export function getTeachingStockDetail(id) {
|
||||
return request({
|
||||
url: '/teachingStock/detail/get',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/** 新增库存明细项 POST /teachingStock/detail/add(bh 留空由后端自动生成) */
|
||||
export function addTeachingStockDetail(data) {
|
||||
return request({
|
||||
url: '/teachingStock/detail/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/** 修改库存明细项 POST /teachingStock/detail/update(body 需携带 id) */
|
||||
export function updateTeachingStockDetail(data) {
|
||||
return request({
|
||||
url: '/teachingStock/detail/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除库存明细项 POST /teachingStock/detail/delete?id= */
|
||||
export function deleteTeachingStockDetail(id) {
|
||||
return request({
|
||||
url: '/teachingStock/detail/delete',
|
||||
method: 'post',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
@@ -25,38 +25,38 @@
|
||||
<el-tabs v-model="activeTab">
|
||||
<!-- 课程成绩 -->
|
||||
<el-tab-pane label="课程成绩" name="grades">
|
||||
<el-table v-loading="loading" :data="gradesData" stripe border>
|
||||
<el-table v-loading="loading" :data="gradesData" stripe border style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="xybh" label="学员编号" width="110" show-overflow-tooltip />
|
||||
<el-table-column prop="kmbh" label="科目编号" width="110" show-overflow-tooltip />
|
||||
<el-table-column prop="klx" label="课类型" width="90" align="center" />
|
||||
<el-table-column prop="kscj" label="考试成绩" width="90" align="center" />
|
||||
<el-table-column prop="pscj" label="平时成绩" width="90" align="center" />
|
||||
<el-table-column prop="zzcj" label="最终成绩" width="90" align="center" />
|
||||
<el-table-column prop="bkcj" label="补考成绩" width="90" align="center" />
|
||||
<el-table-column prop="bkcs" label="补考次数" width="90" align="center" />
|
||||
<el-table-column prop="ksqk" label="考试情况" width="90" align="center" />
|
||||
<el-table-column prop="qwxf" label="期望学分" width="90" align="center" />
|
||||
<el-table-column prop="ytg" label="已通过" width="80" align="center" />
|
||||
<el-table-column prop="nd" label="年度" width="80" align="center" />
|
||||
<el-table-column prop="xybh" label="学员编号" min-width="110" show-overflow-tooltip />
|
||||
<el-table-column prop="kmbh" label="科目编号" min-width="110" show-overflow-tooltip />
|
||||
<el-table-column prop="klx" label="课类型" min-width="90" align="center" />
|
||||
<el-table-column prop="kscj" label="考试成绩" min-width="90" align="center" />
|
||||
<el-table-column prop="pscj" label="平时成绩" min-width="90" align="center" />
|
||||
<el-table-column prop="zzcj" label="最终成绩" min-width="90" align="center" />
|
||||
<el-table-column prop="bkcj" label="补考成绩" min-width="90" align="center" />
|
||||
<el-table-column prop="bkcs" label="补考次数" min-width="90" align="center" />
|
||||
<el-table-column prop="ksqk" label="考试情况" min-width="90" align="center" />
|
||||
<el-table-column prop="qwxf" label="期望学分" min-width="90" align="center" />
|
||||
<el-table-column prop="ytg" label="已通过" min-width="80" align="center" />
|
||||
<el-table-column prop="nd" label="年度" min-width="80" align="center" />
|
||||
</el-table>
|
||||
<el-empty v-if="!loading && gradesData.length === 0" description="暂无课程成绩数据" :image-size="60" />
|
||||
</el-tab-pane>
|
||||
|
||||
<!-- 课程过程成绩 -->
|
||||
<el-tab-pane label="课程过程成绩" name="process">
|
||||
<el-table v-loading="loading" :data="processGradesData" stripe border>
|
||||
<el-table v-loading="loading" :data="processGradesData" stripe border style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="xybh" label="学员编号" width="110" show-overflow-tooltip />
|
||||
<el-table-column prop="kmbh" label="科目编号" width="110" show-overflow-tooltip />
|
||||
<el-table-column prop="klx" label="课类型" width="90" align="center" />
|
||||
<el-table-column prop="yscj" label="原始成绩" width="90" align="center" />
|
||||
<el-table-column prop="zzcj" label="最终成绩" width="90" align="center" />
|
||||
<el-table-column prop="bkcj1" label="补考1" width="80" align="center" />
|
||||
<el-table-column prop="bkcj2" label="补考2" width="80" align="center" />
|
||||
<el-table-column prop="bkcj3" label="补考3" width="80" align="center" />
|
||||
<el-table-column prop="ksqk" label="考试情况" width="90" align="center" />
|
||||
<el-table-column prop="nd" label="年度" width="80" align="center" />
|
||||
<el-table-column prop="xybh" label="学员编号" min-width="110" show-overflow-tooltip />
|
||||
<el-table-column prop="kmbh" label="科目编号" min-width="110" show-overflow-tooltip />
|
||||
<el-table-column prop="klx" label="课类型" min-width="90" align="center" />
|
||||
<el-table-column prop="yscj" label="原始成绩" min-width="90" align="center" />
|
||||
<el-table-column prop="zzcj" label="最终成绩" min-width="90" align="center" />
|
||||
<el-table-column prop="bkcj1" label="补考1" min-width="80" align="center" />
|
||||
<el-table-column prop="bkcj2" label="补考2" min-width="80" align="center" />
|
||||
<el-table-column prop="bkcj3" label="补考3" min-width="80" align="center" />
|
||||
<el-table-column prop="ksqk" label="考试情况" min-width="90" align="center" />
|
||||
<el-table-column prop="nd" label="年度" min-width="80" align="center" />
|
||||
</el-table>
|
||||
<el-empty v-if="!loading && processGradesData.length === 0" description="暂无课程过程成绩数据" :image-size="60" />
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增学籍异动申请</el-button>
|
||||
</div>
|
||||
<el-table v-loading="loading" :data="tableData" stripe border highlight-current-row>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="bh" label="编号" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="xybh" label="学员编号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="sqlx" label="申请类型" width="100" align="center" />
|
||||
@@ -54,20 +55,29 @@
|
||||
<el-table-column prop="bz" label="备注" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="状态" width="90" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<el-tag :type="statusTagType(row.zt)" size="mini">{{ statusLabel(row.zt) }}</el-tag>
|
||||
<el-tag :type="statusTagType(row.zt)" size="mini" effect="light">{{ statusLabel(row.zt) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cjsj" label="创建时间" width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="xgsj" label="修改时间" width="160" show-overflow-tooltip />
|
||||
<el-table-column label="提交时间" width="160" align="center">
|
||||
<template slot-scope="{ row }">{{ row.tjsj ? fmtDateTime(row.tjsj) : '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" width="160" align="center">
|
||||
<template slot-scope="{ row }">{{ row.cjsj ? fmtDateTime(row.cjsj) : '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修改时间" width="160" align="center">
|
||||
<template slot-scope="{ row }">{{ row.xgsj ? fmtDateTime(row.xgsj) : '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230" align="center" fixed="right">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" size="small" icon="el-icon-upload2" @click="handleSubmit(row)">提交</el-button>
|
||||
<el-button v-if="!row.tjsj" type="text" size="small" icon="el-icon-upload2" @click="handleSubmit(row)">提交</el-button>
|
||||
<el-button v-else type="text" size="small" icon="el-icon-check" disabled>已提交</el-button>
|
||||
<el-button type="text" size="small" icon="el-icon-view" @click="handleDetail(row)">详情</el-button>
|
||||
<el-button type="text" size="small" icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" size="small" class="text-danger" @click="handleDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-if="!loading && tableData.length === 0" description="暂无学籍异动申请数据" :image-size="60" />
|
||||
|
||||
<el-pagination
|
||||
:current-page="pageNum"
|
||||
@@ -224,6 +234,11 @@ export default {
|
||||
},
|
||||
|
||||
// ==================== 状态展示 ====================
|
||||
// 统一格式化后端 LocalDateTime(去除 T、截断到秒)
|
||||
fmtDateTime(val) {
|
||||
if (val === null || val === undefined || val === '') return ''
|
||||
return String(val).replace('T', ' ').slice(0, 19)
|
||||
},
|
||||
statusLabel(zt) {
|
||||
const item = this.statusMap[zt]
|
||||
return item ? item.label : (zt !== null && zt !== undefined ? String(zt) : '-')
|
||||
|
||||
+1122
-369
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user