Commit 8b1c9401 authored by zhengjiangtao's avatar zhengjiangtao

实时检控更名实时监测,移除字段,优化离线地图

parent b597bb79
......@@ -3,3 +3,4 @@ lib
libs
*.js
*.md
*.scss
......@@ -113,9 +113,9 @@
//地图中心点
mapCenter: [108.90771484, 35.93184115],
//地图zoom显示级别
showZoom: [7, 13, 18],
// showZoom: [7, 13, 18],
//离线地图地址
picURI: 'http://172.16.3.121:8001/'
picURI: 'http://172.16.9.20:9090/'
};
// 配置日志系统
......
......@@ -43,6 +43,8 @@
"amos-tool": "^1.x",
"amos-viz": "^1.x",
"amos-websocket": "^1.0.3",
"amos-amap":"~1.0.9",
"amos-mqtt": "^1.0.1",
"classnames": "^2.2.5",
"dt2react": "^1.x",
"ray-code-split": "^1.0.1",
......
......@@ -95,10 +95,10 @@ class AlarmSearch extends Component {
</div>
<div className="alarm-view-select-3">
<span>报警时间:</span>
<RangePicker
<RangePicker
style = {{width:400}}
format="YYYY-MM-DD HH:mm:ss"
onChange={e => this.onSelectChange('time', e)}
format="YYYY-MM-DD HH:mm:ss"
onChange={e => this.onSelectChange('time', e)}
value = {[searchParam.startTime === void 0 ?'':moment(searchParam.startTime, 'YYYY-MM-DD HH:mm:ss'), searchParam.endTime === void 0 ?'':moment(searchParam.endTime, 'YYYY-MM-DD HH:mm:ss')]}
showTime={{
format: 'HH:mm:ss',
......
......@@ -29,7 +29,7 @@ const getColumns = () => {
title: '指标名称',
dataIndex: 'eq_point_name',
key: 'eq_point_name',
width: '15%',
width: '20%',
className: 'uant-table-thead'
},
{
......@@ -46,13 +46,13 @@ const getColumns = () => {
width: '10%',
className: 'uant-table-thead'
},
{
title: '数据类型',
dataIndex: 'soe',
key: 'soe',
width: '10%',
className: 'uant-table-thead'
},
// {
// title: '数据类型',
// dataIndex: 'soe',
// key: 'soe',
// width: '10%',
// className: 'uant-table-thead'
// },
{
title: '保护对象',
dataIndex: 'equipmentName',
......
......@@ -76,9 +76,13 @@ const getColumns = () => {
{
title: '恢复时间',
dataIndex: 'recoveryDate',
key: 'recoveryDate',
key: 'recoveryDate' + 'fireEquipmentCode',
width: '10%',
render: text => moment(text).format('YYYY-MM-DD HH:mm:ss'),
render: text => {
if (text) {
moment(text).format('YYYY-MM-DD HH:mm:ss');
}
},
className: 'uant-table-thead'
}
];
......
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Form, Input, Row, Col, Select, Radio, Button, AmosAlert, Connect } from 'amos-framework';
import * as endConf from 'amos-processor/lib/config/endconf';
import loadScripts from 'dt2react/lib/utils/loadScripts';
import '../../../styles/view/console/stationMainten/StationMainten.scss';
import {
......@@ -10,7 +11,6 @@ import {
queryAllUserAction,
addStationMaintenAction,
loadStationMaintenAction } from '../../../services/stationMaintenService';
import * as endConf from 'amos-processor/lib/config/endconf';
const eventConnect = Connect.eventConnect;
......@@ -45,7 +45,8 @@ class StationMainten extends Component {
isClick: true,
form: {
name: '',
status: 0,
status: '0',
zero: '0',
longitude: '', //经度
latitude: '', //纬度
elecType: ''
......@@ -249,7 +250,6 @@ class StationMainten extends Component {
const { form } = this.state;
form.longitude = marker.longitude;
form.latitude = marker.latitude;
console.log(marker);
this.setState({ form });
// autoLocation(marker.longitude, marker.latitude);
}
......@@ -329,7 +329,7 @@ class StationMainten extends Component {
}
render() {
const { form, rules, editable, useTypeData, provinceData, cityData, countyData, allUserList, BasicMap } = this.state;
const { form, rules, editable, useTypeData, provinceData, cityData, countyData, allUserList, BasicMap, zero } = this.state;
const formItemLayout = {
labelCol: {
xs: { span: 24 },
......@@ -375,7 +375,7 @@ class StationMainten extends Component {
</Col>
</Row>
<Row>
<Col span={12} className="p-10" style={{ }}>
<Col span={12} className="p-10">
<Form model={form} rules={rules} ref={component => this.model = component}>
<input type='hidden' name='id' value={form.id} />
<div className="stationMainten-body-left">
......@@ -469,7 +469,7 @@ class StationMainten extends Component {
</FormItem>
<FormItem label={<span>状态</span>} field="status" {...formItemLayout}>
<RadioGroup disabled={!editable} value={form.status} onChange={this.onRadioChange}>
<Radio value={0} >启用</Radio>
<Radio value={zero} >启用</Radio>
<Radio value={1} >停用</Radio>
</RadioGroup>
</FormItem>
......
......@@ -11,12 +11,12 @@ const _mapCenter = AmosConfig.mapCenter;
const _picURI = AmosConfig.picURI;
const mapConfig = {
zoom: _showZoom[0],
zoom: 4,
resizeEnable: true,
zoomEnable: true,
// plugins: ['Scale', 'MapType', 'OverView', 'ControlBar'],
plugins: ['Scale'],
zooms: [_showZoom[0], _showZoom[2]],
zooms: [4, 12],
expandZoomRange: true,
doubleClickZoom: false,
showIndoorMap: false, //隐藏地图自带的室内地图图层
......@@ -26,7 +26,7 @@ const mapConfig = {
const layers = [
new window.AMap.TileLayer({
getTileUrl(x, y, z) {
return `${_picURI}shanxi/amap/${z}/${x}/${y}.png`;
return `${_picURI}${z}/${x}/${y}.png`;
},
zIndex: 0
})
......@@ -46,7 +46,7 @@ class IndexMap extends Component {
super(props);
this.state = {
mapCenter: _mapCenter,
center: { longitude: 108.93984, latitude: 34.34127 },
center: { longitude: 101.90771484, latitude: 35.92184115 },
marker: { longitude: 0, latitude: 0 },
// marker: { longitude: null, latitude: null },
visible: true,
......@@ -89,18 +89,18 @@ class IndexMap extends Component {
}
return (
<div className="content indexPage" style={{ height: '614px' }}>
<div className="content indexPage" style={{ height: '612px' }}>
<BaseMap events={events} center={mapCenter} {...mapConfig} >
<Marker position={marker} key={marker.longitude} />
<Marker position={marker} key={marker.latitude} />
</BaseMap>
</div>
);
}
}
// IndexMap.PropTypes = {
// pushMarkerPoint: PropTypes.func
// };
IndexMap.PropTypes = {
// pushMarkerPoint: PropTypes.func
};
export default IndexMap;
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