Browse Source

(*)消防功能提交

master
peng.peng 1 year ago
parent
commit
57667c0504
  1. 3
      api/app/lib/controllers/superScreen/water.js
  2. 97
      api/app/lib/models/emergency_equipment_registration.js
  3. 9
      api/app/lib/models/rescue_teams.js
  4. 33
      scripts/0.0.12/emergency_equipment_registration.sql
  5. 83
      scripts/0.0.12/rescue_teams.sql
  6. BIN
      super-screen/client/assets/images/homepage/fire/alarminfowindow.png
  7. BIN
      super-screen/client/assets/images/homepage/fire/rescue_icon.png
  8. BIN
      super-screen/client/assets/images/homepage/fire/rescue_label.png
  9. 2
      super-screen/client/src/sections/fire-control/actions/fire.js
  10. 6
      super-screen/client/src/sections/fire-control/components/alarm-add.js
  11. 80
      super-screen/client/src/sections/fire-control/components/item-left.js
  12. 77
      super-screen/client/src/sections/fire-control/components/item-right.js
  13. 4
      super-screen/client/src/sections/fire-control/components/location-select.js
  14. 33
      super-screen/client/src/sections/fire-control/components/style.less
  15. 57
      super-screen/client/src/sections/fire-control/components/time.js
  16. 130
      super-screen/client/src/sections/fire-control/constant/index.js
  17. 323
      super-screen/client/src/sections/fire-control/containers/gis.js
  18. 111
      super-screen/client/src/sections/fire-control/containers/gis.less
  19. 27
      super-screen/client/src/sections/fire-control/containers/homePage.js
  20. 118
      super-screen/client/src/sections/water-prevention/components/style.less

3
api/app/lib/controllers/superScreen/water.js

@ -26,9 +26,11 @@ function getEmergencyList(opts) {
//EmergencyMaterialStatistics 应急物资
//EmergencyShelterBasicInfoStatistics 应急避难场所
//RescueTeams(医疗救援队伍 人民武装部救援队伍 消防救援救援队伍)
//EmergencyEquipmentRegistration 消防应急物资
const emergencyMaterial = await models.EmergencyMaterialStatistics.findAll();
const eEmergencyShelter = await models.EmergencyShelterBasicInfoStatistics.findAll();
const rescue = await models.RescueTeams.findAll();
const xfyjwz = await models.EmergencyEquipmentRegistration.findAll();
const rslt = {
yjwz: emergencyMaterial,//应急物资
@ -36,6 +38,7 @@ function getEmergencyList(opts) {
rmwzb: rescue.filter(s => s.teamCategory == '人民武装部救援队伍'),//人民武装部
yljy: rescue.filter(s => s.teamCategory == '医疗救援队伍'),//医疗救援
yjbns: eEmergencyShelter, //应急避难场所
xfyjwz: xfyjwz,//消防应急物资
}
ctx.status = 200;

97
api/app/lib/models/emergency_equipment_registration.js

@ -0,0 +1,97 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const EmergencyEquipmentRegistration = sequelize.define("emergencyEquipmentRegistration", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "名称",
primaryKey: false,
field: "name",
autoIncrement: false
},
type: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "类别",
primaryKey: false,
field: "type",
autoIncrement: false
},
unit: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "计量单位",
primaryKey: false,
field: "unit",
autoIncrement: false
},
count: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "数量",
primaryKey: false,
field: "count",
autoIncrement: false
},
function: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "主要性能",
primaryKey: false,
field: "function",
autoIncrement: false
},
purpose: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "用途",
primaryKey: false,
field: "purpose",
autoIncrement: false
},
status: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "技术状况",
primaryKey: false,
field: "status",
autoIncrement: false
},
inTime: {
type: DataTypes.DATEONLY,
allowNull: true,
defaultValue: null,
comment: "入库日期",
primaryKey: false,
field: "in_time",
autoIncrement: false
}
}, {
tableName: "emergency_equipment_registration",
comment: "",
indexes: []
});
dc.models.EmergencyEquipmentRegistration = EmergencyEquipmentRegistration;
return EmergencyEquipmentRegistration;
};

9
api/app/lib/models/rescue_teams.js

@ -86,6 +86,15 @@ module.exports = dc => {
primaryKey: false,
field: "team_category",
autoIncrement: false
},
location: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经纬度",
primaryKey: false,
field: "location",
autoIncrement: false
}
}, {
tableName: "rescue_teams",

33
scripts/0.0.12/emergency_equipment_registration.sql

@ -0,0 +1,33 @@
DROP TABLE IF EXISTS "public"."emergency_equipment_registration";
CREATE TABLE "public"."emergency_equipment_registration" (
"id" serial PRIMARY KEY,
"name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"type" varchar(255) COLLATE "pg_catalog"."default",
"unit" varchar(255) COLLATE "pg_catalog"."default",
"count" int4,
"function" varchar(255) COLLATE "pg_catalog"."default",
"purpose" varchar(255) COLLATE "pg_catalog"."default",
"status" varchar(255) COLLATE "pg_catalog"."default",
"in_time" date
)
;
COMMENT ON COLUMN "public"."emergency_equipment_registration"."name" IS '名称';
COMMENT ON COLUMN "public"."emergency_equipment_registration"."type" IS '类别';
COMMENT ON COLUMN "public"."emergency_equipment_registration"."unit" IS '计量单位';
COMMENT ON COLUMN "public"."emergency_equipment_registration"."count" IS '数量';
COMMENT ON COLUMN "public"."emergency_equipment_registration"."function" IS '主要性能';
COMMENT ON COLUMN "public"."emergency_equipment_registration"."purpose" IS '用途';
COMMENT ON COLUMN "public"."emergency_equipment_registration"."status" IS '技术状况';
COMMENT ON COLUMN "public"."emergency_equipment_registration"."in_time" IS '入库日期';
-- ----------------------------
-- Records of emergency_equipment_registration
-- ----------------------------
INSERT INTO "public"."emergency_equipment_registration" VALUES (1, '地震应急包', '地震救援', '', 250, '应急救援', '救援', '堪用', '2021-12-01');
INSERT INTO "public"."emergency_equipment_registration" VALUES (2, '运兵车', '森林灭火', '', 1, '运输', '灭火', '堪用', '2018-12-31');
INSERT INTO "public"."emergency_equipment_registration" VALUES (3, '对讲机', '森林灭火', '', 42, '通信联络', '灭火', '堪用', '2018-12-31');
INSERT INTO "public"."emergency_equipment_registration" VALUES (4, 'GPS', '森林灭火', '', 4, '灭火救援', '灭火', '堪用', '2018-12-31');
INSERT INTO "public"."emergency_equipment_registration" VALUES (5, '风力灭火机', '森林灭火', '', 16, '灭火救援', '灭火', '堪用', '2018-12-31');
INSERT INTO "public"."emergency_equipment_registration" VALUES (6, '细水雾灭火机', '森林灭火', '', 2, '灭火救援', '灭火', '堪用', '2018-12-31');
INSERT INTO "public"."emergency_equipment_registration" VALUES (7, '背负式高压水雾喷射器', '森林灭火', '', 6, '灭火救援', '灭火', '堪用', '2018-12-31');

83
scripts/0.0.12/rescue_teams.sql

@ -12,7 +12,7 @@
Target Server Version : 120001
File Encoding : 65001
Date: 16/08/2023 11:25:20
Date: 21/08/2023 13:58:24
*/
@ -29,7 +29,8 @@ CREATE TABLE "public"."rescue_teams" (
"total_members" int4,
"team_type" varchar(255) COLLATE "pg_catalog"."default",
"base_address" varchar(255) COLLATE "pg_catalog"."default",
"team_category" varchar(255) COLLATE "pg_catalog"."default"
"team_category" varchar(255) COLLATE "pg_catalog"."default",
"location" varchar(50) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."rescue_teams"."id" IS '序号';
@ -42,45 +43,47 @@ COMMENT ON COLUMN "public"."rescue_teams"."total_members" IS '总人数';
COMMENT ON COLUMN "public"."rescue_teams"."team_type" IS '队伍类型';
COMMENT ON COLUMN "public"."rescue_teams"."base_address" IS '驻地地址';
COMMENT ON COLUMN "public"."rescue_teams"."team_category" IS '队伍种类';
COMMENT ON COLUMN "public"."rescue_teams"."location" IS '经纬度';
-- ----------------------------
-- Records of rescue_teams
-- ----------------------------
INSERT INTO "public"."rescue_teams" VALUES (1, '南昌县人民医院救援队', '南昌县人民医院', '徐凡13576016651', '王明成15979059400', 15, '医疗救援', '南昌县莲塘镇向阳路199号', '医疗救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (2, '南昌县中医院应急救援队', '南昌县中医院', '陶国金13607085068', '陶国金13607085068', 5, '医疗救援', '南昌县莲塘镇澄湖西路2016号', '医疗救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (101, '南昌县应急连', '南昌县人武部', '涂青松19970071988', '余小根18970913996', 120, '应急力量', '南昌县澄湖东路1766号', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (102, '莲塘镇应急排', '南昌县人武部', '涂青松19970071988', '朱力13767073441', 30, '应急力量', '南昌县澄湖东路1766号', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (103, '向塘镇应急排', '南昌县人武部', '涂青松19970071988', '王瑰13732952135', 30, '应急力量', '南昌县星城大道8号', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (104, '蒋巷镇应急排', '南昌县人武部', '涂青松19970071988', '陈莹奕17779152056', 30, '应急力量', '南昌县蒋巷中大道蒋巷镇政府蒋巷镇委', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (105, '幽兰镇应急排', '南昌县人武部', '涂青松19970071988', '高强17770080479', 30, '应急力量', '南昌县西大街幽兰镇人大', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (106, '塘南镇应急排', '南昌县人武部', '涂青松19970071988', '倪志超19979065868', 30, '应急力量', '南昌县拓林路塘南镇政府南昌市塘南政委', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (107, '武阳镇应急排', '南昌县人武部', '涂青松19970071988', '徐勇15170066968', 30, '应急力量', '南昌县文武路与武阳路交叉路口北侧', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (108, '冈上镇应急排', '南昌县人武部', '涂青松19970071988', '郑海安18979168860', 30, '应急力量', '南昌县冈上镇通江西大道冈上派出所旁', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (109, '广福镇应急排', '南昌县人武部', '涂青松19970071988', '陈思伦15870655486', 30, '应急力量', '南昌县广福镇委105国道西', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (110, '三江镇应急排', '南昌县人武部', '涂青松19970071988', '黄强19979953251', 30, '应急力量', '南昌县三江大道与解放路交叉路口往南约60米', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (111, '泾口乡应急排', '南昌县人武部', '涂青松19970071988', '樊利18900381995', 30, '应急力量', '南昌县府前路泾口供销社贸易大楼东南侧约210米', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (112, '南新乡应急排', '南昌县人武部', '涂青松19970071988', '熊永青15797751775', 30, '应急力量', '南昌县南新乡楼前街18号', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (113, '八一乡应急排', '南昌县人武部', '涂青松19970071988', '龚志刚15079114793', 30, '应急力量', '南昌县八一乡莲谢西路81号', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (114, '黄马乡应急排', '南昌县人武部', '涂青松19970071988', '吴继明15070060176', 30, '应急力量', '南昌县黄马乡振兴大道2号', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (115, '塔城乡应急排', '南昌县人武部', '涂青松19970071988', '罗传奎15979071040', 30, '应急力量', '南昌县塔城乡X023', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (116, '富山乡应急排', '南昌县人武部', '涂青松19970071988', '涂洪涛15079199269', 30, '应急力量', '南昌县富山乡迎富大道与振林东路路口', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (117, '东新乡应急排', '南昌县人武部', '涂青松19970071988', '纪春迪13767179115', 30, '应急力量', '南昌县东新乡东祥路6666号', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (118, '金湖管理处应急排', '南昌县人武部', '涂青松19970071988', '涂广涛13879181969', 30, '应急力量', '南昌县澄湖北大道99号澄碧湖大厦内', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (119, '银三角管委会应急排', '南昌县人武部', '涂青松19970071988', '熊华耀13979125819', 30, '应急力量', '南昌县澄湖北大道100号澄碧湖大厦内', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (120, '八月湖街道办应急排', '南昌县人武部', '涂青松19970071988', '邹鹏18170073365', 30, '应急力量', '南昌县诚义路与象湖路交叉口西南150米', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (121, '县人武部防汛抢险救援队伍', '南昌县人武部', '涂青松19970071988', '涂青松19970071988', 500, '应急力量', '南昌县澄湖东路1766号', '人民武装部救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (204, '莲塘小型消防站', '南昌县消防救援大队', '李强强13870099644', '李顺齐18579069297', 14, '火灾抢险救援', '南昌县莲塘镇莲富路莲塘小型消防站', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (205, '蒋巷专职消防队', '南昌县消防救援大队', '刘文辉15070915888', '刘强13970929810', 11, '火灾抢险救援', '蒋巷镇为民路老地税局旁', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (206, '向塘专职消防队', '南昌县消防救援大队', '陈锋13647001393', '李仁伟13437916266', 13, '火灾抢险救援', '江西省南昌市南昌县向塘镇银河西路新力星塘湾旁', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (207, '幽兰专职消防队', '南昌县消防救援大队', '胡友龙13576935299', '丁书豪18079163793', 6, '火灾抢险救援', '江西省南昌市南昌县幽兰镇枫林村魏家自然村12号', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (208, '塔城专职消防队', '南昌县消防救援大队', '邹仕阳13006202930', '喻学群18679936858', 6, '火灾抢险救援', '南昌县塔城乡邮政所院内', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (209, '塘南专职消防队', '南昌县消防救援大队', '万小红13767991998', '陈文迪18162108356', 7, '火灾抢险救援', '南昌县塘南镇东港口村', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (210, '新联专职消防队', '南昌县消防救援大队', '李小明15879086266', '刘廷赣15170004231', 7, '火灾抢险救援', '江西省南昌市南昌县新联乡红北路回收站对面', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (211, '广福专职消防队', '南昌县消防救援大队', '万海龙15879021690', '张国强13576023306', 5, '火灾抢险救援', '江西省南昌市南昌县广福镇南井南路60号', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (212, '南新专职消防队', '南昌县消防救援大队', '徐招福13970906323', '万中微15170087462', 4, '火灾抢险救援', '江西省南昌市南昌县南新客运站', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (213, '黄马专职消防队', '南昌县消防救援大队', '章良新13767973188', '吴桂华13755768116', 6, '火灾抢险救援', '江西省南昌市南昌县黄马乡文教东路', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (214, '冈上专职消防队', '南昌县消防救援大队', '王俊13576077742', '罗唐龙18779880568', 6, '火灾抢险救援', '南昌县冈上镇中心小学旁', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (215, '南昌县金沙二路消防救援站', '南昌县消防救援大队', '周志华13870619068', '吴建树15007003538', 30, '国家综合性救援队', '南昌县富山大道与金沙二路交界处', '消防救援救援队伍');
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号百通物流里面', '消防救援救援队伍');
INSERT INTO "public"."rescue_teams" VALUES (1, '南昌县人民医院救援队', '南昌县人民医院', '徐凡13576016651', '王明成15979059400', 15, '医疗救援', '南昌县莲塘镇向阳路199号', '医疗救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (2, '南昌县中医院应急救援队', '南昌县中医院', '陶国金13607085068', '陶国金13607085068', 5, '医疗救援', '南昌县莲塘镇澄湖西路2016号', '医疗救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (101, '南昌县应急连', '南昌县人武部', '涂青松19970071988', '余小根18970913996', 120, '应急力量', '南昌县澄湖东路1766号', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (102, '莲塘镇应急排', '南昌县人武部', '涂青松19970071988', '朱力13767073441', 30, '应急力量', '南昌县澄湖东路1766号', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (103, '向塘镇应急排', '南昌县人武部', '涂青松19970071988', '王瑰13732952135', 30, '应急力量', '南昌县星城大道8号', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (104, '蒋巷镇应急排', '南昌县人武部', '涂青松19970071988', '陈莹奕17779152056', 30, '应急力量', '南昌县蒋巷中大道蒋巷镇政府蒋巷镇委', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (105, '幽兰镇应急排', '南昌县人武部', '涂青松19970071988', '高强17770080479', 30, '应急力量', '南昌县西大街幽兰镇人大', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (106, '塘南镇应急排', '南昌县人武部', '涂青松19970071988', '倪志超19979065868', 30, '应急力量', '南昌县拓林路塘南镇政府南昌市塘南政委', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (107, '武阳镇应急排', '南昌县人武部', '涂青松19970071988', '徐勇15170066968', 30, '应急力量', '南昌县文武路与武阳路交叉路口北侧', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (108, '冈上镇应急排', '南昌县人武部', '涂青松19970071988', '郑海安18979168860', 30, '应急力量', '南昌县冈上镇通江西大道冈上派出所旁', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (109, '广福镇应急排', '南昌县人武部', '涂青松19970071988', '陈思伦15870655486', 30, '应急力量', '南昌县广福镇委105国道西', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (110, '三江镇应急排', '南昌县人武部', '涂青松19970071988', '黄强19979953251', 30, '应急力量', '南昌县三江大道与解放路交叉路口往南约60米', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (111, '泾口乡应急排', '南昌县人武部', '涂青松19970071988', '樊利18900381995', 30, '应急力量', '南昌县府前路泾口供销社贸易大楼东南侧约210米', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (112, '南新乡应急排', '南昌县人武部', '涂青松19970071988', '熊永青15797751775', 30, '应急力量', '南昌县南新乡楼前街18号', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (113, '八一乡应急排', '南昌县人武部', '涂青松19970071988', '龚志刚15079114793', 30, '应急力量', '南昌县八一乡莲谢西路81号', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (114, '黄马乡应急排', '南昌县人武部', '涂青松19970071988', '吴继明15070060176', 30, '应急力量', '南昌县黄马乡振兴大道2号', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (115, '塔城乡应急排', '南昌县人武部', '涂青松19970071988', '罗传奎15979071040', 30, '应急力量', '南昌县塔城乡X023', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (116, '富山乡应急排', '南昌县人武部', '涂青松19970071988', '涂洪涛15079199269', 30, '应急力量', '南昌县富山乡迎富大道与振林东路路口', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (117, '东新乡应急排', '南昌县人武部', '涂青松19970071988', '纪春迪13767179115', 30, '应急力量', '南昌县东新乡东祥路6666号', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (118, '金湖管理处应急排', '南昌县人武部', '涂青松19970071988', '涂广涛13879181969', 30, '应急力量', '南昌县澄湖北大道99号澄碧湖大厦内', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (119, '银三角管委会应急排', '南昌县人武部', '涂青松19970071988', '熊华耀13979125819', 30, '应急力量', '南昌县澄湖北大道100号澄碧湖大厦内', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (120, '八月湖街道办应急排', '南昌县人武部', '涂青松19970071988', '邹鹏18170073365', 30, '应急力量', '南昌县诚义路与象湖路交叉口西南150米', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (121, '县人武部防汛抢险救援队伍', '南昌县人武部', '涂青松19970071988', '涂青松19970071988', 500, '应急力量', '南昌县澄湖东路1766号', '人民武装部救援队伍', NULL);
INSERT INTO "public"."rescue_teams" VALUES (204, '莲塘小型消防站', '南昌县消防救援大队', '李强强13870099644', '李顺齐18579069297', 14, '火灾抢险救援', '南昌县莲塘镇莲富路莲塘小型消防站', '消防救援救援队伍', '115.940609,28.542945');
INSERT INTO "public"."rescue_teams" VALUES (205, '蒋巷专职消防队', '南昌县消防救援大队', '刘文辉15070915888', '刘强13970929810', 11, '火灾抢险救援', '蒋巷镇为民路老地税局旁', '消防救援救援队伍', '116.030873,28.768705');
INSERT INTO "public"."rescue_teams" VALUES (206, '向塘专职消防队', '南昌县消防救援大队', '陈锋13647001393', '李仁伟13437916266', 13, '火灾抢险救援', '江西省南昌市南昌县向塘镇银河西路新力星塘湾旁', '消防救援救援队伍', '115.965868,28.454384');
INSERT INTO "public"."rescue_teams" VALUES (207, '幽兰专职消防队', '南昌县消防救援大队', '胡友龙13576935299', '丁书豪18079163793', 6, '火灾抢险救援', '江西省南昌市南昌县幽兰镇枫林村魏家自然村12号', '消防救援救援队伍', '116.165356,28.583497');
INSERT INTO "public"."rescue_teams" VALUES (208, '塔城专职消防队', '南昌县消防救援大队', '邹仕阳13006202930', '喻学群18679936858', 6, '火灾抢险救援', '南昌县塔城乡邮政所院内', '消防救援救援队伍', '116.102695,28.5084');
INSERT INTO "public"."rescue_teams" VALUES (209, '塘南专职消防队', '南昌县消防救援大队', '万小红13767991998', '陈文迪18162108356', 7, '火灾抢险救援', '南昌县塘南镇东港口村', '消防救援救援队伍', '116.158256,28.662788');
INSERT INTO "public"."rescue_teams" VALUES (210, '新联专职消防队', '南昌县消防救援大队', '李小明15879086266', '刘廷赣15170004231', 7, '火灾抢险救援', '江西省南昌市南昌县新联乡红北路回收站对面', '消防救援救援队伍', '116.257482,28.738728');
INSERT INTO "public"."rescue_teams" VALUES (211, '广福专职消防队', '南昌县消防救援大队', '万海龙15879021690', '张国强13576023306', 5, '火灾抢险救援', '江西省南昌市南昌县广福镇南井南路60号', '消防救援救援队伍', '115.919026,28.367753');
INSERT INTO "public"."rescue_teams" VALUES (212, '南新专职消防队', '南昌县消防救援大队', '徐招福13970906323', '万中微15170087462', 4, '火灾抢险救援', '江西省南昌市南昌县南新客运站', '消防救援救援队伍', '116.076911,28.803583');
INSERT INTO "public"."rescue_teams" VALUES (213, '黄马专职消防队', '南昌县消防救援大队', '章良新13767973188', '吴桂华13755768116', 6, '火灾抢险救援', '江西省南昌市南昌县黄马乡文教东路', '消防救援救援队伍', '116.024803,28.351752');
INSERT INTO "public"."rescue_teams" VALUES (215, '南昌县金沙二路消防救援站', '南昌县消防救援大队', '周志华13870619068', '吴建树15007003538', 30, '国家综合性救援队', '南昌县富山大道与金沙二路交界处', '消防救援救援队伍', '115.88316,28.545788');
INSERT INTO "public"."rescue_teams" VALUES (214, '冈上专职消防队', '南昌县消防救援大队', '王俊13576077742', '罗唐龙18779880568', 6, '火灾抢险救援', '南昌县冈上镇中心小学旁', '消防救援救援队伍', '115.858906,28.412001');
INSERT INTO "public"."rescue_teams" VALUES (203, '邓埠小型消防站', '南昌县消防救援大队', '张志鹏13065172871', '张伟15180178441', 12, '火灾抢险救援', '江西省南昌市南昌县小蓝经济开发区定埠路201号百通物流里面', '消防救援救援队伍', '115.907418,28.57472');
INSERT INTO "public"."rescue_teams" VALUES (202, '洪大小型消防站', '南昌县消防救援大队', '张红付15797792928 ', '罗虎15179176646', 11, '火灾抢险救援', '江西省南昌市南昌县河洲路洪大物流园旁', '消防救援救援队伍', '115.847567,28.606392');
INSERT INTO "public"."rescue_teams" VALUES (201, '莲东政府专职队', '南昌县消防救援大队', '关秋华13767035813', '胡九阳13755659798', 26, '火灾抢险救援', '南昌县莲武路119号莲东消防救援站', '消防救援救援队伍', '115.959336,28.536176');

BIN
super-screen/client/assets/images/homepage/fire/alarminfowindow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 KiB

BIN
super-screen/client/assets/images/homepage/fire/rescue_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
super-screen/client/assets/images/homepage/fire/rescue_label.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

2
super-screen/client/src/sections/fire-control/actions/fire.js

@ -36,7 +36,7 @@ export function modifyFireAlarm(id, params) {
actionType: 'MODIFY_FIRE_ALARM',
url: ApiTable.modifyFireAlarm.replace('{id}', id),
msg: {
option: '编辑消防告警',
option: '',
},
});
}

6
super-screen/client/src/sections/fire-control/components/alarm-add.js

@ -22,7 +22,7 @@ function FireAddForm(props) {
const eventType = Form.useWatch('type', form);
const renderInfowindow = () => {
return <div className='report_container' style={{ height: 500 }}>
return <div className='report_container' style={{ height: 510, paddingTop: 135 }}>
<div className='gis_exit' style={{ top: 54 }} onClick={() => { props.onCancel() }} />
<Form
form={form}
@ -32,6 +32,7 @@ function FireAddForm(props) {
onFinish={_ => {
form.validateFields()
.then((values) => {
form?.resetFields()
props.onFinish(values)
})
.catch((errorInfo) => {
@ -50,7 +51,6 @@ function FireAddForm(props) {
<div
onClick={() => { props.locationClick() }}
style={{ color: 'rgba(89, 153, 200, 1)', paddingLeft: 12 }}>{location?.location ?
<Tooltip placement="top" title={location?.location}>
<span style={{ color: '#FFF' }}>{location?.location?.length > 10 ? location?.location?.substring(0, 10) + '...' : location?.location}</span>
</Tooltip>
@ -96,7 +96,7 @@ function FireAddForm(props) {
</Form.Item>}
<div className='flex-row flex-content-around' style={{ position: 'absolute', bottom: ' 38px', width: '100%' }}>
<div className='flex-row flex-content-around' style={{ position: 'absolute', bottom: ' 42px', width: '100%', paddingLeft: 35, paddingRight: 35 }}>
<div className='cancel_button' onClick={() => { props.onCancel() }}>取消</div>
<div onClick={() => { form?.submit() }} className='report_button'>上报</div>
</div>

80
super-screen/client/src/sections/fire-control/components/item-left.js

@ -1,68 +1,70 @@
import React from 'react'
import { Box } from '$components';
import { Box, AutoRollComponent } from '$components';
import moment from 'moment'
import { getName, getPhone } from '$utils';
import TimeComponent from './time';
import './style.less'
function BasicInfo(props) {
const { info: {
alarmInfo,
rescueInfo
} } = props;
let name = '', phone = ''
if (rescueInfo?.leaderContactPhone) {
let str = rescueInfo?.leaderContactPhone.replace(/\s*/g, "");
name = str.substring(0, str.length - 11)
phone = str.substring(str.length - 11, str.length)
}
return <Box title={"事件概况"} >
<div className='item_left-container '>
<div className='item_left-container'>
<div className='alarm_time'>
22:02:45
{alarmInfo?.createTime && <TimeComponent key={alarmInfo?.createTime} createTime={alarmInfo?.createTime} />}
</div>
<div className='end_event' onClick={() => { props.endEvent() }}>结束案件</div>
<div className='event_title'><div className='event_title_left' /><span>南昌县第一消防大队</span><div className='event_title_right' /></div>
<div className='event_title'><div className='event_title_left' /><span>{rescueInfo?.teamName}</span><div className='event_title_right' /></div>
<div className='left_second_bg'>
<div className='_second_item1'>
<div className='_title'>着火场所</div>
<div className='_content' style={{ marginBottom: 9 }}>住宅</div>
<div className='_title'>人员分布情况</div>
<div className='_content'>密集</div>
<div className='_title'>负责人</div>
<div className='_content'>{getName(name)}</div>
</div>
<div className='_second_item2'>
<div className='_title'>着火物质</div>
<div className='_content' style={{ marginBottom: 9 }}>煤气</div>
<div className='_title' >是否需要救援</div>
<div className='_content'></div>
<div className='_title'>联系方式</div>
<div className='_content' style={{ marginBottom: 9 }}>{getPhone(phone)}</div>
</div>
</div>
<div className='left_third_bg'>
<div className='left_item_left1'>
<div></div>
</div>
<div className='left_item_left1' />
<div className='left_item_right1'>
<div className='flex-row '><span style={{ marginRight: 30 }}>案件名称</span><span></span></div>
<div className='flex-row '><span style={{ marginRight: 30 }}>火灾扑救</span><span>2023-06-16 12:30:30</span></div>
<div className='flex-row '><span style={{ marginRight: 30 }}>警情类型</span><span></span></div>
<div className='flex-row ' style={{ color: "#8FCBFF", marginTop: 9 }}><span style={{ marginRight: 30 }}>{alarmInfo?.type}</span><span>{moment(alarmInfo?.createTime).format('YYYY-MM-DD HH:mm:ss')}</span></div>
</div>
</div>
<div className='left_third_bg'>
<div className='left_item_left2'>
<div></div>
</div>
<div className='left_item_right1'>
<div className='flex-row '><span style={{ marginRight: 30 }}>案件名称</span><span></span></div>
<div className='flex-row '><span style={{ marginRight: 30 }}>火灾扑救</span><span>2023-06-16 12:30:30</span></div>
<div className='left_item_left1' />
<div className='left_item_right1' style={{ textAlign: 'left' }}>
<div><span style={{ marginRight: 30 }}>案件地点</span></div>
<div style={{ color: "#8FCBFF", marginTop: 9 }}>{alarmInfo?.location}</div>
</div>
</div>
<div className='left_third_bg'>
<div className='left_item_left3'>
<div></div>
</div>
<div className='left_item_right1'>
<div className='flex-row '><span style={{ marginRight: 30 }}>案件名称</span><span></span></div>
<div className='flex-row '><span style={{ marginRight: 30 }}>火灾扑救</span><span>2023-06-16 12:30:30</span></div>
</div>
</div>
<div className='left_third_bg' style={{ height: 160, paddingTop: 20 }}>
<div className='left_item_left1' />
<div className='left_item_right1' style={{ textAlign: 'left' }}>
<div><span style={{ marginRight: 30, marginBottom: 15 }}>路线规划</span></div>
<AutoRollComponent key={alarmInfo?.id} canScroll={alarmInfo?.routes?.steps?.length > 3}
content={<div style={{ color: "#8FCBFF", marginTop: 9, paddingTop: 10 }}>{alarmInfo?.routes?.steps?.map((s, index) => (index + 1) + '.' + s?.instruction).map(x => {
return <div style={{ marginBottom: 10 }}>{x}</div>
})}</div>}
divHeight={100} divId={`fire-left-bottom${alarmInfo?.id}`} />
<div className='left_third_bg'>
<div className='left_item_left4'>
<div></div>
</div>
<div className='left_item_right1'>
<div className='flex-row '><span style={{ marginRight: 30 }}>案件名称</span><span></span></div>
<div className='flex-row '><span style={{ marginRight: 30 }}>火灾扑救</span><span>2023-06-16 12:30:30</span></div>
</div>
</div>
</div>
</Box>
}

77
super-screen/client/src/sections/fire-control/components/item-right.js

@ -1,41 +1,50 @@
import React from 'react'
import { Box } from '$components';
import React, { useEffect, useState } from 'react'
import { Box, AutoRollComponent } from '$components';
import { getName, getPhone } from '$utils';
import './style.less';
function BasicInfo(props) {
const { emengencyTab } = props;
function CitySafty(props) {
const { emengencyTab, emergencyList } = props;
const tab_name = {
yjjg: '应急机构',
yjdw: '应急队伍',
yjzj: '应急专家',
yljg: '医疗机构',
bncs: '避难场所',
xfyjwz: { name: '应急物资', items: [{ key: 'name', name: '名称' }, { key: 'type', name: '类别' }, { key: 'count', name: '数量' }] },
xfjy: { name: '消防救援', items: [{ key: 'teamName', name: '队伍名称' }, { key: 'supervisoryUnit', name: '主管单位' }, { key: 'emergencyContactPhone', name: '联系人' }, { key: 'emergencyContactPhone', name: '联系电话' }, { key: 'totalMembers', name: '总人数' }, { key: 'baseAddress', name: '驻地地址' }] },
rmwzb: { name: '人民武装部', items: [{ key: 'teamName', name: '队伍名称' }, { key: 'supervisoryUnit', name: '主管单位' }, { key: 'emergencyContactPhone', name: '联系人' }, { key: 'emergencyContactPhone', name: '联系电话' }, { key: 'totalMembers', name: '总人数' }, { key: 'baseAddress', name: '驻地地址' }] },
yljy: { name: '医疗救援', items: [{ key: 'teamName', name: '队伍名称' }, { key: 'supervisoryUnit', name: '主管单位' }, { key: 'emergencyContactPhone', name: '联系人' }, { key: 'emergencyContactPhone', name: '联系电话' }, { key: 'totalMembers', name: '总人数' }, { key: 'baseAddress', name: '驻地地址' }] },
yjbns: { name: '应急避难场所', items: [{ key: 'shelterName', name: '场所全称' }, { key: 'address', name: '场所地址' }, { key: 'eventType', name: '事件类型' }, { key: 'capacity', name: '容纳人数' }] },
}
return <Box title={tab_name[emengencyTab]} >
<div className='fire_item_right_container'>
const getContent = () => {
return <div className='water_item_right_container'>
{
[1, 2, 3, 4, 5, 6, 7].map((s, index) => {
return <div className='fire_right_item'>
emergencyList[emengencyTab]?.map((s, index) => {
return <div className='water_right_item'>
<div className='item_left'></div>
<div className='item_right'>
<div className='flex-row'>
<div className='item_right_left'>场所名称</div>
<div className='item_right_right'>{tab_name[emengencyTab] + s}</div>
</div>
<div className='flex-row'>
<div className='item_right_left'>场所地点</div>
<div className='item_right_right'>南昌县中心街道人民路168号
人民路168号人民路168号</div>
</div>
<div className='flex-row'>
<div className='item_right_left'>承载人数</div>
<div className='item_right_right'>2000 </div>
</div>
<div className='flex-row'>
<div className='item_right_left'>目标距离</div>
<div className='item_right_right'>2.5 Km</div>
</div>
{
tab_name[emengencyTab]?.items?.map(x => {
let value = s[x.key] || '--'
if (x.name == '联系人' && s[x.key]) {
if (x.key == 'emergencyContactPhone') {
value = value.substring(0, value.length - 11)
}
value = getName(value)
} else if (x.name == '联系电话' && s[x.key]) {
if (x.key == 'emergencyContactPhone') {
value = value.substring(value.length - 11, value.length)
}
value = getPhone(value)
} else if (x.name == '数量' && s[x.key]) {
value = s[x.key] + ' ' + s['unit']
}
return <div className='flex-row'>
<div className='item_right_left'>{x.name}</div>
<div className='item_right_right'>{value}
{x.name.indexOf('人数') > -1 && <span style={{ marginLeft: 30 }}></span>}
</div>
</div>
})
}
</div>
<div className='position_bg'><div className='position_icon' /> <span>场所{index + 1}</span> </div>
</div>
@ -43,9 +52,13 @@ function BasicInfo(props) {
}
</div>
}
return <Box title={tab_name[emengencyTab]?.name} >
<AutoRollComponent key={emengencyTab} canScroll={emergencyList[emengencyTab]?.length > 3} content={getContent()} divHeight={860} divId={`fire-left-bottom${emengencyTab}`} />
</Box>
}
export default BasicInfo;
export default CitySafty;

4
super-screen/client/src/sections/fire-control/components/location-select.js

@ -63,6 +63,10 @@ function LoacationSelect(props) {
return;
}
props.locationSelect({ lnglat, location })
// setTimeout(() => {
// setLnglat(null)
// setLocation(null)
// }, 200);
}}
className='ok_btn'>
确认选择

33
super-screen/client/src/sections/fire-control/components/style.less

@ -1,5 +1,5 @@
.item_left-container {
display: flex;
// display: flex;
width: 100%;
height: 100%;
text-align: center;
@ -20,18 +20,8 @@
color: #ECF7FF;
}
@media screen and (min-height:1080px) {
.alarm_time {
height: 185px;
}
.event_title {
margin-top: 30px;
}
}
.end_event {
margin-left: 90px;
width: 202px;
height: 39px;
background-image: linear-gradient(180deg, #711313 0%, #b3000063 52%, #711313 100%);
@ -44,9 +34,11 @@
color: #ECF7FF;
justify-content: center;
font-size: 18px;
cursor: pointer;
}
.event_title {
margin-left: 30px;
color: #fff;
font-size: 16px;
display: flex;
@ -77,6 +69,7 @@
background-size: 100% 100%;
display: flex;
justify-content: space-between;
align-items: center;
._title {
font-size: 14px;
@ -93,6 +86,12 @@
height: 100%;
text-align: right;
padding-top: 12px;
display: flex;
flex-direction: column;
justify-content: space-around;
padding-top: 15px;
padding-bottom: 15px;
}
@ -100,6 +99,11 @@
width: 155px;
height: 100%;
padding-top: 12px;
display: flex;
flex-direction: column;
justify-content: space-around;
padding-top: 15px;
padding-bottom: 15px;
}
@media screen and (min-height:1080px) {
@ -115,20 +119,23 @@
}
.left_third_bg {
margin-left: 2.5%;
width: 95%;
height: 80px;
min-height: 80px;
background: url('/assets/images/homepage/fire/bg3.png') no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: space-around;
margin-bottom: 20px;
padding: 12px 12px 12px 12px;
.left_item_left1 {
width: 50px;
height: 50px;
background: url('/assets/images/homepage/fire/lefticon1.png') no-repeat;
background-size: 100% 100%;
margin-right: 20px;
}
.left_item_left2 {

57
super-screen/client/src/sections/fire-control/components/time.js

@ -0,0 +1,57 @@
import React, { useState, useEffect } from 'react'
import moment from 'moment'
function TimeComponent(props) {
const { createTime } = props;
const [timeState, setTimeState] = useState(moment().valueOf() - moment(createTime).valueOf())
useEffect(() => {
const timeUpdate = setInterval(() => {
let seconds = moment().valueOf() - moment(createTime).valueOf()
setTimeState(seconds);
}, 1000);
return () => {
clearInterval(timeUpdate);
};
}, []);
return formatSeconds(timeState / 1000)
}
export default TimeComponent;
//秒数转化为天时分秒
export const formatSeconds = (value) => {
var secondTime = parseInt(value);// 秒
var minuteTime = 0;// 分
var hourTime = 0;// 小时
var dayTime = 0;// 天
if (secondTime > 60) {//如果秒数大于60,将秒数转换成整数
//获取分钟,除以60取整数,得到整数分钟
minuteTime = parseInt(secondTime / 60);
//获取秒数,秒数取余,得到整数秒数
secondTime = parseInt(secondTime % 60);
//如果分钟大于60,将分钟转换成小时
if (minuteTime > 60) {
//获取小时,获取分钟除以60,得到整数小时
hourTime = parseInt(minuteTime / 60);
//获取小时后取余的分,获取分钟除以60取余的分
minuteTime = parseInt(minuteTime % 60);
if (hourTime > 24) {
dayTime = parseInt(hourTime / 24);
//获取小时后取余的分,获取分钟除以60取余的分
hourTime = parseInt(hourTime % 24);
}
}
}
var result = "" + (parseInt(secondTime) < 10 ? '0' + parseInt(secondTime) : parseInt(secondTime));
result = "" + (parseInt(minuteTime) < 10 ? '0' + parseInt(minuteTime) : parseInt(minuteTime)) + ":" + result;
result = "" + (parseInt(hourTime) < 10 ? '0' + parseInt(hourTime) : parseInt(hourTime)) + ":" + result;
if (dayTime > 0) {
result = "" + parseInt(dayTime) + "天 " + result;
}
// console.log('result', result);
return result;
}

130
super-screen/client/src/sections/fire-control/constant/index.js

@ -1,130 +0,0 @@
115.921049, 28.559176
115.926542, 28.559327
115.921218, 28.555168
115.926311, 28.55532
export const heatmapData = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"count": 6
},
"geometry": {
"type": "Point",
"coordinates": [
115.921049, 28.559176
]
}
},
{
"type": "Feature",
"properties": {
"count": 3
},
"geometry": {
"type": "Point",
"coordinates": [
115.922049, 28.556176
]
}
},
{
"type": "Feature",
"properties": {
"count": 2
},
"geometry": {
"type": "Point",
"coordinates": [
115.923049, 28.556176
]
}
},
{
"type": "Feature",
"properties": {
"count": 2
},
"geometry": {
"type": "Point",
"coordinates": [
115.924049, 28.557176
]
}
},
{
"type": "Feature",
"properties": {
"count": 5
},
"geometry": {
"type": "Point",
"coordinates": [
115.925049, 28.558176
]
}
},
{
"type": "Feature",
"properties": {
"count": 7
},
"geometry": {
"type": "Point",
"coordinates": [
115.926049, 28.556176
]
}
},
{
"type": "Feature",
"properties": {
"count": 8
},
"geometry": {
"type": "Point",
"coordinates": [
115.92365, 28.557404
]
}
},
{
"type": "Feature",
"properties": {
"count": 8
},
"geometry": {
"type": "Point",
"coordinates": [
115.92465, 28.555404
]
}
},
{
"type": "Feature",
"properties": {
"count": 8
},
"geometry": {
"type": "Point",
"coordinates": [
115.92465, 28.556404
]
}
},
{
"type": "Feature",
"properties": {
"count": 8
},
"geometry": {
"type": "Point",
"coordinates": [
115.92565, 28.557404
]
}
},
]
}

323
super-screen/client/src/sections/fire-control/containers/gis.js

@ -1,30 +1,33 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { render } from 'react-dom';
import { Row, Col, message } from 'antd';
import { Row, Col, message, Tooltip } from 'antd';
import FireAddForm from '../components/alarm-add'
import LoacationSelect from '../components/location-select';
import moment from 'moment'
import './gis.less'
const MAPDOMID = 'fs-amap-container-fire';
let map = null;
let driving;
const tabs = [
{ name: '应急机构', tab: 'yjjg', className: 'emergency_button' },
{ name: '应急队伍', tab: 'yjdw', className: 'emergency_button' },
{ name: '应急专家', tab: 'yjzj', className: 'emergency_button' },
{ name: '医疗机构', tab: 'yljg', className: 'emergency_button' },
{ name: '避难场所', tab: 'bncs', className: 'emergency_button' },
{ name: '应急物资', tab: 'xfyjwz', className: 'emergency_button' },
{ name: '消防救援', tab: 'xfjy', className: 'emergency_button' },
{ name: '人民武装部', tab: 'rmwzb', className: 'emergency_button' },
{ name: '医疗救援', tab: 'yljy', className: 'emergency_button' },
{ name: '应急避难场所', tab: 'yjbns', className: 'emergency_button' },
]
function Map(props) {
const { dispatch, actions } = props;
const { dispatch, actions, emergencyList, propTab } = props;
const [delay, setDelay] = useState(true)
const [tab, setTab] = useState('yjjg')
const [tab, setTab] = useState('xfyjwz')
const [visible, setVisible] = useState(false)
const [level, setLevel] = useState('I')
const [alarmData, setAlarmData] = useState()
const [locationVisible, setLocationVisible] = useState(false)
const [location, setLocation] = useState({})
const [alarmList, setAlarmList] = useState()
//查询告警列表数据
const getData = () => {
dispatch(actions?.firecontrol?.getFireAlarmList()).then(res => {
@ -33,13 +36,62 @@ function Map(props) {
}
})
}
// 初始化GIS 组件销毁清空定时器
useEffect(() => {
if (!delay && alarmList?.length > 0) {
setTimeout(() => {
map && renderAlarms()
}, 1000);
loadMap();
getData()
}, []);
useEffect(() => {
if (alarmData) renderAlarmInfowindow(alarmData)
}, [level])
useEffect(() => {
if (propTab == 'overview') getData()
}, [propTab])
const setMapInitFit = () => {
map.setZoom(10.3)
map.setCenter([116.054664, 28.538966])
map.setPitch(22.9)
map.setRotation(0)
}
useEffect(() => {
if (!delay && alarmList?.length > 0 && emergencyList['xfjy']) {
map.clearMap()
map && renderMarkers()
map && renderAlarms()
setMapInitFit()
}
}, [delay, alarmList])
}, [delay, alarmList, emergencyList])
const renderMarkers = () => {
const data = emergencyList['xfjy']
data.map((x, index) => {
var marker = new AMap.Marker({
position: new AMap.LngLat(x.location?.split(',')[0], x.location?.split(',')[1]),
// 将一张图片的地址设置为 icon
icon: '/assets/images/homepage/fire/rescue_icon.png',
// 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点
offset: new AMap.Pixel(-13, -30),
zooms: [3, 19],
zIndex: 12,
});
marker.setTitle(x.teamName);
map.add(marker);
marker.setLabel({
zIndex: 13,
direction: 'right',
offset: new AMap.Pixel(-90, -40), //设置文本标注偏移量
content: "<div class='rescu_team_marker'>" + x.teamName + "</div>", //设置文本标注内容
});
})
}
// 地图初始化
const loadMap = () => {
@ -98,78 +150,67 @@ function Map(props) {
})
};
// 初始化GIS 组件销毁清空定时器
useEffect(() => {
loadMap();
getData()
}, []);
useEffect(() => {
if (alarmData) renderAlarmInfowindow(alarmData)
}, [level])
const renderAlarms = () => {
alarmList?.map((x, index) => {
var marker = new AMap.Marker({
position: new AMap.LngLat(x.longitude, x.latitude),
// 将一张图片的地址设置为 icon
icon: '/assets/images/homepage/communtity/markeralarm.png',
// 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点
offset: new AMap.Pixel(-13, -30),
zooms: [3, 19],
});
marker.setTitle(x.location);
map.add(marker);
var circle = new AMap.Circle({
center: [x.longitude, x.latitude],
radius: 5000, //半径
borderWeight: 3,
strokeColor: "#AE0000",
strokeOpacity: 1,
strokeWeight: 6,
strokeOpacity: 0.8,
fillOpacity: 0.2,
// strokeStyle: 'dashed',
strokeDasharray: [10, 10],
// 线样式还支持 'dashed'
fillColor: 'rgba(243, 0, 0, 0.15)',
zIndex: 50,
})
map.add(circle);
let infowindow = new AMap.InfoWindow({
isCustom: true, //使用自定义窗体
content: `<div id="map-content" class="fire-gis-infowindow fire-gis-infowindow-alarm">
alarmList
?.filter(s => s.state == 1)
?.map((x, index) => {
var marker = new AMap.Marker({
position: new AMap.LngLat(x.longitude, x.latitude),
// 将一张图片的地址设置为 icon
icon: '/assets/images/homepage/communtity/markeralarm.png',
// 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点
offset: new AMap.Pixel(-13, -30),
zooms: [3, 19],
zIndex: 14,
});
marker.setTitle(x.location);
map.add(marker);
// var circle = new AMap.Circle({
// center: [x.longitude, x.latitude],
// radius: 5000, //半径
// borderWeight: 3,
// strokeColor: "#AE0000",
// strokeOpacity: 1,
// strokeWeight: 6,
// strokeOpacity: 0.8,
// fillOpacity: 0.2,
// // strokeStyle: 'dashed',
// strokeDasharray: [10, 10],
// // 线样式还支持 'dashed'
// fillColor: 'rgba(243, 0, 0, 0.15)',
// zIndex: 50,
// })
// map.add(circle);
let infowindow = new AMap.InfoWindow({
isCustom: true, //使用自定义窗体
content: `<div id="map-content" class="fire-gis-infowindow fire-gis-infowindow-alarm">
<div style="height:${360}px;" id="alarmcontentid${x.location}"></div></div>`,
offset: new AMap.Pixel(233, 260)
});
marker.on('click', () => {
let position = marker.getPosition ? marker.getPosition() : marker.getCenter();
infowindow.open(map, position);
map.setCenter(position)
map.setZoom(17.4)
map.setPitch(47.30)
map.setRotation(1.7000)
setAlarmData(x)
setTimeout(() => {
if (document.getElementById(`alarmcontentid${x.location}`)) {
renderAlarmInfowindow(x)
}
}, 50)
offset: new AMap.Pixel(233, 260)
});
marker.on('click', () => {
let position = marker.getPosition ? marker.getPosition() : marker.getCenter();
infowindow.open(map, position);
map.setCenter(position)
// map.setZoom(17.4)
// map.setPitch(47.30)
// map.setRotation(1.7000)
setAlarmData(x)
setTimeout(() => {
if (document.getElementById(`alarmcontentid${x.location}`)) {
renderAlarmInfowindow(x)
}
}, 50)
})
})
})
}
//驾车路线规划
const drawDrivings = (location1, location2) => {
var driving = new AMap.Driving({
map: map,
});
const drawDrivings = (location1, location2, alarmInfo, rescueInfo) => {
var driving = new AMap.Driving({});
// 根据起终点经纬度规划驾车导航路线
driving.search(new AMap.LngLat(location1[0], location1[1]), new AMap.LngLat(location2[0], location2[1]), function (status, result) {
// result 即是对应的驾车导航信息,相关数据结构文档请参考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DrivingResult
@ -177,6 +218,11 @@ function Map(props) {
if (result.routes && result.routes.length) {
// 绘制第一条路线,也可以按需求绘制其它几条路线
drawRoute(result.routes[0])
props.alarmOk({
alarmInfo: { ...alarmInfo, routes: result.routes[0] },
rescueInfo: rescueInfo
})
}
} else {
}
@ -187,40 +233,36 @@ function Map(props) {
function drawRoute(route) {
var path = parseRouteToPath(route)
// var startMarker = new AMap.Marker({
// position: path[0],
// icon: 'https://webapi.amap.com/theme/v1.3/markers/n/start.png',
// map: map
// })
// var endMarker = new AMap.Marker({
// position: path[path.length - 1],
// icon: 'https://webapi.amap.com/theme/v1.3/markers/n/end.png',
// map: map
// })
var routeLine = new AMap.Polyline({
path: path,
isOutline: true,
outlineColor: '#ffeeee',
outlineColor: 'rgba(118, 38, 63, 1)',
borderWeight: 2,
strokeWeight: 5,
strokeOpacity: 0.9,
strokeColor: '#0091ff',
strokeColor: 'rgba(118, 38, 63, 1)',
lineJoin: 'round'
})
map.add(routeLine);
// 调整视野达到最佳显示区域
map.setFitView([startMarker, endMarker, routeLine])
map.setFitView([routeLine], false, [150, 150, 400, 400])
// setTimeout(() => {
// map.setZoom(map.getZoom() - 1)
// }, 1000);
}
//计算两点距离
function computeDis(p1, p2) {
return Math.round(p1.distance(p2));
}
// 解析DrivingRoute对象,构造成AMap.Polyline的path参数需要的格式
// DrivingResult对象结构参考文档 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DriveRoute
function parseRouteToPath(route) {
var path = []
for (var i = 0, l = route.steps.length; i < l; i++) {
var step = route.steps[i]
@ -228,7 +270,6 @@ function Map(props) {
path.push(step.path[j])
}
}
return path
}
@ -242,40 +283,39 @@ function Map(props) {
map.clearInfoWindow();
}} />
{/* <div className='gis_item'>
<span className='gis_title'>地址信息</span>
<span className='gis_text'>南湖大道</span>
</div>
<div className='gis_item'>
<span className='gis_title'>告警来源</span>
<span className='gis_text'>烟雾报警</span>
<div style={{ marginTop: 50 }}>
<div className='gis_item'>
<div className='gis_title'>事件时间</div><div className='gis_text'>{moment(x?.createTime).format('YYYY-MM-DD HH:mm:ss')}</div>
</div>
<div className='gis_item'>
<div className='gis_title'>地址信息</div><div className='gis_text'>
<Tooltip placement="top" title={x?.location}>
<span style={{ color: '#FFF' }}>{x?.location?.length > 20 ? x?.location?.substring(0, 20) + '...' : x?.location}</span>
</Tooltip>
</div>
</div>
<div className='gis_item'>
<div className='gis_title'>警情类型</div><div className='gis_text'>{x?.type}</div>
</div>
</div>
<div className='gis_item'>
<span className='gis_title'>告警内容</span>
<span className='gis_text'>火情</span>
</div> */}
{/* <div className='clear_alarm'>消除警情</div> */}
<div style={{ marginTop: 50 }}><span className='confirm_text' >请根据火灾态势选择应急预案等级</span></div>
<Row style={{ paddingLeft: 16, paddingRight: 16, marginTop: 12, marginTop: 20 }}>
{['I', 'II', 'III', 'IV'].map(s => {
return <Col
onClick={() => { setLevel(s) }}
span={6}
style={{
border: level == s ? '1px solid #fff' : '',
textAlign: 'center'
}}>{s}</Col>
})}
</Row>
<div className='alarm_confirm'>
<div className='alarm_cancel'></div>
<div className='alarm_ok' onClick={() => {
map.clearInfoWindow();
drawDrivings([x.longitude, x.latitude], [115.895753, 28.553354])
props.alarmOk()
}}></div>
<div className='hande_button'
onClick={() => {
map.clearInfoWindow();
if (emergencyList['xfjy']?.length > 0) {
const list = emergencyList['xfjy'].sort((b, a) => computeDis(
new AMap.LngLat(x.longitude, x.latitude),
new AMap.LngLat(b.location?.split(',')[0], b.location?.split(',')[1])
) - computeDis(
new AMap.LngLat(x.longitude, x.latitude),
new AMap.LngLat(a.location?.split(',')[0], a.location?.split(',')[1])
))
const location = list[0]?.location
drawDrivings([x.longitude, x.latitude], location.split(','), x, list[0])
}
}}
>一键护航</div>
</div>
</div>,
document.getElementById(`alarmcontentid${x.location}`));
@ -286,6 +326,7 @@ function Map(props) {
}
const onFinish = (values) => {
setLocation({})
dispatch(actions.firecontrol.addFireAlarm(
{
@ -296,7 +337,7 @@ function Map(props) {
latitude: location?.lnglat?.split(',')[1],
}
)).then(res => {
//getData()
getData()
message.success('新增上报信息成功')
setVisible(false)
})
@ -306,35 +347,33 @@ function Map(props) {
<>
{/* 延缓加载遮罩 */}
{delay && <div className='map_delay'><div className='delay_img' /></div>}
{/* 地图容器 */}
<div className="gis" id={MAPDOMID} />
{/* {map && renderMarkers()} */}
{/* 底部按钮 */}
{props.propTab == 'item' && tabs.map((s, index) => {
return <div className='fire-gis-button'>
<div className={s.className ? `${s.className} ${s.className}${index + 1}` : 'fire-gis-button' + (index + 1)}
return <>
<div className={s.className ? `${s.className} ${s.className}${index + 1}` : 'water-gis-button' + (index + 1)}
onClick={() => {
setTab(s.tab)
s.className ? props.changeEmengencyTab(s.tab) : props.changeTab(s.tab)
if (s.tab == 'emergency') {
setTab('yjwz')
props.changeEmengencyTab('yjwz')
}
}}
>
<div className={
s.className ? `button_${s.tab} ${tab == s.tab ? 'button_' + s.tab + '_select' : ''}` :
s.className ? `button_img_${(index + 1)} ${tab == s.tab ? 'button_img_' + (index + 1) + '_select' : ''}` :
`button_img ${tab == s.tab ? 'button_img_select' : ''}`} />
<div>{s.name}</div>
{s.className && <div className='dotbg'>7</div>}
{s.className && <div className='dotbg'>{emergencyList[s.tab]?.length}</div>}
</div>
{/* <div className='icon_left'></div>
<div className='icon_right'></div> */}
</div>
</>
})
}
{/* 左上角图例 */}
{renderLeftTop()}
{props.propTab == 'overview' && renderLeftTop()}
{/* 四周遮罩 */}
<div className='gis-left'></div>
<div className='gis-right'></div>

111
super-screen/client/src/sections/fire-control/containers/gis.less

@ -139,32 +139,7 @@
background-size: 100% 100%;
}
.gis_item {
height: 35px;
background-image: linear-gradient(180deg, #0555a791 0%, #022a6f91 100%);
width: 93%;
display: flex;
align-items: center;
padding-left: 20px;
.gis_title {
font-family: SourceHanSansCN-Regular;
font-weight: 400;
font-size: 14px;
color: #C3E6FF;
letter-spacing: 0;
margin-right: 12px;
}
.gis_text {
font-family: SourceHanSansCN-Regular;
font-weight: 400;
font-size: 14px;
color: #FFFFFF;
letter-spacing: 0;
line-height: 21px;
}
}
.clear_alarm {
width: 92px;
@ -184,30 +159,55 @@
}
.fire-gis-infowindow-alarm {
background: url('/assets/images/homepage/communtity/alarminfowindow.png') no-repeat;
height: 432px;
background: url('/assets/images/homepage/fire/alarminfowindow.png') no-repeat;
background-size: 100% 100%;
height: 385px;
width: 311px;
padding-top: 107px;
.gis_exit {
cursor: pointer;
position: absolute;
right: 2px;
top: 15px;
right: 8px;
top: 30px;
width: 30.75px;
height: 23px;
background: url('/assets/images/homepage/communtity/exitalarm.png') no-repeat;
background: url('/assets/images/homepage/communtity/exit.png') no-repeat;
background-size: 100% 100%;
}
.gis_item {
border-bottom: 1px solid #125DB0;
width: 93%;
display: flex;
align-items: center;
padding-left: 20px;
margin-bottom: 10px;
height: 35px;
background-image: linear-gradient(180deg, #a7050591 0%, #48010191 100%);
;
min-height: 35px;
display: flex;
.gis_title {
font-family: SourceHanSansCN-Regular;
font-weight: 400;
font-size: 14px;
color: #C3E6FF;
letter-spacing: 0;
margin-right: 12px;
width: 85px;
}
.gis_text {
width: 188px;
font-family: SourceHanSansCN-Regular;
font-weight: 400;
font-size: 14px;
color: #FFFFFF;
letter-spacing: 0;
line-height: 21px;
}
}
.confirm_text {
font-family: SourceHanSansCN-Medium;
font-weight: 500;
@ -282,6 +282,20 @@
background-size: 100% 100%;
}
}
.hande_button {
margin-top: 15px;
width: 116px;
height: 30px;
background-image: linear-gradient(180deg, #00ACC5 1%, #009eb66e 52%, #00ACC5 100%);
border: 1.5px solid #009DB4;
box-shadow: inset 0 1px 14px 0 #2bf0ff59;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
@ -692,4 +706,35 @@
background: url('/assets/images/homepage/water/bncsselect.png');
}
}
.rescu_team_marker {
background: url('/assets/images/homepage/fire/rescue_label.png');
background-repeat: no-repeat;
background-size: 100% 100%;
// width: 210px;
padding-left: 20px;
padding-right: 20px;
height: 33px;
border: 1px solid transparent;
font-family: YouSheBiaoTiHei;
font-size: 16px;
color: #FFFFFF;
letter-spacing: 0;
display: flex;
justify-content: center;
align-items: center;
}
.amap-marker-label {
position: absolute;
z-index: 2;
border: 1px solid transparent !important;
background-color: transparent !important;
white-space: nowrap;
cursor: default;
padding: 3px;
font-size: 12px;
line-height: 14px;
}

27
super-screen/client/src/sections/fire-control/containers/homePage.js

@ -13,6 +13,7 @@ import Gis from './gis';
import './style.less'
import Weather from '../../water-prevention/components/weather';
import { FullScreenContainer } from '$components'
import { useFsRequest } from '$utils';
function homePage(props) {
const { dispatch, actions } = props;
@ -20,7 +21,18 @@ function homePage(props) {
const cardHeight = document.body.clientHeight * 0.896 * 0.32
const cardContentHeight = cardHeight - 42 - 13
const [tab, setTab] = useState('overview')
const [emengencyTab, setEmengencyTab] = useState('yjjg');
const [emengencyTab, setEmengencyTab] = useState('xfyjwz');
const [alarmInfo, setAlarmInfo] = useState({})
const { data: emergencyList = {} } = useFsRequest({ url: 'water/emergency' });
const endEvent = () => {
dispatch(actions.firecontrol.modifyFireAlarm(
alarmInfo?.alarmInfo?.id, { state: 2 }
)).then(res => {
setTab('overview')
})
}
return <>
<FullScreenContainer>
<div className='homepage'>
@ -49,20 +61,23 @@ function homePage(props) {
</>
:
<div className='child' style={{ height: '100%' }} >
<Left endEvent={() => {
setTab('overview')
}} cardContentHeight={document.body.clientHeight * 0.896} />
<Left
info={alarmInfo}
endEvent={() => { endEvent() }}
cardContentHeight={document.body.clientHeight * 0.896} />
</div>
}
</div>
</div>
<div className='homepage-center'>
<Gis
emergencyList={emergencyList}
dispatch={dispatch}
actions={actions}
propTab={tab}
alarmOk={() => {
alarmOk={(info) => {
setTab('item')
setAlarmInfo(info);
}}
changeEmengencyTab={(e) => {
setEmengencyTab(e)
@ -82,7 +97,7 @@ function homePage(props) {
</div>
</div> :
<div className='child' style={{ height: '100%' }} >
<Right emengencyTab={emengencyTab} cardContentHeight={document.body.clientHeight * 0.896} />
<Right emergencyList={emergencyList} emengencyTab={emengencyTab} cardContentHeight={document.body.clientHeight * 0.896} />
</div>
}
</div>

118
super-screen/client/src/sections/water-prevention/components/style.less

@ -1,118 +1,3 @@
.item_left-container {
display: flex;
width: 100%;
height: 100%;
text-align: center;
flex-direction: column;
align-items: center;
overflow: auto;
.alarm_time {
width: 98%;
height: 225px;
background: url('/assets/images/homepage/fire/alarmtime.png') no-repeat;
background-size: 100% 100%;
display: flex;
justify-content: center;
align-items: center;
font-family: YouSheBiaoTiHei;
font-size: 48px;
color: #ECF7FF;
}
.end_event {
width: 202px;
height: 39px;
background-image: linear-gradient(180deg, #711313 0%, #b3000063 52%, #711313 100%);
border: 1.5px solid #A20000;
box-shadow: inset 0 1px 14px 0 #ff525259;
border-radius: 2px;
display: flex;
justify-self: center;
align-items: center;
color: #ECF7FF;
justify-content: center;
font-size: 18px;
}
.event_title {
color: #fff;
font-size: 16px;
display: flex;
justify-content: space-around;
align-items: center;
width: 81%;
margin-top: 30px;
margin-bottom: 10px;
.event_title_left {
width: 70px;
height: 2.37px;
background-image: linear-gradient(90deg, rgba(0, 102, 255, 0) 0%, #377EE8 97%);
}
.event_title_right {
width: 70px;
height: 2.37px;
transform: scaleX(-1);
background-image: linear-gradient(90deg, rgba(0, 102, 255, 0) 0%, #377EE8 97%);
}
}
.left_second_bg {
width: 95%;
height: 160px;
background: url('/assets/images/homepage/fire/secondbg.png') no-repeat;
background-size: 100% 100%;
}
.left_third_bg {
width: 95%;
height: 80px;
background: url('/assets/images/homepage/fire/bg3.png') no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: space-around;
margin-bottom: 20px;
.left_item_left1 {
width: 50px;
height: 50px;
background: url('/assets/images/homepage/fire/lefticon1.png') no-repeat;
background-size: 100% 100%;
}
.left_item_left2 {
width: 50px;
height: 50px;
background: url('/assets/images/homepage/fire/lefticon2.png') no-repeat;
background-size: 100% 100%;
}
.left_item_left3 {
width: 50px;
height: 50px;
background: url('/assets/images/homepage/fire/lefticon3.png') no-repeat;
background-size: 100% 100%;
}
.left_item_left4 {
width: 50px;
height: 50px;
background: url('/assets/images/homepage/fire/lefticon4.png') no-repeat;
background-size: 100% 100%;
}
.left_item_right1 {
width: calc(100% - 70px);
color: rgba(236, 247, 255, 1);
}
}
}
.water_item_right_container {
// display: flex;
// width: 100%;
@ -200,9 +85,6 @@
width: 0 !important
}
.item_left-container::-webkit-scrollbar {
width: 0 !important
}
//警情数据分析

Loading…
Cancel
Save