diff --git a/mock/sys/menu.ts b/mock/sys/menu.ts index 8c880919b31d73adf373c8a6ad94eda4717a16d0..4d726320b5ee0da6af40993db21fe282f9645614 100644 --- a/mock/sys/menu.ts +++ b/mock/sys/menu.ts @@ -1,5 +1,6 @@ import { resultSuccess, resultError, getRequestToken, requestParams } from "../_util"; import { MockMethod } from "vite-plugin-mock"; +import { AppRouteModule } from "/@/router/types"; // single const dashboardRoute = { @@ -234,6 +235,33 @@ const dashboardRoute = { // ], // }; +const teacherRemarkRoute: AppRouteModule = { + name: "practiceEvaluation", + path: "/practiceEvaluation", + component: "LAYOUT", + meta: { + title: "教育实习评价", + }, + children: [ + { + name: "teacherRemark", + path: "teacherRemark", + component: "/teacher/practice/teacher-remark/index.vue", + meta: { + title: "实习评语", + }, + }, + { + name: "practiceScore", + path: "score", + component: "/teacher/practice/practice-score/index.vue", + meta: { + title: "实习综合成绩", + }, + }, + ], +}; + const practiceRoute = { path: "/practice", name: "practice", @@ -312,6 +340,7 @@ const practiceRoute = { title: "教师评分", }, }, + teacherRemarkRoute, ], }; diff --git a/mock/teacher/practice.ts b/mock/teacher/practice.ts index c4a092da223584feff6f04a0520c898954752149..7b9995b84b09d825ef87be4394eb18e699b0974c 100644 --- a/mock/teacher/practice.ts +++ b/mock/teacher/practice.ts @@ -2,7 +2,7 @@ import { GroupMemberItemModel } from "/@/api/student/model/practice-model"; import { resultPageSuccess, resultSuccess } from "mock/_util"; import { MockMethod } from "vite-plugin-mock"; import { GenderEnum } from "/@/enums/genderEnum"; -import { IntershipInfoModel } from "/@/api/teacher/model/practice-model"; +import { IntershipInfoModel, ReportModel } from "/@/api/teacher/model/practice-model"; import { IntershipTypeEnum } from "/@/enums/intershipTypeEnum"; function getGroupMemberList() { @@ -31,6 +31,25 @@ function getIntershipInfo() { return info; } +function getScoreReport() { + const repot: ReportModel = { + bzrpfCollege: 100, + bzrpfSchool: 90, + groupScore: 80, + japfCollege: 92, + japfSchool: 95, + jxpfCollege: 89, + jxpfSchool: 88, + jypfCollege: 87, + jypfSchool: 91, + sdpfCollege: 92, + sdpfSchool: 93, + tkpfCollege: 94, + tkpfSchool: 95, + }; + return repot; +} + export default [ { url: "/dev-api/group/tutor/list", @@ -49,4 +68,65 @@ export default [ return resultSuccess(getIntershipInfo()); }, }, + { + url: "/dev-api/internInfo/getRemark/:id", + timeout: 100, + method: "get", + response: () => { + return resultSuccess({ + personalSummary: "个人总结111", + groupEvaluation: "小组评价1111", + highSchool: "中学教师评语abababa", + university: "高校教师评语abababa", + }); + }, + }, + { + url: "/dev-api/internInfo/remark/gx/:id", + timeout: 100, + method: "put", + response: () => { + return resultSuccess({}); + }, + }, + { + url: "/dev-api/internInfo/remark/zx/:id", + timeout: 100, + method: "put", + response: () => { + return resultSuccess({}); + }, + }, + { + url: "/dev-api/internInfo/mark/tk/:id", + timeout: 100, + method: "put", + response: () => { + return resultSuccess({}); + }, + }, + { + url: "/dev-api/internInfo/mark/ja/:id", + timeout: 100, + method: "put", + response: () => { + return resultSuccess({}); + }, + }, + { + url: "/dev-api/internInfo/mark/jy/:id", + timeout: 100, + method: "put", + response: () => { + return resultSuccess({}); + }, + }, + { + url: "/dev-api/internInfo/getReport/:id", + timeout: 100, + method: "get", + response: () => { + return resultSuccess(getScoreReport()); + }, + }, ] as MockMethod[]; diff --git a/src/api/teacher/model/practice-model.ts b/src/api/teacher/model/practice-model.ts index fdce097b45cb944753efa72fe0a596380f93879f..d1a741ad4be664a00f536883c774bd5204a0af9f 100644 --- a/src/api/teacher/model/practice-model.ts +++ b/src/api/teacher/model/practice-model.ts @@ -8,3 +8,30 @@ export interface IntershipInfoModel { grade: string; startDate: string; } + +export interface RemarkModel { + //个人总结 + personalSummary: string; + //小组评价 + groupEvaluation: string; + //中学教师评语 + highSchool: string; + //高校教师评语 + university: string; +} + +export interface ReportModel { + tkpfSchool: number; + tkpfCollege: number; + japfSchool: number; + japfCollege: number; + jypfSchool: number; + jypfCollege: number; + sdpfSchool: number; + sdpfCollege: number; + bzrpfSchool: number; + bzrpfCollege: number; + jxpfSchool: number; + jxpfCollege: number; + groupScore: number; +} diff --git a/src/api/teacher/practice.ts b/src/api/teacher/practice.ts index a7c0c6f20aad5ded6cec6a342d18e00e408518ea..ee1439f84a8f0977045ce4e119a37d8539d57132 100644 --- a/src/api/teacher/practice.ts +++ b/src/api/teacher/practice.ts @@ -1,16 +1,20 @@ import { BasicPageParams } from "/@/api/model/baseModel"; import { defHttp } from "/@/utils/http/axios"; import { GroupMemberListResultModel } from "/@/api/student/model/practice-model"; -import { IntershipInfoModel } from "/@/api/teacher/model/practice-model"; +import { IntershipInfoModel, RemarkModel, ReportModel } from "/@/api/teacher/model/practice-model"; import { UserInfo } from "/#/store"; enum Api { GetGroupMember = "/group/tutor/list", GetIntershipInfo = "/internInfo/getInfo", GetUserInfo = "/user/getProfile", - SetLectureNoteRemark = "/internInfo/mark/tk", - SetLessonPlanRemark = "/internInfo/mark/ja", - SetTeachingStudyRemark = "/internInfo/mark/jy", + SetLectureNoteMark = "/internInfo/mark/tk", + SetLessonPlanMark = "/internInfo/mark/ja", + SetTeachingStudyMark = "/internInfo/mark/jy", + GetRemark = "/internInfo/getRemark", + SetZxRemark = "/internInfo/remark/zx", + SetGxRemark = "/internInfo/remark/gx", + GetReportByUserId = "/internInfo/getReport", } /** @@ -43,9 +47,9 @@ export const getUserInfoByUserId = (userId: number) => * @param highSchool 中学指导教师评分 * @param university 高校指导教师评分 */ -export const setLectureNoteRemark = (userId: number, highSchool: number, university: number) => +export const setLectureNoteMark = (userId: number, highSchool: number, university: number) => defHttp.put({ - url: Api.SetLectureNoteRemark + `/${userId}`, + url: Api.SetLectureNoteMark + `/${userId}`, params: { highSchool, university, @@ -58,9 +62,9 @@ export const setLectureNoteRemark = (userId: number, highSchool: number, univers * @param highSchool 中学指导教师评分 * @param university 高校指导教师评分 */ -export const setLessonPlanRemark = (userId: number, highSchool: number, university: number) => +export const setLessonPlanMark = (userId: number, highSchool: number, university: number) => defHttp.put({ - url: Api.SetLessonPlanRemark + `/${userId}`, + url: Api.SetLessonPlanMark + `/${userId}`, params: { highSchool, university, @@ -73,11 +77,55 @@ export const setLessonPlanRemark = (userId: number, highSchool: number, universi * @param highSchool 中学指导教师评分 * @param university 高校指导教师评分 */ -export const setTeachingStudyRemark = (userId: number, highSchool: number, university: number) => +export const setTeachingStudyMark = (userId: number, highSchool: number, university: number) => defHttp.put({ - url: Api.SetTeachingStudyRemark + `/${userId}`, + url: Api.SetTeachingStudyMark + `/${userId}`, params: { highSchool, university, }, }); + +/** + * 查询指定id实习生的教育实习评价信息 + * @param userId 实习生id + */ +export const getRemark = (userId: number) => + defHttp.get({ + url: Api.GetRemark + `/${userId}`, + }); + +/** + * 更新中学教师评语 + * @param userId 实习生id + * @param content 评语内容 + */ +export const setZxRemark = (userId: number, content: string) => + defHttp.put({ + url: Api.SetZxRemark + `/${userId}`, + params: { + content, + }, + }); + +/** + * 更新高校教师评语 + * @param userId 实习生id + * @param content 评语内容 + */ +export const setGxRemark = (userId: number, content: string) => + defHttp.put({ + url: Api.SetGxRemark + `/${userId}`, + params: { + content, + }, + }); + +/** + * 根据实习生id获取成绩报告 + * @param userId 实习生用户id + */ +export const getReportByUserId = (userId: number) => + defHttp.get({ + url: Api.GetReportByUserId + `/${userId}`, + }); diff --git a/src/enums/remarkTypeEnum.ts b/src/enums/remarkTypeEnum.ts new file mode 100644 index 0000000000000000000000000000000000000000..acd813f6aaa14b2eb1b09997c3ff0dd4da2f3c95 --- /dev/null +++ b/src/enums/remarkTypeEnum.ts @@ -0,0 +1,4 @@ +export enum RemarkTypeEnum { + highSchool = "zx", + university = "gx", +} diff --git a/src/views/student/practice/group-leader-mark/lecture-note-list.vue b/src/views/student/practice/group-leader-mark/lecture-note-list.vue index 733dbdb173db489b37f8f497b0b85269d1cad444..de896b2141b5277c453d11e8920bd39e16a25c1c 100644 --- a/src/views/student/practice/group-leader-mark/lecture-note-list.vue +++ b/src/views/student/practice/group-leader-mark/lecture-note-list.vue @@ -32,7 +32,7 @@ import { BasicColumn, TableAction, useTable } from "/@/components/Table"; import { BasicTable } from "/@/components/Table"; import LectureNoteDescriptionModal from "./lecture-note-description.vue"; - import RemarkModal from "/@/views/teacher/practice/teacher-mark/remark.vue"; + import RemarkModal from "/@/views/teacher/practice/teacher-mark/teacher-mark-modal.vue"; import { useModal } from "/@/components/Modal"; import { useRoute, useRouter } from "vue-router"; import { MarkTypeEnum } from "/@/enums/markTypeEnum"; diff --git a/src/views/student/practice/group-leader-mark/lesson-plan-list.vue b/src/views/student/practice/group-leader-mark/lesson-plan-list.vue index 4f53fac63d7c04941699d1d0bee9bbb80921ec1c..7df0a54ee51febf18afac7a84b8553bda394455e 100644 --- a/src/views/student/practice/group-leader-mark/lesson-plan-list.vue +++ b/src/views/student/practice/group-leader-mark/lesson-plan-list.vue @@ -32,7 +32,7 @@ import { BasicColumn, TableAction, useTable } from "/@/components/Table"; import { BasicTable } from "/@/components/Table"; import LessonPlanDescriptionModal from "./lesson-plan-description.vue"; - import RemarkModal from "/@/views/teacher/practice/teacher-mark/remark.vue"; + import RemarkModal from "/@/views/teacher/practice/teacher-mark/teacher-mark-modal.vue"; import { useModal } from "/@/components/Modal"; import { useRoute, useRouter } from "vue-router"; import { MarkTypeEnum } from "/@/enums/markTypeEnum"; diff --git a/src/views/student/practice/group-leader-mark/teaching-study-list.vue b/src/views/student/practice/group-leader-mark/teaching-study-list.vue index 4e75c079d81de921a0bab0d4e1ff3a67089dc976..c057314c213f1886e58091c55e081ff0b6b2d654 100644 --- a/src/views/student/practice/group-leader-mark/teaching-study-list.vue +++ b/src/views/student/practice/group-leader-mark/teaching-study-list.vue @@ -32,7 +32,7 @@ import { BasicColumn, TableAction, useTable } from "/@/components/Table"; import { BasicTable } from "/@/components/Table"; import TeachingStudyDescriptionModal from "./teaching-study-description.vue"; - import RemarkModal from "/@/views/teacher/practice/teacher-mark/remark.vue"; + import RemarkModal from "/@/views/teacher/practice/teacher-mark/teacher-mark-modal.vue"; import { useModal } from "/@/components/Modal"; import { useRoute, useRouter } from "vue-router"; import { MarkTypeEnum } from "/@/enums/markTypeEnum"; diff --git a/src/views/teacher/practice/practice-score/index.vue b/src/views/teacher/practice/practice-score/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..280f2fa270df6c0dbb05f4a5405610cb76e6a014 --- /dev/null +++ b/src/views/teacher/practice/practice-score/index.vue @@ -0,0 +1,106 @@ + + + diff --git a/src/views/teacher/practice/practice-score/score-description.vue b/src/views/teacher/practice/practice-score/score-description.vue new file mode 100644 index 0000000000000000000000000000000000000000..d1d66fb220a4533e25d3fc29d0f3a8059088ff00 --- /dev/null +++ b/src/views/teacher/practice/practice-score/score-description.vue @@ -0,0 +1,93 @@ + + + diff --git a/src/views/teacher/practice/teacher-mark/remark.vue b/src/views/teacher/practice/teacher-mark/teacher-mark-modal.vue similarity index 88% rename from src/views/teacher/practice/teacher-mark/remark.vue rename to src/views/teacher/practice/teacher-mark/teacher-mark-modal.vue index dc5f5fa067ee325e4e325eee1b00b30894cb65f1..c5a1e3aa49758793e3c85a73c1150bf78b44ae43 100644 --- a/src/views/teacher/practice/teacher-mark/remark.vue +++ b/src/views/teacher/practice/teacher-mark/teacher-mark-modal.vue @@ -3,7 +3,6 @@ v-bind="$attrs" title="评分" @register="registerModal" - width="1000px" :showOkBtn="false" :showCancelBtn="false" > @@ -16,9 +15,9 @@ import { BasicModal, useModalInner } from "/@/components/Modal"; import { BasicForm, FormSchema, useForm } from "/@/components/Form"; import { - setLectureNoteRemark, - setLessonPlanRemark, - setTeachingStudyRemark, + setLectureNoteMark, + setLessonPlanMark, + setTeachingStudyMark, } from "/@/api/teacher/practice"; import { useMessage } from "/@/hooks/web/useMessage"; @@ -82,27 +81,33 @@ labelWidth: 150, schemas: formSchema, showResetButton: false, + submitButtonOptions: { + text: "提交", + }, + actionColOptions: { + span: 24, + }, }); const { createSuccessModal } = useMessage(); function handleSubmit(value) { switch (target.value) { case "tk": { - setLectureNoteRemark(userId.value, value.highSchool, value.university).then(() => { + setLectureNoteMark(userId.value, value.highSchool, value.university).then(() => { createSuccessModal({ content: "打分成功" }); closeModal(); }); break; } case "ja": { - setLessonPlanRemark(userId.value, value.highSchool, value.university).then(() => { + setLessonPlanMark(userId.value, value.highSchool, value.university).then(() => { createSuccessModal({ content: "打分成功" }); closeModal(); }); break; } case "jy": { - setTeachingStudyRemark(userId.value, value.highSchool, value.university).then(() => { + setTeachingStudyMark(userId.value, value.highSchool, value.university).then(() => { createSuccessModal({ content: "打分成功" }); closeModal(); }); diff --git a/src/views/teacher/practice/teacher-remark/index.vue b/src/views/teacher/practice/teacher-remark/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..55ad4c07e22ed64ad4917cfce9c40fcdab05a047 --- /dev/null +++ b/src/views/teacher/practice/teacher-remark/index.vue @@ -0,0 +1,126 @@ + + + diff --git a/src/views/teacher/practice/teacher-remark/remark-edit-modal.vue b/src/views/teacher/practice/teacher-remark/remark-edit-modal.vue new file mode 100644 index 0000000000000000000000000000000000000000..bb08d29bd7b2567e978b3ea6e9199ef923b0f830 --- /dev/null +++ b/src/views/teacher/practice/teacher-remark/remark-edit-modal.vue @@ -0,0 +1,88 @@ + + +