master
271556543@qq.com 3 years ago
parent b20e63eab7
commit e2b4f7c579

@ -6,9 +6,9 @@
<div slot="content"></div>
<slot>
<Input placeholder="关键字搜索" v-model="selector.keyword" style="width: 200px; margin-right: 10px" />
<!-- <Input placeholder="关键字搜索" v-model="selector.keyword" style="width: 200px; margin-right: 10px" />-->
<Button style="margin-left: 10px" type="primary" @click="selector.page = 1,getCustomers()">查询</Button>
<!-- <Button style="margin-left: 10px" type="primary" @click="selector.page = 1,getCustomers()">查询</Button>-->
</slot>
</lx-header>
</div>
@ -114,7 +114,9 @@ export default {
async mounted() {
await this.getCustomers()
lazyAMapApiLoaderInstance.load().then(() => {
this.map = new AMap.Map('amapContainer')
this.map = new AMap.Map('amapContainer',{
center:[Number(this.customers[0]?.lng || 119.58),Number(this.customers[0]?.lat || 31.47)]
})
this.markers()
})
},

@ -17,7 +17,7 @@
style="width: 234px; margin-right: 10px"
type="daterange"
@change="e => { if(e){selected.start_date = e[0];selected.end_date = e[1]}else{selected.start_date = '';selected.end_date = ''} }"></el-date-picker>
<Button style="margin-right: 10px" type="primary" @click="getList"></Button>
<Button style="margin-right: 10px" type="primary" @click="search"></Button>
</div>
<slot>
</slot>
@ -95,6 +95,10 @@ export default {
}
},
methods: {
async search(){
await this.getList()
this.markers()
},
async getList(){
let res = await scheduleIndex(this.selected)
@ -106,8 +110,6 @@ export default {
}
})
console.log(this.lists)
this.map.remove(this.marker)
this.markers()
},
reset(){
@ -128,6 +130,7 @@ export default {
this.height = tableHeight ?? 600
},
markers(){
this.map.remove(this.marker)
this.marker = []
let map = new Map([
[0,require('../../assets/status0.png')],
@ -179,10 +182,14 @@ export default {
this.initLoad()
},
async mounted() {
await this.getList()
lazyAMapApiLoaderInstance.load().then(() => {
this.map = new AMap.Map('amapContainer')
this.map = new AMap.Map('amapContainer',{
center:[Number(this.lists[0]?.address?.lng || 119.58),Number(this.lists[0]?.address?.lat || 31.47)]
})
this.markers()
})
await this.getList()
}
}
</script>

Loading…
Cancel
Save