Kaynağa Gözat

feat:路由,警情动态经纬度错误情况

LAPTOP-U5GOA5HA\zz 1 yıl önce
ebeveyn
işleme
9109ebcc9d

BIN
app/src/assets/images/jqdt-null.png


+ 1 - 4
app/src/components/Headers.vue

@@ -45,7 +45,7 @@
             />
           </li>
         </ul>
-        <li class="bg-img" @click="ConfirmBtn(8)" :class="getClass(8)">
+        <li class="bg-img" @click="ConfirmBtn({ id:8, url: '/login' })" :class="getClass(8)">
           <img src="../assets/images/out.png" alt="" />
         </li>
       </div>
@@ -126,9 +126,6 @@ export default {
       return this.flag == v ? "bg-img active" : "bg-img";
     },
   },
-  created() {
-    console.log(this);
-  },
   watch: {
     $route: {
       handler(route) {

+ 1 - 1
app/src/router/index.js

@@ -21,7 +21,7 @@ const router = new VueRouter({
       path: "/",
       name: "basic-layout",
       component: BasicLayout,
-      redirect: "/home",
+      redirect: "/login",
       children: [
         {
           path: "/home",

+ 291 - 222
app/src/views/PoliceSituation/index.vue

@@ -1,235 +1,304 @@
 <template>
-	<div style="padding: 0px 35px; display: flex; justify-content: space-between">
-		<div>
-			<border-panel height="350px" width="540px" style="margin-bottom: 6px" :headerType="3" title="报警信息">
-				<Alaem :list="bjxxList" v-if="bjxxList && bjxxList.length > 0" @callback="callback" :pId="pId" />
-			</border-panel>
-			<border-panel height="600px" width="540px" style="margin-bottom: 6px" :headerType="3" title="出动力量">
-				<MobilizeStrength :list="cdxxList" :zlxx="zlxx" :hcws="hcws" :hcws1="hcws1" />
-			</border-panel>
-		</div>
-		<div style="width: 1000px; padding-bottom: 6px; position: relative">
-			<!-- <Map :data="mapData" v-if="mapData" /> -->
-			<iframe ref="box" src="https://www.720yun.com/t/65aknlde0pm?scene_id=110320524"
-				style="height: 100%; width: 100%" v-if="middleType === '720'"></iframe>
-			<div style="height: 100%; width: 100%; position: relative" v-else>
-				<Map :data="mapData" v-if="mapData" />
-			</div>
-			<!-- <div
+  <div style="padding: 0px 35px; display: flex; justify-content: space-between">
+    <div>
+      <border-panel
+        height="350px"
+        width="540px"
+        style="margin-bottom: 6px"
+        :headerType="3"
+        title="报警信息"
+      >
+        <Alaem
+          :list="bjxxList"
+          v-if="bjxxList && bjxxList.length > 0"
+          @callback="callback"
+          :pId="pId"
+        />
+      </border-panel>
+      <border-panel
+        height="600px"
+        width="540px"
+        style="margin-bottom: 6px"
+        :headerType="3"
+        title="出动力量"
+      >
+        <MobilizeStrength
+          :list="cdxxList"
+          :zlxx="zlxx"
+          :hcws="hcws"
+          :hcws1="hcws1"
+        />
+      </border-panel>
+    </div>
+    <div style="width: 1000px; padding-bottom: 6px; position: relative">
+      <!-- <Map :data="mapData" v-if="mapData" /> -->
+      <iframe
+        ref="box"
+        src="https://www.720yun.com/t/65aknlde0pm?scene_id=110320524"
+        style="height: 100%; width: 100%"
+        v-if="middleType === '720'"
+      ></iframe>
+      <div style="height: 100%; width: 100%; position: relative" v-else>
+        <Map :data="mapData" v-if="mapData && Mapflag == false" />
+        <img
+          v-if="Mapflag == true"
+          class="map-null"
+          src="../../assets/images/jqdt-null.png"
+          alt=""
+        />
+      </div>
+      <!-- <div
         class="m-btn d"
         :class="middleType === '720' ? 'map' : 'd'"
         @click="changeMiddleType"
       ></div> -->
-		</div>
-		<div>
-			<border-panel height="469px" width="540px" style="margin-bottom: 6px" :headerType="3" title="事故单位信息">
-				<UnitInformation :ajxxList="ajxxList" :jzxxList="jzxxList" :wlwsb="wlwsb" :jzImg="jzImg" />
-			</border-panel>
-			<border-panel height="480px" width="540px" style="margin-bottom: 6px" :headerType="3" title="风险隐患信息">
-				<UnitInfo :fxxxList="fxxxList" :lshzList="lshzList" />
-			</border-panel>
-		</div>
-	</div>
+    </div>
+    <div>
+      <border-panel
+        height="469px"
+        width="540px"
+        style="margin-bottom: 6px"
+        :headerType="3"
+        title="事故单位信息"
+      >
+        <UnitInformation
+          :ajxxList="ajxxList"
+          :jzxxList="jzxxList"
+          :wlwsb="wlwsb"
+          :jzImg="jzImg"
+        />
+      </border-panel>
+      <border-panel
+        height="480px"
+        width="540px"
+        style="margin-bottom: 6px"
+        :headerType="3"
+        title="风险隐患信息"
+      >
+        <UnitInfo :fxxxList="fxxxList" :lshzList="lshzList" />
+      </border-panel>
+    </div>
+  </div>
 </template>
 <script>
-	import MobilizeStrength from "./components/MobilizeStrength.vue";
-	import Alaem from "./components/Alarm.vue";
-	import UnitInformation from "./components/UnitInformation.vue";
-	import UnitInfo from "./components/UnitInfo.vue";
-	import Map from "@/components/Map.vue";
-	import moment from "moment";
-	import {
-		getBjxx,
-		geTzl,
-		getCdllxx,
-		getHcws,
-		getAjxx,
-		getJzxx,
-		getWlwsb,
-		getFxyhxx,
-		getZhd,
-	} from "@/api/jqdt.js";
-	export default {
-		name: "Fire",
-		components: {
-			Map,
-			Alaem,
-			MobilizeStrength,
-			UnitInformation,
-			UnitInfo,
-		},
-		data() {
-			return {
-				jzImg:'',
-				gxsj1: null,
-				pId: null,
-				params: {
-					pageSize: 100,
-					pageNum: 1,
-					qy: null,
-					id: null,
-				},
-				ajid: "",
-				bjxxList: [], //报警信息
-				cdxxList: [], //出动信息列表
-				zlxx: [], //出动信息总览
-				hcws: [], //火场文书
-				hcws1: [],
-				ajxxList: [],
-				jzxxList: {},
-				fxxxList: {},
-				lshzList: [],
-				wlwsb: [],
-				mapData: null,
-				middleType: "map",
-				flag:''
-			};
-		},
-		methods: {
-			changeMiddleType() {
-				if (this.middleType === "720") {
-					this.getMapData();
-					this.middleType = "map";
-				} else {
-					this.middleType = "720";
-				}
-			},
-			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.hcws1 = res.data.rows[0];
-					let i = res.data.rows;
-					let i2 = i.filter((item, index) => {
-						return index;
-					});
-					this.hcws = i2.map((i) => {
-						return {
-							...i,
-							gxsj: moment(i.gxsj).format("yyyy-MM-DD"),
-						};
-					});
-					this.hcws1.gxsj = moment(this.hcws1.gxsj).format("yyyy-MM-DD");
-				});
-				// 事故单位信息-案件信息列表
-				getAjxx(this.params).then((res) => {
-					this.ajxxList = res.data.rows[0];
-				});
-				// 事故单位建筑信息
-				const jzxxid = {
-					ajid: this.params.id,
-				};
-				getJzxx(jzxxid).then((res) => {
-					console.log(res);
-					this.jzxxList = res.data.rows[0];
-					this.jzImg = this.jzxxList.jzzp1
-					console.log(this.jzxxList.jzzp1,'建筑信息');
-				});
-				// 风险隐患信息
-				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();
-		},
-	};
+import MobilizeStrength from "./components/MobilizeStrength.vue";
+import Alaem from "./components/Alarm.vue";
+import UnitInformation from "./components/UnitInformation.vue";
+import UnitInfo from "./components/UnitInfo.vue";
+import Map from "@/components/Map.vue";
+import moment from "moment";
+import {
+  getBjxx,
+  geTzl,
+  getCdllxx,
+  getHcws,
+  getAjxx,
+  getJzxx,
+  getWlwsb,
+  getFxyhxx,
+  getZhd,
+} from "@/api/jqdt.js";
+export default {
+  name: "Fire",
+  components: {
+    Map,
+    Alaem,
+    MobilizeStrength,
+    UnitInformation,
+    UnitInfo,
+  },
+  data() {
+    return {
+      jzImg: "",
+      gxsj1: null,
+      pId: null,
+      params: {
+        pageSize: 100,
+        pageNum: 1,
+        qy: null,
+        id: null,
+      },
+      ajid: "",
+      bjxxList: [], //报警信息
+      cdxxList: [], //出动信息列表
+      zlxx: [], //出动信息总览
+      hcws: [], //火场文书
+      hcws1: [],
+      ajxxList: [],
+      jzxxList: {},
+      fxxxList: {},
+      lshzList: [],
+      wlwsb: [],
+      mapData: null,
+      middleType: "map",
+      flag: "",
+      Mapflag: false,
+    };
+  },
+  methods: {
+    changeMiddleType() {
+      if (this.middleType === "720") {
+        this.getMapData();
+        this.middleType = "map";
+      } else {
+        this.middleType = "720";
+      }
+    },
+    getMapData() {
+      // console.log(this.params.id);
+      var latreg =
+        /^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,15})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,15}|180)$/;
+      var longrg =
+        /^(\-|\+)?([0-8]?\d{1}\.\d{0,15}|90\.0{0,15}|[0-8]?\d{1}|90)$/;
+
+      this.mapData = null;
+      getZhd({
+        id: this.params.id,
+      }).then((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,
+          };
+        }
+        if (
+          !longrg.test(Number(res.data.data.dqwd1)) &&
+          !latreg.test(Number(res.data.data.dqjd1))
+        ) {
+          this.Mapflag = true;
+        } else {
+          this.Mapflag = false;
+        }
+      });
+    },
+    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.hcws1 = res.data.rows[0];
+        let i = res.data.rows;
+        let i2 = i.filter((item, index) => {
+          return index;
+        });
+        this.hcws = i2.map((i) => {
+          return {
+            ...i,
+            gxsj: moment(i.gxsj).format("yyyy-MM-DD"),
+          };
+        });
+        this.hcws1.gxsj = moment(this.hcws1.gxsj).format("yyyy-MM-DD");
+      });
+      // 事故单位信息-案件信息列表
+      getAjxx(this.params).then((res) => {
+        this.ajxxList = res.data.rows[0];
+      });
+      // 事故单位建筑信息
+      const jzxxid = {
+        ajid: this.params.id,
+      };
+      getJzxx(jzxxid).then((res) => {
+        console.log(res);
+        this.jzxxList = res.data.rows[0];
+        this.jzImg = this.jzxxList.jzzp1;
+        console.log(this.jzxxList.jzzp1, "建筑信息");
+      });
+      // 风险隐患信息
+      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">
-	.m-btn {
-		width: 78px;
-		height: 72px;
-		position: absolute;
-		right: 20px;
-		top: 30px;
-		z-index: 99;
-		cursor: pointer;
-	}
+.m-btn {
+  width: 78px;
+  height: 72px;
+  position: absolute;
+  right: 20px;
+  top: 30px;
+  z-index: 99;
+  cursor: pointer;
+}
 
-	.m-btn.d {
-		background: url("../../assets/images/dd-change-720.png") center center no-repeat;
-		background-size: 78px 72px;
-	}
+.m-btn.d {
+  background: url("../../assets/images/dd-change-720.png") center center
+    no-repeat;
+  background-size: 78px 72px;
+}
 
-	.m-btn.map {
-		background: url("../../assets/images/dd-change-map.png") center center no-repeat;
-		background-size: 78px 72px;
-	}
+.m-btn.map {
+  background: url("../../assets/images/dd-change-map.png") center center
+    no-repeat;
+  background-size: 78px 72px;
+}
+.map-null {
+  display: inline-block;
+  margin-top: 380px;
+  margin-left: 280px;
+}
 </style>

+ 59 - 10
app/src/views/login/index.vue

@@ -1,20 +1,69 @@
 <template>
-    <div>
-        <div class="bg">
-            <div></div>
-        </div>
+  <div>
+    <div class="bg">
+      <div class="main-bg">
+        <div class="left-bg"></div>
+        <div class="right-bg"></div>
+      </div>
+      <div class="btn-botn" @click="ToHome"></div>
     </div>
+  </div>
 </template>
 
-<script >
-
+<script>
+export default {
+    methods:{
+        ToHome(){
+                  this.$router.push('/home');
+        }
+    }
+}
 </script>
 
 <style lang="less" scoped>
-.bg{
+.bg {
+  width: 100%;
+  height: 100vh;
+  display: flex;
+  flex-direction: column;
+  // align-items: center;
+  background: url("../../assets/images/login-bg.png") no-repeat;
+  background-size: 100% 100%;
+  .left-bg {
+    width: 234px;
+    height: 421px;
+    background: url("../../assets/images/login-bt (2).png") no-repeat;
+    background-size: 100% 100%;
+    // margin: auto;
+    margin-left: 35px;
+    margin-bottom: 35px;
+  }
+  .main-bg {
+    flex: 1;
     width: 100%;
-    height: 100vh;
-    background: url('../../assets/images/login-bg.png') no-repeat;
+    background: url("../../assets/images/login-bt (4).png") no-repeat;
+    background-size: 100% 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    // margin: 0 15px;
+    // margin: 10px 10px;
+  }
+  .right-bg {
+    width: 234px;
+    height:481px;
+    // margin: auto;
+   margin-right: 50px;
+    background: url("../../assets/images/login-bt (3).png") no-repeat;
     background-size: 100% 100%;
+    margin-bottom: 65px;
+  }
+  .btn-botn {
+    width: 543px;
+    height: 62px;
+    background: url("../../assets/images/login-bt (1).png") no-repeat;
+    margin: 30px auto;
+    cursor: pointer;
+  }
 }
-</style>
+</style>