diff --git a/mock/student/practice.ts b/mock/student/practice.ts index 49b372166f9d445787c9cd90b97926e16f706945..93ee0ac7308d2856d0053f2bd3c2aae4d9d826cd 100644 --- a/mock/student/practice.ts +++ b/mock/student/practice.ts @@ -1,10 +1,11 @@ import { GroupMemberItemModel, + LeaderWorkModel, LectureNoteItemModel, LessonPlanItemModel, TeachingStudyItemModel, } from "/@/api/student/model/practiceModel"; -import { resultPageSuccess } from "mock/_util"; +import { resultPageSuccess, resultSuccess } from "mock/_util"; import { MockMethod } from "vite-plugin-mock"; import { GenderEnum } from "/@/enums/genderEnum"; @@ -93,6 +94,20 @@ function getGroupNumberList() { return list; } +function leaderWorkInfo() { + const item: LeaderWorkModel = { + baseInfo: "基本信息", + classActivity: "班级活动", + className: "高三十班", + dailyWork: "日常巡逻", + docLink: "http://localhost/file/demo.docx", + educationPlan: "没计划", + studentAmount: 40, + workPlan: "没计划", + }; + return item; +} + export default [ { url: "/dev-api/lectureNote/page", @@ -157,4 +172,28 @@ export default [ return resultPageSuccess(pageNum, pageSize, getTeachingStudyList()); }, }, + { + url: "/dev-api/leaderWork/getInfo", + timeout: 100, + method: "get", + response: () => { + return resultSuccess(leaderWorkInfo()); + }, + }, + { + url: "/dev-api/leaderWork/getInfo/:id", + timeout: 100, + method: "get", + response: () => { + return resultSuccess(leaderWorkInfo()); + }, + }, + { + url: "/dev-api/leaderWork/saveOrUpdate", + timeout: 100, + method: "post", + response: () => { + return resultSuccess({}); + }, + }, ] as MockMethod[]; diff --git a/mock/sys/menu.ts b/mock/sys/menu.ts index 22eb9cbbbbb602d1cb59475161f6cc7b69932782..bc4ee4dd898a01b94d7e154688bec13581b7fdab 100644 --- a/mock/sys/menu.ts +++ b/mock/sys/menu.ts @@ -242,35 +242,45 @@ const accountRoute = { // ], // }; -/* const practicalStudent = { - path: "/practical", - name: "Practical", - component: "LAYOUT", - meta: { - icon: "simple-icons:about-dot-me", - title: "实习记录", - }, - children: [ - { - path: "task", - name: "Task", - component: "/student/practical/task/index.vue", - meta: { - title: "实习任务", - }, - }, - // 小组长可见路由 - { - path: "mark", - name: "Mark", - component: "/captain/practical/index.vue", - meta: { - title: "小组评价", - }, - }, - ], -}; */ +// @ts-ignore +// const practicalStudent = { +// path: "/practical", +// name: "Practical", +// component: "LAYOUT", +// meta: { +// icon: "simple-icons:about-dot-me", +// title: "实习记录", +// }, +// children: [ +// { +// path: "task", +// name: "Task", +// component: "/student/practical/task/index.vue", +// meta: { +// title: "实习任务", +// }, +// }, +// { +// path: "leaderWork", +// name: "LeaderWork", +// component: "/student/practical/leaderWork/index.vue", +// meta: { +// title: "班主任实习工作", +// }, +// }, +// // 小组长可见路由 +// { +// path: "mark", +// name: "Mark", +// component: "/captain/practical/index.vue", +// meta: { +// title: "小组评价", +// }, +// }, +// ], +// }; +// @ts-ignore const practicalTeacher = { path: "/practical", name: "Practical", diff --git a/src/api/student/model/practiceModel.ts b/src/api/student/model/practiceModel.ts index 6966434266524d2704c860733d0ba05561abb75e..09cc6b51f43ff74834ba66ca5edfef29913de9de 100644 --- a/src/api/student/model/practiceModel.ts +++ b/src/api/student/model/practiceModel.ts @@ -65,3 +65,14 @@ export interface GroupMemberItemModel { } export type GroupMemberListResultModel = BasicFetchResult; + +export interface LeaderWorkModel { + className: string; + studentAmount: number; + baseInfo: string; + dailyWork: string; + workPlan: string; + educationPlan: string; + classActivity: string; + docLink: string; +} diff --git a/src/api/student/practice.ts b/src/api/student/practice.ts index d6ff78554500edee9f404274a1a2615903987789..0322c3d4a603b9ded4aff902279f1881b859a01c 100644 --- a/src/api/student/practice.ts +++ b/src/api/student/practice.ts @@ -1,5 +1,6 @@ import { GroupMemberListResultModel, + LeaderWorkModel, LectureNoteItemModel, LectureNoteListResultModel, LessonPlanItemModel, @@ -32,6 +33,8 @@ enum Api { RemoveTeachingStudy = "/teachingStudy/remove", SetTeachingStudyRemark = "/teachingStudy/setRemark", GetGroupNumber = "/group/leader/list", + GetLeaderWorkInfo = "/leaderWork/getInfo", + SaveOrUpdateLeaderWorkInfo = "/leaderWork/saveOrUpdate", } /** @@ -260,3 +263,30 @@ export const getGroupNumberPageByGroupId = (params: BasicPageParamsWithGroupId) url: Api.GetGroupNumber + `/${params.groupId}`, params, }); + +/** + * 实习生查询自己的班主任实习工作记录信息 + */ +export const getLeaderWorkInfo = () => + defHttp.get({ + url: Api.GetLeaderWorkInfo, + }); + +/** + * 通过实习生id查询班主任实习工作记录信息 + * @param userId 实习生id + */ +export const getLeaderWorkInfoByUserId = (userId: number) => + defHttp.get({ + url: Api.GetLeaderWorkInfo + `/${userId}`, + }); + +/** + * 新增或更新班主任实习工作信息 + * @param leaderWork 班主任实习工作信息对象 + */ +export const saveOrUpdateLeaderWorkInfo = (leaderWork: LeaderWorkModel) => + defHttp.post({ + url: Api.SaveOrUpdateLeaderWorkInfo, + params: leaderWork, + }); diff --git a/src/api/teacher/practice.ts b/src/api/teacher/practice.ts index f23175983dd189eba8d26155fd29b4bae89ee89d..89fb499a7ff45337583194bfffbb0fadf4af8142 100644 --- a/src/api/teacher/practice.ts +++ b/src/api/teacher/practice.ts @@ -11,6 +11,8 @@ enum Api { SetLectureNoteMark = "/internInfo/mark/tk", SetLessonPlanMark = "/internInfo/mark/ja", SetTeachingStudyMark = "/internInfo/mark/jy", + SetTeacherMoralMark = "/internInfo/mark/sd", + SetLeaderWorkMark = "/leaderWork/mark", GetRemark = "/internInfo/getRemark", SetZxRemark = "/internInfo/remark/zx", SetGxRemark = "/internInfo/remark/gx", @@ -86,6 +88,36 @@ export const setTeachingStudyMark = (userId: number, highSchool: number, univers }, }); +/** + * 导师为实习生的师德表现进行打分 + * @param userId 实习生Id + * @param highSchool 中学指导教师评分 + * @param university 高校指导教师评分 + */ +export const setTeacherMoralMark = (userId: number, highSchool: number, university: number) => + defHttp.put({ + url: Api.SetTeacherMoralMark + `/${userId}`, + params: { + highSchool, + university, + }, + }); + +/** + * 导师为实习生的班主任实习工作进行打分 + * @param userId 实习生Id + * @param highSchool 中学指导教师评分 + * @param university 高校指导教师评分 + */ +export const setLeaderWorkMark = (userId: number, highSchool: number, university: number) => + defHttp.put({ + url: Api.SetLeaderWorkMark + `/${userId}`, + params: { + highSchool, + university, + }, + }); + /** * 查询指定id实习生的教育实习评价信息 * @param userId 实习生id diff --git a/src/enums/markTypeEnum.ts b/src/enums/markTypeEnum.ts index 08035c1bd3ca58bfde8496cd3914a0409da6c50a..edf178c383f3c4e3b76e1792fc24127f41ac703e 100644 --- a/src/enums/markTypeEnum.ts +++ b/src/enums/markTypeEnum.ts @@ -1,4 +1,4 @@ export enum MarkTypeEnum { - GroupLeaderMark = "captain", - TeacherMark = "instructor", + CaptainMark = "captain", + InstructorMark = "instructor", } diff --git a/src/enums/scoreTarget.ts b/src/enums/scoreTarget.ts new file mode 100644 index 0000000000000000000000000000000000000000..3e12dde074090ad7187f0b80c95ad9fad2c3b693 --- /dev/null +++ b/src/enums/scoreTarget.ts @@ -0,0 +1,7 @@ +export enum ScoreTarget { + LectureNote = "tk", + LessonPlan = "ja", + TeachingStudy = "jy", + TeacherMoral = "sd", + LeaderWork = "bzr", +} diff --git a/src/views/account/components/BaseSetting.vue b/src/views/account/components/BaseSetting.vue index cb9e0d4f34f6038068021f1fca181f6ceaa231ed..42598eecda56a015b56c00fb175c79796c4a7b50 100644 --- a/src/views/account/components/BaseSetting.vue +++ b/src/views/account/components/BaseSetting.vue @@ -10,7 +10,7 @@ import { useMessage } from "/@/hooks/web/useMessage"; - import { FormSchema } from "/@/components/Form/index"; + import { FormSchema } from "/@/components/Form"; import { useUserStore } from "/@/store/modules/user"; export default defineComponent({ @@ -27,7 +27,7 @@ field: "gender", component: "RadioGroup", label: "性别", - colProps: { span: 18 }, + colProps: { span: 20 }, componentProps: { options: [ { label: "女", value: 0 }, @@ -40,30 +40,37 @@ field: "email", component: "Input", label: "邮箱", - colProps: { span: 18 }, + colProps: { span: 20 }, }, { field: "phone", component: "Input", label: "联系电话", - colProps: { span: 18 }, + colProps: { span: 20 }, }, { field: "introduce", component: "InputTextArea", label: "个人简介", - colProps: { span: 18 }, + colProps: { span: 20 }, }, ]; const [register, { setFieldsValue }] = useForm({ labelWidth: 120, schemas: schemas, - showActionButtonGroup: false, + showActionButtonGroup: true, + actionColOptions: { + span: 24, + }, + submitButtonOptions: { + text: "提交", + }, + showResetButton: false, }); onMounted(async () => { - setFieldsValue(userStore.getUserInfo); + await setFieldsValue(userStore.getUserInfo); }); return { diff --git a/src/views/captain/practical/index.vue b/src/views/captain/practical/index.vue index 139d35866cc3696a3b9238cc3b4dbac4503b2d52..acbea61c641f9af321ea7b1e7459f462e9e6bd87 100644 --- a/src/views/captain/practical/index.vue +++ b/src/views/captain/practical/index.vue @@ -96,7 +96,7 @@ router.push({ name: "LectureNoteList", params: record, - query: { type: MarkTypeEnum.GroupLeaderMark }, + query: { type: MarkTypeEnum.CaptainMark }, }); } @@ -104,7 +104,7 @@ router.push({ name: "LessonPlanList", params: record, - query: { type: MarkTypeEnum.GroupLeaderMark }, + query: { type: MarkTypeEnum.CaptainMark }, }); } @@ -112,7 +112,7 @@ router.push({ name: "TeachingStudyList", params: record, - query: { type: MarkTypeEnum.GroupLeaderMark }, + query: { type: MarkTypeEnum.CaptainMark }, }); } diff --git a/src/views/default/practical/LectureNoteDesc.vue b/src/views/default/practical/LectureNoteDesc.vue index 3b021798e9697bf053a0afca4281538ef10b80a0..7a01176de32040f46d8646c044ec467520042391 100644 --- a/src/views/default/practical/LectureNoteDesc.vue +++ b/src/views/default/practical/LectureNoteDesc.vue @@ -12,7 +12,7 @@ 编辑评价 diff --git a/src/views/default/practical/LectureNoteList.vue b/src/views/default/practical/LectureNoteList.vue index 0c15cf10a07d283bfb5967a7c68f890f3ea9c672..ca454e8b9fadf5c58580bc5c73eed56fe38d6f89 100644 --- a/src/views/default/practical/LectureNoteList.vue +++ b/src/views/default/practical/LectureNoteList.vue @@ -121,7 +121,7 @@ handleDesc, registerDescModal, registerRemarkModal, - showRemarkBtn: type === MarkTypeEnum.TeacherMark, + showRemarkBtn: type === MarkTypeEnum.InstructorMark, handleRemark, }; }, diff --git a/src/views/default/practical/LessonPlanDesc.vue b/src/views/default/practical/LessonPlanDesc.vue index 6af2b22b636d469af4df8cb76e0ceb0ea9059fca..f9d85d25d65b0600dbd6d8fc7671308595ee32cf 100644 --- a/src/views/default/practical/LessonPlanDesc.vue +++ b/src/views/default/practical/LessonPlanDesc.vue @@ -11,7 +11,7 @@ 编辑评价 diff --git a/src/views/default/practical/LessonPlanList.vue b/src/views/default/practical/LessonPlanList.vue index f96a71b5380d017c91acaeddee8997b49422b753..b90b41a3db75fdaf2af90cde94f1505ec5ff7be6 100644 --- a/src/views/default/practical/LessonPlanList.vue +++ b/src/views/default/practical/LessonPlanList.vue @@ -120,7 +120,7 @@ handleReturn, handleDesc, handleRemark, - showRemarkBtn: type === MarkTypeEnum.TeacherMark, + showRemarkBtn: type === MarkTypeEnum.InstructorMark, registerDescModal, registerRemarkModal, }; diff --git a/src/views/default/practical/TeachingStudyDesc.vue b/src/views/default/practical/TeachingStudyDesc.vue index 2e295aa7e4c045627930a1b077d6bf051a6515c5..47e70a5c8b37c50b1a440ed9ee22b63621724f6b 100644 --- a/src/views/default/practical/TeachingStudyDesc.vue +++ b/src/views/default/practical/TeachingStudyDesc.vue @@ -11,7 +11,7 @@ 编辑评价 diff --git a/src/views/default/practical/TeachingStudyList.vue b/src/views/default/practical/TeachingStudyList.vue index affd8d3878b249eb7543cebc0b3bb6572e4c9d52..323ad592b940d3719e4a2a7ee37ff125a076c786 100644 --- a/src/views/default/practical/TeachingStudyList.vue +++ b/src/views/default/practical/TeachingStudyList.vue @@ -120,7 +120,7 @@ handleReturn, handleDesc, handleRemark, - showRemarkBtn: type === MarkTypeEnum.TeacherMark, + showRemarkBtn: type === MarkTypeEnum.InstructorMark, registerDescModal, registerRemarkModal, }; diff --git a/src/views/student/practical/leaderWork/index.vue b/src/views/student/practical/leaderWork/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..abdb9fc0967adcb221e9d31e9455c0cc68838f40 --- /dev/null +++ b/src/views/student/practical/leaderWork/index.vue @@ -0,0 +1,253 @@ + + + diff --git a/src/views/teacher/practical/score/Edit.vue b/src/views/teacher/practical/score/Edit.vue index 89aa1a1222588f1470dc5e3e4e8a0d3d1b591e53..499a42641f1089f9c9655f6e0a76b3f40392dfdf 100644 --- a/src/views/teacher/practical/score/Edit.vue +++ b/src/views/teacher/practical/score/Edit.vue @@ -15,11 +15,14 @@ import { BasicModal, useModalInner } from "/@/components/Modal"; import { BasicForm, FormSchema, useForm } from "/@/components/Form"; import { + setLeaderWorkMark, setLectureNoteMark, setLessonPlanMark, + setTeacherMoralMark, setTeachingStudyMark, } from "/@/api/teacher/practice"; import { useMessage } from "/@/hooks/web/useMessage"; + import { ScoreTarget } from "/@/enums/scoreTarget"; export default defineComponent({ name: "ScoreEdit", @@ -92,27 +95,41 @@ function handleSubmit(value) { switch (target.value) { - case "tk": { + case ScoreTarget.LectureNote: { setLectureNoteMark(userId.value, value.highSchool, value.university).then(() => { createSuccessModal({ content: "打分成功" }); closeModal(); }); break; } - case "ja": { + case ScoreTarget.LessonPlan: { setLessonPlanMark(userId.value, value.highSchool, value.university).then(() => { createSuccessModal({ content: "打分成功" }); closeModal(); }); break; } - case "jy": { + case ScoreTarget.TeachingStudy: { setTeachingStudyMark(userId.value, value.highSchool, value.university).then(() => { createSuccessModal({ content: "打分成功" }); closeModal(); }); break; } + case ScoreTarget.TeacherMoral: { + setTeacherMoralMark(userId.value, value.highSchool, value.university).then(() => { + createSuccessModal({ content: "打分成功" }); + closeModal(); + }); + break; + } + case ScoreTarget.LeaderWork: { + setLeaderWorkMark(userId.value, value.highSchool, value.university).then(() => { + createSuccessModal({ content: "打分成功" }); + closeModal(); + }); + break; + } } } diff --git a/src/views/teacher/practical/score/LeaderWorkDesc.vue b/src/views/teacher/practical/score/LeaderWorkDesc.vue new file mode 100644 index 0000000000000000000000000000000000000000..0f856f397f884cf98e63f231a242579fdcf578ff --- /dev/null +++ b/src/views/teacher/practical/score/LeaderWorkDesc.vue @@ -0,0 +1,111 @@ + + + diff --git a/src/views/teacher/practical/score/index.vue b/src/views/teacher/practical/score/index.vue index 7c688ccc14a862b6af5516ccc0f712660dbfad29..da4b281f262effec14a7aa180e29520cec4f46b1 100644 --- a/src/views/teacher/practical/score/index.vue +++ b/src/views/teacher/practical/score/index.vue @@ -10,25 +10,37 @@ stopButtonPropagation :actions="[ { - label: '查看实习听课记录', + label: '实习听课记录评分', icon: 'ant-design:info-circle-outlined', onClick: handleLectureNoteDesc.bind(null, record), }, { - label: '查看教育实习教案', + label: '教育实习教案评分', icon: 'ant-design:info-circle-outlined', onClick: handleLessonPlanDesc.bind(null, record), }, { - label: '查看教研活动总结', + label: '教研活动总结评分', icon: 'ant-design:info-circle-outlined', onClick: handleTeachingStudyDesc.bind(null, record), }, + { + label: '师德表现评分', + icon: 'ant-design:info-circle-outlined', + onClick: handleMoralScore.bind(null, record), + }, + { + label: '班主任实习工作评分', + icon: 'ant-design:info-circle-outlined', + onClick: handleLeaderWorkDesc.bind(null, record), + }, ]" /> + + @@ -38,12 +50,19 @@ import { useRouter } from "vue-router"; import { getGroupMemberPage } from "/@/api/teacher/practice"; import { MarkTypeEnum } from "/@/enums/markTypeEnum"; + import { useModal } from "/@/components/Modal"; + import RemarkModal from "/@/views/teacher/practical/score/Edit.vue"; + import { ScoreTarget } from "/@/enums/scoreTarget"; + import LeaderWorkDescModal from "/@/views/teacher/practical/score/LeaderWorkDesc.vue"; + import { getLeaderWorkInfoByUserId } from "/@/api/student/practice"; export default defineComponent({ name: "PracticalScore", components: { + LeaderWorkDescModal, BasicTable, TableAction, + RemarkModal, }, setup() { const columns: BasicColumn[] = [ @@ -81,6 +100,10 @@ fixed: "right", }, }); + + const [registerRemarkModal, { openModal: openRemarkModal }] = useModal(); + const [registerLeaderWorkDescModal, { openModal: openLeaderWorkDescModal }] = useModal(); + const router = useRouter(); function handleReloadCurrent() { @@ -89,34 +112,48 @@ function handleLectureNoteDesc(record) { router.push({ - name: "userLectureNoteList", + name: "LectureNoteList", params: record, - query: { type: MarkTypeEnum.TeacherMark }, + query: { type: MarkTypeEnum.InstructorMark }, }); } function handleLessonPlanDesc(record) { router.push({ - name: "userLessonPlanList", + name: "LessonPlanList", params: record, - query: { type: MarkTypeEnum.TeacherMark }, + query: { type: MarkTypeEnum.InstructorMark }, }); } function handleTeachingStudyDesc(record) { router.push({ - name: "userTeachingStudyList", + name: "TeachingStudyList", params: record, - query: { type: MarkTypeEnum.TeacherMark }, + query: { type: MarkTypeEnum.InstructorMark }, + }); + } + + function handleMoralScore(record) { + openRemarkModal(true, { userId: record.userId, target: ScoreTarget.TeacherMoral }); + } + + function handleLeaderWorkDesc(record) { + getLeaderWorkInfoByUserId(record.userId).then((val) => { + openLeaderWorkDescModal(true, { ...val, userId: record.userId }); }); } return { registerTable, + registerRemarkModal, + registerLeaderWorkDescModal, handleReloadCurrent, handleLectureNoteDesc, handleLessonPlanDesc, handleTeachingStudyDesc, + handleMoralScore, + handleLeaderWorkDesc, }; }, });