| | |
| | | <div class="img-list"> |
| | | <!-- 逗号拼接的图片 --> |
| | | @for(item in abnormalImg) { |
| | | <img src="${item}" alt="图片" /> |
| | | <img onclick="lookBigImg('${item}')" src="${item}" alt="图片" style="max-width:250px;"/> |
| | | @} |
| | | </div> |
| | | <!-- 你可以根据实际图片地址替换上面src --> |
| | |
| | | </body> |
| | | |
| | | <script> |
| | | |
| | | |
| | | function lookBigImg(obj){ |
| | | // 设置图片路径 |
| | | var imgUrl = obj; |
| | | if(imgUrl != "") { |
| | | imgUrl = imgUrl;// 设置图片路径 |
| | | } else { |
| | | imgUrl = Feng.ctxPath + '/static/img/NoPIC.png';// 默认无图 |
| | | } |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | closeBtn: 0, |
| | | area: 'auto', |
| | | skin: 'layui-layer-nobg', //没有背景色 |
| | | shadeClose: true, |
| | | content: '<img src="' + imgUrl + '" height="100%" width="100%" />' |
| | | }); |
| | | } |
| | | const dutyContent = document.getElementById('duty-content'); |
| | | const btns = document.querySelectorAll('.duty-btn'); |
| | | const responsibilityType = '${item.responsibilityType}'; |