javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
@@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; import cn.hutool.core.util.ObjectUtil; import com.javaweb.cms.util.CmsConstants; import com.javaweb.common.core.domain.AjaxResult; import com.javaweb.common.utils.Arith; @@ -159,8 +160,11 @@ List<Hole> holes = holeService.selectHoleProjectProcess(); Map<String, Double> holeMap = new HashMap<>(); for (Hole hole : holes) { Double val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2); val = Arith.round(val * 100, 2); Double val =0.0d; if(ObjectUtil.isNotEmpty(hole.getFootageCpl()) && ObjectUtil.isNotEmpty(hole.getFootage())) { val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2); val = Arith.round(val * 100, 2); } holeMap.put(hole.getProjectId(), val); } javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java
@@ -130,16 +130,13 @@ @PostMapping("/edit") @ResponseBody public AjaxResult editSave(Hole hole) { if(isNotNull(hole.getFootage()) && isNotNull(hole.getFootageCpl())){ if(ObjectUtil.isNotEmpty(hole.getFootage()) && ObjectUtil.isNotEmpty(hole.getFootageCpl())){ Double rate = Arith.div(hole.getFootageCpl(),hole.getFootage(),2) ; hole.setRate(rate); } return toAjax(holeService.updateHole(hole)); } private boolean isNotNull(Double val){ return val !=null && val !=0.0D; } /** * 删除钻孔 javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html
@@ -74,6 +74,7 @@ exportUrl: prefix + "/export", importUrl: prefix + "/importHole/"+projectId, modalName: "钻孔", pageSize:50, columns: [{ checkbox: true }, javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html
@@ -124,21 +124,23 @@ <div slot="header" class="clearfix"> <span>钻孔进度</span> </div> <template> <el-table :data="holeData" size="small" style="width: 100%"> <el-table-column prop="code" label="编号"></el-table-column> <el-table-column prop="type" label="类型"></el-table-column> <el-table-column prop="footage" label="总进尺(m)"></el-table-column> <el-table-column prop="footageCpl" label="已完成(m)"></el-table-column> <el-table-column label="进度(%)"> <template slot-scope="scope"> <el-progress :percentage=(scope.row.rate*100).toFixed(0) ></el-progress> </template> </el-table-column> <div style="height: 250px;"> <template> <el-table :data="holeData" size="small" style="width: 100%" height="250"> <el-table-column prop="code" label="编号"></el-table-column> <el-table-column prop="type" label="类型"></el-table-column> <el-table-column prop="footage" label="总进尺(m)"></el-table-column> <el-table-column prop="footageCpl" label="已完成(m)"></el-table-column> <el-table-column label="进度(%)"> <template slot-scope="scope"> <el-progress :percentage=(scope.row.rate*100).toFixed(0) ></el-progress> </template> </el-table-column> </el-table> </template> </el-table> </template> </div> </el-card> </el-col> javaweb-plus/javaweb-cms/src/main/resources/templates/loginPage/process/login.html
@@ -152,12 +152,12 @@ <div style="width:100%"> <div class="input-container" style="margin-top:124px;position:relative;"> <img src="images/loginPage/user1.png" style="margin-right:5px;"/> <input id="username" name="username" class="txt" value="admin" type="text" autocomplete="off" placeholder="请输入用户名/邮箱" > <input id="username" name="username" class="txt" value="" type="text" autocomplete="off" placeholder="请输入用户名/邮箱" > <div class="error-tip"></div> </div> <div class="login-input input-container" style="margin-top:42px;position:relative;"> <img class="password-icon" src="images/loginPage/password1.png"style="margin-top:-5px"/> <input name="password" id="password" value="admin123" class="txt" type="password" placeholder="请输入登录密码" autocomplete="off" > <input name="password" id="password" value="" class="txt" type="password" placeholder="请输入登录密码" autocomplete="off" > <div class="error-tip"></div> </div>