| | |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item command="1">保安员审查情况统计</el-dropdown-item> |
| | | <el-dropdown-item command="2" |
| | | >企业登录预警情况统计</el-dropdown-item |
| | | > |
| | | <el-dropdown-item command="2">企业登录预警情况统计</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <!-- <div class="examinesBtnChouse"> |
| | |
| | | </div> --> |
| | | </div> |
| | | <div class="examines" v-show="showECH1"> |
| | | <img |
| | | src="http://60.220.177.113:2081/img/table.png" |
| | | alt="" |
| | | class="myToolbox" |
| | | @click="openMyToolBox('保安员审查情况明细', 1)" |
| | | /> |
| | | <img src="http://60.220.177.113:2081/img/table.png" alt="" class="myToolbox" |
| | | @click="openMyToolBox('保安员审查情况明细', 1)" /> |
| | | <div id="ech1" class="examinesin" ref="ech1">1</div> |
| | | </div> |
| | | <div class="examiness" v-show="!showECH1"> |
| | | <img |
| | | src="http://60.220.177.113:2081/img/table.png" |
| | | alt="" |
| | | class="myToolbox" |
| | | @click="openMyToolBox('企业登录情况明细', 7)" |
| | | /> |
| | | <img src="http://60.220.177.113:2081/img/table.png" alt="" class="myToolbox" |
| | | @click="openMyToolBox('企业登录情况明细', 7)" /> |
| | | <div id="ech1s" class="examinessin" ref="ech1s"></div> |
| | | </div> |
| | | <!-- 保安员审查情况统计 |
| | | <div>饼图</div> --> |
| | | <div class="certificate"> |
| | | <img |
| | | src="http://60.220.177.113:2081/img/table.png" |
| | | alt="" |
| | | class="myToolbox" |
| | | @click="openMyToolBox('保安员持证情况明细', 2)" |
| | | /> |
| | | <img src="http://60.220.177.113:2081/img/table.png" alt="" class="myToolbox" |
| | | @click="openMyToolBox('保安员持证情况明细', 2)" /> |
| | | <div class="certificatein" ref="ech2"> |
| | | <!-- 保安员持证情况统计 |
| | | <div>饼图</div> --> |
| | |
| | | </div> |
| | | <div class="securityAnalysiscenter"> |
| | | <div class="examination"> |
| | | <img |
| | | src="http://60.220.177.113:2081/img/table.png" |
| | | alt="" |
| | | class="myToolbox" |
| | | @click="openMyToolBox('保安员考试情况明细', 3)" |
| | | /> |
| | | <img src="http://60.220.177.113:2081/img/table.png" alt="" class="myToolbox" |
| | | @click="openMyToolBox('保安员考试情况明细', 3)" /> |
| | | <div class="examinationin" ref="ech3"> |
| | | <!-- 保安员考试情况统计 |
| | | <div>堆叠面积图</div> --> |
| | |
| | | </div> |
| | | |
| | | <div class="dispatchUnit"> |
| | | <img |
| | | src="http://60.220.177.113:2081/img/table.png" |
| | | alt="" |
| | | class="myToolbox" |
| | | @click="openMyToolBox('派遣服务单位明细', 4)" |
| | | /> |
| | | <img src="http://60.220.177.113:2081/img/table.png" alt="" class="myToolbox" |
| | | @click="openMyToolBox('派遣服务单位明细', 4)" /> |
| | | <div class="dispatchUnitin" ref="ech4"> |
| | | <!-- 派遣服务单位统计 |
| | | <div>柱状图</div> --> |
| | |
| | | </div> |
| | | <div class="securityAnalysisright"> |
| | | <div class="dispatchSecurity"> |
| | | <img |
| | | src="http://60.220.177.113:2081/img/table.png" |
| | | alt="" |
| | | class="myToolbox" |
| | | @click="openMyToolBox('保安员年龄分布情况明细', 5)" |
| | | /> |
| | | <img src="http://60.220.177.113:2081/img/table.png" alt="" class="myToolbox" |
| | | @click="openMyToolBox('保安员年龄分布情况明细', 5)" /> |
| | | <div class="dispatchSecurityin" ref="ech5"> |
| | | <!-- 保安员年龄分布情况统计 |
| | | <div>饼图</div> --> |
| | | </div> |
| | | </div> |
| | | <div class="socialSecurity"> |
| | | <img |
| | | src="http://60.220.177.113:2081/img/table.png" |
| | | alt="" |
| | | class="myToolbox" |
| | | @click="openMyToolBox('保安员学历分布情况明细', 6)" |
| | | /> |
| | | <img src="http://60.220.177.113:2081/img/table.png" alt="" class="myToolbox" |
| | | @click="openMyToolBox('保安员学历分布情况明细', 6)" /> |
| | | <div class="socialSecurityin" ref="ech6"> |
| | | <!-- 社保缴纳情况统计 |
| | | <div>饼图</div> --> |
| | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-dialog |
| | | width="80%" |
| | | :title="titles" |
| | | append-to-body |
| | | :visible.sync="dialogVisible" |
| | | lock-scroll="false" |
| | | top="1vh" |
| | | center |
| | | > |
| | | <situation |
| | | :card="{ deptId: deptid, jurisdiction: jurisdiction }" |
| | | v-if="sees == 1" |
| | | > |
| | | <el-dialog width="80%" :title="titles" append-to-body :visible.sync="dialogVisible" lock-scroll="false" |
| | | top="1vh" center> |
| | | <situation :card="{ deptId: deptid, jurisdiction: jurisdiction }" v-if="sees == 1"> |
| | | <!-- 保安员审查情况统计 --> |
| | | </situation> |
| | | |
| | |
| | | <!-- 保安员审查情况统计 --> |
| | | </loginRecord> |
| | | |
| | | <certificate |
| | | :card="{ deptId: deptid, jurisdiction: jurisdiction }" |
| | | v-if="sees == 2" |
| | | > |
| | | <certificate :card="{ deptId: deptid, jurisdiction: jurisdiction }" v-if="sees == 2"> |
| | | <!-- 保安员持证情况统计 --> |
| | | </certificate> |
| | | <examination |
| | | :card="{ deptid: deptid, jurisdiction: jurisdiction }" |
| | | v-if="sees == 3" |
| | | > |
| | | <examination :card="{ deptid: deptid, jurisdiction: jurisdiction }" v-if="sees == 3"> |
| | | <!-- 保安员考试情况统计 --> |
| | | </examination> |
| | | <dispatch |
| | | :card="{ deptId: deptid, jurisdiction: jurisdiction }" |
| | | v-if="sees == 4" |
| | | > |
| | | <dispatch :card="{ deptId: deptid, jurisdiction: jurisdiction }" v-if="sees == 4"> |
| | | <!-- 派遣服务单位 注意deptId I为大写 --> |
| | | </dispatch> |
| | | <assignment |
| | | :card="{ deptid: deptid, jurisdiction: jurisdiction }" |
| | | v-if="sees == 5" |
| | | > |
| | | <assignment :card="{ deptid: deptid, jurisdiction: jurisdiction }" v-if="sees == 5"> |
| | | <!-- 保安派遣情况 --> |
| | | </assignment> |
| | | <socialSecurity |
| | | :card="{ deptid: deptid, jurisdiction: jurisdiction }" |
| | | :reself="dialogVisible" |
| | | v-if="sees == 6" |
| | | > |
| | | <socialSecurity :card="{ deptid: deptid, jurisdiction: jurisdiction }" :reself="dialogVisible" |
| | | v-if="sees == 6"> |
| | | <!-- 社保缴纳情况 --> |
| | | </socialSecurity> |
| | | </el-dialog> |
| | |
| | | getAgeStatistics, //保安员年龄分布情况 |
| | | getinformationselectSoil, //社保缴纳情况统计 |
| | | getEducationStatistics, |
| | | getLoginDataStatistics |
| | | } from "@/api/securityAnalysis/securityAnalysis"; |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | import certificate from "./child/certificate.vue"; |
| | | import examination from "./child/examination.vue"; |
| | | import situation from "./child/situation.vue"; |
| | | import loginRecord from "./child/loginRecord.vue"; |
| | | import dispatch from "./child/dispatch.vue"; |
| | | import assignment from "./child/assignment.vue"; |
| | | import socialSecurity from "./child/socialSecurity.vue"; |
| | | getLoginDataStatistics, |
| | | getPQStatistics//派遣服务单位统计修改 |
| | | } from "@/api/securityAnalysis/securityAnalysis" |
| | | import { mapGetters } from "vuex" |
| | | import { mapState } from "vuex" |
| | | import { getRoleDetail } from "@/api/system/role" |
| | | import certificate from "./child/certificate.vue" |
| | | import examination from "./child/examination.vue" |
| | | import situation from "./child/situation.vue" |
| | | import loginRecord from "./child/loginRecord.vue" |
| | | import dispatch from "./child/dispatch.vue" |
| | | import assignment from "./child/assignment.vue" |
| | | import socialSecurity from "./child/socialSecurity.vue" |
| | | export default { |
| | | components: { |
| | | certificate, |
| | |
| | | showECH1: true, //显示保安员审查情况统计或企业登录预警情况统计 |
| | | changeSizeTime: null, |
| | | examinesBtnChousetext: "保安员审查情况统计" |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState({ |
| | |
| | | }), |
| | | ...mapGetters(["windowWidth", "windowHeight"]), |
| | | ids1() { |
| | | let ids1 = []; |
| | | let ids1 = [] |
| | | this.selectionList1.forEach(ele => { |
| | | ids1.push(ele.id); |
| | | }); |
| | | return ids1.join(","); |
| | | ids1.push(ele.id) |
| | | }) |
| | | return ids1.join(",") |
| | | }, |
| | | ids2() { |
| | | let ids2 = []; |
| | | let ids2 = [] |
| | | this.selectionList2.forEach(ele => { |
| | | ids2.push(ele.id); |
| | | }); |
| | | return ids2.join(","); |
| | | ids2.push(ele.id) |
| | | }) |
| | | return ids2.join(",") |
| | | } |
| | | }, |
| | | watch: { |
| | | dialogVisible() { |
| | | if (this.dialogVisible == false && this.sees == "1") { |
| | | this.getEC1(this.tabPosition); |
| | | this.getEC1(this.tabPosition) |
| | | } |
| | | if (this.dialogVisible == false && this.sees == "2") { |
| | | this.getEC2(); |
| | | this.getEC2() |
| | | } |
| | | if (this.dialogVisible == false && this.sees == "3") { |
| | | this.getEC3(); |
| | | this.getEC3() |
| | | } |
| | | if (this.dialogVisible == false && this.sees == "4") { |
| | | this.getEC4(); |
| | | this.getEC4() |
| | | } |
| | | if (this.dialogVisible == false && this.sees == "5") { |
| | | this.getEC5(); |
| | | this.getEC5() |
| | | } |
| | | if (this.dialogVisible == false && this.sees == "6") { |
| | | this.getEC6(); |
| | | this.getEC6() |
| | | } |
| | | }, |
| | | windowWidth() { |
| | | let that = this; |
| | | let that = this |
| | | if (that.changeSizeTime) { |
| | | return; |
| | | return |
| | | } else { |
| | | that.changeSizeTime = setTimeout(() => { |
| | | that.changeSize(); |
| | | clearTimeout(that.changeSizeTime); |
| | | that.changeSizeTime = null; |
| | | }, 600); |
| | | that.changeSize() |
| | | clearTimeout(that.changeSizeTime) |
| | | that.changeSizeTime = null |
| | | }, 600) |
| | | } |
| | | }, |
| | | windowHeight() { |
| | | let that = this; |
| | | let that = this |
| | | if (that.changeSizeTime) { |
| | | return; |
| | | return |
| | | } else { |
| | | that.changeSizeTime = setTimeout(() => { |
| | | that.changeSize(); |
| | | clearTimeout(that.changeSizeTime); |
| | | that.changeSizeTime = null; |
| | | }, 600); |
| | | that.changeSize() |
| | | clearTimeout(that.changeSizeTime) |
| | | that.changeSizeTime = null |
| | | }, 600) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | //更新图表尺寸 |
| | | changeSize() { |
| | | console.log("更新图表尺寸"); |
| | | this.EC1.resize(); |
| | | this.EC1s.resize(); |
| | | this.EC2.resize(); |
| | | this.EC3.resize(); |
| | | this.EC4.resize(); |
| | | this.EC5.resize(); |
| | | this.EC6.resize(); |
| | | console.log("更新图表尺寸") |
| | | this.EC1.resize() |
| | | this.EC1s.resize() |
| | | this.EC2.resize() |
| | | this.EC3.resize() |
| | | this.EC4.resize() |
| | | this.EC5.resize() |
| | | this.EC6.resize() |
| | | }, |
| | | //tab 切换 |
| | | handleClick(val) { |
| | |
| | | // return; |
| | | // } |
| | | if (val == 1) { |
| | | this.showECH1 = true; |
| | | this.examinesBtnChousetext = "保安员审查情况统计"; |
| | | this.showECH1 = true |
| | | this.examinesBtnChousetext = "保安员审查情况统计" |
| | | } else { |
| | | this.showECH1 = false; |
| | | this.examinesBtnChousetext = "企业登录预警情况统计"; |
| | | this.showECH1 = false |
| | | this.examinesBtnChousetext = "企业登录预警情况统计" |
| | | } |
| | | this.tabPosition = val; |
| | | this.getEC1(val); |
| | | this.tabPosition = val |
| | | this.getEC1(val) |
| | | }, |
| | | creatOurEcharts() { |
| | | // return; |
| | | this.EC1 = echarts.init(this.$refs.ech1); |
| | | this.EC1s = echarts.init(this.$refs.ech1s); |
| | | this.EC2 = echarts.init(this.$refs.ech2); |
| | | this.EC3 = echarts.init(this.$refs.ech3); |
| | | this.EC4 = echarts.init(this.$refs.ech4); |
| | | this.EC5 = echarts.init(this.$refs.ech5); |
| | | this.EC6 = echarts.init(this.$refs.ech6); |
| | | this.biginOUREC(); |
| | | this.EC1 = echarts.init(this.$refs.ech1) |
| | | this.EC1s = echarts.init(this.$refs.ech1s) |
| | | this.EC2 = echarts.init(this.$refs.ech2) |
| | | this.EC3 = echarts.init(this.$refs.ech3) |
| | | this.EC4 = echarts.init(this.$refs.ech4) |
| | | this.EC5 = echarts.init(this.$refs.ech5) |
| | | this.EC6 = echarts.init(this.$refs.ech6) |
| | | this.biginOUREC() |
| | | }, |
| | | changedata(a, ok, no, okmsg, nomsg) { |
| | | var d = []; |
| | | var d = [] |
| | | if (a.length != 0) { |
| | | var yes = 0, |
| | | not = 0; |
| | | not = 0 |
| | | for (var k in a) { |
| | | yes += a[k][ok]; |
| | | not += a[k][no]; |
| | | yes += a[k][ok] |
| | | not += a[k][no] |
| | | } |
| | | d = [ |
| | | { |
| | |
| | | value: not, |
| | | name: nomsg |
| | | } |
| | | ]; |
| | | ] |
| | | } else { |
| | | d = [ |
| | | { |
| | |
| | | value: 0, |
| | | name: nomsg |
| | | } |
| | | ]; |
| | | ] |
| | | } |
| | | // console.log(d, ok, no); |
| | | return d; |
| | | return d |
| | | }, |
| | | getTime() { |
| | | var data = new Date(); |
| | | var time = data.toLocaleString().slice(0, 9); |
| | | return time; |
| | | var data = new Date() |
| | | var time = data.toLocaleString().slice(0, 9) |
| | | return time |
| | | }, |
| | | GetPercent(num, total) { |
| | | num = parseFloat(num); |
| | | total = parseFloat(total); |
| | | num = parseFloat(num) |
| | | total = parseFloat(total) |
| | | if (isNaN(num) || isNaN(total)) { |
| | | return "-"; |
| | | return "-" |
| | | } |
| | | return total <= 0 |
| | | ? "0%" |
| | | : Math.round((num / total) * 10000) / 100.0 + "%"; |
| | | : Math.round((num / total) * 10000) / 100.0 + "%" |
| | | }, |
| | | openMyToolBox(titles, id) { |
| | | var that = this; |
| | | that.dialogVisible = true; |
| | | that.sees = id; |
| | | that.titles = titles; |
| | | var that = this |
| | | that.dialogVisible = true |
| | | that.sees = id |
| | | that.titles = titles |
| | | }, |
| | | gettoolbox(title, titles, id) { |
| | | //由于在1366,,768分辨率下,会被覆盖掉不能点击,所以放弃 |
| | | return; |
| | | var that = this; |
| | | return { |
| | | show: false, |
| | | itemSize: 25, |
| | | top: 5, |
| | | right: 15, |
| | | feature: { |
| | | myTool1: { |
| | | show: true, |
| | | zlevel: 999, |
| | | z: 999, |
| | | title: "点击查看详情", |
| | | icon: "image://http://60.220.177.113:2081/img/table.png", |
| | | onclick: function() { |
| | | that.dialogVisible = true; |
| | | that.sees = id; |
| | | that.titles = titles; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | return |
| | | }, |
| | | setColor(d, color) { |
| | | for (var k in d) { |
| | | var itemStyle = { |
| | | color: color[k] |
| | | }; |
| | | d[k]["itemStyle"] = itemStyle; |
| | | } |
| | | console.log(d); |
| | | return d; |
| | | d[k]["itemStyle"] = itemStyle |
| | | } |
| | | return d |
| | | }, |
| | | getEC1(tab) { |
| | | var that = this; |
| | | var that = this |
| | | if (tab == 1) { |
| | | getinformationselectExtype(this.deptid, this.jurisdiction) |
| | | .then(res => { |
| | | var a = res.data.data; |
| | | var b = that.changedata(a, "zc", "bzc", "情况正常", "情况异常"); |
| | | that.setEC1(b); |
| | | that.EC1.resize(); |
| | | var a = res.data.data |
| | | var b = that.changedata(a, "zc", "bzc", "情况正常", "情况异常") |
| | | that.setEC1(b) |
| | | that.EC1.resize() |
| | | }) |
| | | .catch(res => { |
| | | var b = that.changedata([], "zc", "bzc", "情况正常", "情况异常"); |
| | | that.setEC1(b); |
| | | that.EC1.resize(); |
| | | }); |
| | | var b = that.changedata([], "zc", "bzc", "情况正常", "情况异常") |
| | | that.setEC1(b) |
| | | that.EC1.resize() |
| | | }) |
| | | } |
| | | if (tab == 2) { |
| | | getLoginDataStatistics(this.jurisdiction).then(res => { |
| | | var b = res.data.data; |
| | | var b = res.data.data |
| | | var data = [ |
| | | { |
| | | value: b[0], |
| | |
| | | value: b[1], |
| | | name: "近14天未登录企业数" |
| | | } |
| | | ]; |
| | | that.setEC1s(data); |
| | | that.EC1s.resize(); |
| | | }); |
| | | ] |
| | | that.setEC1s(data) |
| | | that.EC1s.resize() |
| | | }) |
| | | } |
| | | }, |
| | | setEC1(d) { |
| | |
| | | title: "问题保安员比例:", |
| | | value: this.GetPercent(+d[1].value, +d[0].value + +d[1].value) |
| | | } |
| | | ]; |
| | | var option, data; |
| | | data = this.setColor(d, this.colors); |
| | | ] |
| | | var option, data |
| | | data = this.setColor(d, this.colors) |
| | | option = { |
| | | title: { |
| | | text: this.examinetionTitle, |
| | |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | } |
| | | |
| | | this.EC1.setOption(option); |
| | | this.EC1.setOption(option) |
| | | }, |
| | | //登录情况统计 |
| | | setEC1s(d) { |
| | | var option, data; |
| | | data = this.setColor(d, this.colors); |
| | | var option, data |
| | | data = this.setColor(d, this.colors) |
| | | option = { |
| | | title: { |
| | | text: "", |
| | |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | this.EC1s.setOption(option); |
| | | } |
| | | this.EC1s.setOption(option) |
| | | }, |
| | | getEC2() { |
| | | var that = this; |
| | | var that = this |
| | | getinformationselectHold(this.deptid, this.jurisdiction) |
| | | .then(res => { |
| | | var a = res.data.data; |
| | | var b = that.changedata(a, "cz", "wcz", "持证", "未持证"); |
| | | that.setEC2(b); |
| | | var a = res.data.data |
| | | var b = that.changedata(a, "cz", "wcz", "持证", "未持证") |
| | | that.setEC2(b) |
| | | }) |
| | | .catch(res => { |
| | | var b = that.changedata([], "cz", "wcz", "持证", "未持证"); |
| | | that.setEC2(b); |
| | | }); |
| | | var b = that.changedata([], "cz", "wcz", "持证", "未持证") |
| | | that.setEC2(b) |
| | | }) |
| | | }, |
| | | setEC2(data) { |
| | | var option; |
| | | var that = this; |
| | | data = this.setColor(data, this.colors); |
| | | // console.log(data, "持证"); |
| | | var option |
| | | var that = this |
| | | data = this.setColor(data, this.colors) |
| | | option = { |
| | | title: { |
| | | text: "保安员持证情况统计", |
| | |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | } |
| | | |
| | | this.EC2.setOption(option); |
| | | this.EC2.setOption(option) |
| | | }, |
| | | getEC3() { |
| | | getExamStatisInfo(this.deptid, this.jurisdiction).then(res => { |
| | | this.setEC3(res.data.data); |
| | | }); |
| | | this.setEC3(res.data.data) |
| | | }) |
| | | }, |
| | | //考试数据统计 |
| | | setEC3(data) { |
| | | //获取年份 |
| | | const seriesdata = []; |
| | | const seriesdata = [] |
| | | data.forEach(item => { |
| | | if (item.type == 1) { |
| | | seriesdata.push({ |
| | |
| | | focus: "series" |
| | | }, |
| | | data: item.examSocreStatis |
| | | }); |
| | | }) |
| | | } |
| | | if (item.type == 2) { |
| | | seriesdata.push({ |
| | |
| | | focus: "series" |
| | | }, |
| | | data: item.examSocreStatis |
| | | }); |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | var datetime = [ |
| | | "1月", |
| | | "2月", |
| | |
| | | "10月", |
| | | "11月", |
| | | "12月" |
| | | ]; |
| | | ] |
| | | //echarts 图表数据 |
| | | var option = { |
| | | title: { |
| | |
| | | } |
| | | ], |
| | | series: seriesdata |
| | | }; |
| | | } |
| | | |
| | | this.EC3.setOption(option); |
| | | this.EC3.setOption(option) |
| | | }, |
| | | getEC4() { |
| | | var date = new Date(); |
| | | var nowYear = date.getFullYear(); |
| | | var that = this; |
| | | getinformationselectDis(this.deptid, this.jurisdiction).then(res => { |
| | | var a = res.data, |
| | | d = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
| | | |
| | | var setNum = (start, end, i) => { |
| | | // console.log(start, end, i); |
| | | for (let a = +start - 1; a < +end; a++) { |
| | | ++d[a]; |
| | | } |
| | | }; |
| | | for (var k = 0; k < a.length; k++) { |
| | | var overYear = a[k].end_time.slice(0, 4); |
| | | var overMout = a[k].end_time.slice(5, 7); |
| | | var bigYear = a[k].start_time.slice(0, 4); |
| | | var bigMout = a[k].start_time.slice(5, 7); |
| | | if (overYear > nowYear) { |
| | | if (bigYear < nowYear) { |
| | | setNum(1, 12, k); |
| | | } else if (bigYear == nowYear) { |
| | | setNum(+bigMout, 12, k); |
| | | } |
| | | } else if (overYear == nowYear) { |
| | | if (bigYear < nowYear) { |
| | | setNum(1, +overMout, k); |
| | | } else if (bigYear == nowYear) { |
| | | setNum(+bigMout, +overMout, k); |
| | | let params = {} |
| | | if (this.userInfo.role_name.split(",").indexOf("admin") == -1 && this.userInfo.role_name.split(",").indexOf("administrator") == -1) { |
| | | params = { |
| | | deptId: this.userInfo.dept_id |
| | | } |
| | | } |
| | | } |
| | | that.setEC4(d); |
| | | }); |
| | | getPQStatistics(params).then(res => { |
| | | this.setEC4(res.data.data) |
| | | }) |
| | | }, |
| | | setEC4(data) { |
| | | var xxd = [ |
| | | "1月", |
| | | "2月", |
| | | "3月", |
| | | "4月", |
| | | "5月", |
| | | "6月", |
| | | "7月", |
| | | "8月", |
| | | "9月", |
| | | "10月", |
| | | "11月", |
| | | "12月" |
| | | ]; |
| | | var date = new Date(); |
| | | var d = date.getFullYear(); |
| | | // console.log(d); |
| | | setEC4 (chartData) { |
| | | let data1 = [] |
| | | let data2 = [] |
| | | let categories = [] |
| | | if (chartData.length == 0) {//没数据也展示xy轴 |
| | | data1 = [{ value: 0 }] |
| | | data2 = [{ value: 0 }] |
| | | categories = [''] |
| | | } |
| | | chartData.forEach(item => { |
| | | data1.push({ value: item.holdNum == -1 ? 0 : item.holdNum, deptId: item.deptId, type: '持证', companyName: item.unitName }) |
| | | data2.push({ value: item.unHoldNum == -1 ? 0 : item.unHoldNum, deptId: item.deptId, type: '未持证', companyName: item.unitName }) |
| | | categories.push(item.unitName) |
| | | }) |
| | | var option = { |
| | | title: { |
| | | text: "派遣服务单位统计", |
| | | top: 20, |
| | | left: "center" |
| | | }, |
| | | legend: { |
| | | data: ["持证", "未持证"], |
| | | textStyle: { |
| | | // color: "white" // 更改图例文本颜色 |
| | | }, |
| | | top: 20, |
| | | right: 100 |
| | | }, |
| | | grid: { |
| | | left: "10%", // 设置图表左边距 |
| | | top: "15%", |
| | | bottom: "15%", |
| | | }, |
| | | xAxis: { |
| | | type: "category", |
| | | data: xxd |
| | | // data: xd, |
| | | data: categories, |
| | | axisLabel: { |
| | | // rotate: 45,//x轴标签倾斜 |
| | | textStyle: { |
| | | // color: "#ffffff", // 设置x轴标签字体颜色 |
| | | fontSize: 12 |
| | | } |
| | | } |
| | | }, |
| | | // toolbox: this.gettoolbox("派遣单位查询", "派遣服务单位明细", 4), |
| | | yAxis: { |
| | | type: "value" |
| | | axisLabel: { |
| | | // textStyle: { |
| | | // color: "#ffffff" // 设置y轴标签字体颜色 |
| | | // } |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | formatter: d + "年{b} : {c} 个" |
| | | minInterval: 1, |
| | | }, |
| | | series: [ |
| | | { |
| | | data: data, |
| | | type: "bar" |
| | | name: "持证", |
| | | type: "bar", |
| | | data: data1, |
| | | barMaxWidth: 50, |
| | | itemStyle: { |
| | | color: "#29c093" |
| | | } |
| | | }, |
| | | { |
| | | name: "未持证", |
| | | type: "bar", |
| | | data: data2, |
| | | barMaxWidth: 50, |
| | | itemStyle: { |
| | | color: "#f34a4a" |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | this.EC4.setOption(option); |
| | | } |
| | | this.EC4.setOption(option) |
| | | }, |
| | | getEC5() { |
| | | var that = this; |
| | | var that = this |
| | | getAgeStatistics(this.deptid, this.jurisdiction).then(res => { |
| | | var data = res.data.data; |
| | | var data = res.data.data |
| | | var a = [ |
| | | { |
| | | value: data[0], |
| | |
| | | value: data[2], |
| | | name: "45-60周岁" |
| | | } |
| | | ]; |
| | | console.log(a, "111111"); |
| | | this.setEC5(a); |
| | | }); |
| | | ] |
| | | this.setEC5(a) |
| | | }) |
| | | }, |
| | | setEC5(d) { |
| | | var option; |
| | | var option |
| | | // d = this.setColor(d, this.colors); |
| | | option = { |
| | | title: { |
| | |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | } |
| | | |
| | | this.EC5.setOption(option); |
| | | this.EC5.setOption(option) |
| | | }, |
| | | getEC6() { |
| | | var that = this; |
| | | var that = this |
| | | getEducationStatistics(this.deptid, this.jurisdiction).then(res => { |
| | | var a = res.data.data; |
| | | that.setEC6(a); |
| | | }); |
| | | var a = res.data.data |
| | | that.setEC6(a) |
| | | }) |
| | | }, |
| | | setEC6(d) { |
| | | var option; |
| | | var option |
| | | // d = this.setColor(d, this.colors); |
| | | option = { |
| | | title: { |
| | |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | } |
| | | |
| | | this.EC6.setOption(option); |
| | | this.EC6.setOption(option) |
| | | }, |
| | | biginOUREC() { |
| | | this.getEC1(1); |
| | | this.getEC2(); |
| | | this.getEC3(); |
| | | this.getEC4(); |
| | | this.getEC5(); |
| | | this.getEC6(); |
| | | this.getEC1(1) |
| | | this.getEC2() |
| | | this.getEC3() |
| | | this.getEC4() |
| | | this.getEC5() |
| | | this.getEC6() |
| | | // this.setEC1(); |
| | | // this.setEC2(); |
| | | // this.setEC3(); |
| | |
| | | this.userInfo.role_name == "保安公司管理员" || |
| | | this.userInfo.role_name == "分公司管理员" |
| | | ) { |
| | | this.examinetionTitle = "保安员审查情况统计"; |
| | | this.examineBtnVisiable = false; |
| | | this.examinetionTitle = "保安员审查情况统计" |
| | | this.examineBtnVisiable = false |
| | | } else { |
| | | this.examinetionTitle = ""; |
| | | this.examinetionTitle = "" |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | var roleIds = this.userInfo.role_id.split(",") |
| | | roleIds.forEach(roleId => { |
| | | getRoleDetail(roleId).then(res => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | var roleName = res.data.data.roleName; |
| | | var roleAlias = res.data.data.roleAlias |
| | | var roleName = res.data.data.roleName |
| | | if (roleName != "保安公司管理员" && roleName != "分公司管理员") { |
| | | this.deptid = ""; |
| | | this.jurisdiction = this.userInfo.jurisdiction; |
| | | this.deptid = "" |
| | | this.jurisdiction = this.userInfo.jurisdiction |
| | | } else { |
| | | this.deptid = this.userInfo.dept_id; |
| | | this.jurisdiction = ""; |
| | | this.deptid = this.userInfo.dept_id |
| | | this.jurisdiction = "" |
| | | } |
| | | this.creatOurEcharts(); |
| | | }); |
| | | }); |
| | | }); |
| | | this.creatOurEcharts() |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | $widths: 20%; |
| | | |
| | | .securityAnalysis { |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | |
| | | justify-content: space-around; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .securityAnalysiscenter { |
| | | width: 40% !important; |
| | | } |
| | | |
| | | .examination, |
| | | .dispatchUnit, |
| | | .dispatchSecurity, |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | background-color: #fff; |
| | | |
| | | .examinesBtnChouse { |
| | | background-color: #409eff; |
| | | padding: 5px 10px; |
| | |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | .examines, |
| | | .examiness { |
| | | width: 100%; |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .myToolbox { |
| | | position: absolute; |
| | | top: 14px; |
| | |
| | | height: 25px; |
| | | cursor: pointer; |
| | | z-index: 1000; |
| | | &:hover { |
| | | } |
| | | |
| | | &:hover {} |
| | | } |
| | | } |
| | | </style> |