Commit ada8912c authored by zhengjiangtao's avatar zhengjiangtao

新增站端页面及离线地图

parent deb27ef9
......@@ -7,14 +7,14 @@
Amos.config = {
// 普通http
httpURI: {
baseURI: 'http://127.0.0.1:10005/',
baseURI: 'http://127.0.0.1:10005/'
//设计器数据绑定
// dataBindUrl: 'http://172.16.10.91:8083/api/visual/common/dataBind'
},
// websocket 地址
wsURI: {
baseURI: 'ws://172.16.10.91:10600/',
ruleURI: 'ws://172.16.3.63:8083/',
ruleURI: 'ws://172.16.3.63:8083/'
},
// 外部链接地址
outterURI: {
......@@ -34,6 +34,8 @@
isAutoOpenBussiness: true,
//是否全景监控显示ue4
is3dUe4: false,
//内外部地图加载,outMap是true 使用离线地图, false使用在线地图
outMap: true,
convertor: {
// 设置3d页面统计配置
mapLevelconfig: {
......@@ -103,7 +105,14 @@
code: 2,
value: 1
}
}
},
//地图中心点
mapCenter: [108.90771484, 35.93184115],
//地图zoom显示级别
showZoom: [7, 13, 18],
//离线地图地址
picURI: 'http://172.16.3.121:8001/'
};
// 配置日志系统
......
# 高德地图离线API
1. 将整个amap目录拷贝到tomcat/webapps目录下
2. 下载瓦片,将瓦片拷贝到amap/tiles目录下
3. 启动tomcat,访问[http://localhost:8080/amap/index.html](http://localhost:8080/amap/index.html)
备注:
高德地图离线版本version: 1.4.6 <br>
插件下载地址: <br>
http://webapi.amap.com/maps/modules?v=1.4.6&key=YOUR_KEY&vrs=1525262380887&m=AMap.IndoorMap3D <br>
样式表下载地址: <br>
http://vdata.amap.com/style?v=1.4.6&key=YOUR_KEY&mapstyle=normal <br>
图片下载域名: <br>
http://webapi.amap.com <br>
http://vdata.amap.com <br>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>amap</display-name>
<!--CORS 跨域资源访问
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.headers</param-name>
<param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
</init-param>
<init-param>
<param-name>cors.exposed.headers</param-name>
<param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
</init-param>
<init-param>
<param-name>cors.support.credentials</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>cors.preflight.maxage</param-name>
<param-value>10</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
</web-app>
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
AMapUI.define([], function() {
function getScale(level) {
scaleCache[level] || (scaleCache[level] = 256 * Math.pow(2, level));
return scaleCache[level];
}
function project(lnglat) {
var lat = Math.max(Math.min(maxLat, lnglat[1]), -maxLat), x = lnglat[0] * deg2rad, y = lat * deg2rad;
y = Math.log(Math.tan(quadPI + y / 2));
return [ x, y ];
}
function transform(point, scale) {
scale = scale || 1;
var a = half2PI, b = .5, c = -a, d = .5;
return [ scale * (a * point[0] + b), scale * (c * point[1] + d) ];
}
function unproject(point) {
var lng = point[0] * rad2deg, lat = (2 * Math.atan(Math.exp(point[1])) - Math.PI / 2) * rad2deg;
return [ parseFloat(lng.toFixed(6)), parseFloat(lat.toFixed(6)) ];
}
function untransform(point, scale) {
var a = half2PI, b = .5, c = -a, d = .5;
return [ (point[0] / scale - b) / a, (point[1] / scale - d) / c ];
}
function lngLatToPointByScale(lnglat, scale, round) {
var p = transform(project(lnglat), scale);
if (round) {
p[0] = Math.round(p[0]);
p[1] = Math.round(p[1]);
}
return p;
}
function lngLatToPoint(lnglat, level, round) {
return lngLatToPointByScale(lnglat, getScale(level), round);
}
function pointToLngLat(point, level) {
var scale = getScale(level), untransformedPoint = untransform(point, scale);
return unproject(untransformedPoint);
}
function haversineDistance(point1, point2) {
var cos = Math.cos, lat1 = point1[1] * deg2rad, lon1 = point1[0] * deg2rad, lat2 = point2[1] * deg2rad, lon2 = point2[0] * deg2rad, dLat = lat2 - lat1, dLon = lon2 - lon1, a = (1 - cos(dLat) + (1 - cos(dLon)) * cos(lat1) * cos(lat2)) / 2;
return earthDiameter * Math.asin(Math.sqrt(a));
}
var scaleCache = {}, earthDiameter = 12756274, deg2rad = Math.PI / 180, rad2deg = 180 / Math.PI, quadPI = Math.PI / 4, maxLat = 85.0511287798, half2PI = .5 / Math.PI;
return {
haversineDistance: haversineDistance,
getScale: getScale,
lngLatToPointByScale: lngLatToPointByScale,
pointToLngLat: pointToLngLat,
lngLatToPoint: lngLatToPoint
};
});
\ No newline at end of file
AMapUI.define([ "lib/utils" ], function(utils) {
"use strict";
function Event() {
this.__evHash = {};
}
utils.extend(Event.prototype, {
on: function(ev, listener, priority) {
if (this.__multiCall(ev, listener, this.on)) return this;
if (!ev) return this;
var evHash = this.__evHash;
evHash[ev] || (evHash[ev] = []);
var list = evHash[ev], index = this.__index(list, listener);
if (index < 0) {
"number" != typeof priority && (priority = 10);
for (var inps = list.length, i = 0, len = list.length; i < len; i++) if (priority > list[i].priority) {
inps = i;
break;
}
list.splice(inps, 0, {
listener: listener,
priority: priority
});
}
return this;
},
once: function(ev, listener, priority) {
function oncefunc() {
self.__callListenser(listener, arguments);
self.off(ev, oncefunc);
}
if (this.__multiCall(ev, listener, this.once)) return this;
var self = this;
this.on(ev, oncefunc, priority);
return this;
},
offAll: function() {
for (var ev in this.__evHash) this.off(ev);
this.__evHash = {};
return this;
},
off: function(ev, listener) {
if (this.__multiCall(ev, listener, this.off)) return this;
var evHash = this.__evHash;
if (evHash[ev]) {
var list = evHash[ev];
if ("undefined" == typeof listener) {
var c = list.length;
list.length = 0;
return c;
}
var index = this.__index(list, listener);
if (index >= 0) {
list.splice(index, 1);
return 1;
}
return 0;
}
},
listenerLength: function(ev) {
var evHash = this.__evHash, list = evHash[ev];
return list ? list.length : 0;
},
emit: function(ev) {
var args, list, evHash = this.__evHash, count = 0;
list = evHash[ev];
if (list && list.length) {
args = Array.prototype.slice.call(arguments, 1);
count += this.__callListenerList(list, args);
}
list = evHash["*"];
if (list && list.length) {
args = Array.prototype.slice.call(arguments);
count += this.__callListenerList(list, args);
}
return count;
},
trigger: function(ev) {
var args = Array.prototype.slice.call(arguments, 0);
args.splice(1, 0, {
type: ev,
target: this
});
this.emit.apply(this, args);
},
triggerWithOriginalEvent: function(ev, originalEvent) {
var args = Array.prototype.slice.call(arguments, 0);
args[1] = {
type: ev,
target: originalEvent ? originalEvent.target : this,
originalEvent: originalEvent
};
this.emit.apply(this, args);
},
onDestroy: function(cb, priority) {
this.on("__destroy", cb, priority);
return this;
},
destroy: function() {
if (!this.__destroying) {
this.__destroying = 1;
this.emit("__destroy", this);
this.offAll();
return this;
}
},
__multiCall: function(ev, listener, func) {
if (!ev) return !0;
if (utils.isObject(ev) && "undefined" == typeof listener) {
for (var k in ev) func.call(this, k, ev[k]);
return !0;
}
var evs;
utils.isArray(ev) ? evs = ev : "string" == typeof ev && (evs = ev.split(/[\s,]+/));
if (evs && evs.length > 1) {
for (var i = 0, len = evs.length; i < len; i++) evs[i] && func.call(this, evs[i], listener);
return !0;
}
return !1;
},
__index: function(list, listener) {
for (var index = -1, i = 0, len = list.length; i < len; i++) {
var ele = list[i];
if (ele.listener === listener) {
index = i;
break;
}
}
return index;
},
__callListenser: function(listener, args) {
var func = null, contxt = null;
if ("function" == typeof listener) {
func = listener;
contxt = this;
} else if (2 == listener.length) {
func = listener[1];
contxt = listener[0];
}
return func ? [ 1, func.apply(contxt, args) ] : [ 0, void 0 ];
},
__callListenerList: function(list, args) {
if (!list || !list.length) return 0;
list = [].concat(list);
for (var cres, count = 0, i = 0, len = list.length; i < len; i++) {
cres = this.__callListenser(list[i].listener, args);
count += cres[0];
if (cres[1] === !1) break;
}
return count;
}
});
return Event;
});
\ No newline at end of file
AMapUI.define([], function() {
function setLogger(logger) {
logger.debug || (logger.debug = logger.info);
utils.logger = utils.log = logger;
}
var utils, defaultLogger = console, emptyfunc = function() {}, slientLogger = {
log: emptyfunc,
error: emptyfunc,
warn: emptyfunc,
info: emptyfunc,
debug: emptyfunc,
trace: emptyfunc
};
utils = {
slientLogger: slientLogger,
setLogger: setLogger,
mergeArray: function(target, source) {
if (source.length < 1e5) target.push.apply(target, source); else for (var i = 0, len = source.length; i < len; i += 1) target.push(source[i]);
},
setDebugMode: function(on) {
setLogger(on ? defaultLogger : slientLogger);
},
now: Date.now || function() {
return new Date().getTime();
},
bind: function(fn, thisArg) {
return fn.bind ? fn.bind(thisArg) : function() {
return fn.apply(thisArg, arguments);
};
},
domReady: function(callback) {
/complete|loaded|interactive/.test(document.readyState) ? callback() : document.addEventListener("DOMContentLoaded", function() {
callback();
}, !1);
},
forEach: function(array, callback, thisArg) {
if (array.forEach) return array.forEach(callback, thisArg);
for (var i = 0, len = array.length; i < len; i++) callback.call(thisArg, array[i], i);
},
keys: function(obj) {
if (Object.keys) return Object.keys(obj);
var keys = [];
for (var k in obj) obj.hasOwnProperty(k) && keys.push(k);
return keys;
},
map: function(array, callback, thisArg) {
if (array.map) return array.map(callback, thisArg);
for (var newArr = [], i = 0, len = array.length; i < len; i++) newArr[i] = callback.call(thisArg, array[i], i);
return newArr;
},
arrayIndexOf: function(array, searchElement, fromIndex) {
if (array.indexOf) return array.indexOf(searchElement, fromIndex);
var k, o = array, len = o.length >>> 0;
if (0 === len) return -1;
var n = 0 | fromIndex;
if (n >= len) return -1;
k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
for (;k < len; ) {
if (k in o && o[k] === searchElement) return k;
k++;
}
return -1;
},
extend: function(dst) {
dst || (dst = {});
return utils.extendObjs(dst, Array.prototype.slice.call(arguments, 1));
},
nestExtendObjs: function(dst, objs) {
dst || (dst = {});
for (var i = 0, len = objs.length; i < len; i++) {
var source = objs[i];
if (source) for (var prop in source) source.hasOwnProperty(prop) && (utils.isObject(dst[prop]) && utils.isObject(source[prop]) ? dst[prop] = utils.nestExtendObjs({}, [ dst[prop], source[prop] ]) : dst[prop] = source[prop]);
}
return dst;
},
extendObjs: function(dst, objs) {
dst || (dst = {});
for (var i = 0, len = objs.length; i < len; i++) {
var source = objs[i];
if (source) for (var prop in source) source.hasOwnProperty(prop) && (dst[prop] = source[prop]);
}
return dst;
},
subset: function(props) {
var sobj = {};
if (!props || !props.length) return sobj;
this.isArray(props) || (props = [ props ]);
utils.forEach(Array.prototype.slice.call(arguments, 1), function(source) {
if (source) for (var i = 0, len = props.length; i < len; i++) source.hasOwnProperty(props[i]) && (sobj[props[i]] = source[props[i]]);
});
return sobj;
},
isArray: function(obj) {
return Array.isArray ? Array.isArray(obj) : "[object Array]" === Object.prototype.toString.call(obj);
},
isObject: function(obj) {
return "[object Object]" === Object.prototype.toString.call(obj);
},
isFunction: function(obj) {
return "[object Function]" === Object.prototype.toString.call(obj);
},
isNumber: function(obj) {
return "[object Number]" === Object.prototype.toString.call(obj);
},
isString: function(obj) {
return "[object String]" === Object.prototype.toString.call(obj);
},
isHTMLElement: function(n) {
return window["HTMLElement"] || window["Element"] ? n instanceof (window["HTMLElement"] || window["Element"]) : n && "object" == typeof n && 1 === n.nodeType && "string" == typeof n.nodeName;
},
isSVGElement: function(n) {
return window["SVGElement"] && n instanceof window["SVGElement"];
},
isDefined: function(v) {
return "undefined" != typeof v;
},
random: function(length) {
var str = "", chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz", clen = chars.length;
length || (length = 6);
for (var i = 0; i < length; i++) str += chars.charAt(this.randomInt(0, clen - 1));
return str;
},
randomInt: function(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
},
inherit: function(child, parent) {
function Ctor() {
this.constructor = child;
}
for (var key in parent) parent.hasOwnProperty(key) && (child[key] = parent[key]);
Ctor.prototype = parent.prototype;
child.prototype = new Ctor();
child.__super__ = parent.prototype;
return child;
},
trim: function(s) {
return s ? s.trim ? s.trim() : s.replace(/^\s+|\s+$/gm, "") : "";
},
trigger: function(el, evt, detail) {
if (el) {
detail = detail || {};
var e, opt = {
bubbles: !0,
cancelable: !0,
detail: detail
};
if ("undefined" != typeof CustomEvent) {
e = new CustomEvent(evt, opt);
el.dispatchEvent(e);
} else try {
e = document.createEvent("CustomEvent");
e.initCustomEvent(evt, !0, !0, detail);
el.dispatchEvent(e);
} catch (exp) {
this.log.error(exp);
}
return !0;
}
this.log.error("emply element passed in");
},
nextTick: function(f) {
("object" == typeof process && process.nextTick ? process.nextTick : function(task) {
setTimeout(task, 0);
})(f);
},
removeFromArray: function(arr, val) {
var index = arr.indexOf(val);
index > -1 && arr.splice(index, 1);
return index;
},
debounce: function(func, wait, immediate) {
var timeout, args, context, timestamp, result, later = function() {
var last = utils.now() - timestamp;
if (last < wait && last >= 0) timeout = setTimeout(later, wait - last); else {
timeout = null;
if (!immediate) {
result = func.apply(context, args);
timeout || (context = args = null);
}
}
};
return function() {
context = this;
args = arguments;
timestamp = utils.now();
var callNow = immediate && !timeout;
timeout || (timeout = setTimeout(later, wait));
if (callNow) {
result = func.apply(context, args);
context = args = null;
}
return result;
};
},
throttle: function(func, wait, options) {
var context, args, result, timeout = null, previous = 0;
options || (options = {});
var later = function() {
previous = options.leading === !1 ? 0 : utils.now();
timeout = null;
result = func.apply(context, args);
timeout || (context = args = null);
};
return function() {
var now = utils.now();
previous || options.leading !== !1 || (previous = now);
var remaining = wait - (now - previous);
context = this;
args = arguments;
if (remaining <= 0 || remaining > wait) {
if (timeout) {
clearTimeout(timeout);
timeout = null;
}
previous = now;
result = func.apply(context, args);
timeout || (context = args = null);
} else timeout || options.trailing === !1 || (timeout = setTimeout(later, remaining));
return result;
};
},
ucfirst: function(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
},
escapeHtml: function(text) {
var map = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#x27;",
"`": "&#x60;"
};
return (text + "").replace(/[&<>"']/g, function(m) {
return map[m];
});
}
};
utils.setDebugMode(!1);
return utils;
});
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
localStorage.clear();
window.offlineMap = {
}
var scripts = document.getElementsByTagName("script");
var curScript = scripts[scripts.length - 1].getAttribute("src");
offlineMap.baseUrl = curScript.substr(0, curScript.lastIndexOf("/")+1);
offlineMap.domain = offlineMap.baseUrl.substr(offlineMap.baseUrl.indexOf("://"), offlineMap.baseUrl.length);
document.write('<script type="text/javascript" src="' + offlineMap.baseUrl + 'js/amap.1.4.6.js?rnd= ' + Math.random() + '"></script>');
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -126,11 +126,9 @@ export const FscSerUrl = {
export const FasSerUrl = {
//====================================新加
regionSelectUrl: completePrefix(baseURI, 'safeuser/save/curCompany'), //保存登录用户信息
selectedOrgInfoUrl: completePrefix(baseURI, 'api/region/current'),//获取选择的公司
//====================================新加
regionSelectUrl: completePrefix(baseURI, 'safeuser/save/curCompany'), //保存登录用户信息
selectedOrgInfoUrl: completePrefix(baseURI, 'api/region/current'),//获取选择的公司
//*******************************************************************************
// 换流站视图
......@@ -260,19 +258,26 @@ selectedOrgInfoUrl: completePrefix(baseURI, 'api/region/current'),//获取选择
queryTopographyByTypeUrl: completePrefix(baseURI, 'api/Topography/query/{type}'),//获取Topo图数据 type
updateTopographyUrl: completePrefix(baseURI, 'api/Topography/updateTopo'),//更新Topo图数据
queryNodeDetailUrl: completePrefix(baseURI, 'api/Topography/detail/{id}'),//获取node节点详情
saveNodeDetailUrl:completePrefix(baseURI, 'api/Topography/detail'),//保存nodeDetail详情
deleteTopoUrl:completePrefix(baseURI, 'api/Topography/{type}/{id}'),//删除点/线
manageLevelEumListUrl: completePrefix(baseURI, 'api/riskLevel/manageLevel/list')//查询管控级别
saveNodeDetailUrl: completePrefix(baseURI, 'api/Topography/detail'),//保存nodeDetail详情
deleteTopoUrl: completePrefix(baseURI, 'api/Topography/{type}/{id}'),//删除点/线
manageLevelEumListUrl: completePrefix(baseURI, 'api/riskLevel/manageLevel/list'),//查询管控级别
dictionaryUrl: completePrefix(baseURI, 'systemctl/v1/dictionary/{code}/values'), // 根据code查询字典
regionProvinceUrl: completePrefix(baseURI, 'systemctl/v1/region/province'), // 字典查询
regionChildren: completePrefix(baseURI, 'systemctl/v1/region/children?parentId={value}'), // 查询省级行政区划数据
saveStationMainten: completePrefix(baseURI, 'api/stationMainten/save'), // 保存站端信息
loadStationMainten: completePrefix(baseURI, 'api/stationMainten/detail') // 获取站端详情
};
export const ModuleEditUrl = {
getAreaTreeUrl:completePrefix(baseURI, 'api/view3d/region/tree'),//
getPointTreeUrl:completePrefix(baseURI, 'api/view3d/point/tree'),
saveAreaDataUrl:completePrefix(baseURI, 'api/view3d/region/bind'),//
getPointTypeUrl:completePrefix(baseURI, 'api/view3d/point/type'),
getPointListUrl:completePrefix(baseURI, 'api/view3d/init3dViewNode'),//获取初始三维点 type=impEquipment&riskSourceId=1
savePointListUrl:completePrefix(baseURI, 'api/view3d/point/bind'),//批量保存点绑定关系
getAreaTreeUrl: completePrefix(baseURI, 'api/view3d/region/tree'),//
getPointTreeUrl: completePrefix(baseURI, 'api/view3d/point/tree'),
saveAreaDataUrl: completePrefix(baseURI, 'api/view3d/region/bind'),//
getPointTypeUrl: completePrefix(baseURI, 'api/view3d/point/type'),
getPointListUrl: completePrefix(baseURI, 'api/view3d/init3dViewNode'),//获取初始三维点 type=impEquipment&riskSourceId=1
savePointListUrl: completePrefix(baseURI, 'api/view3d/point/bind'),//批量保存点绑定关系
};
/**
......
......@@ -55,6 +55,7 @@ const AsyncXJCtrlModel = props => <AsyncLoader load={import('../view/bizview/xun
const AsyncDifferentiate = props => <AsyncLoader load={import('./../view/bizview/intelligentDifferentiate/DifferentiateView')} componentProps={props} />;
const AsyncAlarmVideoMonitor = props => <AsyncLoader load={import('./../view/bizview/alarmVideoMonitor')} componentProps={props} />;
const AsyncAlarmTestView = props => <AsyncLoader load={import('./../view/bizview/alarm')} componentProps={props} />;
const AsyncStationMainten = props => <AsyncLoader load={import('./../view/bizview/stationMainten')} componentProps={props} />;
const AsyncEquipmentAlarmTestView = props => <AsyncLoader load={import('./../view/bizview/situation/equipmentAlarm')} componentProps={props} />;
const AsyncCusVizLib = props => <AsyncLoader load={import('./../view/planMgmt/cusVizLib')} componentProps={props} />;
const AsyncGraph3DModel = props => <AsyncLoader load={import('amos-iot-3dgraph/lib/view/modelMgmt')} componentProps={props} />;
......@@ -112,6 +113,7 @@ const Routes = {
differentiate: AsyncDifferentiate,
alarmVideoMonitor: AsyncAlarmVideoMonitor,
alarmTest: AsyncAlarmTestView,
stationMainten: AsyncStationMainten,
equipmentAlarm: AsyncEquipmentAlarmTestView,
vizlib: AsyncCusVizLib,
modelManage: AsyncGraph3DModel,
......
......@@ -57,6 +57,7 @@ import PanoramicMonitor from './../view/panoramicMonitor';
import LeaderStruct from './../view/planMgmt/view/leaderStruct';
import UserModel from '../view/bizview/user';
import FireRectification from '../view/bizview/fireRectification';
import StationMainten from './../view/bizview/stationMainten/index';
const Routes = {
// 添加 rules 路由
......@@ -101,6 +102,7 @@ const Routes = {
differentiate: DifferentiateView,
alarmVideoMonitor: AlarmVideoMonitor,
alarmTest: alarmTestView,
stationMainten: StationMainten,
vizlib: CusVizLib,
planDrill: PublishView,
modelManage: Graph3DModel,
......
import formatUrl from 'amos-processor/lib/utils/urlFormat';
import { FasSerUrl } from './../consts/urlConsts';
import { commonGet, commonPost } from './../utils/request';
export const queryDictsByCode = (code) => {
return commonGet(formatUrl(FasSerUrl.dictionaryUrl, { code }));
};
export const queryProvinceData = () => {
return commonGet(formatUrl(FasSerUrl.regionProvinceUrl));
};
export const queryRegionChildrenData = value => {
return commonGet(formatUrl(FasSerUrl.regionChildren, { value }));
};
export const queryAllUserAction = () => {
return commonGet(FasSerUrl.getAllUserUrl);
};
export const addStationMaintenAction = (param) => {
return commonPost(FasSerUrl.saveStationMainten, param );
};
export const loadStationMaintenAction = () => {
return commonPost(FasSerUrl.loadStationMainten);
}
.stationMainten-body-left {
width: 100%;
.colspanlab span {
font-size: 14px;
font-weight: 600;
}
.colspanlabV2 span {
font-size: 14px;
}
.left-input {
min-width: 400px;
}
.left-select {
min-width: 200px;
}
.left-textArea {
min-width: 400px;
padding-top: 4px;
padding-bottom: 4px;
}
.left-address-select {
min-width: 105px;
}
.left-address-span {
margin: 0 5px;
font-size: 14px;
}
.left-position-input {
max-width: 150px;
}
.left-btn {
height: 27px;
margin: 0 20px;
font-size: 13px;
font-weight: 600;
background-color: rgba(22, 155, 213, 1);
border-radius: 4px;
}
.left-station-select {
max-width: 150px;
min-width: 145px;
}
}
This diff is collapsed.
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { BaseMap, Marker } from 'amos-amap';
import * as endConf from 'amos-processor/lib/config/endconf';
// import TwoDimensionalMap from './../monitor/2d/index';
const AmosConfig = endConf.AmosConfig;
const outMap = AmosConfig.sysConf.outMap;
const _showZoom = AmosConfig.showZoom;
const _mapCenter = AmosConfig.mapCenter;
const _picURI = AmosConfig.picURI;
const mapConfig = {
zoom: _showZoom[0],
resizeEnable: true,
zoomEnable: true,
// plugins: ['Scale', 'MapType', 'OverView', 'ControlBar'],
plugins: ['Scale'],
zooms: [_showZoom[0], _showZoom[2]],
expandZoomRange: true,
doubleClickZoom: false,
showIndoorMap: false, //隐藏地图自带的室内地图图层
features: ['bg', 'road', 'point'] //隐藏默认楼块
};
const layers = [
new window.AMap.TileLayer({
getTileUrl(x, y, z) {
return `${_picURI}shanxi/amap/${z}/${x}/${y}.png`;
},
zIndex: 0
})
];
/**
* @class IndexMap
* @extends {Component}
* @description 首页地图
*/
class IndexMap extends Component {
static propTypes = {
pushMarkerPoint: PropTypes.func
};
constructor(props) {
super(props);
this.state = {
mapCenter: _mapCenter,
center: { longitude: 108.93984, latitude: 34.34127 },
marker: { longitude: 0, latitude: 0 },
// marker: { longitude: null, latitude: null },
visible: true,
style: { strokeColor: '#10A100', fillColor: '#10A100' },
city: 'xian',
type: 'small' //当前图层展示的末端marker标识
};
}
/**
* 加载全局地图
*/
setInstanceToGlobal = inst => {
this.map = inst;
window.map = inst;
};
/**
* 地图选点
* @memberof IndexMap
*/
handleClickMap = e => {
let { marker } = this.state;
marker.longitude = e.lnglat.lng;
marker.latitude = e.lnglat.lat;
this.setState({ marker });
this.props.pushMarkerPoint(marker);
}
render() {
const events = {
created: this.setInstanceToGlobal,
click: this.handleClickMap
};
let { mapCenter, marker } = this.state;
if (outMap) {
mapConfig.layers = layers;
}
return (
<div className="content indexPage" style={{ height: '614px' }}>
<BaseMap events={events} center={mapCenter} {...mapConfig} >
<Marker position={marker} key={marker.longitude} />
</BaseMap>
</div>
);
}
}
// IndexMap.PropTypes = {
// pushMarkerPoint: PropTypes.func
// };
export default IndexMap;
......@@ -7,7 +7,17 @@
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="application/javascript" src="/amos.config.js"></script>
<!-- <script src="http://webapi.amap.com/maps?v=1.4.3&key=8afbcd8006fcd36a22136ef20a12456a"></script> -->
<title>IFC100消防指挥系统</title>
<script>
window.offlineMap = {
}
var scripts = document.getElementsByTagName("script");
var curScript = scripts[0].getAttribute("src");
offlineMap.baseUrl = window.location.origin + '/';
offlineMap.domain = offlineMap.baseUrl.substr(offlineMap.baseUrl.indexOf("://"), offlineMap.baseUrl.length);
</script>
<style>
.startload {
position: fixed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment