| | |
| | | </div> |
| | | <div class="securityAnalysisright"> |
| | | <div class="dispatchSecurity" ref="ech5"> |
| | | <!-- 保安派遣情况统计 |
| | | <!-- 保安员年龄分布情况统计 |
| | | <div>饼图</div> --> |
| | | </div> |
| | | <div class="socialSecurity" ref="ech6"> |
| | |
| | | </div> |
| | | <div> |
| | | <el-dialog |
| | | width="90%" |
| | | width="80%" |
| | | :title="titles" |
| | | append-to-body |
| | | :visible.sync="dialogVisible" |
| | | top="8vh" |
| | | height="70%" |
| | | lock-scroll="false" |
| | | top="1vh" |
| | | center |
| | | > |
| | | <situation |
| | | :card="{ deptId: deptid, jurisdiction: jurisdiction }" |
| | |
| | | getinformationstatistics, //保安员考试情况统计 |
| | | getExamStatisInfo, //保安员考试情况统计 |
| | | getinformationselectDisp, //保安派遣情况 |
| | | getAgeStatistics, //保安员年龄分布情况 |
| | | getinformationselectSoil, //社保缴纳情况统计 |
| | | getEducationStatistics |
| | | } from "@/api/securityAnalysis/securityAnalysis"; |
| | |
| | | // }, |
| | | //后改,考试数据统计 |
| | | setEC3(data) { |
| | | //获取年份 |
| | | // let year = new Date().getFullYear(); |
| | | // var timeData = []; |
| | | // for (let index = 1; index < 13; index++) { |
| | | // timeData.push(year+"-"+ index ); |
| | | // } |
| | | const seriesdata = []; |
| | | data.forEach((item) => { |
| | | if (item.type == 1) { |
| | |
| | | }); |
| | | } |
| | | }); |
| | | var datetime = [ |
| | | "1月", |
| | | "2月", |
| | | "3月", |
| | | "4月", |
| | | "5月", |
| | | "6月", |
| | | "7月", |
| | | "8月", |
| | | "9月", |
| | | "10月", |
| | | "11月", |
| | | "12月", |
| | | ] |
| | | //echarts 图表数据 |
| | | var option = { |
| | | title: { |
| | |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: [ |
| | | "1月", |
| | | "2月", |
| | | "3月", |
| | | "4月", |
| | | "5月", |
| | | "6月", |
| | | "7月", |
| | | "8月", |
| | | "9月", |
| | | "10月", |
| | | "11月", |
| | | "12月", |
| | | ], |
| | | data: datetime |
| | | }, |
| | | ], |
| | | yAxis: [ |
| | |
| | | }, |
| | | series: [ |
| | | { |
| | | // data: dd, |
| | | data: data, |
| | | type: "bar", |
| | | }, |
| | |
| | | }, |
| | | getEC5() { |
| | | var that = this; |
| | | getinformationselectDisp(this.deptid, this.jurisdiction) |
| | | getAgeStatistics(this.deptid, this.jurisdiction) |
| | | .then((res) => { |
| | | var a = res.data.data; |
| | | // console.log(a, "111111"); |
| | | var b = that.changedata(a, "pnum", "wpnum", "已派遣", "未派遣"); |
| | | that.setEC5(b); |
| | | }) |
| | | .catch((res) => { |
| | | var b = that.changedata([], "pnum", "wpnum", "已派遣", "未派遣"); |
| | | that.setEC5(b); |
| | | var data = res.data.data; |
| | | var a = [ |
| | | { |
| | | value:data[0], |
| | | name:"18-30周岁" |
| | | }, |
| | | { |
| | | value:data[1], |
| | | name:"30-45周岁" |
| | | }, |
| | | { |
| | | value:data[2], |
| | | name:"45-60周岁" |
| | | }, |
| | | ] |
| | | console.log(a, "111111"); |
| | | this.setEC5(a); |
| | | }); |
| | | }, |
| | | setEC5(d) { |
| | | var option; |
| | | d = this.setColor(d, this.colors); |
| | | // d = this.setColor(d, this.colors); |
| | | option = { |
| | | title: { |
| | | text: "保安派遣情况统计", |
| | | text: "保安员年龄分布情况统计", |
| | | // subtext: "纯属虚构", |
| | | top: 25, |
| | | left: "center", |
| | |
| | | tooltip: { |
| | | trigger: "item", |
| | | }, |
| | | toolbox: this.gettoolbox("派遣情况查询", "保安员派遣情况明细", 5), |
| | | toolbox: this.gettoolbox("保安员年龄分布情况查询", "保安员年龄分布情况明细", 5), |
| | | legend: { |
| | | // orient: "vertical", |
| | | // left: "left", |
| | | x: "center", |
| | | y: "90%", |
| | | }, |
| | | series: [ |
| | | { |
| | | // name: "访问来源", |
| | | type: "pie", |
| | | radius: "50%", |
| | | // data: d, |
| | | data: d, |
| | | emphasis: { |
| | | itemStyle: { |
| | |
| | | }, |
| | | }, |
| | | label: { |
| | | // alignTo: "edge", |
| | | formatter: "{b}\n({d}%)", |
| | | }, |
| | | }, |
| | |
| | | // d = this.setColor(d, this.colors); |
| | | option = { |
| | | title: { |
| | | text: "保安员学历分布统计", |
| | | // subtext: "纯属虚构", |
| | | text: "保安员学历分布情况统计", |
| | | top: 25, |
| | | left: "center", |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | }, |
| | | toolbox: this.gettoolbox("社保缴纳查询", "保安员社保缴纳明细", 6), |
| | | toolbox: this.gettoolbox("保安员学历分布情况查询", "保安员学历分布情况明细", 6), |
| | | legend: { |
| | | // orient: "vertical", |
| | | // left: "left", |