当前位置:首页 » 《随便一记》 » 正文

基于javaweb+jsp的机房设备管理系统_Java源码社

28 人参与  2022年04月26日 08:02  分类 : 《随便一记》  评论

点击全文阅读


基于javaweb+jsp的机房设备管理系统

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript idea eclipse MyEclipse Servlet SSM Maven …

部分代码实现JSP

        <table class="index-content-table-add">
            <tr>
                <td width="12%">机房号:</td><td><input class="index-content-table-td-add" type="text" id="jifangName" name="jifangName" value=""/></td>
            </tr>
            <tr>
                <td width="12%">容纳人数:</td><td><input class="index-content-table-td-add" type="text" id="jifangCount" name="jifangCount" value=""/></td>
            </tr>
            <tr>
                <td width="12%">介绍:</td><td><input class="index-content-table-td-add" type="text" id="jifangJieshao" name="jifangJieshao" value=""/></td>
            </tr>
            <tr>
                <td width="12%">状态:</td>
                <td>
        <br>
    </div>
    <br>
    <div class="index-content-operation">
        <button class="btn btn-line btn-rect btn-success btn-sm" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> οnclick="window.location.href='jifang_add.jsp'">添加</button>
        <div class="index-content-operation-search"><input id="search_keyword" placeholder="机房号" type="text" name="search_keyword"/><input type="hidden" id="searchColumn" name="searchColumn" value="jifang_name"/><button class="btn btn-line btn-rect btn-success btn-sm" onclick="searchList()">搜索</button></div>
    </div>
    <br>
    <table class="table table-striped table-hover table-bordered">
        <thead>
        <tr class="index-content-table-th">
            <th>机房号</th>
            <th>容纳人数</th>
            <th>介绍</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${list}" var="vo">

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>修改机房</title>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
    <div class="index-content-operation">
        <a class="info-detail">修改机房</a>
        <br>
        if (document.getElementById("jifangJieshao").value.trim().length == 0) {
            alert("介绍不能为空!");
            return false;
        }
        return true;
    }
</script>
</html>

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <title>机房详情</title>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
    <div class="index-content-operation">
        <a class="info-detail">机房详情</a>
        <br>
        <br>
    </div>
    <br>
    <form>
        <table class="index-content-table-add" style="font-size: 18px;">
            <tr>
                <td>机房号:<b>${vo.jifangName}</b></td>
            </tr>
            <tr>
                <td>容纳人数:<b>${vo.jifangCount}</b></td>
    function searchList() {
        window.location.href = "JifangServlet?action=list&searchColumn="+document.getElementById("searchColumn").value+"&keyword=" + document.getElementById("search_keyword").value;
    }
</script>
                        <input name="jifangStatus" type="radio" value="使用中"/>&nbsp;&nbsp;&nbsp;使用中&nbsp;&nbsp;&nbsp;&nbsp;
                        <input name="jifangStatus" type="radio" value="暂停使用"/>&nbsp;&nbsp;&nbsp;暂停使用&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                    <td width="12%">备注:</td><td><textarea id="jifangText" name="jifangText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......"></textarea></td>
            </tr>
        </table>
        <br>
        <br>
        <br>
        &nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-line btn-rect btn-success btn-sm">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-line btn-rect btn-primary btn-sm" onclick="javascript:history.back(-1);">取消</button>
    </form>
</div>

</body>
<script type="text/javascript">
    //提交之前进行检查,如果return false,则不允许提交
    function check() {
        <br>
        <br>
        <br>
        &nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-line btn-rect btn-success btn-sm">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-line btn-rect btn-primary btn-sm" onclick="javascript:history.back(-1);">取消</button>
    </form>
</div>

</body>
<script type="text/javascript">
    //提交之前进行检查,如果return false,则不允许提交
    function check() {
        //根据ID获取值
        if (document.getElementById("jifangName").value.trim().length == 0) {
            alert("机房号不能为空!");
            return false;
        }
        if (document.getElementById("jifangCount").value.trim().length == 0) {
            alert("容纳人数不能为空!");
            return false;
                <td>${vo.jifangName}</td>
                <td>${vo.jifangCount}</td>
                <td>${vo.jifangJieshao}</td>
                <td>${vo.jifangStatus}</td>
                <td>
                    <button class="btn btn-line btn-rect btn-primary btn-sm" style="padding: 0px 1px;" onclick="window.location.href='JifangServlet?action=get&id=${vo.id}'">详情</button>&nbsp;
                    <button class="btn btn-line btn-rect btn-danger btn-sm" style="padding: 0px 1px;"
                            <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>
                    οnclick="window.location.href='JifangServlet?action=editPre&id=${vo.id}'">编辑</button>&nbsp;
                    <button class="btn btn-line btn-rect btn-danger btn-sm" style="padding: 0px 1px;" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> οnclick="if(window.confirm('将要删除:${vo.jifangName}?'))window.location.href='JifangServlet?action=delete&id=${vo.id}'">删除</button>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/></div>
</div>
</body>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>机房管理</title>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
    <div class="index-content-operation">
        <a class="info-detail">机房管理</a>
            <tr>
                <td>介绍:<b>${vo.jifangJieshao}</b></td>
            </tr>
            <tr>
                <td>状态:
                    <b>${vo.jifangStatus}</b>
                </td>
            </tr>
            <tr>
                <td>备注:<b>${vo.jifangText}</b></td>
            </tr>
        </table>
        <br>
        <button type="button" class="btn btn-line btn-rect btn-primary btn-sm" onclick="javascript:history.back(-1);">返回</button>
    </form>
</div>
</body>
</html>

    </div>
    <br>
    <form action="JifangServlet?action=edit" method="post" onsubmit="return check()">
        <input type="hidden" id="id" name="id" value="${vo.id}"/>
        
        <table class="index-content-table-add">
            <tr>
                <td width="12%">机房号:</td><td><input class="index-content-table-td-add" type="text" id="jifangName" name="jifangName" value="${vo.jifangName}"/></td>
            </tr>
            <tr>
                <td width="12%">容纳人数:</td><td><input class="index-content-table-td-add" type="text" id="jifangCount" name="jifangCount" value="${vo.jifangCount}"/></td>
            </tr>
            <tr>
            </tr>
            <tr>
                <td width="12%">状态:</td>
                <td>
                   <input name="jifangStatus" type="radio" value="空闲" ${vo.jifangStatus=='空闲'?'checked':''}/>&nbsp;&nbsp;&nbsp;空闲&nbsp;&nbsp;&nbsp;&nbsp;
                   <input name="jifangStatus" type="radio" value="使用中" ${vo.jifangStatus=='使用中'?'checked':''}/>&nbsp;&nbsp;&nbsp;使用中&nbsp;&nbsp;&nbsp;&nbsp;
                   <input name="jifangStatus" type="radio" value="暂停使用" ${vo.jifangStatus=='暂停使用'?'checked':''}/>&nbsp;&nbsp;&nbsp;暂停使用&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td width="12%">备注:</td><td><textarea id="jifangText" name="jifangText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......">${vo.jifangText}</textarea></td>
            </tr>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>添加机房</title>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
    <div class="index-content-operation">
        <a class="info-detail">添加机房</a>
        <br>
        <br>
    </div>
    <br>
        if (document.getElementById("jifangName").value.trim().length == 0) {
            alert("机房号不能为空!");
            return false;
        }
        if (document.getElementById("jifangCount").value.trim().length == 0) {
            alert("容纳人数不能为空!");
            return false;
        }
        if (document.getElementById("jifangJieshao").value.trim().length == 0) {
            alert("介绍不能为空!");
            return false;
        }
        return true;
    }
</script>

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

idea/eclipse/MyEclipse

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript idea eclipse MyEclipse Servlet SSM Maven …

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、老师模块、机房模块、设备模块的增删改查管理

v.mp4_20211009_174703.411

v.mp4_20211009_174724.066

v.mp4_20211009_174746.898

v.mp4_20211009_174757.715

v.mp4_20211009_174801.306

document


点击全文阅读


本文链接:http://zhangshiyu.com/post/38946.html

机房  容纳  为空  
<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1