|
@@ -19,24 +19,19 @@
|
|
|
<el-button :size="size" icon="el-icon-delete" @click="handleResetBtn">清空</el-button>
|
|
<el-button :size="size" icon="el-icon-delete" @click="handleResetBtn">清空</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</avue-form>
|
|
</avue-form>
|
|
|
- <div>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="warning"
|
|
|
|
|
- size="small"
|
|
|
|
|
- plain
|
|
|
|
|
- icon="el-icon-download"
|
|
|
|
|
- @click="handleExport"
|
|
|
|
|
- style="margin-right: 10px;"
|
|
|
|
|
- >
|
|
|
|
|
- 导出
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
<h3 class="page-title">{{ pageTitle }}</h3>
|
|
<h3 class="page-title">{{ pageTitle }}</h3>
|
|
|
<div style="display: flex; align-items: center;">
|
|
<div style="display: flex; align-items: center;">
|
|
|
<year-month-select v-model="yearAndMonth" :showAllYear="false" style="margin: 6px 0 20px;"></year-month-select>
|
|
<year-month-select v-model="yearAndMonth" :showAllYear="false" style="margin: 6px 0 20px;"></year-month-select>
|
|
|
</div>
|
|
</div>
|
|
|
<template v-if="listData.length">
|
|
<template v-if="listData.length">
|
|
|
- <common-list v-for="(item, index) of listData" :data="item" :key="index" @printClick="handlePrintClick" style="margin-bottom: 25px;"></common-list>
|
|
|
|
|
|
|
+ <common-list
|
|
|
|
|
+ v-for="(item, index) of listData"
|
|
|
|
|
+ :data="item"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ @printClick="handlePrintClick"
|
|
|
|
|
+ @exportClick="handleExportClick"
|
|
|
|
|
+ style="margin-bottom: 25px;"
|
|
|
|
|
+ ></common-list>
|
|
|
</template>
|
|
</template>
|
|
|
<el-empty v-else description="暂无数据"></el-empty>
|
|
<el-empty v-else description="暂无数据"></el-empty>
|
|
|
|
|
|
|
@@ -70,6 +65,9 @@ import commonList from "./components/common-list.vue";
|
|
|
import { getList } from "@/api/yfCostManage/yfCostStatistics/yfLeaseAllocationList";
|
|
import { getList } from "@/api/yfCostManage/yfCostStatistics/yfLeaseAllocationList";
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
|
|
+import {exportBloByPost} from "@/api/common";
|
|
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
|
|
+import {downloadXls} from "@/util/util";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -170,6 +168,13 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.printWideTable.printTable(true);
|
|
this.$refs.printWideTable.printTable(true);
|
|
|
})
|
|
})
|
|
|
|
|
+ },
|
|
|
|
|
+ handleExportClick({ leaseDate, xmId }) {
|
|
|
|
|
+ console.log(xmId)
|
|
|
|
|
+ const exportParams = { leaseDate, xmId, yearAndMonth: this.yearAndMonth };
|
|
|
|
|
+ exportBloByPost(`/api/kd-scientific/lease/yfzlzcfyfpb/export?${this.website.tokenHeader}=${getToken()}`, exportParams).then(res => {
|
|
|
|
|
+ downloadXls(res.data, `${this.pageTitle}.xlsx`);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|