+
@@ -192,7 +192,7 @@
watch(
()=>props.mapConfig,
(newVal,oldVal)=>{
- // handlerLoadMapLayer();
+ handlerLoadMapLayer();
}
)
@@ -288,17 +288,17 @@
// 地图图层控制
const handlerLoadMapLayer = ()=>{
if(switchLayerControler){
- var allLayers = map.getStyle().layers;
- allLayers.forEach(function(layer){
- console.log("layerEEEEEE",layer);
- console.log(layer.id);
- // map.removeLayer(layer.id);
- });
+ // var allLayers = map.getStyle().layers;
+ // allLayers.forEach(function(layer){
+ // console.log("layerEEEEEE",layer);
+ // console.log(layer.id);
+ // // map.removeLayer(layer.id);
+ // });
// var allSources = Object.keys(map.style.sourceCaches);
// allSources.forEach(function(sourceId){
// map.removeSource(sourceId);
// });
- // map.removeControl(switchLayerControler);
+ map.removeControl(switchLayerControler);
}
let configlayers = {};
let baseLayers = [];
@@ -638,8 +638,10 @@
isOpen.value = e;
};
+ const currentPosition = ref(null);
// 图斑定位
const handlerLocation = (lngLat) => {
+ currentPosition.value = lngLat
map.flyTo({
center: lngLat,
zoom: 17,
@@ -651,6 +653,21 @@
},
});
};
+ // 定位
+ const handlerToPosition = ()=>{
+ if(currentPosition.value){
+ map.flyTo({
+ center: currentPosition.value,
+ zoom: 17,
+ speed: 10, // 飞行速度
+ curve: 1, // 飞行曲线
+ easing(t) {
+ // 飞行动画函数
+ return t;
+ },
+ });
+ }
+ }
// 编辑图斑
const handlerEdit = (info) => {
@@ -1213,7 +1230,7 @@
}
.position-by-lnglat{
- width:29px;
+ width:58px;
height:29px;
background:#fff;
position:absolute;
@@ -1221,7 +1238,6 @@
right:131px;
border-radius:3px;
.to-location{
- display:none;
width:29px;
height:29px;
float:left;
diff --git a/src/views/demo/bootstraps/auditinfo/index.vue b/src/views/demo/bootstraps/auditinfo/index.vue
index fa8a26e7..bc6e2de1 100644
--- a/src/views/demo/bootstraps/auditinfo/index.vue
+++ b/src/views/demo/bootstraps/auditinfo/index.vue
@@ -38,7 +38,7 @@
import AuditProgress from './AuditProgress/index.vue';
import MapList from './MapList/index.vue';
import { getLoadTaskCount } from '@/api/bootstraps/index';
- import { getGeom } from '@/api/sys/layerManagement';
+ import { getGeom,getConfig } from '@/api/sys/layerManagement';
import { getDetail } from '@/api/sys/WFSchemeInfo';
import { useMessage } from '@/hooks/web/useMessage';
@@ -47,7 +47,10 @@
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const MapboxComponent = ref();
const mapConfig = ref({ isShowMap: false });
-
+ getConfig({code:"mapsetting"}).then(res=>{
+ mapConfig.value = JSON.parse(res.codeValue)
+ console.log("resresres",mapConfig.value);
+ })
const showParent = ref(true);
const year = ref();
const batch = ref('');
diff --git a/src/views/demo/bootstraps/changearea/index.vue b/src/views/demo/bootstraps/changearea/index.vue
index 8f802889..325e46f8 100644
--- a/src/views/demo/bootstraps/changearea/index.vue
+++ b/src/views/demo/bootstraps/changearea/index.vue
@@ -50,12 +50,18 @@
import { getLoadDroneCaseInfoCount, getLoadDroneCaseInfoDetail } from '@/api/bootstraps/index.ts';
import { batchOptions, yearOptions } from '@/views/demo/bootstraps/curbspotcity/util.ts';
import { getChildrenTree } from '@/api/demo/system.ts';
- import { getGeom } from '@/api/sys/layerManagement';
+ import { getGeom,getConfig } from '@/api/sys/layerManagement';
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const MapboxComponent = ref();
const mapConfig = ref({ isShowMap: false });
+ getConfig({code:"mapsetting"}).then(res=>{
+ mapConfig.value = JSON.parse(res.codeValue)
+ console.log("resresres",mapConfig.value);
+ })
+
+
const showInfo = ref(false);
const year = ref
();
const batch = ref();
diff --git a/src/views/demo/bootstraps/curbspotcity/MapList/ShowInfoModal/index.vue b/src/views/demo/bootstraps/curbspotcity/MapList/ShowInfoModal/index.vue
index 2ec5a8ed..6db1c2cf 100644
--- a/src/views/demo/bootstraps/curbspotcity/MapList/ShowInfoModal/index.vue
+++ b/src/views/demo/bootstraps/curbspotcity/MapList/ShowInfoModal/index.vue
@@ -1,32 +1,58 @@
-
- {{ id }}
- {{ case_no }}
- {{ case_name }}
- {{ case_description }}
- {{ geomid }}
- {{ address }}
- {{ area? area: '-' }} 亩
- {{ gengdi_area? gengdi_area: '-' }} 亩
- {{ guotukongjianguihua_area? guotukongjianguihua_area: '-' }} 亩
- {{ nongyongdi_area? nongyongdi_area: '-' }} 亩
- {{ shengtaibaohuhongxian_area? shengtaibaohuhongxian_area: '-' }} 亩
- {{ yongjiujibennongtian_area? yongjiujibennongtian_area: '-' }} 亩
- {{ zhongdianquyu_area? zhongdianquyu_area: '-' }} 亩
- {{ createtime }}
-
+
+
+
+
+
+
+ {{ id }}
+ {{ case_no }}
+ {{ case_name }}
+ {{ case_description }}
+ {{ geomid }}
+ {{ address }}
+ {{ area? area: '-' }} 亩
+ {{ gengdi_area? gengdi_area: '-' }} 亩
+ {{ guotukongjianguihua_area? guotukongjianguihua_area: '-' }} 亩
+ {{ nongyongdi_area? nongyongdi_area: '-' }} 亩
+ {{ shengtaibaohuhongxian_area? shengtaibaohuhongxian_area: '-' }} 亩
+ {{ yongjiujibennongtian_area? yongjiujibennongtian_area: '-' }} 亩
+ {{ zhongdianquyu_area? zhongdianquyu_area: '-' }} 亩
+ {{ createtime }}
+
+
+
-
+
diff --git a/src/views/demo/bootstraps/curbspotcity/index.vue b/src/views/demo/bootstraps/curbspotcity/index.vue
index 20673409..a9dba3e9 100644
--- a/src/views/demo/bootstraps/curbspotcity/index.vue
+++ b/src/views/demo/bootstraps/curbspotcity/index.vue
@@ -52,11 +52,16 @@ import MapList from './MapList/index.vue'
import { getLoadDroneCaseInfoCount, getLoadDroneCaseInfoDetail } from '@/api/bootstraps/index.ts'
import { batchOptions, yearOptions} from '@/views/demo/bootstraps/curbspotcity/util.ts'
import { getChildrenTree } from '@/api/demo/system.ts'
-import { getGeom } from '@/api/sys/layerManagement';
+import { getGeom,getConfig } from '@/api/sys/layerManagement';
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const MapboxComponent = ref();
const mapConfig = ref({ isShowMap: false });
+getConfig({code:"mapsetting"}).then(res=>{
+ mapConfig.value = JSON.parse(res.codeValue)
+})
+
+
const showInfo = ref(false)
const year = ref()
diff --git a/src/views/demo/bootstraps/mapconfig/index.vue b/src/views/demo/bootstraps/mapconfig/index.vue
index aa536282..7633fba7 100644
--- a/src/views/demo/bootstraps/mapconfig/index.vue
+++ b/src/views/demo/bootstraps/mapconfig/index.vue
@@ -8,8 +8,6 @@
size="small"
style="padding:0px 15px"
>
-
-
@@ -163,6 +161,8 @@
+
+ 保存
@@ -185,8 +185,20 @@
import { Form, FormItem, message, Switch,TableProps } from 'ant-design-vue';
import { PageWrapper } from '@/components/Page';
import { ShpLayerSourceLoadPage, GetTableAndViewColumnList } from '@/api/demo/formScheme';
+ import{fun_GetForm} from '@/api/demo/formModule'
+ import {updateConfig,getConfig} from '@/api/sys/layerManagement'
import { EditOutlined, DeleteOutlined, PercentageOutlined ,PlusOutlined} from '@ant-design/icons-vue';
import SelectLayer from '@/components/MapboxMaps/Modal/ServeResource/index.vue'
+ import { useMessage } from '@/hooks/web/useMessage';
+ const { createMessage } = useMessage();
+ const mapConfig = ref({});
+
+
+ getConfig({code:"mapsetting"}).then(res=>{
+ mapConfig.value = JSON.parse(res.codeValue)
+ })
+
+
// const mapConfig = reactive({
// baseConfig:{
// state:true,
@@ -200,7 +212,7 @@
// minZoom:3,
// maxZoom:18
// },
-
+
interface BaseLayerDataType {
key: string | number;
name: string;
@@ -667,9 +679,8 @@
}
]
};
- const mapConfig = ref(config.table.maps);
+ // const mapConfig = ref(config.table.maps);
- console.log("mapConfig2",mapConfig.value);
watch(
() => config.table.maps,
@@ -851,6 +862,16 @@
}
}
+
+ const saveMapConfig = ()=>{
+ let form = {
+ code:"mapsetting",
+ codeValue:JSON.stringify(mapConfig.value)
+ }
+ updateConfig(form).then(res=>{
+ createMessage.success("保存成功!");
+ })
+ }