//window.location.protocol(设置或获取URL的协议部分)
var protocol = window.location.protocol;
//window.location.host(设置或获取URL的主机部分)
var host = window.location.host;
var serverURL_new=protocol+"//"+host;
console.log(serverURL_new)
var ss=encodeURI(serverURL_new+servletURL+"?viewlet="+path+"&sessionID="+aaa+"&op=export&format=excel");
window.location=ss;