| | |
| | | getSubstationWarnInfoPage |
| | | } from "../../api/index/index"; |
| | | |
| | | import { getPosition, getNewPeople } from "@/api/map/people"; |
| | | import { getNewPosition } from "@/api/map/car"; |
| | | |
| | | import car from "@/assets/img/car.png"; |
| | | import peo from "@/assets/img/people.png"; |
| | | import gun from "@/assets/img/gun.png"; |
| | |
| | | }, |
| | | node1: {}, //选中的记录 |
| | | node2: {}, |
| | | params: null |
| | | params: null, |
| | | peopleGps: {}, |
| | | carGps: {} |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | getPeoplePosition() { |
| | | getPosition({ type: 1, workerId: "1432897970143014913" }).then(result => { |
| | | getNewPeople().then(res => { |
| | | if (JSON.stringify(res.data) != "{}") { |
| | | var arr = res.data.sort(function(a, b) { |
| | | return a["date"] < b["date"] ? 1 : -1; |
| | | }); |
| | | this.peopleGps = { |
| | | LGTD: arr[0].gis_jd, |
| | | LTTD: arr[0].gis_wd |
| | | }; |
| | | } |
| | | this.getCarPosition(); |
| | | |
| | | }); |
| | | }); |
| | | }, |
| | | getCarPosition() { |
| | | getNewPosition({ imei: "861636056082414" }).then(result => { |
| | | var res = result.data.data; |
| | | if (JSON.stringify(res) != "{}") { |
| | | this.carGps = { |
| | | LGTD: res.x, |
| | | LTTD: res.y |
| | | }; |
| | | } |
| | | this.getTableData(0); |
| | | |
| | | }); |
| | | }, |
| | | //点击节点 |
| | | handleNodeClick1(data) { |
| | | this.value1 = data; |
| | |
| | | carNum: m.carNum, |
| | | id: m.id |
| | | }; |
| | | |
| | | if ( |
| | | m.longitude && |
| | | m.latitude && |
| | | m.longitude !== "0" && |
| | | m.latitude !== "0" |
| | | ) { |
| | | middleData[m.type]["geoData"].push([ |
| | | m.id, |
| | | Number(m.longitude), |
| | | Number(m.latitude) |
| | | ]); |
| | | } |
| | | middleData[m.type]["table"].push(obj); |
| | | // if ( |
| | | // m.longitude && |
| | | // m.latitude && |
| | | // m.longitude !== "0" && |
| | | // m.latitude !== "0" |
| | | // ) { |
| | | if (m.type === 1) { |
| | | middleData[m.type]["geoData"].push([ |
| | | m.id, |
| | | Number(this.peopleGps.LGTD), |
| | | Number(this.peopleGps.LTTD) |
| | | ]); |
| | | middleData[m.type]["table"].push(obj); |
| | | } else if (m.type === 2) { |
| | | middleData[m.type]["geoData"].push([ |
| | | m.id, |
| | | Number(this.carGps.LGTD), |
| | | Number(this.carGps.LTTD) |
| | | ]); |
| | | middleData[m.type]["table"].push(obj); |
| | | } else { |
| | | middleData[m.type]["geoData"].push([ |
| | | m.id, |
| | | Number(m.longitude), |
| | | Number(m.latitude) |
| | | ]); |
| | | middleData[m.type]["table"].push(obj); |
| | | } |
| | | // } |
| | | |
| | | // if ( |
| | | // m.longitude && |
| | | // m.latitude && |
| | | // m.longitude !== "0" && |
| | | // m.latitude !== "0" |
| | | // ) { |
| | | // middleData[m.type]["geoData"].push([ |
| | | // m.id, |
| | | // Number(m.longitude), |
| | | // Number(m.latitude) |
| | | // ]); |
| | | // } |
| | | // middleData[m.type]["table"].push(obj); |
| | | }); |
| | | this.carNum = middleData[2]["table"].length; |
| | | this.peoNum = middleData[1]["table"].length; |
| | | this.gunNum = middleData[3]["table"].length; |
| | | this.mapData = middleData; |
| | | this.setMapData(2); |
| | | // this.getCompanyMap(); |
| | | } else { |
| | | this.$message.error(res.msg); |
| | | } |
| | |
| | | obj["table"].push(item); |
| | | }); |
| | | this.companyNum = obj["table"].length; |
| | | this.mapData["4"] = {}; |
| | | this.mapData["4"] = obj; |
| | | } |
| | | }); |
| | |
| | | this.gridData.total = 0; |
| | | this.dialogTableVisible = true; |
| | | if (type === "zg") { |
| | | // debugger; |
| | | this.gridData.title = "资格异常人员清单"; |
| | | this.getQualificationPages(1); |
| | | } else if (type === "wg") { |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getPeoplePosition(); |
| | | // this.getCarPosition(); |
| | | |
| | | this.initEchart(); |
| | | this.getHolderNum(0); |
| | | this.getTableData(0); |
| | | // this.getTableData(0); |
| | | this.getCompanyMap(); |
| | | this.getOfficeData(); |
| | | } |