修复审批定位,添加分配发送邮件,添加图层搜索
This commit is contained in:
parent
592076ba70
commit
39c3fb6446
|
@ -21,6 +21,7 @@
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
"leaflet": "^1.9.3",
|
"leaflet": "^1.9.3",
|
||||||
|
"leaflet-control-geocoder": "^2.4.0",
|
||||||
"leaflet-draw": "^1.0.4",
|
"leaflet-draw": "^1.0.4",
|
||||||
"leaflet-imageoverlay-rotated": "^0.2.1",
|
"leaflet-imageoverlay-rotated": "^0.2.1",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div ref="map"
|
<div ref="map" class="container"></div>
|
||||||
class="container"></div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
@ -14,6 +13,8 @@ import 'leaflet-draw/dist/leaflet.draw.css'
|
||||||
import '@geoman-io/leaflet-geoman-free';
|
import '@geoman-io/leaflet-geoman-free';
|
||||||
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
||||||
import 'Leaflet-ImageOverlay-Rotated'
|
import 'Leaflet-ImageOverlay-Rotated'
|
||||||
|
import 'leaflet-control-geocoder/dist/Control.Geocoder.css';
|
||||||
|
import 'leaflet-control-geocoder';
|
||||||
import { useVariableStore } from '/@/stores/index.ts'
|
import { useVariableStore } from '/@/stores/index.ts'
|
||||||
import * as omnivore from '@mapbox/leaflet-omnivore'
|
import * as omnivore from '@mapbox/leaflet-omnivore'
|
||||||
const variableStore = useVariableStore()
|
const variableStore = useVariableStore()
|
||||||
|
@ -48,7 +49,33 @@ onMounted(() => {
|
||||||
|
|
||||||
featureLayerG_area = L.layerGroup().addTo(homeMap)
|
featureLayerG_area = L.layerGroup().addTo(homeMap)
|
||||||
featureLayerG_point = L.layerGroup().addTo(homeMap)
|
featureLayerG_point = L.layerGroup().addTo(homeMap)
|
||||||
|
// 'http://t0.tianditu.com/img_c/wmts?layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk='
|
||||||
|
// const CIA_C = "http://t0.tianditu.com/cia_c/wmts?layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=";
|
||||||
|
// const nameLayer = L.tileLayer(CIA_C + TK_KEY, {
|
||||||
|
// maxZoom: 20,
|
||||||
|
// tileSize: 256,
|
||||||
|
// zoomOffset: 1
|
||||||
|
// }).addTo(homeMap);
|
||||||
|
|
||||||
|
// 创建Geocoding控件
|
||||||
|
const geocoder = L.Control.geocoder({
|
||||||
|
defaultMarkGeocode: false,
|
||||||
|
placeholder: 'Enter address...',
|
||||||
|
collapsed: true,
|
||||||
|
}).addTo(homeMap);
|
||||||
|
|
||||||
|
// 监听Geocoding控件的结果事件
|
||||||
|
geocoder.on('markgeocode', function (event) {
|
||||||
|
const result = event.geocode || {};
|
||||||
|
onGeocodeResult(result);
|
||||||
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
const onGeocodeResult = (result) => {
|
||||||
|
homeMap.setView(result.center, 5);
|
||||||
|
L.marker(result.center).addTo(homeMap);
|
||||||
|
}
|
||||||
|
|
||||||
/** WKT加载点和多边形
|
/** WKT加载点和多边形
|
||||||
* Object param 参数集合
|
* Object param 参数集合
|
||||||
* @param {
|
* @param {
|
||||||
|
|
|
@ -85,6 +85,7 @@ const save = async () => {
|
||||||
id: state.rowData.disasterId,
|
id: state.rowData.disasterId,
|
||||||
chiefId: state.selectData[0].id,
|
chiefId: state.selectData[0].id,
|
||||||
chiefName: state.selectData[0].name,
|
chiefName: state.selectData[0].name,
|
||||||
|
allocation:"YES"
|
||||||
};
|
};
|
||||||
let res = await submit(params).then(da=>{
|
let res = await submit(params).then(da=>{
|
||||||
ElMessage.success('Save success');
|
ElMessage.success('Save success');
|
||||||
|
|
|
@ -339,7 +339,7 @@ const onOpenEditRole = (type, row) => {
|
||||||
//深拷贝
|
//深拷贝
|
||||||
state.edit = JSON.parse(JSON.stringify(row));
|
state.edit = JSON.parse(JSON.stringify(row));
|
||||||
state.dialogVisible = true;
|
state.dialogVisible = true;
|
||||||
if (row.geometry.substring(0, row.geometry.indexOf("((")) == 'Point') {
|
if (row.geometry.indexOf("POINT")!=-1) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
state.radio = "1"
|
state.radio = "1"
|
||||||
// mapRef.value.mapOperations.removeAll()
|
// mapRef.value.mapOperations.removeAll()
|
||||||
|
@ -351,7 +351,7 @@ const onOpenEditRole = (type, row) => {
|
||||||
mapEvents('1')
|
mapEvents('1')
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
else if (row.geometry.substring(0, row.geometry.indexOf("((")) == 'POLYGON') {
|
else if (row.geometry.indexOf("POLYGON")!=-1 ) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
state.radio = "2"
|
state.radio = "2"
|
||||||
// mapRef.value.mapOperations.removeAll()
|
// mapRef.value.mapOperations.removeAll()
|
||||||
|
|
Loading…
Reference in New Issue