Commit a3562ce0 authored by zhengjiawei's avatar zhengjiawei

bug

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