|
|
@@ -27,12 +27,19 @@
|
|
|
<div class="gva-table-box">
|
|
|
<el-table :data="tableData" @sort-change="sortChange" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
- <el-table-column align="left" label="游戏id" min-width="150" prop="game_id" sortable="custom" />
|
|
|
- <el-table-column align="left" label="ip" min-width="150" prop="ip" />
|
|
|
<el-table-column align="left" label="电脑编号" min-width="100" prop="pc_code" />
|
|
|
- <el-table-column align="left" label="上报ip次数" min-width="150" prop="count_total" />
|
|
|
- <el-table-column align="left" label="ip个数" min-width="150" prop="count_distinct_ip" />
|
|
|
+ <el-table-column align="left" label="游戏id" min-width="150" prop="game_id" sortable="custom" />
|
|
|
+ <!-- <el-table-column align="left" label="ip" min-width="150" prop="ip" /> -->
|
|
|
+
|
|
|
+ <el-table-column align="left" label="上报ip次数" min-width="150" prop="count_total" sortable="custom" />
|
|
|
+ <el-table-column align="left" label="ip个数" min-width="150" prop="count_distinct_ip" sortable="custom" />
|
|
|
<el-table-column align="left" label="日期" min-width="150" prop="create_date" />
|
|
|
+ <el-table-column align="left" fixed="right" label="操作" width="200">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button icon="search" size="small" type="primary" link
|
|
|
+ @click="selectIpFunc(scope.row)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<div class="gva-pagination">
|
|
|
<el-pagination :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"
|
|
|
@@ -40,6 +47,17 @@
|
|
|
@size-change="handleSizeChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle" width="40%">
|
|
|
+ <!-- <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-text class="mx-1" type="success">Success</el-text>
|
|
|
+ <el-button size="small" @click="closeDialog">取 消</el-button> -->
|
|
|
+ <!-- </div>
|
|
|
+ </template> -->
|
|
|
+ <el-table :data="IpTableData" height="500" border>
|
|
|
+ <el-table-column align="center" label="ip" min-width="120" prop="ip" />
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -52,6 +70,7 @@ export default {
|
|
|
<script setup>
|
|
|
import {
|
|
|
ipLogList,
|
|
|
+ getIp
|
|
|
} from '@/api/ipLog'
|
|
|
import { toSQLLine } from '@/utils/stringFun'
|
|
|
import { ref } from 'vue'
|
|
|
@@ -63,6 +82,7 @@ const page = ref(1)
|
|
|
const total = ref(0)
|
|
|
const pageSize = ref(10)
|
|
|
const tableData = ref([])
|
|
|
+const IpTableData = ref([])
|
|
|
const searchInfo = ref({})
|
|
|
|
|
|
const onReset = () => {
|
|
|
@@ -122,6 +142,31 @@ const getTableData = async () => {
|
|
|
|
|
|
getTableData()
|
|
|
|
|
|
+// 查看IP
|
|
|
+const selectIpFunc = async (row) => {
|
|
|
+ const res = await getIp({ game_id: row.game_id, pc_code: row.pc_code, create_date: row.create_date })
|
|
|
+ IpTableData.value = res.data.list
|
|
|
+ IpTableData.value.total = res.data.total
|
|
|
+ openDialog('getIp')
|
|
|
+}
|
|
|
+const closeDialog = () => {
|
|
|
+ dialogFormVisible.value = false
|
|
|
+}
|
|
|
+const dialogTitle = ref('')
|
|
|
+const type = ref('')
|
|
|
+const dialogFormVisible = ref(false)
|
|
|
+const openDialog = (key) => {
|
|
|
+ switch (key) {
|
|
|
+ case 'getIp':
|
|
|
+ dialogTitle.value = 'ip个数:' + IpTableData.value.total
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ type.value = key
|
|
|
+ dialogFormVisible.value = true
|
|
|
+}
|
|
|
+
|
|
|
// 批量操作
|
|
|
const handleSelectionChange = (val) => {
|
|
|
apis.value = val
|