From e5ae0a43269d71508329d62de4a613e55b00be5b Mon Sep 17 00:00:00 2001 From: loveflow <5269966+loveflow@user.noreply.gitee.com> Date: Sun, 31 Mar 2024 23:16:01 +0800 Subject: [PATCH] update --- src/api/enterpriseRiskIndex/abnormal/index.js | 71 +++ src/api/enterpriseRiskIndex/estimate/index.js | 9 + .../enterpriseRiskIndex/synthetical/index.js | 43 ++ src/api/enterpriseTopic/antiAttack/index.js | 9 + .../enterpriseTopic/dangerTransport/index.js | 9 + src/api/enterpriseTopic/fireSafety/index.js | 9 + src/api/enterpriseTopic/inSecurity/index.js | 9 + src/api/enterpriseTopic/index.js | 99 ++++ src/api/enterpriseTopic/listGoods/index.js | 9 + src/api/enterpriseTopic/netSafety/index.js | 9 + src/api/enterpriseTopic/personSafety/index.js | 9 + src/api/enterpriseTopic/roadSafety/index.js | 9 + src/loveflow/components/echart/radar/four.vue | 6 +- src/loveflow/mixins/tableListMixins.js | 217 +-------- src/views/enterpriseRiskIndex/abnormal.vue | 441 +++++++++--------- src/views/enterpriseRiskIndex/analysis.vue | 98 ++-- .../components/tableCard.vue | 2 +- src/views/enterpriseRiskIndex/estimate.vue | 28 +- src/views/enterpriseRiskIndex/synthetical.vue | 189 ++++---- .../enterpriseTopic/components/dPieOne.vue | 30 +- .../enterpriseTopic/components/dPieTwo.vue | 45 +- .../enterpriseTopic/components/pieFive.vue | 2 +- .../enterpriseTopic/components/pieFour.vue | 6 +- .../enterpriseTopic/components/pieOne.vue | 6 +- .../enterpriseTopic/components/pieThree.vue | 5 +- .../enterpriseTopic/components/pieTwo.vue | 5 +- .../components/tableCustom.vue | 21 +- src/views/enterpriseTopic/screen.vue | 438 ++++++++++++----- 28 files changed, 1072 insertions(+), 761 deletions(-) create mode 100644 src/api/enterpriseRiskIndex/abnormal/index.js create mode 100644 src/api/enterpriseRiskIndex/estimate/index.js create mode 100644 src/api/enterpriseRiskIndex/synthetical/index.js create mode 100644 src/api/enterpriseTopic/antiAttack/index.js create mode 100644 src/api/enterpriseTopic/dangerTransport/index.js create mode 100644 src/api/enterpriseTopic/fireSafety/index.js create mode 100644 src/api/enterpriseTopic/inSecurity/index.js create mode 100644 src/api/enterpriseTopic/index.js create mode 100644 src/api/enterpriseTopic/listGoods/index.js create mode 100644 src/api/enterpriseTopic/netSafety/index.js create mode 100644 src/api/enterpriseTopic/personSafety/index.js create mode 100644 src/api/enterpriseTopic/roadSafety/index.js diff --git a/src/api/enterpriseRiskIndex/abnormal/index.js b/src/api/enterpriseRiskIndex/abnormal/index.js new file mode 100644 index 0000000..552304e --- /dev/null +++ b/src/api/enterpriseRiskIndex/abnormal/index.js @@ -0,0 +1,71 @@ +import request from "@/utils/request"; +//企业风险项趋势分析图 +export function enterpriseComprehensiveRisk() { + return request({ + url: "/AnomalyChart/EnterpriseComprehensiveRisk", + method: "post", + }); +} +//流口人员管理异常 +export function abnormalFloatingPopulation() { + return request({ + url: "/AnomalyChart/AbnormalFloatingPopulation", + method: "post", + }); +} +//人员背景审核异常分析 +export function personnelBackground() { + return request({ + url: "/AnomalyChart/PersonnelBackground", + method: "post", + }); +} +//重点岗位资质核查异常分析 +export function keyPosition() { + return request({ + url: "/AnomalyChart/keyPosition", + method: "post", + }); +} +//人员涉警(案)情况异常分析 +export function policeInvolvement() { + return request({ + url: "/AnomalyChart/PoliceInvolvement", + method: "post", + }); +} +//装卸量差异分析 +export function zXDifference() { + return request({ + url: "/AnomalyChart/ZXDifference", + method: "post", + }); +} +//运输车辆背景异常分析 +export function transportVehicleBj() { + return request({ + url: "/AnomalyChart/TransportVehicleBj", + method: "post", + }); +} +//运输车辆异常预警 +export function transportVehicleAnomaly() { + return request({ + url: "/AnomalyChart/TransportVehicleAnomaly", + method: "post", + }); +} +//驾驶员押运员资质异常分析 +export function transportVehicle() { + return request({ + url: "/AnomalyChart/TransportVehicle", + method: "post", + }); +} +//单位检查情况异常分析 +export function unitInspection() { + return request({ + url: "/AnomalyChart/UnitInspection", + method: "post", + }); +} diff --git a/src/api/enterpriseRiskIndex/estimate/index.js b/src/api/enterpriseRiskIndex/estimate/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseRiskIndex/estimate/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/api/enterpriseRiskIndex/synthetical/index.js b/src/api/enterpriseRiskIndex/synthetical/index.js new file mode 100644 index 0000000..969e1c8 --- /dev/null +++ b/src/api/enterpriseRiskIndex/synthetical/index.js @@ -0,0 +1,43 @@ +import request from "@/utils/request"; +//企业综合风险雷达图 +export function enterpriseComprehensiveRisk() { + return request({ + url: "/IntegratedRisk/EnterpriseComprehensiveRisk", + method: "post", + }); +} +//企业综合风险趋势图 +export function tendencyChart() { + return request({ + url: "/IntegratedRisk/TendencyChart", + method: "post", + }); +} +//高风险企业增长趋势分析 +export function ventureBusiness() { + return request({ + url: "/IntegratedRisk/VentureBusiness", + method: "post", + }); +} +//全区企业风险预警总量 +export function riskEarlyWarning() { + return request({ + url: "/IntegratedRisk/RiskEarlyWarning", + method: "post", + }); +} +//全区企业风险标签数量变化趋势 +export function variationTrend() { + return request({ + url: "/IntegratedRisk/VariationTrend", + method: "post", + }); +} +//全区企业风险标签增长趋势 +export function growthTrend() { + return request({ + url: "/IntegratedRisk/GrowthTrend", + method: "post", + }); +} diff --git a/src/api/enterpriseTopic/antiAttack/index.js b/src/api/enterpriseTopic/antiAttack/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseTopic/antiAttack/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/api/enterpriseTopic/dangerTransport/index.js b/src/api/enterpriseTopic/dangerTransport/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseTopic/dangerTransport/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/api/enterpriseTopic/fireSafety/index.js b/src/api/enterpriseTopic/fireSafety/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseTopic/fireSafety/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/api/enterpriseTopic/inSecurity/index.js b/src/api/enterpriseTopic/inSecurity/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseTopic/inSecurity/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/api/enterpriseTopic/index.js b/src/api/enterpriseTopic/index.js new file mode 100644 index 0000000..432b751 --- /dev/null +++ b/src/api/enterpriseTopic/index.js @@ -0,0 +1,99 @@ +import request from "@/utils/request"; +//车辆的违规信息统计 +export function vehicleDetail() { + return request({ + url: "/special/vehicleDetail", + method: "post", + }); +} +//网络安全评估 +export function cybersecurityrisk() { + return request({ + url: "/special/cybersecurityrisk", + method: "get", + }); +} +//车辆违规数 +export function dangerousnum() { + return request({ + url: "/special/dangerousnum", + method: "get", + }); +} +//运输安全 +export function dangerousrun() { + return request({ + url: "/special/dangerousrun", + method: "get", + }); +} +//防攻击管理 +export function defenserisk() { + return request({ + url: "/special/defenserisk", + method: "get", + }); +} +//消防事件发生 +export function firefighting() { + return request({ + url: "/special/firefighting", + method: "get", + }); +} +//消防制度执行 +export function firefightinggo() { + return request({ + url: "/special/firefightinggo", + method: "get", + }); +} +//消防设施数据 +export function firefightinggoods() { + return request({ + url: "/special/firefightinggoods", + method: "get", + }); +} +//民用枪支 +export function gun() { + return request({ + url: "/special/gun", + method: "get", + }); +} +//企业台账 +export function ledger() { + return request({ + url: "/special/ledger", + method: "get", + }); +} +//单位内部管理 +export function peacemanage() { + return request({ + url: "/special/peacemanage", + method: "get", + }); +} +//人员安全风险评估 +export function personnelrisk() { + return request({ + url: "/special/personnelrisk", + method: "get", + }); +} +//放射源物品 +export function radiationmanage() { + return request({ + url: "/special/radiationmanage", + method: "get", + }); +} +//道路安全管理 +export function roadmanage() { + return request({ + url: "/special/roadmanage", + method: "get", + }); +} diff --git a/src/api/enterpriseTopic/listGoods/index.js b/src/api/enterpriseTopic/listGoods/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseTopic/listGoods/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/api/enterpriseTopic/netSafety/index.js b/src/api/enterpriseTopic/netSafety/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseTopic/netSafety/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/api/enterpriseTopic/personSafety/index.js b/src/api/enterpriseTopic/personSafety/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseTopic/personSafety/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/api/enterpriseTopic/roadSafety/index.js b/src/api/enterpriseTopic/roadSafety/index.js new file mode 100644 index 0000000..5b579a1 --- /dev/null +++ b/src/api/enterpriseTopic/roadSafety/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +//专题评估报告详情查询接口 +export function queryListDetails(params) { + return request({ + url: "/ThematicEvaluationController/QueryListDetails", + method: "post", + params, + }); +} diff --git a/src/loveflow/components/echart/radar/four.vue b/src/loveflow/components/echart/radar/four.vue index f8689f4..255cc75 100644 --- a/src/loveflow/components/echart/radar/four.vue +++ b/src/loveflow/components/echart/radar/four.vue @@ -33,7 +33,7 @@ export default { }, radar: { center: ["50%", "50%"], // 外圆的位置 - radius: "45%", + radius: "40%", name: { textStyle: { color: "#D0DEEE", @@ -80,8 +80,8 @@ export default { data: [ { - value: [80, 80, 80, 80, 80, 80, 80, 80], - name: "车辆违规数", + value: this.chartObj.yData, + name: this.chartObj.name, lineStyle: { color: "#2B82F3", }, diff --git a/src/loveflow/mixins/tableListMixins.js b/src/loveflow/mixins/tableListMixins.js index 9f9dd0c..b4fdcf2 100644 --- a/src/loveflow/mixins/tableListMixins.js +++ b/src/loveflow/mixins/tableListMixins.js @@ -1,4 +1,5 @@ import { deleteAction, getAction, downFile } from "../api/manage"; +import request from "@/utils/request"; export const tableListMixins = { data() { @@ -42,207 +43,29 @@ export const tableListMixins = { this.dataSource = []; let params = this.getQueryParams(); - //模拟接口返回数据总数total - let total = 40; - this.ipagination.total = total; - //console.log(this.ipagination); - - let nameArr = [ - "杨怡伶", - "林亚蓉", - "李家伟", - "陈皓茜", - "杨郁婷", - "张旺茹", - "李彦志", - "张雅玫", - "郭育维", - "吴兰木", - "江松兰", - "吴淑霞", - "许育海", - "赖雅婷", - "谢宜恩", - "储世昌", - "张雅泰", - "周左达", - "林馨仪", - "史怡静", - "苏思翰", - "赵美绍", - "黄崇舜", - "杨季生", - "陈一柏", - "杨信宏", - "叶忠翰", - "林子竹", - "黄千倩", - "蔡冠宇", - "张玉萍", - "丁宜芳", - "谢伟元", - "林婉婷", - "刘冠良", - "侯盈如", - "王薇宣", - "臧杰良", - "陈雅惠", - "叶依婷", - ]; - - let cmyArr = [ - "宁波市鼎瑞翔新材料科技有限公司", - "镇海石化海达发展有限责任公司", - "宁波四明化工有限公司", - "宁波特粒科技有限公司", - "宁波市镇海欣利工艺品有限公司", - "宁波安捷化工物流有限公司", - "宁波和盛达能源科技有限公司", - "宁波市镇海俞范三合电镀厂", - "宁波华梦贸易有限公司", - "英力士苯领高分子材料(宁波)有限公司", - "宁波市镇海金泰金属有限公司", - "宁波市银舟表面技术有限公司", - "图腾纺织(宁波)有限公司", - "宁波人健化学制药有限公司", - "宁波明峰检验检测研究院股份有限公司", - "宁波铝亿合金材料有限公司", - "宁波龙宝泰生环保科技有限公司", - "浙江杭州湾腈纶有限公司", - "镇海蛟川物业管理有限公司", - "宁波镇海炼化利安德化工销售有限公司", - ]; - let timeArr = [ - "2023-02-26 10:08:36", - "2023-01-26 10:08:12", - "2023-02-26 09:08:36", - "2023-08-09 10:08:37", - "2023-07-12 10:11:16", - "2023-02-26 10:32:42", - "2023-03-26 09:08:36", - "2023-03-26 10:08:57", - "2023-04-26 10:08:28", - "2023-05-26 10:08:36", - "2023-05-26 10:32:18", - "2023-06-12 10:08:28", - "2023-03-12 10:08:31", - "2023-02-24 10:08:41", - "2023-02-12 09:08:47", - "2023-02-26 11:08:53", - "2023-05-26 09:10:58", - "2023-04-26 10:11:51", - "2023-03-26 10:09:29", - "2023-03-12 10:19:29", - ]; - let alarmArr = ["GPS驻留", "疲劳驾驶", "反车道", "超载", "超速"]; - - //console.log(nameArr.length); - let genderArr = ["女", "男"]; - let hyArr = ["未婚", "已婚"]; - - let index = - (this.ipagination.currentPage - 1) * this.ipagination.pageSize; - console.log(index); - let length = index + this.ipagination.pageSize; - for (let i = index; i < length; i++) { - this.dataSource.push({ - id: i + 1, - name: nameArr[index + i], - card: "32032119879876321" + i, - phone: "186678879" + i, - cmy: cmyArr[i % 20], - cmyType: i % 5, - time: timeArr[i % 20], - risk: i % 8, - ys: i % 4, - unit: i % 4, - state: i % 3, - dealWay: i % 5, - dealRequire: i % 2, - street: "33021100" + (i % 7), - infoType: i % 3, - tipWay: i % 3, - tipnr: "经过应急管理局现场核查,消防设施无需整改", - carAlarm: alarmArr[i % 5], - rate: "9" + [i % 10] + "%", - whp: "危化品", - caseName: "4.12案件" + i, - caseNr: "案件简介" + i, - gwei: "操作工", - gwlb: ["技术资质", "使用人员", "保管人员"][i % 3], - jyfw: "日常用品", - depart: "生产", - - dealUnit: "交警大队", - dealDetail: "", - dealAddress: "卡口", - dealRange: "35分钟", - - gender: genderArr[i % 2], - hy: hyArr[i % 2], - address: "镇海区骆驼街道南一西路" + i + "号", - isQ: "是", - isD: "否", - personType: "未登记人员", - date: "2024-02-26 10:0" + (i % 10) + ":36", - sc: "正常", - qyT: "企业类型" + i, - car: "浙B9871" + i, - yType: "GPS驻留" + params.pageNo, - cardList: [ - { - name: "矛盾数据", - value: 9, - }, - { - name: "劳资纠纷", - value: 9, - }, - { - name: "特种设备", - value: 9, - }, - ], - detail: - " 宁波镇海兴达化工有限公司仓库由于易燃物品存储不当,导致易燃物品燃烧发生火灾。仓库值班人员立即启动火灾预案,组织仓库管理人员、巡逻人员和保安救火,由于火势较大,现场配备的灭火器、消防栓无法迅速扑灭。", - flow: "宁波市北越石化有限公司-人员流动-异常" + i, - flowType: "流动人员异常", - - node: "治安大队", - remarks: "加强管理", - times: i + 1, - total: i + 5, - iszg: i % 3, - way: i % 3, - msg: i % 2, - deal: "人工反馈", - jj: i % 3, - qyName: "海兴达化工有限公司" + (i % 3), - sshs: "无", - zd: "重点人员", - mz: "汉", - school: ["职中", "高中", "大专"][i % 3], - wu: "", - you: "有", - pcs: "蛟川派出所", - quxian: "镇海区", - wyh: "新城管理委员会", - zdlb: [ - "重要精神病", - "非防人员", - "退役重点人员", - "个人极端人员", - "家暴人员", - "前科人员", - ][i % 6], - }); - } - //console.log(this.dataSource); + request({ + url: this.url.list, + method: "post", + params, + }).then((res) => { + if (res.code == 200) { + if (!res.data) { + this.dataSource = []; + return; + } + this.dataSource = res.data || []; + if (res.total) { + this.ipagination.total = res.total; + } else { + this.ipagination.total = 0; + } + } + }); }, //处理查询参数 getQueryParams() { let param = {}; - param.pageNo = this.ipagination.currentPage; //当前页码 + param.pageNum = this.ipagination.currentPage; //当前页码 param.pageSize = this.ipagination.pageSize; //每页条数 return param; }, diff --git a/src/views/enterpriseRiskIndex/abnormal.vue b/src/views/enterpriseRiskIndex/abnormal.vue index a7d5794..8b63094 100644 --- a/src/views/enterpriseRiskIndex/abnormal.vue +++ b/src/views/enterpriseRiskIndex/abnormal.vue @@ -54,7 +54,7 @@
-
流动人口管理异常
+
流口人员管理异常
@@ -144,100 +144,40 @@ import barOne from "@/loveflow/components/echart/bar/one.vue"; import barTwo from "@/loveflow/components/echart/bar/two.vue"; import lineTwo from "@/loveflow/components/echart/line/two.vue"; import lineThree from "@/loveflow/components/echart/line/three.vue"; +import { groupByReduce } from "@/loveflow/util.js"; +import { + enterpriseComprehensiveRisk, + abnormalFloatingPopulation, + personnelBackground, + keyPosition, + policeInvolvement, + zXDifference, + transportVehicleBj, + transportVehicleAnomaly, + transportVehicle, + unitInspection, +} from "@/api/enterpriseRiskIndex/abnormal/index.js"; + export default { components: { barOne, barTwo, lineTwo, lineThree }, data() { return { curTime: "day", - dataList: [ - [ - { - name: "流动人口管理异常", - value: 13211, - icon: require("@/assets/images/screen/11.png"), - }, - { - name: "人员背景审核异常分析", - value: 2321, - icon: require("@/assets/images/screen/12.png"), - }, - { - name: "重点岗位资质核查异常分析", - value: 3321, - icon: require("@/assets/images/screen/13.png"), - }, - ], - [ - { - name: "人员涉警(案)情况异常分析", - value: 1321, - icon: require("@/assets/images/screen/21.png"), - }, - { - name: "装卸量差异分析", - value: 2329, - icon: require("@/assets/images/screen/22.png"), - }, - { - name: "运输车辆背景异常分析", - value: 2341, - icon: require("@/assets/images/screen/23.png"), - }, - ], - [ - { - name: "运输车辆异常预警", - value: 12431, - icon: require("@/assets/images/screen/31.png"), - }, - { - name: "驾驶员押运员资质异常分析", - value: 2134, - icon: require("@/assets/images/screen/32.png"), - }, - { - name: "单位检查情况异常分析", - value: 879, - icon: require("@/assets/images/screen/33.png"), - }, - ], - ], total: { name: "今日企业风险项量", - value: 7, + value: 0, }, tlObj: { gridLeft: "8%", - xData: [ - "人员安全", - "危化品运输", - "防攻击管理", - "消防安全", - "列管物品", - "道路安全", - "内部治安", - "网络安全", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12], + xData: [], + yData: [], + list: [], name: "风险标签排行", }, tmlObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], - name: "流动人口管理异常", + xData: [], + yData: [], + name: "流口人员管理异常", color: [ "rgba(20,246,62,0.5)", "rgba(30,147,255,0)", @@ -246,21 +186,8 @@ export default { ], }, tmmObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], + xData: [], + yData: [], name: "人员背景审核异常分析", color: [ "rgba(20,246,62,0.5)", @@ -270,21 +197,8 @@ export default { ], }, tmrObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], + xData: [], + yData: [], name: "重点岗位资质核查异常分析", color: [ "rgba(20,246,62,0.5)", @@ -295,21 +209,8 @@ export default { }, mtlObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], + xData: [], + yData: [], name: "人员涉警(案)情况异常分析", color: [ "rgba(255,193,77,0.9)", @@ -318,21 +219,8 @@ export default { ], }, mtmObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], + xData: [], + yData: [], name: "装卸量差异分析", color: [ "rgba(255,193,77,0.9)", @@ -341,21 +229,8 @@ export default { ], }, mtrObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], + xData: [], + yData: [], name: "运输车辆背景异常分析", color: [ "rgba(255,193,77,0.9)", @@ -364,80 +239,230 @@ export default { ], }, mlObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], + xData: [], + yData: [], name: "运输车辆异常预警", }, mmObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], + xData: [], + yData: [], name: "驾驶员押运员资质异常分析", }, mrObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [12, 11, 13, 14, 15, 11, 14, 12, 15, 11, 12, 13], + xData: [], + yData: [], name: "单位检查情况异常分析", }, + dataList: [ + [ + { + name: "流口人员管理异常", + value: 0, + icon: require("@/assets/images/screen/11.png"), + }, + { + name: "人员背景审核异常分析", + value: 0, + icon: require("@/assets/images/screen/12.png"), + }, + { + name: "重点岗位资质核查异常分析", + value: 0, + icon: require("@/assets/images/screen/13.png"), + }, + ], + [ + { + name: "人员涉警(案)情况异常分析", + value: 0, + icon: require("@/assets/images/screen/21.png"), + }, + { + name: "装卸量差异分析", + value: 0, + icon: require("@/assets/images/screen/22.png"), + }, + { + name: "运输车辆背景异常分析", + value: 0, + icon: require("@/assets/images/screen/23.png"), + }, + ], + [ + { + name: "运输车辆异常预警", + value: 0, + icon: require("@/assets/images/screen/31.png"), + }, + { + name: "驾驶员押运员资质异常分析", + value: 0, + icon: require("@/assets/images/screen/32.png"), + }, + { + name: "单位检查情况异常分析", + value: 0, + icon: require("@/assets/images/screen/33.png"), + }, + ], + ], }; }, + mounted() { + this.getData(); + }, methods: { changeTime(val) { this.curTime = val; + + this.tlObj.yData = []; + this.tlObj.xData = []; + + let list = []; + if (val == "day") { - this.total.value = 7; this.total.name = "今日企业风险项量"; - this.tlObj.yData = [12, 11, 13, 14, 15, 11, 14, 12]; + list = this.tlObj.list[0]; } if (val == "month") { - this.total.value = 23; this.total.name = "近三月企业风险项量"; - this.tlObj.yData = [341, 314, 411, 531, 461, 288, 189, 351]; + list = this.tlObj.list[1]; } if (val == "year") { - this.total.value = 91; this.total.name = "本年度企业风险项量"; - this.tlObj.yData = [1312, 1231, 1253, 1456, 1327, 1571, 1468, 1278]; + list = this.tlObj.list[2]; + } + + for (let i = 0; i < list.length; i++) { + if (list[i]["riskName"] == "企业风险项量") { + this.total.value = list[i]["score"]; + } else { + this.tlObj.yData.push(list[i]["score"]); + let name = list[i]["riskName"].replace(/异常分析/, ""); + name = name.replace(/异常/, ""); + this.tlObj.xData.push(name); + } } }, + + getData() { + enterpriseComprehensiveRisk().then((res) => { + if (res.code == 200) { + let data = res.data || []; + this.tlObj.list = data; + this.changeTime("day"); + } + }); + abnormalFloatingPopulation().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.tmlObj.xData.push(list[i]["month"] + "月"); + this.tmlObj.yData.push(list[i]["score"]); + } + this.dataList[0][0]["value"] = total; + } + }); + personnelBackground().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.tmmObj.xData.push(list[i]["month"] + "月"); + this.tmmObj.yData.push(list[i]["score"]); + } + this.dataList[0][1]["value"] = total; + } + }); + keyPosition().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.tmrObj.xData.push(list[i]["month"] + "月"); + this.tmrObj.yData.push(list[i]["score"]); + } + this.dataList[0][2]["value"] = total; + } + }); + policeInvolvement().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.mtlObj.xData.push(list[i]["month"] + "月"); + this.mtlObj.yData.push(list[i]["score"]); + } + this.dataList[1][0]["value"] = total; + } + }); + zXDifference().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.mtmObj.xData.push(list[i]["month"] + "月"); + this.mtmObj.yData.push(list[i]["score"]); + } + this.dataList[1][1]["value"] = total; + } + }); + transportVehicleBj().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.mtrObj.xData.push(list[i]["month"] + "月"); + this.mtrObj.yData.push(list[i]["score"]); + } + this.dataList[1][2]["value"] = total; + } + }); + + transportVehicleAnomaly().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.mlObj.xData.push(list[i]["month"] + "月"); + this.mlObj.yData.push(list[i]["score"]); + } + this.dataList[2][0]["value"] = total; + } + }); + transportVehicle().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.mmObj.xData.push(list[i]["month"] + "月"); + this.mmObj.yData.push(list[i]["score"]); + } + this.dataList[2][1]["value"] = total; + } + }); + unitInspection().then((res) => { + if (res.code == 200) { + let list = res.data || []; + let total = 0; + for (let i = 0; i < list.length; i++) { + total = total + list[i]["score"]; + this.mrObj.xData.push(list[i]["month"] + "月"); + this.mrObj.yData.push(list[i]["score"]); + } + this.dataList[2][2]["value"] = total; + } + }); + }, }, }; diff --git a/src/views/enterpriseRiskIndex/analysis.vue b/src/views/enterpriseRiskIndex/analysis.vue index 5a2adb6..8fcdc2b 100644 --- a/src/views/enterpriseRiskIndex/analysis.vue +++ b/src/views/enterpriseRiskIndex/analysis.vue @@ -44,7 +44,7 @@
异常风险项得分占比
-
+
@@ -101,19 +101,12 @@ export default { components: { barOne, lineOne, barThree, dPie }, data() { return { - curTime: "day", + curTime: "", tlObj: { - xData: [ - "流动人员", - "重点人员", - "违章事故", - "源头检查", - "企业整改", - "危险化学品", - "民爆物品", - ], - yData: [3, 4, 3, 1, 3, 4, 2], + xData: [], + yData: [], name: "风险监测项评分排行", + list: [], }, trObj: {}, tmObj: { @@ -142,33 +135,10 @@ export default { name: "风险标签排行", }, bmObj: { - xData: [ - "1月", - "2月", - "3月", - "4月", - "5月", - "6月", - "7月", - "8月", - "9月", - "10月", - "11月", - "12月", - ], - yData: [ - [317, 412, 298, 487, 312, 512, 397, 226, 275, 309, 292, 479], - [517, 512, 698, 587, 412, 712, 597, 426, 475, 509, 392, 379], - [981, 871, 698, 569, 1001, 872, 786, 659, 819, 797, 931, 769], - [801, 987, 1021, 1056, 1301, 1109, 982, 891, 1201, 1118, 1292, 1101], - ], + xData: [], + yData: [], name: "风险总量分析变化趋势图", - legend: [ - "企业风险总量", - "企业风险标签总量", - "企业风险得分", - "风险预警提醒总量", - ], + legend: [], color: [ ["#09C8F5", "rgba(9,200,245,0.1)", "rgba(9,200,245,0.1)"], ["#48EEBD", "rgba(72,238,189,0.1)", "rgba(72,238,189,0.1)"], @@ -197,37 +167,52 @@ export default { ], name: "风险标签排行", }, - show: false, }; }, mounted() { - this.show = true; this.getData(); }, methods: { changeTime(val) { this.curTime = val; + if (this.tlObj.list.length < 2) { + return; + } + this.tlObj.yData = []; + this.tlObj.xData = []; + + let list = []; if (val == "day") { - this.tlObj.yData = [3, 4, 3, 1, 3, 4, 2]; + list = this.tlObj.list[0]; } if (val == "month") { - this.tlObj.yData = [90, 120, 98, 76, 102, 132, 111]; + list = this.tlObj.list[1]; } if (val == "year") { - this.tlObj.yData = [360, 481, 398, 312, 401, 512, 437]; + list = this.tlObj.list[2]; + } + + for (let i = 0; i < list.length; i++) { + this.tlObj.yData.push(list[i]["score"]); + this.tlObj.xData.push(list[i]["riskName"]); } }, //注释看api文件接口 getData() { - riskDetection().then((res) => {}); + riskDetection().then((res) => { + if (res.code == 200) { + let data = res.data || []; + this.tlObj.list = data; + this.changeTime("day"); + } + }); riskLabelRanking().then((res) => {}); frequentChangeRisk().then((res) => { if (res.code == 200) { let data = res.data || []; - console.log(data); for (let i = 0; i < data.length; i++) { if (!this.tmObj.xData.includes(data[i]["month"] + "月")) { this.tmObj.xData.push(data[i]["month"] + "月"); @@ -236,18 +221,31 @@ export default { this.tmObj.legend.push(data[i]["riskName"]); } } - let temp = groupByReduce(data, "riskName", "score"); - - console.log(temp); - for (let i = 0; i < this.tmObj.legend.length; i++) { this.tmObj.yData.push(temp[this.tmObj.legend[i]]); } } }); - aggregateRiskAnalysis().then((res) => {}); + aggregateRiskAnalysis().then((res) => { + if (res.code == 200) { + let data = res.data || []; + console.log(data); + for (let i = 0; i < data.length; i++) { + if (!this.bmObj.xData.includes(data[i]["month"] + "月")) { + this.bmObj.xData.push(data[i]["month"] + "月"); + } + if (!this.bmObj.legend.includes(data[i]["riskName"])) { + this.bmObj.legend.push(data[i]["riskName"]); + } + } + let temp = groupByReduce(data, "riskName", "score"); + for (let i = 0; i < this.bmObj.legend.length; i++) { + this.bmObj.yData.push(temp[this.bmObj.legend[i]]); + } + } + }); riskItemScore().then((res) => {}); diff --git a/src/views/enterpriseRiskIndex/components/tableCard.vue b/src/views/enterpriseRiskIndex/components/tableCard.vue index 0033d58..ef012ef 100644 --- a/src/views/enterpriseRiskIndex/components/tableCard.vue +++ b/src/views/enterpriseRiskIndex/components/tableCard.vue @@ -1,7 +1,7 @@