Commit 3310334f authored by jianqian's avatar jianqian

应急物资

parent 03251c42
......@@ -106,7 +106,8 @@ export default {
return{
tableData:[],
enterpriseRegNum:"",
enterpriseCheckIngNum:""
enterpriseCheckIngNum:"",
company:["aa","bb"]
}
},
......@@ -271,7 +272,6 @@ export default {
},
inPieChart(){
// 基于准备好的dom,初始化echarts实例
var myChart3 = echarts.init(document.getElementById('main3'));
// let that=this;
// var getData1 = [];
// var getData2 = [];
......@@ -307,109 +307,112 @@ export default {
that,
`/enterpriseInfo/enterpriseRiskInfo`,{},
function(res) {
that.Risk = res.data;
console.log(res.data);
console.log(that.Risk);
var myChart3 = echarts.init(document.getElementById('main3'));
// 绘制图表
myChart3.setOption({
title: {
text: '隐患和风险控制',//主标题
color: '#fff',
// subtext: '柱状图',
textStyle: {
color: "#fff",
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
legend: {
data: ['隐患', '风险控制'],
textStyle: { //图例文字的样式
color: '#fff',
}
},
xAxis: [
{
type: 'category',
axisLabel: {
show:true,
interval:0,
rotate:40
} ,
//X轴白线
axisLine: {
show: true,
lineStyle: {
color: '#fff',
},
},
//data: ['测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患'],
data:res.data.company,
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
axisLabel:{
show: true,
rich: {
flag: {
fontSize: 25,
padding: 5
}
}
},
axisLine: {
show: true,
lineStyle: {
color: '#fff',
},
},
splitLine: {
show: true,
lineStyle: {
color: 'rgba(71, 126, 171, 1)',
type: 'dashed'
},
},
},
{
type: 'value',
interval: 5,
}
],
series: [
{
name: '隐患',
type: 'bar',
// data: [
// 400, 1300, 700, 1000, 1500, 1800, 200, 300, 2000, 1000, 1300
// ]
data:res.data.trouble,
},
{
name: '风险控制',
type: 'line',
// symbol:'circle',
symbolSize:6,
//data: [1000,1300, 1450, 1600, 1700, 1800, 1850, 1800, 1700, 1600, 1500],
data:res.data.risk,
itemStyle : {normal : {color:'#00D7FE', //改变折线点的颜色
lineStyle:{color:'#00D7FE'} //改变折线颜色
},
},
}
]
})
});
// 绘制图表
myChart3.setOption({
title: {
text: '隐患和风险控制',//主标题
color: '#fff',
// subtext: '柱状图',
textStyle: {
color: "#fff",
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
legend: {
data: ['隐患', '风险控制'],
textStyle: { //图例文字的样式
color: '#fff',
}
},
xAxis: [
{
type: 'category',
axisLabel: {
show:true,
interval:0,
rotate:40
} ,
//X轴白线
axisLine: {
show: true,
lineStyle: {
color: '#fff',
},
},
data: ['测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患', '测试隐患'],
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
axisLabel:{
show: true,
rich: {
flag: {
fontSize: 25,
padding: 5
}
}
},
axisLine: {
show: true,
lineStyle: {
color: '#fff',
},
},
splitLine: {
show: true,
lineStyle: {
color: 'rgba(71, 126, 171, 1)',
type: 'dashed'
},
},
},
{
type: 'value',
interval: 5,
}
],
series: [
{
name: '隐患',
type: 'bar',
data: [
400, 1300, 700, 1000, 1500, 1800, 200, 300, 2000, 1000, 1300
]
},
{
name: '风险控制',
type: 'line',
// symbol:'circle',
symbolSize:6,
data: [1000,1300, 1450, 1600, 1700, 1800, 1850, 1800, 1700, 1600, 1500],
itemStyle : {normal : {color:'#00D7FE', //改变折线点的颜色
lineStyle:{color:'#00D7FE'} //改变折线颜色
},
},
}
]
})
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment