1
This commit is contained in:
@@ -11,8 +11,12 @@
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="primary" @click="load(1)">查询</Button>
|
||||
<Button type="default" @click="resetQuery" class="ml10">重置</Button>
|
||||
<Button type="default" @click="doExport" class="ml10">导出 CSV</Button>
|
||||
<Dropdown trigger="click" class="ml10" @on-click="on_toolbar_more">
|
||||
<Button type="default">更多 <Icon type="ios-arrow-down" /></Button>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem name="export">导出 CSV</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</div>
|
||||
@@ -94,6 +98,9 @@ export default {
|
||||
this.param.pageOption.pageSize = s
|
||||
this.load(1)
|
||||
},
|
||||
on_toolbar_more(name) {
|
||||
if (name === 'export') this.doExport()
|
||||
},
|
||||
async doExport() {
|
||||
const res = await auditServer.exportRows({ param: this.param })
|
||||
if (res && res.code === 0 && res.data && res.data.rows) {
|
||||
@@ -107,10 +114,6 @@ export default {
|
||||
this.$Message.error((res && res.message) || '导出失败')
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.param.seachOption = { key: 'action', value: '' }
|
||||
this.load(1)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user