|
@@ -42,7 +42,6 @@
|
|
|
<script>
|
|
|
// 引入高德使用高德
|
|
|
import aMap from "vue-amap";
|
|
|
-import { lazyAMapApiLoaderInstance } from "vue-amap";
|
|
|
import { getUserByCompanyId, queryTrail } from '@/apps/mobile/api/monitoring-center/index';
|
|
|
// 初始化高德
|
|
|
aMap.initAMapApiLoader({
|
|
@@ -63,59 +62,17 @@ aMap.initAMapApiLoader({
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- searchForm: {},
|
|
|
- zoom: 15,
|
|
|
- center: [114.459891,30.463359],
|
|
|
- userList: [],
|
|
|
- polyline: {
|
|
|
- path: [[114.462895,30.473531], [114.461607,30.468315], [114.459891,30.463359], [114.431927,30.478135],
|
|
|
- [114.416134,30.451206], [114.445703,30.454832], [114.39708,30.505279], [114.391715,30.498956]],
|
|
|
- strokeOpacity: 1,
|
|
|
- strokeColor: "#FF9900",
|
|
|
- strokeWeight: 6,
|
|
|
- },
|
|
|
- texts: [
|
|
|
- {
|
|
|
- position: [114.462895,30.473531],
|
|
|
- text: '1.2020-07-15 9:00pm',
|
|
|
- offset: [0,-50],
|
|
|
- },
|
|
|
- {
|
|
|
- position: [114.461607,30.468315],
|
|
|
- text: '2.2020-07-15 7:00pm',
|
|
|
- offset: [0,-50],
|
|
|
- },
|
|
|
- {
|
|
|
- position: [114.459891,30.463359],
|
|
|
- text: '3.2020-07-14 6:00am',
|
|
|
- offset: [0,-50],
|
|
|
- },
|
|
|
- {
|
|
|
- position: [114.431927,30.478135],
|
|
|
- text: '4.2020-07-15 3:00am',
|
|
|
- offset: [0,-50],
|
|
|
- },
|
|
|
- {
|
|
|
- position: [114.416134,30.451206],
|
|
|
- text: '5.2020-07-13 7:00am',
|
|
|
- offset: [0,-50],
|
|
|
- },
|
|
|
- {
|
|
|
- position: [114.445703,30.454832],
|
|
|
- text: '6.2020-07-13 9:00am',
|
|
|
- offset: [0,-50],
|
|
|
- },
|
|
|
- {
|
|
|
- position: [114.39708,30.505279],
|
|
|
- text: '7.2020-07-14 9:20am',
|
|
|
- offset: [0,-50],
|
|
|
- },
|
|
|
- {
|
|
|
- position: [114.391715,30.498956],
|
|
|
- text: '8.2020-07-14 9:50am',
|
|
|
- offset: [0,-50],
|
|
|
- }
|
|
|
- ]
|
|
|
+ searchForm: {},
|
|
|
+ zoom: 15,
|
|
|
+ center: [114.407749, 30.455714],
|
|
|
+ userList: [],
|
|
|
+ polyline: {
|
|
|
+ path: [],
|
|
|
+ strokeOpacity: 1,
|
|
|
+ strokeColor: "#FF9900",
|
|
|
+ strokeWeight: 6,
|
|
|
+ },
|
|
|
+ texts: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -125,9 +82,9 @@ export default {
|
|
|
let companyId = companyData.id;
|
|
|
getUserByCompanyId(companyId)
|
|
|
.then(res => {
|
|
|
- for (let i = 0; i < res.data.length; i++) {
|
|
|
- this.userList.push(res.data[i]);
|
|
|
- }
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ this.userList.push(res.data[i]);
|
|
|
+ }
|
|
|
})
|
|
|
.catch(err => err);
|
|
|
},
|
|
@@ -143,12 +100,12 @@ export default {
|
|
|
this.polyline.path = [];
|
|
|
this.texts = [];
|
|
|
this.polyline.path = res.data.polylines;
|
|
|
- this.texts= res.data.texts;
|
|
|
+ this.texts = res.data.texts;
|
|
|
this.texts.forEach(tem => {
|
|
|
tem.offset = [0,-50];
|
|
|
})
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
+ .catch(() => {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -177,10 +134,6 @@ export default {
|
|
|
::v-deep .el-input {
|
|
|
width: auto;
|
|
|
}
|
|
|
-
|
|
|
- ::v-deep .el-input__inner {
|
|
|
- width: 200px;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</style>
|