|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<div id="mapApp">
|
|
|
- <div class="btn" v-if="nowObj.qsx">
|
|
|
+ <div class="btn" v-if="nowObj['前时相']">
|
|
|
<!-- <el-button @click="drawer = true">打开抽屉</el-button> -->
|
|
|
- <span class="sx qsx">前时相:{{ nowObj.qsx }}</span>
|
|
|
- <span class="sx hsx">后时相:{{ nowObj.hsx }}</span>
|
|
|
+ <span class="sx qsx">前时相:{{ nowObj['前时相']}}</span>
|
|
|
+ <span class="sx hsx">后时相:{{ nowObj['后时相'] }}</span>
|
|
|
</div>
|
|
|
<MapView :maptype="maptype" ref="MapView" />
|
|
|
|
|
@@ -13,19 +13,56 @@
|
|
|
:modal="false"
|
|
|
:wrapperClosable="false"
|
|
|
modal-class="mask-layer"
|
|
|
+ size="28vw"
|
|
|
>
|
|
|
<div class="jctbCon">
|
|
|
<div class="tbTitle">
|
|
|
<span>监测图斑{{ newObj.name }}</span>
|
|
|
-
|
|
|
- <el-input
|
|
|
+ <el-select
|
|
|
+ v-model="domains"
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ placeholder="请选择其它搜索条件"
|
|
|
+ @change="handleChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ :disabled="item.value == '监测编号' ? true : false"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button @click="handleDownload">下载</el-button>
|
|
|
+ <!-- <el-input
|
|
|
placeholder="请输入监测编号查询"
|
|
|
prefix-icon="el-icon-search"
|
|
|
- v-model="queryParams.jcbh"
|
|
|
- @change="getList()"
|
|
|
+ v-model="queryParams['监测编号']"
|
|
|
+ @change="getTemplate()"
|
|
|
>
|
|
|
- </el-input>
|
|
|
- <el-button @click="handleDownload">下载</el-button>
|
|
|
+ </el-input> -->
|
|
|
+ <div class="demo-input-suffix">
|
|
|
+ 监测编号:
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入监测编号查询"
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ v-model="queryParams['监测编号']"
|
|
|
+ @change="getTemplate()"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div class="demo-input-suffix" v-for="(ditem, i) in domains" :key="i">
|
|
|
+ {{ ditem + ":" }}
|
|
|
+ <el-input
|
|
|
+ :placeholder="'请输入' + ditem + '查询'"
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ v-model="queryParams[ditem]"
|
|
|
+ @change="getTemplate()"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <el-button @click.prevent="removeDomain(ditem)">删除</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="numCard">
|
|
|
<div class="cardItem">
|
|
@@ -37,21 +74,20 @@
|
|
|
<span>{{ newObj.spotsarea }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table :data="tableData" border style="width: 100%">
|
|
|
- <!-- @cell-click="tableClick" -->
|
|
|
- <el-table-column prop="jcbh" label="监测编号" width="220">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span style="cursor: pointer" @click="tableClick(scope.row)">{{
|
|
|
- scope.row.jcbh
|
|
|
- }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="xmc" label="区县名称" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ @row-click="tableClick"
|
|
|
+ >
|
|
|
<el-table-column
|
|
|
- prop="jcmj"
|
|
|
- label="监测面积(亩)"
|
|
|
+ :prop="templateList[i]"
|
|
|
+ :label="templateList[i]"
|
|
|
show-overflow-tooltip
|
|
|
+ v-for="(item, i) in templateList"
|
|
|
+ :key="i"
|
|
|
+ :width="templateList[i] == '监测编号' ? 200 : ''"
|
|
|
+ align="center"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center">
|
|
@@ -70,12 +106,20 @@
|
|
|
:total="total"
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
+ @pagination="getTemplate"
|
|
|
/>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
<el-dialog title="详细信息" :visible.sync="dialogVisible" width="30%">
|
|
|
- <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails>
|
|
|
+ <!-- <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails> -->
|
|
|
+ <el-descriptions class="margin-top" :column="1">
|
|
|
+ <el-descriptions-item
|
|
|
+ :label="item"
|
|
|
+ v-for="(item, i) in descriptionsList"
|
|
|
+ :key="i"
|
|
|
+ >{{ infoObj[item] }}</el-descriptions-item
|
|
|
+ >
|
|
|
+ </el-descriptions>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -84,7 +128,16 @@
|
|
|
import MapView from "../MapView.vue";
|
|
|
import CustomDetails from "@/components/custom-detailsInfo.vue";
|
|
|
import parse from "wellknown";
|
|
|
-import { getPcsj, listPcsjXQList, getPcsjXQ } from "@/api/supervise/pcsj";
|
|
|
+// import { pinyin } from "pinyin-pro";
|
|
|
+import {
|
|
|
+ getPcsj,
|
|
|
+ listPcsjXQList,
|
|
|
+ getPcsjXQ,
|
|
|
+ getXqListMap,
|
|
|
+ getXqListKey,
|
|
|
+ getXqIdMap,
|
|
|
+ getXqIdKey,
|
|
|
+} from "@/api/supervise/pcsj";
|
|
|
import { detailInfos } from "./config";
|
|
|
import "ol/ol.css";
|
|
|
// import { get as getProjection, transform } from "ol/proj.js";
|
|
@@ -119,10 +172,13 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ options: [],
|
|
|
+ domains: [], //存储动态搜索列表
|
|
|
+ // value: ["监测编号"], //下拉框选中的值
|
|
|
maptype: "normal",
|
|
|
total: 0,
|
|
|
queryParams: {
|
|
|
- jcbh: "", //监测编号
|
|
|
+ 监测编号: "", //监测编号
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
pcsjid: this.$route.query.id,
|
|
@@ -143,6 +199,9 @@ export default {
|
|
|
dialogVisible: false,
|
|
|
infoObj: {},
|
|
|
detailInfos: detailInfos,
|
|
|
+ templateList: [],
|
|
|
+ descriptionsList: [], //详情描述列表存储字段
|
|
|
+ envelopegeomObj: {}, //用于存储进入页面飞入视角的对象
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -150,12 +209,115 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
getPcsj(this.$route.query.id).then((response) => {
|
|
|
this.newObj = response.data;
|
|
|
+
|
|
|
+ // if (this.newObj.envelopegeom && this.newObj.envelopegeom != "") {
|
|
|
+ // if (typeof this.newObj.envelopegeom === "string") {
|
|
|
+ // let geom = this.newObj.envelopegeom;
|
|
|
+ // this.newObj.envelopegeom = parse(geom);
|
|
|
+ // }
|
|
|
+ // let features = new GeoJSON().readFeatures(this.newObj.envelopegeom);
|
|
|
+ // this.envelopegeomObj = new VectorLayer({
|
|
|
+ // source: new VectorSource({
|
|
|
+ // features: features,
|
|
|
+ // }),
|
|
|
+ // style: function (feature) {
|
|
|
+ // return new Style({
|
|
|
+ // stroke: new Stroke({
|
|
|
+ // //边界样式
|
|
|
+ // color: "rgba(255, 0, 0, 1)",
|
|
|
+ // width: 2,
|
|
|
+ // }),
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // zIndex: 9999,
|
|
|
+ // });
|
|
|
+ // let fullExtent = this.envelopegeomObj.getSource().getExtent();
|
|
|
+
|
|
|
+ // window.map["mapDiv"]
|
|
|
+ // .getView()
|
|
|
+ // .fit(fullExtent, window.map["mapDiv"].getSize());
|
|
|
+ // window.map["mapDiv"].addLayer(this.envelopegeomObj);
|
|
|
+ // }
|
|
|
});
|
|
|
- this.getList();
|
|
|
+ this.getTemplate();
|
|
|
});
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ removeDomain(item) {
|
|
|
+ var index = this.domains.indexOf(item);
|
|
|
+ if (index !== -1) {
|
|
|
+ this.domains.splice(index, 1);
|
|
|
+ this.$delete(this.queryParams, item); //删除对象属性
|
|
|
+ this.getTemplate();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleDelete(row) {
|
|
|
+ this.tableData.forEach((item, i) => {
|
|
|
+ window.map["mapDiv"].removeLayer(this.curPageResultLayer["mapDiv" + i]);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleChange(val) {
|
|
|
+ // this.$set(this.queryParams, val, "");
|
|
|
+ // this.domains.push(val);
|
|
|
+ // this.domains = val;
|
|
|
+ if (this.domains.indexOf(val) == -1) {
|
|
|
+ this.domains = val;
|
|
|
+ this.$set(this.queryParams, val, "");
|
|
|
+ } else {
|
|
|
+ this.domains.splice(this.domains.indexOf(val), 1);
|
|
|
+ this.$delete(this.queryParams, item);
|
|
|
+ }
|
|
|
+ console.log(this.queryParams, ";this.queryParams", this.domains);
|
|
|
+ },
|
|
|
+ //动态获取设置的模版字段
|
|
|
+ getTemplate() {
|
|
|
+ this.handleDelete();
|
|
|
+ let arr = [
|
|
|
+ "中心点经度",
|
|
|
+ "中心点纬度",
|
|
|
+ "前时相",
|
|
|
+ "后时相",
|
|
|
+ "空间信息",
|
|
|
+ "geom",
|
|
|
+ "前时相对应影像数据",
|
|
|
+ "后时相对应影像数据",
|
|
|
+ ];
|
|
|
+ this.templateList = [];
|
|
|
+ this.options = [];
|
|
|
+
|
|
|
+ getXqListKey(this.queryParams).then((res) => {
|
|
|
+ res.data.forEach((i) => {
|
|
|
+ if (!arr.includes(i)) {
|
|
|
+ this.templateList.push(i);
|
|
|
+ // this.options.push({
|
|
|
+ // // value: pinyin(i, {
|
|
|
+ // // pattern: "first",
|
|
|
+ // // toneType: "none",
|
|
|
+ // // separator: "",
|
|
|
+ // // }),
|
|
|
+ // label: i,
|
|
|
+ // });
|
|
|
+ this.options.push({
|
|
|
+ value: i,
|
|
|
+ label: i,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ getXqListMap(this.queryParams).then((res) => {
|
|
|
+ console.log(res, "======");
|
|
|
+ this.tableData = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.initVectorLayer("mapDiv");
|
|
|
+ this.initVectorLayer("mapCon1");
|
|
|
+ this.initVectorLayer("mapCon2");
|
|
|
+ this.addGeoJson("mapDiv");
|
|
|
+ this.addGeoJson("mapCon1");
|
|
|
+ this.addGeoJson("mapCon2");
|
|
|
+ });
|
|
|
+ },
|
|
|
handleDownload() {
|
|
|
const zipfile = this.newObj.proxypath + ".zip";
|
|
|
window.open(`${zipfile}`);
|
|
@@ -163,8 +325,8 @@ export default {
|
|
|
tableClick(row) {
|
|
|
removeWebGLTile("mapCon1");
|
|
|
removeWebGLTile("mapCon2");
|
|
|
- let urlQsx = this.newObj.proxypath + row.qsxtif;
|
|
|
- let urlHsx = this.newObj.proxypath + row.hsxtif;
|
|
|
+ let urlQsx = this.newObj.proxypath + row["前时相对应影像数据"];
|
|
|
+ let urlHsx = this.newObj.proxypath + row["后时相对应影像数据"];
|
|
|
if (this.nowObj.id != row.id) {
|
|
|
this.maptype = "split";
|
|
|
this.nowObj = row;
|
|
@@ -181,8 +343,6 @@ export default {
|
|
|
listPcsjXQList(this.queryParams).then((response) => {
|
|
|
this.tableData = response.rows;
|
|
|
this.total = response.total;
|
|
|
- // this.open = true;
|
|
|
- // this.title = "修改监管批次数据";
|
|
|
this.initVectorLayer("mapDiv");
|
|
|
this.initVectorLayer("mapCon1");
|
|
|
this.initVectorLayer("mapCon2");
|
|
@@ -192,10 +352,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleDetails(row) {
|
|
|
- getPcsjXQ(row.id).then((res) => {
|
|
|
+ getXqIdMap({ pcsjid: this.$route.query.id, id: row.id }).then((res) => {
|
|
|
this.infoObj = res.data;
|
|
|
- this.dialogVisible = true;
|
|
|
});
|
|
|
+ getXqIdKey({ pcsjid: this.$route.query.id }).then((res) => {
|
|
|
+ this.descriptionsList = res.data;
|
|
|
+ });
|
|
|
+ this.dialogVisible = true;
|
|
|
},
|
|
|
handleClose() {
|
|
|
this.drawer = false;
|
|
@@ -203,7 +366,6 @@ export default {
|
|
|
test(item) {
|
|
|
window.map["mapCon1"].removeLayer(this.itemObj);
|
|
|
window.map["mapCon2"].removeLayer(this.itemObj);
|
|
|
-
|
|
|
if (item.geom && item.geom != "") {
|
|
|
if (typeof item.geom === "string") {
|
|
|
let geom = this.tableData[i].geom;
|
|
@@ -225,27 +387,26 @@ export default {
|
|
|
},
|
|
|
zIndex: 9999,
|
|
|
});
|
|
|
- let fullExtent = this.itemObj.getSource().getExtent();
|
|
|
- window.map["mapCon1"].getView().fit(fullExtent, {
|
|
|
- duration: 3, //动画的持续时间,
|
|
|
- callback: null,
|
|
|
+ window.map["mapCon1"].getView().animate({
|
|
|
+ center: [item["中心点经度"], item["中心点纬度"]],
|
|
|
+ zoom: 16.5,
|
|
|
+ duration: 2000, // 动画持续时间,单位毫秒
|
|
|
});
|
|
|
window.map["mapCon1"].addLayer(this.itemObj);
|
|
|
window.map["mapCon2"].addLayer(this.itemObj);
|
|
|
}
|
|
|
},
|
|
|
- addGeoJson2(name) {
|
|
|
- window.map[name].removeLayer(this.vectorLayer[name]);
|
|
|
+ //创建监测图斑列表实体
|
|
|
+ addGeoJson(name) {
|
|
|
this.tableData.forEach((titem, i) => {
|
|
|
if (titem.geom && titem.geom != "") {
|
|
|
if (typeof titem.geom === "string") {
|
|
|
- // let geom = transform(this.tableData[i].geom);
|
|
|
let geom = this.tableData[i].geom;
|
|
|
titem.geom = parse(geom);
|
|
|
}
|
|
|
let features = new GeoJSON().readFeatures(titem.geom);
|
|
|
-
|
|
|
- this.vectorLayer[name] = new VectorLayer({
|
|
|
+ var tempName = name + i;
|
|
|
+ this.curPageResultLayer[tempName] = new VectorLayer({
|
|
|
source: new VectorSource({
|
|
|
features: features,
|
|
|
}),
|
|
@@ -253,36 +414,21 @@ export default {
|
|
|
return new Style({
|
|
|
stroke: new Stroke({
|
|
|
//边界样式
|
|
|
- color: "#1f1cd3",
|
|
|
+ color: "rgba(0, 0, 255, 1)",
|
|
|
width: 2,
|
|
|
}),
|
|
|
});
|
|
|
},
|
|
|
zIndex: 9999,
|
|
|
});
|
|
|
- window.map[name].addLayer(this.vectorLayer[name]);
|
|
|
+ window.map[name].addLayer(this.curPageResultLayer[tempName]);
|
|
|
}
|
|
|
});
|
|
|
- let fullExtent = this.vectorLayer[name].getSource().getExtent();
|
|
|
- window.map[name].getView().fit(fullExtent, {
|
|
|
- duration: 3, //动画的持续时间,
|
|
|
- callback: null,
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- addGeoJson(name) {
|
|
|
- this.tableData.forEach((titem, i) => {
|
|
|
- if (titem.geom && titem.geom != "") {
|
|
|
- if (typeof titem.geom === "string") {
|
|
|
- // let geom = transform(this.tableData[i].geom);
|
|
|
- let geom = this.tableData[i].geom;
|
|
|
- titem.geom = parse(geom);
|
|
|
- }
|
|
|
- let features = new GeoJSON().readFeatures(titem.geom);
|
|
|
- this.curPageResultLayer[name].getSource().addFeatures(features);
|
|
|
- }
|
|
|
- });
|
|
|
- let fullExtent = this.curPageResultLayer[name].getSource().getExtent();
|
|
|
+ let fullExtent = this.curPageResultLayer[
|
|
|
+ name + (this.tableData.length - 1)
|
|
|
+ ]
|
|
|
+ .getSource()
|
|
|
+ .getExtent();
|
|
|
window.map[name].getView().fit(fullExtent, {
|
|
|
duration: 3, //动画的持续时间,
|
|
|
callback: null,
|
|
@@ -354,12 +500,21 @@ export default {
|
|
|
::v-deep .el-drawer__container {
|
|
|
position: static !important;
|
|
|
}
|
|
|
+::v-deep .el-drawer__body {
|
|
|
+ width: 28vw;
|
|
|
+}
|
|
|
.jctbCon {
|
|
|
.tbTitle {
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
+ justify-content: flex-start;
|
|
|
+ flex-wrap: wrap;
|
|
|
::v-deep .el-input {
|
|
|
- width: 40%;
|
|
|
+ // width: 28%;
|
|
|
+ width: 55%;
|
|
|
+ }
|
|
|
+ ::v-deep .el-input--suffix {
|
|
|
+ width: 100% !important;
|
|
|
}
|
|
|
}
|
|
|
.numCard {
|
|
@@ -371,7 +526,8 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
.cardItem {
|
|
|
- width: 230px;
|
|
|
+ // width: 230px;
|
|
|
+ width: 200px;
|
|
|
height: 85px;
|
|
|
background: linear-gradient(
|
|
|
180deg,
|