|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div class="method_select">
|
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
|
|
|
<li role="presentation" class="active">
|
|
|
|
|
<li role="presentation">
|
|
|
|
|
<a href="#handinput" aria-controls="handinput" role="tab" data-toggle="tab">手动录入</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li role="presentation">
|
|
|
|
@ -19,12 +19,12 @@
|
|
|
|
|
<li role="presentation">
|
|
|
|
|
<a href="#list_view" aria-controls="list_view" role="tab" data-toggle="tab">数据预览</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li role="presentation">
|
|
|
|
|
<li role="presentation" class="active">
|
|
|
|
|
<a href="#config_view" aria-controls="list_view" role="tab" data-toggle="tab">配置中心</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="tab-content">
|
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="handinput">
|
|
|
|
|
<div role="tabpanel" class="tab-pane" id="handinput">
|
|
|
|
|
<div class="row" style="margin-top:10px;">
|
|
|
|
|
<div class="col-md-18">
|
|
|
|
|
<input class="form-control" id="ta_url" type="text" autocomplete="off" />
|
|
|
|
@ -132,7 +132,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div role="tabpanel" class="tab-pane" id="config_view">
|
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="config_view">
|
|
|
|
|
<div class="row" style="margin-top:10px;">
|
|
|
|
|
<div class="col-md-5">
|
|
|
|
|
<select name="confg_destination" class="form-control" id="confg_destination">
|
|
|
|
@ -153,6 +153,24 @@
|
|
|
|
|
<a href="#" id="addproduction" class="btn btn-info">添加产品</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<hr>
|
|
|
|
|
<h3 style="text-align:center">配置查询</h3>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-5">
|
|
|
|
|
<select name="search_confg_destination" class="form-control" id="search_confg_destination">
|
|
|
|
|
<option value="">选择站点</option>
|
|
|
|
|
<option value="tp_Beijing">tp_Beijing</option>
|
|
|
|
|
<option value="tp_Shanghai">tp_Shanghai</option>
|
|
|
|
|
<option value="tp_Guilin">tp_Guilin</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
|
<a href="###" id="searchconfig" class="btn btn-info">查询配置</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<hr>
|
|
|
|
|
<div id="config_result">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -277,6 +295,31 @@ $(function(){
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//查询配置信息
|
|
|
|
|
$('#searchconfig').on('click',function(){
|
|
|
|
|
var destination = $('#search_confg_destination').val();
|
|
|
|
|
if(destination != ''){
|
|
|
|
|
$.ajax({
|
|
|
|
|
url : '/info.php/apps/tripadvisor_spider/index/get_production_code',
|
|
|
|
|
data : {destination : destination},
|
|
|
|
|
type:'POST',
|
|
|
|
|
success : function (json,status){
|
|
|
|
|
var jsondata = $.parseJSON(json);
|
|
|
|
|
var config_html = '';
|
|
|
|
|
for (var i=0;i<jsondata.length;i++){
|
|
|
|
|
var num = i+1;
|
|
|
|
|
config_html += '<div class="row"><div class="col-md-1">'+num+'</div>';
|
|
|
|
|
config_html += '<div class="col-md-2">'+jsondata[i].trc_code+'</div>';
|
|
|
|
|
config_html += '<div class="col-md-18">'+jsondata[i].trc_links+'</div>';
|
|
|
|
|
config_html += '<div class="col-md-3"><a href="###" id="deleteconfig" class="btn btn-danger" onclick="deleteconfig('+jsondata[i].trc_id+')">删除配置</a></div></div><hr>';
|
|
|
|
|
}
|
|
|
|
|
$('#config_result').html(config_html);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//excel导出抓取
|
|
|
|
|
$('#contentbyexcel').click(function(){
|
|
|
|
|
var fileArray = document.getElementById("file_excel").files;
|
|
|
|
@ -424,4 +467,22 @@ $(function(){
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function deleteconfig(id){
|
|
|
|
|
if(id != ''){
|
|
|
|
|
$.ajax({
|
|
|
|
|
url : '/info.php/apps/tripadvisor_spider/index/deleteconfig/',
|
|
|
|
|
data : {
|
|
|
|
|
config_id : id
|
|
|
|
|
},
|
|
|
|
|
type:'POST',
|
|
|
|
|
success:function(){
|
|
|
|
|
alert('配置已删除');
|
|
|
|
|
window.location.reload();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|