Commit 8b039539 authored by zhengjiawei's avatar zhengjiawei

功能调整

parent df16262d
......@@ -116,7 +116,7 @@
//地图zoom显示级别
// showZoom: [7, 13, 18],
//离线地图地址
picURI: 'http://172.16.9.20:9090/'
picURI: 'http://172.16.3.121:8001/shanxi/amap'
};
// 配置日志系统
......
......@@ -15,13 +15,20 @@ const getColumns = () => {
title: '设备编号',
dataIndex: 'fireEquipmentCode',
key: 'fireEquipmentCode',
width: '12%',
width: '10%',
className: 'uant-table-thead'
},
{
title: '设备名称',
dataIndex: 'fireEquipmentName',
key: 'fireEquipmentName',
width: '20%',
className: 'uant-table-thead'
},
{
title: '所在区域',
dataIndex: 'source_name',
key: 'source_name',
width: '15%',
className: 'uant-table-thead'
},
......@@ -29,7 +36,7 @@ const getColumns = () => {
title: '指标名称',
dataIndex: 'eq_point_name',
key: 'eq_point_name',
width: '20%',
width: '10%',
className: 'uant-table-thead'
},
{
......@@ -57,14 +64,14 @@ const getColumns = () => {
title: '保护对象',
dataIndex: 'equipmentName',
key: 'equipmentName',
width: '15%',
width: '10%',
className: 'uant-table-thead'
},
{
title: '上报时间',
dataIndex: 'create_date',
key: 'create_date',
width: '15%',
width: '20%',
render: text => moment(text).format('YYYY-MM-DD HH:mm:ss'),
className: 'uant-table-thead'
}
......
......@@ -146,6 +146,10 @@ class StationMainten extends Component {
const { form } = this.state;
form.safetyChargeUserId = value;
}
onSelectCaptainCharge = value => {
const { form } = this.state;
form.fireCaptainUserId = value;
}
// 行政划区选择
onChangeAddress = (value, item) => {
......@@ -274,12 +278,19 @@ class StationMainten extends Component {
const { allUserList,form } = this.state;
const stationChargeName = allUserList.filter(item => item.userId === dataValues.stationChargeUserId )[0].realName;
const safetyChargeName = allUserList.filter(item => item.userId === dataValues.safetyChargeUserId )[0].realName;
const fireCaptainName = allUserList.filter(item => item.userId === dataValues.fireCaptainUserId )[0].realName;
const stationUserPhoneNum = allUserList.filter(item => item.userId === dataValues.stationChargeUserId )[0].mobile;
const safetyUserPhoneNum = allUserList.filter(item => item.userId === dataValues.safetyChargeUserId )[0].mobile;
const fireCaptainPhoneNum = allUserList.filter(item => item.userId === dataValues.fireCaptainUserId )[0].mobile;
dataValues.stationChargeUserName = stationChargeName;
dataValues.safetyChargeUserName = safetyChargeName;
dataValues.fireCaptainName = fireCaptainName;
dataValues.stationUserPhoneNum = stationUserPhoneNum;
dataValues.safetyUserPhoneNum = safetyUserPhoneNum;
dataValues.fireCaptainPhoneNum = fireCaptainPhoneNum;
dataValues.status = form.status;
let param = dataValues;
addStationMaintenAction(param).then(
......@@ -366,6 +377,10 @@ class StationMainten extends Component {
render() {
const { form, rules, useTypeData, provinceData, cityData, countyData, allUserList, BasicMap,isCanEidt,canEdit,canlSHow } = this.state;
const lalng = {
longitude: form.longitude,
latitude: form.latitude
};
const formItemLayout = {
labelCol: {
xs: { span: 24 },
......@@ -460,10 +475,11 @@ class StationMainten extends Component {
<span className="left-address-span">区县</span>
</FormItem>
<FormItem label={<span>详细地址</span>} field="address" {...formItemLayout}>
<TextArea rows={5}
<TextArea rows={3}
className="left-textArea"
disabled={!isCanEidt}
value={form.address}
disableResize
placeholder="详细地址"
onChange={e => this.onInputChange('address', e.target.value)}
/>
......@@ -510,6 +526,22 @@ class StationMainten extends Component {
{!isCanEidt && form.status === 0 && <div className="text-div">{'启用'}</div>}
{!isCanEidt && form.status === 1 && <div className="text-div">{'停用'}</div>}
</FormItem>
<FormItem label={<span>驻站消防队队长</span>} field="fireCaptain" {...formItemLayout}>
<Row style={{ width: '400px' }}>
<Col span={9}>
<Select
data={allUserList}
field="fireCaptain"
className="left-station-select"
disabled={!isCanEidt}
value={form.fireCaptainUserId}
renderOption={item => <Option value={item.userId}>{item.realName}</Option>}
defaultOption={<Option>请选择</Option>}
onChange={this.onSelectCaptainCharge}
/>
</Col>
</Row>
</FormItem>
<FormItem label={<span>换流站负责人</span>} field="stationChargeUserName" {...formItemLayout}>
<Row style={{ width: '400px' }}>
<Col span={9}>
......@@ -554,7 +586,7 @@ class StationMainten extends Component {
<Col span={12} style={{ height: '614px', border: '1px solid black' }}>
<div style={{ height: '614px' }}>
{ /**this.state.loadAmap && <BasicMap indexViewChange={this.indexViewChange} pushMarkerPoint={this.handleMarkerMap} /> */}
{ this.state.loadAmap && <BasicMap indexViewChange={this.indexViewChange} pushMarkerPoint={this.handleMarkerMap} /> }
{ this.state.loadAmap && <BasicMap indexViewChange={this.indexViewChange} pushMarkerPoint={this.handleMarkerMap} lalng={lalng} isCanEidt={isCanEidt} /> }
</div>
</Col>
</Row>
......
......@@ -26,7 +26,7 @@ const mapConfig = {
const layers = [
new window.AMap.TileLayer({
getTileUrl(x, y, z) {
return `${_picURI}${z}/${x}/${y}.png`;
return `${_picURI}/${z}/${x}/${y}.png`;
},
zIndex: 0
})
......@@ -40,14 +40,16 @@ const layers = [
*/
class IndexMap extends Component {
static propTypes = {
pushMarkerPoint: PropTypes.func
pushMarkerPoint: PropTypes.func,
lalng: PropTypes.object,
isCanEidt: PropTypes.bool
};
constructor(props) {
super(props);
this.state = {
mapCenter: _mapCenter,
center: { longitude: 101.90771484, latitude: 35.92184115 },
marker: { longitude: 0, latitude: 0 },
marker: this.props.lalng || { longitude: 0, latitude: 0 },
// marker: { longitude: null, latitude: null },
visible: true,
style: { strokeColor: '#10A100', fillColor: '#10A100' },
......@@ -69,6 +71,9 @@ class IndexMap extends Component {
* @memberof IndexMap
*/
handleClickMap = e => {
if (!this.props.isCanEidt) {
return;
}
const { marker } = this.state;
marker.longitude = e.lnglat.lng;
marker.latitude = e.lnglat.lat;
......@@ -87,7 +92,7 @@ class IndexMap extends Component {
if (outMap) {
mapConfig.layers = layers;
}
console.log(marker)
return (
<div className="content indexPage" style={{ height: '612px' }}>
<BaseMap events={events} center={mapCenter} {...mapConfig} >
......
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