风险等级占比接口对接
This commit is contained in:
parent
8a8624f705
commit
732c95b506
@ -1269,12 +1269,13 @@ class Home extends React.Component {
|
||||
|
||||
riskLevel = () => {
|
||||
let riskLevel = [];
|
||||
let showData = [
|
||||
{ value: 2, name: "一级" },
|
||||
{ value: 5, name: "二级" },
|
||||
{ value: 15, name: "三级" },
|
||||
{ value: 30, name: "四级" },
|
||||
];
|
||||
let showData = [];
|
||||
this.state.riskLevelData.forEach((item) => {
|
||||
showData.push({
|
||||
value: item.COUNT,
|
||||
name: item.RISK_LEVEL,
|
||||
});
|
||||
})
|
||||
|
||||
let riskLevels = document.getElementById("riskLevel");
|
||||
if (riskLevels) {
|
||||
@ -1284,7 +1285,7 @@ class Home extends React.Component {
|
||||
title: [
|
||||
{
|
||||
text: "52",
|
||||
x: "26%",
|
||||
x: "27%",
|
||||
y: "40%",
|
||||
textStyle: {
|
||||
fontSize: 26,
|
||||
@ -1294,7 +1295,7 @@ class Home extends React.Component {
|
||||
},
|
||||
{
|
||||
text: "风险总数",
|
||||
x: "24%",
|
||||
x: "26%",
|
||||
y: "55%",
|
||||
textStyle: {
|
||||
color: "#666",
|
||||
@ -1310,13 +1311,14 @@ class Home extends React.Component {
|
||||
icon: "pin",
|
||||
orient: "vartical",
|
||||
// x: "right",
|
||||
top: "18%",
|
||||
// top: "18%",
|
||||
y:'center',
|
||||
right: "15%",
|
||||
bottom: "20%",
|
||||
// bottom: "20%",
|
||||
data: showData,
|
||||
// itemWidth: 20,
|
||||
// itemHeight: 14,
|
||||
itemGap: 25,
|
||||
// itemGap: 25,
|
||||
formatter: function (name) {
|
||||
//通过name获取到数组对象中的单个对象
|
||||
let singleData = showData.filter(function (item) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user