import pipeConfig from "./pipeConfig.js"

export const pipeConfigInfo = pipeConfig
let temp_esriConfig = null;
let temp_lcInfo = null;
let temp_appconfig = null;
let temp_notificationInterval = null;
let temp_homeInterval = null;
let temp_hyduralicsMenus = null;
/*
 * 云服务器上arcgis初始化配置
 */
const client_esriConfig = {
  'baseUrl': 'http://172.16.0.2:11020/arcgis_js_api/library/4.16/dojo/dojo.js',
  'baseCssUrl': 'http://172.16.0.2:11020/arcgis_js_api/library/4.16/esri/css/main.css',
  'font_url': 'http://172.16.0.2:11020/arcgis_js_api/library/fonts/',
  'tianditu_url': 'http://172.16.0.2:11020'
}
const client_lcInfo = {
  otherUrl: "http://172.16.0.16:30123/auth/oauth/token",//浪潮对接接口(获取token)
  // otherUrl2:"http://172.16.0.16:30123/auth/v1/user/me",//浪潮对接接口2(获取用户信息)
  otherUrlUser: "http://172.16.0.16:30123/api/sa/api/agent/getUserInfoByStation/1.0",//浪潮对接接口(获取用户信息)
  otherUrlWater: "http://172.16.0.16:30123/api/sa/api/agent/getWaterUserInfoByStation/1.0",//浪潮对接接口(获取用户用水信息)
  otherUrlWaterPay: "http://172.16.0.16:30123/api/sa/api/agent/getWaterUserPriceInfoByStation/1.0",//浪潮对接接口(获取用户用水价钱)
  otherUrlUserdetail: "http://172.16.0.16:30123/api/sa/api/agent/getUserDetailsInfoByStation/1.0",//浪潮对接接口(获取用户详情)
  // otherUrlUserdetail: "http://172.16.0.16:30123/api/sa/api/agent/getWaterSummaryTable/1.0",//浪潮对接接口(获取用户详情)
  getWaterUserInfosDetails: "http://172.16.0.16:30123/api/sa/api/agent/getWaterUserInfosDetails/1.0",//浪潮对接接口(用户用水缴费)
  getWaterNumAverage: "http://172.16.0.16:30123/api/sa/api/agent/getWaterNumAverage/1.0",//浪潮对接接口(用户平均用水量)
  getWaterSummaryTable: "http://172.16.0.16:30123/api/sa/api/agent/getWaterSummaryTable/1.0",//浪潮对接接口(营销总表与用户关联关系)
  client_id: "12ylhw8ykf9wltln3buwmm41",//对接参数
  client_secret: "3j0kqonm7mobs7n0zwjsu36fr2p124rm",//对接参数
  grant_type: "authorization_code",//对接参数
  redirect_uri: "http://172.16.0.2:11020/index.html",//回调地址
  video_url: "http://172.16.0.2:11029/wsplayer/"
};
const client_appconfig = {
  // 底图是否采用在线地图,true在线,false离线
  'isonline': true,
  // 是否根据后台配置服务
  'isloadServer': false,
  // 天地图秘钥 567b65214b47c6cd6a731e3bd8cd03da  700ea8c1e2dd873c349dc880169fd96d 9248d7f5b183142e4f1d5c908fba42e0
  //'tianMapKey': '9248d7f5b183142e4f1d5c908fba42e0',
  'tianMapKey': "d42ff494ace495b84079d1d466533f08",
  // 地图初始视角中心  马边:103.543616,28.833446, 陵水:110.03174,18.51504 德昌 102.18017 27.40482
  'initCenter': { 'x': 103.84566, 'y': 30.07039 },
  // 打印模板
  'templateFolder': 'E:/Datas/客户部署数据/PrintTemplates',
  // 地图初始视角级别
  'initZoom': 2,
  // 'usertoken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJVc2VySUQiOiIiLCJVU0VSTkFNRSI6IiIsIlJFQUxOQU1FIjoiIiwiV0tJRCI6NDU0NCwiUkFOR0UiOiJYUlRZIiwiUkFOR0VGSUVMRCI6bnVsbCwiQ09ERSI6IlhSVFkiLCJDT05ORUNUU1RSIjoiREFUQUJBU0U9b3JjbDtORVROQU1FPTE5Mi4xNjguMC4xOC9vcmNsO1NFUlZFUj0xOTIuMTY4LjAuMTg7VVNFUklEPXNkZV9kY3N3O1BBU1NXT1JEPVpoc3dfMTIzO1BPUlQ9MTUyMUA1MTUxL3RjcDtWRVJTSU9OPXNkZS5ERUZBVUxUIiwiQm9yblRpbWUiOjAsIkFwcElEIjpudWxsfQ.QBNAdOM7H36k_1lF-z3oRR_E2-QkDyp8wfgTrvssOKANYTSjY5bWvoMxrV52_k1h9ouqv1CM71C8fl7TFioIvw',
  //客户环境PG
  'usertoken': "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJVc2VySUQiOiIiLCJVU0VSTkFNRSI6IiIsIlJFQUxOQU1FIjoiIiwiV0tJRCI6NDU0NCwiUkFOR0UiOiJYUlRZIiwiUkFOR0VGSUVMRCI6bnVsbCwiQ09ERSI6IlhSVFkiLCJDT05ORUNUU1RSIjoiREFUQUJBU0U9cGdfbWVpc2hhbl93YXRlcjtORVROQU1FPTE3Mi4xNi4wLjI7U0VSVkVSPTE3Mi4xNi4wLjI7VVNFUklEPXNkZV9tZWlzaGFuO1BBU1NXT1JEPVRvZmx5MDI4ITtQT1JUPTU0MzI7VkVSU0lPTj1zZGUuREVGQVVMVDtEQl9DTElFTlQ9UG9zdGdyZVNRTDsiLCJCb3JuVGltZSI6MCwiQXBwSUQiOm51bGx9.ABxU8kAbStZSsxw-4JSCFUHaZwJE-rX2DRlSXh_famBTSUOGbsmi3Vbn1_IyfCzh75Re7SrVnRG-rWRIvwU6kg",
  //客户环境oracle
  //'usertoken':"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJVc2VySUQiOiIiLCJVU0VSTkFNRSI6IiIsIlJFQUxOQU1FIjoiIiwiV0tJRCI6NDU0NCwiUkFOR0UiOiJYUlRZIiwiUkFOR0VGSUVMRCI6bnVsbCwiQ09ERSI6IlhSVFkiLCJDT05ORUNUU1RSIjoiREFUQUJBU0U9b3JjbDtORVROQU1FPTE3Mi4xNi4wLjMvb3JjbDtTRVJWRVI9MTcyLjE2LjAuMztVU0VSSUQ9c2RlX21laXNoYW47UEFTU1dPUkQ9c2RlX21laXNoYW47UE9SVD0xNTIxQDUxNTEvdGNwO1ZFUlNJT049c2RlLkRFRkFVTFQiLCJCb3JuVGltZSI6MCwiQXBwSUQiOm51bGx9.090jZ-SZH1HxLziMxrQShVHxK1WCszdWt6t3obN_0f1hss90qnmNF-plFLh3flf-ffdSIq-ANMtfcj5aAj5OkQ",
  // 公司本地
  //'usertoken':"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJVc2VySUQiOiIiLCJVU0VSTkFNRSI6IiIsIlJFQUxOQU1FIjoiIiwiV0tJRCI6NDU0NCwiUkFOR0UiOiJYUlRZIiwiUkFOR0VGSUVMRCI6bnVsbCwiQ09ERSI6IlhSVFkiLCJDT05ORUNUU1RSIjoiREFUQUJBU0U9cGdfbWVpc2hhbl93YXRlcjtORVROQU1FPTE5Mi4xNjguMi4yNDU7U0VSVkVSPTE5Mi4xNjguMi4yNDU7VVNFUklEPXNkZV9tZWlzaGFuO1BBU1NXT1JEPXNkZV9tZWlzaGFuO1BPUlQ9NTQzMjtWRVJTSU9OPXNkZS5ERUZBVUxUO0RCX0NMSUVOVD1Qb3N0Z3JlU1FMOyIsIkJvcm5UaW1lIjowLCJBcHBJRCI6bnVsbH0.i3pBpXAp4Cv5puUjbLMAnkPRiXtFd2R8RJuTT7N9QHd9QQg_l_NqGZcF6kymlNfCRTUkkNtVbOvespjL2LSQTQ",
  // 地图资源服务
  'gisResource': {
    // 'tian_online_vector': {
    //   'groupname': '天地图在线矢量服务',
    //   'type': 'webTiled',
    //   'config': [
    //     { 'name': '矢量地图', 'url': 'http://172.16.0.2:11020/DataServer?T=vec_c&x={col}&y={row}&l={level}&tk=' }
    //   ]
    // },
    // 'tian_online_raster': {
    //   'groupname': '天地图在线影像服务',
    //   'type': 'webTiled',
    //   'config': [
    //     { 'name': '影像地图', 'url': 'http://172.16.0.2:11020/DataServer?T=img_c&x={col}&y={row}&l={level}&tk=' }
    //   ]
    // },
    // 'tian_online_vector_label': {
    //   'groupname': '天地图在线矢量标注服务',
    //   'type': 'webTiled',
    //   'config': [
    //     { 'name': '矢量标注图', 'url': 'http://172.16.0.2:11020/DataServer?T=cva_c&x={col}&y={row}&l={level}&tk=' }
    //   ]
    // },
    // 'tian_online_raster_label': {
    //   'groupname': '天地图在线影像标注服务',
    //   'type': 'webTiled',
    //   'config': [
    //     { 'name': '影像标注图', 'url': 'http://172.16.0.2:11020/DataServer?T=cia_c&x={col}&y={row}&l={level}&tk=' }
    //   ]
    // },
    'tian_online_vector': {
      'groupname': '天地图在线矢量服务',
      'type': 'webTiled',
      'config': [
        { 'name': '矢量地图', 'url': 'http://172.16.0.2/{subDomain}.tianditu.com/DataServer?T=vec_c&x={col}&y={row}&l={level}&tk=' }
      ]
    },
    'tian_online_raster': {
      'groupname': '天地图在线影像服务',
      'type': 'webTiled',
      'config': [
        { 'name': '影像地图', 'url': 'http://172.16.0.2/{subDomain}.tianditu.com/DataServer?T=img_c&x={col}&y={row}&l={level}&tk=' }
      ]
    },
    'tian_online_vector_label': {
      'groupname': '天地图在线矢量标注服务',
      'type': 'webTiled',
      'config': [
        { 'name': '矢量标注图', 'url': 'http://172.16.0.2/{subDomain}.tianditu.com/DataServer?T=cva_c&x={col}&y={row}&l={level}&tk=' }
      ]
    },
    'tian_online_raster_label': {
      'groupname': '天地图在线影像标注服务',
      'type': 'webTiled',
      'config': [
        { 'name': '影像标注图', 'url': 'http://172.16.0.2/{subDomain}.tianditu.com/DataServer?T=cia_c&x={col}&y={row}&l={level}&tk=' }
      ]
    },
    'tian_offline_raster_label': {
      'groupname': '天地图离线标注图服务',
      'type': 'tiled',
      'config': [
        { 'name': '标注地图', 'url': 'http://192.168.2.61:6080/arcgis/rest/services/xrty/tysw_imgano/MapServer' }
      ]
    },
    'tian_offline_vector_label': {
      'groupname': '天地图离线标注图服务',
      'type': 'tiled',
      'config': [
        { 'name': '标注地图', 'url': 'http://192.168.2.61:6080/arcgis/rest/services/xrty/tysw_vecano/MapServer' }
      ]
    },
    'tian_offline_raster': {
      'groupname': '天地图离线影像图服务',
      'type': 'tiled',
      'config': [
        { 'name': '影像地图', 'url': 'http://192.168.2.61:6080/arcgis/rest/services/xrty/tysw_img/MapServer' }
      ]
    },
    'tian_offline_vector': {
      'groupname': '天地图离线矢量服务',
      'type': 'tiled',
      'config': [
        { 'name': '矢量地图', 'url': 'https://192.168.2.61:6080/arcgis/rest/services/xrty/tysw_vec/MapServer' }
      ]
    },
    'river_thema': {
      'groupname': '水系专题图服务',
      'type': 'dynamic',
      'config': [
        { 'name': '水系专题图', 'url': 'http://183.255.30.6:6080/arcgis/rest/services/xrty/pipe_river/MapServer' }
      ]
    },

    'business_map': {
      'groupname': '离线业务地图服务',
      'type': 'dynamic',
      'config': [
        { 'name': '业务地图', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN/MapServer' }
      ]
    },
    'print': {
      'groupname': '打印服务',
      'config': [
        { 'name': '打印地图', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/xrty/TyswPrint/GPServer/TFPrint/execute' }
      ]
    },
    'geometry': {
      'groupname': '地图图形操作工具',
      'type': 'tiled',
      'config': [
        { 'name': '地图工具', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer' }
      ]
    },
    'layer_name': {
      'groupname': '获取图层名称服务',
      'config': [
        { 'name': '图层名称', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN/MapServer/exts/TFGeoAPISOE/getLayerInfor' }
      ]
    },
    'field_intersect': {
      'groupname': '获取重复字段',
      'config': [
        { 'name': '字段名称', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN/MapServer/exts/TFGeoAPISOE/fieldIntersect' }
      ]
    },
    'fieldUniqueValue': {
      'groupname': '获取字段唯一值',
      'config': [
        { 'name': '字段唯一', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN/MapServer/exts/TFGeoAPISOE/getFieldUniqueValue' }
      ]
    },
    'statistic': {
      'groupname': '属性统计',
      'config': [
        { 'name': '属性统计', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN/MapServer/exts/TFGeoAPISOE/statistic' }
      ]
    },
    'horizental_section_analysis': {
      'groupname': '横剖面分析',
      'config': [
        { 'name': '横剖面分析', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN/MapServer/exts/TFGeoAPISOE/HorizentalSectionAnalysis' }
      ]
    },
    'vertical_section_analysis': {
      'groupname': '纵剖面分析',
      'config': [
        { 'name': '纵剖面分析', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN/MapServer/exts/TFGeoAPISOE/VerticalSectionAnalysis' }
      ]
    },
    'shutOff_valve_extend_analysis': {
      'groupname': '关阀扩展分析',
      'config': [
        { 'name': '关阀扩展分析', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/GPTools/AnalyzeTools/GPServer/ShutOffValveExtend' }
      ]
    },
    'shutOff_valve_analysis': {
      'groupname': '关阀分析',
      'config': [
        { 'name': '关阀分析', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/GPTools/AnalyzeTools/GPServer/ShutOffValveAnalyze' }
      ]
    },
    'burst_pipe_analyze_analysis': {
      'groupname': '爆管分析',
      'config': [
        { 'name': '爆管分析', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/GPTools/AnalyzeTools/GPServer/BurstPipeAnalyze' }
      ]
    },
    'connected_analysis': {
      'groupname': '连通性分析',
      'config': [
        { 'name': '连通性分析', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/GPTools/AnalyzeTools/GPServer/ConnectedAnalyze' }
      ]
    },
    // 'path_analysis': {
    //   'groupname': '路径分析',
    //   'config': [
    //     { 'name': '路径分析', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/GPTools/AnalyzeTools/GPServer/PathAnalyzeTysw' }
    //   ]
    // },
    'trace_downStream_analyze': {
      'groupname': '下游追踪分析',
      'config': [
        { 'name': '下游追踪分析', 'url': 'http://183.255.30.6:6080/arcgis/rest/services/hnls/lsswgp/GPServer/TraceDownstreamAnalyze' }
      ]
    },
    'path_analysis': {
      'groupname': '路径分析',
      'config': [
        { 'name': '路径分析', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/GPTools/AnalyzeTools/GPServer/PathAnalyze' }
      ]
    },
    'path_analysis_map': {
      'groupname': '路径分析地图',
      'config': [
        { 'name': '路径分析地图', 'url': 'http://172.16.0.2:6080/arcgis/rest/services/GPTools/PathAnalyzeTysw/GPServer/PathAnalyzeTysw/submitJob' }
      ]
    }
  },
}

/**
 * 轮询时机设置
 */
const client_notificationInterval = 30000
const client_homeInterval = 60000

/**
 * 客户环境水力模型配置
 */
const client_hyduralicsMenus = [
  {
    name: 'onlineForecast',
    title: '在线预测',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/monitoring'
  },
  {
    name: 'smartScheduling',
    title: '智能调度',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/smart'
  },
  {
    name: 'schedulingPlan',
    title: '调度预案',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/scheduling'
  },
  {
    name: 'planEvaluation',
    title: '规划评估',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/plan'
  },
  {
    name: 'pipeFushing',
    title: '管道冲洗',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/wash'
  },
  {
    name: 'riskAssessment',
    title: '风险评估',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/risk'
  },
  {
    name: 'hydrualicsSysSetting',
    title: '系统设置',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/system'
  }
]

/*
 * 云服务器上arcgis初始化配置
 */
const company_esriConfig = {
  'baseUrl': 'http://221.182.8.141:3308/arcgis_js_api/v416/arcgis_js_api/library/4.16/dojo/dojo.js',
  'baseCssUrl': 'http://221.182.8.141:3308/arcgis_js_api/v416/arcgis_js_api/library/4.16/esri/css/main.css',
  'font_url': 'http://221.182.8.141:3308/arcgis_js_api/v416/arcgis_js_api/library/fonts/'
}

const company_lcInfo = {
  'baseUrl': 'http://172.16.0.2:11020/arcgis_js_api/library/4.16/dojo/dojo.js',
  'baseCssUrl': 'http://172.16.0.2:11020/arcgis_js_api/library/4.16/esri/css/main.css',
  'font_url': 'http://172.16.0.2:11020/arcgis_js_api/library/fonts/',
  'tianditu_url': 'http://172.16.0.2:11020'
}
const company_appconfig = {
  // 底图是否采用在线地图,true在线,false离线
  'isonline': true,
  // 是否根据后台配置服务
  'isloadServer': false,
  // 天地图秘钥 567b65214b47c6cd6a731e3bd8cd03da  700ea8c1e2dd873c349dc880169fd96d 9248d7f5b183142e4f1d5c908fba42e0
  // 'tianMapKey': '9248d7f5b183142e4f1d5c908fba42e0',
  'tianMapKey': "d42ff494ace495b84079d1d466533f08",
  // 地图初始视角中心  马边:103.543616,28.833446, 陵水:110.03174,18.51504 德昌 102.18017 27.40482
  'initCenter': { 'x': 103.84566, 'y': 30.07039 },
  // 打印模板
  'templateFolder': 'E:/Datas/客户部署数据/PrintTemplates',
  // 地图初始视角级别
  'initZoom': 2,
  // 'usertoken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJVc2VySUQiOiIiLCJVU0VSTkFNRSI6IiIsIlJFQUxOQU1FIjoiIiwiV0tJRCI6NDU0NCwiUkFOR0UiOiJYUlRZIiwiUkFOR0VGSUVMRCI6bnVsbCwiQ09ERSI6IlhSVFkiLCJDT05ORUNUU1RSIjoiREFUQUJBU0U9b3JjbDtORVROQU1FPTE5Mi4xNjguMC4xOC9vcmNsO1NFUlZFUj0xOTIuMTY4LjAuMTg7VVNFUklEPXNkZV9kY3N3O1BBU1NXT1JEPVpoc3dfMTIzO1BPUlQ9MTUyMUA1MTUxL3RjcDtWRVJTSU9OPXNkZS5ERUZBVUxUIiwiQm9yblRpbWUiOjAsIkFwcElEIjpudWxsfQ.QBNAdOM7H36k_1lF-z3oRR_E2-QkDyp8wfgTrvssOKANYTSjY5bWvoMxrV52_k1h9ouqv1CM71C8fl7TFioIvw',
  //'usertoken':"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJVc2VySUQiOiIiLCJVU0VSTkFNRSI6IiIsIlJFQUxOQU1FIjoiIiwiV0tJRCI6NDU0NCwiUkFOR0UiOiJYUlRZIiwiUkFOR0VGSUVMRCI6bnVsbCwiQ09ERSI6IlhSVFkiLCJDT05ORUNUU1RSIjoiREFUQUJBU0U9cGdfbWVpc2hhbl93YXRlcjtORVROQU1FPTE5Mi4xNjguNS40MjtTRVJWRVI9MTkyLjE2OC41LjQyO1VTRVJJRD1zZGVfbWVpc2hhbjtQQVNTV09SRD1Ub2ZseTAyOCE7UE9SVD01NDMyO1ZFUlNJT049c2RlLkRFRkFVTFQ7REJfQ0xJRU5UPVBvc3RncmVTUUw7IiwiQm9yblRpbWUiOjAsIkFwcElEIjpudWxsfQ.YB5VrTdaUxprPBtHcQP6MRf-_yzG7lJbW36s3ObeG26sFZ3TAFpu_XOPF0vYCBFO-0lV49Zt1ThKM2xGbjVH8w",
  // 公司本地
  'usertoken': "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJVc2VySUQiOiIiLCJVU0VSTkFNRSI6IiIsIlJFQUxOQU1FIjoiIiwiV0tJRCI6NDU0NCwiUkFOR0UiOiJYUlRZIiwiUkFOR0VGSUVMRCI6bnVsbCwiQ09ERSI6IlhSVFkiLCJDT05ORUNUU1RSIjoiREFUQUJBU0U9cGdfbWVpc2hhbl93YXRlcjtORVROQU1FPTE5Mi4xNjguMi4yNDU7U0VSVkVSPTE5Mi4xNjguMi4yNDU7VVNFUklEPXNkZV9tZWlzaGFuO1BBU1NXT1JEPXNkZV9tZWlzaGFuO1BPUlQ9NTQzMjtWRVJTSU9OPXNkZS5ERUZBVUxUO0RCX0NMSUVOVD1Qb3N0Z3JlU1FMOyIsIkJvcm5UaW1lIjowLCJBcHBJRCI6bnVsbH0.i3pBpXAp4Cv5puUjbLMAnkPRiXtFd2R8RJuTT7N9QHd9QQg_l_NqGZcF6kymlNfCRTUkkNtVbOvespjL2LSQTQ",
  // 地图资源服务
  'gisResource': {
    'tian_online_vector': {
      'groupname': '天地图在线矢量服务',
      'type': 'webTiled',
      'config': [
        { 'name': '矢量地图', 'url': 'http://{subDomain}.tianditu.com/DataServer?T=vec_c&x={col}&y={row}&l={level}&tk=' }
      ]
    },
    'tian_online_raster': {
      'groupname': '天地图在线影像服务',
      'type': 'webTiled',
      'config': [
        { 'name': '影像地图', 'url': 'http://{subDomain}.tianditu.com/DataServer?T=img_c&x={col}&y={row}&l={level}&tk=' }
      ]
    },
    'tian_online_vector_label': {
      'groupname': '天地图在线矢量标注服务',
      'type': 'webTiled',
      'config': [
        { 'name': '矢量标注图', 'url': 'http://{subDomain}.tianditu.com/DataServer?T=cva_c&x={col}&y={row}&l={level}&tk=' }
      ]
    },
    'tian_online_raster_label': {
      'groupname': '天地图在线影像标注服务',
      'type': 'webTiled',
      'config': [
        { 'name': '影像标注图', 'url': 'http://{subDomain}.tianditu.com/DataServer?T=cia_c&x={col}&y={row}&l={level}&tk=' }
      ]
    },
    'tian_offline_raster_label': {
      'groupname': '天地图离线标注图服务',
      'type': 'tiled',
      'config': [
        { 'name': '标注地图', 'url': 'http://192.168.2.61:6080/arcgis/rest/services/xrty/tysw_imgano/MapServer' }
      ]
    },
    'tian_offline_vector_label': {
      'groupname': '天地图离线标注图服务',
      'type': 'tiled',
      'config': [
        { 'name': '标注地图', 'url': 'http://192.168.2.61:6080/arcgis/rest/services/xrty/tysw_vecano/MapServer' }
      ]
    },
    'tian_offline_raster': {
      'groupname': '天地图离线影像图服务',
      'type': 'tiled',
      'config': [
        { 'name': '影像地图', 'url': 'http://192.168.2.61:6080/arcgis/rest/services/xrty/tysw_img/MapServer' }
      ]
    },
    'tian_offline_vector': {
      'groupname': '天地图离线矢量服务',
      'type': 'tiled',
      'config': [
        { 'name': '矢量地图', 'url': 'https://192.168.2.61:6080/arcgis/rest/services/xrty/tysw_vec/MapServer' }
      ]
    },
    'river_thema': {
      'groupname': '水系专题图服务',
      'type': 'dynamic',
      'config': [
        { 'name': '水系专题图', 'url': 'http://183.255.30.6:6080/arcgis/rest/services/xrty/pipe_river/MapServer' }
      ]
    },

    'business_map': {
      'groupname': '离线业务地图服务',
      'type': 'dynamic',
      'config': [
        { 'name': '业务地图', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN_PG/MapServer' }
      ]
    },
    'print': {
      'groupname': '打印服务',
      'config': [
        { 'name': '打印地图', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/xrty/TyswPrint/GPServer/TFPrint/execute' }
      ]
    },
    'geometry': {
      'groupname': '地图图形操作工具',
      'type': 'tiled',
      'config': [
        { 'name': '地图工具', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer' }
      ]
    },
    'layer_name': {
      'groupname': '获取图层名称服务',
      'config': [
        { 'name': '图层名称', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN_PG/MapServer/exts/TFGeoAPISOE/getLayerInfor' }
      ]
    },
    'field_intersect': {
      'groupname': '获取重复字段',
      'config': [
        { 'name': '字段名称', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN_PG/MapServer/exts/TFGeoAPISOE/fieldIntersect' }
      ]
    },
    'fieldUniqueValue': {
      'groupname': '获取字段唯一值',
      'config': [
        { 'name': '字段唯一', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN_PG/MapServer/exts/TFGeoAPISOE/getFieldUniqueValue' }
      ]
    },
    'statistic': {
      'groupname': '属性统计',
      'config': [
        { 'name': '属性统计', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN_PG/MapServer/exts/TFGeoAPISOE/statistic' }
      ]
    },
    'horizental_section_analysis': {
      'groupname': '横剖面分析',
      'config': [
        { 'name': '横剖面分析', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN_PG/MapServer/exts/TFGeoAPISOE/HorizentalSectionAnalysis' }
      ]
    },
    'vertical_section_analysis': {
      'groupname': '纵剖面分析',
      'config': [
        { 'name': '纵剖面分析', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/MSSW/PIPE_JS_MEISHAN_PG/MapServer/exts/TFGeoAPISOE/VerticalSectionAnalysis' }
      ]
    },
    'shutOff_valve_extend_analysis': {
      'groupname': '关阀扩展分析',
      'config': [
        { 'name': '关阀扩展分析', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/xrty/tyswgp/GPServer/ShutOffValveExtendTysw' }
      ]
    },
    'shutOff_valve_analysis': {
      'groupname': '关阀分析',
      'config': [
        { 'name': '关阀分析', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/xrty/tyswgp/GPServer/ShutOffValveAnalyzeTysw' }
      ]
    },
    'burst_pipe_analyze_analysis': {
      'groupname': '爆管分析',
      'config': [
        { 'name': '爆管分析', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/xrty/tyswgp/GPServer/BurstPipeAnalyzeTysw' }
      ]
    },
    'connected_analysis': {
      'groupname': '连通性分析',
      'config': [
        { 'name': '连通性分析', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/xrty/tyswgp/GPServer/ConnectedAnalyzeTysw' }
      ]
    },
    // 'path_analysis': {
    //   'groupname': '路径分析',
    //   'config': [
    //     { 'name': '路径分析', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/xrty/tyswgp/GPServer/PathAnalyzeTysw' }
    //   ]
    // },
    'trace_downStream_analyze': {
      'groupname': '下游追踪分析',
      'config': [
        { 'name': '下游追踪分析', 'url': 'http://183.255.30.6:6080/arcgis/rest/services/hnls/lsswgp/GPServer/TraceDownstreamAnalyze' }
      ]
    },
    'path_analysis': {
      'groupname': '路径分析',
      'config': [
        { 'name': '路径分析', 'url': 'http://221.182.8.141:6080/arcgis/rest/services/MSSW/PathAnalyze/GPServer/PathAnalyzeTysw' }
      ]
    },
  }
}

/**
 * 轮询时机设置
 */
const company_notificationInterval = 30000
const company_homeInterval = 60000

/**
 * 客户环境水力模型配置
 */
const company_hyduralicsMenus = [
  {
    name: 'onlineForecast',
    title: '在线预测',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/monitoring'
  },
  {
    name: 'smartScheduling',
    title: '智能调度',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/smart'
  },
  {
    name: 'schedulingPlan',
    title: '调度预案',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/scheduling'
  },
  {
    name: 'planEvaluation',
    title: '规划评估',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/plan'
  },
  {
    name: 'pipeFushing',
    title: '管道冲洗',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/wash'
  },
  {
    name: 'riskAssessment',
    title: '风险评估',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/risk'
  },
  {
    name: 'hydrualicsSysSetting',
    title: '系统设置',
    url: 'https://192.168.100.201/JinTangWDWebApp/#/single/system'
  }
]

if (pipeConfigInfo.currentType == pipeConfigInfo.type.company) {
  temp_esriConfig = company_esriConfig;
  temp_lcInfo = client_lcInfo;
  temp_appconfig = company_appconfig;
  temp_notificationInterval = company_notificationInterval;
  temp_homeInterval = company_homeInterval;
  temp_hyduralicsMenus = company_hyduralicsMenus;
} else if (pipeConfigInfo.currentType == pipeConfigInfo.type.client) {
  temp_esriConfig = client_esriConfig;
  temp_lcInfo = client_lcInfo;
  temp_appconfig = client_appconfig;
  temp_notificationInterval = client_notificationInterval;
  temp_homeInterval = client_homeInterval;
  temp_hyduralicsMenus = client_hyduralicsMenus;
}
export const esriConfig = temp_esriConfig;
export const lcInfo = temp_lcInfo;
export const appconfig = temp_appconfig;
export const notificationInterval = temp_notificationInterval;
export const homeInterval = temp_homeInterval;
export const hyduralicsMenus = temp_hyduralicsMenus;