调用接口

main
李劲龙 1 year ago
parent 60811e4003
commit 265677dbef

@ -27,9 +27,10 @@
<span></span>
</div>
<div class="topbox-item-right">
<div class="redStyle">较去年</div>
<span class="spanxia"></span>
<!-- <span class="spanshang"></span> -->
<!-- <div class="redStyle">较去年</div> -->
<div >较去年</div>
<!-- <span class="spanxia"></span> -->
<span class="spanshang"></span>
</div>
</div>
<div class="topbox-item">
@ -42,9 +43,10 @@
<span></span>
</div>
<div class="topbox-item-right">
<div class="redStyle">较去年</div>
<span class="spanxia"></span>
<!-- <span class="spanshang"></span> -->
<!-- <div class="redStyle">较去年</div> -->
<div >较去年</div>
<!-- <span class="spanxia"></span> -->
<span class="spanshang"></span>
</div>
</div>
</div>

@ -97,18 +97,18 @@ export default {
getData() {
let newRouter = this.$route.query;
getCPCJ({ name: newRouter.code }).then((res) => {
// res.data.result.forEach((value, index) => {
// if (value.sampleType == 1) {
// this.provinceC += 1;
// } else if (value.sampleType == 2) {
// this.countryC += 1;
// }
// });
this.countryC = 12;
this.provinceC = 12;
this.pt = 67;
this.sccy = 60;
this.ltcy = 40;
res.data.result.forEach((value, index) => {
if (value.sampleType == 1) {
this.provinceC += 1;
} else if (value.sampleType == 2) {
this.countryC += 1;
}
});
// this.countryC = 12;
// this.provinceC = 12;
// this.pt = 67;
// this.sccy = 60;
// this.ltcy = 40;
this.$nextTick(() => {
let chartDom = this.$refs["left-echart"];
this.myChart1 = echarts.init(chartDom);
@ -192,13 +192,13 @@ export default {
// : valuenameitemStyle
// : namelegend-data
{
value: 39,
value: "1",
name: "生产抽样环节",
// percent: "39",
// itemStyle: { color: "#007EFF" },
},
{
value: 21,
value: "1",
name: "流通环节抽样",
// percent: "21",
// itemStyle: { color: "#2CD8EC" },

@ -346,6 +346,8 @@ export default {
font-weight: 400;
color: #9CB4E2;
line-height: 18px;
overflow: hidden;
padding-right: 30px;
}
}
}
@ -418,5 +420,6 @@ export default {
//
// ::v-deep .el-loading-spinner .el-loading-text{
// color: #005432;
// }</style>
// }
</style>
Loading…
Cancel
Save