|
|
@@ -0,0 +1,84 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <avue-crud
|
|
|
+ v-bind="bindVal"
|
|
|
+ v-on="onEvent"
|
|
|
+ v-model="form"
|
|
|
+ :page.sync="page"
|
|
|
+ :before-open="handleBeforeOpen"
|
|
|
+ :permission="permissionList"
|
|
|
+ >
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="handleExport"
|
|
|
+ >
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
+ <print-table-btn @click="printTable" />
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </avue-crud>
|
|
|
+
|
|
|
+ <WideTablePrinter
|
|
|
+ ref="printWideTable"
|
|
|
+ :columns="wideTableColumns"
|
|
|
+ :data="data"
|
|
|
+ :print-title="printTitle"
|
|
|
+ :rows-per-page="30"
|
|
|
+ :default-landscape="true"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {exportBloByPost} from "@/api/common";
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
+import {downloadXls} from "@/util/util";
|
|
|
+import crudCommon from '@/mixins/crud';
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+export default crudCommon({
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+
|
|
|
+ wideTableColumns: [],
|
|
|
+ printTitle: "",
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ 'params.yearAndMonth'(newVal) {
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.getList(this.page);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleExport() {
|
|
|
+ // exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
+ // downloadXls(res.data, `科研资产台账RD匹配表${this.params.yearAndMonth}.xlsx`);
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 打印表格
|
|
|
+ * @param isLandscape 是否横向打印
|
|
|
+ */
|
|
|
+ printTable(isLandscape) {
|
|
|
+ this.wideTableColumns = this.$refs.crud.columnOption;
|
|
|
+ this.printTitle = `反馈记录${this.params.yearAndMonth}`;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.printWideTable.printTable(isLandscape);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
+}, {
|
|
|
+ // 模块路径
|
|
|
+ name: 'system/feedback',
|
|
|
+ res: ({ data }) => {
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+});
|
|
|
+</script>
|