登录页面文字,logo,logo图片大小,底部文字说明支持动态

master
zengwh 5 years ago
parent 138a71b7f9
commit d6890959dd

@ -1,6 +1,7 @@
package com.manage.controller;
import com.alibaba.fastjson.JSON;
import com.manage.dao.Power_Login_SetMapper;
import com.manage.encrypt.Base64;
import com.manage.encrypt.MD5;
import com.manage.entity.*;
@ -14,6 +15,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@ -36,11 +38,15 @@ public class LoginController {
private LogService logService;
@Autowired
private Power_DeptService power_deptService;
@Autowired
private Power_Login_SetMapper powerLoginSetMapper;
@RequestMapping(value = "login",method = RequestMethod.GET)
public String toLogin(){
public String toLogin(Model model){
Power_Login_Set loginSet = powerLoginSetMapper.selectByPrimaryKey(1);
model.addAttribute("loginSet",loginSet);
CacheManager.addExcCount("noExc");
return "loginDir/login174";
return "loginDir/login";
}
@RequestMapping(value = "login",method = RequestMethod.POST)
@ -143,7 +149,7 @@ public class LoginController {
e.printStackTrace();
CacheManager.addExcCount("exc");
}
return "loginDir/login174";
return "loginDir/login";
}
@RequestMapping("refuse")
public String refuse(){

@ -36,18 +36,22 @@
<!--头部文字-->
<div class="head_left left">
<div class="head_left_span">
<span>嘉时&nbsp;&nbsp;&nbsp;病历无纸化归档管理系统</span></div>
<span>${loginSet.context}</span></div>
</div>
<!--右边logon-->
<div class="head_right left">
<img src="${path}/static/img/login/yingde.png">
<c:if test="${loginSet.logoPath != ''}">
<img src="${path}/${loginSet.logoPath}" width="${loginSet.logoWidth}px" height="${loginSet.logoHeight}px">
</c:if>
</div>
</div>
<!--中间-->
<div class="login_content">
<div class="content_left left">
<div class="image1" style="background:url('${path}/static/img/login/图.png') no-repeat">
</div>
<c:if test="${loginSet.pic1Path != ''}">
<div class="image1" style="background:url('${path}/${loginSet.pic1Path}') no-repeat">
</div>
</c:if>
</div>
<div class="content_login left">
<form method="post" action="${path}/login">
@ -75,7 +79,7 @@
</div>
<!--尾部-->
<div class="login_foot">
<div class="span_div"><span>技术支持:厦门嘉时软件科技有限公司</span></div>
<div class="span_div"><span>${loginSet.footContext}</span></div>
</div>
<script type="text/javascript" src="${path}/static/js/login.js"></script>
</body>

@ -88,7 +88,7 @@ h3{
*
*/
.head_left{
width:66%;
width:50%;
height:100%;
}
/**
@ -103,8 +103,8 @@ h3{
*
*/
.head_right{
padding-left: 107px;
width: 33%;
text-align: right;
width: 50%;
height: 100%;
padding-top: 28px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

@ -0,0 +1,17 @@
package com.manage.dao;
import com.manage.entity.Power_Login_Set;
public interface Power_Login_SetMapper {
int deleteByPrimaryKey(Integer id);
int insert(Power_Login_Set record);
int insertSelective(Power_Login_Set record);
Power_Login_Set selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Power_Login_Set record);
int updateByPrimaryKey(Power_Login_Set record);
}

@ -0,0 +1,73 @@
package com.manage.entity;
public class Power_Login_Set {
private Integer id;
private String context;
private String logoPath;
private Integer logoWidth;
private Integer logoHeight;
private String pic1Path;
private String footContext;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getContext() {
return context;
}
public void setContext(String context) {
this.context = context == null ? null : context.trim();
}
public String getLogoPath() {
return logoPath;
}
public void setLogoPath(String logoPath) {
this.logoPath = logoPath == null ? null : logoPath.trim();
}
public Integer getLogoWidth() {
return logoWidth;
}
public void setLogoWidth(Integer logoWidth) {
this.logoWidth = logoWidth;
}
public Integer getLogoHeight() {
return logoHeight;
}
public void setLogoHeight(Integer logoHeight) {
this.logoHeight = logoHeight;
}
public String getPic1Path() {
return pic1Path;
}
public void setPic1Path(String pic1Path) {
this.pic1Path = pic1Path == null ? null : pic1Path.trim();
}
public String getFootContext() {
return footContext;
}
public void setFootContext(String footContext) {
this.footContext = footContext == null ? null : footContext.trim();
}
}

@ -0,0 +1,117 @@
<?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.manage.dao.Power_Login_SetMapper" >
<resultMap id="BaseResultMap" type="com.manage.entity.Power_Login_Set" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="context" property="context" jdbcType="VARCHAR" />
<result column="logo_path" property="logoPath" jdbcType="VARCHAR" />
<result column="logo_width" property="logoWidth" jdbcType="INTEGER" />
<result column="logo_height" property="logoHeight" jdbcType="INTEGER" />
<result column="pic1_path" property="pic1Path" jdbcType="VARCHAR" />
<result column="foot_context" property="footContext" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, context, logo_path, logo_width, logo_height, pic1_path, foot_context
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from power_login_set
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from power_login_set
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.manage.entity.Power_Login_Set" >
insert into power_login_set (id, context, logo_path,
logo_width, logo_height, pic1_path,
foot_context)
values (#{id,jdbcType=INTEGER}, #{context,jdbcType=VARCHAR}, #{logoPath,jdbcType=VARCHAR},
#{logoWidth,jdbcType=INTEGER}, #{logoHeight,jdbcType=INTEGER}, #{pic1Path,jdbcType=VARCHAR},
#{footContext,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.manage.entity.Power_Login_Set" >
insert into power_login_set
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="context != null" >
context,
</if>
<if test="logoPath != null" >
logo_path,
</if>
<if test="logoWidth != null" >
logo_width,
</if>
<if test="logoHeight != null" >
logo_height,
</if>
<if test="pic1Path != null" >
pic1_path,
</if>
<if test="footContext != null" >
foot_context,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="context != null" >
#{context,jdbcType=VARCHAR},
</if>
<if test="logoPath != null" >
#{logoPath,jdbcType=VARCHAR},
</if>
<if test="logoWidth != null" >
#{logoWidth,jdbcType=INTEGER},
</if>
<if test="logoHeight != null" >
#{logoHeight,jdbcType=INTEGER},
</if>
<if test="pic1Path != null" >
#{pic1Path,jdbcType=VARCHAR},
</if>
<if test="footContext != null" >
#{footContext,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Login_Set" >
update power_login_set
<set >
<if test="context != null" >
context = #{context,jdbcType=VARCHAR},
</if>
<if test="logoPath != null" >
logo_path = #{logoPath,jdbcType=VARCHAR},
</if>
<if test="logoWidth != null" >
logo_width = #{logoWidth,jdbcType=INTEGER},
</if>
<if test="logoHeight != null" >
logo_height = #{logoHeight,jdbcType=INTEGER},
</if>
<if test="pic1Path != null" >
pic1_path = #{pic1Path,jdbcType=VARCHAR},
</if>
<if test="footContext != null" >
foot_context = #{footContext,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Login_Set" >
update power_login_set
set context = #{context,jdbcType=VARCHAR},
logo_path = #{logoPath,jdbcType=VARCHAR},
logo_width = #{logoWidth,jdbcType=INTEGER},
logo_height = #{logoHeight,jdbcType=INTEGER},
pic1_path = #{pic1Path,jdbcType=VARCHAR},
foot_context = #{footContext,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -8,6 +8,4 @@ import java.util.List;
public interface User_Dept_MenuService {
List<User_Dept_Menu> selectAll(String userName,String sysFlag,Integer userId,Integer roleId,
Integer sysId,Integer hospitalId);
List<User_Dept_Menu> selectAllMenusByUserIdAndSysFlag(Integer userId,String sysFlag);
}

@ -36,9 +36,4 @@ public class User_Dept_MenuServiceImpl implements User_Dept_MenuService {
return userDeptMenuMapper.selectAll(userName, sysFlag, userId, roleId, sysId, hospitalId);
}
}
@Override
public List<User_Dept_Menu> selectAllMenusByUserIdAndSysFlag(Integer userId, String sysFlag) {
return userDeptMenuMapper.selectAllMenusByUserIdAndSysFlag(userId, sysFlag);
}
}

Loading…
Cancel
Save