|
@@ -5,7 +5,7 @@
|
|
|
<div class="icon" :class="`icongdbh${i}`"></div>
|
|
|
<div class="text">
|
|
|
<p>{{ sd.name }}</p>
|
|
|
- <span class="sdvalue">{{ sd.value || 0 }}</span>
|
|
|
+ <span class="sdvalue">{{ sdata[sd.prop] || 0 }}</span>
|
|
|
<span class="unit">{{ sd.unit }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -17,18 +17,19 @@
|
|
|
<script>
|
|
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
import borderTemplate from "./borderTemplate.vue";
|
|
|
-import highPie from "../../components/echartsTemplate/highPie.vue";
|
|
|
+// import highPie from "../../components/echartsTemplate/highPie.vue";
|
|
|
import pie3d from "../../components/echartsTemplate/3dPie.vue";
|
|
|
-import { QueryList } from "../../api/cockpitNew";
|
|
|
+import { QueryOne, QueryList } from "../../api/cockpitNew";
|
|
|
export default {
|
|
|
components: { borderTemplate, pie3d },
|
|
|
data() {
|
|
|
return {
|
|
|
+ sdata: {},
|
|
|
sdlist: [
|
|
|
- { name: "高标准农田", value: "", unit: "km²" }, //耕地保有量//url: "residentPopulation",
|
|
|
- { name: "补充耕地项目", value: "", unit: "个" },
|
|
|
- { name: "永久基本农田", value: "", unit: "km²" },
|
|
|
- { name: "补充耕地面积", value: "", unit: "km²" }
|
|
|
+ { name: "高标准农田", prop: "residentPopulation", unit: "km²" }, //耕地保有量
|
|
|
+ { name: "补充耕地项目", prop: "residentPopulation", unit: "个" },
|
|
|
+ { name: "永久基本农田", prop: "residentPopulation", unit: "km²" },
|
|
|
+ { name: "补充耕地面积", prop: "residentPopulation", unit: "km²" }
|
|
|
]
|
|
|
};
|
|
|
},
|
|
@@ -48,26 +49,38 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.echartRef.setOptions(optionsData);
|
|
|
});
|
|
|
- // this.GetQueryListztsh(datas)
|
|
|
- // this.GetQueryListztsh(datas)
|
|
|
+ this.GetQueryOne_nt(datas);
|
|
|
+ this.GetQueryOne_bh(datas);
|
|
|
+ this.GetQueryList(datas);
|
|
|
},
|
|
|
- GetQueryListztsh(datas) {
|
|
|
+ GetQueryOne_nt(datas) {
|
|
|
let params = {
|
|
|
...datas,
|
|
|
- jscType: "jsc_wpjc_ztsh",
|
|
|
+ jscType: "jsc_gdbh_ztgh_nt",
|
|
|
id: 46
|
|
|
};
|
|
|
- QueryList(params).then(res => {
|
|
|
+ QueryOne(params).then(res => {
|
|
|
+ this.sdata = { ...this.sdata, ...res.data }; //&& res.data.length > 0 ? res.data[0] : {};
|
|
|
+ });
|
|
|
+ },
|
|
|
+ GetQueryOne_bh(datas) {
|
|
|
+ let params = {
|
|
|
+ ...datas,
|
|
|
+ jscType: "jsc_gdbh_ztgh_bc",
|
|
|
+ id: 4603
|
|
|
+ };
|
|
|
+ QueryOne(params).then(res => {
|
|
|
// this.sdata = res.data && res.data.length > 0 ? res.data[0] : {};
|
|
|
});
|
|
|
},
|
|
|
- GetQueryListztsh(datas) {
|
|
|
+ GetQueryList(datas) {
|
|
|
let params = {
|
|
|
...datas,
|
|
|
- jscType: "jsc_wpjc_ztsh",
|
|
|
+ jscType: "jsc_gdbh_yelx_nt",
|
|
|
id: 46
|
|
|
};
|
|
|
QueryList(params).then(res => {
|
|
|
+ console.log("----", res.data);
|
|
|
// this.sdata = res.data && res.data.length > 0 ? res.data[0] : {};
|
|
|
});
|
|
|
}
|