|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="main animate__animated animate__backInRight" v-loading="loading">
|
|
|
<custom-search-bar :fields="fields.filter((f) => f.isSearch)" v-model="searchForm" @search="search" @reset="toReset"> </custom-search-bar>
|
|
|
- <custom-button-bar :fields="btnField" @export="toExport"></custom-button-bar>
|
|
|
+ <custom-button-bar :fields="btnField" @export="toExport" @refresh="toRefresh"></custom-button-bar>
|
|
|
<custom-table :data="list" :fields="fields" @query="search" :total="total" :opera="opera" @reExecute="reExecute" @download="download" height="70vh"> </custom-table>
|
|
|
<el-dialog v-model="dialogShow" title="导出数据">
|
|
|
<el-steps :active="step" align-center style="margin: 10px 0">
|
|
@@ -54,7 +54,10 @@ const searchForm = ref({})
|
|
|
const list = ref([])
|
|
|
let skip = 0
|
|
|
let limit = inject('limit')
|
|
|
-const btnField = ref([{ label: '导出数据', method: 'export' }])
|
|
|
+const btnField = ref([
|
|
|
+ { label: '刷新列表', method: 'refresh' },
|
|
|
+ { label: '导出数据', method: 'export' }
|
|
|
+])
|
|
|
|
|
|
const tableList = ref([])
|
|
|
const step = ref(1)
|
|
@@ -119,6 +122,9 @@ const search = async (query = { skip, limit }) => {
|
|
|
total.value = res.total
|
|
|
}
|
|
|
}
|
|
|
+const toRefresh = async () => {
|
|
|
+ await search({ skip, limit })
|
|
|
+}
|
|
|
|
|
|
// 导出数据
|
|
|
const toFile = async () => {
|