代码优化
This commit is contained in:
@@ -949,158 +949,6 @@ function getData20() {
|
|||||||
var city = res.data;
|
var city = res.data;
|
||||||
if (city.length > 0) {
|
if (city.length > 0) {
|
||||||
var myChart = echarts.init(document.getElementById("echart20"));
|
var myChart = echarts.init(document.getElementById("echart20"));
|
||||||
// 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 +
|
|
||||||
// "<br/>需求人数:" +
|
|
||||||
// params.value +
|
|
||||||
// "<br/>求职人数:" +
|
|
||||||
// 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: "四川",
|
|
||||||
// type: "map",
|
|
||||||
// mapType: "四川",
|
|
||||||
// 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 +
|
|
||||||
// "<br/>需求人数:" +
|
|
||||||
// params.value +
|
|
||||||
// "<br/>求职人数:" +
|
|
||||||
// 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: "四川",
|
|
||||||
// type: "map",
|
|
||||||
// mapType: "四川",
|
|
||||||
// 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/" + "sichuan.js", function () {
|
$.getScript("js/province/js/" + "sichuan.js", function () {
|
||||||
var option = {
|
var option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@@ -1129,7 +977,6 @@ function getData20() {
|
|||||||
},
|
},
|
||||||
textStyle: { color: "#fff" },
|
textStyle: { color: "#fff" },
|
||||||
},
|
},
|
||||||
//geo: {map: shortName, type: 'map', roam: false},
|
|
||||||
geo: {},
|
geo: {},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user