From cc65882b8db32d8307dde240ef0a5f9c0a64eba5 Mon Sep 17 00:00:00 2001 From: chabai <14799297+dhasjklhdfjkasfbhfasfj@user.noreply.gitee.com> Date: Thu, 31 Jul 2025 17:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=B6=E5=BA=A6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=A8=A1=E5=9D=97=EF=BC=8C=E6=96=B0=E5=BB=BA=E5=88=B6?= =?UTF-8?q?=E5=BA=A6=E6=8F=90=E6=A1=88=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/regulation/index.ts | 13 +- src/apis/regulation/type.ts | 8 +- src/router/route.ts | 6 + src/views/regulation/confirm.vue | 419 +++++------ src/views/regulation/index.vue | 2 + src/views/regulation/proposal/index.vue | 955 ++++++++++++++++++++++++ src/views/regulation/repository.vue | 151 +++- src/views/regulation/type/index.vue | 145 +++- 8 files changed, 1409 insertions(+), 290 deletions(-) create mode 100644 src/views/regulation/proposal/index.vue diff --git a/src/apis/regulation/index.ts b/src/apis/regulation/index.ts index 755c245..4ec6810 100644 --- a/src/apis/regulation/index.ts +++ b/src/apis/regulation/index.ts @@ -23,6 +23,7 @@ export const regulationApi = { scope: string level: string remark?: string + createBy?: string }) => { return http.post('/regulation/proposal', data) }, @@ -32,17 +33,22 @@ export const regulationApi = { return http.put(`/regulation/proposal/${regulationId}`, data) }, + // 公示提案 + publishProposal: (regulationId: string) => { + return http.post(`/regulation/proposal/${regulationId}/publish`) + }, + // 删除制度提案 deleteProposal: (regulationId: string) => { return http.del(`/regulation/proposal/${regulationId}`) }, - // 发布制度 + // 公示制度 publishRegulation: (regulationId: string) => { - return http.post(`/regulation/${regulationId}/publish`) + return http.post(`/regulation/${regulationId}/approve`) }, - // 获取已发布制度列表 + // 获取已公示制度列表 getPublishedRegulationList: (params: { page: number size: number @@ -61,6 +67,7 @@ export const regulationApi = { page?: number size?: number typeName?: string + isEnabled?: string remark?: string }) => { return http.get('/regulation/types', params) diff --git a/src/apis/regulation/type.ts b/src/apis/regulation/type.ts index fde8506..9e1f7a7 100644 --- a/src/apis/regulation/type.ts +++ b/src/apis/regulation/type.ts @@ -1,11 +1,8 @@ // 制度状态枚举 export enum RegulationStatus { DRAFT = 'DRAFT', // 草稿 - VOTING = 'VOTING', // 投票中 APPROVED = 'APPROVED', // 已通过 - REJECTED = 'REJECTED', // 已否决 - PUBLISHED = 'PUBLISHED', // 已发布 - ARCHIVED = 'ARCHIVED' // 已归档 + PUBLISHED = 'PUBLISHED', // 已公示 } // 制度级别枚举 @@ -22,7 +19,7 @@ export interface Regulation { content: string regulationType: string status: RegulationStatus - publishTime: string + publishTime: string // 公示时间 effectiveTime: string expireTime: string scope: string @@ -47,6 +44,7 @@ export interface CreateProposalRequest { scope: string level: RegulationLevel remark?: string + createBy?: string } // 分页参数接口 diff --git a/src/router/route.ts b/src/router/route.ts index 718c90e..25d0cf9 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -45,6 +45,12 @@ export const systemRoutes: RouteRecordRaw[] = [ component: () => import('@/views/regulation/confirm.vue'), meta: { title: '制度公示', icon: 'workflow', hidden: false }, }, + { + path: '/regulation/proposal', + name: 'RegulationProposal', + component: () => import('@/views/regulation/proposal/index.vue'), + meta: { title: '制度提案', icon: 'edit', hidden: false }, + }, { path: '/regulation/type', name: 'RegulationType', diff --git a/src/views/regulation/confirm.vue b/src/views/regulation/confirm.vue index ba330f5..53d4244 100644 --- a/src/views/regulation/confirm.vue +++ b/src/views/regulation/confirm.vue @@ -1,14 +1,73 @@