Compare commits
2 Commits
77c6e99397
...
4f3149851f
Author | SHA1 | Date |
---|---|---|
yundouzou | 4f3149851f | 11 months ago |
yundouzou | bcbc60f7de | 11 months ago |
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>寝室管理系统</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.aptana.ide.core.unifiedBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.aptana.projects.webnature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1600564941379</id>
|
||||
<name></name>
|
||||
<type>26</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-node_modules</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
@ -0,0 +1,166 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
/* background-image: linear-gradient(to left, rgba(255, 0, 149, 0.2), rgba(0, 247, 255, 0.2)), url(../img/bg.jpg); */
|
||||
background-color: rgb(1,112,254);
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
z-index:-2000;
|
||||
}
|
||||
|
||||
#bg{
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-size:cover;
|
||||
position:fixed;
|
||||
width:100%;
|
||||
height:100%;
|
||||
z-index:-1000;
|
||||
opacity:0.8;
|
||||
}
|
||||
|
||||
.login-box {
|
||||
|
||||
width: 60%;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
height: 25em;
|
||||
top: 50%;
|
||||
margin-top: -12.5em;
|
||||
margin-left: -30%;
|
||||
|
||||
}
|
||||
|
||||
.login-box .bg_title{
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
margin-bottom: 1.2em;
|
||||
background-color: #4dc47d;
|
||||
color: white;
|
||||
float: left;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
|
||||
.login-box .admin,
|
||||
.login-box .dormManage,
|
||||
.login-box .student{
|
||||
width: 30%;
|
||||
height: 75%;
|
||||
margin-left: 2.3%;
|
||||
float: left;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.login-box .admin .titel,
|
||||
.login-box .dormManage .titel,
|
||||
.login-box .student .titel{
|
||||
width: 100%;
|
||||
height: 15%;
|
||||
float: left;
|
||||
line-height: 3em;
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
background-color: #4dc47d;
|
||||
}
|
||||
|
||||
.login-box .admin .content,
|
||||
.login-box .dormManage .content,
|
||||
.login-box .student .content{
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.login-box .admin .content ul,
|
||||
.login-box .dormManage .content ul,
|
||||
.login-box .student .content ul{
|
||||
width: 100%;
|
||||
height: 82%;
|
||||
}
|
||||
|
||||
|
||||
.login-box .admin .content li,
|
||||
.login-box .dormManage .content li,
|
||||
.login-box .student .content li{
|
||||
width: 100%;
|
||||
font-size:15px;
|
||||
margin-top: 8px;
|
||||
float: left;
|
||||
list-style: none;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.login-box .admin .content button,
|
||||
.login-box .dormManage .content button,
|
||||
.login-box .student .content button{
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
float: left;
|
||||
bottom: 10px;
|
||||
margin-left: 70px;
|
||||
color: white;
|
||||
border: none;
|
||||
background-color: #4dc47d;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.box2{
|
||||
display: none
|
||||
}
|
||||
|
||||
.login-box .content{
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.content .left{
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.content .right{
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.right ul li{
|
||||
width: 100%;
|
||||
height: 25px;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.right ul li input{
|
||||
height: 25px;
|
||||
border-radius: 5px;
|
||||
border: 2px solid #4dc47d;
|
||||
}
|
||||
|
||||
.right .button{
|
||||
position: relative;
|
||||
top: 25px;
|
||||
left: 82px;
|
||||
}
|
||||
|
||||
.right .a{
|
||||
position: relative;
|
||||
top: 50px;
|
||||
left: 35px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,193 @@
|
||||
.data_list {
|
||||
border: 1px solid #E5E5E5;
|
||||
padding: 10px;
|
||||
background-color: #FDFDFD;
|
||||
width: 96%;
|
||||
margin-left:40px;
|
||||
}
|
||||
|
||||
.data_list .data_list_title{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.data_list .data_list_title img{
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.data_list .form-search .btn{
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #cccccc;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
color: #ffffff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #4dc47d;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.data_list .data_search select{
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
|
||||
select, input[type="file"] {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
imput{
|
||||
outline: none;
|
||||
outline: medium;
|
||||
}
|
||||
|
||||
select,input{
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.data_list .diary_datas ul{
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.data_list .diary_datas ul li{
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.data_list .datas{
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.data_list .datas ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.data_list .datas ul li {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.data_list .user_image{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data_list .user_image img{
|
||||
padding-top:10px;
|
||||
width: 200px;;
|
||||
height: 250px;;
|
||||
}
|
||||
|
||||
.data_list .nickName , .data_list .userSign{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data_list .diary_title{
|
||||
margin-top:20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data_list .diary_info{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data_list .diary_content{
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.data_list .diary_action{
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.data_list .diary_type{
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
.data_list .diary_title{
|
||||
margin-top:20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data_list .data_list_title .dormBuild_add{
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.data_list .data_form{
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.form-search{
|
||||
margin-top:5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.data_search{
|
||||
float:right;
|
||||
}
|
||||
|
||||
.select_form {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.data_select {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.pagination .pagination_box{
|
||||
width:14em;
|
||||
height:2em;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.pagination .pagination_box .page_up,
|
||||
.pagination .pagination_box .page_down{
|
||||
width:5em;
|
||||
background-color:#4dc47d;
|
||||
color:white;
|
||||
border-radius: 3px;
|
||||
border:none;
|
||||
}
|
||||
|
||||
.pagination .pagination_box .page_cur{
|
||||
width:4em;
|
||||
background-color:#F0EEF5;
|
||||
}
|
||||
|
||||
.pagination .pagination_box .page_up,
|
||||
.pagination .pagination_box .page_cur,
|
||||
.pagination .pagination_box .page_down{
|
||||
float:left;
|
||||
height:100%;
|
||||
line-height:2em;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.edit_dorm{
|
||||
|
||||
border: 1px solid #E5E5E5;
|
||||
padding: 0;
|
||||
background-color: #FDFDFD;
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.dropdown .dropdown-menu li{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.dropdown .dropdown-menu li a{
|
||||
text-align:center;
|
||||
}
|
@ -0,0 +1,238 @@
|
||||
*{
|
||||
padding: 0;
|
||||
}
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
font-family: 'OpenSans-Regular';
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'OpenSans-Regular';
|
||||
src: url(../fonts/OpenSans-Regular.ttf)format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu-Medium';
|
||||
src: url(../fonts/Ubuntu-Medium.ttf) format('truetype');
|
||||
}
|
||||
|
||||
body a {
|
||||
transition: 0.5s all;
|
||||
-webkit-transition: 0.5s all;
|
||||
-moz-transition: 0.5s all;
|
||||
-o-transition: 0.5s all;
|
||||
-ms-transition: 0.5s all;
|
||||
}
|
||||
|
||||
|
||||
/*-- banner --*/
|
||||
.banner {
|
||||
background: url(../img/banner.jpg) no-repeat;
|
||||
background-size: cover;
|
||||
min-height: 270px;
|
||||
}
|
||||
.logo {
|
||||
float: left;
|
||||
margin-left: 5em;
|
||||
width: 14em;
|
||||
height: 5em;
|
||||
background-color: #4dc47d;
|
||||
|
||||
}
|
||||
.logo a{
|
||||
|
||||
display:block;
|
||||
width:100%;
|
||||
height:100%;
|
||||
color:white;
|
||||
text-decoration:none;
|
||||
font-size:25px;
|
||||
font-weight:blod;
|
||||
line-height:70px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.top-menu {
|
||||
float: right;
|
||||
background: #4dc47d;
|
||||
margin: 13em 0 0 0;
|
||||
padding: 0 11em 0 0em;
|
||||
}
|
||||
|
||||
.top-menu ul li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.top-menu ul li a {
|
||||
display: block;
|
||||
color: #181a1b;
|
||||
font-size: 1.1em;
|
||||
padding: 1em 1em;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.top-menu ul li.active a,
|
||||
.top-menu ul li a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.center-conent {
|
||||
padding: 3em 0;
|
||||
}
|
||||
|
||||
.center-content{
|
||||
width: 90%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
margin-left: 5%;
|
||||
/* background-color: #169FE6; */
|
||||
}
|
||||
|
||||
.center-content .left{
|
||||
width: 23%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
/* background-color: red; */
|
||||
}
|
||||
.center-content .right{
|
||||
width: 77%;
|
||||
float: left;
|
||||
height: 100%;
|
||||
margin-top: 20px;
|
||||
|
||||
/* background-color: blue; */
|
||||
}
|
||||
|
||||
.center-content .left .gongGao{
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
float: left;
|
||||
}
|
||||
.center-content .left .gongGao .title{
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
background-color: #4dc47d;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.center-content .left .gongGao .context{
|
||||
width: 100%;
|
||||
min-height: 150px;
|
||||
background-color: #FDFDFD;
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.center-content .left .gongGao .import{
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.center-content .left .gongGao .context marquee label{
|
||||
font-size:14px;
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
.center-content .left .gongGao .context a{
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.center-content .left .container{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
/*-- footer --*/
|
||||
|
||||
.copywrite {
|
||||
background: #4dc47d;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.copywrite .container{
|
||||
width:100%;
|
||||
height:100%
|
||||
}
|
||||
|
||||
.copywrite p {
|
||||
display: inline-block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
color: #fff;
|
||||
font-size: 1em;
|
||||
text-align: left;
|
||||
margin-top:20px;
|
||||
margin-left:170px;
|
||||
|
||||
}
|
||||
|
||||
.copywrite p a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.logo {
|
||||
width: 17%
|
||||
}
|
||||
.logo img {
|
||||
background-size: 100%;
|
||||
width: 100%
|
||||
}
|
||||
.top-menu {
|
||||
padding: 0 5em 0 2em;
|
||||
}
|
||||
.top-menu ul li a {
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
.banner {
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.center-content .right .data_list .wele{
|
||||
width:100%;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.center-content .right .data_list .list-content{
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.center-content .right .data_list .list-content .quanxian{
|
||||
font-size:30px;
|
||||
}
|
||||
|
||||
|
||||
.center-content .right .data_list .list-content li{
|
||||
font-size:20px;
|
||||
list-style: none;
|
||||
margin-top:20px;
|
||||
}
|
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 286 KiB |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 543 KiB |
After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
(function(e,t,n){var r=e();e.fn.dropdownHover=function(n){r=r.add(this.parent());return this.each(function(){var i=e(this),s=i.parent(),o={delay:500,instantlyCloseOthers:!0},u={delay:e(this).data("delay"),instantlyCloseOthers:e(this).data("close-others")},a=e.extend(!0,{},o,n,u),f;s.hover(function(e){if(!s.hasClass("open")&&!i.is(e.target))return!0;a.instantlyCloseOthers===!0&&r.removeClass("open");t.clearTimeout(f);s.addClass("open")},function(){f=t.setTimeout(function(){s.removeClass("open")},a.delay)});i.hover(function(){a.instantlyCloseOthers===!0&&r.removeClass("open");t.clearTimeout(f);s.addClass("open")});s.find(".dropdown-submenu").each(function(){var n=e(this),r;n.hover(function(){t.clearTimeout(r);n.children(".dropdown-menu").show();n.siblings().children(".dropdown-menu").hide()},function(){var e=n.children(".dropdown-menu");r=t.setTimeout(function(){e.hide()},a.delay)})})})};e(document).ready(function(){e('[data-hover="dropdown"]').dropdownHover()})})(jQuery,this);
|
@ -0,0 +1,8 @@
|
||||
/*! http://responsiveslides.com v1.54 by @viljamis */
|
||||
(function(c,I,B){c.fn.responsiveSlides=function(l){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:c.noop,after:c.noop},l);return this.each(function(){B++;var f=c(this),s,r,t,m,p,q,n=0,e=f.children(),C=e.size(),h=parseFloat(a.speed),D=parseFloat(a.timeout),u=parseFloat(a.maxwidth),g=a.namespace,d=g+B,E=g+"_nav "+d+"_nav",v=g+"_here",j=d+"_on",
|
||||
w=d+"_s",k=c("<ul class='"+g+"_tabs "+d+"_tabs' />"),x={"float":"left",position:"relative",opacity:1,zIndex:2},y={"float":"none",position:"absolute",opacity:0,zIndex:1},F=function(){var b=(document.body||document.documentElement).style,a="transition";if("string"===typeof b[a])return!0;s=["Moz","Webkit","Khtml","O","ms"];var a=a.charAt(0).toUpperCase()+a.substr(1),c;for(c=0;c<s.length;c++)if("string"===typeof b[s[c]+a])return!0;return!1}(),z=function(b){a.before(b);F?(e.removeClass(j).css(y).eq(b).addClass(j).css(x),
|
||||
n=b,setTimeout(function(){a.after(b)},h)):e.stop().fadeOut(h,function(){c(this).removeClass(j).css(y).css("opacity",1)}).eq(b).fadeIn(h,function(){c(this).addClass(j).css(x);a.after(b);n=b})};a.random&&(e.sort(function(){return Math.round(Math.random())-0.5}),f.empty().append(e));e.each(function(a){this.id=w+a});f.addClass(g+" "+d);l&&l.maxwidth&&f.css("max-width",u);e.hide().css(y).eq(0).addClass(j).css(x).show();F&&e.show().css({"-webkit-transition":"opacity "+h+"ms ease-in-out","-moz-transition":"opacity "+
|
||||
h+"ms ease-in-out","-o-transition":"opacity "+h+"ms ease-in-out",transition:"opacity "+h+"ms ease-in-out"});if(1<e.size()){if(D<h+100)return;if(a.pager&&!a.manualControls){var A=[];e.each(function(a){a+=1;A+="<li><a href='#' class='"+w+a+"'>"+a+"</a></li>"});k.append(A);l.navContainer?c(a.navContainer).append(k):f.after(k)}a.manualControls&&(k=c(a.manualControls),k.addClass(g+"_tabs "+d+"_tabs"));(a.pager||a.manualControls)&&k.find("li").each(function(a){c(this).addClass(w+(a+1))});if(a.pager||a.manualControls)q=
|
||||
k.find("a"),r=function(a){q.closest("li").removeClass(v).eq(a).addClass(v)};a.auto&&(t=function(){p=setInterval(function(){e.stop(!0,!0);var b=n+1<C?n+1:0;(a.pager||a.manualControls)&&r(b);z(b)},D)},t());m=function(){a.auto&&(clearInterval(p),t())};a.pause&&f.hover(function(){clearInterval(p)},function(){m()});if(a.pager||a.manualControls)q.bind("click",function(b){b.preventDefault();a.pauseControls||m();b=q.index(this);n===b||c("."+j).queue("fx").length||(r(b),z(b))}).eq(0).closest("li").addClass(v),
|
||||
a.pauseControls&&q.hover(function(){clearInterval(p)},function(){m()});if(a.nav){g="<a href='#' class='"+E+" prev'>"+a.prevText+"</a><a href='#' class='"+E+" next'>"+a.nextText+"</a>";l.navContainer?c(a.navContainer).append(g):f.after(g);var d=c("."+d+"_nav"),G=d.filter(".prev");d.bind("click",function(b){b.preventDefault();b=c("."+j);if(!b.queue("fx").length){var d=e.index(b);b=d-1;d=d+1<C?n+1:0;z(c(this)[0]===G[0]?b:d);if(a.pager||a.manualControls)r(c(this)[0]===G[0]?b:d);a.pauseControls||m()}});
|
||||
a.pauseControls&&d.hover(function(){clearInterval(p)},function(){m()})}}if("undefined"===typeof document.body.style.maxWidth&&l.maxwidth){var H=function(){f.css("width","100%");f.width()>u&&f.css("width",u)};H();c(I).bind("resize",function(){H()})}})}})(jQuery,this,0);
|
@ -0,0 +1,81 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"admin"});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*--------------------个人--------------------*/
|
||||
function my(){
|
||||
console.log(this.session_vue.login.adminId)
|
||||
var that=this;
|
||||
axios.post('../../getMyMsgById',this.session_vue.login).then(function (res) {
|
||||
that.user_vue.user=res.data;
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function editMyMsg(){
|
||||
var admin=this.user_vue.user;
|
||||
that=this;
|
||||
axios.post('../../updateMyMsgById',admin).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload()
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function checkedPassword(){
|
||||
my();
|
||||
var password= this.user_vue.user.password;
|
||||
var oldPwd=$("#oldPwd").val().trim();
|
||||
if(password != null && password == oldPwd){
|
||||
|
||||
}
|
||||
else{
|
||||
alert("原密码不正确")
|
||||
console.log(password)
|
||||
console.log(oldPwd)
|
||||
$("#oldPwd").val('')
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function editPassword(){
|
||||
var newPwd=$("#newPwd").val().trim();
|
||||
this.user_vue.user.password=newPwd;
|
||||
var admin =this.user_vue.user;
|
||||
console.log(admin)
|
||||
axios.post('../../updatePsd',admin).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
/*--------------------个人--------------------*/
|
||||
|
||||
var user_vue=new Vue({
|
||||
el:'#user_app',
|
||||
data:{
|
||||
user:{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
@ -0,0 +1,223 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
var DORMBuildId;
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"admin"});
|
||||
var that=this;
|
||||
getBuildManage()
|
||||
|
||||
}
|
||||
|
||||
//获取BuildMange
|
||||
function getBuildManage(){
|
||||
console.log("num",this.vue.pagination.pageNum)
|
||||
var that=this;
|
||||
axios.get('../../getBuildManage?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key).then(function (res) {
|
||||
that.vue.buildManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="dormBuildName";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据获取BuildManId BuildManage
|
||||
function getBuildMangerById(dormBuildId){
|
||||
var that=this;
|
||||
axios.get('../../getBuildMangerById',{
|
||||
params:{
|
||||
dormBuildId:dormBuildId
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.getBuildMangerById_vue.buildManage=res.data;
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function addBuildManageMsg(){
|
||||
var buildManage=this.addBuildManage_vue.buildManage;
|
||||
axios.post('../../addBuildManage', buildManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.addBuildManage_vue.buildManage={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id更新
|
||||
function updataBuildManageMsg(){
|
||||
var buildManage=this.getBuildMangerById_vue.buildManage;
|
||||
axios.post('../../updataBuildManageById', buildManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.getBuildMangerById_vue.buildManage={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id删除
|
||||
function buildManagerDeleteById(dormBuildId){
|
||||
var that=this;
|
||||
axios.get('../../buildManagerDeleteById?dormBuildId='+dormBuildId).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据宿舍楼id获取宿管信息
|
||||
function getDormMangerByBuildId(dormBuildId){
|
||||
var that=this;
|
||||
DORMBuildId=dormBuildId;
|
||||
axios.get('../../getDormMangerByBuildId?dormBuildId='+dormBuildId).then(function (res) {
|
||||
console.log(res)
|
||||
that.getDormManageByBuildId_vue.dormManage=res.data;
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
|
||||
var that=this;
|
||||
axios.get('../../getDormManage2').then(function (res) {
|
||||
that.getDormManageByBuildId_vue.optionsDormManage=res.data;
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function addDormManageToBuild(){
|
||||
var dormManId=this.getDormManageByBuildId_vue.optionKey;
|
||||
if(dormManId !=-1){
|
||||
axios.get('../../addDormManageToBuild?dormBuildId='+DORMBuildId+'&dormManId='+dormManId).then(function (res) {
|
||||
if(res.data.result==true){
|
||||
getDormMangerByBuildId(DORMBuildId)
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
else{
|
||||
alert("你选择了无效值")
|
||||
}
|
||||
}
|
||||
|
||||
function removeaDormManageToBuild(dormManId){
|
||||
axios.get('../../removeaDormManageToBuild?dormManId='+dormManId).then(function (res) {
|
||||
if(res.data.result==true){
|
||||
getDormMangerByBuildId(DORMBuildId)
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//查询
|
||||
function searchBuildManage(){
|
||||
console.log(this.vue.search);
|
||||
getBuildManage();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addBuildManage_vue.buildManage={};
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getBuildManage();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getBuildManage();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
var addBuildManage_vue=new Vue({
|
||||
el:'#addBuildManage_app',
|
||||
data:{
|
||||
buildManage:{
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
buildManageList:[],
|
||||
search:{
|
||||
filter:"dormBuildName",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
}
|
||||
|
||||
},
|
||||
methods:{
|
||||
getBuildMangerById:function(dormBuildId){
|
||||
getBuildMangerById(dormBuildId)
|
||||
},
|
||||
buildManagerDeleteById:function(dormBuildId){
|
||||
buildManagerDeleteById(dormBuildId);
|
||||
},
|
||||
getDormMangerByBuildId:function(dormBuildId){
|
||||
getDormMangerByBuildId(dormBuildId)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var getBuildMangerById_vue=new Vue({
|
||||
el:'#getBuildMangerById_app',
|
||||
data:{
|
||||
buildManage:{}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
var getDormManageByBuildId_vue=new Vue({
|
||||
el:'#getDormManageByBuildId_app',
|
||||
data:{
|
||||
dormManage:{},
|
||||
optionsDormManage:[],
|
||||
optionKey:-1
|
||||
},
|
||||
methods:{
|
||||
removeaDormManageToBuild:function(dormManId){
|
||||
removeaDormManageToBuild(dormManId)
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
@ -0,0 +1,206 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"admin"});
|
||||
var that=this;
|
||||
getDormManage()
|
||||
|
||||
}
|
||||
|
||||
//获取dormMange
|
||||
function getDormManage(){
|
||||
console.log("num",this.vue.pagination.pageNum)
|
||||
var that=this;
|
||||
axios.get('../../getDormManage?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key).then(function (res) {
|
||||
that.vue.dormManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="name";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据获取dormManId DormManage
|
||||
function getDormMangerById(dormManId){
|
||||
var that=this;
|
||||
axios.get('../../getDormMangerById',{
|
||||
params:{
|
||||
dormManId:dormManId
|
||||
}
|
||||
}).then(function (res) {
|
||||
|
||||
that.getDormMangerById_vue.dormManage=res.data;
|
||||
that.getDormMangerById_vue.dormManage.sex=="男"? that.getDormMangerById_vue.dormManage.sex="0":that.getDormMangerById_vue.dormManage.sex="1"
|
||||
$("#editPassword").val(that.getDormMangerById_vue.dormManage.password);
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//校验密码
|
||||
function checkPassword(status){
|
||||
if(status=="add"){
|
||||
if(this.addDormManage.dormManage.password!=null && this.addDormManage.dormManage.password.trim()!="" && (this.addDormManage.dormManage.password.trim()==$("#addPassword").val().trim())){
|
||||
$(".hidden_btn").css({
|
||||
display:"inline-block"
|
||||
})
|
||||
}
|
||||
else{
|
||||
$(".hidden_btn").css({
|
||||
display:"none"
|
||||
})
|
||||
this.addDormManage.dormManage.password="";
|
||||
$("#addPassword").val("");
|
||||
alert("两次密码输入不一致");
|
||||
}
|
||||
}
|
||||
if(status=="edit"){
|
||||
if(this.getDormMangerById_vue.dormManage.password!=null && this.getDormMangerById_vue.dormManage.password.trim()!="" && (this.getDormMangerById_vue.dormManage.password.trim()==$("#editPassword").val().trim())){
|
||||
$(".hidden_btn").css({
|
||||
display:"inline-block"
|
||||
})
|
||||
}
|
||||
else{
|
||||
$(".hidden_btn").css({
|
||||
display:"none"
|
||||
})
|
||||
this.getDormMangerById_vue.dormManage.password="";
|
||||
$("#editPassword").val("");
|
||||
alert("两次密码输入不一致");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function addDormManageMsg(){
|
||||
var dormManage=this.addDormManage.dormManage;
|
||||
dormManage.sex==0?dormManage.sex="男":dormManage.sex="女";
|
||||
axios.post('../../addDormManage', dormManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.addDormManage.dormManage={};
|
||||
this.addDormManage.dormManage.sex="0";
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id更新
|
||||
function updataDormManageMsg(){
|
||||
var dormManage=this.getDormMangerById_vue.dormManage;
|
||||
dormManage.sex==0?dormManage.sex="男":dormManage.sex="女";
|
||||
axios.post('../../updataDormManageById', dormManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.getDormMangerById_vue.dormManage={};
|
||||
this.getDormMangerById_vue.dormManage.sex="0";
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id删除
|
||||
function dormManagerDeleteById(dormManId){
|
||||
var that=this;
|
||||
axios.get('../../dormManagerDeleteById?dormManId='+dormManId).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//查询
|
||||
function searchDormManage(){
|
||||
console.log(this.vue.search);
|
||||
getDormManage();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addDormManage.dormManage={};
|
||||
this.addDormManage.dormManage.sex="0";
|
||||
$("#addPassword").val('')
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getDormManage();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getDormManage();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var addDormManage=new Vue({
|
||||
el:'#addDormManage_app',
|
||||
data:{
|
||||
dormManage:{
|
||||
userName:"",
|
||||
password:"",
|
||||
name:"",
|
||||
sex:"0",
|
||||
tel:""
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
dormManageList:[],
|
||||
search:{
|
||||
filter:"name",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
getDormMangerById:function(dormManId){
|
||||
getDormMangerById(dormManId)
|
||||
},
|
||||
dormManagerDeleteById:function(dormManId){
|
||||
dormManagerDeleteById(dormManId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var getDormMangerById_vue=new Vue({
|
||||
el:'#getDormMangerById_app',
|
||||
data:{
|
||||
dormManage:{}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
@ -0,0 +1,49 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
//获取session
|
||||
function getSession(role){
|
||||
var that=this;
|
||||
axios.post('../../getSession',role).then(function (res) {
|
||||
if(res.data[0] !=null){
|
||||
that.session_vue.login=res.data[0][0];
|
||||
sessionStorage.removeItem("userName");
|
||||
sessionStorage.setItem("userName",that.session_vue.login.userName);
|
||||
}else{
|
||||
alert("未登录");
|
||||
window.location.replace('../../')
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//用户退出
|
||||
function exitSys(){
|
||||
var that=this;
|
||||
axios.get('../../exitSys?exit=admin').then(function (res) {
|
||||
if(res.data.result==true){
|
||||
window.location.replace("../../")
|
||||
console.log("注销成功")
|
||||
}
|
||||
else{
|
||||
alert("注销失败");
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
var session_vue=new Vue({
|
||||
el:"#session__app",
|
||||
data:{
|
||||
login:{
|
||||
userName:""
|
||||
}
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,155 @@
|
||||
/**
|
||||
* 公众号【C you again】
|
||||
*/
|
||||
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"admin"});
|
||||
var that=this;
|
||||
getNoticeManage()
|
||||
|
||||
}
|
||||
|
||||
//获取studentManage
|
||||
function getNoticeManage(){
|
||||
|
||||
var that=this;
|
||||
axios.get('../../getNoticeManage?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key).then(function (res) {
|
||||
that.vue.noticeManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="date";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据获取dormManId DormManage
|
||||
function getNoticeMangerById(noticeId){
|
||||
var that=this;
|
||||
axios.get('../../getNoticeMangerById',{
|
||||
params:{
|
||||
noticeId:noticeId
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.getNoticeMangerById_vue.noticeManage=res.data;
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function addNoticeManageMsg(){
|
||||
var noticeManage=this.addNoticeManage_vue.noticeManage;
|
||||
axios.post('../../addNoticeManage', noticeManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.addNoticeManage_vue.noticeManage={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id更新
|
||||
function updataNoticeManageMsg(){
|
||||
var noticeManage=this.getNoticeMangerById_vue.noticeManage;
|
||||
axios.post('../../updataNoticeManageById', noticeManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.getNoticeMangerById_vue.noticeManage={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id删除
|
||||
function noticeManagerDeleteById(noticeId){
|
||||
var that=this;
|
||||
axios.get('../../noticeManagerDeleteById?noticeId='+noticeId).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//查询
|
||||
function searchNoticeManage(){
|
||||
console.log(this.vue.search);
|
||||
getNoticeManage();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addNoticeManage_vue.noticeManage={};
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getStudentManage();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getStudentManage();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
var addNoticeManage_vue=new Vue({
|
||||
el:'#addNoticeManage_app',
|
||||
data:{
|
||||
noticeManage:{
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
noticeManageList:[],
|
||||
search:{
|
||||
filter:"date",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
getNoticeMangerById:function(noticeId){
|
||||
getNoticeMangerById(noticeId)
|
||||
},
|
||||
noticeManagerDeleteById:function(noticeId){
|
||||
noticeManagerDeleteById(noticeId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var getNoticeMangerById_vue=new Vue({
|
||||
el:'#getNoticeMangerById_app',
|
||||
data:{
|
||||
noticeManage:{}
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,157 @@
|
||||
/**
|
||||
* 公众号【C you again】
|
||||
*/
|
||||
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"admin"});
|
||||
var that=this;
|
||||
getPunchClockManage()
|
||||
|
||||
}
|
||||
|
||||
//获取studentManage
|
||||
function getPunchClockManage(){
|
||||
|
||||
var that=this;
|
||||
axios.get('../../getPunchClockManage?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key).then(function (res) {
|
||||
that.vue.punchClockManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="date";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//获取
|
||||
function getPunchClockMangerById(id){
|
||||
var that=this;
|
||||
axios.get('../../getPunchClockMangerById',{
|
||||
params:{
|
||||
id:id
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.getPunchClockMangerById_vue.punchClockManage=res.data;
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function addPunchClockManageMsg(){
|
||||
this.addPunchClockManage_vue.punchClockManage.person=sessionStorage.getItem("userName");
|
||||
var punchClockManage=this.addPunchClockManage_vue.punchClockManage;
|
||||
|
||||
axios.post('../../addPunchClockManageMsg', punchClockManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.addPunchClockManage_vue.punchClockManage={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id更新
|
||||
function updataPunchClockManageMsg(){
|
||||
var punchClockManage=this.getPunchClockMangerById_vue.punchClockManage;
|
||||
axios.post('../../updataPunchClockManageMsgById', punchClockManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.getPunchClockMangerById_vue.punchClockManage={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id删除
|
||||
function punchClockManagerDeleteById(id){
|
||||
var that=this;
|
||||
axios.get('../../punchClockManagerDeleteById?id='+id).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//查询
|
||||
function searchNoticeManage(){
|
||||
console.log(this.vue.search);
|
||||
getPunchClockManage();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addPunchClockManage_vue.punchClockManage={};
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getPunchClockManage();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getPunchClockManage();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
var addPunchClockManage_vue=new Vue({
|
||||
el:'#addPunchClockManage_app',
|
||||
data:{
|
||||
punchClockManage:{
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
punchClockManageList:[],
|
||||
search:{
|
||||
filter:"date",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
getPunchClockMangerById:function(id){
|
||||
getPunchClockMangerById(id)
|
||||
},
|
||||
punchClockManagerDeleteById:function(id){
|
||||
punchClockManagerDeleteById(id);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var getPunchClockMangerById_vue=new Vue({
|
||||
el:'#getPunchClockMangerById_app',
|
||||
data:{
|
||||
punchClockManage:{}
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,203 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"admin"});
|
||||
var that=this;
|
||||
getRecordManage()
|
||||
|
||||
}
|
||||
|
||||
//获取studentManage
|
||||
function getRecordManage(){
|
||||
console.log("num",this.vue.pagination.pageNum)
|
||||
var that=this;
|
||||
axios.get('../../getRecordManage?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key).then(function (res) {
|
||||
that.vue.recordManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="studentName";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据获取dormManId DormManage
|
||||
function getStudentMangerById(studentId){
|
||||
var that=this;
|
||||
axios.get('../../getStudentMangerById',{
|
||||
params:{
|
||||
studentId:studentId
|
||||
}
|
||||
}).then(function (res) {
|
||||
|
||||
that.getStudentMangerById_vue.studentManage=res.data;
|
||||
that.getStudentMangerById_vue.studentManage.sex=="男"? that.getStudentMangerById_vue.studentManage.sex="0":that.getStudentMangerById_vue.studentManage.sex="1"
|
||||
$("#editPassword").val(that.getStudentMangerById_vue.studentManage.password);
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//校验密码
|
||||
function checkPassword(status){
|
||||
if(status=="add"){
|
||||
if(this.addStudentManage_vue.studentManage.password!=null && this.addStudentManage_vue.studentManage.password.trim()!="" && (this.addStudentManage_vue.studentManage.password.trim()==$("#addPassword").val().trim())){
|
||||
$(".hidden_btn").css({
|
||||
display:"inline-block"
|
||||
})
|
||||
}
|
||||
else{
|
||||
$(".hidden_btn").css({
|
||||
display:"none"
|
||||
})
|
||||
this.addStudentManage_vue.studentManage.password="";
|
||||
$("#addPassword").val("");
|
||||
alert("两次密码输入不一致");
|
||||
}
|
||||
}
|
||||
if(status=="edit"){
|
||||
if(this.getStudentMangerById_vue.studentManage.password!=null && this.getStudentMangerById_vue.studentManage.password.trim()!="" && (this.getStudentMangerById_vue.studentManage.password.trim()==$("#editPassword").val().trim())){
|
||||
$(".hidden_btn").css({
|
||||
display:"inline-block"
|
||||
})
|
||||
}
|
||||
else{
|
||||
$(".hidden_btn").css({
|
||||
display:"none"
|
||||
})
|
||||
this.getStudentMangerById_vue.studentManage.password="";
|
||||
$("#editPassword").val("");
|
||||
alert("两次密码输入不一致");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function addStudentManageMsg(){
|
||||
var studentManage=this.addStudentManage_vue.studentManage;
|
||||
studentManage.sex==0?studentManage.sex="男":studentManage.sex="女";
|
||||
axios.post('../../addStudentManage', studentManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.addStudentManage_vue.studentManage={};
|
||||
this.addStudentManage_vue.studentManage.sex="0";
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id更新
|
||||
function updataStudentManageMsg(){
|
||||
var studentManage=this.getStudentMangerById_vue.studentManage;
|
||||
studentManage.sex==0?studentManage.sex="男":studentManage.sex="女";
|
||||
axios.post('../../updataStudentManageById', studentManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.getStudentMangerById_vue.studentManage={};
|
||||
this.getStudentMangerById_vue.studentManage.sex="0";
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id删除
|
||||
function recordManagerDeleteById(recordId){
|
||||
var that=this;
|
||||
axios.get('../../recordManagerDeleteById?recordId='+recordId).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//查询
|
||||
function searchRecordManage(){
|
||||
console.log(this.vue.search);
|
||||
getRecordManage();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addStudentManage_vue.studentManage={};
|
||||
this.addStudentManage_vue.studentManage.sex="0";
|
||||
$("#addPassword").val('')
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getRecordManage();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getRecordManage();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
var addStudentManage_vue=new Vue({
|
||||
el:'#addStudentManage_app',
|
||||
data:{
|
||||
studentManage:{
|
||||
stuNum:"",
|
||||
password:"",
|
||||
name:"",
|
||||
sex:"0",
|
||||
dormBuildId:null,
|
||||
dormName:"",
|
||||
tel:""
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
recordManageList:[],
|
||||
search:{
|
||||
filter:"studentName",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
|
||||
recordManagerDeleteById:function(recordId){
|
||||
recordManagerDeleteById(recordId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var getStudentMangerById_vue=new Vue({
|
||||
el:'#getStudentMangerById_app',
|
||||
data:{
|
||||
studentManage:{}
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,205 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"admin"});
|
||||
var that=this;
|
||||
getStudentManage()
|
||||
|
||||
}
|
||||
|
||||
//获取studentManage
|
||||
function getStudentManage(){
|
||||
console.log("num",this.vue.pagination.pageNum)
|
||||
var that=this;
|
||||
axios.get('../../getStudentManage?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key).then(function (res) {
|
||||
that.vue.studentManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="name";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据获取dormManId DormManage
|
||||
function getStudentMangerById(studentId){
|
||||
var that=this;
|
||||
axios.get('../../getStudentMangerById',{
|
||||
params:{
|
||||
studentId:studentId
|
||||
}
|
||||
}).then(function (res) {
|
||||
|
||||
that.getStudentMangerById_vue.studentManage=res.data;
|
||||
that.getStudentMangerById_vue.studentManage.sex=="男"? that.getStudentMangerById_vue.studentManage.sex="0":that.getStudentMangerById_vue.studentManage.sex="1"
|
||||
$("#editPassword").val(that.getStudentMangerById_vue.studentManage.password);
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//校验密码
|
||||
function checkPassword(status){
|
||||
if(status=="add"){
|
||||
if(this.addStudentManage_vue.studentManage.password!=null && this.addStudentManage_vue.studentManage.password.trim()!="" && (this.addStudentManage_vue.studentManage.password.trim()==$("#addPassword").val().trim())){
|
||||
$(".hidden_btn").css({
|
||||
display:"inline-block"
|
||||
})
|
||||
}
|
||||
else{
|
||||
$(".hidden_btn").css({
|
||||
display:"none"
|
||||
})
|
||||
this.addStudentManage_vue.studentManage.password="";
|
||||
$("#addPassword").val("");
|
||||
alert("两次密码输入不一致");
|
||||
}
|
||||
}
|
||||
if(status=="edit"){
|
||||
if(this.getStudentMangerById_vue.studentManage.password!=null && this.getStudentMangerById_vue.studentManage.password.trim()!="" && (this.getStudentMangerById_vue.studentManage.password.trim()==$("#editPassword").val().trim())){
|
||||
$(".hidden_btn").css({
|
||||
display:"inline-block"
|
||||
})
|
||||
}
|
||||
else{
|
||||
$(".hidden_btn").css({
|
||||
display:"none"
|
||||
})
|
||||
this.getStudentMangerById_vue.studentManage.password="";
|
||||
$("#editPassword").val("");
|
||||
alert("两次密码输入不一致");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function addStudentManageMsg(){
|
||||
var studentManage=this.addStudentManage_vue.studentManage;
|
||||
studentManage.sex==0?studentManage.sex="男":studentManage.sex="女";
|
||||
axios.post('../../addStudentManage', studentManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.addStudentManage_vue.studentManage={};
|
||||
this.addStudentManage_vue.studentManage.sex="0";
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id更新
|
||||
function updataStudentManageMsg(){
|
||||
var studentManage=this.getStudentMangerById_vue.studentManage;
|
||||
studentManage.sex==0?studentManage.sex="男":studentManage.sex="女";
|
||||
axios.post('../../updataStudentManageById', studentManage, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
this.getStudentMangerById_vue.studentManage={};
|
||||
this.getStudentMangerById_vue.studentManage.sex="0";
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id删除
|
||||
function studentManagerDeleteById(studentId){
|
||||
var that=this;
|
||||
axios.get('../../studentManagerDeleteById?studentId='+studentId).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//查询
|
||||
function searchDormManage(){
|
||||
console.log(this.vue.search);
|
||||
getStudentManage();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addStudentManage_vue.studentManage={};
|
||||
this.addStudentManage_vue.studentManage.sex="0";
|
||||
$("#addPassword").val('')
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getStudentManage();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getStudentManage();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
var addStudentManage_vue=new Vue({
|
||||
el:'#addStudentManage_app',
|
||||
data:{
|
||||
studentManage:{
|
||||
stuNum:"",
|
||||
password:"",
|
||||
name:"",
|
||||
sex:"0",
|
||||
dormBuildId:null,
|
||||
dormName:"",
|
||||
tel:""
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
studentManageList:[],
|
||||
search:{
|
||||
filter:"name",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
getStudentMangerById:function(studentId){
|
||||
getStudentMangerById(studentId)
|
||||
},
|
||||
studentManagerDeleteById:function(studentId){
|
||||
studentManagerDeleteById(studentId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var getStudentMangerById_vue=new Vue({
|
||||
el:'#getStudentMangerById_app',
|
||||
data:{
|
||||
studentManage:{}
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,101 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"dormManager"});
|
||||
//获取公告
|
||||
getNoticeAll();
|
||||
}
|
||||
|
||||
|
||||
function getNoticeAll(){
|
||||
var that=this;
|
||||
axios.post('../../getNoticeAll').then(function (res) {
|
||||
that.vue.noticeList=res.data;
|
||||
console.log(that.vue.noticeList)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*--------------------个人--------------------*/
|
||||
function my(){
|
||||
console.log(this.session_vue.login)
|
||||
var that=this;
|
||||
axios.post('../../dorm_getMyMsgById',this.session_vue.login).then(function (res) {
|
||||
that.user_vue.user=res.data;
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function editMyMsg(){
|
||||
var admin=this.user_vue.user;
|
||||
axios.post('../../dorm_updateMyMsgById',admin).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload()
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function checkedPassword(){
|
||||
my();
|
||||
var password= this.user_vue.user.password;
|
||||
var oldPwd=$("#oldPwd").val().trim();
|
||||
if(password != null && password == oldPwd){
|
||||
|
||||
}
|
||||
else{
|
||||
alert("原密码不正确")
|
||||
console.log(password)
|
||||
console.log(oldPwd)
|
||||
$("#oldPwd").val('')
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function editPassword(){
|
||||
var newPwd=$("#newPwd").val().trim();
|
||||
this.user_vue.user.password=newPwd;
|
||||
var admin =this.user_vue.user;
|
||||
console.log(admin)
|
||||
axios.post('../../dorm_updatePsd',admin).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
/*--------------------个人--------------------*/
|
||||
|
||||
var user_vue=new Vue({
|
||||
el:'#user_app',
|
||||
data:{
|
||||
user:{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
noticeList:[]
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
@ -0,0 +1,49 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
//获取session
|
||||
function getSession(role){
|
||||
var that=this;
|
||||
axios.post('../../getSession',role).then(function (res) {
|
||||
if(res.data[0] !=null){
|
||||
that.session_vue.login=res.data[0][0];
|
||||
sessionStorage.removeItem("dormBuildId");
|
||||
sessionStorage.setItem("dormBuildId",that.session_vue.login.dormBuildId);
|
||||
}else{
|
||||
alert("未登录");
|
||||
window.location.replace('../../')
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//用户退出
|
||||
function exitSys(){
|
||||
var that=this;
|
||||
axios.get('../../exitSys?exit=dormManager').then(function (res) {
|
||||
if(res.data.result==true){
|
||||
window.location.replace("../../")
|
||||
console.log("注销成功")
|
||||
}
|
||||
else{
|
||||
alert("注销失败");
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
var session_vue=new Vue({
|
||||
el:"#session_app",
|
||||
data:{
|
||||
login:{
|
||||
userName:""
|
||||
}
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,98 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
var dormBuildId;
|
||||
window.onload=function(){
|
||||
getSession({role:"dormManager"});
|
||||
//获取公告
|
||||
getNoticeAll();
|
||||
dormBuildId=sessionStorage.getItem("dormBuildId");
|
||||
var that=this;
|
||||
getPunchClockRecordMsgByDormBuildId()
|
||||
|
||||
}
|
||||
|
||||
function getNoticeAll(){
|
||||
var that=this;
|
||||
axios.post('../../getNoticeAll').then(function (res) {
|
||||
that.vue.noticeList=res.data;
|
||||
console.log(that.vue.noticeList)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据学号获取考勤记录
|
||||
function getPunchClockRecordMsgByDormBuildId(){
|
||||
console.log("num",this.vue.pagination.pageNum)
|
||||
var that=this;
|
||||
axios.get('../../getPunchClockRecordMsgByDormBuildId?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key+'&dormBuildId='+dormBuildId).then(function (res) {
|
||||
that.vue.punchClockRecordManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="date";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//查询
|
||||
function searchRecordMsg(){
|
||||
getPunchClockRecordMsgByDormBuildId();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addStudentManage_vue.studentManage={};
|
||||
this.addStudentManage_vue.studentManage.sex="0";
|
||||
$("#addPassword").val('')
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getPunchClockRecordMsgByDormBuildId();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getPunchClockRecordMsgByDormBuildId();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
punchClockRecordManageList:[],
|
||||
search:{
|
||||
filter:"date",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
},
|
||||
noticeList:[]
|
||||
|
||||
},
|
||||
methods:{
|
||||
recordManagerDeleteById:function(recordId){
|
||||
recordManagerDeleteById(recordId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1,190 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
var dormBuildId;
|
||||
|
||||
window.onload=function(){
|
||||
var login=getSession({role:"dormManager"});
|
||||
dormBuildId=sessionStorage.getItem("dormBuildId");
|
||||
getRecordMsg();
|
||||
//获取公告
|
||||
getNoticeAll();
|
||||
|
||||
}
|
||||
|
||||
function getNoticeAll(){
|
||||
var that=this;
|
||||
axios.post('../../getNoticeAll').then(function (res) {
|
||||
that.vue.noticeList=res.data;
|
||||
console.log(that.vue.noticeList)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function addRecordJILU(){
|
||||
that=this;
|
||||
axios.get('../../getStudentMsgByBuildId?pageNum='+1+'&pageSize='+100+'&filter='+''+"&key="+''+"&dormBuildId="+dormBuildId).then(function (res) {
|
||||
that.addRecordMsg_vue.studentManageList=res.data.rows;
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function addRecordMsg(){
|
||||
var that=this;
|
||||
var stuIndex=this.addRecordMsg_vue.stuIndex;
|
||||
this.addRecordMsg_vue.recordMsg.studentNumber=this.addRecordMsg_vue.studentManageList[stuIndex].stuNum;
|
||||
this.addRecordMsg_vue.recordMsg.studentName=this.addRecordMsg_vue.studentManageList[stuIndex].name;
|
||||
this.addRecordMsg_vue.recordMsg.dormName=this.addRecordMsg_vue.studentManageList[stuIndex].dormName;
|
||||
this.addRecordMsg_vue.recordMsg.dormBuildId=dormBuildId;
|
||||
this.addRecordMsg_vue.recordMsg.date=new Date(this.addRecordMsg_vue.recordMsg.date)
|
||||
console.log(this.addRecordMsg_vue.recordMsg)
|
||||
axios.post('../../addRecordMsg', this.addRecordMsg_vue.recordMsg, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
that.addRecordMsg_vue.recordMsg={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//获取studentManage
|
||||
function getRecordMsg(){
|
||||
console.log("num",this.vue.pagination.pageNum)
|
||||
var that=this;
|
||||
axios.get('../../getRecordMsg?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key+"&dormBuildId="+dormBuildId).then(function (res) {
|
||||
that.vue.recordMsgList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="studentName";
|
||||
that.vue.search.key=""
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//根据获取dormManId DormManage
|
||||
function getRecordById(recordId){
|
||||
var that=this;
|
||||
axios.get('../../getRecordById',{
|
||||
params:{
|
||||
recordId:recordId
|
||||
}
|
||||
}).then(function (res) {
|
||||
|
||||
that.getRecordMsgById_vue.recordMsg=res.data;
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//根据Id更新
|
||||
function updataRecordMsg(){
|
||||
var that=this;
|
||||
var recordMsg=this.getRecordMsgById_vue.recordMsg;
|
||||
axios.post('../../updataRecordMsg', recordMsg, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
that.getRecordMsgById_vue.recordMsg={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据Id删除
|
||||
function recordManagerDeleteById(recordId){
|
||||
var that=this;
|
||||
axios.get('../../recordManagerDeleteById1?recordId='+recordId).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//查询
|
||||
function searchDormManage(){
|
||||
console.log(this.vue.search);
|
||||
getRecordMsg();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addRecordMsg_vue.studentManageList={};
|
||||
this.addRecordMsg_vue.stuId=-1;
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getRecordMsg();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getRecordMsg();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
var addRecordMsg_vue=new Vue({
|
||||
el:'#addRecordMsg_app',
|
||||
data:{
|
||||
recordMsg:{
|
||||
|
||||
},
|
||||
studentManageList:{},
|
||||
stuIndex:-1
|
||||
}
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
recordMsgList:[],
|
||||
search:{
|
||||
filter:"studentName",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
},
|
||||
noticeList:[]
|
||||
},
|
||||
methods:{
|
||||
getRecordById:function(recordId){
|
||||
getRecordById(recordId)
|
||||
},
|
||||
recordManagerDeleteById:function(recordId){
|
||||
recordManagerDeleteById(recordId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var getRecordMsgById_vue=new Vue({
|
||||
el:'#getRecordMsgById_app',
|
||||
data:{
|
||||
recordMsg:{}
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,124 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
var dormBuildId;
|
||||
window.onload=function(){
|
||||
getSession({role:"dormManager"});
|
||||
dormBuildId=sessionStorage.getItem("dormBuildId");
|
||||
var that=this;
|
||||
getStudentManage()
|
||||
//获取公告
|
||||
getNoticeAll();
|
||||
}
|
||||
|
||||
function getNoticeAll(){
|
||||
var that=this;
|
||||
axios.post('../../getNoticeAll').then(function (res) {
|
||||
that.vue.noticeList=res.data;
|
||||
console.log(that.vue.noticeList)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//获取studentManage
|
||||
function getStudentManage(){
|
||||
var that=this;
|
||||
axios.get('../../getStudentMsgByBuildId?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key+"&dormBuildId="+dormBuildId).then(function (res) {
|
||||
that.vue.studentManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="name";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//根据Id删除
|
||||
function studentMsgDeleteById(studentId){
|
||||
var that=this;
|
||||
axios.get('../../studentMsgDeleteById?studentId='+studentId).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//查询
|
||||
function searchDormManage(){
|
||||
console.log(this.vue.search);
|
||||
getStudentManage();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addStudentManage_vue.studentManage={};
|
||||
this.addStudentManage_vue.studentManage.sex="0";
|
||||
$("#addPassword").val('')
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getStudentManage();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getStudentManage();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
var addStudentManage_vue=new Vue({
|
||||
el:'#addStudentManage_app',
|
||||
data:{
|
||||
studentManage:{
|
||||
stuNum:"",
|
||||
password:"",
|
||||
name:"",
|
||||
sex:"0",
|
||||
dormBuildId:null,
|
||||
dormName:"",
|
||||
tel:""
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
studentManageList:[],
|
||||
search:{
|
||||
filter:"name",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
},
|
||||
noticeList:[]
|
||||
},
|
||||
methods:{
|
||||
|
||||
studentMsgDeleteById:function(studentId){
|
||||
studentMsgDeleteById(studentId);
|
||||
}
|
||||
}
|
||||
});
|
@ -0,0 +1,69 @@
|
||||
/**
|
||||
* 公众号【C you again】
|
||||
* 个人博客:cyouagain.cn
|
||||
* 登录管理
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
//登录
|
||||
function login(){
|
||||
var login=this.login_vue.login;
|
||||
login.role=$("#role").val();
|
||||
if(login.userName !=null && login.userName.trim()!=''){
|
||||
if(login.password != null && login.password.trim()!=''){
|
||||
login_fun()
|
||||
}
|
||||
else{
|
||||
alert("密码不能为空")
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert("用户名不能为空")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function login_fun(){
|
||||
var login=this.login_vue.login;
|
||||
axios.post('login',login).then(function (res) {
|
||||
|
||||
if(res.data.length===1){
|
||||
//用户存在
|
||||
var url="";
|
||||
this.login_vue.login={};
|
||||
|
||||
if(login.role=="admin"){
|
||||
url="dorm/admin/admin_index.html";
|
||||
}
|
||||
if(login.role=="dormManager"){
|
||||
url="dorm/dormManager/dormManage_index.html"
|
||||
}
|
||||
if(login.role=="student"){
|
||||
url="dorm/student/student_index.html"
|
||||
}
|
||||
window.location.replace(url);
|
||||
}
|
||||
else{
|
||||
this.login_vue.login={}
|
||||
alert("用户不存在或密码错误,请认真检查")
|
||||
}
|
||||
|
||||
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var login_vue=new Vue({
|
||||
el:'#login_app',
|
||||
data:{
|
||||
login:{
|
||||
userName:"",
|
||||
password:"",
|
||||
role:""
|
||||
}
|
||||
}
|
||||
})
|
@ -0,0 +1,49 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
//获取session
|
||||
function getSession(role){
|
||||
var that=this;
|
||||
axios.post('../../getSession',role).then(function (res) {
|
||||
if(res.data[0] !=null){
|
||||
that.session_vue.login=res.data[0][0];
|
||||
sessionStorage.removeItem("studentNumber");
|
||||
sessionStorage.setItem("studentNumber",that.session_vue.login.stuNum);
|
||||
}else{
|
||||
alert("未登录");
|
||||
window.location.replace('../../')
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//用户退出
|
||||
function exitSys(){
|
||||
var that=this;
|
||||
axios.get('../../exitSys?exit=student').then(function (res) {
|
||||
if(res.data.result==true){
|
||||
window.location.replace("../../")
|
||||
console.log("注销成功")
|
||||
}
|
||||
else{
|
||||
alert("注销失败");
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
var session_vue=new Vue({
|
||||
el:"#session_app",
|
||||
data:{
|
||||
login:{
|
||||
name:""
|
||||
}
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,130 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
var studentNumber;
|
||||
window.onload=function(){
|
||||
getSession({role:"student"});
|
||||
studentNumber=sessionStorage.getItem("studentNumber");
|
||||
getNoticeAll()
|
||||
var that=this;
|
||||
getPunchClockRecordMsgByStuNum()
|
||||
|
||||
}
|
||||
|
||||
function getNoticeAll(){
|
||||
var that=this;
|
||||
axios.post('../../getNoticeAll').then(function (res) {
|
||||
that.vue.noticeList=res.data;
|
||||
console.log(that.vue.noticeList)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据学号获取
|
||||
function getPunchClockRecordMsgByStuNum(){
|
||||
var that=this;
|
||||
axios.get('../../getPunchClockRecordMsgByStuNum?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key+'&studentNumber='+studentNumber).then(function (res) {
|
||||
that.vue.punchClockRecordManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="date";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function getPunckColcokRecordById(id){
|
||||
var that=this;
|
||||
axios.get('../../getPunckColcokRecordById?id='+id).then(function (res) {
|
||||
that.punckClockRecordById_vue.punckClockRecordMasg=res.data;
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function updataPunchClockRecordMsg(){
|
||||
var punckClockRecordMasg=this.punckClockRecordById_vue.punckClockRecordMasg;
|
||||
axios.post('../../updataPunchClockRecordMsg', punckClockRecordMasg, {headers: {'Content-Type': 'application/json;charset=UTF-8'}})
|
||||
.then(function (response) {
|
||||
if(response.data.result==true){
|
||||
console.log($("#"+punckClockRecordMasg.id))
|
||||
$("#"+punckClockRecordMasg.id).attr("disabled","disabled");
|
||||
this.punckClockRecordById_vue.punckClockRecordMasg={};
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//查询
|
||||
function searchRecordMsg(){
|
||||
getPunchClockRecordMsgByStuNum();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addStudentManage_vue.studentManage={};
|
||||
this.addStudentManage_vue.studentManage.sex="0";
|
||||
$("#addPassword").val('')
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getPunchClockRecordMsgByStuNum();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getPunchClockRecordMsgByStuNum();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
punchClockRecordManageList:[],
|
||||
search:{
|
||||
filter:"date",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
},
|
||||
noticeList:[]
|
||||
|
||||
},
|
||||
methods:{
|
||||
getPunckColcokRecordById:function(id){
|
||||
getPunckColcokRecordById(id);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var punckClockRecordById_vue=new Vue({
|
||||
el:'#punckClockRecordById_app',
|
||||
data:{
|
||||
punckClockRecordMasg:{}
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -0,0 +1,94 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
var studentNumber;
|
||||
window.onload=function(){
|
||||
getSession({role:"student"});
|
||||
studentNumber=sessionStorage.getItem("studentNumber");
|
||||
getNoticeAll();
|
||||
var that=this;
|
||||
getRecordMsgByStuNum()
|
||||
|
||||
}
|
||||
|
||||
function getNoticeAll(){
|
||||
var that=this;
|
||||
axios.post('../../getNoticeAll').then(function (res) {
|
||||
that.vue.noticeList=res.data;
|
||||
console.log(that.vue.noticeList)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
//根据学号获取考勤记录
|
||||
function getRecordMsgByStuNum(){
|
||||
console.log("num",this.vue.pagination.pageNum)
|
||||
var that=this;
|
||||
axios.get('../../getRecordMMsgByStuNum?pageNum='+that.vue.pagination.pageNum+'&pageSize='+that.vue.pagination.pageSize+'&filter='+this.vue.search.filter+"&key="+this.vue.search.key+'&studentNumber='+studentNumber).then(function (res) {
|
||||
that.vue.recordManageList=res.data.rows;
|
||||
that.vue.pagination.pageTotal=Math.ceil(res.data.total/that.vue.pagination.pageSize);
|
||||
that.vue.search.filter="date";
|
||||
that.vue.search.key=""
|
||||
console.log(res)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//查询
|
||||
function searchRecordMsg(){
|
||||
getRecordMsgByStuNum();
|
||||
}
|
||||
//用户点击退出
|
||||
function exit(){
|
||||
this.addStudentManage_vue.studentManage={};
|
||||
this.addStudentManage_vue.studentManage.sex="0";
|
||||
$("#addPassword").val('')
|
||||
}
|
||||
|
||||
//分页
|
||||
function pageUp(){
|
||||
if(this.vue.pagination.pageNum>1){
|
||||
this.vue.pagination.pageNum--;
|
||||
getRecordMsgByStuNum();
|
||||
}
|
||||
else{
|
||||
alert("就是第一页")
|
||||
}
|
||||
}
|
||||
function pageDown(){
|
||||
if(this.vue.pagination.pageNum<this.vue.pagination.pageTotal){
|
||||
this.vue.pagination.pageNum++;
|
||||
getRecordMsgByStuNum();
|
||||
|
||||
}
|
||||
else{
|
||||
alert("已经是最后一页")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
recordManageList:[],
|
||||
search:{
|
||||
filter:"date",
|
||||
key:""
|
||||
},
|
||||
pagination:{
|
||||
pageNum:1,
|
||||
pageSize:17,
|
||||
pageTotal:0
|
||||
},
|
||||
noticeList:[]
|
||||
},
|
||||
methods:{
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1,100 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
window.onload=function(){
|
||||
getSession({role:"student"});
|
||||
//获取公告
|
||||
getNoticeAll();
|
||||
}
|
||||
|
||||
|
||||
function getNoticeAll(){
|
||||
var that=this;
|
||||
axios.post('../../getNoticeAll').then(function (res) {
|
||||
that.vue.noticeList=res.data;
|
||||
console.log(that.vue.noticeList)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*--------------------个人--------------------*/
|
||||
function my(){
|
||||
console.log(this.session_vue.login)
|
||||
var that=this;
|
||||
axios.post('../../student_getMyMsgById',this.session_vue.login).then(function (res) {
|
||||
that.user_vue.user=res.data;
|
||||
console.log(that.user_vue.user)
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function editMyMsg(){
|
||||
var student=this.user_vue.user;
|
||||
axios.post('../../student_updateMyMsgById',student).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload()
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
function checkedPassword(){
|
||||
my();
|
||||
var password= this.user_vue.user.password;
|
||||
var oldPwd=$("#oldPwd").val().trim();
|
||||
if(password != null && password == oldPwd){
|
||||
|
||||
}
|
||||
else{
|
||||
alert("原密码不正确")
|
||||
console.log(password)
|
||||
console.log(oldPwd)
|
||||
$("#oldPwd").val('')
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function editPassword(){
|
||||
var newPwd=$("#newPwd").val().trim();
|
||||
this.user_vue.user.password=newPwd;
|
||||
var student =this.user_vue.user;
|
||||
axios.post('../../student_updatePsd',student).then(function (res) {
|
||||
console.log(res)
|
||||
if(res.data.result==true){
|
||||
window.location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error);
|
||||
});
|
||||
}
|
||||
|
||||
/*--------------------个人--------------------*/
|
||||
|
||||
var user_vue=new Vue({
|
||||
el:'#user_app',
|
||||
data:{
|
||||
user:{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var vue=new Vue({
|
||||
el:'#app',
|
||||
data:{
|
||||
noticeList:[]
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|