修复审批定位,添加分配发送邮件,添加图层搜索

This commit is contained in:
yyhouc 2023-05-19 10:14:52 +08:00
parent 592076ba70
commit 39c3fb6446
4 changed files with 33 additions and 4 deletions

View File

@ -21,6 +21,7 @@
"js-cookie": "^3.0.1",
"js-md5": "^0.7.3",
"leaflet": "^1.9.3",
"leaflet-control-geocoder": "^2.4.0",
"leaflet-draw": "^1.0.4",
"leaflet-imageoverlay-rotated": "^0.2.1",
"mitt": "^3.0.0",

View File

@ -1,6 +1,5 @@
<template>
<div ref="map"
class="container"></div>
<div ref="map" class="container"></div>
</template>
<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/dist/leaflet-geoman.css';
import 'Leaflet-ImageOverlay-Rotated'
import 'leaflet-control-geocoder/dist/Control.Geocoder.css';
import 'leaflet-control-geocoder';
import { useVariableStore } from '/@/stores/index.ts'
import * as omnivore from '@mapbox/leaflet-omnivore'
const variableStore = useVariableStore()
@ -48,7 +49,33 @@ onMounted(() => {
featureLayerG_area = 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
* Object param 参数集合
* @param {

View File

@ -85,6 +85,7 @@ const save = async () => {
id: state.rowData.disasterId,
chiefId: state.selectData[0].id,
chiefName: state.selectData[0].name,
allocation:"YES"
};
let res = await submit(params).then(da=>{
ElMessage.success('Save success');

View File

@ -339,7 +339,7 @@ const onOpenEditRole = (type, row) => {
//
state.edit = JSON.parse(JSON.stringify(row));
state.dialogVisible = true;
if (row.geometry.substring(0, row.geometry.indexOf("((")) == 'Point') {
if (row.geometry.indexOf("POINT")!=-1) {
setTimeout(() => {
state.radio = "1"
// mapRef.value.mapOperations.removeAll()
@ -351,7 +351,7 @@ const onOpenEditRole = (type, row) => {
mapEvents('1')
}, 100);
}
else if (row.geometry.substring(0, row.geometry.indexOf("((")) == 'POLYGON') {
else if (row.geometry.indexOf("POLYGON")!=-1 ) {
setTimeout(() => {
state.radio = "2"
// mapRef.value.mapOperations.removeAll()