From 58136428e895096ab4223520afde04bb54451284 Mon Sep 17 00:00:00 2001 From: In_Chh <2319397152@qq..com> Date: Thu, 15 Sep 2022 14:40:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=95=99=E5=B8=88=E8=AF=84=E5=88=86=E9=A1=B5=E9=9D=A2=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC=E8=87=B3=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/teacher/practical/score/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/teacher/practical/score/index.vue b/src/views/teacher/practical/score/index.vue index 7c688cc..d2e3fbb 100644 --- a/src/views/teacher/practical/score/index.vue +++ b/src/views/teacher/practical/score/index.vue @@ -89,7 +89,7 @@ function handleLectureNoteDesc(record) { router.push({ - name: "userLectureNoteList", + name: "LectureNoteList", params: record, query: { type: MarkTypeEnum.TeacherMark }, }); @@ -97,7 +97,7 @@ function handleLessonPlanDesc(record) { router.push({ - name: "userLessonPlanList", + name: "LessonPlanList", params: record, query: { type: MarkTypeEnum.TeacherMark }, }); @@ -105,7 +105,7 @@ function handleTeachingStudyDesc(record) { router.push({ - name: "userTeachingStudyList", + name: "TeachingStudyList", params: record, query: { type: MarkTypeEnum.TeacherMark }, }); -- Gitee From 101f0b2e97d4a9792abbf9df71366be0aa65af97 Mon Sep 17 00:00:00 2001 From: In_Chh <2319397152@qq..com> Date: Thu, 15 Sep 2022 18:29:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E7=8F=AD?= =?UTF-8?q?=E4=B8=BB=E4=BB=BB=E5=AE=9E=E4=B9=A0=E5=B7=A5=E4=BD=9C=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E5=B1=95=E7=A4=BA=E4=B8=8E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E5=B8=88=E8=AF=84=E5=88=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mock/student/practice.ts | 43 ++- mock/sys/menu.ts | 66 +++-- mock/teacher/practice.ts | 4 +- .../{practice-model.ts => practiceModel.ts} | 11 + src/api/student/practice.ts | 32 ++- .../{practice-model.ts => practiceModel.ts} | 0 src/api/teacher/practice.ts | 36 ++- src/enums/markTypeEnum.ts | 4 +- src/enums/scoreTarget.ts | 7 + src/views/account/components/BaseSetting.vue | 21 +- src/views/captain/practical/index.vue | 6 +- .../default/practical/LectureNoteDesc.vue | 2 +- .../default/practical/LectureNoteList.vue | 4 +- .../default/practical/LessonPlanDesc.vue | 2 +- .../default/practical/LessonPlanList.vue | 4 +- .../default/practical/TeachingStudyDesc.vue | 2 +- .../default/practical/TeachingStudyList.vue | 4 +- .../student/practical/leaderWork/index.vue | 253 ++++++++++++++++++ .../task/components/LectureNote/index.vue | 2 +- .../task/components/LessonPlan/index.vue | 2 +- .../task/components/TeachingStudy/index.vue | 2 +- src/views/teacher/practical/score/Edit.vue | 23 +- .../practical/score/LeaderWorkDesc.vue | 111 ++++++++ src/views/teacher/practical/score/index.vue | 49 +++- 24 files changed, 622 insertions(+), 68 deletions(-) rename src/api/student/model/{practice-model.ts => practiceModel.ts} (88%) rename src/api/teacher/model/{practice-model.ts => practiceModel.ts} (100%) create mode 100644 src/enums/scoreTarget.ts create mode 100644 src/views/student/practical/leaderWork/index.vue create mode 100644 src/views/teacher/practical/score/LeaderWorkDesc.vue diff --git a/mock/student/practice.ts b/mock/student/practice.ts index a3ffd82..93ee0ac 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/practice-model"; -import { resultPageSuccess } from "mock/_util"; +} from "/@/api/student/model/practiceModel"; +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 d92a904..268dd50 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/mock/teacher/practice.ts b/mock/teacher/practice.ts index 7b9995b..2c2b0da 100644 --- a/mock/teacher/practice.ts +++ b/mock/teacher/practice.ts @@ -1,8 +1,8 @@ -import { GroupMemberItemModel } from "/@/api/student/model/practice-model"; +import { GroupMemberItemModel } from "/@/api/student/model/practiceModel"; import { resultPageSuccess, resultSuccess } from "mock/_util"; import { MockMethod } from "vite-plugin-mock"; import { GenderEnum } from "/@/enums/genderEnum"; -import { IntershipInfoModel, ReportModel } from "/@/api/teacher/model/practice-model"; +import { IntershipInfoModel, ReportModel } from "/@/api/teacher/model/practiceModel"; import { IntershipTypeEnum } from "/@/enums/intershipTypeEnum"; function getGroupMemberList() { diff --git a/src/api/student/model/practice-model.ts b/src/api/student/model/practiceModel.ts similarity index 88% rename from src/api/student/model/practice-model.ts rename to src/api/student/model/practiceModel.ts index 6966434..09cc6b5 100644 --- a/src/api/student/model/practice-model.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 5d72cf5..0322c3d 100644 --- a/src/api/student/practice.ts +++ b/src/api/student/practice.ts @@ -1,12 +1,13 @@ import { GroupMemberListResultModel, + LeaderWorkModel, LectureNoteItemModel, LectureNoteListResultModel, LessonPlanItemModel, LessonPlanListResultModel, TeachingStudyItemModel, TeachingStudyListResultModel, -} from "./model/practice-model"; +} from "./model/practiceModel"; import { BasicPageParams, BasicPageParamsWithGroupId, @@ -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/model/practice-model.ts b/src/api/teacher/model/practiceModel.ts similarity index 100% rename from src/api/teacher/model/practice-model.ts rename to src/api/teacher/model/practiceModel.ts diff --git a/src/api/teacher/practice.ts b/src/api/teacher/practice.ts index ee1439f..89fb499 100644 --- a/src/api/teacher/practice.ts +++ b/src/api/teacher/practice.ts @@ -1,7 +1,7 @@ import { BasicPageParams } from "/@/api/model/baseModel"; import { defHttp } from "/@/utils/http/axios"; -import { GroupMemberListResultModel } from "/@/api/student/model/practice-model"; -import { IntershipInfoModel, RemarkModel, ReportModel } from "/@/api/teacher/model/practice-model"; +import { GroupMemberListResultModel } from "/@/api/student/model/practiceModel"; +import { IntershipInfoModel, RemarkModel, ReportModel } from "/@/api/teacher/model/practiceModel"; import { UserInfo } from "/#/store"; enum Api { @@ -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 08035c1..edf178c 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 0000000..3e12dde --- /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 cb9e0d4..42598ee 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 139d358..acbea61 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 3b02179..7a01176 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 2b0459b..ca454e8 100644 --- a/src/views/default/practical/LectureNoteList.vue +++ b/src/views/default/practical/LectureNoteList.vue @@ -27,7 +27,7 @@ diff --git a/src/views/student/practical/task/components/LectureNote/index.vue b/src/views/student/practical/task/components/LectureNote/index.vue index 9a2d687..98a3510 100644 --- a/src/views/student/practical/task/components/LectureNote/index.vue +++ b/src/views/student/practical/task/components/LectureNote/index.vue @@ -39,7 +39,7 @@ diff --git a/src/views/teacher/practical/score/index.vue b/src/views/teacher/practical/score/index.vue index d2e3fbb..da4b281 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() { @@ -91,7 +114,7 @@ router.push({ name: "LectureNoteList", params: record, - query: { type: MarkTypeEnum.TeacherMark }, + query: { type: MarkTypeEnum.InstructorMark }, }); } @@ -99,7 +122,7 @@ router.push({ name: "LessonPlanList", params: record, - query: { type: MarkTypeEnum.TeacherMark }, + query: { type: MarkTypeEnum.InstructorMark }, }); } @@ -107,16 +130,30 @@ router.push({ 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, }; }, }); -- Gitee