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 @@ @@ -497,12 +497,12 @@
if (!mapProps.sidebarControl) mapState.toggleOperatePanelClass.siderWidth = 0;
if (!mapProps.toolbarControl) mapState.toggleOperatePanelClass.toolbarHeight = 0;
});
watch(toRefs(mapProps).options, (newValue) => {
watchDebounced(toRefs(mapProps).options, (newValue) => {
if (mapState.first) {
setMapDataJson(newValue);
handleSetCourierUserList();
}
}, { deep: true });
}, { debounce: 500, deep: true });
watch(toRefs(mapProps).isEdit, () => {
if (mapState.first) {
handleSetCourierUserList();
@ -567,7 +567,8 @@ @@ -567,7 +567,8 @@
function handleSetCourierUserList() {
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 => ({
value: item.id,
label: item.nickName,

Loading…
Cancel
Save