|
@@ -2,7 +2,7 @@
|
|
<div>
|
|
<div>
|
|
<div v-if="shows">
|
|
<div v-if="shows">
|
|
<van-nav-bar
|
|
<van-nav-bar
|
|
- title="核酸检测统计"
|
|
|
|
|
|
+ title="疫苗接种"
|
|
left-arrow
|
|
left-arrow
|
|
left-text="返回"
|
|
left-text="返回"
|
|
@click-left="onClickLeft"
|
|
@click-left="onClickLeft"
|
|
@@ -10,9 +10,12 @@
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
id="main"
|
|
id="main"
|
|
- style="width: 350px; height: 200px; margin: 0 auto; border-radius: 10px"
|
|
|
|
|
|
+ style="width: 350px; height: 300px; margin: 0 auto; border-radius: 10px"
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ id="main2"
|
|
|
|
+ style="width: 350px; height: 680px; margin: 20px auto"
|
|
></div>
|
|
></div>
|
|
- <!-- <div id="main2" style="width: 300px; height: 200px"></div> -->
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -24,6 +27,7 @@ export default {
|
|
return {
|
|
return {
|
|
shows: true,
|
|
shows: true,
|
|
infos: [],
|
|
infos: [],
|
|
|
|
+ infos1: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -34,46 +38,39 @@ export default {
|
|
"http://zaoquan.nxjiewei.com:8011/api/workbench/epidemic_situation/vaccination_statistics"
|
|
"http://zaoquan.nxjiewei.com:8011/api/workbench/epidemic_situation/vaccination_statistics"
|
|
)
|
|
)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
|
+ // console.log(res);
|
|
// 指定图表的配置项和数据
|
|
// 指定图表的配置项和数据
|
|
- this.infos = res.data.data;
|
|
|
|
|
|
+ this.infos = res.data.data;
|
|
// console.log(this.infos);
|
|
// console.log(this.infos);
|
|
var option = {
|
|
var option = {
|
|
backgroundColor: "#fff",
|
|
backgroundColor: "#fff",
|
|
|
|
+ borderRadius: 9,
|
|
title: {
|
|
title: {
|
|
text: "疫苗接种统计",
|
|
text: "疫苗接种统计",
|
|
- left: "left",
|
|
|
|
|
|
+ // left: "left",
|
|
|
|
+ x: "25px",
|
|
|
|
+ y: "15px",
|
|
},
|
|
},
|
|
tooltip: {
|
|
tooltip: {
|
|
trigger: "item",
|
|
trigger: "item",
|
|
formatter: "{a} <br/>{b} : {c}",
|
|
formatter: "{a} <br/>{b} : {c}",
|
|
|
|
+ textStyle: {
|
|
|
|
+ fontSize: 10,
|
|
|
|
+ color:"#fff"
|
|
|
|
+ },
|
|
},
|
|
},
|
|
|
|
+
|
|
legend: {
|
|
legend: {
|
|
//设置小块标记
|
|
//设置小块标记
|
|
y: "bottom",
|
|
y: "bottom",
|
|
x: "center",
|
|
x: "center",
|
|
- // orient: "vertical",
|
|
|
|
- // x: "left",
|
|
|
|
- // top: 40,
|
|
|
|
- // itemWidth: 70,
|
|
|
|
- // itemHeight: 30,
|
|
|
|
- // formatter: "{name}",
|
|
|
|
- // textStyle: {
|
|
|
|
- // color: "#FFFFFF",
|
|
|
|
- // },
|
|
|
|
- // data: [
|
|
|
|
- // { name: "高速50KM", icon: "rect" },
|
|
|
|
- // { name: "一级150KM", icon: "rect" },
|
|
|
|
- // { name: "二级150KM", icon: "rect" },
|
|
|
|
- // { name: "三级100KM", icon: "rect" },
|
|
|
|
- // { name: "四级50KM", icon: "rect" },
|
|
|
|
- // ],
|
|
|
|
},
|
|
},
|
|
calculable: true,
|
|
calculable: true,
|
|
series: [
|
|
series: [
|
|
{
|
|
{
|
|
name: "访问来源",
|
|
name: "访问来源",
|
|
type: "pie",
|
|
type: "pie",
|
|
- radius: "50%", //饼图的半径大小
|
|
|
|
|
|
+ radius: ["50%", "80%"], //饼图的半径大小
|
|
// center: ["60%", "60%"], //饼图的位置
|
|
// center: ["60%", "60%"], //饼图的位置
|
|
label: {
|
|
label: {
|
|
//饼图图形上的文本颜色设置
|
|
//饼图图形上的文本颜色设置
|
|
@@ -89,9 +86,9 @@ export default {
|
|
},
|
|
},
|
|
data: [
|
|
data: [
|
|
{
|
|
{
|
|
- value: this.infos.vaccination,
|
|
|
|
|
|
+ value: this.infos.vaccination,
|
|
name: "已接种疫苗",
|
|
name: "已接种疫苗",
|
|
- // 配置映射图显示颜色
|
|
|
|
|
|
+ // 配置映射图显示颜色
|
|
itemStyle: {
|
|
itemStyle: {
|
|
// 设置扇形的颜色
|
|
// 设置扇形的颜色
|
|
color: "#39f",
|
|
color: "#39f",
|
|
@@ -114,8 +111,170 @@ export default {
|
|
],
|
|
],
|
|
};
|
|
};
|
|
myChart.setOption(option);
|
|
myChart.setOption(option);
|
|
|
|
+ myChart.on("click", function () {
|
|
|
|
+ // console.log("111");
|
|
|
|
+ window.location.href = "#/zaoquan/yiqing/yiqing-weijiezhong";
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getanalysis1() {
|
|
|
|
+ let myChart1 = echarts.init(document.getElementById("main2"));
|
|
|
|
+ this.$http
|
|
|
|
+ .post(
|
|
|
|
+ "http://zaoquan.nxjiewei.com:8011/api/workbench/epidemic_situation/vaccination_statistics"
|
|
|
|
+ )
|
|
|
|
+ .then((res) => {
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // 指定图表的配置项和数据
|
|
|
|
+ this.infos1 = res.data.data.not_nat_section_list;
|
|
|
|
+ console.log(this.infos1);
|
|
|
|
+ let numArr = [];
|
|
|
|
+ let section_fullnameArr = [];
|
|
|
|
+ for (let i in this.infos1) {
|
|
|
|
+ // console.log(this.not_nat_section_list[i].section_fullname);
|
|
|
|
+ numArr.push(this.infos1[i].num);
|
|
|
|
+ section_fullnameArr.push(this.infos1[i].section_fullname);
|
|
|
|
+ }
|
|
|
|
+ let array = [];
|
|
|
|
+ for (let i = 0; i < numArr.length; i++) {
|
|
|
|
+ let obj = {};
|
|
|
|
+ for (let j = 0; j < section_fullnameArr.length; j++) {
|
|
|
|
+ if (i == j) {
|
|
|
|
+ obj.name = section_fullnameArr[j];
|
|
|
|
+ obj.value = numArr[i];
|
|
|
|
+ array.push(obj);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var option1 = {
|
|
|
|
+ backgroundColor: "#fff",
|
|
|
|
+ borderRadius: 9,
|
|
|
|
+ title: {
|
|
|
|
+ text: "未接种疫苗部门分布",
|
|
|
|
+ // left: "left",
|
|
|
|
+ x: "25px",
|
|
|
|
+ y: "15px",
|
|
|
|
+ },
|
|
|
|
+ tooltip: {
|
|
|
|
+ trigger: "item",
|
|
|
|
+ formatter: "{a} <br/>{b} : {c}",
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ textStyle: {
|
|
|
|
+ fontSize: 10,
|
|
|
|
+ color:"#fff"
|
|
|
|
+ },
|
|
|
|
+ legend: {
|
|
|
|
+ //设置小块标记
|
|
|
|
+ y: "bottom",
|
|
|
|
+ x: "center",
|
|
|
|
+ },
|
|
|
|
+ calculable: true,
|
|
|
|
+ series: [
|
|
|
|
+ {
|
|
|
|
+ name: "访问来源",
|
|
|
|
+ type: "pie",
|
|
|
|
+ radius: ["50%", "80%"], //饼图的半径大小
|
|
|
|
+ // center: ["60%", "60%"], //饼图的位置
|
|
|
|
+ label: {
|
|
|
|
+ //饼图图形上的文本颜色设置
|
|
|
|
+ normal: {
|
|
|
|
+ show: true,
|
|
|
|
+ position: "inner", //标签的位置
|
|
|
|
+ textStyle: {
|
|
|
|
+ fontWeight: 300,
|
|
|
|
+ fontSize: 16, //文字的字体大小
|
|
|
|
+ },
|
|
|
|
+ formatter: "{d}%", //设置百分比
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ data: array,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ };
|
|
|
|
+ myChart1.setOption(option1);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // getanalysis1(){
|
|
|
|
+ // let myChart1 = echarts.init(document.getElementById("main2"));
|
|
|
|
+ // this.$http.post(
|
|
|
|
+ // "http://zaoquan.nxjiewei.com:8011/api/workbench/epidemic_situation/vaccination_statistics"
|
|
|
|
+ // ).then(res=>{
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // this.infos1 = res.data.data.not_nat_section_list;
|
|
|
|
+ // console.log(this.infos1);
|
|
|
|
+ // // function f(s){
|
|
|
|
+ // // for(let i in s){
|
|
|
|
+ // // if(typeof s[i]=="object"){
|
|
|
|
+ // // f(s[i])
|
|
|
|
+ // // }else{
|
|
|
|
+ // // console.log(s[i]);
|
|
|
|
+ // // }
|
|
|
|
+ // // }
|
|
|
|
+ // // }
|
|
|
|
+ // // f(this.infos1)
|
|
|
|
+ // let section_fullname=[];
|
|
|
|
+ // for(let items of this.infos1){
|
|
|
|
+ // section_fullname.push(items.section_fullname)
|
|
|
|
+ // }
|
|
|
|
+ // console.log(section_fullname);
|
|
|
|
+ // var option1 = {
|
|
|
|
+ // backgroundColor: "#fff",
|
|
|
|
+ // title: {
|
|
|
|
+ // text: "核酸未检测人员部门分布",
|
|
|
|
+ // left: "left",
|
|
|
|
+ // },
|
|
|
|
+ // tooltip: {
|
|
|
|
+ // trigger: "item",
|
|
|
|
+ // formatter: "{a} <br/>{b} : {c}",
|
|
|
|
+ // },
|
|
|
|
+ // legend: {
|
|
|
|
+ // //设置小块标记
|
|
|
|
+ // y: "bottom",
|
|
|
|
+ // x: "center",
|
|
|
|
+ // // orient: "vertical",
|
|
|
|
+ // // x: "left",
|
|
|
|
+ // // top: 40,
|
|
|
|
+ // // itemWidth: 70,
|
|
|
|
+ // // itemHeight: 30,
|
|
|
|
+ // // formatter: "{name}",
|
|
|
|
+ // // textStyle: {
|
|
|
|
+ // // color: "#FFFFFF",
|
|
|
|
+ // // },
|
|
|
|
+ // // data: [
|
|
|
|
+ // // { name: "高速50KM", icon: "rect" },
|
|
|
|
+ // // { name: "一级150KM", icon: "rect" },
|
|
|
|
+ // // { name: "二级150KM", icon: "rect" },
|
|
|
|
+ // // { name: "三级100KM", icon: "rect" },
|
|
|
|
+ // // { name: "四级50KM", icon: "rect" },
|
|
|
|
+ // // ],
|
|
|
|
+ // },
|
|
|
|
+ // calculable: true,
|
|
|
|
+ // series: [
|
|
|
|
+ // {
|
|
|
|
+ // name: "访问来源",
|
|
|
|
+ // type: "pie",
|
|
|
|
+ // radius: ["50%","70%"], //饼图的半径大小
|
|
|
|
+ // // center: ["60%", "60%"], //饼图的位置
|
|
|
|
+ // label: {
|
|
|
|
+ // //饼图图形上的文本颜色设置
|
|
|
|
+ // normal: {
|
|
|
|
+ // show: true,
|
|
|
|
+ // position: "inner", //标签的位置
|
|
|
|
+ // textStyle: {
|
|
|
|
+ // fontWeight: 300,
|
|
|
|
+ // fontSize: 16, //文字的字体大小
|
|
|
|
+ // },
|
|
|
|
+ // formatter: "{d}%", //设置百分比
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
|
|
+ // data: this.infos1
|
|
|
|
+ // },
|
|
|
|
+ // ],
|
|
|
|
+ // };
|
|
|
|
+ // myChart1.setOption(option1)
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
onClickLeft() {
|
|
onClickLeft() {
|
|
window.history.back();
|
|
window.history.back();
|
|
},
|
|
},
|
|
@@ -125,6 +284,7 @@ export default {
|
|
this.token = getAllUrlParams(window.location.href).token;
|
|
this.token = getAllUrlParams(window.location.href).token;
|
|
// console.log(this.token);
|
|
// console.log(this.token);
|
|
this.getanalysis();
|
|
this.getanalysis();
|
|
|
|
+ this.getanalysis1();
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -145,4 +305,10 @@ export default {
|
|
[class*="van-hairline"]:after {
|
|
[class*="van-hairline"]:after {
|
|
border: none;
|
|
border: none;
|
|
}
|
|
}
|
|
|
|
+element.style {
|
|
|
|
+ border-radius: 20px;
|
|
|
|
+}
|
|
|
|
+>>> #zr_0 {
|
|
|
|
+ border-radius: 20px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|