forked from liweijie/education
课表
This commit is contained in:
@@ -11,58 +11,28 @@
|
||||
<el-link type="primary" :underline="false" class="nav-link" @click="handleNextDay">后一天</el-link>
|
||||
</div>
|
||||
|
||||
<!-- 批量操作栏 -->
|
||||
<div class="toolbar-card">
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-left">
|
||||
<el-button type="primary" size="mini" :disabled="!todaySelected.length" @click="handleComing">批量设置备注信息</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!todaySelected.length" @click="handleComing">批量变更时间</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!todaySelected.length" @click="handleComing">批量平移时间</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!todaySelected.length" @click="handleComing">批量变更授课教员</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!todaySelected.length" @click="handleComing">批量变更授课场地</el-button>
|
||||
<el-button type="danger" size="mini" :disabled="!todaySelected.length" @click="handleComing">批量删除</el-button>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<el-button type="primary" size="mini" @click="handleComing">自定义格式下载</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleComing">下载</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 今日表格 -->
|
||||
<div class="table-card">
|
||||
<el-table :data="todayList" v-loading="loading" stripe border @selection-change="todaySelected = $event">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table :data="todayList" v-loading="todayLoading" stripe border>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column label="上课时间" width="130" align="center">
|
||||
<template slot-scope="scope">{{ formatTime(scope.row.jc) }}</template>
|
||||
<el-table-column label="上课时间" width="200" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ fmtLessonTime(scope.row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="kcmc" label="课程" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="zrdw" label="责任单位" width="110" align="center" />
|
||||
<el-table-column prop="bc" label="班次" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="skjy" label="教员" width="90" align="center" />
|
||||
<el-table-column label="场地" width="140" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jxcd || '-' }}</template>
|
||||
<el-table-column prop="kcmc" label="课程" min-width="150" show-overflow-tooltip header-align="center" />
|
||||
<el-table-column prop="kcxh" label="课次序号" width="90" align="center" />
|
||||
<el-table-column label="教学内容" min-width="180" show-overflow-tooltip header-align="center">
|
||||
<template slot-scope="scope">{{ scope.row.jxnr || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="教学内容方法" min-width="160" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row._jxnrff || '-' }}</template>
|
||||
<el-table-column label="教学方法" width="130" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jxff || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="jybz" label="备注" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jybz || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划变更明细" width="120" align="center">
|
||||
<el-table-column label="填写状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="openDetail(scope.row)">变更明细</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="openRemark(scope.row)">编辑备注</el-button>
|
||||
<el-button type="text" size="mini" class="danger-text" @click="handleComing">删除</el-button>
|
||||
<el-tag :type="txztType(scope.row.txzt)" size="mini">{{ txztText(scope.row.txzt) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-show="!loading && !todayList.length" description="当日暂无教学计划数据" />
|
||||
<el-empty v-show="!todayLoading && !todayList.length" description="当日暂无教学计划数据" />
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -77,58 +47,28 @@
|
||||
<el-link type="primary" :underline="false" class="nav-link" @click="handleNextWeek">下一周</el-link>
|
||||
</div>
|
||||
|
||||
<!-- 批量操作栏 -->
|
||||
<div class="toolbar-card">
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-left">
|
||||
<el-button type="primary" size="mini" :disabled="!weekSelected.length" @click="handleComing">批量设置备注信息</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!weekSelected.length" @click="handleComing">批量变更时间</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!weekSelected.length" @click="handleComing">批量平移时间</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!weekSelected.length" @click="handleComing">批量变更授课教员</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!weekSelected.length" @click="handleComing">批量变更授课场地</el-button>
|
||||
<el-button type="danger" size="mini" :disabled="!weekSelected.length" @click="handleComing">批量删除</el-button>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<el-button type="primary" size="mini" @click="handleComing">报批下载</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleComing">下载</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 本周表格 -->
|
||||
<div class="table-card">
|
||||
<el-table :data="weekList" v-loading="loading" stripe border @selection-change="weekSelected = $event">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table :data="weekList" v-loading="weekLoading" stripe border>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column label="上课时间" width="170" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row._sjsj || '-' }}</template>
|
||||
<el-table-column label="上课时间" width="200" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ fmtLessonTime(scope.row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="kcmc" label="课程" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="zrdw" label="责任单位" width="100" align="center" />
|
||||
<el-table-column prop="bc" label="班次" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="skjy" label="教员" width="90" align="center" />
|
||||
<el-table-column label="场地" width="140" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jxcd || '-' }}</template>
|
||||
<el-table-column prop="kcmc" label="课程" min-width="150" show-overflow-tooltip header-align="center" />
|
||||
<el-table-column prop="kcxh" label="课次序号" width="90" align="center" />
|
||||
<el-table-column label="教学内容" min-width="180" show-overflow-tooltip header-align="center">
|
||||
<template slot-scope="scope">{{ scope.row.jxnr || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="教学内容方法" min-width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row._jxnrff || '-' }}</template>
|
||||
<el-table-column label="教学方法" width="130" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jxff || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="jybz" label="备注" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jybz || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划变更明细" width="120" align="center">
|
||||
<el-table-column label="填写状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="openDetail(scope.row)">计划变更明细</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="openRemark(scope.row)">编辑备注</el-button>
|
||||
<el-button type="text" size="mini" class="danger-text" @click="handleComing">删除</el-button>
|
||||
<el-tag :type="txztType(scope.row.txzt)" size="mini">{{ txztText(scope.row.txzt) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-show="!loading && !weekList.length" description="本周暂无教学计划数据" />
|
||||
<el-empty v-show="!weekLoading && !weekList.length" description="本周暂无教学计划数据" />
|
||||
<pagination
|
||||
v-show="weekTotal > 0"
|
||||
:total="weekTotal"
|
||||
@@ -150,58 +90,36 @@
|
||||
<el-link type="primary" :underline="false" class="nav-link" @click="handleNextWeek3">下一周</el-link>
|
||||
</div>
|
||||
|
||||
<!-- 批量操作栏 -->
|
||||
<div class="toolbar-card">
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-left">
|
||||
<el-button type="primary" size="mini" :disabled="!practiceSelected.length" @click="handleComing">批量设置备注信息</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!practiceSelected.length" @click="handleComing">批量变更时间</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!practiceSelected.length" @click="handleComing">批量平移时间</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!practiceSelected.length" @click="handleComing">批量变更授课教员</el-button>
|
||||
<el-button type="primary" size="mini" :disabled="!practiceSelected.length" @click="handleComing">批量变更授课场地</el-button>
|
||||
<el-button type="danger" size="mini" :disabled="!practiceSelected.length" @click="handleComing">批量删除</el-button>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<el-button type="primary" size="mini" @click="handleComing">报批下载</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleComing">下载</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-alert
|
||||
class="mb8"
|
||||
type="info"
|
||||
:closable="false"
|
||||
show-icon
|
||||
title="说明:后端教学实施计划课次接口未返回课程类型字段,无法按三实课类型筛选,当前展示本周全部教学实施计划课次。"
|
||||
/>
|
||||
|
||||
<!-- 三实表格 -->
|
||||
<div class="table-card">
|
||||
<el-table :data="practiceList" v-loading="loading" stripe border @selection-change="practiceSelected = $event">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table :data="practiceList" v-loading="practiceLoading" stripe border>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column label="上课时间" width="170" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row._sjsj || '-' }}</template>
|
||||
<el-table-column label="上课时间" width="200" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ fmtLessonTime(scope.row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="kcmc" label="课程" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="zrdw" label="责任单位" width="100" align="center" />
|
||||
<el-table-column prop="bc" label="班次" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="skjy" label="教员" width="90" align="center" />
|
||||
<el-table-column label="场地" width="140" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jxcd || '-' }}</template>
|
||||
<el-table-column prop="kcmc" label="课程" min-width="150" show-overflow-tooltip header-align="center" />
|
||||
<el-table-column prop="kcxh" label="课次序号" width="90" align="center" />
|
||||
<el-table-column label="教学内容" min-width="180" show-overflow-tooltip header-align="center">
|
||||
<template slot-scope="scope">{{ scope.row.jxnr || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="教学内容方法" min-width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row._jxnrff || '-' }}</template>
|
||||
<el-table-column label="教学方法" width="130" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jxff || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="jybz" label="备注" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.jybz || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划变更明细" width="120" align="center">
|
||||
<el-table-column label="填写状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="openDetail(scope.row)">计划变更明细</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="openRemark(scope.row)">编辑备注</el-button>
|
||||
<el-button type="text" size="mini" class="danger-text" @click="handleComing">删除</el-button>
|
||||
<el-tag :type="txztType(scope.row.txzt)" size="mini">{{ txztText(scope.row.txzt) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-show="!loading && !practiceList.length" description="本周暂无三实教学计划数据" />
|
||||
<el-empty v-show="!practiceLoading && !practiceList.length" description="本周暂无三实教学计划数据" />
|
||||
<pagination
|
||||
v-show="practiceTotal > 0"
|
||||
:total="practiceTotal"
|
||||
@@ -219,122 +137,114 @@
|
||||
<!-- 查询条件 -->
|
||||
<el-form :inline="true" class="shift-search">
|
||||
<el-form-item label="队别班次">
|
||||
<el-select v-model="shiftTeamClass" placeholder="请选择队别班次" clearable class="shift-select">
|
||||
<el-option label="一班" value="一班" />
|
||||
<el-option label="二班" value="二班" />
|
||||
<el-option label="三班" value="三班" />
|
||||
<el-option label="四班" value="四班" />
|
||||
<el-select
|
||||
v-model="shiftXydbh"
|
||||
placeholder="请选择队别班次"
|
||||
clearable
|
||||
filterable
|
||||
class="shift-select"
|
||||
>
|
||||
<el-option v-for="t in teamOptions" :key="t.xydbh" :label="t.xydmc" :value="t.xydbh" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="年度">
|
||||
<el-select v-model="shiftNd" placeholder="请选择年度" class="shift-select">
|
||||
<el-option v-for="y in yearOptions" :key="y" :label="y" :value="y" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleComing">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleShiftSearch">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 标题 -->
|
||||
<div class="shift-title">2026年秋季学期{{ shiftTeamClass || '' }}课程表</div>
|
||||
<div class="shift-title">{{ shiftTitle }}</div>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleComing">学期教学实施计划</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleNotProvided">学期教学实施计划</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleComing">学期课程表(周次星期)</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleNotProvided">学期课程表(周次星期)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleComing">学期课程表(班次视图)</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleNotProvided">学期课程表(班次视图)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleComing">学期课程表(排课周)含选修</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleNotProvided">学期课程表(排课周)含选修</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleComing">学期教学实施计划(含选修)</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleNotProvided">学期教学实施计划(含选修)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleComing">学期课程表(周次星期)详细</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleNotProvided">学期课程表(周次星期)详细</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleComing">学期成绩表</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleNotProvided">学期成绩表</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-download" size="mini" @click="handleComing">课程列表另存Excel</el-button>
|
||||
<el-button type="success" plain icon="el-icon-download" size="mini" @click="handleNotProvided">课程列表另存Excel</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 班次课程表 -->
|
||||
<el-table v-loading="loading" :data="shiftList" border stripe>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column label="课程名称/课时系数" min-width="220">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.kcmc }}</div>
|
||||
<div class="sub-text">{{ scope.row.kssk }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="zrjs" label="责任教员/课次" min-width="150" />
|
||||
<el-table-column prop="bc" label="班次" min-width="120" />
|
||||
<el-table-column prop="nj" label="年级" width="80" align="center" />
|
||||
<el-table-column prop="zy" label="专业" min-width="120" />
|
||||
<el-table-column prop="jhxs" label="计划学时" width="90" align="center" />
|
||||
<el-table-column prop="yxxs" label="运行学时" width="90" align="center" />
|
||||
<el-table-column prop="khlxfs" label="考核类型方式" min-width="140" />
|
||||
<el-table-column prop="ssjs" label="实施教员" min-width="120" />
|
||||
<el-table-column prop="rscd" label="人数/场地" min-width="140" />
|
||||
<el-table-column prop="kcjd" label="课程进度" width="120" align="center" />
|
||||
<el-table-column prop="ssjhbg" label="实施计划变更" min-width="120" align="center" />
|
||||
</el-table>
|
||||
<div class="table-card">
|
||||
<el-table v-loading="shiftLoading" :data="shiftList" border stripe>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column label="课程名称/简称" min-width="200" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row._kcmc || '-' }}</div>
|
||||
<div class="sub-text">{{ scope.row.jc || '-' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="责任教员/课次" width="160" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row._zrjy || '-' }}</div>
|
||||
<div class="sub-text">第{{ scope.row.kcxh || '-' }}次课</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="xydmc" label="班次" width="130" show-overflow-tooltip header-align="center" />
|
||||
<el-table-column prop="xs" label="计划学时" width="90" align="center" />
|
||||
<el-table-column prop="llxs" label="理论学时" width="90" align="center" />
|
||||
<el-table-column prop="sjxs" label="实践学时" width="90" align="center" />
|
||||
<el-table-column prop="cjfz" label="考核类型方式" min-width="110" show-overflow-tooltip header-align="center" />
|
||||
<el-table-column label="实施教员" width="110" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row._ssjy || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人数/场地" width="130" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.rs || '-' }} 人</div>
|
||||
<div class="sub-text">{{ scope.row.jsbh || '-' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="xf" label="学分" width="80" align="center" />
|
||||
<el-table-column label="实施计划变更" width="150" header-align="center">
|
||||
<template slot-scope="scope">{{ fmtKbbdsj(scope.row.kbbdsj) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-show="!shiftLoading && !shiftList.length" description="该班次暂无课程数据" />
|
||||
<pagination
|
||||
v-show="shiftTotal > 0"
|
||||
:total="shiftTotal"
|
||||
:page.sync="shiftQuery.pageNum"
|
||||
:limit.sync="shiftQuery.pageSize"
|
||||
@pagination="getShiftList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<!-- 编辑备注弹窗 -->
|
||||
<el-dialog title="编辑备注" :visible.sync="remarkVisible" width="500px" append-to-body>
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="课程">
|
||||
<span>{{ remarkTarget.kcmc || '-' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注内容">
|
||||
<el-input v-model="remarkText" type="textarea" :rows="4" placeholder="请输入备注内容" maxlength="500" show-word-limit />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmRemark">确定</el-button>
|
||||
<el-button @click="remarkVisible = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 计划变更明细弹窗 -->
|
||||
<el-dialog title="计划变更明细" :visible.sync="detailVisible" width="560px" append-to-body>
|
||||
<el-descriptions :column="2" border size="small" v-if="detailTarget">
|
||||
<el-descriptions-item label="课程">{{ detailTarget.kcmc }}</el-descriptions-item>
|
||||
<el-descriptions-item label="班次">{{ detailTarget.bc }}</el-descriptions-item>
|
||||
<el-descriptions-item label="责任单位">{{ detailTarget.zrdw }}</el-descriptions-item>
|
||||
<el-descriptions-item label="上课时间">{{ detailTarget._sjsj || formatTime(detailTarget.jc) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="原节次">{{ detailTarget.yjc || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="授课教员">{{ detailTarget.skjy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教学场地">{{ detailTarget.jxcd || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="检查结果">{{ detailTarget.jcjg || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="已通过检查" :span="2">
|
||||
<el-tag :type="detailTarget.ytgjc ? 'success' : 'info'" size="mini">{{ detailTarget.ytgjc ? '是' : '否' }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 节次 -> 时间映射
|
||||
const JC_TIME = {
|
||||
1: '08:00-08:45',
|
||||
2: '08:55-09:40',
|
||||
3: '10:00-10:45',
|
||||
4: '10:55-11:40',
|
||||
5: '14:30-15:15',
|
||||
6: '15:25-16:10',
|
||||
7: '16:20-17:05',
|
||||
8: '19:00-19:45',
|
||||
9: '19:55-20:40'
|
||||
}
|
||||
import { listTeachingPlan } from '@/api/teachBusiness/courseRunning'
|
||||
import { listStudentTeamTask } from '@/api/teachBusiness/studentTeamTask'
|
||||
import { listTeam } from '@/api/studentRecords/team'
|
||||
import { listKb } from '@/api/teachOffice/kb'
|
||||
import { listTeacher } from '@/api/teachOffice/teacher'
|
||||
|
||||
// 节次 -> 节次区间映射
|
||||
const JC_SECTION = {
|
||||
1: '1-2节', 2: '3-4节', 3: '5-6节', 4: '7-8节', 5: '9-10节', 6: '11-12节'
|
||||
@@ -360,34 +270,37 @@ function getMonday(d) {
|
||||
export default {
|
||||
name: 'Timetable',
|
||||
data() {
|
||||
const currentYear = new Date().getFullYear()
|
||||
return {
|
||||
activeTab: 'today',
|
||||
loading: false,
|
||||
// 今日
|
||||
todayDate: new Date(),
|
||||
todayList: [],
|
||||
todaySelected: [],
|
||||
todayLoading: false,
|
||||
// 本周
|
||||
weekStart: getMonday(new Date()),
|
||||
weekList: [],
|
||||
weekSelected: [],
|
||||
weekLoading: false,
|
||||
weekTotal: 0,
|
||||
weekQuery: { pageNum: 1, pageSize: 20 },
|
||||
// 三实
|
||||
practiceStart: getMonday(new Date()),
|
||||
practiceList: [],
|
||||
practiceSelected: [],
|
||||
practiceLoading: false,
|
||||
practiceTotal: 0,
|
||||
practiceQuery: { pageNum: 1, pageSize: 20 },
|
||||
// 班次(仅占位数据,待对接接口)
|
||||
shiftTeamClass: '',
|
||||
// 班次
|
||||
teamOptions: [],
|
||||
shiftXydbh: '',
|
||||
shiftNd: currentYear,
|
||||
shiftList: [],
|
||||
// 弹窗
|
||||
remarkVisible: false,
|
||||
remarkTarget: {},
|
||||
remarkText: '',
|
||||
detailVisible: false,
|
||||
detailTarget: null
|
||||
shiftLoading: false,
|
||||
shiftTotal: 0,
|
||||
shiftQuery: { pageNum: 1, pageSize: 20 },
|
||||
yearOptions: [currentYear - 1, currentYear, currentYear + 1],
|
||||
// 名称映射(真实接口数据,用于班次 tab 课程/教员编号转名称)
|
||||
kbMap: {},
|
||||
teacherMap: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -405,32 +318,52 @@ export default {
|
||||
end.setDate(end.getDate() + 6)
|
||||
return formatDate(this.practiceStart) + '(' + this.weekDayName(this.practiceStart) + ') 至 ' +
|
||||
formatDate(end) + '(' + this.weekDayName(end) + ') 三实教学实施计划'
|
||||
},
|
||||
shiftTitle() {
|
||||
const team = this.teamOptions.find(t => t.xydbh === this.shiftXydbh)
|
||||
const name = (team && team.xydmc) || ''
|
||||
return this.shiftNd + '年' + name + '课程表'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTodayList()
|
||||
this.getWeekList()
|
||||
this.getPracticeList()
|
||||
this.loadTeamOptions()
|
||||
this.loadKbMap()
|
||||
this.loadTeacherMap()
|
||||
},
|
||||
methods: {
|
||||
weekDayName(d) {
|
||||
return WEEK_DAY_NAMES[d.getDay()]
|
||||
},
|
||||
formatTime(jc) {
|
||||
if (!jc) return '-'
|
||||
return JC_TIME[jc] || ('第' + jc + '节')
|
||||
},
|
||||
formatSection(jc) {
|
||||
if (!jc) return ''
|
||||
if (jc === null || jc === undefined || jc === '') return '第?节'
|
||||
return JC_SECTION[jc] || ('第' + jc + '节')
|
||||
},
|
||||
buildSjsj(rq, jc) {
|
||||
const date = (rq || '').substring(0, 10)
|
||||
/** 后端 LocalDateTime -> 日期+周X+节次区间 */
|
||||
fmtLessonTime(row) {
|
||||
const rq = row.rq || ''
|
||||
const date = String(rq).substring(0, 10)
|
||||
if (!date) return '-'
|
||||
const d = new Date(date.replace(/-/g, '/'))
|
||||
const wn = WEEK_DAY_NAMES[d.getDay()]
|
||||
const section = this.formatSection(jc)
|
||||
return (date + ' 周' + wn + ' ' + section).trim()
|
||||
return (date + ' 周' + wn + ' ' + this.formatSection(row.jc)).trim()
|
||||
},
|
||||
/** 后端 LocalDateTime -> yyyy-MM-dd HH:mm */
|
||||
fmtKbbdsj(v) {
|
||||
if (!v) return '-'
|
||||
return String(v).replace('T', ' ').substring(0, 16)
|
||||
},
|
||||
txztText(txzt) {
|
||||
if (txzt === 1) return '已填写'
|
||||
if (txzt === 2) return '已提交'
|
||||
return '未填写'
|
||||
},
|
||||
txztType(txzt) {
|
||||
if (txzt === 1) return 'success'
|
||||
if (txzt === 2) return 'primary'
|
||||
return 'info'
|
||||
},
|
||||
/* ---------- 今日 ---------- */
|
||||
handlePrevDay() {
|
||||
@@ -446,115 +379,178 @@ export default {
|
||||
this.getTodayList()
|
||||
},
|
||||
getTodayList() {
|
||||
this.loading = true
|
||||
setTimeout(() => {
|
||||
this.todayList = this.buildMockList(this.todayDate)
|
||||
this.loading = false
|
||||
}, 200)
|
||||
const day = formatDate(this.todayDate)
|
||||
const params = {
|
||||
rqStart: day + 'T00:00:00',
|
||||
rqEnd: day + 'T23:59:59',
|
||||
pageNum: 1,
|
||||
pageSize: 200
|
||||
}
|
||||
this.todayLoading = true
|
||||
listTeachingPlan(params).then(response => {
|
||||
const data = response.data || {}
|
||||
this.todayList = data.records || []
|
||||
this.todayLoading = false
|
||||
}).catch(() => {
|
||||
this.todayList = []
|
||||
this.todayLoading = false
|
||||
})
|
||||
},
|
||||
/* ---------- 本周 ---------- */
|
||||
handlePrevWeek() {
|
||||
const d = new Date(this.weekStart)
|
||||
d.setDate(d.getDate() - 7)
|
||||
this.weekStart = d
|
||||
this.weekQuery.pageNum = 1
|
||||
this.getWeekList()
|
||||
},
|
||||
handleNextWeek() {
|
||||
const d = new Date(this.weekStart)
|
||||
d.setDate(d.getDate() + 7)
|
||||
this.weekStart = d
|
||||
this.weekQuery.pageNum = 1
|
||||
this.getWeekList()
|
||||
},
|
||||
weekRange() {
|
||||
const start = formatDate(this.weekStart) + 'T00:00:00'
|
||||
const endDate = new Date(this.weekStart)
|
||||
endDate.setDate(endDate.getDate() + 6)
|
||||
const end = formatDate(endDate) + 'T23:59:59'
|
||||
return { start: start, end: end }
|
||||
},
|
||||
getWeekList() {
|
||||
this.loading = true
|
||||
setTimeout(() => {
|
||||
this.weekList = this.buildMockWeekList(this.weekStart)
|
||||
this.weekTotal = this.weekList.length
|
||||
this.loading = false
|
||||
}, 200)
|
||||
const range = this.weekRange()
|
||||
const params = {
|
||||
rqStart: range.start,
|
||||
rqEnd: range.end,
|
||||
pageNum: this.weekQuery.pageNum,
|
||||
pageSize: this.weekQuery.pageSize
|
||||
}
|
||||
this.weekLoading = true
|
||||
listTeachingPlan(params).then(response => {
|
||||
const data = response.data || {}
|
||||
this.weekList = data.records || []
|
||||
this.weekTotal = data.total || 0
|
||||
this.weekLoading = false
|
||||
}).catch(() => {
|
||||
this.weekList = []
|
||||
this.weekTotal = 0
|
||||
this.weekLoading = false
|
||||
})
|
||||
},
|
||||
/* ---------- 三实 ---------- */
|
||||
handlePrevWeek3() {
|
||||
const d = new Date(this.practiceStart)
|
||||
d.setDate(d.getDate() - 7)
|
||||
this.practiceStart = d
|
||||
this.practiceQuery.pageNum = 1
|
||||
this.getPracticeList()
|
||||
},
|
||||
handleNextWeek3() {
|
||||
const d = new Date(this.practiceStart)
|
||||
d.setDate(d.getDate() + 7)
|
||||
this.practiceStart = d
|
||||
this.practiceQuery.pageNum = 1
|
||||
this.getPracticeList()
|
||||
},
|
||||
practiceRange() {
|
||||
const start = formatDate(this.practiceStart) + 'T00:00:00'
|
||||
const endDate = new Date(this.practiceStart)
|
||||
endDate.setDate(endDate.getDate() + 6)
|
||||
const end = formatDate(endDate) + 'T23:59:59'
|
||||
return { start: start, end: end }
|
||||
},
|
||||
getPracticeList() {
|
||||
this.loading = true
|
||||
setTimeout(() => {
|
||||
this.practiceList = this.buildMockWeekList(this.practiceStart)
|
||||
this.practiceTotal = this.practiceList.length
|
||||
this.loading = false
|
||||
}, 200)
|
||||
},
|
||||
/* ---------- 静态示例数据(待对接接口) ---------- */
|
||||
buildMockList(date) {
|
||||
const dateStr = formatDate(date)
|
||||
const samples = [
|
||||
{ jc: 1, kcmc: '高等数学', zrdw: '基础部', bc: '一班', skjy: '张教员', jxcd: '1号教学楼-101', jxnr: '函数与极限', jxff: '讲授', jybz: '携带教材' },
|
||||
{ jc: 3, kcmc: '大学英语', zrdw: '基础部', bc: '二班', skjy: '李教员', jxcd: '2号教学楼-205', jxnr: 'Unit 3 课文精读', jxff: '讲授/讨论', jybz: '' },
|
||||
{ jc: 5, kcmc: '计算机基础', zrdw: '信息工程系', bc: '三班', skjy: '王教员', jxcd: '实验楼-303', jxnr: 'Word 文档排版', jxff: '实操', jybz: '机房上课' }
|
||||
]
|
||||
return samples.map((item, index) => ({
|
||||
...item,
|
||||
xh: index + 1,
|
||||
rq: dateStr,
|
||||
_jxnrff: [item.jxnr, item.jxff].filter(Boolean).join(' / ')
|
||||
}))
|
||||
},
|
||||
buildMockWeekList(weekStart) {
|
||||
const list = []
|
||||
const dates = []
|
||||
for (let i = 0; i < 7; i++) {
|
||||
const d = new Date(weekStart)
|
||||
d.setDate(d.getDate() + i)
|
||||
dates.push(formatDate(d))
|
||||
// 后端 plan/list 接口未返回课程类型字段,无法按三实课筛选,与本周共用同一数据源
|
||||
const range = this.practiceRange()
|
||||
const params = {
|
||||
rqStart: range.start,
|
||||
rqEnd: range.end,
|
||||
pageNum: this.practiceQuery.pageNum,
|
||||
pageSize: this.practiceQuery.pageSize
|
||||
}
|
||||
const courses = [
|
||||
{ jc: 1, kcmc: '高等数学', zrdw: '基础部', bc: '一班', skjy: '张教员', jxcd: '1号教学楼-101', jxnr: '函数与极限', jxff: '讲授', jybz: '携带教材' },
|
||||
{ jc: 2, kcmc: '大学英语', zrdw: '基础部', bc: '二班', skjy: '李教员', jxcd: '2号教学楼-205', jxnr: 'Unit 3 课文精读', jxff: '讲授/讨论', jybz: '' },
|
||||
{ jc: 3, kcmc: '计算机基础', zrdw: '信息工程系', bc: '三班', skjy: '王教员', jxcd: '实验楼-303', jxnr: 'Word 文档排版', jxff: '实操', jybz: '机房上课' },
|
||||
{ jc: 4, kcmc: '军事理论', zrdw: '政工系', bc: '一班', skjy: '赵教员', jxcd: '3号教学楼-110', jxnr: '国防动员概述', jxff: '讲授', jybz: '' }
|
||||
]
|
||||
dates.forEach((dateStr, i) => {
|
||||
courses.forEach((item, idx) => {
|
||||
// 隔天轮换部分课程,保证每周有内容且不重复
|
||||
if ((i + idx) % 2 === 0) {
|
||||
list.push({
|
||||
...item,
|
||||
xh: list.length + 1,
|
||||
rq: dateStr,
|
||||
_sjsj: this.buildSjsj(dateStr, item.jc),
|
||||
_jxnrff: [item.jxnr, item.jxff].filter(Boolean).join(' / ')
|
||||
})
|
||||
}
|
||||
})
|
||||
this.practiceLoading = true
|
||||
listTeachingPlan(params).then(response => {
|
||||
const data = response.data || {}
|
||||
this.practiceList = data.records || []
|
||||
this.practiceTotal = data.total || 0
|
||||
this.practiceLoading = false
|
||||
}).catch(() => {
|
||||
this.practiceList = []
|
||||
this.practiceTotal = 0
|
||||
this.practiceLoading = false
|
||||
})
|
||||
return list
|
||||
},
|
||||
/* ---------- 弹窗 ---------- */
|
||||
openRemark(row) {
|
||||
this.remarkTarget = row
|
||||
this.remarkText = row.jybz || ''
|
||||
this.remarkVisible = true
|
||||
/* ---------- 班次 ---------- */
|
||||
loadTeamOptions() {
|
||||
listTeam({ pageNum: 1, pageSize: 1000 }).then(response => {
|
||||
const data = response.data || {}
|
||||
this.teamOptions = data.records || []
|
||||
}).catch(() => {
|
||||
this.teamOptions = []
|
||||
})
|
||||
},
|
||||
confirmRemark() {
|
||||
this.$message.success('备注已更新')
|
||||
this.remarkVisible = false
|
||||
loadKbMap() {
|
||||
listKb({ pageNum: 1, pageSize: 1000 }).then(response => {
|
||||
const data = response.data || {}
|
||||
const map = {}
|
||||
;(data.records || []).forEach(item => {
|
||||
if (item.kbh) map[item.kbh] = item.kmc
|
||||
})
|
||||
this.kbMap = map
|
||||
}).catch(() => {
|
||||
this.kbMap = {}
|
||||
})
|
||||
},
|
||||
openDetail(row) {
|
||||
this.detailTarget = row
|
||||
this.detailVisible = true
|
||||
loadTeacherMap() {
|
||||
listTeacher({ pageNum: 1, pageSize: 1000 }).then(response => {
|
||||
const data = response.data || {}
|
||||
const map = {}
|
||||
;(data.records || []).forEach(item => {
|
||||
if (item.jybh) map[item.jybh] = item.jyxm
|
||||
})
|
||||
this.teacherMap = map
|
||||
}).catch(() => {
|
||||
this.teacherMap = {}
|
||||
})
|
||||
},
|
||||
handleComing() {
|
||||
this.$message.info('功能建设中,敬请期待')
|
||||
handleShiftSearch() {
|
||||
if (!this.shiftXydbh) {
|
||||
this.$message.warning('请先选择队别班次')
|
||||
return
|
||||
}
|
||||
this.shiftQuery.pageNum = 1
|
||||
this.getShiftList()
|
||||
},
|
||||
getShiftList() {
|
||||
const params = {
|
||||
xydbh: this.shiftXydbh,
|
||||
nd: this.shiftNd,
|
||||
pageNum: this.shiftQuery.pageNum,
|
||||
pageSize: this.shiftQuery.pageSize
|
||||
}
|
||||
this.shiftLoading = true
|
||||
listStudentTeamTask(params).then(response => {
|
||||
const data = response.data || {}
|
||||
const team = this.teamOptions.find(t => t.xydbh === this.shiftXydbh)
|
||||
this.shiftList = (data.records || []).map(item => ({
|
||||
...item,
|
||||
xydmc: (team && team.xydmc) || item.xydbh,
|
||||
_kcmc: this.kbMap[item.kbh] || item.kbh,
|
||||
_zrjy: this.teacherMap[item.jysjhjybh] || item.jysjhjybh || '-',
|
||||
_ssjy: this.teacherMap[item.jybh] || item.jybh || '-'
|
||||
}))
|
||||
this.shiftTotal = data.total || 0
|
||||
this.shiftLoading = false
|
||||
}).catch(() => {
|
||||
this.shiftList = []
|
||||
this.shiftTotal = 0
|
||||
this.shiftLoading = false
|
||||
})
|
||||
},
|
||||
/* ---------- 无后端接口的操作 ---------- */
|
||||
handleNotProvided() {
|
||||
this.$message.info('后端暂未提供该接口')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -573,6 +569,10 @@ export default {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.mb8 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* 日期/周次导航 */
|
||||
.nav-header {
|
||||
display: flex;
|
||||
@@ -596,31 +596,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
/* 批量操作栏 */
|
||||
.toolbar-card {
|
||||
margin-bottom: 12px;
|
||||
padding: 10px 14px;
|
||||
background: #fff;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
|
||||
.toolbar-left,
|
||||
.toolbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 表格区 */
|
||||
.table-card {
|
||||
.danger-text {
|
||||
|
||||
Reference in New Issue
Block a user