|
@@ -4,6 +4,9 @@
|
|
|
<!-- 大表 -->
|
|
|
<el-card v-loading="!already" style="min-height:500px">
|
|
|
<el-row type="flex" align="middle" justify="end" style="padding-bottom:10px">
|
|
|
+ <el-col :span="2">
|
|
|
+ <el-button type="success" size="mini" @click="toExcel">导出学校计划</el-button>
|
|
|
+ </el-col>
|
|
|
<el-col :span="2">
|
|
|
<el-button type="success" size="mini" @click="toSave">保存计划</el-button>
|
|
|
</el-col>
|
|
@@ -134,7 +137,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...util({ modelFetch: 'fetch' }),
|
|
|
- ...trainPlan({ getTrainPlan: 'fetch' }),
|
|
|
+ ...trainPlan({ getTrainPlan: 'fetch', exportPlan: 'exportSchoolPlan' }),
|
|
|
...school(['query']),
|
|
|
...schPlan({ schPlanQuery: 'query', createSchPlan: 'create', updateSchPlan: 'update', setSchPlan: 'schArrange' }),
|
|
|
...classtype({ getClassType: 'query' }),
|
|
@@ -732,6 +735,11 @@ export default {
|
|
|
if (res) return res.name;
|
|
|
} else return _.get(data, prop);
|
|
|
},
|
|
|
+ //导出Excel
|
|
|
+ async toExcel() {
|
|
|
+ const res = await this.exportPlan({ trainplanId: this.defaultOption.planid });
|
|
|
+ if (this.$checkRes(res)) window.open(res.data);
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user', 'defaultOption']),
|