This commit is contained in:
wanyongkang
2020-11-12 14:15:51 +08:00
parent 026a28e7f6
commit a7cc04c890
2 changed files with 47 additions and 21 deletions

View File

@@ -225,6 +225,10 @@
this.table_data = datalist;
},
search_all(){
if(!this.search_all_data){
this.select_product(0);
return;
}
$.ajax({
type: 'GET',
url: 'http://php-api.juip.com/script/linedata/search.php?type=1&info=' + this.search_all_data,
@@ -237,6 +241,10 @@
this.table_data = datalist;
},
search_product(){
if(!this.search_product_data){
this.select_product(this.product_id);
return;
}
$.ajax({
type: 'GET',
url: 'http://php-api.juip.com/script/linedata/search.php?type=0&productid='+this.product_id+'&info=' + this.search_product_data,

View File

@@ -22,11 +22,12 @@
<div class="container-fluid softBg">
<div class="container">
<div class="row">
<div class="col-lg-3 zxbz">
<div style="float: left;" class="col-lg-3 zxbz">
<img src="~/img/img_xinalu.png">
</div>
<div class="col-lg-5 searchInput">
<input v-on:keyup.13="search_all()" type="text" v-model="search_all_data" name="KeyWord" placeholder="输入地区/名称/服务器" />
<div style="float: left;" class="col-lg-5 searchInput">
<span style="float: left;width:10%;margin-top:60px;height:40px;line-height:200%" class="input-group-addon">全部</span>
<input style="float: left;width:90%;margin-top:60px;border: none;border-radius:0px" class="form-control" v-on:keyup.13="search_all()" type="text" v-model="search_all_data" name="KeyWord" placeholder="输入地区/名称/服务器" />
</div>
<div class="col-lg-2 searchBtn text-left">
<button v-on:click="search_all()" class="btn btn-search">搜索全部</button>
@@ -40,7 +41,7 @@
</div>
<div class="col-lg-9">
<p class="hot"><img src="~/img/shuju.png">实时总线路:@(lineTotalCount)条<img src="~/img/shuju.png">实时可用线路:@(lineCount)条 所有线路均支持:【电脑/安卓/苹果】【PPTP/L2TP/SSTP】</p>
<p class="hot"><img src="~/img/shuju.png">实时总线路:{{count}}条<img src="~/img/shuju.png">实时可用线路:{{use_count}}条 所有线路均支持:【电脑/安卓/苹果】【PPTP/L2TP/SSTP】</p>
</div>
</div>
</div>
@@ -50,7 +51,7 @@
<p style="text-align: center;font-size: 25px;color:red;">*****公告*****</p>
<p style="text-align: center;font-size: 20px;">*聚IP商城全线服务器都已更新可显示实时维护状态及服务器负载情况*</p>
<a style="margin-left: 45%;" href="/linelist/index2" class="btn btn-primary">*查看老版本服务器*</a>
<p style="text-align: center;font-size: 20px;">*温馨提示:请尽使用新版服务器,老版服务器将于12月1号停止维护*</p>
<p style="text-align: center;font-size: 20px;">*温馨提示:请尽快替换使用新版服务器,老版因不能实时更新维护状态,将于12月1号停止维护*</p>
<p class="xianluIntro" style="text-align: center;font-size: 25px;">*线路表和账号必须为同一产品才能使用。</p>
<div class="xianlu">
@foreach (var item in product.Where(m => m.Id != 3 && m.Id != 7 && m.Id != 9))
@@ -68,12 +69,9 @@
<p><img src="~/img/miyao.png"> L2TP密钥<b style="color:red;">{{l2tp}}</b></p>
<p><img src="~/img/dk.png"> SSTP端口<b style="color:red;">{{sstp}}</b></p>
</div>
<div class="col-lg-2 fanwei">
搜索范围:<span id="pName">{{search_field}}</span>
</div>
<div class="col-lg-8">
<input type="hidden" name="ProductId" id="ProductId" value="@pid" />
<input v-on:keyup.13="search_product()" type="text" v-model="search_product_data" name="KeyWord" class="searchDq" placeholder="输入地区/名称/服务器" />
<div class="col-lg-10">
<span style="float: left;width:10%;height:34px;line-height:150%" class="input-group-addon">{{search_field}}</span>
<input style="width:40%" v-on:keyup.13="search_product()" type="text" v-model="search_product_data" name="KeyWord" class="searchDq" placeholder="输入地区/名称/服务器" />
<button v-on:click="search_product()" class="btn btn-primary">搜索当前线路表</button>
<span class="daochu" v-on:click="export_data()" ><img src="~/img/excel.png">导出Excel</span>
@@ -97,14 +95,14 @@
<tr v-for="site in table_data" :style="(site.online=='故障')?'color:#ec5656;':''">
<td>{{site.name}}</td>
<td v-if="site.online==null" style="color:#993399">{{site.city}}</td>
<td v-if="site.online!=null">{{site.city}}</td>
<td>{{site.supply}}</td>
<td>{{site.nasname}}</td>
<td>{{site.ip}}</td>
<td>{{site.daikuan}}</td>
<td>{{site.online}}</td>
<td>{{site.status}}</td>
<td colspan="7" v-if="!site.nasname" style="color:#339933;font-weight:bold;">{{site.city}}</td>
<td v-if="site.nasname">{{site.city}}</td>
<td v-if="site.nasname">{{site.supply}}</td>
<td v-if="site.nasname">{{site.nasname}}</td>
<td v-if="site.nasname">{{site.ip}}</td>
<td v-if="site.nasname">{{site.daikuan}}</td>
<td v-if="site.nasname">{{site.online}}</td>
<td v-if="site.nasname">{{site.status}}</td>
</tr>
</table>
</div>
@@ -120,8 +118,10 @@
search_product_data:'',
product_id:0,
l2tp:'',
search_field:'',
sstp:''
search_field:'全部',
sstp:'',
count:0,
use_count:0
},
computed: {
@@ -136,6 +136,8 @@
select_product(ProductId){
this.product_id = ProductId;
let datalist = [];
let count = 0;
let use_count = 0;
$("div").removeClass("blueLine");
$("#product-"+ProductId).addClass("blueLine");
switch(ProductId){
@@ -202,11 +204,23 @@
async:false,
success: function (res) {
datalist = res.data;
count = res.count;
use_count = res.use_count;
}
});
this.table_data = datalist;
this.count = count;
if(ProductId != 16){
this.use_count = use_count;
} else {
this.use_count = count;
}
},
search_all(){
if(!this.search_all_data){
this.select_product(0);
return;
}
$.ajax({
type: 'GET',
url: 'http://php-api.juip.com/script/linedata/search.php?type=1&info=' + this.search_all_data,
@@ -219,6 +233,10 @@
this.table_data = datalist;
},
search_product(){
if(!this.search_product_data){
this.select_product(this.product_id);
return;
}
$.ajax({
type: 'GET',
url: 'http://php-api.juip.com/script/linedata/search.php?type=0&productid='+this.product_id+'&info=' + this.search_product_data,