护理地图处理

master
xy 12 months ago
parent b8d93d926d
commit 54724aecb5

@ -66,6 +66,14 @@ export function scheduleIndex(params){
}) })
} }
export function scheduleIndexSimple(params) {
return request({
method:'get',
url:'/api/admin/schedule/schedule-index-simple',
params
})
}
export function nurseSchedule(params){ export function nurseSchedule(params){
return request( return request(
{ {

@ -25,7 +25,11 @@ export default {
type: Number, type: Number,
default: 5 default: 5
}, },
value: [Number,String] value: [Number,String],
propsValue: {
type: String,
default: 'code'
}
}, },
data() { data() {
return { return {
@ -60,6 +64,14 @@ export default {
computed: { computed: {
...mapGetters(['village_codes']), ...mapGetters(['village_codes']),
}, },
watch: {
propsValue: {
handler: function(newVal) {
this.props.value = newVal
},
immediate: true
}
}
} }
</script> </script>

@ -198,7 +198,6 @@
<el-select <el-select
value-key="id" value-key="id"
:value="pickedProduct.name" :value="pickedProduct.name"
v-load-more="productLoad"
placeholder="请选择产品" placeholder="请选择产品"
style="width: 400px" style="width: 400px"
@change="productPick"> @change="productPick">
@ -524,7 +523,7 @@ export default {
ageTemp:false, ageTemp:false,
productSelect: { productSelect: {
page: 1, page: 1,
page_size: 10 page_size: 999
}, },
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{

@ -90,7 +90,7 @@
</Button> </Button>
<Button type="primary" style="margin-left: 10px" @click="exportExcel(new Date().getTime())">导出</Button> <Button type="primary" style="margin-left: 10px" @click="exportExcel(new Date().getTime())">导出</Button>
<!-- <Button type="primary" style="margin-left: 10px" @click="$refs['imports'].show()"></Button>--> <Button type="primary" style="margin-left: 10px" @click="$refs['imports'].show()"></Button>
</div> </div>
</slot> </slot>
</lx-header> </lx-header>

@ -130,7 +130,6 @@ export default {
} }
this.areas = city.detail this.areas = city.detail
console.log(1111,this.areas)
this.areas.forEach(item1 => { this.areas.forEach(item1 => {
//this.areaMap.set(item1.id,item1.remark) //this.areaMap.set(item1.id,item1.remark)

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

@ -207,7 +207,7 @@
:ref="`el-pop-${scope.row.id}`" :ref="`el-pop-${scope.row.id}`"
placement="top" placement="top"
width="200"> width="200">
<p>确认要删除排?</p> <p>确认要删除排?</p>
<div style="text-align: right; margin: 0"> <div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[`el-pop-${scope.row.id}`].doClose()"></el-button> <el-button size="mini" type="text" @click="$refs[`el-pop-${scope.row.id}`].doClose()"></el-button>
<el-button type="primary" size="mini" @click="deleteSchedule(scope.row)"></el-button> <el-button type="primary" size="mini" @click="deleteSchedule(scope.row)"></el-button>

Loading…
Cancel
Save