|
@@ -87,11 +87,14 @@
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
+ </div>
|
|
|
+ <div class="el-col headerInp">
|
|
|
<el-input
|
|
|
v-model="input"
|
|
|
placeholder="请输入监测编号搜索"
|
|
|
@keyup.enter.native="initNew"
|
|
|
></el-input>
|
|
|
+ <el-button plain icon="edit-pen" size="mini">查询</el-button>
|
|
|
</div>
|
|
|
<el-table
|
|
|
ref="singleTable"
|
|
@@ -166,7 +169,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { ShapeUpload } from "@/api/ghss/hgxfx.js";
|
|
|
+import { ShapeUpload, ShapeUploadV1 } from "@/api/ghss/hgxfx.js";
|
|
|
import { ElMessage } from "element-ui";
|
|
|
import { GetXzqhTree } from "@/api/map";
|
|
|
import {
|
|
@@ -203,18 +206,19 @@ export default {
|
|
|
yearsOpt: [], //检测图斑时间季度数据数组
|
|
|
monitorOpt: [],
|
|
|
monitorVal: "",
|
|
|
- yearsVal: "",//时间季度绑定
|
|
|
- input: "",//图斑编号搜索条件绑定
|
|
|
- updateObj: {//搜索条件
|
|
|
+ yearsVal: "", //时间季度绑定
|
|
|
+ input: "", //图斑编号搜索条件绑定
|
|
|
+ updateObj: {
|
|
|
+ //搜索条件
|
|
|
region: "4602",
|
|
|
tab: 1,
|
|
|
val0: "",
|
|
|
val1: "",
|
|
|
val2: "",
|
|
|
},
|
|
|
- active_dableData: [],//表格数据
|
|
|
- multipleSelection: [],//选择表格选中的数据
|
|
|
- idArr: [],//存储id数组用于删除
|
|
|
+ active_dableData: [], //表格数据
|
|
|
+ multipleSelection: [], //选择表格选中的数据
|
|
|
+ idArr: [], //存储id数组用于删除
|
|
|
// -----------以上为选择图斑功能所需数据------------
|
|
|
userXZQ: "", //store.state.user.user.dept.district,
|
|
|
fwlist: {
|
|
@@ -244,6 +248,7 @@ export default {
|
|
|
xzfw: "",
|
|
|
xzmj: 0,
|
|
|
feature: null,
|
|
|
+ yptype:1,
|
|
|
},
|
|
|
handlerDraw: null,
|
|
|
draw: null, //绘制
|
|
@@ -257,9 +262,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
creatTb() {
|
|
|
+ this.yptype = 2
|
|
|
this.dialogVisible = false;
|
|
|
this.multipleSelection.forEach((item, index) => {
|
|
|
- this.model.xzmj += item.jcmj
|
|
|
+ this.model.xzmj += item.jcmj;
|
|
|
+ this.fileDataID += item.id + ",";
|
|
|
item.type = "图斑上图";
|
|
|
if (item.geom)
|
|
|
loadGeoJSON(item.geom, "#55A1E3", { isfly: true }, (data) => {
|
|
@@ -268,11 +275,14 @@ export default {
|
|
|
entity.properties = item;
|
|
|
});
|
|
|
});
|
|
|
- this.idArr.push(item.jcbh);
|
|
|
+ this.idArr.push(item.jcbh);
|
|
|
});
|
|
|
+ //去掉最后一个逗号(如果不需要去掉,就不用写)
|
|
|
+ if (this.multipleSelection.length > 0) {
|
|
|
+ this.fileDataID = this.fileDataID.substr(0, this.fileDataID.length - 1);
|
|
|
+ }
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
- console.log(val, "====");
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
handleClose(done) {
|
|
@@ -290,7 +300,6 @@ export default {
|
|
|
this.updateObj.val0 = val.startTime;
|
|
|
this.updateObj.val1 = val.endTime;
|
|
|
this.yearsVal = val.quarter;
|
|
|
- console.log(this.updateObj.val0, this.updateObj.val1, this.yearsVal);
|
|
|
},
|
|
|
getXzqTreeData() {
|
|
|
GetXzqhTree().then((res) => {
|
|
@@ -329,7 +338,7 @@ export default {
|
|
|
startTime: this.updateObj.val0,
|
|
|
endTime: this.updateObj.val1,
|
|
|
pageNum: 1,
|
|
|
- pageSize: '9999999',
|
|
|
+ pageSize: "9999999",
|
|
|
jcbh: this.input,
|
|
|
};
|
|
|
JctbList(obj).then((res) => {
|
|
@@ -356,11 +365,14 @@ export default {
|
|
|
this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
|
|
|
this.clearAll(false);
|
|
|
}
|
|
|
+ this.yptype = 1
|
|
|
const formdata = new FormData();
|
|
|
formdata.append("file", file.raw);
|
|
|
formdata.append("fromType", 2);
|
|
|
formdata.append("fromRoute", this.$route.path);
|
|
|
- ShapeUpload(formdata).then((res) => {
|
|
|
+ formdata.append("storeStats", 0);
|
|
|
+ formdata.append("followup", "");
|
|
|
+ ShapeUploadV1(formdata).then((res) => {
|
|
|
if (res.success) {
|
|
|
this.model.xzmj = (res.data.area * 0.0015).toFixed(2);
|
|
|
// viewer.entities.removeAll();
|
|
@@ -411,13 +423,13 @@ export default {
|
|
|
},
|
|
|
//绘制
|
|
|
drawMap() {
|
|
|
- this.remove()//删除选择的图斑
|
|
|
+ this.remove(); //删除选择的图斑
|
|
|
+ this.yptype = 1
|
|
|
if (!window.handlerPolygon) {
|
|
|
common.initHandler("Polygon");
|
|
|
}
|
|
|
common.handlerDrawing("Polygon").then(
|
|
|
(res) => {
|
|
|
- // console.log(res.positions, "------");
|
|
|
//过滤掉高度
|
|
|
const filteredArr = res.positions.filter((item, index) => {
|
|
|
if ((index + 1) % 3 !== 0) {
|
|
@@ -443,13 +455,11 @@ export default {
|
|
|
}
|
|
|
|
|
|
var matrix = listToMatrix(filteredArr, 2);
|
|
|
- // console.log(matrix, "max-----");
|
|
|
|
|
|
matrix.push(matrix[0]);
|
|
|
const geojsonPolygon = turf.polygon([matrix]);
|
|
|
// var parse = require("wellknown"); //引入wellknow
|
|
|
const wktPolygon = parse.stringify(geojsonPolygon);
|
|
|
- // console.log("WKT Polygon:", wktPolygon);
|
|
|
if (this.$props.type == "cutfill") {
|
|
|
this.model.geom = wktPolygon;
|
|
|
this.$emit("cutfill", this.model.geom);
|
|
@@ -464,8 +474,10 @@ export default {
|
|
|
formdata.append("fromType", 1);
|
|
|
formdata.append("geom", wktPolygon);
|
|
|
formdata.append("fromRoute", this.$route.path);
|
|
|
+ formdata.append("storeStats", 0);
|
|
|
+ formdata.append("followup", "");
|
|
|
// this.addPolygon();
|
|
|
- ShapeUpload(formdata).then((res) => {
|
|
|
+ ShapeUploadV1(formdata).then((res) => {
|
|
|
if (res.success) {
|
|
|
this.fileDataID = res.data.id;
|
|
|
this.model.xzmj = (res.data.area * 0.0015).toFixed(2);
|
|
@@ -498,7 +510,7 @@ export default {
|
|
|
clearAll(clearfile = true) {
|
|
|
//销毁上传创建的面
|
|
|
// viewer.entities.removeAll();
|
|
|
- this.remove()
|
|
|
+ this.remove();
|
|
|
this.resetDataSources();
|
|
|
this.model.xzfw = "";
|
|
|
this.model.xzmj = 0;
|
|
@@ -580,32 +592,68 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-.headerSelect {
|
|
|
- width: 100%;
|
|
|
- height: 26px;
|
|
|
- // background: #00ffff;
|
|
|
- margin: 5px 0px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- /deep/ .el-select {
|
|
|
- padding: 0 10px;
|
|
|
- }
|
|
|
- /deep/ .el-input--suffix .el-input__inner {
|
|
|
- padding-right: 15px;
|
|
|
- // height: 26px;
|
|
|
- background: #041c3273 !important;
|
|
|
- border: 1px dashed #0f7ac8;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
- /deep/ .el-cascader {
|
|
|
- // line-height: 26px;
|
|
|
- }
|
|
|
- /deep/.el-input__icon {
|
|
|
- // line-height: 1;
|
|
|
- color: #fff;
|
|
|
+.gdzl {
|
|
|
+ .headerSelect {
|
|
|
+ width: 100%;
|
|
|
+ height: 26px;
|
|
|
+ // background: #00ffff;
|
|
|
+ margin: 5px 0px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ /deep/ .el-select {
|
|
|
+ width: 95%;
|
|
|
+ // padding: 0 10px;
|
|
|
+ // margin-right: 10px;
|
|
|
+ }
|
|
|
+ /deep/ .el-input--suffix .el-input__inner {
|
|
|
+ padding-right: 15px;
|
|
|
+ // height: 26px;
|
|
|
+ background: #041c3273 !important;
|
|
|
+ border: 1px dashed #0f7ac8;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ /deep/ .el-cascader {
|
|
|
+ // line-height: 26px;
|
|
|
+ }
|
|
|
+ /deep/.el-input__icon {
|
|
|
+ // line-height: 1;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ /deep/ .el-input__inner::placeholder {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
}
|
|
|
- /deep/ .el-input__inner::placeholder {
|
|
|
- color: #fff;
|
|
|
+ .headerInp {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ /deep/ .el-button--mini {
|
|
|
+ background: #0f7ac8;
|
|
|
+ border: none;
|
|
|
+ border-radius: 0;
|
|
|
+ color: #fff;
|
|
|
+ width: 60px;
|
|
|
+ height: 26px;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ /deep/ .el-input__inner {
|
|
|
+ height: 26px;
|
|
|
+ width: 80%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+.ghzc .el-col .el-cascader--mini {
|
|
|
+ width: 33% !important;
|
|
|
+}
|
|
|
+.ghzc .el-col .el-select {
|
|
|
+ width: 33% !important;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/ .el-dialog__header {
|
|
|
+ padding: 10px 20px 0px;
|
|
|
+}
|
|
|
+/deep/ .el-dialog__body {
|
|
|
+ padding: 0px 20px;
|
|
|
+}
|
|
|
</style>
|