|
|
@ -69,7 +69,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import AMapLoader from '@amap/amap-jsapi-loader'; |
|
|
|
import AMapLoader from '@amap/amap-jsapi-loader'; |
|
|
|
import { reactive, watchEffect, getCurrentInstance, onBeforeMount, onUnmounted, ref, PropType, watch, toRefs, nextTick } from 'vue'; |
|
|
|
import { reactive, watchEffect, getCurrentInstance, onBeforeMount, onUnmounted, ref, PropType, watch, toRefs, nextTick, onMounted } from 'vue'; |
|
|
|
import { operatePanelColumns, MapData, MapPointType } from '../amap.data'; |
|
|
|
import { operatePanelColumns, MapData, MapPointType } from '../amap.data'; |
|
|
|
import hospital from '/@/assets/images/hospital.svg'; |
|
|
|
import hospital from '/@/assets/images/hospital.svg'; |
|
|
|
import medicalKit from '/@/assets/images/medical-kit.svg'; |
|
|
|
import medicalKit from '/@/assets/images/medical-kit.svg'; |
|
|
@ -189,12 +189,10 @@ |
|
|
|
const AForm = Form; |
|
|
|
const AForm = Form; |
|
|
|
const AFormItem = Form.Item; |
|
|
|
const AFormItem = Form.Item; |
|
|
|
const ASelect = Select; |
|
|
|
const ASelect = Select; |
|
|
|
const ATooltip = Tooltip; |
|
|
|
|
|
|
|
const formElRef = ref(); |
|
|
|
const formElRef = ref(); |
|
|
|
const [registerTable, { setTableData }] = useTable({ |
|
|
|
const [registerTable, { setTableData }] = useTable({ |
|
|
|
title: '任务列表', |
|
|
|
title: '任务列表', |
|
|
|
rowKey: 'id', |
|
|
|
rowKey: 'id', |
|
|
|
dataSource: mapState.mapData?.mapTask, |
|
|
|
|
|
|
|
columns: operatePanelColumns, |
|
|
|
columns: operatePanelColumns, |
|
|
|
resizeHeightOffset: 100, |
|
|
|
resizeHeightOffset: 100, |
|
|
|
showTableSetting: true, |
|
|
|
showTableSetting: true, |
|
|
@ -428,6 +426,19 @@ |
|
|
|
panel: instance.refs.mapPanel |
|
|
|
panel: instance.refs.mapPanel |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 加载完毕 |
|
|
|
|
|
|
|
complete(); |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
|
|
mapState.loading = false; |
|
|
|
|
|
|
|
throw error; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
|
|
|
// 加载地图设计器默认配置 |
|
|
|
|
|
|
|
mapState.mapData = defaultMapData(); |
|
|
|
|
|
|
|
setTableData(mapState.mapData.mapTask); |
|
|
|
// 加载地图数据,并且绘制路线 |
|
|
|
// 加载地图数据,并且绘制路线 |
|
|
|
if (!isEmpty(mapState.mapData.mapLogisticPoint)) { |
|
|
|
if (!isEmpty(mapState.mapData.mapLogisticPoint)) { |
|
|
|
const lngLatData = mapState.mapData.mapLogisticPoint.map(item => new AMap.LngLat(item.lng, item.lat)); |
|
|
|
const lngLatData = mapState.mapData.mapLogisticPoint.map(item => new AMap.LngLat(item.lng, item.lat)); |
|
|
@ -442,14 +453,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 加载完毕 |
|
|
|
|
|
|
|
complete(); |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
|
|
mapState.loading = false; |
|
|
|
|
|
|
|
throw error; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => { |
|
|
|
onUnmounted(() => { |
|
|
@ -572,7 +575,10 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
handleMapReset(); |
|
|
|
handleMapReset(); |
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
mapState.mapData = cloneDeep(merge(defaultMapData(), options)); |
|
|
|
mapState.mapData = cloneDeep(merge(defaultMapData(), options)); |
|
|
|
|
|
|
|
setTableData(mapState.mapData.mapTask); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 获取部件表单数据 */ |
|
|
|
/** 获取部件表单数据 */ |
|
|
|