| | |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-11-26 16:30:27 |
| | | * @Last Modified time: 2021-11-30 14:12:12 |
| | | * menu-name 押运人员定位 |
| | | */ |
| | | <template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPeopleList, getPosition, getTrack, getNewPeople, getNewTark } from "@/api/map/people"; |
| | | import { getPeopleList, getTrack, getNewPeople } from "@/api/map/people"; |
| | | |
| | | import peoplePng from "@/assets/img/people.png"; |
| | | export default { |
| | |
| | | }, |
| | | |
| | | positionClick (val) { |
| | | getPosition({ type: 1, workerId: val.id }).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.$refs.modalForm.addEntitys( |
| | | // { |
| | | // LGTD: arr[0].gis_jd, |
| | | // LTTD: arr[0].gis_wd, |
| | | // name: "人员位置", |
| | | // }, |
| | | // peoplePng, |
| | | // 0.5, |
| | | // "peoplelayer", |
| | | // "peopleAddlayer" |
| | | // ); |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | getNewPeople({ type: 1, workerId: val.id }).then((result) => { |
| | | var res = result.data.data; |
| | | if (JSON.stringify(res) != "{}") { |
| | | this.$refs.modalForm.addEntitys( |
| | |
| | | "peopleAddlayer" |
| | | ); |
| | | } |
| | | |
| | | }); |
| | | |
| | | }, |
| | | |
| | | detailsClick (row) { |
| | |
| | | getTrack({ |
| | | workerId: this.detailObj.id, |
| | | type: 1, |
| | | startTime: start, |
| | | beginTime: start, |
| | | endTime: end, |
| | | }).then((res) => { |
| | | |
| | | // getNewTark().then(res => { |
| | | |
| | | // if (JSON.stringify(res.data.track) != "{}") { |
| | | |
| | | // if (res.data.track.length > 1) { |
| | | // let arr = []; |
| | | |
| | | // res.data.track.forEach((item) => { |
| | | // arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | // }); |
| | | |
| | | // this.$refs.modalForm.addLines(arr); |
| | | // } |
| | | |
| | | // } |
| | | |
| | | // }) |
| | | |
| | | var result = res.data.data; |
| | | if (result.length > 1) { |
| | | let arr = []; |