Browse Source

feat:修改毕业管理

DESKTOP-USV654P\pc 7 months ago
parent
commit
f21c35297b

+ 3 - 2
src/services/apis/ActivityEnrollController.ts

@@ -27,8 +27,9 @@ export async function postActivityEnrollChangeStatus(params:API.ChangeStatusDto[
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/activity/activityEnroll/change-status', data:params},{errorMessageMode:mode});}
 /** 报名 POST /activity/activityEnroll/enroll */
-export async function postActivityEnrollEnroll(mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
-        ({url: '/activity/activityEnroll/enroll', data:{}},{errorMessageMode:mode});}
+export async function postActivityEnrollEnroll(params:API.UserEnrollDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/activity/activityEnroll/enroll', data:params},{errorMessageMode:mode});}
 /** 导出列表 POST /activity/activityEnroll/export-query */
 export async function postActivityEnrollExportQuery(params:API.ActivityEnrollExportDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>

+ 31 - 0
src/services/apis/BaseStudentDevelopmentController.ts

@@ -0,0 +1,31 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Base Student Development Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增学生去向登记 POST /student/baseStudentDevelopment */
+export async function postStudentBaseStudentDevelopment(params:API.AddBaseStudentDevelopmentDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/student/baseStudentDevelopment', data:params},{errorMessageMode:mode});}
+/** 修改学生去向登记 PUT /student/baseStudentDevelopment */
+export async function putStudentBaseStudentDevelopment(params:API.UpdateBaseStudentDevelopmentDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/student/baseStudentDevelopment', data:params},{errorMessageMode:mode});}
+/** 删除学生去向登记 DELETE /student/baseStudentDevelopment */
+export async function deleteStudentBaseStudentDevelopment(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/student/baseStudentDevelopment', data:params},{errorMessageMode:mode});}
+/** 根据id查询学生去向登记信息 GET /student/baseStudentDevelopment/info */
+export async function getBaseStudentDevelopmentInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BaseStudentDevelopmentVo>
+        ({url: '/student/baseStudentDevelopment/info', params:params},{errorMessageMode:mode});}
+/** 学生去向登记列表(分页) GET /student/baseStudentDevelopment/page */
+export async function getBaseStudentDevelopmentPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.BaseStudentDevelopmentPageVo>>
+        ({url: '/student/baseStudentDevelopment/page', params:params},{errorMessageMode:mode});}
+            

+ 32 - 0
src/services/apis/DataboardController.ts

@@ -0,0 +1,32 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Databoard Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 课表统计 GET /databoard/databoard/course-statistics */
+export async function getDataboardCourseStatistics(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.CourseStatisticsVo>
+        ({url: '/databoard/databoard/course-statistics', params:params},{errorMessageMode:mode});}
+/** 学生健康统计 GET /databoard/databoard/health-statistics */
+export async function getDataboardHealthStatistics(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.HealthStatisticsVo>
+        ({url: '/databoard/databoard/health-statistics', params:params},{errorMessageMode:mode});}
+/** 会议统计 GET /databoard/databoard/meeting-statistics */
+export async function getDataboardMeetingStatistics(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.MeetingStatisticsVo>
+        ({url: '/databoard/databoard/meeting-statistics', params:params},{errorMessageMode:mode});}
+/** 全校师生数据概览 GET /databoard/databoard/person-statistics */
+export async function getDataboardPersonStatistics(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PersonStatisticsVo>
+        ({url: '/databoard/databoard/person-statistics', params:params},{errorMessageMode:mode});}
+/** 流程统计 GET /databoard/databoard/process-statistics */
+export async function getDataboardProcessStatistics(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.ProcessStatisticsVo>
+        ({url: '/databoard/databoard/process-statistics', params:params},{errorMessageMode:mode});}
+/** 访客统计 GET /databoard/databoard/visitor-statistics */
+export async function getDataboardVisitorStatistics(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.VisitorStatisticsVo>
+        ({url: '/databoard/databoard/visitor-statistics', params:params},{errorMessageMode:mode});}
+            

+ 6 - 0
src/services/apis/index.ts

@@ -30,6 +30,7 @@ import * as ClassroomController from './ClassroomController';
 import * as ConcatController from './ConcatController';
 import * as SecondCourseController from './SecondCourseController';
 import * as CourseTableController from './CourseTableController';
+import * as DataboardController from './DataboardController';
 import * as DataExpertSourceController from './DataExpertSourceController';
 import * as DataExpertTemplateController from './DataExpertTemplateController';
 import * as EvaluateItemController from './EvaluateItemController';
@@ -114,6 +115,7 @@ import * as BaseStudentBehaviorManageController from './BaseStudentBehaviorManag
 import * as BaseStudentBursariesApplicantController from './BaseStudentBursariesApplicantController';
 import * as BaseStudentBursariesProjectController from './BaseStudentBursariesProjectController';
 import * as BaseStudentBursariesStudentController from './BaseStudentBursariesStudentController';
+import * as BaseStudentDevelopmentController from './BaseStudentDevelopmentController';
 import * as BaseStudentGraduateController from './BaseStudentGraduateController';
 import * as BaseStudentScholarshipApplicantController from './BaseStudentScholarshipApplicantController';
 import * as BaseStudentScholarshipCategoryController from './BaseStudentScholarshipCategoryController';
@@ -259,6 +261,8 @@ ConcatController,
 SecondCourseController,
 /** Course Table Controller */
 CourseTableController,
+/** Databoard Controller */
+DataboardController,
 /** Data Expert Source Controller */
 DataExpertSourceController,
 /** Data Expert Template Controller */
@@ -427,6 +431,8 @@ BaseStudentBursariesApplicantController,
 BaseStudentBursariesProjectController,
 /** Base Student Bursaries Student Controller */
 BaseStudentBursariesStudentController,
+/** Base Student Development Controller */
+BaseStudentDevelopmentController,
 /** Base Student Graduate Controller */
 BaseStudentGraduateController,
 /** Base Student Scholarship Applicant Controller */

+ 318 - 0
src/services/typing.d.ts

@@ -152,6 +152,8 @@ id?: string;
 isEnroll?: number;
 /** 活动名称 */
 name?: string;
+/** 组织部门名称 */
+orgCn?: string;
 /** 组织部门(xjr_department) */
 orgId?: string;
 /** 活动地点 */
@@ -1067,6 +1069,59 @@ userPage?: string;
 wechat?: string;
 }
 
+type AddBaseStudentDevelopmentDto = {
+/** 录取专业 */
+admissionMajor?: string;
+/** 升学层次(xjr_dictionary_item[ascending_arrangement]) */
+ascendingArrangement?: string;
+/** 升学渠道(xjr_dictionary_item[ascending_channels]) */
+ascendingChannels?: string;
+/** 毕业id(base_student_graduate) */
+baseStudentGraduateId?: string;
+/** 企合作单位(company_coop),是校企合作单位 */
+companyCoopId?: number;
+/** 就业单位行业 */
+companyIndustry?: string;
+/** 就业单位性质 */
+companyNature?: string;
+/** 就业单位规模(xjr_dictionary_item[company_scale]) */
+companyScale?: string;
+/** 学生类型(xjr_dictionary_item[culture_type]) */
+cultureType?: string;
+/** 登记类型(1:升学 2:就业 3:未就业) */
+enrollType?: number;
+/** 创业项目名称 */
+entrepreneurialProject?: string;
+/** 是否校企合作单位(1:是 0:否) */
+isCompanyCoop?: number;
+/** 是否自己创业(1:是 0:否) */
+isEntrepreneurship?: number;
+/** 是否灵活就业(1:是 0:否) */
+isFlexibleWork?: number;
+/** 是否对口(1:是 0:否) */
+isMatching?: number;
+/** 最低薪资 */
+money?: number;
+/** 备注信息 */
+remark?: string;
+/** 学校名称 */
+school?: string;
+/** 分数 */
+score?: number;
+/** 未就业类型(xjr_dictionary_item[unemployed_type]) */
+unemployedType?: string;
+/** 学生id(xjr_user) */
+userId?: string;
+/** 就业所在地区 */
+workCity?: string;
+/** 就业单位名称(非校企合作单位) */
+workCompany?: string;
+/** 是否灵活就业(1:是 0:否) */
+workContent?: number;
+/** 就业日期 */
+workDate?: string;
+}
+
 type AddBaseStudentDto = {
 /** 别名 */
 asName?: string;
@@ -6426,6 +6481,114 @@ userId?: string;
 userName?: string;
 }
 
+type BaseStudentDevelopmentPageVo = {
+/** 录取专业 */
+admissionMajor?: string;
+/** 升学层次(xjr_dictionary_item[ascending_arrangement]) */
+ascendingArrangement?: string;
+/** 升学渠道(xjr_dictionary_item[ascending_channels]) */
+ascendingChannels?: string;
+/** 毕业id(base_student_graduate) */
+baseStudentGraduateId?: string;
+/** 企合作单位(company_coop),是校企合作单位 */
+companyCoopId?: number;
+/** 就业单位行业 */
+companyIndustry?: string;
+/** 就业单位性质 */
+companyNature?: string;
+/** 就业单位规模(xjr_dictionary_item[company_scale]) */
+companyScale?: string;
+/** 创建时间 */
+createDate?: string;
+/** 学生类型(xjr_dictionary_item[culture_type]) */
+cultureType?: string;
+/** 登记类型(1:升学 2:就业 3:未就业) */
+enrollType?: number;
+/** 创业项目名称 */
+entrepreneurialProject?: string;
+id?: string;
+/** 是否校企合作单位(1:是 0:否) */
+isCompanyCoop?: number;
+/** 是否自己创业(1:是 0:否) */
+isEntrepreneurship?: number;
+/** 是否灵活就业(1:是 0:否) */
+isFlexibleWork?: number;
+/** 是否对口(1:是 0:否) */
+isMatching?: number;
+/** 最低薪资 */
+money?: number;
+/** 备注信息 */
+remark?: string;
+/** 学校名称 */
+school?: string;
+/** 分数 */
+score?: number;
+/** 未就业类型(xjr_dictionary_item[unemployed_type]) */
+unemployedType?: string;
+/** 学生id(xjr_user) */
+userId?: string;
+/** 就业所在地区 */
+workCity?: string;
+/** 就业单位名称(非校企合作单位) */
+workCompany?: string;
+/** 是否灵活就业(1:是 0:否) */
+workContent?: number;
+/** 就业日期 */
+workDate?: string;
+}
+
+type BaseStudentDevelopmentVo = {
+/** 录取专业 */
+admissionMajor?: string;
+/** 升学层次(xjr_dictionary_item[ascending_arrangement]) */
+ascendingArrangementCn?: string;
+/** 升学渠道(xjr_dictionary_item[ascending_channels]) */
+ascendingChannelsCn?: string;
+/** 毕业id(base_student_graduate) */
+baseStudentGraduateId?: string;
+/** 企合作单位(company_coop),是校企合作单位 */
+companyCoopId?: number;
+/** 就业单位行业 */
+companyIndustry?: string;
+/** 就业单位性质 */
+companyNature?: string;
+/** 就业单位规模(xjr_dictionary_item[company_scale]) */
+companyScaleCn?: string;
+/** 学生类型(xjr_dictionary_item[culture_type]) */
+cultureTypeCn?: string;
+/** 登记类型(1:升学 2:就业 3:未就业) */
+enrollType?: number;
+/** 创业项目名称 */
+entrepreneurialProject?: string;
+id?: string;
+/** 是否校企合作单位(1:是 0:否) */
+isCompanyCoop?: number;
+/** 是否自己创业(1:是 0:否) */
+isEntrepreneurship?: number;
+/** 是否灵活就业(1:是 0:否) */
+isFlexibleWork?: number;
+/** 是否对口(1:是 0:否) */
+isMatching?: number;
+/** 最低薪资 */
+money?: number;
+/** 备注信息 */
+remark?: string;
+/** 学校名称 */
+school?: string;
+/** 分数 */
+score?: number;
+/** 未就业类型(xjr_dictionary_item[unemployed_type]) */
+unemployedTypeCn?: string;
+/** 就业所在地区 */
+workCity?: string;
+/** 就业单位名称(非校企合作单位) */
+workCompany?: string;
+/** 是否灵活就业(1:是 0:否) */
+workContent?: number;
+/** 就业日期 */
+workDate?: string;
+}
+
 type BaseStudentGraduatePageVo = {
 /** 附件id */
 appendixId?: string;
@@ -7947,6 +8110,19 @@ timePeriod?: number;
 timePeriodCn?: string;
 }
 
+type CourseStatisticsVo = {
+/** 调课总数 */
+adjustCount?: number;
+/** 课程总数 */
+allCount?: number;
+/** 有课老师总数 */
+noTeacherCount?: number;
+/** 顶课总数 */
+replaceCount?: number;
+/** 有课老师总数 */
+teacherCount?: number;
+}
+
 type CourseTableVo = {
 /** 总课时 */
 classHour?: number;
@@ -9327,6 +9503,17 @@ roomId?: string;
 roomName?: string;
 }
 
+type HealthStatisticsVo = {
+/** 传染病登记人数-女 */
+infectionFemaleCount?: number;
+/** 传染病登记人数-男 */
+infectionMaleCount?: number;
+/** 心理咨询人数-女 */
+psychologicalFemaleCount?: number;
+/** 心理咨询人数-男 */
+psychologicalMaleCount?: number;
+}
+
 type HistoryChangeDto = {
 id?: string;
 schemaId?: string;
@@ -9962,6 +10149,13 @@ name?: string;
 templatePreview?: string;
 }
 
+type MeetingStatisticsVo = {
+/** 会议总数 */
+allCount?: number;
+/** 参会总人数 */
+personCount?: number;
+}
+
 type MemberConfig = {
 formFieldConfig?: FormFieldConfig;
 id?: string;
@@ -11154,6 +11348,14 @@ total?: number;
 totalPage?: number;
 }
 
+type PageOutput<BaseStudentDevelopmentPageVo> = {
+currentPage?: number;
+list?: BaseStudentDevelopmentPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
 type PageOutput<BaseStudentGraduatePageVo> = {
 currentPage?: number;
 list?: BaseStudentGraduatePageVo[];
@@ -12591,6 +12793,39 @@ taskKey?: string;
 taskName?: string;
 }
 
+type PersonStatisticsVo = {
+/** 学生总人数 */
+studentCount?: number;
+/** 女学生总人数 */
+studentFemaleCount?: number;
+/** 男学生总人数 */
+studentMaleCount?: number;
+/** 走读女学生总人数 */
+studentNotStayFemaleCount?: number;
+/** 走读男学生总人数 */
+studentNotStayMaleCount?: number;
+/** 住校女学生总人数 */
+studentStayFemaleCount?: number;
+/** 住校男学生总人数 */
+studentStayMaleCount?: number;
+/** 教师总人数 */
+teacherCount?: number;
+/** 正式聘用教师数 */
+teacherCount1?: number;
+/** 外聘/临聘教师数 */
+teacherCount2?: number;
+/** 兼职教师数 */
+teacherCount3?: number;
+/** 合作办学教师数 */
+teacherCount4?: number;
+/** 其他人员 */
+teacherCount5?: number;
+/** 女教师总人数 */
+teacherFemaleCount?: number;
+/** 男教师总人数 */
+teacherMaleCount?: number;
+}
+
 type PersonalPortraitFeeInformationVo = {
 /** 消费信息  */
 pbVXsxxsfytbPersonalMapList?: PbVXsxxsfytbPersonalMap[];
@@ -12790,6 +13025,15 @@ type?: number;
 value?: string;
 }
 
+type ProcessStatisticsVo = {
+/** 发起流程总数 */
+allCount?: number;
+/** 完成总数 */
+completeCount?: number;
+/** 未完成总数 */
+uncompleteCount?: number;
+}
+
 type ProclamationPageVo = {
 /** 紧急程度  1=一般 2=紧急 */
 emergent?: number;
@@ -14212,10 +14456,16 @@ userName?: string;
 type SecondCoursePageVo = {
 /** 课程主要内容 */
 content?: string;
+/** 封面id */
+coverId?: string;
+/** 封面url */
+coverUrl?: string;
 /** 报名人数 */
 enrollCount?: number;
 /** 参与范围 */
 enrollRange?: string;
+/** 是否报名(0:否 1:是) */
+enrollStatus?: number;
 id?: string;
 /** 课程名称 */
 name?: string;
@@ -16579,6 +16829,60 @@ userPage?: string;
 wechat?: string;
 }
 
+type UpdateBaseStudentDevelopmentDto = {
+/** 录取专业 */
+admissionMajor?: string;
+/** 升学层次(xjr_dictionary_item[ascending_arrangement]) */
+ascendingArrangement?: string;
+/** 升学渠道(xjr_dictionary_item[ascending_channels]) */
+ascendingChannels?: string;
+/** 毕业id(base_student_graduate) */
+baseStudentGraduateId?: string;
+/** 企合作单位(company_coop),是校企合作单位 */
+companyCoopId?: number;
+/** 就业单位行业 */
+companyIndustry?: string;
+/** 就业单位性质 */
+companyNature?: string;
+/** 就业单位规模(xjr_dictionary_item[company_scale]) */
+companyScale?: string;
+/** 学生类型(xjr_dictionary_item[culture_type]) */
+cultureType?: string;
+/** 登记类型(1:升学 2:就业 3:未就业) */
+enrollType?: number;
+/** 创业项目名称 */
+entrepreneurialProject?: string;
+id?: string;
+/** 是否校企合作单位(1:是 0:否) */
+isCompanyCoop?: number;
+/** 是否自己创业(1:是 0:否) */
+isEntrepreneurship?: number;
+/** 是否灵活就业(1:是 0:否) */
+isFlexibleWork?: number;
+/** 是否对口(1:是 0:否) */
+isMatching?: number;
+/** 最低薪资 */
+money?: number;
+/** 备注信息 */
+remark?: string;
+/** 学校名称 */
+school?: string;
+/** 分数 */
+score?: number;
+/** 未就业类型(xjr_dictionary_item[unemployed_type]) */
+unemployedType?: string;
+/** 学生id(xjr_user) */
+userId?: string;
+/** 就业所在地区 */
+workCity?: string;
+/** 就业单位名称(非校企合作单位) */
+workCompany?: string;
+/** 是否灵活就业(1:是 0:否) */
+workContent?: number;
+/** 就业日期 */
+workDate?: string;
+}
+
 type UpdateBaseStudentDto = {
 /** 别名 */
 asName?: string;
@@ -19506,6 +19810,13 @@ name?: string;
 userName?: string;
 }
 
+type UserEnrollDto = {
+/** 活动id */
+activityInfoId?: string;
+/** 手机号 */
+mobile?: string;
+}
+
 type UserStudentBindDto = {
 idCard?: string;
 name?: string;
@@ -19663,6 +19974,13 @@ reservationSchoolPeopleId?: string;
 status?: number;
 }
 
+type VisitorStatisticsVo = {
+/** 历史访客总数 */
+allCount?: number;
+/** 今日访客数 */
+todayCount?: number;
+}
+
 type WeeklyDutySchedulePageVo = {
 /** 年龄 */
 age?: number;

+ 181 - 277
src/views/educational/graduate/data.config.ts

@@ -3,16 +3,18 @@ import { BasicColumn } from '/@/components/Table';
 import { getDataOption } from '/@/api/system/dic';
 import { requestMagicApi } from '/@/api/magicApi';
 import { getAreaOption } from '/@/api/userMagic';
-const isOrNot = [
-  {
-    label: '是',
-    value: '1',
-  },
-  {
-    label: '否',
-    value: '0',
-  },
+import { BasicOptionModel } from '/@/api/model/baseModel';
+const isEntrepreneurshipOptions: BasicOptionModel[] = [
+  { label: '是', value: 1 },
+  { label: '否', value: 0 },
+];
+
+export const enrollTypeOptions: BasicOptionModel[] = [
+  { label: '升学', value: 1 },
+  { label: '就业', value: 2 },
+  { label: '未就业', value: 3 },
 ];
+
 export const tableColumns: BasicColumn[] = [
   {
     title: '学号',
@@ -33,16 +35,22 @@ export const tableColumns: BasicColumn[] = [
     resizable: true,
   },
   {
-    title: '联系方式',
+    title: '手机号',
     dataIndex: 'phone',
     align: 'left',
     width: 120,
     resizable: true,
   },
   {
-    title: '学籍状态',
-    dataIndex: 'archivesStatusCn',
-    width: 80,
+    title: '班级',
+    dataIndex: 'className',
+    width: 120,
+    resizable: true,
+  },
+  {
+    title: '班主任',
+    dataIndex: 'teacherName',
+    width: 100,
     resizable: true,
   },
   {
@@ -58,21 +66,33 @@ export const tableColumns: BasicColumn[] = [
     resizable: true,
   },
   {
-    title: '是否发放毕业证',
+    title: '学籍状态',
+    dataIndex: 'archivesStatusCn',
+    width: 80,
+    resizable: true,
+  },
+  {
+    title: '发证日期',
+    dataIndex: 'certificateDate',
+    width: 120,
+  },
+  {
+    title: '发放毕业证',
     dataIndex: 'status',
     customRender: ({ record }) => {
-      return record.status === 1 ? '是' : '否';
+      return record.status === 1 ? '已发' : '未发';
     },
     width: 120,
     resizable: true,
   },
   {
-    title: '操作',
-    dataIndex: 'action',
+    title: '登记状态',
+    dataIndex: 'enrollStatus',
+    customRender: ({ text }) => {
+      if (text === 0) return '';
+      return enrollTypeOptions.filter((item) => item.value === text)[0]?.label;
+    },
     width: 120,
-    resizable: true,
-    fixed: 'right',
-    slots: { customRender: 'action' },
   },
 ];
 export const searchFormSchema: FormSchema[] = [
@@ -296,252 +316,209 @@ export const EditInfoFormSchema: FormSchema[] = [
 
 export const registrationFormSchema: FormSchema[] = [
   {
-    field: 'registrationType',
+    label: '学生姓名',
+    field: 'name',
+    component: 'Input',
+    dynamicDisabled: true,
+    colProps: { span: 12 },
+  },
+  {
+    label: '学号',
+    field: 'studentId',
+    component: 'Input',
+    dynamicDisabled: true,
+    colProps: { span: 12 },
+  },
+  {
+    label: '手机号',
+    field: 'phone',
+    component: 'Input',
+    dynamicDisabled: true,
+    colProps: { span: 12 },
+  },
+  {
+    label: '发证日期',
+    field: 'certificateDate',
+    component: 'Input',
+    dynamicDisabled: true,
+    colProps: { span: 12 },
+  },
+  {
+    field: 'enrollType',
     label: '登记类型',
     required: true,
     component: 'Select',
     colProps: { span: 24 },
     componentProps: {
-      options: [
-        {
-          label: '升学',
-          value: '升学',
-        },
-        {
-          label: '就业',
-          value: '就业',
-        },
-        {
-          label: '未就业',
-          value: '未就业',
-        },
-      ],
+      options: enrollTypeOptions,
+      getPopupContainer: () => document.body,
     },
   },
   {
-    field: 'studentType',
+    field: 'cultureType',
     label: '学生类型',
-    component: 'Select',
+    component: 'ApiSelect',
     required: true,
     componentProps: {
-      options: [
-        {
-          label: '非贯通培养',
-          value: '0',
-        },
-        {
-          label: '贯通培养',
-          value: '1',
-        },
-      ],
+      api: getDataOption,
+      params: { code: 'culture_type' },
+      getPopupContainer: () => document.body,
     },
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.values.registrationType === '升学';
+      return renderCallbackParams.values.enrollType === 1;
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
   },
   {
     label: '升学渠道',
-    field: 'entranceChannel',
-    component: 'Select',
-    colProps: { span: 24 },
+    field: 'ascendingChannels',
+    component: 'ApiSelect',
+    colProps: { span: 12 },
     required: true,
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.values.registrationType === '升学';
+      return renderCallbackParams.values.enrollType === 1;
     },
     componentProps: {
       getPopupContainer: () => document.body,
-      options: [
-        {
-          label: '贯通培训',
-          value: '1',
-        },
-        {
-          label: '五年一贯制培养',
-          value: '2',
-        },
-        {
-          label: '职教高考',
-          value: '3',
-        },
-        {
-          label: '普通高考',
-          value: '4',
-        },
-        {
-          label: '出国升学',
-          value: '5',
-        },
-        {
-          label: '3+2分段培养',
-          value: '7',
-        },
-        {
-          label: '专转本',
-          value: '8',
-        },
-        {
-          label: '考研',
-          value: '9',
-        },
-      ],
+      api: getDataOption,
+      params: { code: 'ascending_channels' },
     },
   },
   {
     label: '学校名称',
-    field: 'schoolName',
+    field: 'school',
     component: 'Input',
     required: true,
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.values.registrationType === '升学';
+      return renderCallbackParams.values.enrollType === 1;
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
   },
   {
     label: '录取专业',
     field: 'admissionMajor',
     component: 'Input',
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.values.registrationType === '升学';
+      return renderCallbackParams.values.enrollType === 1;
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
   },
   {
     label: '分数',
     field: 'score',
     component: 'InputNumber',
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.values.registrationType === '升学';
+      return renderCallbackParams.values.enrollType === 1;
     },
     componentProps: {
       step: 0.01,
       min: 0,
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
   },
   {
     label: '升学层次',
-    field: 'entranceLevel',
-    component: 'Select',
+    field: 'ascendingArrangement',
+    component: 'ApiSelect',
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.values.registrationType === '升学';
+      return renderCallbackParams.values.enrollType === 1;
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
     componentProps: {
       getPopupContainer: () => document.body,
-      options: [
-        {
-          label: '专科',
-          value: '1',
-        },
-        {
-          label: '职业本科',
-          value: '2',
-        },
-        {
-          label: '普通本科',
-          value: '3',
-        },
-        {
-          label: '硕士',
-          value: '4',
-        },
-        {
-          label: '其他',
-          value: '9',
-        },
-      ],
+      api: getDataOption,
+      params: { code: 'ascending_arrangement' },
     },
   },
   {
     label: '是否自己创业',
-    field: 'isSelfBusiness',
+    field: 'isEntrepreneurship',
     component: 'Select',
     required: true,
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.values.registrationType === '就业';
+      return renderCallbackParams.values.enrollType === 2;
     },
     colProps: { span: 24 },
     componentProps: {
       getPopupContainer: () => document.body,
-      options: isOrNot,
+      options: isEntrepreneurshipOptions,
     },
   },
   {
     label: '创业项目名称',
-    field: 'businessName',
+    field: 'entrepreneurialProject',
     component: 'Input',
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isSelfBusiness === '1'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isEntrepreneurship === 1
       );
     },
     colProps: { span: 24 },
   },
   {
     label: '是否灵活就业',
-    field: 'isFlexibleEmployment',
+    field: 'isFlexibleWork',
     component: 'Select',
     required: true,
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isSelfBusiness === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isEntrepreneurship === 0
       );
     },
     colProps: { span: 24 },
     componentProps: {
       getPopupContainer: () => document.body,
-      options: isOrNot,
+      options: isEntrepreneurshipOptions,
     },
   },
   {
     label: '工作内容',
-    field: 'employmentCompanyName',
+    field: 'workContent',
     component: 'Input',
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isFlexibleEmployment === '1'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 1
       );
     },
     colProps: { span: 24 },
   },
   {
-    label: '是否校企合作单位',
-    field: 'cooperationUnit',
+    label: '校企合作单位',
+    field: 'isCompanyCoop',
     component: 'Select',
     required: true,
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0
       );
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
     componentProps: {
       getPopupContainer: () => document.body,
-      options: isOrNot,
+      options: isEntrepreneurshipOptions,
     },
   },
   {
     label: '就业单位名称',
-    field: 'employmentCompanyName',
+    field: 'workCompany',
     component: 'Input',
     required: true,
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '0' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0 &&
+        renderCallbackParams.values.isCompanyCoop === 0
       );
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
   },
   {
     label: '就业单位名称',
-    field: 'employmentCompanyName',
+    field: 'companyCoopId',
     component: 'ApiSelect',
     required: true,
     componentProps: ({ formModel }) => {
@@ -556,172 +533,102 @@ export const registrationFormSchema: FormSchema[] = [
           const data = await requestMagicApi({
             url: `/Benchmark/companycoop-info?id=${item}`,
           } as any);
-          formModel.employmentCompanyIndustry = data[0].sector;
-          formModel.employmentCompanyNature = data[0].companyType;
-          formModel.employmentCompanyScale = data[0].companySize;
+          formModel.companyIndustry = data[0].sector;
+          formModel.companyScale = data[0].companySize;
+          formModel.companyNature = data[0].companyType;
         },
       };
     },
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '1' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0 &&
+        renderCallbackParams.values.isCompanyCoop === 1
       );
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
   },
   {
     label: '就业单位行业',
-    field: 'employmentCompanyIndustry',
+    field: 'companyIndustry',
     component: 'Input',
     required: true,
-    colProps: { span: 24 },
-    ifShow(renderCallbackParams) {
-      return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '0' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
-      );
+    colProps: { span: 12 },
+    dynamicDisabled: ({ values }) => {
+      return values.isCompanyCoop === 1;
     },
-  },
-  {
-    label: '就业单位规模',
-    field: 'employmentCompanyScale',
-    component: 'Input',
-    required: true,
-    colProps: { span: 24 },
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '0' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0
       );
     },
   },
   {
     label: '就业单位性质',
-    field: 'employmentCompanyNature',
+    field: 'companyNature',
     component: 'Input',
     required: true,
-    colProps: { span: 24 },
-    ifShow(renderCallbackParams) {
-      return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '0' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
-      );
-    },
-  },
-  {
-    label: '就业单位行业',
-    field: 'employmentCompanyIndustry',
-    component: 'ApiSelect',
-    dynamicDisabled(renderCallbackParams) {
-      return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
-      );
-    },
-    componentProps: {
-      getPopupContainer: () => document.body,
-      api: getDataOption,
-      params: {
-        code: 'SECTOR',
-      },
+    colProps: { span: 12 },
+    dynamicDisabled: ({ values }) => {
+      return values.isCompanyCoop === 1;
     },
-    required: true,
-    colProps: { span: 24 },
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '1' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0
       );
     },
   },
   {
-    label: '就业单位性质',
-    field: 'employmentCompanyNature',
+    label: '就业单位规模',
+    field: 'companyScale',
     component: 'ApiSelect',
-    colProps: { span: 24 },
-    componentProps: {
-      getPopupContainer: () => document.body,
-      api: getDataOption,
-      params: {
-        code: 'CTYPE',
-      },
-    },
-    dynamicDisabled(renderCallbackParams) {
-      return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
-      );
+    required: true,
+    colProps: { span: 12 },
+    dynamicDisabled: ({ values }) => {
+      return values.isCompanyCoop === 1;
     },
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '1' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0
       );
     },
-  },
-  {
-    label: '就业单位规模',
-    field: 'employmentCompanyScale',
-    component: 'ApiSelect',
-    colProps: { span: 24 },
     componentProps: {
       getPopupContainer: () => document.body,
       api: getDataOption,
-      params: {
-        code: 'CSIZE',
-      },
-    },
-    dynamicDisabled(renderCallbackParams) {
-      return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
-      );
-    },
-    ifShow(renderCallbackParams) {
-      return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '1' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
-      );
+      params: { code: 'company_scale' },
     },
   },
   {
     label: '是否对口',
-    field: 'isDocking',
+    field: 'isMatching',
     component: 'Select',
     required: true,
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.cooperationUnit === '1' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0
       );
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
     componentProps: {
       getPopupContainer: () => document.body,
-      options: isOrNot,
+      options: isEntrepreneurshipOptions,
     },
   },
   {
     label: '起薪线(元)',
-    field: 'salaryLine',
+    field: 'money',
     component: 'InputNumber',
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isSelfBusiness === '0' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0
       );
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
     componentProps: {
       step: 0.01,
       min: 0,
@@ -729,16 +636,15 @@ export const registrationFormSchema: FormSchema[] = [
   },
   {
     label: '就业日期',
-    field: 'employmentDate',
+    field: 'workDate',
     component: 'DatePicker',
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isSelfBusiness === '0' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0
       );
     },
-    colProps: { span: 24 },
+    colProps: { span: 12 },
     componentProps: {
       getPopupContainer: () => document.body,
       format: 'YYYY-MM-DD',
@@ -746,45 +652,43 @@ export const registrationFormSchema: FormSchema[] = [
   },
   {
     label: '所在地区',
-    field: 'area',
+    field: 'workCity',
     component: 'ApiSelect',
     ifShow(renderCallbackParams) {
       return (
-        renderCallbackParams.values.registrationType === '就业' &&
-        renderCallbackParams.values.isSelfBusiness === '0' &&
-        renderCallbackParams.values.isFlexibleEmployment === '0'
+        renderCallbackParams.values.enrollType === 2 &&
+        renderCallbackParams.values.isFlexibleWork === 0
       );
     },
     colProps: { span: 24 },
     componentProps: {
       api: getAreaOption,
+      params: { parent_id: 0 },
       getPopupContainer: () => document.body,
     },
   },
   {
     label: '未就业类型',
-    field: 'unemploymentType',
+    field: 'unemployedType',
     component: 'Select',
+    required: true,
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.values.registrationType === '未就业';
+      return renderCallbackParams.values.enrollType === 3;
     },
     colProps: { span: 24 },
     componentProps: {
-      options: [
-        {
-          label: '待就业',
-          value: '1',
-        },
-        {
-          label: '不就业拟升学',
-          value: '2',
-        },
-        {
-          label: '其他暂不就业',
-          value: '3',
-        },
-      ],
       getPopupContainer: () => document.body,
+      api: getDataOption,
+      params: { code: 'unemployed_type' },
     },
   },
+  {
+    label: '备注',
+    field: 'remark',
+    component: 'Input',
+    ifShow(renderCallbackParams) {
+      return renderCallbackParams.values.enrollType === 3;
+    },
+    colProps: { span: 24 },
+  },
 ];

+ 29 - 43
src/views/educational/graduate/edit.vue

@@ -26,20 +26,19 @@
   import { formSchema } from './data.config';
   import Upload from '/@/components/Form/src/components/Upload.vue';
 
-  import { getEvaluateTemplateInfo } from '/@/services/apis/EvaluateTemplateController';
   import {
+    getBaseStudentGraduateInfo,
     postStudentBaseStudentGraduate,
     putStudentBaseStudentGraduate,
   } from '/@/services/apis/BaseStudentGraduateController';
-  const okText = computed(() =>
-    unref(isBatch) ? (index.value < maxIndex.value ? '保存并下一个' : '保存') : '保存',
-  );
   const isUpdate = ref(true);
-  const modelRef = ref({});
-  const isBatch = ref(false);
+  const modelRef = ref<Recordable>({});
   const index = ref(0);
   const maxIndex = ref();
-  const dataList = ref<any[]>([]);
+  const dataList = ref<Recordable[]>([]);
+
+  const okText = computed(() => (index.value < maxIndex.value - 1 ? '保存并下一个' : '保存'));
+
   const emit = defineEmits(['success', 'register', 'cancel']);
   const { createMessage } = useMessage();
   const [registerForm, { validate, setFieldsValue, resetFields }] = useForm({
@@ -48,34 +47,34 @@
     showActionButtonGroup: false,
   });
 
-  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
+  const setFormData = async () => {
     resetFields();
-    maxIndex.value = data?.length;
-    isBatch.value = !!data?.isBatch;
-    setModalProps({ confirmLoading: false });
-    isUpdate.value = !!data?.isUpdate;
-    if (unref(isUpdate)) {
-      const resData = await getEvaluateTemplateInfo({ id: data.baseData.id });
+    const currentData = dataList.value[index.value];
+    isUpdate.value = !!currentData.id;
 
+    if (unref(isUpdate)) {
+      const resData = await getBaseStudentGraduateInfo({ id: currentData.id });
       modelRef.value = { ...resData };
       setFieldsValue({
         ...resData,
+        ...currentData,
       });
     } else {
-      if (isBatch.value) {
-        index.value = 0;
-        modelRef.value = { ...data.baseData[index.value] };
-        dataList.value = data.baseData;
-        setFieldsValue({
-          ...data.baseData[index.value],
-        });
-      } else {
-        modelRef.value = { ...data.baseData };
-        setFieldsValue({
-          ...data.baseData,
-        });
-      }
+      modelRef.value = { ...currentData };
+      setFieldsValue({
+        ...currentData,
+      });
     }
+  };
+
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
+    maxIndex.value = data.baseData.length;
+    dataList.value = [...data.baseData];
+    index.value = 0;
+
+    setModalProps({ confirmLoading: false });
+
+    await setFormData();
   });
 
   const getTitle = computed(() => (!unref(isUpdate) ? '新增毕业登记' : '编辑毕业登记'));
@@ -92,22 +91,9 @@
       }
 
       createMessage.success('操作成功');
-      if (unref(isBatch)) {
-        if (index.value < maxIndex.value - 1) {
-          index.value++;
-          modelRef.value = { ...dataList.value[index.value] };
-          resetFields();
-
-          setFieldsValue({
-            ...dataList.value[index.value],
-            status: values.status,
-            certificateDate: values.certificateDate,
-            leavingBedDate: values.leavingBedDate,
-          });
-        } else {
-          closeModal();
-          emit('cancel');
-        }
+      if (index.value < maxIndex.value - 1) {
+        index.value++;
+        await setFormData();
       } else {
         closeModal();
         emit('success');

+ 55 - 56
src/views/educational/graduate/index.vue

@@ -22,41 +22,35 @@
           修改信息
         </a-button>
         <a-button :disabled="!selectRows.length" type="primary" @click="handleEditBatch">
-          批量登记
+          毕业证登记
         </a-button>
       </template>
       <template #action="{ record }">
-        <div style="display: flex; justify-content: center">
-          <TableAction
-            :actions="[
-              {
-                label: '去向登记',
-                onClick: () => {
-                  regModal(true, record);
-                },
-                ifShow: record.a !== 0,
-              },
-              {
-                label: '查看',
-                onClick: () => {
-                  viewModal(true, record);
-                },
-                ifShow: record.a !== 0,
-              },
-              {
-                label: '修改',
-                onClick: handleEdit.bind(null, record, true),
-                ifShow: record.a === 0,
-              },
-            ]"
-          />
-        </div>
+        <TableAction
+          :actions="[
+            {
+              label: '去向登记',
+              onClick: handelRegister.bind(null, record),
+              ifShow: !!record.id,
+            },
+            {
+              label: '查看',
+              onClick: handelView.bind(null, record),
+              ifShow: !!record.id,
+            },
+            {
+              label: '毕业证登记',
+              onClick: handleEdit.bind(null, record, false),
+              ifShow: !record.id,
+            },
+          ]"
+        />
       </template>
     </BasicTable>
     <FormEdit @cancel="handleCancel" @register="registerModal" @success="handleSuccess" />
     <editInfo @cancel="handleCancel" @register="registerEditModal" @success="handleSuccess" />
-    <registration @register="registerReg" />
-    <View @register="viewReg" />
+    <registration @register="registerRegisterModal" @success="handleSuccess" />
+    <View @register="registerViewModal" />
   </PageWrapper>
 </template>
 <script lang="ts" setup>
@@ -80,11 +74,11 @@
   onMounted(async () => {
     treeData.value = (await getStudentmanagerTree({})) as unknown as TreeItem[];
   });
-  const index = ref(0);
+
   const [registerModal, { openModal }] = useModal();
   const [registerEditModal, { openModal: editModal }] = useModal();
-  const [viewReg, { openModal: viewModal }] = useModal();
-  const [registerReg, { openDrawer: regModal }] = useDrawer();
+  const [registerViewModal, { openModal: viewModal }] = useModal();
+  const [registerRegisterModal, { openDrawer }] = useDrawer();
   const selectRows = ref<any[]>([]);
   const [registerTable, { reload, getSelectRows, clearSelectedRowKeys }] = useTable({
     api: getBaseStudentGraduatePage,
@@ -99,26 +93,16 @@
     showTableSetting: true,
     bordered: true,
     canResize: true,
-    // actionColumn: {
-    //   width: 100,
-    //   title: '操作',
-    //   dataIndex: 'action',
-    //   slots: { customRender: 'action' },
-    //   fixed: 'right',
-    // },
-    // customRow: () => {
-    //   return {
-    //     onClick: () => {
-    //       return false;
-    //     },
-    //   };
-    // },
+    actionColumn: {
+      width: 150,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
     rowSelection: {
       // type: 'checkbox',
-      onSelectAll: (_: any, selectedRows: any) => {
-        selectRows.value = selectedRows;
-      },
-      onSelect: (_: any, __: any, selectedRows: any) => {
+      onChange: (_, selectedRows: any) => {
         selectRows.value = selectedRows;
       },
       getCheckboxProps: (record: any) => {
@@ -146,9 +130,11 @@
   const handleEdit = (record: any, isUpdate: boolean) => {
     openModal(true, {
       isUpdate: isUpdate,
-      baseData: {
-        ...record,
-      },
+      baseData: [
+        {
+          ...record,
+        },
+      ],
     });
   };
   const handleCancel = () => {
@@ -163,13 +149,26 @@
 
   const handleEditBatch = () => {
     const keys = getSelectRows();
-    index.value = 0;
     openModal(true, {
-      isBatch: true,
+      isUpdate: false,
+      baseData: [...keys],
+    });
+  };
+
+  const handelRegister = (record: any) => {
+    openDrawer(true, {
+      isUpdate: false,
       baseData: {
-        ...keys,
+        ...record,
+      },
+    });
+  };
+  const handelView = (record: any) => {
+    viewModal(true, {
+      isUpdate: false,
+      baseData: {
+        ...record,
       },
-      length: keys.length,
     });
   };
 </script>

+ 84 - 17
src/views/educational/graduate/registration.vue

@@ -1,25 +1,92 @@
+<template>
+  <BasicDrawer
+    @ok="handleSubmit"
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    :width="1002"
+    showFooter
+  >
+    <BasicForm @register="registerForm" />
+  </BasicDrawer>
+</template>
 <script setup lang="ts">
-  import BasicForm from '/@/components/Form/src/BasicForm.vue';
-  import { useForm } from '/@/components/Form';
-  import { registrationFormSchema } from '/@/views/educational/graduate/data.config';
-  import BasicDrawer from '/@/components/Drawer/src/BasicDrawer.vue';
-  import { useDrawerInner } from '/@/components/Drawer';
-  const [modalRef, { closeDrawer }] = useDrawerInner((data) => {});
-  const [formRef, { resetFields }] = useForm({
-    showActionButtonGroup: false,
+  import { ref, computed, unref } from 'vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
+  import { BasicForm, useForm } from '/@/components/Form/index';
+  import { registrationFormSchema } from './data.config';
+  import { Recordable } from 'vite-plugin-mock';
+  import {
+    getBaseStudentDevelopmentInfo,
+    postStudentBaseStudentDevelopment,
+  } from '/@/services/apis/BaseStudentDevelopmentController';
+
+  const isUpdate = ref(true);
+  const modelRef = ref<Recordable>({});
+  const emit = defineEmits(['success', 'register']);
+  const { createMessage } = useMessage();
+
+  const [registerForm, { validate, resetFields, setFieldsValue, updateSchema }] = useForm({
+    labelWidth: 100,
     schemas: registrationFormSchema,
-    layout: 'vertical',
+    showActionButtonGroup: false,
   });
-  const handleClose = () => {
+
+  const [registerModal, { closeDrawer, setDrawerProps }] = useDrawerInner(async (data) => {
     resetFields();
-    closeDrawer();
+    setDrawerProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    if (unref(isUpdate)) {
+      const resData = await getBaseStudentDevelopmentInfo({ id: data.baseData.id });
+      modelRef.value = { ...resData };
+      setFieldsValue({
+        ...resData,
+      });
+      updateSchema([
+        { field: 'name', ifShow: false },
+        { field: 'studentId', ifShow: false },
+        { field: 'phone', ifShow: false },
+        { field: 'certificateDate', ifShow: false },
+      ]);
+      setDrawerProps({ showFooter: false });
+    } else {
+      modelRef.value = { ...data.baseData };
+      setFieldsValue({ ...data.baseData });
+      updateSchema([
+        { field: 'name', ifShow: true },
+        { field: 'studentId', ifShow: true },
+        { field: 'phone', ifShow: true },
+        { field: 'certificateDate', ifShow: true },
+      ]);
+      setDrawerProps({ showFooter: true });
+    }
+  });
+
+  const getTitle = computed(() => (!unref(isUpdate) ? '学生去向登记' : '学生去向登记'));
+  const handleSubmit = async () => {
+    try {
+      const values = await validate();
+      setDrawerProps({ confirmLoading: true });
+      const postParams = {
+        userId: modelRef.value.userId,
+        baseStudentGraduateId: modelRef.value.id,
+      };
+      Object.assign(postParams, values);
+
+      // if (unref(isUpdate)) {
+      await postStudentBaseStudentDevelopment(postParams as API.AddBaseStudentDevelopmentDto);
+      // }
+
+      createMessage.success('操作成功');
+      closeDrawer();
+      emit('success');
+    } finally {
+      setDrawerProps({ confirmLoading: false });
+    }
   };
 </script>
 
-<template>
-  <BasicDrawer @close="handleClose" width="600px" @register="modalRef" title="学生去向登记">
-    <BasicForm @register="formRef" />
-  </BasicDrawer>
-</template>
-
 <style scoped lang="less"></style>

+ 102 - 40
src/views/educational/graduate/view.vue

@@ -1,57 +1,119 @@
+<template>
+  <BasicModal
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    :width="1002"
+    :footer="null"
+  >
+    <div class="h-full">
+      <div style="height: 160px">
+        <Descriptions title="基本信息" bordered :column="2">
+          <Descriptions.Item label="学生姓名">
+            {{ modelRef?.name }}
+          </Descriptions.Item>
+          <Descriptions.Item label="学号">
+            {{ modelRef?.studentId }}
+          </Descriptions.Item>
+          <Descriptions.Item label="手机号">
+            {{ modelRef?.phone }}
+          </Descriptions.Item>
+          <Descriptions.Item label="发证日期">
+            {{ modelRef?.certificateDate }}
+          </Descriptions.Item>
+        </Descriptions>
+      </div>
+      <div style="height: calc(100% - 160px)">
+        <BasicTable @register="registerTable" :searchInfo="searchInfo">
+          <template #action="{ record }">
+            <TableAction
+              :actions="[
+                {
+                  label: '查看',
+                  onClick: handelRegister.bind(null, record),
+                },
+              ]"
+            />
+          </template>
+        </BasicTable>
+      </div>
+    </div>
+    <registration @register="registerRegisterModal" />
+  </BasicModal>
+</template>
 <script setup lang="ts">
-  import BasicModal from '/@/components/Modal/src/BasicModal.vue';
-  import { useModalInner } from '/@/components/Modal';
+  import { ref, computed, unref, reactive } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { Recordable } from 'vite-plugin-mock';
+  import { BasicTable, TableAction, useTable } from '/@/components/Table';
+  import { getBaseStudentDevelopmentPage } from '/@/services/apis/BaseStudentDevelopmentController';
   import { Descriptions } from 'ant-design-vue';
-  import { ref } from 'vue';
-  import BasicTable from '/@/components/Table/src/BasicTable.vue';
-  import { useTable } from '/@/components/Table';
-  const DescriptionsItem = Descriptions.Item;
-  const dataInfo = ref<any>({});
-  const [tableRef, { reload }] = useTable({
+  import { enrollTypeOptions } from './data.config';
+  import registration from './registration.vue';
+  import { useDrawer } from '/@/components/Drawer';
+
+  const isUpdate = ref(true);
+  const modelRef = ref<Recordable>({});
+  defineEmits(['success', 'register']);
+  const searchInfo = reactive<Recordable>({});
+
+  const [registerRegisterModal, { openDrawer }] = useDrawer();
+
+  const [registerTable, { reload }] = useTable({
+    api: getBaseStudentDevelopmentPage,
     title: '去向登记记录',
-    bordered: true,
+    rowKey: 'id',
     columns: [
       {
         title: '登记时间',
-        dataIndex: 'createTime',
+        dataIndex: 'createDate',
+        align: 'left',
       },
       {
         title: '登记类型',
-        dataIndex: 'type',
-      },
-      {
-        title: '操作',
-        slots: {
-          customRender: 'action',
+        dataIndex: 'enrollType',
+        align: 'left',
+        width: 100,
+        customRender: ({ text }) => {
+          return enrollTypeOptions.filter((item) => item.value === text)[0]?.label;
         },
       },
     ],
+    useSearchForm: false,
+    showTableSetting: true,
+    bordered: true,
+    immediate: false,
+    canResize: true,
+    actionColumn: {
+      width: 100,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
+    resizeHeightOffset: 80,
   });
-  const [modalRef, { closeModal }] = useModalInner((data) => {
-    dataInfo.value = data;
+
+  const [registerModal, { setModalProps }] = useModalInner(async (data) => {
+    setModalProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    modelRef.value = { ...data.baseData };
+    searchInfo.baseStudentGraduateId = data.baseData.id;
+    reload();
   });
-</script>
 
-<template>
-  <BasicModal @register="modalRef" title="登记详情" width="600px" @close="closeModal">
-    <Descriptions title="基本信息" bordered :column="2">
-      <DescriptionsItem label="学生姓名">
-        {{ dataInfo?.name }}
-      </DescriptionsItem>
-      <DescriptionsItem label="学号">
-        {{ dataInfo?.studentId }}
-      </DescriptionsItem>
-      <DescriptionsItem label="手机号">
-        {{ dataInfo?.phone }}
-      </DescriptionsItem>
-      <DescriptionsItem label="毕业年月" />
-    </Descriptions>
-    <BasicTable @register="tableRef">
-      <template #action="{ record }">
-        <a-button type="link" @click="closeModal">详情</a-button>
-      </template>
-    </BasicTable>
-  </BasicModal>
-</template>
+  const getTitle = computed(() => (!unref(isUpdate) ? '查看' : '查看'));
+
+  const handelRegister = (record: any) => {
+    openDrawer(true, {
+      isUpdate: true,
+      baseData: {
+        ...record,
+      },
+    });
+  };
+</script>
 
 <style scoped lang="less"></style>