|
|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
size="small"
|
|
|
|
|
style="width: 234px; margin-right: 10px"
|
|
|
|
|
type="daterange"
|
|
|
|
|
@change="e => { if(e[0]&&e[1]){selected.start_date = e[0];selected.end_date = e[1]}else{selected.start_date = '';selected.end_date = ''} }"></el-date-picker>
|
|
|
|
|
@input="e => {if(e[0]&&e[1]) {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="search">查询</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<slot>
|
|
|
|
|
@ -76,7 +76,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<i class="el-icon-location" style="padding-right: 10px;"></i>
|
|
|
|
|
{{ select.address.address }}
|
|
|
|
|
{{ select.info.customer_address ? select.info.customer_address.address : '' }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -87,7 +87,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { AMapManager,lazyAMapApiLoaderInstance } from 'vue-amap'
|
|
|
|
|
import { scheduleIndex } from '@/api/schedule'
|
|
|
|
|
import { scheduleIndexSimple } from '@/api/schedule'
|
|
|
|
|
import { getAgeByIdcard } from '@/utils'
|
|
|
|
|
|
|
|
|
|
const amapManager = new AMapManager()
|
|
|
|
|
@ -120,7 +120,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
async getList(){
|
|
|
|
|
console.log(this.selected)
|
|
|
|
|
let res = await scheduleIndex(this.selected)
|
|
|
|
|
let res = await scheduleIndexSimple(this.selected)
|
|
|
|
|
this.lists = res.map(item => {
|
|
|
|
|
let address = item.customer?.customer_address?.filter(item1 => item1.id === item.address_id)[0]
|
|
|
|
|
return {
|
|
|
|
|
@ -160,7 +160,17 @@ export default {
|
|
|
|
|
let marker = new AMap.Marker({
|
|
|
|
|
draggable:false,
|
|
|
|
|
cursor:'pointer',
|
|
|
|
|
position:[Number(i.address?.lng || 0),Number(i.address?.lat || 0)],
|
|
|
|
|
position: (() => {
|
|
|
|
|
if (i.info.status === 0) {
|
|
|
|
|
return [Number(i.info?.customer_address?.lng || 0),Number(i.info?.customer_address?.lat || 0)]
|
|
|
|
|
} else if (i.info.status === 1) {
|
|
|
|
|
let loc = i.info.logs.find(j => j.type === 1)
|
|
|
|
|
return loc ? [Number(loc.lng??0),Number(loc.lat??0)] : []
|
|
|
|
|
} else if (i.info.status === 2) {
|
|
|
|
|
let loc = i.info.logs.find(j => j.type === 3)
|
|
|
|
|
return loc ? [Number(loc.lng??0),Number(loc.lat??0)] : []
|
|
|
|
|
}
|
|
|
|
|
})(),
|
|
|
|
|
icon:map.get(i.info.status),
|
|
|
|
|
label: {content:i.info.nurse?.name,offset:new AMap.Pixel(0,28)},
|
|
|
|
|
clickable:true,
|
|
|
|
|
|