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

更新

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