Industrial-image-management.../src/apis/regulation/index.ts

58 lines
1.3 KiB
TypeScript
Raw Normal View History

2025-07-29 20:12:55 +08:00
import http from '@/utils/http'
// 制度管理API接口
export const regulationApi = {
// 获取制度列表
getRegulationList: (params: {
page: number
size: number
}) => {
return http.get('/regulation', params)
},
// 获取制度详情
getRegulationDetail: (regulationId: string) => {
return http.get(`/regulation/${regulationId}`)
},
// 创建制度提案
createProposal: (data: {
title: string
content: string
regulationType: string
scope: string
level: string
remark?: string
}) => {
return http.post('/regulation/proposal', data)
},
// 更新制度提案
updateProposal: (regulationId: string, data: any) => {
return http.put(`/regulation/proposal/${regulationId}`, data)
},
// 删除制度提案
deleteProposal: (regulationId: string) => {
return http.del(`/regulation/proposal/${regulationId}`)
},
// 发布制度
publishRegulation: (regulationId: string) => {
return http.post(`/regulation/${regulationId}/publish`)
},
// 获取已发布制度列表
getPublishedRegulationList: (params: {
page: number
size: number
status: string
2025-07-29 20:12:55 +08:00
}) => {
return http.get('/regulation', params)
2025-07-29 20:12:55 +08:00
},
// 确认制度知晓
confirmRegulation: (regulationId: string) => {
return http.post(`/regulation/${regulationId}/confirm`)
2025-07-29 20:12:55 +08:00
}
}