|
@@ -3,6 +3,8 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24" class="main">
|
|
<el-col :span="24" class="main">
|
|
<el-col :span="24" class="top">
|
|
<el-col :span="24" class="top">
|
|
|
|
+ <el-button type="primary" size="mini" @click="toExport">导出</el-button>
|
|
|
|
+ <el-button type="primary" size="mini" @click="toResult">查看导出结果</el-button>
|
|
<el-button type="primary" size="mini" @click="add">添加</el-button>
|
|
<el-button type="primary" size="mini" @click="add">添加</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="down">
|
|
<el-col :span="24" class="down">
|
|
@@ -52,7 +54,7 @@ export default {
|
|
await this.search();
|
|
await this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...patent(['query', 'fetch', 'create', 'update', 'delete']),
|
|
|
|
|
|
+ ...patent(['query', 'fetch', 'create', 'update', 'delete', 'import', 'export']),
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
let res = await this.query({ skip, limit, ...info });
|
|
let res = await this.query({ skip, limit, ...info });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
@@ -79,6 +81,15 @@ export default {
|
|
add() {
|
|
add() {
|
|
this.$router.push({ path: '/patent/detail' });
|
|
this.$router.push({ path: '/patent/detail' });
|
|
},
|
|
},
|
|
|
|
+ // 导出
|
|
|
|
+ async toExport() {
|
|
|
|
+ const res = await this.export();
|
|
|
|
+ this.$checkRes(res, '正在导出,详情请点击"查看导出结果"进行查看', res.errmsg || '导出失败');
|
|
|
|
+ },
|
|
|
|
+ // 查看导出结果
|
|
|
|
+ async toResult() {
|
|
|
|
+ this.$router.push({ path: '/patent/result' });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|