工程进度更新页面搭建

This commit is contained in:
cwchen 2025-04-23 10:20:02 +08:00
parent 33e58386e9
commit 1a3cc4ab77
15 changed files with 114 additions and 51 deletions

View File

@ -111,7 +111,7 @@ public class ProProgressVo {
/** /**
* 基础开挖 * 基础开挖
*/ */
private int num; private int num1;
/** /**
* 基础开挖完成 * 基础开挖完成
*/ */

View File

@ -81,7 +81,7 @@ public class ProProgressServiceImpl implements ProProgressService {
try { try {
ProProgressVo.ProDetailVo vo = Optional.ofNullable(dao.detailQuery(dto)).orElseGet(ProProgressVo.ProDetailVo::new); ProProgressVo.ProDetailVo vo = Optional.ofNullable(dao.detailQuery(dto)).orElseGet(ProProgressVo.ProDetailVo::new);
ProProgressVo.ProDetailVo vo2 = Optional.ofNullable(dao.getTowerProgress(dto)).orElseGet(ProProgressVo.ProDetailVo::new); ProProgressVo.ProDetailVo vo2 = Optional.ofNullable(dao.getTowerProgress(dto)).orElseGet(ProProgressVo.ProDetailVo::new);
vo.setNum(vo2.getNum()); vo.setNum1(vo2.getNum1());
vo.setNum2(vo2.getNum2()); vo.setNum2(vo2.getNum2());
vo.setNum3(vo2.getNum3()); vo.setNum3(vo2.getNum3());
vo.setNum4(vo2.getNum4()); vo.setNum4(vo2.getNum4());

View File

@ -76,7 +76,8 @@
IFNULL(C.num,0) AS towerNum, IFNULL(C.num,0) AS towerNum,
tp.plan_start_time AS planStartTime, tp.plan_start_time AS planStartTime,
tp.plan_end_time AS planEndTime, tp.plan_end_time AS planEndTime,
tp.update_time AS updateTime tp.update_time AS updateTime,
tp.pro_progress AS proProgress
FROM tb_project tp FROM tb_project tp
LEFT JOIN ( LEFT JOIN (
SELECT pro_id,COUNT(*) AS num SELECT pro_id,COUNT(*) AS num
@ -115,7 +116,7 @@
<!--查询工程杆塔进度--> <!--查询工程杆塔进度-->
<select id="getTowerProgress" <select id="getTowerProgress"
resultType="com.bonus.digitalSignage.backstage.entity.vo.ProProgressVo$ProDetailVo"> resultType="com.bonus.digitalSignage.backstage.entity.vo.ProProgressVo$ProDetailVo">
SELECT COUNT(IF(tower_progress &gt;= 1, 1, NULL)) AS num, SELECT COUNT(IF(tower_progress &gt;= 1, 1, NULL)) AS num1,
COUNT(IF(tower_progress &gt;= 2, 1, NULL)) AS num2, COUNT(IF(tower_progress &gt;= 2, 1, NULL)) AS num2,
COUNT(IF(tower_progress &gt;= 3, 1, NULL)) AS num3, COUNT(IF(tower_progress &gt;= 3, 1, NULL)) AS num3,
COUNT(IF(tower_progress &gt;= 4, 1, NULL)) AS num4, COUNT(IF(tower_progress &gt;= 4, 1, NULL)) AS num4,

View File

@ -85,7 +85,7 @@ body {
} }
.num-box:nth-child(2) > p:nth-child(2) { .num-box:nth-child(2) > p:nth-child(2) {
color: #ffff00; color: #f0f054;
} }
.num-box:nth-child(3) > p:nth-child(2) { .num-box:nth-child(3) > p:nth-child(2) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

View File

@ -1,5 +1,5 @@
let form, layer, element, table, tableIns; let form, layer, element, table, tableIns;
let pageNum = 1, pageSize = 15; // 图片定义分页 let pageNum = 1, pageSize = 30;
let objParams = {}; let objParams = {};
function setParams(obj) { function setParams(obj) {
@ -23,13 +23,15 @@ function setParams(obj) {
$('#layui-tab-content>div').eq(1).addClass('layui-show'); $('#layui-tab-content>div').eq(1).addClass('layui-show');
} }
}); });
initSetProData();
pages(1, 10, 1); pages(1, 10, 1);
element.render();
}); });
} }
function pages(pageNum, pageSize, typeNum) { function pages(pageNum, pageSize, typeNum) {
let params = getReqParams(pageNum, pageSize, typeNum); let params = getReqParams(pageNum, pageSize, typeNum);
let url = dataUrl + "/backstage/proProgress/getList" let url = dataUrl + "/backstage/proProgress/getProProgress"
ajaxRequest(url, "POST", params, true, function () { ajaxRequest(url, "POST", params, true, function () {
}, function (result) { }, function (result) {
console.log(result); console.log(result);
@ -86,47 +88,40 @@ function initTable(dataList, limit, page) {
return (page - 1) * limit + d.LAY_NUM; return (page - 1) * limit + d.LAY_NUM;
} }
}, },
{field: "towName", title: "杆塔", width: "25%", unresize: true, align: "center"}, {field: "towerName", title: "杆塔", width: "18%", unresize: true, align: "center"},
{title: "基础开挖",width: "10%",unresize: true,align: "center", {title: "基础开挖",width: "10%",unresize: true,align: "center",
templet: function (d) { templet: function (d) {
let html = ''; return setTowerProgress(d.towerProgress,1);
return html;
} }
}, },
{title: "基础开挖完成",width: "10%",unresize: true,align: "center", {title: "基础开挖完成",width: "11%",unresize: true,align: "center",
templet: function (d) { templet: function (d) {
let html = ''; return setTowerProgress(d.towerProgress,2);
return html;
} }
}, },
{title: "基础浇筑完成",width: "10%",unresize: true,align: "center", {title: "基础浇筑完成",width: "11%",unresize: true,align: "center",
templet: function (d) { templet: function (d) {
let html = ''; return setTowerProgress(d.towerProgress,3);
return html;
} }
}, },
{title: "铁塔组立",width: "10%",unresize: true,align: "center", {title: "铁塔组立",width: "11%",unresize: true,align: "center",
templet: function (d) { templet: function (d) {
let html = ''; return setTowerProgress(d.towerProgress,4);
return html;
} }
}, },
{title: "铁塔组立完成",width: "10%",unresize: true,align: "center", {title: "铁塔组立完成",width: "11%",unresize: true,align: "center",
templet: function (d) { templet: function (d) {
let html = ''; return setTowerProgress(d.towerProgress,5);
return html;
} }
}, },
{title: "架线施工完成",width: "10%",unresize: true,align: "center", {title: "架线施工完成",width: "11%",unresize: true,align: "center",
templet: function (d) { templet: function (d) {
let html = ''; return setTowerProgress(d.towerProgress,6);
return html;
} }
}, },
{title: "附件安装完成",width: "10%",unresize: true,align: "center", {title: "附件安装完成",width: "11%",unresize: true,align: "center",
templet: function (d) { templet: function (d) {
let html = ''; return setTowerProgress(d.towerProgress,7);
return html;
} }
}, },
], ],
@ -149,14 +144,13 @@ function getReqParams(page, limit, type) {
obj = { obj = {
pageNum: page + "", pageNum: page + "",
pageSize: limit + "", pageSize: limit + "",
keyWord: $('#keyWord').val(), id: objParams.id
}; };
} else { } else {
obj = { obj = {
pageNum: '1', pageNum: '1',
pageSize: '10', pageSize: '10',
keyWord: '', id: objParams.id
}; };
} }
obj = { obj = {
@ -173,4 +167,27 @@ function query(type) {
layui.form.render(); layui.form.render();
} }
pages(1, limitSize); pages(1, limitSize);
}
function setTowerProgress(value,type){
let html = '';
value = parseInt(value);
if(value >= 1 && type === 1){
html = '<img src="../../img/synthesisQuery/num1.png" alt="">'
}else if(value >= 2 && type === 2){
html = '<img src="../../img/synthesisQuery/num2.png" alt="">'
}else if(value >= 3 && type === 3){
html = '<img src="../../img/synthesisQuery/num3.png" alt="">'
}else if(value >= 4 && type === 4){
html = '<img src="../../img/synthesisQuery/num4.png" alt="">'
}else if(value >= 5 && type === 5){
html = '<img src="../../img/synthesisQuery/num5.png" alt="">'
}else if(value >= 6 && type === 6){
html = '<img src="../../img/synthesisQuery/num6.png" alt="">'
}else if(value >= 7 && type === 7){
html = '<img src="../../img/synthesisQuery/num7.png" alt="">'
}else {
html = '';
}
return html;
} }

View File

@ -0,0 +1,44 @@
// 基本数据赋值
function initSetProData() {
let url = dataUrl + "/backstage/proProgress/detailQuery"
let obj = {
id: objParams.id,
departId:objParams.departId
}
let params = {
encryptedData: encryptCBC(JSON.stringify(obj))
}
ajaxRequest(url, "POST", params, true, function () {
}, function (result) {
if (result.status === 200) {
setData(result.data);
} else {
layer.msg(result.msg, {icon: 2})
}
}, function (xhr) {
error(xhr)
});
function setData(obj) {
$('.layui-progress').remove();
$('#proName').html(obj.proName);
$('#companyName').html(obj.companyName);
$('#proStatus').html('<span style="color: #51d351;"> ● </span>' + obj.proStatus);
$('#voltageLevel').html(obj.voltageLevel);
$('#lineLength').html((obj.lineLength || '/') + 'km');
$('#towerNum').html(obj.towerNum);
$('#towerNum2').html(obj.towerNum);
$('#planStartTime').html(obj.planStartTime);
$('#planEndTime').html(obj.planEndTime);
$('#updateTime').html(obj.updateTime);
$("#progress").after(`
<div class="layui-progress" lay-showpercent="true" lay-filter="demo-filter-progress">
<div class="layui-progress-bar layui-bg-blue" lay-percent="${obj.proProgress}%"></div>
</div>
`);
for (let i = 1; i <= 7 ; i++) {
$('#num' + i).html(obj['num' + i]);
}
element.render();
}
}

View File

@ -189,6 +189,8 @@ function setFormData(data) {
} }
$('#orgId').val(data.dept) $('#orgId').val(data.dept)
$('#roleId').val(data.roleId) $('#roleId').val(data.roleId)
dtree.dataInit("orgId", data.dept);
dtree.selectVal("orgId");
layui.form.render(); layui.form.render();
} }
} }

View File

@ -21,8 +21,8 @@
<div class="layout"> <div class="layout">
<img src="../../img/synthesisQuery/pro_icon.png" width="48px" height="48px" style="margin-right: 10px;"> <img src="../../img/synthesisQuery/pro_icon.png" width="48px" height="48px" style="margin-right: 10px;">
<div class="layout" style="flex-direction: column;"> <div class="layout" style="flex-direction: column;">
<p style="font-size: 20px;font-weight: bold;color: #666;" id="proName">安全工器具需求计划</p> <p style="font-size: 20px;font-weight: bold;color: #666;" id="proName"></p>
<p style="font-size: 14px;color: #999;" id="companyName">安全工器具需求计划</p> <p style="font-size: 14px;color: #999;" id="companyName"></p>
</div> </div>
</div> </div>
<div> <div>
@ -34,35 +34,34 @@
<div id="pro-basic-detail-box" class="layout"> <div id="pro-basic-detail-box" class="layout">
<div class="basic-detail layout"> <div class="basic-detail layout">
<p>项目状态</p> <p>项目状态</p>
<p><span style="color: #51d351;"></span>在建</p> <p id="proStatus"></p>
</div> </div>
<div class="basic-detail layout"> <div class="basic-detail layout">
<p>电压等级</p> <p>电压等级</p>
<p>110kV</p> <p id="voltageLevel"></p>
</div> </div>
<div class="basic-detail layout"> <div class="basic-detail layout">
<p>线路长度</p> <p>线路长度</p>
<p>121.35 km</p> <p id="lineLength"></p>
</div> </div>
<div class="basic-detail layout"> <div class="basic-detail layout">
<p>杆塔数量</p> <p>杆塔数量</p>
<p>67</p> <p id="towerNum"></p>
</div> </div>
<div class="basic-detail layout"> <div class="basic-detail layout">
<p>项目计划开始时间</p> <p>项目计划开始时间</p>
<p>2022-11-01</p> <p id="planStartTime"></p>
</div> </div>
<div class="basic-detail layout"> <div class="basic-detail layout">
<p>项目计划结束时间</p> <p>项目计划结束时间</p>
<p>2023-11-30</p> <p id="planEndTime"></p>
</div> </div>
<div class="basic-detail layout"> <div class="basic-detail layout">
<p>最后更新</p> <p>最后更新</p>
<p>2022-11-25 23:26:08</p> <p id="updateTime"></p>
</div> </div>
<div class="basic-detail layout"> <div class="basic-detail">
<p>项目进度</p> <p id="progress" style="margin: 10px 0 18px 0;">项目进度</p>
<p></p>
</div> </div>
</div> </div>
<div id="data-box"> <div id="data-box">
@ -77,35 +76,35 @@
<div id="gx-num-box" class="layout"> <div id="gx-num-box" class="layout">
<div class="layout num-box"> <div class="layout num-box">
<p>杆塔数</p> <p>杆塔数</p>
<p>67</p> <p id="towerNum2"></p>
</div> </div>
<div class="layout num-box"> <div class="layout num-box">
<p>基础开挖</p> <p>基础开挖</p>
<p>60</p> <p id="num1">0</p>
</div> </div>
<div class="layout num-box"> <div class="layout num-box">
<p>基础开挖完成</p> <p>基础开挖完成</p>
<p>60</p> <p id="num2">0</p>
</div> </div>
<div class="layout num-box"> <div class="layout num-box">
<p>基础浇筑完成</p> <p>基础浇筑完成</p>
<p>60</p> <p id="num3">0</p>
</div> </div>
<div class="layout num-box"> <div class="layout num-box">
<p>铁塔组立</p> <p>铁塔组立</p>
<p>52</p> <p id="num4">0</p>
</div> </div>
<div class="layout num-box"> <div class="layout num-box">
<p>铁塔组立完成</p> <p>铁塔组立完成</p>
<p>32</p> <p id="num5">0</p>
</div> </div>
<div class="layout num-box"> <div class="layout num-box">
<p>架线施工完成</p> <p>架线施工完成</p>
<p>32</p> <p id="num6">0</p>
</div> </div>
<div class="layout num-box"> <div class="layout num-box">
<p>附件安装完成</p> <p>附件安装完成</p>
<p>12</p> <p id="num7">0</p>
</div> </div>
</div> </div>
<div class="table-box" table-responsive style="z-index: 1;"> <div class="table-box" table-responsive style="z-index: 1;">