From 35af6320109f648df8245c3a0bec88147092f57d Mon Sep 17 00:00:00 2001 From: tangweijie <877588133@qq.com> Date: Mon, 12 Jan 2026 22:55:52 +0800 Subject: [PATCH] feat(prison): Add prisoner management module - Add prisoner list page with search, pagination, and table display - Add prisoner form dialog with create/update functionality - Add API module for prisoner CRUD operations - Add prison-related enums (supervision level, risk level, status, education) - Add dict types for prison module dropdown options - Enable multi-tenant support in frontend configuration Co-Authored-By: Claude Opus 4.5 --- .env.local | 5 +- src/api/prison/prisoner/index.ts | 62 ++++ src/utils/constants.ts | 44 +++ src/utils/dict.ts | 8 +- src/views/prison/prisoner/PrisonerForm.vue | 319 +++++++++++++++++++++ src/views/prison/prisoner/index.vue | 299 +++++++++++++++++++ 6 files changed, 735 insertions(+), 2 deletions(-) create mode 100644 src/api/prison/prisoner/index.ts create mode 100644 src/views/prison/prisoner/PrisonerForm.vue create mode 100644 src/views/prison/prisoner/index.vue diff --git a/.env.local b/.env.local index 35765584..14cd1e33 100644 --- a/.env.local +++ b/.env.local @@ -3,7 +3,7 @@ NODE_ENV=development VITE_DEV=true -# 请求路径 +# 请求路径 - 本地后端服务地址 VITE_BASE_URL='http://localhost:48080' # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 @@ -12,6 +12,9 @@ VITE_UPLOAD_TYPE=server # 接口地址 VITE_API_URL=/admin-api +# 多租户开关 +VITE_APP_TENANT_ENABLE=true + # 是否删除debugger VITE_DROP_DEBUGGER=false diff --git a/src/api/prison/prisoner/index.ts b/src/api/prison/prisoner/index.ts new file mode 100644 index 00000000..08d2dcc6 --- /dev/null +++ b/src/api/prison/prisoner/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +export interface PrisonerVO { + id: number + prisonerNo: string + name: string + gender: number + birthday: string + idCard: string + ethnicity: string + nativePlace: string + education: number + occupation: string + address: string + crime: string + sentenceYears: number + sentenceMonths: number + imprisonmentDate: string + releaseDate: string + supervisionLevel: number + riskLevel: number + prisonAreaId: number + prisonCellId: number + status: number + remark: string + createTime: Date +} + +// 服刑人员分页查询 +export const getPrisonerPage = (params: PageParam) => { + return request.get({ url: '/prison/prisoner/page', params }) +} + +// 服刑人员详情 +export const getPrisoner = (id: number) => { + return request.get({ url: '/prison/prisoner/get?id=' + id }) +} + +// 新增服刑人员 +export const createPrisoner = (data: PrisonerVO) => { + return request.post({ url: '/prison/prisoner/create', data }) +} + +// 修改服刑人员 +export const updatePrisoner = (data: PrisonerVO) => { + return request.put({ url: '/prison/prisoner/update', data }) +} + +// 删除服刑人员 +export const deletePrisoner = (id: number) => { + return request.delete({ url: '/prison/prisoner/delete?id=' + id }) +} + +// 批量删除服刑人员 +export const deletePrisonerList = (ids: number[]) => { + return request.delete({ url: '/prison/prisoner/delete-list', params: { ids: ids.join(',') } }) +} + +// 导出服刑人员 +export const exportPrisoner = (params) => { + return request.download({ url: '/prison/prisoner/export-excel', params }) +} diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 91e18272..626cf873 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -463,3 +463,47 @@ export const BpmAutoApproveType = { APPROVE_ALL: 1, // 仅审批一次,后续重复的审批节点均自动通过 APPROVE_SEQUENT: 2 // 仅针对连续审批的节点自动通过 } + +// ========== PRISON - 监狱管理模块 ========== +/** + * 监管等级枚举 + */ +export const PrisonSupervisionLevelEnum = { + STRICT: 1, // 严管级 + NORMAL: 2, // 普管级 + RELAXED: 3 // 宽管级 +} + +/** + * 风险等级枚举 + */ +export const PrisonRiskLevelEnum = { + LOW: 1, // 低风险 + MEDIUM: 2, // 中风险 + HIGH: 3, // 高风险 + EXTREME: 4 // 极高风险 +} + +/** + * 罪犯状态枚举 + */ +export const PrisonerStatusEnum = { + IMPRISONED: 1, // 在押 + RELEASED: 2, // 已释放 + DECEASED: 3, // 已死亡 + PAROLED: 4 // 假释 +} + +/** + * 文化程度枚举 + */ +export const PrisonEducationEnum = { + PRIMARY: 1, // 小学 + MIDDLE: 2, // 初中 + HIGH: 3, // 高中 + TECHNICAL: 4, // 中专 + JUNIOR_COLLEGE: 5, // 大专 + UNDERGRADUATE: 6, // 本科 + MASTER: 7, // 硕士 + DOCTOR: 8 // 博士 +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index b4f0c587..5f9f3c62 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -247,5 +247,11 @@ export enum DICT_TYPE { IOT_ALERT_RECEIVE_TYPE = 'iot_alert_receive_type', // IoT 告警接收类型 IOT_OTA_TASK_DEVICE_SCOPE = 'iot_ota_task_device_scope', // IoT OTA任务设备范围 IOT_OTA_TASK_STATUS = 'iot_ota_task_status', // IoT OTA 任务状态 - IOT_OTA_TASK_RECORD_STATUS = 'iot_ota_task_record_status' // IoT OTA 记录状态 + IOT_OTA_TASK_RECORD_STATUS = 'iot_ota_task_record_status', // IoT OTA 记录状态 + + // ========== PRISON - 监狱管理模块 ========== + PRISON_SUPERVISION_LEVEL = 'prison_supervision_level', // 监管等级 + PRISON_RISK_LEVEL = 'prison_risk_level', // 风险等级 + PRISONER_STATUS = 'prisoner_status', // 罪犯状态 + PRISON_EDUCATION = 'prison_education' // 文化程度 } diff --git a/src/views/prison/prisoner/PrisonerForm.vue b/src/views/prison/prisoner/PrisonerForm.vue new file mode 100644 index 00000000..9250b651 --- /dev/null +++ b/src/views/prison/prisoner/PrisonerForm.vue @@ -0,0 +1,319 @@ + + + diff --git a/src/views/prison/prisoner/index.vue b/src/views/prison/prisoner/index.vue new file mode 100644 index 00000000..b5f87c6d --- /dev/null +++ b/src/views/prison/prisoner/index.vue @@ -0,0 +1,299 @@ + + +