工程进度更新页面搭建
|
|
@ -111,7 +111,7 @@ public class ProProgressVo {
|
|||
/**
|
||||
* 基础开挖
|
||||
*/
|
||||
private int num;
|
||||
private int num1;
|
||||
/**
|
||||
* 基础开挖完成
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class ProProgressServiceImpl implements ProProgressService {
|
|||
try {
|
||||
ProProgressVo.ProDetailVo vo = Optional.ofNullable(dao.detailQuery(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.setNum3(vo2.getNum3());
|
||||
vo.setNum4(vo2.getNum4());
|
||||
|
|
|
|||
|
|
@ -76,7 +76,8 @@
|
|||
IFNULL(C.num,0) AS towerNum,
|
||||
tp.plan_start_time AS planStartTime,
|
||||
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
|
||||
LEFT JOIN (
|
||||
SELECT pro_id,COUNT(*) AS num
|
||||
|
|
@ -115,7 +116,7 @@
|
|||
<!--查询工程杆塔进度-->
|
||||
<select id="getTowerProgress"
|
||||
resultType="com.bonus.digitalSignage.backstage.entity.vo.ProProgressVo$ProDetailVo">
|
||||
SELECT COUNT(IF(tower_progress >= 1, 1, NULL)) AS num,
|
||||
SELECT COUNT(IF(tower_progress >= 1, 1, NULL)) AS num1,
|
||||
COUNT(IF(tower_progress >= 2, 1, NULL)) AS num2,
|
||||
COUNT(IF(tower_progress >= 3, 1, NULL)) AS num3,
|
||||
COUNT(IF(tower_progress >= 4, 1, NULL)) AS num4,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ body {
|
|||
}
|
||||
|
||||
.num-box:nth-child(2) > p:nth-child(2) {
|
||||
color: #ffff00;
|
||||
color: #f0f054;
|
||||
}
|
||||
|
||||
.num-box:nth-child(3) > p:nth-child(2) {
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 375 B |
|
After Width: | Height: | Size: 433 B |
|
After Width: | Height: | Size: 436 B |
|
After Width: | Height: | Size: 408 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 405 B |
|
After Width: | Height: | Size: 373 B |
|
|
@ -1,5 +1,5 @@
|
|||
let form, layer, element, table, tableIns;
|
||||
let pageNum = 1, pageSize = 15; // 图片定义分页
|
||||
let pageNum = 1, pageSize = 30;
|
||||
let objParams = {};
|
||||
|
||||
function setParams(obj) {
|
||||
|
|
@ -23,13 +23,15 @@ function setParams(obj) {
|
|||
$('#layui-tab-content>div').eq(1).addClass('layui-show');
|
||||
}
|
||||
});
|
||||
initSetProData();
|
||||
pages(1, 10, 1);
|
||||
element.render();
|
||||
});
|
||||
}
|
||||
|
||||
function pages(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 () {
|
||||
}, function (result) {
|
||||
console.log(result);
|
||||
|
|
@ -86,47 +88,40 @@ function initTable(dataList, limit, page) {
|
|||
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",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
return html;
|
||||
return setTowerProgress(d.towerProgress,1);
|
||||
}
|
||||
},
|
||||
{title: "基础开挖完成",width: "10%",unresize: true,align: "center",
|
||||
{title: "基础开挖完成",width: "11%",unresize: true,align: "center",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
return html;
|
||||
return setTowerProgress(d.towerProgress,2);
|
||||
}
|
||||
},
|
||||
{title: "基础浇筑完成",width: "10%",unresize: true,align: "center",
|
||||
{title: "基础浇筑完成",width: "11%",unresize: true,align: "center",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
return html;
|
||||
return setTowerProgress(d.towerProgress,3);
|
||||
}
|
||||
},
|
||||
{title: "铁塔组立",width: "10%",unresize: true,align: "center",
|
||||
{title: "铁塔组立",width: "11%",unresize: true,align: "center",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
return html;
|
||||
return setTowerProgress(d.towerProgress,4);
|
||||
}
|
||||
},
|
||||
{title: "铁塔组立完成",width: "10%",unresize: true,align: "center",
|
||||
{title: "铁塔组立完成",width: "11%",unresize: true,align: "center",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
return html;
|
||||
return setTowerProgress(d.towerProgress,5);
|
||||
}
|
||||
},
|
||||
{title: "架线施工完成",width: "10%",unresize: true,align: "center",
|
||||
{title: "架线施工完成",width: "11%",unresize: true,align: "center",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
return html;
|
||||
return setTowerProgress(d.towerProgress,6);
|
||||
}
|
||||
},
|
||||
{title: "附件安装完成",width: "10%",unresize: true,align: "center",
|
||||
{title: "附件安装完成",width: "11%",unresize: true,align: "center",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
return html;
|
||||
return setTowerProgress(d.towerProgress,7);
|
||||
}
|
||||
},
|
||||
],
|
||||
|
|
@ -149,14 +144,13 @@ function getReqParams(page, limit, type) {
|
|||
obj = {
|
||||
pageNum: page + "",
|
||||
pageSize: limit + "",
|
||||
keyWord: $('#keyWord').val(),
|
||||
|
||||
id: objParams.id
|
||||
};
|
||||
} else {
|
||||
obj = {
|
||||
pageNum: '1',
|
||||
pageSize: '10',
|
||||
keyWord: '',
|
||||
id: objParams.id
|
||||
};
|
||||
}
|
||||
obj = {
|
||||
|
|
@ -174,3 +168,26 @@ function query(type) {
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -189,6 +189,8 @@ function setFormData(data) {
|
|||
}
|
||||
$('#orgId').val(data.dept)
|
||||
$('#roleId').val(data.roleId)
|
||||
dtree.dataInit("orgId", data.dept);
|
||||
dtree.selectVal("orgId");
|
||||
layui.form.render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
<div class="layout">
|
||||
<img src="../../img/synthesisQuery/pro_icon.png" width="48px" height="48px" style="margin-right: 10px;">
|
||||
<div class="layout" style="flex-direction: column;">
|
||||
<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: 20px;font-weight: bold;color: #666;" id="proName"></p>
|
||||
<p style="font-size: 14px;color: #999;" id="companyName"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -34,35 +34,34 @@
|
|||
<div id="pro-basic-detail-box" class="layout">
|
||||
<div class="basic-detail layout">
|
||||
<p>项目状态</p>
|
||||
<p><span style="color: #51d351;"> ● </span>在建</p>
|
||||
<p id="proStatus"></p>
|
||||
</div>
|
||||
<div class="basic-detail layout">
|
||||
<p>电压等级</p>
|
||||
<p>110kV</p>
|
||||
<p id="voltageLevel"></p>
|
||||
</div>
|
||||
<div class="basic-detail layout">
|
||||
<p>线路长度</p>
|
||||
<p>121.35 km</p>
|
||||
<p id="lineLength"></p>
|
||||
</div>
|
||||
<div class="basic-detail layout">
|
||||
<p>杆塔数量</p>
|
||||
<p>67</p>
|
||||
<p id="towerNum"></p>
|
||||
</div>
|
||||
<div class="basic-detail layout">
|
||||
<p>项目计划开始时间</p>
|
||||
<p>2022-11-01</p>
|
||||
<p id="planStartTime"></p>
|
||||
</div>
|
||||
<div class="basic-detail layout">
|
||||
<p>项目计划结束时间</p>
|
||||
<p>2023-11-30</p>
|
||||
<p id="planEndTime"></p>
|
||||
</div>
|
||||
<div class="basic-detail layout">
|
||||
<p>最后更新</p>
|
||||
<p>2022-11-25 23:26:08</p>
|
||||
<p id="updateTime"></p>
|
||||
</div>
|
||||
<div class="basic-detail layout">
|
||||
<p>项目进度</p>
|
||||
<p></p>
|
||||
<div class="basic-detail">
|
||||
<p id="progress" style="margin: 10px 0 18px 0;">项目进度</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="data-box">
|
||||
|
|
@ -77,35 +76,35 @@
|
|||
<div id="gx-num-box" class="layout">
|
||||
<div class="layout num-box">
|
||||
<p>杆塔数</p>
|
||||
<p>67</p>
|
||||
<p id="towerNum2"></p>
|
||||
</div>
|
||||
<div class="layout num-box">
|
||||
<p>基础开挖</p>
|
||||
<p>60</p>
|
||||
<p id="num1">0</p>
|
||||
</div>
|
||||
<div class="layout num-box">
|
||||
<p>基础开挖完成</p>
|
||||
<p>60</p>
|
||||
<p id="num2">0</p>
|
||||
</div>
|
||||
<div class="layout num-box">
|
||||
<p>基础浇筑完成</p>
|
||||
<p>60</p>
|
||||
<p id="num3">0</p>
|
||||
</div>
|
||||
<div class="layout num-box">
|
||||
<p>铁塔组立</p>
|
||||
<p>52</p>
|
||||
<p id="num4">0</p>
|
||||
</div>
|
||||
<div class="layout num-box">
|
||||
<p>铁塔组立完成</p>
|
||||
<p>32</p>
|
||||
<p id="num5">0</p>
|
||||
</div>
|
||||
<div class="layout num-box">
|
||||
<p>架线施工完成</p>
|
||||
<p>32</p>
|
||||
<p id="num6">0</p>
|
||||
</div>
|
||||
<div class="layout num-box">
|
||||
<p>附件安装完成</p>
|
||||
<p>12</p>
|
||||
<p id="num7">0</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
|
|
|
|||