import http from '@/utils/http' import type { PerformanceDimension, PerformanceRule, DimensionQuery, RuleQuery } from './type' /** 维度相关 */ export function getDimensionList(params?: DimensionQuery) { return http.get('/performance-dimension/list', params) } export function getDimensionDetail(id: string) { return http.get(`/performance-dimension/${id}`) } export function addDimension(data: Partial) { return http.post('/performance-dimension', data) } export function updateDimension(id: string, data: Partial) { return http.put(`/performance-dimension/${id}`, data) } export function deleteDimension(id: string) { return http.del(`/performance-dimension/${id}`) } /** 细则相关 */ export function getRuleList(params?: RuleQuery) { return http.get('/performance-rule/list', params) } export function getRuleDetail(id: string) { return http.get(`/performance-rule/${id}`) } export function addRule(data: Partial) { return http.post('/performance-rule', data) } export function updateRule(id: string, data: Partial) { return http.put(`/performance-rule/${id}`, data) } export function deleteRule(id: string) { return http.del(`/performance-rule/${id}`) } // 我的绩效 export function getMyEvaluation() { return http.get('/performance-evaluation/my') }