监测明细表增加 pkg 筛选项
This commit is contained in:
+4
-1
@@ -78,6 +78,7 @@
|
||||
<div class="fld"><label>dt 止</label><input type="date" id="fDtTo"></div>
|
||||
<div class="fld"><label>融合后campaign id (routing_campaign_id)</label><input type="text" id="fRc" placeholder="模糊匹配"></div>
|
||||
<div class="fld"><label>融合前campaign id (campaign_id)</label><input type="text" id="fCid" placeholder="模糊匹配"></div>
|
||||
<div class="fld"><label>pkg</label><input type="text" id="fPkg" placeholder="模糊匹配"></div>
|
||||
<div class="fld"><label>second_channel</label><select id="fSc"><option value="">全部</option></select></div>
|
||||
<div class="fld"><label>account</label><select id="fAcc"><option value="">全部</option></select></div>
|
||||
<button class="btn" id="applyBtn">筛选</button>
|
||||
@@ -161,6 +162,7 @@ function currentFilter(d){
|
||||
var to=inputToKey(document.getElementById('fDtTo').value);
|
||||
var rc=document.getElementById('fRc').value.trim().toLowerCase();
|
||||
var cid=document.getElementById('fCid').value.trim().toLowerCase();
|
||||
var pkg=document.getElementById('fPkg').value.trim().toLowerCase();
|
||||
var sc=document.getElementById('fSc').value;
|
||||
var acc=document.getElementById('fAcc').value;
|
||||
var k=dtKey(d.dt);
|
||||
@@ -168,6 +170,7 @@ function currentFilter(d){
|
||||
if(to!=null && k>to) return false;
|
||||
if(rc && String(d.routing_campaign_id).toLowerCase().indexOf(rc)<0) return false;
|
||||
if(cid && String(d.campaign_id).toLowerCase().indexOf(cid)<0) return false;
|
||||
if(pkg && String(d.pkg).toLowerCase().indexOf(pkg)<0) return false;
|
||||
if(sc && d.second_channel!==sc) return false;
|
||||
if(acc && d.account!==acc) return false;
|
||||
return true;
|
||||
@@ -254,7 +257,7 @@ document.querySelectorAll('#detailTable th.sortable').forEach(function(th){
|
||||
|
||||
document.getElementById('applyBtn').onclick=renderDetail;
|
||||
document.getElementById('resetBtn').onclick=function(){
|
||||
['fDtFrom','fDtTo','fRc','fCid'].forEach(function(id){document.getElementById(id).value='';});
|
||||
['fDtFrom','fDtTo','fRc','fCid','fPkg'].forEach(function(id){document.getElementById(id).value='';});
|
||||
document.getElementById('fSc').value=''; document.getElementById('fAcc').value='';
|
||||
renderDetail();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user