forked from liweijie/education
教学配当界面无法打开的问题修复
This commit is contained in:
@@ -407,7 +407,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
isMonthStart(w) {
|
isMonthStart(w) {
|
||||||
return w.startDate.getDate() <= 7
|
const d = new Date(String(w.startDate).replace(/-/g, '/'))
|
||||||
|
return !isNaN(d) && d.getDate() <= 7
|
||||||
},
|
},
|
||||||
shortDate(dateStr) {
|
shortDate(dateStr) {
|
||||||
return dateStr ? String(dateStr).slice(5) : ''
|
return dateStr ? String(dateStr).slice(5) : ''
|
||||||
|
|||||||
@@ -51,19 +51,19 @@
|
|||||||
<div class="list-actions">
|
<div class="list-actions">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleBatchAdd">批量创建班次学期</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="handleBatchAdd">批量创建班次学期</el-button>
|
||||||
<el-button type="primary" plain icon="el-icon-document-add" @click="handleAdd">新增</el-button>
|
<el-button type="primary" plain icon="el-icon-document-add" @click="handleAdd">新增</el-button>
|
||||||
<el-button type="primary" plain icon="el-icon-edit" :disabled="!currentRow" @click="handleEdit()">编辑</el-button>
|
<el-button type="primary" plain icon="el-icon-edit" :disabled="selection.length !== 1" @click="handleEdit()">编辑</el-button>
|
||||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="!selection.length" @click="handleDelete">删除所选</el-button>
|
<el-button type="danger" plain icon="el-icon-delete" :disabled="!selection.length" @click="handleDelete">删除所选</el-button>
|
||||||
<el-button type="primary" plain icon="el-icon-date" :disabled="!selection.length" @click="handleQuickSetDates">快速设定学期日期</el-button>
|
<el-button type="primary" plain icon="el-icon-date" :disabled="!selection.length" @click="handleQuickSetDates">快速设定学期日期</el-button>
|
||||||
<el-button type="primary" plain icon="el-icon-download" :disabled="!currentRow" @click="handleAbsorbDates">吸取预设日期</el-button>
|
<el-button type="primary" plain icon="el-icon-download" :disabled="selection.length !== 1" @click="handleAbsorbDates">吸取预设日期</el-button>
|
||||||
<el-button type="primary" plain icon="el-icon-notebook-2" :disabled="!selection.length" @click="handleSetJxrw">批量设置教学任务</el-button>
|
<el-button type="primary" plain icon="el-icon-notebook-2" :disabled="!selection.length" @click="handleSetJxrw">批量设置教学任务</el-button>
|
||||||
<el-button type="primary" plain :disabled="!selection.length" @click="handleSetXqdc">批量学期第次</el-button>
|
<el-button type="primary" plain :disabled="!selection.length" @click="handleSetXqdc">批量学期第次</el-button>
|
||||||
<el-button type="primary" plain :disabled="!selection.length" @click="handleSetKfjypk">开放教员排课</el-button>
|
<el-button type="primary" plain :disabled="!selection.length" @click="handleSetKfjypk">开放教员排课</el-button>
|
||||||
<el-button type="warning" plain :disabled="selection.length < 2" @click="handleWaveMerge">预设合班</el-button>
|
<el-button type="warning" plain :disabled="selection.length < 2" @click="handleWaveMerge">预设合班</el-button>
|
||||||
<el-button type="warning" plain :disabled="!selection.length" @click="handleWaveSplit">预设拆班</el-button>
|
<el-button type="warning" plain :disabled="!selection.length" @click="handleWaveSplit">预设拆班</el-button>
|
||||||
<el-button type="primary" plain :disabled="!selection.length" @click="handleBatchGenerateTasks">批量生成必修课程</el-button>
|
<el-button type="primary" plain :disabled="!selection.length" @click="handleBatchGenerateTasks">批量生成必修课程</el-button>
|
||||||
<el-button type="success" plain icon="el-icon-date" :disabled="!currentRow" @click="handleEditEventCalendar()">编辑班历</el-button>
|
<el-button type="success" plain icon="el-icon-date" :disabled="selection.length !== 1" @click="handleEditEventCalendar()">编辑班历</el-button>
|
||||||
<el-button type="success" plain icon="el-icon-calendar" :disabled="!currentRow" @click="handleEditCalendar()">编辑班次教学任务</el-button>
|
<el-button type="success" plain icon="el-icon-calendar" :disabled="selection.length !== 1" @click="handleEditCalendar()">编辑班次教学任务</el-button>
|
||||||
<el-button type="success" plain icon="el-icon-data-line" :disabled="!currentRow" @click="handleAllocation()">教学配当</el-button>
|
<el-button type="success" plain icon="el-icon-data-line" :disabled="selection.length !== 1" @click="handleAllocation()">教学配当</el-button>
|
||||||
<el-button type="success" plain icon="el-icon-download" :disabled="!selection.length" @click="handleExportAllocation">导出配当</el-button>
|
<el-button type="success" plain icon="el-icon-download" :disabled="!selection.length" @click="handleExportAllocation">导出配当</el-button>
|
||||||
<el-button type="primary" plain icon="el-icon-upload2" :disabled="!selection.length" @click="handlePublishRunning">发布运行课表</el-button>
|
<el-button type="primary" plain icon="el-icon-upload2" :disabled="!selection.length" @click="handlePublishRunning">发布运行课表</el-button>
|
||||||
<el-button type="danger" plain icon="el-icon-delete-solid" :disabled="!selection.length" @click="handleWithdrawRunning">删除运行课表</el-button>
|
<el-button type="danger" plain icon="el-icon-delete-solid" :disabled="!selection.length" @click="handleWithdrawRunning">删除运行课表</el-button>
|
||||||
@@ -81,7 +81,6 @@
|
|||||||
class="class-table"
|
class="class-table"
|
||||||
:row-class-name="waveRowClass"
|
:row-class-name="waveRowClass"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
>
|
>
|
||||||
<template slot="empty">
|
<template slot="empty">
|
||||||
<span>无数据!</span>
|
<span>无数据!</span>
|
||||||
@@ -207,7 +206,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button size="small" @click="loadBatchPreset">按学校学期带出日期</el-button>
|
<el-button size="small" @click="loadBatchPreset">按学校学期带出日期</el-button>
|
||||||
<el-button size="small" :disabled="!currentRow" @click="absorbIntoBatch">吸取选中班次日期</el-button>
|
<el-button size="small" :disabled="selection.length !== 1" @click="absorbIntoBatch">吸取选中班次日期</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-alert
|
<el-alert
|
||||||
type="info"
|
type="info"
|
||||||
@@ -360,7 +359,6 @@ export default {
|
|||||||
// ==================== 列表与分页 ====================
|
// ==================== 列表与分页 ====================
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
currentRow: null,
|
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -552,9 +550,6 @@ export default {
|
|||||||
handleSelectionChange(rows) {
|
handleSelectionChange(rows) {
|
||||||
this.selection = rows
|
this.selection = rows
|
||||||
},
|
},
|
||||||
handleCurrentChange(row) {
|
|
||||||
this.currentRow = row
|
|
||||||
},
|
|
||||||
|
|
||||||
/* ==================== 查询 / 重置 ==================== */
|
/* ==================== 查询 / 重置 ==================== */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@@ -577,7 +572,7 @@ export default {
|
|||||||
this.detailVisible = true
|
this.detailVisible = true
|
||||||
},
|
},
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
const target = row || this.currentRow
|
const target = row || this.selection[0]
|
||||||
if (!target) {
|
if (!target) {
|
||||||
this.$message.warning('请先选择一条班次学期信息')
|
this.$message.warning('请先选择一条班次学期信息')
|
||||||
return
|
return
|
||||||
@@ -637,7 +632,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleEditEventCalendar(row) {
|
handleEditEventCalendar(row) {
|
||||||
const target = row || this.currentRow
|
const target = row || this.selection[0]
|
||||||
if (!target) {
|
if (!target) {
|
||||||
this.$message.warning('请先在列表中选择一条班次学期信息')
|
this.$message.warning('请先在列表中选择一条班次学期信息')
|
||||||
return
|
return
|
||||||
@@ -648,7 +643,7 @@ export default {
|
|||||||
|
|
||||||
// 跳转到排课窗口,并带上当前班次学期编号
|
// 跳转到排课窗口,并带上当前班次学期编号
|
||||||
handleSchedule(row) {
|
handleSchedule(row) {
|
||||||
const target = row || this.currentRow
|
const target = row || this.selection[0]
|
||||||
if (!target) {
|
if (!target) {
|
||||||
this.$message.warning('请先在列表中选择一条班次学期信息')
|
this.$message.warning('请先在列表中选择一条班次学期信息')
|
||||||
return
|
return
|
||||||
@@ -662,7 +657,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleAllocation(row) {
|
handleAllocation(row) {
|
||||||
const target = row || this.currentRow
|
const target = row || this.selection[0]
|
||||||
if (!target) {
|
if (!target) {
|
||||||
this.$message.warning('请先在列表中选择一条班次学期信息')
|
this.$message.warning('请先在列表中选择一条班次学期信息')
|
||||||
return
|
return
|
||||||
@@ -770,7 +765,7 @@ export default {
|
|||||||
|
|
||||||
/* ==================== 编辑班次教学任务 ==================== */
|
/* ==================== 编辑班次教学任务 ==================== */
|
||||||
handleEditCalendar(row) {
|
handleEditCalendar(row) {
|
||||||
const target = row || this.currentRow
|
const target = row || this.selection[0]
|
||||||
if (!target) {
|
if (!target) {
|
||||||
this.$message.warning('请先在列表中选择一条班次学期信息')
|
this.$message.warning('请先在列表中选择一条班次学期信息')
|
||||||
return
|
return
|
||||||
@@ -809,8 +804,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
absorbIntoBatch() {
|
absorbIntoBatch() {
|
||||||
if (!this.currentRow) return
|
if (this.selection.length !== 1) return
|
||||||
this.absorbDatesFrom(this.currentRow)
|
this.absorbDatesFrom(this.selection[0])
|
||||||
this.batchAddForm.startTime = this.presetDates.kxrq
|
this.batchAddForm.startTime = this.presetDates.kxrq
|
||||||
this.batchAddForm.endTime = this.presetDates.jsrq
|
this.batchAddForm.endTime = this.presetDates.jsrq
|
||||||
},
|
},
|
||||||
@@ -837,11 +832,11 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAbsorbDates() {
|
handleAbsorbDates() {
|
||||||
if (!this.currentRow) {
|
if (this.selection.length !== 1) {
|
||||||
this.$message.warning('请先选中一条班次学期')
|
this.$message.warning('请勾选一条班次学期')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.absorbDatesFrom(this.currentRow)
|
this.absorbDatesFrom(this.selection[0])
|
||||||
this.$message.success(`已吸取开学日期 ${this.presetDates.kxrq}、结束日期 ${this.presetDates.jsrq}`)
|
this.$message.success(`已吸取开学日期 ${this.presetDates.kxrq}、结束日期 ${this.presetDates.jsrq}`)
|
||||||
},
|
},
|
||||||
absorbDatesFrom(row) {
|
absorbDatesFrom(row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user