Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop
This commit is contained in:
@@ -1038,7 +1038,12 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
// APP Payload
|
// APP Payload
|
||||||
if(region.getFunctionId().equals(563)) {
|
if(region.getFunctionId().equals(563)) {
|
||||||
commentStr=commentStr+"▶"+"L3_header:"+msgProp.getProperty("need_input")+"'headerType'"+"\n";
|
commentStr=commentStr+"▶"+"L3_header:"+msgProp.getProperty("need_input")+"'headerType', "+
|
||||||
|
msgProp.getProperty("no_need_input")+"'"+
|
||||||
|
msgProp.getProperty("key_word")+"'、'"+
|
||||||
|
msgProp.getProperty("match_method")+"'、'"+
|
||||||
|
msgProp.getProperty("is_hex")+"'、'"+
|
||||||
|
msgProp.getProperty("is_case_insenstive")+"'"+"\n";
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2612,4 +2617,59 @@ public class ExportExcel {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public <E> ExportExcel ajaxDataList(List<List<Object>>dataMap,String code){
|
||||||
|
for (int i = 0; i < dataMap.size(); i++) {
|
||||||
|
Row row = this.addRow(sheets.get(code),rownums.get(code),code);
|
||||||
|
int colunm = 0;
|
||||||
|
List<Object> list=dataMap.get(i);
|
||||||
|
for (int j = 0; j < list.size(); j++) {
|
||||||
|
this.addCell(row, colunm++,list.get(j), 0,null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ExportExcel(String titleName,String code,String titleTime,List<String> headerList){
|
||||||
|
this.wb = new SXSSFWorkbook(500);
|
||||||
|
int j=0;
|
||||||
|
sheets=new HashMap<>();
|
||||||
|
rownums=new HashMap<>();
|
||||||
|
Sheet sheet = wb.createSheet(titleName);
|
||||||
|
if(!StringUtils.isEmpty(titleTime)){
|
||||||
|
rownums.put(code, 1);
|
||||||
|
}else{
|
||||||
|
rownums.put(code, 0);
|
||||||
|
}
|
||||||
|
sheets.put(code, sheet);
|
||||||
|
this.styles = createStyles(wb);
|
||||||
|
if(!StringUtils.isEmpty(titleTime)){
|
||||||
|
//添加一行数据
|
||||||
|
CellRangeAddress callRangeAddress = new CellRangeAddress(0,0,0,headerList.size()-1);
|
||||||
|
CellStyle style = styles.get("data");
|
||||||
|
Row timeRow = sheet.createRow(0);
|
||||||
|
timeRow.setHeightInPoints(16);
|
||||||
|
Cell cellt = timeRow.createCell(0);
|
||||||
|
cellt.setCellValue(titleTime);
|
||||||
|
sheet.addMergedRegion(callRangeAddress);
|
||||||
|
sheet.autoSizeColumn(0);
|
||||||
|
setBorderStyle(CellStyle.BORDER_THIN,callRangeAddress,sheet,wb);
|
||||||
|
}
|
||||||
|
Integer rownum=rownums.get(code);
|
||||||
|
Row headerRow = sheet.createRow(rownum++);
|
||||||
|
headerRow.setHeightInPoints(16);
|
||||||
|
for (int i = 0; i < headerList.size(); i++) {
|
||||||
|
Cell cell = headerRow.createCell(i);
|
||||||
|
cell.setCellStyle(styles.get("header"));
|
||||||
|
cell.setCellValue(headerList.get(i));
|
||||||
|
sheet.autoSizeColumn(i);
|
||||||
|
}
|
||||||
|
for (int i = 0; i < headerList.size(); i++) {
|
||||||
|
int colWidth = sheet.getColumnWidth(i)*2;
|
||||||
|
sheet.setColumnWidth(i, colWidth < 3000 ? 3000 : colWidth);
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,41 +92,23 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
|||||||
StringBuffer errInfo = new StringBuffer();
|
StringBuffer errInfo = new StringBuffer();
|
||||||
AppComplexFeatureCfg baseStringCfg = new AppComplexFeatureCfg();
|
AppComplexFeatureCfg baseStringCfg = new AppComplexFeatureCfg();
|
||||||
BeanUtils.copyProperties(list.get(i), baseStringCfg);
|
BeanUtils.copyProperties(list.get(i), baseStringCfg);
|
||||||
// 配置描述、关键字长度限制
|
// 配置描述长度限制
|
||||||
if(baseStringCfg.getCfgDesc().length() > 128) {
|
if(baseStringCfg.getCfgDesc().length() > 128) {
|
||||||
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
|
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
|
||||||
}
|
}
|
||||||
if(baseStringCfg.getCfgKeywords().length() < 4 || baseStringCfg.getCfgKeywords().length() > 1024){
|
|
||||||
errInfo.append(prop.getProperty("key_word")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("min_length")+":4,"+prop.getProperty("max_length")+":1024") + ";");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (regionDict.getRegionType().equals(3)) {
|
if (regionDict.getRegionType().equals(3)) {
|
||||||
String keyword = baseStringCfg.getCfgKeywords();
|
String keyword = baseStringCfg.getCfgKeywords();
|
||||||
String district = baseStringCfg.getDistrict();
|
String district = baseStringCfg.getDistrict();
|
||||||
|
if(!district.equals("L3_header")) {// district="L3_header"时 不校验keyword
|
||||||
|
|
||||||
if (StringUtils.isBlank(keyword)) {
|
if (StringUtils.isBlank(keyword)) {
|
||||||
errInfo.append(
|
errInfo.append(
|
||||||
String.format(prop.getProperty("can_not_null"), prop.getProperty("key_word") + " ") + ";");
|
String.format(prop.getProperty("can_not_null"), prop.getProperty("key_word") + " ") + ";");
|
||||||
|
}else if(keyword.length() < 4 || keyword.length() > 1024){// 关键字长度限制
|
||||||
|
errInfo.append(prop.getProperty("key_word")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("min_length")+":4,"+prop.getProperty("max_length")+":1024") + ";");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(dirtrictP)) {
|
|
||||||
if (StringUtils.isBlank(district)) {
|
|
||||||
if (dirtrictP.indexOf(",") == -1) {
|
|
||||||
baseStringCfg.setDistrict(dirtrictP);
|
|
||||||
} else {
|
|
||||||
// baseStringCfg.setDistrict(dirtrictP.split(",")[0]);
|
|
||||||
errInfo.append(
|
|
||||||
String.format(prop.getProperty("can_not_null"), prop.getProperty("district") + " ")
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else if (dirtrictP.indexOf(district) == -1) {
|
|
||||||
errInfo.append(
|
|
||||||
String.format(prop.getProperty("is_incorrect"), prop.getProperty("district") + " ")
|
|
||||||
+ ";");
|
|
||||||
} else if (dirtrictP.indexOf("others")>-1&&district.equals("others")) {
|
|
||||||
//不允许自定义匹配区域导入
|
|
||||||
errInfo.append(prop.getProperty("district")+" "+
|
|
||||||
String.format(prop.getProperty("can_not_be"), " 'others'")+ ";");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mulityKeywordsP.equals("0")) {
|
if (mulityKeywordsP.equals("0")) {
|
||||||
if (keyword.indexOf("\n") > -1) {
|
if (keyword.indexOf("\n") > -1) {
|
||||||
errInfo.append(
|
errInfo.append(
|
||||||
@@ -165,6 +147,30 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(dirtrictP)) {
|
||||||
|
if (StringUtils.isBlank(district)) {
|
||||||
|
if (dirtrictP.indexOf(",") == -1) {
|
||||||
|
baseStringCfg.setDistrict(dirtrictP);
|
||||||
|
} else {
|
||||||
|
// baseStringCfg.setDistrict(dirtrictP.split(",")[0]);
|
||||||
|
errInfo.append(
|
||||||
|
String.format(prop.getProperty("can_not_null"), prop.getProperty("district") + " ")
|
||||||
|
+ ";");
|
||||||
|
}
|
||||||
|
} else if (dirtrictP.indexOf(district) == -1) {
|
||||||
|
errInfo.append(
|
||||||
|
String.format(prop.getProperty("is_incorrect"), prop.getProperty("district") + " ")
|
||||||
|
+ ";");
|
||||||
|
} else if (dirtrictP.indexOf("others")>-1&&district.equals("others")) {
|
||||||
|
//不允许自定义匹配区域导入
|
||||||
|
errInfo.append(prop.getProperty("district")+" "+
|
||||||
|
String.format(prop.getProperty("can_not_be"), " 'others'")+ ";");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!district.equals("L3_header")) {// district="L3_header"时 不校验exprType、matchMethod、isHex、isCaseInsenstive,为固定值
|
||||||
Integer exprType = baseStringCfg.getExprType();
|
Integer exprType = baseStringCfg.getExprType();
|
||||||
boolean has = false;
|
boolean has = false;
|
||||||
if (exprType == null) {
|
if (exprType == null) {
|
||||||
@@ -305,7 +311,7 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
|||||||
errInfo.append(prop.getProperty("hex_case_insensitive")+ ";");
|
errInfo.append(prop.getProperty("hex_case_insensitive")+ ";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// APP Payload L3_HEADER的特殊属性限制
|
// APP Payload L3_HEADER的特殊属性限制
|
||||||
if(baseStringCfg.getDistrict().equals("L3_header")) {
|
if(baseStringCfg.getDistrict().equals("L3_header")) {
|
||||||
String headerType = baseStringCfg.getHeaderType();
|
String headerType = baseStringCfg.getHeaderType();
|
||||||
@@ -318,7 +324,13 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
|||||||
}else{
|
}else{
|
||||||
appMultiFeatureCfgService.checkImportAppPayload(baseStringCfg, errInfo, prop);
|
appMultiFeatureCfgService.checkImportAppPayload(baseStringCfg, errInfo, prop);
|
||||||
}
|
}
|
||||||
|
if (errInfo.toString().length() == 0) {
|
||||||
appMultiFeatureCfgService.setL3HeaderKeyword(baseStringCfg);
|
appMultiFeatureCfgService.setL3HeaderKeyword(baseStringCfg);
|
||||||
|
}
|
||||||
|
baseStringCfg.setIsHexbin(1);
|
||||||
|
baseStringCfg.setIsCaseInsenstive(0);
|
||||||
|
baseStringCfg.setExprType(3);
|
||||||
|
baseStringCfg.setMatchMethod(0);
|
||||||
}else {
|
}else {
|
||||||
baseStringCfg.setHeaderType(null);
|
baseStringCfg.setHeaderType(null);
|
||||||
baseStringCfg.setVer(null);
|
baseStringCfg.setVer(null);
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.nis.web.controller.report;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.apache.commons.lang.StringEscapeUtils;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import com.nis.web.controller.BaseController;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("${adminPath}/export")
|
||||||
|
public class ExportController extends BaseController {
|
||||||
|
|
||||||
|
@RequestMapping(value = "ajaxExport")
|
||||||
|
public void ajaxExport(String exports,HttpServletRequest request,HttpServletResponse response) throws Exception{
|
||||||
|
JSONObject jsonObject = JSONObject.fromObject(StringEscapeUtils.unescapeHtml(exports));
|
||||||
|
Map<String,Object> map=JSONObject.fromObject(jsonObject);
|
||||||
|
List<List<Object>> list=(List<List<Object>>) map.get("book");
|
||||||
|
List<String> heard=(List<String>) map.get("heard");
|
||||||
|
String titleTime=String.valueOf(map.get("titleTime"));
|
||||||
|
String titleCode=String.valueOf(map.get("titleCode"));
|
||||||
|
_ajaxExport(request,response,titleCode, titleTime, heard, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -581,7 +581,7 @@ public class AppMultiFeatureCfgService extends BaseService {
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((count >0 || count <5) && (!errorFlag) && (ipHeaderFlag)) {// 清空错误信息
|
if((0<count) && (count<5) && (!errorFlag) && (ipHeaderFlag)) {// 清空错误信息
|
||||||
errInfo.setLength(0);;
|
errInfo.setLength(0);;
|
||||||
errInfo.append(errInfoCopy);
|
errInfo.append(errInfoCopy);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1117,11 +1117,11 @@ access_policy=Access Policy
|
|||||||
nat_policy=NAT Policy
|
nat_policy=NAT Policy
|
||||||
dns_policy_object=DNS Policy Object
|
dns_policy_object=DNS Policy Object
|
||||||
proxy_policy_object=Proxy Policy Object
|
proxy_policy_object=Proxy Policy Object
|
||||||
APP_PAYLOAD_ADMIN=APP Payload Admin
|
APP_PAYLOAD_ADMIN=APP Payload Feature
|
||||||
APP_HTTP_ADMIN=APP HTTP Admin
|
APP_HTTP_ADMIN=APP HTTP Feature
|
||||||
APP_DNS_ADMIN=APP DNS Admin
|
APP_DNS_ADMIN=APP DNS Feature
|
||||||
APP_SSL_ADMIN=APP SSL Admin
|
APP_SSL_ADMIN=APP SSL Feature
|
||||||
APP_DK_GL=APP DK GL Admin
|
APP_DK_GL=APP DK GL Feature
|
||||||
dnat_ip_complex_loop=DNAT Reuse Policy Loop
|
dnat_ip_complex_loop=DNAT Reuse Policy Loop
|
||||||
snat_ip_complex_loop=SNAT Reuse Policy Loop
|
snat_ip_complex_loop=SNAT Reuse Policy Loop
|
||||||
snat_ip_reuse_adress_pool_loop=SNAT Address Pool Loop
|
snat_ip_reuse_adress_pool_loop=SNAT Address Pool Loop
|
||||||
@@ -1445,3 +1445,4 @@ hex_minlength_8=Please enter a hexadecimal string of length 8
|
|||||||
hex_minlength_16=Please enter a hexadecimal string of length 16
|
hex_minlength_16=Please enter a hexadecimal string of length 16
|
||||||
need_input=Attributes need to be filled in
|
need_input=Attributes need to be filled in
|
||||||
max_input=Fill in at most four
|
max_input=Fill in at most four
|
||||||
|
no_need_input=Attributes no need to be filled in
|
||||||
@@ -1117,11 +1117,11 @@ access_policy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0434\u043e\u043
|
|||||||
nat_policy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 NAT
|
nat_policy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 NAT
|
||||||
dns_policy_object=\u041e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 DNS
|
dns_policy_object=\u041e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 DNS
|
||||||
proxy_policy_object=\u041e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438
|
proxy_policy_object=\u041e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438
|
||||||
APP_PAYLOAD_ADMIN=\u0410\u0434\u043c\u0438\u043d. \u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f
|
APP_PAYLOAD_ADMIN=\u041F\u043E\u043B\u0435\u0437\u043D\u0430\u044F \u041D\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u041F\u0440\u0438\u0437\u043D\u0430\u043A\u0438 \u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439
|
||||||
APP_HTTP_ADMIN=\u0410\u0434\u043c\u0438\u043d. HTTP \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f
|
APP_HTTP_ADMIN= HTTP \u041F\u0440\u0438\u0437\u043D\u0430\u043A\u0438 \u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439
|
||||||
APP_DNS_ADMIN=\u0410\u0434\u043c\u0438\u043d. DNS \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f
|
APP_DNS_ADMIN= DNS \u041F\u0440\u0438\u0437\u043D\u0430\u043A\u0438 \u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439
|
||||||
APP_SSL_ADMIN=\u0410\u0434\u043c\u0438\u043d. SSL \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f
|
APP_SSL_ADMIN=SSL \u041F\u0440\u0438\u0437\u043D\u0430\u043A\u0438 \u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439
|
||||||
APP_DK_GL=\u0410\u0434\u043c\u0438\u043d. DK GL \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f
|
APP_DK_GL=DK GL \u041F\u0440\u0438\u0437\u043D\u0430\u043A\u0438 \u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439
|
||||||
dnat_ip_complex_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f DNAT
|
dnat_ip_complex_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f DNAT
|
||||||
snat_ip_complex_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f SNAT
|
snat_ip_complex_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f SNAT
|
||||||
snat_ip_reuse_adress_pool_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u0443\u043b\u0430 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 SNAT
|
snat_ip_reuse_adress_pool_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u0443\u043b\u0430 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 SNAT
|
||||||
@@ -1449,3 +1449,4 @@ hex_minlength_8=Please enter a hexadecimal string of length 8
|
|||||||
hex_minlength_16=Please enter a hexadecimal string of length 16
|
hex_minlength_16=Please enter a hexadecimal string of length 16
|
||||||
need_input=Attributes need to be filled in
|
need_input=Attributes need to be filled in
|
||||||
max_input=Fill in at most four
|
max_input=Fill in at most four
|
||||||
|
no_need_input=Attributes no need to be filled in
|
||||||
@@ -1445,3 +1445,4 @@ hex_minlength_8=\u8BF7\u8F93\u5165\u957F\u5EA6\u4E3A8\u7684\u5341\u516D\u8FDB\u5
|
|||||||
hex_minlength_16=\u8BF7\u8F93\u5165\u957F\u5EA6\u4E3A16\u7684\u5341\u516D\u8FDB\u5236\u5B57\u7B26\u4E32
|
hex_minlength_16=\u8BF7\u8F93\u5165\u957F\u5EA6\u4E3A16\u7684\u5341\u516D\u8FDB\u5236\u5B57\u7B26\u4E32
|
||||||
need_input=\u9700\u8981\u586B\u5199\u5C5E\u6027
|
need_input=\u9700\u8981\u586B\u5199\u5C5E\u6027
|
||||||
max_input=\u6700\u591A\u586B\u5199\u56DB\u4E2A
|
max_input=\u6700\u591A\u586B\u5199\u56DB\u4E2A
|
||||||
|
no_need_input=\u65E0\u9700\u586B\u5199\u5C5E\u6027
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||||
<script>
|
<script>
|
||||||
function pagination() {
|
function pagination(pageSizes) {
|
||||||
|
|
||||||
pageNo = 1;
|
pageNo = 1;
|
||||||
count = $('tbody').children().size();// 总记录数
|
count = $('tbody').children().size();// 总记录数
|
||||||
@@ -15,8 +15,10 @@ function pagination() {
|
|||||||
//$('tbody').children().slice(0, preCount).remove();
|
//$('tbody').children().slice(0, preCount).remove();
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
if(pageSizes==null || pageSizes=='' ){
|
||||||
pageSize = 30; // 页面大小
|
pageSizes=30;
|
||||||
|
}
|
||||||
|
pageSize = pageSizes; // 页面大小
|
||||||
first = 1;// 首页索引
|
first = 1;// 首页索引
|
||||||
last = Math.ceil(count/pageSize);// 尾页索引
|
last = Math.ceil(count/pageSize);// 尾页索引
|
||||||
length = 8;// 显示页面长度
|
length = 8;// 显示页面长度
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<input id="beginDate" name="beginDate" type="text"
|
<input id="beginDate" name="beginDate" type="text"
|
||||||
readonly="readonly" class="form-control Wdate input-medium"
|
readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value=""
|
value=""
|
||||||
onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
onclick="WdatePicker({onpicked:setTime(7),dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -45,10 +45,12 @@
|
|||||||
<span class="selectpicker form-control"><spring:message
|
<span class="selectpicker form-control"><spring:message
|
||||||
code="end_date" /></span>
|
code="end_date" /></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="endDate" name="endDate" type="text"
|
<!-- <input id="endDate" name="endDate" type="text"
|
||||||
readonly="readonly" class="form-control Wdate input-medium"
|
readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value=""
|
value=""
|
||||||
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});" />
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});" /> -->
|
||||||
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(7) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -76,11 +78,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script> --%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/export-csv.js"></script>
|
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -109,6 +110,8 @@
|
|||||||
// loading();
|
// loading();
|
||||||
var start = $("#beginDate").val();
|
var start = $("#beginDate").val();
|
||||||
var end = $("#endDate").val();
|
var end = $("#endDate").val();
|
||||||
|
$("#beginDateh").val(start);
|
||||||
|
$("#endDateh").val(end);
|
||||||
if (start == '' || end == '' || end == null || start == null) {
|
if (start == '' || end == '' || end == null || start == null) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
} else {
|
} else {
|
||||||
@@ -118,10 +121,11 @@
|
|||||||
// 局点信息
|
// 局点信息
|
||||||
function showActionTransChart(xData,series) {
|
function showActionTransChart(xData,series) {
|
||||||
var nowDate=new Date();
|
var nowDate=new Date();
|
||||||
|
Highcharts.setOptions({ global: { useUTC: false } });
|
||||||
var chart = Highcharts.chart('chart',
|
var chart = Highcharts.chart('chart',
|
||||||
{
|
{
|
||||||
chart : {
|
chart : {
|
||||||
// type: 'area',
|
type: 'area',
|
||||||
zoomType : 'x'
|
zoomType : 'x'
|
||||||
},
|
},
|
||||||
noData:{
|
noData:{
|
||||||
@@ -163,8 +167,16 @@
|
|||||||
},
|
},
|
||||||
}, */
|
}, */
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type:'category',
|
type:'datetime',
|
||||||
categories: xData,
|
dateTimeLabelFormats: {
|
||||||
|
second: '%H:%M:%S',
|
||||||
|
minute: '%H:%M',
|
||||||
|
hour: '%H:%M',
|
||||||
|
day: '%m-%d',
|
||||||
|
week: '%m-%d',
|
||||||
|
month: '%Y-%m',
|
||||||
|
year: '%Y'
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'time',
|
text: 'time',
|
||||||
align:'high',
|
align:'high',
|
||||||
@@ -179,6 +191,18 @@
|
|||||||
},
|
},
|
||||||
min:0
|
min:0
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
||||||
|
second: '%Y-%m-%d %H:%M:%S',
|
||||||
|
minute: '%Y-%m-%d %H:%M:%S',
|
||||||
|
hour: '%Y-%m-%d %H:%M:%S',
|
||||||
|
day: '%Y-%m-%d %H:%M:%S',
|
||||||
|
week: '%Y-%m-%d %H:%M:%S',
|
||||||
|
month: '%Y-%m-%d %H:%M:%S',
|
||||||
|
year: '%Y-%m-%d %H:%M:%S'
|
||||||
|
}
|
||||||
|
},
|
||||||
credits : {//是否有highcharts水印
|
credits : {//是否有highcharts水印
|
||||||
enabled : false
|
enabled : false
|
||||||
},
|
},
|
||||||
@@ -216,16 +240,19 @@
|
|||||||
var series = new Array();
|
var series = new Array();
|
||||||
var total = 0;
|
var total = 0;
|
||||||
if(rs!=null){
|
if(rs!=null){
|
||||||
$(rs.sum).each(function(i,d) {
|
/* $(rs.sum).each(function(i,d) {
|
||||||
total+=d
|
total+=d
|
||||||
})
|
})
|
||||||
xData = rs.statTime;
|
xData = rs.statTime; */
|
||||||
data =rs.sum;
|
data =rs.result;
|
||||||
}
|
}
|
||||||
$("#total").val(JSON.stringify(total));
|
$("#total").val(JSON.stringify(rs.sum));
|
||||||
series.push({
|
series.push({
|
||||||
name: 'sum',
|
name: 'sum',
|
||||||
data: data
|
data: data,
|
||||||
|
marker: {
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
});
|
});
|
||||||
showActionTransChart(xData,series);
|
showActionTransChart(xData,series);
|
||||||
closeTip();
|
closeTip();
|
||||||
@@ -241,12 +268,37 @@
|
|||||||
}
|
}
|
||||||
(function(H) {
|
(function(H) {
|
||||||
H.Chart.prototype.downloadXLS = function() {
|
H.Chart.prototype.downloadXLS = function() {
|
||||||
var div = document.createElement('div'), xlsxRows = [], xlsxColumns = [];
|
|
||||||
var nowDate=new Date();
|
var nowDate=new Date();
|
||||||
|
var start=$("#beginDateh").val();
|
||||||
|
var end=$("#endDateh").val();
|
||||||
|
/* var div = document.createElement('div'), xlsxRows = [], xlsxColumns = [];
|
||||||
div.style.display = 'none';
|
div.style.display = 'none';
|
||||||
document.body.appendChild(div);
|
document.body.appendChild(div); */
|
||||||
rows = this.getDataRows(true);
|
var rows = this.getDataRows(true);
|
||||||
xlsxRows = H.map(rows.slice(1), function(row) {
|
/* 调用后台接口导出 */
|
||||||
|
var total=[];
|
||||||
|
var totalVlue = JSON.parse($("#total").val());
|
||||||
|
var map={};
|
||||||
|
$(rows).each(function(i,d){
|
||||||
|
// 去掉多余属性
|
||||||
|
delete d.name;
|
||||||
|
delete d.x;
|
||||||
|
delete d.xValues;
|
||||||
|
})
|
||||||
|
total.push('<spring:message code="report_total"/>',totalVlue);
|
||||||
|
rows.shift(); // 删除一个重复行
|
||||||
|
var heard = rows.shift(); // 删除一个重复行
|
||||||
|
rows.push(total)
|
||||||
|
var title=[];
|
||||||
|
title.push('<spring:message code="${searchAction}"></spring:message>',start+"--"+end);
|
||||||
|
map["titleTime"]=title;
|
||||||
|
map["heard"]=heard;
|
||||||
|
map["book"]=rows;
|
||||||
|
map["titleCode"]='<spring:message code="${searchAction}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds();
|
||||||
|
var exports = JSON.stringify(map);
|
||||||
|
aJaxImportPost("${ctx}/export/ajaxExport",{"exports":exports});
|
||||||
|
|
||||||
|
/* xlsxRows = H.map(rows.slice(1), function(row) {
|
||||||
return H.map(row, function(column) {
|
return H.map(row, function(column) {
|
||||||
return {
|
return {
|
||||||
type : typeof column === 'number' ? 'number' : 'string',
|
type : typeof column === 'number' ? 'number' : 'string',
|
||||||
@@ -283,7 +335,7 @@
|
|||||||
sheet : {
|
sheet : {
|
||||||
data : xlsxRows
|
data : xlsxRows
|
||||||
}
|
}
|
||||||
});
|
}); */
|
||||||
};
|
};
|
||||||
}(Highcharts));
|
}(Highcharts));
|
||||||
|
|
||||||
@@ -291,9 +343,9 @@
|
|||||||
H.Chart.prototype.downloadCSV = function() {
|
H.Chart.prototype.downloadCSV = function() {
|
||||||
var rows = this.getDataRows(true);
|
var rows = this.getDataRows(true);
|
||||||
var data=new Array();
|
var data=new Array();
|
||||||
var total = total = JSON.parse($("#total").val());
|
var total = JSON.parse($("#total").val());
|
||||||
$(rows).each(function (i,d){
|
$(rows).each(function (i,d){
|
||||||
if(d!=null){
|
if(d!=null&&i>0){
|
||||||
data.push({
|
data.push({
|
||||||
num1:d[0],
|
num1:d[0],
|
||||||
num2:d[1]
|
num2:d[1]
|
||||||
@@ -301,11 +353,11 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
data.push({
|
data.push({
|
||||||
num1:"<spring:message code='total'/>",
|
num1:"<spring:message code='report_total'/>",
|
||||||
num2:total
|
num2:total
|
||||||
})
|
})
|
||||||
var start = $("#beginDate").val();
|
var start = $("#beginDateh").val();
|
||||||
var end = $("#endDate").val();
|
var end = $("#endDateh").val();
|
||||||
exportCsv({
|
exportCsv({
|
||||||
title:["<spring:message code='${searchAction}'/>",start+"--"+end],
|
title:["<spring:message code='${searchAction}'/>",start+"--"+end],
|
||||||
titleForKey:["num1","num2"],
|
titleForKey:["num1","num2"],
|
||||||
|
|||||||
@@ -27,8 +27,10 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/> -->
|
||||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
value="" onclick="WdatePicker({el:'beginDate',onpicked:setTime(7),dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}' })" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -36,8 +38,10 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/> -->
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/>
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(7) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -58,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>--%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
||||||
@@ -91,6 +95,8 @@ function searchList(){
|
|||||||
loading();
|
loading();
|
||||||
var start=$("#beginDate").val();
|
var start=$("#beginDate").val();
|
||||||
var end=$("#endDate").val();
|
var end=$("#endDate").val();
|
||||||
|
$("#beginDateh").val(start);
|
||||||
|
$("#endDateh").val(end);
|
||||||
if(start==''||end==''||end==null||start==null){
|
if(start==''||end==''||end==null||start==null){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}else{
|
}else{
|
||||||
@@ -100,9 +106,10 @@ function searchList(){
|
|||||||
// 局点信息
|
// 局点信息
|
||||||
function showActionTransChart(xData,series){
|
function showActionTransChart(xData,series){
|
||||||
var nowDate=new Date();
|
var nowDate=new Date();
|
||||||
|
Highcharts.setOptions({ global: { useUTC: false } });
|
||||||
var chart = Highcharts.chart('chart', {
|
var chart = Highcharts.chart('chart', {
|
||||||
chart:{
|
chart:{
|
||||||
// type: 'area',
|
type: 'area',
|
||||||
zoomType: 'x'
|
zoomType: 'x'
|
||||||
},
|
},
|
||||||
exporting: {
|
exporting: {
|
||||||
@@ -133,15 +140,23 @@ function showActionTransChart(xData,series){
|
|||||||
text: null
|
text: null
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type:'category',
|
type:'datetime',
|
||||||
categories: xData,
|
dateTimeLabelFormats: {
|
||||||
|
second: '%H:%M:%S',
|
||||||
|
minute: '%H:%M',
|
||||||
|
hour: '%H:%M',
|
||||||
|
day: '%m-%d',
|
||||||
|
week: '%m-%d',
|
||||||
|
month: '%Y-%m',
|
||||||
|
year: '%Y'
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'time',
|
text: 'time',
|
||||||
align:'high',
|
align:'high',
|
||||||
},
|
},
|
||||||
labels: {
|
labels: {
|
||||||
rotation: -45, //倾斜的角度
|
rotation: -45, //倾斜的角度
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
title: {
|
title: {
|
||||||
@@ -149,6 +164,18 @@ function showActionTransChart(xData,series){
|
|||||||
},
|
},
|
||||||
min:0
|
min:0
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
||||||
|
second: '%Y-%m-%d %H:%M:%S',
|
||||||
|
minute: '%Y-%m-%d %H:%M:%S',
|
||||||
|
hour: '%Y-%m-%d %H:%M:%S',
|
||||||
|
day: '%Y-%m-%d %H:%M:%S',
|
||||||
|
week: '%Y-%m-%d %H:%M:%S',
|
||||||
|
month: '%Y-%m-%d %H:%M:%S',
|
||||||
|
year: '%Y-%m-%d %H:%M:%S'
|
||||||
|
}
|
||||||
|
},
|
||||||
credits:{//是否有highcharts水印
|
credits:{//是否有highcharts水印
|
||||||
enabled:false
|
enabled:false
|
||||||
},
|
},
|
||||||
@@ -185,10 +212,9 @@ function showActionTransChart(xData,series){
|
|||||||
var series=new Array();
|
var series=new Array();
|
||||||
var total=[];
|
var total=[];
|
||||||
if(rs!=null&&rs.length>0){
|
if(rs!=null&&rs.length>0){
|
||||||
xData=rs[0].statTime;
|
|
||||||
$(rs).each(function(i, d) {
|
$(rs).each(function(i, d) {
|
||||||
total.push(
|
total.push(
|
||||||
sum(d.count)
|
d.sum
|
||||||
)
|
)
|
||||||
var entrance="";
|
var entrance="";
|
||||||
if(d!=null&&d.entranceId==1){
|
if(d!=null&&d.entranceId==1){
|
||||||
@@ -199,7 +225,10 @@ function showActionTransChart(xData,series){
|
|||||||
}
|
}
|
||||||
series.push({
|
series.push({
|
||||||
name: entrance,
|
name: entrance,
|
||||||
data: d.count
|
data: d.result,
|
||||||
|
marker: {
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
@@ -226,15 +255,38 @@ function showActionTransChart(xData,series){
|
|||||||
(function(H) {
|
(function(H) {
|
||||||
var nowDate=new Date();
|
var nowDate=new Date();
|
||||||
H.Chart.prototype.downloadXLS = function() {
|
H.Chart.prototype.downloadXLS = function() {
|
||||||
var start=$("#beginDate").val();
|
var start=$("#beginDateh").val();
|
||||||
var end=$("#endDate").val();
|
var end=$("#endDateh").val();
|
||||||
var div = document.createElement('div'),
|
var div = document.createElement('div'),
|
||||||
xlsxRows = [],
|
xlsxRows = [],
|
||||||
xlsxColumns = [];
|
xlsxColumns = [];
|
||||||
div.style.display = 'none';
|
div.style.display = 'none';
|
||||||
document.body.appendChild(div);
|
document.body.appendChild(div);
|
||||||
rows = this.getDataRows(true);
|
rows = this.getDataRows(true);
|
||||||
xlsxRows = H.map(rows.slice(1), function(row) {
|
/* 调用后台接口导出 */
|
||||||
|
var total = JSON.parse($("#total").val());
|
||||||
|
var map={};
|
||||||
|
$(rows).each(function(i,d){
|
||||||
|
// 去掉多余属性
|
||||||
|
delete d.name;
|
||||||
|
delete d.x;
|
||||||
|
delete d.xValues;
|
||||||
|
})
|
||||||
|
total.unshift('<spring:message code="report_total"/>');
|
||||||
|
rows.shift(); // 删除一个重复行
|
||||||
|
var heard = rows.shift(); // 删除一个重复行
|
||||||
|
rows.push(total)
|
||||||
|
var title=[];
|
||||||
|
title.push('<spring:message code="${searchAction}"></spring:message>',start+"--"+end);
|
||||||
|
map["titleTime"]=title;
|
||||||
|
map["heard"]=heard;
|
||||||
|
map["book"]=rows;
|
||||||
|
map["titleCode"]='<spring:message code="${searchAction}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds();
|
||||||
|
var exports = JSON.stringify(map);
|
||||||
|
aJaxImportPost("${ctx}/export/ajaxExport",{"exports":exports});
|
||||||
|
|
||||||
|
|
||||||
|
/* xlsxRows = H.map(rows.slice(1), function(row) {
|
||||||
return H.map(row, function(column) {
|
return H.map(row, function(column) {
|
||||||
return {
|
return {
|
||||||
type: typeof column === 'number' ? 'number' : 'string',
|
type: typeof column === 'number' ? 'number' : 'string',
|
||||||
@@ -281,7 +333,7 @@ function showActionTransChart(xData,series){
|
|||||||
sheet: {
|
sheet: {
|
||||||
data: xlsxRows
|
data: xlsxRows
|
||||||
}
|
}
|
||||||
});
|
}); */
|
||||||
};
|
};
|
||||||
}(Highcharts));
|
}(Highcharts));
|
||||||
(function(H) {
|
(function(H) {
|
||||||
@@ -301,11 +353,11 @@ function showActionTransChart(xData,series){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
data.push({
|
data.push({
|
||||||
num1:"<spring:message code='total'/>",
|
num1:"<spring:message code='report_total'/>",
|
||||||
num2:total
|
num2:total
|
||||||
})
|
})
|
||||||
var start = $("#beginDate").val();
|
var start = $("#beginDateh").val();
|
||||||
var end = $("#endDate").val();
|
var end = $("#endDateh").val();
|
||||||
exportCsv({
|
exportCsv({
|
||||||
title:["<spring:message code='${searchAction}'/>",start+"--"+end],
|
title:["<spring:message code='${searchAction}'/>",start+"--"+end],
|
||||||
titleForKey:["num1","num2","num3"],
|
titleForKey:["num1","num2","num3"],
|
||||||
|
|||||||
@@ -42,8 +42,12 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<%-- <input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="${beginDate}" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
value="${beginDate}" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/> --%>
|
||||||
|
<input id="beginDate" name="beginDate" type="text"
|
||||||
|
readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value=""
|
||||||
|
onclick="WdatePicker({onpicked:setTime(7),dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -52,7 +56,7 @@
|
|||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="${endDate}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/>
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(7) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -115,7 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>--%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
||||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||||
@@ -445,7 +449,17 @@ function protocolTypeChart(rs){
|
|||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
headerFormat: '{series.name}<br>',
|
headerFormat: '{series.name}<br>',
|
||||||
pointFormat: '{point.name}: <b>{point.percentage:.2f}%</b>'
|
pointFormat: '{point.name}: <b>{point.percentage:.2f}%</b>',
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
||||||
|
second: '%Y-%m-%d %H:%M:%S',
|
||||||
|
minute: '%Y-%m-%d %H:%M:%S',
|
||||||
|
hour: '%Y-%m-%d %H:%M:%S',
|
||||||
|
day: '%Y-%m-%d %H:%M:%S',
|
||||||
|
week: '%Y-%m-%d %H:%M:%S',
|
||||||
|
month: '%Y-%m-%d %H:%M:%S',
|
||||||
|
year: '%Y-%m-%d %H:%M:%S'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
name: "App",
|
name: "App",
|
||||||
|
|||||||
@@ -32,8 +32,10 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/> -->
|
||||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
value="" onclick="WdatePicker({el:'beginDate',onpicked:setTime(1),dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}' })" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -41,8 +43,10 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{H:24})}'});"/> -->
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{H:24})}'});"/>
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(1) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -122,6 +126,8 @@ function searchList(){
|
|||||||
loading();
|
loading();
|
||||||
var start=$("#beginDate").val();
|
var start=$("#beginDate").val();
|
||||||
var end=$("#endDate").val();
|
var end=$("#endDate").val();
|
||||||
|
$("#beginDateh").val(start);
|
||||||
|
$("#endDateh").val(end);
|
||||||
if(start==''||end==''||end==null||start==null){
|
if(start==''||end==''||end==null||start==null){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}else{
|
}else{
|
||||||
@@ -383,20 +389,51 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
|
|||||||
}, */
|
}, */
|
||||||
series:ydata
|
series:ydata
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
(function(H) {
|
(function(H) {
|
||||||
H.Chart.prototype.downloadXLS = function() {
|
H.Chart.prototype.downloadXLS = function() {
|
||||||
var nowDate=new Date();
|
var nowDate=new Date();
|
||||||
var start=$("#beginDate").val();
|
var start=$("#beginDateh").val();
|
||||||
var end=$("#endDate").val();
|
var end=$("#endDateh").val();
|
||||||
var div = document.createElement('div'),
|
var div = document.createElement('div'),
|
||||||
xlsxRows = [],
|
xlsxRows = [],
|
||||||
xlsxColumns = [];
|
xlsxColumns = [];
|
||||||
div.style.display = 'none';
|
div.style.display = 'none';
|
||||||
document.body.appendChild(div);
|
document.body.appendChild(div);
|
||||||
rows = this.getDataRows(true);
|
rows = this.getDataRows(true);
|
||||||
xlsxRows = H.map(rows.slice(1), function(row) {
|
/* 调用后台接口导出 */
|
||||||
|
var total = [];
|
||||||
|
var map={};
|
||||||
|
$(rows).each(function(i,d){
|
||||||
|
if(d!=null){
|
||||||
|
if(i==0){
|
||||||
|
if(d[0].indexOf("Astana") != -1){
|
||||||
|
total=JSON.parse($("#total").val());
|
||||||
|
}
|
||||||
|
if(d[0].indexOf("Alamty") != -1){
|
||||||
|
total=JSON.parse($("#total2").val());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 去掉多余属性
|
||||||
|
delete d.name;
|
||||||
|
delete d.x;
|
||||||
|
delete d.xValues;
|
||||||
|
})
|
||||||
|
total.unshift('<spring:message code="report_total"/>');
|
||||||
|
rows.shift(); // 删除一个重复行
|
||||||
|
var heard = rows.shift(); // 删除一个重复行
|
||||||
|
rows.push(total)
|
||||||
|
var title=[];
|
||||||
|
title.push('<spring:message code="traffic"></spring:message>',start+"--"+end);
|
||||||
|
map["titleTime"]=title;
|
||||||
|
map["heard"]=heard;
|
||||||
|
map["book"]=rows;
|
||||||
|
map["titleCode"]='<spring:message code="traffic"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds();
|
||||||
|
var exports = JSON.stringify(map);
|
||||||
|
aJaxImportPost("${ctx}/export/ajaxExport",{"exports":exports});
|
||||||
|
|
||||||
|
/* xlsxRows = H.map(rows.slice(1), function(row) {
|
||||||
return H.map(row, function(column) {
|
return H.map(row, function(column) {
|
||||||
return {
|
return {
|
||||||
type: typeof column === 'number' ? 'number' : 'string',
|
type: typeof column === 'number' ? 'number' : 'string',
|
||||||
@@ -433,26 +470,23 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
|
|||||||
b.push({
|
b.push({
|
||||||
type:"string",
|
type:"string",
|
||||||
value:start+'--'+end
|
value:start+'--'+end
|
||||||
})
|
}); */
|
||||||
xlsxRows.unshift(b)
|
// xlsxRows.unshift(b)
|
||||||
|
/* zipcelx({
|
||||||
|
|
||||||
|
|
||||||
zipcelx({
|
|
||||||
filename: '<spring:message code="traffic"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(),
|
filename: '<spring:message code="traffic"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(),
|
||||||
sheet: {
|
sheet: {
|
||||||
data: xlsxRows
|
data: xlsxRows
|
||||||
}
|
}
|
||||||
});
|
}); */
|
||||||
};
|
};
|
||||||
}(Highcharts));
|
}(Highcharts));
|
||||||
|
|
||||||
function setTime(){
|
/* function setTime(){
|
||||||
var chooseDate=new Date($('#beginDate').val());
|
var chooseDate=new Date($('#beginDate').val());
|
||||||
chooseDate=chooseDate.setDate(chooseDate.getDate()+1);
|
chooseDate=chooseDate.setDate(chooseDate.getDate()+1);
|
||||||
var modifyTime=new Date(chooseDate);
|
var modifyTime=new Date(chooseDate);
|
||||||
$('#endDate').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
$('#endDate').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
||||||
}
|
} */
|
||||||
(function(H) {
|
(function(H) {
|
||||||
H.Chart.prototype.downloadCSV = function() {
|
H.Chart.prototype.downloadCSV = function() {
|
||||||
var rows = this.getDataRows(true);
|
var rows = this.getDataRows(true);
|
||||||
@@ -475,13 +509,12 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(total)
|
|
||||||
data.push({
|
data.push({
|
||||||
num1:"<spring:message code='total'/>",
|
num1:"<spring:message code='report_total'/>",
|
||||||
num2:total
|
num2:total
|
||||||
})
|
})
|
||||||
var start = $("#beginDate").val();
|
var start = $("#beginDateh").val();
|
||||||
var end = $("#endDate").val();
|
var end = $("#endDateh").val();
|
||||||
exportCsv({
|
exportCsv({
|
||||||
title:["<spring:message code='traffic'/>",start+"--"+end],
|
title:["<spring:message code='traffic'/>",start+"--"+end],
|
||||||
titleForKey:["num1","num2","num3"],
|
titleForKey:["num1","num2","num3"],
|
||||||
|
|||||||
@@ -65,14 +65,19 @@ $(document).ready(function(){
|
|||||||
var xData=new Array();
|
var xData=new Array();
|
||||||
var series=new Array();
|
var series=new Array();
|
||||||
var total = 0;
|
var total = 0;
|
||||||
|
console.log(rs)
|
||||||
if(rs!=null&&rs.length>0){
|
if(rs!=null&&rs.length>0){
|
||||||
xData=rs[0].statTime;
|
/* xData=rs[0].statTime;
|
||||||
$(rs[0].count).each(function(i,d) {
|
$(rs[0].count).each(function(i,d) {
|
||||||
total+=d
|
total+=d
|
||||||
})
|
})*/
|
||||||
|
total=rs[0].sum;
|
||||||
series.push({
|
series.push({
|
||||||
name: 'unique',
|
name: 'unique',
|
||||||
data: rs[0].count
|
data: rs[0].result,
|
||||||
|
marker: {
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
series.push({
|
series.push({
|
||||||
@@ -98,7 +103,7 @@ function showDomainTrans(xData,series){
|
|||||||
var domainName= $("#domainName").val();
|
var domainName= $("#domainName").val();
|
||||||
var chart = Highcharts.chart('chart', {
|
var chart = Highcharts.chart('chart', {
|
||||||
chart:{
|
chart:{
|
||||||
// type: 'area',
|
type: 'area',
|
||||||
zoomType: 'x'
|
zoomType: 'x'
|
||||||
},
|
},
|
||||||
exporting: {
|
exporting: {
|
||||||
@@ -129,8 +134,16 @@ function showDomainTrans(xData,series){
|
|||||||
text: domainName
|
text: domainName
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type:'category',
|
type:'datetime',
|
||||||
categories: xData,
|
dateTimeLabelFormats: {
|
||||||
|
second: '%H:%M:%S',
|
||||||
|
minute: '%H:%M',
|
||||||
|
hour: '%H:%M',
|
||||||
|
day: '%m-%d',
|
||||||
|
week: '%m-%d',
|
||||||
|
month: '%Y-%m',
|
||||||
|
year: '%Y'
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'time',
|
text: 'time',
|
||||||
align:'high',
|
align:'high',
|
||||||
@@ -148,6 +161,18 @@ function showDomainTrans(xData,series){
|
|||||||
legend: {
|
legend: {
|
||||||
enabled:false
|
enabled:false
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
||||||
|
second: '%Y-%m-%d %H:%M:%S',
|
||||||
|
minute: '%Y-%m-%d %H:%M:%S',
|
||||||
|
hour: '%Y-%m-%d %H:%M:%S',
|
||||||
|
day: '%Y-%m-%d %H:%M:%S',
|
||||||
|
week: '%Y-%m-%d %H:%M:%S',
|
||||||
|
month: '%Y-%m-%d %H:%M:%S',
|
||||||
|
year: '%Y-%m-%d %H:%M:%S'
|
||||||
|
}
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
lineWidth:1,
|
lineWidth:1,
|
||||||
|
|||||||
@@ -32,8 +32,10 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="beginDate" name="beginDate" type="text"
|
||||||
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value=""
|
||||||
|
onclick="WdatePicker({onpicked:setTime(7),dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -42,7 +44,7 @@
|
|||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/>
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(7) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -92,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>--%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -29,8 +29,13 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<!-- <input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});" />
|
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});" />
|
||||||
|
-->
|
||||||
|
<input id="beginDate" name="beginDate" type="text"
|
||||||
|
readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value=""
|
||||||
|
onclick="WdatePicker({onpicked:setTime(7),dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -38,8 +43,11 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<!-- <input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});" />
|
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});" />
|
||||||
|
-->
|
||||||
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(7) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -107,7 +115,7 @@
|
|||||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>--%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
||||||
@@ -179,9 +187,10 @@ function searchList(){
|
|||||||
|
|
||||||
function showIpActiveChart(xData,series){
|
function showIpActiveChart(xData,series){
|
||||||
var nowDate=new Date();
|
var nowDate=new Date();
|
||||||
|
Highcharts.setOptions({ global: { useUTC: false } });
|
||||||
var chart = Highcharts.chart('chart', {
|
var chart = Highcharts.chart('chart', {
|
||||||
chart:{
|
chart:{
|
||||||
//type: 'area',
|
type: 'area',
|
||||||
zoomType: 'x'
|
zoomType: 'x'
|
||||||
},
|
},
|
||||||
exporting: {
|
exporting: {
|
||||||
@@ -206,12 +215,20 @@ function showIpActiveChart(xData,series){
|
|||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
//tickInterval:tickInterval,
|
//tickInterval:tickInterval,
|
||||||
type:'category',
|
type:'datetime',
|
||||||
categories: xData,
|
dateTimeLabelFormats: {
|
||||||
|
second: '%H:%M:%S',
|
||||||
|
minute: '%H:%M',
|
||||||
|
hour: '%H:%M',
|
||||||
|
day: '%m-%d',
|
||||||
|
week: '%m-%d',
|
||||||
|
month: '%Y-%m',
|
||||||
|
year: '%Y'
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'time',
|
text: 'time',
|
||||||
align:'high',
|
align:'high',
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
noData:{
|
noData:{
|
||||||
style: {//设置字体颜色
|
style: {//设置字体颜色
|
||||||
@@ -233,7 +250,18 @@ function showIpActiveChart(xData,series){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
pointFormat: '<b><spring:message code="ip"/>:</b>{series.name} <b><spring:message code="count"/>:</b>{point.y}<br/>'
|
pointFormat: '<b><spring:message code="ip"/>:</b>{series.name} <b><spring:message code="count"/>:</b>{point.y}<br/>',
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
||||||
|
second: '%Y-%m-%d %H:%M:%S',
|
||||||
|
minute: '%Y-%m-%d %H:%M:%S',
|
||||||
|
hour: '%Y-%m-%d %H:%M:%S',
|
||||||
|
day: '%Y-%m-%d %H:%M:%S',
|
||||||
|
week: '%Y-%m-%d %H:%M:%S',
|
||||||
|
month: '%Y-%m-%d %H:%M:%S',
|
||||||
|
year: '%Y-%m-%d %H:%M:%S'
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
title: {
|
title: {
|
||||||
@@ -266,16 +294,17 @@ function showIpActiveChart(xData,series){
|
|||||||
var xData=new Array();
|
var xData=new Array();
|
||||||
var series=new Array();
|
var series=new Array();
|
||||||
if(rs!=null&&rs.length>0){
|
if(rs!=null&&rs.length>0){
|
||||||
xData=rs[0].statTime;
|
|
||||||
$(rs).each(function(i, d) {
|
$(rs).each(function(i, d) {
|
||||||
total.push(
|
total.push(d.sum)
|
||||||
sum(d.linkNum)
|
|
||||||
)
|
|
||||||
series.push({
|
series.push({
|
||||||
name: d.ipAddr,
|
name: d.ipAddr,
|
||||||
data: d.linkNum
|
data: d.result,
|
||||||
|
marker: {
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
console.log(rs)
|
||||||
}else{
|
}else{
|
||||||
series.push({
|
series.push({
|
||||||
name: " ",
|
name: " ",
|
||||||
|
|||||||
@@ -28,8 +28,13 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<!-- <input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
||||||
|
-->
|
||||||
|
<input id="beginDate" name="beginDate" type="text"
|
||||||
|
readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value=""
|
||||||
|
onclick="WdatePicker({onpicked:setTime(7),dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -37,8 +42,10 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/> -->
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/>
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(7) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -57,7 +64,7 @@
|
|||||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>--%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
||||||
@@ -111,9 +118,10 @@ function searchList(){
|
|||||||
|
|
||||||
function showPortActiveChart(xData,series){
|
function showPortActiveChart(xData,series){
|
||||||
var nowDate=new Date();
|
var nowDate=new Date();
|
||||||
|
Highcharts.setOptions({ global: { useUTC: false } });
|
||||||
var chart = Highcharts.chart('chart', {
|
var chart = Highcharts.chart('chart', {
|
||||||
chart:{
|
chart:{
|
||||||
// type: 'area',
|
type: 'area',
|
||||||
zoomType: 'x'
|
zoomType: 'x'
|
||||||
},
|
},
|
||||||
exporting: {
|
exporting: {
|
||||||
@@ -160,8 +168,16 @@ function showPortActiveChart(xData,series){
|
|||||||
text: null
|
text: null
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type:'category',
|
type:'datetime',
|
||||||
categories: xData,
|
dateTimeLabelFormats: {
|
||||||
|
second: '%H:%M:%S',
|
||||||
|
minute: '%H:%M',
|
||||||
|
hour: '%H:%M',
|
||||||
|
day: '%m-%d',
|
||||||
|
week: '%m-%d',
|
||||||
|
month: '%Y-%m',
|
||||||
|
year: '%Y'
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'time',
|
text: 'time',
|
||||||
align:'high',
|
align:'high',
|
||||||
@@ -172,6 +188,18 @@ function showPortActiveChart(xData,series){
|
|||||||
text: 'bytes'
|
text: 'bytes'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
||||||
|
second: '%Y-%m-%d %H:%M:%S',
|
||||||
|
minute: '%Y-%m-%d %H:%M:%S',
|
||||||
|
hour: '%Y-%m-%d %H:%M:%S',
|
||||||
|
day: '%Y-%m-%d %H:%M:%S',
|
||||||
|
week: '%Y-%m-%d %H:%M:%S',
|
||||||
|
month: '%Y-%m-%d %H:%M:%S',
|
||||||
|
year: '%Y-%m-%d %H:%M:%S'
|
||||||
|
}
|
||||||
|
},
|
||||||
credits:{//是否有highcharts水印
|
credits:{//是否有highcharts水印
|
||||||
enabled:false
|
enabled:false
|
||||||
},
|
},
|
||||||
@@ -199,14 +227,16 @@ function showPortActiveChart(xData,series){
|
|||||||
var series=new Array();
|
var series=new Array();
|
||||||
var total = [];
|
var total = [];
|
||||||
if(rs!=null&&rs.length>0){
|
if(rs!=null&&rs.length>0){
|
||||||
xData=rs[0].statTime;
|
|
||||||
$(rs).each(function(i, d) {
|
$(rs).each(function(i, d) {
|
||||||
total.push(
|
total.push(
|
||||||
sum(d.sum)
|
d.sum
|
||||||
)
|
)
|
||||||
series.push({
|
series.push({
|
||||||
name: d.port,
|
name: d.port,
|
||||||
data: d.sum
|
data: d.result,
|
||||||
|
marker: {
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -32,8 +32,10 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="beginDate" name="beginDate" type="text"
|
||||||
value="" onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value=""
|
||||||
|
onclick="WdatePicker({onpicked:setTime(7),dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -42,7 +44,7 @@
|
|||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/>
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(7) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -105,7 +107,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>--%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
||||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||||
@@ -440,7 +442,17 @@ function protocolTypeChart(rs){
|
|||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
headerFormat: '{series.name}<br>',
|
headerFormat: '{series.name}<br>',
|
||||||
pointFormat: '{point.name}: <b>{point.percentage:.2f}%</b>'
|
pointFormat: '{point.name}: <b>{point.percentage:.2f}%</b>',
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
||||||
|
second: '%Y-%m-%d %H:%M:%S',
|
||||||
|
minute: '%Y-%m-%d %H:%M:%S',
|
||||||
|
hour: '%Y-%m-%d %H:%M:%S',
|
||||||
|
day: '%Y-%m-%d %H:%M:%S',
|
||||||
|
week: '%Y-%m-%d %H:%M:%S',
|
||||||
|
month: '%Y-%m-%d %H:%M:%S',
|
||||||
|
year: '%Y-%m-%d %H:%M:%S'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
name: "Protocol",
|
name: "Protocol",
|
||||||
|
|||||||
@@ -46,10 +46,14 @@
|
|||||||
<span class="selectpicker form-control"><spring:message
|
<span class="selectpicker form-control"><spring:message
|
||||||
code="begin_date" /></span>
|
code="begin_date" /></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="beginDate" name="beginDate" type="text"
|
<!-- <input id="beginDate" name="beginDate" type="text"
|
||||||
readonly="readonly" class="form-control" style="width:166px"
|
readonly="readonly" class="form-control" style="width:166px"
|
||||||
value=""
|
value=""
|
||||||
onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/>
|
onclick="WdatePicker({onpicked:setTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')}'});"/> -->
|
||||||
|
<input id="beginDate" name="beginDate" type="text"
|
||||||
|
readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value=""
|
||||||
|
onclick="WdatePicker({onpicked:setTime(7),dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\')||currentTime()}'});"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -58,9 +62,11 @@
|
|||||||
<span class="selectpicker form-control"><spring:message
|
<span class="selectpicker form-control"><spring:message
|
||||||
code="end_date" /></span>
|
code="end_date" /></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="endDate" name="endDate" type="text" readonly="readonly"
|
<!-- <input id="endDate" name="endDate" type="text" readonly="readonly"
|
||||||
class="form-control" value="" style="width:166px"
|
class="form-control" value="" style="width:166px"
|
||||||
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/>
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'#F{$dp.$D(\'beginDate\',{d:7})}'});"/> -->
|
||||||
|
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
|
||||||
|
value="" onclick="WdatePicker({el:'endDate',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:getMaxDate(7) })"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -162,7 +168,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>--%>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
||||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||||
@@ -529,7 +535,17 @@ function webTypeChart(rs){
|
|||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
headerFormat: '{series.name}<br>',
|
headerFormat: '{series.name}<br>',
|
||||||
pointFormat: '{point.name}: <b>{point.percentage:.2f}%</b>'
|
pointFormat: '{point.name}: <b>{point.percentage:.2f}%</b>',
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
||||||
|
second: '%Y-%m-%d %H:%M:%S',
|
||||||
|
minute: '%Y-%m-%d %H:%M:%S',
|
||||||
|
hour: '%Y-%m-%d %H:%M:%S',
|
||||||
|
day: '%Y-%m-%d %H:%M:%S',
|
||||||
|
week: '%Y-%m-%d %H:%M:%S',
|
||||||
|
month: '%Y-%m-%d %H:%M:%S',
|
||||||
|
year: '%Y-%m-%d %H:%M:%S'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
name: "Domain",
|
name: "Domain",
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ function changeFrameHeight() {
|
|||||||
var paddingHeight = 11;
|
var paddingHeight = 11;
|
||||||
//update for dynamicHomePage E
|
//update for dynamicHomePage E
|
||||||
|
|
||||||
//iframe.contents().find(".page-content").addClass("page-content-body");
|
iframe.contents().find(".page-content").addClass("page-content-body");
|
||||||
iframe.prop("height",clientHeight-headerHeight-barHeight-footerHeight-paddingHeight);
|
iframe.prop("height",clientHeight-headerHeight-barHeight-footerHeight-paddingHeight);
|
||||||
menuHeight();
|
menuHeight();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,8 +111,10 @@
|
|||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
|
<%-- <input name="searchFoundStartTime" id="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||||
|
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:setTimee,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'searchFoundEndTime\')}'});"/> --%>
|
||||||
<input name="searchFoundStartTime" id="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
<input name="searchFoundStartTime" id="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||||
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:setTimee,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'searchFoundEndTime\')}'});"/>
|
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setStartTime('#searchFoundStartTime','#searchFoundEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@@ -121,7 +123,7 @@
|
|||||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||||
</div>
|
</div>
|
||||||
<input name="searchFoundEndTime" id="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
<input name="searchFoundEndTime" id="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||||
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'searchFoundStartTime\')}',maxDate:'#F{$dp.$D(\'searchFoundStartTime\',{d:1})}'});"/>
|
value="${log.searchFoundEndTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTime('#searchFoundStartTime','#searchFoundEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
|
|||||||
@@ -74,13 +74,13 @@ $(document).ready(function() {
|
|||||||
loading('<spring:message code="onloading"/>');
|
loading('<spring:message code="onloading"/>');
|
||||||
var suffix = $(this).data("export-type");
|
var suffix = $(this).data("export-type");
|
||||||
|
|
||||||
totaltb(1,-1);
|
//totaltb(1,-1);
|
||||||
getExportHead();
|
getExportHead();
|
||||||
var te = $(".in table").tableExport({
|
var te = $(".in table").tableExport({
|
||||||
headings:true,
|
headings:true,
|
||||||
footers:true,
|
footers:true,
|
||||||
formats:[suffix],
|
formats:[suffix],
|
||||||
fileName: getFileName(),
|
fileName: getFileName('csv'),
|
||||||
bootstrap:false
|
bootstrap:false
|
||||||
});
|
});
|
||||||
$(".exportFirst").remove();
|
$(".exportFirst").remove();
|
||||||
@@ -114,16 +114,21 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFileName() {
|
function getFileName(type) {
|
||||||
var cfgName = $("[name=cfgName2]").val() + "_";
|
var cfgName = $("[name=cfgName2]").val() + "_";
|
||||||
if ("${bean.serviceId}") {
|
if ("${bean.serviceId}") {
|
||||||
var action = $("[name=serviceId]").find('[value=' + "${bean.serviceId}" + ']').text() + "_";
|
var action = $("[name=serviceId]").find('[value=' + "${bean.serviceId}" + ']').text() + "_";
|
||||||
} else {
|
} else {
|
||||||
var action = "";
|
var action = "";
|
||||||
}
|
}
|
||||||
var reportType = $("[name=reportType]").find('[value=' + "${bean.reportType}" + ']').text() + "_";
|
var reportType = $("[name=reportType]").find('[value=' + "${bean.reportType}" + ']').text()
|
||||||
//var reportTime = "${bean.reportTime}";
|
//var reportTime = "${bean.reportTime}";
|
||||||
return cfgName + action + reportType + getStringFormatDate();
|
if(type=='xlsx'){
|
||||||
|
return cfgName + action + reportType;
|
||||||
|
}else{
|
||||||
|
return cfgName + action + reportType + "_"+ getStringFormatDate();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStringFormatDate() {
|
function getStringFormatDate() {
|
||||||
@@ -353,10 +358,11 @@ function customColumnClick(){
|
|||||||
if(rows.length > 1){
|
if(rows.length > 1){
|
||||||
var trtotal="";
|
var trtotal="";
|
||||||
if(reportBusinessType=="src_ip_report"){
|
if(reportBusinessType=="src_ip_report"){
|
||||||
trtotal+="<td colspan='2' style='text-align: left;' ><spring:message code='report_total' /></td>";
|
trtotal+="<td style='text-align: left;' ><spring:message code='report_total' /></td><td></td>";
|
||||||
}else{
|
}else{
|
||||||
trtotal+="<td style='text-align: left;'><spring:message code='report_total' /></td>";
|
trtotal+="<td style='text-align: left;'><spring:message code='report_total' /></td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var k = 0; k < list.length; k++) {
|
for (var k = 0; k < list.length; k++) {
|
||||||
trtotal+="<td>"+list[k]+"</td>";
|
trtotal+="<td>"+list[k]+"</td>";
|
||||||
}
|
}
|
||||||
@@ -437,8 +443,76 @@ function customColumnClick(){
|
|||||||
iframe: true,
|
iframe: true,
|
||||||
append: null
|
append: null
|
||||||
});
|
});
|
||||||
pagination();
|
pagination(30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getExport(url){
|
||||||
|
loading('<spring:message code="onloading"/>');
|
||||||
|
var reportBusinessType=$("#reportBusinessType").val()
|
||||||
|
var tableId="tagTable";
|
||||||
|
if(reportBusinessType=="label_report"){
|
||||||
|
tableId="tagTable";
|
||||||
|
}else if(reportBusinessType=="lwhh_report"){
|
||||||
|
tableId="lwhhTable";
|
||||||
|
}else if(reportBusinessType=="src_ip_report"){
|
||||||
|
tableId="contentTable1";
|
||||||
|
}else if(reportBusinessType=="attr_type_report"){
|
||||||
|
tableId="attrTypeTable";
|
||||||
|
}else if(reportBusinessType=="dest_ip_report"){
|
||||||
|
tableId="destIpTable";
|
||||||
|
}else if(reportBusinessType=="isp_report"){
|
||||||
|
tableId="entranceIdTable";
|
||||||
|
}
|
||||||
|
var timeType = $("#reportType").find("option:selected").text();
|
||||||
|
var time = $("#intype").val();
|
||||||
|
var tabName = $("#liwhite").find("li[class='active'] a").attr("title");
|
||||||
|
var titleCode= getFileName('xlsx');
|
||||||
|
var heardTime="<spring:message code='${bean.cfgName}'/> "+timeType+":"+time+" "+tabName;
|
||||||
|
pagination(99999999);
|
||||||
|
var tb=document.getElementById(tableId);
|
||||||
|
var rows=tb.rows;
|
||||||
|
var list=new Array();
|
||||||
|
list.splice(0,list.length);
|
||||||
|
var column=[]; //获取标题
|
||||||
|
var index=[];//获取数据列下标
|
||||||
|
var num=0;
|
||||||
|
$("#"+tableId+" thead tr th").each(function(){
|
||||||
|
if($(this).is(":visible")){
|
||||||
|
column.push($(this).text().trim());
|
||||||
|
index.push(num);
|
||||||
|
}
|
||||||
|
num++;
|
||||||
|
});
|
||||||
|
for(var i=1 ; i<rows.length;i++){
|
||||||
|
var rowMap=[];
|
||||||
|
for (var j = 0; j <index.length ; j++) {
|
||||||
|
var n=index[j];
|
||||||
|
if(rows[i].cells[n].innerHTML.trim().indexOf("...") !=-1){
|
||||||
|
if(rows[i].cells[n].title.length > 20){
|
||||||
|
rowMap.push(rows[i].cells[n].title);
|
||||||
|
}else{
|
||||||
|
rowMap.push(rows[i].cells[n].innerHTML.trim());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rowMap.push(rows[i].cells[n].innerHTML.trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
list[i-1]=rowMap;
|
||||||
|
}
|
||||||
|
var map={};
|
||||||
|
map.heard=column;
|
||||||
|
map.book=list;
|
||||||
|
map.titleTime=heardTime;
|
||||||
|
map.titleCode=titleCode;
|
||||||
|
var exports=JSON.stringify(map);
|
||||||
|
aJaxImportPost(url,{"exports":exports});
|
||||||
|
pagination(30);
|
||||||
|
closeTip();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
li{
|
li{
|
||||||
@@ -447,7 +521,7 @@ white-space:nowrap;
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="page-content page-content-body">
|
<div class="page-content">
|
||||||
<%-- <div class="theme-panel hidden-xs hidden-sm">
|
<%-- <div class="theme-panel hidden-xs hidden-sm">
|
||||||
<c:forEach items="${serviceList}" var="service" varStatus="status">
|
<c:forEach items="${serviceList}" var="service" varStatus="status">
|
||||||
<c:if test="${(service.action ne 128) && (service.serviceId ne 37) && (service.serviceId ne 149)}" >
|
<c:if test="${(service.action ne 128) && (service.serviceId ne 37) && (service.serviceId ne 149)}" >
|
||||||
@@ -482,7 +556,6 @@ white-space:nowrap;
|
|||||||
<form:form id="searchForm" modelAttribute="bean" action="${ctx}/report/list" method="post" class="form-search">
|
<form:form id="searchForm" modelAttribute="bean" action="${ctx}/report/list" method="post" class="form-search">
|
||||||
<input id="functionId" name="functionId" type="hidden" value="${bean.functionId}"/>
|
<input id="functionId" name="functionId" type="hidden" value="${bean.functionId}"/>
|
||||||
<input name="cfgName" type="hidden" value="${bean.cfgName}"/>
|
<input name="cfgName" type="hidden" value="${bean.cfgName}"/>
|
||||||
|
|
||||||
<input name="cfgName2" type="hidden" value="<spring:message code="${bean.cfgName}"/>"/>
|
<input name="cfgName2" type="hidden" value="<spring:message code="${bean.cfgName}"/>"/>
|
||||||
<input name="serviceId2" type="hidden" value="<spring:message code="${bean.serviceId}"/>"/>
|
<input name="serviceId2" type="hidden" value="<spring:message code="${bean.serviceId}"/>"/>
|
||||||
|
|
||||||
@@ -552,7 +625,7 @@ white-space:nowrap;
|
|||||||
<i class="fa fa-angle-down"></i>
|
<i class="fa fa-angle-down"></i>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||||
<li><a href="javascript:;" class="export-btn" data-export-type="xlsx"><i class="fa fa-download"> <spring:message code="Excel"/></i></a></li>
|
<li><a href="javascript:;" onclick="getExport('${ctx}/export/ajaxExport')" ><i class="fa fa-download"> <spring:message code="Excel"/></i></a></li>
|
||||||
<li><a href="javascript:;" class="export-btn" data-export-type="csv"><i class="fa fa-download"> <spring:message code="CSV"/></i></a></li>
|
<li><a href="javascript:;" class="export-btn" data-export-type="csv"><i class="fa fa-download"> <spring:message code="CSV"/></i></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -277,20 +277,19 @@ License: www.highcharts.com/license
|
|||||||
downloadPNG: {
|
downloadPNG: {
|
||||||
textKey: "downloadPNG",
|
textKey: "downloadPNG",
|
||||||
onclick: function () {
|
onclick: function () {
|
||||||
console.log(this)
|
|
||||||
this.legend.itemStyle.color='#000000'
|
this.legend.itemStyle.color='#000000'
|
||||||
this.exportChartLocal()
|
this.exportChartLocal()
|
||||||
this.legend.itemStyle.color='#ffffff'
|
this.legend.itemStyle.color='#ffffff'
|
||||||
console.log('ok')
|
|
||||||
console.log(this)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
downloadJPEG: {
|
downloadJPEG: {
|
||||||
textKey: "downloadJPEG",
|
textKey: "downloadJPEG",
|
||||||
onclick: function () {
|
onclick: function () {
|
||||||
|
this.legend.itemStyle.color='#000000'
|
||||||
this.exportChartLocal({
|
this.exportChartLocal({
|
||||||
type: "image/jpeg"
|
type: "image/jpeg"
|
||||||
})
|
})
|
||||||
|
this.legend.itemStyle.color='#ffffff'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
downloadSVG: {
|
downloadSVG: {
|
||||||
|
|||||||
@@ -6,13 +6,26 @@ $(function(){
|
|||||||
getTotalLog();
|
getTotalLog();
|
||||||
});
|
});
|
||||||
|
|
||||||
function setTime(){
|
/*function setTime(){
|
||||||
var chooseDate=new Date($('#beginDate').val());
|
var chooseDate=new Date($('#beginDate').val());
|
||||||
chooseDate=chooseDate.setDate(chooseDate.getDate()+7);
|
chooseDate=chooseDate.setDate(chooseDate.getDate()+7);
|
||||||
var modifyTime=new Date(chooseDate);
|
var modifyTime=new Date(chooseDate);
|
||||||
$('#endDate').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
$('#endDate').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
||||||
|
}*/
|
||||||
|
function setTime(dayData){
|
||||||
|
var useTime=$('#beginDate').val();
|
||||||
|
if(useTime==''){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var chooseDate=new Date(useTime);
|
||||||
|
chooseDate=chooseDate.setDate(chooseDate.getDate()+dayData);
|
||||||
|
var now =new Date();
|
||||||
|
if(now.getTime()<new Date(chooseDate).getTime()){
|
||||||
|
chooseDate=now;
|
||||||
|
}
|
||||||
|
var modifyTime=new Date(chooseDate);
|
||||||
|
$('#endDate').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
||||||
}
|
}
|
||||||
|
|
||||||
function setTimee(){
|
function setTimee(){
|
||||||
var chooseDate=new Date($('#searchFoundStartTime').val());
|
var chooseDate=new Date($('#searchFoundStartTime').val());
|
||||||
chooseDate=chooseDate.setDate(chooseDate.getDate()+1);
|
chooseDate=chooseDate.setDate(chooseDate.getDate()+1);
|
||||||
@@ -21,6 +34,68 @@ function setTimee(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function currentTime() {
|
||||||
|
var now = new Date();
|
||||||
|
|
||||||
|
var year = now.getFullYear();
|
||||||
|
var month = now.getMonth() + 1;
|
||||||
|
var day = now.getDate();
|
||||||
|
|
||||||
|
var hh = now.getHours();
|
||||||
|
var mm = now.getMinutes();
|
||||||
|
|
||||||
|
var clock = year + "-";
|
||||||
|
|
||||||
|
if (month < 10) clock += "0";
|
||||||
|
clock += month + "-";
|
||||||
|
|
||||||
|
if (day < 10) clock += "0";
|
||||||
|
clock += day + " ";
|
||||||
|
|
||||||
|
if (hh < 10) clock += "0";
|
||||||
|
clock += hh + ":";
|
||||||
|
|
||||||
|
if (mm < 10) clock += '0';
|
||||||
|
clock += mm;
|
||||||
|
return (clock);
|
||||||
|
}
|
||||||
|
function getMaxDate(day){
|
||||||
|
var clock=currentTime();
|
||||||
|
var dt;
|
||||||
|
var times=0;
|
||||||
|
dt=$("#beginDate").val();
|
||||||
|
if(dt!=''){
|
||||||
|
times =Date.parse(dt.replace(/-/g,'/'))+day*24*60*60*1000;//时间间隔为10天
|
||||||
|
|
||||||
|
if(times-Date.parse(clock.replace(/-/g,'/'))<0){
|
||||||
|
var d1 = new Date(times);
|
||||||
|
var year = d1.getFullYear();
|
||||||
|
var month = d1.getMonth() + 1; //月份以0开头
|
||||||
|
var day = d1.getDate();
|
||||||
|
|
||||||
|
var hh = d1.getHours();
|
||||||
|
var mm = d1.getMinutes();
|
||||||
|
|
||||||
|
var clock = year + "-";
|
||||||
|
|
||||||
|
if (month < 10) clock += "0";
|
||||||
|
clock += month + "-";
|
||||||
|
|
||||||
|
if (day < 10) clock += "0";
|
||||||
|
clock += day + " ";
|
||||||
|
|
||||||
|
if (hh < 10) clock += "0";
|
||||||
|
clock += hh + ":";
|
||||||
|
|
||||||
|
if (mm < 10) clock += '0';
|
||||||
|
clock += mm;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return clock;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var getTotalLog=function(){
|
var getTotalLog=function(){
|
||||||
/*
|
/*
|
||||||
td需要配置属性有,audit,functionId,compileId,action
|
td需要配置属性有,audit,functionId,compileId,action
|
||||||
@@ -208,3 +283,185 @@ var switchMenu = function(topMenuId,functionId,oldMenuName){
|
|||||||
});
|
});
|
||||||
//loading('onloading');
|
//loading('onloading');
|
||||||
}
|
}
|
||||||
|
/*======================时间验证方法start===========================*/
|
||||||
|
//startTimeSelector:输入框开始时间选择器;
|
||||||
|
//endTimeSelector:输入框结束时间选择器;
|
||||||
|
//granule:时间粒度(数字);
|
||||||
|
//unit:时间粒度单位(h-小时,d-天,w-周,m-月);
|
||||||
|
//formate:时间格式;默认格式:yyyy-MM-dd hh:mm:ss
|
||||||
|
//future:选择的时间是否可以为未来时间 true or false 默认false(不能为未来时间)
|
||||||
|
function setEndTime(startTimeSelector,endTimeSelector,granule,unit,formate,future){
|
||||||
|
|
||||||
|
if(strIsBlank(granule)||strIsBlank(unit)){
|
||||||
|
console.log("时间粒度或时间单位为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strIsBlank(startTimeSelector)||strIsBlank(endTimeSelector)){
|
||||||
|
console.log("时间输入框选择器为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strIsBlank(formate)){
|
||||||
|
formate="yyyy-MM-dd hh:mm:ss"
|
||||||
|
}
|
||||||
|
if(future==null || future==undefined){
|
||||||
|
future=false;
|
||||||
|
}
|
||||||
|
var startTimeVal=$(startTimeSelector).val();
|
||||||
|
var endTimeVal=$(endTimeSelector).val();
|
||||||
|
|
||||||
|
var startTime;
|
||||||
|
var endTime;
|
||||||
|
|
||||||
|
var diff=getTimeDiff(granule,unit);//得到时间粒度差值
|
||||||
|
|
||||||
|
if(!strIsBlank(endTimeVal)){
|
||||||
|
endTime=new Date(endTimeVal);
|
||||||
|
var currentTime=new Date().getTime();
|
||||||
|
if(!future&&endTime.getTime()>currentTime){ //endTime不能是未来时间
|
||||||
|
endTime=new Date();
|
||||||
|
}
|
||||||
|
if(strIsBlank(startTimeVal)){
|
||||||
|
startTime=new Date(endTime.getTime()-diff);
|
||||||
|
}else{//startTime和endTime都不为空
|
||||||
|
startTime=new Date(startTimeVal);
|
||||||
|
if(endTime.getTime()-startTime.getTime()>diff||endTime.getTime()-startTime.getTime()<=0){//startTime不在时间粒度之内
|
||||||
|
startTime=new Date(endTime.getTime()-diff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if(strIsBlank(startTimeVal)){//startTime and endTime 都为空
|
||||||
|
endTime=new Date();
|
||||||
|
startTime=new Date(endTime.getTime()-diff);
|
||||||
|
}else{//startTime 不为空,endTime为空
|
||||||
|
setStartTime(startTimeSelector,endTimeSelector,granule,unit,formate,future);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(startTimeSelector).val(dateFtt(formate,startTime));
|
||||||
|
$(endTimeSelector).val(dateFtt(formate,endTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
//startTimeSelector:输入框开始时间选择器;
|
||||||
|
//endTimeSelector:输入框结束时间选择器;
|
||||||
|
//granule:时间粒度(数字);
|
||||||
|
//unit:时间粒度单位(h-小时,d-天,w-周,m-月);
|
||||||
|
//formate:时间格式;默认格式:yyyy-MM-dd hh:mm:ss
|
||||||
|
//future:选择的时间是否可以为未来时间 true or false 默认false(不能为未来时间)
|
||||||
|
function setStartTime(startTimeSelector,endTimeSelector,granule,unit,formate,future){
|
||||||
|
|
||||||
|
if(strIsBlank(granule)||strIsBlank(unit)){
|
||||||
|
console.log("时间粒度或时间单位为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strIsBlank(startTimeSelector)||strIsBlank(endTimeSelector)){
|
||||||
|
console.log("时间输入框选择器为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strIsBlank(formate)){
|
||||||
|
formate="yyyy-MM-dd hh:mm:ss"
|
||||||
|
}
|
||||||
|
|
||||||
|
if(future==null || future==undefined){
|
||||||
|
future=false;
|
||||||
|
}
|
||||||
|
var startTimeVal=$(startTimeSelector).val();
|
||||||
|
var endTimeVal=$(endTimeSelector).val();
|
||||||
|
|
||||||
|
var startTime;
|
||||||
|
var endTime;
|
||||||
|
|
||||||
|
var diff=getTimeDiff(granule,unit);//得到时间粒度差值
|
||||||
|
|
||||||
|
if(!strIsBlank(startTimeVal)){
|
||||||
|
startTime=new Date(startTimeVal);
|
||||||
|
var currentTime=new Date().getTime();
|
||||||
|
if(!future&&startTime.getTime()>currentTime){//startTime是一个超过当前时间值
|
||||||
|
startTime=new Date(currentTime-diff);
|
||||||
|
}
|
||||||
|
if(strIsBlank(endTimeVal)){
|
||||||
|
if(startTime.getTime()+diff>currentTime){
|
||||||
|
endTime=new Date();
|
||||||
|
}else{
|
||||||
|
endTime=new Date(startTime.getTime()+diff);
|
||||||
|
}
|
||||||
|
}else{//startTime和endTime都不为空
|
||||||
|
endTime=new Date(endTimeVal);
|
||||||
|
if(endTime.getTime()-startTime.getTime()>diff||endTime.getTime()-startTime.getTime()<=0){//endTime不在时间粒度之内
|
||||||
|
|
||||||
|
if(startTime.getTime()+diff>currentTime){
|
||||||
|
endTime=new Date();
|
||||||
|
startTime=new Date(endTime.getTime()-5*60*1000);
|
||||||
|
}else{
|
||||||
|
endTime=new Date(startTime.getTime()+diff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(strIsBlank(endTimeVal)){//startTime和endTime 都为空
|
||||||
|
endTime=new Date();
|
||||||
|
startTime=new Date(endTime.getTime()-diff);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
setEndTime(startTimeSelector,endTimeSelector,granule,unit,formate,future);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(startTimeSelector).val(dateFtt(formate,startTime));
|
||||||
|
$(endTimeSelector).val(dateFtt(formate,endTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
function strIsBlank(obj){
|
||||||
|
if(obj==null || obj==undefined|| obj==''){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*得到时间差值 单位毫秒*/
|
||||||
|
function getTimeDiff(granule,unit){
|
||||||
|
var diff=0;
|
||||||
|
switch(unit){
|
||||||
|
case 'h'://小时为单位
|
||||||
|
diff=granule*60*60*1000;
|
||||||
|
break;
|
||||||
|
case 'd'://天为单位
|
||||||
|
diff=granule*24*60*60*1000;
|
||||||
|
break;
|
||||||
|
case 'w'://周为单位
|
||||||
|
diff=granule*7*24*60*60*1000;
|
||||||
|
break;
|
||||||
|
case 'm'://月为单位
|
||||||
|
diff=granule*30*24*60*60*1000;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
diff=granule*60*60*1000;
|
||||||
|
}
|
||||||
|
return diff;
|
||||||
|
}
|
||||||
|
|
||||||
|
function dateFtt(fmt,date){
|
||||||
|
var o = {
|
||||||
|
"M+" : date.getMonth()+1, //月份
|
||||||
|
"d+" : date.getDate(), //日
|
||||||
|
"h+" : date.getHours(), //小时
|
||||||
|
"m+" : date.getMinutes(), //分
|
||||||
|
"s+" : date.getSeconds(), //秒
|
||||||
|
"q+" : Math.floor((date.getMonth()+3)/3), //季度
|
||||||
|
"S" : date.getMilliseconds() //毫秒
|
||||||
|
};
|
||||||
|
if(/(y+)/.test(fmt))
|
||||||
|
fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
|
||||||
|
for(var k in o)
|
||||||
|
if(new RegExp("("+ k +")").test(fmt))
|
||||||
|
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
|
||||||
|
return fmt;
|
||||||
|
}
|
||||||
|
/*======================时间验证方法end===========================*/
|
||||||
@@ -4,10 +4,78 @@
|
|||||||
chart: {
|
chart: {
|
||||||
events: {
|
events: {
|
||||||
beforePrint: function () {
|
beforePrint: function () {
|
||||||
|
chart_main.xAxis[0].update({
|
||||||
|
labels:{
|
||||||
|
style:{
|
||||||
|
color:'#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
chart_3.xAxis[0].update({
|
||||||
|
labels:{
|
||||||
|
style:{
|
||||||
|
color:'#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
chart_main.yAxis[0].update({
|
||||||
|
labels:{
|
||||||
|
style:{
|
||||||
|
color:'#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
chart_3.yAxis[0].update({
|
||||||
|
title: {
|
||||||
|
style: {//设置字体颜色
|
||||||
|
color: '#000000',
|
||||||
|
fontFamily:'Microsoft YaHei'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labels:{
|
||||||
|
style:{
|
||||||
|
color:'#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
$('.highcharts-legend text').css('color','#000000');
|
$('.highcharts-legend text').css('color','#000000');
|
||||||
$('.highcharts-legend text').css('fill','#000000');
|
$('.highcharts-legend text').css('fill','#000000');
|
||||||
},
|
},
|
||||||
afterPrint: function () {
|
afterPrint: function () {
|
||||||
|
chart_3.xAxis[0].update({
|
||||||
|
labels:{
|
||||||
|
style:{
|
||||||
|
color:'#ffffff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
chart_main.xAxis[0].update({
|
||||||
|
labels:{
|
||||||
|
style:{
|
||||||
|
color:'#ffffff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
chart_main.yAxis[0].update({
|
||||||
|
labels:{
|
||||||
|
style:{
|
||||||
|
color:'#ffffff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
chart_3.yAxis[0].update({
|
||||||
|
title: {
|
||||||
|
style: {//设置字体颜色
|
||||||
|
color: '#ffffff',
|
||||||
|
fontFamily:'Microsoft YaHei'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labels:{
|
||||||
|
style:{
|
||||||
|
color:'#ffffff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
$('.highcharts-legend text').css('color','#ffffff');
|
$('.highcharts-legend text').css('color','#ffffff');
|
||||||
$('.highcharts-legend text').css('fill','#ffffff');
|
$('.highcharts-legend text').css('fill','#ffffff');
|
||||||
}
|
}
|
||||||
@@ -67,6 +135,9 @@
|
|||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:'Protocol-Type'+addDateName(),
|
filename:'Protocol-Type'+addDateName(),
|
||||||
chartOptions: {
|
chartOptions: {
|
||||||
|
chart:{
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
@@ -240,7 +311,7 @@
|
|||||||
data: [pktNum,byteLen],
|
data: [pktNum,byteLen],
|
||||||
});*/
|
});*/
|
||||||
});
|
});
|
||||||
var chart = Highcharts.chart('chart_main', {
|
chart_main = Highcharts.chart('chart_main', {
|
||||||
chart: {
|
chart: {
|
||||||
backgroundColor: 'rgba(255, 255, 255, 0)',
|
backgroundColor: 'rgba(255, 255, 255, 0)',
|
||||||
plotBackgroundColor:null,
|
plotBackgroundColor:null,
|
||||||
@@ -261,14 +332,32 @@
|
|||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:'Active-IP'+addDateName(),
|
filename:'Active-IP'+addDateName(),
|
||||||
chartOptions: {
|
chartOptions: {
|
||||||
|
chart:{
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
allowOverlap: true, // 允许数据标签重叠
|
color:'#000000'
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: [{
|
||||||
|
categories: xData,
|
||||||
|
labels: {
|
||||||
|
style: {
|
||||||
|
color: '#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxis: [{
|
||||||
|
labels: {
|
||||||
|
style: {
|
||||||
|
color: '#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
contextButton: {
|
contextButton: {
|
||||||
@@ -292,7 +381,14 @@
|
|||||||
fill: '#51586f'
|
fill: '#51586f'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
menuItems: [
|
||||||
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[0],// 打印
|
||||||
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[1],// jpeg
|
||||||
|
'downloadPNG','downloadPDF',
|
||||||
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[4],// excel
|
||||||
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[3],// cvs
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -466,7 +562,7 @@
|
|||||||
data: [pktNum,byteLen],
|
data: [pktNum,byteLen],
|
||||||
});*/
|
});*/
|
||||||
});
|
});
|
||||||
var chart = Highcharts.chart('chart_3',{
|
chart_3 = Highcharts.chart('chart_3',{
|
||||||
chart: {
|
chart: {
|
||||||
backgroundColor: 'rgba(255, 255, 255, 0)',
|
backgroundColor: 'rgba(255, 255, 255, 0)',
|
||||||
plotBackgroundColor:null,
|
plotBackgroundColor:null,
|
||||||
@@ -485,7 +581,43 @@
|
|||||||
exporting: {
|
exporting: {
|
||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:'App'+addDateName(),
|
filename:'App'+addDateName(),
|
||||||
buttons: exportingButton('#415262')
|
buttons: exportingButton('#415262'),
|
||||||
|
chartOptions: {
|
||||||
|
chart:{
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
series: {
|
||||||
|
dataLabels: {
|
||||||
|
enabled: true,
|
||||||
|
color:'#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: [{
|
||||||
|
categories: xData,
|
||||||
|
labels: {
|
||||||
|
style: {
|
||||||
|
color: '#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxis: [{
|
||||||
|
title: {
|
||||||
|
text: unit,
|
||||||
|
align:'high',
|
||||||
|
style: {//设置字体颜色
|
||||||
|
color: '#000000',
|
||||||
|
fontFamily:'Microsoft YaHei'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labels: {
|
||||||
|
style: {
|
||||||
|
color: '#000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
noData:{
|
noData:{
|
||||||
style: {//设置字体颜色
|
style: {//设置字体颜色
|
||||||
@@ -638,6 +770,9 @@ function echart_2(rs){
|
|||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:'BS'+addDateName(),
|
filename:'BS'+addDateName(),
|
||||||
chartOptions: {
|
chartOptions: {
|
||||||
|
chart:{
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
@@ -791,6 +926,9 @@ function echart_5(rs){
|
|||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:'BS'+addDateName(),
|
filename:'BS'+addDateName(),
|
||||||
chartOptions: {
|
chartOptions: {
|
||||||
|
chart:{
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
@@ -939,6 +1077,9 @@ function echart_4(rs){
|
|||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:'Website'+addDateName(),
|
filename:'Website'+addDateName(),
|
||||||
chartOptions: {
|
chartOptions: {
|
||||||
|
chart:{
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
@@ -1086,6 +1227,9 @@ function echart_6(rs){
|
|||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:'Website'+addDateName(),
|
filename:'Website'+addDateName(),
|
||||||
chartOptions: {
|
chartOptions: {
|
||||||
|
chart:{
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
@@ -1241,6 +1385,9 @@ function echart_topic_domain(rs){
|
|||||||
allowHTML:true,
|
allowHTML:true,
|
||||||
filename:'Service'+addDateName(),
|
filename:'Service'+addDateName(),
|
||||||
chartOptions: {
|
chartOptions: {
|
||||||
|
chart: {
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
|
|||||||
@@ -113,3 +113,23 @@ Date.prototype.Format = function (fmt) {
|
|||||||
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||||
return fmt;
|
return fmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function aJaxImportPost(url, params) {
|
||||||
|
// 创建form元素
|
||||||
|
var temp_form = document.createElement("form");
|
||||||
|
// 设置form属性
|
||||||
|
temp_form .action = url;
|
||||||
|
temp_form .target = "_self";
|
||||||
|
temp_form .method = "post";
|
||||||
|
temp_form .style.display = "none";
|
||||||
|
// 处理需要传递的参数
|
||||||
|
for (var x in params) {
|
||||||
|
var opt = document.createElement("textarea");
|
||||||
|
opt.name = x;
|
||||||
|
opt.value = params[x];
|
||||||
|
temp_form .appendChild(opt);
|
||||||
|
}
|
||||||
|
document.body.appendChild(temp_form);
|
||||||
|
// 提交表单
|
||||||
|
temp_form .submit();
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user