项目分类统计详情
This commit is contained in:
parent
35710a7742
commit
280b9ef75c
|
|
@ -253,14 +253,18 @@ public class SynthesisQueryServiceImpl implements SynthesisQueryService {
|
|||
case "2":
|
||||
detailVo.setPhotoList(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,3)).orElseGet(ArrayList::new));
|
||||
detailVo.setPhotoList2(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,4)).orElseGet(ArrayList::new));
|
||||
break;
|
||||
case "3":
|
||||
detailVo.setPhotoList(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,5)).orElseGet(ArrayList::new));
|
||||
break;
|
||||
case "4":
|
||||
detailVo.setPhotoList(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,6)).orElseGet(ArrayList::new));
|
||||
detailVo.setPhotoList(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,7)).orElseGet(ArrayList::new));
|
||||
detailVo.setPhotoList(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,8)).orElseGet(ArrayList::new));
|
||||
detailVo.setPhotoList2(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,7)).orElseGet(ArrayList::new));
|
||||
detailVo.setPhotoList3(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,8)).orElseGet(ArrayList::new));
|
||||
break;
|
||||
case "5":
|
||||
detailVo.setPhotoList(Optional.ofNullable(synthesisQueryDao.getImgs(detailVo,9)).orElseGet(ArrayList::new));
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(),e);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@
|
|||
<if test="id!=null">
|
||||
AND tcq.pro_id = #{id}
|
||||
</if>
|
||||
GROUP BY tcq.upload_type
|
||||
</select>
|
||||
|
||||
<!--照片综合查询-->
|
||||
|
|
@ -247,7 +246,7 @@
|
|||
</if>
|
||||
AND tcq.is_active = '1'
|
||||
</where>
|
||||
GROUP BY tcq.upload_type, tcq.pro_id
|
||||
GROUP BY tcq.pro_id
|
||||
</select>
|
||||
<!--项目分类统计-查看图片-->
|
||||
<select id="getProImgList" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
|
||||
|
|
@ -274,6 +273,19 @@
|
|||
WHERE sd2.dict_code = 'file_source_type' AND sd.del_flag = 0
|
||||
) A ON A.dict_value = sfr.source_type
|
||||
<where>
|
||||
<if test="searchType == 1">
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
AND (
|
||||
SUBSTRING(sfr.source_type_name, LOCATE('-', sfr.source_type_name) + 1) = #{keyWord} OR
|
||||
INSTR(tcq.title,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
</if>
|
||||
<if test="searchType == 2">
|
||||
<if test="uploadType!=null and uploadType!=0">
|
||||
AND tcq.upload_type = #{uploadType}
|
||||
</if>
|
||||
</if>
|
||||
<if test="roleLevel = 0 and proIds != null and proIds.size() > 0">
|
||||
AND tcq.pro_id IN
|
||||
<foreach collection="proIds" item="proId" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ body {
|
|||
|
||||
.img-info {
|
||||
width: 19%;
|
||||
height: 250px;
|
||||
height: 300px;
|
||||
margin: 0 1% 1% 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ body {
|
|||
|
||||
.imgData {
|
||||
width: 100%;
|
||||
height: 70%;
|
||||
height: 65%;
|
||||
}
|
||||
|
||||
.img-viewer {
|
||||
|
|
@ -147,11 +147,10 @@ body {
|
|||
|
||||
.imgData2 {
|
||||
width: 100%;
|
||||
height: 15%;
|
||||
height: 8%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.imgData2 > p {
|
||||
.imgData2 > p,.imgData4>p {
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
|
|
@ -159,9 +158,15 @@ body {
|
|||
color: #999;
|
||||
}
|
||||
|
||||
.imgData4 {
|
||||
width: 100%;
|
||||
height: 17%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.imgData3 {
|
||||
width: 100%;
|
||||
height: 15%;
|
||||
height: 10%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
|
@ -251,10 +256,10 @@ body {
|
|||
|
||||
.hidden-actions,.hidden-actions2,.hidden-actions3 {
|
||||
width: auto;
|
||||
height: 250px;
|
||||
height: 300px;
|
||||
display: none;
|
||||
position: relative;
|
||||
top: -250px;
|
||||
top: -300px;
|
||||
background: rgba(14, 14, 14, 0.3);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ let form, laydate, flow, layer, rightPopup;
|
|||
let pageNum = 1, pageSize = 15; // 图片定义分页
|
||||
let pageNum2 = 1, pageSize2 = 2; // 列表定义分页
|
||||
let queryType = 2; // 默认图片
|
||||
let objParams = {},highSearchData = {};
|
||||
let objParams = {}, highSearchData = {};
|
||||
|
||||
function setParams(obj) {
|
||||
objParams = JSON.parse(obj);
|
||||
layui.config({
|
||||
|
|
@ -20,7 +21,7 @@ function setParams(obj) {
|
|||
pageNum: pageNum,
|
||||
pageSize: pageSize,
|
||||
queryType: queryType,
|
||||
id:objParams.proId
|
||||
id: objParams.proId
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -33,14 +34,22 @@ function dataFlow(queryParams) {
|
|||
end: '数据加载完毕',
|
||||
direction: 'bottom',
|
||||
done: function (page, next) { // 执行下一页的回调
|
||||
if (queryType === 2) { // 图片
|
||||
pageNum = page;
|
||||
queryParams.pageNum = pageNum;
|
||||
} else { // 列表
|
||||
pageNum2 = page;
|
||||
queryParams.pageNum = pageNum2;
|
||||
}
|
||||
let lis = [];
|
||||
let returnData = loadData(queryParams);
|
||||
if (returnData != null) {
|
||||
if (queryType === 2) { // 图片
|
||||
lis = initImgData(returnData.data.list)
|
||||
pageNum = page;
|
||||
} else { // 列表
|
||||
lis = initListData(returnData.data.list)
|
||||
pageNum2 = page;
|
||||
}
|
||||
next(lis.join(''), page < returnData.data.total / (queryType === 2 ? pageSize : pageSize2));
|
||||
if (queryType === 2) {
|
||||
|
|
@ -104,6 +113,9 @@ function initImgData(list) {
|
|||
" <p>" + item.uploadTime + "</p>" +
|
||||
" <p class='img-color" + (item.uploadType) + "'>" + item.uploadTypeName + "</p>" +
|
||||
" </div>" +
|
||||
" <div class='imgData4 layout'>" +
|
||||
" <p>" + item.proName + "</p>" +
|
||||
" </div>" +
|
||||
" <div class='imgData3 layout'>" +
|
||||
" <p>" + setSourceTypeName(item) + "</p>" +
|
||||
setCollectData(item) +
|
||||
|
|
@ -152,11 +164,12 @@ function initImgData(list) {
|
|||
|
||||
/**1.图片 2.列表*/
|
||||
function changeType(that, type) {
|
||||
queryType = type;
|
||||
let queryParams = {
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize,
|
||||
queryType: queryType,
|
||||
id:objParams.proId
|
||||
id: objParams.proId
|
||||
}
|
||||
if (type === 2) {
|
||||
$(that).attr('src', '../../img/synthesisQuery/photo_check.png');
|
||||
|
|
@ -167,10 +180,10 @@ function changeType(that, type) {
|
|||
queryParams.pageNum = pageNum2;
|
||||
queryParams.pageSize = pageSize2;
|
||||
}
|
||||
queryType = type;
|
||||
resetData();
|
||||
searchData(queryParams);
|
||||
}
|
||||
|
||||
/**渲染列表图片*/
|
||||
function initListData(list) {
|
||||
let htmlArr = [];
|
||||
|
|
@ -183,7 +196,6 @@ function initListData(list) {
|
|||
" </div>" +
|
||||
setBasicInfo(item) +
|
||||
" </div>"
|
||||
console.log(html)
|
||||
htmlArr.push(html);
|
||||
})
|
||||
}
|
||||
|
|
@ -199,76 +211,76 @@ function initListData(list) {
|
|||
"</div>" +
|
||||
"<div class='info-data2 layout'>" +
|
||||
"<p>违章描述:</p>" +
|
||||
"<p>"+item.vioDesc+"</p>" +
|
||||
"<p>" + item.vioDesc + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-img'>" +
|
||||
setImgData(item,item.photoList) +
|
||||
setImgData(item, item.photoList) +
|
||||
"</div>" +
|
||||
setRectData(item);
|
||||
} else if (item.uploadType === '2') { // 质量检测
|
||||
html += "<div class='info-data2 layout'>" +
|
||||
"<p>检查地点</p>" +
|
||||
"<p>"+item.vioPlace+"</p>" +
|
||||
"<p>" + item.vioPlace + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-data2 layout'>" +
|
||||
"<p>检查描述:</p>" +
|
||||
"<p>"+item.vioDesc+"</p>" +
|
||||
"<p>" + item.vioDesc + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-img'>" +
|
||||
setImgData(item,item.photoList) +
|
||||
setImgData(item, item.photoList) +
|
||||
"</div>" +
|
||||
setRectData(item);
|
||||
} else if (item.uploadType === '3') { // 安全措施落实
|
||||
html += "<div class='info-data2 layout'>" +
|
||||
"<p>检查地点</p>" +
|
||||
"<p>"+item.vioPlace+"</p>" +
|
||||
"<p>" + item.vioPlace + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-data2 layout'>" +
|
||||
"<p>检查描述:</p>" +
|
||||
"<p>"+item.vioDesc+"</p>" +
|
||||
"<p>" + item.vioDesc + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-img'>" +
|
||||
setImgData(item,item.photoList) +
|
||||
setImgData(item, item.photoList) +
|
||||
"</div>";
|
||||
} else if (item.uploadType === '4') { // 协调照片
|
||||
html += "<div class='info-data2 layout'>" +
|
||||
"<p>建设前描述</p>" +
|
||||
"<p>"+item.buildBeforeDesc+"</p>" +
|
||||
"<p>" + item.buildBeforeDesc + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-img'>" +
|
||||
setImgData(item,item.photoList) +
|
||||
setImgData(item, item.photoList) +
|
||||
"</div>" +
|
||||
"<div class='info-data2 layout'>" +
|
||||
"<p>建设中描述:</p>" +
|
||||
"<p>"+item.buildUnderDesc+"</p>" +
|
||||
"<p>" + item.buildUnderDesc + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-img'>" +
|
||||
setImgData(item,item.photoList2) +
|
||||
setImgData(item, item.photoList2) +
|
||||
"</div>" +
|
||||
"<div class='info-data2 layout'>" +
|
||||
"<p>恢复后描述:</p>" +
|
||||
"<p>"+item.buildAfterDesc+"</p>" +
|
||||
"<p>" + item.buildAfterDesc + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-img'>" +
|
||||
setImgData(item,item.photoList3) +
|
||||
setImgData(item, item.photoList3) +
|
||||
"</div>";
|
||||
|
||||
} else if (item.uploadType === '5') { // 重要事项及宣传类
|
||||
html += "<div class='info-data2 layout'>" +
|
||||
"<p>标题</p>" +
|
||||
"<p>"+item.title+"</p>" +
|
||||
"<p>" + item.title + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-data2 layout'>" +
|
||||
"<p>内容:</p>" +
|
||||
"<p>"+item.content+"</p>" +
|
||||
"<p>" + item.content + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-img'>" +
|
||||
setImgData(item,item.photoList) +
|
||||
setImgData(item, item.photoList) +
|
||||
"</div>";
|
||||
}
|
||||
return html;
|
||||
|
||||
function setImgData(obj,list) {
|
||||
function setImgData(obj, list) {
|
||||
let cent = '';
|
||||
$.each(list, function (index, item) {
|
||||
item.proName = obj.proName;
|
||||
|
|
@ -292,10 +304,10 @@ function initListData(list) {
|
|||
if (item.rectStatus === '1') { // 已整改
|
||||
cent2 += "<div class='info-data2 layout'>" +
|
||||
"<p>整改说明:</p>" +
|
||||
"<p>"+item.rectDesc+"</p>" +
|
||||
"<p>" + item.rectDesc + "</p>" +
|
||||
"</div>" +
|
||||
"<div class='info-img'>" +
|
||||
setImgData(item,item.photoList2) +
|
||||
setImgData(item, item.photoList2) +
|
||||
"</div>";
|
||||
}
|
||||
return cent2;
|
||||
|
|
@ -327,9 +339,9 @@ function collectImg(that, item, type) {
|
|||
$(that).next().removeAttr("style");
|
||||
$(that).css({'display': 'none'})
|
||||
$(that).parent().parent().prev().find('img').eq(0).removeAttr('style')
|
||||
layer.msg("收藏成功",{icon:1})
|
||||
}else{
|
||||
layer.msg("收藏失败",{icon:2})
|
||||
layer.msg("收藏成功", {icon: 1})
|
||||
} else {
|
||||
layer.msg("收藏失败", {icon: 2})
|
||||
}
|
||||
|
||||
} else if (type === 1) { // 取消收藏
|
||||
|
|
@ -341,9 +353,9 @@ function collectImg(that, item, type) {
|
|||
$(that).prev().removeAttr("style");
|
||||
$(that).css({'display': 'none'});
|
||||
$(that).parent().parent().prev().find('img').eq(0).css({'display': 'none'})
|
||||
layer.msg("取消收藏成功",{icon:1})
|
||||
}else{
|
||||
layer.msg("取消收藏失败",{icon:2})
|
||||
layer.msg("取消收藏成功", {icon: 1})
|
||||
} else {
|
||||
layer.msg("取消收藏失败", {icon: 2})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -359,12 +371,12 @@ function titleSearch() {
|
|||
highSearchData = {};
|
||||
resetData();
|
||||
let queryParams = {
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize,
|
||||
pageNum: queryType === 2 ? pageNum : pageNum2,
|
||||
pageSize: queryType === 2 ? pageSize : pageSize2,
|
||||
queryType: queryType,
|
||||
searchType: 1,
|
||||
keyWord: $('#keyWord').val(),
|
||||
id:objParams.proId
|
||||
id: objParams.proId
|
||||
}
|
||||
searchData(queryParams);
|
||||
}
|
||||
|
|
@ -373,7 +385,7 @@ function titleSearch() {
|
|||
/*图片类型查询*/
|
||||
function queryByType(that, type) {
|
||||
resetData();
|
||||
if(queryType === 2){
|
||||
if (queryType === 2) {
|
||||
highSearchData = {};
|
||||
$(that).addClass('type-num-check');
|
||||
let queryParams = {
|
||||
|
|
@ -382,7 +394,7 @@ function queryByType(that, type) {
|
|||
queryType: queryType,
|
||||
searchType: 2,
|
||||
uploadType: type,
|
||||
id:objParams.proId
|
||||
id: objParams.proId
|
||||
}
|
||||
searchData(queryParams);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,9 @@ function initImgData(list) {
|
|||
" <p>" + item.uploadTime + "</p>" +
|
||||
" <p class='img-color" + (item.uploadType) + "'>" + item.uploadTypeName + "</p>" +
|
||||
" </div>" +
|
||||
" <div class='imgData4 layout'>" +
|
||||
" <p>" + item.proName + "</p>" +
|
||||
" </div>" +
|
||||
" <div class='imgData3 layout'>" +
|
||||
" <p>" + setSourceTypeName(item) + "</p>" +
|
||||
setCollectData(item) +
|
||||
|
|
|
|||
Loading…
Reference in New Issue