123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- // 服务端地址
- // const BASE_URI = process.env.VUE_APP_WEB // 利用环境变量
- // const BASE_URI = '/webServer' // 代理模式代理地址
- // const BASE_URI = 'https://www.idea-co-sf.com/settleDownApi'
- const BASE_URI = 'http://10.1.4.70/settleDownApi' // 正式
- const WEB_URL = 'https://2.21.138.147:8080/lifeline' // 正式
- const Scale_Size = null
- // 地图常量
- // 测试
- // const MAP_DEFAULT_ZOOM = 11
- // const MAP_MAX_ZOOM = 19
- // const Max_Scale = 1300
- // const MAP_URL = 'https://js.arcgis.com/4.27/'
- // const MAP_CSS = 'https://js.arcgis.com/4.27/esri/themes/light/main.css'
- // const MAP_BASE_URL = 'http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer'
- // 正式
- // const MAP_DEFAULT_ZOOM = 3
- // const MAP_MAX_ZOOM = getWidth()
- // const Max_Scale = 500
- // const MAP_URL = 'http://2.20.41.2:8083/arcgisjs2.24/arcgis_js_api/javascript/4.24/init.js'
- // const MAP_CSS = 'http://2.20.41.2:8083/arcgisjs2.24/arcgis_js_api/javascript/4.24/esri/themes/light/main.css'
- // const MAP_BASE_URL = 'http://2.21.138.152:6080/geoscene/rest/services/BM/%E7%AE%A1%E7%BA%BF%E6%B7%B1%E8%89%B2%E5%BA%95%E5%9B%BE/MapServer'
- const MAP_DEFAULT_ZOOM = 3
- const MAP_MAX_ZOOM = getWidth()
- const Max_Scale = 500
- // const MAP_URL = 'https://2.21.138.147:8080/mapfile/init.js'
- // const MAP_CSS = 'https://2.21.138.147:8080/mapfile/esri/themes/light/main.css'
- const MAP_URL = 'https://2.21.138.152:8003/arcgisjs2.24/arcgis_js_api/javascript/4.24/init.js'
- const MAP_CSS = 'https://2.21.138.152:8003/arcgisjs2.24/arcgis_js_api/javascript/4.24/esri/themes/light/main.css'
- const MAP_BASE_URL = 'https://2.21.138.152:6443/geoscene/rest/services/BM/%E7%AE%A1%E7%BA%BF%E6%B7%B1%E8%89%B2%E5%BA%95%E5%9B%BE/MapServer'
- const MAP_BASE_URL1 = 'https://2.21.138.152:6443/geoscene/rest/services/BM/500%E6%AF%94%E4%BE%8B%E5%B0%BA%E5%9F%BA%E5%87%86/WXSQMAP/MapServer'
- const MAP_BASE_URL2 = 'https://2.21.138.152:6443/geoscene/rest/services/BM/500%E6%AF%94%E4%BE%8B%E5%B0%BA%E5%9F%BA%E5%87%86/2022wxsqdom1/MapServer'
- // 系统常量
- const DATE_PATTERN = {
- DATE_TIME_H: 'yyyy-MM-dd HH:mm:ss',
- DATE_TIME_h: 'yyyy-MM-dd hh:mm:ss',
- DATE_TIME_s_h: 'MM-dd hh:mm',
- DATE: 'yyyy-MM-dd',
- MONTH: 'yyyy-MM',
- TIME: 'hh:mm:ss'
- }
- function getWidth() {
- // 屏幕小于4800px时降低聚合点放大层级,防止过度放到看不到点位
- // if(window.screen.width<=4800){
- return 7
- // }
- }
- // 0-燃气,1-内涝,2-供水,3-施工工程,4-地下管线,5-桥梁,6-道路,
- const SCENE_MAP = new Map()
- .set('0', '燃气')
- .set('1', '内涝')
- .set('2', '供水')
- .set('5', '桥梁')
- .set('6', '道路')
- .set('4', '地下管线')
- .set('3', '第三方施工') // 对照表
- const RISK_GRADE = new Map()
- .set('重大', '4')
- .set('较大', '3')
- .set('一般', '2')
- .set('低', '1')
- const SHIJIAN_GRADE = new Map()
- .set('重大', '4')
- .set('较大', '3')
- .set('一般', '2')
- .set('低', '1')
- const YINHUAN_GRADE = new Map()
- .set('重大', '4')
- .set('较大', '3')
- .set('一般', '2')
- .set('低', '1')
- const AREA_MAP = new Map()
- .set('梁溪区', '320213')
- .set('滨湖区', '320211')
- .set('惠山区', '320206')
- .set('新吴区', '320214')
- .set('锡山区', '320205')
- .set('经开区', '320299')
- .set('江阴市', '320281')
- .set('宜兴市', '320282')
- const PARAM_TYPE = [
- { value: 'string', label: 'string' },
- { value: 'date', label: 'date' },
- { value: 'time', label: 'time' },
- { value: 'datetime', label: 'datetime' },
- { value: 'number', label: 'number' }
- ]
- const PICKER_OPTION = {
- shortcuts: [
- {
- text: '最近一周',
- onClick: function(picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
- picker.$emit('pick', [start, end])
- }
- },
- {
- text: '最近一个月',
- onClick: function(picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
- picker.$emit('pick', [start, end])
- }
- },
- {
- text: '最近三个月',
- onClick: function(picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
- picker.$emit('pick', [start, end])
- }
- }
- ]
- }
- const KEY_RESULT = 'result'
- const KEY_TOKEN = 'token'
- const KEY_USER = 'user_'
- const KEY_USER_TYPE = 'userType' // 用户模式 : 平台管理 - 1 , 合作方管理 - 2
- const KEY_BIZ = 'biz_'
- const KEY_CODE = 'code'
- const KEY_MSG = 'msg'
- const KEY_MSG_ORDER = 'msgOrder'
- const KEY_USER_MENU = 'menu'
- // 业务常量
- export default {
- Scale_Size,
- Max_Scale, // 不聚合最大层级
- /* 服务端地址*/
- BASE_URI,
- WEB_URL,
- /* 系统常量*/
- // 时间模版
- DATE_PATTERN,
- // 结果关键字
- KEY_RESULT,
- // token关键字
- KEY_TOKEN,
- // 缓存用户key
- KEY_USER,
- KEY_BIZ,
- // 缓存用户类型key
- KEY_USER_TYPE,
- KEY_USER_MENU,
- KEY_CODE,
- KEY_MSG,
- KEY_MSG_ORDER,
- // 系统参数类型
- PARAM_TYPE,
- // 时间简易选项
- PICKER_OPTION,
- // 字典关键字
- /* 业务常量*/
- SCENE_MAP,
- AREA_MAP,
- RISK_GRADE,
- SHIJIAN_GRADE,
- YINHUAN_GRADE,
- MAP_URL,
- MAP_CSS,
- MAP_DEFAULT_ZOOM,
- MAP_MAX_ZOOM,
- MAP_BASE_URL,
- MAP_BASE_URL1,
- MAP_BASE_URL2
- }
|