|
@@ -70,9 +70,18 @@ export default {
|
|
|
jscType: "jsc_gdbh_yelx_nt",
|
|
|
};
|
|
|
QueryList(params).then((res) => {
|
|
|
- res.data.forEach((edata) => {
|
|
|
- optionsData.push({ name: edata.dlbmmc, value: edata.yjjbntmj });
|
|
|
- });
|
|
|
+ if (res.data.length) {
|
|
|
+ res.data.forEach((edata) => {
|
|
|
+ optionsData.push({ name: edata.dlbmmc, value: edata.yjjbntmj });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ optionsData = [
|
|
|
+ { name: "水田", value: 0 },
|
|
|
+ { name: "水浇地", value: 0 },
|
|
|
+ { name: "旱地", value: 0 },
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.echartRef.setOptions(optionsData, 1 / 100000);
|
|
|
});
|
|
@@ -101,7 +110,6 @@ export default {
|
|
|
// top: 10px;
|
|
|
width: 98%;
|
|
|
height: 100px;
|
|
|
- margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
.item {
|
|
@@ -174,7 +182,7 @@ export default {
|
|
|
}
|
|
|
#gdbh_echart {
|
|
|
width: 100%;
|
|
|
- height: calc(100% - 110px);
|
|
|
+ height: calc(100% - 100px);
|
|
|
// position: relative;
|
|
|
// top: 110px;
|
|
|
}
|