diff --git a/scripts/0.0.12/emergency_shelter_basic_info_statistics.sql b/scripts/0.0.12/emergency_shelter_basic_info_statistics.sql index 840fdc8..2db0ba4 100644 --- a/scripts/0.0.12/emergency_shelter_basic_info_statistics.sql +++ b/scripts/0.0.12/emergency_shelter_basic_info_statistics.sql @@ -21,7 +21,7 @@ -- ---------------------------- DROP TABLE IF EXISTS "public"."emergency_shelter_basic_info_statistics"; CREATE TABLE "public"."emergency_shelter_basic_info_statistics" ( - "id" int4 NOT NULL DEFAULT nextval('emergency_shelter_basic_info_statistics_id_seq'::regclass), + "id" serial PRIMARY KEY, "shelter_name" text COLLATE "pg_catalog"."default" NOT NULL, "address" text COLLATE "pg_catalog"."default", "event_type" text COLLATE "pg_catalog"."default", @@ -112,8 +112,3 @@ INSERT INTO "public"."emergency_shelter_basic_info_statistics" VALUES (25, '八 INSERT INTO "public"."emergency_shelter_basic_info_statistics" VALUES (26, '银三角管理委员会银苑社区居民委员会应急避难场所', '南昌县银三角银苑社区居委会19栋旁', '自然灾害', '地震', '紧急避险场所(1天以内)', '室外', '单一型', '广场类', 1000.00, 1000.00, 3000, '疏散安置用具', '消防设施', '应急管理部门', '应急管理部门', '其他部门', '2015-11-01', '已纳入城市总体或城乡建设规划', 0.000, '待确认', 7, 7, '街道、社区、村', '有,未纳入预算', '财政'); INSERT INTO "public"."emergency_shelter_basic_info_statistics" VALUES (27, '莲塘镇斗柏路社区应急避难场所', '莲塘镇斗柏路369号阳光丽景广场', '其他突发事件', '其他突发事件', '紧急避险场所(1天以内)', '室外', '综合型', '广场类', 800.00, 800.00, 500, '疏散安置用具/医疗物资', '消防设施/医疗设施/通讯设施', '安监', '应急管理部门', '应急管理部门', '2015-08-03', '已纳入城市总体或城乡建设规划', 0.000, '应急避难场所建设标志', 6, 3, '街道、社区、村', '有,纳入预算', '财政'); INSERT INTO "public"."emergency_shelter_basic_info_statistics" VALUES (28, '南昌县洪州体育馆', '莲塘镇小蓝南路', '其他突发事件', '其他突发事件', '短期避难场所(2-14天)', '室内', '综合型', '体育场馆类', 15259.14, 7628.56, 5000, '医疗物资', '医疗设施', '应急管理部门', '应急管理部门', '其他部门', '2017-01-04', '未纳入城市总体或城乡建设规划', 23000.000, '待确认', 100, 20, '企事业单位', '有,未纳入预算', '其他'); - --- ---------------------------- --- Primary Key structure for table emergency_shelter_basic_info_statistics --- ---------------------------- -ALTER TABLE "public"."emergency_shelter_basic_info_statistics" ADD CONSTRAINT "emergency_shelter_basic_info_statistics_pkey" PRIMARY KEY ("id"); diff --git a/scripts/0.0.12/flood_control_headquarters.sql b/scripts/0.0.12/flood_control_headquarters.sql index d07f595..74cf31f 100644 --- a/scripts/0.0.12/flood_control_headquarters.sql +++ b/scripts/0.0.12/flood_control_headquarters.sql @@ -21,7 +21,7 @@ -- ---------------------------- DROP TABLE IF EXISTS "public"."flood_control_headquarters"; CREATE TABLE "public"."flood_control_headquarters" ( - "id" int4 NOT NULL DEFAULT nextval('flood_control_headquarters_id_seq'::regclass), + "id" serial PRIMARY KEY, "name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, "location" varchar(255) COLLATE "pg_catalog"."default", "dike_length" varchar(255) COLLATE "pg_catalog"."default", @@ -47,7 +47,3 @@ INSERT INTO "public"."flood_control_headquarters" VALUES (7, '抚西大堤防汛 INSERT INTO "public"."flood_control_headquarters" VALUES (8, '塘南防汛分指挥部', '塘南镇水管站', '31814 米', '付向宇、陈 欣、涂相鸿、刘龙军'); INSERT INTO "public"."flood_control_headquarters" VALUES (9, '泾口防汛分指挥部', '长乐联圩分中心', '68563 米', '易才宏、黄炳锋、万家平'); --- ---------------------------- --- Primary Key structure for table flood_control_headquarters --- ---------------------------- -ALTER TABLE "public"."flood_control_headquarters" ADD CONSTRAINT "flood_control_headquarters_pkey" PRIMARY KEY ("id"); diff --git a/scripts/0.0.12/rescue_teams.sql b/scripts/0.0.12/rescue_teams.sql index 21a1ec8..bbfeee1 100644 --- a/scripts/0.0.12/rescue_teams.sql +++ b/scripts/0.0.12/rescue_teams.sql @@ -84,8 +84,3 @@ INSERT INTO "public"."rescue_teams" VALUES (215, '南昌县金沙二路消防救 INSERT INTO "public"."rescue_teams" VALUES (201, '莲东政府专职队', '南昌县消防救援大队', '关秋华13767035813', '胡九阳13755659798', 26, '火灾抢险救援', '南昌县莲武路119号莲东消防救援站', '消防救援救援队伍'); INSERT INTO "public"."rescue_teams" VALUES (202, '洪大小型消防站', '南昌县消防救援大队', '张红付15797792928 ', '罗虎15179176646', 11, '火灾抢险救援', '江西省南昌市南昌县河洲路洪大物流园旁', '消防救援救援队伍'); INSERT INTO "public"."rescue_teams" VALUES (203, '邓埠小型消防站', '南昌县消防救援大队', '张志鹏13065172871', '张伟15180178441', 12, '火灾抢险救援', '江西省南昌市南昌县小蓝经济开发区定埠路201号百通物流里面', '消防救援救援队伍'); - --- ---------------------------- --- Primary Key structure for table rescue_teams --- ---------------------------- -ALTER TABLE "public"."rescue_teams" ADD CONSTRAINT "rescue_teams_pkey" PRIMARY KEY ("id"); diff --git a/super-screen/client/src/sections/fire-control/actions/example.js b/super-screen/client/src/sections/fire-control/actions/example.js deleted file mode 100644 index 6b3c25d..0000000 --- a/super-screen/client/src/sections/fire-control/actions/example.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -import { basicAction } from '@peace/utils' -import { ApiTable } from '$utils' - -// export function getMembers(orgId) { -// return dispatch => basicAction({ -// type: 'get', -// dispatch: dispatch, -// actionType: 'GET_MEMBERS', -// url: `${ApiTable.getEnterprisesMembers.replace('{enterpriseId}', orgId)}`, -// msg: { error: '获取用户列表失败' }, -// reducer: { name: 'members' } -// }); -// } diff --git a/super-screen/client/src/sections/fire-control/actions/fire.js b/super-screen/client/src/sections/fire-control/actions/fire.js new file mode 100644 index 0000000..1f17495 --- /dev/null +++ b/super-screen/client/src/sections/fire-control/actions/fire.js @@ -0,0 +1,42 @@ +'use strict'; + +import { basicAction } from '@peace/utils' +import { ApiTable } from '$utils' + +export function getFireAlarmList(query) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + query: query || {}, + actionType: 'GET_FIRE_ALARM', + url: `${ApiTable.getFireAlarmList}`, + msg: { error: '获取消防告警列表失败' }, + reducer: { name: 'riskReport' } + }); +} + +export function addFireAlarm(params) { + return (dispatch) => basicAction({ + type: 'post', + data: params, + dispatch, + actionType: 'ADD_RIST_REPORT', + url: ApiTable.getFireAlarmList, + msg: { + option: '新增消防告警', + }, + }); +} + +export function modifyFireAlarm(id, params) { + return (dispatch) => basicAction({ + type: 'put', + data: params, + dispatch, + actionType: 'MODIFY_FIRE_ALARM', + url: ApiTable.modifyFireAlarm.replace('{id}', id), + msg: { + option: '编辑消防告警', + }, + }); +} diff --git a/super-screen/client/src/sections/fire-control/actions/index.js b/super-screen/client/src/sections/fire-control/actions/index.js index 444af37..465e184 100644 --- a/super-screen/client/src/sections/fire-control/actions/index.js +++ b/super-screen/client/src/sections/fire-control/actions/index.js @@ -1,6 +1,6 @@ 'use strict'; -import * as example from './example' +import * as example from './fire' export default { ...example, diff --git a/super-screen/client/src/sections/fire-control/components/alarm-add.js b/super-screen/client/src/sections/fire-control/components/alarm-add.js new file mode 100644 index 0000000..96d8123 --- /dev/null +++ b/super-screen/client/src/sections/fire-control/components/alarm-add.js @@ -0,0 +1,91 @@ +import React, { useEffect, useState } from 'react'; +import { connect } from 'react-redux'; +import { Row, Col, Modal, Form, Input, Select, DatePicker } from 'antd'; +const { Opiton } = Select; +function FireAddForm(props) { + const { visible } = props; + const layout = { + labelCol: { span: 8 }, + wrapperCol: { span: 12 }, + }; + + const [form] = Form.useForm(); + const renderInfowindow = () => { + return
+
{ setVisible(false) }} /> +
+ + + + { + setLocationVisible(true) + }} + name="地点" label="地点" > + {/* */} +
{ setLocationVisible(true) }} + style={{ color: 'rgba(89, 153, 200, 1)', paddingLeft: 12 }}>请选择事件地点
+
+ + + + + + + + + + +
+
{ props.onCancel() }}>取消
+
{ form?.submit() }} className='report_button'>上报
+
+
+
+ } + + return ( + <> + {/* 新增告警 */} + + {renderInfowindow()} + + + ); +} + +export default connect()(FireAddForm); diff --git a/super-screen/client/src/sections/fire-control/containers/gis.js b/super-screen/client/src/sections/fire-control/containers/gis.js index 5a64d9b..53b5e25 100644 --- a/super-screen/client/src/sections/fire-control/containers/gis.js +++ b/super-screen/client/src/sections/fire-control/containers/gis.js @@ -1,8 +1,8 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { render } from 'react-dom'; -import { Row, Col, Modal, Form, Input, Select } from 'antd'; -import { heatmapData } from '../constant/index' +import { Row, Col, Modal, Form, Input, Select, Button } from 'antd'; +import FireAddForm from '../components/alarm-add' import './gis.less' const MAPDOMID = 'fs-amap-container-fire'; const LOCATION_MAP_ID = 'location_map_id'; @@ -67,7 +67,6 @@ function Map(props) { setDelay(false) }, 1000); map && renderAlarms() - loca && renderHeapLayer() }); map.on('click', (e) => { @@ -129,222 +128,6 @@ function Map(props) { }, [locationVisible]) - const renderMarkers = () => { - map.clearMap(); - map.setZoom(10.3) - map.setCenter([116.054664, 28.538966]) - map.setPitch(22.9) - map.setRotation(1.7000) - if (loca && heatmap) loca.remove(heatmap) - if (tab == 'person') { - - var geo = new Loca.GeoJSONSource({ - data: heatmapData - }); - - heatmap = new Loca.HeatMapLayer({ - // loca, - zIndex: 10, - opacity: 1, - visible: true, - zooms: [2, 22], - }); - - heatmap.setSource(geo, { - radius: 20, - unit: 'px', - height: 10, - // radius: 10, - // unit: 'px', - // height: 10, - gradient: { - 0.1: 'rgba(50,48,118,1)', - 0.2: 'rgba(127,60,255,1)', - 0.4: 'rgba(166,53,219,1)', - 0.6: 'rgba(254,64,95,1)', - 0.8: 'rgba(255,98,4,1)', - 1: 'rgba(236,220,79,1)', - }, - value: function (index, feature) { - return feature.properties.count; - }, - min: 0, - max: 10, //4.6 - heightBezier: [0, .53, .37, .98], - }); - loca.add(heatmap); - - map.on('click', (e) => { - const feat = heatmap.queryFeature(e.pixel.toArray()); - const random = Math.random() - if (feat) { - let infowindow = new AMap.InfoWindow({ - isCustom: true, //使用自定义窗体 - content: `
-
`, - offset: new AMap.Pixel(133, 260) - }); - - let position = map.getCenter(); - infowindow.open(map, position); - setTimeout(() => { - if (document.getElementById(`contentidheatmap${random}`)) { - render(
-
{ - map.clearInfoWindow(); - }} /> -
- 小区名称 - 小区名称 -
-
- 人口 - 2344人 -
-
- 新生儿 - 23人 -
-
- 老人 - 342人 -
-
, - document.getElementById(`contentidheatmap${random}`)); - } - }, 50) - - } - }); - } else { - //初始层级 zoom14以下显示聚合点 - const data = [ - { lng: 116.117906, lat: 28.678096, type: 'home', name: '廉租房1', kind: 'markergreen' }, - { lng: 116.195238, lat: 28.842114, type: 'home', name: '廉租房2', kind: 'markerblue' }, - { lng: 116.037227, lat: 28.558811, type: 'home', name: '廉租房3', kind: 'markeryellow' }, - { lng: 115.925856, lat: 28.558811, type: 'home', name: '廉租房4', kind: 'markergreen' }, - { lng: 115.989847, lat: 28.484411, type: 'home', name: '廉租房5', kind: 'markergreen' }, - - { lng: 116.054664, lat: 28.538966, type: 'device', name: '廉租房1', kind: 'markergreen' }, - { lng: 116.074711, lat: 28.746745, type: 'device', name: '廉租房2', kind: 'markerblue' }, - { lng: 116.111632, lat: 28.56532, type: 'device', name: '廉租房3', kind: 'markeryellow' }, - { lng: 115.978519, lat: 28.56532, type: 'device', name: '廉租房4', kind: 'markergreen' }, - { lng: 115.95792, lat: 28.417395, type: 'device', name: '廉租房5', kind: 'markergreen' }, - ] - - //zoom14以上显示详情 - const databig = [ - { lng: 115.924246, lat: 28.554835, type: 'device', name: '廉租房1', kind: 'markergreenbig' }, - { lng: 115.921495, lat: 28.553053, type: 'device', name: '廉租房2', kind: 'markerbluebig' }, - { lng: 115.919115, lat: 28.557256, type: 'device', name: '廉租房3', kind: 'markeryellowbig' }, - ] - //初始点位显示 - data.filter(s => s.type == tab).map((x, index) => { - var marker = new AMap.Marker({ - position: new AMap.LngLat(x.lng, x.lat), - // 将一张图片的地址设置为 icon - icon: '/assets/images/homepage/communtity/' + x.kind + '.png', - // 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点 - offset: new AMap.Pixel(-13, -30), - zooms: [3, 14], - }); - marker.setTitle(x.name); - map.add(marker); - marker.on('click', () => { - map.setZoom(17.4) - map.setCenter([115.922069, 28.554867]) - map.setPitch(47.30) - map.setRotation(1.7000) - }) - }) - //下钻点位显示 - databig.map((x, index) => { - var marker = new AMap.Marker({ - position: new AMap.LngLat(x.lng, x.lat), - // 将一张图片的地址设置为 icon - icon: '/assets/images/homepage/communtity/' + x.kind + '.png', - // 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点 - offset: new AMap.Pixel(-13, -30), - zooms: [15, 19], - }); - marker.setTitle(x.name); - map.add(marker); - - let infowindow = new AMap.InfoWindow({ - isCustom: true, //使用自定义窗体 - content: `
-
`, - offset: new AMap.Pixel(233, 260) - }); - - marker.on('click', () => { - let position = marker.getPosition ? marker.getPosition() : marker.getCenter(); - infowindow.open(map, position); - map.setCenter(position) - setTimeout(() => { - if (document.getElementById(`contentid${x.name}`)) { - render(
-
{ - map.setCenter([115.922069, 28.554867]) - map.clearInfoWindow(); - }} /> -
- 小区名称 - {x.name} -
-
- 人流量 - 123次 - 房龄 - 9年 -
-
- 租赁中房屋 - 165套 -
-
- 网格员 - 张三 -
-
- 手机号码 - 15765845845 -
-
, - document.getElementById(`contentid${x.name}`)); - } - }, 50) - }) - }) - - if (tab == 'device') { - const data = [ - { lng: 115.921895, lat: 28.556351, type: 'device', name: '廉租房1', kind: 'devicemarker' }, - { lng: 115.920839, lat: 28.555323, type: 'device', name: '廉租房2', kind: 'devicemarker' }, - { lng: 115.918329, lat: 28.55445, type: 'device', name: '廉租房3', kind: 'devicemarker' }, - { lng: 115.919309, lat: 28.553166, type: 'device', name: '廉租房1', kind: 'devicemarker' }, - { lng: 115.921585, lat: 28.553925, type: 'device', name: '廉租房2', kind: 'devicemarker' }, - { lng: 115.92565, lat: 28.556996, type: 'device', name: '廉租房3', kind: 'devicemarker' }, - { lng: 115.922671, lat: 28.558769, type: 'device', name: '廉租房1', kind: 'devicemarker' }, - ] - - data.filter(s => s.type == tab).map((x, index) => { - var marker = new AMap.Marker({ - position: new AMap.LngLat(x.lng, x.lat), - // 将一张图片的地址设置为 icon - icon: '/assets/images/homepage/communtity/' + x.kind + '.png', - // 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点 - offset: new AMap.Pixel(-13, -30), - zooms: [15, 19], - }); - marker.setTitle(x.name); - map.add(marker); - }) - } - } - - } - const renderAlarms = () => { // map.clearMap(); const alarms = [ @@ -409,43 +192,6 @@ function Map(props) { }) } - const renderHeapLayer = () => { - var geo = new Loca.GeoJSONSource({ - data: heatmapData - }); - - heatmap = new Loca.HeatMapLayer({ - // loca, - zIndex: 60, - opacity: 1, - visible: true, - zooms: [2, 22], - }); - - heatmap.setSource(geo, { - radius: 50, - unit: 'px', - height: 10, - // radius: 10, - // unit: 'px', - // height: 10, - gradient: { - 0.1: 'rgba(50,48,118,1)', - 0.2: 'rgba(127,60,255,1)', - 0.4: 'rgba(166,53,219,1)', - 0.6: 'rgba(254,64,95,1)', - 0.8: 'rgba(255,98,4,1)', - 1: 'rgba(236,220,79,1)', - }, - value: function (index, feature) { - return feature.properties.count; - }, - min: 0, - max: 10, //4.6 - heightBezier: [0, .53, .37, .98], - }); - loca.add(heatmap); - } const renderAlarmInfowindow = (x) => { return x && render(
@@ -497,15 +243,17 @@ function Map(props) { wrapperCol: { span: 12 }, }; + const [form] = Form.useForm(); const renderInfowindow = () => { return
{ setVisible(false) }} />
- + { @@ -517,21 +265,23 @@ function Map(props) { onClick={() => { setLocationVisible(true) }} style={{ color: 'rgba(89, 153, 200, 1)', paddingLeft: 12 }}>请选择事件地点
- + - + - + + +
+
{ setVisible(false) }}>取消
+
{ form?.submit() }} className='report_button'>上报
+
+ -
-
取消
-
上报
-
} @@ -600,20 +350,13 @@ function Map(props) {
- - {renderInfowindow()} - + onCancel={() => setVisible(false)} + /> + {/* 位置选点 */} label { @@ -459,6 +465,30 @@ .ant-input-placeholder { color: rgba(89, 153, 200, 1) !important; } + + .ant-select { + color: #FFF !important; + } + + .ant-picker { + background-color: transparent !important; + border: 1px solid transparent !important; + color: #FFF !important; + + } + + .ant-picker-input>input { + color: #FFF !important; + } + + .ant-picker-suffix { + color: rgba(89, 153, 200, 1); + } + + + .ant-picker-input::input-placeholder { + color: rgba(89, 153, 200, 1) !important; + } } .location_infowindow { diff --git a/super-screen/client/src/utils/webapi.js b/super-screen/client/src/utils/webapi.js index c6b3e0f..9b322f0 100644 --- a/super-screen/client/src/utils/webapi.js +++ b/super-screen/client/src/utils/webapi.js @@ -130,6 +130,10 @@ export const ApiTable = { getEmerExpertList: '_worksafety/emergency/resource-expert-list', // 应急专家 getEmerMedicalList: '_worksafety/emergency/resource-medical-list', // 医疗机构 getEmerRefugeList: '_worksafety/emergency/resource-refuge-list', // 避难场所 + + //消防 + getFireAlarmList: 'fire/alarm', + modifyFireAlarm: 'fire/alarm/{id}', }; export const RouteTable = {