Commit 8b1c9401 authored by zhengjiangtao's avatar zhengjiangtao

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

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