Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/components/charts/panel.scss
This commit is contained in:
@@ -16,7 +16,7 @@ before_script:
|
|||||||
generate_git-log:
|
generate_git-log:
|
||||||
stage: gen_git-log
|
stage: gen_git-log
|
||||||
script:
|
script:
|
||||||
- if (( `grep git-log.html ./public/index.html | wc -l` == 0 )); then sed -i '/<body>/ a <a style="position:fixed;bottom:20px;left:40px;z-index:999;color:#000;" target="_blank" href="./git-log.html">更新记录</a>' ./public/index.html; echo "添加更新记录链接"; fi;
|
- if (( `grep git-log.html ./public/index.html | wc -l` == 0 )); then sed -i '/<body>/ a <a style="position:fixed;bottom:20px;left:40px;z-index:999;color:white;" target="_blank" href="./git-log.html">更新记录</a>' ./public/index.html; echo "添加更新记录链接"; fi;
|
||||||
- echo "最近的100个提交记录"
|
- echo "最近的100个提交记录"
|
||||||
- echo "<!DOCTYPE html><html><head><meta charset='utf-8'></head><body><pre>" > ./public/git-log.html
|
- echo "<!DOCTYPE html><html><head><meta charset='utf-8'></head><body><pre>" > ./public/git-log.html
|
||||||
- "git log -100 --pretty=format:'%ad : %s' >> ./public/git-log.html"
|
- "git log -100 --pretty=format:'%ad : %s' >> ./public/git-log.html"
|
||||||
|
|||||||
@@ -1,210 +0,0 @@
|
|||||||
{
|
|
||||||
"AL": [ "albaniaLow", "albaniaHigh" ],
|
|
||||||
"DZ": [ "algeriaLow", "algeriaHigh" ],
|
|
||||||
"AS": [ "americanSamoaLow", "americanSamoaHigh" ],
|
|
||||||
"AD": [ "andorraLow", "andorraHigh" ],
|
|
||||||
"AF": [ "afghanistanLow", "afghanistanHigh" ],
|
|
||||||
"AO": [ "angolaLow", "angolaHigh" ],
|
|
||||||
"AI": [ "anguillaLow", "anguillaHigh" ],
|
|
||||||
"AG": [ "antiguaBarbudaLow", "antiguaBarbudaHigh" ],
|
|
||||||
"AR": [ "argentinaLow", "argentinaHigh" ],
|
|
||||||
"AM": [ "armeniaLow", "armeniaHigh" ],
|
|
||||||
"AW": [ "arubaLow", "arubaHigh" ],
|
|
||||||
"AU": [ "australiaLow", "australiaHigh" ],
|
|
||||||
"AT": [ "austriaLow", "austriaHigh" ],
|
|
||||||
"AZ": [ "azerbaijanLow", "azerbaijanHigh" ],
|
|
||||||
"BH": [ "bahrainLow", "bahrainHigh" ],
|
|
||||||
"BD": [ "bangladeshLow", "bangladeshHigh" ],
|
|
||||||
"BB": [ "barbadosLow", "barbadosHigh" ],
|
|
||||||
"BY": [ "belarusLow", "belarusHigh" ],
|
|
||||||
"BE": [ "belgiumLow", "belgiumHigh" ],
|
|
||||||
"BZ": [ "belizeLow", "belizeHigh" ],
|
|
||||||
"BJ": [ "beninLow", "beninHigh" ],
|
|
||||||
"BM": [ "bermudaLow", "bermudaHigh" ],
|
|
||||||
"BT": [ "bhutanLow", "bhutanHigh" ],
|
|
||||||
"BO": [ "boliviaLow", "boliviaHigh" ],
|
|
||||||
"BQ": [ "bonaireSintEustatiusSabaLow", "bonaireSintEustatiusSabaHigh" ],
|
|
||||||
"BA": [ "bosniaHerzegovinaLow", "bosniaHerzegovinaHigh", "bosniaHerzegovinaCantonsLow", "bosniaHerzegovinaCantonsHigh" ],
|
|
||||||
"BW": [ "botswanaLow", "botswanaHigh" ],
|
|
||||||
"BR": [ "brazilLow", "brazilHigh" ],
|
|
||||||
"IO": [ "britishIndianOceanTerritoryLow", "britishIndianOceanTerritoryHigh" ],
|
|
||||||
"VG": [ "britishVirginIslandsLow", "britishVirginIslandsHigh" ],
|
|
||||||
"BN": [ "bruneiDarussalamLow", "bruneiDarussalamHigh" ],
|
|
||||||
"BG": [ "bulgariaLow", "bulgariaHigh" ],
|
|
||||||
"BF": [ "burkinaFasoLow", "burkinaFasoHigh" ],
|
|
||||||
"BI": [ "burundiLow", "burundiHigh" ],
|
|
||||||
"BS": [ "bahamasLow", "bahamasHigh" ],
|
|
||||||
"KH": [ "cambodiaLow", "cambodiaHigh" ],
|
|
||||||
"CM": [ "cameroonLow", "cameroonHigh" ],
|
|
||||||
"CA": [ "canadaLow", "canadaHigh" ],
|
|
||||||
"KY": [ "caymanIslandsLow", "caymanIslandsHigh" ],
|
|
||||||
"CV": [ "capeVerdeLow", "capeVerdeHigh" ],
|
|
||||||
"CF": [ "centralAfricanRepublicLow", "centralAfricanRepublicHigh" ],
|
|
||||||
"TD": [ "chadLow", "chadHigh" ],
|
|
||||||
"GB-CHA": [ "channelIslandsLow", "channelIslandsHigh" ],
|
|
||||||
"CL": [ "chileLow", "chileHigh" ],
|
|
||||||
"CN": [ "chinaLow", "chinaHigh" ],
|
|
||||||
"CC": [ "cocosKeelingLow", "cocosKeelingHigh" ],
|
|
||||||
"CO": [ "colombiaLow", "colombiaHigh", "colombiaMuniLow", "colombiaMuniHigh" ],
|
|
||||||
"KM": [ "comorosLow", "comorosHigh" ],
|
|
||||||
"CD": [ "congoDRLow", "congoDRHigh" ],
|
|
||||||
"CG": [ "congoLow", "congoHigh" ],
|
|
||||||
"CR": [ "costaRicaLow", "costaRicaHigh" ],
|
|
||||||
"CI": [ "cotedIvoireLow", "cotedIvoireHigh" ],
|
|
||||||
"HR": [ "croatiaLow", "croatiaHigh" ],
|
|
||||||
"CW": [ "curacaoLow", "curacaoHigh" ],
|
|
||||||
"CU": [ "cubaLow", "cubaHigh" ],
|
|
||||||
"CY": [ "cyprusLow", "cyprusHigh", "cyprusNorthCyprusLow", "cyprusNorthCyprusHigh" ],
|
|
||||||
"CZ": [ "czechiaLow", "czechiaHigh" ],
|
|
||||||
"DK": [ "denmarkLow", "denmarkHigh" ],
|
|
||||||
"DJ": [ "djiboutiLow", "djiboutiHigh" ],
|
|
||||||
"DM": [ "dominicaLow", "dominicaHigh" ],
|
|
||||||
"DO": [ "dominicanRepublicLow", "dominicanRepublicHigh", "dominicanRepublicMuniLow", "dominicanRepublicMuniHigh" ],
|
|
||||||
"EC": [ "ecuadorLow", "ecuadorHigh" ],
|
|
||||||
"EG": [ "egyptLow", "egyptHigh" ],
|
|
||||||
"SV": [ "elSalvadorLow", "elSalvadorHigh" ],
|
|
||||||
"GQ": [ "equatorialGuineaLow", "equatorialGuineaHigh" ],
|
|
||||||
"ER": [ "eritreaLow", "eritreaHigh" ],
|
|
||||||
"EE": [ "estoniaLow", "estoniaHigh" ],
|
|
||||||
"SZ": [ "eswatiniLow", "eswatiniHigh" ],
|
|
||||||
"ET": [ "ethiopiaLow", "ethiopiaHigh" ],
|
|
||||||
"FK": [ "falklandIslandsLow", "falklandIslandsHigh" ],
|
|
||||||
"FO": [ "faroeIslandsLow", "faroeIslandsHigh" ],
|
|
||||||
"FJ": [ "fijiEastLow", "fijiEastHigh", "fijiWestLow", "fijiWestHigh" ],
|
|
||||||
"FI": [ "finlandLow", "finlandHigh" ],
|
|
||||||
"FR": [ "franceLow", "franceHigh", "franceDepartmentsLow", "franceDepartmentsHigh" ],
|
|
||||||
"GF": [ "frenchGuianaLow", "frenchGuianaHigh" ],
|
|
||||||
"GA": [ "gabonLow", "gabonHigh" ],
|
|
||||||
"GD": [ "grenadaLow", "grenadaHigh" ],
|
|
||||||
"GE": [ "georgiaLow", "georgiaHigh", "georgiaSouthOssetiaLow", "georgiaSouthOssetiaHigh" ],
|
|
||||||
"DE": [ "germanyLow", "germanyHigh" ],
|
|
||||||
"GR": [ "greeceLow", "greeceHigh" ],
|
|
||||||
"GL": [ "greenlandLow", "greenlandHigh" ],
|
|
||||||
"GM": [ "gambiaLow", "gambiaHigh" ],
|
|
||||||
"GH": [ "ghanaLow", "ghanaHigh" ],
|
|
||||||
"GN": [ "guineaLow", "guineaHigh" ],
|
|
||||||
"GP": [ "guadeloupeLow", "guadeloupeHigh" ],
|
|
||||||
"GU": [ "guamLow", "guamHigh" ],
|
|
||||||
"GT": [ "guatemalaLow", "guatemalaHigh" ],
|
|
||||||
"GW": [ "guineaBissauLow", "guineaBissauHigh" ],
|
|
||||||
"GY": [ "guyanaLow", "guyanaHigh" ],
|
|
||||||
"HN": [ "hondurasLow", "hondurasHigh" ],
|
|
||||||
"HK": [ "hongKongLow", "hongKongHigh" ],
|
|
||||||
"HT": [ "haitiLow", "haitiHigh" ],
|
|
||||||
"HU": [ "hungaryLow", "hungaryHigh" ],
|
|
||||||
"IS": [ "icelandLow", "icelandHigh" ],
|
|
||||||
"IN": [ "india2020Low", "india2020High", "india2019Low", "india2019High", "indiaLow", "indiaHigh" ],
|
|
||||||
"ID": [ "indonesiaLow", "indonesiaHigh" ],
|
|
||||||
"IE": [ "irelandLow", "irelandHigh" ],
|
|
||||||
"IL": [ "israelLow", "israelHigh", "israelPalestineLow", "israelPalestineHigh" ],
|
|
||||||
"IT": [ "italyLow", "italyHigh" ],
|
|
||||||
"IQ": [ "iraqLow", "iraqHigh" ],
|
|
||||||
"IR": [ "iranLow", "iranHigh" ],
|
|
||||||
"JM": [ "jamaicaLow", "jamaicaHigh" ],
|
|
||||||
"JO": [ "jordanLow", "jordanHigh" ],
|
|
||||||
"JP": [ "japanLow", "japanHigh" ],
|
|
||||||
"KZ": [ "kazakhstanLow", "kazakhstanHigh" ],
|
|
||||||
"KE": [ "kenyaLow", "kenyaHigh" ],
|
|
||||||
"XK": [ "kosovoLow", "kosovoHigh" ],
|
|
||||||
"KW": [ "kuwaitLow", "kuwaitHigh" ],
|
|
||||||
"KG": [ "kyrgyzstanLow", "kyrgyzstanHigh" ],
|
|
||||||
"LA": [ "laosLow", "laosHigh" ],
|
|
||||||
"LB": [ "lebanonLow", "lebanonHigh" ],
|
|
||||||
"LV": [ "latviaLow", "latviaHigh" ],
|
|
||||||
"LI": [ "liechtensteinLow", "liechtensteinHigh" ],
|
|
||||||
"LT": [ "lithuaniaLow", "lithuaniaHigh" ],
|
|
||||||
"LU": [ "luxembourgLow", "luxembourgHigh" ],
|
|
||||||
"LY": [ "libyaLow", "libyaHigh" ],
|
|
||||||
"MG": [ "madagascarProvinceLow", "madagascarProvinceHigh", "madagascarRegionLow", "madagascarRegionHigh" ],
|
|
||||||
"MY": [ "malaysiaLow", "malaysiaHigh" ],
|
|
||||||
"MR": [ "mauritaniaLow", "mauritaniaHigh" ],
|
|
||||||
"MV": [ "maldivesLow", "maldivesHigh", "maldivesIslandsLow", "maldivesIslandsHigh" ],
|
|
||||||
"MW": [ "malawiLow", "malawiHigh" ],
|
|
||||||
"ML": [ "maliLow", "maliHigh" ],
|
|
||||||
"MT": [ "maltaLow", "maltaHigh" ],
|
|
||||||
"MX": [ "mexicoLow", "mexicoHigh" ],
|
|
||||||
"MD": [ "moldovaLow", "moldovaHigh" ],
|
|
||||||
"MN": [ "mongoliaLow", "mongoliaHigh" ],
|
|
||||||
"MA": [ "moroccoLow", "moroccoHigh" ],
|
|
||||||
"ME": [ "montenegroLow", "montenegroHigh" ],
|
|
||||||
"MZ": [ "mozambiqueLow", "mozambiqueHigh" ],
|
|
||||||
"MK": [ "northMacedoniaLow", "northMacedoniaHigh" ],
|
|
||||||
"MM": [ "myanmarLow", "myanmarHigh" ],
|
|
||||||
"MQ": [ "martiniqueLow", "martiniqueHigh" ],
|
|
||||||
"MS": [ "montserratLow", "montserratHigh" ],
|
|
||||||
"NA": [ "namibiaLow", "namibiaHigh" ],
|
|
||||||
"NP": [ "nepalLow", "nepalHigh" ],
|
|
||||||
"NL": [ "netherlandsLow", "netherlandsHigh" ],
|
|
||||||
"NZ": [ "newZealandLow", "newZealandHigh" ],
|
|
||||||
"NI": [ "nicaraguaLow", "nicaraguaHigh" ],
|
|
||||||
"NE": [ "nigerLow", "nigerHigh" ],
|
|
||||||
"NG": [ "nigeriaLow", "nigeriaHigh" ],
|
|
||||||
"KP": [ "northKoreaLow", "northKoreaHigh" ],
|
|
||||||
"NO": [ "norwayLow", "norwayHigh" ],
|
|
||||||
"OM": [ "omanLow", "omanHigh" ],
|
|
||||||
"PK": [ "pakistanLow", "pakistanHigh" ],
|
|
||||||
"PS": [ "palestineLow", "palestineHigh" ],
|
|
||||||
"PA": [ "panamaLow", "panamaHigh" ],
|
|
||||||
"PE": [ "peruLow", "peruHigh" ],
|
|
||||||
"PH": [ "philippinesLow", "philippinesHigh" ],
|
|
||||||
"PL": [ "polandLow", "polandHigh" ],
|
|
||||||
"PT": [ "portugalLow", "portugalHigh", "portugalRegionsLow", "portugalRegionsHigh" ],
|
|
||||||
"PR": [ "puertoRicoLow", "puertoRicoHigh" ],
|
|
||||||
"PY": [ "paraguayLow", "paraguayHigh"],
|
|
||||||
"QA": [ "qatarLow", "qatarHigh" ],
|
|
||||||
"RO": [ "romaniaLow", "romaniaHigh" ],
|
|
||||||
"RU": [ "russiaLow", "russiaHigh", "russiaCrimeaLow", "russiaCrimeaHigh" ],
|
|
||||||
"RW": [ "rwandaLow", "rwandaHigh" ],
|
|
||||||
"SH": [ "saintHelenaLow", "saintHelenaHigh" ],
|
|
||||||
"LC": [ "saintLuciaLow", "saintLuciaHigh" ],
|
|
||||||
"VC": [ "saintVincentLow", "saintVincentHigh" ],
|
|
||||||
"WS": [ "samoaLow", "samoaHigh" ],
|
|
||||||
"SM": [ "sanMarinoLow", "sanMarinoHigh" ],
|
|
||||||
"SS": [ "southSudanLow", "southSudanHigh", "southSudan2015Low", "southSudan2015High" ],
|
|
||||||
"ST": [ "saoTomePrincipeLow", "saoTomePrincipeHigh" ],
|
|
||||||
"SA": [ "saudiArabiaLow", "saudiArabiaHigh" ],
|
|
||||||
"SN": [ "senegalLow", "senegalHigh" ],
|
|
||||||
"RS": [ "serbiaLow", "serbiaHigh", "serbiaNoKosovoLow", "serbiaNoKosovoHigh" ],
|
|
||||||
"SC": [ "seychellesLow", "seychellesHigh" ],
|
|
||||||
"SL": [ "sierraLeoneLow", "sierraLeoneHigh" ],
|
|
||||||
"SG": [ "singaporeLow", "singaporeHigh" ],
|
|
||||||
"SK": [ "slovakiaLow", "slovakiaHigh" ],
|
|
||||||
"SI": [ "sloveniaLow", "sloveniaHigh", "sloveniaRegionsLow", "sloveniaRegionsHigh" ],
|
|
||||||
"SB": [ "solomonIslandsLow", "solomonIslandsHigh" ],
|
|
||||||
"SO": [ "somaliaLow", "somaliaHigh" ],
|
|
||||||
"ZA": [ "southAfricaLow", "southAfricaHigh" ],
|
|
||||||
"KR": [ "southKoreaLow", "southKoreaHigh" ],
|
|
||||||
"ES": [ "spainLow", "spainHigh", "spainProvincesLow", "spainProvincesHigh" ],
|
|
||||||
"LK": [ "sriLankaLow", "sriLankaHigh" ],
|
|
||||||
"KT": [ "stKittsNevisLow", "stKittsNevisHigh" ],
|
|
||||||
"PM": [ "stPierreMiquelonLow", "stPierreMiquelonHigh" ],
|
|
||||||
"SD": [ "sudanLow", "sudanHigh" ],
|
|
||||||
"SR": [ "surinameLow", "surinameHigh" ],
|
|
||||||
"SJ": [ "svalbardLow", "svalbardHigh" ],
|
|
||||||
"SE": [ "swedenLow", "swedenHigh" ],
|
|
||||||
"CH": [ "switzerlandLow", "switzerlandHigh" ],
|
|
||||||
"SY": [ "syriaLow", "syriaHigh" ],
|
|
||||||
"TJ": [ "tajikistanLow", "tajikistanHigh" ],
|
|
||||||
"TL": [ "timorLesteLow", "timorLesteHigh" ],
|
|
||||||
"TZ": [ "tanzaniaLow", "tanzaniaHigh" ],
|
|
||||||
"TH": [ "thailandLow", "thailandHigh" ],
|
|
||||||
"TG": [ "togoLow", "togoHigh" ],
|
|
||||||
"TN": [ "tunisiaLow", "tunisiaHigh" ],
|
|
||||||
"TR": [ "turkeyLow", "turkeyHigh" ],
|
|
||||||
"TM": [ "turkmenistanLow", "turkmenistanHigh" ],
|
|
||||||
"TT": [ "trinidadTobagoLow", "trinidadTobagoHigh" ],
|
|
||||||
"AE": [ "uaeLow", "uaeHigh" ],
|
|
||||||
"GB": [ "ukLow", "ukHigh", "ukCountiesLow", "ukCountiesHigh", "ukCountriesLow", "ukCountriesHigh" ],
|
|
||||||
"UA": [ "ukraineLow", "ukraineHigh" ],
|
|
||||||
"UG": [ "ugandaLow", "ugandaHigh" ],
|
|
||||||
"US": [ "usaLow", "usaHigh", "usaTerritoriesLow", "usaTerritoriesHigh", "usaTerritories2Low", "usaTerritories2High" ],
|
|
||||||
"UY": [ "uruguayLow", "uruguayHigh" ],
|
|
||||||
"UZ": [ "uzbekistanLow", "uzbekistanHigh" ],
|
|
||||||
"VA": [ "vaticanLow", "vaticanHigh" ],
|
|
||||||
"VE": [ "venezuelaLow", "venezuelaHigh" ],
|
|
||||||
"VI": [ "usVirginIslandsLow", "usVirginIslandsHigh" ],
|
|
||||||
"VN": [ "vietnamLow", "vietnamHigh" ],
|
|
||||||
"YE": [ "yemenLow", "yemenHigh" ],
|
|
||||||
"ZM": [ "zambiaLow", "zambiaHigh" ],
|
|
||||||
"ZW": [ "zimbabweLow", "zimbabweHigh" ]
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
1
public/geojson/data/countriesWithCapital.json
Normal file
1
public/geojson/data/countriesWithCapital.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
31
public/images/cn-logo-medium.svg
Normal file
31
public/images/cn-logo-medium.svg
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="46px" height="46px" viewBox="0 0 46 46" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>CN logo</title>
|
||||||
|
<defs>
|
||||||
|
<linearGradient x1="102.04782%" y1="56.9424939%" x2="19.4834391%" y2="48.0080387%" id="linearGradient-1">
|
||||||
|
<stop stop-color="#00C4FF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#0091FF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient x1="161.459445%" y1="70.748361%" x2="8.14034479%" y2="55.8960313%" id="linearGradient-2">
|
||||||
|
<stop stop-color="#00C4FF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#0091FF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient x1="0%" y1="53.0199687%" x2="97.1198342%" y2="56.1376398%" id="linearGradient-3">
|
||||||
|
<stop stop-color="#0091FF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#4C8CCF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g id="Cyber-Narrator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="编组-5" transform="translate(2.000000, 10.000000)">
|
||||||
|
<g id="眼睛(1)" fill="url(#linearGradient-1)" fill-rule="nonzero">
|
||||||
|
<path d="M21.0230998,3.83625773e-07 C22.9018946,-0.000358154962 24.7692368,0.250604364 26.5576703,0.743822531 C28.3474071,1.23616739 29.9418273,1.88710409 31.296695,2.67855189 C32.6526943,3.47034188 33.942989,4.35521655 35.1318642,5.30856435 C36.3322894,6.27118069 37.3471836,7.23989998 38.1483213,8.18782925 C39.0264141,9.22550649 39.7188428,10.0855985 40.265117,10.8173284 C40.8995965,11.6664978 41.3186552,12.2793336 41.583937,12.7458692 L41.583937,12.7458692 L42,13.5002428 L41.9975369,13.5048058 L41.7387124,13.9783284 C41.4937052,14.3901766 41.2357743,14.7962864 40.9652013,15.1962146 C40.5970021,15.7590288 40.1723848,16.3524721 39.667251,17.0102818 C39.2119782,17.6027554 38.5997996,18.3119556 37.8475909,19.1181475 C37.1152363,19.9045676 36.3376104,20.6592396 35.5176046,21.3793576 C34.7149025,22.0819985 33.7565262,22.7932805 32.6691039,23.4934403 C31.5527235,24.2128787 30.4163388,24.823376 29.2915373,25.3080209 C28.1406071,25.8042728 26.8687191,26.2025918 25.4031786,26.5256504 C23.9758493,26.8403815 22.5048501,27.0000004 21.0310882,27.0000004 L21.0310882,27.0000004 L21,27.0000004 C19.0947974,27.0000004 17.2246772,26.7497494 15.4415309,26.2561783 C13.6367492,25.7560479 12.043494,25.1070789 10.7059678,24.3273523 C9.29125365,23.502167 8.03684022,22.6477217 6.87109813,21.7151639 C5.66634596,20.7522624 4.65022017,19.7886194 3.85097969,18.8509854 C3.00650485,17.8603067 2.31304425,17.0040647 1.73095541,16.2333785 C1.13938033,15.4507429 0.69549099,14.800947 0.411602857,14.3020143 L0.411602857,14.3020143 L0,13.5602744 L0.261320879,13.0789663 C0.366135462,12.8847547 0.619135094,12.4844678 1.03479871,11.8552338 C1.44378161,11.236227 1.87678411,10.6290985 2.33308186,10.0348639 C2.78535904,9.44641144 3.39763741,8.73316163 4.1529749,7.91496342 C4.88162262,7.122087 5.65950775,6.36335724 6.48326079,5.64206068 C7.28889198,4.93967642 8.24726826,4.22619845 9.33172826,3.52141866 C10.4405529,2.8014955 11.5768377,2.18905887 12.7090618,1.70107736 C13.8730397,1.19917878 15.1813417,0.787370398 16.5976869,0.477059667 C18.0359369,0.16070529 19.5148789,0.000430503856 20.999767,3.83625773e-07 L20.999767,3.83625773e-07 Z M21,2 C14.372583,2 9,7.372583 9,14 C9,20.627417 14.372583,26 21,26 C27.627417,26 33,20.627417 33,14 C33,7.372583 27.627417,2 21,2 Z" id="形状结合"></path>
|
||||||
|
</g>
|
||||||
|
<g id="编组-4" transform="translate(13.000000, 7.000000)" fill="url(#linearGradient-2)">
|
||||||
|
<path d="M1.69573643,8.04225352 L1.69573643,10.915493 L0.474806202,10.915493 L0.474806202,8.04225352 L1.69573643,8.04225352 Z M3.61434109,9.22535211 L3.61434109,10.915493 L2.39341085,10.915493 L2.39341085,9.22535211 L3.61434109,9.22535211 Z M5.53294574,6.35211268 L5.53294574,10.915493 L4.3120155,10.915493 L4.3120155,6.35211268 L5.53294574,6.35211268 Z M7.8003876,8.38028169 L7.8003876,10.915493 L6.57945736,10.915493 L6.57945736,8.38028169 L7.8003876,8.38028169 Z M10.0678295,5.33802817 L10.0678295,10.915493 L8.84689922,10.915493 L8.84689922,5.33802817 L10.0678295,5.33802817 Z M12.3352713,2.12676056 L12.3352713,10.915493 L11.1143411,10.915493 L11.1143411,2.12676056 L12.3352713,2.12676056 Z M14.9515504,0.774647887 L14.9515504,10.915493 L13.7306202,10.915493 L13.7306202,0.774647887 L14.9515504,0.774647887 Z" id="形状结合"></path>
|
||||||
|
</g>
|
||||||
|
<path d="M13,15.2685812 C13.3935884,14.3665795 13.7710632,13.9155786 14.1324244,13.9155786 C14.6744661,13.9155786 15.3553514,15.5388801 16.026866,15.2685812 C16.6983805,14.9982822 16.5324475,12.492122 17.5396648,12.2858641 C18.5468821,12.0796062 19.2461805,14.5177152 20.4467516,13.9155786 C20.9219825,13.6772304 21.3038921,11.9603124 22.5685587,10.3456709 C23.3015095,9.40988851 24.6327728,8.26734662 26.5623484,6.91804528" id="直线-2" stroke="#0E97FF" stroke-width="0.2" stroke-linecap="square"></path>
|
||||||
|
<path d="" id="三角形" stroke="#0091FF" fill="#0091FF" transform="translate(26.924045, 6.688984) rotate(58.000000) translate(-26.924045, -6.688984) "></path>
|
||||||
|
<circle id="椭圆形" stroke="url(#linearGradient-3)" stroke-width="0.4" cx="21" cy="14" r="10.8"></circle>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.3 KiB |
@@ -4,8 +4,8 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>images/cn-logo-medium.svg">
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title>Cyber Narrator</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|||||||
@@ -62,12 +62,10 @@ export default {
|
|||||||
res => {
|
res => {
|
||||||
this.blockOperation.query = false
|
this.blockOperation.query = false
|
||||||
this.loading = true
|
this.loading = true
|
||||||
setTimeout(() => {
|
if (res.code === 200) {
|
||||||
if (res.code === 200) {
|
localStorage.setItem('cn-username', this.username)
|
||||||
localStorage.setItem('cn-username', this.username)
|
this.loginSuccess(res)
|
||||||
this.loginSuccess(res)
|
}
|
||||||
}
|
|
||||||
}, 2000)
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
@import './font/iconfont';
|
@import './font/iconfont';
|
||||||
@import './theme';
|
|
||||||
@import './common';
|
@import './common';
|
||||||
@import './rightBoxCommon';
|
@import './rightBoxCommon';
|
||||||
@import './tableCommon';
|
@import './tableCommon';
|
||||||
|
|||||||
@@ -25,6 +25,15 @@ $--menu-item-hover-fill: $--color-primary; // menu鼠标悬浮、激活时背景
|
|||||||
--theme-color-light-90: #FFF5E8; // 默认主题色 浅90%
|
--theme-color-light-90: #FFF5E8; // 默认主题色 浅90%
|
||||||
--theme-color-light-96: #FFFBF6; // 默认主题色 浅90%
|
--theme-color-light-96: #FFFBF6; // 默认主题色 浅90%
|
||||||
--theme-color-light-98: #FFFCF8; // 默认主题色 浅98%
|
--theme-color-light-98: #FFFCF8; // 默认主题色 浅98%
|
||||||
|
@media only screen and (min-width : 1224px) {
|
||||||
|
--chart-height-unit: 30px;
|
||||||
|
}
|
||||||
|
@media only screen and (min-width : 1824px) {
|
||||||
|
--chart-height-unit: 40px;
|
||||||
|
}
|
||||||
|
@media only screen and (min-width : 2424px) {
|
||||||
|
--chart-height-unit: 55px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$--border-color-primary: #DEDEDE;
|
$--border-color-primary: #DEDEDE;
|
||||||
@@ -60,11 +69,9 @@ $--chart-single-value-icon-background-color: #E8F6FF;
|
|||||||
|
|
||||||
$--content-right-background-color: #EFF2F5; //右侧背景色
|
$--content-right-background-color: #EFF2F5; //右侧背景色
|
||||||
|
|
||||||
$--chart-height-unit: 40;
|
|
||||||
/** 改变 icon 字体路径变量,并引入element-ui变量文件 **/
|
/** 改变 icon 字体路径变量,并引入element-ui变量文件 **/
|
||||||
$--font-path: '~element-plus/lib/theme-chalk/fonts';
|
$--font-path: '~element-plus/lib/theme-chalk/fonts';
|
||||||
@import "~element-plus/packages/theme-chalk/src/index";
|
@import "~element-plus/packages/theme-chalk/src/index";
|
||||||
:export {
|
:export {
|
||||||
themeColor: $--color-primary;
|
themeColor: $--color-primary;
|
||||||
chartHeightUnit: $--chart-height-unit;
|
|
||||||
}
|
}
|
||||||
31
src/assets/img/cn-logo-medium.svg
Normal file
31
src/assets/img/cn-logo-medium.svg
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="46px" height="46px" viewBox="0 0 46 46" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>CN logo</title>
|
||||||
|
<defs>
|
||||||
|
<linearGradient x1="102.04782%" y1="56.9424939%" x2="19.4834391%" y2="48.0080387%" id="linearGradient-1">
|
||||||
|
<stop stop-color="#00C4FF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#0091FF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient x1="161.459445%" y1="70.748361%" x2="8.14034479%" y2="55.8960313%" id="linearGradient-2">
|
||||||
|
<stop stop-color="#00C4FF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#0091FF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient x1="0%" y1="53.0199687%" x2="97.1198342%" y2="56.1376398%" id="linearGradient-3">
|
||||||
|
<stop stop-color="#0091FF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#4C8CCF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g id="Cyber-Narrator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="编组-5" transform="translate(2.000000, 10.000000)">
|
||||||
|
<g id="眼睛(1)" fill="url(#linearGradient-1)" fill-rule="nonzero">
|
||||||
|
<path d="M21.0230998,3.83625773e-07 C22.9018946,-0.000358154962 24.7692368,0.250604364 26.5576703,0.743822531 C28.3474071,1.23616739 29.9418273,1.88710409 31.296695,2.67855189 C32.6526943,3.47034188 33.942989,4.35521655 35.1318642,5.30856435 C36.3322894,6.27118069 37.3471836,7.23989998 38.1483213,8.18782925 C39.0264141,9.22550649 39.7188428,10.0855985 40.265117,10.8173284 C40.8995965,11.6664978 41.3186552,12.2793336 41.583937,12.7458692 L41.583937,12.7458692 L42,13.5002428 L41.9975369,13.5048058 L41.7387124,13.9783284 C41.4937052,14.3901766 41.2357743,14.7962864 40.9652013,15.1962146 C40.5970021,15.7590288 40.1723848,16.3524721 39.667251,17.0102818 C39.2119782,17.6027554 38.5997996,18.3119556 37.8475909,19.1181475 C37.1152363,19.9045676 36.3376104,20.6592396 35.5176046,21.3793576 C34.7149025,22.0819985 33.7565262,22.7932805 32.6691039,23.4934403 C31.5527235,24.2128787 30.4163388,24.823376 29.2915373,25.3080209 C28.1406071,25.8042728 26.8687191,26.2025918 25.4031786,26.5256504 C23.9758493,26.8403815 22.5048501,27.0000004 21.0310882,27.0000004 L21.0310882,27.0000004 L21,27.0000004 C19.0947974,27.0000004 17.2246772,26.7497494 15.4415309,26.2561783 C13.6367492,25.7560479 12.043494,25.1070789 10.7059678,24.3273523 C9.29125365,23.502167 8.03684022,22.6477217 6.87109813,21.7151639 C5.66634596,20.7522624 4.65022017,19.7886194 3.85097969,18.8509854 C3.00650485,17.8603067 2.31304425,17.0040647 1.73095541,16.2333785 C1.13938033,15.4507429 0.69549099,14.800947 0.411602857,14.3020143 L0.411602857,14.3020143 L0,13.5602744 L0.261320879,13.0789663 C0.366135462,12.8847547 0.619135094,12.4844678 1.03479871,11.8552338 C1.44378161,11.236227 1.87678411,10.6290985 2.33308186,10.0348639 C2.78535904,9.44641144 3.39763741,8.73316163 4.1529749,7.91496342 C4.88162262,7.122087 5.65950775,6.36335724 6.48326079,5.64206068 C7.28889198,4.93967642 8.24726826,4.22619845 9.33172826,3.52141866 C10.4405529,2.8014955 11.5768377,2.18905887 12.7090618,1.70107736 C13.8730397,1.19917878 15.1813417,0.787370398 16.5976869,0.477059667 C18.0359369,0.16070529 19.5148789,0.000430503856 20.999767,3.83625773e-07 L20.999767,3.83625773e-07 Z M21,2 C14.372583,2 9,7.372583 9,14 C9,20.627417 14.372583,26 21,26 C27.627417,26 33,20.627417 33,14 C33,7.372583 27.627417,2 21,2 Z" id="形状结合"></path>
|
||||||
|
</g>
|
||||||
|
<g id="编组-4" transform="translate(13.000000, 7.000000)" fill="url(#linearGradient-2)">
|
||||||
|
<path d="M1.69573643,8.04225352 L1.69573643,10.915493 L0.474806202,10.915493 L0.474806202,8.04225352 L1.69573643,8.04225352 Z M3.61434109,9.22535211 L3.61434109,10.915493 L2.39341085,10.915493 L2.39341085,9.22535211 L3.61434109,9.22535211 Z M5.53294574,6.35211268 L5.53294574,10.915493 L4.3120155,10.915493 L4.3120155,6.35211268 L5.53294574,6.35211268 Z M7.8003876,8.38028169 L7.8003876,10.915493 L6.57945736,10.915493 L6.57945736,8.38028169 L7.8003876,8.38028169 Z M10.0678295,5.33802817 L10.0678295,10.915493 L8.84689922,10.915493 L8.84689922,5.33802817 L10.0678295,5.33802817 Z M12.3352713,2.12676056 L12.3352713,10.915493 L11.1143411,10.915493 L11.1143411,2.12676056 L12.3352713,2.12676056 Z M14.9515504,0.774647887 L14.9515504,10.915493 L13.7306202,10.915493 L13.7306202,0.774647887 L14.9515504,0.774647887 Z" id="形状结合"></path>
|
||||||
|
</g>
|
||||||
|
<path d="M13,15.2685812 C13.3935884,14.3665795 13.7710632,13.9155786 14.1324244,13.9155786 C14.6744661,13.9155786 15.3553514,15.5388801 16.026866,15.2685812 C16.6983805,14.9982822 16.5324475,12.492122 17.5396648,12.2858641 C18.5468821,12.0796062 19.2461805,14.5177152 20.4467516,13.9155786 C20.9219825,13.6772304 21.3038921,11.9603124 22.5685587,10.3456709 C23.3015095,9.40988851 24.6327728,8.26734662 26.5623484,6.91804528" id="直线-2" stroke="#0E97FF" stroke-width="0.2" stroke-linecap="square"></path>
|
||||||
|
<path d="" id="三角形" stroke="#0091FF" fill="#0091FF" transform="translate(26.924045, 6.688984) rotate(58.000000) translate(-26.924045, -6.688984) "></path>
|
||||||
|
<circle id="椭圆形" stroke="url(#linearGradient-3)" stroke-width="0.4" cx="21" cy="14" r="10.8"></circle>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
@@ -4,8 +4,12 @@
|
|||||||
<div class="single-value__icon"><i class="el-icon-apple"></i></div>
|
<div class="single-value__icon"><i class="el-icon-apple"></i></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="single-value__content" v-if="type === 51">
|
<div class="single-value__content" v-if="type === 51">
|
||||||
<div class="content__data">11112</div>
|
<div class="content__data">
|
||||||
<div class="content__title">{{$t('common.save')}}</div>
|
<slot name="data"></slot>
|
||||||
|
</div>
|
||||||
|
<div class="content__title">
|
||||||
|
<slot name="title"></slot>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="single-value__content" v-if="type === 53">
|
<div class="single-value__content" v-if="type === 53">
|
||||||
<div class="content__title">嘻嘻</div>
|
<div class="content__title">嘻嘻</div>
|
||||||
|
|||||||
18
src/components/charts/ChartTabs.vue
Normal file
18
src/components/charts/ChartTabs.vue
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<template>
|
||||||
|
<el-tabs class="cn-chart cn-chart__tabs" v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="用户管理" name="first">用户管理</el-tab-pane>
|
||||||
|
<el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
|
||||||
|
<el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
|
||||||
|
<el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'ChartTabs'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -145,17 +145,15 @@ const pieWithTable = {
|
|||||||
const typeOptionMappings = [
|
const typeOptionMappings = [
|
||||||
{ value: 11, option: line }, // 常规折线图
|
{ value: 11, option: line }, // 常规折线图
|
||||||
{ value: 13, option: lineStack }, // 常规折线图
|
{ value: 13, option: lineStack }, // 常规折线图
|
||||||
{ value: 31, option: pieWithTable }, // 常规折线图
|
{ value: 31, option: pieWithTable } // 常规折线图
|
||||||
{ value: 91, option: line }, // tab容器
|
|
||||||
{ value: 92, option: line }, // tab页
|
|
||||||
{ value: 93, option: line } // 大标题
|
|
||||||
]
|
]
|
||||||
const typeCategory = {
|
const typeCategory = {
|
||||||
MAP: 'map',
|
MAP: 'map',
|
||||||
TABLE: 'table',
|
TABLE: 'table',
|
||||||
ECHARTS: 'echarts',
|
ECHARTS: 'echarts',
|
||||||
TITLE: 'title',
|
TITLE: 'title',
|
||||||
SINGLE: 'singleValue'
|
SINGLE: 'singleValue',
|
||||||
|
TABS: 'tabs'
|
||||||
}
|
}
|
||||||
export function getTypeCategory (type) {
|
export function getTypeCategory (type) {
|
||||||
if (isMap(type)) {
|
if (isMap(type)) {
|
||||||
@@ -168,6 +166,8 @@ export function getTypeCategory (type) {
|
|||||||
return typeCategory.SINGLE
|
return typeCategory.SINGLE
|
||||||
} else if (isTitle(type)) {
|
} else if (isTitle(type)) {
|
||||||
return typeCategory.TITLE
|
return typeCategory.TITLE
|
||||||
|
} else if (isTabs(type)) {
|
||||||
|
return typeCategory.TABS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* 饼图柱状图等 */
|
/* 饼图柱状图等 */
|
||||||
@@ -202,13 +202,17 @@ export function isEchartsWithTable (type) {
|
|||||||
export function isTable (type) {
|
export function isTable (type) {
|
||||||
return type >= 61 && type <= 70
|
return type >= 61 && type <= 70
|
||||||
}
|
}
|
||||||
/* title、tab等 */
|
/* title */
|
||||||
export function isTitle (type) {
|
export function isTitle (type) {
|
||||||
return type >= 91
|
return type === 93
|
||||||
|
}
|
||||||
|
/* tabs */
|
||||||
|
export function isTabs (type) {
|
||||||
|
return type === 91
|
||||||
}
|
}
|
||||||
export function getOption (type) {
|
export function getOption (type) {
|
||||||
const mapping = typeOptionMappings.find(m => m.value === type)
|
const mapping = typeOptionMappings.find(m => m.value === type)
|
||||||
return mapping && mapping.option ? mapping.option : null
|
return mapping && mapping.option ? JSON.parse(JSON.stringify(mapping.option)) : null
|
||||||
}
|
}
|
||||||
export const layoutConstant = {
|
export const layoutConstant = {
|
||||||
HEADER: 'header',
|
HEADER: 'header',
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
.cn-panel {
|
.cn-panel {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(12, 1fr);
|
grid-template-columns: repeat(30, 1fr);
|
||||||
grid-auto-flow: row;
|
grid-auto-flow: row;
|
||||||
grid-auto-rows: #{$--chart-height-unit}px;
|
grid-auto-rows: var(--chart-height-unit);
|
||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cn-chart {
|
&>.cn-chart {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
border: 1px solid #E7EAED;
|
border: 1px solid #E7EAED;
|
||||||
box-shadow: 0 2px 4px 0 rgba(51,51,51,0.02);
|
box-shadow: 0 2px 4px 0 rgba(51,51,51,0.02);
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.cn-chart__echarts, .cn-chart__table, .cn-chart__map {
|
&>.cn-chart__echarts, &>.cn-chart__table, &>.cn-chart__map {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.cn-chart__header {
|
.cn-chart__header {
|
||||||
@@ -53,38 +53,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.cn-chart__single-value.cn-chart__single-value--icon-left {
|
&>.cn-chart__single-value.cn-chart__single-value--icon-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: space-evenly;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.single-value-icon__box{
|
|
||||||
height: 70px;
|
|
||||||
flex: 4;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
}
|
|
||||||
.single-value__icon {
|
.single-value__icon {
|
||||||
margin-right: 7.5%;
|
position: relative;
|
||||||
width: 72px;
|
width: 72px;
|
||||||
height: 72px;
|
height: 72px;
|
||||||
background-color: $--chart-single-value-icon-background-color;
|
background-color: $--chart-single-value-icon-background-color;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
display: flex;
|
position: absolute;
|
||||||
justify-content: space-around;
|
top: 50%;
|
||||||
align-items: center;
|
left: 50%;
|
||||||
margin-top: 25px;
|
transform: translate(-50%,-50%);
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color: $--color-primary;
|
color: $--color-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-value__content {
|
.single-value__content {
|
||||||
flex: 6;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
@@ -95,22 +86,12 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.content__title {
|
.content__title {
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
word-break: break-all;
|
|
||||||
width: 40px;
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
.content__title:hover{
|
|
||||||
overflow: visible;
|
|
||||||
white-space: inherit;
|
|
||||||
min-width:100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.cn-chart__single-value.cn-chart__single-value--icon-right {
|
&>.cn-chart__single-value.cn-chart__single-value--icon-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row-reverse;
|
flex-direction: row-reverse;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
@@ -158,7 +139,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.cn-chart__title {
|
&>.cn-chart__title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
@@ -168,7 +149,10 @@
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.cn-chart__table {
|
&>.cn-chart__tabs {
|
||||||
|
|
||||||
|
}
|
||||||
|
&>.cn-chart__table {
|
||||||
.cn-chart__header {
|
.cn-chart__header {
|
||||||
border-bottom: 1px solid $--content-right-background-color;
|
border-bottom: 1px solid $--content-right-background-color;
|
||||||
.header__operations {
|
.header__operations {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
text-color="#ffffff">
|
text-color="#ffffff">
|
||||||
<el-menu-item index="logo">
|
<el-menu-item index="logo">
|
||||||
<div id="home-to-overview" class="logo link">
|
<div id="home-to-overview" class="logo link">
|
||||||
<img alt="loading..." height="26" :src="logo?logo:require('../../assets/img/logo1-2.png')"/>
|
<img alt="loading..." height="32" :src="logo?logo:require('../../assets/img/cn-logo-medium.svg')"/>
|
||||||
<span class="system-name">{{systemName && systemName !== 'undefined' ? systemName : 'dashboard.overview.contentTitle'}}</span>
|
<span class="system-name">{{systemName && systemName !== 'undefined' ? systemName : 'dashboard.overview.contentTitle'}}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
:index="`${index}`">
|
:index="`${index}`">
|
||||||
<template #title>
|
<template #title>
|
||||||
<i :class="menu.icon"></i>
|
<i :class="menu.icon"></i>
|
||||||
<span>{{menu.name}}</span>
|
<span>{{menu.i18n ? $t(menu.i18n) : menu.name}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(secondMenu, secondIndex) in menu.children">
|
<template v-for="(secondMenu, secondIndex) in menu.children">
|
||||||
<template v-if="secondMenu.children && secondMenu.children.length > 0">
|
<template v-if="secondMenu.children && secondMenu.children.length > 0">
|
||||||
@@ -34,13 +34,13 @@
|
|||||||
:key="secondIndex"
|
:key="secondIndex"
|
||||||
:index="`${index}-${secondIndex}`">
|
:index="`${index}-${secondIndex}`">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span class="data-column__span">{{secondMenu.name}}</span>
|
<span class="data-column__span">{{secondMenu.i18n ? $t(secondMenu.i18n) : secondMenu.name}}</span>
|
||||||
</template>
|
</template>
|
||||||
<el-menu-item
|
<el-menu-item
|
||||||
v-for="(thirdMenu, thirdIndex) in secondMenu.children"
|
v-for="(thirdMenu, thirdIndex) in secondMenu.children"
|
||||||
:key="`${index}-${secondIndex}-${thirdIndex}`"
|
:key="`${index}-${secondIndex}-${thirdIndex}`"
|
||||||
:index="thirdMenu.route">
|
:index="thirdMenu.route">
|
||||||
{{thirdMenu.name}}
|
{{thirdMenu.i18n ? $t(thirdMenu.i18n) : thirdMenu.name}}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</template>
|
</template>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<el-menu-item
|
<el-menu-item
|
||||||
:key="secondIndex"
|
:key="secondIndex"
|
||||||
:index="secondMenu.route">
|
:index="secondMenu.route">
|
||||||
{{secondMenu.name}}
|
{{secondMenu.i18n ? $t(secondMenu.i18n) : secondMenu.name}}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
:index="menu.route">
|
:index="menu.route">
|
||||||
<i :class="menu.icon"></i>
|
<i :class="menu.icon"></i>
|
||||||
<template #title>
|
<template #title>
|
||||||
<span class="data-column__span">{{menu.name}}</span>
|
<span class="data-column__span">{{menu.i18n ? $t(menu.i18n) : menu.name}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -216,12 +216,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.system-name {
|
.system-name {
|
||||||
padding-left: 5px;
|
padding-left: 8px;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 12px;
|
font-size: 14px;
|
||||||
letter-spacing: 0;
|
letter-spacing: 0;
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { createI18n } from 'vue-i18n'
|
import { createI18n } from 'vue-i18n'
|
||||||
import { storageKey } from '@/utils/constants'
|
import { storageKey } from '@/utils/constants'
|
||||||
import { getI18n } from '@/utils/api'
|
import { getI18n } from '@/utils/api'
|
||||||
|
import store from '@/store'
|
||||||
import cn from './cn'
|
import cn from './cn'
|
||||||
import en from './en'
|
import en from './en'
|
||||||
|
|
||||||
@@ -12,10 +13,12 @@ const i18n = createI18n({
|
|||||||
}*/
|
}*/
|
||||||
})
|
})
|
||||||
export async function loadI18n () {
|
export async function loadI18n () {
|
||||||
const items = await getI18n()
|
if (!store.state.i18n) {
|
||||||
sessionStorage.setItem(storageKey.i18n, 'true')
|
const items = await getI18n()
|
||||||
Object.keys(items).forEach(lang => {
|
store.commit('loadI18n')
|
||||||
i18n.global.mergeLocaleMessage(lang, items[lang])
|
Object.keys(items).forEach(lang => {
|
||||||
})
|
i18n.global.mergeLocaleMessage(lang, items[lang])
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export default i18n
|
export default i18n
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import router from './router'
|
import router from './router'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { getConfigJson, getPermission } from '@/utils/api'
|
import { getConfigJson, getPermission, loadIso36112 } from '@/utils/api'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { storageKey } from '@/utils/constants'
|
import { storageKey } from '@/utils/constants'
|
||||||
import { loadI18n } from '@/i18n'
|
import { loadI18n } from '@/i18n'
|
||||||
@@ -10,6 +10,10 @@ const loginWhiteList = ['/login'] // 免登陆白名单
|
|||||||
const permissionWhiteList = [...loginWhiteList] // 权限白名单
|
const permissionWhiteList = [...loginWhiteList] // 权限白名单
|
||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
|
// 加载iso-3166-2资源
|
||||||
|
if (!sessionStorage.getItem(storageKey.iso36112)) {
|
||||||
|
loadIso36112()
|
||||||
|
}
|
||||||
// 加载baseUrl
|
// 加载baseUrl
|
||||||
if (!axios.defaults.baseURL) {
|
if (!axios.defaults.baseURL) {
|
||||||
const config = await getConfigJson()
|
const config = await getConfigJson()
|
||||||
@@ -20,7 +24,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
if (!sessionStorage.getItem(storageKey.i18n)) {
|
if (!sessionStorage.getItem(storageKey.i18n)) {
|
||||||
await loadI18n()
|
await loadI18n()
|
||||||
}
|
}
|
||||||
|
// 加载权限
|
||||||
if (permissionWhiteList.indexOf(to.path) !== -1) {
|
if (permissionWhiteList.indexOf(to.path) !== -1) {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ const store = createStore({
|
|||||||
},
|
},
|
||||||
state () {
|
state () {
|
||||||
return {
|
return {
|
||||||
isShrink: localStorage.getItem('cn-left-menu-shrink') === 'true'
|
isShrink: localStorage.getItem('cn-left-menu-shrink') === 'true',
|
||||||
|
i18n: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
@@ -19,6 +20,9 @@ const store = createStore({
|
|||||||
isShrink (state) {
|
isShrink (state) {
|
||||||
state.isShrink = !state.isShrink
|
state.isShrink = !state.isShrink
|
||||||
localStorage.setItem('cn-left-menu-shrink', state.isShrink)
|
localStorage.setItem('cn-left-menu-shrink', state.isShrink)
|
||||||
|
},
|
||||||
|
loadI18n (state) {
|
||||||
|
state.i18n = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
import { get, post } from '@/utils/http'
|
import { get, post } from '@/utils/http'
|
||||||
import { sortByOrderNum } from '@/permission'
|
import { sortByOrderNum } from '@/permission'
|
||||||
|
import {storageKey} from "@/utils/constants";
|
||||||
|
|
||||||
export const api = {
|
export const api = {
|
||||||
// 系统相关
|
// 系统相关
|
||||||
@@ -77,3 +78,9 @@ export async function getI18n () {
|
|||||||
})
|
})
|
||||||
return await request
|
return await request
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function loadIso36112 () {
|
||||||
|
get(`${process.env.BASE_URL}geojson/data/countriesWithCapital.json`).then(response => {
|
||||||
|
sessionStorage.setItem(storageKey.iso36112, JSON.stringify(response))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
17
src/utils/cache.js
Normal file
17
src/utils/cache.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* 缓存
|
||||||
|
* @author 陈劲松
|
||||||
|
* @date 2021/6/30
|
||||||
|
*/
|
||||||
|
|
||||||
|
const cache = {
|
||||||
|
capitalGeo: null
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCache (key, defaultValue = null) {
|
||||||
|
return cache[key] ? cache[key] : defaultValue
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setCache (key, value) {
|
||||||
|
cache[key] = value
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
export const defaultPageSize = 20
|
export const defaultPageSize = 20
|
||||||
|
|
||||||
export const storageKey = {
|
export const storageKey = {
|
||||||
|
iso36112: 'cn-iso3611-2',
|
||||||
i18n: 'cn-i18n',
|
i18n: 'cn-i18n',
|
||||||
language: 'cn-language',
|
language: 'cn-language',
|
||||||
timezone: 'cn-timezone',
|
timezone: 'cn-timezone',
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { ElMessageBox } from 'element-plus'
|
import { ElMessageBox } from 'element-plus'
|
||||||
import i18n from '@/i18n'
|
import i18n from '@/i18n'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
import { storageKey } from '@/utils/constants'
|
||||||
|
import { getCache, setCache } from '@/utils/cache'
|
||||||
|
|
||||||
export const tableSort = {
|
export const tableSort = {
|
||||||
// 是否需要排序
|
// 是否需要排序
|
||||||
@@ -388,11 +390,16 @@ export function replaceUrlPlaceholder (url, params) {
|
|||||||
|
|
||||||
// 下划线转换驼峰
|
// 下划线转换驼峰
|
||||||
export function lineToHump (name) {
|
export function lineToHump (name) {
|
||||||
return name.replace(/\_(\w)/g, function(all, letter){
|
return name.replace(/\_(\w)/g, function (all, letter) {
|
||||||
return letter.toUpperCase()
|
return letter.toUpperCase()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 驼峰转换下划线
|
// 驼峰转换下划线
|
||||||
export function humpToLine (name) {
|
export function humpToLine (name) {
|
||||||
return name.replace(/([A-Z])/g,"_$1").toLowerCase()
|
return name.replace(/([A-Z])/g, '_$1').toLowerCase()
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCapitalGeo (countryId) {
|
||||||
|
!getCache('capitalGeo') && setCache('capitalGeo', JSON.parse(sessionStorage.getItem(storageKey.iso36112)))
|
||||||
|
return getCache('capitalGeo')[countryId]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 标题 -->
|
||||||
<div
|
<div
|
||||||
v-if="isTitle"
|
v-if="isTitle"
|
||||||
class="cn-chart cn-chart__title"
|
class="cn-chart cn-chart__title"
|
||||||
:style="computePosition">{{chartInfo.i18n ? $t(chartInfo.i18n) : chartInfo.name}}</div>
|
:style="computePosition">{{chartInfo.i18n ? $t(chartInfo.i18n) : chartInfo.name}}</div>
|
||||||
|
<!-- Tabs -->
|
||||||
|
<chart-tabs
|
||||||
|
v-else-if="isTabs"
|
||||||
|
class="cn-chart cn-chart__tabs"
|
||||||
|
:tabs="chartInfo"
|
||||||
|
></chart-tabs>
|
||||||
<!-- 地图 -->
|
<!-- 地图 -->
|
||||||
<chart-map
|
<chart-map
|
||||||
v-else-if="isMap"
|
v-else-if="isMap"
|
||||||
@@ -33,9 +40,7 @@
|
|||||||
<template #footer v-if="layout.indexOf(layoutConstant.FOOTER) > -1" :class="{}">
|
<template #footer v-if="layout.indexOf(layoutConstant.FOOTER) > -1" :class="{}">
|
||||||
<!-- 带Table的饼图,展示Table -->
|
<!-- 带Table的饼图,展示Table -->
|
||||||
<template v-if="isEchartsWithTable">
|
<template v-if="isEchartsWithTable">
|
||||||
<div style="height: 100%">
|
<PieTable :tableData="pieTableData" ref="pieTable"/>
|
||||||
<PieTable :tableData="pieTableData" ref="pieTable"/>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</echarts-frame>
|
</echarts-frame>
|
||||||
@@ -45,6 +50,8 @@
|
|||||||
:type="chartInfo.type"
|
:type="chartInfo.type"
|
||||||
:style="computePosition"
|
:style="computePosition"
|
||||||
>
|
>
|
||||||
|
<template #title>{{chartInfo.i18n ? $t(chartInfo.i18n) : chartInfo.name}}</template>
|
||||||
|
<template #data>{{singleValue}}</template>
|
||||||
</single-value>
|
</single-value>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<chart-table
|
<chart-table
|
||||||
@@ -104,7 +111,6 @@ import * as echarts from 'echarts'
|
|||||||
import * as am4Core from '@amcharts/amcharts4/core'
|
import * as am4Core from '@amcharts/amcharts4/core'
|
||||||
import * as am4Maps from '@amcharts/amcharts4/maps'
|
import * as am4Maps from '@amcharts/amcharts4/maps'
|
||||||
import am4GeoDataWorldLow from '@amcharts/amcharts4-geodata/worldChinaLow'
|
import am4GeoDataWorldLow from '@amcharts/amcharts4-geodata/worldChinaLow'
|
||||||
import countries2 from '@amcharts/amcharts4-geodata/data/countries2'
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isEcharts,
|
isEcharts,
|
||||||
@@ -117,17 +123,19 @@ import {
|
|||||||
getLayout,
|
getLayout,
|
||||||
layoutConstant,
|
layoutConstant,
|
||||||
isEchartsWithTable,
|
isEchartsWithTable,
|
||||||
isMapLine
|
isMapLine,
|
||||||
|
isTabs
|
||||||
} from '@/components/charts/chart-options'
|
} from '@/components/charts/chart-options'
|
||||||
import EchartsFrame from '@/components/charts/EchartsFrame'
|
import EchartsFrame from '@/components/charts/EchartsFrame'
|
||||||
import SingleValue from '@/components/charts/ChartSingleValue'
|
import SingleValue from '@/components/charts/ChartSingleValue'
|
||||||
import ChartTable from '@/components/charts/ChartTable'
|
import ChartTable from '@/components/charts/ChartTable'
|
||||||
import ChartMap from '@/components/charts/ChartMap'
|
import ChartMap from '@/components/charts/ChartMap'
|
||||||
import PieTable from '@/components/charts/PieTable'
|
import PieTable from '@/components/charts/PieTable'
|
||||||
|
import ChartTabs from '@/components/charts/ChartTabs'
|
||||||
import ChartTablePagination from '@/components/charts/ChartTablePagination'
|
import ChartTablePagination from '@/components/charts/ChartTablePagination'
|
||||||
import { chartTableDefaultPageSize, chartTableTopOptions } from '@/utils/constants'
|
import { chartTableDefaultPageSize, chartTableTopOptions } from '@/utils/constants'
|
||||||
import { get } from '@/utils/http'
|
import { get } from '@/utils/http'
|
||||||
import { replaceUrlPlaceholder, lineToHump } from '@/utils/tools'
|
import { replaceUrlPlaceholder, getCapitalGeo } from '@/utils/tools'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Chart',
|
name: 'Chart',
|
||||||
@@ -146,7 +154,8 @@ export default {
|
|||||||
ChartTablePagination,
|
ChartTablePagination,
|
||||||
ChartTable,
|
ChartTable,
|
||||||
PieTable,
|
PieTable,
|
||||||
ChartMap
|
ChartMap,
|
||||||
|
ChartTabs
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -159,6 +168,7 @@ export default {
|
|||||||
currentPageData: [] // table当前页的数据
|
currentPageData: [] // table当前页的数据
|
||||||
},
|
},
|
||||||
pieTableData: [],
|
pieTableData: [],
|
||||||
|
singleValue: '-',
|
||||||
myChart: null
|
myChart: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -167,55 +177,92 @@ export default {
|
|||||||
const chartParams = this.chartInfo.params ? JSON.parse(this.chartInfo.params) : null // 图表参数
|
const chartParams = this.chartInfo.params ? JSON.parse(this.chartInfo.params) : null // 图表参数
|
||||||
if (this.isMap) {
|
if (this.isMap) {
|
||||||
this.myChart = this.initMap(`chart${this.chartInfo.id}`)
|
this.myChart = this.initMap(`chart${this.chartInfo.id}`)
|
||||||
/*const queryParams = { startTime: 1593070343, endTime: this.endTime } // 统计数据的查询参数
|
const queryParams = { startTime: 1593070343, endTime: this.endTime, country: '', region: '' } // 统计数据的查询参数
|
||||||
if (chartParams) {
|
if (chartParams) {
|
||||||
get(replaceUrlPlaceholder(chartParams.url, queryParams)).then(mapResponse => {
|
get(replaceUrlPlaceholder(chartParams.url, queryParams)).then(response => {
|
||||||
if (mapResponse.data.length > 100) {
|
const data = response.data.result
|
||||||
mapResponse.data = mapResponse.data.slice(0, 100)
|
data.forEach(r => {
|
||||||
}
|
const serverCountryCapital = r.serverId && getCapitalGeo(r.serverId)
|
||||||
|
const clientCountryCapital = r.clientId && getCapitalGeo(r.clientId)
|
||||||
|
serverCountryCapital && (r.serverLongitude = serverCountryCapital.capitalLongitude)
|
||||||
|
serverCountryCapital && (r.serverLatitude = serverCountryCapital.capitalLatitude)
|
||||||
|
clientCountryCapital && (r.clientLongitude = clientCountryCapital.capitalLongitude)
|
||||||
|
clientCountryCapital && (r.clientLatitude = clientCountryCapital.capitalLatitude)
|
||||||
|
})
|
||||||
if (this.isMapLine) {
|
if (this.isMapLine) {
|
||||||
const lineSeries = this.myChart.series.push(new am4Maps.MapLineSeries())
|
const lineSeries = this.myChart.series.push(new am4Maps.MapLineSeries())
|
||||||
lineSeries.mapLines.template.stroke = am4Core.color('#A258EC')
|
const gradient = new am4Core.LinearGradient()
|
||||||
lineSeries.mapLines.template.line.nonScalingStroke = true
|
gradient.stops.push({ color: am4Core.color() })
|
||||||
lineSeries.mapLines.template.line.strokeDasharray = '4 3'
|
gradient.stops.push({ color: am4Core.color() })
|
||||||
|
gradient.stops.push({ color: am4Core.color() })
|
||||||
|
|
||||||
|
const lineTemplate = lineSeries.mapLines.template
|
||||||
|
lineTemplate.stroke = am4Core.color('#A258EC')
|
||||||
|
lineTemplate.line.nonScalingStroke = true
|
||||||
|
lineTemplate.line.strokeDasharray = '4 3'
|
||||||
|
lineTemplate.nonScalingStroke = true
|
||||||
|
lineTemplate.arrow.nonScaling = true
|
||||||
|
lineTemplate.arrow.width = 4
|
||||||
|
lineTemplate.arrow.height = 6
|
||||||
lineSeries.data = [
|
lineSeries.data = [
|
||||||
{
|
{
|
||||||
multiGeoLine: mapResponse.data.map(d => {
|
multiGeoLine: data.map(d => {
|
||||||
return [{ latitude: parseFloat(d.server_latitude), longitude: parseFloat(d.server_longitude) }, { latitude: parseFloat(d.client_latitude), longitude: parseFloat(d.client_longitude) }]
|
return [
|
||||||
|
{
|
||||||
|
latitude: parseFloat(d.serverLatitude),
|
||||||
|
longitude: parseFloat(d.serverLongitude)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
latitude: parseFloat(d.clientLatitude),
|
||||||
|
longitude: parseFloat(d.clientLongitude)
|
||||||
|
}
|
||||||
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const imageSeries = this.myChart.series.push(new am4Maps.MapImageSeries())
|
const imageSeries = this.myChart.series.push(new am4Maps.MapImageSeries())
|
||||||
|
imageSeries.dataFields.value = 'sessions'
|
||||||
const imageSeriesTemplate = imageSeries.mapImages.template
|
const imageSeriesTemplate = imageSeries.mapImages.template
|
||||||
const circle = imageSeriesTemplate.createChild(am4Core.Circle)
|
const circle = imageSeriesTemplate.createChild(am4Core.Circle)
|
||||||
|
|
||||||
const gradient = new am4Core.RadialGradient()
|
circle.fillOpacity = 0.7
|
||||||
gradient.addColor(am4Core.color('#A258EC'))
|
|
||||||
gradient.addColor(am4Core.color('#A258EC'))
|
|
||||||
gradient.addColor(am4Core.color('#A258EC'))
|
|
||||||
gradient.addColor(am4Core.color('#FFFFFF'))
|
|
||||||
gradient.addColor(am4Core.color('#FFFFFF'))
|
|
||||||
|
|
||||||
circle.radius = 4
|
|
||||||
circle.fill = gradient
|
|
||||||
circle.stroke = am4Core.color('#A258EC')
|
|
||||||
circle.strokeWidth = 1
|
|
||||||
circle.nonScaling = true
|
circle.nonScaling = true
|
||||||
circle.tooltipText = '{title}'
|
circle.tooltipText = '{title}'
|
||||||
|
const radiusHeat = imageSeries.heatRules.push({
|
||||||
|
target: circle,
|
||||||
|
property: 'radius',
|
||||||
|
min: 8,
|
||||||
|
max: 30
|
||||||
|
})
|
||||||
|
const colorHeat = imageSeries.heatRules.push({
|
||||||
|
target: circle,
|
||||||
|
property: 'fill',
|
||||||
|
min: am4Core.color('#D2A8FF'),
|
||||||
|
max: am4Core.color('#A258EC')
|
||||||
|
})
|
||||||
imageSeriesTemplate.propertyFields.latitude = 'latitude'
|
imageSeriesTemplate.propertyFields.latitude = 'latitude'
|
||||||
imageSeriesTemplate.propertyFields.longitude = 'longitude'
|
imageSeriesTemplate.propertyFields.longitude = 'longitude'
|
||||||
|
|
||||||
const pointData = []
|
const pointData = []
|
||||||
mapResponse.data.forEach(d => {
|
data.forEach(d => {
|
||||||
pointData.push({ latitude: parseFloat(d.server_latitude), longitude: parseFloat(d.server_longitude), title: d.server_region })
|
pointData.push({
|
||||||
pointData.push({ latitude: parseFloat(d.client_latitude), longitude: parseFloat(d.client_longitude), title: d.client_region })
|
...d,
|
||||||
|
latitude: parseFloat(d.serverLatitude),
|
||||||
|
longitude: parseFloat(d.serverLongitude),
|
||||||
|
title: this.getTitle(d)
|
||||||
|
})
|
||||||
|
pointData.push({
|
||||||
|
...d,
|
||||||
|
latitude: parseFloat(d.clientLatitude),
|
||||||
|
longitude: parseFloat(d.clientLongitude),
|
||||||
|
title: this.getTitle(d)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
imageSeries.data = pointData
|
imageSeries.data = pointData
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}*/
|
}
|
||||||
} else if (this.isEcharts) {
|
} else if (this.isEcharts) {
|
||||||
const dom = document.getElementById(`chart${this.chartInfo.id}`)
|
const dom = document.getElementById(`chart${this.chartInfo.id}`)
|
||||||
this.myChart = echarts.init(dom)
|
this.myChart = echarts.init(dom)
|
||||||
@@ -246,13 +293,13 @@ export default {
|
|||||||
this.myChart.setOption(this.chartOption)
|
this.myChart.setOption(this.chartOption)
|
||||||
tableQueryParams[chartParams.nameColumn] = data[0][chartParams.nameColumn]
|
tableQueryParams[chartParams.nameColumn] = data[0][chartParams.nameColumn]
|
||||||
get(replaceUrlPlaceholder(chartParams.urlTable, tableQueryParams)).then(response2 => {
|
get(replaceUrlPlaceholder(chartParams.urlTable, tableQueryParams)).then(response2 => {
|
||||||
this.pieTableData = response2.data
|
this.pieTableData = response2.data.result
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.myChart.on('click', function (echartParams) {
|
this.myChart.on('click', function (echartParams) {
|
||||||
get(replaceUrlPlaceholder(chartParams.urlTable, tableQueryParams)).then(response => {
|
get(replaceUrlPlaceholder(chartParams.urlTable, tableQueryParams)).then(response => {
|
||||||
this.pieTableData = response.data
|
this.pieTableData = response.data.result
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -268,37 +315,45 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.myChart.setOption(this.chartOption)
|
||||||
})
|
})
|
||||||
this.myChart.setOption(this.chartOption)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (this.isTable) {
|
} else if (this.isTable) {
|
||||||
if (chartParams) {
|
if (chartParams) {
|
||||||
const tableColumns = new Set()
|
const queryParams = { startTime: 1593070343, endTime: this.endTime, limit: 100, order: 'sessions' }
|
||||||
tableResponse.data.forEach(d => {
|
get(replaceUrlPlaceholder(chartParams.url, queryParams)).then(response => {
|
||||||
Object.keys(d).forEach(k => {
|
|
||||||
tableColumns.add(k)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.table.tableColumns = Array.from(tableColumns)
|
|
||||||
this.table.orderBy = this.table.tableColumns[0]
|
|
||||||
this.table.tableData = tableResponse.data
|
|
||||||
this.table.currentPageData = this.getTargetPageData(1, this.table.pageSize, this.table.tableData)
|
|
||||||
/* get(chartParams.url, { startTime: now - 3600000, endTime: now, order: chartParams.order ? chartParams.order : null, limit: chartParams.limit ? chartParams.limit : null }).then(response => {
|
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
const tableColumns = new Set()
|
const tableColumns = new Set()
|
||||||
response.data.forEach(d => {
|
response.data.result.forEach(d => {
|
||||||
Object.keys(d).forEach(k => {
|
Object.keys(d).forEach(k => {
|
||||||
tableColumns.add(k)
|
tableColumns.add(k)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.table.tableColumns = tableColumns
|
this.table.tableColumns = tableColumns
|
||||||
this.table.tableData = response.data
|
this.table.tableData = response.data.result
|
||||||
|
this.table.orderBy = this.table.tableColumns[0]
|
||||||
|
this.table.currentPageData = this.getTargetPageData(1, this.table.pageSize, this.table.tableData)
|
||||||
}
|
}
|
||||||
}) */
|
})
|
||||||
|
}
|
||||||
|
} else if (this.isSingleValue) {
|
||||||
|
if (chartParams) {
|
||||||
|
const queryParams = { startTime: 1593070343, endTime: this.endTime }
|
||||||
|
get(replaceUrlPlaceholder(chartParams.url, queryParams)).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.singleValue = response.data.result
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getTitle (data) {
|
||||||
|
return `Server: ${data.serverRegion ? data.serverRegion : data.serverCountry}
|
||||||
|
Client: ${data.clientRegion ? data.clientRegion : data.clientCountry}
|
||||||
|
Sessions: ${data.sessions}
|
||||||
|
Bytes: ${data.bytes}`
|
||||||
|
},
|
||||||
initMap (id) {
|
initMap (id) {
|
||||||
const chart = am4Core.create(id, am4Maps.MapChart)
|
const chart = am4Core.create(id, am4Maps.MapChart)
|
||||||
chart.geodata = am4GeoDataWorldLow
|
chart.geodata = am4GeoDataWorldLow
|
||||||
@@ -307,223 +362,12 @@ export default {
|
|||||||
polygonSeries.useGeodata = true
|
polygonSeries.useGeodata = true
|
||||||
polygonSeries.exclude = ['AQ'] // 排除南极洲
|
polygonSeries.exclude = ['AQ'] // 排除南极洲
|
||||||
// 鼠标悬停提示
|
// 鼠标悬停提示
|
||||||
const polygonTemplate = polygonSeries.mapPolygons.template
|
/*const polygonTemplate = polygonSeries.mapPolygons.template
|
||||||
polygonTemplate.tooltipText = '{name}:{value}'
|
|
||||||
const hs = polygonTemplate.states.create('hover')
|
|
||||||
hs.properties.fill = am4Core.color('#91cc75')
|
|
||||||
|
|
||||||
// 热力图规则
|
|
||||||
polygonSeries.heatRules.push({
|
|
||||||
property: 'fill',
|
|
||||||
target: polygonSeries.mapPolygons.template,
|
|
||||||
min: am4Core.color('#ffffff'),
|
|
||||||
max: am4Core.color(this.theme.themeColor)
|
|
||||||
})
|
|
||||||
|
|
||||||
// Add expectancy data
|
|
||||||
polygonSeries.data = [
|
|
||||||
{ id: "AF", value: 60.524 },
|
|
||||||
{ id: "AL", value: 77.185 },
|
|
||||||
{ id: "DZ", value: 70.874 },
|
|
||||||
{ id: "AO", value: 51.498 },
|
|
||||||
{ id: "AR", value: 76.128 },
|
|
||||||
{ id: "AM", value: 74.469 },
|
|
||||||
{ id: "AU", value: 82.364 },
|
|
||||||
{ id: "AT", value: 80.965 },
|
|
||||||
{ id: "AZ", value: 70.686 },
|
|
||||||
{ id: "BH", value: 76.474 },
|
|
||||||
{ id: "BD", value: 70.258 },
|
|
||||||
{ id: "BY", value: 69.829 },
|
|
||||||
{ id: "BE", value: 80.373 },
|
|
||||||
{ id: "BJ", value: 59.165 },
|
|
||||||
{ id: "BT", value: 67.888 },
|
|
||||||
{ id: "BO", value: 66.969 },
|
|
||||||
{ id: "BA", value: 76.211 },
|
|
||||||
{ id: "BW", value: 47.152 },
|
|
||||||
{ id: "BR", value: 73.667 },
|
|
||||||
{ id: "BN", value: 78.35 },
|
|
||||||
{ id: "BG", value: 73.448 },
|
|
||||||
{ id: "BF", value: 55.932 },
|
|
||||||
{ id: "BI", value: 53.637 },
|
|
||||||
{ id: "KH", value: 71.577 },
|
|
||||||
{ id: "CM", value: 54.61 },
|
|
||||||
{ id: "CA", value: 81.323 },
|
|
||||||
{ id: "CV", value: 74.771 },
|
|
||||||
{ id: "CF", value: 49.517 },
|
|
||||||
{ id: "TD", value: 50.724 },
|
|
||||||
{ id: "CL", value: 79.691 },
|
|
||||||
{ id: "CN", value: 75.178 },
|
|
||||||
{ id: "CO", value: 73.835 },
|
|
||||||
{ id: "KM", value: 60.661 },
|
|
||||||
{ id: "CD", value: 49.643 },
|
|
||||||
{ id: "CG", value: 58.32 },
|
|
||||||
{ id: "CR", value: 79.712 },
|
|
||||||
{ id: "CI", value: 50.367 },
|
|
||||||
{ id: "HR", value: 76.881 },
|
|
||||||
{ id: "CU", value: 79.088 },
|
|
||||||
{ id: "CY", value: 79.674 },
|
|
||||||
{ id: "CZ", value: 77.552 },
|
|
||||||
{ id: "DK", value: 79.251 },
|
|
||||||
{ id: "GL", value: 79.251 },
|
|
||||||
{ id: "DJ", value: 61.319 },
|
|
||||||
{ id: "DO", value: 73.181 },
|
|
||||||
{ id: "EC", value: 76.195 },
|
|
||||||
{ id: "EG", value: 70.933 },
|
|
||||||
{ id: "SV", value: 72.361 },
|
|
||||||
{ id: "GQ", value: 52.562 },
|
|
||||||
{ id: "ER", value: 62.329 },
|
|
||||||
{ id: "EE", value: 74.335 },
|
|
||||||
{ id: "ET", value: 62.983 },
|
|
||||||
{ id: "FJ", value: 69.626 },
|
|
||||||
{ id: "FI", value: 80.362 },
|
|
||||||
{ id: "FR", value: 81.663 },
|
|
||||||
{ id: "GA", value: 63.115 },
|
|
||||||
{ id: "GF", value: 79.9 },
|
|
||||||
{ id: "GM", value: 58.59 },
|
|
||||||
{ id: "GE", value: 74.162 },
|
|
||||||
{ id: "DE", value: 80.578 },
|
|
||||||
{ id: "GH", value: 60.979 },
|
|
||||||
{ id: "GR", value: 80.593 },
|
|
||||||
{ id: "GT", value: 71.77 },
|
|
||||||
{ id: "GN", value: 55.865 },
|
|
||||||
{ id: "GW", value: 54.054 },
|
|
||||||
{ id: "GY", value: 66.134 },
|
|
||||||
{ id: "HT", value: 62.746 },
|
|
||||||
{ id: "HN", value: 73.503 },
|
|
||||||
{ id: "HK", value: 83.199 },
|
|
||||||
{ id: "HU", value: 74.491 },
|
|
||||||
{ id: "IS", value: 81.96 },
|
|
||||||
{ id: "IN", value: 66.168 },
|
|
||||||
{ id: "ID", value: 70.624 },
|
|
||||||
{ id: "IR", value: 73.736 },
|
|
||||||
{ id: "IQ", value: 69.181 },
|
|
||||||
{ id: "IE", value: 80.531 },
|
|
||||||
{ id: "IL", value: 81.641 },
|
|
||||||
{ id: "IT", value: 82.235 },
|
|
||||||
{ id: "JM", value: 73.338 },
|
|
||||||
{ id: "JP", value: 83.418 },
|
|
||||||
{ id: "JO", value: 73.7 },
|
|
||||||
{ id: "KZ", value: 66.394 },
|
|
||||||
{ id: "KE", value: 61.115 },
|
|
||||||
{ id: "KP", value: 69.701 },
|
|
||||||
{ id: "KR", value: 81.294 },
|
|
||||||
{ id: "KW", value: 74.186 },
|
|
||||||
{ id: "KG", value: 67.37 },
|
|
||||||
{ id: "LA", value: 67.865 },
|
|
||||||
{ id: "LV", value: 72.045 },
|
|
||||||
{ id: "LB", value: 79.716 },
|
|
||||||
{ id: "LS", value: 48.947 },
|
|
||||||
{ id: "LR", value: 60.23 },
|
|
||||||
{ id: "LY", value: 75.13 },
|
|
||||||
{ id: "LT", value: 71.942 },
|
|
||||||
{ id: "LU", value: 80.371 },
|
|
||||||
{ id: "MK", value: 75.041 },
|
|
||||||
{ id: "MG", value: 64.28 },
|
|
||||||
{ id: "MW", value: 54.798 },
|
|
||||||
{ id: "MY", value: 74.836 },
|
|
||||||
{ id: "ML", value: 54.622 },
|
|
||||||
{ id: "MR", value: 61.39 },
|
|
||||||
{ id: "MU", value: 73.453 },
|
|
||||||
{ id: "MX", value: 77.281 },
|
|
||||||
{ id: "MD", value: 68.779 },
|
|
||||||
{ id: "MN", value: 67.286 },
|
|
||||||
{ id: "ME", value: 74.715 },
|
|
||||||
{ id: "MA", value: 70.714 },
|
|
||||||
{ id: "EH", value: 70.714 },
|
|
||||||
{ id: "MZ", value: 49.91 },
|
|
||||||
{ id: "MM", value: 65.009 },
|
|
||||||
{ id: "NA", value: 64.014 },
|
|
||||||
{ id: "NP", value: 67.989 },
|
|
||||||
{ id: "NL", value: 80.906 },
|
|
||||||
{ id: "NZ", value: 80.982 },
|
|
||||||
{ id: "NI", value: 74.515 },
|
|
||||||
{ id: "NE", value: 57.934 },
|
|
||||||
{ id: "NG", value: 52.116 },
|
|
||||||
{ id: "NO", value: 81.367 },
|
|
||||||
{ id: "SJ", value: 81.367 },
|
|
||||||
{ id: "OM", value: 76.287 },
|
|
||||||
{ id: "PK", value: 66.42 },
|
|
||||||
{ id: "PA", value: 77.342 },
|
|
||||||
{ id: "PG", value: 62.288 },
|
|
||||||
{ id: "PY", value: 72.181 },
|
|
||||||
{ id: "PE", value: 74.525 },
|
|
||||||
{ id: "PH", value: 68.538 },
|
|
||||||
{ id: "PL", value: 76.239 },
|
|
||||||
{ id: "PT", value: 79.732 },
|
|
||||||
{ id: "QA", value: 78.231 },
|
|
||||||
{ id: "RO", value: 73.718 },
|
|
||||||
{ id: "RU", value: 67.874 },
|
|
||||||
{ id: "RW", value: 63.563 },
|
|
||||||
{ id: "SA", value: 75.264 },
|
|
||||||
{ id: "SN", value: 63.3 },
|
|
||||||
{ id: "RS", value: 73.934 },
|
|
||||||
{ id: "SL", value: 45.338 },
|
|
||||||
{ id: "SG", value: 82.155 },
|
|
||||||
{ id: "SK", value: 75.272 },
|
|
||||||
{ id: "SI", value: 79.444 },
|
|
||||||
{ id: "SB", value: 67.465 },
|
|
||||||
{ id: "SO", value: 54 },
|
|
||||||
{ id: "ZA", value: 56.271 },
|
|
||||||
{ id: "SS", value: 54.666 },
|
|
||||||
{ id: "ES", value: 81.958 },
|
|
||||||
{ id: "LK", value: 74.116 },
|
|
||||||
{ id: "SD", value: 61.875 },
|
|
||||||
{ id: "SR", value: 70.794 },
|
|
||||||
{ id: "SZ", value: 48.91 },
|
|
||||||
{ id: "SE", value: 81.69 },
|
|
||||||
{ id: "CH", value: 82.471 },
|
|
||||||
{ id: "SY", value: 71 },
|
|
||||||
{ id: "TW", value: 79.45 },
|
|
||||||
{ id: "TJ", value: 67.118 },
|
|
||||||
{ id: "TZ", value: 60.885 },
|
|
||||||
{ id: "TH", value: 74.225 },
|
|
||||||
{ id: "TL", value: 67.033 },
|
|
||||||
{ id: "TG", value: 56.198 },
|
|
||||||
{ id: "TT", value: 69.761 },
|
|
||||||
{ id: "TN", value: 75.632 },
|
|
||||||
{ id: "TR", value: 74.938 },
|
|
||||||
{ id: "TM", value: 65.299 },
|
|
||||||
{ id: "UG", value: 58.668 },
|
|
||||||
{ id: "UA", value: 68.414 },
|
|
||||||
{ id: "AE", value: 76.671 },
|
|
||||||
{ id: "GB", value: 80.396 },
|
|
||||||
{ id: "US", value: 78.797 },
|
|
||||||
{ id: "UY", value: 77.084 },
|
|
||||||
{ id: "UZ", value: 68.117 },
|
|
||||||
{ id: "VE", value: 74.477 },
|
|
||||||
{ id: "PS", value: 73.018 },
|
|
||||||
{ id: "VN", value: 75.793 },
|
|
||||||
{ id: "YE", value: 62.923 },
|
|
||||||
{ id: "ZM", value: 57.037 },
|
|
||||||
{ id: "ZW", value: 58.142 }
|
|
||||||
];
|
|
||||||
|
|
||||||
const lineSeries = chart.series.push(new am4Maps.MapLineSeries())
|
|
||||||
lineSeries.mapLines.template.stroke = am4Core.color('#A258EC')
|
|
||||||
lineSeries.mapLines.template.line.nonScalingStroke = true
|
|
||||||
lineSeries.mapLines.template.line.strokeDasharray = '4 3'
|
|
||||||
lineSeries.data = [
|
|
||||||
{
|
|
||||||
multiGeoLine: mapResponse3.data.map(d => {
|
|
||||||
return [{ id: d.server_id }, { id: d.client_id }]
|
|
||||||
})
|
|
||||||
/*multiGeoLine: mapResponse.data.map(d => {
|
|
||||||
return [{ latitude: parseFloat(d.server_latitude), longitude: parseFloat(d.server_longitude) }, { latitude: parseFloat(d.client_latitude), longitude: parseFloat(d.client_longitude) }]
|
|
||||||
})*/
|
|
||||||
}
|
|
||||||
]
|
|
||||||
/*const myChart = am4Core.create(id, am4Maps.MapChart)
|
|
||||||
myChart.geodata = am4GeoDataWorldLow
|
|
||||||
myChart.projection = new am4Maps.projections.Miller()
|
|
||||||
const polygonSeries = myChart.series.push(new am4Maps.MapPolygonSeries())
|
|
||||||
polygonSeries.useGeodata = true
|
|
||||||
polygonSeries.exclude = ['AQ'] // 移除南极洲
|
|
||||||
const polygonTemplate = polygonSeries.mapPolygons.template
|
|
||||||
polygonTemplate.tooltipText = '{name}'
|
polygonTemplate.tooltipText = '{name}'
|
||||||
polygonTemplate.fill = am4Core.color('#E7EDF6')
|
polygonTemplate.fontSize = '12px'
|
||||||
const hs = polygonTemplate.states.create('hover') // 添加hover事件
|
const hs = polygonTemplate.states.create('hover')
|
||||||
hs.properties.fill = am4Core.color('#B7BDC6')
|
hs.properties.fill = am4Core.color('#ccc')*/
|
||||||
return myChart*/
|
return chart
|
||||||
},
|
},
|
||||||
pageJump (val) {
|
pageJump (val) {
|
||||||
this.table.currentPageData = this.getTargetPageData(val, this.table.pageSize, this.table.tableData)
|
this.table.currentPageData = this.getTargetPageData(val, this.table.pageSize, this.table.tableData)
|
||||||
@@ -560,181 +404,11 @@ export default {
|
|||||||
isMap: isMap(props.chart.type),
|
isMap: isMap(props.chart.type),
|
||||||
isTitle: isTitle(props.chart.type),
|
isTitle: isTitle(props.chart.type),
|
||||||
isMapLine: isMapLine(props.chart.type),
|
isMapLine: isMapLine(props.chart.type),
|
||||||
|
isTabs: isTabs(props.chart.type),
|
||||||
layout: getLayout(props.chart.type)
|
layout: getLayout(props.chart.type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const mapResponse3 = JSON.parse(`{
|
|
||||||
"code": "200666",
|
|
||||||
"data": [{
|
|
||||||
"level": 0,
|
|
||||||
"server_id": "US",
|
|
||||||
"server_longitude": "110.290534",
|
|
||||||
"server_latitude": "30.816222",
|
|
||||||
"server_country": "America",
|
|
||||||
"server_region": "Washington",
|
|
||||||
"client_id": "CN",
|
|
||||||
"client_longitude": "116.352963",
|
|
||||||
"client_latitude": "40.409079",
|
|
||||||
"client_country": "China",
|
|
||||||
"client_region": "Beijing",
|
|
||||||
"bytes": 27010,
|
|
||||||
"sessions": 40
|
|
||||||
}, {
|
|
||||||
"level": 0,
|
|
||||||
"server_id": "RU",
|
|
||||||
"server_longitude": "2.352222",
|
|
||||||
"server_latitude": "48.856614",
|
|
||||||
"server_country": "America",
|
|
||||||
"server_region": "Washington",
|
|
||||||
"client_id": "CN",
|
|
||||||
"client_longitude": "-74.005973",
|
|
||||||
"client_latitude": "40.712775",
|
|
||||||
"client_country": "China",
|
|
||||||
"client_region": "Beijing",
|
|
||||||
"bytes": 67010,
|
|
||||||
"sessions": 30
|
|
||||||
}],
|
|
||||||
"status": 200,
|
|
||||||
"statistics": {
|
|
||||||
"result_rows": 0,
|
|
||||||
"elapsed": 0,
|
|
||||||
"rows_read": 0,
|
|
||||||
"result_size": 0
|
|
||||||
}
|
|
||||||
}`)
|
|
||||||
const mapResponse = JSON.parse(`{
|
|
||||||
"code": "200666",
|
|
||||||
"data": [{
|
|
||||||
"server_longitude": "110.290534",
|
|
||||||
"server_latitude": "30.816222",
|
|
||||||
"server_country": "America",
|
|
||||||
"server_region": "Washington",
|
|
||||||
"client_longitude": "116.352963",
|
|
||||||
"client_latitude": "40.409079",
|
|
||||||
"client_country": "China",
|
|
||||||
"client_region": "Beijing",
|
|
||||||
"bytes": 27010,
|
|
||||||
"sessions": 40
|
|
||||||
}, {
|
|
||||||
"server_longitude": "2.352222",
|
|
||||||
"server_latitude": "48.856614",
|
|
||||||
"server_country": "America",
|
|
||||||
"server_region": "Washington",
|
|
||||||
"client_longitude": "-74.005973",
|
|
||||||
"client_latitude": "40.712775",
|
|
||||||
"client_country": "China",
|
|
||||||
"client_region": "Beijing",
|
|
||||||
"bytes": 67010,
|
|
||||||
"sessions": 30
|
|
||||||
}],
|
|
||||||
"status": 200,
|
|
||||||
"statistics": {
|
|
||||||
"result_rows": 0,
|
|
||||||
"elapsed": 0,
|
|
||||||
"rows_read": 0,
|
|
||||||
"result_size": 0
|
|
||||||
}
|
|
||||||
}`)/*
|
|
||||||
const mapResponse2 = JSON.parse(`{
|
|
||||||
"code": "200666",
|
|
||||||
"data": [{
|
|
||||||
"id": "US",
|
|
||||||
"name": "United States",
|
|
||||||
"value": 100,
|
|
||||||
"fill": am4core.color("#F05C5C")
|
|
||||||
}, {
|
|
||||||
"id": "FR",
|
|
||||||
"name": "France",
|
|
||||||
"value": 50,
|
|
||||||
"fill": am4core.color("#5C5CFF")
|
|
||||||
}],
|
|
||||||
"status": 200,
|
|
||||||
"statistics": {
|
|
||||||
"result_rows": 0,
|
|
||||||
"elapsed": 0,
|
|
||||||
"rows_read": 0,
|
|
||||||
"result_size": 0
|
|
||||||
}
|
|
||||||
}`)*/
|
|
||||||
const tableResponse = JSON.parse(`{
|
|
||||||
"status": 200,
|
|
||||||
"success": true,
|
|
||||||
"message": "OK",
|
|
||||||
"statistics": {
|
|
||||||
"elapsed": 2111,
|
|
||||||
"rows_read": 1750155,
|
|
||||||
"result_size": 872,
|
|
||||||
"result_rows": 10
|
|
||||||
},
|
|
||||||
"data": [{
|
|
||||||
"ip": "192.168.32.107",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.108",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.109",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.110",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.111",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.112",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.113",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.114",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.115",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.116",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.117",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.118",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
},{
|
|
||||||
"ip": "192.168.32.119",
|
|
||||||
"sessions": "229112",
|
|
||||||
"packets": "245823",
|
|
||||||
"bytes": "17974141"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}`)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in New Issue
Block a user