diff --git a/api/log/development.log b/api/log/development.log
index 6a4b708..e7b1f9b 100644
--- a/api/log/development.log
+++ b/api/log/development.log
@@ -4162,3 +4162,9 @@ notNull Violation: PatrolPlan.patrolCount cannot be null
2023-01-30 16:47:16.531 - debug: [FS-LOGGER] Init.
2023-01-30 16:47:16.660 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2023-01-30 16:47:16.661 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-01-30 17:12:59.959 - debug: [FS-LOGGER] Init.
+2023-01-30 17:13:00.144 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-01-30 17:13:00.144 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-01-30 17:16:09.126 - debug: [FS-LOGGER] Init.
+2023-01-30 17:16:09.250 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-01-30 17:16:09.250 - info: [FS-AUTH] Inject auth and api mv into router.
diff --git a/web/client/index.html b/web/client/index.html
index ad9326e..3f5eb76 100644
--- a/web/client/index.html
+++ b/web/client/index.html
@@ -2,28 +2,27 @@
-
+
{/* /^\d+$|^\d*\.\d+$/g */}
-
{
const sjh = /^\d+$|^\d*\.\d+$/g;
@@ -74,7 +111,7 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, q
~
- {
const sjh = /^\d+$|^\d*\.\d+$/g;
@@ -91,7 +128,25 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, q
>
+ {
+ setShowBaiduMap(true)
+ }} />
+
+
+
+
+
+
diff --git a/web/client/src/sections/projectRegime/components/projectAddModel.js b/web/client/src/sections/projectRegime/components/projectAddModel.js
index adb7527..b37f9fd 100644
--- a/web/client/src/sections/projectRegime/components/projectAddModel.js
+++ b/web/client/src/sections/projectRegime/components/projectAddModel.js
@@ -1,5 +1,6 @@
import React, { useState } from 'react';
-import { Button, Form, Input, Modal, Select, DatePicker } from 'antd';
+import { Button, Form, Input, Modal, Select, DatePicker, Icon } from 'antd';
+import { EnvironmentTwoTone } from '@ant-design/icons';
const { TextArea } = Input;
import { connect } from 'react-redux';
import Uploads from '$components/Uploads';
@@ -9,15 +10,50 @@ import moment from 'moment';
const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, firmList }) => {
const { projectRegime } = actions
- const [showBaiduMap, setShowBaiduMap] = useState(true)
+ const [showBaiduMap, setShowBaiduMap] = useState(false)
const [form] = Form.useForm();
useEffect(() => {
- // console.log(modelData);
+ if (modelData?.longitude && modelData?.latitude) {
+ form.setFieldValue('longitude', modelData?.longitude)
+ form.setFieldValue('latitude', modelData?.latitude)
+ }
+ var map = new AMap.Map('container', {
+ resizeEnable: true, //是否监控地图容器尺寸变化
+ zoom: 11, //初始化地图层级
+ center: [116.397428, 39.90923] //初始化地图中心点
+ });
+
+ var autoOptions = {
+ input: "tipinput"
+ };
+
+ AMap.plugin(['AMap.PlaceSearch', 'AMap.AutoComplete', 'AMap.Geocoder'], () => {
+ var auto = new AMap.AutoComplete(autoOptions);
+ var placeSearch = new AMap.PlaceSearch({
+ map: map
+ }); //构造地点查询类
+
+ function select (e) {
+ if (e) {
+ placeSearch.setCity(e.poi.adcode);
+ placeSearch.search(e.poi.name, function (status, result) {
+ form.setFieldValue('longitude', result.poiList.pois[0].location.lat)
+ form.setFieldValue('latitude', result.poiList.pois[0].location.lng)
+ }) //关键字查询查询
+ }
+ }
+ auto.on("select", select);//注册监听,当选中某条记录时会触发
+ map.on('click', function (e) { //点击地图获取经纬度
+ form.setFieldValue('longitude', e.lnglat.lat)
+ form.setFieldValue('latitude', e.lnglat.lng)
+ });
+ });
}, [])
+
return (
-
-
+ {
const sjh = /^\d+$|^\d*\.\d+$/g;
@@ -106,22 +142,25 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f
>
+ {
+ setShowBaiduMap(true)
+ }} />
- {/*
-
+
-
- */}
+
+
diff --git a/web/log/development.txt b/web/log/development.txt
index c4bf971..a87d246 100644
--- a/web/log/development.txt
+++ b/web/log/development.txt
@@ -5554,3 +5554,30 @@
[32m'/_file-server/project/44501f2a-8fc5-4192-9669-efab29f2de23/5'[39m,
[32m'jpg'[39m
]
+2023-01-30 17:12:58.649 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-30 17:12:58.670 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-30 17:12:59.170 - [32minfo[39m: [Router] Inject api: attachment/index
+2023-01-30 17:16:13.327 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-30 17:16:13.330 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-30 17:16:13.565 - [32minfo[39m: [Router] Inject api: attachment/index
+2023-01-30 17:18:13.216 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-30 17:18:13.220 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-30 17:18:13.440 - [32minfo[39m: [Router] Inject api: attachment/index
+2023-01-30 17:22:40.363 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-30 17:22:40.367 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-30 17:22:40.595 - [32minfo[39m: [Router] Inject api: attachment/index
+2023-01-30 17:26:24.834 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-30 17:26:24.838 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-30 17:26:25.086 - [32minfo[39m: [Router] Inject api: attachment/index
+2023-01-30 17:31:02.807 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-30 17:31:02.811 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-30 17:31:03.033 - [32minfo[39m: [Router] Inject api: attachment/index
+2023-01-30 17:36:21.492 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-30 17:36:21.495 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-30 17:36:21.726 - [32minfo[39m: [Router] Inject api: attachment/index
+2023-01-30 17:40:58.100 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-30 17:40:58.103 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-30 17:40:58.323 - [32minfo[39m: [Router] Inject api: attachment/index
+2023-01-31 08:39:58.707 - [34mdebug[39m: [FS-LOGGER] Init.
+2023-01-31 08:39:58.710 - [34mdebug[39m: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-01-31 08:39:59.052 - [32minfo[39m: [Router] Inject api: attachment/index