feat(员工培训): 完善新人入职培训聊天闭环交互

This commit is contained in:
runny committed 2026-06-30 13:25:17 +08:00
1 parent eb0466245b
commit 3f13bb5b46
19 files changed
+2975 -12

No files matched your search

+244
View File
@@ -449,5 +449,249 @@
"range": "Showing {start}-{end} of {total}",
"empty": "No matching data"
}
},
"training": {
"badge": "Onboarding Training Workspace",
"title": "Onboarding Training Agent",
"subtitle": "Complete video learning, knowledge review, one-question-at-a-time testing, and HR reporting in the same chat page.",
"tabs": {
"learner": "Learner",
"admin": "HR Admin"
},
"actions": {
"syncLearnerToChat": "Sync learner context to chat",
"syncHrToChat": "Sync HR filters to chat",
"expandWorkspace": "Expand workspace",
"collapseWorkspace": "Collapse workspace"
},
"steps": {
"video": "Watch Video",
"summary": "Review Key Points",
"exam": "Take Exam",
"result": "View Result"
},
"progressLabel": "Training Progress",
"progressHint": "The employee is considered complete only after finishing the video, summary review, and exam steps.",
"progressPercent": "Completion",
"stepNo": "Step {value}",
"defaultLearnerName": "Current learner",
"unknownDepartment": "Department pending",
"video": {
"title": "Step 1: Watch the training video",
"description": "Employees first complete the onboarding video, then move on to the knowledge review and exam.",
"completeAction": "I finished watching the video",
"playerTitle": "Video player slot",
"playerHint": "This area can later connect to an enterprise video URL or internal player. The frontend container and completion action are already prepared."
},
"summary": {
"title": "Step 2: Review the key points",
"description": "Based on the HR exam paper, the system summarizes the most important points before the employee starts the test.",
"startExam": "Start Exam",
"keyPoints": "Key points",
"mustKnow": "Must know before the exam"
},
"exam": {
"title": "Step 3: One-question-at-a-time exam",
"questionCounter": "Question {current} / {total}",
"currentScore": "Current score: {score}",
"passLine": "Pass line: 90 points",
"correctFeedback": "Correct. Move on to the next question.",
"wrongFeedback": "Incorrect. The correct answer is now shown.",
"selectedAnswer": "Your answer: {answer}",
"correctAnswer": "Correct answer: {answer}",
"nextQuestion": "Next Question",
"finishExam": "Finish Exam"
},
"result": {
"passedTag": "Passed",
"failedTag": "Retake required",
"passTitle": "Congratulations, you passed the onboarding exam",
"failTitle": "This attempt did not meet the requirement",
"passDescription": "The frontend pass-state interaction is complete. Once the backend is connected, it can write training records and the completion date.",
"failDescription": "According to HR rules, any score below 90 requires a full retake until the learner passes.",
"scoreLabel": "Final score",
"attemptsLabel": "Attempts",
"correctCount": "Correct answers",
"wrongCount": "Wrong answers",
"completionDate": "Completion date",
"retryExam": "Retake Exam",
"sendToChat": "Send review to chat"
},
"learnerCard": {
"title": "Current learner",
"name": "Name",
"employeeId": "Employee ID",
"department": "Department"
},
"rules": {
"title": "Exam rules",
"rule1": "There are 20 questions, 5 points each, with a full score of 100.",
"rule2": "The system enforces one question, one answer, one feedback. Wrong answers show the correct answer immediately.",
"rule3": "Any score below 90 is treated as failed and requires a retake.",
"rule4": "HR can view statistics and export Excel from the same chat page."
},
"hr": {
"stats": {
"total": "Participants",
"passed": "Passed",
"failed": "Failed",
"inProgress": "In progress",
"passRate": "Pass rate"
},
"filters": {
"keywordLabel": "Name / ID",
"keywordPlaceholder": "Filter by name or employee ID",
"statusLabel": "Status",
"departmentLabel": "Department",
"allStatuses": "All statuses",
"allDepartments": "All departments",
"noLimit": "No limit"
},
"columns": {
"joinDate": "Join date",
"completionDate": "Completion date",
"department": "Department",
"name": "Name",
"employeeId": "Employee ID",
"score": "Score",
"attempts": "Attempts",
"status": "Status"
},
"status": {
"passed": "Passed",
"failed": "Failed",
"in_progress": "In progress"
},
"actions": {
"askAgent": "Ask agent for analysis",
"export": "Export Excel"
},
"empty": "No training records match the current filters."
},
"chatPrompts": {
"hrSummaryPrefix": "Based on the current filters, summarize the onboarding training data and list the exceptions.",
"afterVideo": "I finished the onboarding training video. Please summarize the key knowledge points based on the exam scope.",
"afterSummary": "I finished reviewing the knowledge points. Please switch to exam mode and ask the first question.",
"afterPass": "I passed the onboarding training exam with a score of {score}. Please help me generate a short completion summary.",
"afterFail": "I scored {score} in the onboarding training exam and did not pass. Please summarize the weak points and prepare a retake reminder.",
"examInProgress": "I am taking the onboarding training exam and am currently on question {index}/{total}. Please stay in proctor mode and continue."
},
"summaryPoints": [
"Salary is paid on the 15th of each month, and attendance or leave requests must go through OA.",
"The cafeteria uses the Zhongmi meal-ordering system, and missed punches require an OA correction process.",
"5S stands for sort, set in order, shine, standardize, and sustain.",
"In case of fire, call 119 immediately and use a fire extinguisher from the upwind side.",
"QC080000 is the hazardous substance process management standard, and RoHS focuses on environmental requirements for electronic products."
],
"summaryChecklist": [
"Only the current question is shown during the exam to avoid exposing the whole answer set at once.",
"A wrong answer must immediately show the correct answer and a short explanation.",
"Only scores of 90 or above count as passing.",
"The admin view must be able to export join date, completion date, department, name, employee ID, and score."
],
"booleanOptions": [
{ "id": "true", "label": "True" },
{ "id": "false", "label": "False" }
],
"questionBank": [
{
"id": "q1",
"type": "single",
"prompt": "On which day of the month is salary paid?",
"answer": "c",
"explanation": "According to the onboarding exam, salary is paid on the 15th of each month.",
"options": [
{ "id": "a", "label": "A. 8th" },
{ "id": "b", "label": "B. 9th" },
{ "id": "c", "label": "C. 15th" },
{ "id": "d", "label": "D. 27th" }
]
},
{
"id": "q2",
"type": "single",
"prompt": "Which system is used for cafeteria meal ordering?",
"answer": "b",
"explanation": "The company cafeteria uses the Zhongmi meal-ordering system, not OA or ERP.",
"options": [
{ "id": "a", "label": "A. OA" },
{ "id": "b", "label": "B. Zhongmi ordering system" },
{ "id": "c", "label": "C. ERP" }
]
},
{
"id": "q3",
"type": "single",
"prompt": "Which of the following are company products?",
"answer": "abcd",
"explanation": "All four options listed in the exam belong to the company product scope.",
"options": [
{ "id": "abcd", "label": "A/B/C/D All of the above" },
{ "id": "ab", "label": "A/B" },
{ "id": "cd", "label": "C/D" },
{ "id": "a", "label": "A only" }
]
},
{
"id": "q4",
"type": "single",
"prompt": "Which OA form should be used for leave?",
"answer": "c",
"explanation": "Leave must use the OA leave application form.",
"options": [
{ "id": "a", "label": "A. Overtime request" },
{ "id": "b", "label": "B. Contact form" },
{ "id": "c", "label": "C. Leave application" },
{ "id": "d", "label": "D. Employee request form" }
]
},
{
"id": "q5",
"type": "single",
"prompt": "What is QC080000?",
"answer": "a",
"explanation": "QC080000 is the hazardous substance process management certification standard.",
"options": [
{ "id": "a", "label": "A. Hazardous substance process management standard" },
{ "id": "b", "label": "B. Occupational health and safety management system" },
{ "id": "c", "label": "C. Environmental management system" }
]
},
{
"id": "q6",
"type": "single",
"prompt": "What does 5S refer to?",
"answer": "a",
"explanation": "The standard 5S terms are sort, set in order, shine, standardize, and sustain.",
"options": [
{ "id": "a", "label": "A. Sort, set in order, shine, standardize, sustain" },
{ "id": "b", "label": "B. Sort, set in order, clean up, standardize, sustain" }
]
},
{
"id": "q7",
"type": "single",
"prompt": "Where should you stand when using a fire extinguisher?",
"answer": "a",
"explanation": "You should stand on the upwind side when using a fire extinguisher.",
"options": [
{ "id": "a", "label": "A. Upwind side" },
{ "id": "b", "label": "B. Downwind side" }
]
},
{ "id": "q8", "type": "boolean", "prompt": "Normal attendance requires clock-in, and overtime must be applied for in advance.", "answer": "true", "explanation": "Both attendance and overtime follow the company attendance policy." },
{ "id": "q9", "type": "boolean", "prompt": "If you forget to clock in, you need an OA correction request.", "answer": "true", "explanation": "Missed punches must be corrected through the OA process." },
{ "id": "q10", "type": "boolean", "prompt": "Monthly salary is calculated from the 21st of the previous month to the 20th of the current month.", "answer": "true", "explanation": "The exam explicitly defines this payroll calculation cycle." },
{ "id": "q11", "type": "boolean", "prompt": "Cafeteria meals require advance booking, and face recognition can be used for dining.", "answer": "true", "explanation": "Advance booking and face-recognition dining are both supported." },
{ "id": "q12", "type": "boolean", "prompt": "In the event of fire or explosion, you should immediately call 119.", "answer": "true", "explanation": "Calling the fire emergency number is the first step in this scenario." },
{ "id": "q13", "type": "boolean", "prompt": "Dormitory residents must maintain fire awareness and must not install wires privately or use high-power appliances.", "answer": "true", "explanation": "This is a mandatory dormitory fire-safety rule." },
{ "id": "q14", "type": "boolean", "prompt": "Following safety production regulations is a safety obligation of employees.", "answer": "true", "explanation": "Safety compliance is both a rule and an employee obligation." },
{ "id": "q15", "type": "boolean", "prompt": "Employee badges may be lent to others freely.", "answer": "false", "explanation": "A badge is a personal identity credential and may not be lent out." },
{ "id": "q16", "type": "boolean", "prompt": "RoHS mainly regulates materials and processes in electrical and electronic products to better protect human health and the environment.", "answer": "true", "explanation": "RoHS focuses on restricting hazardous substances and improving environmental protection." },
{ "id": "q17", "type": "boolean", "prompt": "Our company's HSF policy is: green design, eco-friendly purchasing; resource conservation, green output.", "answer": "true", "explanation": "This is the HSF policy statement provided in the exam." },
{ "id": "q18", "type": "boolean", "prompt": "EHS stands for Environment, Health, and Safety.", "answer": "true", "explanation": "EHS is the standard abbreviation for environment, health, and safety." },
{ "id": "q19", "type": "boolean", "prompt": "External documents do not need to be controlled or managed by the organization.", "answer": "false", "explanation": "External documents also need controlled management." },
{ "id": "q20", "type": "boolean", "prompt": "Product-related requirements should include legal and regulatory requirements as well as customer requirements.", "answer": "true", "explanation": "Product requirements must cover both regulations and customer requirements." }
]
}
}