Commit 7d940ca8 authored by 张博's avatar 张博

更新

parent 5173460a
......@@ -11,9 +11,9 @@
objModelURI: '/a3dres',
// 根url
// baseURI: 'http://172.16.11.30:9008/',
baseURI: 'http://172.16.3.77:8083/',
baseURI: 'http://172.16.3.122:8083/',
// convertorURI: 'http://172.16.3.122:8083/',
convertorURI: 'http://172.16.3.77:8083/',
convertorURI: 'http://172.16.3.122:8083/',
patrolURI: 'http://172.16.3.77:9000/',
rulesConfigURI: 'http://172.16.10.91:8080/',
// plugin URI
......
......@@ -233,14 +233,14 @@ export const parseLevelFilter = (instance, topic, data) => {
mc.node.visible = visible;
mc.object2DPipe.pipeNode.show();
} else {
mc.show();
mc.visible = true;
}
} else {
if (mc.extData.type === 'fireCar') {
mc.node.visible = visible;
mc.object2DPipe.pipeNode.hide();
} else {
mc.hide();
mc.visible = false;
}
}
});
......
......@@ -4,7 +4,6 @@ import echarts from 'echarts/lib/echarts';
import { safetyIndexWeekAction } from './../../../services/panoramicService';
import { getIcon } from './../../../utils/request';
/**
* 一周安全指数
*/
......@@ -15,23 +14,19 @@ const option = {
boundaryGap: false,
data: ['03-15', '03-16', '03-17', '03-18', '03-19', '03-20'],
axisLabel: {
textStyle: {
color: 'rgba(255,255,255,1)',
fontSize: '14',
fontFamiliy: "SourceHanSansCN-Medium,SourceHanSansCN"
},
fontFamiliy: 'SourceHanSansCN-Medium,SourceHanSansCN'
}
}
},
yAxis: {
type: 'value',
splitLine: { show: false },//去除网格线
splitLine: { show: false }, //去除网格线
axisLine: {
lineStyle: {
color: '#2A5D75',
color: '#2A5D75'
}
},
// 改变y轴字体颜色和大小
......@@ -39,51 +34,49 @@ const option = {
textStyle: {
color: 'rgba(255,255,255,1)',
fontSize: '14',
fontFamiliy: "SourceHanSansCN-Medium,SourceHanSansCN"
},
},
fontFamiliy: 'SourceHanSansCN-Medium,SourceHanSansCN'
}
}
},
series: [{
data: [0, 40, 80, 100, 85, 70, 85, 80],
type: 'line',
smooth: true, //这个是把线变成
itemStyle: {
normal: {
color: "#FF7400", //折线点的颜色
lineStyle: {
width: 3,//折线宽度
color: "#DDBF28"//折线颜色
series: [
{
data: [0, 40, 80, 100, 85, 70, 85, 80],
type: 'line',
smooth: true, //这个是把线变成
itemStyle: {
normal: {
color: '#FF7400', //折线点的颜色
lineStyle: {
width: 3, //折线宽度
color: '#DDBF28' //折线颜色
}
}
},
areaStyle: {
normal: {
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#00ADFF'
},
{
offset: 0.5,
color: '#DDBF28'
},
{
offset: 1,
color: '#FF7400'
}
])
}
}
},
areaStyle: {
normal: {
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#00ADFF'
}, {
offset: 0.5,
color: '#DDBF28'
}, {
offset: 1,
color: '#FF7400'
}])
}
}
}]
]
};
class SafetyIndexWeek extends Component {
constructor(props) {
super(props);
this.state = {
......@@ -101,35 +94,32 @@ class SafetyIndexWeek extends Component {
data
});
});
}
};
getOptionsx = (map) => {
getOptionsx = map => {
return {
xAxis: {
type: 'category',
boundaryGap: false,
data: map.get("dates"),
data: map.get('dates'),
axisLabel: {
interval: 0,//横轴信息全部显示
interval: 0, //横轴信息全部显示
// rotate:40,
textStyle: {
color: 'rgba(255,255,255,1)',
fontSize: '12',
fontFamiliy: "SourceHanSansCN-Medium,SourceHanSansCN"
fontFamiliy: 'SourceHanSansCN-Medium,SourceHanSansCN'
},
margin: 15,//刻度标签与轴线之间的距离。
margin: 15 //刻度标签与轴线之间的距离。
}
},
yAxis: {
type: 'value',
splitLine: { show: false },//去除网格线
splitLine: { show: false }, //去除网格线
axisLine: {
lineStyle: {
color: '#2A5D75',
color: '#2A5D75'
}
},
// 改变y轴字体颜色和大小
......@@ -137,113 +127,115 @@ class SafetyIndexWeek extends Component {
textStyle: {
color: 'rgba(255,255,255,1)',
fontSize: '12',
fontFamiliy: "SourceHanSansCN-Medium,SourceHanSansCN"
fontFamiliy: 'SourceHanSansCN-Medium,SourceHanSansCN'
},
margin: 15,//刻度标签与轴线之间的距离。
},
margin: 15 //刻度标签与轴线之间的距离。
}
},
series: [{
data: map.get("values"),
type: 'line',
symbol: 'circle',//折线点设置为实心点
smooth: true, //这个是把线变成
itemStyle: {
normal: {
color: "#E1B623", //折线点的颜色
lineStyle: {
width: 3,//折线宽度
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
offset: 0,
color: '#FF0000'
}, {
offset: 0.2,
color: '#DDBF28'
}, {
offset: 0.4,
color: '#FF7400'
}, {
offset: 0.5,
color: '#00ADFF'
}, {
offset: 0.6,
color: '#DDBF28'
}])
}
}
},
areaStyle: {
normal: {
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上#766016 transparent
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#00ADFF'
}, {
offset: 0.1,
color: '#6e6a26'
}, {
offset: 0.2,
color: '#766016'
}, {
offset: 0.5,
color: '#4b2006'
},{
offset: 0.6,
color: '#280d07'
}])
}
series: [
{
data: map.get('values'),
type: 'line',
symbol: 'circle', //折线点设置为实心点
smooth: 0.6,
// itemStyle: {
// normal: {
// color: '#FF7400', //折线点的颜色
// lineStyle: {
// width: 3, //折线宽度
// color: '#DDBF28' //折线颜色
// }
// }
// },
lineStyle: {
normal: { color: {
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{
offset: 0, color: 'rgba(255, 0, 0, 0)' // 0% 处的颜色
},
{
offset: 0.5, color: 'rgba(255, 0, 0, 0.3)' // 50% 处的颜色
},
{
offset: 0.9, color: 'rgba(255, 116, 0, 0.67)' // 90% 处的颜色
},
{
offset: 0.95, color: 'rgba(221, 191, 40, 0.76)' // 95% 处的颜色
},
{
offset: 1, color: 'rgba(0, 173, 255, 0.76)' // 100% 处的颜色
}],
global: false // 缺省为 false
} }
},
areaStyle: { normal: { color: {
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{
offset: 0, color: 'rgba(255, 0, 0, 0)' // 0% 处的颜色
},
{
offset: 0.5, color: 'rgba(255, 0, 0, 0.3)' // 50% 处的颜色
},
{
offset: 0.9, color: 'rgba(255, 116, 0, 0.67)' // 90% 处的颜色
},
{
offset: 0.95, color: 'rgba(221, 191, 40, 0.76)' // 95% 处的颜色
},
{
offset: 1, color: 'rgba(0, 173, 255, 0.76)' // 100% 处的颜色
}],
global: false // 缺省为 false
} } }
}
}]
]
};
}
};
handleData = (data) => {
handleData = data => {
let map = new Map();
let dates = [];
let values = [];
if (data && data.length > 0) {
data.map(item => {
let time2 = item.date.substring(5);
dates.push(time2)
values.push(item.value)
})
dates.push(time2);
values.push(item.value);
});
}
map.set("dates", dates);
map.set("values", values);
map.set('dates', dates);
map.set('values', values);
return map;
}
};
render() {
let { data } = this.state;
let map = this.handleData(data);
return (
<div className="safetyIndexWeek">
<div className="content-week-font-style">
<span className='titleIcon' style={{ background: `url(${getIcon('textleft')}) no-repeat center center/100% 100%` }}></span>一周安全趋势</div>
<span className="titleIcon" style={{ background: `url(${getIcon('textleft')}) no-repeat center center/100% 100%` }} />一周安全趋
</div>
{/* <img src="/src/assets/panoramic/statistical/main_icon_textleft.png" ></img> */}
<ReactEcharts option={this.getOptionsx(map)} className='echart-week' />
<ReactEcharts option={this.getOptionsx(map)} className="echart-week" />
</div>
);
}
}
SafetyIndexWeek.propTypes = {
};
SafetyIndexWeek.propTypes = {};
export default SafetyIndexWeek;
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