import request from '@/utils/request'

import { business} from '@/api/index'

//省级任务考查询(省考核办)列表
export function assessmentList(data, page) {
    return request({
        url: `${business}provinceTask/findByPage/${page.page}/${page.size}`,
        method: 'post',
        data: data
    })
}
//结果汇总查看
export function collectList(data, page) {
    return request({
        url: `${business}provinceTask/findByHzPage/${page.page}/${page.size}`,
        method: 'post',
        data: data
    })
}
//获取省市
export function getCity(data){
    return request({
        url: `${business}respUser/findDataShiTree`,
        method: 'get',
        data: data
    })
}
//明细列表
export function getDetailedList(data, page){
    return request({
        url: `${business}provinceTask/findCityByPage/${page.page}/${page.size}`,
        method: 'post',
        data: data
    })
}
//提交
export function submit(data){
    return request({
        url: `${business}provinceTask/publish`,
        method: 'post',
        data: data
    })
}
//导出
export function daochu(data){
    return request({
        url: `${business}examinationExcel/exportCityExcel/${data.year}/${data.areaCode}/${data.bizRespResponsibilityId}`,
        method: 'get',
    })
}
//驳回
export function reject(data){
    return request({
        url: `${business}provinceTask/saveReappraisal/${data.taskId}/${data.shiAreaCode}`,
        method: 'get',
        data: data
    })
}
//明细详情
export function detail(data){
    return request({
        url: `${business}provinceTask/findByProvinceQtbmAndPhbm/${data.taskId}/${data.shiAreaCode}`,
        method: 'get',
        data: data
    })
}
//盟市明细详情
export function detailZS(data){
    return request({
        url: `${business}respScoreInput/findByQtbmAndPhbmAndZpbm/${data.taskId}/${data.shiAreaCode}`,
        method: 'get',
        data: data
    })
}
/**
 *粮食安全行政盟市长责任制-----考核评分权重-----查询可选年分
 * @param {根据数据id} id
 */
export function responsibilityFindByYear(type) {
    return request({
      url: `${business}scoringWeight/findByYear/${type}`,
    method: 'get',
  })
}
//考核起止时间
export function findYear(year,status) {
    return request({
        url: `${business}scoringWeight/findByYearAndStatus/${year}/${status}`,
        method: 'get',
    })
}
//获取列表
export function getTabList(data,params) {
    return request({
        url: `${business}cityZpbm/findByPage/${params.page}/${params.size}`,
        method: 'post',
        data: data
    })
}
//详情信息接口
export function getdetailList(id) {
    return request({
        url: `${business}provinceQtbm/findById/${id}`,
        method: 'get'
    })
}
//详情信息接口
export function shijikhxx(params) {
    return request({
      url: `${business}respScoreInput/findByQtbmAndPhbmAndZpbm/${params.taskId}/${params.areaCode}`,
      method: 'get'
    })
  }
//   考核结果查看（市局)---抽查分发
export function selCheck(data) {
    return request({
        url: `${business}provinceTask/publishCcFf`,
        method: 'post',
        data: data
    })
}
//市级部门获取
export function cityDeptName(code) {
    return request({
        url: `${business}respUser/findByDeptName/${code}`,
        method: 'post',
    })
}

export function assessmentTaskQuerySend(data) {
    return request({
        url: `${business}respScoreInput/publishByArea`,
        method: 'post',
        data: data
    })
}



