var baseUrl = "http://39.101.167.152:8088/shekecaiji"; var href = window.location.href.split("="); var shengFen = unescape(href[1].split("&")[0]); var pyName = href[2].split("&")[0]; var shortName = unescape(href[3]).split("&")[0]; $("#name").text(shengFen + "市场招聘大数据展示平台"); console.log(shengFen, pyName, shortName); //头部数据-------------------------------------- //获取当前时间 var formattedDateTime; var showOtherFlag = false; function getDate() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getDate", async: false, success: function (res) { console.log(res); formattedDateTime = res.data; var text = res.data.split("-")[1]; if (Number(text) >= 10) { $("#btn1").text(text + "月分析"); } else { $("#btn1").text(text.substring(1, 2) + "月分析"); } }, }); } function showOther(obj) { if (!showOtherFlag) { $(".echart10").hide(); $(".echart12").hide(); showOtherFlag = true; } else { $(".echart10").show(); $(".echart12").show(); showOtherFlag = false; } } //切换toggle function toggleView(obj) { $(obj).siblings().removeClass("active"); $(obj).addClass("active"); var viewId = $(obj).attr("viewId"); if (viewId == "1") { $(".mainbox1").show(); $(".mainbox2").hide(); getData8(); getData5(); getData6(); getData1(); getData2(); getData7(); getData4(); getData10(); getData12(); } else if (viewId == "2") { $(".mainbox1").hide(); $(".mainbox2").show(); get_echart_trend1(); get_echart_trend2(); get_echart_trend3(); get_echart_trend4(); get_echart_trend5(); get_echart_trend6(); get_echart_trend7(); } } //左侧数据-------------------------------------- //分行业 function getData8() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData8", async: false, data: { date: formattedDateTime, shengfen: shengFen }, success: function (res) { //console.log(res); if (res.code == "0") { var data = res.data; if (data.name.length > 0) { quanGuo(data); $(".myscroll").myScroll({ //jQuery文字无缝滚动 speed: 40, //数值越大,速度越慢 rowHeight: 26, //li的高度 }); } } }, }); } function quanGuo(data) { $("#ulBox").empty(); $(data.name).each(function (i, n) { $("#ulBox").append( '
  • ' + (i + 1) + '' + n + "" + data.data1[i] + "" + data.data2[i] + "
  • " ); }); } //分单位 function getData5() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData5", async: false, data: { date: formattedDateTime, shengfen: shengFen }, success: function (res) { //console.log(res); if (res.code == "0") { var myChart = echarts.init(document.getElementById("echart5")); var option = { title: { text: "分单位性质招聘需求", subtext: "", left: "center", textStyle: { fontSize: 13, color: "#fff", fontWeight: 400 }, }, legend: { left: "left", textStyle: { color: "#fff", fontSize: 10 } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, grid: { left: "0", top: "20%", right: "5", bottom: "5", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "9" }, }, }, yAxis: { type: "value", name: "万人/万个", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10, padding: 6 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: [ { type: "bar", name: "需求人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#dd76aa" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data1, }, { type: "bar", name: "求职人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#36c3fd" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data2, }, ], }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } //分产业 function getData7() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData7", async: false, data: { date: formattedDateTime, shengfen: shengFen }, success: function (res) { //console.log(res); if (res.code == "0") { var arr = []; for (var i = 0; i < res.data.name.length; i++) { var obj = {}; obj.name = res.data.name[i]; obj.value = res.data.data1[i]; arr.push(obj); } var myChart = echarts.init(document.getElementById("echart7")); var option = { title: { text: "分产业招聘需求", subtext: "", left: "center", textStyle: { fontSize: 13, color: "#fff", fontWeight: 400 }, }, legend: { orient: "vertical", left: "left", textStyle: { color: "#fff", fontSize: 10 }, }, series: [ { name: "", type: "pie", color: [ "#45C2E0", "#C1EBDD", "#FFC851", "#DA5476", "#1869A0", "#FF9393", ], radius: "50%", data: arr, label: { normal: { show: true, formatter: "{b}:{c}万人" } }, center: ["50%", "60%"], emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: "rgba(0, 0, 0, 0.5)", }, }, }, ], }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } //获取岗位数gvs和招聘人数zprs function getData1() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData1", async: false, data: { date: formattedDateTime, shengfen: shengFen }, success: function (res) { //console.log(res); if ((res.code = "0")) { var xq = res.data.xq; var qz = res.data.qz; $(".xuqiu").text("总岗位数:" + xq + "万个"); $(".qiuzhi").text("求职总人数:" + qz + "万人"); } }, }); } //获取省辖市集合 function getCityListByProvinceCode(name) { window.location.href = "post.html?shortName=" + escape(name); } //获取地图数据 function getData2() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData2", async: false, data: { date: formattedDateTime, shengfen: shengFen }, success: function (res) { console.log(res); if (res.code == "0") { var city = res.data; if (city.length > 0) { var myChart = echarts.init(document.getElementById("echart2")); if (shengFen.indexOf("山西") > -1) { $.getScript("js/province/js/shanxi.js", function () { var option = { tooltip: { trigger: "item", formatter: function (params) { if (params.name != "") { return ( params.name + "
    需求人数:" + params.value + "
    求职人数:" + params.data.value1 ); } else { return "暂无数据"; } }, }, animation: false, visualMap: { show: false, min: 1, max: 2000000, inRange: { color: ["#d94e5d", "#eac736", "#50a3ba"].reverse(), }, textStyle: { color: "#fff" }, }, //geo: {map: shortName, type: 'map', roam: false}, geo: {}, series: [ { name: shortName, type: "map", mapType: shortName, aspectScale: 0.75, zoom: 1.3, roam: true, label: { normal: { show: true, textStyle: { color: "#fff", fontSize: "9" }, }, emphasis: { show: true, textStyle: { color: "#800080" } }, }, itemStyle: { normal: { color: "#ffeb7b", areaColor: "#4c60ff", borderColor: "#1935e1", }, }, data: city, }, ], }; myChart.setOption(option); //地图点击事件 myChart.on("click", function (params) { //点击事件 if (params.name != "") { var name = params.name; getCityListByProvinceCode(name); // 获取得城市拼音 return; } else { showDialog("暂无数据,无法查看"); } //没有找到对应城市的话,那么返回到全国地图 option.series[0].mapType = "china"; myChart.setOption(option); }); window.addEventListener("resize", function () { myChart.resize(); }); }); } else if (shengFen.indexOf("陕西") > -1) { $.getScript("js/province/js/shanxi1.js", function () { var option = { tooltip: { trigger: "item", formatter: function (params) { if (params.name != "") { return ( params.name + "
    需求人数:" + params.value + "
    求职人数:" + params.data.value1 ); } else { return "暂无数据"; } }, }, animation: false, visualMap: { show: false, min: 1, max: 2000000, inRange: { color: ["#d94e5d", "#eac736", "#50a3ba"].reverse(), }, textStyle: { color: "#fff" }, }, //geo: {map: shortName, type: 'map', roam: false}, geo: {}, series: [ { name: shortName, type: "map", mapType: shortName, aspectScale: 0.75, zoom: 1.3, roam: true, label: { normal: { show: true, textStyle: { color: "#fff", fontSize: "9" }, }, emphasis: { show: true, textStyle: { color: "#800080" } }, }, itemStyle: { normal: { color: "#ffeb7b", areaColor: "#4c60ff", borderColor: "#1935e1", }, }, data: city, }, ], }; myChart.setOption(option); myChart.on("click", function (params) { //点击事件 if (params.name != "") { var name = params.name; getCityListByProvinceCode(name); // 获取得城市拼音 return; } else { showDialog("暂无数据,无法查看"); } //没有找到对应城市的话,那么返回到全国地图 option.series[0].mapType = "china"; myChart.setOption(option); }); window.addEventListener("resize", function () { myChart.resize(); }); }); } else { $.getScript("js/province/js/" + pyName + ".js", function () { var option = { tooltip: { trigger: "item", formatter: function (params) { if (params.name != "") { return ( params.name + "
    需求人数:" + params.value + "
    求职人数:" + params.data.value1 ); } else { return "暂无数据"; } }, }, animation: false, visualMap: { show: false, min: 1, max: 2000000, inRange: { color: ["#d94e5d", "#eac736", "#50a3ba"].reverse(), }, textStyle: { color: "#fff" }, }, //geo: {map: shortName, type: 'map', roam: false}, geo: {}, series: [ { name: shortName, type: "map", mapType: shortName, aspectScale: 0.75, zoom: 1.3, roam: true, label: { normal: { show: true, textStyle: { color: "#fff", fontSize: "9" }, }, emphasis: { show: true, textStyle: { color: "#800080" } }, }, itemStyle: { normal: { color: "#ffeb7b", areaColor: "#4c60ff", borderColor: "#1935e1", }, }, data: city, }, ], }; myChart.setOption(option); //地图点击事件 myChart.on("click", function (params) { //点击事件 if (params.name != "") { var name = params.name; getCityListByProvinceCode(name); // 获取得城市拼音 return; } else { showDialog("暂无数据,无法查看"); } //没有找到对应城市的话,那么返回到全国地图 option.series[0].mapType = "china"; myChart.setOption(option); }); window.addEventListener("resize", function () { myChart.resize(); }); }); } } } }, }); } //分岗位招聘需求 function getData4() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData4", async: false, data: { date: formattedDateTime, shengfen: shengFen }, success: function (res) { console.log(res); if (res.code == "0") { var name = []; var xq = []; var qz = []; for (var i = 0; i < res.data.length; i++) { name.push(res.data[i].name); xq.push(res.data[i].xq); qz.push(res.data[i].qz); } var myChart = echarts.init(document.getElementById("echart4")); var option = { title: { text: "分岗位招聘需求", subtext: "", left: "center", textStyle: { fontSize: 13, color: "#fff", fontWeight: 400 }, }, legend: { left: "left", textStyle: { color: "#fff", fontSize: 10 } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, grid: { left: "0", top: "20%", right: "0", bottom: "5", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "8" }, }, }, yAxis: { type: "value", name: "万人/万个", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10, padding: 6 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: [ { type: "bar", name: "需求人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#dd76aa" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: xq, }, { type: "bar", name: "求职人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#36c3fd" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: qz, }, ], }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } //工资水平 function getData12() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData12", async: false, data: { date: formattedDateTime, shengfen: shengFen }, success: function (res) { //console.log(res); if (res.code == "0") { var myChart = echarts.init(document.getElementById("echart12")); var option = { title: { text: "不同薪酬区间的岗位需求", subtext: "", left: "center", textStyle: { fontSize: 13, color: "#fff", fontWeight: 400 }, }, legend: { left: "left", textStyle: { color: "#fff", fontSize: 10 } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, grid: { left: "0", top: "20%", right: "5", bottom: "5", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 275, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "9" }, }, }, yAxis: { type: "value", name: "万人/万个", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10, padding: 6 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: [ { type: "bar", name: "需求人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#dd76aa" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data1, }, { type: "bar", name: "求职人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#36c3fd" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data2, }, ], }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } //学历 function getData10() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData10", async: false, data: { date: formattedDateTime, shengfen: shengFen }, success: function (res) { //console.log(res); if (res.code == "0") { var myChart = echarts.init(document.getElementById("echart10")); var option = { title: { text: "分学历求职人数", subtext: "", left: "center", textStyle: { fontSize: 13, color: "#fff", fontWeight: 400 }, }, legend: { left: "left", textStyle: { color: "#fff", fontSize: 10 } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, grid: { left: "0", top: "20%", right: "5", bottom: "5", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 275, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "9" }, }, }, yAxis: { type: "value", name: "万人/万个", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10, padding: 6 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: [ { type: "bar", name: "需求人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#dd76aa" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data1, }, { type: "bar", name: "求职人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#36c3fd" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data2, }, ], }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } //分企业规模 function getData6() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData6", async: true, data: { date: formattedDateTime }, success: function (res) { console.log(res); if (res.code == "0") { var myChart = echarts.init(document.getElementById("echart6")); var option = { title: { text: "分企业规模求职人数", subtext: "", left: "center", textStyle: { fontSize: 13, color: "#fff", fontWeight: 400 }, }, legend: { left: "left", textStyle: { color: "#fff", fontSize: 10 } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, grid: { left: "0", top: "20%", right: "5", bottom: "5", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 275, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "9" }, }, }, yAxis: { type: "value", name: "万人/万个", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10, padding: 6 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: [ { type: "bar", name: "需求人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#dd76aa" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data1, }, { type: "bar", name: "求职人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#36c3fd" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data2, }, ], }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } //分年龄 function getData11() { $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData11", async: true, data: { date: formattedDateTime }, success: function (res) { console.log(res); if (res.code == "0") { var myChart = echarts.init(document.getElementById("echart11")); var option = { title: { text: "分年龄求职人数", subtext: "", left: "center", textStyle: { fontSize: 13, color: "#fff", fontWeight: 400 }, }, legend: { left: "left", textStyle: { color: "#fff", fontSize: 10 } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, grid: { left: "0", top: "20%", right: "5", bottom: "5", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 275, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "9" }, }, }, yAxis: { type: "value", name: "万人/万个", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10, padding: 6 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: [ { type: "bar", name: "需求人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#dd76aa" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data1, }, { type: "bar", name: "求职人数", barWidth: "15%", itemStyle: { normal: { opacity: 1, barBorderRadius: 0, color: "#36c3fd" }, }, label: { show: true, position: "top", distance: 5, fontSize: "8", }, data: res.data.data2, }, ], }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } $(function () { getDate(); getData8(); getData5(); getData6(); getData1(); getData2(); getData7(); getData4(); getData10(); getData11(); getData12(); }); //历史数据 function get_echart_trend1() { var fenlei = "行业"; $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData13", data: { fenlei: fenlei, shengfen: shengFen }, success: function (res) { //console.log(res); if (res.code == "0") { var arr = []; for (var i = 0; i < res.data.keys.length; i++) { var obj = {}; obj.data = res.data["qzlist" + i]; obj.type = "line"; obj.name = res.data.keys[i]; arr.push(obj); } for (var j = 0; j < res.data.keys.length; j++) { var obj = {}; obj.data = res.data["xqlist" + j]; obj.type = "line"; obj.name = res.data.keys[j]; arr.push(obj); } var myChart = echarts.init(document.getElementById("echart_trend1")); var option = { tooltip: { trigger: "axis", axisPointer: { type: "shadow" }, position: [10, 0], }, grid: { left: "0", top: "5%", right: "5", bottom: "0", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, }, yAxis: { type: "value", name: "", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: arr, }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } function get_echart_trend2() { var fenlei = "企业规模"; $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData13", data: { fenlei: fenlei, shengfen: shengFen }, success: function (res) { //console.log(res); if (res.code == "0") { var arr = []; for (var i = 0; i < res.data.keys.length; i++) { var obj = {}; obj.data = res.data["qzlist" + i]; obj.type = "line"; obj.name = res.data.keys[i]; arr.push(obj); } for (var j = 0; j < res.data.keys.length; j++) { var obj = {}; obj.data = res.data["xqlist" + j]; obj.type = "line"; obj.name = res.data.keys[j]; arr.push(obj); } var myChart = echarts.init(document.getElementById("echart_trend2")); var option = { tooltip: { trigger: "axis", axisPointer: { type: "shadow" }, position: [10, 0], }, grid: { left: "0", top: "5%", right: "5", bottom: "0", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, }, yAxis: { type: "value", name: "", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: arr, }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } function get_echart_trend3() { var fenlei = "工资水平"; $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData13", data: { fenlei: fenlei, shengfen: shengFen }, success: function (res) { console.log(res); if (res.code == "0") { var arr = []; for (var i = 0; i < res.data.keys.length; i++) { var obj = {}; obj.data = res.data["qzlist" + i]; obj.type = "line"; obj.name = res.data.keys[i]; arr.push(obj); } for (var j = 0; j < res.data.keys.length; j++) { var obj = {}; obj.data = res.data["xqlist" + j]; obj.type = "line"; obj.name = res.data.keys[j]; arr.push(obj); } var myChart = echarts.init(document.getElementById("echart_trend3")); var option = { tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, grid: { left: "0", top: "5%", right: "5", bottom: "0", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, }, yAxis: { type: "value", name: "", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: arr, }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } function get_echart_trend4() { var fenlei = "产业"; $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData13", data: { fenlei: fenlei, shengfen: shengFen }, success: function (res) { console.log(res); if (res.code == "0") { var arr = []; for (var i = 0; i < res.data.keys.length; i++) { var obj = {}; obj.data = res.data["qzlist" + i]; obj.type = "bar"; obj.name = res.data.keys[i]; arr.push(obj); } for (var j = 0; j < res.data.keys.length; j++) { var obj = {}; obj.data = res.data["xqlist" + j]; obj.type = "bar"; obj.name = res.data.keys[j]; arr.push(obj); } var myChart = echarts.init(document.getElementById("echart_trend4")); var option = { tooltip: { trigger: "axis", axisPointer: { type: "shadow" }, position: [10, 0], }, grid: { left: "0", top: "5%", right: "5", bottom: "0", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, }, yAxis: { type: "value", name: "", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: arr, }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } function get_echart_trend5() { var fenlei = "企业规模"; $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData13", data: { fenlei: fenlei, shengfen: shengFen }, success: function (res) { console.log(res); if (res.code == "0") { var arr = []; for (var i = 0; i < res.data.keys.length; i++) { var obj = {}; obj.data = res.data["qzlist" + i]; obj.type = "bar"; obj.name = res.data.keys[i]; arr.push(obj); } for (var j = 0; j < res.data.keys.length; j++) { var obj = {}; obj.data = res.data["xqlist" + j]; obj.type = "bar"; obj.name = res.data.keys[j]; arr.push(obj); } var myChart = echarts.init(document.getElementById("echart_trend5")); var option = { tooltip: { trigger: "axis", axisPointer: { type: "shadow" }, position: [10, 0], }, grid: { left: "0", top: "5%", right: "5", bottom: "0", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, }, yAxis: { type: "value", name: "", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: arr, }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } function get_echart_trend6() { var fenlei = "学历"; $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData13", data: { fenlei: fenlei, shengfen: shengFen }, success: function (res) { console.log(res); if (res.code == "0") { var arr = []; for (var i = 0; i < res.data.keys.length; i++) { var obj = {}; obj.data = res.data["qzlist" + i]; obj.type = "bar"; obj.name = res.data.keys[i]; arr.push(obj); } for (var j = 0; j < res.data.keys.length; j++) { var obj = {}; obj.data = res.data["xqlist" + j]; obj.type = "bar"; obj.name = res.data.keys[j]; arr.push(obj); } var myChart = echarts.init(document.getElementById("echart_trend6")); var option = { tooltip: { trigger: "axis", axisPointer: { type: "shadow" }, position: [10, 0], }, grid: { left: "0", top: "5%", right: "5", bottom: "0", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, }, yAxis: { type: "value", name: "", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: arr, }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); } function get_echart_trend7() { var fenlei = "岗位类型"; $.ajax({ type: "GET", url: baseUrl + "/dataNew/getData13", data: { fenlei: fenlei, shengfen: shengFen }, success: function (res) { console.log(res); if (res.code == "0") { var arr = []; for (var i = 0; i < res.data.keys.length; i++) { var obj = {}; obj.data = res.data["qzlist" + i]; obj.type = "bar"; obj.name = res.data.keys[i]; arr.push(obj); } for (var j = 0; j < res.data.keys.length; j++) { var obj = {}; obj.data = res.data["xqlist" + j]; obj.type = "bar"; obj.name = res.data.keys[j]; arr.push(obj); } var myChart = echarts.init(document.getElementById("echart_trend7")); var option = { tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, grid: { left: "0", top: "5%", right: "5", bottom: "0", containLabel: true, }, xAxis: { nameLocation: "end", nameGap: 7, type: "category", data: res.data.name, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, axisTick: { show: false }, axisLabel: { interval: 0, rotate: 0, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, }, yAxis: { type: "value", name: "", nameGap: 0, nameTextStyle: { color: "#fff", fontSize: 10 }, position: "top", axisLabel: { show: true, textStyle: { color: "rgba(255,255,255,.6)", fontSize: "10" }, }, axisTick: { show: false }, axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.9)", width: 1, type: "solid", }, }, splitLine: { lineStyle: { color: "rgba(255,255,255,.1)" } }, }, series: arr, }; myChart.setOption(option); window.addEventListener("resize", function () { myChart.resize(); }); } }, }); }