代码优化
This commit is contained in:
parent
1b71e843bf
commit
a80ee2ebea
|
|
@ -178,8 +178,8 @@
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.iotTypeId + ''"
|
:value="item.iotTypeId + ''"
|
||||||
:value="item.iotTypeName"
|
:label="item.iotTypeName"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else> 暂无数据 </template>
|
<template v-else>
|
||||||
|
{{ loadingData ? '数据加载中...' : 暂无数据 }}
|
||||||
|
</template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="停留点">
|
<el-tab-pane label="停留点">
|
||||||
<template v-if="parkList.length > 0">
|
<template v-if="parkList.length > 0">
|
||||||
|
|
@ -222,18 +224,20 @@ export default {
|
||||||
activeIndex: '',
|
activeIndex: '',
|
||||||
// 停留点信息
|
// 停留点信息
|
||||||
parkList: [],
|
parkList: [],
|
||||||
|
warningList: [],
|
||||||
|
loadingData: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {},
|
||||||
this.handleQuery()
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
Promise.all([this.getIotDeviceLocation()])
|
Promise.all([this.getIotDeviceLocation(), this.handleQuery()])
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
this.loadingData = false
|
||||||
this.initMap()
|
this.initMap()
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
this.loadingData = false
|
||||||
})
|
})
|
||||||
|
|
||||||
// this.getIotDeviceLocation()
|
// this.getIotDeviceLocation()
|
||||||
|
|
@ -247,9 +251,12 @@ export default {
|
||||||
this.trackAni.cancel()
|
this.trackAni.cancel()
|
||||||
}
|
}
|
||||||
// 2. 清除地图上面的标点覆盖物 并清除地图实例
|
// 2. 清除地图上面的标点覆盖物 并清除地图实例
|
||||||
this.map.clearOverlays()
|
|
||||||
this.map.destroy()
|
if (this.map) {
|
||||||
this.map = null
|
this.map.clearOverlays()
|
||||||
|
this.map.destroy()
|
||||||
|
this.map = null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -468,8 +475,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 时间选择器 */
|
/** 时间选择器 */
|
||||||
onChangeTime(val) {
|
onChangeTime(val) {
|
||||||
this.tripParams.beginTime = val[0]
|
if (val) {
|
||||||
this.tripParams.endTime = val[1]
|
this.tripParams.beginTime = val[0]
|
||||||
|
this.tripParams.endTime = val[1]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ module.exports = {
|
||||||
// target: `http://10.40.92.81:8080`, //韩/
|
// target: `http://10.40.92.81:8080`, //韩/
|
||||||
// target: `http://192.168.2.81:28080`,//旭/
|
// target: `http://192.168.2.81:28080`,//旭/
|
||||||
// target: `http://192.168.2.248:28080`, //帅
|
// target: `http://192.168.2.248:28080`, //帅
|
||||||
target: `http://192.168.2.246:49080`, //福
|
target: `http://192.168.2.225:49080`, //福
|
||||||
|
|
||||||
//******** 注意事项 ********* */
|
//******** 注意事项 ********* */
|
||||||
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;
|
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue