import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
export const showDrawBack = (item, showAll = false) => {
  if(showAll){
    if(item.is_shijibohui == 1 || item.is_drawback == 1){
      return true
    }else{
      return false
    }
  }
  let level = userStore.getUserInfo.orgMaxLevel
  if((level == '0' && item.is_shijibohui == 1) || (level != '0' && (item.is_shijibohui == 1 || 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} 驳回`
}