import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { auditCommonVO, commentManageQuery } from '@/api/business/commentManage/types';
import { Doctoroption } from '../caseBaseInfo/types';

/**
 * 查询点评管理列表
 * @param query
 * @returns {*}
 */

export const listCommentManageInfo = (query?: commentManageQuery): AxiosPromise<auditCommonVO[]> => {
  return request({
    url: '/business/caseBaseInfo/commentList',
    method: 'get',
    params: query
  });
};


/**
 * 修改点评内容
 * @param data
 */
export const updateCommentContent = (data: any) => {
  return request({
    url: '/business/caseBaseInfo/comment',
    method: 'put',
    data: data
  });
};

/**
 * 查询分配点评专家列表
 */
export const allocationListExpert = (): AxiosPromise<Doctoroption[]> => {
  return request({
    url: '/business/caseBaseInfo/expertList',
    method: 'get'
  });
};

/**
 * 分配专家
 * @param data
 */
export const updateAssignExpert = (data: any) => {
  return request({
    url: '/business/caseBaseInfo/expertAllocation',
    method: 'put',
    data: data
  });
};

