修复小区背景颜色,巡检点顺序一致,投诉处理按钮
This commit is contained in:
@@ -86,6 +86,7 @@ import { Check } from '@element-plus/icons-vue';
|
||||
import MapWrapper from '@/components/Map/index.vue';
|
||||
import { PointVO } from '@/api/system/InspectionPoint/type';
|
||||
import { LngLat } from '@/components/Map/type';
|
||||
import { PlanVO } from '@/api/system/InspectionPlan/type';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
|
||||
@@ -167,7 +168,6 @@ async function init() {
|
||||
} else {
|
||||
taskTime.value = [['', '']];
|
||||
}
|
||||
|
||||
handleChangeMap(res.data.routeIds);
|
||||
});
|
||||
}
|
||||
@@ -181,19 +181,24 @@ function outback() {
|
||||
const MapWrapperRef = ref<InstanceType<typeof MapWrapper>>();
|
||||
|
||||
function handleChangeMap(val: string) {
|
||||
if (val) {
|
||||
MapWrapperRef.value.clearMapMarker();
|
||||
const find = playlist.value.find((item) => item.id === val);
|
||||
if (find.points && find.points.length > 0) {
|
||||
find.points.forEach((item: PointVO) => {
|
||||
const angular = item.location.split(',').map(Number).filter(Boolean) as LngLat;
|
||||
MapWrapperRef.value.addMarker_more(angular, item.pointName, item.id);
|
||||
if (!val) return;
|
||||
MapWrapperRef.value.clearMapMarker();
|
||||
const find = playlist.value.find((item) => item.id === val);
|
||||
if (!find) return;
|
||||
if (find.points && find.points.length > 0) {
|
||||
const pointMap = new Map(find.points.map((p) => [p.id, p]));
|
||||
const totalPointsList = find.totalPoints.split(',').filter(Boolean);
|
||||
if (totalPointsList.length > 0) {
|
||||
totalPointsList.forEach((item) => {
|
||||
const findItem = pointMap.get(item);
|
||||
const angular = findItem.location.split(',').map(Number).filter(Boolean) as LngLat;
|
||||
MapWrapperRef.value.addMarker_more(angular, findItem.pointName, findItem.id);
|
||||
});
|
||||
}
|
||||
// 巡检路线
|
||||
if (find.pathPoints) {
|
||||
MapWrapperRef.value.renderSavedPath(find.pathPoints);
|
||||
}
|
||||
}
|
||||
// 巡检路线
|
||||
if (find.pathPoints) {
|
||||
MapWrapperRef.value.renderSavedPath(find.pathPoints);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user