Browse Source

feat: 警情动态新增弹框

TwoKe945 1 year ago
parent
commit
040da8872e

+ 1 - 1
app/src/components/HiddenDangerTotal.vue

@@ -3,7 +3,7 @@ export default {
   name: "HiddenDangerTotal",
   props: {
     number: {
-      type: String,
+      type: [String, Number],
       default: "",
     },
     label: {

+ 3 - 3
app/src/components/PieChart3D.vue

@@ -10,11 +10,11 @@ const pieChart3d = ref();
 
 function initChart() {
   chart = echarts.init(pieChart3d.value);
-  option = getPie3D(props.glxsList.map(item => ({
+  option = getPie3D(props.glxsList.map((item, idx) => ({
     ...item,
     label: {
       show: true
-    }
+    },
   })),
     0.75
   );
@@ -307,7 +307,7 @@ function getPie3D(pieData, internalDiameterRatio) {
   series.push(labelSeries);
   // 准备待返回的配置项,把准备好的 legendData、series 传入。
   const option = {
-    color: ["#1162fe", "#F4F85E", "#FF7A00", "#5ef8c9", "#FC2626", "#5e92f8"],
+    color: [ "#FC2626", "#1162fe", "#F4F85E", "#FF7A00", "#5ef8c9", "#5e92f8"],
     legend: {
       data: ["有管理单位(物业)", "有管理单位(非物业)", "居民自主管理", "街道社区代管", "其他管理形式", "无管理主体"],
       icon: "roundRect",

+ 374 - 0
app/src/views/Home/components/AlarmingSituationDynamics/AlaemList.vue

@@ -0,0 +1,374 @@
+<template>
+	<div class="maintenance-supervision">
+		<div class="maintenance-supervision_header">
+			<el-input v-model="search" placeholder="请输入建筑名"></el-input>
+			<el-select clearable style="width: 100px;" v-model="value" placeholder="选择警情类型">
+				<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+				</el-option>
+			</el-select>
+			<el-select clearable style="width: 100px;" v-model="value1" placeholder="警情时段">
+				<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
+				</el-option>
+			</el-select>
+			<el-button style="width: 100px; margin: 0;" @click="searchTab">搜索</el-button>
+		</div>
+		<div>
+			<div class="row header">
+				<span class="time">警情类型</span>
+				<span class="person">地址</span>
+				<span class="result">主站单位</span>
+				<span class="result1">处置状态</span>
+				<span class="result2">报警时间</span>
+			</div>
+			<!-- <VueSeamlessScroll :data="list" :class-option="classOption" class="warp" hoverStop> -->
+			<div class="" style="height: 100vh;overflow: auto;">
+				<ul class="item">
+					<div v-for="(item, index) in czztList" :key="index">
+						<li class="row" @click="tab(item.id)" :class="item.id === id ? 'selected' : ''">
+							<span class="time" style="width: 110px;overflow: hidden;height: 40px;">{{item.zqlx}}</span>
+							<span class="person"
+								style="width: 110px;overflow: hidden;height: 40px;">{{item.ddmc}}</span>
+							<span class="result"
+								style="width: 110px;overflow: hidden;height: 40px;">{{item.sszhid }}</span>
+							<span class="result1"
+								style="width: 110px;overflow: hidden;height: 40px;text-align: center;">{{item.ajzt}}</span>
+							<span class="result2"
+								style="width: 110px;overflow: hidden;height: 40px;text-align: center;">{{item.lasj}}</span>
+						</li>
+						<div class="bjxxBack" v-if="item.id === id ">
+							<div class="bjTetx">报警电话:{{item.bjrlxdh || '-'}}</div>
+							<div class="bjTetx">人员被困情况:{{item.bjrsfbk ||'-'}}</div>
+							<div class="bjTetx">有无明火:{{item.jqJyqk || '-'}}</div>
+						</div>
+					</div>
+				</ul>
+			</div>
+			<!-- </VueSeamlessScroll> -->
+		</div>
+	</div>
+</template>
+<script>
+	import {
+		getBjxx
+	} from '@/api/jqdt.js'
+	export default {
+		name: "MaintenanceSupervision",
+		data() {
+			return {
+				value: "",
+				value1: "",
+				type: "",
+				search: '',
+				id: null,
+				options: [{
+						value: '火灾扑救',
+						label: '火灾扑救'
+					},
+					{
+						value: '抢险救援',
+						label: '抢险救援'
+					},
+					{
+						value: '反恐排爆',
+						label: '反恐排爆'
+					},
+					{
+						value: '公务执勤',
+						label: '公务执勤'
+					},
+					{
+						value: '社会救助',
+						label: '社会救助'
+					},
+					{
+						value: '其他出动',
+						label: '其他出动'
+					},
+					{
+						value: '拉动演练',
+						label: '拉动演练'
+					}
+				],
+				options1: [{
+						value: '接警',
+						label: '接警'
+					},
+					{
+						value: '下达',
+						label: '下达'
+					},
+					{
+						value: '出动',
+						label: '出动'
+					},
+					{
+						value: '到场',
+						label: '到场'
+					},
+					{
+						value: '展开',
+						label: '展开'
+					},
+					{
+						value: '出水',
+						label: '出水'
+					},
+					{
+						value: '控制',
+						label: '控制'
+					},
+					{
+						value: '熄灭',
+						label: '熄灭'
+					},
+					{
+						value: '清理现场',
+						label: '清理现场'
+					},
+					{
+						value: '返回',
+						label: '返回'
+					},
+					{
+						value: '归队',
+						label: '归队'
+					},
+					{
+						value: '结案',
+						label: '结案'
+					},
+					{
+						value: '归档',
+						label: '归档'
+					},
+					{
+						value: '中返',
+						label: '中返'
+					},
+					{
+						value: '停水',
+						label: '停水'
+					},
+					{
+						value: '其他',
+						label: '其他'
+					}
+				],
+				checked: 0,
+				newList: "",
+				czztList: []
+			};
+		},
+		components: {
+			// VueSeamlessScroll,
+		},
+		computed: {
+			classOption() {
+				return {
+					singleHeight: 43,
+				};
+			},
+		},
+		props: ['list', 'pId'],
+		methods: {
+			searchTab() {
+				const params = {
+					pageSize: 100,
+					pageNum: 1,
+					ddmc: this.search,
+					zqlx: this.value,
+					ajzt: this.value1,
+					type: this.type
+				}
+				getBjxx(params).then(res => {
+					console.log(res, '报警信息');
+					this.czztList = res.data.rows
+				})
+			},
+			tab(id) {
+				this.id = id;
+				this.$emit('callback', id);
+			},
+		},
+		created() {
+			// 如果pTd存在 就选中pID
+			if (this.pId) {
+				this.tab(this.pId)
+			}
+			// 默认选中第一条
+			else {
+				this.tab(this.list[0].id)
+			}
+
+			if (this.$route.query.type) {
+				this.type = Number(this.$route.query.type)
+			}
+
+			this.searchTab()
+		}
+	};
+</script>
+
+<style scoped lang="less">
+	::-webkit-scrollbar {
+			border-radius: 3px;
+		width: 8px;
+		height: 8px;
+		background: rgba(0, 213, 255, 0.3);
+	}
+	::-webkit-scrollbar-thumb {
+	    background: rgba(0, 213, 255, 0.3);
+	}
+	.selected {
+		width: 100%;
+		height: 40px;
+		background: rgba(0, 194, 255, 0.14) !important;
+		box-shadow: 0px 0px 2px 0px #44f1ff !important;
+		// background: red !important;
+	}
+
+	.el-input {
+		width: 120px !important;
+	}
+
+	.maintenance-supervision {
+
+		// padding: 10px 10px 0px 20px;
+		::v-deep(.el-input__inner) {
+			border: none;
+			background: linear-gradient(360deg, rgba(0, 148, 255, .5) 0%, rgba(0, 148, 255, .31) 100%);
+			color: #fff;
+		}
+
+		::v-deep(.el-button) {
+			border: none;
+			background: linear-gradient(360deg, #0094ff90 0%, #0094ff10 100%);
+			color: #fff;
+		}
+
+		.maintenance-supervision_header {
+			display: flex;
+			justify-content: space-around;
+			border-bottom: 1px solid #154956;
+			padding-bottom: 2px;
+			margin-top: 15px;
+			font-size: 12px;
+			color: rgb(79, 149, 186);
+		}
+
+		.warp {
+			margin: 0 auto;
+			overflow: hidden;
+
+			.item {
+				list-style: none;
+				padding: 0;
+				margin: 0 auto;
+				cursor: pointer;
+			}
+		}
+
+		.header {
+			color: #fff;
+			height: 33px !important;
+			line-height: 33px !important;
+			background-color: rgba(0, 163, 255, 0.3) !important;
+			color: #61dbff;
+			margin-top: 15px;
+			margin-bottom: 6px;
+		}
+
+		.row {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding-left: 12px;
+			padding-right: 70px;
+			box-sizing: border-box;
+		}
+
+		.bjxxBack {
+			padding: 8px 13px;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 50px;
+			background: url(@/assets/images/bjxxImg.png) center no-repeat;
+			background-size: 100% 50px;
+			margin-top: -10px;
+
+			.bjTetx {
+				flex-grow: 1;
+			}
+		}
+
+		li,
+		a {
+			height: 39px;
+			line-height: 39px;
+			margin-bottom: 4px;
+			display: flex;
+			font-size: 12px;
+			background-color: rgba(0, 0, 0, 0.2);
+		}
+	}
+
+
+	/deep/.el-input__inner {
+		background-color: #184254;
+		// width: 10px;
+		height: 30px;
+		margin-bottom: 5px;
+	}
+
+	/deep/.el-button {
+		width: 160px;
+		height: 32px;
+		font-size: 14px;
+		line-height: 2px;
+		background: #184254;
+		margin: 0 20px 0 30px;
+		color: #fff;
+		border-radius: 5px;
+		border: none;
+	}
+
+	/deep/.select_btn {
+		position: absolute;
+		top: 225px;
+		right: 320px;
+		//下拉框
+	}
+</style>
+
+
+<style>
+	.el-select-dropdown.el-popper {
+		background-color: #4167a0;
+	}
+
+	.el-popper[x-placement^=bottom] .popper__arrow::after {
+		border-bottom-color: #4167a0 !important;
+	}
+
+	.el-select-dropdown.el-popper {
+		border: 1px solid rgba(0, 213, 255, 0.6) !important;
+	}
+
+	.el-select-dropdown.el-popper li.el-select-dropdown__item span {
+		color: #fff;
+	}
+
+	.el-select-dropdown.el-popper li.el-select-dropdown__item.selected span {
+		color: #2f7df2;
+	}
+
+	.el-select-dropdown.el-popper .el-select-dropdown__item.hover {
+		background-color: #2f7df2;
+	}
+
+	.el-select-dropdown.el-popper li.el-select-dropdown__item.hover.selected span {
+		color: #fff !important;
+	}
+</style>

+ 177 - 0
app/src/views/Home/components/AlarmingSituationDynamics/ModalContent.vue

@@ -0,0 +1,177 @@
+<template>
+	<div style="padding: 0px; display: flex; justify-content: space-between">
+		<div>
+			<border-panel height="350px" width="540px" style="margin-bottom: 6px" :headerType="3" title="警情列表">
+				<AlaemList :list="bjxxList" v-if="bjxxList && bjxxList.length > 0" @callback="callback" :pId="pId" />
+			</border-panel>
+			<border-panel height="593px" width="540px" style="margin-bottom: 6px" :headerType="3" title="出动力量">
+				<MobilizeStrength style="width: 518px;" :list="cdxxList" :zlxx="zlxx" :hcws="hcws" />
+			</border-panel>
+		</div>
+		<div style="width: 1000px">
+			<Map :data="mapData" v-if="mapData" />
+		</div>
+		<div>
+			<border-panel height="469px" width="540px" style="margin-bottom: 6px" :headerType="3" title="事故单位信息">
+				<UnitInformation :ajxxList="ajxxList" :jzxxList="jzxxList" :wlwsb="wlwsb" />
+			</border-panel>
+			<border-panel height="475px" width="540px" style="margin-bottom: 6px" :headerType="3" title="风险隐患信息">
+				<UnitInfo :fxxxList="fxxxList" :lshzList="lshzList" />
+			</border-panel>
+		</div>
+	</div>
+</template>
+<script>
+	import MobilizeStrength from "@/views/PoliceSituation/components/MobilizeStrength.vue";
+	import AlaemList from "./AlaemList.vue";
+	import UnitInformation from "@/views/PoliceSituation/components/UnitInformation.vue";
+	import UnitInfo from "@/views/PoliceSituation/components/UnitInfo.vue";
+	import Map from "@/components/Map.vue";
+	import {
+		getBjxx,
+		geTzl,
+		getCdllxx,
+		getHcws,
+		getAjxx,
+		getJzxx,
+		getWlwsb,
+		getFxyhxx,
+		getZhd,
+	} from "@/api/jqdt.js";
+	export default {
+		name: "ModalContent",
+		components: {
+			Map,
+			AlaemList,
+			MobilizeStrength,
+			UnitInformation,
+			UnitInfo,
+		},
+		data() {
+			return {
+				pId: null,
+				params: {
+					pageSize: 100,
+					pageNum: 1,
+					qy: null,
+					id: null,
+				},
+				ajid: "",
+				bjxxList: [], //报警信息
+				cdxxList: [], //出动信息列表
+				zlxx: [], //出动信息总览
+				hcws: [], //火场文书
+				ajxxList: [],
+				jzxxList: {},
+				fxxxList: {},
+				lshzList: [],
+				wlwsb: [],
+				mapData: null,
+			};
+		},
+		methods: {
+			getMapData() {
+				// console.log(this.params.id);
+				this.mapData = null;
+				getZhd({
+					id: this.params.id
+				}).then((res) => {
+					console.log(res);
+					if (res.data && res.data.data) {
+						this.mapData = {
+							jd: res.data.data.dqjd1,
+							wd: res.data.data.dqwd1,
+							zl: res.data.data.总览信息1,
+							jzmc: res.data.data.ddmc,
+							showzhd: true
+						};
+					}
+				});
+			},
+			getQueryString(name) {
+				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+				var r = window.location.search.substr(1).match(reg);
+				if (r != null) {
+					return unescape(r[2]);
+				}
+				return null;
+			},
+			callback(id) {
+				this.params.id = id;
+				this.getMapData();
+				this.getOtherData();
+			},
+			openBasicModal() {
+				this.showModal("basicInfoModal");
+			},
+			getOtherData() {
+				// 出警力量
+				const cdxxId = {
+					ajid: this.params.id,
+				};
+				getCdllxx(cdxxId).then((res) => {
+					this.cdxxList = res.data.rows;
+				});
+				// 出动力量-总览
+				geTzl(this.params).then((res) => {
+					this.zlxx = res.data.rows ? res.data.rows[0].zl : "";
+				});
+				// 火场文书
+				const hcwsId = {
+					jqTywysbm: this.params.id,
+				};
+				getHcws(hcwsId).then((res) => {
+					this.hcws = res.data.rows[0];
+				});
+				// 事故单位信息-案件信息列表
+				getAjxx(this.params).then((res) => {
+					this.ajxxList = res.data.rows[0];
+				});
+				// 事故单位建筑信息
+				const jzxxid = {
+					ajid: this.params.id,
+				};
+				getJzxx(jzxxid).then((res) => {
+					this.jzxxList = res.data.rows;
+				});
+				// 风险隐患信息
+				const fxyhId = {
+					ajid: this.params.id,
+				};
+				getFxyhxx(fxyhId).then((res) => {
+					this.fxxxList =
+						res.data.rows && res.data.rows.length > 0 ? res.data.rows[0] : null;
+					this.lshzList = res.data.rows;
+				});
+				// 物联网设备信息
+				const wlwId = {
+					ajid: this.params.id,
+				};
+				getWlwsb(wlwId).then((res) => {
+					this.wlwsb = res.data.rows;
+				});
+			},
+			getList() {
+				const params1 = {
+					pageSize: 10000,
+					pageNum: 1,
+				};
+				getBjxx(params1).then((res) => {
+					let list = res.data.rows;
+					if (this.pId) {
+						list = list.filter((p) => p.id !== this.pId);
+						list.unshift(res.data.rows.find((p) => p.id === this.pId));
+					}
+					this.bjxxList = list;
+				});
+			},
+		},
+		created() {
+			const id = this.getQueryString("id");
+			this.pId = id;
+			this.getList();
+		},
+	};
+</script>
+
+<style scoped lang="less"></style>

+ 13 - 5
app/src/views/Home/components/AlarmingSituationDynamics.vue → app/src/views/Home/components/AlarmingSituationDynamics/index.vue

@@ -30,16 +30,20 @@
 	</div>
 	<div class="jqdt-panel" v-else>
 		<div class="item" v-for="(item,index) in totalData" :key="index">
-			<div><span class="value">{{ item.con }}</span><span class="unit">起</span></div>
+			<div><span class="value" @click="onClickHandler(index)">{{ item.con }}</span><span class="unit">起</span></div>
 			<div>{{ item.type }}</div>
 		</div>
+    <basic-modal style="margin: 0px;" top="0px" width="100%"  name="历史警情查询" ref="alarmingSituationDynamics">
+      <ModalContent></ModalContent>
+    </basic-modal>
 	</div>
 </template>
 
 <script>
 	// 接警 下达 出动 到场 展开 出水 控制 熄灭 停水 清理 返回 #归队
 	import VueSeamlessScroll from "vue-seamless-scroll";
-	import { getJqdtListWithZero } from '../../../api/index'
+	import { getJqdtListWithZero } from '@/api/index'
+	import ModalContent from './ModalContent.vue'
 	export default {
 		props: {
 			PoliceList: {
@@ -51,6 +55,7 @@
 		name: "AlarmingSituationDynamics",
 		components: {
 			VueSeamlessScroll,
+      ModalContent
 		},
 		data() {
 			return {
@@ -89,7 +94,6 @@
 		methods: {
 			rowClickHandler(id) {
 				this.id = id
-			  this.$router.push(`/police?id=${id}`);
 			},
 			levelText(text) {
 				return {
@@ -105,12 +109,15 @@
 				}).then(res => {
 					this.totalData = res.data.data
 				})
+			},
+			onClickHandler(idx) {
+        this.showModal("alarmingSituationDynamics")
 			}
 		},
 	};
 </script>
 
-<style lang="less">
+<style lang="less" scoped>
 	.alarming-situation-dynamics li.row:hover {
 		background: rgba(0, 194, 255, 0.14) !important;
 	}
@@ -127,13 +134,14 @@
 			flex-direction: column;
 			align-items: center;
 			background-color: rgba(0, 213, 255, 0.12);
-			background-image: url('../../../assets/images/border-jqdt.png');
+			background-image: url('../../../../assets/images/border-jqdt.png');
 			background-repeat: no-repeat;
 			background-position: center center;
 			font-size: 16px;
 			.value {
 				font-size: 30px;
 				color: #FFD749;
+				cursor: pointer;
 			}
 			.unit {
 				font-size: 12px;

+ 1 - 1
app/src/views/Home/index.vue

@@ -59,7 +59,7 @@
 </template>
 <script>
 import BasicInfo from "./components/BasicInfo.vue";
-import AlarmingSituationDynamics from "./components/AlarmingSituationDynamics.vue";
+import AlarmingSituationDynamics from "./components/AlarmingSituationDynamics/index.vue";
 import AutonomousManagement from "./components/AutonomousManagement.vue";
 import HiddenDangerDetection from "./components/HiddenDangerDetection/index.vue";
 import MapCharts from "./components/MapCharts.vue";

+ 12 - 6
app/src/views/PoliceSituation/components/Alarm.vue

@@ -2,11 +2,11 @@
 	<div class="maintenance-supervision">
 		<div class="maintenance-supervision_header">
 			<el-input v-model="search" placeholder="请输入建筑名"></el-input>
-			<el-select style="width: 140px;" v-model="value" placeholder="选择警情类型">
+			<el-select clearable style="width: 100px;" v-model="value" placeholder="选择警情类型">
 				<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 				</el-option>
 			</el-select>
-			<el-select style="width: 100px;" v-model="value1" placeholder="处置状态">
+			<el-select clearable style="width: 100px;" v-model="value1" placeholder="处置状态">
 				<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
 				</el-option>
 			</el-select>
@@ -48,7 +48,6 @@
 	</div>
 </template>
 <script>
-	import VueSeamlessScroll from "vue-seamless-scroll";
 	import {
 		getBjxx
 	} from '@/api/jqdt.js'
@@ -58,6 +57,7 @@
 			return {
 				value: "",
 				value1: "",
+				type: "",
 				search: '',
 				id: null,
 				options: [{
@@ -160,7 +160,7 @@
 			};
 		},
 		components: {
-			VueSeamlessScroll,
+			// VueSeamlessScroll,
 		},
 		computed: {
 			classOption() {
@@ -177,7 +177,8 @@
 					pageNum: 1,
 					ddmc: this.search,
 					zqlx: this.value,
-					ajzt: this.value1
+					ajzt: this.value1,
+					type: this.type
 				}
 				getBjxx(params).then(res => {
 					console.log(res, '报警信息');
@@ -198,6 +199,11 @@
 			else {
 				this.tab(this.list[0].id)
 			}
+
+			if (this.$route.query.type) {
+				this.type = Number(this.$route.query.type)
+			}
+
 			this.searchTab()
 		}
 	};
@@ -398,4 +404,4 @@
 	.el-select-dropdown.el-popper li.el-select-dropdown__item.hover.selected span {
 		color: #fff !important;
 	}
-</style>
+</style>

+ 1 - 1
app/src/views/PoliceSituation/components/MobilizeStrength.vue

@@ -300,4 +300,4 @@ white-space: nowrap;">{{ item.yjddsj || '-'}}</span>
 			}
 		}
 	}
-</style>
+</style>