切图
This commit is contained in:
@@ -74,12 +74,6 @@
|
||||
<!-- ==================== 2. 操作按钮区 ==================== -->
|
||||
<el-card shadow="never" class="action-card">
|
||||
<div class="action-bar">
|
||||
<div class="bar-left">
|
||||
<el-button icon="el-icon-download" @click="handleDownloadTemplate">
|
||||
【课程表数据文件模板】下载
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="bar-center">
|
||||
<div class="file-area">
|
||||
<input ref="fileInputRef" type="file" accept=".xlsx,.xls" style="display: none" @change="handleFileChange" />
|
||||
@@ -150,7 +144,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTeachingPlan, importTeachingPlan, downloadTeachingPlanTemplate } from '@/api/schedule/teachingPlan'
|
||||
import { listTeachingPlan, importTeachingPlan } from '@/api/schedule/teachingPlan'
|
||||
|
||||
export default {
|
||||
name: 'PlanImportIndex',
|
||||
@@ -254,14 +248,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// ==================== 下载模板 ====================
|
||||
handleDownloadTemplate() {
|
||||
downloadTeachingPlanTemplate().then(blob => {
|
||||
this.downloadBlob(blob, '教学实施计划导入模板.xlsx')
|
||||
this.$message.success('模板下载成功')
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
// ==================== 通用 Blob 下载 ====================
|
||||
downloadBlob(blob, fileName) {
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
|
||||
Reference in New Issue
Block a user