|
@@ -1,7 +1,9 @@
|
|
|
<template>
|
|
|
<div id="mapApp">
|
|
|
- <div class="btn">
|
|
|
- <el-button @click="drawer = true">打开抽屉</el-button>
|
|
|
+ <div class="btn" v-if="nowObj.qsx">
|
|
|
+ <!-- <el-button @click="drawer = true">打开抽屉</el-button> -->
|
|
|
+ <span class="sx qsx">前时相:{{ nowObj.qsx }}</span>
|
|
|
+ <span class="sx hsx">后时相:{{ nowObj.hsx }}</span>
|
|
|
</div>
|
|
|
<MapView :maptype="maptype" ref="MapView" />
|
|
|
|
|
@@ -71,14 +73,18 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
+ <el-dialog title="详细信息" :visible.sync="dialogVisible" width="30%">
|
|
|
+ <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import MapView from "../MapView.vue";
|
|
|
+import CustomDetails from "@/components/custom-detailsInfo.vue";
|
|
|
import parse from "wellknown";
|
|
|
-import { getPcsj, listPcsjXQList } from "@/api/supervise/pcsj";
|
|
|
-
|
|
|
+import { getPcsj, listPcsjXQList, getPcsjXQ } from "@/api/supervise/pcsj";
|
|
|
+import { detailInfos } from "./config";
|
|
|
import "ol/ol.css";
|
|
|
// import { get as getProjection, transform } from "ol/proj.js";
|
|
|
import Map from "ol/Map";
|
|
@@ -108,6 +114,7 @@ import { removeWebGLTile, addTiff } from "@/utils/help";
|
|
|
export default {
|
|
|
components: {
|
|
|
MapView,
|
|
|
+ CustomDetails,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -130,8 +137,11 @@ export default {
|
|
|
},
|
|
|
curPageResultLayer: {},
|
|
|
vectorLayer: {},
|
|
|
- nowId: "",
|
|
|
+ nowObj: {},
|
|
|
itemObj: {}, //用于存储分屏高亮的实体
|
|
|
+ dialogVisible: false,
|
|
|
+ infoObj: {},
|
|
|
+ detailInfos: detailInfos,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -151,15 +161,15 @@ export default {
|
|
|
removeWebGLTile("mapCon2");
|
|
|
let urlQsx = this.newObj.proxypath + row.qsxtif;
|
|
|
let urlHsx = this.newObj.proxypath + row.hsxtif;
|
|
|
- if (this.nowId != row.id) {
|
|
|
+ if (this.nowObj.id != row.id) {
|
|
|
this.maptype = "split";
|
|
|
- this.nowId = row.id;
|
|
|
+ this.nowObj = row;
|
|
|
addTiff("mapCon1", urlQsx);
|
|
|
addTiff("mapCon2", urlHsx);
|
|
|
this.test(row);
|
|
|
} else {
|
|
|
this.maptype = "normal";
|
|
|
- this.nowId = "";
|
|
|
+ this.nowObj = {};
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -178,7 +188,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleDetails(row) {
|
|
|
- console.log("我是详情");
|
|
|
+ getPcsjXQ(row.id).then((res) => {
|
|
|
+ this.infoObj = res.data;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ });
|
|
|
},
|
|
|
handleClose() {
|
|
|
this.drawer = false;
|
|
@@ -279,10 +292,23 @@ export default {
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.btn {
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 60px;
|
|
|
- z-index: 40;
|
|
|
+ // position: absolute;
|
|
|
+ // top: 0;
|
|
|
+ // left: 60px;
|
|
|
+ // z-index: 40;
|
|
|
+ .sx {
|
|
|
+ background: rgb(151, 250, 222);
|
|
|
+ padding: 5px 10px;
|
|
|
+ border: 1px solid #4949492b;
|
|
|
+ border-radius: 5px;
|
|
|
+ position: absolute;
|
|
|
+ top: 20px;
|
|
|
+ left: calc(50% - 420px);
|
|
|
+ z-index: 40;
|
|
|
+ }
|
|
|
+ .hsx {
|
|
|
+ left: calc(50% - 220px);
|
|
|
+ }
|
|
|
}
|
|
|
// .mask-layer{
|
|
|
// width: 264px !important;
|