Main #1
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// ======================== 教学日志核心 ========================
|
||||||
|
// 说明:以下接口均已与实际运行的后端 LogController 逐一核对(前缀 /log,
|
||||||
|
// 经 vue.config.js 代理转发为 /api/log)。axios baseURL 为 /api(.env.development)。
|
||||||
|
|
||||||
|
// 分页条件查询教学日志列表(待上报 / 待审核视图)
|
||||||
|
// 支持参数:pageNum pageSize ksrq jsrq kcmc jys jxff skjy rzzt pxqb gdqk gdxxqk rwlb
|
||||||
|
export function getTeachingLogList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页条件查询已上报的教学日志列表(状态固定为「已上报」)
|
||||||
|
export function getReportedTeachingLogList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/reported/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页条件查询已审核的教学日志列表(状态固定为「已审核」)
|
||||||
|
export function getAuditedTeachingLogList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/audited/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增教学日志
|
||||||
|
export function addTeachingLog(data) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量上报教学日志(入参为 bh 编号数组,Content-Type: application/json)
|
||||||
|
export function batchReportTeachingLog(bhList) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/batch-report',
|
||||||
|
method: 'post',
|
||||||
|
data: bhList
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量审核教学日志(入参为 bh 编号数组)
|
||||||
|
export function batchAuditTeachingLog(bhList) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/batch-audit',
|
||||||
|
method: 'post',
|
||||||
|
data: bhList
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退回教学日志(撤回重填),接口形态:POST /log/teaching-log/reject?bh=&thyj=
|
||||||
|
export function rejectTeachingLog(bh, thyj) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/reject',
|
||||||
|
method: 'post',
|
||||||
|
params: { bh: bh, thyj: thyj }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量导入教学日志 Excel,接口形态:POST /log/teaching-log/import-excel(multipart,字段名 file)
|
||||||
|
export function importTeachingLogExcel(file) {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file)
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/import-excel',
|
||||||
|
method: 'post',
|
||||||
|
data: formData
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出教学日志 Excel(返回 Blob),接口形态:GET /log/teaching-log/export
|
||||||
|
export function exportTeachingLog(query) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 下载导入模板(返回 Blob),接口形态:GET /log/teaching-log/download-template
|
||||||
|
export function downloadTeachingLogTemplate() {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/download-template',
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// ======================== TODO:后端暂未提供,保留占位待接 ========================
|
||||||
|
|
||||||
|
// TODO(后端缺接口):批量删除教学日志 —— 当前后端 LogController 无 delete 接口,
|
||||||
|
// 待后端提供后确认入参与请求方式。
|
||||||
|
export function deleteTeachingLog(bhList) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/delete',
|
||||||
|
method: 'post',
|
||||||
|
data: bhList
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(后端缺接口):重新检查通报变更情况 —— 当前后端无 recheck 接口,待后端提供后确认。
|
||||||
|
export function recheckTeachingLog() {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/recheck',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(后端缺接口):根据编号查询教学日志详情 —— 当前后端无 teaching-log/get 接口。
|
||||||
|
// 列表接口已含完整字段,组件以行数据兜底展示;待后端提供 get 接口后再联调。
|
||||||
|
export function getTeachingLogByBh(bh) {
|
||||||
|
return request({
|
||||||
|
url: '/log/teaching-log/get',
|
||||||
|
method: 'get',
|
||||||
|
params: { bh: bh }
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 分页查询学员信息列表(姓名/联系电话/通信地址支持模糊查询,其余实体字段可作为查询条件)
|
||||||
|
export function listStudentRecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询学员信息详情(bh 编号必传)
|
||||||
|
export function getStudentRecord(bh) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/get',
|
||||||
|
method: 'get',
|
||||||
|
params: { bh: bh }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增学员信息
|
||||||
|
export function addStudentRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改学员信息(bh 编号必传)
|
||||||
|
export function updateStudentRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/update',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除学员信息(bh 编号)
|
||||||
|
export function delStudentRecord(bh) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/delete',
|
||||||
|
method: 'post',
|
||||||
|
params: { bh: bh }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页查询学员课程成绩(xybh 学员编号必传;nd 年度可选)
|
||||||
|
export function listStudentGrades(query) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/grades',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页查询学员课程过程成绩(xybh 学员编号必传;nd 年度可选)
|
||||||
|
export function listStudentProcessGrades(query) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/process-grades',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出学员课程成绩 Excel(xybh 学员编号必传)
|
||||||
|
export function exportStudentGrades(xybh) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/export-grades',
|
||||||
|
method: 'get',
|
||||||
|
params: { xybh: xybh },
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出学员课程过程成绩 Excel(xybh 学员编号必传)
|
||||||
|
export function exportStudentProcessGrades(xybh) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/export-process-grades',
|
||||||
|
method: 'get',
|
||||||
|
params: { xybh: xybh },
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 分页查询预警条件列表
|
||||||
|
export function listWarningCondition(query) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/warning-condition/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询预警条件详情
|
||||||
|
export function getWarningCondition(bh) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/warning-condition/get',
|
||||||
|
method: 'get',
|
||||||
|
params: { bh: bh }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增预警条件
|
||||||
|
export function addWarningCondition(data) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/warning-condition/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改预警条件
|
||||||
|
export function updateWarningCondition(data) {
|
||||||
|
return request({
|
||||||
|
url: '/student-records/warning-condition/update',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 分页查询专业列表
|
||||||
|
export function listMajor(query) {
|
||||||
|
return request({
|
||||||
|
url: '/discipline/major/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询专业详情
|
||||||
|
export function getMajor(zydh) {
|
||||||
|
return request({
|
||||||
|
url: '/discipline/major/get',
|
||||||
|
method: 'get',
|
||||||
|
params: { zydh: zydh }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增专业
|
||||||
|
export function addMajor(data) {
|
||||||
|
return request({
|
||||||
|
url: '/discipline/major/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改专业
|
||||||
|
export function updateMajor(data) {
|
||||||
|
return request({
|
||||||
|
url: '/discipline/major/update',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除专业
|
||||||
|
export function delMajor(zydh) {
|
||||||
|
return request({
|
||||||
|
url: '/discipline/major/delete',
|
||||||
|
method: 'post',
|
||||||
|
params: { zydh: zydh }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 下载人才培养方案课程数据文件模板
|
||||||
|
export function downloadMajorTemplate() {
|
||||||
|
return request({
|
||||||
|
url: '/download/training-program',
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'blob',
|
||||||
|
timeout: 30000
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,428 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page-container">
|
||||||
|
<!-- 查询条件 -->
|
||||||
|
<el-card shadow="never" class="search-card">
|
||||||
|
<div class="search-tip">勾选"选择框"表示启用该项对应的查询条件。</div>
|
||||||
|
<el-form :model="searchForm" label-width="110px" class="search-form">
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.ksrqEnabled">开始日期</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-date-picker v-model="searchForm.ksrq" type="date" value-format="yyyy-MM-dd" placeholder="选择开始日期"
|
||||||
|
class="w-full" :disabled="!searchForm.ksrqEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.jsrqEnabled">结束日期</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-date-picker v-model="searchForm.jsrq" type="date" value-format="yyyy-MM-dd" placeholder="选择结束日期"
|
||||||
|
class="w-full" :disabled="!searchForm.jsrqEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.kcmcEnabled">课程名称</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="searchForm.kcmc" placeholder="请输入课程名称" clearable :disabled="!searchForm.kcmcEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.jysEnabled">教研室</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.jys" placeholder="请选择教研室" class="w-full" :disabled="!searchForm.jysEnabled">
|
||||||
|
<el-option v-for="item in jysOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.jxffEnabled">教学方法</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.jxff" placeholder="请选择教学方法" class="w-full" :disabled="!searchForm.jxffEnabled">
|
||||||
|
<el-option v-for="item in jxffOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.skjyEnabled">授课教员</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.skjy" placeholder="请选择授课教员" class="w-full" :disabled="!searchForm.skjyEnabled">
|
||||||
|
<el-option v-for="item in skjyOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.gdqkEnabled">改动情况</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<div class="change-options" :class="{ disabled: !searchForm.gdqkEnabled }">
|
||||||
|
<el-radio-group v-model="searchForm.createSource" :disabled="!searchForm.gdqkEnabled">
|
||||||
|
<el-radio v-for="item in createSourceOptions" :key="item" :label="item">{{ item }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-checkbox-group v-model="searchForm.changeTypes" :disabled="!searchForm.gdqkEnabled">
|
||||||
|
<el-checkbox v-for="item in changeTypeOptions" :key="item" :label="item">{{ item }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.rwlbEnabled">任务类别</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.rwlb" placeholder="请选择任务类别" class="w-full" :disabled="!searchForm.rwlbEnabled">
|
||||||
|
<el-option v-for="item in rwlbOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.pxqbEnabled">培训期班</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="searchForm.pxqb" placeholder="请输入培训期班" clearable :disabled="!searchForm.pxqbEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="search-actions">
|
||||||
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 数据表格 -->
|
||||||
|
<el-card shadow="never" class="table-card">
|
||||||
|
<el-table v-loading="loading" :data="tableData" stripe border highlight-current-row
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="rwlb" label="任务类别" width="130" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="jyxm" label="主讲教员" width="100" align="center" />
|
||||||
|
<el-table-column prop="rq" label="日期" width="150" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.rq ? formatDate(scope.row.rq) : '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="节次" width="80" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.qsjc && scope.row.jsjc ? `${scope.row.qsjc}-${scope.row.jsjc}节` : (scope.row.qsjc || '-') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="kcmc" label="课程名称" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="pxqbxx" label="培训期班信息" min-width="140" show-overflow-tooltip />
|
||||||
|
<el-table-column label="人数" width="70" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.sdrs || scope.row.ydrs || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分组指导教员" width="120" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.fzyzdjy || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="jsfs" label="教学方法" width="100" align="center" />
|
||||||
|
<el-table-column prop="zt" label="日志状态" width="100" align="center" />
|
||||||
|
<el-table-column prop="gdqk" label="变动汇总" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="jxrzcjfs" label="创建方式" width="100" align="center" />
|
||||||
|
<el-table-column label="详细" width="80" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDetail(scope.row)">详细</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页 -->
|
||||||
|
<div class="pagination-wrapper">
|
||||||
|
<el-pagination :current-page="pageNum" :page-size="pageSize" :total="total" :page-sizes="[10, 20, 50, 100]"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper" background @current-change="handlePageChange"
|
||||||
|
@size-change="handleSizeChange" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 日志详情对话框 -->
|
||||||
|
<el-dialog :visible.sync="detailVisible" title="教学日志详情" width="700px" destroy-on-close>
|
||||||
|
<div v-loading="detailLoading">
|
||||||
|
<el-descriptions v-if="!detailLoading" :column="2" border>
|
||||||
|
<el-descriptions-item label="编号">{{ detailData.bh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="统一编号">{{ detailData.tybh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教员编号">{{ detailData.jybh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教员姓名">{{ detailData.jyxm || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="课程名称">{{ detailData.kcmc || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务类别">{{ detailData.rwlb || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="日期">{{ detailData.rq || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="节次">
|
||||||
|
{{ detailData.qsjc && detailData.jsjc ? `${detailData.qsjc}-${detailData.jsjc}节` : '-' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教学方法">{{ detailData.jsfs || detailData.jxff || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建方式">{{ detailData.jxrzcjfs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="应到人数">{{ detailData.ydrs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实到人数">{{ detailData.sdrs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="培训期班信息" :span="2">{{ detailData.pxqbxx || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="授课地点" :span="2">{{ detailData.skdd || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="状态">{{ detailData.zt || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教研室">{{ detailData.jysmc || detailData.jys || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="变动汇总" :span="2">{{ detailData.gdqk || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="变动详细情况" :span="2">{{ detailData.gdxxqk || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="退回意见" :span="2">{{ detailData.thyj || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建时间">{{ detailData.cjsj || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="修改时间">{{ detailData.xgsj || '-' }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="detailVisible = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { formatDate } from '@/utils/index'
|
||||||
|
import { getAuditedTeachingLogList, getTeachingLogByBh } from '@/api/log'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AuditedView',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// ==================== 查询表单 ====================
|
||||||
|
searchForm: {
|
||||||
|
ksrq: '',
|
||||||
|
ksrqEnabled: false,
|
||||||
|
jsrq: '',
|
||||||
|
jsrqEnabled: false,
|
||||||
|
kcmc: '',
|
||||||
|
kcmcEnabled: false,
|
||||||
|
jys: '',
|
||||||
|
jysEnabled: false,
|
||||||
|
jxff: '理论讲授',
|
||||||
|
jxffEnabled: false,
|
||||||
|
skjy: '教务处',
|
||||||
|
skjyEnabled: false,
|
||||||
|
gdqkEnabled: false,
|
||||||
|
createSource: '',
|
||||||
|
changeTypes: [],
|
||||||
|
rwlb: '全军院校训练规划内任务',
|
||||||
|
rwlbEnabled: false,
|
||||||
|
pxqb: '',
|
||||||
|
pxqbEnabled: false
|
||||||
|
},
|
||||||
|
|
||||||
|
jysOptions: ['教研室', '防空兵系', '通信工程系', '装甲兵系'],
|
||||||
|
jxffOptions: ['理论讲授', '讨论', '实操', '演示'],
|
||||||
|
skjyOptions: ['教务处', '张三', '李四', '王五'],
|
||||||
|
rwlbOptions: ['全军院校训练规划内任务', '其他任务'],
|
||||||
|
createSourceOptions: ['由教学计划创建', '已改动教学计划', '手动拟制'],
|
||||||
|
changeTypeOptions: [
|
||||||
|
'教员变动',
|
||||||
|
'时间变动',
|
||||||
|
'课程变动',
|
||||||
|
'授课方式变动',
|
||||||
|
'任务类别变动',
|
||||||
|
'期班变动',
|
||||||
|
'地点变动',
|
||||||
|
'课题变动'
|
||||||
|
],
|
||||||
|
|
||||||
|
// ==================== 数据表格 ====================
|
||||||
|
loading: false,
|
||||||
|
tableData: [],
|
||||||
|
selectedRows: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
total: 0,
|
||||||
|
|
||||||
|
// ==================== 详情 ====================
|
||||||
|
detailVisible: false,
|
||||||
|
detailLoading: false,
|
||||||
|
detailData: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelectionChange(rows) {
|
||||||
|
this.selectedRows = rows
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 根据"勾选启用"模式构建实际查询参数 */
|
||||||
|
buildSearchParams() {
|
||||||
|
const form = this.searchForm
|
||||||
|
const params = { pageNum: this.pageNum, pageSize: this.pageSize }
|
||||||
|
if (form.ksrqEnabled && form.ksrq) params.ksrq = form.ksrq
|
||||||
|
if (form.jsrqEnabled && form.jsrq) params.jsrq = form.jsrq
|
||||||
|
if (form.kcmcEnabled && form.kcmc) params.kcmc = form.kcmc
|
||||||
|
if (form.jysEnabled && form.jys) params.jys = form.jys
|
||||||
|
if (form.jxffEnabled && form.jxff) params.jxff = form.jxff
|
||||||
|
if (form.skjyEnabled && form.skjy) params.skjy = form.skjy
|
||||||
|
if (form.rwlbEnabled && form.rwlb) params.rwlb = form.rwlb
|
||||||
|
if (form.pxqbEnabled && form.pxqb) params.pxqb = form.pxqb
|
||||||
|
if (form.gdqkEnabled && form.createSource) params.gdqk = form.createSource
|
||||||
|
if (form.gdqkEnabled && form.changeTypes.length > 0) {
|
||||||
|
params.gdxxqk = form.changeTypes.join(',')
|
||||||
|
}
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
|
||||||
|
extractListData(res) {
|
||||||
|
const data = res.data || res
|
||||||
|
const list = data.records || data.list || data.rows || []
|
||||||
|
const totalCount = data.total ?? data.totalCount ?? data.totalRows ?? 0
|
||||||
|
return { list, total: totalCount }
|
||||||
|
},
|
||||||
|
|
||||||
|
fetchList() {
|
||||||
|
this.loading = true
|
||||||
|
return getAuditedTeachingLogList(this.buildSearchParams())
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200 || res.code === 0) {
|
||||||
|
const { list, total } = this.extractListData(res)
|
||||||
|
this.tableData = list
|
||||||
|
this.total = total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSearch() {
|
||||||
|
this.pageNum = 1
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePageChange(page) {
|
||||||
|
this.pageNum = page
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSizeChange(size) {
|
||||||
|
this.pageSize = size
|
||||||
|
this.pageNum = 1
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDetail(row) {
|
||||||
|
this.detailData = { ...row }
|
||||||
|
this.detailVisible = true
|
||||||
|
const bh = row.bh
|
||||||
|
if (!bh) return
|
||||||
|
this.detailLoading = true
|
||||||
|
getTeachingLogByBh(String(bh))
|
||||||
|
.then((res) => {
|
||||||
|
if ((res.code === 200 || res.code === 0) && res.data) {
|
||||||
|
this.detailData = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
this.detailLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.page-container {
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-card {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
.w-full {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-row {
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-col {
|
||||||
|
border-right: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-form-item__label {
|
||||||
|
white-space: normal;
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: left;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.change-options {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
::v-deep .el-radio-group,
|
||||||
|
::v-deep .el-checkbox-group {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-tip {
|
||||||
|
padding: 6px 12px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #f56c6c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 12px;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-card {
|
||||||
|
.el-table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 16px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,595 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page-container">
|
||||||
|
<!-- 查询条件 -->
|
||||||
|
<el-card shadow="never" class="search-card">
|
||||||
|
<div class="search-tip">勾选"选择框"表示启用该项对应的查询条件。</div>
|
||||||
|
<el-form :model="searchForm" label-width="110px" class="search-form">
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.ksrqEnabled">开始日期</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-date-picker v-model="searchForm.ksrq" type="date" value-format="yyyy-MM-dd" placeholder="选择开始日期"
|
||||||
|
class="w-full" :disabled="!searchForm.ksrqEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.jsrqEnabled">结束日期</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-date-picker v-model="searchForm.jsrq" type="date" value-format="yyyy-MM-dd" placeholder="选择结束日期"
|
||||||
|
class="w-full" :disabled="!searchForm.jsrqEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.kcmcEnabled">课程名称</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="searchForm.kcmc" placeholder="请输入课程名称" clearable :disabled="!searchForm.kcmcEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.jysEnabled">教研室</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.jys" placeholder="请选择教研室" class="w-full" :disabled="!searchForm.jysEnabled">
|
||||||
|
<el-option v-for="item in jysOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.jxffEnabled">教学方法</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.jxff" placeholder="请选择教学方法" class="w-full" :disabled="!searchForm.jxffEnabled">
|
||||||
|
<el-option v-for="item in jxffOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.rzztEnabled">日志状态</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.rzzt" placeholder="请选择日志状态" class="w-full" :disabled="!searchForm.rzztEnabled">
|
||||||
|
<el-option v-for="item in rzztOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.skjyEnabled">授课教员</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.skjy" placeholder="请选择授课教员" class="w-full" :disabled="!searchForm.skjyEnabled">
|
||||||
|
<el-option v-for="item in skjyOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.pxqbEnabled">培训期班</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="searchForm.pxqb" placeholder="请输入培训期班" clearable :disabled="!searchForm.pxqbEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.changeTypeEnabled">改动情况</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<div class="change-options" :class="{ disabled: !searchForm.changeTypeEnabled }">
|
||||||
|
<el-radio-group v-model="searchForm.changeType" :disabled="!searchForm.changeTypeEnabled">
|
||||||
|
<el-radio v-for="item in changeTypeOptions" :key="item.value" :label="item.value">{{ item.label
|
||||||
|
}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-checkbox-group v-model="searchForm.changeTypes" :disabled="!searchForm.changeTypeEnabled">
|
||||||
|
<el-checkbox v-for="item in changeTypeList" :key="item.value" :label="item.value">{{ item.label
|
||||||
|
}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.rwlbEnabled">任务类别</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.rwlb" placeholder="请选择任务类别" class="w-full" :disabled="!searchForm.rwlbEnabled">
|
||||||
|
<el-option v-for="item in rwlbOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="search-actions">
|
||||||
|
<div class="left-group">
|
||||||
|
<el-button type="primary" @click="handleDeleteSelected">删除所选</el-button>
|
||||||
|
<el-button type="primary" @click="handleBatchReport">批准上报所选</el-button>
|
||||||
|
<el-button type="primary" @click="handleRecheck">重新检查通报变更情况</el-button>
|
||||||
|
<el-button type="primary" @click="handleExport">导出到 Word</el-button>
|
||||||
|
<el-button type="primary" @click="handleRefresh">刷新</el-button>
|
||||||
|
<el-button type="success" :loading="importing" @click="handleImportExcel">导入教学日志</el-button>
|
||||||
|
<el-button type="primary" @click="handleDownloadTemplate">下载模板</el-button>
|
||||||
|
</div>
|
||||||
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 隐藏的文件选择器,用于导入 Excel -->
|
||||||
|
<input ref="importFileInput" type="file" accept=".xls,.xlsx" style="display: none" @change="handleImportFileChange" />
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 数据表格 -->
|
||||||
|
<el-card shadow="never" class="table-card">
|
||||||
|
<el-table v-loading="loading" :data="tableData" stripe border highlight-current-row
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="rwlb" label="库任务类别" width="120" align="center" />
|
||||||
|
<el-table-column prop="jyxm" label="主讲教员" width="100" align="center" />
|
||||||
|
<el-table-column prop="rq" label="日期" width="150" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.rq ? formatDate(scope.row.rq) : '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="节次" width="80" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.qsjc && scope.row.jsjc ? `${scope.row.qsjc}-${scope.row.jsjc}节` : (scope.row.qsjc || '-') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="kcmc" label="课程名称" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="pxqbxx" label="培训期班信息" min-width="140" show-overflow-tooltip />
|
||||||
|
<el-table-column label="人数" width="70" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.sdrs || scope.row.ydrs || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分组指导教员" width="120" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.fzyzdjy || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="jsfs" label="教学方法" width="100" align="center" />
|
||||||
|
<el-table-column prop="zt" label="日志状态" width="100" align="center" />
|
||||||
|
<el-table-column prop="gdqk" label="变动汇总" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="jxrzcjfs" label="创建方式" width="100" align="center" />
|
||||||
|
<el-table-column label="详细" width="80" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDetail(scope.row)">详细</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页 -->
|
||||||
|
<div class="pagination-wrapper">
|
||||||
|
<el-pagination :current-page="pageNum" :page-size="pageSize" :total="total" :page-sizes="[10, 20, 50, 100]"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper" background @current-change="handlePageChange"
|
||||||
|
@size-change="handleSizeChange" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 日志详情对话框 -->
|
||||||
|
<el-dialog :visible.sync="detailVisible" title="教学日志详情" width="700px" destroy-on-close>
|
||||||
|
<div v-loading="detailLoading">
|
||||||
|
<el-descriptions v-if="!detailLoading" :column="2" border>
|
||||||
|
<el-descriptions-item label="编号">{{ detailData.bh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="统一编号">{{ detailData.tybh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教员编号">{{ detailData.jybh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教员姓名">{{ detailData.jyxm || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="课程名称">{{ detailData.kcmc || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务类别">{{ detailData.rwlb || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="日期">{{ detailData.rq || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="节次">
|
||||||
|
{{ detailData.qsjc && detailData.jsjc ? `${detailData.qsjc}-${detailData.jsjc}节` : '-' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教学方法">{{ detailData.jsfs || detailData.jxff || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建方式">{{ detailData.jxrzcjfs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="应到人数">{{ detailData.ydrs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实到人数">{{ detailData.sdrs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="培训期班信息" :span="2">{{ detailData.pxqbxx || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="授课地点" :span="2">{{ detailData.skdd || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="状态">{{ detailData.zt || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教研室">{{ detailData.jysmc || detailData.jys || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="变动汇总" :span="2">{{ detailData.gdqk || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="变动详细情况" :span="2">{{ detailData.gdxxqk || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="退回意见" :span="2">{{ detailData.thyj || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建时间">{{ detailData.cjsj || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="修改时间">{{ detailData.xgsj || '-' }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="detailVisible = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { formatDate } from '@/utils/index'
|
||||||
|
import {
|
||||||
|
getTeachingLogList,
|
||||||
|
deleteTeachingLog,
|
||||||
|
batchReportTeachingLog,
|
||||||
|
recheckTeachingLog,
|
||||||
|
exportTeachingLog,
|
||||||
|
importTeachingLogExcel,
|
||||||
|
downloadTeachingLogTemplate,
|
||||||
|
getTeachingLogByBh
|
||||||
|
} from '@/api/log'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'LogView',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// ==================== 查询表单 ====================
|
||||||
|
searchForm: {
|
||||||
|
ksrq: '',
|
||||||
|
ksrqEnabled: false,
|
||||||
|
jsrq: '',
|
||||||
|
jsrqEnabled: false,
|
||||||
|
kcmc: '',
|
||||||
|
kcmcEnabled: false,
|
||||||
|
jys: '教研室',
|
||||||
|
jysEnabled: false,
|
||||||
|
jxff: '理论讲授',
|
||||||
|
jxffEnabled: false,
|
||||||
|
rzzt: '教务部门导入教员类',
|
||||||
|
rzztEnabled: false,
|
||||||
|
skjy: '教务处',
|
||||||
|
skjyEnabled: false,
|
||||||
|
pxqb: '',
|
||||||
|
pxqbEnabled: false,
|
||||||
|
changeType: '与教学计划一致',
|
||||||
|
changeTypeEnabled: false,
|
||||||
|
changeTypes: [],
|
||||||
|
rwlb: '全军院校训练规划内任务',
|
||||||
|
rwlbEnabled: false
|
||||||
|
},
|
||||||
|
|
||||||
|
jysOptions: ['教研室', '防空兵系', '通信工程系', '装甲兵系'],
|
||||||
|
jxffOptions: ['理论讲授', '讨论', '实操', '演示', '实验', '演习'],
|
||||||
|
skjyOptions: ['教务处', '张三', '李四', '王五', '赵六'],
|
||||||
|
rzztOptions: ['教务部门导入教员类', '管理员手工添加'],
|
||||||
|
rwlbOptions: ['全军院校训练规划内任务', '其他任务'],
|
||||||
|
changeTypeOptions: [
|
||||||
|
{ label: '与教学计划一致', value: '与教学计划一致' },
|
||||||
|
{ label: '已改动教学计划', value: '已改动教学计划' },
|
||||||
|
{ label: '手动拟制', value: '手动拟制' }
|
||||||
|
],
|
||||||
|
changeTypeList: [
|
||||||
|
{ label: '已改动教员', value: '已改动教员' },
|
||||||
|
{ label: '已改动时间', value: '已改动时间' },
|
||||||
|
{ label: '已改动课目', value: '已改动课目' },
|
||||||
|
{ label: '已改动内容', value: '已改动内容' },
|
||||||
|
{ label: '已改动教学方法', value: '已改动教学方法' },
|
||||||
|
{ label: '已改动场地', value: '已改动场地' },
|
||||||
|
{ label: '已改动期班', value: '已改动期班' }
|
||||||
|
],
|
||||||
|
|
||||||
|
// ==================== 数据表格 ====================
|
||||||
|
loading: false,
|
||||||
|
tableData: [],
|
||||||
|
selectedRows: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
total: 0,
|
||||||
|
|
||||||
|
// ==================== 导入 ====================
|
||||||
|
importing: false,
|
||||||
|
|
||||||
|
// ==================== 详情 ====================
|
||||||
|
detailVisible: false,
|
||||||
|
detailLoading: false,
|
||||||
|
detailData: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelectionChange(rows) {
|
||||||
|
this.selectedRows = rows
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 根据"勾选启用"模式构建实际查询参数 */
|
||||||
|
buildSearchParams() {
|
||||||
|
const form = this.searchForm
|
||||||
|
const params = { pageNum: this.pageNum, pageSize: this.pageSize }
|
||||||
|
if (form.ksrqEnabled && form.ksrq) params.ksrq = form.ksrq
|
||||||
|
if (form.jsrqEnabled && form.jsrq) params.jsrq = form.jsrq
|
||||||
|
if (form.kcmcEnabled && form.kcmc) params.kcmc = form.kcmc
|
||||||
|
if (form.jysEnabled && form.jys) params.jys = form.jys
|
||||||
|
if (form.jxffEnabled && form.jxff) params.jxff = form.jxff
|
||||||
|
if (form.rzztEnabled && form.rzzt) params.rzzt = form.rzzt
|
||||||
|
if (form.skjyEnabled && form.skjy) params.skjy = form.skjy
|
||||||
|
if (form.pxqbEnabled && form.pxqb) params.pxqb = form.pxqb
|
||||||
|
if (form.rwlbEnabled && form.rwlb) params.rwlb = form.rwlb
|
||||||
|
if (form.changeTypeEnabled && form.changeType) params.gdqk = form.changeType
|
||||||
|
if (form.changeTypeEnabled && form.changeTypes.length > 0) {
|
||||||
|
params.gdxxqk = form.changeTypes.join(',')
|
||||||
|
}
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 从响应中提取列表数据和总数(兼容 records / list / rows 等常见字段名) */
|
||||||
|
extractListData(res) {
|
||||||
|
const data = res.data || res
|
||||||
|
const list = data.records || data.list || data.rows || []
|
||||||
|
const totalCount = data.total ?? data.totalCount ?? data.totalRows ?? 0
|
||||||
|
return { list, total: totalCount }
|
||||||
|
},
|
||||||
|
|
||||||
|
fetchList() {
|
||||||
|
this.loading = true
|
||||||
|
return getTeachingLogList(this.buildSearchParams())
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200 || res.code === 0) {
|
||||||
|
const { list, total } = this.extractListData(res)
|
||||||
|
this.tableData = list
|
||||||
|
this.total = total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 错误已由拦截器统一处理
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSearch() {
|
||||||
|
this.pageNum = 1
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePageChange(page) {
|
||||||
|
this.pageNum = page
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSizeChange(size) {
|
||||||
|
this.pageSize = size
|
||||||
|
this.pageNum = 1
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleRefresh() {
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
getSelectedBhs() {
|
||||||
|
const ids = this.selectedRows.map((row) => row.bh).filter(Boolean)
|
||||||
|
if (ids.length === 0) {
|
||||||
|
this.$message.warning('请先选择要操作的记录')
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return ids
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDeleteSelected() {
|
||||||
|
const ids = this.getSelectedBhs()
|
||||||
|
if (ids.length === 0) return
|
||||||
|
this.$confirm(`确定要删除选中的 ${ids.length} 条记录吗?`, '删除确认', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => deleteTeachingLog(ids))
|
||||||
|
.then(() => {
|
||||||
|
this.$message.success(`已删除 ${ids.length} 条记录`)
|
||||||
|
this.fetchList()
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleBatchReport() {
|
||||||
|
const ids = this.getSelectedBhs()
|
||||||
|
if (ids.length === 0) return
|
||||||
|
this.$confirm(`确定要批量上报选中的 ${ids.length} 条记录吗?`, '上报确认', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => batchReportTeachingLog(ids))
|
||||||
|
.then(() => {
|
||||||
|
this.$message.success(`已批量上报 ${ids.length} 条记录`)
|
||||||
|
this.fetchList()
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleRecheck() {
|
||||||
|
recheckTeachingLog()
|
||||||
|
.then(() => {
|
||||||
|
this.$message.success('重新检查完成')
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
downloadBlob(blob, fileName) {
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = fileName
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
|
window.URL.revokeObjectURL(url)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleExport() {
|
||||||
|
const params = this.buildSearchParams()
|
||||||
|
delete params.pageNum
|
||||||
|
delete params.pageSize
|
||||||
|
exportTeachingLog(params)
|
||||||
|
.then((blob) => {
|
||||||
|
this.downloadBlob(blob, `教学日志_${new Date().toISOString().slice(0, 10)}.xls`)
|
||||||
|
this.$message.success('导出成功')
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleImportExcel() {
|
||||||
|
this.$refs.importFileInput && this.$refs.importFileInput.click()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleImportFileChange(e) {
|
||||||
|
const files = e.target.files
|
||||||
|
if (!files || files.length === 0) return
|
||||||
|
const file = files[0]
|
||||||
|
this.importing = true
|
||||||
|
importTeachingLogExcel(file)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200 || res.code === 0) {
|
||||||
|
this.$message.success(res.message || '导入成功')
|
||||||
|
this.fetchList()
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message || '导入失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
this.importing = false
|
||||||
|
if (this.$refs.importFileInput) {
|
||||||
|
this.$refs.importFileInput.value = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDownloadTemplate() {
|
||||||
|
downloadTeachingLogTemplate()
|
||||||
|
.then((blob) => {
|
||||||
|
this.downloadBlob(blob, '导入教学日志模板.xls')
|
||||||
|
this.$message.success('模板下载成功')
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDetail(row) {
|
||||||
|
this.detailData = { ...row }
|
||||||
|
this.detailVisible = true
|
||||||
|
const bh = row.bh
|
||||||
|
if (!bh) return
|
||||||
|
this.detailLoading = true
|
||||||
|
getTeachingLogByBh(String(bh))
|
||||||
|
.then((res) => {
|
||||||
|
if ((res.code === 200 || res.code === 0) && res.data) {
|
||||||
|
this.detailData = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 详情接口不可用时保留行数据兜底展示
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.detailLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.page-container {
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-card {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
.w-full {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-row {
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-col {
|
||||||
|
border-right: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-form-item__label {
|
||||||
|
white-space: normal;
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: left;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.change-options {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
::v-deep .el-radio-group,
|
||||||
|
::v-deep .el-checkbox-group {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-tip {
|
||||||
|
padding: 6px 12px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #f56c6c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 12px;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
.left-group {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-card {
|
||||||
|
.el-table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 16px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,571 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page-container">
|
||||||
|
<!-- 查询条件 -->
|
||||||
|
<el-card shadow="never" class="search-card">
|
||||||
|
<div class="search-tip">勾选"选择框"表示启用该项对应的查询条件。</div>
|
||||||
|
<el-form :model="searchForm" label-width="110px" class="search-form">
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.startDateEnabled">开始日期</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-date-picker v-model="searchForm.startDate" type="date" value-format="yyyy-MM-dd" placeholder="选择开始日期"
|
||||||
|
class="w-full" :disabled="!searchForm.startDateEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.endDateEnabled">结束日期</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-date-picker v-model="searchForm.endDate" type="date" value-format="yyyy-MM-dd" placeholder="选择结束日期"
|
||||||
|
class="w-full" :disabled="!searchForm.endDateEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.courseNameEnabled">课程名称</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="searchForm.courseName" placeholder="请输入课程名称" clearable
|
||||||
|
:disabled="!searchForm.courseNameEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.teachMethodEnabled">教学方法</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.teachMethod" placeholder="请选择教学方法" class="w-full"
|
||||||
|
:disabled="!searchForm.teachMethodEnabled">
|
||||||
|
<el-option v-for="item in teachMethodOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.changeEnabled">改动情况</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.change" placeholder="请选择改动情况" class="w-full" :disabled="!searchForm.changeEnabled">
|
||||||
|
<el-option v-for="item in changeOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.taskCategoryEnabled">任务类别</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.taskCategory" placeholder="请选择任务类别" class="w-full"
|
||||||
|
:disabled="!searchForm.taskCategoryEnabled">
|
||||||
|
<el-option v-for="item in taskCategoryOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.deptEnabled">教研室</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.dept" placeholder="请选择教研室" class="w-full" :disabled="!searchForm.deptEnabled">
|
||||||
|
<el-option v-for="item in deptOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.teacherEnabled">授课教员</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-select v-model="searchForm.teacher" placeholder="请选择授课教员" class="w-full"
|
||||||
|
:disabled="!searchForm.teacherEnabled">
|
||||||
|
<el-option v-for="item in teacherOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<template slot="label">
|
||||||
|
<el-checkbox v-model="searchForm.classNameEnabled">培训班</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="searchForm.className" placeholder="请输入培训班" clearable
|
||||||
|
:disabled="!searchForm.classNameEnabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="search-actions">
|
||||||
|
<div class="left-group">
|
||||||
|
<el-button type="primary" @click="handleDelete">删除所选</el-button>
|
||||||
|
<el-button type="primary" @click="handleAudit">审核通过所选</el-button>
|
||||||
|
<el-input v-model="remark" placeholder="退回原因/意见" clearable class="action-input" />
|
||||||
|
<el-button type="primary" @click="handleWithdraw">撤回重填所选</el-button>
|
||||||
|
<el-button type="primary" @click="handleRecheck">重新检查所选变更情况</el-button>
|
||||||
|
<el-button type="primary" @click="handleExport">导出到 Word</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="right-group">
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 数据表格 -->
|
||||||
|
<el-card shadow="never" class="table-card">
|
||||||
|
<el-table v-loading="loading" :data="tableData" stripe border highlight-current-row
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="rwlb" label="任务类别" width="120" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="jyxm" label="主讲教员" width="100" align="center" />
|
||||||
|
<el-table-column prop="rq" label="日期" width="150" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.rq ? formatDate(scope.row.rq) : '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="节次" width="80" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.qsjc && scope.row.jsjc ? `${scope.row.qsjc}-${scope.row.jsjc}节` : (scope.row.qsjc || '-') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="kcmc" label="课程名称" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="pxqbxx" label="培训期班信息" min-width="140" show-overflow-tooltip />
|
||||||
|
<el-table-column label="人数" width="70" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.sdrs || scope.row.ydrs || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分组指导教员" width="120" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.fzyzdjy || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="jsfs" label="教学方法" width="100" align="center" />
|
||||||
|
<el-table-column prop="zt" label="日志状态" width="100" align="center" />
|
||||||
|
<el-table-column prop="gdqk" label="变动汇总" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="jxrzcjfs" label="创建方式" width="100" align="center" />
|
||||||
|
<el-table-column label="详细" width="80" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDetail(scope.row)">详细</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页 -->
|
||||||
|
<div class="pagination-wrapper">
|
||||||
|
<el-pagination :current-page="pageNum" :page-size="pageSize" :total="total" :page-sizes="[10, 20, 50, 100]"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper" background @current-change="handlePageChange"
|
||||||
|
@size-change="handleSizeChange" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 日志详情对话框 -->
|
||||||
|
<el-dialog :visible.sync="detailVisible" title="教学日志详情" width="700px" destroy-on-close>
|
||||||
|
<div v-loading="detailLoading">
|
||||||
|
<el-descriptions v-if="!detailLoading" :column="2" border>
|
||||||
|
<el-descriptions-item label="编号">{{ detailData.bh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="统一编号">{{ detailData.tybh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教员编号">{{ detailData.jybh || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教员姓名">{{ detailData.jyxm || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="课程名称">{{ detailData.kcmc || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务类别">{{ detailData.rwlb || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="日期">{{ detailData.rq || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="节次">
|
||||||
|
{{ detailData.qsjc && detailData.jsjc ? `${detailData.qsjc}-${detailData.jsjc}节` : '-' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教学方法">{{ detailData.jsfs || detailData.jxff || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建方式">{{ detailData.jxrzcjfs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="应到人数">{{ detailData.ydrs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实到人数">{{ detailData.sdrs || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="培训期班信息" :span="2">{{ detailData.pxqbxx || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="授课地点" :span="2">{{ detailData.skdd || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="状态">{{ detailData.zt || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="教研室">{{ detailData.jysmc || detailData.jys || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="变动汇总" :span="2">{{ detailData.gdqk || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="变动详细情况" :span="2">{{ detailData.gdxxqk || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="退回意见" :span="2">{{ detailData.thyj || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建时间">{{ detailData.cjsj || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="修改时间">{{ detailData.xgsj || '-' }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="detailVisible = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { formatDate } from '@/utils/index'
|
||||||
|
import {
|
||||||
|
getReportedTeachingLogList,
|
||||||
|
deleteTeachingLog,
|
||||||
|
batchAuditTeachingLog,
|
||||||
|
rejectTeachingLog,
|
||||||
|
recheckTeachingLog,
|
||||||
|
exportTeachingLog,
|
||||||
|
getTeachingLogByBh
|
||||||
|
} from '@/api/log'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ReportedView',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// ==================== 查询表单 ====================
|
||||||
|
searchForm: {
|
||||||
|
startDate: '',
|
||||||
|
startDateEnabled: false,
|
||||||
|
endDate: '',
|
||||||
|
endDateEnabled: false,
|
||||||
|
courseName: '',
|
||||||
|
courseNameEnabled: false,
|
||||||
|
teachMethod: '理论讲授',
|
||||||
|
teachMethodEnabled: false,
|
||||||
|
change: '与教学计划一致',
|
||||||
|
changeEnabled: false,
|
||||||
|
taskCategory: '全军院校训练规划内任务',
|
||||||
|
taskCategoryEnabled: false,
|
||||||
|
dept: '教务处',
|
||||||
|
deptEnabled: false,
|
||||||
|
teacher: '教务处',
|
||||||
|
teacherEnabled: false,
|
||||||
|
className: '',
|
||||||
|
classNameEnabled: false
|
||||||
|
},
|
||||||
|
|
||||||
|
teachMethodOptions: ['理论讲授', '实践教学', '研讨教学', '案例教学', '实操演练'],
|
||||||
|
changeOptions: [
|
||||||
|
'与教学计划一致',
|
||||||
|
'已改动教学计划',
|
||||||
|
'手动拟制',
|
||||||
|
'教员变动',
|
||||||
|
'时间变动',
|
||||||
|
'课程变动',
|
||||||
|
'授课方式变动',
|
||||||
|
'任务类别变动',
|
||||||
|
'期班变动',
|
||||||
|
'地点变动',
|
||||||
|
'课题变动'
|
||||||
|
],
|
||||||
|
taskCategoryOptions: ['全军院校训练规划内任务', '其他任务(含研究生导师指导)'],
|
||||||
|
deptOptions: ['教务处', '指挥系', '政治工作教研室', '军事基础教研室', '装备保障教研室'],
|
||||||
|
teacherOptions: ['教务处', '张三', '李四', '王五', '赵六', '孙七'],
|
||||||
|
|
||||||
|
// ==================== 数据表格 ====================
|
||||||
|
loading: false,
|
||||||
|
tableData: [],
|
||||||
|
selectedRows: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
total: 0,
|
||||||
|
|
||||||
|
// ==================== 退回意见 ====================
|
||||||
|
remark: '',
|
||||||
|
|
||||||
|
// ==================== 详情 ====================
|
||||||
|
detailVisible: false,
|
||||||
|
detailLoading: false,
|
||||||
|
detailData: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelectionChange(rows) {
|
||||||
|
this.selectedRows = rows
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 根据"勾选启用"模式构建实际查询参数 */
|
||||||
|
buildSearchParams() {
|
||||||
|
const form = this.searchForm
|
||||||
|
const params = { pageNum: this.pageNum, pageSize: this.pageSize }
|
||||||
|
if (form.startDateEnabled && form.startDate) params.ksrq = form.startDate
|
||||||
|
if (form.endDateEnabled && form.endDate) params.jsrq = form.endDate
|
||||||
|
if (form.courseNameEnabled && form.courseName) params.kcmc = form.courseName
|
||||||
|
if (form.teachMethodEnabled && form.teachMethod) params.jxff = form.teachMethod
|
||||||
|
if (form.changeEnabled && form.change) params.gdqk = form.change
|
||||||
|
if (form.taskCategoryEnabled && form.taskCategory) params.rwlb = form.taskCategory
|
||||||
|
if (form.deptEnabled && form.dept) params.jys = form.dept
|
||||||
|
if (form.teacherEnabled && form.teacher) params.skjy = form.teacher
|
||||||
|
if (form.classNameEnabled && form.className) params.pxqb = form.className
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
|
||||||
|
extractListData(res) {
|
||||||
|
const data = res.data || res
|
||||||
|
const list = data.records || data.list || data.rows || []
|
||||||
|
const totalCount = data.total ?? data.totalCount ?? data.totalRows ?? 0
|
||||||
|
return { list, total: totalCount }
|
||||||
|
},
|
||||||
|
|
||||||
|
fetchList() {
|
||||||
|
this.loading = true
|
||||||
|
return getReportedTeachingLogList(this.buildSearchParams())
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200 || res.code === 0) {
|
||||||
|
const { list, total } = this.extractListData(res)
|
||||||
|
this.tableData = list
|
||||||
|
this.total = total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSearch() {
|
||||||
|
this.pageNum = 1
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleReset() {
|
||||||
|
this.searchForm = {
|
||||||
|
startDate: '',
|
||||||
|
startDateEnabled: false,
|
||||||
|
endDate: '',
|
||||||
|
endDateEnabled: false,
|
||||||
|
courseName: '',
|
||||||
|
courseNameEnabled: false,
|
||||||
|
teachMethod: '理论讲授',
|
||||||
|
teachMethodEnabled: false,
|
||||||
|
change: '与教学计划一致',
|
||||||
|
changeEnabled: false,
|
||||||
|
taskCategory: '全军院校训练规划内任务',
|
||||||
|
taskCategoryEnabled: false,
|
||||||
|
dept: '教务处',
|
||||||
|
deptEnabled: false,
|
||||||
|
teacher: '教务处',
|
||||||
|
teacherEnabled: false,
|
||||||
|
className: '',
|
||||||
|
classNameEnabled: false
|
||||||
|
}
|
||||||
|
this.remark = ''
|
||||||
|
this.handleSearch()
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePageChange(page) {
|
||||||
|
this.pageNum = page
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSizeChange(size) {
|
||||||
|
this.pageSize = size
|
||||||
|
this.pageNum = 1
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
|
||||||
|
getSelectedBhs() {
|
||||||
|
const ids = this.selectedRows.map((row) => row.bh).filter(Boolean)
|
||||||
|
if (ids.length === 0) {
|
||||||
|
this.$message.warning('请先选择记录')
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return ids
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDelete() {
|
||||||
|
const ids = this.getSelectedBhs()
|
||||||
|
if (ids.length === 0) return
|
||||||
|
this.$confirm(`确定要删除选中的 ${ids.length} 条记录吗?`, '删除确认', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => deleteTeachingLog(ids))
|
||||||
|
.then(() => {
|
||||||
|
this.$message.success(`已删除 ${ids.length} 条记录`)
|
||||||
|
this.fetchList()
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleAudit() {
|
||||||
|
const ids = this.getSelectedBhs()
|
||||||
|
if (ids.length === 0) return
|
||||||
|
this.$confirm(`确定要审核通过选中的 ${ids.length} 条记录吗?`, '审核确认', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => batchAuditTeachingLog(ids))
|
||||||
|
.then(() => {
|
||||||
|
this.$message.success(`已审核通过 ${ids.length} 条记录`)
|
||||||
|
this.fetchList()
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleWithdraw() {
|
||||||
|
const ids = this.getSelectedBhs()
|
||||||
|
if (ids.length === 0) return
|
||||||
|
if (!this.remark.trim()) {
|
||||||
|
this.$message.warning('请填写退回原因/意见')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const opinion = this.remark.trim()
|
||||||
|
let settled = Promise.resolve()
|
||||||
|
ids.forEach((bh) => {
|
||||||
|
settled = settled.then(() => rejectTeachingLog(bh, opinion))
|
||||||
|
})
|
||||||
|
this.$confirm(`确定要撤回重填选中的 ${ids.length} 条记录吗?`, '撤回确认', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => settled)
|
||||||
|
.then(() => {
|
||||||
|
this.$message.success(`已撤回 ${ids.length} 条记录`)
|
||||||
|
this.fetchList()
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleRecheck() {
|
||||||
|
recheckTeachingLog()
|
||||||
|
.then(() => {
|
||||||
|
this.$message.success('重新检查变更情况完成')
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
downloadBlob(blob, fileName) {
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = fileName
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
|
window.URL.revokeObjectURL(url)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleExport() {
|
||||||
|
const params = this.buildSearchParams()
|
||||||
|
delete params.pageNum
|
||||||
|
delete params.pageSize
|
||||||
|
exportTeachingLog(params)
|
||||||
|
.then((blob) => {
|
||||||
|
this.downloadBlob(blob, `已上报教学日志_${new Date().toISOString().slice(0, 10)}.xls`)
|
||||||
|
this.$message.success('导出成功')
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDetail(row) {
|
||||||
|
this.detailData = { ...row }
|
||||||
|
this.detailVisible = true
|
||||||
|
const bh = row.bh
|
||||||
|
if (!bh) return
|
||||||
|
this.detailLoading = true
|
||||||
|
getTeachingLogByBh(String(bh))
|
||||||
|
.then((res) => {
|
||||||
|
if ((res.code === 200 || res.code === 0) && res.data) {
|
||||||
|
this.detailData = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
this.detailLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.page-container {
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-card {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
.w-full {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-row {
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-col {
|
||||||
|
border-right: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-form-item__label {
|
||||||
|
white-space: normal;
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: left;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-tip {
|
||||||
|
padding: 6px 12px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #f56c6c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 12px;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
.left-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.action-input {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-card {
|
||||||
|
.el-table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 16px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user