import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
export const showDrawBack = (item, showAll = false) => {
  if(showAll){
    if(item.is_shijibohui > 0 || item.is_drawback == 1){
      return true
    }else{
      return false
    }
  }
  let level = userStore.getUserInfo.orgMaxLevel
  if((level == '0' && item.is_shijibohui > 0) || (level != '0' && (item.is_shijibohui > 0 || item.is_drawback == 1))){
    return true
  }else {
    return false
  }
}
export const drawBackSpan = (item, showAll = false) => {
  let level = userStore.getUserInfo.orgMaxLevel
  let title = ''
  if(item.is_shijibohui){
    title = '市'
  }
  if(item.is_drawback && ((level != '0') || showAll)){
    if(title != ''){
      title = title + ','
    }
    title = title + '县'
  }
  return `${title} 驳回`
}
export const illegalminingDrawBackSpan = (item, showAll = false) => {
  let level = userStore.getUserInfo.orgMaxLevel
  let title = ''
  if(item.is_shijibohui > 0){
    title = `市 (${item.shijibohui_count})`
  }
  if(item.is_drawback && ((level != '0') || showAll)){
    if(title != ''){
      title = title + ','
    }
    title = title + '县'
  }
  return `${title} 驳回`
}
export const SubjectKeyList = {
  '0000002': 'Subject_XCSJ', //巡查审计
  '0000001': 'Subject_WFYD', // 违法用地
  '100001': 'Subject_FFCK', //非法采矿
  '违法用地(卫片)': 'Subject_WPWF',
  '0000003': 'Subject_WPCK', //非法采矿(卫片)
  '0000004': 'Subject_GDFLH', //耕地非粮化
  '0000005': 'Subject_ZDWT1', //重点问题I类
  '0000006': 'Subject_ZDWT2', //重点问题II类
  '0000007': 'Subject_STBHHXJG',  //生态保护红线监管
  '0000008': 'Subject_STXF',  //生态修复
}