From 7073564e76beef5cec44f2ba67ca605fe4f4ff31 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 29 七月 2024 18:10:05 +0800
Subject: [PATCH] 11
---
src/views/project/indexstatistics/components/organnumchart/index.vue | 91 +++++++++++++++++++++++++++++++--------------
1 files changed, 63 insertions(+), 28 deletions(-)
diff --git a/src/views/project/indexstatistics/components/organnumchart/index.vue b/src/views/project/indexstatistics/components/organnumchart/index.vue
index 20762fa..982ee31 100644
--- a/src/views/project/indexstatistics/components/organnumchart/index.vue
+++ b/src/views/project/indexstatistics/components/organnumchart/index.vue
@@ -16,29 +16,32 @@
export default {
name: "organnumchart",
components: {
- Echart,
+ Echart
},
props: {
id: {
type: String,
- default: "organnumcgart",
+ default: "organnumcgart"
},
width: {
type: String,
- default: "100%",
+ default: "100%"
},
height: {
type: String,
- default: "600px",
+ default: "600px"
},
cdata: {
type: Array,
- default: () => [],
+ default: () => []
},
+ CommonOrgan: {
+ type: Object
+ }
},
data() {
return {
- options: {},
+ options: {}
};
},
created() {},
@@ -47,49 +50,63 @@
resetOption(newData) {
let organNameArr = [];
let organeNumArr = [];
+ let organeNumArrabandonCount = [];
for (let i = 0; i < newData.length; i++) {
organNameArr.push(newData[i].name);
organeNumArr.push(newData[i].value);
+ organeNumArrabandonCount.push(newData[i].value1);
}
this.options = {
title: {
- text: "鑾峰彇鍣ㄥ畼鍜岀粍缁囩殑鏁伴噺",
+ text:
+ "鑾峰彇鍣ㄥ畼鍜岀粍缁囩殑鏁伴噺" +
+ "(鑾峰彇閲忥細" +
+ this.CommonOrgan.countSum +
+ "锛涘純鐢ㄩ噺锛�" +
+ this.CommonOrgan.abandonCountSum +
+ ")",
+ left: "center",
+ top: "5%",
+ textStyle: {
+ color: "#566f94",
+ fontSize: 16
+ }
},
tooltip: {
trigger: "axis",
axisPointer: {
- type: "shadow",
- },
+ type: "shadow"
+ }
},
grid: {
top: "12%",
left: "0",
right: "0",
bottom: "5%",
- containLabel: true,
+ containLabel: true
},
xAxis: {
type: "category",
data: organNameArr,
axisLine: {
- show: false,
+ show: false
},
axisLabel: {
textStyle: {
color: "#566f94", //鏇存敼鍧愭爣杞存枃瀛楅鑹�
- fontSize: 12, //鏇存敼鍧愭爣杞存枃瀛楀ぇ灏�
+ fontSize: 12 //鏇存敼鍧愭爣杞存枃瀛楀ぇ灏�
},
- interval: 0,
- },
+ interval: 0
+ }
},
yAxis: {
type: "value",
// boundaryGap: [0, 0.01],
- show: false,
+ show: false
},
series: [
{
- name: "鍣ㄥ畼鏁伴噺",
+ name: "鑾峰彇鏁伴噺",
type: "bar",
//barWidth: 20, //鏌卞浘瀹藉害
itemStyle: {
@@ -100,16 +117,35 @@
textStyle: {
//鏁板�兼牱寮�
color: "#566f94",
- fontSize: 14,
- },
- },
- },
+ fontSize: 14
+ }
+ }
+ }
},
- data: organeNumArr,
+ data: organeNumArr
},
- ],
+ {
+ name: "寮冪敤鏁伴噺",
+ type: "bar",
+ //barWidth: 20, //鏌卞浘瀹藉害
+ itemStyle: {
+ normal: {
+ label: {
+ show: true, //寮�鍚樉绀�
+ position: "top", //鍦ㄤ笂鏂规樉绀�
+ textStyle: {
+ //鏁板�兼牱寮�
+ color: "#566f94",
+ fontSize: 14
+ }
+ }
+ }
+ },
+ data: organeNumArrabandonCount
+ }
+ ]
};
- },
+ }
},
computed: {},
watch: {
@@ -118,11 +154,10 @@
this.resetOption(newData);
},
immediate: true,
- deep: true,
- },
- },
+ deep: true
+ }
+ }
};
</script>
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>
--
Gitblit v1.9.3