| | |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-11-25 13:48:23 |
| | | * @Last Modified time: 2021-11-26 16:30:27 |
| | | * menu-name 押运人员定位 |
| | | */ |
| | | <template> |
| | |
| | | getPeopleList({ |
| | | current: this.page.currentPage, |
| | | size: this.page.pageSize, |
| | | deptId: '1460129345988239362', |
| | | type: 1 |
| | | }).then((res) => { |
| | | var data = res.data.data; |
| | | |
| | |
| | | positionClick (val) { |
| | | getPosition({ type: 1, workerId: val.id }).then((result) => { |
| | | |
| | | getNewPeople().then(res => { |
| | | // getNewPeople().then(res => { |
| | | |
| | | if (JSON.stringify(res.data) != "{}") { |
| | | var arr = res.data.sort(function (a, b) { |
| | | return a['date'] < b['date'] ? 1 : -1 |
| | | }) |
| | | // 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" |
| | | ); |
| | | } |
| | | }) |
| | | // this.$refs.modalForm.addEntitys( |
| | | // { |
| | | // LGTD: arr[0].gis_jd, |
| | | // LTTD: arr[0].gis_wd, |
| | | // name: "人员位置", |
| | | // }, |
| | | // peoplePng, |
| | | // 0.5, |
| | | // "peoplelayer", |
| | | // "peopleAddlayer" |
| | | // ); |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | // var res = result.data.data; |
| | | // if (JSON.stringify(res) != "{}") { |
| | | // this.$refs.modalForm.addEntitys( |
| | | // { |
| | | // LGTD: res.longitude, |
| | | // LTTD: res.latitude, |
| | | // name: "人员位置", |
| | | // }, |
| | | // peoplePng, |
| | | // 0.5, |
| | | // "peoplelayer", |
| | | // "peopleAddlayer" |
| | | // ); |
| | | // } |
| | | var res = result.data.data; |
| | | if (JSON.stringify(res) != "{}") { |
| | | this.$refs.modalForm.addEntitys( |
| | | { |
| | | LGTD: res.longitude, |
| | | LTTD: res.latitude, |
| | | name: "人员位置", |
| | | }, |
| | | peoplePng, |
| | | 0.5, |
| | | "peoplelayer", |
| | | "peopleAddlayer" |
| | | ); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | |
| | | type: 1, |
| | | startTime: start, |
| | | endTime: end, |
| | | }).then((result) => { |
| | | }).then((res) => { |
| | | |
| | | getNewTark().then(res => { |
| | | // getNewTark().then(res => { |
| | | |
| | | if (JSON.stringify(res.data.track) != "{}") { |
| | | // if (JSON.stringify(res.data.track) != "{}") { |
| | | |
| | | if (res.data.track.length > 1) { |
| | | let arr = []; |
| | | // if (res.data.track.length > 1) { |
| | | // let arr = []; |
| | | |
| | | res.data.track.forEach((item) => { |
| | | arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | }); |
| | | // res.data.track.forEach((item) => { |
| | | // arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | // }); |
| | | |
| | | this.$refs.modalForm.addLines(arr); |
| | | } |
| | | // this.$refs.modalForm.addLines(arr); |
| | | // } |
| | | |
| | | } |
| | | // } |
| | | |
| | | }) |
| | | // }) |
| | | |
| | | // var result = res.data.data; |
| | | // if (result.length > 1) { |
| | | // let arr = []; |
| | | var result = res.data.data; |
| | | if (result.length > 1) { |
| | | let arr = []; |
| | | |
| | | // result.forEach((item) => { |
| | | // arr.push([Number(item.longitude), Number(item.latitude)]); |
| | | // }); |
| | | result.forEach((item) => { |
| | | arr.push([Number(item.longitude), Number(item.latitude)]); |
| | | }); |
| | | |
| | | // this.$refs.modalForm.addLines(arr); |
| | | // } |
| | | this.$refs.modalForm.addLines(arr); |
| | | } |
| | | }); |
| | | }, |
| | | // 处理时间补零操作 |