3091 lines
96 KiB
Plaintext
3091 lines
96 KiB
Plaintext
webpackJsonp([31],{
|
||
|
||
/***/ 0:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
__webpack_require__("j1ja");
|
||
module.exports = __webpack_require__("NHnr");
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1:
|
||
/***/ (function(module, exports) {
|
||
|
||
/* (ignored) */
|
||
|
||
/***/ }),
|
||
|
||
/***/ "BoBM":
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
/* harmony default export */ __webpack_exports__["a"] = ((function () {
|
||
var commonChartOption = {
|
||
tooltip: {
|
||
trigger: 'axis',
|
||
axisPointer: {
|
||
type: 'line',
|
||
label: {
|
||
backgroundColor: '#6A7985'
|
||
}
|
||
}
|
||
},
|
||
grid: {
|
||
top: '26',
|
||
bottom: '32',
|
||
left: '32',
|
||
right: '48',
|
||
containLabel: true
|
||
},
|
||
xAxis: {
|
||
data: [],
|
||
boundaryGap: false, //设置x坐标从零刻度开始
|
||
axisLabel: {
|
||
color: '#96A5BC',
|
||
interval: function interval(index, value) {
|
||
if (typeof value === 'string' && value.split(':').length >= 3) {
|
||
return value.split(':')[2] % 30 === 0;
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
},
|
||
axisTick: {
|
||
lineStyle: {
|
||
color: '#96A5BC'
|
||
}
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: '#96A5BC'
|
||
}
|
||
}
|
||
},
|
||
yAxis: {
|
||
axisLabel: {
|
||
color: '#96A5BC'
|
||
},
|
||
axisTick: {
|
||
lineStyle: {
|
||
color: '#96A5BC'
|
||
}
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: '#96A5BC'
|
||
}
|
||
},
|
||
splitLine: {
|
||
lineStyle: {
|
||
color: '#EEEFF5'
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var Enum = {
|
||
roleType: {
|
||
code: {
|
||
superAdmin: '001',
|
||
admin: '002',
|
||
user: '003'
|
||
},
|
||
text: {
|
||
_001: '超级管理员',
|
||
_002: '管理员',
|
||
_003: '普通用户'
|
||
}
|
||
}
|
||
};
|
||
var params = [{ name: 'IP', id: 'ip' }, { name: 'URI', id: 'uri' }, { name: 'Referer', id: 'referer' }, { name: 'User-Agent', id: 'user_agent' }, { name: 'GET-Params-Name', id: 'args_get_names' }, { name: 'GET-Params', id: 'args_get' }, { name: 'POST-Params-Name', id: 'args_post_names' }, { name: 'POST-Params', id: 'args_post' }, { name: 'Cookie-Name', id: 'cookies_names' }, { name: 'Cookie', id: 'cookies' }, { name: 'Content-Type', id: 'http_content_type' }, { name: 'X-Forwarded-For', id: 'forwarded_ip' }, { name: 'Method', id: 'method' }, { name: 'Request-Filename', id: 'filename' }, { name: 'Header-Name', id: 'headers_names' }, { name: 'Header', id: 'headers' }];
|
||
var operators = {
|
||
ip: [{ name: '属于', id: 5 }, { name: '不属于', id: 6 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
uri: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
referer: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
useragent: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
args_get_names: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
args_get: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
args_post_names: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
args_post: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
cookies_names: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
cookies: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
http_content_type: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
remote_ip: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
method: [{ name: '等于', id: 1, opera: ['GET', 'POST', 'HEAD', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE'] }, { name: '不等于', id: 2, opera: ['GET', 'POST', 'HEAD', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE'] }],
|
||
filename: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
headers_names: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }],
|
||
headers: [{ name: '包含', id: 3 }, { name: '不包含', id: 4 }, { name: '等于', id: 1 }, { name: '不等于', id: 2 }]
|
||
};
|
||
var opera = {
|
||
method: ['GET', 'POST', 'HEAD', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE']
|
||
};
|
||
var attackTypes = [{ id: '', name: '全部类型' }, { id: 'scanner_detection', name: 'scanner_detection' }, { id: 'protocol_attack', name: 'protocol_attack' }, { id: 'LFI', name: 'LFI' }, { id: 'RFI', name: 'RFI' }, { id: 'RCE', name: 'RCE' }, { id: 'php_injection', name: 'php_injection' }, { id: 'xss', name: 'xss' }, { id: 'sql_injection', name: 'sql_injection' }, { id: 'session_fixation', name: 'session_fixation' }, { id: 'java_deserialization', name: 'java_deserialization' }, { id: 'webshell', name: 'webshell' }, { id: 'XXE', name: 'XXE' }, { id: 'data_leakages', name: 'data_leakages' }, { id: 'sql_error_leakages', name: 'sql_error_leakages' }, { id: 'java_data_leakages', name: 'java_data_leakages' }, { id: 'php_data_leakages', name: 'php_data_leakages' }, { id: 'IIS_data_leakages', name: 'IIS_data_leakages' }, { id: 'framework_vulnerabilities', name: 'framework_vulnerabilities' }, { id: 'sensitive_files', name: 'sensitive_files' }];
|
||
var actions = [{ id: '', name: '全部动作' }, { id: 1, name: 'deny' }, { id: 2, name: 'warning' }];
|
||
var httpPorts = [80, 81, 82, 83, 84, 88, 89, 800, 808, 1000, 1090, 3333, 3501, 3601, 5000, 5222, 6001, 6666, 7000, 7001, 7002, 7003, 7004, 7005, 7006, 7009, 7010, 7011, 7012, 7013, 7014, 7015, 7016, 7018, 7019, 7020, 7021, 7022, 7023, 7024, 7025, 7026, 7070, 7081, 7082, 7083, 7088, 7097, 7777, 7800, 8000, 8001, 8002, 8003, 8008, 8009, 8020, 8021, 8022, 8025, 8026, 8077, 8078, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 8090, 8091, 8106, 8181, 8334, 8336, 8800, 8686, 8888, 8889, 8999, 9000, 9001, 9002, 9003, 9080, 9200, 9999, 10000, 10001, 10080, 12601, 86, 9021, 9023, 9027, 9037, 9081, 9082, 9201, 9205, 9207, 9208, 9209, 9210, 9211, 9212, 9213, 48800, 87, 97, 7510, 9180, 9898, 9908, 9916, 9918, 9919, 9928, 9929, 9939, 28080, 33702];
|
||
var httpsPorts = [443, 4443, 5443, 6443, 7443, 8443, 9443, 8553, 8663, 9553, 9663, 18980];
|
||
var Regex = {
|
||
ip: /^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/
|
||
};
|
||
var URL = {
|
||
getUserInfo: '/getInfo',
|
||
getAreaList: '/website/rest/queryArea'
|
||
};
|
||
var role = {
|
||
superAdmin: {
|
||
adminName: "superAdmin",
|
||
loginBtn: true,
|
||
menu: true,
|
||
topTitle: false,
|
||
count: true,
|
||
siteManagement: true,
|
||
siteError: true,
|
||
operationMonitor: true,
|
||
user: false,
|
||
distort: false,
|
||
province: true,
|
||
totalAlertCount: true,
|
||
top10Admin: true,
|
||
insertCount: true,
|
||
alertCount: true,
|
||
underAttackArea: true,
|
||
attackArea: true,
|
||
addSite: true,
|
||
addSiteCount: 5000,
|
||
addSites: false,
|
||
pnameSearch: true,
|
||
domainSearch: true,
|
||
protectEdit: true,
|
||
preciseBtns: true,
|
||
dataBtns: true,
|
||
selectAllDomain: true,
|
||
errorPage: true
|
||
},
|
||
qgAdmin: {
|
||
adminName: "QGAdmin",
|
||
loginBtn: false,
|
||
menu: false,
|
||
topTitle: true,
|
||
count: false,
|
||
siteManagement: false,
|
||
siteError: false,
|
||
operationMonitor: false,
|
||
user: false,
|
||
distort: false,
|
||
province: true,
|
||
totalAlertCount: false,
|
||
top10Admin: false,
|
||
insertCount: true,
|
||
alertCount: false,
|
||
underAttackArea: true,
|
||
attackArea: true,
|
||
addSite: false,
|
||
addSites: false,
|
||
pnameSearch: true,
|
||
domainSearch: true,
|
||
protectEdit: false,
|
||
preciseBtns: false,
|
||
dataBtns: false,
|
||
selectAllDomain: true,
|
||
errorPage: false
|
||
},
|
||
wafQgAdmin: {
|
||
adminName: "QGAdmin",
|
||
loginBtn: false,
|
||
menu: true,
|
||
topTitle: true,
|
||
count: true,
|
||
siteManagement: true,
|
||
siteError: false,
|
||
operationMonitor: false,
|
||
user: false,
|
||
distort: false,
|
||
province: true,
|
||
totalAlertCount: false,
|
||
top10Admin: false,
|
||
insertCount: true,
|
||
alertCount: false,
|
||
underAttackArea: true,
|
||
attackArea: true,
|
||
addSite: false,
|
||
addSites: false,
|
||
pnameSearch: true,
|
||
domainSearch: true,
|
||
protectEdit: false,
|
||
preciseBtns: false,
|
||
dataBtns: false,
|
||
selectAllDomain: true,
|
||
errorPage: false
|
||
},
|
||
shAdmin: {
|
||
adminName: "SFAdmin",
|
||
loginBtn: false,
|
||
menu: false,
|
||
topTitle: true,
|
||
count: false,
|
||
siteManagement: false,
|
||
siteError: false,
|
||
operationMonitor: false,
|
||
user: false,
|
||
distort: false,
|
||
province: false,
|
||
totalAlertCount: false,
|
||
top10Admin: false,
|
||
insertCount: false,
|
||
alertCount: false,
|
||
underAttackArea: false,
|
||
attackArea: false,
|
||
addSite: false,
|
||
addSites: false,
|
||
pnameSearch: true,
|
||
domainSearch: true,
|
||
protectEdit: false,
|
||
preciseBtns: false,
|
||
dataBtns: false,
|
||
selectAllDomain: true,
|
||
errorPage: false
|
||
},
|
||
wafShAdmin: {
|
||
adminName: "SFAdmin",
|
||
loginBtn: false,
|
||
menu: true,
|
||
topTitle: true,
|
||
count: true,
|
||
siteManagement: true,
|
||
siteError: false, //网站异常菜单
|
||
operationMonitor: false,
|
||
user: false,
|
||
distort: false,
|
||
province: false,
|
||
totalAlertCount: false,
|
||
top10Admin: false,
|
||
insertCount: false,
|
||
alertCount: false,
|
||
underAttackArea: false,
|
||
attackArea: false,
|
||
addSite: false,
|
||
addSites: false,
|
||
pnameSearch: true,
|
||
domainSearch: true,
|
||
protectEdit: false,
|
||
preciseBtns: false,
|
||
dataBtns: false,
|
||
selectAllDomain: true,
|
||
errorPage: false
|
||
},
|
||
person: {
|
||
adminName: "person",
|
||
loginBtn: false,
|
||
menu: false,
|
||
topTitle: true,
|
||
count: false,
|
||
siteManagement: false,
|
||
siteError: false,
|
||
operationMonitor: false,
|
||
user: false,
|
||
distort: false,
|
||
province: false,
|
||
totalAlertCount: false,
|
||
top10Admin: false,
|
||
insertCount: false,
|
||
alertCount: false,
|
||
underAttackArea: false,
|
||
attackArea: false,
|
||
addSite: false,
|
||
addSites: false,
|
||
pnameSearch: false,
|
||
domainSearch: true,
|
||
protectEdit: true,
|
||
preciseBtns: true,
|
||
dataBtns: true,
|
||
selectAllDomain: false,
|
||
errorPage: false
|
||
}
|
||
};
|
||
var CEname = {
|
||
"Canada": "加拿大",
|
||
"Turkmenistan": "土库曼斯坦",
|
||
"Saint Helena": "圣赫勒拿",
|
||
"Lao PDR": "老挝",
|
||
"Lithuania": "立陶宛",
|
||
"Cambodia": "柬埔寨",
|
||
"Ethiopia": "埃塞俄比亚",
|
||
"Faeroe Is.": "法罗群岛",
|
||
"Swaziland": "斯威士兰",
|
||
"Palestine": "巴勒斯坦",
|
||
"Belize": "伯利兹",
|
||
"Argentina": "阿根廷",
|
||
"Bolivia": "玻利维亚",
|
||
"Cameroon": "喀麦隆",
|
||
"Burkina Faso": "布基纳法索",
|
||
"Aland": "奥兰群岛",
|
||
"Bahrain": "巴林",
|
||
"Saudi Arabia": "沙特阿拉伯",
|
||
"Fr. Polynesia": "法属波利尼西亚",
|
||
"Cape Verde": "佛得角",
|
||
"W. Sahara": "西撒哈拉",
|
||
"Slovenia": "斯洛文尼亚",
|
||
"Guatemala": "危地马拉",
|
||
"Guinea": "几内亚",
|
||
"Dem. Rep. Congo": "刚果(金)",
|
||
"Germany": "德国",
|
||
"Spain": "西班牙",
|
||
"Liberia": "利比里亚",
|
||
"Netherlands": "荷兰",
|
||
"Jamaica": "牙买加",
|
||
"Solomon Is.": "所罗门群岛",
|
||
"Oman": "阿曼",
|
||
"Tanzania": "坦桑尼亚",
|
||
"Costa Rica": "哥斯达黎加",
|
||
"Isle of Man": "曼岛",
|
||
"Gabon": "加蓬",
|
||
"Niue": "纽埃",
|
||
"Bahamas": "巴哈马",
|
||
"New Zealand": "新西兰",
|
||
"Yemen": "也门",
|
||
"Jersey": "泽西岛",
|
||
"Pakistan": "巴基斯坦",
|
||
"Albania": "阿尔巴尼亚",
|
||
"Samoa": "萨摩亚",
|
||
"Czech Rep.": "捷克",
|
||
"United Arab Emirates": "阿拉伯联合酋长国",
|
||
"Guam": "关岛",
|
||
"India": "印度",
|
||
"Azerbaijan": "阿塞拜疆",
|
||
"N. Mariana Is.": "北马里亚纳群岛",
|
||
"Lesotho": "莱索托",
|
||
"Kenya": "肯尼亚",
|
||
"Belarus": "白俄罗斯",
|
||
"Tajikistan": "塔吉克斯坦",
|
||
"Turkey": "土耳其",
|
||
"Afghanistan": "阿富汗",
|
||
"Bangladesh": "孟加拉国",
|
||
"Mauritania": "毛里塔尼亚",
|
||
"Dem. Rep. Korea": "朝鲜",
|
||
"Saint Lucia": "圣卢西亚",
|
||
"Br. Indian Ocean Ter.": "英属印度洋领地",
|
||
"Mongolia": "蒙古",
|
||
"France": "法国",
|
||
"Cura?ao": "库拉索岛",
|
||
"S. Sudan": "南苏丹",
|
||
"Rwanda": "卢旺达",
|
||
"Slovakia": "斯洛伐克",
|
||
"Somalia": "索马里",
|
||
"Peru": "秘鲁",
|
||
"Vanuatu": "瓦努阿图",
|
||
"Norway": "挪威",
|
||
"Malawi": "马拉维",
|
||
"Benin": "贝宁",
|
||
"St. Vin. and Gren.": "圣文森特和格林纳丁斯",
|
||
"Korea": "韩国",
|
||
"Singapore": "新加坡",
|
||
"Montenegro": "黑山共和国",
|
||
"Cayman Is.": "开曼群岛",
|
||
"Togo": "多哥",
|
||
"China": "中国",
|
||
"Heard I. and McDonald Is.": "赫德岛和麦克唐纳群岛",
|
||
"Armenia": "亚美尼亚",
|
||
"Falkland Is.": "马尔维纳斯群岛(福克兰)",
|
||
"Ukraine": "乌克兰",
|
||
"Ghana": "加纳",
|
||
"Tonga": "汤加",
|
||
"Finland": "芬兰",
|
||
"Libya": "利比亚",
|
||
"Dominican Rep.": "多米尼加",
|
||
"Indonesia": "印度尼西亚",
|
||
"Mauritius": "毛里求斯",
|
||
"Eq. Guinea": "赤道几内亚",
|
||
"Sweden": "瑞典",
|
||
"Vietnam": "越南",
|
||
"Mali": "马里",
|
||
"Russia": "俄罗斯",
|
||
"Bulgaria": "保加利亚",
|
||
"United States": "美国",
|
||
"Romania": "罗马尼亚",
|
||
"Angola": "安哥拉",
|
||
"Chad": "乍得",
|
||
"South Africa": "南非",
|
||
"Fiji": "斐济",
|
||
"Liechtenstein": "列支敦士登",
|
||
"Malaysia": "马来西亚",
|
||
"Austria": "奥地利",
|
||
"Mozambique": "莫桑比克",
|
||
"Uganda": "乌干达",
|
||
"Japan": "日本",
|
||
"Niger": "尼日尔",
|
||
"Brazil": "巴西",
|
||
"Kuwait": "科威特",
|
||
"Panama": "巴拿马",
|
||
"Guyana": "圭亚那",
|
||
"Madagascar": "马达加斯加",
|
||
"Luxembourg": "卢森堡",
|
||
"American Samoa": "美属萨摩亚",
|
||
"Andorra": "安道尔",
|
||
"Ireland": "爱尔兰",
|
||
"Italy": "意大利",
|
||
"Nigeria": "尼日利亚",
|
||
"Turks and Caicos Is.": "特克斯和凯科斯群岛",
|
||
"Ecuador": "厄瓜多尔",
|
||
"U.S. Virgin Is.": "美属维尔京群岛",
|
||
"Brunei": "文莱",
|
||
"Australia": "澳大利亚",
|
||
"Iran": "伊朗",
|
||
"Algeria": "阿尔及利亚",
|
||
"El Salvador": "萨尔瓦多",
|
||
"C?te d'Ivoire": "科特迪瓦",
|
||
"Chile": "智利",
|
||
"Puerto Rico": "波多黎各",
|
||
"Belgium": "比利时",
|
||
"Thailand": "泰国",
|
||
"Haiti": "海地",
|
||
"Iraq": "伊拉克",
|
||
"S?o Tomé and Principe": "圣多美和普林西比",
|
||
"Sierra Leone": "塞拉利昂",
|
||
"Georgia": "格鲁吉亚",
|
||
"Denmark": "丹麦",
|
||
"Philippines": "菲律宾",
|
||
"S. Geo. and S. Sandw. Is.": "南乔治亚岛和南桑威奇群岛",
|
||
"Moldova": "摩尔多瓦",
|
||
"Morocco": "摩洛哥",
|
||
"Namibia": "纳米比亚",
|
||
"Malta": "马耳他",
|
||
"Guinea-Bissau": "几内亚比绍",
|
||
"Kiribati": "基里巴斯",
|
||
"Switzerland": "瑞士",
|
||
"Grenada": "格林纳达",
|
||
"Seychelles": "塞舌尔",
|
||
"Portugal": "葡萄牙",
|
||
"Estonia": "爱沙尼亚",
|
||
"Uruguay": "乌拉圭",
|
||
"Antigua and Barb.": "安提瓜和巴布达",
|
||
"Lebanon": "黎巴嫩",
|
||
"Uzbekistan": "乌兹别克斯坦",
|
||
"Tunisia": "突尼斯",
|
||
"Djibouti": "吉布提",
|
||
"Greenland": "格陵兰",
|
||
"Timor-Leste": "东帝汶",
|
||
"Dominica": "多米尼克",
|
||
"Colombia": "哥伦比亚",
|
||
"Burundi": "布隆迪",
|
||
"Bosnia and Herz.": "波斯尼亚和黑塞哥维那",
|
||
"Cyprus": "塞浦路斯",
|
||
"Barbados": "巴巴多斯",
|
||
"Qatar": "卡塔尔",
|
||
"Palau": "帕劳",
|
||
"Bhutan": "不丹",
|
||
"Sudan": "苏丹",
|
||
"Nepal": "尼泊尔",
|
||
"Micronesia": "密克罗尼西亚",
|
||
"Bermuda": "百慕大",
|
||
"Suriname": "苏里南",
|
||
"Venezuela": "委内瑞拉",
|
||
"Israel": "以色列",
|
||
"St. Pierre and Miquelon": "圣皮埃尔和密克隆群岛",
|
||
"Central African Rep.": "中非",
|
||
"Iceland": "冰岛",
|
||
"Zambia": "赞比亚",
|
||
"Senegal": "塞内加尔",
|
||
"Papua New Guinea": "巴布亚新几内亚",
|
||
"Trinidad and Tobago": "特立尼达和多巴哥",
|
||
"Zimbabwe": "津巴布韦",
|
||
"Jordan": "约旦",
|
||
"Gambia": "冈比亚",
|
||
"Kazakhstan": "哈萨克斯坦",
|
||
"Poland": "波兰",
|
||
"Eritrea": "厄立特里亚",
|
||
"Kyrgyzstan": "吉尔吉斯斯坦",
|
||
"Montserrat": "蒙特塞拉特",
|
||
"New Caledonia": "新喀里多尼亚",
|
||
"Macedonia": "马其顿",
|
||
"Paraguay": "巴拉圭",
|
||
"Latvia": "拉脱维亚",
|
||
"Hungary": "匈牙利",
|
||
"Syria": "叙利亚",
|
||
"Honduras": "洪都拉斯",
|
||
"Myanmar": "缅甸",
|
||
"Mexico": "墨西哥",
|
||
"Egypt": "埃及",
|
||
"Nicaragua": "尼加拉瓜",
|
||
"Cuba": "古巴",
|
||
"Serbia": "塞尔维亚",
|
||
"Comoros": "科摩罗",
|
||
"United Kingdom": "英国",
|
||
"Fr. S. Antarctic Lands": "南极洲",
|
||
"Congo": "刚果(布)",
|
||
"Greece": "希腊",
|
||
"Sri Lanka": "斯里兰卡",
|
||
"Croatia": "克罗地亚",
|
||
"Botswana": "博茨瓦纳",
|
||
"Siachen Glacier": "锡亚琴冰川地区"
|
||
};
|
||
return {
|
||
commonChartOption: commonChartOption,
|
||
Enum: Enum,
|
||
params: params,
|
||
operators: operators,
|
||
attackTypes: attackTypes,
|
||
actions: actions,
|
||
httpPorts: httpPorts,
|
||
httpsPorts: httpsPorts,
|
||
Regex: Regex,
|
||
opera: opera,
|
||
URL: URL,
|
||
role: role,
|
||
CEname: CEname
|
||
};
|
||
})());
|
||
|
||
/***/ }),
|
||
|
||
/***/ "DyA3":
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var __WEBPACK_AMD_DEFINE_RESULT__;/**!
|
||
* RSA and ECC in JavaScript
|
||
*
|
||
* The jsbn library is a fast, portable implementation of large-number math
|
||
* in pure JavaScript, enabling public-key crypto and other applications on desktop
|
||
* and mobile browsers.
|
||
*
|
||
* @author Tom Wu <tjw@cs.stanford.edu>
|
||
* http://www-cs-students.stanford.edu/~tjw/jsbn/
|
||
*
|
||
* @build lib/jsbn lib/prng4 lib/rnd lib/rsa lib/base64
|
||
*/
|
||
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, module) {
|
||
// Copyright (c) 2005 Tom Wu
|
||
// All Rights Reserved.
|
||
// See "LICENSE" for details.
|
||
|
||
// Basic JavaScript BN library - subset useful for RSA encryption.
|
||
|
||
// Bits per digit
|
||
var dbits;
|
||
|
||
// JavaScript engine analysis
|
||
var canary = 0xdeadbeefcafe;
|
||
var j_lm = (canary & 0xffffff) == 0xefcafe;
|
||
|
||
// (public) Constructor
|
||
function BigInteger(a, b, c) {
|
||
if (a != null) if ("number" == typeof a) this.fromNumber(a, b, c);else if (b == null && "string" != typeof a) this.fromString(a, 256);else this.fromString(a, b);
|
||
}
|
||
|
||
// return new, unset BigInteger
|
||
function nbi() {
|
||
return new BigInteger(null);
|
||
}
|
||
|
||
// am: Compute w_j += (x*this_i), propagate carries,
|
||
// c is initial carry, returns final carry.
|
||
// c < 3*dvalue, x < 2*dvalue, this_i < dvalue
|
||
// We need to select the fastest one that works in this environment.
|
||
|
||
// am1: use a single mult and divide to get the high bits,
|
||
// max digit bits should be 26 because
|
||
// max internal value = 2*dvalue^2-2*dvalue (< 2^53)
|
||
function am1(i, x, w, j, c, n) {
|
||
while (--n >= 0) {
|
||
var v = x * this[i++] + w[j] + c;
|
||
c = Math.floor(v / 0x4000000);
|
||
w[j++] = v & 0x3ffffff;
|
||
}
|
||
return c;
|
||
}
|
||
// am2 avoids a big mult-and-extract completely.
|
||
// Max digit bits should be <= 30 because we do bitwise ops
|
||
// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
|
||
function am2(i, x, w, j, c, n) {
|
||
var xl = x & 0x7fff,
|
||
xh = x >> 15;
|
||
while (--n >= 0) {
|
||
var l = this[i] & 0x7fff;
|
||
var h = this[i++] >> 15;
|
||
var m = xh * l + h * xl;
|
||
l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);
|
||
c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);
|
||
w[j++] = l & 0x3fffffff;
|
||
}
|
||
return c;
|
||
}
|
||
// Alternately, set max digit bits to 28 since some
|
||
// browsers slow down when dealing with 32-bit numbers.
|
||
function am3(i, x, w, j, c, n) {
|
||
var xl = x & 0x3fff,
|
||
xh = x >> 14;
|
||
while (--n >= 0) {
|
||
var l = this[i] & 0x3fff;
|
||
var h = this[i++] >> 14;
|
||
var m = xh * l + h * xl;
|
||
l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;
|
||
c = (l >> 28) + (m >> 14) + xh * h;
|
||
w[j++] = l & 0xfffffff;
|
||
}
|
||
return c;
|
||
}
|
||
if (j_lm && navigator.appName == "Microsoft Internet Explorer") {
|
||
BigInteger.prototype.am = am2;
|
||
dbits = 30;
|
||
} else if (j_lm && navigator.appName != "Netscape") {
|
||
BigInteger.prototype.am = am1;
|
||
dbits = 26;
|
||
} else {
|
||
// Mozilla/Netscape seems to prefer am3
|
||
BigInteger.prototype.am = am3;
|
||
dbits = 28;
|
||
}
|
||
|
||
BigInteger.prototype.DB = dbits;
|
||
BigInteger.prototype.DM = (1 << dbits) - 1;
|
||
BigInteger.prototype.DV = 1 << dbits;
|
||
|
||
var BI_FP = 52;
|
||
BigInteger.prototype.FV = Math.pow(2, BI_FP);
|
||
BigInteger.prototype.F1 = BI_FP - dbits;
|
||
BigInteger.prototype.F2 = 2 * dbits - BI_FP;
|
||
|
||
// Digit conversions
|
||
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||
var BI_RC = new Array();
|
||
var rr, vv;
|
||
rr = "0".charCodeAt(0);
|
||
for (vv = 0; vv <= 9; ++vv) {
|
||
BI_RC[rr++] = vv;
|
||
}rr = "a".charCodeAt(0);
|
||
for (vv = 10; vv < 36; ++vv) {
|
||
BI_RC[rr++] = vv;
|
||
}rr = "A".charCodeAt(0);
|
||
for (vv = 10; vv < 36; ++vv) {
|
||
BI_RC[rr++] = vv;
|
||
}function int2char(n) {
|
||
return BI_RM.charAt(n);
|
||
}
|
||
function intAt(s, i) {
|
||
var c = BI_RC[s.charCodeAt(i)];
|
||
return c == null ? -1 : c;
|
||
}
|
||
|
||
// (protected) copy this to r
|
||
function bnpCopyTo(r) {
|
||
for (var i = this.t - 1; i >= 0; --i) {
|
||
r[i] = this[i];
|
||
}r.t = this.t;
|
||
r.s = this.s;
|
||
}
|
||
|
||
// (protected) set from integer value x, -DV <= x < DV
|
||
function bnpFromInt(x) {
|
||
this.t = 1;
|
||
this.s = x < 0 ? -1 : 0;
|
||
if (x > 0) this[0] = x;else if (x < -1) this[0] = x + this.DV;else this.t = 0;
|
||
}
|
||
|
||
// return bigint initialized to value
|
||
function nbv(i) {
|
||
var r = nbi();r.fromInt(i);return r;
|
||
}
|
||
|
||
// (protected) set from string and radix
|
||
function bnpFromString(s, b) {
|
||
var k;
|
||
if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 256) k = 8; // byte array
|
||
else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else {
|
||
this.fromRadix(s, b);return;
|
||
}
|
||
this.t = 0;
|
||
this.s = 0;
|
||
var i = s.length,
|
||
mi = false,
|
||
sh = 0;
|
||
while (--i >= 0) {
|
||
var x = k == 8 ? s[i] & 0xff : intAt(s, i);
|
||
if (x < 0) {
|
||
if (s.charAt(i) == "-") mi = true;
|
||
continue;
|
||
}
|
||
mi = false;
|
||
if (sh == 0) this[this.t++] = x;else if (sh + k > this.DB) {
|
||
this[this.t - 1] |= (x & (1 << this.DB - sh) - 1) << sh;
|
||
this[this.t++] = x >> this.DB - sh;
|
||
} else this[this.t - 1] |= x << sh;
|
||
sh += k;
|
||
if (sh >= this.DB) sh -= this.DB;
|
||
}
|
||
if (k == 8 && (s[0] & 0x80) != 0) {
|
||
this.s = -1;
|
||
if (sh > 0) this[this.t - 1] |= (1 << this.DB - sh) - 1 << sh;
|
||
}
|
||
this.clamp();
|
||
if (mi) BigInteger.ZERO.subTo(this, this);
|
||
}
|
||
|
||
// (protected) clamp off excess high words
|
||
function bnpClamp() {
|
||
var c = this.s & this.DM;
|
||
while (this.t > 0 && this[this.t - 1] == c) {
|
||
--this.t;
|
||
}
|
||
}
|
||
|
||
// (public) return string representation in given radix
|
||
function bnToString(b) {
|
||
if (this.s < 0) return "-" + this.negate().toString(b);
|
||
var k;
|
||
if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else return this.toRadix(b);
|
||
var km = (1 << k) - 1,
|
||
d,
|
||
m = false,
|
||
r = "",
|
||
i = this.t;
|
||
var p = this.DB - i * this.DB % k;
|
||
if (i-- > 0) {
|
||
if (p < this.DB && (d = this[i] >> p) > 0) {
|
||
m = true;r = int2char(d);
|
||
}
|
||
while (i >= 0) {
|
||
if (p < k) {
|
||
d = (this[i] & (1 << p) - 1) << k - p;
|
||
d |= this[--i] >> (p += this.DB - k);
|
||
} else {
|
||
d = this[i] >> (p -= k) & km;
|
||
if (p <= 0) {
|
||
p += this.DB;--i;
|
||
}
|
||
}
|
||
if (d > 0) m = true;
|
||
if (m) r += int2char(d);
|
||
}
|
||
}
|
||
return m ? r : "0";
|
||
}
|
||
|
||
// (public) -this
|
||
function bnNegate() {
|
||
var r = nbi();BigInteger.ZERO.subTo(this, r);return r;
|
||
}
|
||
|
||
// (public) |this|
|
||
function bnAbs() {
|
||
return this.s < 0 ? this.negate() : this;
|
||
}
|
||
|
||
// (public) return + if this > a, - if this < a, 0 if equal
|
||
function bnCompareTo(a) {
|
||
var r = this.s - a.s;
|
||
if (r != 0) return r;
|
||
var i = this.t;
|
||
r = i - a.t;
|
||
if (r != 0) return this.s < 0 ? -r : r;
|
||
while (--i >= 0) {
|
||
if ((r = this[i] - a[i]) != 0) return r;
|
||
}return 0;
|
||
}
|
||
|
||
// returns bit length of the integer x
|
||
function nbits(x) {
|
||
var r = 1,
|
||
t;
|
||
if ((t = x >>> 16) != 0) {
|
||
x = t;r += 16;
|
||
}
|
||
if ((t = x >> 8) != 0) {
|
||
x = t;r += 8;
|
||
}
|
||
if ((t = x >> 4) != 0) {
|
||
x = t;r += 4;
|
||
}
|
||
if ((t = x >> 2) != 0) {
|
||
x = t;r += 2;
|
||
}
|
||
if ((t = x >> 1) != 0) {
|
||
x = t;r += 1;
|
||
}
|
||
return r;
|
||
}
|
||
|
||
// (public) return the number of bits in "this"
|
||
function bnBitLength() {
|
||
if (this.t <= 0) return 0;
|
||
return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);
|
||
}
|
||
|
||
// (protected) r = this << n*DB
|
||
function bnpDLShiftTo(n, r) {
|
||
var i;
|
||
for (i = this.t - 1; i >= 0; --i) {
|
||
r[i + n] = this[i];
|
||
}for (i = n - 1; i >= 0; --i) {
|
||
r[i] = 0;
|
||
}r.t = this.t + n;
|
||
r.s = this.s;
|
||
}
|
||
|
||
// (protected) r = this >> n*DB
|
||
function bnpDRShiftTo(n, r) {
|
||
for (var i = n; i < this.t; ++i) {
|
||
r[i - n] = this[i];
|
||
}r.t = Math.max(this.t - n, 0);
|
||
r.s = this.s;
|
||
}
|
||
|
||
// (protected) r = this << n
|
||
function bnpLShiftTo(n, r) {
|
||
var bs = n % this.DB;
|
||
var cbs = this.DB - bs;
|
||
var bm = (1 << cbs) - 1;
|
||
var ds = Math.floor(n / this.DB),
|
||
c = this.s << bs & this.DM,
|
||
i;
|
||
for (i = this.t - 1; i >= 0; --i) {
|
||
r[i + ds + 1] = this[i] >> cbs | c;
|
||
c = (this[i] & bm) << bs;
|
||
}
|
||
for (i = ds - 1; i >= 0; --i) {
|
||
r[i] = 0;
|
||
}r[ds] = c;
|
||
r.t = this.t + ds + 1;
|
||
r.s = this.s;
|
||
r.clamp();
|
||
}
|
||
|
||
// (protected) r = this >> n
|
||
function bnpRShiftTo(n, r) {
|
||
r.s = this.s;
|
||
var ds = Math.floor(n / this.DB);
|
||
if (ds >= this.t) {
|
||
r.t = 0;return;
|
||
}
|
||
var bs = n % this.DB;
|
||
var cbs = this.DB - bs;
|
||
var bm = (1 << bs) - 1;
|
||
r[0] = this[ds] >> bs;
|
||
for (var i = ds + 1; i < this.t; ++i) {
|
||
r[i - ds - 1] |= (this[i] & bm) << cbs;
|
||
r[i - ds] = this[i] >> bs;
|
||
}
|
||
if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;
|
||
r.t = this.t - ds;
|
||
r.clamp();
|
||
}
|
||
|
||
// (protected) r = this - a
|
||
function bnpSubTo(a, r) {
|
||
var i = 0,
|
||
c = 0,
|
||
m = Math.min(a.t, this.t);
|
||
while (i < m) {
|
||
c += this[i] - a[i];
|
||
r[i++] = c & this.DM;
|
||
c >>= this.DB;
|
||
}
|
||
if (a.t < this.t) {
|
||
c -= a.s;
|
||
while (i < this.t) {
|
||
c += this[i];
|
||
r[i++] = c & this.DM;
|
||
c >>= this.DB;
|
||
}
|
||
c += this.s;
|
||
} else {
|
||
c += this.s;
|
||
while (i < a.t) {
|
||
c -= a[i];
|
||
r[i++] = c & this.DM;
|
||
c >>= this.DB;
|
||
}
|
||
c -= a.s;
|
||
}
|
||
r.s = c < 0 ? -1 : 0;
|
||
if (c < -1) r[i++] = this.DV + c;else if (c > 0) r[i++] = c;
|
||
r.t = i;
|
||
r.clamp();
|
||
}
|
||
|
||
// (protected) r = this * a, r != this,a (HAC 14.12)
|
||
// "this" should be the larger one if appropriate.
|
||
function bnpMultiplyTo(a, r) {
|
||
var x = this.abs(),
|
||
y = a.abs();
|
||
var i = x.t;
|
||
r.t = i + y.t;
|
||
while (--i >= 0) {
|
||
r[i] = 0;
|
||
}for (i = 0; i < y.t; ++i) {
|
||
r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);
|
||
}r.s = 0;
|
||
r.clamp();
|
||
if (this.s != a.s) BigInteger.ZERO.subTo(r, r);
|
||
}
|
||
|
||
// (protected) r = this^2, r != this (HAC 14.16)
|
||
function bnpSquareTo(r) {
|
||
var x = this.abs();
|
||
var i = r.t = 2 * x.t;
|
||
while (--i >= 0) {
|
||
r[i] = 0;
|
||
}for (i = 0; i < x.t - 1; ++i) {
|
||
var c = x.am(i, x[i], r, 2 * i, 0, 1);
|
||
if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {
|
||
r[i + x.t] -= x.DV;
|
||
r[i + x.t + 1] = 1;
|
||
}
|
||
}
|
||
if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);
|
||
r.s = 0;
|
||
r.clamp();
|
||
}
|
||
|
||
// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
|
||
// r != q, this != m. q or r may be null.
|
||
function bnpDivRemTo(m, q, r) {
|
||
var pm = m.abs();
|
||
if (pm.t <= 0) return;
|
||
var pt = this.abs();
|
||
if (pt.t < pm.t) {
|
||
if (q != null) q.fromInt(0);
|
||
if (r != null) this.copyTo(r);
|
||
return;
|
||
}
|
||
if (r == null) r = nbi();
|
||
var y = nbi(),
|
||
ts = this.s,
|
||
ms = m.s;
|
||
var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus
|
||
if (nsh > 0) {
|
||
pm.lShiftTo(nsh, y);pt.lShiftTo(nsh, r);
|
||
} else {
|
||
pm.copyTo(y);pt.copyTo(r);
|
||
}
|
||
var ys = y.t;
|
||
var y0 = y[ys - 1];
|
||
if (y0 == 0) return;
|
||
var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);
|
||
var d1 = this.FV / yt,
|
||
d2 = (1 << this.F1) / yt,
|
||
e = 1 << this.F2;
|
||
var i = r.t,
|
||
j = i - ys,
|
||
t = q == null ? nbi() : q;
|
||
y.dlShiftTo(j, t);
|
||
if (r.compareTo(t) >= 0) {
|
||
r[r.t++] = 1;
|
||
r.subTo(t, r);
|
||
}
|
||
BigInteger.ONE.dlShiftTo(ys, t);
|
||
t.subTo(y, y); // "negative" y so we can replace sub with am later
|
||
while (y.t < ys) {
|
||
y[y.t++] = 0;
|
||
}while (--j >= 0) {
|
||
// Estimate quotient digit
|
||
var qd = r[--i] == y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);
|
||
if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {
|
||
// Try it out
|
||
y.dlShiftTo(j, t);
|
||
r.subTo(t, r);
|
||
while (r[i] < --qd) {
|
||
r.subTo(t, r);
|
||
}
|
||
}
|
||
}
|
||
if (q != null) {
|
||
r.drShiftTo(ys, q);
|
||
if (ts != ms) BigInteger.ZERO.subTo(q, q);
|
||
}
|
||
r.t = ys;
|
||
r.clamp();
|
||
if (nsh > 0) r.rShiftTo(nsh, r); // Denormalize remainder
|
||
if (ts < 0) BigInteger.ZERO.subTo(r, r);
|
||
}
|
||
|
||
// (public) this mod a
|
||
function bnMod(a) {
|
||
var r = nbi();
|
||
this.abs().divRemTo(a, null, r);
|
||
if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);
|
||
return r;
|
||
}
|
||
|
||
// Modular reduction using "classic" algorithm
|
||
function Classic(m) {
|
||
this.m = m;
|
||
}
|
||
function cConvert(x) {
|
||
if (x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);else return x;
|
||
}
|
||
function cRevert(x) {
|
||
return x;
|
||
}
|
||
function cReduce(x) {
|
||
x.divRemTo(this.m, null, x);
|
||
}
|
||
function cMulTo(x, y, r) {
|
||
x.multiplyTo(y, r);this.reduce(r);
|
||
}
|
||
function cSqrTo(x, r) {
|
||
x.squareTo(r);this.reduce(r);
|
||
}
|
||
|
||
Classic.prototype.convert = cConvert;
|
||
Classic.prototype.revert = cRevert;
|
||
Classic.prototype.reduce = cReduce;
|
||
Classic.prototype.mulTo = cMulTo;
|
||
Classic.prototype.sqrTo = cSqrTo;
|
||
|
||
// (protected) return "-1/this % 2^DB"; useful for Mont. reduction
|
||
// justification:
|
||
// xy == 1 (mod m)
|
||
// xy = 1+km
|
||
// xy(2-xy) = (1+km)(1-km)
|
||
// x[y(2-xy)] = 1-k^2m^2
|
||
// x[y(2-xy)] == 1 (mod m^2)
|
||
// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
|
||
// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
|
||
// JS multiply "overflows" differently from C/C++, so care is needed here.
|
||
function bnpInvDigit() {
|
||
if (this.t < 1) return 0;
|
||
var x = this[0];
|
||
if ((x & 1) == 0) return 0;
|
||
var y = x & 3; // y == 1/x mod 2^2
|
||
y = y * (2 - (x & 0xf) * y) & 0xf; // y == 1/x mod 2^4
|
||
y = y * (2 - (x & 0xff) * y) & 0xff; // y == 1/x mod 2^8
|
||
y = y * (2 - ((x & 0xffff) * y & 0xffff)) & 0xffff; // y == 1/x mod 2^16
|
||
// last step - calculate inverse mod DV directly;
|
||
// assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
|
||
y = y * (2 - x * y % this.DV) % this.DV; // y == 1/x mod 2^dbits
|
||
// we really want the negative inverse, and -DV < y < DV
|
||
return y > 0 ? this.DV - y : -y;
|
||
}
|
||
|
||
// Montgomery reduction
|
||
function Montgomery(m) {
|
||
this.m = m;
|
||
this.mp = m.invDigit();
|
||
this.mpl = this.mp & 0x7fff;
|
||
this.mph = this.mp >> 15;
|
||
this.um = (1 << m.DB - 15) - 1;
|
||
this.mt2 = 2 * m.t;
|
||
}
|
||
|
||
// xR mod m
|
||
function montConvert(x) {
|
||
var r = nbi();
|
||
x.abs().dlShiftTo(this.m.t, r);
|
||
r.divRemTo(this.m, null, r);
|
||
if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);
|
||
return r;
|
||
}
|
||
|
||
// x/R mod m
|
||
function montRevert(x) {
|
||
var r = nbi();
|
||
x.copyTo(r);
|
||
this.reduce(r);
|
||
return r;
|
||
}
|
||
|
||
// x = x/R mod m (HAC 14.32)
|
||
function montReduce(x) {
|
||
while (x.t <= this.mt2) {
|
||
// pad x so am has enough room later
|
||
x[x.t++] = 0;
|
||
}for (var i = 0; i < this.m.t; ++i) {
|
||
// faster way of calculating u0 = x[i]*mp mod DV
|
||
var j = x[i] & 0x7fff;
|
||
var u0 = j * this.mpl + ((j * this.mph + (x[i] >> 15) * this.mpl & this.um) << 15) & x.DM;
|
||
// use am to combine the multiply-shift-add into one call
|
||
j = i + this.m.t;
|
||
x[j] += this.m.am(0, u0, x, i, 0, this.m.t);
|
||
// propagate carry
|
||
while (x[j] >= x.DV) {
|
||
x[j] -= x.DV;x[++j]++;
|
||
}
|
||
}
|
||
x.clamp();
|
||
x.drShiftTo(this.m.t, x);
|
||
if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);
|
||
}
|
||
|
||
// r = "x^2/R mod m"; x != r
|
||
function montSqrTo(x, r) {
|
||
x.squareTo(r);this.reduce(r);
|
||
}
|
||
|
||
// r = "xy/R mod m"; x,y != r
|
||
function montMulTo(x, y, r) {
|
||
x.multiplyTo(y, r);this.reduce(r);
|
||
}
|
||
|
||
Montgomery.prototype.convert = montConvert;
|
||
Montgomery.prototype.revert = montRevert;
|
||
Montgomery.prototype.reduce = montReduce;
|
||
Montgomery.prototype.mulTo = montMulTo;
|
||
Montgomery.prototype.sqrTo = montSqrTo;
|
||
|
||
// (protected) true iff this is even
|
||
function bnpIsEven() {
|
||
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
|
||
}
|
||
|
||
// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
|
||
function bnpExp(e, z) {
|
||
if (e > 0xffffffff || e < 1) return BigInteger.ONE;
|
||
var r = nbi(),
|
||
r2 = nbi(),
|
||
g = z.convert(this),
|
||
i = nbits(e) - 1;
|
||
g.copyTo(r);
|
||
while (--i >= 0) {
|
||
z.sqrTo(r, r2);
|
||
if ((e & 1 << i) > 0) z.mulTo(r2, g, r);else {
|
||
var t = r;r = r2;r2 = t;
|
||
}
|
||
}
|
||
return z.revert(r);
|
||
}
|
||
|
||
// (public) this^e % m, 0 <= e < 2^32
|
||
function bnModPowInt(e, m) {
|
||
var z;
|
||
if (e < 256 || m.isEven()) z = new Classic(m);else z = new Montgomery(m);
|
||
return this.exp(e, z);
|
||
}
|
||
|
||
// protected
|
||
BigInteger.prototype.copyTo = bnpCopyTo;
|
||
BigInteger.prototype.fromInt = bnpFromInt;
|
||
BigInteger.prototype.fromString = bnpFromString;
|
||
BigInteger.prototype.clamp = bnpClamp;
|
||
BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
|
||
BigInteger.prototype.drShiftTo = bnpDRShiftTo;
|
||
BigInteger.prototype.lShiftTo = bnpLShiftTo;
|
||
BigInteger.prototype.rShiftTo = bnpRShiftTo;
|
||
BigInteger.prototype.subTo = bnpSubTo;
|
||
BigInteger.prototype.multiplyTo = bnpMultiplyTo;
|
||
BigInteger.prototype.squareTo = bnpSquareTo;
|
||
BigInteger.prototype.divRemTo = bnpDivRemTo;
|
||
BigInteger.prototype.invDigit = bnpInvDigit;
|
||
BigInteger.prototype.isEven = bnpIsEven;
|
||
BigInteger.prototype.exp = bnpExp;
|
||
|
||
// public
|
||
BigInteger.prototype.toString = bnToString;
|
||
BigInteger.prototype.negate = bnNegate;
|
||
BigInteger.prototype.abs = bnAbs;
|
||
BigInteger.prototype.compareTo = bnCompareTo;
|
||
BigInteger.prototype.bitLength = bnBitLength;
|
||
BigInteger.prototype.mod = bnMod;
|
||
BigInteger.prototype.modPowInt = bnModPowInt;
|
||
|
||
// "constants"
|
||
BigInteger.ZERO = nbv(0);
|
||
BigInteger.ONE = nbv(1);
|
||
|
||
// prng4.js - uses Arcfour as a PRNG
|
||
|
||
function Arcfour() {
|
||
this.i = 0;
|
||
this.j = 0;
|
||
this.S = new Array();
|
||
}
|
||
|
||
// Initialize arcfour context from key, an array of ints, each from [0..255]
|
||
function ARC4init(key) {
|
||
var i, j, t;
|
||
for (i = 0; i < 256; ++i) {
|
||
this.S[i] = i;
|
||
}j = 0;
|
||
for (i = 0; i < 256; ++i) {
|
||
j = j + this.S[i] + key[i % key.length] & 255;
|
||
t = this.S[i];
|
||
this.S[i] = this.S[j];
|
||
this.S[j] = t;
|
||
}
|
||
this.i = 0;
|
||
this.j = 0;
|
||
}
|
||
|
||
function ARC4next() {
|
||
var t;
|
||
this.i = this.i + 1 & 255;
|
||
this.j = this.j + this.S[this.i] & 255;
|
||
t = this.S[this.i];
|
||
this.S[this.i] = this.S[this.j];
|
||
this.S[this.j] = t;
|
||
return this.S[t + this.S[this.i] & 255];
|
||
}
|
||
|
||
Arcfour.prototype.init = ARC4init;
|
||
Arcfour.prototype.next = ARC4next;
|
||
|
||
// Plug in your RNG constructor here
|
||
function prng_newstate() {
|
||
return new Arcfour();
|
||
}
|
||
|
||
// Pool size must be a multiple of 4 and greater than 32.
|
||
// An array of bytes the size of the pool will be passed to init()
|
||
var rng_psize = 256;
|
||
|
||
// Random number generator - requires a PRNG backend, e.g. prng4.js
|
||
|
||
// For best results, put code like
|
||
// <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>
|
||
// in your main HTML document.
|
||
|
||
var rng_state;
|
||
var rng_pool;
|
||
var rng_pptr;
|
||
|
||
// Mix in a 32-bit integer into the pool
|
||
function rng_seed_int(x) {
|
||
rng_pool[rng_pptr++] ^= x & 255;
|
||
rng_pool[rng_pptr++] ^= x >> 8 & 255;
|
||
rng_pool[rng_pptr++] ^= x >> 16 & 255;
|
||
rng_pool[rng_pptr++] ^= x >> 24 & 255;
|
||
if (rng_pptr >= rng_psize) rng_pptr -= rng_psize;
|
||
}
|
||
|
||
// Mix in the current time (w/milliseconds) into the pool
|
||
function rng_seed_time() {
|
||
rng_seed_int(new Date().getTime());
|
||
}
|
||
|
||
// Initialize the pool with junk if needed.
|
||
if (rng_pool == null) {
|
||
rng_pool = new Array();
|
||
rng_pptr = 0;
|
||
var t;
|
||
if (window.crypto && window.crypto.getRandomValues) {
|
||
// Use webcrypto if available
|
||
var ua = new Uint8Array(32);
|
||
window.crypto.getRandomValues(ua);
|
||
for (t = 0; t < 32; ++t) {
|
||
rng_pool[rng_pptr++] = ua[t];
|
||
}
|
||
}
|
||
if (navigator.appName == "Netscape" && navigator.appVersion < "5" && window.crypto) {
|
||
// Extract entropy (256 bits) from NS4 RNG if available
|
||
var z = window.crypto.random(32);
|
||
for (t = 0; t < z.length; ++t) {
|
||
rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;
|
||
}
|
||
}
|
||
while (rng_pptr < rng_psize) {
|
||
// extract some randomness from Math.random()
|
||
t = Math.floor(65536 * Math.random());
|
||
rng_pool[rng_pptr++] = t >>> 8;
|
||
rng_pool[rng_pptr++] = t & 255;
|
||
}
|
||
rng_pptr = 0;
|
||
rng_seed_time();
|
||
//rng_seed_int(window.screenX);
|
||
//rng_seed_int(window.screenY);
|
||
}
|
||
|
||
function rng_get_byte() {
|
||
if (rng_state == null) {
|
||
rng_seed_time();
|
||
rng_state = prng_newstate();
|
||
rng_state.init(rng_pool);
|
||
for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {
|
||
rng_pool[rng_pptr] = 0;
|
||
}rng_pptr = 0;
|
||
//rng_pool = null;
|
||
}
|
||
// TODO: allow reseeding after first request
|
||
return rng_state.next();
|
||
}
|
||
|
||
function rng_get_bytes(ba) {
|
||
var i;
|
||
for (i = 0; i < ba.length; ++i) {
|
||
ba[i] = rng_get_byte();
|
||
}
|
||
}
|
||
|
||
function SecureRandom() {}
|
||
|
||
SecureRandom.prototype.nextBytes = rng_get_bytes;
|
||
|
||
// Depends on jsbn.js and rng.js
|
||
|
||
// Version 1.1: support utf-8 encoding in pkcs1pad2
|
||
|
||
// convert a (hex) string to a bignum object
|
||
function parseBigInt(str, r) {
|
||
return new BigInteger(str, r);
|
||
}
|
||
|
||
function byte2Hex(b) {
|
||
if (b < 0x10) return "0" + b.toString(16);else return b.toString(16);
|
||
}
|
||
|
||
// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint
|
||
function pkcs1pad2(s, n) {
|
||
if (n < s.length + 11) {
|
||
// TODO: fix for utf-8
|
||
alert("Message too long for RSA");
|
||
return null;
|
||
}
|
||
var ba = new Array();
|
||
var i = s.length - 1;
|
||
while (i >= 0 && n > 0) {
|
||
var c = s.charCodeAt(i--);
|
||
if (c < 128) {
|
||
// encode using utf-8
|
||
ba[--n] = c;
|
||
} else if (c > 127 && c < 2048) {
|
||
ba[--n] = c & 63 | 128;
|
||
ba[--n] = c >> 6 | 192;
|
||
} else {
|
||
ba[--n] = c & 63 | 128;
|
||
ba[--n] = c >> 6 & 63 | 128;
|
||
ba[--n] = c >> 12 | 224;
|
||
}
|
||
}
|
||
ba[--n] = 0;
|
||
var rng = new SecureRandom();
|
||
var x = new Array();
|
||
while (n > 2) {
|
||
// random non-zero pad
|
||
x[0] = 0;
|
||
while (x[0] == 0) {
|
||
rng.nextBytes(x);
|
||
}ba[--n] = x[0];
|
||
}
|
||
ba[--n] = 2;
|
||
ba[--n] = 0;
|
||
return new BigInteger(ba);
|
||
}
|
||
|
||
// "empty" RSA key constructor
|
||
function RSAKey() {
|
||
this.n = null;
|
||
this.e = 0;
|
||
this.d = null;
|
||
this.p = null;
|
||
this.q = null;
|
||
this.dmp1 = null;
|
||
this.dmq1 = null;
|
||
this.coeff = null;
|
||
}
|
||
|
||
// Set the public key fields N and e from hex strings
|
||
function RSASetPublic(N, E) {
|
||
if (N != null && E != null && N.length > 0 && E.length > 0) {
|
||
this.n = parseBigInt(N, 16);
|
||
this.e = parseInt(E, 16);
|
||
} else alert("Invalid RSA public key");
|
||
}
|
||
|
||
// Perform raw public operation on "x": return x^e (mod n)
|
||
function RSADoPublic(x) {
|
||
return x.modPowInt(this.e, this.n);
|
||
}
|
||
|
||
// Return the PKCS#1 RSA encryption of "text" as an even-length hex string
|
||
function RSAEncrypt(text) {
|
||
var m = pkcs1pad2(text, this.n.bitLength() + 7 >> 3);
|
||
if (m == null) return null;
|
||
var c = this.doPublic(m);
|
||
if (c == null) return null;
|
||
var h = c.toString(16);
|
||
if ((h.length & 1) == 0) return h;else return "0" + h;
|
||
}
|
||
|
||
// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string
|
||
//function RSAEncryptB64(text) {
|
||
// var h = this.encrypt(text);
|
||
// if(h) return hex2b64(h); else return null;
|
||
//}
|
||
|
||
// protected
|
||
RSAKey.prototype.doPublic = RSADoPublic;
|
||
|
||
// public
|
||
RSAKey.prototype.setPublic = RSASetPublic;
|
||
RSAKey.prototype.encrypt = RSAEncrypt;
|
||
//RSAKey.prototype.encrypt_b64 = RSAEncryptB64;
|
||
|
||
module.exports = {
|
||
RSAKey: RSAKey
|
||
};
|
||
}).call(exports, __webpack_require__, exports, module),
|
||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||
|
||
/***/ }),
|
||
|
||
/***/ "NHnr":
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||
|
||
// EXTERNAL MODULE: ./node_modules/vue/dist/vue.esm.js
|
||
var vue_esm = __webpack_require__("7+uW");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/vuex/dist/vuex.esm.js
|
||
var vuex_esm = __webpack_require__("NYxO");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/axios/index.js
|
||
var axios = __webpack_require__("mtWM");
|
||
var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/echarts/index.js
|
||
var echarts = __webpack_require__("XLwt");
|
||
var echarts_default = /*#__PURE__*/__webpack_require__.n(echarts);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/vue-router/dist/vue-router.esm.js
|
||
var vue_router_esm = __webpack_require__("/ocq");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
||
var lib = __webpack_require__("mw3O");
|
||
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/element-ui/lib/element-ui.common.js
|
||
var element_ui_common = __webpack_require__("zL8q");
|
||
var element_ui_common_default = /*#__PURE__*/__webpack_require__.n(element_ui_common);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/element-ui/lib/theme-chalk/index.css
|
||
var theme_chalk = __webpack_require__("tvR6");
|
||
var theme_chalk_default = /*#__PURE__*/__webpack_require__.n(theme_chalk);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/promise.js
|
||
var promise = __webpack_require__("//Fk");
|
||
var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
|
||
|
||
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
|
||
|
||
//
|
||
//
|
||
//
|
||
//
|
||
|
||
|
||
/* harmony default export */ var App = ({
|
||
name: 'App',
|
||
computed: Object(vuex_esm["b" /* mapState */])({
|
||
contextPath: 'urlHost',
|
||
myHeight: 'cdnindexHeight',
|
||
roleAction: 'roleAction'
|
||
}),
|
||
beforeCreate: function beforeCreate() {
|
||
//界面刷新获取默认高度
|
||
this.$store.commit('$_setHeight');
|
||
},
|
||
created: function created() {
|
||
var _self = this;
|
||
//浏览器窗口大小发生改变时重新设置依赖其数值的高度
|
||
window.addEventListener('resize', function () {
|
||
_self.$store.commit('$_setHeight');
|
||
}, false);
|
||
/* _self.$axios.defaults.baseURL='http://172.18.2.46:7777';*/
|
||
_self.$axios.defaults.headers.common['X-CSRF-TOKEN'] = localStorage.getItem('csrftoken') ? localStorage.getItem('csrftoken') : '';
|
||
var loaderInstance = null;
|
||
var unauthorizedAlert = false; //防止多次提示权限不足(某次操作调用多个接口时)
|
||
// 用于标记同时多个axios请求的个数,
|
||
// 用于解决同时多个请求的loader效果,
|
||
// 当最后一个请求返回后才取消显示loader
|
||
var simultaneousReqCount = 0;
|
||
// 添加请求拦截器
|
||
_self.$axios.interceptors.request.use(function (config) {
|
||
//发送请求之前的统一处理
|
||
//如果loader参数为true,则显示loading效果
|
||
simultaneousReqCount++;
|
||
if (config.loader) {
|
||
loaderInstance = _self.$loading({
|
||
lock: true,
|
||
spinner: '',
|
||
background: 'rgba(0, 0, 0, 0.5)'
|
||
});
|
||
}
|
||
return config;
|
||
}, function (error) {
|
||
//对请求错误进行的统一处理
|
||
simultaneousReqCount > 0 && simultaneousReqCount--;
|
||
return promise_default.a.reject(error);
|
||
});
|
||
|
||
// 添加响应拦截器
|
||
_self.$axios.interceptors.response.use(function (res) {
|
||
//关闭loader显示
|
||
simultaneousReqCount > 0 && simultaneousReqCount--;
|
||
if (!simultaneousReqCount) {
|
||
loaderInstance && loaderInstance.close();
|
||
}
|
||
|
||
//登录超时时后台返回登录页面,此时前端跳转至登录页面
|
||
var sessionInvalid = false;
|
||
var sysname = localStorage.getItem('sysName');
|
||
var rolecode = localStorage.getItem('rolecode');
|
||
|
||
if (res.request.responseURL) {
|
||
//chrome浏览器
|
||
sessionInvalid = res.request.responseURL.indexOf(_self.contextPath + '/index') >= 0;
|
||
} else {
|
||
//兼容IE,IE浏览器没有responseURL字段
|
||
sessionInvalid = res.request.responseText && res.request.responseText.trim().indexOf('<!DOCTYPE html><html>') === 0 && res.request.responseText.indexOf('</html>') >= 0;
|
||
}
|
||
if (sessionInvalid) {
|
||
if (!unauthorizedAlert) {
|
||
unauthorizedAlert = true;
|
||
_self.$alert('登录超时,请重新登录', '提示', {
|
||
customClass: 'wafConfirm',
|
||
confirmButtonText: '我知道了',
|
||
type: 'warning',
|
||
callback: function callback() {
|
||
unauthorizedAlert = false;
|
||
if (_self.roleAction.errorPage) {
|
||
_self.$router.push({ path: '/' });
|
||
} else {
|
||
//_self.$router.push({path:'/CDNerror'});
|
||
}
|
||
_self.$store.commit('$_removeStorage');
|
||
}
|
||
});
|
||
}
|
||
return promise_default.a.reject(null);
|
||
}
|
||
|
||
//接口返回resultCode为403代表当前登录用户权限不足,给出提示并跳转至登录页面
|
||
if (Number(res.data.resultCode) === 403) {
|
||
if (!unauthorizedAlert) {
|
||
unauthorizedAlert = true;
|
||
_self.$alert(res.data.message, '提示', {
|
||
customClass: 'wafConfirm',
|
||
confirmButtonText: '我知道了',
|
||
type: 'warning',
|
||
callback: function callback() {
|
||
unauthorizedAlert = false;
|
||
if (_self.roleAction.errorPage) {
|
||
_self.$router.push({ path: '/' });
|
||
} else {
|
||
//_self.$router.push({path:'/CDNerror'});
|
||
}
|
||
_self.$store.commit('$_removeStorage');
|
||
}
|
||
});
|
||
}
|
||
return promise_default.a.reject(null);
|
||
}
|
||
//如果接口返回resultCode为除0以外的值,且showError参数为true,则提示错误
|
||
if (Number(res.data.resultCode) !== 0 && Number(res.data.resultCode) !== 1001) {
|
||
if (res.config && res.config.showError) {
|
||
_self.$alert(res.data.message, '提示', {
|
||
customClass: 'wafConfirm',
|
||
confirmButtonText: '我知道了',
|
||
type: 'warning'
|
||
});
|
||
}
|
||
}
|
||
|
||
// 如果不需要拦截器则返回原始数据
|
||
if (!res.config.needInterceptors) {
|
||
return promise_default.a.resolve(res);
|
||
}
|
||
|
||
if (Number(res.data.resultCode) === 0 || Number(res.data.resultCode) === 1001) {
|
||
return res.data;
|
||
} else {
|
||
return promise_default.a.reject({
|
||
code: res.data.resultCode,
|
||
message: res.data.message || '请求出错'
|
||
});
|
||
}
|
||
}, function (error) {
|
||
simultaneousReqCount > 0 && simultaneousReqCount--;
|
||
if (!simultaneousReqCount) {
|
||
loaderInstance && loaderInstance.close();
|
||
}
|
||
//如果接口报错,且showError参数为true,则提示错误
|
||
if (error.config && error.config.showError) {
|
||
_self.$message({
|
||
message: error && error.message,
|
||
type: 'error'
|
||
});
|
||
}
|
||
|
||
// 如果不需要拦截器则返回原始数据
|
||
if (!error.config.needInterceptors) {
|
||
return promise_default.a.reject(error);
|
||
}
|
||
|
||
var result = null;
|
||
if (typeof error.code === 'undefined') {
|
||
result = error;
|
||
} else {
|
||
result = {
|
||
code: error.code,
|
||
message: error.message || '请求出错',
|
||
error: error
|
||
};
|
||
}
|
||
return promise_default.a.reject(result);
|
||
});
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-7c1542d2","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue
|
||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('router-view')}
|
||
var staticRenderFns = []
|
||
var esExports = { render: render, staticRenderFns: staticRenderFns }
|
||
/* harmony default export */ var selectortype_template_index_0_src_App = (esExports);
|
||
// CONCATENATED MODULE: ./src/App.vue
|
||
var normalizeComponent = __webpack_require__("VU/8")
|
||
/* script */
|
||
|
||
|
||
/* template */
|
||
|
||
/* template functional */
|
||
var __vue_template_functional__ = false
|
||
/* styles */
|
||
var __vue_styles__ = null
|
||
/* scopeId */
|
||
var __vue_scopeId__ = null
|
||
/* moduleIdentifier (server only) */
|
||
var __vue_module_identifier__ = null
|
||
var Component = normalizeComponent(
|
||
App,
|
||
selectortype_template_index_0_src_App,
|
||
__vue_template_functional__,
|
||
__vue_styles__,
|
||
__vue_scopeId__,
|
||
__vue_module_identifier__
|
||
)
|
||
|
||
/* harmony default export */ var src_App = (Component.exports);
|
||
|
||
// CONCATENATED MODULE: ./src/router/index.js
|
||
|
||
var Index = function Index() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(2)]).then(__webpack_require__.bind(null, "eerB"));
|
||
};
|
||
var Login = function Login() {
|
||
return __webpack_require__.e/* import() */(6).then(__webpack_require__.bind(null, "P7ryO"));
|
||
};
|
||
//监控模块
|
||
var Mindex = function Mindex() {
|
||
return __webpack_require__.e/* import() */(5).then(__webpack_require__.bind(null, "UbbN"));
|
||
};
|
||
//展示界面
|
||
var Display = function Display() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(3)]).then(__webpack_require__.bind(null, "OY+w"));
|
||
};
|
||
var Help = function Help() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(1)]).then(__webpack_require__.bind(null, "bndO"));
|
||
};
|
||
var CDNindex = function CDNindex() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(24)]).then(__webpack_require__.bind(null, "J7dD"));
|
||
};
|
||
var CDNerror = function CDNerror() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(29)]).then(__webpack_require__.bind(null, "7SWR"));
|
||
};
|
||
//统计模块
|
||
var FullLog = function FullLog() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(23)]).then(__webpack_require__.bind(null, "bxb8"));
|
||
};
|
||
var OverView = function OverView() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(28)]).then(__webpack_require__.bind(null, "7gAJ"));
|
||
};
|
||
var SecurityReport = function SecurityReport() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(25)]).then(__webpack_require__.bind(null, "6bTi"));
|
||
};
|
||
//网站管理模块
|
||
var SiteSet = function SiteSet() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, "fMc7"));
|
||
};
|
||
var SiteErrorLists = function SiteErrorLists() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(21)]).then(__webpack_require__.bind(null, "R023"));
|
||
};
|
||
var AddSite = function AddSite() {
|
||
return __webpack_require__.e/* import() */(27).then(__webpack_require__.bind(null, "g93l"));
|
||
};
|
||
var EditSite = function EditSite() {
|
||
return __webpack_require__.e/* import() */(17).then(__webpack_require__.bind(null, "7WB6"));
|
||
};
|
||
var FirstSite = function FirstSite() {
|
||
return __webpack_require__.e/* import() */(11).then(__webpack_require__.bind(null, "AdUx"));
|
||
};
|
||
var SecondSite = function SecondSite() {
|
||
return __webpack_require__.e/* import() */(18).then(__webpack_require__.bind(null, "gjl7"));
|
||
};
|
||
var ThirdSite = function ThirdSite() {
|
||
return __webpack_require__.e/* import() */(13).then(__webpack_require__.bind(null, "/tVB"));
|
||
};
|
||
var EditFirstSite = function EditFirstSite() {
|
||
return __webpack_require__.e/* import() */(9).then(__webpack_require__.bind(null, "yLQp"));
|
||
};
|
||
var EditSecondSite = function EditSecondSite() {
|
||
return __webpack_require__.e/* import() */(22).then(__webpack_require__.bind(null, "iM4y"));
|
||
};
|
||
var EditThirdSite = function EditThirdSite() {
|
||
return __webpack_require__.e/* import() */(20).then(__webpack_require__.bind(null, "3b9p"));
|
||
};
|
||
var ProtectSet = function ProtectSet() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(4)]).then(__webpack_require__.bind(null, "kbFb"));
|
||
};
|
||
var PreciseSet = function PreciseSet() {
|
||
return __webpack_require__.e/* import() */(7).then(__webpack_require__.bind(null, "Ro9c"));
|
||
};
|
||
var HelpIp = function HelpIp() {
|
||
return __webpack_require__.e/* import() */(12).then(__webpack_require__.bind(null, "Ocj2"));
|
||
};
|
||
//运维监控模块
|
||
var BusinessLoad = function BusinessLoad() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(15)]).then(__webpack_require__.bind(null, "Al6j"));
|
||
};
|
||
var SystemLoad = function SystemLoad() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, "qS7H"));
|
||
};
|
||
var Network = function Network() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(16)]).then(__webpack_require__.bind(null, "Qghe"));
|
||
};
|
||
//用户管理模块
|
||
var User = function User() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, "4MyM"));
|
||
};
|
||
//误报模块
|
||
var FalsePositive = function FalsePositive() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(19)]).then(__webpack_require__.bind(null, "enX4"));
|
||
};
|
||
var ExceptionStrategy = function ExceptionStrategy() {
|
||
return Promise.all/* import() */([__webpack_require__.e(0), __webpack_require__.e(26)]).then(__webpack_require__.bind(null, "GWgm"));
|
||
};
|
||
var routers = [
|
||
|
||
/*{
|
||
path: '/',
|
||
name: 'Display',
|
||
component: Display
|
||
},*/
|
||
/*{
|
||
path: '/helpIp',
|
||
name: 'HelpIp',
|
||
component: HelpIp
|
||
},
|
||
{
|
||
path: '/help',
|
||
name: 'Help',
|
||
component: Help
|
||
},*/
|
||
{
|
||
path: '/',
|
||
name: 'Login',
|
||
component: Login
|
||
}, {
|
||
path: '/index',
|
||
name: 'Index',
|
||
component: Index,
|
||
redirect: '/mindex',
|
||
children: [{
|
||
path: '/mindex',
|
||
name: 'Mindex',
|
||
component: Mindex
|
||
}, {
|
||
path: '/fullLog',
|
||
name: 'FullLog',
|
||
component: FullLog
|
||
}, {
|
||
path: '/overView',
|
||
name: 'OverView',
|
||
component: OverView
|
||
}, {
|
||
path: '/securityReport',
|
||
name: 'SecurityReport',
|
||
component: SecurityReport
|
||
}, {
|
||
path: '/siteSet',
|
||
name: 'SiteSet',
|
||
component: SiteSet
|
||
}, {
|
||
path: '/siteErrorLists',
|
||
name: 'SiteErrorLists',
|
||
component: SiteErrorLists
|
||
}, {
|
||
path: '/addSite',
|
||
name: 'AddSite',
|
||
redirect: '/firstSite',
|
||
component: AddSite,
|
||
children: [{
|
||
path: '/firstSite',
|
||
name: 'FirstSite',
|
||
component: FirstSite
|
||
}, {
|
||
path: '/secondSite',
|
||
name: 'SecondSite',
|
||
component: SecondSite
|
||
}, {
|
||
path: '/thirdSite',
|
||
name: 'ThirdSite',
|
||
component: ThirdSite
|
||
}]
|
||
}, {
|
||
path: '/editSite',
|
||
name: 'EditSite',
|
||
redirect: '/editFirstSite',
|
||
component: EditSite,
|
||
children: [{
|
||
path: '/editFirstSite',
|
||
name: 'EditFirstSite',
|
||
component: EditFirstSite
|
||
}, {
|
||
path: '/editSecondSite',
|
||
name: 'EditSecondSite',
|
||
component: EditSecondSite
|
||
}, {
|
||
path: '/editThirdSite',
|
||
name: 'EditThirdSite',
|
||
component: EditThirdSite
|
||
}]
|
||
}, {
|
||
path: '/protectSet',
|
||
name: 'ProtectSet',
|
||
component: ProtectSet
|
||
}, {
|
||
path: '/preciseSet',
|
||
name: 'PreciseSet',
|
||
component: PreciseSet
|
||
}, {
|
||
path: '/businessLoad',
|
||
name: 'BusinessLoad',
|
||
component: BusinessLoad
|
||
}, {
|
||
path: '/systemLoad',
|
||
name: 'SystemLoad',
|
||
component: SystemLoad
|
||
}, {
|
||
path: '/network',
|
||
name: 'Network',
|
||
component: Network
|
||
}, {
|
||
path: '/user/:type', //动态路由匹配路径/user/admin和 /user/common,分别代表管理员列表和普通用户列表
|
||
name: 'User',
|
||
component: User,
|
||
props: true
|
||
}, {
|
||
path: '/falsePositive',
|
||
name: 'FalsePositive',
|
||
component: FalsePositive
|
||
}, {
|
||
path: '/exceptionStrategy',
|
||
name: 'ExceptionStrategy',
|
||
component: ExceptionStrategy
|
||
}]
|
||
}];
|
||
|
||
/* harmony default export */ var router = (routers);
|
||
// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
|
||
var stringify = __webpack_require__("mvHQ");
|
||
var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
|
||
|
||
// EXTERNAL MODULE: ./src/common/meta.js
|
||
var meta = __webpack_require__("BoBM");
|
||
|
||
// CONCATENATED MODULE: ./src/store/addSite.js
|
||
|
||
|
||
/* harmony default export */ var addSite = ({
|
||
state: {
|
||
//siteForm用于跟后台交互
|
||
siteForm: {
|
||
id: '',
|
||
account: "",
|
||
property: "",
|
||
areaFlag: "",
|
||
check: false,
|
||
areaCode: "",
|
||
domain: "",
|
||
isHttps: "",
|
||
httpsForcedJump: "",
|
||
httpSource: "",
|
||
httpsCrt: "",
|
||
httpsKey: "",
|
||
backType: "",
|
||
backendAddr: "",
|
||
port: "",
|
||
httpsPort: "",
|
||
agentState: 1,
|
||
balancing: 0
|
||
},
|
||
checkForm: {
|
||
check: true,
|
||
account: "",
|
||
property: "",
|
||
areaFlag: "",
|
||
areaCode: "",
|
||
domain: "",
|
||
isHttps: "",
|
||
httpsForcedJump: "",
|
||
httpSource: "",
|
||
httpsCrt: "",
|
||
httpsKey: "",
|
||
backType: "",
|
||
backendAddr: "",
|
||
port: "",
|
||
httpsPort: "",
|
||
agentState: 1,
|
||
balancing: 0
|
||
},
|
||
addForm: {//新增网站第二步回到第一步时用到的添加数据
|
||
|
||
},
|
||
editSiteForm: {
|
||
id: '',
|
||
account: "",
|
||
property: "",
|
||
areaFlag: "",
|
||
areaCode: [],
|
||
domain: "",
|
||
isHttps: [],
|
||
httpsForcedJump: false,
|
||
httpSource: false,
|
||
httpsCrt: "",
|
||
httpsKey: "",
|
||
backType: "",
|
||
backendAddrIP: "",
|
||
backendAddrDomain: "",
|
||
port: "",
|
||
httpsPort: "",
|
||
agentState: 1,
|
||
balancing: 0
|
||
},
|
||
//editForm用于备份编辑未提交的数据
|
||
editForm: {
|
||
id: '',
|
||
areaCode: [],
|
||
domain: "",
|
||
isHttps: [],
|
||
httpsForcedJump: false,
|
||
httpSource: false,
|
||
httpsCrt: "",
|
||
httpsKey: "",
|
||
backType: "",
|
||
backendAddrIP: "",
|
||
backendAddrDomain: "",
|
||
port: "",
|
||
httpsPort: "",
|
||
agentState: 1,
|
||
balancing: 0
|
||
},
|
||
active: 0,
|
||
ipaddres: ''
|
||
},
|
||
getters: {
|
||
getAddForm: function getAddForm(state) {
|
||
return state.addForm;
|
||
},
|
||
getCheckForm: function getCheckForm(state) {
|
||
return state.checkForm;
|
||
},
|
||
getEditSiteForm: function getEditSiteForm(state) {
|
||
return state.editSiteForm;
|
||
},
|
||
getSiteForm: function getSiteForm(state) {
|
||
return state.siteForm;
|
||
},
|
||
getEditForm: function getEditForm(state) {
|
||
return state.editForm;
|
||
},
|
||
getActive: function getActive(state) {
|
||
return state.active;
|
||
}
|
||
},
|
||
mutations: {
|
||
$_setSiteForm: function $_setSiteForm(state, data) {
|
||
state.siteForm.account = data.account;
|
||
state.siteForm.property = data.property;
|
||
state.siteForm.areaFlag = data.areaFlag;
|
||
if (data.id != undefined && data.id != '') {
|
||
state.siteForm.id = data.id;
|
||
}
|
||
var i = data.areaCode.length - 1;
|
||
var j = data.isHttps.length;
|
||
if (i != 0) {
|
||
state.siteForm.areaCode = data.areaCode[i];
|
||
}
|
||
state.siteForm.domain = data.domain;
|
||
if (j == 2) {
|
||
state.siteForm.isHttps = 2;
|
||
state.siteForm.port = data.port;
|
||
state.siteForm.httpsPort = data.httpsPort;
|
||
state.siteForm.httpsCrt = data.httpsCrt;
|
||
state.siteForm.httpsKey = data.httpsKey;
|
||
} else if (j == 1) {
|
||
state.siteForm.isHttps = data.isHttps[0];
|
||
state.siteForm.httpsCrt = data.httpsCrt;
|
||
state.siteForm.httpsKey = data.httpsKey;
|
||
if (state.siteForm.isHttps == 0) {
|
||
state.siteForm.port = '';
|
||
state.siteForm.httpsPort = data.httpsPort;
|
||
}
|
||
if (state.siteForm.isHttps == 1) {
|
||
state.siteForm.port = data.port;
|
||
state.siteForm.httpsPort = '';
|
||
state.siteForm.httpsCrt = '';
|
||
state.siteForm.httpsKey = '';
|
||
}
|
||
}
|
||
state.siteForm.httpsForcedJump = data.httpsForcedJump == true ? 1 : 0;
|
||
state.siteForm.httpSource = data.httpSource == true ? 1 : 0;
|
||
state.siteForm.backType = data.backType;
|
||
if (data.backType == 0) {
|
||
data.backendAddrDomain = "";
|
||
}
|
||
if (data.backType == 1) {
|
||
data.backendAddrIP = "";
|
||
}
|
||
state.siteForm.backendAddr = data.backendAddrIP || data.backendAddrDomain;
|
||
state.siteForm.agentState = data.agentState;
|
||
state.siteForm.balancing = data.balancing;
|
||
},
|
||
$_setCheckForm: function $_setCheckForm(state, data) {
|
||
state.checkForm.account = data.account;
|
||
state.checkForm.property = data.property;
|
||
state.checkForm.areaFlag = data.areaFlag;
|
||
var i = data.areaCode.length - 1;
|
||
var j = data.isHttps.length;
|
||
if (i != 0) {
|
||
state.checkForm.areaCode = data.areaCode[i];
|
||
}
|
||
state.checkForm.domain = data.domain;
|
||
if (j == 2) {
|
||
state.checkForm.isHttps = 2;
|
||
} else if (j == 1) {
|
||
state.checkForm.isHttps = data.isHttps[0];
|
||
}
|
||
state.checkForm.httpsForcedJump = data.httpsForcedJump == true ? 1 : 0;
|
||
state.checkForm.httpSource = data.httpSource == true ? 1 : 0;
|
||
state.checkForm.httpsCrt = data.httpsCrt;
|
||
state.checkForm.httpsKey = data.httpsKey;
|
||
state.checkForm.backType = data.backType;
|
||
if (data.backType == 0) {
|
||
data.backendAddrDomain = "";
|
||
}
|
||
if (data.backType == 1) {
|
||
data.backendAddrIP = "";
|
||
}
|
||
state.checkForm.backendAddr = data.backendAddrIP || data.backendAddrDomain;
|
||
state.checkForm.agentState = data.agentState;
|
||
state.checkForm.balancing = data.balancing;
|
||
state.checkForm.port = data.port;
|
||
state.checkForm.httpsPort = data.httpsPort;
|
||
state.addForm = data;
|
||
},
|
||
$_setEditSiteForm: function $_setEditSiteForm(state, data) {
|
||
//state.editSiteForm = JSON.parse(JSON.stringify(state.editForm));
|
||
state.editSiteForm.id = data.id;
|
||
state.editSiteForm.account = data.account;
|
||
state.editSiteForm.property = data.property;
|
||
state.editSiteForm.areaFlag = data.areaFlag;
|
||
/*state.editSiteForm.areaCode[0] = data.areaCode.substring(0, 2);
|
||
state.editSiteForm.areaCode[1] = data.areaCode;*/
|
||
|
||
state.editSiteForm.domain = data.domain;
|
||
if (data.isHttps == 2) {
|
||
state.editSiteForm.isHttps = [0, 1];
|
||
} else {
|
||
state.editSiteForm.isHttps[0] = data.isHttps;
|
||
}
|
||
state.editSiteForm.httpsForcedJump = data.httpsForcedJump == 1 ? true : false;
|
||
state.editSiteForm.httpSource = data.httpSource == 1 ? true : false;
|
||
state.editSiteForm.httpsCrt = data.httpsCrt;
|
||
state.editSiteForm.httpsKey = data.httpsKey;
|
||
state.editSiteForm.backType = data.backType;
|
||
if (data.backType == '0') {
|
||
state.editSiteForm.backendAddrIP = data.srcIp || data.backendAddr;
|
||
state.editSiteForm.backendAddrDomain = '';
|
||
state.editSiteForm.backendAddr = '';
|
||
}
|
||
if (data.backType == '1') {
|
||
state.editSiteForm.backendAddr = '';
|
||
state.editSiteForm.backendAddrIP = '';
|
||
state.editSiteForm.backendAddrDomain = data.srcIp || data.backendAddr;
|
||
}
|
||
state.editSiteForm.agentState = data.agentState;
|
||
state.editSiteForm.balancing = data.balancing;
|
||
state.editSiteForm.port = data.port || 80;
|
||
state.editSiteForm.httpsPort = data.httpsPort || 443;
|
||
var obj = stringify_default()(state.editSiteForm);
|
||
localStorage.setItem('editFormItem', obj);
|
||
},
|
||
$_setActive: function $_setActive(state, data) {
|
||
state.active = data;
|
||
}
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/store/index.js
|
||
|
||
|
||
|
||
|
||
|
||
vue_esm["default"].use(vuex_esm["a" /* default */]);
|
||
//引入添加网站store对象
|
||
|
||
/* harmony default export */ var store = (new vuex_esm["a" /* default */].Store({
|
||
modules: {
|
||
addSite: addSite
|
||
},
|
||
state: {
|
||
homePage: true,
|
||
cdnindexHeight: window.innerHeight - 50 + 'px',
|
||
siteSetHeight: 0,
|
||
indexHeight: 0,
|
||
protectHeight: 0,
|
||
cdnConHeight: 0,
|
||
siteErrorHeight: window.innerHeight - 225,
|
||
addSiteHeight: window.innerHeight - 174 + 'px',
|
||
adminTHeight: window.innerHeight - 315,
|
||
falseTHeight: window.innerHeight - 280,
|
||
logTHeight: window.innerHeight - 685,
|
||
conHeight: window.innerHeight - 151 + 'px',
|
||
randam: 0,
|
||
IBStime: 0,
|
||
urlHost: "/",
|
||
devEnv: false ? true : false,
|
||
resultCode: 0,
|
||
roleAction: JSON.parse(localStorage.getItem('roleAction')) || {},
|
||
qgCode: "A001B001", //全国的省份code
|
||
personInfo: {
|
||
id: '',
|
||
username: '',
|
||
rolecode: '',
|
||
areaCode: ''
|
||
},
|
||
modulus: null,
|
||
publicExponent: null
|
||
},
|
||
getters: {
|
||
getRsaStorage: function getRsaStorage(state) {
|
||
if (!state.modulus) {
|
||
state.modulus = localStorage.getItem('modulus');
|
||
state.publicExponent = localStorage.getItem('publicExponent');
|
||
}
|
||
return state.rsa;
|
||
},
|
||
getPerStorage: function getPerStorage(state) {
|
||
if (state.personInfo.id == '') {
|
||
state.personInfo.id = localStorage.getItem('id');
|
||
state.personInfo.username = localStorage.getItem('username');
|
||
state.personInfo.rolecode = localStorage.getItem('rolecode');
|
||
state.personInfo.areaCode = localStorage.getItem('areaCode');
|
||
}
|
||
return state.personInfo;
|
||
},
|
||
getHeight: function getHeight(state) {
|
||
var flag = JSON.parse(localStorage.getItem('roleAction')).menu;
|
||
state.allCheight.siteSetHeight = !flag ? window.innerHeight - 265 : window.innerHeight - 325;
|
||
state.allCheight.indexHeight = !flag ? window.innerHeight : window.innerHeight - 60;
|
||
state.allCheight.protectHeight = !flag ? window.innerHeight - 255 : window.innerHeight - 315;
|
||
state.allCheight.cdnConHeight = !flag ? window.innerHeight - 100 + 'px' : window.innerHeight - 160 + 'px';
|
||
return state.allCheight;
|
||
}
|
||
},
|
||
mutations: {
|
||
$_setStorage: function $_setStorage(state, personInfo) {
|
||
var obj = '';
|
||
state.personInfo.id = personInfo.id;
|
||
state.personInfo.username = personInfo.username;
|
||
state.personInfo.rolecode = personInfo.rolecode;
|
||
state.personInfo.areaCode = personInfo.areaCode;
|
||
state.modulus = personInfo.modulus;
|
||
state.publicExponent = personInfo.publicExponent;
|
||
localStorage.setItem('id', personInfo.id);
|
||
localStorage.setItem('username', personInfo.username);
|
||
localStorage.setItem('organizationAliasName', personInfo.organizationAliasName);
|
||
localStorage.setItem('rolecode', personInfo.rolecode);
|
||
if (personInfo.rolecode == '001' && personInfo.loginType == 'FORM') {
|
||
obj = stringify_default()(meta["a" /* default */].role.superAdmin);
|
||
localStorage.setItem('sysName', 'IBSAdmin');
|
||
}
|
||
if (personInfo.rolecode == '002' && personInfo.loginType == 'FORM' && personInfo.organizationAliasName == "QG") {
|
||
localStorage.setItem('sysName', personInfo.sysName);
|
||
obj = stringify_default()(meta["a" /* default */].role.wafQgAdmin);
|
||
}
|
||
if (personInfo.rolecode == '002' && personInfo.loginType == 'IBS' && personInfo.organizationAliasName == "QG") {
|
||
localStorage.setItem('sysName', personInfo.sysName);
|
||
obj = stringify_default()(meta["a" /* default */].role.qgAdmin);
|
||
}
|
||
if (personInfo.rolecode == '002' && personInfo.loginType == 'FORM' && personInfo.organizationAliasName != "QG") {
|
||
localStorage.setItem('sysName', personInfo.sysName);
|
||
obj = stringify_default()(meta["a" /* default */].role.wafShAdmin);
|
||
}
|
||
if (personInfo.rolecode == '002' && personInfo.loginType == 'IBS' && personInfo.organizationAliasName != "QG") {
|
||
localStorage.setItem('sysName', personInfo.sysName);
|
||
obj = stringify_default()(meta["a" /* default */].role.shAdmin);
|
||
}
|
||
if (personInfo.rolecode == '003' && personInfo.loginType == 'IBS') {
|
||
localStorage.setItem('sysName', personInfo.sysName);
|
||
obj = stringify_default()(meta["a" /* default */].role.person);
|
||
}
|
||
localStorage.removeItem('roleAction');
|
||
localStorage.setItem('roleAction', obj);
|
||
state.roleAction = JSON.parse(localStorage.getItem('roleAction'));
|
||
localStorage.setItem('areaCode', personInfo.areaCode);
|
||
localStorage.setItem('activeIndex', '2-1');
|
||
localStorage.setItem('modulus', personInfo.modulus);
|
||
localStorage.setItem('publicExponent', personInfo.publicExponent);
|
||
localStorage.setItem('csrftoken', personInfo.random);
|
||
},
|
||
$_removeStorage: function $_removeStorage(state) {
|
||
state.personInfo = {
|
||
id: '',
|
||
username: '',
|
||
rolecode: '',
|
||
areaCode: ''
|
||
};
|
||
state.modulus = '';
|
||
state.publicExponent = '';
|
||
localStorage.removeItem('id');
|
||
localStorage.removeItem('username');
|
||
localStorage.removeItem('sysName');
|
||
localStorage.removeItem('organizationAliasName');
|
||
localStorage.removeItem('rolecode');
|
||
localStorage.removeItem('areaCode');
|
||
localStorage.removeItem('activeIndex');
|
||
localStorage.removeItem('csrftoken');
|
||
localStorage.removeItem('modulus');
|
||
localStorage.removeItem('publicExponent');
|
||
},
|
||
$_setRsa: function $_setRsa(state, data) {
|
||
state.modulus = data.modulus;
|
||
state.publicExponent = data.publicExponent;
|
||
localStorage.setItem('modulus', data.modulus);
|
||
localStorage.setItem('publicExponent', data.publicExponent);
|
||
},
|
||
$_removeRsa: function $_removeRsa(state) {
|
||
state.modulus = null;
|
||
state.publicExponent = null;
|
||
localStorage.removeItem('modulus');
|
||
localStorage.removeItem('publicExponent');
|
||
},
|
||
$_setHeight: function $_setHeight(state) {
|
||
if (!state.roleAction.menu) {
|
||
state.siteSetHeight = window.innerHeight - 265;
|
||
state.protectHeight = window.innerHeight - 255;
|
||
state.cdnConHeight = window.innerHeight - 100 + 'px';
|
||
state.cdnindexHeight = window.innerHeight - 50 + 'px';
|
||
} else {
|
||
state.siteSetHeight = window.innerHeight - 325;
|
||
state.protectHeight = window.innerHeight - 315;
|
||
state.cdnConHeight = window.innerHeight - 160 + 'px';
|
||
}
|
||
|
||
state.adminTHeight = window.innerHeight - 315;
|
||
state.falseTHeight = window.innerHeight - 280;
|
||
state.logTHeight = window.innerHeight - 685;
|
||
state.conHeight = window.innerHeight - 151 + 'px';
|
||
}
|
||
}
|
||
}));
|
||
// EXTERNAL MODULE: ./node_modules/vue-resource/dist/vue-resource.esm.js
|
||
var vue_resource_esm = __webpack_require__("8+8L");
|
||
|
||
// EXTERNAL MODULE: ./src/common/rsa.js
|
||
var rsa = __webpack_require__("DyA3");
|
||
var rsa_default = /*#__PURE__*/__webpack_require__.n(rsa);
|
||
|
||
// EXTERNAL MODULE: ./src/css/base.css
|
||
var base = __webpack_require__("dNEa");
|
||
var base_default = /*#__PURE__*/__webpack_require__.n(base);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/swiper/dist/css/swiper.css
|
||
var swiper = __webpack_require__("v2ns");
|
||
var swiper_default = /*#__PURE__*/__webpack_require__.n(swiper);
|
||
|
||
// EXTERNAL MODULE: ./src/common/Validate.js
|
||
var Validate = __webpack_require__("uUNx");
|
||
var Validate_default = /*#__PURE__*/__webpack_require__.n(Validate);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/html2canvas/dist/npm/index.js
|
||
var npm = __webpack_require__("2Pnh");
|
||
var npm_default = /*#__PURE__*/__webpack_require__.n(npm);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/jspdf/dist/jspdf.min.js
|
||
var jspdf_min = __webpack_require__("l9mu");
|
||
var jspdf_min_default = /*#__PURE__*/__webpack_require__.n(jspdf_min);
|
||
|
||
// EXTERNAL MODULE: ./src/common/util.js
|
||
var util = __webpack_require__("s0MJ");
|
||
|
||
// CONCATENATED MODULE: ./src/common/htmlToPdf.js
|
||
// 导出页面为PDF格式
|
||
|
||
|
||
|
||
/* harmony default export */ var htmlToPdf = ({
|
||
install: function install(Vue, options) {
|
||
Vue.prototype.getPdf = function () {
|
||
var date = new Date();
|
||
var time = util["a" /* default */].timestampToTime(date.getTime(), 'YYYYMMDDHHMMSS');
|
||
var title = '安全报表_下载' + time;
|
||
npm_default()(document.querySelector('#pdfDom'), {
|
||
allowTaint: true
|
||
}).then(function (canvas) {
|
||
var contentWidth = canvas.width;
|
||
var contentHeight = canvas.height;
|
||
var pageHeight = contentWidth / 592.28 * 841.89;
|
||
var leftHeight = contentHeight;
|
||
var position = 0;
|
||
var imgWidth = 595.28;
|
||
var imgHeight = 592.28 / contentWidth * contentHeight;
|
||
var pageData = canvas.toDataURL('image/jpeg', 1.0);
|
||
var PDF = new jspdf_min_default.a('', 'pt', 'a4');
|
||
if (leftHeight < pageHeight) {
|
||
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight);
|
||
} else {
|
||
while (leftHeight > 0) {
|
||
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight);
|
||
leftHeight -= pageHeight;
|
||
position -= 841.89;
|
||
if (leftHeight > 0) {
|
||
PDF.addPage();
|
||
}
|
||
}
|
||
}
|
||
PDF.save(title + '.pdf');
|
||
});
|
||
};
|
||
}
|
||
});
|
||
// EXTERNAL MODULE: ./node_modules/babel-polyfill/lib/index.js
|
||
var babel_polyfill_lib = __webpack_require__("j1ja");
|
||
var babel_polyfill_lib_default = /*#__PURE__*/__webpack_require__.n(babel_polyfill_lib);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/es6-promise/dist/es6-promise.js
|
||
var es6_promise = __webpack_require__("hKoQ");
|
||
var es6_promise_default = /*#__PURE__*/__webpack_require__.n(es6_promise);
|
||
|
||
// CONCATENATED MODULE: ./src/common/global.js
|
||
/*
|
||
* Date: 2019/5/21 17:16
|
||
* Author: shensijing
|
||
* Description: 该模块全局注册,用于判断系统权限 以及 角色权限
|
||
*/
|
||
/* harmony default export */ var global = ({
|
||
//通过设置dev.env.js和prod.env.js中NODE_ENV参数来判断是IBS还是Waf系统,从而显示不同的系统界面
|
||
getFunLimit: function getFunLimit() {
|
||
var systemName = localStorage.getItem('sysName');
|
||
/*let systemName = 'waf';*/
|
||
var result = {};
|
||
switch (systemName) {
|
||
case 'IBS':
|
||
result = {
|
||
sysname: 'IBS',
|
||
loginBtn: false,
|
||
menu: false,
|
||
topTitle: true
|
||
};
|
||
break;
|
||
case 'Waf':
|
||
result = {
|
||
sysname: 'Waf',
|
||
loginBtn: true,
|
||
menu: true,
|
||
topTitle: false
|
||
};
|
||
break;
|
||
case 'IBSAdmin':
|
||
result = {
|
||
sysname: 'IBSAdmin',
|
||
loginBtn: false,
|
||
menu: true,
|
||
topTitle: false
|
||
};
|
||
break;
|
||
default:
|
||
result = {};
|
||
break;
|
||
}
|
||
return result;
|
||
},
|
||
|
||
//通过读取后台返回的用户角色code,从而获取不同的功能权限集
|
||
/*
|
||
*
|
||
*
|
||
*/
|
||
getRoleLimit: function getRoleLimit() {
|
||
var rolecode = localStorage.getItem('rolecode');
|
||
var organizationAliasName = localStorage.getItem('organizationAliasName');
|
||
if (rolecode == "002" && organizationAliasName != "QG") {
|
||
rolecode = "0021";
|
||
}
|
||
var result = {};
|
||
if (rolecode) {
|
||
switch (rolecode) {
|
||
case '001':
|
||
result = {
|
||
adminName: "superAdmin",
|
||
loginBtn: false,
|
||
menu: false,
|
||
topTitle: true,
|
||
count: true,
|
||
siteManagement: true,
|
||
operationMonitor: true,
|
||
user: true,
|
||
distort: true,
|
||
province: true,
|
||
totalAlertCount: true,
|
||
top10Admin: true,
|
||
insertCount: true,
|
||
alertCount: true,
|
||
underAttackArea: true,
|
||
attackArea: true,
|
||
addSite: true,
|
||
addSiteCount: 5000,
|
||
addSites: false,
|
||
pnameSearch: true,
|
||
domainSearch: true,
|
||
protectEdit: true,
|
||
preciseBtns: true,
|
||
dataBtns: true,
|
||
selectAllDomain: true
|
||
};
|
||
break;
|
||
case '002':
|
||
result = {
|
||
adminName: "QGAdmin",
|
||
loginBtn: false,
|
||
menu: false,
|
||
topTitle: true,
|
||
count: false,
|
||
siteManagement: false,
|
||
operationMonitor: false,
|
||
user: false,
|
||
distort: false,
|
||
province: true,
|
||
totalAlertCount: false,
|
||
top10Admin: false,
|
||
insertCount: true,
|
||
alertCount: false,
|
||
underAttackArea: true,
|
||
attackArea: true,
|
||
addSite: false,
|
||
addSites: false,
|
||
pnameSearch: true,
|
||
domainSearch: true,
|
||
protectEdit: false,
|
||
preciseBtns: false,
|
||
dataBtns: false,
|
||
selectAllDomain: true
|
||
};
|
||
break;
|
||
case '0021':
|
||
result = {
|
||
adminName: "SFAdmin",
|
||
loginBtn: false,
|
||
menu: false,
|
||
topTitle: true,
|
||
count: false,
|
||
siteManagement: false,
|
||
operationMonitor: false,
|
||
user: false,
|
||
distort: false,
|
||
province: false,
|
||
totalAlertCount: false,
|
||
top10Admin: false,
|
||
insertCount: false,
|
||
alertCount: false,
|
||
underAttackArea: false,
|
||
attackArea: false,
|
||
addSite: false,
|
||
addSites: false,
|
||
pnameSearch: true,
|
||
domainSearch: true,
|
||
protectEdit: false,
|
||
preciseBtns: false,
|
||
dataBtns: false,
|
||
selectAllDomain: true
|
||
};
|
||
break;
|
||
case '003':
|
||
result = {
|
||
adminName: "person",
|
||
loginBtn: false,
|
||
menu: false,
|
||
topTitle: true,
|
||
count: false,
|
||
siteManagement: false,
|
||
operationMonitor: false,
|
||
user: false,
|
||
distort: false,
|
||
province: false,
|
||
totalAlertCount: false,
|
||
top10Admin: false,
|
||
insertCount: false,
|
||
alertCount: false,
|
||
underAttackArea: false,
|
||
attackArea: false,
|
||
addSite: false,
|
||
addSites: false,
|
||
pnameSearch: false,
|
||
domainSearch: true,
|
||
protectEdit: true,
|
||
preciseBtns: true,
|
||
dataBtns: true,
|
||
selectAllDomain: false
|
||
};
|
||
break;
|
||
default:
|
||
result = {};
|
||
break;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/common/conAxios.js
|
||
|
||
|
||
|
||
//创建axios实例
|
||
var service = axios_default.a.create({
|
||
baseURL: "/",
|
||
timeout: 5000,
|
||
headers: {
|
||
'X-CSRF-TOKEN': localStorage.getItem('csrftoken') ? localStorage.getItem('csrftoken') : '',
|
||
'content-type': 'application/json'
|
||
}
|
||
});
|
||
var conAxios_loaderInstance = null;
|
||
var conAxios_unauthorizedAlert = false; //防止多次提示权限不足(某次操作调用多个接口时)
|
||
// 用于标记同时多个axios请求的个数,
|
||
// 用于解决同时多个请求的loader效果,
|
||
// 当最后一个请求返回后才取消显示loader
|
||
var conAxios_simultaneousReqCount = 0;
|
||
/****** request拦截器==>对请求参数做处理 ******/
|
||
service.interceptors.request.use(function (config) {
|
||
//如果loader参数为true,则显示loading效果
|
||
conAxios_simultaneousReqCount++;
|
||
if (config.loader) {
|
||
conAxios_loaderInstance = element_ui_common["Loading"].service({
|
||
lock: true,
|
||
spinner: '',
|
||
background: 'rgba(0, 0, 0, 0.5)'
|
||
});
|
||
}
|
||
return config;
|
||
}, function (error) {
|
||
//对请求错误进行的统一处理
|
||
conAxios_simultaneousReqCount > 0 && conAxios_simultaneousReqCount--;
|
||
return promise_default.a.reject(error);
|
||
});
|
||
// 添加响应拦截器
|
||
service.interceptors.response.use(function (res) {
|
||
//关闭loader显示
|
||
conAxios_simultaneousReqCount > 0 && conAxios_simultaneousReqCount--;
|
||
if (!conAxios_simultaneousReqCount) {
|
||
conAxios_loaderInstance && conAxios_loaderInstance.close();
|
||
}
|
||
|
||
//登录超时时后台返回登录页面,此时前端跳转至登录页面
|
||
var sessionInvalid = false;
|
||
if (res.request.responseURL) {
|
||
//chrome浏览器
|
||
sessionInvalid = res.request.responseURL.indexOf("/" + '/index') >= 0;
|
||
} else {
|
||
//兼容IE,IE浏览器没有responseURL字段
|
||
sessionInvalid = res.request.responseText && res.request.responseText.trim().indexOf('<!DOCTYPE html><html>') === 0 && res.request.responseText.indexOf('</html>') >= 0;
|
||
}
|
||
if (sessionInvalid) {
|
||
if (!conAxios_unauthorizedAlert) {
|
||
conAxios_unauthorizedAlert = true;
|
||
$alert('登录超时,请重新登录', '提示', {
|
||
customClass: 'wafConfirm',
|
||
confirmButtonText: '我知道了',
|
||
type: 'warning',
|
||
callback: function callback() {
|
||
conAxios_unauthorizedAlert = false;
|
||
$router.push({ path: '/' });
|
||
$store.commit('$_removeStorage');
|
||
}
|
||
});
|
||
}
|
||
return promise_default.a.reject(null);
|
||
}
|
||
|
||
//接口返回resultCode为403代表当前登录用户权限不足,给出提示并跳转至登录页面
|
||
if (Number(res.data.resultCode) === 403) {
|
||
if (!conAxios_unauthorizedAlert) {
|
||
conAxios_unauthorizedAlert = true;
|
||
$alert(res.data.message, '提示', {
|
||
customClass: 'wafConfirm',
|
||
confirmButtonText: '我知道了',
|
||
type: 'warning',
|
||
callback: function callback() {
|
||
conAxios_unauthorizedAlert = false;
|
||
$router.push({ path: '/' });
|
||
$store.commit('$_removeStorage');
|
||
}
|
||
});
|
||
}
|
||
return promise_default.a.reject(null);
|
||
}
|
||
//如果接口返回resultCode为除0以外的值,且showError参数为true,则提示错误
|
||
if (Number(res.data.resultCode) !== 0) {
|
||
if (res.config && res.config.showError) {
|
||
$alert(res.data.message, '提示', {
|
||
customClass: 'wafConfirm',
|
||
confirmButtonText: '我知道了',
|
||
type: 'warning'
|
||
});
|
||
}
|
||
}
|
||
|
||
// 如果不需要拦截器则返回原始数据
|
||
if (!res.config.needInterceptors) {
|
||
return promise_default.a.resolve(res);
|
||
}
|
||
|
||
if (Number(res.data.resultCode) === 0) {
|
||
return res.data.result;
|
||
} else {
|
||
return promise_default.a.reject({
|
||
code: res.data.resultCode,
|
||
message: res.data.message || '请求出错'
|
||
});
|
||
}
|
||
}, function (error) {
|
||
conAxios_simultaneousReqCount > 0 && conAxios_simultaneousReqCount--;
|
||
if (!conAxios_simultaneousReqCount) {
|
||
conAxios_loaderInstance && conAxios_loaderInstance.close();
|
||
}
|
||
//如果接口报错,且showError参数为true,则提示错误
|
||
if (error.config && error.config.showError) {
|
||
$message({
|
||
message: error && error.message,
|
||
type: 'error'
|
||
});
|
||
}
|
||
|
||
// 如果不需要拦截器则返回原始数据
|
||
if (!error.config.needInterceptors) {
|
||
return promise_default.a.reject(error);
|
||
}
|
||
|
||
var result = null;
|
||
if (typeof error.code === 'undefined') {
|
||
result = error;
|
||
} else {
|
||
result = {
|
||
code: error.code,
|
||
message: error.message || '请求出错',
|
||
error: error
|
||
};
|
||
}
|
||
return promise_default.a.reject(result);
|
||
});
|
||
/* harmony default export */ var conAxios = ({
|
||
//get请求
|
||
get: function get(url, param) {
|
||
return new promise_default.a(function (cback, reject) {
|
||
service({
|
||
method: 'get',
|
||
url: url,
|
||
params: param.data,
|
||
needInterceptors: param.needInterceptors,
|
||
showError: param.showError,
|
||
loader: param.loader
|
||
}).then(function (res) {
|
||
//axios返回的是一个promise对象
|
||
cback(res);
|
||
}).catch(function (err) {
|
||
if (!err.response) {
|
||
console.log('请求错误');
|
||
} else {
|
||
reject(err.response);
|
||
console.log(err.response, '异常');
|
||
}
|
||
});
|
||
});
|
||
},
|
||
|
||
//post请求
|
||
post: function post(url, param) {
|
||
return new promise_default.a(function (cback, reject) {
|
||
service({
|
||
method: 'post',
|
||
url: url,
|
||
params: param
|
||
}).then(function (res) {
|
||
//axios返回的是一个promise对象
|
||
cback(res);
|
||
}).catch(function (err) {
|
||
if (!err.response) {
|
||
console.log('请求错误');
|
||
} else {
|
||
reject(err.response);
|
||
console.log(err.response, '异常');
|
||
}
|
||
});
|
||
});
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/main.js
|
||
// The Vue build version to load with the `import` command
|
||
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
__webpack_require__("hKoQ").polyfill();
|
||
es6_promise_default.a.polyfill();
|
||
|
||
vue_esm["default"].config.productionTip = false;
|
||
vue_esm["default"].config.debug = true; //开启debug模式
|
||
axios_default.a.defaults.withCredentials = true;
|
||
vue_esm["default"].prototype.$axios = axios_default.a;
|
||
vue_esm["default"].prototype.$echarts = echarts_default.a;
|
||
vue_esm["default"].prototype.$qs = lib_default.a;
|
||
vue_esm["default"].prototype.$rsa = rsa_default.a;
|
||
vue_esm["default"].prototype.Meta = meta["a" /* default */];
|
||
vue_esm["default"].prototype.global = global;
|
||
vue_esm["default"].prototype.conAxios = conAxios;
|
||
|
||
vue_esm["default"].use(element_ui_common_default.a);
|
||
vue_esm["default"].use(vue_router_esm["a" /* default */]);
|
||
vue_esm["default"].use(Validate_default.a);
|
||
vue_esm["default"].use(htmlToPdf);
|
||
|
||
var env = "production";
|
||
var main_router = new vue_router_esm["a" /* default */]({
|
||
routes: router
|
||
});
|
||
|
||
var app = new vue_esm["default"]({
|
||
el: '#app',
|
||
router: main_router,
|
||
store: store,
|
||
components: { App: src_App },
|
||
template: '<App/>'
|
||
});
|
||
|
||
/* harmony default export */ var main = __webpack_exports__["default"] = (app);
|
||
|
||
/***/ }),
|
||
|
||
/***/ "dNEa":
|
||
/***/ (function(module, exports) {
|
||
|
||
// removed by extract-text-webpack-plugin
|
||
|
||
/***/ }),
|
||
|
||
/***/ "s0MJ":
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__meta__ = __webpack_require__("BoBM");
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_axios__ = __webpack_require__("mtWM");
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_axios__);
|
||
/*系统公用js方法*/
|
||
|
||
|
||
|
||
/* harmony default export */ __webpack_exports__["a"] = ((function () {
|
||
|
||
var contextPath = "/";
|
||
|
||
//时间戳转换为年月日 时分秒的格式显示
|
||
var timestampToTime = function timestampToTime(data) {
|
||
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'YYYY-MM-DD HH:MM:SS';
|
||
|
||
var date = new Date(data); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
||
var Y = date.getFullYear();
|
||
var M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
|
||
var D = date.getDate();
|
||
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
|
||
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
|
||
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
|
||
var result = '';
|
||
switch (format) {
|
||
case 'YYYYMMDDHHMMSS':
|
||
result = '' + Y + M + D + h + m + s;
|
||
break;
|
||
case 'YYYY-MM-DD HH:MM:SS':
|
||
result = Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
|
||
break;
|
||
case 'YYYY-MM-DD HH:MM':
|
||
result = Y + '-' + M + '-' + D + ' ' + h + ':' + m;
|
||
break;
|
||
case 'YYYY-MM-DD':
|
||
result = Y + '-' + M + '-' + D;
|
||
break;
|
||
default:
|
||
result = Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
|
||
break;
|
||
}
|
||
return result;
|
||
};
|
||
|
||
/**
|
||
* 将年月日 时分秒的格式转换为时分秒的格式
|
||
* @param time 时间值,字符串类型
|
||
* @param separator 分隔符,字符串类型,默认为空格符
|
||
*/
|
||
var formatChartTime = function formatChartTime(time) {
|
||
var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
|
||
|
||
if (time && typeof time === 'string') {
|
||
return time.substring(time.indexOf(separator) + 1, time.length);
|
||
} else {
|
||
return time;
|
||
}
|
||
};
|
||
/**
|
||
*/
|
||
var arrayContainsArray = function arrayContainsArray(list, Blist) {
|
||
var newList = [];
|
||
for (var i = 0; i < Blist.length; i++) {
|
||
for (var j = 0; j < list.length; j++) {
|
||
if (Blist[i] == list[j]) {
|
||
list[j] = '';
|
||
}
|
||
}
|
||
}
|
||
for (var n = 0; n < list.length; n++) {
|
||
if (list[n] != '') {
|
||
newList.push(list[n]);
|
||
}
|
||
}
|
||
return newList;
|
||
};
|
||
var getUserInfo = function getUserInfo(obj) {
|
||
var that = obj;
|
||
that.$axios({
|
||
method: 'get',
|
||
url: contextPath + __WEBPACK_IMPORTED_MODULE_0__meta__["a" /* default */].URL.getUserInfo,
|
||
needInterceptors: true
|
||
}).then(function (res) {
|
||
if (res) {
|
||
that.$axios.defaults.headers.common['X-CSRF-TOKEN'] = res.random;
|
||
if (res.sysName == 'IBS' && res.rolecode == '001' || res.loginType == 'FORM') {
|
||
that.$router.push({ path: '/' });
|
||
} else {
|
||
that.$store.commit('$_setStorage', res);
|
||
that.$store.commit('$_setHeight');
|
||
that.$router.push({ path: '/CDNindex' });
|
||
}
|
||
}
|
||
}).catch(function (e) {});
|
||
};
|
||
//超管:15855403776 集团管理员:12345678901 省管理员:12345678902 企业用户:12345678903
|
||
var simulateLogin = function simulateLogin(obj) {
|
||
//本地联调时使用该接口模拟登录
|
||
getUserInfo(obj);
|
||
/*if(process.env.NODE_ENV == 'production'){
|
||
getUserInfo(obj);
|
||
}else{
|
||
let that = obj;
|
||
that.$axios({
|
||
method: 'get',
|
||
url: contextPath + '/frontEndLoginWaf'+'?phone='+'12345678901',
|
||
needInterceptors: true
|
||
}).then(function(res){
|
||
getUserInfo(obj);
|
||
}).catch(function(e){
|
||
//that.$router.push({path:'/CDNerror'});
|
||
});
|
||
}*/
|
||
};
|
||
return {
|
||
timestampToTime: timestampToTime,
|
||
formatChartTime: formatChartTime,
|
||
arrayContainsArray: arrayContainsArray,
|
||
getUserInfo: getUserInfo,
|
||
simulateLogin: simulateLogin
|
||
};
|
||
})());
|
||
|
||
/***/ }),
|
||
|
||
/***/ "tvR6":
|
||
/***/ (function(module, exports) {
|
||
|
||
// removed by extract-text-webpack-plugin
|
||
|
||
/***/ }),
|
||
|
||
/***/ "uUNx":
|
||
/***/ (function(module, exports) {
|
||
|
||
exports.install = function (Vue, options) {
|
||
|
||
/**
|
||
* 注意: 定义type 规则时 不用做非空验证
|
||
* 只需要传入 required:true 即可
|
||
* */
|
||
/*保留两位小数*/
|
||
|
||
var password = /^(?![A-Z]+$)(?![a-z]+$)(?!\d+$)(?![\W_]+$)\S{8,20}$/;
|
||
var enAndNumber = /^[a-zA-Z\d]*$/;
|
||
var specialCharInPwd = /^[~!@#$%^&*_]*$/;
|
||
var userName = /^[0-9a-zA-Z_]{0,32}$/;
|
||
var trueName = /^[\u4E00-\u9FA5]{0,32}$/;
|
||
var description = /^.{0,200}$/;
|
||
var cellphone = /^1\d{10}$/;
|
||
|
||
var isSupportSpecialChar = function isSupportSpecialChar(value) {
|
||
if (typeof value === 'string' && value) {
|
||
for (var index = 0; index < value.length; index++) {
|
||
if (!enAndNumber.test(value.charAt(index)) && !specialCharInPwd.test(value.charAt(index))) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
} else {
|
||
return true;
|
||
}
|
||
};
|
||
|
||
/*请输入正确格式的密码*/
|
||
var isRightPassword = function isRightPassword(rule, value, callback) {
|
||
if (value != null && value != "") {
|
||
if (!password.test(value)) {
|
||
callback(new Error('密码不规范(请输入8-20位字符,至少包含2种大写字母、小写字母、数字、特殊字符)'));
|
||
} else if (!isSupportSpecialChar(value)) {
|
||
callback(new Error('特殊字符格式不规范'));
|
||
} else {
|
||
callback();
|
||
}
|
||
} else {
|
||
callback();
|
||
}
|
||
};
|
||
|
||
/*用户名只能是不得超过32位字符,只可包含字母、数字、下划线*/
|
||
var isRightUsername = function isRightUsername(rule, value, callback) {
|
||
if (value != null && value != "") {
|
||
if (!userName.test(value)) {
|
||
callback(new Error('用户名不规范(不得超过32位字符,只可包含字母、数字、下划线)'));
|
||
} else {
|
||
callback();
|
||
}
|
||
} else {
|
||
callback();
|
||
}
|
||
};
|
||
|
||
/*真实姓名只能是不得超过32位字符的汉字*/
|
||
var isRightTruename = function isRightTruename(rule, value, callback) {
|
||
if (value != null && value != "") {
|
||
if (!trueName.test(value)) {
|
||
callback(new Error('姓名不规范(不得超过32位字符,只能输入汉字)'));
|
||
} else {
|
||
callback();
|
||
}
|
||
} else {
|
||
callback();
|
||
}
|
||
};
|
||
/*角色描述不能超过200个字符*/
|
||
var isRightDescription = function isRightDescription(rule, value, callback) {
|
||
if (value != null && value != "") {
|
||
if (!description.test(value)) {
|
||
callback(new Error('角色说明不得超过200位字符'));
|
||
} else {
|
||
callback();
|
||
}
|
||
} else {
|
||
callback();
|
||
}
|
||
};
|
||
/*手机号码为1开头的11位数字*/
|
||
var isRightCellPhone = function isRightCellPhone(rule, value, callback) {
|
||
if (value) {
|
||
if (cellphone.test(value)) {
|
||
callback();
|
||
} else {
|
||
callback(new Error('格式不正确'));
|
||
}
|
||
} else {
|
||
callback();
|
||
}
|
||
};
|
||
/**
|
||
* 参数 item
|
||
* required true 必填项
|
||
* maxLength 字符串的最大长度
|
||
* min 和 max 必须同时给 min < max type=number
|
||
* type 手机号 mobile
|
||
* 邮箱 email
|
||
* 网址 url
|
||
* 各种自定义类型 定义在 src/utils/validate 中 持续添加中.......
|
||
* */
|
||
|
||
Vue.prototype.filter_rules = function (item) {
|
||
var rules = [];
|
||
if (item.required) {
|
||
if (item.message != undefined) {
|
||
rules.push({ required: true, message: item.message, trigger: ['blur', 'change'] });
|
||
} else {
|
||
rules.push({ required: true, message: '该输入项为必填项!', trigger: ['blur', 'change'] });
|
||
}
|
||
}
|
||
if (item.maxLength) {
|
||
rules.push({ min: 1, max: item.maxLength, message: '最多输入' + item.maxLength + '个字符!', trigger: ['blur', 'change'] });
|
||
}
|
||
if (item.min && item.max) {
|
||
rules.push({ min: item.min, max: item.max, message: '字符长度在' + item.min + '至' + item.max + '之间!', trigger: ['blur', 'change'] });
|
||
}
|
||
if (item.type) {
|
||
var type = item.type;
|
||
switch (type) {
|
||
case 'email':
|
||
rules.push({ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] });
|
||
break;
|
||
case 'description':
|
||
rules.push({ validator: isRightDescription, trigger: ['blur', 'change'] });
|
||
break;
|
||
case 'truename':
|
||
rules.push({ validator: isRightTruename, trigger: ['blur', 'change'] });
|
||
break;
|
||
case 'username':
|
||
rules.push({ validator: isRightUsername, trigger: ['blur', 'change'] });
|
||
break;
|
||
case 'password':
|
||
rules.push({ validator: isRightPassword, trigger: ['blur', 'change'] });
|
||
break;
|
||
case 'cellphone':
|
||
rules.push({ validator: isRightCellPhone, trigger: ['blur', 'change'] });
|
||
break;
|
||
default:
|
||
rules.push({});
|
||
break;
|
||
}
|
||
}
|
||
|
||
return rules;
|
||
};
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "v2ns":
|
||
/***/ (function(module, exports) {
|
||
|
||
// removed by extract-text-webpack-plugin
|
||
|
||
/***/ })
|
||
|
||
},[0]); |