Compare commits

...

4 Commits

Author SHA1 Message Date
徐扬 8d273ec582 注释4
5 months ago
徐扬 9e55697190 注释代码3
5 months ago
徐扬 797aef41bd 注释2
5 months ago
徐扬 b0d403429e 注释
5 months ago

@ -1,16 +1,33 @@
/* 定义自定义字体 */
@font-face {
font-family: 'iconfont';
/* 定义字体的名称 */
src: url('../fonts/iconfont.eot');
/* 指定eot格式的字体文件路径 */
src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'),
/* 兼容IE的eot格式字体文件路径 */
url('../fonts/iconfont.woff') format('woff'),
/* 指定woff格式的字体文件路径 */
url('../fonts/iconfont.ttf') format('truetype'),
/* 指定ttf格式的字体文件路径 */
url('../fonts/iconfont.svg#iconfont') format('svg');
/* 指定svg格式的字体文件路径 */
}
.iconfont{
font-family:"iconfont" !important;
font-size:16px;font-style:normal;
/* 使用自定义字体的样式 */
.iconfont {
font-family: "iconfont" !important;
/* 使用定义的字体名称,并标记为重要,以确保优先级 */
font-size: 16px;
/* 设置字体大小为16像素 */
font-style: normal;
/* 设置字体样式为正常,覆盖默认的斜体样式 */
-webkit-font-smoothing: antialiased;
/* 在Webkit浏览器中开启字体平滑提高字体渲染效果 */
-webkit-text-stroke-width: 0.2px;
/* 设置文本描边的宽度,用于提高字体清晰度 */
-moz-osx-font-smoothing: grayscale;
/* 在Mac OS X系统中开启灰度平滑提高字体渲染效果 */
}

@ -1,29 +1,42 @@
/* 设置字符集为UTF-8确保页面可以正确显示中文等字符 */
@charset "utf-8";
/* 导入layui框架的CSS文件layui是一个前端UI框架 */
@import url(../lib/layui/css/layui.css);
*{
/* 全局样式重置,移除所有元素的默认外边距和内边距,并设置默认字体 */
* {
margin: 0px;
padding: 0px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a{
/* 移除所有链接的下划线 */
a {
text-decoration: none;
}
html{
/* 设置HTML元素的宽高为100%,并隐藏水平滚动条,允许垂直滚动条 */
html {
width: 100%;
height: 100%;
overflow-x:hidden;
overflow-y:auto;
overflow-x: hidden;
overflow-y: auto;
}
body{
/* 设置body元素的宽度和最小高度确保内容可以填满整个视口 */
body {
width: 100%;
min-height: 100%;
}
.x-body{
/* 容器样式,为页面内容提供内边距 */
.x-body {
padding: 20px;
}
.x-nav{
/* 导航栏样式设置内边距、相对定位、z-index、边框、行高和高度 */
.x-nav {
padding: 0 20px;
position: relative;
z-index: 99;
@ -32,395 +45,726 @@ body{
height: 39px;
overflow: hidden;
}
xblock{
/* 错误xblock应该是 .x-block块级元素样式设置显示类型、外边距、内边距、行高、边框和背景颜色 */
.x-block {
display: block;
margin-bottom: 10px;
padding: 5px;
line-height: 22px;
/* border-left: 5px solid #009688; */
/* border-left: 5px solid #009688; */ /* 注释掉的边框样式 */
border-radius: 0 2px 2px 0;
background-color: #f2f2f2;
}
.x-right{
float: right;
/* 右浮动样式,用于将元素向右浮动 */
.x-right {
float: right;
}
.x-so{
/*text-align: center;*/
/*background: #f2f2f2 url() 0 0 no-repeat;*/
/* 搜索栏样式,设置下外边距 */
.x-so {
margin-bottom: 20px;
/*text-align: center;*/ /* 注释掉的文本居中样式 */
/*background: #f2f2f2 url() 0 0 no-repeat;*/ /* 注释掉的背景样式 */
}
.x-so input.layui-input{
/* 搜索栏中的layui输入框样式设置宽度 */
.x-so input.layui-input {
width: 150px;
}
.x-so .layui-form-label{
/* 搜索栏中的layui表单标签样式设置显示类型为行内块级元素 */
.x-so .layui-form-label {
display: inline-block;
}
.x-so input.layui-input,.x-so input.layui-btn{
/* 搜索栏中的layui输入框和按钮样式设置显示类型为行内块级元素 */
.x-so input.layui-input, .x-so input.layui-btn {
display: inline-block;
}
.x-red{
/* 红色文本样式 */
.x-red {
color: red;
}
.x-a{
/* 链接文本颜色样式 */
.x-a {
color: #1AA093;
}
.x-a:hover{
/* 链接悬停时的文本颜色样式 */
.x-a:hover {
color: #127F74;
}
.x-sort{
/* 排序操作的高度样式 */
.x-sort {
height: 30px;
}
.x-show{
/* 显示操作的可点击样式 */
.x-show {
cursor: pointer;
}
.layui-form-switch{
/* layui表单开关的顶部外边距样式 */
.layui-form-switch {
margin-top: 0px;
}
/* layui输入框和文本域获得焦点时的边框颜色样式 */
.layui-input:focus, .layui-textarea:focus {
border-color: #189f92!important;
}
.page{
/* 分页容器的样式 */
.page {
margin-top: 20px;
/* 上外边距 */
text-align: center;
/* 文本居中 */
}
.page a{
/* 分页链接的样式 */
.page a {
display: inline-block;
/* 显示为行内块级元素 */
background: #fff url(#) 0 0 no-repeat;
/* 背景图片,这里没有指定图片,所以不会显示 */
color: #888;
/* 文本颜色 */
padding: 10px;
/* 内边距 */
min-width: 15px;
/* 最小宽度 */
border: 1px solid #E2E2E2;
/* 边框样式 */
}
.page span{
/* 分页数字的样式 */
.page span {
display: inline-block;
/* 显示为行内块级元素 */
padding: 10px;
/* 内边距 */
min-width: 15px;
/* 最小宽度 */
border: 1px solid #E2E2E2;
/* 边框样式 */
}
.page span.current{
/* 当前页码的样式 */
.page span.current {
display: inline-block;
/* 显示为行内块级元素 */
background: #009688 url(#) 0 0 no-repeat;
/* 背景颜色和图片 */
color: #fff;
/* 文本颜色 */
padding: 10px;
/* 内边距 */
min-width: 15px;
/* 最小宽度 */
border: 1px solid #009688;
/* 边框样式 */
}
.page .pagination li{
/* 分页器列表项的样式 */
.page .pagination li {
display: inline-block;
/* 显示为行内块级元素 */
margin-right: 5px;
/* 右外边距 */
text-align: center;
/* 文本居中 */
}
.page .pagination li.active span{
/* 激活状态下的分页器列表项的样式 */
.page .pagination li.active span {
background: #009688 url(#) 0 0 no-repeat;
/* 背景颜色和图片 */
color: #fff;
/* 文本颜色 */
border: 1px solid #009688;
/* 边框样式 */
}
/*登录样式*/
/*头部*/
.container{
/* 容器样式,通常用于页面的顶部导航 */
.container {
width: 100%;
/* 设置容器宽度为100% */
height: 45px;
/* 设置容器高度为45像素 */
background-color: #222;
/* 设置容器背景颜色为深灰色 */
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
/* 设置容器底部边框为半透明的白色 */
}
.container .logo a{
/* 容器内logo链接的样式 */
.container .logo a {
float: left;
/* 设置元素左浮动 */
color: #fff;
/* 设置文本颜色为白色 */
font-size: 18px;
/* 设置字体大小为18像素 */
padding-left: 20px;
/* 设置左侧内边距为20像素 */
line-height: 45px;
/* 设置行高为45像素与容器高度一致实现垂直居中 */
width: 200px;
/* 设置元素宽度为200像素 */
}
.container .right{
background-color:rgba(0,0,0,0);
float: right;
/* 容器右侧内容的样式 */
.container .right {
background-color: rgba(0, 0, 0, 0);
/* 设置背景颜色为透明 */
float: right;
/* 设置元素右浮动 */
}
.container .left_open{
/* 容器左侧打开按钮的样式 */
.container .left_open {
height: 45px;
/* 设置高度为45像素 */
float: left;
/* 设置元素左浮动 */
}
.container .left_open i{
/* 容器左侧打开按钮图标的样式 */
.container .left_open i {
display: block;
background: rgba(255,255,255,0.1) url(#) 0 0 no-repeat;
/* 设置为块级元素 */
background: rgba(255, 255, 255, 0.1) url(#) 0 0 no-repeat;
/* 设置背景颜色和图片,这里没有指定图片,所以不会显示 */
color: #fff;
/* 设置文本颜色为白色 */
width: 32px;
/* 设置宽度为32像素 */
height: 32px;
/* 设置高度为32像素 */
line-height: 32px;
/* 设置行高为32像素实现垂直居中 */
border-radius: 3px;
/* 设置边框圆角 */
text-align: center;
/* 设置文本居中 */
margin-top: 7px;
/* 设置顶部外边距为7像素 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.container .left_open i:hover{
background: rgba(255,255,255,0.3) url(#) 0 0 no-repeat;
/* 容器左侧打开按钮图标悬停时的样式 */
.container .left_open i:hover {
background: rgba(255, 255, 255, 0.3) url(#) 0 0 no-repeat;
/* 设置悬停时的背景颜色和图片 */
}
.container .left{
background-color:rgba(0,0,0,0);
/* 容器左侧内容的样式 */
.container .left {
background-color: rgba(0, 0, 0, 0);
/* 设置背景颜色为透明 */
float: left;
/* 设置元素左浮动 */
}
.container .layui-nav-item{
/* 容器导航项的样式 */
.container .layui-nav-item {
line-height: 45px;
/* 设置行高为45像素与容器高度一致实现垂直居中 */
}
.container .layui-nav-more{
/* 容器导航项下拉三角的样式 */
.container .layui-nav-more {
top: 20px;
/* 设置下拉三角的顶部位置 */
}
.container .layui-nav-child{
/* 容器导航子菜单的样式 */
.container .layui-nav-child {
top: 50px;
/* 设置子菜单的顶部位置 */
}
.container .layui-nav-child i{
/* 容器导航子菜单项图标的样式 */
.container .layui-nav-child i {
margin-right: 10px;
/* 设置图标右侧外边距为10像素 */
}
.layui-nav .layui-nav-item a{
/* layui导航项链接的样式 */
.layui-nav .layui-nav-item a {
color: #fff;
/* 设置文本颜色为白色 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.layui-nav .layui-nav-child a{
/* layui导航子菜单链接的样式 */
.layui-nav .layui-nav-child a {
color: #333;
/* 设置文本颜色为深灰色 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.left-nav{
/* 左侧导航栏的样式 */
.left-nav {
position: absolute;
/* 绝对定位 */
top: 46px;
/* 顶部距离为46像素 */
bottom: 42px;
/* 底部距离为42像素 */
left: 0;
/* 左侧距离为0 */
z-index: 2;
/* 设置堆叠顺序为2 */
padding-top: 10px;
/* 顶部内边距为10像素 */
background-color: #EEEEEE;
/* 设置背景颜色为浅灰色 */
width: 220px;
/* 设置宽度为220像素 */
max-width: 220px;
/* 设置最大宽度为220像素 */
overflow: auto;
overflow-x:hidden;
/* 当内容超出时显示滚动条 */
overflow-x: hidden;
/* 隐藏水平滚动条 */
border-right: 1px solid #e5e5e5;
/*width: 0px;*/
/* 设置右侧边框为浅灰色 */
}
.left-nav #nav li{
/* 左侧导航栏列表项的样式 */
.left-nav #nav li {
border-bottom: 1px solid #e5e5e5;
/* 设置底部边框为浅灰色 */
}
.left-nav #nav li:hover > a{
/*color: blue;*/
/* 左侧导航栏列表项悬停时的样式(注释掉的部分) */
.left-nav #nav li:hover > a {
/*color: blue;*/ /* 设置悬停时文本颜色为蓝色(注释掉) */
}
.left-nav #nav .current{
/* 当前激活的左侧导航栏列表项的样式 */
.left-nav #nav .current {
background-color: rgba(0, 0, 0, 0.3);
/* 设置背景颜色为半透明的黑色 */
}
.left-nav #nav li a{
/* 左侧导航栏列表项链接的样式 */
.left-nav #nav li a {
font-size: 14px;
/* 设置字体大小为14像素 */
padding: 10px 15px 10px 20px;
/* 设置内边距 */
display: block;
/* 显示为块级元素 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.left-nav #nav li a cite{
/* 左侧导航栏列表项链接的标题样式 */
.left-nav #nav li a cite {
font-size: 14px;
/* 设置字体大小为14像素 */
}
.left-nav #nav li .sub-menu{
/* 左侧导航栏子菜单的默认样式(隐藏) */
.left-nav #nav li .sub-menu {
display: none;
/* 隐藏子菜单 */
}
.left-nav #nav li .opened{
/* 左侧导航栏展开的子菜单样式 */
.left-nav #nav li .opened {
display: block;
/* 显示子菜单 */
}
.left-nav #nav li .opened:hover{
/* 左侧导航栏展开的子菜单悬停时的样式(注释掉的部分) */
.left-nav #nav li .opened:hover {
/*background: #fff url() 0 0 no-repeat;*/
/* 设置悬停时背景颜色和图片(注释掉) */
}
.left-nav #nav li .opened .current{
/* 左侧导航栏展开的子菜单中当前激活的列表项样式(未设置样式) */
/* 左侧导航栏子菜单列表项悬停时的样式(注释掉的部分) */
.left-nav #nav li .sub-menu li:hover {
/*color: blue;*/ /* 设置悬停时文本颜色为蓝色(注释掉) */
/*background: #fff url() 0 0 no-repeat;*/
/* 设置悬停时背景颜色和图片(注释掉) */
}
.left-nav #nav li .sub-menu li:hover{
/*color: blue;*/
/*background: #fff url() 0 0 no-repeat;*/
}
.left-nav #nav li .sub-menu li a{
/* 左侧导航栏子菜单列表项链接的样式 */
.left-nav #nav li .sub-menu li a {
padding: 12px 15px 12px 30px;
/* 设置内边距 */
font-size: 14px;
/* 设置字体大小为14像素 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.left-nav #nav li .sub-menu li .sub-menu li a{
/* 左侧导航栏更深层次的子菜单列表项链接的样式 */
.left-nav #nav li .sub-menu li .sub-menu li a {
padding-left: 45px;
/* 设置左侧内边距为45像素 */
}
.left-nav #nav li .sub-menu li a:hover{
/* 左侧导航栏子菜单列表项链接悬停时的样式 */
.left-nav #nav li .sub-menu li a:hover {
color: #148cf1;
/* 设置悬停时文本颜色为蓝色 */
}
.left-nav #nav li .sub-menu li a i{
/* 左侧导航栏子菜单列表项链接图标的样式 */
.left-nav #nav li .sub-menu li a i {
font-size: 12px;
/* 设置图标字体大小为12像素 */
}
.left-nav #nav li a i{
/* 左侧导航栏列表项链接图标的样式 */
.left-nav #nav li a i {
padding-right: 10px;
/* 设置图标右侧外边距为10像素 */
line-height: 14px;
/* 设置图标行高为14像素 */
}
.left-nav #nav li .nav_right{
/* 左侧导航栏列表项右侧内容的样式 */
.left-nav #nav li .nav_right {
float: right;
/* 设置内容浮动到右侧 */
font-size: 16px;
/* 设置字体大小为16像素 */
}
/* 左侧滑动按钮的样式 */
.x-slide_left {
width: 17px;
/* 设置宽度为17像素 */
height: 61px;
/* 设置高度为61像素 */
background: url(#) 0 0 no-repeat;
/* 设置背景图片,目前为空 */
position: absolute;
/* 绝对定位 */
top: 200px;
/* 顶部距离为200像素 */
left: 221px;
/* 左侧距离为221像素 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
z-index: 3;
/* 设置堆叠顺序为3 */
}
.page-content{
/* 页面内容的样式 */
.page-content {
position: absolute;
/* 绝对定位 */
top: 46px;
/* 顶部距离为46像素 */
right: 0;
/* 右侧距离为0 */
bottom: 42px;
/* 底部距离为42像素 */
left: 221px;
/* 左侧距离为221像素 */
overflow: hidden;
/* 隐藏溢出的内容 */
z-index: 1;
/* 设置堆叠顺序为1 */
}
.page-content-bg{
/* 页面内容背景的样式 */
.page-content-bg {
position: absolute;
/* 绝对定位 */
top: 46px;
/* 顶部距离为46像素 */
right: 0;
/* 右侧距离为0 */
bottom: 42px;
/* 底部距离为42像素 */
left: 221px;
background: rgba(0,0,0,0.5); url() 0 0 no-repeat;
/* 左侧距离为221像素 */
background: rgba(0,0,0,0.5);
/* 设置半透明的黑色背景 */
url() 0 0 no-repeat;
/* 设置背景图片,目前为空 */
overflow: hidden;
/* 隐藏溢出的内容 */
z-index: 100;
/* 设置堆叠顺序为100 */
display: none;
/* 默认不显示 */
}
.page-content .tab{
/* 页面内容中标签页的样式 */
.page-content .tab {
height: 100%;
/* 设置高度为100% */
width: 100%;
/* 设置宽度为100% */
background: #EFEEF0 url(#) 0 0 no-repeat;
/* 设置背景颜色和图片,目前为空 */
margin: 0px;
/* 移除默认外边距 */
}
.page-content .layui-tab-title{
/* 页面内容中标签页标题的样式 */
.page-content .layui-tab-title {
/*padding-top: 5px;*/
/* 注释掉的顶部内边距 */
height: 35px;
/* 设置高度为35像素 */
background: #EFEEF0 url(#) 0 0 no-repeat;
/* 设置背景颜色和图片,目前为空 */
position: relative;
/* 相对定位 */
z-index: 100;
/* 设置堆叠顺序为100 */
}
.page-content .layui-tab-title li.home i{
/* 页面内容中标签页标题的首页图标样式 */
.page-content .layui-tab-title li.home i {
padding-right: 5px;
/* 设置图标右侧外边距为5像素 */
}
.page-content .layui-tab-title li.home .layui-tab-close{
/* 页面内容中标签页标题的首页关闭按钮样式 */
.page-content .layui-tab-title li.home .layui-tab-close {
display: none;
/* 不显示关闭按钮 */
}
.page-content .layui-tab-title li{
/* 页面内容中标签页标题列表项的样式 */
.page-content .layui-tab-title li {
line-height: 35px;
/* 设置行高为35像素确保文本垂直居中 */
}
.page-content .layui-tab-title .layui-this:after{
/* 页面内容中当前激活标签页标题的下划线样式 */
.page-content .layui-tab-title .layui-this:after {
height: 36px;
/* 设置下划线高度为36像素 */
}
.page-content .layui-tab-title li .layui-tab-close{
/* 页面内容中标签页标题的关闭按钮样式 */
.page-content .layui-tab-title li .layui-tab-close {
border-radius: 50%;
/* 设置关闭按钮为圆形 */
}
.page-content .layui-tab-title .layui-this{
/* 页面内容中当前激活标签页标题的样式 */
.page-content .layui-tab-title .layui-this {
background: #fff url(#) 0 0 no-repeat;
/* 设置背景颜色和图片,目前为空 */
}
.page-content .layui-tab-bar{
height:34px;
/* 页面内容中标签页标题的水平滚动条样式 */
.page-content .layui-tab-bar {
height: 34px;
/* 设置高度为34像素 */
line-height: 35px;
/* 设置行高为35像素确保滚动条垂直居中 */
}
.page-content .layui-tab-content{
/* 页面内容中标签页内容的样式 */
.page-content .layui-tab-content {
position: absolute;
/* 绝对定位 */
top: 36px;
/* 顶部距离为36像素 */
bottom: 0px;
/* 底部距离为0像素 */
width: 100%;
/* 宽度为100% */
background: #fff url(#) 0 0 no-repeat;
/* 设置背景颜色和图片,目前为空 */
padding: 0px;
/* 移除内边距 */
overflow: hidden;
/* 隐藏溢出的内容 */
}
.page-content .layui-tab-content .layui-tab-item{
/* 页面内容中单个标签页项的样式 */
.page-content .layui-tab-content .layui-tab-item {
width: 100%;
/* 宽度为100% */
height: 100%;
/* 高度为100% */
}
.page-content .layui-tab-content .layui-tab-item iframe{
/* 页面内容中单个标签页项内iframe的样式 */
.page-content .layui-tab-content .layui-tab-item iframe {
width: 100%;
/* 宽度为100% */
height: 100%;
/* 高度为100% */
}
.x-admin-carousel,.layui-carousel,.x-admin-carousel>[carousel-item]>* {
background-color:#fff
/* 设置轮播图及其子项的背景颜色 */
.x-admin-carousel, .layui-carousel, .x-admin-carousel>[carousel-item]>* {
background-color: #fff;
/* 白色背景 */
}
/* 设置后台管理面板中待办事项的样式 */
.x-admin-backlog .x-admin-backlog-body {
display:block;
padding:10px 15px;
background-color:#f8f8f8;
color:#999;
border-radius:2px;
transition:all .3s;
-webkit-transition:all .3s
display: block;
/* 块级显示 */
padding: 10px 15px;
/* 内边距 */
background-color: #f8f8f8;
/* 浅灰色背景 */
color: #999;
/* 深灰色文本 */
border-radius: 2px;
/* 边框圆角 */
transition: all .3s;
/* 过渡效果所有属性变化在0.3秒内完成 */
-webkit-transition: all .3s;
/* 兼容旧版Webkit浏览器所有属性变化在0.3秒内完成 */
}
/* 待办事项标题样式 */
.x-admin-backlog-body h3 {
padding-bottom:10px;
font-size:12px
padding-bottom: 10px;
/* 底部内边距 */
font-size: 12px;
/* 字体大小 */
}
/* 待办事项数字样式 */
.x-admin-backlog-body p cite {
font-style:normal;
font-size:30px;
font-weight:300;
color:#009688
font-style: normal;
/* 正常字体样式 */
font-size: 30px;
/* 字体大小 */
font-weight: 300;
/* 字体粗细 */
color: #009688;
/* 绿色文本 */
}
/* 待办事项鼠标悬停时的样式 */
.x-admin-backlog-body:hover {
background-color:#CFCFCF;
color:#888
background-color: #CFCFCF;
/* 悬停时背景颜色 */
color: #888;
/* 悬停时文本颜色 */
}
/* 页脚样式 */
.welcome-footer {
padding: 30px 0;
/* 顶部和底部内边距 */
line-height: 30px;
/* 行高 */
text-align: center;
/* 文本居中 */
background-color: #eee;
/* 浅灰色背景 */
color: #666;
/* 深灰色文本 */
font-weight: 300;
/* 字体粗细 */
}
.welcome-footer{padding: 30px 0; line-height: 30px; text-align: center; background-color: #eee; color: #666; font-weight: 300;}
body .layui-layout-admin .footer-demo{height: auto; padding: 15px 0; line-height: 26px;}
.welcome-footer a{padding: 0 5px;}
/* 后台管理布局页脚的样式 */
body .layui-layout-admin .footer-demo {
height: auto;
/* 高度自适应 */
padding: 15px 0;
/* 顶部和底部内边距 */
line-height: 26px;
/* 行高 */
}
/* 页脚链接样式 */
.welcome-footer a {
padding: 0 5px;
/* 左右内边距 */
}
/* 表格单元格样式,确保内容不会超出单元格 */
table th, table td {
word-break: break-all;
/* 允许在单词内部进行断行 */
}
.footer{
/* 页脚样式 */
.footer {
position: fixed;
/* 固定定位,相对于视口 */
bottom: 0px;
/* 距离视口底部0像素 */
width: 100%;
/* 宽度为100% */
background-color: #222;
/* 深灰色背景 */
border-top: 1px solid rgba(255, 255, 255, 0.2);
/* 上边框为半透明白色 */
line-height: 41px;
/* 行高为41像素 */
color: #fff;
/* 文本颜色为白色 */
/*padding-left: 10px;*/
/* 左侧内边距,已注释掉 */
}
.footer .copyright{
.footer .copyright {
margin-left: 10px;
/* 左侧外边距为10像素 */
}
@media screen and (max-width: 768px){
.fast-add{
/* 响应式设计针对屏幕宽度小于或等于768像素的设备 */
@media screen and (max-width: 768px) {
.fast-add {
display: none;
/* 隐藏快速添加按钮 */
}
.layui-nav .to-index{
.layui-nav .to-index {
display: none;
/* 隐藏返回首页的导航项 */
}
.container .logo a{
.container .logo a {
width: 140px;
/* 调整logo宽度 */
}
.container .left_open {
/*float: right;*/
/*float: right;*/ /* 已注释掉,可能用于调整左侧菜单按钮位置 */
}
.left-nav{
.left-nav {
left: -221px;
/* 将左侧导航栏隐藏在视口左侧 */
}
.page-content{
.page-content {
left: 0px;
/* 将页面内容区域左对齐 */
}
.page-content .layui-tab-content .layui-tab-item{
.page-content .layui-tab-content .layui-tab-item {
-webkit-overflow-scrolling: touch;
/* 在iOS设备上启用硬件加速滚动 */
overflow-y: scroll;
/* 启用垂直滚动条 */
}
.x-so input.layui-input{
.x-so input.layui-input {
width: 100%;
/* 搜索输入框宽度为100% */
margin: 10px;
/* 搜索输入框的外边距 */
}
}

@ -1,16 +1,40 @@
/**
* 'iconfont'
* 使@font-face线
*/
@font-face {
font-family: 'iconfont';
/* 定义字体家族的名称 */
src: url('../fonts/iconfont.eot');
/* 指定eot格式的字体文件路径 */
src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'),
/* 为IE浏览器指定eot格式的字体文件路径并包含iefix以处理旧版IE的兼容性问题 */
url('../fonts/iconfont.woff') format('woff'),
/* 指定woff格式的字体文件路径 */
url('../fonts/iconfont.ttf') format('truetype'),
/* 指定ttf格式的字体文件路径 */
url('../fonts/iconfont.svg#iconfont') format('svg');
/* 指定svg格式的字体文件路径并使用#iconfont来指定字体ID */
}
.iconfont{
font-family:"iconfont" !important;
font-size:16px;font-style:normal;
/**
* 使'iconfont'
* HTML使
*/
.iconfont {
font-family: "iconfont" !important;
/* 强制使用'iconfont'字体家族 */
font-size: 16px;
/* 设置字体大小 */
font-style: normal;
/* 设置字体样式为正常 */
/* 以下属性用于优化字体渲染,提高在不同浏览器和操作系统上的显示效果 */
-webkit-font-smoothing: antialiased;
/* 在Webkit浏览器上开启字体平滑以减少锯齿 */
-webkit-text-stroke-width: 0.2px;
/* 设置文本描边的宽度,以增强字体的清晰度 */
-moz-osx-font-smoothing: grayscale;
/* 在Mac OS X系统上的Firefox浏览器上开启灰度平滑以减少字体渲染的锯齿 */
}

@ -1,66 +1,438 @@
@charset "utf-8";
/* CSS Document */
*{font-size:9pt;border:0;margin:0;padding:0;}
body{font-family:'微软雅黑'; margin:0 auto;min-width:980px;}
ul{display:block;margin:0;padding:0;list-style:none;}
li{display:block;margin:0;padding:0;list-style: none;}
img{border:0;}
dl,dt,dd,span{margin:0;padding:0;display:block;}
a,a:focus{text-decoration:none;color:#000;outline:none;blr:expression(this.onFocus=this.blur());}
a:hover{color:#00a4ac;text-decoration:none;}
table{border-collapse:collapse;border-spacing: 0;}
cite{font-style:normal;}
h2{font-weight:normal;}
/**
* CSSUTF-8
*/
@charset "utf-8";
/**
*
* HTML
*/
* {
font-size: 9pt; /* 设置所有元素的字体大小为9pt */
border: 0; /* 移除所有元素的边框 */
margin: 0; /* 移除所有元素的外边距 */
padding: 0; /* 移除所有元素的内边距 */
}
/**
* body
*/
body {
font-family: '微软雅黑'; /* 设置body的字体为微软雅黑 */
margin: 0 auto; /* 水平居中body元素 */
min-width: 980px; /* 设置body的最小宽度为980px */
}
/**
* ul
*/
ul {
display: block; /* 将ul设置为块级元素 */
margin: 0; /* 移除ul的外边距 */
padding: 0; /* 移除ul的内边距 */
list-style: none; /* 移除ul的项目符号 */
}
/**
* li
*/
li {
display: block; /* 将li设置为块级元素 */
margin: 0; /* 移除li的外边距 */
padding: 0; /* 移除li的内边距 */
list-style: none; /* 移除li的项目符号 */
}
/**
* img
*/
img {
border: 0; /* 移除图片的边框 */
}
/**
* dldtddspan
*/
dl, dt, dd, span {
margin: 0; /* 移除这些元素的外边距 */
padding: 0; /* 移除这些元素的内边距 */
display: block; /* 将这些元素设置为块级元素 */
}
/**
* a
*/
a, a:focus {
text-decoration: none; /* 移除链接的下划线 */
color: #000; /* 设置链接的颜色为黑色 */
outline: none; /* 移除聚焦时的轮廓线 */
blr: expression(this.onFocus=this.blur()); /* IE浏览器中移除聚焦时的虚线框 */
}
/**
* a
*/
a:hover {
color: #00a4ac; /* 鼠标悬停时改变链接颜色为#00a4ac */
text-decoration: none; /* 鼠标悬停时保持无下划线 */
}
/**
* table
*/
table {
border-collapse: collapse; /* 合并表格边框 */
border-spacing: 0; /* 移除表格边框间隔 */
}
/**
* cite
*/
cite {
font-style: normal; /* 将引用的字体样式设置为正常 */
}
/**
* h2
*/
h2 {
font-weight: normal; /* 将h2的字体粗细设置为正常 */
}
/*cloud*/
#mainBody {width:100%;height:100%;position:absolute;z-index:-1;}
.cloud {position:absolute;top:0px;left:0px;width:100%;height:100%;background:url(../images/cloud.png) no-repeat;z-index:1;opacity:0.5;}
#cloud2 {z-index:2;}
/**
* mainBody
*/
#mainBody {
width: 100%; /* 容器宽度占满整个视口 */
height: 100%; /* 容器高度占满整个视口 */
position: absolute; /* 容器定位方式为绝对定位 */
z-index: -1; /* 容器的堆叠顺序,-1表示在大多数元素下方 */
}
/**
*
*/
.cloud {
position: absolute; /* 定位方式为绝对定位 */
top: 0px; /* 距离顶部0像素 */
left: 0px; /* 距离左侧0像素 */
width: 100%; /* 宽度占满整个视口 */
height: 100%; /* 高度占满整个视口 */
background: url(../images/cloud.png) no-repeat; /* 设置背景图片,不重复 */
z-index: 1; /* 堆叠顺序为1表示在mainBody之上 */
opacity: 0.5; /* 设置透明度为50% */
}
/**
*
*/
#cloud2 {
z-index: 2; /* 堆叠顺序为2表示在#cloud之上 */
}
/*login*/
.logintop{height:47px; position:absolute; top:0; background:url(../images/loginbg1.png) repeat-x;z-index:100; width:100%;}
.logintop span{color:#fff; line-height:47px; background:url(../images/loginsj.png) no-repeat 21px 18px; text-indent:44px; color:#afc5d2; float:left;}
.logintop ul{float:right; padding-right:30px;}
.logintop ul li{float:left; margin-left:20px; line-height:47px;}
.logintop ul li a{color:#afc5d2;}
.logintop ul li a:hover{color:#fff;}
.loginbody{background:url(../images/loginbg3.png) no-repeat center center; width:100%; height:585px; overflow:hidden; position:absolute; top:47px;}
.systemlogo{background:url(../images/loginlogo.png) no-repeat center;width:100%; height:71px; margin-top:75px;}
.loginbox{width:692px; height:336px; background:url(../images/logininfo.png) no-repeat; margin-top:30px;}
.loginbox ul{margin-top:88px; margin-left:285px;}
.loginbox ul li{margin-bottom:25px;}
.loginbox ul li label{color:#687f92; padding-left:25px;}
.loginbox ul li label a{color:#687f92;}
.loginbox ul li label a:hover{color:#3d96c9;}
.loginbox ul li label input{margin-right:5px;}
.loginbox,.loginbox1,.loginbox2,.loginbox3,.loginbox4{width:692px; height:373px;margin-top:30px;}
.loginuser{width:299px; height:48px; background:url(../images/loginuser.png) no-repeat; border:none; line-height:48px; padding-left:44px; font-size:14px; font-weight:bold;}
.loginpwd{width:299px; height:48px; background:url(../images/loginpassword.png) no-repeat; border:none;line-height:48px; padding-left:44px; font-size:14px; color:#90a2bc;}
.loginbtn{width:111px;height:35px; background:url(../images/buttonbg.png) repeat-x; font-size:14px; font-weight:bold; color:#fff;cursor:pointer; line-height:35px;}
.loginbm{height:50px; line-height:50px; text-align:center; background:url(../images/loginbg2.png) repeat-x;position:absolute; bottom:0; width:100%; color:#0b3a58;}
.loginbm a{font-weight:bold;color:#0b3a58;}
.loginbm a:hover{color:#fff;}
.loginbox1{background:url(../images/logininfo1.png) no-repeat;}
.loginbox1 ul li{margin-bottom:16px;}
.loginbox2{background:url(../images/logininfo2.png) no-repeat;}
.loginbox2 ul li{margin-bottom:16px;}
.loginbox3{background:url(../images/logininfo3.png) no-repeat;}
.loginbox3 ul li{margin-bottom:16px;}
.yzm{width:341px; height:46px; background:url(../images/yzmbg.png) no-repeat; padding-bottom:5px;}
.yzm span{display:block; float:left;width:227px; height:46px;}
.yzm span input{background:none; border:none; width:183px; height:46px; line-height:46px;padding-left:44px;font-size:14px; color:#cee4f1;}
.yzm cite{float:right; width:114px; height:46px; line-height:46px; font-size:18px; color:#fff; text-align:center;}
.loginbody1{background:url(../images/loginbg4.png) no-repeat center center; width:100%; height:585px; overflow:hidden; position:absolute; top:47px;}
.systemlogo{width:100%; height:71px; margin-top:120px; text-align:center;}
.loginbox0{width:810px;margin-top:0px;height:252px;}
.loginlist{width:810px; overflow:hidden;}
.loginlist{margin-top:110px;}
.loginlist li{float:left; margin-left:3px; margin-right:3px;}
.loginlist li a{ display:block;width:196px; height:252px; background:url(../images/lbg.png) no-repeat; text-align:center; padding-top:25px; cursor:pointer;}
.loginlist li a:hover{background:url(../images/lbg1.png) no-repeat;}
.loginlist li a p{font-size:16px; color:#fff; padding-top:10px;}
/* 定义登录页面的顶部样式 */
.logintop {
height: 47px; /* 高度为47像素 */
position: absolute; /* 定位方式为绝对定位 */
top: 0; /* 距离顶部0像素 */
background: url(../images/loginbg1.png) repeat-x; /* 设置背景图片,水平重复 */
z-index: 100; /* 堆叠顺序为100确保在最上方 */
width: 100%; /* 宽度占满整个视口 */
}
/* 定义.logintop内的span元素样式 */
.logintop span {
color: #fff; /* 文字颜色为白色 */
line-height: 47px; /* 行高与.logintop高度相同实现垂直居中 */
background: url(../images/loginsj.png) no-repeat 21px 18px; /* 设置背景图片,不重复,并定位 */
text-indent: 44px; /* 文本缩进,为背景图片留出空间 */
color: #afc5d2; /* 文字颜色为浅蓝色 */
float: left; /* 向左浮动 */
}
/* 定义.logintop内的ul元素样式 */
.logintop ul {
float: right; /* 向右浮动 */
padding-right: 30px; /* 右侧内边距为30像素 */
}
/* 定义.logintop内的li元素样式 */
.logintop ul li {
float: left; /* 向左浮动 */
margin-left: 20px; /* 左侧外边距为20像素 */
line-height: 47px; /* 行高与.logintop高度相同实现垂直居中 */
}
/* 定义.logintop内的a元素样式 */
.logintop ul li a {
color: #afc5d2; /* 文字颜色为浅蓝色 */
}
/* 定义.logintop内的a元素鼠标悬停时的样式 */
.logintop ul li a:hover {
color: #fff; /* 文字颜色变为白色 */
}
/* 定义登录页面的主体样式 */
.loginbody {
background: url(../images/loginbg3.png) no-repeat center center; /* 设置背景图片,不重复,并居中 */
width: 100%; /* 宽度占满整个视口 */
height: 585px; /* 高度为585像素 */
overflow: hidden; /* 隐藏溢出的内容 */
position: absolute; /* 定位方式为绝对定位 */
top: 47px; /* 距离顶部47像素与.logintop高度相同 */
}
/* 定义系统logo样式 */
.systemlogo {
background: url(../images/loginlogo.png) no-repeat center; /* 设置背景图片,不重复,并居中 */
width: 100%; /* 宽度占满整个视口 */
height: 71px; /* 高度为71像素 */
margin-top: 75px; /* 上外边距为75像素 */
}
/* 定义登录框基础样式 */
.loginbox {
width: 692px; /* 宽度为692像素 */
height: 336px; /* 高度为336像素 */
background: url(../images/logininfo.png) no-repeat; /* 设置背景图片,不重复 */
margin-top: 30px; /* 上外边距为30像素 */
}
/* 定义.loginbox内的ul元素样式 */
.loginbox ul {
margin-top: 88px; /* 上外边距为88像素 */
margin-left: 285px; /* 左外边距为285像素 */
}
/* 定义.loginbox内的li元素样式 */
.loginbox ul li {
margin-bottom: 25px; /* 底部外边距为25像素 */
}
/* 定义.loginbox内的label元素样式 */
.loginbox ul li label {
color: #687f92; /* 文字颜色为深蓝色 */
padding-left: 25px; /* 左内边距为25像素 */
}
/* 定义.loginbox内的label内的a元素样式 */
.loginbox ul li label a {
color: #687f92; /* 文字颜色为深蓝色 */
}
/* 定义.loginbox内的label内的a元素鼠标悬停时的样式 */
.loginbox ul li label a:hover {
color: #3d96c9; /* 文字颜色变为浅蓝色 */
}
/* 定义.loginbox内的input元素样式 */
.loginbox ul li label input {
margin-right: 5px; /* 右外边距为5像素 */
}
/* 定义.loginbox, .loginbox1, .loginbox2, .loginbox3, .loginbox4共有的样式 */
.loginbox, .loginbox1, .loginbox2, .loginbox3, .loginbox4 {
width: 692px; /* 设置宽度为692像素 */
height: 373px; /* 设置高度为373像素 */
margin-top: 30px; /* 设置顶部外边距为30像素 */
}
/* 定义输入用户名的输入框样式 */
.loginuser {
width: 299px; /* 设置宽度为299像素 */
height: 48px; /* 设置高度为48像素 */
background: url(../images/loginuser.png) no-repeat; /* 设置背景图片,不重复 */
border: none; /* 去除边框 */
line-height: 48px; /* 设置行高与高度相同,实现垂直居中 */
padding-left: 44px; /* 设置左侧内边距为44像素为背景图片留出空间 */
font-size: 14px; /* 设置字体大小为14像素 */
font-weight: bold; /* 设置字体加粗 */
}
/* 定义输入密码的输入框样式 */
.loginpwd {
width: 299px; /* 设置宽度为299像素 */
height: 48px; /* 设置高度为48像素 */
background: url(../images/loginpassword.png) no-repeat; /* 设置背景图片,不重复 */
border: none; /* 去除边框 */
line-height: 48px; /* 设置行高与高度相同,实现垂直居中 */
padding-left: 44px; /* 设置左侧内边距为44像素为背景图片留出空间 */
font-size: 14px; /* 设置字体大小为14像素 */
color: #90a2bc; /* 设置字体颜色为浅蓝色 */
}
/* 定义登录按钮样式 */
.loginbtn {
width: 111px; /* 设置宽度为111像素 */
height: 35px; /* 设置高度为35像素 */
background: url(../images/buttonbg.png) repeat-x; /* 设置背景图片,水平重复 */
font-size: 14px; /* 设置字体大小为14像素 */
font-weight: bold; /* 设置字体加粗 */
color: #fff; /* 设置字体颜色为白色 */
cursor: pointer; /* 设置鼠标样式为指针,表示可点击 */
line-height: 35px; /* 设置行高与高度相同,实现垂直居中 */
}
/* 定义页面底部样式 */
.loginbm {
height: 50px; /* 设置高度为50像素 */
line-height: 50px; /* 设置行高与高度相同,实现垂直居中 */
text-align: center; /* 设置文本居中对齐 */
background: url(../images/loginbg2.png) repeat-x; /* 设置背景图片,水平重复 */
position: absolute; /* 定位方式为绝对定位 */
bottom: 0; /* 距离底部0像素 */
width: 100%; /* 宽度占满整个视口 */
color: #0b3a58; /* 设置字体颜色为深蓝色 */
}
/* 定义.loginbm内的a元素样式 */
.loginbm a {
font-weight: bold; /* 设置字体加粗 */
color: #0b3a58; /* 设置字体颜色为深蓝色 */
}
/* 定义.loginbm内的a元素鼠标悬停时的样式 */
.loginbm a:hover {
color: #fff; /* 设置字体颜色为白色 */
}
/* 定义.loginbox1的样式 */
.loginbox1 {
background: url(../images/logininfo1.png) no-repeat; /* 设置背景图片,不重复 */
}
/* 定义.loginbox1中ul元素下的li元素的样式 */
.loginbox1 ul li {
margin-bottom: 16px; /* 设置底部外边距为16像素为列表项之间提供间隔 */
}
/* 定义.loginbox2的样式 */
.loginbox2 {
background: url(../images/logininfo2.png) no-repeat; /* 设置背景图片,不重复 */
}
/* 定义.loginbox2中ul元素下的li元素的样式 */
.loginbox2 ul li {
margin-bottom: 16px; /* 设置底部外边距为16像素为列表项之间提供间隔 */
}
/* 定义.loginbox3的样式 */
.loginbox3 {
background: url(../images/logininfo3.png) no-repeat; /* 设置背景图片,不重复 */
}
/* 定义.loginbox3中ul元素下的li元素的样式 */
.loginbox3 ul li {
margin-bottom: 16px; /* 设置底部外边距为16像素为列表项之间提供间隔 */
}
/* 定义验证码输入框容器的样式 */
.yzm {
width: 341px; /* 设置宽度为341像素 */
height: 46px; /* 设置高度为46像素 */
background: url(../images/yzmbg.png) no-repeat; /* 设置背景图片,不重复 */
padding-bottom: 5px; /* 设置底部内边距为5像素 */
}
/* 定义验证码输入框内部span元素的样式 */
.yzm span {
display: block; /* 将span元素设置为块级元素 */
float: left; /* 使span元素左浮动 */
width: 227px; /* 设置宽度为227像素 */
height: 46px; /* 设置高度为46像素 */
}
/* 定义验证码输入框内部input元素的样式 */
.yzm span input {
background: none; /* 移除背景 */
border: none; /* 移除边框 */
width: 183px; /* 设置宽度为183像素 */
height: 46px; /* 设置高度为46像素 */
line-height: 46px; /* 设置行高为46像素使文本垂直居中 */
padding-left: 44px; /* 设置左侧内边距为44像素为输入文本提供空间 */
font-size: 14px; /* 设置字体大小为14像素 */
color: #cee4f1; /* 设置字体颜色为浅蓝色 */
}
/* 定义验证码显示区域cite元素的样式 */
.yzm cite {
float: right; /* 使cite元素右浮动 */
width: 114px; /* 设置宽度为114像素 */
height: 46px; /* 设置高度为46像素 */
line-height: 46px; /* 设置行高为46像素使文本垂直居中 */
font-size: 18px; /* 设置字体大小为18像素 */
color: #fff; /* 设置字体颜色为白色 */
text-align: center; /* 设置文本居中对齐 */
}
/* 定义登录页面的主体样式,背景图片居中且不重复 */
.loginbody1 {
background: url(../images/loginbg4.png) no-repeat center center; /* 设置背景图片,不重复,并使其水平和垂直居中 */
width: 100%; /* 设置宽度为100% */
height: 585px; /* 设置高度为585像素 */
overflow: hidden; /* 隐藏超出容器的内容 */
position: absolute; /* 定位方式为绝对定位 */
top: 47px; /* 距离顶部47像素 */
}
/* 定义系统logo的样式 */
.systemlogo {
width: 100%; /* 设置宽度为100% */
height: 71px; /* 设置高度为71像素 */
margin-top: 120px; /* 设置顶部外边距为120像素 */
text-align: center; /* 设置文本居中对齐 */
}
/* 定义登录框的样式 */
.loginbox0 {
width: 810px; /* 设置宽度为810像素 */
margin-top: 0px; /* 设置顶部外边距为0像素 */
height: 252px; /* 设置高度为252像素 */
}
/* 定义登录列表的样式 */
.loginlist {
width: 810px; /* 设置宽度为810像素 */
overflow: hidden; /* 隐藏超出容器的内容 */
}
/* 定义登录列表的顶部外边距 */
.loginlist {
margin-top: 110px; /* 设置顶部外边距为110像素 */
}
/* 定义登录列表中列表项的样式 */
.loginlist li {
float: left; /* 使列表项左浮动,以便水平排列 */
margin-left: 3px; /* 设置左侧外边距为3像素为列表项之间提供间隔 */
margin-right: 3px; /* 设置右侧外边距为3像素为列表项之间提供间隔 */
}
/* 定义登录列表中列表项内链接的样式 */
.loginlist li a {
display: block; /* 将链接设置为块级元素,使其可以设置宽高 */
width: 196px; /* 设置链接的宽度为196像素 */
height: 252px; /* 设置链接的高度为252像素 */
background: url(../images/lbg.png) no-repeat; /* 设置背景图片,不重复 */
text-align: center; /* 设置文本居中对齐 */
padding-top: 25px; /* 设置顶部内边距为25像素为内容提供空间 */
cursor: pointer; /* 设置鼠标悬停时为手形指针 */
}
/* 定义登录列表中列表项内链接鼠标悬停时的样式 */
.loginlist li a:hover {
background: url(../images/lbg1.png) no-repeat; /* 当鼠标悬停时,改变背景图片 */
}
/* 定义登录列表中列表项内链接中的段落样式 */
.loginlist li a p {
font-size: 16px; /* 设置字体大小为16像素 */
color: #fff; /* 设置字体颜色为白色 */
padding-top: 10px; /* 设置顶部内边距为10像素为段落内容提供空间 */
}

@ -1,54 +1,103 @@
/*分页按钮样式*/
.page-go-form{
/* 分页按钮容器的样式 */
.page-go-form {
float: right;
/* 使分页表单容器右浮动,以便靠右显示 */
margin-right: 40px;
/* 设置右侧外边距为40像素与页面其他内容保持距离 */
width: 200px;
/* 设置容器的宽度为200像素 */
}
.page-bar{
/* 分页导航条的样式 */
.page-bar {
width: 600px;
/* 设置分页导航条的宽度为600像素 */
height: 30px;
/* 设置分页导航条的高度为30像素 */
float: right;
/* 使分页导航条右浮动,以便靠右显示 */
}
.page-num-ul{
/* 分页数字列表的样式 */
.page-num-ul {
width: 250px;
/* 设置列表的宽度为250像素 */
height: 30px;
/* 设置列表的高度为30像素 */
padding-left: 100px;
/* 设置左侧内边距为100像素为列表内容提供空间 */
float: left;
/* 使列表左浮动,以便在分页导航条中水平排列 */
font-size: 14px;
/* 设置列表中文字的字体大小为14像素 */
}
.pg_a{
/* 分页链接的基础样式 */
.pg_a {
margin: 0 5px;
/* 设置链接的左右外边距为5像素为链接之间提供间隔 */
}
.pg_a:hover{
/* 分页链接鼠标悬停时的样式 */
.pg_a:hover {
color: #00a4ac;
/* 设置鼠标悬停时链接文字的颜色为特定的蓝色 */
margin: 0 5px;
/* 保持链接的左右外边距不变 */
}
#inputPage{
/* 输入页码框的样式 */
#inputPage {
width: 50px;
/* 设置输入框的宽度为50像素 */
}
.page-btn{
/* 分页按钮的基础样式 */
.page-btn {
margin: 0 3px;
/* 设置按钮的左右外边距为3像素为按钮之间提供间隔 */
width: 50px;
/* 设置按钮的宽度为50像素 */
cursor: pointer;
/* 设置鼠标悬停在按钮上时的光标为指针形状 */
color: #ffffff;
/* 设置按钮文字的颜色为白色 */
background-color: #009688;
/* 设置按钮的背景颜色为特定的绿色 */
}
.page-btn:hover{
/* 分页按钮鼠标悬停时的样式 */
.page-btn:hover {
opacity: 0.7;
/* 设置鼠标悬停时按钮的不透明度为0.7,使其看起来更轻 */
cursor: pointer;
/* 保持鼠标悬停时光标为指针形状 */
background-color: #009688;
/* 保持按钮的背景颜色不变 */
}
#f_auto{
/* 容器居中样式 */
#f_auto {
margin: 0 auto;
/* 水平居中容器 */
margin-top: 40px;
/* 容器顶部外边距为40像素 */
width: 400px;
/* 容器宽度为400像素 */
}
#btn_on{
/* 按钮居左样式 */
#btn_on {
width: 260px;
/* 按钮宽度为260像素 */
margin-left: 45px;
/* 按钮左侧外边距为45像素 */
}
.f_sp{
/* 字符间距样式 */
.f_sp {
letter-spacing: 16px;
/* 设置字符间距为16像素 */
}

@ -1,118 +1,203 @@
*{
/* 全局样式重置 */
* {
margin: 0;
/* 移除所有元素的内边距和外边距 */
padding: 0;
/* 移除所有元素的内边距和外边距 */
}
.header{
background: url("../images/bti.jpg")no-repeat;
/* 头部样式 */
.header {
background: url("../images/bti.jpg") no-repeat;
/* 设置背景图片,不重复 */
width: 100%;
/* 设置宽度为100% */
height: 200px;
/* 设置高度为200像素 */
}
.body{
/* 主体样式 */
.body {
background: url("../images/timg-1.jpg");
/* 设置背景图片 */
width: 100%;
/* 设置宽度为100% */
height: 650px;
/* 设置高度为650像素 */
margin-top: -100px;
/* 设置顶部外边距为-100像素可能用于与头部重叠效果 */
}
.panel{
/* 面板样式 */
.panel {
width: 350px;
/* 设置面板宽度为350像素 */
height: 420px;
/* 设置面板高度为420像素 */
position: relative;
/* 设置定位方式为相对定位 */
left: 800px;
/* 设置面板相对于其正常位置的左侧偏移量为800像素 */
top: 60px;
background-color: #FFFFFF;
/* 设置面板相对于其正常位置的顶部偏移量为60像素 */
background-color: #FFFFFF;
/* 设置面板背景颜色为白色 */
border: 1px solid #dff0d8;
/* 设置面板边框为1像素实线颜色为#dff0d8 */
}
.top{
height:60px;
border-bottom:1px solid #dff0d8;
/* 面板顶部样式 */
.top {
height: 60px;
/* 设置顶部区域高度为60像素 */
border-bottom: 1px solid #dff0d8;
/* 设置底部边框为1像素实线颜色为#dff0d8 */
}
.top>p{
/* 面板顶部段落样式 */
.top>p {
text-align: center;
/* 设置段落文本居中对齐 */
padding-top: 15px;
/* 设置段落顶部内边距为15像素 */
/*margin: 20px 0;*/
/* 这行注释掉了,如果需要可以取消注释来设置段落的外边距 */
font-size: 25px;
/* 设置段落字体大小为25像素 */
color: #f57421;
/* 设置段落文本颜色为#f57421 */
}
.middle{
/* 面板中部样式 */
.middle {
position: relative;
/* 设置定位方式为相对定位 */
height: 290px;
/* 设置中部区域高度为290像素 */
margin: 10px 0;
/*background-color: red;*/
border-bottom:1px solid #dff0d8;
/* 设置中部区域上下外边距为10像素左右外边距为0 */
/*background-color: red;*/ /* 这行注释掉了,如果需要可以取消注释来设置背景颜色 */
border-bottom: 1px solid #dff0d8;
/* 设置底部边框为1像素实线颜色为#dff0d8 */
}
.middle>form>input{
/* 中部表单内输入框样式 */
.middle>form>input {
height: 40px;
/* 设置输入框高度为40像素 */
width: 290px;
/* 设置输入框宽度为290像素 */
margin: 20px 30px;
/* 设置输入框上下外边距为20像素左右外边距为30像素 */
border: 1px solid #e0e0e0;
/* 设置输入框边框为1像素实线颜色为#e0e0e0 */
}
.middle>form>input:last-child{
/* 中部表单内最后一个输入框样式(通常是提交按钮) */
.middle>form>input:last-child {
background-color: #f57421;
/* 设置背景颜色为#f57421 */
font-size: 18px;
/* 设置字体大小为18像素 */
color: #FFFFFF;
/* 设置字体颜色为白色 */
}
.middle>form>input:last-child:hover{
/* 中部表单内最后一个输入框鼠标悬停样式 */
.middle>form>input:last-child:hover {
background-color: #f57421;
/* 保持背景颜色不变 */
opacity: 0.7;
/* 设置鼠标悬停时的不透明度为0.7 */
cursor: pointer;
/* 设置鼠标悬停时光标为指针形状 */
font-size: 18px;
/* 保持字体大小不变 */
}
.middle>form>.s1{
/* 中部表单内特定图标样式s1 */
.middle>form>.s1 {
height: 40px;
/* 设置图标高度为40像素 */
width: 40px;
/* 设置图标宽度为40像素 */
position: absolute;
/* 设置定位方式为绝对定位 */
left: 35px;
/* 设置图标左侧位置为35像素 */
top: 40px;
/* 设置图标顶部位置为40像素 */
background: url("../images/J1.PNG") no-repeat;
/* 设置背景图片,不重复 */
}
.middle>form>.s2{
/* 中部表单内特定图标样式s2 */
.middle>form>.s2 {
height: 40px;
/* 设置图标高度为40像素 */
width: 40px;
/* 设置图标宽度为40像素 */
position: absolute;
/* 设置定位方式为绝对定位 */
left: 35px;
/* 设置图标左侧位置为35像素 */
top: 120px;
/* 设置图标顶部位置为120像素 */
background: url("../images/J2.PNG") no-repeat;
/* 设置背景图片,不重复 */
}
.middle>form>.erro{
/* 错误信息样式 */
.middle>form>.erro {
color: red;
/* 设置字体颜色为红色 */
font-size: 14px;
margin-left:10px;
/* 设置字体大小为14像素 */
margin-left: 10px;
/* 设置左侧外边距为10像素 */
}
.tail>a{
/* 面板尾部链接样式 */
.tail>a {
float: right;
/* 设置链接右浮动 */
font-size: 12px;
/* 设置字体大小为12像素 */
padding: 10px;
text-decoration:none;
/* 设置内边距为10像素 */
text-decoration: none;
/* 移除下划线 */
color: black;
/* 设置字体颜色为黑色 */
}
.tail>a:hover{
/* 面板尾部链接鼠标悬停样式 */
.tail>a:hover {
color: red;
/* 设置鼠标悬停时字体颜色为红色 */
}
.middle>form>.iputs:hover{
border:1px solid red;
/* 中部表单内输入框鼠标悬停样式 */
.middle>form>.iputs:hover {
border: 1px solid red;
/* 设置鼠标悬停时边框颜色为红色 */
}
.footer{
/* 面板底部样式 */
.footer {
margin-top: 20px;
/* 设置底部上外边距为20像素 */
}
.footer>span{
/* 面板底部内span元素样式 */
.footer>span {
font-size: 15px;
/* 设置字体大小为15像素 */
position: relative;
/* 设置定位方式为相对定位 */
left: 45%;
/* 设置元素相对于其正常位置的左侧偏移量为45% */
}

@ -1,433 +1,827 @@
/* 设置字符集为UTF-8确保页面可以正确显示中文等字符 */
@charset "utf-8";
/* 导入layui框架的CSS文件layui是一个前端UI框架 */
@import url(../lib/layui/css/layui.css);
*{
/* 重置所有元素的默认样式 */
* {
margin: 0px;
/* 移除所有元素的默认外边距 */
padding: 0px;
/* 移除所有元素的默认内边距 */
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
/* 设置默认字体为"Helvetica Neue", 如果没有则使用Helvetica, 再没有则使用Arial, 最后使用sans-serif系列字体 */
}
a{
/* 移除所有链接的下划线 */
a {
text-decoration: none;
}
html{
/* 设置HTML元素的宽度为100%高度也为100%,并确保整个页面的内容在水平方向上不可滚动,垂直方向上可以滚动 */
html {
width: 100%;
/* 宽度为100% */
height: 100%;
overflow-x:hidden;
overflow-y:auto;
/* 高度为100% */
overflow-x: hidden;
/* 水平方向上隐藏滚动条 */
overflow-y: auto;
/* 垂直方向上显示滚动条 */
}
body{
/* 设置body元素的宽度为100%最小高度为100%,确保内容可以填满整个视口 */
body {
width: 100%;
/* 宽度为100% */
min-height: 100%;
/* 最小高度为100% */
}
.x-body{
/* 容器的基础内边距样式 */
.x-body {
padding: 20px;
/* 设置容器的内边距为20像素 */
}
.x-nav{
/* 导航栏的样式 */
.x-nav {
padding: 0 20px;
/* 设置导航栏左右内边距为20像素 */
position: relative;
/* 相对定位,为子元素提供定位上下文 */
z-index: 99;
/* 设置导航栏的堆叠顺序,确保在其他元素之上 */
border-bottom: 1px solid #e5e5e5;
/* 在导航栏底部添加一条1像素的灰色边框 */
line-height: 39px;
/* 设置行高为39像素使文本垂直居中 */
height: 39px;
/* 设置导航栏的高度为39像素 */
overflow: hidden;
/* 如果内容超出,则隐藏超出部分 */
}
xblock{
/* 错误:'xblock' 应该带有 '.' 前缀,表示类选择器 */
.xblock {
display: block;
/* 将元素设置为块级元素 */
margin-bottom: 10px;
/* 在元素下方添加10像素的外边距 */
padding: 5px;
/* 设置元素的内边距为5像素 */
line-height: 22px;
/* border-left: 5px solid #009688; */
/* 设置行高为22像素 */
/* border-left: 5px solid #009688; */ /* 注释掉的左边框样式,如果需要可以取消注释 */
border-radius: 0 2px 2px 0;
/* 设置边框圆角左上角为0其他角为2像素 */
background-color: #f2f2f2;
/* 设置背景颜色为浅灰色 */
}
.x-right{
float: right;
/* 右浮动样式 */
.x-right {
float: right;
/* 将元素向右浮动 */
}
.x-so{
/*text-align: center;*/
/*background: #f2f2f2 url() 0 0 no-repeat;*/
/* 搜索操作区域的样式 */
.x-so {
/* text-align: center; */ /* 注释掉的文本居中样式,如果需要可以取消注释 */
/* background: #f2f2f2 url() 0 0 no-repeat; */ /* 注释掉的背景图片样式,如果需要可以取消注释 */
margin-bottom: 20px;
/* 在元素下方添加20像素的外边距 */
}
.x-so input.layui-input{
/* 搜索输入框的样式 */
.x-so input.layui-input {
width: 150px;
/* 设置输入框的宽度为150像素 */
padding-left: 25px;
/* 设置输入框的左内边距为25像素 */
}
.x-so .layui-form-label{
/* 表单标签的样式 */
.x-so .layui-form-label {
display: inline-block;
/* 将表单标签设置为行内块级元素 */
}
.x-so input.layui-input,.x-so input.layui-btn{
/* 输入框和按钮的显示样式 */
.x-so input.layui-input,
.x-so input.layui-btn {
display: inline-block;
/* 将输入框和按钮设置为行内块级元素 */
}
.x-red{
/* 红色文本样式 */
.x-red {
color: red;
/* 设置文本颜色为红色 */
}
.x-a{
/* 链接文本颜色样式 */
.x-a {
color: #1AA093;
/* 设置链接文本颜色为特定的绿色 */
}
.x-a:hover{
/* 链接鼠标悬停时的文本颜色样式 */
.x-a:hover {
color: #127F74;
/* 设置链接鼠标悬停时的文本颜色为深绿色 */
}
.x-sort{
/* 排序操作区域的样式 */
.x-sort {
height: 30px;
/* 设置排序操作区域的高度为30像素 */
}
.x-show{
/* 显示操作,用于鼠标指针变为指针样式 */
.x-show {
cursor: pointer;
/* 将鼠标指针变为指针形状,表示元素是可点击的 */
}
.layui-form-switch{
/* layui表单开关控件的样式 */
.layui-form-switch {
margin-top: 0px;
/* 设置开关控件的上外边距为0像素可能用于微调位置 */
}
/* layui输入框和文本域获得焦点时的边框颜色样式 */
.layui-input:focus, .layui-textarea:focus {
border-color: #189f92!important;
/* 设置输入框和文本域获得焦点时的边框颜色为特定的蓝色,并使用!important提高样式优先级 */
}
.page{
/* 分页容器的样式 */
.page {
margin-top: 20px;
/* 设置分页容器顶部外边距为20像素 */
text-align: center;
/* 将分页容器内的内容居中显示 */
}
.page a{
/* 分页链接的样式 */
.page a {
display: inline-block;
/* 将链接设置为行内块级元素 */
background: #fff url(#) 0 0 no-repeat;
/* 设置链接的背景颜色和背景图片,这里没有指定图片地址 */
color: #888;
/* 设置链接文本颜色为灰色 */
padding: 10px;
/* 设置链接的内边距为10像素 */
min-width: 15px;
/* 设置链接的最小宽度为15像素 */
border: 1px solid #E2E2E2;
/* 设置链接的边框为1像素的浅灰色 */
}
.page span{
/* 分页span元素的样式 */
.page span {
display: inline-block;
/* 将span元素设置为行内块级元素 */
padding: 10px;
/* 设置span元素的内边距为10像素 */
min-width: 15px;
/* 设置span元素的最小宽度为15像素 */
border: 1px solid #E2E2E2;
/* 设置span元素的边框为1像素的浅灰色 */
}
.page span.current{
/* 当前激活页码的span元素的样式 */
.page span.current {
display: inline-block;
/* 将当前激活的页码设置为行内块级元素 */
background: #009688 url(#) 0 0 no-repeat;
/* 设置当前激活页码的背景颜色和背景图片,这里没有指定图片地址 */
color: #fff;
/* 设置当前激活页码的文本颜色为白色 */
padding: 10px;
/* 设置当前激活页码的内边距为10像素 */
min-width: 15px;
/* 设置当前激活页码的最小宽度为15像素 */
border: 1px solid #009688;
/* 设置当前激活页码的边框为1像素的绿色 */
}
.page .pagination li{
/* 分页列表项的样式 */
.page .pagination li {
display: inline-block;
/* 将列表项设置为行内块级元素 */
margin-right: 5px;
/* 设置列表项的右外边距为5像素 */
text-align: center;
/* 将列表项的内容居中显示 */
}
.page .pagination li.active span{
/* 激活状态下的分页列表项span元素的样式 */
.page .pagination li.active span {
background: #009688 url(#) 0 0 no-repeat;
/* 设置激活状态下列表项的背景颜色和背景图片,这里没有指定图片地址 */
color: #fff;
/* 设置激活状态下列表项的文本颜色为白色 */
border: 1px solid #009688;
/* 设置激活状态下列表项的边框为1像素的绿色 */
}
/*登录样式*/
/*头部*/
.container{
/* 容器样式,通常用于页面的顶部导航 */
.container {
width: 100%;
/* 设置容器宽度为100% */
height: 45px;
/* 设置容器高度为45像素 */
background-color: #222;
/* 设置容器背景颜色为深灰色 */
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
/* 设置容器底部边框为半透明的白色 */
}
.container .logo a{
/* 容器内的logo链接样式 */
.container .logo a {
float: left;
/* 设置链接左浮动 */
color: #fff;
/* 设置链接文本颜色为白色 */
font-size: 18px;
/* 设置链接字体大小为18像素 */
padding-left: 20px;
/* 设置链接左侧内边距为20像素 */
line-height: 45px;
/* 设置链接行高为45像素与容器高度一致实现垂直居中 */
width: 200px;
/* 设置链接宽度为200像素 */
}
.container .right{
background-color:rgba(0,0,0,0);
float: right;
/* 容器右侧内容的样式 */
.container .right {
background-color: rgba(0, 0, 0, 0);
/* 设置背景颜色为透明 */
float: right;
/* 设置内容右浮动 */
}
.container .left_open{
/* 容器左侧打开按钮的样式 */
.container .left_open {
height: 45px;
/* 设置高度为45像素与容器高度一致 */
float: left;
/* 设置左浮动 */
}
.container .left_open i{
/* 容器左侧打开按钮内的图标样式 */
.container .left_open i {
display: block;
background: rgba(255,255,255,0.1) url(#) 0 0 no-repeat;
/* 设置图标为块级元素 */
background: rgba(255, 255, 255, 0.1) url(#) 0 0 no-repeat;
/* 设置图标背景颜色和图片,这里没有指定图片地址 */
color: #fff;
/* 设置图标颜色为白色 */
width: 32px;
/* 设置图标宽度为32像素 */
height: 32px;
/* 设置图标高度为32像素 */
line-height: 32px;
/* 设置图标行高为32像素实现垂直居中 */
border-radius: 3px;
/* 设置图标边角为3像素的圆角 */
text-align: center;
/* 设置图标文本居中 */
margin-top: 7px;
/* 设置图标顶部外边距为7像素实现垂直居中 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.container .left_open i:hover{
background: rgba(255,255,255,0.3) url(#) 0 0 no-repeat;
/* 容器左侧打开按钮内的图标悬停样式 */
.container .left_open i:hover {
background: rgba(255, 255, 255, 0.3) url(#) 0 0 no-repeat;
/* 设置图标悬停时的背景颜色和图片,这里没有指定图片地址 */
}
.container .left{
background-color:rgba(0,0,0,0);
/* 容器左侧内容的样式 */
.container .left {
background-color: rgba(0, 0, 0, 0);
/* 设置背景颜色为透明 */
float: left;
/* 设置左浮动 */
}
.container .layui-nav-item{
/* 容器内的导航项样式 */
.container .layui-nav-item {
line-height: 45px;
/* 设置导航项行高为45像素与容器高度一致 */
}
.container .layui-nav-more{
/* 容器内的导航更多按钮样式 */
.container .layui-nav-more {
top: 20px;
/* 设置导航更多按钮的顶部位置 */
}
.container .layui-nav-child{
/* 容器内的导航子菜单样式 */
.container .layui-nav-child {
top: 50px;
/* 设置导航子菜单的顶部位置 */
}
.container .layui-nav-child i{
/* 容器内的导航子菜单项图标样式 */
.container .layui-nav-child i {
margin-right: 10px;
/* 设置导航子菜单项图标右侧外边距为10像素 */
}
.layui-nav .layui-nav-item a{
/* 导航项链接的样式 */
.layui-nav .layui-nav-item a {
color: #fff;
/* 设置导航项链接文本颜色为白色 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.layui-nav .layui-nav-child a{
/* 导航子菜单链接的样式 */
.layui-nav .layui-nav-child a {
color: #333;
/* 设置导航子菜单链接文本颜色为深灰色 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.left-nav{
/* 左侧导航栏的样式 */
.left-nav {
position: absolute;
/* 设置定位方式为绝对定位 */
top: 46px;
/* 设置顶部距离为46像素 */
bottom: 42px;
/* 设置底部距离为42像素 */
left: 0;
/* 设置左侧距离为0 */
z-index: 2;
/* 设置堆叠顺序为2 */
padding-top: 10px;
/* 设置顶部内边距为10像素 */
background-color: #EEEEEE;
/* 设置背景颜色为浅灰色 */
width: 220px;
/* 设置宽度为220像素 */
max-width: 220px;
/* 设置最大宽度为220像素 */
overflow: auto;
overflow-x:hidden;
/* 设置内容溢出时出现滚动条 */
overflow-x: hidden;
/* 隐藏水平滚动条 */
border-right: 1px solid #e5e5e5;
/*width: 0px;*/
/* 设置右侧边框为浅灰色 */
}
.left-nav #nav li{
/* 左侧导航栏中列表项的样式 */
.left-nav #nav li {
border-bottom: 1px solid #e5e5e5;
/* 设置列表项底部边框为浅灰色 */
}
.left-nav #nav li:hover > a{
/*color: blue;*/
/* 左侧导航栏中列表项悬停时的样式 */
.left-nav #nav li:hover > a {
/*color: blue;*/ /* 注释掉了,如果需要可以取消注释来设置悬停时的文本颜色 */
}
.left-nav #nav .current{
/* 左侧导航栏中当前激活的列表项样式 */
.left-nav #nav .current {
background-color: rgba(0, 0, 0, 0.3);
/* 设置背景颜色为半透明的黑色 */
}
.left-nav #nav li a{
/* 左侧导航栏中列表项链接的样式 */
.left-nav #nav li a {
font-size: 14px;
/* 设置字体大小为14像素 */
padding: 10px 15px 10px 20px;
/* 设置内边距 */
display: block;
/* 设置为块级元素 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.left-nav #nav li a cite{
/* 左侧导航栏中列表项链接的标题样式 */
.left-nav #nav li a cite {
font-size: 14px;
/* 设置标题字体大小为14像素 */
}
.left-nav #nav li .sub-menu{
/* 左侧导航栏中子菜单的默认样式(隐藏) */
.left-nav #nav li .sub-menu {
display: none;
/* 设置子菜单默认不显示 */
}
.left-nav #nav li .opened{
/* 左侧导航栏中展开的子菜单样式 */
.left-nav #nav li .opened {
display: block;
/* 设置子菜单显示为块级元素 */
}
.left-nav #nav li .opened:hover{
/*background: #fff url() 0 0 no-repeat;*/
/* 左侧导航栏中展开的子菜单悬停时的样式 */
.left-nav #nav li .opened:hover {
/*background: #fff url() 0 0 no-repeat;*/ /* 注释掉了,如果需要可以取消注释来设置悬停时的背景 */
}
.left-nav #nav li .opened .current{
/* 左侧导航栏中展开的子菜单中当前激活的列表项样式 */
.left-nav #nav li .opened .current {
/* 没有具体样式,可能需要根据实际情况添加 */
}
.left-nav #nav li .sub-menu li:hover{
/*color: blue;*/
/*background: #fff url() 0 0 no-repeat;*/
/* 左侧导航栏中子菜单列表项悬停时的样式 */
.left-nav #nav li .sub-menu li:hover {
/*color: blue;*/ /* 注释掉了,如果需要可以取消注释来设置悬停时的文本颜色 */
/*background: #fff url() 0 0 no-repeat;*/ /* 注释掉了,如果需要可以取消注释来设置悬停时的背景 */
}
.left-nav #nav li .sub-menu li a{
/* 子菜单列表项链接的样式 */
.left-nav #nav li .sub-menu li a {
padding: 12px 15px 12px 30px;
/* 设置内边距 */
font-size: 14px;
/* 设置字体大小为14像素 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
}
.left-nav #nav li .sub-menu li .sub-menu li a{
/* 子菜单中嵌套的子菜单列表项链接的样式 */
.left-nav #nav li .sub-menu li .sub-menu li a {
padding-left: 45px;
/* 设置左侧内边距为45像素为嵌套的子菜单提供更多空间 */
}
.left-nav #nav li .sub-menu li a:hover{
/* 子菜单列表项链接鼠标悬停时的样式 */
.left-nav #nav li .sub-menu li a:hover {
color: #148cf1;
/* 设置鼠标悬停时的文本颜色为蓝色 */
}
.left-nav #nav li .sub-menu li a i{
/* 子菜单列表项链接中的图标样式 */
.left-nav #nav li .sub-menu li a i {
font-size: 12px;
/* 设置图标字体大小为12像素 */
}
.left-nav #nav li a i{
/* 主菜单列表项链接中的图标样式 */
.left-nav #nav li a i {
padding-right: 10px;
/* 设置图标右侧内边距为10像素 */
line-height: 14px;
/* 设置图标行高为14像素 */
}
.left-nav #nav li .nav_right{
/* 主菜单列表项右侧内容的样式 */
.left-nav #nav li .nav_right {
float: right;
/* 设置内容右浮动 */
font-size: 16px;
/* 设置字体大小为16像素 */
}
/* 左侧导航栏收起按钮的样式 */
.x-slide_left {
width: 17px;
/* 设置宽度为17像素 */
height: 61px;
/* 设置高度为61像素 */
background: url(#) 0 0 no-repeat;
/* 设置背景图片目前为空需要指定图片URL */
position: absolute;
/* 设置定位方式为绝对定位 */
top: 200px;
/* 设置顶部距离为200像素 */
left: 221px;
/* 设置左侧距离为221像素 */
cursor: pointer;
/* 设置鼠标悬停时为指针形状 */
z-index: 3;
/* 设置堆叠顺序为3 */
}
.page-content{
/* 页面内容的样式 */
.page-content {
position: absolute;
/* 绝对定位,相对于最近的已定位祖先元素 */
top: 46px;
/* 顶部距离为46像素 */
right: 0;
/* 右侧距离为0 */
bottom: 42px;
/* 底部距离为42像素 */
left: 221px;
/* 左侧距离为221像素 */
overflow: hidden;
/* 超出内容隐藏 */
z-index: 1;
/* 堆叠顺序为1 */
}
.page-content-bg{
/* 页面内容背景的样式,用于遮罩层 */
.page-content-bg {
position: absolute;
/* 绝对定位,相对于最近的已定位祖先元素 */
top: 46px;
/* 顶部距离为46像素 */
right: 0;
/* 右侧距离为0 */
bottom: 42px;
/* 底部距离为42像素 */
left: 221px;
background: rgba(0,0,0,0.5); url() 0 0 no-repeat;
/* 左侧距离为221像素 */
background: rgba(0,0,0,0.5);
/* 半透明黑色背景 */
url() 0 0 no-repeat;
/* 背景图片目前为空需要指定图片URL */
overflow: hidden;
/* 超出内容隐藏 */
z-index: 100;
/* 堆叠顺序为100 */
display: none;
/* 默认不显示 */
}
.page-content .tab{
/* 页面内容中的标签页样式 */
.page-content .tab {
height: 100%;
/* 高度为100% */
width: 100%;
background: #EFEEF0 url(#) 0 0 no-repeat;
/* 宽度为100% */
background: #EFEEF0;
/* 背景颜色为淡灰色 */
url(#) 0 0 no-repeat;
/* 背景图片目前为空需要指定图片URL */
margin: 0px;
/* 外边距为0 */
}
.page-content .layui-tab-title{
/*padding-top: 5px;*/
/* 标签页标题的样式 */
.page-content .layui-tab-title {
height: 35px;
background: #EFEEF0 url(#) 0 0 no-repeat;
/* 高度为35像素 */
background: #EFEEF0;
/* 背景颜色为淡灰色 */
position: relative;
/* 相对定位 */
z-index: 100;
/* 堆叠顺序为100 */
}
.page-content .layui-tab-title li.home i{
/* 标签页标题中首页图标的样式 */
.page-content .layui-tab-title li.home i {
padding-right: 5px;
/* 右侧内边距为5像素 */
}
.page-content .layui-tab-title li.home .layui-tab-close{
/* 隐藏首页标签的关闭按钮 */
.page-content .layui-tab-title li.home .layui-tab-close {
display: none;
/* 不显示 */
}
.page-content .layui-tab-title li{
/* 标签页标题中所有列表项的样式 */
.page-content .layui-tab-title li {
line-height: 35px;
/* 行高为35像素 */
}
.page-content .layui-tab-title .layui-this:after{
/* 当前激活标签页的样式 */
.page-content .layui-tab-title .layui-this:after {
height: 36px;
/* 底部边框高度为36像素 */
}
.page-content .layui-tab-title li .layui-tab-close{
/* 标签页关闭按钮的样式 */
.page-content .layui-tab-title li .layui-tab-close {
border-radius: 50%;
/* 圆角边框 */
}
.page-content .layui-tab-title .layui-this{
background: #fff url(#) 0 0 no-repeat;
/* 当前激活标签页的背景样式 */
.page-content .layui-tab-title .layui-this {
background: #fff;
/* 背景颜色为白色 */
url(#) 0 0 no-repeat;
/* 背景图片目前为空需要指定图片URL */
}
.page-content .layui-tab-bar{
height:34px;
/* 标签页底部的样式 */
.page-content .layui-tab-bar {
height: 34px;
/* 高度为34像素 */
line-height: 35px;
/* 行高为35像素 */
}
.page-content .layui-tab-content{
/* 标签页内容的样式 */
.page-content .layui-tab-content {
position: absolute;
/* 绝对定位 */
top: 36px;
/* 顶部距离为36像素 */
bottom: 0px;
/* 底部距离为0像素 */
width: 100%;
background: #fff url(#) 0 0 no-repeat;
/* 宽度为100% */
background: #fff;
/* 背景颜色为白色 */
url(#) 0 0 no-repeat;
/* 背景图片目前为空需要指定图片URL */
padding: 0px;
/* 内边距为0 */
overflow: hidden;
/* 超出内容隐藏 */
}
.page-content .layui-tab-content .layui-tab-item{
/* 标签页中每个标签项的样式 */
.page-content .layui-tab-content .layui-tab-item {
width: 100%;
/* 宽度为100% */
height: 100%;
/* 高度为100% */
}
.page-content .layui-tab-content .layui-tab-item iframe{
/* 标签页中每个标签项内部的iframe样式 */
.page-content .layui-tab-content .layui-tab-item iframe {
width: 100%;
/* 宽度为100% */
height: 100%;
/* 高度为100% */
}
.x-admin-carousel,.layui-carousel,.x-admin-carousel>[carousel-item]>* {
background-color:#fff
/* 轮播图相关元素的样式 */
.x-admin-carousel,
.layui-carousel,
.x-admin-carousel>[carousel-item]>* {
background-color: #fff;
/* 设置背景颜色为白色 */
}
/* 后台日志容器的样式 */
.x-admin-backlog .x-admin-backlog-body {
display:block;
padding:10px 15px;
background-color:#f8f8f8;
color:#999;
border-radius:2px;
transition:all .3s;
-webkit-transition:all .3s
display: block;
/* 将元素设置为块级元素 */
padding: 10px 15px;
/* 设置内边距为10像素上/下和15像素左/右 */
background-color: #f8f8f8;
/* 设置背景颜色为浅灰色 */
color: #999;
/* 设置文本颜色为灰色 */
border-radius: 2px;
/* 设置边框圆角为2像素 */
transition: all .3s;
/* 设置所有属性变化时的过渡效果持续时间为0.3秒 */
-webkit-transition: all .3s;
/* 设置所有属性变化时的过渡效果持续时间为0.3秒针对旧版webkit浏览器 */
}
/* 后台日志标题的样式 */
.x-admin-backlog-body h3 {
padding-bottom:10px;
font-size:12px
padding-bottom: 10px;
/* 设置标题底部内边距为10像素 */
font-size: 12px;
/* 设置字体大小为12像素 */
}
/* 后台日志内容中引用文本的样式 */
.x-admin-backlog-body p cite {
font-style:normal;
font-size:30px;
font-weight:300;
color:#009688
font-style: normal;
/* 设置字体样式为正常 */
font-size: 30px;
/* 设置字体大小为30像素 */
font-weight: 300;
/* 设置字体权重为300 */
color: #009688;
/* 设置文本颜色为特定的蓝色 */
}
/* 后台日志容器鼠标悬停时的样式 */
.x-admin-backlog-body:hover {
background-color:#CFCFCF;
color:#888
background-color: #CFCFCF;
/* 设置鼠标悬停时背景颜色为深灰色 */
color: #888;
/* 设置鼠标悬停时文本颜色为深灰色 */
}
.welcome-footer{padding: 30px 0; line-height: 30px; text-align: center; background-color: #eee; color: #666; font-weight: 300;}
body .layui-layout-admin .footer-demo{height: auto; padding: 15px 0; line-height: 26px;}
.welcome-footer a{padding: 0 5px;}
/* 欢迎页脚的样式 */
.welcome-footer {
padding: 30px 0;
/* 设置顶部和底部内边距为30像素 */
line-height: 30px;
/* 设置行高为30像素 */
text-align: center;
/* 设置文本居中对齐 */
background-color: #eee;
/* 设置背景颜色为浅灰色 */
color: #666;
/* 设置文本颜色为灰色 */
font-weight: 300;
/* 设置字体权重为300 */
}
/* 在layui布局管理员的页脚演示样式 */
body .layui-layout-admin .footer-demo {
height: auto;
/* 设置高度为自动 */
padding: 15px 0;
/* 设置顶部和底部内边距为15像素 */
line-height: 26px;
/* 设置行高为26像素 */
}
/* 欢迎页脚中链接的样式 */
.welcome-footer a {
padding: 0 5px;
/* 设置左右内边距为5像素 */
}
/* 表格单元格的样式 */
table th, table td {
word-break: break-all;
/* 允许在表格单元格中单词断行 */
}
.footer{
/* 固定在底部的页脚样式 */
.footer {
position: fixed;
/* 设置定位为固定 */
bottom: 0px;
/* 设置底部距离为0像素 */
width: 100%;
/* 设置宽度为100% */
background-color: #222;
/* 设置背景颜色为深灰色 */
border-top: 1px solid rgba(255, 255, 255, 0.2);
/* 设置顶部边框为半透明白色 */
line-height: 41px;
/* 设置行高为41像素 */
color: #fff;
/*padding-left: 10px;*/
/* 设置文本颜色为白色 */
/*padding-left: 10px;*/ /* 注释掉的左内边距样式,可能不需要 */
}
.footer .copyright{
/* 页脚中版权信息的样式 */
.footer .copyright {
margin-left: 10px;
/* 设置左边距为10像素 */
}
@media screen and (max-width: 768px){
.fast-add{
/* 响应式设计当屏幕宽度小于768像素时的样式 */
@media screen and (max-width: 768px) {
.fast-add {
display: none;
/* 隐藏快速添加按钮 */
}
.layui-nav .to-index{
.layui-nav .to-index {
display: none;
/* 隐藏导航栏中的首页链接 */
}
.container .logo a{
.container .logo a {
width: 140px;
/* 设置logo链接的宽度为140像素 */
}
.container .left_open {
/*float: right;*/
/*float: right;*/ /* 注释掉的浮动样式,可能不需要 */
}
.left-nav{
.left-nav {
left: -221px;
/* 设置左侧导航栏的左边距为-221像素隐藏导航栏 */
}
.page-content{
.page-content {
left: 0px;
/* 设置页面内容的左边距为0像素 */
}
.page-content .layui-tab-content .layui-tab-item{
.page-content .layui-tab-content .layui-tab-item {
-webkit-overflow-scrolling: touch;
/* 设置在iOS设备上滚动更流畅 */
overflow-y: scroll;
/* 设置垂直方向上内容溢出时出现滚动条 */
}
.x-so input.layui-input{
.x-so input.layui-input {
width: 100%;
/* 设置输入框宽度为100% */
margin: 10px;
/* 设置上下外边距为10像素 */
}
.layui-input{
.layui-input {
margin-left: 20px;
/* 设置输入框的左边距为20像素 */
}
}

@ -3,93 +3,114 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.AdminDao" >
<!--登陆查询-->
<!-- 管理员登录查询 -->
<select id="findAdmin" parameterType="Admin" resultType="Admin">
select * from d_admin
where
<!-- 如果用户名不为空且不为空字符串,则按用户名查询 -->
<if test="a_username!=null and a_username!='' ">
a_username = #{a_username}
a_username = #{a_username}
</if>
<!-- 如果密码不为空且不为空字符串,则按密码查询,并与用户名查询结果进行交集 -->
<if test="a_password!=null and a_password!='' ">
and a_password = #{a_password}
and a_password = #{a_password}
</if>
</select>
<!--分页查询-->
<!-- 分页查询管理员列表 -->
<select id="getAdminList" parameterType="Admin" resultType="Admin">
select * from d_admin
<where>
<!-- 如果用户名不为空且不为空字符串,则按用户名模糊查询 -->
<if test="a_username!=null and a_username!='' ">
and a_username like '%${a_username}%'
and a_username like '%${a_username}%'
</if>
<!-- 如果描述不为空且不为空字符串,则按描述模糊查询 -->
<if test="a_describe!=null and a_describe!=''">
and a_describe like '%${a_describe}%'
and a_describe like '%${a_describe}%'
</if>
<!-- 如果ID不为空且不为0则按ID模糊查询 -->
<if test="a_id!=null and a_id!=0">
and a_id like '%${a_id}%'
and a_id like '%${a_id}%'
</if>
</where>
ORDER BY a_id asc
<!-- 按ID升序排序 -->
ORDER BY a_id asc
<!-- 分页参数 -->
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
<!-- 查询管理员总数 -->
<select id="totalCount" resultType="Integer">
select count(a_id) from d_admin
<where>
<!-- 如果用户名不为空且不为空字符串,则按用户名模糊查询 -->
<if test="a_username!=null and a_username!='' ">
and a_username like '%${a_username}%'
and a_username like '%${a_username}%'
</if>
<!-- 如果描述不为空且不为空字符串,则按描述模糊查询 -->
<if test="a_describe!=null and a_describe!=''">
and a_describe like '%${a_describe}%'
and a_describe like '%${a_describe}%'
</if>
<!-- 如果ID不为空且不为0则按ID模糊查询 -->
<if test="a_id!=null and a_id!=0">
and a_id like '%${a_id}%'
and a_id like '%${a_id}%'
</if>
</where>
</select>
<!--添加管理员信息-->
<!-- 添加管理员信息 -->
<insert id="addAdmin" parameterType="Admin" keyProperty="a_id" useGeneratedKeys="true">
insert into d_admin (a_username,a_password,a_name,a_phone,a_power,a_describe)
values(#{a_username},#{a_password},#{a_name},#{a_phone},#{a_power},#{a_describe})
</insert>
<!--通过id删除管理员信息-->
<delete id="deleteAdmin" parameterType="Integer" >
<!-- 通过ID删除管理员信息 -->
<delete id="deleteAdmin" parameterType="Integer">
delete from d_admin where a_id=#{a_id}
</delete>
<select id="findAdminById" parameterType="Integer" resultType="Admin" >
<!-- 通过ID查询管理员信息 -->
<select id="findAdminById" parameterType="Integer" resultType="Admin">
select * from d_admin where a_id=#{a_id}
</select>
<!-- 获取所有管理员信息 -->
<select id="getAll" resultType="Admin">
select * from d_admin;
</select>
<!--修改管理员信息-->
<!-- 修改管理员信息 -->
<update id="updateAdmin" parameterType="Admin">
update d_admin
<set>
<!-- 如果用户名不为空且不为空字符串,则更新用户名 -->
<if test="a_username!=null and a_username !=''">
a_username=#{a_username},
</if>
<!-- 如果密码不为空且不为空字符串,则更新密码 -->
<if test="a_password !=null and a_password !=''">
a_password=#{a_password},
</if>
<!-- 如果姓名不为空且不为空字符串,则更新姓名 -->
<if test="a_name !=null and a_name !=''">
a_name=#{a_name},
</if>
<!-- 如果电话不为空且不为0则更新电话 -->
<if test="a_phone !=null and a_phone !=0">
a_phone=#{a_phone},
</if>
<!-- 如果权限不为空且不为空字符串,则更新权限 -->
<if test="a_power !=null and a_power !=''">
a_power=#{a_power},
</if>
<!-- 如果描述不为空且不为空字符串,则更新描述 -->
<if test="a_describe!=null and a_describe!=''">
a_describe=#{a_describe},
</if>
</set>
where a_id = #{a_id}
</update>
</mapper>

@ -3,62 +3,78 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.ClassDao" >
<!--分页查询-->
<!-- 分页查询班级列表 -->
<select id="getClassList" parameterType="Class" resultType="Class">
select *from d_class
select * from d_class
<where>
<!-- 如果班级名称不为空且不为空字符串,则按班级名称模糊查询 -->
<if test="c_classname!=null and c_classname!='' ">
and c_classname like '%${c_classname}%'
and c_classname like '%${c_classname}%'
</if>
<!-- 如果辅导员不为空且不为空字符串,则按辅导员模糊查询 -->
<if test="c_counsellor!=null and c_counsellor!=''">
and c_counsellor like '%${c_counsellor}%'
and c_counsellor like '%${c_counsellor}%'
</if>
<!-- 如果班级ID不为空且不为0则按班级ID模糊查询 -->
<if test="c_classid!=null and c_classid!=0">
and c_classid like '%${c_classid}%'
and c_classid like '%${c_classid}%'
</if>
</where>
ORDER BY c_id asc
<!-- 按ID升序排序 -->
ORDER BY c_id asc
<!-- 分页参数 -->
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
<!-- 查询班级总数 -->
<select id="totalCount" resultType="Integer">
select count(c_id) from d_class
<where>
<!-- 如果班级名称不为空且不为空字符串,则按班级名称模糊查询 -->
<if test="c_classname!=null and c_classname!='' ">
and c_classname like '%${c_classname}%'
and c_classname like '%${c_classname}%'
</if>
<!-- 如果辅导员不为空且不为空字符串,则按辅导员模糊查询 -->
<if test="c_counsellor!=null and c_counsellor!=''">
and c_counsellor like '%${c_counsellor}%'
and c_counsellor like '%${c_counsellor}%'
</if>
<!-- 如果班级ID不为空且不为0则按班级ID模糊查询 -->
<if test="c_classid!=null and c_classid!=0">
and c_classid like '%${c_classid}%'
and c_classid like '%${c_classid}%'
</if>
</where>
</where>
</select>
<!--通过id删除班级信息-->
<delete id="deleteClass" parameterType="Integer" >
<!-- 通过ID删除班级信息 -->
<delete id="deleteClass" parameterType="Integer">
delete from d_class where c_id=#{c_id}
</delete>
<!--添加班级信息-->
<!-- 添加班级信息 -->
<insert id="addClass" parameterType="Class" keyProperty="c_id" useGeneratedKeys="true">
insert into d_class (c_classid,c_classname,c_counsellor)
values(#{c_classid},#{c_classname},#{c_counsellor})
insert into d_class (c_classid, c_classname, c_counsellor)
values(#{c_classid}, #{c_classname}, #{c_counsellor})
</insert>
<select id="findClassById" parameterType="Integer" resultType="Class" >
<!-- 通过ID查询班级信息 -->
<select id="findClassById" parameterType="Integer" resultType="Class">
select * from d_class where c_id=#{c_id}
</select>
<!--修改班级信息-->
<!-- 修改班级信息 -->
<update id="updateClass" parameterType="Class">
update d_class
<set>
<!-- 如果班级ID不为空且不为0则更新班级ID -->
<if test="c_classid!=null and c_classid!=0">
c_classid=#{c_classid},
</if>
<!-- 如果班级名称不为空且不为空字符串,则更新班级名称 -->
<if test="c_classname !=null and c_classname !=''">
c_classname=#{c_classname},
</if>
<!-- 如果辅导员不为空且不为空字符串,则更新辅导员 -->
<if test="c_counsellor !=null and c_counsellor !=''">
c_counsellor=#{c_counsellor},
</if>
@ -66,6 +82,7 @@
where c_id = #{c_id}
</update>
<!--Mybatis使用Collection进行表关联查询关联一对多数据类型(class为一student为多)且需要有id-->
<!--Association关联一对一类型-->
<!--班级人员信息查询信息-->

@ -3,78 +3,93 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.DormCleanDao" >
<!--分页查询-->
<!-- 分页查询宿舍卫生列表 -->
<select id="getDormCleanList" parameterType="DormClean" resultType="DormClean">
select *from d_dormgrade
select * from d_dormgrade
<where>
<!-- 如果宿舍ID不为空且不为0则按宿舍ID模糊查询 -->
<if test="d_id!=null and d_id!=0">
and d_id like '%${d_id}%'
and d_id like '%${d_id}%'
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则按宿舍楼模糊查询 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
ORDER BY g_id asc
<!-- 按ID升序排序 -->
ORDER BY g_id asc
<!-- 分页参数 -->
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
<!-- 查询宿舍卫生信息总数 -->
<select id="totalCount" resultType="Integer">
select count(g_id) from d_dormgrade
<where>
<!-- 如果宿舍ID不为空且不为0则按宿舍ID模糊查询 -->
<if test="d_id!=null and d_id!=0">
and d_id like '%${d_id}%'
and d_id like '%${d_id}%'
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则按宿舍楼模糊查询 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
</select>
<!--添加宿舍卫生信息-->
<!-- 添加宿舍卫生信息 -->
<insert id="addDormClean" parameterType="DormClean" keyProperty="g_id" useGeneratedKeys="true">
insert into d_dormgrade (d_id,d_dormbuilding,d_grade,create_time,update_time)
values(#{d_id},#{d_dormbuilding},#{d_grade},now(),now())
insert into d_dormgrade (d_id, d_dormbuilding, d_grade, create_time, update_time)
values(#{d_id}, #{d_dormbuilding}, #{d_grade}, now(), now())
</insert>
<!--通过id删除宿舍卫生信息-->
<delete id="deleteDormClean" parameterType="Integer" >
<!-- 通过ID删除宿舍卫生信息 -->
<delete id="deleteDormClean" parameterType="Integer">
delete from d_dormgrade where g_id=#{g_id}
</delete>
<select id="findDormCleanById" parameterType="Integer" resultType="DormClean" >
<!-- 通过ID查询宿舍卫生信息 -->
<select id="findDormCleanById" parameterType="Integer" resultType="DormClean">
select * from d_dormgrade where g_id=#{g_id}
</select>
<!--修改宿舍卫生信息-->
<!-- 修改宿舍卫生信息 -->
<update id="updateDormClean" parameterType="DormClean">
update d_dormgrade
<set>
<!-- 如果宿舍ID不为空且不为0则更新宿舍ID -->
<if test="d_id!=null and d_id!=0">
d_id=#{d_id},
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则更新宿舍楼 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
d_dormbuilding=#{d_dormbuilding},
</if>
<!-- 如果卫生评分不为空且不为0则更新卫生评分 -->
<if test="d_grade!=null and d_grade!=0">
d_grade=#{d_grade},
</if>
<if test="update_time != null" >
<!-- 如果更新时间不为空,则更新时间为当前时间 -->
<if test="update_time != null">
update_time = now(),
</if>
</set>
where g_id = #{g_id}
</update>
<!-- 查询所有宿舍卫生信息 -->
<select id="getAll" resultType="DormClean">
select * from d_dormgrade;
</select>
<!--宿舍卫生信息查询信息-->
<!-- 宿舍卫生信息查询结果映射 -->
<resultMap type="com.itheima.po.DormClean" id="cardAndInfo2">
<!-- 宿舍ID映射 -->
<id property="d_id" column="d_id"/>
<!-- 宿舍楼映射 -->
<result property="d_dormbuilding" column="d_dormbuilding" />
</resultMap>
</mapper>

@ -3,68 +3,82 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.DormRepairDao" >
<!--分页查询-->
<!-- 分页查询宿舍维修列表 -->
<select id="getDormRepairList" parameterType="DormRepair" resultType="DormRepair">
select *from d_dormrepair
select * from d_dormrepair
<where>
<!-- 如果宿舍ID不为空且不为0则按宿舍ID模糊查询 -->
<if test="d_id!=null and d_id!=0">
and d_id like '%${d_id}%'
and d_id like '%${d_id}%'
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则按宿舍楼模糊查询 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
ORDER BY r_id asc
<!-- 按维修ID升序排序 -->
ORDER BY r_id asc
<!-- 分页参数 -->
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
<!-- 查询宿舍维修信息总数 -->
<select id="totalCount" resultType="Integer">
select count(r_id) from d_dormrepair
<where>
<!-- 如果宿舍ID不为空且不为0则按宿舍ID模糊查询 -->
<if test="d_id!=null and d_id!=0">
and d_id like '%${d_id}%'
and d_id like '%${d_id}%'
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则按宿舍楼模糊查询 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
</select>
<!--添加宿舍信息-->
<!-- 添加宿舍维修信息 -->
<insert id="addDormRepair" parameterType="DormRepair" keyProperty="r_id" useGeneratedKeys="true">
insert into d_dormrepair (d_id,d_dormbuilding,r_name,reason,create_time,update_time)
values(#{d_id},#{d_dormbuilding},#{r_name},#{reason},now(),now())
insert into d_dormrepair (d_id, d_dormbuilding, r_name, reason, create_time, update_time)
values(#{d_id}, #{d_dormbuilding}, #{r_name}, #{reason}, now(), now())
</insert>
<!--通过id删除宿舍信息-->
<delete id="deleteDormRepair" parameterType="Integer" >
<!-- 通过ID删除宿舍维修信息 -->
<delete id="deleteDormRepair" parameterType="Integer">
delete from d_dormrepair where r_id=#{r_id}
</delete>
<select id="findDormRepairById" parameterType="Integer" resultType="DormRepair" >
<!-- 通过ID查询宿舍维修信息 -->
<select id="findDormRepairById" parameterType="Integer" resultType="DormRepair">
select * from d_dormrepair where r_id=#{r_id}
</select>
<!-- 获取所有宿舍维修信息 -->
<select id="getAll" resultType="DormRepair">
select * from d_dormrepair;
</select>
<!--修改宿舍信息-->
<!-- 修改宿舍维修信息 -->
<update id="updateDormRepair" parameterType="DormRepair">
update d_dormrepair
<set>
<!-- 如果宿舍ID不为空且不为0则更新宿舍ID -->
<if test="d_id!=null and d_id!=0">
d_id=#{d_id},
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则更新宿舍楼 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
d_dormbuilding=#{d_dormbuilding},
</if>
<!-- 如果维修人姓名不为空且不为空字符串,则更新维修人姓名 -->
<if test="r_name !=null and r_name !=''">
r_name=#{r_name},
</if>
<!-- 如果维修原因不为空且不为空字符串,则更新维修原因 -->
<if test="reason !=null and reason !=''">
reason=#{reason},
</if>
<!-- 如果更新时间不为空,则更新时间为当前时间 -->
<if test="update_time !=null ">
update_time=now(),
</if>
@ -72,6 +86,7 @@
where r_id = #{r_id}
</update>
<!--宿舍人员信息查询信息-->
<resultMap type="com.itheima.po.DormRepair" id="cardAndInfo2">
<id property="r_id" column="r_id"/>

@ -3,70 +3,85 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.DormitoryDao" >
<!--分页查询-->
<!-- 分页查询宿舍列表 -->
<select id="getDormitoryList" parameterType="Dormitory" resultType="Dormitory">
select *from d_dormitoryinfo
select * from d_dormitoryinfo
<where>
<!-- 如果管理员姓名不为空且不为空字符串,则按管理员姓名模糊查询 -->
<if test="a_name!=null and a_name!=''">
and a_name like '%${a_name}%'
and a_name like '%${a_name}%'
</if>
<!-- 如果宿舍ID不为空且不为0则按宿舍ID模糊查询 -->
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
and s_dormitoryid like '%${s_dormitoryid}%'
and s_dormitoryid like '%${s_dormitoryid}%'
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则按宿舍楼模糊查询 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
ORDER BY d_id asc
<!-- 按ID升序排序 -->
ORDER BY d_id asc
<!-- 分页参数 -->
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
<!-- 查询宿舍信息总数 -->
<select id="totalCount" resultType="Integer">
select count(s_dormitoryid) from d_dormitoryinfo
<where>
<!-- 如果管理员姓名不为空且不为空字符串,则按管理员姓名模糊查询 -->
<if test="a_name!=null and a_name!=''">
and a_name like '%${a_name}%'
and a_name like '%${a_name}%'
</if>
<!-- 如果宿舍ID不为空且不为0则按宿舍ID模糊查询 -->
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
and s_dormitoryid like '%${s_dormitoryid}%'
and s_dormitoryid like '%${s_dormitoryid}%'
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则按宿舍楼模糊查询 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
</where>
</select>
<!--添加宿舍信息-->
<!-- 添加宿舍信息 -->
<insert id="addDormitory" parameterType="Dormitory" keyProperty="d_id" useGeneratedKeys="true">
insert into d_dormitoryinfo (s_dormitoryid,d_dormbuilding,d_bedtotal,d_bed,a_name)
values(#{s_dormitoryid},#{d_dormbuilding},#{d_bedtotal},#{d_bed},#{a_name})
insert into d_dormitoryinfo (s_dormitoryid, d_dormbuilding, d_bedtotal, d_bed, a_name)
values(#{s_dormitoryid}, #{d_dormbuilding}, #{d_bedtotal}, #{d_bed}, #{a_name})
</insert>
<!--通过id删除宿舍信息-->
<delete id="deleteDormitory" parameterType="Integer" >
<!-- 通过ID删除宿舍信息 -->
<delete id="deleteDormitory" parameterType="Integer">
delete from d_dormitoryinfo where d_id=#{d_id}
</delete>
<select id="findDormitoryById" parameterType="Integer" resultType="Dormitory" >
<!-- 通过ID查询宿舍信息 -->
<select id="findDormitoryById" parameterType="Integer" resultType="Dormitory">
select * from d_dormitoryinfo where d_id=#{d_id}
</select>
<!--修改宿舍信息-->
<!-- 修改宿舍信息 -->
<update id="updateDormitory" parameterType="Dormitory">
update d_dormitoryinfo
<set>
<!-- 如果宿舍ID不为空且不为0则更新宿舍ID -->
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
s_dormitoryid=#{s_dormitoryid},
</if>
<!-- 如果宿舍楼不为空且不为空字符串,则更新宿舍楼 -->
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
d_dormbuilding=#{d_dormbuilding},
</if>
<!-- 如果床位数不为空且不为空字符串,则更新床位数 -->
<if test="d_bedtotal !=null and d_bedtotal !=''">
d_bedtotal=#{d_bedtotal},
</if>
<!-- 如果床位不为空且不为空字符串,则更新床位 -->
<if test="d_bed !=null and d_bed !=''">
d_bed=#{d_bed},
</if>
<!-- 如果管理员姓名不为空且不为空字符串,则更新管理员姓名 -->
<if test="a_name !=null and a_name !=''">
a_name=#{a_name},
</if>
@ -74,6 +89,7 @@
where d_id = #{d_id}
</update>
<!--宿舍人员信息查询信息-->
<resultMap type="com.itheima.po.Dormitory" id="cardAndInfo2">
<id property="d_id" column="d_id"/>

@ -3,85 +3,102 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.StudentCleanDao" >
<!--分页查询-->
<!-- 分页查询学生卫生列表 -->
<select id="getStudentCleanList" parameterType="StudentClean" resultType="StudentClean">
select *from d_stgrade
select * from d_stgrade
<where>
<!-- 如果学生ID不为空且不为0则按学生ID模糊查询 -->
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
and s_studentid like '%${s_studentid}%'
</if>
<!-- 如果学生姓名不为空且不为空字符串,则按学生姓名模糊查询 -->
<if test="s_name !=null and s_name !=''">
and s_name like '%${s_name}%'
and s_name like '%${s_name}%'
</if>
<!-- 如果宿舍ID不为空且不为0则按宿舍ID模糊查询 -->
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
and s_dormitoryid like '%${s_dormitoryid}%'
and s_dormitoryid like '%${s_dormitoryid}%'
</if>
</where>
ORDER BY g_id asc
<!-- 按卫生评分ID升序排序 -->
ORDER BY g_id asc
<!-- 分页参数 -->
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
<!-- 查询学生卫生信息总数 -->
<select id="totalCount" resultType="Integer">
select count(g_id) from d_stgrade
<where>
<!-- 如果学生ID不为空且不为0则按学生ID模糊查询 -->
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
and s_studentid like '%${s_studentid}%'
</if>
<!-- 如果学生姓名不为空且不为空字符串,则按学生姓名模糊查询 -->
<if test="s_name !=null and s_name !=''">
and s_name like '%${s_name}%'
and s_name like '%${s_name}%'
</if>
<!-- 如果宿舍ID不为空且不为0则按宿舍ID模糊查询 -->
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
and s_dormitoryid like '%${s_dormitoryid}%'
and s_dormitoryid like '%${s_dormitoryid}%'
</if>
</where>
</select>
<!--添加宿舍卫生信息-->
<!-- 添加学生卫生信息 -->
<insert id="addStudentClean" parameterType="StudentClean" keyProperty="g_id" useGeneratedKeys="true">
insert into d_stgrade (s_studentid,s_name,s_grade,s_classid,s_dormitoryid,create_time,update_time)
values(#{s_studentid},#{s_name},#{s_grade},#{s_classid},#{s_dormitoryid},now(),now())
insert into d_stgrade (s_studentid, s_name, s_grade, s_classid, s_dormitoryid, create_time, update_time)
values(#{s_studentid}, #{s_name}, #{s_grade}, #{s_classid}, #{s_dormitoryid}, now(), now())
</insert>
<!--通过id删除宿舍卫生信息-->
<delete id="deleteStudentClean" parameterType="Integer" >
<!-- 通过ID删除学生卫生信息 -->
<delete id="deleteStudentClean" parameterType="Integer">
delete from d_stgrade where g_id=#{g_id}
</delete>
<select id="findStudentCleanById" parameterType="Integer" resultType="StudentClean" >
<!-- 通过ID查询学生卫生信息 -->
<select id="findStudentCleanById" parameterType="Integer" resultType="StudentClean">
select * from d_stgrade where g_id=#{g_id}
</select>
<!-- 获取所有学生卫生信息 -->
<select id="getAll" resultType="StudentClean">
select * from d_stgrade;
</select>
<!--修改宿舍卫生信息-->
<!-- 修改学生卫生信息 -->
<update id="updateStudentClean" parameterType="StudentClean">
update d_stgrade
<set>
<!-- 如果学生ID不为空且不为0则更新学生ID -->
<if test="s_studentid!=null and s_studentid!=0">
s_studentid=#{s_studentid},
</if>
<!-- 如果学生姓名不为空且不为空字符串,则更新学生姓名 -->
<if test="s_name !=null and s_name !=''">
s_name=#{s_name},
</if>
<!-- 如果卫生评分不为空且不为0则更新卫生评分 -->
<if test="s_grade!=null and s_grade!=0">
s_grade=#{s_grade},
</if>
<!-- 如果班级ID不为空且不为0则更新班级ID -->
<if test="s_classid!=null and s_classid!=0">
s_classid=#{s_classid},
</if>
<!-- 如果宿舍ID不为空且不为0则更新宿舍ID -->
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
s_dormitoryid=#{s_dormitoryid},
</if>
<if test="update_time != null" >
<!-- 如果更新时间不为空,则更新时间为当前时间 -->
<if test="update_time != null">
update_time = now(),
</if>
</set>
where g_id = #{g_id}
</update>
<!--宿舍卫生信息查询信息-->
<resultMap type="com.itheima.po.StudentClean" id="cardAndInfo2">
<id property="g_id" column="g_id"/>

@ -3,83 +3,105 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.StudentDao" >
<!--分页查询-->
<!-- 分页查询学生列表 -->
<select id="getStudentList" parameterType="Student" resultType="Student">
select *from d_student
select * from d_student
<where>
<!-- 如果学生姓名不为空且不为空字符串,则按学生姓名模糊查询 -->
<if test="s_name!=null and s_name!='' ">
and s_name like '%${s_name}%'
and s_name like '%${s_name}%'
</if>
<!-- 如果学生ID不为空且不为0则按学生ID模糊查询 -->
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
and s_studentid like '%${s_studentid}%'
</if>
<!-- 如果班级ID不为空且不为0则按班级ID模糊查询 -->
<if test="s_classid!=null and s_classid!=0">
and s_classid like '%${s_classid}%'
and s_classid like '%${s_classid}%'
</if>
<!-- 如果班级名称不为空且不为空字符串,则按班级名称模糊查询 -->
<if test="s_classname!=null and s_classname!='' ">
and s_classname like '%${s_classname}%'
and s_classname like '%${s_classname}%'
</if>
</where>
ORDER BY s_id asc
<!-- 按学生ID升序排序 -->
ORDER BY s_id asc
<!-- 分页参数 -->
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
<!-- 查询学生总数 -->
<select id="totalCount" resultType="Integer">
select count(s_studentid) from d_student
<where>
<if test="s_name!=null and s_name!='' ">
and s_name like '%${s_name}%'
</if>
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
</if>
<if test="s_classid!=null and s_classid!=0">
and s_classid like '%${s_classid}%'
</if>
<if test="s_classname!=null and s_classname!='' ">
and s_classname like '%${s_classname}%'
</if>
</where>
<!-- 如果学生姓名不为空且不为空字符串,则按学生姓名模糊查询 -->
<if test="s_name!=null and s_name!='' ">
and s_name like '%${s_name}%'
</if>
<!-- 如果学生ID不为空且不为0则按学生ID模糊查询 -->
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
</if>
<!-- 如果班级ID不为空且不为0则按班级ID模糊查询 -->
<if test="s_classid!=null and s_classid!=0">
and s_classid like '%${s_classid}%'
</if>
<!-- 如果班级名称不为空且不为空字符串,则按班级名称模糊查询 -->
<if test="s_classname!=null and s_classname!='' ">
and s_classname like '%${s_classname}%'
</if>
</where>
</select>
<!--通过id删除学生信息-->
<delete id="deleteStudent" parameterType="Integer" >
<!-- 通过ID删除学生信息 -->
<delete id="deleteStudent" parameterType="Integer">
delete from d_student where s_id=#{s_id}
</delete>
<!--添加学生信息-->
<!-- 添加学生信息 -->
<insert id="addStudent" parameterType="Student" keyProperty="s_id" useGeneratedKeys="true">
insert into d_student (s_studentid,s_name,s_sex,s_age,s_phone,s_classid,s_classname,s_dormitoryid)
values(#{s_studentid},#{s_name},#{s_sex},#{s_age},#{s_phone},#{s_classid},#{s_classname},#{s_dormitoryid})
insert into d_student (s_studentid, s_name, s_sex, s_age, s_phone, s_classid, s_classname, s_dormitoryid)
values(#{s_studentid}, #{s_name}, #{s_sex}, #{s_age}, #{s_phone}, #{s_classid}, #{s_classname}, #{s_dormitoryid})
</insert>
<select id="findStudentById" parameterType="Integer" resultType="Student" >
select * from d_student where s_id=#{s_id}
<!-- 通过ID查询学生信息 -->
<select id="findStudentById" parameterType="Integer" resultType="Student">
select * from d_student where s_id=#{s_id}
</select>
<!--修改学生信息-->
<!-- 修改学生信息 -->
<update id="updateStudent" parameterType="Student">
update d_student
<set>
<!-- 如果学生ID不为空且不为0则更新学生ID -->
<if test="s_studentid!=null and s_studentid!=0">
s_studentid=#{s_studentid},
</if>
<!-- 如果学生姓名不为空且不为空字符串,则更新学生姓名 -->
<if test="s_name !=null and s_name !=''">
s_name=#{s_name},
</if>
<!-- 如果学生性别不为空且不为空字符串,则更新学生性别 -->
<if test="s_sex !=null and s_sex !=''">
s_sex=#{s_sex},
</if>
<!-- 如果学生年龄不为空且不为0则更新学生年龄 -->
<if test="s_age !=null and s_age !=0">
s_age=#{s_age},
</if>
<!-- 如果学生电话不为空且不为0则更新学生电话 -->
<if test="s_phone !=null and s_phone !=0">
s_phone=#{s_phone},
</if>
<!-- 如果班级ID不为空且不为0则更新班级ID -->
<if test="s_classid!=null and s_classid!=0">
s_classid=#{s_classid},
</if>
<!-- 如果班级名称不为空且不为空字符串,则更新班级名称 -->
<if test="s_classname !=null and s_classname !=''">
s_classname=#{s_classname},
</if>
<!-- 如果宿舍ID不为空且不为0则更新宿舍ID -->
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
s_dormitoryid=#{s_dormitoryid},
</if>
@ -87,6 +109,7 @@
where s_id = #{s_id}
</update>
<!-- 获取所有学生信息 -->
<select id="getAll" resultType="Student">
select * from d_student;
</select>

@ -3,42 +3,50 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.VisitorDao" >
<!--分页查询-->
<!-- 分页查询访客列表 -->
<select id="getVisitorList" parameterType="Visitor" resultType="Visitor">
select * from d_visitor
<where>
<!-- 如果访客姓名不为空且不为空字符串,则按访客姓名模糊查询 -->
<if test="v_name!=null and v_name!='' ">
and v_name like '%${v_name}%'
and v_name like '%${v_name}%'
</if>
<!-- 如果访客电话不为空且不为0则按访客电话模糊查询 -->
<if test="v_phone!=null and v_phone!=0">
and v_phone like '%${v_phone}%'
and v_phone like '%${v_phone}%'
</if>
</where>
ORDER BY v_id asc
<!-- 按访客ID升序排序 -->
ORDER BY v_id asc
<!-- 分页参数,限制返回的记录数 -->
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
<!-- 查询访客总数 -->
<select id="totalCount" resultType="Integer">
select count(v_id) from d_visitor
<where>
<!-- 如果访客姓名不为空且不为空字符串,则按访客姓名模糊查询 -->
<if test="v_name!=null and v_name!='' ">
and v_name like '%${v_name}%'
and v_name like '%${v_name}%'
</if>
<!-- 如果访客电话不为空且不为0则按访客电话模糊查询 -->
<if test="v_phone!=null and v_phone!=0">
and v_phone like '%${v_phone}%'
and v_phone like '%${v_phone}%'
</if>
</where>
</select>
<!--添加学生信息-->
<!-- 添加访客信息 -->
<insert id="addVisitor" parameterType="Visitor" keyProperty="v_id" useGeneratedKeys="true">
insert into d_visitor (v_name,v_phone,v_dormitoryid,v_dormbuilding,create_time)
values(#{v_name},#{v_phone},#{v_dormitoryid},#{v_dormbuilding},now())
insert into d_visitor (v_name, v_phone, v_dormitoryid, v_dormbuilding, create_time)
values(#{v_name}, #{v_phone}, #{v_dormitoryid}, #{v_dormbuilding}, now())
</insert>
<!-- 获取所有访客信息 -->
<select id="getAll" resultType="Visitor">
select * from d_visitor;
</select>
</mapper>

@ -1,31 +0,0 @@
package com.itheima.dao;
import com.itheima.po.Admin;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* DAO
*/
public interface AdminDao {
/**
*
*/
public Admin findAdmin(Admin admin);
/**
*
*/
//获取总条数
public Integer totalCount(@Param("a_username") String a_username, @Param("a_describe") String a_describe,@Param("a_id") Integer a_id);
//获取用户列表
public List<Admin> getAdminList(@Param("a_username") String a_username, @Param("a_describe") String a_describe,@Param("a_id") Integer a_id, @Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);
public int addAdmin(Admin admin); //添加管理员信息
public int deleteAdmin(Integer a_id); //删除管理员信息
public int updateAdmin(Admin admin); //修改管理员信息
public Admin findAdminById(Integer a_id);
public List<Admin> getAll();
}

@ -1,95 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.AdminDao" >
<!--登陆查询-->
<select id="findAdmin" parameterType="Admin" resultType="Admin">
select * from d_admin
where
<if test="a_username!=null and a_username!='' ">
a_username = #{a_username}
</if>
<if test="a_password!=null and a_password!='' ">
and a_password = #{a_password}
</if>
</select>
<!--分页查询-->
<select id="getAdminList" parameterType="Admin" resultType="Admin">
select * from d_admin
<where>
<if test="a_username!=null and a_username!='' ">
and a_username like '%${a_username}%'
</if>
<if test="a_describe!=null and a_describe!=''">
and a_describe like '%${a_describe}%'
</if>
<if test="a_id!=null and a_id!=0">
and a_id like '%${a_id}%'
</if>
</where>
ORDER BY a_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(a_id) from d_admin
<where>
<if test="a_username!=null and a_username!='' ">
and a_username like '%${a_username}%'
</if>
<if test="a_describe!=null and a_describe!=''">
and a_describe like '%${a_describe}%'
</if>
<if test="a_id!=null and a_id!=0">
and a_id like '%${a_id}%'
</if>
</where>
</select>
<!--添加管理员信息-->
<insert id="addAdmin" parameterType="Admin" keyProperty="a_id" useGeneratedKeys="true">
insert into d_admin (a_username,a_password,a_name,a_phone,a_power,a_describe)
values(#{a_username},#{a_password},#{a_name},#{a_phone},#{a_power},#{a_describe})
</insert>
<!--通过id删除管理员信息-->
<delete id="deleteAdmin" parameterType="Integer" >
delete from d_admin where a_id=#{a_id}
</delete>
<select id="findAdminById" parameterType="Integer" resultType="Admin" >
select * from d_admin where a_id=#{a_id}
</select>
<select id="getAll" resultType="Admin">
select * from d_admin;
</select>
<!--修改管理员信息-->
<update id="updateAdmin" parameterType="Admin">
update d_admin
<set>
<if test="a_username!=null and a_username !=''">
a_username=#{a_username},
</if>
<if test="a_password !=null and a_password !=''">
a_password=#{a_password},
</if>
<if test="a_name !=null and a_name !=''">
a_name=#{a_name},
</if>
<if test="a_phone !=null and a_phone !=0">
a_phone=#{a_phone},
</if>
<if test="a_power !=null and a_power !=''">
a_power=#{a_power},
</if>
<if test="a_describe!=null and a_describe!=''">
a_describe=#{a_describe},
</if>
</set>
where a_id = #{a_id}
</update>
</mapper>

@ -1,27 +0,0 @@
package com.itheima.dao;
import com.itheima.po.Class;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* DAO
*/
public interface ClassDao {
/**
*
*/
//获取总条数
public Integer totalCount(@Param("c_classname") String c_classname, @Param("c_classid") Integer c_classid, @Param("c_counsellor") String c_counsellor);
//获取用户列表
public List<Class> getClassList(@Param("c_classname") String c_classname, @Param("c_classid") Integer c_classid, @Param("c_counsellor") String c_counsellor, @Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);
public int deleteClass(Integer c_id); //删除班级信息
public int addClass(Class ucalss); //添加班级信息
public int updateClass(Class uclass); //修改班级信息
public Class findClassById(Integer c_id);
public List<Class> findClassStudent(Class uclass);//查询班级人员信息
public List<Class> getAll();
}

@ -1,105 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.ClassDao" >
<!--分页查询-->
<select id="getClassList" parameterType="Class" resultType="Class">
select *from d_class
<where>
<if test="c_classname!=null and c_classname!='' ">
and c_classname like '%${c_classname}%'
</if>
<if test="c_counsellor!=null and c_counsellor!=''">
and c_counsellor like '%${c_counsellor}%'
</if>
<if test="c_classid!=null and c_classid!=0">
and c_classid like '%${c_classid}%'
</if>
</where>
ORDER BY c_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(c_id) from d_class
<where>
<if test="c_classname!=null and c_classname!='' ">
and c_classname like '%${c_classname}%'
</if>
<if test="c_counsellor!=null and c_counsellor!=''">
and c_counsellor like '%${c_counsellor}%'
</if>
<if test="c_classid!=null and c_classid!=0">
and c_classid like '%${c_classid}%'
</if>
</where>
</select>
<!--通过id删除班级信息-->
<delete id="deleteClass" parameterType="Integer" >
delete from d_class where c_id=#{c_id}
</delete>
<!--添加班级信息-->
<insert id="addClass" parameterType="Class" keyProperty="c_id" useGeneratedKeys="true">
insert into d_class (c_classid,c_classname,c_counsellor)
values(#{c_classid},#{c_classname},#{c_counsellor})
</insert>
<select id="findClassById" parameterType="Integer" resultType="Class" >
select * from d_class where c_id=#{c_id}
</select>
<!--修改班级信息-->
<update id="updateClass" parameterType="Class">
update d_class
<set>
<if test="c_classid!=null and c_classid!=0">
c_classid=#{c_classid},
</if>
<if test="c_classname !=null and c_classname !=''">
c_classname=#{c_classname},
</if>
<if test="c_counsellor !=null and c_counsellor !=''">
c_counsellor=#{c_counsellor},
</if>
</set>
where c_id = #{c_id}
</update>
<!--Mybatis使用Collection进行表关联查询关联一对多数据类型(class为一student为多)且需要有id-->
<!--Association关联一对一类型-->
<!--班级人员信息查询信息-->
<resultMap type="com.itheima.po.Class" id="cardAndInfo2">
<id property="c_id" column="c_id"/>
<result property="c_classid" column="c_classid"/>
<result property="c_classname" column="c_classname"/>
<result property="c_counsellor" column="c_counsellor"/>
<collection property="students" ofType="com.itheima.po.Student" javaType="ArrayList">
<id property="s_id" column="s_id"/>
<result property="s_studentid" column="s_studentid"/>
<result property="s_name" column="s_name"/>
<result property="s_sex" column="s_sex"/>
<result property="s_age" column="s_age"/>
<result property="s_phone" column="s_phone"/>
<result property="s_classid" column="s_classid"/>
<result property="s_classname" column="s_classname"/>
<result property="s_dormitoryid" column="s_dormitoryid"/>
</collection>
</resultMap>
<!--SQL选择属性与构造的resultMap属性名要一致-->
<select id="findClassStudent" parameterType="Class" resultMap="cardAndInfo2">
SELECT uclass.c_id as c_id,uclass.c_classid as c_classid,uclass.c_classname as c_classname,uclass.c_counsellor as c_counsellor,
student.s_id as s_id,student.s_studentid as s_studentid,student.s_name as s_name,student.s_sex as s_sex,student.s_age as s_age,
student.s_phone as s_phone,student.s_classid as s_classid,student.s_classname as s_classname,student.s_dormitoryid as s_dormitoryid
FROM d_class uclass join d_student student
on uclass.c_classid = student.s_classid
and uclass.c_classname = student.s_classname
where uclass.c_classid = #{c_classid}
and uclass.c_classname = #{c_classname}
</select>
<select id="getAll" resultType="Class">
select * from d_class;
</select>
</mapper>

@ -1,29 +0,0 @@
package com.itheima.dao;
import com.itheima.po.DormClean;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @program: dormitorySystem
* @description: 宿
* @author: Joyrocky
* @create: 2019-04-24 14:37
**/
public interface DormCleanDao {
/**
*
*/
//获取总条数
public Integer totalCount(@Param("d_id") Integer d_id, @Param("d_dormbuilding") String d_dormbuilding);
//获取用户列表
public List<DormClean> getDormCleanList(@Param("d_id") Integer d_id, @Param("d_dormbuilding") String d_dormbuilding, @Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);
public int addDormClean(DormClean dormclean); //添加宿舍卫生信息
public int deleteDormClean(Integer g_id); //删除宿舍卫生信息
public int updateDormClean(DormClean dormclean); //修改宿舍卫生信息
public DormClean findDormCleanById(Integer g_id);
public List<DormClean> getAll();
}

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.DormCleanDao" >
<!--分页查询-->
<select id="getDormCleanList" parameterType="DormClean" resultType="DormClean">
select *from d_dormgrade
<where>
<if test="d_id!=null and d_id!=0">
and d_id like '%${d_id}%'
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
ORDER BY g_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(g_id) from d_dormgrade
<where>
<if test="d_id!=null and d_id!=0">
and d_id like '%${d_id}%'
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
</select>
<!--添加宿舍卫生信息-->
<insert id="addDormClean" parameterType="DormClean" keyProperty="g_id" useGeneratedKeys="true">
insert into d_dormgrade (d_id,d_dormbuilding,d_grade,create_time,update_time)
values(#{d_id},#{d_dormbuilding},#{d_grade},now(),now())
</insert>
<!--通过id删除宿舍卫生信息-->
<delete id="deleteDormClean" parameterType="Integer" >
delete from d_dormgrade where g_id=#{g_id}
</delete>
<select id="findDormCleanById" parameterType="Integer" resultType="DormClean" >
select * from d_dormgrade where g_id=#{g_id}
</select>
<!--修改宿舍卫生信息-->
<update id="updateDormClean" parameterType="DormClean">
update d_dormgrade
<set>
<if test="d_id!=null and d_id!=0">
d_id=#{d_id},
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
d_dormbuilding=#{d_dormbuilding},
</if>
<if test="d_grade!=null and d_grade!=0">
d_grade=#{d_grade},
</if>
<if test="update_time != null" >
update_time = now(),
</if>
</set>
where g_id = #{g_id}
</update>
<select id="getAll" resultType="DormClean">
select * from d_dormgrade;
</select>
<!--宿舍卫生信息查询信息-->
<resultMap type="com.itheima.po.DormClean" id="cardAndInfo2">
<id property="d_id" column="d_id"/>
<result property="d_dormbuilding" column="d_dormbuilding" />
</resultMap>
</mapper>

@ -1,31 +0,0 @@
package com.itheima.dao;
import com.itheima.po.DormRepair;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @program: dormitorySystem
* @description:
* @author: Joyrocky
* @create: 2019-04-27 17:20
**/
public interface DormRepairDao {
/**
*
*/
//获取总条数
public Integer totalCount(@Param("d_id") Integer d_id, @Param("d_dormbuilding") String d_dormbuilding);
//获取用户列表
public List<DormRepair> getDormRepairList(@Param("d_id") Integer d_id, @Param("d_dormbuilding") String d_dormbuilding, @Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);
public int addDormRepair(DormRepair dormrepair); //添加宿舍信息
public int deleteDormRepair(Integer r_id); //删除宿舍信息
public int updateDormRepair(DormRepair dormrepair); //修改宿舍信息
public DormRepair findDormRepairById(Integer r_id);
public List<DormRepair> getAll();
}

@ -1,87 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.DormRepairDao" >
<!--分页查询-->
<select id="getDormRepairList" parameterType="DormRepair" resultType="DormRepair">
select *from d_dormrepair
<where>
<if test="d_id!=null and d_id!=0">
and d_id like '%${d_id}%'
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
ORDER BY r_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(r_id) from d_dormrepair
<where>
<if test="d_id!=null and d_id!=0">
and d_id like '%${d_id}%'
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
</select>
<!--添加宿舍信息-->
<insert id="addDormRepair" parameterType="DormRepair" keyProperty="r_id" useGeneratedKeys="true">
insert into d_dormrepair (d_id,d_dormbuilding,r_name,reason,create_time,update_time)
values(#{d_id},#{d_dormbuilding},#{r_name},#{reason},now(),now())
</insert>
<!--通过id删除宿舍信息-->
<delete id="deleteDormRepair" parameterType="Integer" >
delete from d_dormrepair where r_id=#{r_id}
</delete>
<select id="findDormRepairById" parameterType="Integer" resultType="DormRepair" >
select * from d_dormrepair where r_id=#{r_id}
</select>
<select id="getAll" resultType="DormRepair">
select * from d_dormrepair;
</select>
<!--修改宿舍信息-->
<update id="updateDormRepair" parameterType="DormRepair">
update d_dormrepair
<set>
<if test="d_id!=null and d_id!=0">
d_id=#{d_id},
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
d_dormbuilding=#{d_dormbuilding},
</if>
<if test="r_name !=null and r_name !=''">
r_name=#{r_name},
</if>
<if test="reason !=null and reason !=''">
reason=#{reason},
</if>
<if test="update_time !=null ">
update_time=now(),
</if>
</set>
where r_id = #{r_id}
</update>
<!--宿舍人员信息查询信息-->
<resultMap type="com.itheima.po.DormRepair" id="cardAndInfo2">
<id property="r_id" column="r_id"/>
<result property="d_id" column="d_id" />
<result property="d_dormbuilding" column="d_dormbuilding" />
<result property="r_name" column="r_name"/>
<result property="reason" column="reason"/>
<result property="create_time" column="create_time"/>
<result property="update_time" column="update_time"/>
</resultMap>
</mapper>

@ -1,29 +0,0 @@
package com.itheima.dao;
import com.itheima.po.Dormitory;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* DAO
*/
public interface DormitoryDao {
/**
*
*/
//获取总条数
public Integer totalCount(@Param("a_name") String a_name, @Param("s_dormitoryid") Integer s_dormitoryid,@Param("d_dormbuilding") String d_dormbuilding);
//获取用户列表
public List<Dormitory> getDormitoryList(@Param("a_name") String a_name, @Param("s_dormitoryid") Integer s_dormitoryid, @Param("d_dormbuilding") String d_dormbuilding, @Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);
public int addDormitory(Dormitory dormitory); //添加宿舍信息
public int deleteDormitory(Integer d_id); //删除宿舍信息
public int updateDormitory(Dormitory dormitory); //修改宿舍信息
public Dormitory findDormitoryById(Integer d_id);
public List<Dormitory> findDormitoryStudent(Dormitory dormitory);//查询宿舍人员信息
public List<Dormitory> getAll();
}

@ -1,109 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.DormitoryDao" >
<!--分页查询-->
<select id="getDormitoryList" parameterType="Dormitory" resultType="Dormitory">
select *from d_dormitoryinfo
<where>
<if test="a_name!=null and a_name!=''">
and a_name like '%${a_name}%'
</if>
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
and s_dormitoryid like '%${s_dormitoryid}%'
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
ORDER BY d_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(s_dormitoryid) from d_dormitoryinfo
<where>
<if test="a_name!=null and a_name!=''">
and a_name like '%${a_name}%'
</if>
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
and s_dormitoryid like '%${s_dormitoryid}%'
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
and d_dormbuilding like '%${d_dormbuilding}%'
</if>
</where>
</select>
<!--添加宿舍信息-->
<insert id="addDormitory" parameterType="Dormitory" keyProperty="d_id" useGeneratedKeys="true">
insert into d_dormitoryinfo (s_dormitoryid,d_dormbuilding,d_bedtotal,d_bed,a_name)
values(#{s_dormitoryid},#{d_dormbuilding},#{d_bedtotal},#{d_bed},#{a_name})
</insert>
<!--通过id删除宿舍信息-->
<delete id="deleteDormitory" parameterType="Integer" >
delete from d_dormitoryinfo where d_id=#{d_id}
</delete>
<select id="findDormitoryById" parameterType="Integer" resultType="Dormitory" >
select * from d_dormitoryinfo where d_id=#{d_id}
</select>
<!--修改宿舍信息-->
<update id="updateDormitory" parameterType="Dormitory">
update d_dormitoryinfo
<set>
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
s_dormitoryid=#{s_dormitoryid},
</if>
<if test="d_dormbuilding !=null and d_dormbuilding !=''">
d_dormbuilding=#{d_dormbuilding},
</if>
<if test="d_bedtotal !=null and d_bedtotal !=''">
d_bedtotal=#{d_bedtotal},
</if>
<if test="d_bed !=null and d_bed !=''">
d_bed=#{d_bed},
</if>
<if test="a_name !=null and a_name !=''">
a_name=#{a_name},
</if>
</set>
where d_id = #{d_id}
</update>
<!--宿舍人员信息查询信息-->
<resultMap type="com.itheima.po.Dormitory" id="cardAndInfo2">
<id property="d_id" column="d_id"/>
<result property="s_dormitoryid" column="s_dormitoryid" />
<result property="d_dormbuilding" column="d_dormbuilding" />
<result property="d_bedtotal" column="d_bedtotal"/>
<result property="d_bed" column="d_bed"/>
<result property="a_name" column="a_name"/>
<collection property="students" ofType="com.itheima.po.Student" javaType="ArrayList">
<id property="s_id" column="s_id"/>
<result property="s_studentid" column="s_studentid"/>
<result property="s_name" column="s_name"/>
<result property="s_sex" column="s_sex"/>
<result property="s_age" column="s_age"/>
<result property="s_phone" column="s_phone"/>
<result property="s_classid" column="s_classid"/>
<result property="s_classname" column="s_classname"/>
<result property="s_dormitoryid" column="s_dormitoryid"/>
</collection>
</resultMap>
<select id="findDormitoryStudent" parameterType="Dormitory" resultMap="cardAndInfo2">
SELECT dormitoryinfos.*,students.*
FROM d_dormitoryinfo dormitoryinfos join d_student students
on dormitoryinfos.s_dormitoryid = students.s_dormitoryid
where dormitoryinfos.s_dormitoryid = #{s_dormitoryid}
</select>
<select id="getAll" resultType="Dormitory">
select * from d_dormitoryinfo;
</select>
</mapper>

@ -1,29 +0,0 @@
package com.itheima.dao;
import com.itheima.po.StudentClean;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @program: dormitorySystem
* @description:
* @author: Joyrocky
* @create: 2019-04-25 12:14
**/
public interface StudentCleanDao {
/**
*
*/
//获取总条数
public Integer totalCount(@Param("s_studentid") Integer s_studentid, @Param("s_name") String s_name,@Param("s_dormitoryid") Integer s_dormitoryid);
//获取用户列表
public List<StudentClean> getStudentCleanList(@Param("s_studentid") Integer s_studentid, @Param("s_name") String s_name, @Param("s_dormitoryid") Integer s_dormitoryid, @Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);
public int addStudentClean(StudentClean studentclean); //添加宿舍卫生信息
public int deleteStudentClean(Integer g_id); //删除宿舍卫生信息
public int updateStudentClean(StudentClean studentclean); //修改宿舍卫生信息
public StudentClean findStudentCleanById(Integer g_id);
public List<StudentClean> getAll();
}

@ -1,96 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.StudentCleanDao" >
<!--分页查询-->
<select id="getStudentCleanList" parameterType="StudentClean" resultType="StudentClean">
select *from d_stgrade
<where>
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
</if>
<if test="s_name !=null and s_name !=''">
and s_name like '%${s_name}%'
</if>
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
and s_dormitoryid like '%${s_dormitoryid}%'
</if>
</where>
ORDER BY g_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(g_id) from d_stgrade
<where>
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
</if>
<if test="s_name !=null and s_name !=''">
and s_name like '%${s_name}%'
</if>
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
and s_dormitoryid like '%${s_dormitoryid}%'
</if>
</where>
</select>
<!--添加宿舍卫生信息-->
<insert id="addStudentClean" parameterType="StudentClean" keyProperty="g_id" useGeneratedKeys="true">
insert into d_stgrade (s_studentid,s_name,s_grade,s_classid,s_dormitoryid,create_time,update_time)
values(#{s_studentid},#{s_name},#{s_grade},#{s_classid},#{s_dormitoryid},now(),now())
</insert>
<!--通过id删除宿舍卫生信息-->
<delete id="deleteStudentClean" parameterType="Integer" >
delete from d_stgrade where g_id=#{g_id}
</delete>
<select id="findStudentCleanById" parameterType="Integer" resultType="StudentClean" >
select * from d_stgrade where g_id=#{g_id}
</select>
<select id="getAll" resultType="StudentClean">
select * from d_stgrade;
</select>
<!--修改宿舍卫生信息-->
<update id="updateStudentClean" parameterType="StudentClean">
update d_stgrade
<set>
<if test="s_studentid!=null and s_studentid!=0">
s_studentid=#{s_studentid},
</if>
<if test="s_name !=null and s_name !=''">
s_name=#{s_name},
</if>
<if test="s_grade!=null and s_grade!=0">
s_grade=#{s_grade},
</if>
<if test="s_classid!=null and s_classid!=0">
s_classid=#{s_classid},
</if>
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
s_dormitoryid=#{s_dormitoryid},
</if>
<if test="update_time != null" >
update_time = now(),
</if>
</set>
where g_id = #{g_id}
</update>
<!--宿舍卫生信息查询信息-->
<resultMap type="com.itheima.po.StudentClean" id="cardAndInfo2">
<id property="g_id" column="g_id"/>
<result property="s_studentid" column="s_studentid" />
<result property="s_name" column="s_name" />
<result property="s_grade" column="s_grade" />
<result property="s_classid" column="s_classid" />
<result property="s_dormitoryid" column="s_dormitoryid" />
</resultMap>
</mapper>

@ -1,28 +0,0 @@
package com.itheima.dao;
import com.itheima.po.Student;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* DAO
*/
public interface StudentDao {
/**
*
*/
//获取总条数
public Integer totalCount(@Param("s_name") String s_name, @Param("s_studentid")Integer s_studentid,
@Param("s_classid")Integer s_classid,@Param("s_classname")String s_classname);
//获取用户列表
public List<Student> getStudentList(@Param("s_name") String s_name, @Param("s_studentid")Integer s_studentid,@Param("s_classid")Integer s_classid,
@Param("s_classname")String s_classname, @Param("currentPage")Integer currentPage, @Param("pageSize")Integer pageSize);
public int deleteStudent(Integer s_id); //删除学生信息
public int addStudent(Student student); //添加学生信息
public int updateStudent(Student student); //修改学生信息
public Student findStudentById(Integer s_id);
public List<Student> getAll();
}

@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.StudentDao" >
<!--分页查询-->
<select id="getStudentList" parameterType="Student" resultType="Student">
select *from d_student
<where>
<if test="s_name!=null and s_name!='' ">
and s_name like '%${s_name}%'
</if>
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
</if>
<if test="s_classid!=null and s_classid!=0">
and s_classid like '%${s_classid}%'
</if>
<if test="s_classname!=null and s_classname!='' ">
and s_classname like '%${s_classname}%'
</if>
</where>
ORDER BY s_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(s_studentid) from d_student
<where>
<if test="s_name!=null and s_name!='' ">
and s_name like '%${s_name}%'
</if>
<if test="s_studentid!=null and s_studentid!=0">
and s_studentid like '%${s_studentid}%'
</if>
<if test="s_classid!=null and s_classid!=0">
and s_classid like '%${s_classid}%'
</if>
<if test="s_classname!=null and s_classname!='' ">
and s_classname like '%${s_classname}%'
</if>
</where>
</select>
<!--通过id删除学生信息-->
<delete id="deleteStudent" parameterType="Integer" >
delete from d_student where s_id=#{s_id}
</delete>
<!--添加学生信息-->
<insert id="addStudent" parameterType="Student" keyProperty="s_id" useGeneratedKeys="true">
insert into d_student (s_studentid,s_name,s_sex,s_age,s_phone,s_classid,s_classname,s_dormitoryid)
values(#{s_studentid},#{s_name},#{s_sex},#{s_age},#{s_phone},#{s_classid},#{s_classname},#{s_dormitoryid})
</insert>
<select id="findStudentById" parameterType="Integer" resultType="Student" >
select * from d_student where s_id=#{s_id}
</select>
<!--修改学生信息-->
<update id="updateStudent" parameterType="Student">
update d_student
<set>
<if test="s_studentid!=null and s_studentid!=0">
s_studentid=#{s_studentid},
</if>
<if test="s_name !=null and s_name !=''">
s_name=#{s_name},
</if>
<if test="s_sex !=null and s_sex !=''">
s_sex=#{s_sex},
</if>
<if test="s_age !=null and s_age !=0">
s_age=#{s_age},
</if>
<if test="s_phone !=null and s_phone !=0">
s_phone=#{s_phone},
</if>
<if test="s_classid!=null and s_classid!=0">
s_classid=#{s_classid},
</if>
<if test="s_classname !=null and s_classname !=''">
s_classname=#{s_classname},
</if>
<if test="s_dormitoryid!=null and s_dormitoryid!=0">
s_dormitoryid=#{s_dormitoryid},
</if>
</set>
where s_id = #{s_id}
</update>
<select id="getAll" resultType="Student">
select * from d_student;
</select>
</mapper>

@ -1,27 +0,0 @@
package com.itheima.dao;
import com.itheima.po.Visitor;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @program: dormitorySystem
* @description: 访
* @author: Joyrocky
* @create: 2019-05-14 12:57
**/
public interface VisitorDao {
/**
*
*/
//获取总条数
public Integer totalCount(@Param("v_name") String v_name, @Param("v_phone")Integer v_phone);
//获取用户列表
public List<Visitor> getVisitorList(@Param("v_name") String v_name, @Param("v_phone")Integer v_phone,@Param("currentPage")Integer currentPage, @Param("pageSize")Integer pageSize);
public int addVisitor(Visitor visitor); //添加学生信息
public List<Visitor> getAll();
}

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.itheima.dao.VisitorDao" >
<!--分页查询-->
<select id="getVisitorList" parameterType="Visitor" resultType="Visitor">
select * from d_visitor
<where>
<if test="v_name!=null and v_name!='' ">
and v_name like '%${v_name}%'
</if>
<if test="v_phone!=null and v_phone!=0">
and v_phone like '%${v_phone}%'
</if>
</where>
ORDER BY v_id asc
limit #{currentPage},#{pageSize}
</select>
<!--查询数据总数-->
<select id="totalCount" resultType="Integer">
select count(v_id) from d_visitor
<where>
<if test="v_name!=null and v_name!='' ">
and v_name like '%${v_name}%'
</if>
<if test="v_phone!=null and v_phone!=0">
and v_phone like '%${v_phone}%'
</if>
</where>
</select>
<!--添加学生信息-->
<insert id="addVisitor" parameterType="Visitor" keyProperty="v_id" useGeneratedKeys="true">
insert into d_visitor (v_name,v_phone,v_dormitoryid,v_dormbuilding,create_time)
values(#{v_name},#{v_phone},#{v_dormitoryid},#{v_dormbuilding},now())
</insert>
<select id="getAll" resultType="Visitor">
select * from d_visitor;
</select>
</mapper>

@ -10,10 +10,13 @@
<html>
<head>
<title>修改信息</title>
<!-- 设置网页图标 -->
<link rel="icon" href="/images/favicon.ico" sizes="32x32" />
<!-- 引入CSS样式文件 -->
<link rel="stylesheet" href="/css/font.css">
<link rel="stylesheet" href="/css/xadmin.css">
<link rel="stylesheet" href="/css/pg_btn.css">
<!-- 引入JavaScript脚本文件 -->
<script type="text/javascript" src="./js/jquery-1.3.2.min.js"></script>
<script src="lib/layui/layui.js"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
@ -22,9 +25,12 @@
<body>
<div class="x-body">
<%--把表单封装成一个Admin对象传给服务端--%>
<form class="layui-form" id="f_auto" action="/updateAdmin" method="post">
<!-- 表单开始,用于提交修改后的管理员信息 -->
<form class="layui-form" id="f_auto" action="/updateAdmin" method="post">
<!-- 隐藏字段存储管理员ID -->
<input type="hidden" value="${sessionScope.a.a_id}" name="a_id" id="a_id" class="layui-input"/>
<!-- 用户名输入框 -->
<div class="layui-form-item">
<label for="a_username" class="layui-form-label">
<span class="">用户名</span>
@ -35,6 +41,7 @@
</div>
</div>
<!-- 密码输入框 -->
<div class="layui-form-item">
<label for="a_password" class="layui-form-label">
<span class="">密码</span>
@ -45,6 +52,7 @@
</div>
</div>
<!-- 姓名输入框 -->
<div class="layui-form-item">
<label for="a_name" class="layui-form-label">
<span class="">姓名</span>
@ -55,6 +63,7 @@
</div>
</div>
<!-- 电话输入框 -->
<div class="layui-form-item">
<label for="a_phone" class="layui-form-label">
<span class="">电话</span>
@ -65,6 +74,7 @@
</div>
</div>
<!-- 级别输入框 -->
<div class="layui-form-item">
<label for="a_power" class="layui-form-label">
<span class="">级别</span>
@ -75,6 +85,7 @@
</div>
</div>
<!-- 级别描述输入框 -->
<div class="layui-form-item">
<label for="a_describe" class="layui-form-label">
<span class="">级别描述</span>
@ -85,14 +96,17 @@
</div>
</div>
<!-- 提交按钮 -->
<div class="layui-form-item" id="btn_xg">
<button class="layui-btn" id="btn_on" lay-submit="" lay-filter="updateAdmin">
<button class="layui-btn" id="btn_on" lay-submit="" lay-filter="updateAdmin">
修改
</button>
</div>
</form>
</div>
</body>
</html>
<script>
// layui.use(['form','layer','laydate'], function(){

@ -11,23 +11,28 @@
<html>
<head>
<title>后台登录</title>
<!-- 设置页面相关元数据 -->
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<%--<meta http-equiv="Cache-Control" content="no-siteapp" />--%>
<!-- 引入图标 -->
<link rel="icon" href="/images/favicon.ico" sizes="32x32" />
<!-- 引入CSS样式文件 -->
<link rel="stylesheet" href="/css/font.css">
<link rel="stylesheet" href="/css/xadmin.css">
<!-- 引入JavaScript脚本文件 -->
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
<script src="/lib/layui/layui.js"></script>
<script type="text/javascript" src="/js/xadmin.js"></script>
<script src="/layui_exts/excel.js"></script>
<!-- 自定义样式 -->
<style type="text/css">
.layui-table{
text-align: center;
}
text-align: center;
}
.layui-table th{
text-align: center;
}
@ -36,29 +41,37 @@
<body>
<div class="x-nav">
<span class="layui-breadcrumb">
<!-- 面包屑导航 -->
<span class="layui-breadcrumb">
<a href="">首页</a>
<a href="/findAdmin">管理员信息</a>
</span>
<!-- 刷新按钮 -->
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="/findAdmin" title="刷新">
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
<div class="layui-row">
<!-- 搜索表单 -->
<form class="layui-form layui-col-md12 x-so" action="/findAdmin" >
<input type="hidden" class="layui-input" placeholder="请输入用户名" name="a_id" id="a_id">
<input class="layui-input" placeholder="请输入用户名" name="a_username" id="a_username">
<input class="layui-input" placeholder="请输入级别描述" name="a_describe" id="a_describe" >
<!-- 分页信息,隐藏字段 -->
<input class="layui-input" type="hidden" name="pageIndex" value="1">
<input class="layui-input" type="hidden" name="pageSize" value="3">
<!-- 搜索按钮 -->
<button class="layui-btn" lay-submit="" lay-filter="search"><i class="layui-icon">&#xe615;</i></button>
</form>
</div>
<xblock>
<!-- 添加管理员按钮 -->
<button id="addStudnetBtn" class="layui-btn layui-btn-normal"> <i class="layui-icon">&#xe654;</i>添加</button>
<!-- 导出按钮 -->
<button class="layui-btn layui-btn-warm" lay-filter="toolbarDemo" lay-submit=""><i class="layui-icon">&#xe67c;</i>导出</button>
<!-- 显示数据总数 -->
<span class="x-right" style="line-height:40px">共有数据:${ai.totalCount} 条</span>
</xblock>
@ -67,7 +80,7 @@
<thead>
<tr>
<%--<th>--%>
<%--<div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>--%>
<%--<div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>--%>
<%--</th>--%>
<th>ID</th>
<th>用户名</th>
@ -79,30 +92,34 @@
<th>操作</th>
</thead>
<tbody>
<c:forEach items="${ai.list}" var="ai">
<tr>
<%--<td>--%>
<%--<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>--%>
<%--</td>--%>
<%--<td>${class.c_id}</td>--%>
<td class="myid">${ai.a_id}</td>
<td>${ai.a_username}</td>
<%--<td>${ai.a_password}</td>--%>
<td>${ai.a_name}</td>
<td>${ai.a_phone}</td>
<%--<td>${ai.a_power}</td>--%>
<td>${ai.a_describe}</td>
<td class="td-manage">
<%--href="/findAdminById?a_id=${ai.a_id}"--%>
<a title="编辑" class="updateEdit" href="#">
<i class="layui-icon">&#xe642;</i>
</a>
<a title="删除" onclick="member_del(this,'${ai.a_id}','${ai.a_power}')" href="javascript:;">
<i class="layui-icon">&#xe640;</i>
</a>
</td>
</tr>
</c:forEach>
<!-- 循环遍历管理员信息列表,为每个管理员生成一行数据 -->
<c:forEach items="${ai.list}" var="ai">
<tr>
<%--<td>--%>
<%--<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>--%>
<%--</td>--%>
<td class="myid">${ai.a_id}</td>
<!-- 显示管理员ID -->
<td>${ai.a_username}</td>
<!-- 显示管理员用户名 -->
<%--<td>${ai.a_password}</td>--%> <!-- 注释掉密码显示 -->
<td>${ai.a_name}</td>
<!-- 显示管理员姓名 -->
<td>${ai.a_phone}</td>
<!-- 显示管理员电话 -->
<%--<td>${ai.a_power}</td>--%> <!-- 注释掉级别显示 -->
<td>${ai.a_describe}</td> <!-- 显示管理员级别描述 -->
<td class="td-manage">
<!-- 编辑和删除按钮 -->
<a title="编辑" class="updateEdit" href="#">
<i class="layui-icon">&#xe642;</i>
</a>
<a title="删除" onclick="member_del(this,'${ai.a_id}','${ai.a_power}')" href="javascript:;">
<i class="layui-icon">&#xe640;</i>
</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
@ -162,7 +179,8 @@
</div>
</div>
<div class="" >
<div class="" >
<input type="hidden" id="totalPageCount" value="${ai.pageTotalCount}"/>
<c:import url="pageBtn.jsp">
<c:param name="totalCount" value="${ai.totalCount}"/>
@ -173,124 +191,194 @@
</div>
<script>
// 配置layui的扩展模块路径
layui.config({
base: 'layui_exts/',
// 设置扩展模块的路径
}).extend({
excel: 'excel',
// 添加excel模块
});
layui.use(['jquery', 'excel', 'form','layer','laydate'], function(){
// 使用layui模块
layui.use(['jquery', 'excel', 'form', 'layer', 'laydate'], function(){
var form = layui.form,
// 获取form模块
$ = layui.jquery,
// 获取jQuery模块
laydate = layui.laydate;
// 获取laydate模块
var excel = parent.layui.excel;
// 获取父页面的excel模块
//执行一个laydate实例
// 初始化laydate日期选择器
laydate.render({
elem: '#start' //指定元素
elem: '#start'
// 指定绑定日期选择器的元素
});
form.render();
// 重新渲染表单元素以便layui能够识别新的表单元素
// 监听表单提交事件
form.on('submit(toolbarDemo)', function(){
// 发起ajax请求获取导出数据
$.ajax({
url: '/exportadminlist',
// 请求的URL
type: 'post',
// 请求类型
dataType: 'json',
// 预期服务器返回的数据类型
contentType: "application/json; charset=utf-8",
// 发送信息至服务器时内容编码类型
success: function (data) {
// 请求成功后的回调函数
console.log(data);
// 在控制台打印返回的数据
// 1. 如果需要调整顺序,请执行梳理函数
// 1. 调整导出数据的顺序
var dt = excel.filterExportData(data, [
'a_id'
,'a_username'
,'a_name'
,'a_phone'
,'a_describe'
'a_id',
// ID
'a_username',
// 用户名
'a_name',
// 姓名
'a_phone',
// 电话
'a_describe'
// 级别描述
]);
// 2. 数组头部新增表头
dt.unshift({a_id: 'ID', a_username: '用户名', a_name: '姓名', a_phone: '电话', a_describe: '级别描述'});
// 2. 在数据数组头部添加表头信息
dt.unshift({
a_id: 'ID',
a_username: '用户名',
a_name: '姓名',
a_phone: '电话',
a_describe: '级别描述'
});
// 意思是A列40pxB列60px(默认)C列120pxD、E、F等均未定义
// 3. 设置列宽配置
var colConf = excel.makeColConfig({
'A': 40,
// A列宽度40px
'D': 90
// D列宽度90px
}, 60);
// 其他未定义列的默认宽度为60px
// 4. 记录开始时间
var timestart = Date.now();
// 3. 执行导出函数,系统会弹出弹框
// 5. 执行导出函数,系统会弹出下载框
excel.exportExcel({
sheet1: dt
// 数据
}, '管理员数据.xlsx', 'xlsx', {
// 文件名和类型
extend: {
'!cols': colConf
// 列配置
}
});
// 6. 记录结束时间
var timeend = Date.now();
// 7. 计算耗时
var spent = (timeend - timestart) / 1000;
layer.alert('导出耗时 '+spent+' s');
//setTimeout(function () {window.location.href='/findAdmin';},2000);
// 弹出耗时信息
//setTimeout(function () {window.location.href='/findAdmin';},2000); // 2秒后跳转页面
},
error: function () {
// 请求失败后的回调函数
//console.log(data);
// 在控制台打印错误信息
setTimeout(function () {window.location.href='/findAdmin';},2000);
// 2秒后跳转页面
}
});
});
});
/*添加弹出框*/
$("#addStudnetBtn").click(function () {
layer.open({
type:1,
title:"添加管理员",
skin:"myclass",
area:["50%"],
anim:2,
content:$("#test").html()
});
$("#addEmployeeForm")[0].reset();
form.on('submit(formDemo)', function(data) {
// layer.msg('aaa',{icon:1,time:3000});
var param=data.field;
// console.log(JSON.stringify(param));
$.ajax({
url: '/addAdmin',
type: "post",
data:JSON.stringify(param),
contentType: "application/json; charset=utf-8",
success:function(da){
console.log(da);
layer.msg('添加成功', {icon: 1, time: 2000});
setTimeout(function () {window.location.href='/findAdmin';},2000);
},
error:function(){
layer.msg('添加失败',{icon:0,time:2000});
setTimeout(function () {window.location.href='/findAdmin';},2000);
}
});
// return false;
// 当点击添加管理员按钮时,打开一个弹出层
$("#addStudnetBtn").click(function () {
// 使用layer.open方法打开一个弹出层
layer.open({
type: 1,
// 类型为页面层
title: "添加管理员",
// 弹出层的标题
skin: "myclass",
// 弹出层的皮肤样式
area: ["50%"],
// 弹出层的宽度这里设置为屏幕宽度的50%
anim: 2,
// 弹出层的动画效果
content: $("#test").html()
// 弹出层的内容这里是通过jQuery选择器获取的HTML内容
});
// 重置表单
$("#addEmployeeForm")[0].reset();
// 监听表单提交事件
form.on('submit(formDemo)', function(data) {
// 可以在这里使用layer.msg显示消息提示这里被注释掉了
// layer.msg('aaa',{icon:1,time:3000});
var param = data.field; // 获取表单数据
// console.log(JSON.stringify(param)); // 在控制台打印表单数据,这里被注释掉了
// 发起ajax请求提交表单数据
$.ajax({
url: '/addAdmin', // 请求的URL
type: "post",
// 请求类型
data: JSON.stringify(param),
// 发送到服务器的数据这里是表单数据的JSON字符串
contentType: "application/json; charset=utf-8",
// 发送信息至服务器时内容编码类型
success: function(da){
// 请求成功后的回调函数
console.log(da);
// 在控制台打印服务器返回的数据
layer.msg('添加成功', {icon: 1, time: 2000});
// 显示成功消息提示
setTimeout(function () {window.location.href='/findAdmin';},2000);
// 2秒后跳转到管理员列表页面
},
error: function(){
// 请求失败后的回调函数
layer.msg('添加失败',{icon:0,time:2000});
// 显示失败消息提示
setTimeout(function () {window.location.href='/findAdmin';},2000);
// 2秒后跳转到管理员列表页面
}
});
// return false; // 阻止表单默认提交行为,这里被注释掉了
});
});
/*编辑*/
$(".updateEdit").click(function () {
var myid = $(this).parent("td").parent("tr").children(".myid").html();
//判断
// 获取当前行的管理员ID
var admin_id = ${sessionScope.ad.a_id};
// 获取当前登录管理员的ID
if(admin_id != myid){
// 判断当前登录管理员是否有权限编辑
layer.alert("对不起,您没有权限:(");
// 如果没有权限,弹出提示框
}else {
<%--window.location.href = "/findAdminById?a_id=${ai.a_id}";--%>
window.location.href = "/findAdminById?a_id=" + myid;
// 如果有权限跳转到编辑页面并传递管理员ID
// 这里的注释表示原来的代码被注释掉了
// window.location.href = "/findAdminById?a_id=${ai.a_id}";
}
});
@ -299,8 +387,11 @@
function member_del(obj,a_id,a_power){
var power = ${sessionScope.ad.a_power};
// 获取当前登录管理员的权限
var id = ${sessionScope.ad.a_id};
// 获取当前登录管理员的ID
if(power != 1 && id != a_id){
// 如果没有权限,弹出提示框
layer.alert("对不起,您没有权限:(");
}
// else if(power == 1 && id == a_id){
@ -308,15 +399,20 @@
// }
else {
layer.confirm('确认要删除吗?',function(index){
// 如果有权限,弹出确认框
//发异步删除数据
$.get("/deleteAdmin",{"a_id":a_id},function (data) {
// 发起GET请求删除管理员信息
if(data = true){
// 判断删除操作是否成功
layer.msg('删除成功!',{icon:1,time:2000});
setTimeout(function () {window.location.href='/findAdmin';},2000);
// 如果成功,显示成功消息并跳转
}else {
layer.msg('删除失败!',{icon:1,time:2000});
setTimeout(function () {window.location.href='/findAdmin';},2000);
// 如果失败,显示失败消息并跳转
}
});
});

@ -9,54 +9,76 @@
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<!-- 设置页面标题 -->
<title>修改信息</title>
<!-- 引入页面的图标 -->
<link rel="icon" href="/images/favicon.ico" sizes="32x32" />
<!-- 引入字体样式文件 -->
<link rel="stylesheet" href="/css/font.css">
<!-- 引入xadmin的样式文件 -->
<link rel="stylesheet" href="/css/xadmin.css">
<!-- 引入自定义按钮样式文件 -->
<link rel="stylesheet" href="/css/pg_btn.css">
<!-- 引入jQuery库版本为1.3.2 -->
<script type="text/javascript" src="./js/jquery-1.3.2.min.js"></script>
<!-- 引入layui库 -->
<script src="lib/layui/layui.js"></script>
<!-- 引入xadmin的脚本文件 -->
<script type="text/javascript" src="./js/xadmin.js"></script>
</head>
<body>
<!-- 页面的主体内容区域 -->
<div class="x-body">
<form class="layui-form" id="f_auto" action="/updateClass" method="post" >
<!-- 创建一个layui风格的表单 -->
<form class="layui-form" id="f_auto" action="/updateClass" method="post">
<!-- 隐藏的输入字段用于存储班级ID -->
<input type="hidden" value="${sessionScope.c.c_id}" name="c_id" id="c_id"/>
<!-- 班级编号的表单项 -->
<div class="layui-form-item">
<label for="c_classid" class="layui-form-label">
<!-- 班级编号的标签 -->
<span class="">班级编号</span>
</label>
<div class="layui-input-inline">
<!-- 班级编号的输入框 -->
<input type="text" id="c_classid" name="c_classid"
autocomplete="off" value="${sessionScope.c.c_classid}" class="layui-input">
</div>
</div>
<!-- 班级名的表单项 -->
<div class="layui-form-item">
<label for="c_classname" class="layui-form-label">
<!-- 班级名的标签 -->
<span class="">班级名</span>
</label>
<div class="layui-input-inline">
<!-- 班级名的输入框 -->
<input type="text" id="c_classname" name="c_classname"
autocomplete="off" value="${sessionScope.c.c_classname}" class="layui-input">
</div>
</div>
<!-- 辅导员姓名的表单项 -->
<div class="layui-form-item">
<label for="c_counsellor" class="layui-form-label">
<!-- 辅导员姓名的标签 -->
<span class="">辅导员姓名</span>
</label>
<div class="layui-input-inline">
<!-- 辅导员姓名的输入框 -->
<input type="text" id="c_counsellor" name="c_counsellor"
autocomplete="off" value="${sessionScope.c.c_counsellor}" class="layui-input">
</div>
</div>
<!-- 修改按钮的表单项 -->
<div class="layui-form-item" id="btn_xg">
<button class="layui-btn" id="btn_on" lay-submit="" lay-filter="updateClass">
<!-- 修改按钮 -->
<button class="layui-btn" id="btn_on" lay-submit="" lay-filter="updateClass">
修改
</button>
</div>

@ -10,24 +10,37 @@
<html>
<head>
<!-- 设置页面标题 -->
<title>后台登录</title>
<!-- 设置浏览器渲染模式 -->
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<!-- 设置IE浏览器兼容性 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- 设置视图窗口属性,包括宽度、缩放比例等 -->
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<!-- 禁止百度转码 -->
<%--<meta http-equiv="Cache-Control" content="no-siteapp" />--%>
<!-- 引入页面的图标 -->
<link rel="icon" href="/images/favicon.ico" sizes="32x32" />
<!-- 引入字体样式文件 -->
<link rel="stylesheet" href="./css/font.css">
<!-- 引入xadmin的样式文件 -->
<link rel="stylesheet" href="./css/xadmin.css">
<!-- 引入jQuery库版本为1.3.2 -->
<script type="text/javascript" src="./js/jquery-1.3.2.min.js"></script>
<!-- 引入layui库 -->
<script src="lib/layui/layui.js"></script>
<!-- 引入xadmin的脚本文件 -->
<script type="text/javascript" src="./js/xadmin.js"></script>
<!-- 引入layui的扩展插件用于导出Excel -->
<script src="/layui_exts/excel.js"></script>
<!-- 自定义样式,设置表格内容居中 -->
<style type="text/css">
.layui-table{
text-align: center;
}
text-align: center;
}
.layui-table th{
text-align: center;
}
@ -35,60 +48,85 @@
</head>
<body>
<!-- 顶部导航 -->
<div class="x-nav">
<span class="layui-breadcrumb">
<a href="">首页</a>
<a href="/findClass">班级信息</a>
</span>
<!-- 面包屑导航 -->
<span class="layui-breadcrumb">
<a href="">首页</a>
<a href="/findClass">班级信息</a>
</span>
<!-- 刷新按钮 -->
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="/findClass" title="刷新">
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<!-- 页面主体内容区域 -->
<div class="x-body">
<!-- 搜索表单 -->
<div class="layui-row">
<form class="layui-form layui-col-md12 x-so" action="/findClass" >
<!-- 班级编号输入框 -->
<input class="layui-input" placeholder="请输入班级编号" name="c_classid" id="c_classid">
<!-- 班级名输入框 -->
<input class="layui-input" placeholder="请输入班级名" name="c_classname" id="c_classname">
<!-- 辅导员姓名输入框 -->
<input class="layui-input" placeholder="请输入辅导员姓名" name="c_counsellor" id="c_counsellor">
<!-- 隐藏的页码和页面大小输入框 -->
<input class="layui-input" type="hidden" name="pageIndex" value="1">
<input class="layui-input" type="hidden" name="pageSize" value="3">
<!-- 搜索按钮 -->
<button class="layui-btn" lay-submit="" lay-filter="search"><i class="layui-icon">&#xe615;</i></button>
</form>
</div>
<!-- 操作按钮区域 -->
<xblock>
<!-- 添加班级按钮 -->
<button id="addStudnetBtn" class="layui-btn layui-btn-normal"> <i class="layui-icon">&#xe654;</i>添加 </button>
<!-- 导出按钮 -->
<button class="layui-btn layui-btn-warm" lay-filter="toolbarDemo" lay-submit=""><i class="layui-icon">&#xe67c;</i>导出</button>
<!-- 显示数据总数 -->
<span class="x-right" style="line-height:40px">共有数据:${ci.totalCount} 条</span>
</xblock>
<%--添加模态框--%>
<%-- 添加模态框的HTML结构 --%>
<div class="layui-row" id="test" style="display: none;">
<!-- 模态框内容区域宽度为10/12 -->
<div class="layui-col-md10">
<!-- 添加班级信息的表单 -->
<form class="layui-form" id="addEmployeeForm">
<!-- 班级编号输入项 -->
<div class="layui-form-item">
<label class="layui-form-label">班级编号:</label>
<!-- 输入框块 -->
<div class="layui-input-block">
<input type="text" name="c_classid" class="layui-input" placeholder="请输入班级编号">
</div>
</div>
<!-- 班级名输入项 -->
<div class="layui-form-item">
<label class="layui-form-label">班级名:</label>
<!-- 输入框块,并设置必填校验 -->
<div class="layui-input-block">
<input type="text" lay-verify="required" name="c_classname" class="layui-input" placeholder="请输入班级名">
<input type="text" lay-verify="required" name="c_classname" class="layui-input" placeholder="请输入班级名">
</div>
</div>
<!-- 辅导员姓名输入项 -->
<div class="layui-form-item">
<label class="layui-form-label">辅导员:</label>
<!-- 输入框块 -->
<div class="layui-input-block">
<input type="text" name="c_counsellor" class="layui-input" placeholder="请输入辅导员姓名">
</div>
</div>
<!-- 提交和重置按钮 -->
<div class="layui-form-item">
<div class="layui-input-block">
<!-- 提交按钮,绑定表单提交事件 -->
<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">提交</button>
<!-- 重置按钮,用于重置表单 -->
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
@ -99,168 +137,254 @@
<%--表格数据--%>
<%-- 表格数据展示区域 --%>
<table class="layui-table">
<!-- 表格头部,定义列名 -->
<thead>
<th>ID</th>
<th>班级编号</th>
<th>班级名</th>
<th>辅导员</th>
<th>操作</th>
<th>ID</th>
<!-- ID列 -->
<th>班级编号</th>
<!-- 班级编号列 -->
<th>班级名</th>
<!-- 班级名列 -->
<th>辅导员</th>
<!-- 辅导员列 -->
<th>操作</th>
<!-- 操作列 -->
</thead>
<tbody>
<c:forEach items="${ci.list}" var="ci">
<tr>
<td>${ci.c_id}</td>
<td>${ci.c_classid}</td>
<td>${ci.c_classname}</td>
<td>${ci.c_counsellor}</td>
<td>
<a title="编辑" id= "updateEdit" href="/findClassById?c_id=${ci.c_id}">
<i class="layui-icon">&#xe642;</i>
</a>
<a title="删除" onclick="member_del(this,'${ci.c_id}')" href="javascript:;">
<i class="layui-icon">&#xe640;</i>
</a>
</td>
</tr>
</c:forEach>
<!-- 使用JSTL的forEach标签遍历班级信息列表 -->
<c:forEach items="${ci.list}" var="ci">
<tr>
<!-- 显示每行的数据 -->
<td>${ci.c_id}</td>
<!-- 显示ID -->
<td>${ci.c_classid}</td>
<!-- 显示班级编号 -->
<td>${ci.c_classname}</td>
<!-- 显示班级名 -->
<td>${ci.c_counsellor}</td>
<!-- 显示辅导员 -->
<td>
<!-- 编辑操作链接,点击后跳转到编辑页面 -->
<a title="编辑" id="updateEdit" href="/findClassById?c_id=${ci.c_id}">
<i class="layui-icon">&#xe642;</i>
<!-- layui的编辑图标 -->
</a>
<!-- 删除操作链接点击后执行JavaScript函数 -->
<a title="删除" onclick="member_del(this,'${ci.c_id}')" href="javascript:;">
<i class="layui-icon">&#xe640;</i>
<!-- layui的删除图标 -->
</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="" >
<input type="hidden" id="totalPageCount" value="${ci.pageTotalCount}"/>
<c:import url="pageBtn.jsp">
<c:param name="totalCount" value="${ci.totalCount}"/>
<c:param name="currentPageNo" value="${ci.pageIndex}"/>
<c:param name="totalPageCount" value="${ci.pageTotalCount}"/>
</c:import>
</div>
<script>
<div class="" >
<!-- 隐藏的输入框,存储总页数 -->
<input type="hidden" id="totalPageCount" value="${ci.pageTotalCount}"/>
<!-- 导入分页按钮的JSP文件 -->
<c:import url="pageBtn.jsp">
<!-- 传递参数给分页按钮JSP -->
<c:param name="totalCount" value="${ci.totalCount}"/>
<!-- 总记录数 -->
<c:param name="currentPageNo" value="${ci.pageIndex}"/>
<!-- 当前页码 -->
<c:param name="totalPageCount" value="${ci.pageTotalCount}"/>
<!-- 总页数 -->
</c:import>
</div>
layui.config({
base: 'layui_exts/',
}).extend({
excel: 'excel',
});
<script>
// 配置layui的扩展模块路径
layui.config({
base: 'layui_exts/',
// 设置扩展模块的基础路径
}).extend({
excel: 'excel',
// 注册excel模块
});
layui.use(['jquery', 'excel','form','layer','laydate'], function(){
var form = layui.form,
$ = layui.jquery,
laydate = layui.laydate;
var excel = parent.layui.excel;
// 使用layui模块
layui.use(['jquery', 'excel', 'form', 'layer', 'laydate'], function(){
var form = layui.form,
// 获取layui的表单模块
$ = layui.jquery,
// 获取jQuery模块
laydate = layui.laydate;
// 获取layui的日期模块
var excel = parent.layui.excel;
// 获取父页面的excel模块
// 初始化日期选择器
laydate.render({
elem: '#start'
// 指定绑定的元素
});
//执行一个laydate实例
laydate.render({
elem: '#start' //指定元素
});
// 监听表单提交事件
form.on('submit(toolbarDemo)', function(){
// 发起AJAX请求导出班级列表
$.ajax({
url: '/exportclasslist',
// 请求的URL
type: 'post',
// 请求类型
dataType: 'json',
// 预期服务器返回的数据类型
contentType: "application/json; charset=utf-8",
// 发送信息至服务器时内容编码类型
success: function (data) {
// 请求成功后的回调函数
console.log(data);
// 在控制台打印服务器返回的数据
// 1. 如果需要调整导出数据的顺序,请执行梳理函数
var dt = excel.filterExportData(data, [
'c_id',
// ID列
'c_classid',
// 班级编号列
'c_classname',
// 班级名列
'c_counsellor'
// 辅导员列
]);
// 2. 在数组头部新增表头
dt.unshift({c_id: 'ID', c_classid: '班级编号', c_classname: '班级名', c_counsellor: '辅导员'});
// 配置列宽A列40pxB列60px(默认)C列120pxD、E、F等均未定义
var colConf = excel.makeColConfig({
'C': 90,
// C列宽度
'D': 80
// D列宽度
}, 60);
// 默认列宽
var timestart = Date.now();
// 记录开始时间
// 3. 执行导出函数,系统会弹出保存文件的弹框
excel.exportExcel({
sheet1: dt
// 数据
}, '班级数据.xlsx', 'xlsx', {
// 文件名和格式
extend: {
'!cols': colConf
// 列配置
}
});
var timeend = Date.now();
// 记录结束时间
var spent = (timeend - timestart) / 1000;
// 计算耗时
layer.alert('导出耗时 '+spent+' s');
// 弹出提示框显示耗时
//setTimeout(function () {window.location.href='/findAdmin';},2000); // 2秒后跳转页面此行被注释掉了
},
form.on('submit(toolbarDemo)', function(){
$.ajax({
url: '/exportclasslist',
type: 'post',
dataType: 'json',
contentType: "application/json; charset=utf-8",
success: function (data) {
console.log(data);
// 1. 如果需要调整顺序,请执行梳理函数
var dt = excel.filterExportData(data, [
'c_id'
,'c_classid'
,'c_classname'
,'c_counsellor'
]);
// 2. 数组头部新增表头
dt.unshift({c_id: 'ID', c_classid: '班级编号', c_classname: '班级名', c_counsellor: '辅导员'});
// 意思是A列40pxB列60px(默认)C列120pxD、E、F等均未定义
var colConf = excel.makeColConfig({
'C': 90,
'D': 80
}, 60);
var timestart = Date.now();
// 3. 执行导出函数,系统会弹出弹框
excel.exportExcel({
sheet1: dt
}, '班级数据.xlsx', 'xlsx', {
extend: {
'!cols': colConf
}
});
var timeend = Date.now();
var spent = (timeend - timestart) / 1000;
layer.alert('导出耗时 '+spent+' s');
//setTimeout(function () {window.location.href='/findAdmin';},2000);
},
error: function () {
//console.log(data);
setTimeout(function () {window.location.href='/findClass';},2000);
}
error: function () {
// 请求失败后的回调函数
//console.log(data);
// 在控制台打印错误信息,此行被注释掉了
setTimeout(function () {window.location.href='/findClass';},2000); // 2秒后跳转到班级列表页面
}
});
});
});
/*添加弹出框*/
/* 添加弹出框 */
// 当点击添加学生按钮时触发事件
$("#addStudnetBtn").click(function () {
// 使用layer.open方法打开一个弹出层
layer.open({
type:1,
title:"添加班级",
skin:"myclass",
area:["50%"],
anim:2,
content:$("#test").html()
type: 1,
// 类型为页面层
title: "添加班级",
// 弹出层标题
skin: "myclass",
// 自定义皮肤样式
area: ["50%"],
// 弹出层宽高这里只设置了宽度为50%
anim: 2,
// 弹出动画效果
content: $("#test").html()
// 弹出层内容这里是获取id为test的元素的HTML内容
});
// 重置表单
$("#addEmployeeForm")[0].reset();
// 监听表单提交事件
form.on('submit(formDemo)', function(data) {
// 弹出消息提示,这里被注释掉了
// layer.msg('aaa',{icon:1,time:3000});
var param=data.field;
var param = data.field;
// 获取表单数据
// console.log(JSON.stringify(param));
// 打印表单数据,这里被注释掉了
// 发起AJAX请求添加班级
$.ajax({
url: '/addClass',
// 请求URL
type: "post",
data:JSON.stringify(param),
// 请求类型
data: JSON.stringify(param),
// 发送的数据转换为JSON字符串
contentType: "application/json; charset=utf-8",
success:function(){
layer.msg('添加成功', {icon: 1, time: 3000});
setTimeout(function () {window.location.href='/findClass';},2000);
// 发送数据的类型
success: function() {
// 请求成功回调函数
layer.msg('添加成功', {icon: 1, time: 3000});
// 弹出成功消息
setTimeout(function () {window.location.href='/findClass';},2000);
// 2秒后跳转到班级列表页面
},
error:function(){
error: function() {
// 请求失败回调函数
layer.msg('添加失败',{icon:0,time:3000});
// 弹出失败消息
setTimeout(function () {window.location.href='/findClass';},2000);
// 2秒后跳转到班级列表页面
}
});
// 阻止表单默认提交行为
// return false;
});
});
});
/*删除*/
function member_del(obj,c_id){
layer.confirm('确认要删除吗?',function(index){
//发异步删除数据
$.get("/deleteClass",{"c_id":c_id},function (data) {
if(data =true){
layer.msg('删除成功!',{icon:1,time:2000});
setTimeout(function () {window.location.href='/findClass';},2000);
}else {
layer.msg('删除失败!',{icon:1,time:2000});
setTimeout(function () {window.location.href='/findClass';},2000);
}
// 删除班级的函数
function member_del(obj, c_id) {
// 弹出确认框
layer.confirm('确认要删除吗?', function(index) {
// 发起GET请求删除班级
$.get("/deleteClass", {"c_id": c_id}, function (data) {
if(data === true) {
// 如果删除成功
layer.msg('删除成功!', {icon: 1, time: 2000});
// 弹出成功消息
setTimeout(function () {window.location.href='/findClass';},2000);
// 2秒后跳转到班级列表页面
} else {
// 如果删除失败
layer.msg('删除失败!', {icon: 1, time: 2000});
// 弹出失败消息
setTimeout(function () {window.location.href='/findClass';},2000); // 2秒后跳转到班级列表页面
}
});
// 关闭确认框
layer.close(index);
});
});
}
}
</script>
</script>
</body>

Loading…
Cancel
Save