import request from '@/utils/request'

//便捷菜单列表
export function quickList() {
    return request({
        url: '/dashboard/quick/access/list',
        method: 'get',
    })
}
//预警数据
export function warnList() {
    return request({
        url: '/dashboard/warn/list',
        method: 'get',
    })
}
export function warnRespList(query) {
    return request({
        url: '/dashboard/warnResp/list',
        method: 'get',
        params: query
    })
}
//预警列表
export function loanWarnList(query) {
    return request({
        url: '/dashboard/loan/warn/list',
        method: 'get',
        params: query
    })
}
//快速访问下拉框
export function quickSelect(query) {
    return request({
        url: '/dashboard/quick/access/select',
        method: 'get',

    })
}

//更新快速访问下拉框
export function updateQuickSelect(data) {
    return request({
        url: `/dashboard/quick/access/update`,
        method: 'post',
        data: data,
    })
}
//总行待办事项列表
export function headList(query) {
    return request({
        url: `/dashboard/campaign/head`,
        method: 'get',
        params: query
    })
}
//支行待办事项列表
export function branchList(query) {
    return request({
        url: `/dashboard/campaign/branch`,
        method: 'get',
        params: query
    })
}
//支行待办事项列表
export function managerList(query) {
    return request({
        url: `/dashboard/campaign/manager`,
        method: 'get',
        params: query
    })
}

//业务提醒接口
export function getReminder() {
    return request({
        url: `/dashboard/index`,
        method: 'get',

    })
}
//版本更新信息
export function getNotice(query) {
    return request({
        url: `/dashboard/notice`,
        method: 'get',
        params: query
    })
}

//消息中心列表
export function getNoticeCenter(query) {
    return request({
        url: `/notification/list`,
        method: 'get',
        params: query
    })
}

//消息中心已读
export function noticeHasReady(query) {
    return request({
        url: `/notification/update`,
        method: 'post',
        params: query
    })
}

//外部链接
export function getExternalUrl(query) {
    return request({
        url: `/dashboard/externalUrl`,
        method: 'get',
        params: query
    })
}

//岗位下拉接口
export function systemPostOptionselect(query) {
    return request({
        url: `/system/post/optionselect`,
        method: 'get',
        params: query
    })
}
//工作类型下拉接口
export function systemDictDataType(distType) {
    return request({
        url: `/system/dict/data/type/${distType}`,
        method: 'get'
    })
}
//新增工作清单模板
export function workTemplateInsert(data) {
    return request({
        url: `/work/template/insert`,
        method: 'post',
        data: data,
    })
}
//查询工作清单模板列表
export function workTemplateList(query) {
    return request({
        url: `/work/template/list`,
        method: 'get',
        params: query
    })
}
//修改工作清单模板
export function workTemplateEdit(data) {
    return request({
        url: `/work/template/edit`,
        method: 'post',
        data: data,
    })
}
//删除工作清单模板
export function workTemplateDelete(data) {
    return request({
        url: `/work/template/delete`,
        method: 'post',
        data: data,
    })
}
//查询我的工作清单（管理员）
export function workRecordList(query) {
    return request({
        url: `/work/record/list`,
        method: 'get',
        params: query
    })
}
//查询我的工作清单
export function workRecordListAll(query) {
    return request({
        url: `/work/record/allList`,
        method: 'get',
        params: query
    })
}
//查询工作清单完成情况
export function workRecordCompleteStatus(query) {
    return request({
        url: `/work/record/complete/status`,
        method: 'get',
        params: query
    })
}

//查询预警信息(管理员)
export function workRecordAlterList(query) {
    return request({
        url: `/work/record/alter/list`,
        method: 'get',
        params: query
    })
}

//查询我的预警工作清单
export function warningworkRecordList(query) {
    return request({
        url: `/work/record/alter/allList`,
        method: 'get',
        params: query
    })
}

// 查询预警转发元数据
export function getAlterForwardMeta(query) {
    return request({
        url: `/work/record/alter/forward/meta`,
        method: 'get',
        params: query
    })
}

// 预警转发
export function forwardAlter(data) {
    return request({
        url: `/work/record/alter/forward`,
        method: 'post',
        data
    })
}

//查询二次走访列表
export function appointmentSecondVisitList(query) {
    return request({
        url: `/appointment/secondVisit/list`,
        method: 'get',
        params: query
    })
}

//查询资源协助申请列表
export function appointmentResourceAssistList(query) {
    return request({
        url: `/appointment/resourceAssist/list`,
        method: 'get',
        params: query
    })
}


//走访资源提醒编辑
export function resourceAssistEdit(data) {
    return request({
        url: `/appointment/resourceAssist/feedback`,
        method: 'post',
        data: data,
    })
}

// 预警任务已读
export function recordread(data) {
    return request({
      url: '/work/record/read',
      method: 'post',
      data
    })
  }

// 预警任务
export function warningCardNum(query) {
    return request({
      url: '/work/record/alter/count',
      method: 'get',
      params: query
    })
  }

// 查询所有预警类型
export function getAlterTypes() {
    return request({
      url: '/work/record/alter/types',
      method: 'get'
    })
  }
