Commit 08129ab7 authored by 田涛's avatar 田涛

Merge branch 'dev_upgrade' of http://172.16.10.76/station/amos-convertor-view into dev_upgrade

parents f0d0dfa6 a3562ce0
......@@ -101,7 +101,8 @@ class MatchEquipment extends Component {
enableCarousel: false, //是否打开轮播图页面
enableAddOp: false, //是否打开绑定装备页面
enableShow: false,
totalCount: 0
totalCount: 0,
picId: 0
};
}
......@@ -156,9 +157,10 @@ class MatchEquipment extends Component {
}
}
onImgClick = () => {
onImgClick = (val) => {
this.setState({
enableCarousel: true
enableCarousel: true,
picId: val
});
}
......@@ -313,10 +315,17 @@ class MatchEquipment extends Component {
}
getPictureContext = () => {
const { pictureMap } = this.state;
const { pictureMap,picId } = this.state;
let pictureList = [...pictureMap.values()];
console.log(pictureList);
return (<Picture pictureList={pictureList} />);
let picList = [];
picList.push(pictureList[picId]);
pictureList.forEach((it,index) =>{
if (index !== picId) {
picList.push(it);
}
});
console.log(picList);
return (<Picture pictureList={picList} />);
}
getHeaderContent = () => {
......@@ -470,21 +479,21 @@ class MatchEquipment extends Component {
<div className='match-equipment-photo-row1'>
<div className='match-equipment-photo1'>
<div className='match-equipment-item-title'>电源负荷图</div>
<img alt='电源负荷图' src={this.getImgServerPath(pictureMap.get(1))} onClick={this.onImgClick} style={{ cursor: 'pointer' }} />
<img alt='电源负荷图' src={this.getImgServerPath(pictureMap.get(1))} onClick={() => this.onImgClick(0)} style={{ cursor: 'pointer' }} />
</div>
<div className='match-equipment-photo2'>
<div className='match-equipment-item-title'>电缆沟封堵图</div>
<img alt='电缆沟封堵图' src={this.getImgServerPath(pictureMap.get(2))} onClick={this.onImgClick} style={{ cursor: 'pointer' }} />
<img alt='电缆沟封堵图' src={this.getImgServerPath(pictureMap.get(2))} onClick={() => this.onImgClick(1)} style={{ cursor: 'pointer' }} />
</div>
</div>
<div className='match-equipment-photo-row2'>
<div className='match-equipment-photo3'>
<div className='match-equipment-item-title'>消防车进站行车路线图</div>
<img alt='消防车进站行车路线图' src={this.getImgServerPath(pictureMap.get(3))} onClick={this.onImgClick} style={{ cursor: 'pointer' }} />
<img alt='消防车进站行车路线图' src={this.getImgServerPath(pictureMap.get(3))} onClick={() => this.onImgClick(2)} style={{ cursor: 'pointer' }} />
</div>
<div className='match-equipment-photo4'>
<div className='match-equipment-item-title'>消防取水图</div>
<img alt='消防取水图' src={this.getImgServerPath(pictureMap.get(4))} onClick={this.onImgClick} style={{ cursor: 'pointer' }} />
<img alt='消防取水图' src={this.getImgServerPath(pictureMap.get(4))} onClick={() => this.onImgClick(3)} style={{ cursor: 'pointer' }} />
</div>
</div>
</div>
......
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