Commit 929f55a2 by 前端

v1.17.0版本需求

1 parent b30ceef7
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
font-size: 16px; font-size: 16px;
color: #185EFE; color: #185EFE;
margin-left: 20px; margin-left: 20px;
cursor: pointer;
} }
.tips_info { .tips_info {
......
...@@ -37,8 +37,9 @@ export default { ...@@ -37,8 +37,9 @@ export default {
watch: { watch: {
// value: { // value: {
// handler: function (n, o) { // handler: function (n, o) {
// console.log(n)
// if (n) { // if (n) {
// this.init(); // //this.init();
// } // }
// }, // },
// immediate: true, // immediate: true,
...@@ -143,6 +144,11 @@ export default { ...@@ -143,6 +144,11 @@ export default {
return afterArray; return afterArray;
}, },
// 重置
reset(){
this.city = []
}
// 查询高德地图的省市区 // 查询高德地图的省市区
// getList() { // getList() {
// let oParams = {}; // let oParams = {};
......
<template>
<el-image
:src="imgPath"
:fit="fit"
class="img"
>
<div slot="error" class="image_slot">
<i class="el-icon-user"></i>
</div>
</el-image>
</template>
<script>
export default {
name: "GlsxImage",
props: {
src: {
type: String,
default: "",
},
fit: {
type: String,
default: "",
},
},
watch: {
src: {
handler: function (n) {
if (n) {
console.log(n);
this.imgPath = this.IMAGEURL + n;
}
},
immediate: true,
},
},
data() {
return {
imgPath: "",
IMAGEURL: 'https://img01.glsx.com.cn/weapp/resource/e-shield/',
};
},
created() {
console.log(this.src);
},
mounted() {},
methods: {
},
};
</script>
<style lang="scss" scoped>
.img {
cursor: pointer;
width: 100%;
height: 100%;
}
</style>
<style lang="scss">
.image_slot{
width: 100%;
height: 100%;
display:flex;
flex-direction: column;
align-items: center;
justify-content: center;
background:#f5f7fa;
i{
font-size:24px;
color:#909399;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -32,6 +32,14 @@ import 'vxe-table/lib/style.css' ...@@ -32,6 +32,14 @@ import 'vxe-table/lib/style.css'
Vue.use(VXETable) Vue.use(VXETable)
// // worker多线程
// import VueWorker from 'vue-worker'
// Vue.use(VueWorker)
// 引入 公共图片组件
import GlsxImage from '@/components/glsx-image/index.vue';
Vue.component('GlsxImage', GlsxImage)
// new Vue({ // new Vue({
// el: '#app', // el: '#app',
// router, // router,
......
...@@ -8,12 +8,15 @@ ...@@ -8,12 +8,15 @@
v-loading="mapLoading" v-loading="mapLoading"
></div> ></div>
<div class="row_box_hide" v-if="hideRowBox" @click="onShow"> <div class="row_box_hide" v-if="hideRowBox" @click="onShow">
<img src="@/assets/images/car.png" class="img img_normal" alt="" /> <glsx-image src="car.png" class="img img_normal" />
<img src="@/assets/images/car_hover.png" class="img img_hover" alt="" /> <glsx-image src="car_hover.png" class="img img_hover" />
<!-- <img src="@/assets/images/car.png" class="img img_normal" alt="" />
<img src="@/assets/images/car_hover.png" class="img img_hover" alt="" /> -->
</div> </div>
<div class="row_box" v-else> <div class="row_box" v-else>
<div class="hide_icon" @click="onShow"> <div class="hide_icon" @click="onShow">
<img src="@/assets/images/hide.png" class="img" alt="" /> <!-- <img src="@/assets/images/hide.png" class="img" alt="" /> -->
<glsx-image src="hide.png" class="img" />
</div> </div>
<div class="row_head"> <div class="row_head">
<div <div
...@@ -36,6 +39,7 @@ ...@@ -36,6 +39,7 @@
<div v-show="menuId == 1"> <div v-show="menuId == 1">
<el-form-item label="行政区域"> <el-form-item label="行政区域">
<CitySelect <CitySelect
ref="citySelect"
v-model="form.area" v-model="form.area"
class="el_select" class="el_select"
@change="onChange" @change="onChange"
...@@ -132,6 +136,7 @@ ...@@ -132,6 +136,7 @@
:data="deviceList" :data="deviceList"
size="small" size="small"
show-overflow show-overflow
v-if="drawDone"
> >
</vxe-grid> </vxe-grid>
<!-- <el-table :data="deviceList" size="small"> <!-- <el-table :data="deviceList" size="small">
...@@ -227,6 +232,7 @@ export default { ...@@ -227,6 +232,7 @@ export default {
{ field: "finalGpsTime", title: "最后GPS定位时间" }, { field: "finalGpsTime", title: "最后GPS定位时间" },
{ field: "finalGpsAddress", title: "最后GPS定位地址", width: "300px" }, { field: "finalGpsAddress", title: "最后GPS定位地址", width: "300px" },
], ],
drawDone:false,
}; };
}, },
mounted() { mounted() {
...@@ -433,6 +439,7 @@ export default { ...@@ -433,6 +439,7 @@ export default {
this.rectangleHeight = 0; this.rectangleHeight = 0;
this.rectangleWidth = 0; this.rectangleWidth = 0;
this.form = {}; this.form = {};
this.$refs.citySelect.reset();
}, },
// 展开 // 展开
...@@ -536,7 +543,7 @@ export default { ...@@ -536,7 +543,7 @@ export default {
// 设备号查车 // 设备号查车
async getLocation() { async getLocation() {
let params = {}; let params = {};
this.onClear() this.clearMap()
params.sns = this.form.sn; params.sns = this.form.sn;
params.deviceCode = "gps"; params.deviceCode = "gps";
let res = await GET_DEVICEINFO_BYSNS(params); let res = await GET_DEVICEINFO_BYSNS(params);
...@@ -611,6 +618,7 @@ export default { ...@@ -611,6 +618,7 @@ export default {
size: [24, 15], size: [24, 15],
anchor: "bottom-center", anchor: "bottom-center",
}; };
this.drawDone = false;
var layer = new AMap.LabelsLayer({ var layer = new AMap.LabelsLayer({
zooms: [0, 20], zooms: [0, 20],
zIndex: 1000, zIndex: 1000,
...@@ -636,6 +644,7 @@ export default { ...@@ -636,6 +644,7 @@ export default {
layer.add(markers); layer.add(markers);
console.log('画点结束',new Date().getTime()); console.log('画点结束',new Date().getTime());
this.drawDone = true;
this.map.setFitView(); this.map.setFitView();
}, },
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!