| | |
| | | "#96dee8" |
| | | ], |
| | | grid: { |
| | | top: "10%", |
| | | top: "15%", |
| | | left: "3%", |
| | | right: "4%", |
| | | bottom: "15%", |
| | | bottom: "0%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data: ["趋势"], |
| | | bottom: "0%", |
| | | data: ["服务客户数量"], |
| | | top: "0%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | |
| | | ] |
| | | }, |
| | | yAxis: { |
| | | name: "(元)", |
| | | type: "value", |
| | | axisLabel: { |
| | | color: "#fff" |
| | |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "趋势", |
| | | name: "服务对象数量", |
| | | data: data, |
| | | type: "line", |
| | | smooth: true, |
| | |
| | | return option; |
| | | } |
| | | function bottomOption1(alldata) { |
| | | let baoan = []; |
| | | let chiz = []; |
| | | let paiq = []; |
| | | alldata.forEach(item => { |
| | | for (var i in item) { |
| | | for (var j in item[i]) { |
| | | if (i === "baoan") { |
| | | baoan.push(item[i][j]); |
| | | } else if (i === "chiz") { |
| | | chiz.push(item[i][j]); |
| | | } else if (i === "paiq") { |
| | | paiq.push(item[i][j]); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | let option = { |
| | | // title: { |
| | | // text: "公司运营趋势", |
| | |
| | | // }, |
| | | color: [ |
| | | "#73c0de", |
| | | |
| | | "#fac858", |
| | | "#91cc75", |
| | | "#3ba272", |
| | |
| | | "#96dee8" |
| | | ], |
| | | grid: { |
| | | top: "10%", |
| | | top: "15%", |
| | | left: "3%", |
| | | right: "4%", |
| | | bottom: "15%", |
| | | bottom: "0%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data: ["趋势"], |
| | | bottom: "0%", |
| | | data: ["保安员数量", "派遣数量", "持证数量"], |
| | | top: "0%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | trigger: "axis", |
| | | backgroundColor: "#031952", |
| | | color: "#fff", |
| | | borderWidth: "0", //边框宽度设置1 |
| | |
| | | ] |
| | | }, |
| | | yAxis: { |
| | | name: "(元)", |
| | | // name: "(元)", |
| | | type: "value", |
| | | axisLabel: { |
| | | color: "#fff" |
| | |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "趋势", |
| | | data: [10, 20, 14, 15, 16, 17, 24, 15, 3, 7, 11, 23], |
| | | name: "保安员数量", |
| | | type: "line", |
| | | smooth: true, |
| | | areaStyle: {} |
| | | stack: "总量", |
| | | data: baoan |
| | | }, |
| | | { |
| | | name: "派遣数量", |
| | | type: "line", |
| | | stack: "总量", |
| | | data: paiq |
| | | }, |
| | | { |
| | | name: "持证数量", |
| | | type: "line", |
| | | stack: "总量", |
| | | data: chiz |
| | | } |
| | | ] |
| | | }; |
| | |
| | | barWidth: 9, |
| | | data: chiz |
| | | }, |
| | | { |
| | | name: "过考保安数", |
| | | type: "bar", |
| | | barWidth: 9, |
| | | data: [] |
| | | }, |
| | | // { |
| | | // name: "过考保安数", |
| | | // type: "bar", |
| | | // barWidth: 9, |
| | | // data: [] |
| | | // }, |
| | | { |
| | | name: "缴纳社保保安数", |
| | | type: "bar", |
| | |
| | | top: "10%", |
| | | left: "10%", |
| | | right: "2%", |
| | | bottom: "22%", |
| | | bottom: "25%", |
| | | containLabel: false |
| | | }, |
| | | xAxis: { |
| | |
| | | boundaryGap: true, |
| | | axisLabel: { |
| | | color: "#fff", |
| | | interval: 0 |
| | | interval: 0, |
| | | rotate: 40 |
| | | }, |
| | | data: [ |
| | | "一月", |
| | |
| | | }; |
| | | return option; |
| | | } |
| | | function bottomOption2(alldata) { |
| | | let data = []; |
| | | let qcount = alldata["qcount"] || 0; |
| | | data.push({ name: "青年", value: qcount }); |
| | | let zcount = alldata["zcount"] || 0; |
| | | data.push({ name: "中年", value: zcount }); |
| | | let lcount = alldata["lcount"] || 0; |
| | | data.push({ name: "老年", value: lcount }); |
| | | |
| | | function economicMiddle(data1,data2) { |
| | | let option = { |
| | | tooltip: { |
| | | trigger: "item", |
| | | formatter: "{a}<br>{b}:{c}({d}%)", |
| | | axisPointer: { |
| | | type: "shadow" |
| | | }, |
| | | backgroundColor: "#031952", //设置背景图片 rgba格式 |
| | | color: "#fff", |
| | | borderWidth: "0", //边框宽度设置1 |
| | | // borderColor: "gray", //设置边框颜色 |
| | | textStyle: { |
| | | color: "#fff" //设置文字颜色 |
| | | } |
| | | }, |
| | | // legend: { |
| | | // data: ["青年", "中年", "老年"], |
| | | // top: "0%", |
| | | // itemHeight: 10, |
| | | // textStyle: { |
| | | // color: "#fff" |
| | | // } |
| | | // }, |
| | | color: [ |
| | | "#73c0de", |
| | | "#fac858", |
| | | "#91cc75", |
| | | "#3ba272", |
| | | "#fc8452", |
| | | "#9a60b4", |
| | | "#3fb1e3", |
| | | "#6be6c1", |
| | | "#626c91", |
| | | "#a0a7e6", |
| | | "#c4ebad", |
| | | "#96dee8" |
| | | ], |
| | | grid: { |
| | | top: "10%", |
| | | left: "5%", |
| | | right: "30%", |
| | | bottom: "4%", |
| | | containLabel: true |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "年龄结构", |
| | | type: "pie", |
| | | center: ["33%", "50%"], |
| | | radius: "70%", |
| | | data: data, |
| | | label: { |
| | | color: "#fff" |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | return option; |
| | | } |
| | | |
| | | function economicMiddle(data1, data2) { |
| | | let sbData = []; |
| | | let pqData = []; |
| | | for (var a in data1) { |
| | |
| | | }, |
| | | data: [ |
| | | { value: allData.PCount, name: "已派遣人数" }, |
| | | { value: allData.WPCount, name: "未派遣人" } |
| | | { value: allData.WPCount, name: "未派遣人数" } |
| | | ] |
| | | } |
| | | ] |
| | |
| | | middleOption1, |
| | | middleOption2, |
| | | economicMiddle, |
| | | economicPieOption |
| | | economicPieOption, |
| | | bottomOption2 |
| | | }; |