|
@@ -59,25 +59,14 @@
|
|
|
v-hasPermi="['report:TEMPLATE:remove']"
|
|
|
>删除</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- v-hasPermi="['report:TEMPLATE:export']"
|
|
|
- >导出</el-button>
|
|
|
- </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="TEMPLATEList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
-
|
|
|
<el-table-column label="模版名称" align="center" prop="title">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="模版路径" align="center" prop="filename">
|
|
|
+ <el-table-column label="模版路径" align="center" prop="filename" width="450">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="是否启用" align="center" prop="status">
|
|
|
<template slot-scope="scope">
|
|
@@ -98,6 +87,12 @@
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="handleExport(scope.row)"
|
|
|
+ >导出模版</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['report:TEMPLATE:edit']"
|
|
@@ -246,7 +241,7 @@
|
|
|
},
|
|
|
handleFileSuccess(response, file, fileList) {
|
|
|
this.form.filename = response.data;
|
|
|
- //this.$refs.upload.clearFiles();
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
this.upload.uploadFinish = true;
|
|
|
let code = response.code;
|
|
|
if (code !== 200) {
|
|
@@ -387,10 +382,9 @@
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.download('report/TEMPLATE/export', {
|
|
|
- ...this.queryParams
|
|
|
- }, `TEMPLATE_${new Date().getTime()}.xlsx`)
|
|
|
+ handleExport(row) {
|
|
|
+ let templatePath = row.templatePath;
|
|
|
+ window.location.href=templatePath;
|
|
|
}
|
|
|
}
|
|
|
};
|