码迷,mamicode.com
首页 > Web开发 > 详细

views.jsp

时间:2020-11-23 12:15:32      阅读:11      评论:0      收藏:0      [点我收藏+]

标签:rms   col   reac   views   code   add   each   rip   BMI   

department

input

<title>部门新增或者修改</title>

<form action="/department/saveOrUpdate.do" method="post">
    <input type="hidden" name="id" value="${department.id}">
    <input type="text" name="name" placeholder="名称" value="${department.name}"><br/>
    <input type="text" name="sn" placeholder="缩写" value="${department.sn}"><br/>
    <input type="submit" value="提交">
</form>

list

<title>部门列表</title>
<script>
    function goPage(currentPage){
        document.getElementById("currentPage").value=currentPage;
        document.forms[0].submit();
    }
</script>

<a href="/department/input.do">新增</a>
<!-- 查询的表单 -->
<form action="/department/list.do" method="post">
    <input type="hidden" name="currentPage" id="currentPage" value="1"/>
</form>

<table width="800px" cellpadding="0" cellspacing="0" align="center" border="1px">
    <tr>
        <td>ID</td>
        <td>名称</td>
        <td>缩写</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${pageResult.data}" var="department">
        <tr>
            <td>${department.id}</td>
            <td>${department.name}</td>
            <td>${department.sn}</td>
            <td>
                <a href="/department/delete.do?id=${department.id}">删除</a>
                <a href="/department/input.do?id=${department.id}">修改</a>
            </td>
        </tr>
    </c:forEach>
    <tr align="center">
        <td colspan="9">
            <a href="javascript:goPage(1);">首页</a>
            <a href="javascript:goPage(${pageResult.prevPage});">上一页</a>
            <a href="javascript:goPage(${pageResult.nextPage});">下一页</a>
            <a href="javascript:goPage(${pageResult.totalPage});">尾页</a>
            当前:${pageResult.currentPage}/${pageResult.totalPage}
            总条数:${pageResult.totalCount}
        </td>
    </tr>
</table>

employee

input

<title>员工新增或者修改</title>

<form action="/employee/saveOrUpdate.do" method="post">
    <input type="hidden" name="id" value="${employee.id}">
    名称:<input type="text" name="name" placeholder="名称" value="${employee.name}"><br/>
    密码:<input type="text" name="password" placeholder="密码" value="${employee.password}"><br/>
    邮箱:<input type="text" name="email" placeholder="邮箱" value="${employee.email}"><br/>
    年龄:<input type="text" name="age" placeholder="年龄" value="${employee.age}"><br/>
    超管:<input type="text" name="admin" placeholder="超管" value="${employee.admin}"><br/>
    部门:<select name="dept.id">
        <c:forEach items="${departments}" var="department">
            <option value="${department.id}" <c:if test="${employee.dept.id == department.id}">selected</c:if> >${department.name}</option>
        </c:forEach>
    </select>
    <input type="submit" value="提交">
</form>

list

<title>员工列表</title>
<script>
    function goPage(currentPage){
        document.getElementById("currentPage").value=currentPage;
        document.forms[0].submit();
    }
</script>

<a href="/employee/input.do">新增</a>

<!-- 查询的表单 -->
<form action="/employee/list.do" method="post">
    <input type="hidden" name="currentPage" id="currentPage" value="1"/>
    关键字:<input type="text" name="keyword" value="${qo.keyword}"/>
    部门:<select name="deptId">
            <option value="-1">全部</option>
            <c:forEach items="${departments}" var="department">
                <option value="${department.id}" <c:if test="${qo.deptId == department.id}">selected</c:if> >${department.name}</option>
            </c:forEach>
    </select>
    <input type="submit" value="查询"/>
</form>

<table width="800px" cellpadding="0" cellspacing="0" align="center" border="1px">
    <tr>
        <td>ID</td>
        <td>名称</td>
        <td>邮箱</td>
        <td>年龄</td>
        <td>超管</td>
        <td>部门</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${pageResult.data}" var="employee">
        <tr>
            <td>${employee.id}</td>
            <td>${employee.name}</td>
            <td>${employee.email}</td>
            <td>${employee.age}</td>
            <td>${employee.admin?"是":"否"}</td>
            <td>${employee.dept.name}</td>
            <td>
                <a href="/employee/delete.do?id=${employee.id}">删除</a>
                <a href="/employee/input.do?id=${employee.id}">修改</a>
            </td>
        </tr>
    </c:forEach>
    <tr align="center">
        <td colspan="9">
            <a href="javascript:goPage(1);">首页</a>
            <a href="javascript:goPage(${pageResult.prevPage});">上一页</a>
            <a href="javascript:goPage(${pageResult.nextPage});">下一页</a>
            <a href="javascript:goPage(${pageResult.totalPage});">尾页</a>
            当前:${pageResult.currentPage}/${pageResult.totalPage}
            总条数:${pageResult.totalCount}
        </td>
    </tr>
</table>

views.jsp

标签:rms   col   reac   views   code   add   each   rip   BMI   

原文地址:https://www.cnblogs.com/zfjcool/p/14001888.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!