// 价格驱动
import http from "@/api/http.js"


/**
 * 分类列表
 * @returns 
 */
export const classifyList = () => {
  return http.get('/yb/price_driven/permission_tree')
}

/**
 * 驱动报告详情
 * @param {ChartPermissionId} params 
 * @returns 
 */
export const reportDetail = params => {
  return http.get('/yb/price_driven/detail',params)
}

/**
 * 更新内容
 * @param {} params
 * "ChartPermissionId": 1,
  "MainVariable": "这是关键变量",
  "CoreDrivenType": 0,
  "CoreDrivenContent": "这是核心驱动内容",
  "CoreContent": "这是核心内容2",
  "LastUpdateAdminId": 66,
  "LastUpdateAdminName": "王沛" 
 */
export const saveReport = params => {
  return http.post('/yb/price_driven/update',params)
}

/**
 * 开启/关闭分类
 * @param {*} params 
 * "ChartPermissionId": 1,
    "PriceDrivenState": 1
 * @returns 
 */
export const updateState = params => {
  return http.post('/yb/price_driven/switch_permission_state',params)
}

/**
 * 推送模板消息 PriceDrivenId
 * @returns 
 */
export const pushTemplateMessage = params => {
  return http.post('/yb/price_driven/send_template_msg',params)
}

/**
 * 推送客户群
 * @param {PriceDrivenId} params 
 * @returns 
 */
export const pushGroupMessage= params => {
  return http.post('/yb/price_driven/send_ths_msg',params)
}