|
|
@@ -18,6 +18,8 @@
|
|
|
<el-form-item>
|
|
|
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
|
|
|
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
|
|
|
+ <el-button class="excel-btn" size="small" type="primary" icon="download"
|
|
|
+ @click="handleExcelExport">导出</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -68,7 +70,8 @@ export default {
|
|
|
<script setup>
|
|
|
import {
|
|
|
gameIpList,
|
|
|
- getGameIp
|
|
|
+ getGameIp,
|
|
|
+ gameIpExport
|
|
|
} from '@/api/ipLog'
|
|
|
import { toSQLLine } from '@/utils/stringFun'
|
|
|
import { ref } from 'vue'
|
|
|
@@ -147,6 +150,23 @@ const selectIpFunc = async (row) => {
|
|
|
IpTableData.value.total = res.data.total
|
|
|
openDialog('getIp')
|
|
|
}
|
|
|
+
|
|
|
+//导出列表
|
|
|
+const handleExcelExport = async () => {
|
|
|
+ var fileName = Date.parse(new Date()) + "-ip.xlsx"
|
|
|
+ if (searchInfo.value.create_date == null) {
|
|
|
+ let dt = new Date()
|
|
|
+ var y = dt.getFullYear()
|
|
|
+ var mt = (dt.getMonth() + 1).toString().padStart(2, '0')
|
|
|
+ var day = dt.getDate().toString().padStart(2, '0')
|
|
|
+ var timeStr = y + "-" + mt + "-" + day
|
|
|
+ fileName = timeStr + "-ip.xlsx"
|
|
|
+ } else {
|
|
|
+ fileName = searchInfo.value.create_date + "-ip.xlsx"
|
|
|
+ }
|
|
|
+ gameIpExport({ page: page.value, pageSize: pageSize.value, ...searchInfo.value }, fileName)
|
|
|
+}
|
|
|
+
|
|
|
const closeDialog = () => {
|
|
|
dialogFormVisible.value = false
|
|
|
}
|