|
@@ -28,7 +28,7 @@
|
|
|
v-model="nowyear"
|
|
|
placeholder="请选择"
|
|
|
size="mini"
|
|
|
- @change="regionChange"
|
|
|
+ @change="regionChange()"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in yearList"
|
|
@@ -43,7 +43,7 @@
|
|
|
v-model="region"
|
|
|
:show-all-levels="false"
|
|
|
:options="store.state.region_tree"
|
|
|
- @change="regionChange"
|
|
|
+ @change="regionChange()"
|
|
|
placeholder="行政区"
|
|
|
size="mini"
|
|
|
:props="{
|
|
@@ -167,6 +167,11 @@ import Statistics from "../components/statistics.vue";
|
|
|
import { QueryOne, QueryList } from "@/api/cockpitNew";
|
|
|
import {
|
|
|
GetGdDate,
|
|
|
+ GetGdZl,
|
|
|
+ GetGdFl,
|
|
|
+ GetGdBhqk,
|
|
|
+ GetGdLnbhqk,
|
|
|
+ GetGdQxfl,
|
|
|
GetYjjbntDate,
|
|
|
GetYjjbntZl,
|
|
|
GetYjjbntFl,
|
|
@@ -323,7 +328,11 @@ export default {
|
|
|
this.nowlayer = this.nowyear;
|
|
|
init_handler(this.yearList[0], this.showInfo);
|
|
|
store.setaddNode([
|
|
|
- { id: "gdbb", url: this.yearList[0].url, label: "耕地保护" },
|
|
|
+ {
|
|
|
+ id: "gdbh" + this.$props.pageType,
|
|
|
+ url: this.yearList[0].url,
|
|
|
+ label: "耕地保护",
|
|
|
+ },
|
|
|
]);
|
|
|
this.setImager(this.yearList[0], true, (layer) => {
|
|
|
Getlayers(this.yearList[0].url, (layers) => {
|
|
@@ -341,7 +350,7 @@ export default {
|
|
|
},
|
|
|
showInfo(data, obj) {
|
|
|
let legends = store.state.addlegend;
|
|
|
- if (legends && legends.length && legends[0].id == "gdbb") {
|
|
|
+ if (legends && legends.length && legends[0].id == "gdbh") {
|
|
|
this.$emit("handleView", data, obj);
|
|
|
}
|
|
|
},
|
|
@@ -360,6 +369,7 @@ export default {
|
|
|
},
|
|
|
async regionChange(region) {
|
|
|
// this.region = region;
|
|
|
+ if (region) this.nowyear = "";
|
|
|
if (!this.nowyear) await this.GetDate();
|
|
|
this.getData();
|
|
|
},
|
|
@@ -371,14 +381,24 @@ export default {
|
|
|
async Getzzxm() {
|
|
|
let parms = { year: this.nowyear, xzqhdm: this.region, dlbm: this.dlbm };
|
|
|
if (this.$props.pageType == 0) {
|
|
|
- GetGdDate().then((res) => {});
|
|
|
+ GetGdZl(parms).then((res) => {
|
|
|
+ this.zldata = res.data;
|
|
|
+ });
|
|
|
+ if (this.dlbm == "01")
|
|
|
+ GetGdFl(parms).then((res) => {
|
|
|
+ this.fldata = res.data;
|
|
|
+ });
|
|
|
+ GetGdQxfl(parms).then((res) => {
|
|
|
+ this.cityList = res.data;
|
|
|
+ });
|
|
|
} else {
|
|
|
GetYjjbntZl(parms).then((res) => {
|
|
|
this.zldata = res.data;
|
|
|
});
|
|
|
- GetYjjbntFl(parms).then((res) => {
|
|
|
- this.fldata = res.data;
|
|
|
- });
|
|
|
+ if (this.dlbm == "01")
|
|
|
+ GetYjjbntFl(parms).then((res) => {
|
|
|
+ this.fldata = res.data;
|
|
|
+ });
|
|
|
GetYjjbntQxfl(parms).then((res) => {
|
|
|
this.cityList = res.data;
|
|
|
});
|
|
@@ -391,12 +411,19 @@ export default {
|
|
|
this.eData.xData = [];
|
|
|
this.eData.yData = [[]];
|
|
|
if (!this.$props.pageType) {
|
|
|
- // GetGdDate(params).then((res) => {});
|
|
|
+ GetGdLnbhqk({ xzqhdm: this.region, year: this.nowyear }).then(
|
|
|
+ ({ data }) => {
|
|
|
+ this.lnbndata = data;
|
|
|
+ this.setLnbh(data);
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
- GetYjjbntLnbhqk({ xzqhdm: this.region }).then(({ data }) => {
|
|
|
- this.lnbndata = data;
|
|
|
- this.setLnbh(data);
|
|
|
- });
|
|
|
+ GetYjjbntLnbhqk({ xzqhdm: this.region, year: this.nowyear }).then(
|
|
|
+ ({ data }) => {
|
|
|
+ this.lnbndata = data;
|
|
|
+ this.setLnbh(data);
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
setLnbh(data) {
|
|
@@ -417,7 +444,9 @@ export default {
|
|
|
xzqhdm: this.region,
|
|
|
};
|
|
|
if (!this.$props.pageType) {
|
|
|
- GetGdDate(params).then((res) => {});
|
|
|
+ GetGdBhqk(params).then((res) => {
|
|
|
+ this.bhdata = res.data;
|
|
|
+ });
|
|
|
} else {
|
|
|
GetYjjbntBhqk(params).then((res) => {
|
|
|
this.bhdata = res.data;
|
|
@@ -446,7 +475,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
contrast() {
|
|
|
- let dbdata = { id: this.region, fp: this.yearList, type: "gdbb" }; //+ this.$props.pageType,
|
|
|
+ let dbdata = { id: this.region, fp: this.yearList, type: "gdbh" }; //+ this.$props.pageType,
|
|
|
console.log("contrast", dbdata);
|
|
|
this.$emit("contrast", dbdata);
|
|
|
},
|
|
@@ -455,11 +484,14 @@ export default {
|
|
|
},
|
|
|
sourcesshow(show) {
|
|
|
console.log(this.nowyear, show, "000");
|
|
|
- this.setImager({ year: this.nowyear }, show);
|
|
|
+ this.setImager({ year: this.nowlayer }, show);
|
|
|
},
|
|
|
reset() {
|
|
|
this.$nextTick(() => {
|
|
|
- this.sourcesshow(false);
|
|
|
+ // this.sourcesshow(false);
|
|
|
+ Object.keys(this.imagelayers).forEach((key) => {
|
|
|
+ viewer.imageryLayers.remove(this.imagelayers[key]);
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
setEchart(data, id) {
|