This commit is contained in:
2026-02-28 23:19:07 +08:00
parent 4aa6a8ff6a
commit 37cdfe2b68
8 changed files with 11304 additions and 7 deletions

22
.gitignore vendored Normal file
View File

@@ -0,0 +1,22 @@
# OS
.DS_Store
Thumbs.db
# IDE
.idea/
*.iml
.vscode/
*.swp
*.swo
# Backend - Maven
backend/target/
backend/uploads/
# Frontend - Node
frontend/node_modules/
frontend/dist/
# Logs
*.log
/tmp/

View File

@@ -156,8 +156,8 @@ VALUES
INSERT INTO family_elder(family_id, elder_id, relationship)
VALUES
(3, 1, '儿子'),
(3, 2, '女儿');
(4, 1, '儿子'),
(4, 2, '女儿');
INSERT INTO schedule(nurse_id, date, shift, task)
VALUES

View File

@@ -11,6 +11,6 @@ public interface NoticeMapper {
@Options(useGeneratedKeys = true, keyProperty = "id")
int insert(Notice notice);
@Select("<script>SELECT * FROM notice WHERE 1=1 <if test='targetUserId != null'> AND target_user_id = #{targetUserId}</if> <if test='targetRole != null'> AND (target_role = #{targetRole} OR target_role = 'ALL')</if> ORDER BY created_at DESC</script>")
@Select("<script>SELECT * FROM notice WHERE 1=1 <if test='targetUserId != null'> AND (target_user_id = #{targetUserId} OR target_user_id IS NULL)</if> <if test='targetRole != null'> AND (target_role = #{targetRole} OR target_role = 'ALL')</if> ORDER BY created_at DESC</script>")
List<Notice> listByTarget(@Param("targetRole") String targetRole, @Param("targetUserId") Long targetUserId);
}

View File

@@ -3,7 +3,7 @@ server:
spring:
datasource:
url: jdbc:mysql://localhost:3307/nursing_home?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://localhost:3306/nursing_home?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root
password: qq5211314
driver-class-name: com.mysql.cj.jdbc.Driver

11274
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -14,9 +14,10 @@
"vue-router": "^3.6.5"
},
"devDependencies": {
"@babel/preset-env": "7.23.9",
"@playwright/test": "^1.58.2",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"@babel/preset-env": "7.23.9",
"babel-core": "^7.0.0-bridge.0",
"babel-loader": "^8.3.0",
"vue-template-compiler": "^2.7.16"

View File

@@ -31,7 +31,7 @@ export const feedbackList = () => http.get("/admin/feedback");
export const feedbackUpdate = (payload) => http.put("/admin/feedback", payload);
export const noticeCreate = (payload) => http.post("/admin/notices", payload);
export const noticeList = (role, userId) => http.get("/admin/notices", { params: { role, userId } });
export const noticeList = (role, userId) => http.get("/admin/notices", { params: Object.fromEntries(Object.entries({ role, userId }).filter(([, v]) => v != null)) });
export const nurseSchedules = (date) => http.get("/nurse/schedules", { params: { date } });
export const nurseSchedulesRange = (start, end) => http.get("/nurse/schedules/range", { params: { start, end } });

View File

@@ -6,7 +6,7 @@
<el-form-item label="护理内容"><el-input v-model="form.content" type="textarea"/></el-form-item>
<el-form-item label="记录时间"><el-date-picker v-model="form.recordTime" type="datetime"/></el-form-item>
<el-form-item label="附件">
<el-upload :http-request="upload" :show-file-list="false">
<el-upload action="" :http-request="upload" :show-file-list="false">
<el-button size="mini">上传</el-button>
</el-upload>
<div v-if="form.attachmentUrl" style="margin-top: 6px;">