import { configLayers } from "./yiyangLayerConfig.js"

export const yiyangMapConfig = {
  global: {
    center: [495259.960696, 3145235.606107], //中心点
    theme: "dark-blue", //主题
    zoom: 5, //级别
    /**
     * 投影坐标系 ，不传默认是 EPSG:3857,
     * 若使用百度，天地图在线底图用的都是4326,resolutions就不传
     * 
     * */
   // projection: "EPSG:4326",
   /** 边界*/
    bounds: [
      475987.5,
      3141907.4704,
      500760.73,
      3163376.6,
    ],
    extent: [475987.5, 3141907.4704, 500760.73, 3163376.6],
    //分辨率，加载自定义影像图的时候会用到，可以不传
    resolutions: [
      66.1459656252646,
      33.0729828126323,
      16.933367200067735,
      8.466683600033868,
      4.233341800016934,
      2.116670900008467,
      1.0583354500042335,
      0.5291677250021167,
      0.26458386250105836,
      0.13229193125052918,
    ],
  },
  /**图层配置参数 如果把图层单独做一个控件要传的参数 */
  // configLayers: [], //
  search: {
    show: true,
    posStyle: {
      left: 10,
      top: 10,
      right: 0,
      bottom: 0,
    },
    query: {
      mode: "online", //查询方式 本地、网络
      onLineMode: "baidu", //网络查询方式  高德/ 百度
      localUrl: "", //本地地址
      businessUrl: "", //网络地址
      business: [],
    },
  },
  overview: {
    show: true,
    posStyle: {
      left: 10,
      bottom: 40,
      right: 0,
      top: 0,
    },
    baseServer: {
      type: "default",
      server:
        "http://online{index}.map.bdimg.com/tile/?qt=vtile&x={x}&y={y}&z={z}&styles=pl&scaler=1&udt=20190718",
    },
  },
  toolbar: {
    posStyle: {
      top: 10,
      right: 10,
    },
    //工具栏
    layers: {
      show: true,
      //图层配置参数
      configLayers: configLayers, //树结构
      dialogStyle: "right: 10px; top:60px; width: 340px; height: 450px;", //图层面板的位置
      legendCotStyle: "bottom: 80px; left: 10px", //图例的位置
      defaultCheckedLayers: [11], //默认打开图层的id
      currentEditLayerId: 11, //默认编辑图层的id  没有传defaultCheckedLayers的第一个
      rigthMenu: [
        "attTable",
        "zoom",
        "move",
        "exportSHP",
        // "exportCAD",
        "importSHP",
        // "importCAD",
      ],
    },
    special: {
      show: true,
      text: "专题地图",
      iconClass: "icon-ditu gisicon",
      className: "special-map",
      command: "test",
      dropdownMenu: [
        {
          name: "签约率分析",
          command: "specialAside",
          iconClass: "gisicon icon-qianyue",
          themeLayerId: 11,//专题分析的图层id
          themeField: "name",//专题分析的图层字段名称
          projectList: [//专题分析的可选项目列表
            { "id": 82, "name": "测试项目" }, { "id": 80, "name": "新马EBD储备地块" }, { "id": 79, "name": "想去嗯" }, { "id": 78, "name": "特烦恼" }, { "id": 77, "name": "2021演示--周" }, { "id": 75, "name": "2020年最新项目" }, { "id": 73, "name": "测试" }, { "id": 70, "name": "西瓜集体测试项目" }, { "id": 68, "name": "测试项目" }, { "id": 59, "name": "ces" }, { "id": 57, "name": "ces" }, { "id": 50, "name": "乙集体项目" }, { "id": 49, "name": "甲集体项目" }, { "id": 47, "name": "丁集体项目" }, { "id": 46, "name": "丙集体项目" }, { "id": 44, "name": "审批集体测试项目" }, { "id": 43, "name": "特---烦恼" }, { "id": 42, "name": "梨子集体项目" }, { "id": 10, "name": "香蕉集体项目" }, { "id": 6, "name": "测试集体项目110号" }, { "id": 4, "name": "集体测试项目" }, { "id": 2, "name": "苹果集体项目" }
          ],
          regionList: [{//专题分析设置界面的行政区域列表
            id: 1,
            name: "赫山区",
            bbox: [
              476452.49389648,
              3153619.33807373,
              490838.35430908,
              3161873.60791016,
            ],
          },
          {
            id: 2,
            name: "高新区",
            bbox: [
              493252.65509033,
              3142328.20031738,
              500178.76751709,
              3149502.01947022,
            ],
          },],
          types: [//要分析的类别
            {
              name: "已签约",
              checked: true,
              color: "#F39800",
              themeFieldValue: "高铁片区",
            },
            {
              name: "未签约",
              checked: true,
              color: "#80C269",
              themeFieldValue: "益阳",
            },
          ],
          asideTabs: [//侧边栏
            {
              component: "signStatistics",//要显示的组件名称
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "signList",
              name: "详情",
              icon: "icon-home",
            },
          ]
        },
        {
          name: "拆除率分析",
          command: "specialAside",
          iconClass: "gisicon icon-chuizi-",
          themeLayerId: 11,//专题分析的图层id
          themeField: "name",//专题分析的字段名称
          projectList: [
            { "id": 82, "name": "测试项目" }, { "id": 80, "name": "新马EBD储备地块" }, { "id": 79, "name": "想去嗯" }, { "id": 78, "name": "特烦恼" }, { "id": 77, "name": "2021演示--周" }, { "id": 75, "name": "2020年最新项目" }, { "id": 73, "name": "测试" }, { "id": 70, "name": "西瓜集体测试项目" }, { "id": 68, "name": "测试项目" }, { "id": 59, "name": "ces" }, { "id": 57, "name": "ces" }, { "id": 50, "name": "乙集体项目" }, { "id": 49, "name": "甲集体项目" }, { "id": 47, "name": "丁集体项目" }, { "id": 46, "name": "丙集体项目" }, { "id": 44, "name": "审批集体测试项目" }, { "id": 43, "name": "特---烦恼" }, { "id": 42, "name": "梨子集体项目" }, { "id": 10, "name": "香蕉集体项目" }, { "id": 6, "name": "测试集体项目110号" }, { "id": 4, "name": "集体测试项目" }, { "id": 2, "name": "苹果集体项目" }
          ],
          regionList: [{
            id: 1,
            name: "资阳区",
          },
          {
            id: 2,
            name: "赫山区",
          },],
          types: [
            {
              name: "已拆除",
              checked: true,
              color: "#00ff08",
              themeFieldValue: "益阳",
            },
            {
              name: "未拆除",
              checked: true,
              color: "#455d46",
              themeFieldValue: "高铁片区",
            },
          ],
          asideTabs: [
            {
              component: "signStatistics",
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "signList",
              name: "详情",
              icon: "icon-home",
            },
          ]
        },
        {
          name: "项目资金专题",
          command: "specialAside",
          iconClass: "el-icon-coin",
          types: [{ "color": "#72bae2", "checked": true, "name": "水田" }, { "color": "#e47adc", "checked": true, "name": "旱土" }, { "color": "#bce54e", "checked": true, "name": "园地" }, { "color": "#4d58aa", "checked": true, "name": "林地" }, { "color": "#bbcd8a", "checked": true, "name": "农村道路" }, { "color": "#c4f69e", "checked": true, "name": "坑塘水面" }, { "color": "#67b70a", "checked": true, "name": "农田水利" }, { "color": "#c47640", "checked": true, "name": "宅基地" }, { "color": "#eabf44", "checked": true, "name": "未利用地" }],
          asideTabs: [
            {
              component: "projectFundsStatistics",
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "projectFundsList",
              name: "详情",
              icon: "icon-home",
            },
          ]
        }, {
          name: "项目进度专题",
          command: "projectFundsWidget",
          iconClass: "el-icon-time",
          types: [{ "color": "#72bae2", "checked": true, "name": "水田" }, { "color": "#e47adc", "checked": true, "name": "旱土" }, { "color": "#bce54e", "checked": true, "name": "园地" }, { "color": "#4d58aa", "checked": true, "name": "林地" }, { "color": "#bbcd8a", "checked": true, "name": "农村道路" }, { "color": "#c4f69e", "checked": true, "name": "坑塘水面" }, { "color": "#67b70a", "checked": true, "name": "农田水利" }, { "color": "#c47640", "checked": true, "name": "宅基地" }, { "color": "#eabf44", "checked": true, "name": "未利用地" }],
          asideTabs: [
            {
              component: "projectScheduleStatistics",
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "projectScheduleList",
              name: "详情",
              icon: "icon-home",
            },
          ]
        },
        {
          name: "征收土地分析",
          command: "specialAside",
          iconClass: "gisicon icon-tudi",
          projectList: [
            { "id": 82, "name": "测试项目" }, { "id": 80, "name": "新马EBD储备地块" }, { "id": 79, "name": "想去嗯" }, { "id": 78, "name": "特烦恼" }, { "id": 77, "name": "2021演示--周" }, { "id": 75, "name": "2020年最新项目" }, { "id": 73, "name": "测试" }, { "id": 70, "name": "西瓜集体测试项目" }, { "id": 68, "name": "测试项目" }, { "id": 59, "name": "ces" }, { "id": 57, "name": "ces" }, { "id": 50, "name": "乙集体项目" }, { "id": 49, "name": "甲集体项目" }, { "id": 47, "name": "丁集体项目" }, { "id": 46, "name": "丙集体项目" }, { "id": 44, "name": "审批集体测试项目" }, { "id": 43, "name": "特---烦恼" }, { "id": 42, "name": "梨子集体项目" }, { "id": 10, "name": "香蕉集体项目" }, { "id": 6, "name": "测试集体项目110号" }, { "id": 4, "name": "集体测试项目" }, { "id": 2, "name": "苹果集体项目" }
          ],
          regionList: [{
            id: 1,
            name: "资阳区",
          },
          {
            id: 2,
            name: "赫山区",
          },],
          asideTabs: [
            {
              component: "landAcquisitionStatistics",
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "landAcquisitionList",
              name: "详情",
              icon: "icon-home",
            },
          ]
        },
        {
          name: "青苗补偿分析",
          command: "specialAside",
          iconClass: "gisicon icon-shu",
          asideTabs: [
            {
              component: "yongCropsStatistics",
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "yongCropsList",
              name: "详情",
              icon: "icon-home",
            },
          ]
        },
        {
          name: "地上附着物分析",
          command: "specialAside",
          iconClass: "gisicon icon-wupinguanli",
          asideTabs: [
            {
              component: "attachmentStatistics",
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "attachmentList",
              name: "列表",
              icon: "icon-home",
            },
          ]
        },
        {
          name: "征收协议分析",
          command: "specialAside",
          iconClass: "gisicon icon-yonghuxieyi",
          asideTabs: [
            {
              component: "collectionAgreeentStatistics",
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "collectionAgreeentList",
              name: "列表",
              icon: "icon-home",
            },
          ]
        },
        {
          name: "安置分布分析",
          command: "specialAside",
          iconClass: "gisicon icon-fangzi",
          asideTabs: [
            {
              component: "placeDistributionStatistics",
              name: "统计",
              icon: "icon-xiangmu",
            },
            {
              component: "placeDistributionList",
              name: "列表",
              icon: "icon-home",
            },
          ]
        },
        {
          name: "抢建违建分析",
          command: "illegalConstructionWidget",
          iconClass: "gisicon icon-weiguichuli",
        },
      ],
    },
    //编辑工具  暂时传空对象代表启用,以后可扩展其他功能 不传则不显示，
    edit: {
      show: true,
    },
  },
  mapType: {
    //底图配置
    show: false,
    posStyle: {
      left: 0,
      top: 0,
      right: 10,
      bottom: 10,
    },
    defaultLayer: [

      {
        title: "测试",
        source: {
          url: "http://116.63.144.253:8080/geowebcache/service/wms",
          params: {
            LAYERS: "yymap",
            FORMAT: "image/png",
            SRS: "EPSG:3857",
            VERSION: "1.1.1",
            EXCEPTIONS: "application/vnd.ogc.se_inimage",
          },
          tileGrid: {
            resolutions: [
              66.1459656252646,
              33.0729828126323,
              16.933367200067735,
              8.466683600033868,
              4.233341800016934,
              2.116670900008467,
              1.0583354500042335,
              0.5291677250021167,
              0.26458386250105836,
              0.13229193125052918,
            ],
            origin: [-5123200.0, 1.00021e7],
            tileSize: [256, 256],
          },
        },
      },
      {
        title: "益阳项目",
        // title: "百度",
        source: {
          url: "http://116.63.144.253:8080/geowebcache/service/wms",
          params: {
            LAYERS: "pros",
            FORMAT: "image/png",
            SRS: "EPSG:3857",
            VERSION: "1.1.1",
            EXCEPTIONS: "application/vnd.ogc.se_inimage",
          },
          tileGrid: {
            //切片config.xml里面有
            resolutions: [33.0729828126323, 16.933367200067735, 8.466683600033868, 4.233341800016934, 2.116670900008467,
              1.0583354500042335, 0.5291677250021167, 0.26458386250105836, 0.13229193125052918, 0.06614596562526459,
              0.033072982812632296
            ],
            origin: [-5123200.0, 1.00021e7],
            tileSize: [256, 256],
          },
        },
      },
    ], //当前使用的底图
  },
};
