Merge branch 'master' of https://github.com/wangtianrui/OldPeopleHome
893
server/OldPeopleHome/.idea/workspace.xml
generated
@@ -0,0 +1,13 @@
|
||||
package com.oldpeoplehome.dao;
|
||||
|
||||
import com.oldpeoplehome.entity.Admin;
|
||||
|
||||
/**
|
||||
* Created By Jiangyuwei on 2019/8/30 11:25
|
||||
* Description:
|
||||
*/
|
||||
public interface AdminDao {
|
||||
|
||||
Admin findByAccount(String account);
|
||||
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public interface ChildDao {
|
||||
Child findById(long childId);
|
||||
Child findByLongId(String childLongId);
|
||||
Child findByName(String childName);
|
||||
Child findByAccount(String account);
|
||||
List<Child> findAll();
|
||||
void delete(long childId);
|
||||
void update(Child child);
|
||||
|
||||
@@ -15,6 +15,7 @@ public interface ParentDao {
|
||||
Parent findByLongId(String longId);
|
||||
Parent findByRoomId(int roomId);
|
||||
Parent findByName(String name);
|
||||
Parent findByAccount(String name);
|
||||
List<Parent> findAll();
|
||||
void insert(Parent parent);
|
||||
void update(Parent parent);
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.oldpeoplehome.entity;
|
||||
|
||||
/**
|
||||
* Created By Jiangyuwei on 2019/8/30 11:10
|
||||
* Description:
|
||||
*/
|
||||
public class Admin {
|
||||
|
||||
private String adminAccount;
|
||||
private String adminPassword;
|
||||
|
||||
public Admin() {
|
||||
}
|
||||
|
||||
public Admin(String adminAccount, String adminPassword) {
|
||||
this.adminAccount = adminAccount;
|
||||
this.adminPassword = adminPassword;
|
||||
}
|
||||
|
||||
public String getAdminAccount() {
|
||||
return adminAccount;
|
||||
}
|
||||
|
||||
public void setAdminAccount(String adminAccount) {
|
||||
this.adminAccount = adminAccount;
|
||||
}
|
||||
|
||||
public String getAdminPassword() {
|
||||
return adminPassword;
|
||||
}
|
||||
|
||||
public void setAdminPassword(String adminPassword) {
|
||||
this.adminPassword = adminPassword;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Admin{" +
|
||||
"adminAccount='" + adminAccount + '\'' +
|
||||
", adminPassword='" + adminPassword + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.oldpeoplehome.service;
|
||||
|
||||
import com.oldpeoplehome.entity.Admin;
|
||||
|
||||
/**
|
||||
* Created By Jiangyuwei on 2019/8/30 11:31
|
||||
* Description:
|
||||
*/
|
||||
public interface AdminService {
|
||||
|
||||
Admin login(String account);
|
||||
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public interface ChildService {
|
||||
Child findById(long childId);
|
||||
Child findByLongId(String childLongId);
|
||||
Child findByName(String childName);
|
||||
Child login(String account);
|
||||
List<Child> findAll();
|
||||
void delete(long childId);
|
||||
void update(Child child);
|
||||
|
||||
@@ -13,6 +13,7 @@ public interface ParentService {
|
||||
Parent findByLongId(String longId);
|
||||
Parent findByRoomId(int roomId);
|
||||
Parent findByName(String name);
|
||||
Parent login(String account);
|
||||
List<Parent> findAll();
|
||||
void insert(Parent parent);
|
||||
void update(Parent parent);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.oldpeoplehome.service.impl;
|
||||
|
||||
import com.oldpeoplehome.dao.AdminDao;
|
||||
import com.oldpeoplehome.entity.Admin;
|
||||
import com.oldpeoplehome.service.AdminService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* Created By Jiangyuwei on 2019/8/30 11:31
|
||||
* Description:
|
||||
*/
|
||||
@Service
|
||||
public class AdminServiceImpl implements AdminService {
|
||||
|
||||
@Autowired
|
||||
private AdminDao adminDao;
|
||||
|
||||
@Override
|
||||
public Admin login(String account) {
|
||||
return adminDao.findByAccount(account);
|
||||
}
|
||||
}
|
||||
@@ -52,4 +52,8 @@ public class ChildServiceImpl implements ChildService {
|
||||
public void insert(Child child) {
|
||||
childDao.insert(child);
|
||||
}
|
||||
@Override
|
||||
public Child login(String account) {
|
||||
return childDao.findByAccount(account);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import java.util.List;
|
||||
@Service
|
||||
public class ParentServiceImpl implements ParentService {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private ParentDao parentDao;
|
||||
|
||||
@@ -62,4 +64,8 @@ public class ParentServiceImpl implements ParentService {
|
||||
public void delete(long id) {
|
||||
parentDao.delete(id);
|
||||
}
|
||||
@Override
|
||||
public Parent login(String account) {
|
||||
return parentDao.findByAccount(account);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.oldpeoplehome.web;
|
||||
|
||||
import com.oldpeoplehome.entity.Admin;
|
||||
import com.oldpeoplehome.service.AdminService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created By Jiangyuwei on 2019/8/30 11:57
|
||||
* Description:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin")
|
||||
public class AdminController {
|
||||
|
||||
@Autowired
|
||||
private AdminService adminService;
|
||||
|
||||
@RequestMapping(value = "/login",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Admin login(@RequestParam Map<String, Object> params){
|
||||
Admin res = adminService.login(params.get("account").toString());
|
||||
return res.getAdminPassword().equals(params.get("password").toString()) ? res:null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,4 +72,10 @@ public class ChildController {
|
||||
childService.delete(Long.valueOf(id));
|
||||
return childService.findAll();
|
||||
}
|
||||
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Child login(@RequestParam Map<String, Object> params){
|
||||
Child res = childService.login(params.get("account").toString());
|
||||
return res.getChildPassword().equals(params.get("password").toString()) ? res:null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.oldpeoplehome.web;
|
||||
|
||||
import com.oldpeoplehome.entity.Admin;
|
||||
import com.oldpeoplehome.entity.Parent;
|
||||
import com.oldpeoplehome.service.ParentService;
|
||||
import com.oldpeoplehome.utils.MethodUtil;
|
||||
@@ -76,4 +77,11 @@ public class ParentController {
|
||||
parentService.delete(Long.valueOf(id));
|
||||
return parentService.findAll();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Parent login(@RequestParam Map<String, Object> params){
|
||||
Parent res = parentService.login(params.get("account").toString());
|
||||
return res.getParentPassword().equals(params.get("password").toString()) ? res:null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
jdbc.driver=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://localhost:3306/oldpeople?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
|
||||
jdbc.url=jdbc:mysql://localhost:3306/ssmtest?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
|
||||
jdbc.username=root
|
||||
jdbc.password=root
|
||||
|
||||
16
server/OldPeopleHome/src/main/resources/mapper/AdminDao.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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.oldpeoplehome.dao.AdminDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Admin">
|
||||
<result column="account" property="adminAccount" jdbcType="VARCHAR"/>
|
||||
<result column="password" property="adminPassword" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByAccount" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from admin where account=#{account}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -23,7 +23,9 @@
|
||||
<select id="findByName" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from child where name = #{childName}
|
||||
</select>
|
||||
|
||||
<select id="findByAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select * from child where account = #{childAccount}
|
||||
</select>
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select * from child
|
||||
</select>
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
<select id="findByName" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.name=#{p.parentName}
|
||||
</select>
|
||||
<select id="findByAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.account=#{p.parentAccount}
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id
|
||||
|
||||
@@ -91,4 +91,10 @@ CREATE TABLE `sleep` (
|
||||
KEY `index_pid_date` (`pid`,`date`) USING BTREE,
|
||||
CONSTRAINT `fk_pid1` FOREIGN KEY (`pid`) REFERENCES `parent` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ;
|
||||
CREATE TABLE `Untitled` (
|
||||
`account` varchar(255) NOT NULL COMMENT '管理员账号',
|
||||
`password` varchar(255) NULL COMMENT '管理员密码',
|
||||
PRIMARY KEY (`account`),
|
||||
UNIQUE INDEX `index_acc`(`account`) USING BTREE
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.oldpeoplehome.service;
|
||||
|
||||
import com.oldpeoplehome.BaseTest;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* Created By Jiangyuwei on 2019/8/30 11:33
|
||||
* Description:
|
||||
*/
|
||||
public class AdminServiceTest extends BaseTest {
|
||||
|
||||
@Autowired
|
||||
private AdminService adminService;
|
||||
|
||||
@Test
|
||||
public void testLogin(){
|
||||
|
||||
System.out.println(adminService.login("root"));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
jdbc.driver=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://localhost:3306/oldpeople?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
|
||||
jdbc.url=jdbc:mysql://localhost:3306/ssmtest?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
|
||||
jdbc.username=root
|
||||
jdbc.password=root
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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.oldpeoplehome.dao.AdminDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Admin">
|
||||
<result column="account" property="adminAccount" jdbcType="VARCHAR"/>
|
||||
<result column="password" property="adminPassword" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByAccount" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from admin where account=#{account}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -23,7 +23,9 @@
|
||||
<select id="findByName" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from child where name = #{childName}
|
||||
</select>
|
||||
|
||||
<select id="findByAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select * from child where account = #{childAccount}
|
||||
</select>
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select * from child
|
||||
</select>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<result column="date" property="motionDate" jdbcType="DATE"/>
|
||||
<result column="count" property="motionCount" jdbcType="BIGINT"/>
|
||||
<result column="distance" property="motionDistance" jdbcType="DOUBLE"/>
|
||||
<result column="energy" property="motionEnergy" jdbcType="DOUBLE"/>
|
||||
<result column="time" property="motionTime" jdbcType="TIME"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -24,7 +25,7 @@
|
||||
select m.*, p.* from motion m left join parent p on m.pid = p.id where m.pid = #{motionParentId} and m.date = #{startDate}
|
||||
</select>
|
||||
<insert id="insert" parameterType="Motion">
|
||||
insert into motion(pid, date, count, distance, time)
|
||||
values (#{motionParentId}, #{motionDate}, #{motionCount}, #{motionDistance}, #{motionTime})
|
||||
insert into motion(pid, date, count, distance, energy, time)
|
||||
values (#{motionParentId}, #{motionDate}, #{motionCount}, #{motionDistance}, #{motionEnergy}, #{motionTime})
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -33,6 +33,9 @@
|
||||
<select id="findByName" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.name=#{p.parentName}
|
||||
</select>
|
||||
<select id="findByAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.account=#{p.parentAccount}
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id
|
||||
|
||||
16
server/OldPeopleHome/target/classes/mapper/AdminDao.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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.oldpeoplehome.dao.AdminDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Admin">
|
||||
<result column="account" property="adminAccount" jdbcType="VARCHAR"/>
|
||||
<result column="password" property="adminPassword" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByAccount" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from admin where account=#{account}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -23,7 +23,9 @@
|
||||
<select id="findByName" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from child where name = #{childName}
|
||||
</select>
|
||||
|
||||
<select id="findByAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select * from child where account = #{childAccount}
|
||||
</select>
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select * from child
|
||||
</select>
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
<select id="findByName" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.name=#{p.parentName}
|
||||
</select>
|
||||
<select id="findByAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.account=#{p.parentAccount}
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
|
||||
| 实体 | url示例 | 请求方式 | 功能概述 | 参数格式 |
|
||||
| -------------- | ---------------------- | -------- | ----------------------------------------- | ------------------------------------------------------------ |
|
||||
| Admin | /admin/login | POST | 后台管理员账号 | account:root,password:root |
|
||||
| Room | /room/get/1 | GET | 查询id=1的room的详细信息 | |
|
||||
| Room | /room/list | GET | 查询所有的room信息 | |
|
||||
| Room | /room/list/empty | GET | 查询所有空置room信息(web端给老人分配房间) | |
|
||||
@@ -76,6 +77,7 @@
|
||||
| Parent | /parent/add | POST | 添加老人 | parentSex:老人性别,parentPassword:老人密码,parentAccount:账号,parentName:姓名,parentBirth:生日,parentLongId:身份证 |
|
||||
| Parent | /parent/update/1 | POST | 更新id=1的老人信息 | **要更新的字段严格按照命名格式传参**比如name就传入parentName |
|
||||
| Parent | /parent/delete/1 | DELETE | 删除id=1的老人 | |
|
||||
| Parent | /parent/login | POST | 老人登陆 | 登陆成功返回老人的所有信息,登陆失败返回null(不返回) |
|
||||
| Child | /child/get/1 | GET | 查询id=1的子女 | |
|
||||
| Child | /child/get_longid/111 | GET | 查询身份证=111的child的详细信息 | |
|
||||
| Child | /child/get_name/小蒋 | GET | 查询姓名=小蒋的child的详细信息 | |
|
||||
@@ -83,6 +85,7 @@
|
||||
| Child | /child/add | POST | | childSex,childPassword,childAccount,childName,childLongId,childPhone |
|
||||
| Child | /child/update/1 | POST | 更新id=1的子女信息 | **要更新的字段严格按照命名格式传参**比如name就传入parentName |
|
||||
| Child | /child/delete/1 | DELETE | 删除id=1的子女信息 | |
|
||||
| Child | /child/login | POST | 登陆子女 | 登陆成功返回子女信息,失败返回空(不返回) |
|
||||
| ChildAndParent | /child_parent/child/1 | GET | 查看子女id=1对应的老人 | |
|
||||
| ChildAndParent | /child_parent/parent/1 | GET | 查看老人id=1对应的子女 | |
|
||||
| ChildAndParent | /child_parent/add | POST | 添加老人子女对应关系 | 子女id:child,老人id:parent,关系:relation |
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>首页</title>
|
||||
<title>Old People Home</title>
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon.png">
|
||||
<link rel="stylesheet" href="firstPage_style.css">
|
||||
</head>
|
||||
<!-- <frameset cols="100,*">
|
||||
<frame src="frame_contents.html" noresize="noresize">
|
||||
<frame src="frame_rooms.html" name="showFrame" noresize="noresize">
|
||||
</frameset> -->
|
||||
<body>
|
||||
<div class="box1">
|
||||
<span class="upper">O</span>
|
||||
@@ -20,11 +17,59 @@
|
||||
<span class="upper">H</span>
|
||||
<span class="lower">ome</span>
|
||||
</div>
|
||||
<div class="leftGuide">
|
||||
<div class="menu">
|
||||
<ul>
|
||||
<li><a href="#" id="rooms" class="guide">房间</a></li><br><br>
|
||||
<li><a href="#" id="people" class="guide">老人</a></li>
|
||||
</ul>
|
||||
<li>
|
||||
<a href="firstPage.html" id="firstPage">首页</a>
|
||||
</li>
|
||||
<li id="self">
|
||||
<a href="personal.html" id="my">个人</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box2">
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#">001</a></td>
|
||||
<td><a href="#">002</a></td>
|
||||
<td><a href="#">003</a></td>
|
||||
<td><a href="#">004</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">005</a></td>
|
||||
<td><a href="#">006</a></td>
|
||||
<td><a href="#">007</a></td>
|
||||
<td><a href="#">008</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">009</a></td>
|
||||
<td><a href="#">010</a></td>
|
||||
<td><a href="#">011</a></td>
|
||||
<td><a href="#">012</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">013</a></td>
|
||||
<td><a href="#">014</a></td>
|
||||
<td><a href="#">015</a></td>
|
||||
<td><a href="#">016</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">017</a></td>
|
||||
<td><a href="#">018</a></td>
|
||||
<td><a href="#">019</a></td>
|
||||
<td><a href="#">020</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="guide">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#">老人注册</a><br>
|
||||
</li>
|
||||
<li id="delete">
|
||||
<a href="#">老人注销</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,13 +1,18 @@
|
||||
body {
|
||||
background-color: aliceblue;
|
||||
background-color: papayawhip;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* LOGO */
|
||||
.box1 {
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 100px;
|
||||
|
||||
left: 10px;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.upper {
|
||||
color: rgb(255, 115, 0);
|
||||
@@ -18,36 +23,99 @@ body {
|
||||
}
|
||||
.lower {
|
||||
color: rgb(255, 183, 124);
|
||||
/* font-weight: bold; */
|
||||
font-family: sans-serif;
|
||||
font-size: 45px;
|
||||
letter-spacing: -5px;
|
||||
}
|
||||
span {
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.leftGuide {
|
||||
position: absolute;
|
||||
top: 140px;
|
||||
left: 100px;
|
||||
/* border-left: 0.5px solid lightgray; */
|
||||
border-right: 0.5px solid rgba(255, 183, 124, 0.411);
|
||||
padding-right: 50px;
|
||||
}
|
||||
.guide {
|
||||
text-decoration-line: none;
|
||||
font-size: 28px;
|
||||
font-family: youyuan;
|
||||
font-weight: 900;
|
||||
color: rgb(255, 183, 124);
|
||||
|
||||
/* 横向菜单栏 */
|
||||
.menu {
|
||||
width: auto;
|
||||
height: 50px;
|
||||
background-color: rgb(255, 183, 124);
|
||||
margin-top: 100px;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
width: auto;
|
||||
list-style-type: none;
|
||||
white-space: nowrap;
|
||||
padding: 0;
|
||||
}
|
||||
.guide:hover {
|
||||
color: rgba(211, 211, 211, 0.651);
|
||||
.menu li {
|
||||
float: left;
|
||||
}
|
||||
.menu li#self {
|
||||
margin: 0 0 0 979px;
|
||||
}
|
||||
.menu li a {
|
||||
color: white;
|
||||
text-decoration-line: none;
|
||||
display: block;
|
||||
padding: 14px 40px 15px 70px;
|
||||
}
|
||||
.menu li a:hover {
|
||||
background-color: rgba(248, 148, 66, 0.7);
|
||||
}
|
||||
.menu ul li a#firstPage {
|
||||
background-image: url("icons/首页.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 12%;
|
||||
background-position: 35px 16px;
|
||||
|
||||
}
|
||||
.menu ul li a#my {
|
||||
background-image: url("icons/管理员.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 12%;
|
||||
background-position: 35px 16px;
|
||||
}
|
||||
|
||||
/* 操作界面 */
|
||||
.box2 {
|
||||
width: auto;
|
||||
height: auto;
|
||||
/* background-color: yellow; */
|
||||
margin: 0 0 0 210px;
|
||||
}
|
||||
.box2 table tr td {
|
||||
padding: 150px 50px 90px 0;
|
||||
/* background-color: yellow; */
|
||||
}
|
||||
.box2 table tr td a {
|
||||
color: papayawhip;
|
||||
text-decoration-line: none;
|
||||
font-size: 14px;
|
||||
background-image: url("icons/房间.png");
|
||||
background-repeat: no-repeat;
|
||||
padding: 100px 90px 20px 115px;
|
||||
background-position: 80px 30px;
|
||||
background-size: 40%;
|
||||
}
|
||||
.box2 table tr td a:hover {
|
||||
background-image: url("icons/房间light.png");
|
||||
}
|
||||
|
||||
/* 纵向导航栏 */
|
||||
.guide {
|
||||
width: 190px;
|
||||
height: 1400px;
|
||||
background-color: rgba(255, 183, 124, 0.3);
|
||||
position: absolute;
|
||||
top: 150px;
|
||||
}
|
||||
.guide li {
|
||||
margin: 50px 0 0 0;
|
||||
}
|
||||
.guide li#delete {
|
||||
margin: 60px 0;
|
||||
/* background-color: yellow; */
|
||||
}
|
||||
.guide li a {
|
||||
text-decoration-line: none;
|
||||
color: white;
|
||||
padding: 16px 76px 20px 50px;
|
||||
/* background-color: yellow; */
|
||||
}
|
||||
.guide li a:hover {
|
||||
background-color: rgba(248, 148, 66, 0.7);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="leftGuide">
|
||||
<ul>
|
||||
<li><a href="frame_rooms.html" id="rooms" class="guide">房间</a></li><br><br>
|
||||
<li><a href="frame_people.html" id="people" class="guide">老人</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,12 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>people</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,12 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>rooms</p>
|
||||
</body>
|
||||
</html>
|
||||
BIN
web/icons/favicon.png
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
web/icons/房间.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
web/icons/房间light.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
web/icons/管理员.png
Normal file
|
After Width: | Height: | Size: 813 B |
BIN
web/icons/管理员头像.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
web/icons/老人.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
web/icons/首页.png
Normal file
|
After Width: | Height: | Size: 401 B |
@@ -1,10 +1,10 @@
|
||||
body {
|
||||
background-color: aliceblue;
|
||||
background-color: papayawhip;
|
||||
margin: 0px;
|
||||
}
|
||||
.background_text {
|
||||
width: 100%;
|
||||
color: rgba(255, 239, 213, 0.3);
|
||||
color: rgb(255, 183, 124,0.3);
|
||||
font-style: italic;
|
||||
font-family: sans-serif;
|
||||
font-size: 125px;
|
||||
@@ -49,7 +49,7 @@ input[name] {
|
||||
outline: none;
|
||||
}
|
||||
#submit {
|
||||
background-color: rgba(255, 239, 213);
|
||||
background-color: rgb(255, 183, 124);
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
border: none;
|
||||
@@ -60,7 +60,13 @@ input[name] {
|
||||
outline: none;
|
||||
}
|
||||
#submit:hover {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
background-color: rgba(255, 239, 213, 0.582);
|
||||
transform: translate(0,-1px);
|
||||
-ms-transform: translate(0,-1px);
|
||||
-webkit-transform: translate(0,-1px);
|
||||
-o-transform: translate(0,-1px);
|
||||
-moz-transform: translate(0,-1px);
|
||||
box-shadow: 3px 3px 3px rgba(192, 192, 192, 0.801);
|
||||
}
|
||||
#submit:active {
|
||||
background-color: rgba(255, 183, 124, 0.5);
|
||||
}
|
||||
|
||||
73
web/personal.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Old People Home - 个人中心</title>
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon.png">
|
||||
<link rel="stylesheet" href="personal_style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="box1">
|
||||
<span class="upper">O</span>
|
||||
<span class="lower">ld</span>
|
||||
<span class="upper">P</span>
|
||||
<span class="lower">eople</span>
|
||||
<span class="upper">H</span>
|
||||
<span class="lower">ome</span>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="firstPage.html" id="firstPage">首页</a>
|
||||
</li>
|
||||
<li id="self">
|
||||
<a href="personal.html" id="my">个人</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="background">
|
||||
<div class="pic">
|
||||
<a href="#"></a>
|
||||
</div>
|
||||
<div class="backgroundText">
|
||||
<span><h2>管理员</h2></span><br>
|
||||
<span><p>root</p></span>
|
||||
</div>
|
||||
<div class="logout">
|
||||
<input type="button" value="安全退出">
|
||||
</div>
|
||||
</div>
|
||||
<div class="messages">
|
||||
<h2>消息</h2>
|
||||
<div>
|
||||
<h5>张小王</h5>
|
||||
<p>消息内容</p>
|
||||
</div>
|
||||
<div>
|
||||
<h5>子女姓名</h5>
|
||||
<p>消息内容</p>
|
||||
</div>
|
||||
<div>
|
||||
<h5>子女姓名</h5>
|
||||
<p>消息内容</p>
|
||||
</div>
|
||||
<div>
|
||||
<h5>子女姓名</h5>
|
||||
<p>消息内容</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modify">
|
||||
<h2>修改密码</h2>
|
||||
<div>
|
||||
<!-- action先不填 -->
|
||||
<form action="">
|
||||
<input type="password" placeholder="原密码"><br><br><br>
|
||||
<input type="password" id="new" placeholder="新密码"><br><br><br>
|
||||
<input type="submit" id="submit" value="OK">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
235
web/personal_style.css
Normal file
@@ -0,0 +1,235 @@
|
||||
body {
|
||||
background-color: papayawhip;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* LOGO */
|
||||
.box1 {
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 10px;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.upper {
|
||||
color: rgb(255, 115, 0);
|
||||
font-weight: bolder;
|
||||
font-family: sans-serif;
|
||||
font-size: 45px;
|
||||
letter-spacing: -10px;
|
||||
}
|
||||
.lower {
|
||||
color: rgb(255, 183, 124);
|
||||
font-family: sans-serif;
|
||||
font-size: 45px;
|
||||
letter-spacing: -5px;
|
||||
}
|
||||
|
||||
/* 横向菜单栏 */
|
||||
.menu {
|
||||
width: auto;
|
||||
height: 50px;
|
||||
background-color: rgb(255, 183, 124);
|
||||
margin-top: 100px;
|
||||
}
|
||||
ul {
|
||||
width: auto;
|
||||
list-style-type: none;
|
||||
white-space: nowrap;
|
||||
padding: 0;
|
||||
}
|
||||
.menu li {
|
||||
float: left;
|
||||
}
|
||||
.menu li#self {
|
||||
margin: 0 0 0 979px;
|
||||
}
|
||||
.menu li a {
|
||||
color: white;
|
||||
text-decoration-line: none;
|
||||
display: block;
|
||||
padding: 14px 40px 15px 70px;
|
||||
}
|
||||
.menu li a:hover {
|
||||
background-color: rgba(248, 148, 66, 0.7);
|
||||
}
|
||||
.menu ul li a#firstPage {
|
||||
background-image: url("icons/首页.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 12%;
|
||||
background-position: 35px 16px;
|
||||
|
||||
}
|
||||
.menu ul li a#my {
|
||||
background-image: url("icons/管理员.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 12%;
|
||||
background-position: 35px 16px;
|
||||
}
|
||||
|
||||
/* 头像及账号资料 */
|
||||
.background {
|
||||
width: 700px;
|
||||
height: 200px;
|
||||
background-color: white;
|
||||
margin: 50px 0 0 280px;
|
||||
position: absolute;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.background .pic {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
position: relative;
|
||||
top: 36px;
|
||||
left: 30px;
|
||||
/* background-color: yellow; */
|
||||
}
|
||||
.background .pic a {
|
||||
background-image: url("icons/管理员头像.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
border-radius: 2px;
|
||||
display: block;
|
||||
padding: 64px;
|
||||
|
||||
}
|
||||
.background .backgroundText {
|
||||
width: 200px;
|
||||
height: auto;
|
||||
position: relative;
|
||||
top: -100px;
|
||||
left: 308px;
|
||||
/* background-color: yellow; */
|
||||
}
|
||||
.background .logout input {
|
||||
width: 90px;
|
||||
height: 30px;
|
||||
border-style: none;
|
||||
border-radius: 2px;
|
||||
color: white;
|
||||
background-color: red;
|
||||
outline: none;
|
||||
position: relative;
|
||||
top: -135px;
|
||||
left: 550px;
|
||||
}
|
||||
.background .logout input:hover {
|
||||
transform: translate(0,-1px);
|
||||
-ms-transform: translate(0,-1px);
|
||||
-webkit-transform: translate(0,-1px);
|
||||
-o-transform: translate(0,-1px);
|
||||
-moz-transform: translate(0,-1px);
|
||||
box-shadow: 3px 3px 3px rgba(192, 192, 192, 0.801);
|
||||
}
|
||||
.background .logout input:active {
|
||||
background-color: rgba(255, 55, 55, 0.781);
|
||||
}
|
||||
.background:hover {
|
||||
transform: translate(0,-1px);
|
||||
-ms-transform: translate(0,-1px);
|
||||
-webkit-transform: translate(0,-1px);
|
||||
-o-transform: translate(0,-1px);
|
||||
-moz-transform: translate(0,-1px);
|
||||
box-shadow: 10px 10px 5px rgb(252, 227, 188);
|
||||
}
|
||||
|
||||
/* 消息块 */
|
||||
.messages {
|
||||
width: 400px;
|
||||
height: auto;
|
||||
background-color: white;
|
||||
position: absolute;
|
||||
top: 420px;
|
||||
left: 280px;
|
||||
}
|
||||
.messages:hover {
|
||||
transform: translate(0,-1px);
|
||||
-ms-transform: translate(0,-1px);
|
||||
-webkit-transform: translate(0,-1px);
|
||||
-o-transform: translate(0,-1px);
|
||||
-moz-transform: translate(0,-1px);
|
||||
box-shadow: 10px 10px 5px rgb(252, 227, 188);
|
||||
}
|
||||
.messages h2 {
|
||||
/* background-color: yellow; */
|
||||
padding: 0 0 0 20px;
|
||||
}
|
||||
.messages div {
|
||||
width: 180px;
|
||||
height: 140px;
|
||||
border-top: 1px rgb(224, 224, 224) solid;
|
||||
float: left;
|
||||
margin: 5px 5px 10px 12px;
|
||||
color: black;
|
||||
/* background: linear-gradient(left,rgb(248, 235, 233),rgba(245, 239, 230, 0.897));
|
||||
background: -webkit-linear-gradient(left,rgb(248, 235, 233),rgba(245, 239, 230, 0.897));
|
||||
background: -o-linear-gradient(left,rgb(248, 235, 233),rgba(245, 239, 230, 0.897));
|
||||
background: -moz-linear-gradient(left,rgb(248, 235, 233),rgba(245, 239, 230, 0.897)); */
|
||||
}
|
||||
.messages div h5 {
|
||||
margin: 2px 0 0 0;
|
||||
padding: 0 0 0 10px;
|
||||
/* background-color: yellow; */
|
||||
}
|
||||
.messages div p {
|
||||
width: 170px;
|
||||
height: 105px;
|
||||
padding: 0 0 0 10px;
|
||||
/* background-color: rgb(255, 183, 124); */
|
||||
}
|
||||
|
||||
/* 修改密码 */
|
||||
.modify {
|
||||
width: 280px;
|
||||
height: 383px;
|
||||
background-color: white;
|
||||
position: absolute;
|
||||
top: 420px;
|
||||
left: 700px;
|
||||
}
|
||||
.modify:hover {
|
||||
transform: translate(0,-1px);
|
||||
-ms-transform: translate(0,-1px);
|
||||
-webkit-transform: translate(0,-1px);
|
||||
-o-transform: translate(0,-1px);
|
||||
-moz-transform: translate(0,-1px);
|
||||
box-shadow: 10px 10px 5px rgb(252, 227, 188);
|
||||
}
|
||||
.modify h2 {
|
||||
padding: 0 0 0 20px;
|
||||
}
|
||||
.modify form input {
|
||||
position: relative;
|
||||
top: 25px;
|
||||
left: 40px;
|
||||
border: 1px rgb(224, 224, 224) solid;
|
||||
border-radius: 25px;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
font-size: 16px;
|
||||
}
|
||||
.modify form input#new {
|
||||
margin-top: 30px;
|
||||
}
|
||||
.modify form input#submit {
|
||||
margin-top: 20px;
|
||||
margin-left: 80px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
color: white;
|
||||
border: none;
|
||||
}
|
||||
.modify form input#submit:hover {
|
||||
transform: translate(0,-1px);
|
||||
-ms-transform: translate(0,-1px);
|
||||
-webkit-transform: translate(0,-1px);
|
||||
-o-transform: translate(0,-1px);
|
||||
-moz-transform: translate(0,-1px);
|
||||
box-shadow: 3px 3px 3px rgba(192, 192, 192, 0.801);
|
||||
}
|
||||
.modify form input#submit:active {
|
||||
background-color: rgb(235, 235, 235);
|
||||
}
|
||||