php教程 PHP开发 BootStrap은 WeChat 페이지 개발 코드 공유를 쉽게 구현합니다.

BootStrap은 WeChat 페이지 개발 코드 공유를 쉽게 구현합니다.

Dec 09, 2016 pm 02:04 PM
bootstrap 암호

1. 줄 길이:

<div class="col-md-12"> </div>
로그인 후 복사

2.modal

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
   <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h4 class="modal-title" id="myModalLabel">出库信息</h4><br>
   </div>
   <div class="modal-body">
    <spring:form id="outMaterialForm" action="" class="form-horizontal" modelAttribute="outMaterialDto">
     <spring:hidden path="mId"/>
     <div class="form-group">
      <label class="col-sm-2 control-label">出库时间:</label>
      <div class="col-sm-4">
       <spring:input class="form-control" path="outDate" readonly="true" placeholder="请选择时间"
        data-bv-notempty="true" data-bv-notempty-message="不能为空"/>
      </div>
     </div>
     <div class="form-group">
      <label class="col-sm-2 control-label">出库数量:</label>
      <div class="col-sm-4">
       <div id="1" class="input-group input-group-option quantity-wrapper">
        <span class="input-group-addon input-group-addon-remove quantity-remove btn">
         <span class="glyphicon glyphicon-minus"></span>
        </span>
        <spring:input id="1inp" value="6" path="outQuantity" name="option[]" class="form-control quantity-count" placeholder="1" />
        <span class="input-group-addon input-group-addon-remove quantity-add btn">
         <span class="glyphicon glyphicon-plus"></span>
        </span>
       </div>
      </div>
     </div>
     <div class="form-group">
      <label class="col-sm-2 control-label">出库人:</label>
      <div class="col-sm-4">
       <spring:input class="form-control" path="outLeader"/>
      </div>
     </div>
    </spring:form>   
   </div>
   <div class="modal-footer" style="text-align: center;">
    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
    <button type="button" class="btn btn-primary" id="saveOutMaterialBtn">保存</button>
   </div>
  </div>
 </div>
</div>
로그인 후 복사


3.

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags/form" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>




















物料



${materialDto.projectName }
${materialDto.name }
${materialDto.inDate }
${materialDto.inQuantity }
${materialDto.inLeader }
出库列表
出库时间: 出库数量: 出库人:
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">出库信息</h4><br> </div> <div class="modal-body"> <spring:form id="outMaterialForm" action="" class="form-horizontal" modelAttribute="outMaterialDto"> <spring:hidden path="mId"/> <div class="form-group"> <label class="col-sm-2 control-label">出库时间:</label> <div class="col-sm-4"> <spring:input class="form-control" path="outDate" readonly="true" placeholder="请选择时间" data-bv-notempty="true" data-bv-notempty-message="不能为空"/> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">出库数量:</label> <div class="col-sm-4"> <div id="1" class="input-group input-group-option quantity-wrapper"> <span class="input-group-addon input-group-addon-remove quantity-remove btn"> <span class="glyphicon glyphicon-minus"></span> </span> <spring:input id="1inp" value="6" path="outQuantity" name="option[]" class="form-control quantity-count" placeholder="1" /> <span class="input-group-addon input-group-addon-remove quantity-add btn"> <span class="glyphicon glyphicon-plus"></span> </span> </div> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">出库人:</label> <div class="col-sm-4"> <spring:input class="form-control" path="outLeader"/> </div> </div> </spring:form> </div> <div class="modal-footer" style="text-align: center;"> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> <button type="button" class="btn btn-primary" id="saveOutMaterialBtn">保存</button> </div> </div> </div> </div>
로그인 후 복사


4.js 파일

var MaterialManager = {};
$(document).ready(function() {
MaterialManager.query = function(){
 $(&#39;#outMaterialTable&#39;).bootstrapTable(&#39;destroy&#39;);
 //初始化表格,动态从服务器加载数据
 $("#outMaterialTable").bootstrapTable({
  url:&#39;../../supManage/material/queryOutMaterialList.do&#39;,
  method: "get", //使用get请求到服务器获取数据
  contentType: "application/x-www-form-urlencoded",
  striped: true, //表格显示条纹
  pageSize: 10, //每页显示的记录数
  pageNumber:1, //当前第几页
  pageList: [5, 10, 15, 20, 25], //记录数可选列表
  sidePagination: "server", //表示服务端请求
  //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  //设置为limit可以获取limit, offset, search, sort, order
  queryParamsType : "undefined", 
  queryParams: function queryParams(params) { //设置查询参数
   var param = {
   currentPage: params.pageNumber, 
   recordsPerPage: params.pageSize,
   mId:$("#id").val()
   }; 
   return param;     
  }
  });
 };
 MaterialManager.query();
 $("#saveOutMaterialBtn").click(function(){
  $("#loadingModal").modal(&#39;show&#39;);
  $("#myModal").modal(&#39;hide&#39;);
  $.ajax({
   type: "POST",
   url: "../../supManage/material/saveOutMaterial.do",
   data:$("#outMaterialForm").serialize(),
   dataType: "json",
   success: function(data){
    $("#loadingModal").modal(&#39;hide&#39;);
    $("#alertModal").modal(&#39;show&#39;);
    MaterialManager.query();
    setInterval(function(){$("#alertModal").modal(&#39;hide&#39;);},2000);
   }
  });
 });
 // 出库按钮
 $("#outQuantityBtn").click(function(){
  $("#myModal").modal(&#39;show&#39;);
 });
 $(&#39;#outDate&#39;).datetimepicker({
  format: &#39;yyyy-mm-dd hh:ii:ss&#39;,
  language:&#39;zh-CN&#39;,
  autoclose:true,
  startDate:&#39;2016-09-01&#39;,
  endDate:&#39;2025-12-12&#39;
 });
  $(".quantity-add").click(function(e){
   //Vars
   var count = 1;
   var newcount = 0;
   //Wert holen + Rechnen
   var elemID = $(this).parent().attr("id");
   var countField = $("#"+elemID+&#39;inp&#39;);
   var count = $("#"+elemID+&#39;inp&#39;).val();
   var newcount = parseInt(count) + 1;
   //Neuen Wert setzen
   $("#"+elemID+&#39;inp&#39;).val(newcount);
  });
  //Remove
  $(".quantity-remove").click(function(e){
   //Vars
   var count = 1;
   var newcount = 0;
   //Wert holen + Rechnen
   var elemID = $(this).parent().attr("id");
   var countField = $("#"+elemID+&#39;inp&#39;);
   var count = $("#"+elemID+&#39;inp&#39;).val();
   var newcount = parseInt(count) - 1;
   //Neuen Wert setzen
   $("#"+elemID+&#39;inp&#39;).val(newcount);
  });
});
로그인 후 복사


5 , 페이지 추가

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page import="com.base.project.wechat.m500point.dto.PointQualitySecurityDto" %>
<%@page import="com.base.pf.base.util.StringUtils" %>
<html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- 可选的Bootstrap主题文件(一般不用引入) -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link href="<%=basePath%>/page/pf/base/bootstrap/table/bootstrap-table.css" rel="stylesheet"/>
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap-table/1.9.1/bootstrap-table.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap-table/1.9.1/locale/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="<%=basePath%>/page/project/wechat/m500point/js/point_quality_security.js"></script>
<title>安全/质量填报</title>
</head>
<style type="text/css">
.file {
 position: relative;
 display: inline-block;
/*  background: #D0EEFF; */
/*  border: 1px solid #99D3F5; */
/*  border-radius: 4px; */
/*  padding: 4px 12px; */
 overflow: hidden;
/*  color: #1E88C7; */
 text-decoration: none;
 text-indent: 0;
/*  line-height: 20px; */
}
.file input {
 position: absolute;
 font-size: 100px;
 right: 0;
 top: 0;
 opacity: 0;
}
.file:hover {
 background: #AADFFD;
 border-color: #78C3F3;
 color: #004974;
 text-decoration: none;
}
</style>
<%PointQualitySecurityDto pDto = ((PointQualitySecurityDto)request.getAttribute("pointQualitySecurityDto")); %>
<body class="container">
<h4 class="page-header">安全/质量填报</h4>
<spring:form id="defaultForm" modelAttribute="pointQualitySecurityDto" action="save.do" method="post" enctype="multipart/form-data" >
 <input type="hidden" name="pId" value="${pointQualitySecurityDto.pId }"/>
 <input type="hidden" name="sId" value="${pointQualitySecurityDto.sId }"/>
 <input type="hidden" name="qId" value="${pointQualitySecurityDto.qId }"/>
 <input type="hidden" name="pointProject" value="${pointQualitySecurityDto.pointProject }"/>
 <input type="hidden" name="recordPerson" value="${pointQualitySecurityDto.recordPerson }"/>
 <input type="hidden" name="recordDate" value="${pointQualitySecurityDto.recordDate }"/>
 <spring:hidden path="scrollTop"/>
 <spring:hidden path="isSave"/>
 <input type="hidden" name="category" id="uploadCategory"/>
 <table id="formQRCode" class="table table-striped table-hover table-bordered">
  <thead>
   <tr>               
    <th data-field="name" data-halign="center" valign="middle">工程部位(工点)</th>
    <th data-field="qrcode" data-halign="center" valign="middle">检查人</th>
    <th data-field="url" data-halign="center" width="100">检查时间</th>
   </tr>
  </thead>
  <tbody>
  <tr>
   <td>${pointQualitySecurityDto.pointProject }</td>
   <td>${pointQualitySecurityDto.recordPerson }</td>
   <td>${pointQualitySecurityDto.recordDate }</td>
  </tr>
  </tbody>
 </table>
 <table class="table table-hover table-bordered" id="securityTable" data-pagination="false"
  data-search="false"
  data-show-refresh="false"
  data-toggle="card"
  data-card-view = "true"
  data-show-toggle="false"
  data-show-columns="false"
  data-page-list="[10,20,50,100]">
 <caption>安全</caption>
 <thead>
  <thead>
   <tr>               
   <th data-field="" data-halign="center">检查项目</th>
   <th data-field="" data-halign="center">实际得分</th>
   <th data-field="" data-halign="center">是否合格</th>
   <th data-field="" data-halign="center">附件</th>
   </tr>
  </thead>
  <tbody>
  <tr>
   <td>安全施工
   </td>
   <td>
   <spring:input style="width: 40px;" path="sSecurityScore"/>
   </td>
   <td>
   <input type="radio" name="isSSecurity" value="1" <%if("1".equals(pDto.getIsSSecurity())){ %>checked<%} %>>是
   <input type="radio" name="isSSecurity" value="0" <%if("0".equals(pDto.getIsSSecurity())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.sSecurityFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="sSecurityFile" accept="image/*" onchange="changeFile(this,&#39;sSecurityFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getsSecurityFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sSecurityFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>文明施工</td>
   <td>
   <spring:input style="width: 40px;" path="sCiviliztionScore"/>
   </td>
   <td>
   <input type="radio" name="isSCiviliztion" value="1" <%if("1".equals(pDto.getIsSCiviliztion())){ %>checked<%} %>>是
   <input type="radio" name="isSCiviliztion" value="0" <%if("0".equals(pDto.getIsSCiviliztion())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.sCiviliztionFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="sCiviliztionFile" accept="image/*" onchange="changeFile(this,&#39;sCiviliztionFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getsCiviliztionFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sCiviliztionFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>脚手架</td>
   <td>
   <spring:input style="width: 40px;" path="sScaffoldScore"/>
   </td>
   <td>
   <input type="radio" name="isSScaffold" value="1" <%if("1".equals(pDto.getIsSScaffold())){ %>checked<%} %>>是
   <input type="radio" name="isSScaffold" value="0" <%if("0".equals(pDto.getIsSScaffold())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.sScaffoldFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="sScaffoldFile" accept="image/*" onchange="changeFile(this,&#39;sScaffoldFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getsScaffoldFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sScaffoldFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>基坑支撑</td>
   <td>
   <spring:input style="width: 40px;" path="sFounationScore"/>
   </td>
   <td>
   <input type="radio" name="isSFounation" value="1" <%if("1".equals(pDto.getIsSFounation())){ %>checked<%} %>>是
   <input type="radio" name="isSFounation" value="0" <%if("0".equals(pDto.getIsSFounation())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.sFounationFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="sFounationFile" accept="image/*" onchange="changeFile(this,&#39;sFounationFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getsFounationFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sFounationFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>外用电梯</td>
   <td>
   <spring:input style="width: 40px;" path="sLiftScore"/>
   </td>
   <td>
   <input type="radio" name="isSLift" value="1" <%if("1".equals(pDto.getIsSLift())){ %>checked<%} %>>是
   <input type="radio" name="isSLift" value="0" <%if("0".equals(pDto.getIsSLift())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.sLiftFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="sLiftFile" accept="image/*" onchange="changeFile(this,&#39;sLiftFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getsLiftFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sLiftFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>施工用电</td>
   <td>
   <spring:input style="width: 40px;" path="sElectricityScore"/>
   </td>
   <td>
   <input type="radio" name="isSElectricity" value="1" <%if("1".equals(pDto.getIsSElectricity())){ %>checked<%} %>>是
   <input type="radio" name="isSElectricity" value="0" <%if("0".equals(pDto.getIsSElectricity())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.sElectricityFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="sElectricityFile" accept="image/*" onchange="changeFile(this,&#39;sElectricityFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getsElectricityFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sElectricityFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>施工机械</td>
   <td>
   <spring:input style="width: 40px;" path="sMachineryScore"/>
   </td>
   <td>
   <input type="radio" name="isSMachinery" value="1" <%if("1".equals(pDto.getIsSSecurity())){ %>checked<%} %>>是
   <input type="radio" name="isSMachinery" value="0" <%if("0".equals(pDto.getIsSSecurity())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.sMachineryFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="sMachineryFile" accept="image/*" onchange="changeFile(this,&#39;sMachineryFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getsMachineryFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sMachineryFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  </tbody>
</table>
 <table class="table table-hover table-bordered" id="qualityTable" data-pagination="false"
  data-search="false"
  data-show-refresh="false"
  data-toggle="card"
  data-card-view = "true"
  data-show-toggle="false"
  data-show-columns="false"
  data-page-list="[10,20,50,100]">
 <caption>质量</caption>
 <thead>
  <thead>
   <tr>               
   <th data-field="" data-halign="center">检查项目</th>
   <th data-field="" data-halign="center">实际得分</th>
   <th data-field="" data-halign="center">是否合格</th>
   <th data-field="" data-halign="center">拍照</th>
   </tr>
  </thead>
  <tbody>
  <tr>
   <td>石灰质量</td>
   <td>
   <spring:input style="width: 40px;" path="qLimeScore"/>
   </td>
   <td>
   <input type="radio" name="isQLime" value="1" <%if("1".equals(pDto.getIsQLime())){ %>checked<%} %>>是
   <input type="radio" name="isQLime" value="0" <%if("0".equals(pDto.getIsQLime())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.qLimeFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="qLimeFile" accept="image/*" onchange="changeFile(this,&#39;qLimeFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getqLimeFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qLimeFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>水泥质量</td>
   <td>
   <spring:input style="width: 40px;" path="qCementScore"/>
   </td>
   <td>
   <input type="radio" name="isQCement" value="1" <%if("1".equals(pDto.getIsQCement())){ %>checked<%} %>>是
   <input type="radio" name="isQCement" value="0" <%if("0".equals(pDto.getIsQCement())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.qCementFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="qCementFile" accept="image/*" onchange="changeFile(this,&#39;qCementFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getqCementFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qCementFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>桩的数量<br>、类型、<br>布置形式</td>
   <td>
   <spring:input style="width: 40px;" path="qPileCountScore"/>
   </td>
   <td>
   <input type="radio" name="isQPileCount" value="1" <%if("1".equals(pDto.getIsQPileCount())){ %>checked<%} %>>是
   <input type="radio" name="isQPileCount" value="0" <%if("0".equals(pDto.getIsQPileCount())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.qPileCountFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="qPileCountFile" accept="image/*" onchange="changeFile(this,&#39;qPileCountFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getqPileCountFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qPileCountFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>材料的配<br>合比例</td>
   <td>
   <spring:input style="width: 40px;" path="qFillingScore"/>
   </td>
   <td>
   <input type="radio" name="isQFilling" value="1" <%if("1".equals(pDto.getIsQFilling())){ %>checked<%} %>>是
   <input type="radio" name="isQFilling" value="0" <%if("0".equals(pDto.getIsQFilling())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.qFillingFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="qFillingFile" accept="image/*" onchange="changeFile(this,&#39;qFillingFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getqFillingFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qFillingFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>施工工艺</td>
   <td>
   <spring:input style="width: 40px;" path="qTechnologyScore"/>
   </td>
   <td>
   <input type="radio" name="isQTechnology" value="1" <%if("1".equals(pDto.getIsQTechnology())){ %>checked<%} %>>是
   <input type="radio" name="isQTechnology" value="0" <%if("0".equals(pDto.getIsQTechnology())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.qTechnologyFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="qTechnologyFile" accept="image/*" onchange="changeFile(this,&#39;qTechnologyFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getqTechnologyFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qTechnologyFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>桩的密实<br>度</td>
   <td>
   <spring:input style="width: 40px;" path="qPileDensityScore"/>
   </td>
   <td>
   <input type="radio" name="isQPileDensity" value="1" <%if("1".equals(pDto.getIsQPileDensity())){ %>checked<%} %>>是
   <input type="radio" name="isQPileDensity" value="0" <%if("0".equals(pDto.getIsQPileDensity())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.qPileDensityFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="qPileDensityFile" accept="image/*" onchange="changeFile(this,&#39;qPileDensityFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getqPileDensityFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qPileDensityFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>地基承载<br>力</td>
   <td>
   <spring:input style="width: 40px;" path="qBearingScore"/>
   </td>
   <td>
   <input type="radio" name="isQBearing" value="1" <%if("1".equals(pDto.getIsQBearing())){ %>checked<%} %>>是
   <input type="radio" name="isQBearing" value="0" <%if("0".equals(pDto.getIsQBearing())){ %>checked<%} %>>否
   </td>
   <td>
<%--    ${pointQualitySecurityDto.qBearingFileName } --%>
   <a href="javascript:void(0);" class="file"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/camera_picture.png">
    <input type="file" name="qBearingFile" accept="image/*" onchange="changeFile(this,&#39;qBearingFile&#39;);">
   </a> 
   <%if(!StringUtils.isEmpty(pDto.getqBearingFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qBearingFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  </tbody>
</table>
 <div style="text-align:center;">
  <button type="button" onclick="saveForm();" class="btn btn-default">保存</button>
 </div>
 <div style="text-align:center;"> </div>
</spring:form>
<!-- <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> -->
<!--  开始演示模态框 -->
<!-- </button> -->
<!-- 模态框(Modal) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
   <div class="modal-header">
<!--     <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> -->
<!--      × -->
<!--     </button> -->
<!--     <h4 class="modal-title" id="myModalLabel"> -->
<!--      图片<img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"> -->
<!--     </h4><br> -->
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
    </button>
   </div>
   <div class="modal-body">
    <a href="#" class="thumbnail">
     <img id="modelPicture" src="" alt="">
    </a>
   </div>
   <div class="modal-footer">
   </div>
  </div><!-- /.modal-content -->
 </div><!-- /.modal -->
</div>
<div class="modal fade" id="loadingModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
   <div class="modal-header">
   </div>
   <div class="modal-body">
    <a href="#" class="thumbnail">
     图片正在上传,请稍后...
<!--      <img id="modelPicture" src="http://imgsrc.baidu.com/forum/w%3D580/sign=203354c7a864034f0fcdc20e9fc27980/1a52738da9773912d8d31f7bfb198618377ae281.jpg"> -->
    </a>
   </div>
   <div class="modal-footer">
   </div>
  </div>
 </div>
</div>
</body>
</html>
<script type="text/javascript">
window.scrollTo(1,&#39;${pointQualitySecurityDto.scrollTop}&#39;);
// setTimeout("$(&#39;#loadingModal&#39;).modal(&#39;hide&#39;);",1000);
//选择文件; 图片上传
function changeFile(obj,name){
 $("#loadingModal").modal(&#39;show&#39;);
 var scrollTop = document.body.scrollTop;
 $("#scrollTop").val(scrollTop);
 $("#uploadCategory").val(name);
 $("#defaultForm").submit();
}
// 保存
function saveForm(){
 $("#isSave").val("yes");
 $("#defaultForm").submit();
}
function showPicture(attenchmentId){
 if(!attenchmentId)
  return;
 $("#modelPicture").attr("src","../../attachment/displayjpg.do?attenchmentId="+attenchmentId);
 $("#myModal").modal(&#39;show&#39;);
}
</script>
로그인 후 복사


6. 페이지 보기

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page import="com.base.project.wechat.m500point.dto.PointQualitySecurityDto" %>
<%@page import="com.base.pf.base.util.StringUtils" %>
<html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- 可选的Bootstrap主题文件(一般不用引入) -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link href="<%=basePath%>/page/pf/base/bootstrap/table/bootstrap-table.css" rel="stylesheet"/>
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap-table/1.9.1/bootstrap-table.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap-table/1.9.1/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="<%=basePath%>/page/project/wechat/m500point/js/point_view.js"></script>
<style type="text/css">
.file {
 position: relative;
 display: inline-block;
/*  background: #D0EEFF; */
/*  border: 1px solid #99D3F5; */
/*  border-radius: 4px; */
/*  padding: 4px 12px; */
 overflow: hidden;
/*  color: #1E88C7; */
 text-decoration: none;
 text-indent: 0;
/*  line-height: 20px; */
}
.file input {
 position: absolute;
 font-size: 100px;
 right: 0;
 top: 0;
 opacity: 0;
}
.file:hover {
 background: #AADFFD;
 border-color: #78C3F3;
 color: #004974;
 text-decoration: none;
}
td{
 valign: middle
}
</style>
<%PointQualitySecurityDto pDto = ((PointQualitySecurityDto)request.getAttribute("pointQualitySecurityDto")); %>
<title>安全/质量填报</title>
</head>
<body class="container">
<h4 class="page-header">安全/质量填报</h4>
<spring:form id="defaultForm" class="form-horizontal" modelAttribute="pointQualitySecurityDto" action="save.do" method="post" enctype="multipart/form-data" >
 <input type="hidden" name="pId" value="${pointQualitySecurityDto.pId }"/>
 <table id="formQRCode" class="table table-striped table-hover table-bordered">
  <thead>
   <tr>               
    <th data-field="name" data-halign="center" valign="middle">工程部位(工点)</th>
    <th data-field="qrcode" data-halign="center" valign="middle">检查人</th>
    <th data-field="url" data-halign="center">检查时间</th>
   </tr>
  </thead>
  <tbody>
  <tr>
   <td>${pointQualitySecurityDto.pointProject }</td>
   <td>${pointQualitySecurityDto.recordPerson }</td>
   <td>${pointQualitySecurityDto.recordDate }</td>
  </tr>
  </tbody>
 </table>
 <table class="table table-hover table-bordered" id="securityTable" data-pagination="false"
  data-search="false"
  data-show-refresh="false"
  data-toggle="card"
  data-card-view = "true"
  data-show-toggle="false"
  data-show-columns="false"
  data-page-list="[10,20,50,100]">
 <caption>安全</caption>
 <thead>
  <thead>
   <tr>               
   <th data-field="" data-halign="center">检查项目</th>
   <th data-field="" data-halign="center">实际得分</th>
   <th data-field="" data-halign="center">是否合格</th>
   <th data-field="" data-halign="center">附件</th>
   </tr>
  </thead>
  <tbody>
  <tr>
   <td>安全施工</td>
   <td>${pointQualitySecurityDto.sSecurityScore }
   </td>
   <td>${pointQualitySecurityDto.isSSecurity }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getsSecurityFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sSecurityFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>文明施工</td>
   <td>${pointQualitySecurityDto.sCiviliztionScore }
   </td>
   <td>${pointQualitySecurityDto.isSCiviliztion }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getsCiviliztionFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sCiviliztionFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>脚手架</td>
   <td>${pointQualitySecurityDto.sScaffoldScore }
   </td>
   <td>${pointQualitySecurityDto.isSScaffold }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getsScaffoldFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sScaffoldFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>基坑支撑</td>
   <td>${pointQualitySecurityDto.sFounationScore }
   </td>
   <td>${pointQualitySecurityDto.isSFounation }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getsFounationFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sFounationFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>外用电梯</td>
   <td>${pointQualitySecurityDto.sLiftScore }
   </td>
   <td>${pointQualitySecurityDto.isSLift }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getsLiftFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sLiftFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>施工用电</td>
   <td>${pointQualitySecurityDto.sElectricityScore }
   </td>
   <td>${pointQualitySecurityDto.isSElectricity }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getsElectricityFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sElectricityFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>施工机械</td>
   <td>${pointQualitySecurityDto.sMachineryScore }
   </td>
   <td>${pointQualitySecurityDto.isSMachinery }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getsMachineryFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.sMachineryFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  </tbody>
</table>
 <table class="table table-hover table-bordered" id="qualityTable" data-pagination="false"
  data-search="false"
  data-show-refresh="false"
  data-toggle="card"
  data-card-view = "true"
  data-show-toggle="false"
  data-show-columns="false"
  data-page-list="[10,20,50,100]">
 <caption>质量</caption>
 <thead>
  <thead>
   <tr>               
   <th data-field="" data-halign="center">检查项目</th>
   <th data-field="" data-halign="center">实际得分</th>
   <th data-field="" data-halign="center">是否合格</th>
   <th data-field="" data-halign="center">附件</th>
   </tr>
  </thead>
  <tbody>
  <tr>
   <td>石灰质量</td>
   <td>${pointQualitySecurityDto.qLimeScore }
   </td>
   <td>${pointQualitySecurityDto.isQLime }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getqLimeFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qLimeFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>水泥质量</td>
   <td>${pointQualitySecurityDto.qCementScore }
   </td>
   <td>${pointQualitySecurityDto.isQCement }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getqCementFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qCementFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>桩的数量<br>、类型、<br>布置形式</td>
   <td>${pointQualitySecurityDto.qPileCountScore }
   </td>
   <td>${pointQualitySecurityDto.isQPileCount }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getqPileCountFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qPileCountFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>材料的配<br>合比例</td>
   <td>${pointQualitySecurityDto.qFillingScore }
   </td>
   <td>${pointQualitySecurityDto.isQFilling }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getqFillingFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qFillingFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>施工工艺</td>
   <td>${pointQualitySecurityDto.qTechnologyScore }
   </td>
   <td>${pointQualitySecurityDto.isQTechnology }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getqTechnologyFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qTechnologyFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>桩的密实<br>度</td>
   <td>${pointQualitySecurityDto.qPileDensityScore }
   </td>
   <td>${pointQualitySecurityDto.isQPileDensity }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getqPileDensityFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qPileDensityFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  <tr>
   <td>地基承载<br>力</td>
   <td>${pointQualitySecurityDto.qBearingScore }
   </td>
   <td>${pointQualitySecurityDto.isQBearing }
   </td>
   <td>
   <%if(!StringUtils.isEmpty(pDto.getqBearingFileName())){ %>
   <a href="javascript:void(0);" class="file" onclick="showPicture(&#39;${pointQualitySecurityDto.qBearingFileId}&#39;);"><img alt="" src="<%=basePath%>/page/project/wechat/m500point/img/box_picture.png"></a>
   <%} %>
   </td>
  </tr>
  </tbody>
</table>
 <div style="text-align:center;"> </div>
</spring:form>
<!-- <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> -->
<!--  开始演示模态框 -->
<!-- </button> -->
<!-- 模态框(Modal) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
  <div class="modal-content">
   <div class="modal-header">
<!--     <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> -->
<!--      × -->
<!--     </button> -->
<!--     <h4 class="modal-title" id="myModalLabel"> -->
<!--      图片查看 -->
<!--     </h4><br> -->
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
    </button>
   </div>
   <div class="modal-body">
    <a href="#" class="thumbnail">
     <div id="alertContent"></div>
     <img id="modelPicture" src="" alt="">
    </a>
   </div>
   <div class="modal-footer">
   </div>
  </div><!-- /.modal-content -->
 </div><!-- /.modal -->
</div>
</body>
</html>
<script type="text/javascript">
function showPicture(attenchmentId){
 $("#modelPicture").attr("src","");
 $("#alertContent").html(&#39;<div></div>&#39;);
 if(!attenchmentId){
  $("#alertContent").html(&#39;<div>未上传图片。</div>&#39;);
  setTimeout("$(&#39;#myModal&#39;).modal(&#39;hide&#39;);",1000);
 }else{
  $("#modelPicture").attr("src","../../attachment/displayjpg.do?attenchmentId="+attenchmentId);
 }
 $("#myModal").modal(&#39;show&#39;);
}
</script>
로그인 후 복사
7. 목록 페이지

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- 可选的Bootstrap主题文件(一般不用引入) -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="<%=basePath%>/page/pf/base/bootstrap/table/bootstrap-table.css" rel="stylesheet"/>
<script src="http://cdn.bootcss.com/bootstrap-table/1.9.1/bootstrap-table.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap-table/1.9.1/locale/bootstrap-table-zh-CN.min.js"></script>
<title>质量/安全列表</title>
<script type="text/javascript" src="<%=basePath%>/page/project/wechat/m500point/js/point_quality_security_list.js?version=09092200010"></script>
</head>
<body>
<div class="container">
<h4 class="page-header">质量/安全列表</h4>
<table class="table table-hover" id="pointQualitySecurityTable" data-pagination="false"
  data-search="false"
  data-show-refresh="false"
  data-toggle="card"
  data-card-view = "true"
  data-show-toggle="false"
  data-show-columns="true">
  <input type="hidden" id="pId" value="${pointQualitySecurityDto.pId }"/>
  <thead>
   <tr>               
    <th data-field="pointProject" data-halign="center" >工程部位(工点):</th>
    <th data-field="recordPerson" data-halign="center">记录人:</th>
    <th data-field="recordDate" data-halign="center">记录时间:</th>
    <th data-field="checkType" data-halign="center">检查类型:</th>
    <th data-field="sId" data-visible="false">
    <th data-field="qId" data-visible="false">
    <th data-field="ck" data-halign="center" data-formatter="showDetail">详细:</th>
   </tr>
  </thead>
  <tbody>
  </tbody>
</table>
</div>
</body>
</html>
 
function initTable() {
 // 先销毁表格
// $(&#39;#cusTable&#39;).bootstrapTable(&#39;destroy&#39;);
 // 初始化表格,动态从服务器加载数据
 $("#pointQualitySecurityTable").bootstrapTable({
  method : "get", // 使用get请求到服务器获取数据
  url : "queryQualitySecurityList.do", // 获取数据的Servlet地址
  contentType: "application/x-www-form-urlencoded",
  striped : true, // 表格显示条纹
  pagination : false, // 启动分页
  pageNumber : 1, // 当前第几页
  sidePagination : "server", // 表示服务端请求
  // 设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  // 设置为limit可以获取limit, offset, search, sort, order
  queryParamsType : "undefined",
  queryParams : function queryParams(params) { // 设置查询参数
   var param = {
    pageNumber : params.pageNumber,
    pId:$("#pId").val()
   };
   return param;
  }
 });
}
function showDetail(value,row,index){
 return "<a href=&#39;toQualitySecurityViewPage.do?sId="+row.sId+"&qId="+row.qId+"&#39;>查看</a>";
}
$(document).ready(function() {
 // 调用函数,初始化表格
 initTable();
 // 当点击查询按钮的时候执行
 // $("#search").bind("click", initTable);
});
로그인 후 복사
【관련 영상 추천:

부트스트랩 튜토리얼


본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
1 몇 달 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
1 몇 달 전 By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. 크로스 플레이가 있습니까?
1 몇 달 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

부트 스트랩 검색 창을 얻는 방법 부트 스트랩 검색 창을 얻는 방법 Apr 07, 2025 pm 03:33 PM

부트 스트랩을 사용하여 검색 표시 줄의 값을 얻는 방법 : 검색 표시 줄의 ID 또는 이름을 결정하십시오. JavaScript를 사용하여 DOM 요소를 얻으십시오. 요소의 값을 가져옵니다. 필요한 작업을 수행하십시오.

Vue에서 부트 스트랩을 사용하는 방법 Vue에서 부트 스트랩을 사용하는 방법 Apr 07, 2025 pm 11:33 PM

vue.js에서 bootstrap 사용은 5 단계로 나뉩니다 : Bootstrap 설치. main.js.의 부트 스트랩 가져 오기 부트 스트랩 구성 요소를 템플릿에서 직접 사용하십시오. 선택 사항 : 사용자 정의 스타일. 선택 사항 : 플러그인을 사용하십시오.

부트 스트랩의 수직 중심을 수행하는 방법 부트 스트랩의 수직 중심을 수행하는 방법 Apr 07, 2025 pm 03:21 PM

부트 스트랩을 사용하여 수직 센터링을 구현하여 : Flexbox Method : D-Flex, 정당화 컨텐츠 중심 및 정렬 중심 센터 클래스를 사용하여 Flexbox 컨테이너에 요소를 배치하십시오. Align-Items-Center 클래스 방법 : Flexbox를 지원하지 않는 브라우저의 경우 상위 요소의 높이가 정의 된 경우 Align-Items 중심 클래스를 사용하십시오.

부트 스트랩에 분할 라인을 작성하는 방법 부트 스트랩에 분할 라인을 작성하는 방법 Apr 07, 2025 pm 03:12 PM

부트 스트랩 분할 라인을 만드는 두 가지 방법이 있습니다 : 태그를 사용하여 수평 분할 라인이 생성됩니다. CSS 테두리 속성을 사용하여 사용자 정의 스타일 분할 라인을 만듭니다.

부트 스트랩 크기를 조정하는 방법 부트 스트랩 크기를 조정하는 방법 Apr 07, 2025 pm 03:18 PM

부트 스트랩에서 요소의 크기를 조정하려면 다음을 포함하여 차원 클래스를 사용할 수 있습니다.

부트 스트랩을위한 프레임 워크를 설정하는 방법 부트 스트랩을위한 프레임 워크를 설정하는 방법 Apr 07, 2025 pm 03:27 PM

부트 스트랩 프레임 워크를 설정하려면 다음 단계를 따라야합니다. 1. CDN을 통해 부트 스트랩 파일 참조; 2. 자신의 서버에서 파일을 다운로드하여 호스팅하십시오. 3. HTML에 부트 스트랩 파일을 포함; 4. 필요에 따라 Sass/Less를 컴파일하십시오. 5. 사용자 정의 파일을 가져옵니다 (선택 사항). 설정이 완료되면 Bootstrap의 그리드 시스템, 구성 요소 및 스타일을 사용하여 반응 형 웹 사이트 및 응용 프로그램을 만들 수 있습니다.

부트 스트랩에 사진을 삽입하는 방법 부트 스트랩에 사진을 삽입하는 방법 Apr 07, 2025 pm 03:30 PM

Bootstrap에 이미지를 삽입하는 방법에는 여러 가지가 있습니다. HTML IMG 태그를 사용하여 이미지를 직접 삽입하십시오. 부트 스트랩 이미지 구성 요소를 사용하면 반응 형 이미지와 더 많은 스타일을 제공 할 수 있습니다. 이미지 크기를 설정하고 IMG-Fluid 클래스를 사용하여 이미지를 적응할 수 있도록하십시오. IMG 통과 클래스를 사용하여 테두리를 설정하십시오. 둥근 모서리를 설정하고 IMG 라운드 클래스를 사용하십시오. 그림자를 설정하고 그림자 클래스를 사용하십시오. CSS 스타일을 사용하여 이미지를 조정하고 배치하십시오. 배경 이미지를 사용하여 배경 이미지 CSS 속성을 사용하십시오.

부트 스트랩 테이블이 ajax를 사용하여 데이터를 잡아 당기면해야 할 일 부트 스트랩 테이블이 ajax를 사용하여 데이터를 잡아 당기면해야 할 일 Apr 07, 2025 am 11:54 AM

서버에서 데이터를 얻기 위해 ajax를 사용하는 시점에 달린 부트 스트랩 코드에 대한 솔루션 : 1. 서버 측 코드 (예 : UTF-8)의 올바른 문자 인코딩을 설정하십시오. 2. AJAX 요청에서 요청 헤더를 설정하고 허용 된 문자 인코딩 (수락-차 세트)을 지정하십시오. 3. 부트 스트랩 테이블의 "Unescape"변환기를 사용하여 탈출 한 HTML 엔티티를 원래 문자로 해독하십시오.

See all articles