Browse Source

🚑 交接点没有地图数据也能展示处理

master
wangxiang 3 years ago
parent
commit
d346ff7cf2
  1. 7
      src/components/AMap/src/AMapDesigner/index.vue

7
src/components/AMap/src/AMapDesigner/index.vue

@ -497,12 +497,12 @@
if (!mapProps.sidebarControl) mapState.toggleOperatePanelClass.siderWidth = 0; if (!mapProps.sidebarControl) mapState.toggleOperatePanelClass.siderWidth = 0;
if (!mapProps.toolbarControl) mapState.toggleOperatePanelClass.toolbarHeight = 0; if (!mapProps.toolbarControl) mapState.toggleOperatePanelClass.toolbarHeight = 0;
}); });
watch(toRefs(mapProps).options, (newValue) => { watchDebounced(toRefs(mapProps).options, (newValue) => {
if (mapState.first) { if (mapState.first) {
setMapDataJson(newValue); setMapDataJson(newValue);
handleSetCourierUserList(); handleSetCourierUserList();
} }
}, { deep: true }); }, { debounce: 500, deep: true });
watch(toRefs(mapProps).isEdit, () => { watch(toRefs(mapProps).isEdit, () => {
if (mapState.first) { if (mapState.first) {
handleSetCourierUserList(); handleSetCourierUserList();
@ -567,7 +567,8 @@
function handleSetCourierUserList() { function handleSetCourierUserList() {
nextTick(async ()=>{ nextTick(async ()=>{
// , // ,
mapProps.isEdit ? await listUser({ userType: '1', id: mapState.mapData.courierUserId }).then(res => { (mapProps.isEdit && mapState.mapData.courierUserId) ?
await listUser({ userType: '1', id: mapState.mapData.courierUserId }).then(res => {
mapState.courierUserList = res.data?.map(item => ({ mapState.courierUserList = res.data?.map(item => ({
value: item.id, value: item.id,
label: item.nickName, label: item.nickName,

Loading…
Cancel
Save