|
|
@@ -11,6 +11,17 @@
|
|
|
@row-save="rowSave"
|
|
|
@row-update="rowUpdate"
|
|
|
>
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="handleExport"
|
|
|
+ >
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
<template slot="icon" slot-scope="scope">
|
|
|
<i :class="scope.row.icon" style="font-size: 24px"></i>
|
|
|
</template>
|
|
|
@@ -34,6 +45,9 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { getList, add, update, remove } from "@/api/basicResource/subjectSetting";
|
|
|
+import {exportBloByPost} from "@/api/common";
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
+import {downloadXls} from "@/util/util";
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
@@ -200,6 +214,11 @@ export default {
|
|
|
this.getMenuData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleExport() {
|
|
|
+ exportBloByPost(`/api/kd-scientific/subject/export?${this.website.tokenHeader}=${getToken()}`, this.query).then(res => {
|
|
|
+ downloadXls(res.data, `${this.tag.label}.xlsx`);
|
|
|
+ });
|
|
|
+ },
|
|
|
loopData(data, level, maxLevel) {
|
|
|
level++;
|
|
|
return data.map(item => {
|