Skip to content

Commit

Permalink
update web
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohann0617 committed Mar 31, 2024
1 parent 5ff6508 commit 6cecdf5
Showing 1 changed file with 61 additions and 35 deletions.
96 changes: 61 additions & 35 deletions foreign-server/src/main/resources/static/proxyIp.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,43 +92,67 @@
<body>
<div id="app">
<h2>代理IP列表</h2>
<div style="margin-top: 15px; width: 600px;">
<el-input clearable placeholder="输入国家代号、ip地址进行模糊查询" v-model="pageParams.keyword" class="input-with-select">
<el-button slot="append" icon="el-icon-search" round @click="search"></el-button>
</el-input>
</div>
<div style="margin-top: 15px; width: 600px;">
<el-input clearable placeholder="输入需要删除DNS记录的代理域名前缀,如:hk" v-model="proxyDomain"
class="input-with-select">
<el-select v-model="proxyDomain" slot="prepend" placeholder="请选择代理域名">
<el-option label="美国" value="us"></el-option>
<el-option label="英国" value="gb"></el-option>
<el-option label="荷兰" value="nl"></el-option>
<el-option label="德国" value="de"></el-option>
<el-option label="香港" value="hk"></el-option>
<el-option label="澳门" value="mo"></el-option>
<el-option label="新加坡" value="sg"></el-option>
<el-option label="韩国" value="kr"></el-option>
<el-option label="日本" value="jp"></el-option>
</el-select>
<el-button slot="append" icon="el-icon-delete" round @click="deleteDnsRecord"></el-button>
</el-input>
</div>
<el-divider></el-divider>
<div align="left">
<el-button @click="deleteBatch" type="warning">批量删除数据库中数据</el-button>
<el-button @click="deleteAllDnsRecord" type="danger">删除所有代理域名DNS记录</el-button>
<el-button @click="addDnsRecordsBatch" type="primary">批量解析所选ip地址到CF的DNS记录</el-button>
</div>
<el-divider></el-divider>
<el-input clearable
placeholder="输入国家代号、ip地址进行模糊查询"
v-model="pageParams.keyword"
class="input-with-select"
style="margin-top: 15px;"
@input="search">
<el-button slot="append" icon="el-icon-search" round @click="search"></el-button>
</el-input>
<el-input clearable placeholder="输入需要删除DNS记录的代理域名前缀,如:hk"
v-model="proxyDomain"
style="margin-top: 15px;"
class="input-with-select">
<el-select v-model="proxyDomain" slot="prepend" placeholder="请选择代理域名">
<el-option label="美国" value="us"></el-option>
<el-option label="英国" value="gb"></el-option>
<el-option label="荷兰" value="nl"></el-option>
<el-option label="德国" value="de"></el-option>
<el-option label="香港" value="hk"></el-option>
<el-option label="澳门" value="mo"></el-option>
<el-option label="新加坡" value="sg"></el-option>
<el-option label="韩国" value="kr"></el-option>
<el-option label="日本" value="jp"></el-option>
</el-select>
<el-button slot="append" icon="el-icon-delete" round @click="deleteDnsRecord"></el-button>
</el-input>
<el-collapse style="margin-top: 15px; margin-bottom: 15px;">
<el-collapse-item title="点击选择批量操作" name="1">
<el-button @click="deleteBatch" type="warning">批量删除数据库中数据</el-button>
<el-button @click="deleteAllDnsRecord" type="danger" style="margin-top: 15px; ">删除所有代理域名DNS记录</el-button>
<el-button @click="addDnsRecordsBatch" type="primary" style="margin-top: 15px; ">批量解析所选ip地址到CF的DNS记录</el-button>
</el-collapse-item>
</el-collapse>
<div class="my_table">
<el-table class="my_table" :data="tableData" style="width: 100%" border height="330"
<el-table class="my_table"
:data="tableData"
style="width: 100%"
border height="350"
v-loading="loading"
stripe
@select="handleSelect" @select-all="handleSelectAll">
<el-table-column type="selection"></el-table-column>
<el-table-column prop="id" label="ID" width="500"></el-table-column>
<el-table-column prop="country" label="Country" width="500"></el-table-column>
<el-table-column prop="ip" label="IP" width="500"></el-table-column>
<el-table-column prop="pingValue" label="PingValue" width="500"></el-table-column>
<el-table-column prop="id" label="ID" width="500">
<template slot-scope="scope">
<el-tag type="info">{{ scope.row.id }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="country" label="Country" width="500">
<template slot-scope="scope">
<el-tag type="success" effect="light">{{ scope.row.country }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="ip" label="IP" width="500">
<template slot-scope="scope">
<el-tag type="success" effect="plain">{{ scope.row.ip }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="pingValue" label="PingValue" width="500">
<template slot-scope="scope">
<el-tag type="success" effect="dark">{{ scope.row.pingValue }}</el-tag>
</template>
</el-table-column>
<el-table-column label="Action" fixed="right" width="120">
<template slot-scope="scope">
<el-button type="primary" round @click="addSingleDnsRecord(scope.row.id)" size="mini">解析到CF</el-button>
Expand Down Expand Up @@ -170,7 +194,8 @@ <h2>代理IP列表</h2>
},
proxyDomain: '',
tableData: [],
selectedRows: [] // 保存选中的行数据
selectedRows: [], // 保存选中的行数据
loading: true
};
},
methods: {
Expand All @@ -192,6 +217,7 @@ <h2>代理IP列表</h2>
.then(response => {
this.pageParams.total = response.data.data.total;
this.tableData = response.data.data.records;
this.loading = false;
})
.catch(error => console.error('Error searching data:', error));
},
Expand Down

0 comments on commit 6cecdf5

Please sign in to comment.