diff --git a/org.html b/org.html new file mode 100644 index 0000000..70b1476 --- /dev/null +++ b/org.html @@ -0,0 +1,449 @@ + + +
+ + +党组织数量
党员数量
cascsa
*/} > ); }; -export default Pover; +export default inject("homeStore")(observer(Pover)); diff --git a/src/pages/home/homeRigrt/ac.tsx b/src/pages/home/homeRigrt/ac.tsx new file mode 100644 index 0000000..7a9f0ef --- /dev/null +++ b/src/pages/home/homeRigrt/ac.tsx @@ -0,0 +1,61 @@ +import { Store } from "antd/es/form/interface"; +import * as echarts from "echarts"; +import { inject, observer } from "mobx-react"; +import { useEffect } from "react"; +const Ac = (props: Store) => { + const { homeStore } = props; + + const initChart = (data) => { + var myChart = echarts.init(document.getElementById("rm")); + var option = { + legend: { + top: "5%", + right: "right", + textStyle: { + color: "#fff", + }, + formatter: function (name) { + let v; + data.forEach((item) => { + if (item.name === name) { + v = item.value; + } + }); + return name + "-" + v; + }, + orient: "vertical", // 垂直排列 + type: "scroll", //分页类型 + pageIconColor: "#ff781f", //翻页箭头颜色 + pageTextStyle: { + color: "#999", //翻页数字颜色 + }, //翻页数字设置 + pageIconSize: 10, + }, + series: [ + { + center: ["30%", "40%"], + name: "Access From", + type: "pie", + radius: ["40%", "60%"], + label: { + backgroundColor: "#F6F8FC", + borderColor: "#8C8D8E", + borderWidth: 0, + show: false, + borderRadius: 4, + }, + data, + }, + ], + }; + option && myChart.setOption(option); + }; + useEffect(() => { + homeStore.getRm().then((res) => { + initChart(res.data?.record); + }); + + }, [homeStore]); + return ; +}; +export default inject("homeStore")(observer(Ac)); diff --git a/src/pages/home/homeRigrt/home_right.tsx b/src/pages/home/homeRigrt/home_right.tsx index 585ed5e..88c8c19 100644 --- a/src/pages/home/homeRigrt/home_right.tsx +++ b/src/pages/home/homeRigrt/home_right.tsx @@ -1,3 +1,5 @@ +import Ac from "./ac"; +import Pyzx from "./pyzx"; import "./right.less"; import Wz from "./wz"; const HomeRight = () => { @@ -13,11 +15,13 @@ const HomeRight = () => {档案管理
评优争先