This commit is contained in:
zxy
2024-02-10 23:49:17 +08:00
parent c65eebaabd
commit bbd3b80bca

View File

@@ -442,12 +442,16 @@ function getData5() {
function getData7() { function getData7() {
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: baseUrl + "/dataNew/getData7", url: testUrl + "/getData7",
headers: {
'Content-Type': 'application/json', // 指定请求体为JSON格式
'Jobslink-Auth': `bearer ${token}`
},
async: true, async: true,
data: { date: formattedDateTime }, data: { date: '2023-10', province: '四川省' },
success: function (res) { success: function (res) {
//console.log(res); //console.log(res);
if (res.code == "0") { if (res.code == "200") {
var arr = []; var arr = [];
for (var i = 0; i < res.data.name.length; i++) { for (var i = 0; i < res.data.name.length; i++) {
var obj = {}; var obj = {};
@@ -456,44 +460,6 @@ function getData7() {
arr.push(obj); arr.push(obj);
} }
var myChart = echarts.init(document.getElementById("echart7")); 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)",
// },
// },
// },
// ],
// };
var option = { var option = {
legend: { legend: {
top: "bottom", top: "bottom",
@@ -518,16 +484,7 @@ function getData7() {
itemStyle: { itemStyle: {
borderRadius: 8, borderRadius: 8,
}, },
data: [ data: arr,
{ value: 40, name: "rose 1" },
{ value: 38, name: "rose 2" },
{ value: 32, name: "rose 3" },
{ value: 30, name: "rose 4" },
{ value: 28, name: "rose 5" },
{ value: 26, name: "rose 6" },
{ value: 22, name: "rose 7" },
{ value: 18, name: "rose 8" },
],
}, },
], ],
}; };
@@ -1548,12 +1505,16 @@ function getData6() {
function getData18() { function getData18() {
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: baseUrl + "/dataNew/getData6", url: testUrl + "/getData3",
headers: {
'Content-Type': 'application/json', // 指定请求体为JSON格式
'Jobslink-Auth': `bearer ${token}`
},
async: true, async: true,
data: { date: formattedDateTime }, data: { date: '2023-10', province: '四川省' },
success: function (res) { success: function (res) {
console.log(res); console.log(res);
if (res.code == "0") { if (res.code == "200") {
var myChart = echarts.init(document.getElementById("echart8")); var myChart = echarts.init(document.getElementById("echart8"));
var option = { var option = {
tooltip: { tooltip: {
@@ -1591,7 +1552,7 @@ function getData18() {
yAxis: { yAxis: {
type: "category", type: "category",
axisTick: { show: false }, axisTick: { show: false },
data: ["15K以上", "10K-15K", "8K-10K", "5K-8K", "3K-5K", "3K以下"], data: res.data.name,
axisLabel: { axisLabel: {
show: true, show: true,
textStyle: { color: "#0072FF", fontSize: "12" }, textStyle: { color: "#0072FF", fontSize: "12" },
@@ -1620,7 +1581,7 @@ function getData18() {
]), ]),
}, },
}, },
data: [0, 20, 40, 60, 80, 100], data: res.data.data1,
}, },
], ],
}; };