You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
1.2 KiB

import request from '@/utils/request'
export function listPointsRules(params) {
return request({ url: '/business/points/rule/list', method: 'get', params })
}
export function togglePointsRule(id, enabled) {
return request({
url: '/business/points/rule/toggleEnabled',
method: 'post',
params: { id, enabled }
})
}
export function deletePointsRule(id) {
return request({ url: '/business/points/rule/deleteById', method: 'get', params: { id }})
}
export function getPointsRule(id) {
return request({ url: '/business/points/rule/info', method: 'get', params: { id }})
}
// 根据隐患等级编码(general/major/critical)查询该等级下的根规则与子档位列表;可传 deptId 指定厂区
export function getRulesByLevel(params) {
return request({ url: '/business/points/rule/rulesByLevel', method: 'get', params })
}
// 积分试算:按厂区 + 隐患等级编码 + 档位模拟计算积分,返回 calculatedPoints
export function trialCalculatePoints(params) {
return request({ url: '/business/points/rule/trialCalculate', method: 'get', params })
}
export function addPointsRule(data) {
return request({ url: '/business/points/rule/add', method: 'post', data })
}