import request from '@/utils/request'

/**
 * @description: 乐谱标签列表
 */
export const musicTagPage = (params: object) => {
  return request({
    url: '/cbs-app/musicTag/page',
    method: 'post',
    data: params
  } as any)
}

/**
 * @description: 乐谱标签添加
 */
export const musicTagSave = (params: object) => {
  return request({
    url: '/cbs-app/musicTag/save',
    method: 'post',
    data: params
  } as any)
}

/**
 * @description: 乐谱标签更新
 */
export const musicTagUpdate = (params: object) => {
  return request({
    url: '/cbs-app/musicTag/update',
    method: 'post',
    data: params
  } as any)
}

/**
 * @description: 乐谱标签删除
 */
export const musicTagRemove = (params: object) => {
  return request({
    url: '/cbs-app/musicTag/remove',
    method: 'post',
    data: params,
    requestType: 'form'
  } as any)
}

/**
 * @description: 乐谱标签启用/停用
 */
export const musicTagState = (params: any) => {
  return request({
    url: '/cbs-app/musicTag/state/' + params.id,
    method: 'post',
    requestType: 'form'
  } as any)
}

/**
 * @description: 乐谱列表
 */
export const musicSheetPage = (params: object) => {
  return request({
    url: '/cbs-app/musicSheet/page',
    method: 'post',
    data: params
  } as any)
}

/**
 * @description: 乐谱添加
 */
export const musicSheetSave = (params: object) => {
  return request({
    url: '/cbs-app/musicSheet/save',
    method: 'post',
    data: params
  } as any)
}

/**
 * @description: 乐谱更新
 */
export const musicSheetUpdate = (params: object) => {
  return request({
    url: '/cbs-app/musicSheet/update',
    method: 'post',
    data: params
  } as any)
}

/**
 * @description: 乐谱删除
 */
export const musicSheetRemove = (params: object) => {
  return request({
    url: '/cbs-app/musicSheet/remove',
    method: 'post',
    data: params,
    requestType: 'form'
  } as any)
}

/**
 * @description: 乐谱详情
 */
export const musicSheetDetail = (params?: any) => {
  return request({
    url: '/cbs-app/musicSheet/detail/' + params.id,
    method: 'get',
    requestType: 'form'
  } as any)
}


/**
 * @description: 乐谱-启用-停用
 */
export const musicSheetStatusList = (params?: any) => {
  return request({
    url: '/cbs-app/musicSheet/statusList',
    method: 'post',
    data: params
  } as any)
}


//---


/**
 * @description: 曲谱分类
 * @param params
 */
export const musicSheetCategoriesPage = (params: object) => {
  return request({
    url: '/cbs-app/musicSheetCategories/page',
    method: 'post',
    data: params
  } as any)
}
/**
 * @description: 曲谱分类树
 * @param params
 */
export const musicSheetCategoriesQueryTree = (params: object) => {
  return request({
    url: '/cbs-app/musicSheetCategories/queryTree',
    method: 'get',
    data: params,
    params
  } as any)
}

/**
 * @description: 曲谱分类添加
 */
export const musicSheetCategoriesSave = (params: object) => {
  return request({
    url: '/cbs-app/musicSheetCategories/save',
    method: 'post',
    data: params
  } as any)
}

/**
 * @description: 曲谱分类更新
 */
export const musicSheetCategoriesUpdate = (params: object) => {
  return request({
    url: '/cbs-app/musicSheetCategories/update',
    method: 'post',
    data: params
  } as any)
}

/**
 * @description: 曲谱分类删除
 */
export const musicSheetCategoriesRemove = (id: object) => {
  return request({
    url: '/cbs-app/musicSheetCategories/remove?id=' + id,
    method: 'post',
  } as any)
}

/**
 *  @description: 曲谱分类详情
 * @param params
 */
export const musicSheetCategoriesDetail = (params?: any) => {
  return request({
    url: '/cbs-app/musicSheetCategories/detail/' + params.id,
    method: 'get',
    requestType: 'form'
  } as any)
}


/**
 *  @description: 曲谱分类详情
 * @param params
 */
export const musicSheetCategoriesChangeStatus = (params?: any) => {
  return request({
    url: '/cbs-app/musicSheetCategories/detail/' + params.id,
    method: 'get',
    requestType: 'form'
  } as any)
}

/**
 *  @description: 所属人列表
 * @param params
 */
export const musicSheetApplicationOwnerList = (params?: any) => {
  return request({
    url: '/cbs-app/musicSheetApplicationExtend/ownerList',
    method: 'post',
    data: params
  } as any)
}


/**
 *  @description: 适用项目保存
 * @param params
 */
export const musicSheetApplicationExtendSave = (params?: any) => {
  return request({
    url: '/cbs-app/musicSheetApplicationExtend/save',
    method: 'post',
    data: params
  } as any)
}

/**
 *  @description: 适用项目分类列表
 * @param params
 */
export const musicSheetApplicationExtendCategoryList = (params?: any) => {
  return request({
    url: '/cbs-app/musicSheetApplicationExtend/categoryList',
    method: 'post',
    data: params
  } as any)
}
/**
 *  @description: 查询曲目适用项目的扩展信息
 * @param params
 */
export const musicSheetApplicationExtendCategoryApplicationExtendInfo = (params?: any) => {
  return request({
    url: '/cbs-app/musicSheetApplicationExtend/applicationExtendInfo',
    method: 'post',
    data: params
  } as any)
}
