import type { Component } from 'vue'
import { IzCustomlevel, IzCustomname, IzCustomtype, IzProductVue, IzProjectVue, IzProjecttype, IzShowVue, IzfirmVue, IztaskrromVue, IztaskstatusVue, IzvisitproVue, PictureDownloadVue, PictureTypeVue, PictureUploadVue, PlaceHolderVue, PlanVue, ReportUserVue, SimilarityVue, TimeVue } from '@/views/home/aside/comp/items'

export interface AsideEntity {
  label: string
  defaultValue?: any
  isDefaultFilter?: boolean
  inFilterList?: boolean
  key: string
  component: Component
}

// 客户端配置
export const asideMap: Recordable<AsideEntity> = {
  izimgdownload: {
    label: '图片下载',
    defaultValue: true,
    isDefaultFilter: false,
    key: 'izimgdownload',
    component: PictureDownloadVue,
    inFilterList: false,
  },
  izupuser: {
    label: '提报人',
    defaultValue: null,
    isDefaultFilter: true,
    key: 'izupuser',
    component: ReportUserVue,
  },
  izproject: {
    label: '所属项目',
    defaultValue: null,
    isDefaultFilter: true,
    key: 'izproject',
    component: IzProjectVue,
  },
  izplan: {
    label: '所属计划',
    defaultValue: null,
    isDefaultFilter: true,
    key: 'izplan',
    component: PlanVue,
  },
  izsimilarity: {
    label: '相似度阈值',
    defaultValue: [30, 95],
    isDefaultFilter: true,
    key: 'izsimilarity',
    component: SimilarityVue,
  },
  izyear: {
    label: '年份',
    defaultValue: [1704038400000, Date.now()],
    isDefaultFilter: false,
    key: 'izyear',
    component: TimeVue,
  },
  izpicturetype: {
    label: '图片类型',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izpicturetype',
    component: PictureTypeVue,
  },
  izupload: {
    label: '图片上传',
    defaultValue: '',
    isDefaultFilter: false,
    key: 'izupload',
    component: PictureUploadVue,
  },
  izcustomtype: {
    label: '客户类型',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izcustomtype',
    component: IzCustomtype,
  },
  izcustomlevel: {
    label: '客户级别',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izcustomlevel',
    component: IzCustomlevel,
  },
  izcustomname: {
    label: '客户名称',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izcustomname',
    component: IzCustomname,
  },
  izprojecttype: {
    label: '项目类型',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izprojecttype',
    component: IzProjecttype,
  },
  iztaskrrom: {
    label: '任务来源',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'iztaskrrom',
    component: IztaskrromVue,
  },
  iztaskstatus: {
    label: '任务状态',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'iztaskstatus',
    component: IztaskstatusVue,
  },
  izvisitpro: {
    label: '拜访省份',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izvisitpro',
    component: IzvisitproVue,
  },
  izvisitcity: {
    label: '发布地区',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izvisitcity',
    component: PlaceHolderVue,
  },
  izfirm: {
    label: '厂商',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izfirm',
    component: IzfirmVue,
  },
  izproductname: {
    label: '产品名称',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izproductname',
    component: IzProductVue,
  },
  izdesc: {
    label: 'izdesc',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izdesc',
    component: PlaceHolderVue,
    inFilterList: false,
  },
  izsearchmanager: {
    label: 'izsearchmanager',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izsearchmanager',
    component: PlaceHolderVue,
    inFilterList: false,
  },
  izshow: {
    label: '分类',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izshow',
    component: IzShowVue,
  },
  izsearch: {
    label: 'izsearch',
    defaultValue: null,
    isDefaultFilter: false,
    key: 'izsearch',
    component: PlaceHolderVue,
    inFilterList: false,
  },
}
