/* eslint-disable */
const isDev = process.env.NODE_ENV === 'development';
/**
 * ip 200 fileAddress为固定值
 * ip 200 fileAddressEbc /xlyReport
 */
const API = process.env.API;

const bHttps = false;
export const webSite = {
  faceAddress: isDev ? '//118.178.19.35:8088/xlyFace' : '//' + location.host + '/xlyFace',
  ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
  // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//118.178.19.35:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
  // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
  interfaceAddress: localStorage.apiAddress ? localStorage.apiAddress : isDev ? '//118.178.19.35:8088/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
  fileAddress: isDev ? '//118.178.19.35:8088/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址1
  fileAddressEbc: isDev ?  '//118.178.19.35:8088/xlyReport/' : '//' + location.host + '/xlyReport/',
};

export default {
  prefix: 'xlybusiness', /* 缓存前缀s */
  maxTabSize: 100, /* Tab标签最大个数 */
  pageNum: 1, /* 默认分页为第1页 */
  pageSize: 20, /* 一页个数 */
  pageSizeOptions: ['20', '50', '100', '200', '500', '1000', '2000', '5000'], /* 选择页数参数 */
  hasSum: false,
  isWeiXin: false,
  server_host: bHttps ? `https:${webSite.ipAddress}` : `http:${webSite.ipAddress}`, /* 外网连内网服务器地址 */
  ws_host: bHttps ? `wss:${webSite.ipAddress}` : `ws:${webSite.ipAddress}`,
  file_host:  bHttps ? `https:${webSite.fileAddress}` : `http:${webSite.fileAddress}`, /* 外网连内网服务器地址 */
  file_host_ebc: bHttps ? `https:${webSite.fileAddressEbc}` : `http:${webSite.fileAddressEbc}`, /* 外网连内网服务器地址 */
  face_host: bHttps ? `https:${webSite.faceAddress}` : `http:${webSite.faceAddress}`, /* 外网连内网服务器地址 */
  feedback_host: bHttps? 'https://project.xlyprint.cn/xlyEntry/' : 'http://s10.xlyprint.cn:8000/xlyEntry/', // 问题反馈接口前缀
  feedback_ws_host: bHttps? 'wss://project.xlyprint.cn/xlyEntry/' : 'ws://s10.xlyprint.cn:8000/xlyEntry/', // 问题反馈接口前缀
  interface_host: bHttps ? `https:${webSite.interfaceAddress}` : `http:${webSite.interfaceAddress}`, /* 接口地址*/
  sMode:1,
  btnData: [{
    sName: 'BtnRefresh', sControlName: 'BtnRefresh', showName: '刷新', bVisible: true, sActiveId: '', iconName: 'reload', disabled: false,
  }, {
    sName: 'BtnAdd', sControlName: 'BtnAdd', showName: '新增', bVisible: true, sActiveId: '', iconName: 'plus', disabled: false,
  }, {
    sName: 'BtnUpd', sControlName: 'BtnUpd', showName: '修改', bVisible: true, sActiveId: '', iconName: 'edit', disabled: false,
  }, {
    sName: 'BtnDel', sControlName: 'BtnDel', showName: '删除', bVisible: true, sActiveId: '', iconName: 'delete', disabled: false,
  }, {
    sName: 'BtnSave', sControlName: 'BtnSave', showName: '保存', bVisible: true, sActiveId: '', iconName: 'save', disabled: false,
  }, {
    sName: 'BtnCancel', sControlName: 'BtnCancel', showName: '取消', bVisible: true, sActiveId: '', iconName: 'close', disabled: false,
  }, {
    sName: 'BtnFirst', sControlName: 'BtnFirst', showName: '首条', bVisible: true, sActiveId: '', iconName: 'up-square-o', disabled: false,
  }, {
    sName: 'BtnPrior', sControlName: 'BtnPrior', showName: '上一条', bVisible: true, sActiveId: '', iconName: 'prevpage', disabled: false,
  }, {
    sName: 'BtnNext', sControlName: 'BtnNext', showName: '下一条', bVisible: true, sActiveId: '', iconName: 'nextpage', disabled: false,
  }, {
    sName: 'BtnLast', sControlName: 'BtnLast', showName: '末条', bVisible: true, sActiveId: '', iconName: 'down-square-o', disabled: false,
  }, {
    sName: 'BtnBsOperation.BtnUpCheck', sControlName: 'BtnBsOperation.BtnUpCheck', showName: '上查', bVisible: true, sActiveId: '', iconName: 'menu-unfold', disabled: false,
  }, {
    sName: 'BtnBsOperation.BtnDownCheck', sControlName: 'BtnBsOperation.BtnDownCheck', showName: '下查', bVisible: true, sActiveId: '', iconName: 'menu-unfold', disabled: false,
  }, {
    sName: 'BtnExamine', sControlName: 'BtnExamine', showName: '审核', bVisible: true, sActiveId: '', iconName: 'check', disabled: false,
  }, {
    sName: 'BtnCancelExamine', sControlName: 'BtnCancelExamine', showName: '消审', bVisible: true, sActiveId: '', iconName: 'rollback', disabled: false,
  }, {
    sName: 'BtnCopyTo', sControlName: 'BtnCopyTo', showName: '复制到', bVisible: true, sActiveId: '', iconName: 'copy', disabled: false,
  }, {
    sName: 'BtnCopyFrom', sControlName: 'BtnCopyFrom', showName: '复制从', bVisible: true, sActiveId: '', iconName: 'copy', disabled: false,
  }, {
    sName: 'BtnBsOperation', sControlName: 'BtnBsOperation', showName: '业务操作', bVisible: true, sActiveId: '', iconName: 'function', disabled: false,
  }, {
    sName: 'BtnBsOperation.BtnInvalid', sControlName: 'BtnBsOperation.BtnInvalid', showName: '作废', bVisible: true, sActiveId: '', disabled: false,
  }, {
    sName: 'BtnOut', sControlName: 'BtnOut', showName: '导出Excel', bVisible: true, sActiveId: '', iconName: 'export', disabled: false,
  }, {
    sName: 'BtnPrint', sControlName: 'BtnPrint', showName: '打印', bVisible: true, sActiveId: '', iconName: 'printer', disabled: false,
  },

  ], /* 工具栏按钮 */
  btnSysData: [
    {
      sName: 'BtnSave', showName: '确定', bVisible: true, sActiveId: '',
    },
    {
      sName: 'BtnCancel', showName: '取消', bVisible: true, sActiveId: '',
    },
  ], /* 系统参数工具栏按钮 */
  jsqData: [
    {
      sName: 'JSFA_RuGuo', showName: '如果', bVisible: true, sActiveId: '',
    },
    {
      sName: 'JSFA_NaMe', showName: '那么', bVisible: true, sActiveId: '',
    },
    {
      sName: 'JSFA_HuoZhe', showName: '或者', bVisible: true, sActiveId: '',
    },
    {
      sName: 'JSFA_BingQie', showName: '并且', bVisible: true, sActiveId: '',
    },
    {
      sName: 'JSFA_FouZeRuGuo', showName: '否则如果', bVisible: true, sActiveId: '',
    },
    {
      sName: 'JSFA_FouZe', showName: '否则', bVisible: true, sActiveId: '',
    },
    {
      sName: 'JSFA_JieShu', showName: '结束', bVisible: true, sActiveId: '',
    },
  ], /* 计算器按钮 */
  seaJudge: {
    b: [{ value: '等于', sId: '=' }],
    s: [{ value: '包含', sId: 'like' },
      { value: '不包含', sId: 'not like' },
      { value: '等于', sId: '=' }],
    d: [{ value: '大于', sId: '>' },
      { value: '等于', sId: '=' },
      { value: '小于', sId: '<' },
      { value: '大于等于', sId: '>=' },
      { value: '小于等于', sId: '<=' }],
    t: [{ value: '区间', sId: 'between' },
      { value: '区间(默认今天)', sId: 'betweenDay' },
      { value: '区间(默认昨天)', sId: 'betweenYestday' },
      { value: '区间时间', sId: 'betweenTime' },
      { value: '大于', sId: '>' },
      { value: '等于', sId: '=' },
      { value: '小于', sId: '<' },
      { value: '大于等于', sId: '>=' },
      { value: '小于等于', sId: '<=' },
      { value: '今日', sId: 'day' },
      { value: '今日未清', sId: 'unDayDo' },
      { value: '今天之前', sId: 'daybefore' },
      { value: '明天之前', sId: 'tomorrowbefore' },
      { value: '后天之前', sId: 'aftertomorrowbefore' },
      { value: '本月', sId: 'month' },
      { value: '上月', sId: 'monthPre' },
      { value: '本周', sId: 'week' },
      { value: '上周', sId: 'weekPre' }],
    p: [{ value: '区间', sId: 'between' },
      { value: '区间(默认今天)', sId: 'betweenDay' },
      { value: '区间(默认昨天)', sId: 'betweenYestday' },
      { value: '区间时间', sId: 'betweenTime' },
      { value: '大于', sId: '>' },
      { value: '等于', sId: '=' },
      { value: '小于', sId: '<' },
      { value: '大于等于', sId: '>=' },
      { value: '小于等于', sId: '<=' },
      { value: '今日', sId: 'day' },
      { value: '今日未清', sId: 'unDayDo' },
      { value: '今天之前', sId: 'daybefore' },
      { value: '明天之前', sId: 'tomorrowbefore' },
      { value: '后天之前', sId: 'aftertomorrowbefore' },
      { value: '本月', sId: 'month' },
      { value: '上月', sId: 'monthPre' },
      { value: '本周', sId: 'week' },
      { value: '上周', sId: 'weekPre' }],
    m: [{ value: '区间', sId: 'between' },
      { value: '区间时间', sId: 'betweenTime' },
      { value: '本期间', sId: 'period' }],
    y: [{ value: '等于', sId: 'period' }],
    i: [{ value: '大于', sId: '>' },
      { value: '等于', sId: '=' },
      { value: '小于', sId: '<' },
      { value: '大于等于', sId: '>=' },
      { value: '小于等于', sId: '<=' }],
    s_pro: [{ value: '包含', sId: 'like' },
      { value: '等于', sId: '=' }],
    s_proDropDown: [{ value: '等于', sId: '=' }],
  }, /* 判断条件 */
  timeoutServer: 30000,
  timerServer: null,
  serverTimer: null,
};
