文件:D:\ireport365\ireport365.war\WEB-INF\classes\report-resource\design.js
搜索buildBaiduMapComponent 方法 整个替换
```
var buildBaiduMapComponent = function (scope, element) {
var component = scope.component;
var mapDomId = "map_" + component.id;
var html = [];
html.push("<div style='height:100%;width:100%;'>");
html.push(" <div id='" + mapDomId + "' style='font-size:14px;height:100%;width:100%;'>");
html.push(" </div>");
html.push(" <div class='baidumap-control-bar' ng-show='component.config.showToolbar' id='controlBar' style='position:absolute;right:10px;bottom:10px;width:32px;height: 98px;'>");
html.push(" <div class='cbtn' id='locationBtn' style='padding-top:8px;'>");
html.push(" <i style='font-size:18px;' class='fa fa-crosshairs'></i>");
html.push(" </div>");
html.push(" <div class='cbtn' id='zoomInBtn' style='margin-top:5px;'>");
html.push(" <i class='fa fa-plus'></i>");
html.push(" </div>");
html.push(" <div class='cbtn' id='zoomOutBtn' style='border-top:1px solid #ccc;'>");
html.push(" <i class='fa fa-minus'></i>");
html.push(" </div>");
html.push(" </div>");
html.push("</div>");
var el = $compile(html.join(""))(scope);
element.html(el);
var chart = new VSBaiduMap({
width: element.width(),
height: element.height(),
mapDomId: mapDomId,
dom: element[0]
});
component.context.chart = chart;
var option = component.config.chartConfig;
option.onOverlayTooltipPanelClicked = function (overlayTooltip, overlayItem) {
scope.onComponentClickEvent(scope.component, false, {
click: overlayTooltip.eventConfig
})
};
option.onOverlayItemClicked = function (overlayItem) {
if (scope.component.config.linkageDimension == null) {
alert("未配置联动维度");
return
}
var value = overlayItem[scope.component.config.linkageDimension.name];
if (component.config.pageFilter != null && component.config.pageFilter === true && (scope.component.config.rangeFilter == null || scope.component.config.rangeFilter === false)) {
scope.cacheDimensionValue(scope.component.config.linkageDimension.name, value);
$timeout(function () {
scope.notifyDimensionValueFilterEvent({
queryConditionDimensions: true
})
})
} else {
scope.cacheDimensionValue(scope.component.config.linkageDimension.name, value);
scope.notifyDimensionValueChange(null, scope.component.config.linkageDimension, value)
}
};
option.onMapCenterChanged = function () {
if (component.config.rangeQuery != null && component.config.rangeQuery === true) {
if (component.config.rangeQueryMeters == null) {
component.config.rangeQueryMeters = 10000
}
$timeout(function () {
scope.$parent.queryConditionDimensions = true;
scope.$broadcast(event_refreshBindingData, {})
})
}
};
component.context.resize = function () {
component.context.chart.resize(element.width(), element.height())
};
var refreshOverlay = function (scope, overlayItem, data) {
var imageUrl = null;
if (scope.component.config[overlayItem.overlayImageBind] != null) {
imageUrl = scope.compileUrl(scope.component.config[overlayItem.overlayImageBind])
}
var markerWidth = parseInt(scope.component.config[overlayItem.overlayImageWidthBind]);
if (isNaN(markerWidth)) {
markerWidth = 8
}
var overlay = {
name: scope.component.config[overlayItem.nameBind],
type: scope.component.config[overlayItem.typeBind].value,
marker: {
image: imageUrl,
width: markerWidth
},
data: data
};
var showColumns = scope.component.config["showColumns_" + overlayItem.name];
var tooltipShowColumns = [];
if (showColumns != null) {
for (var n = 0; n < showColumns.length; n++) {
tooltipShowColumns.push({
name: showColumns[n].name,
label: showColumns[n].label
})
}
}
var tooltipBgColor = scope.component.config["bgColor_" + overlayItem.name];
if (!VSUtils.isValidColor(tooltipBgColor)) {
tooltipBgColor = "#2990EA"
}
var tooltipFontColor = scope.component.config["fontColor_" + overlayItem.name];
if (!VSUtils.isValidColor(tooltipFontColor)) {
tooltipFontColor = "#FFFFFF"
}
var borderColor = scope.component.config["borderColor_" + overlayItem.name];
if (!VSUtils.isValidColor(borderColor)) {
borderColor = "#2990EA"
}
var textCenter = scope.component.config["textCenter_" + overlayItem.name];
if (!textCenter) {
textCenter = "#2990EA"
}
var borderWidth = scope.component.config["borderWidth_" + overlayItem.name];
if (!borderWidth) {
borderWidth = 1
}
overlay.tooltip = {
showColumns: tooltipShowColumns,
eventConfig: {},
font: {
color: tooltipFontColor,
textCenter:textCenter,
},
borderWidth:borderWidth,
borderColor:borderColor,
backgroundColor: tooltipBgColor,
formatter: function () {}
};
console.log(scope.component.config["position_" + overlayItem.name].value)
var eventType = scope.component.config["eventType_" + overlayItem.name];
if (eventType != null) {
overlay.tooltip.eventConfig.type = eventType.value;
switch (eventType.value) {
case "openPopupPanel":
overlay.tooltip.eventConfig.reportPage = scope.component.config["reportPage_" + overlayItem.name];
overlay.tooltip.eventConfig.mask = {
show: scope.component.config["hidePopupPanelBgMask_" + overlayItem.name] == null || scope.component.config["hidePopupPanelBgMask_" + overlayItem.name] === false
};
overlay.tooltip.eventConfig.button = {
show: scope.component.config["hideCloseButton_" + overlayItem.name] == null || scope.component.config["hideCloseButton_" + overlayItem.name] === false
};
overlay.tooltip.eventConfig.position = {
name: scope.component.config["position_" + overlayItem.name].value
};
overlay.tooltip.eventConfig.positionFixed = scope.component.config["positionFixed" + overlayItem.name] == null || scope.component.config["positionFixed" + overlayItem.name] === false
// overlay.tooltip.eventConfig.positionFixed = false;
// overlay.tooltip.eventConfig.position = {
// name:'centerPopup'
// }
break
}
}
scope.component.context.chart.renderOverlay(overlay)
};
var loadOverlayData = function (scope, overlayItem) {
var dimensions = scope.component.config.datasourceConfig.dimensions;
var measures = scope.component.config.datasourceConfig.measures;
if (dimensions && dimensions.length > 0) {
scope.component.config.chartDimensionCount = dimensions.length;
scope.queryModelData({
eventParam: {},
dimensions: dimensions,
measures: measures,
overlayItem: overlayItem,
targetDimension: scope.component.config[overlayItem.targetDimensionBind],
includeDimensionValues: scope.component.config[overlayItem.includeDimensionValuesBind],
sqlExpress: scope.component.config[overlayItem.sqlExpressBind],
filterType: scope.component.config[overlayItem.filterTypeBind],
tableKey: scope.component.config.datasourceConfig.metadataConfig.metadataTable.key,
beforeQuery: function (param) {
switch (param.filterType.value) {
case "includeDimensionValues":
if (param.targetDimension != null && !VSUtils.isEmpty(param.includeDimensionValues)) {
param.inKeys.push(param.targetDimension.name);
param.inValues.push(param.includeDimensionValues)
}
break;
case "sqlExpress":
if (!VSUtils.isEmpty(param.sqlExpress)) {
param.filterKeys.push(" ");
param.filterValues.push(param.sqlExpress)
}
break
}
},
onQuerySuccess: function (response, requestParam) {
if (response.data.success) {
refreshOverlay(scope, requestParam.overlayItem, response.data.data.data)
if (scope.component.config.pageFilter != null && scope.component.config.pageFilter === true && scope.component.config.rangeFilter != null && scope.component.config.rangeFilter === true) {
scope.notifyDimensionValueFilterEvent({
queryConditionDimensions: true
})
}
} else {
toaster.error({
body: response.data.message
})
}
},
onError: function () {
toaster.error({
body: vsLang.connection_failed
})
}
})
}
};
var refreshChartView = function (scope, element, component, $compile) {
var option = component.config.chartConfig;
option.mapId = component.id;
option.webKey = component.config.webKey;
option.cacheLastLocation = component.config.cacheLastLocation;
option.showToolbar = component.config.showToolbar;
option.overlays = [];
var overlayItems = scope.component.config.overlayItems;
if (overlayItems != null) {
setTimeout(function () {
for (var m = 0; m < overlayItems.length; m++) {
loadOverlayData(scope, overlayItems[m])
}
},
500)
}
scope.component.context.chart.setOption(option)
};
scope.$on(event_refreshBindingData,
function (target, param) {
if (param != null && param.component != null && scope.component.id === param.component.id) {
return
}
var dimensions = component.config.datasourceConfig.dimensions;
if (dimensions && dimensions.length > 0) {
refreshChartView(scope, element, component, $compile)
}
});
scope.$on(event_chartDimensionValueChange,
function (s, event) {
var dimensions = component.config.datasourceConfig.dimensions;
if (dimensions == null || scope.component.config.linkageDimension == null) {
return
}
if (dimensions != null && event.source.dimension.name === "" + scope.component.config.linkageDimension.name) {
scope.component.context.chart.selectOverlayItemByColumnAndValue({
name: scope.component.config.linkageDimension.name,
value: event.source.value
});
if (scope.component.config.locationLinkage != null && scope.component.config.locationLinkage === true) {
scope.component.context.chart.moveMapCenter({
name: scope.component.config.linkageDimension.name,
value: event.source.value
})
}
}
});
scope.component.context.beforeQuery = function (param) {
var loc = component.context.chart.getMapCenter();
if (loc != null) {
param.rangeCenter = loc.lat + "," + loc.lng
}
};
scope.component.context.getPageFilter = function () {
var result = [];
if (scope.component.context.chart != null && scope.component.config.linkageDimension != null) {
if (scope.component.config.rangeFilter != null && scope.component.config.rangeFilter === true) {
var data = scope.component.context.data;
if (data != null && data.length > 0) {
var values = [];
for (var i = 0; i < data.length; i++) {
values.push(data[i][scope.component.config.linkageDimension.name])
}
result.push({
column: scope.component.config.linkageDimension.name,
exp: "in",
value: values.join(",")
})
} else {
result.push({
column: scope.component.config.linkageDimension.name,
exp: "=",
value: ""
})
}
} else {
var selectedOverlayItem = scope.component.context.chart.getSelectedOverlayItem();
if (selectedOverlayItem != null) {
var value = selectedOverlayItem[scope.component.config.linkageDimension.name];
result.push({
column: scope.component.config.linkageDimension.name,
exp: "=",
value: value
})
}
}
}
return result
};
scope.component.context.shouldNotifyOnConditionDimensionValueChange = function () {
if (component.config.pageFilter != null && component.config.pageFilter === true) {
return false
}
return true
};
scope.component.context.shouldRefreshOnConditionDimensionValueChange = function () {
return false
};
scope.component.context.onConditionDimensionValueChange = function () {}
};
```
文件 WEB-INF\classes\report-resource\design-d3.js
搜索BaiduMapScriptLoader 方法 整个替换
```
var BaiduMapScriptLoader = function (l) {
var m = [];
if (VSEngine.isWebDevice) {
m.push({
url: contextPath + "/libs/pixi/pixi.min.js"
})
} else {
m.push({
url: serverPath + "/libs/pixi/pixi.min.js"
})
}
m.push({
url: "https://api.map.baidu.com/api?v=2.0&s=1&ak=" + l.webKey + "&callback=globalBaiduMapScriptLoader.onTagLoaded",
wait: true
});
var p = 0;
var q = 0;
var k = false;
var o = function () {
baiduMapJavascriptLoaded = true;
l.onLoaded()
};
var j = function (b, a) {
var c = document.createElement("script");
c.setAttribute("src", b);
if (a != null) {
c.onload = a
}
document.head.appendChild(c)
};
var n = function () {
q++;
if (q === m.length) {
o();
return
}
if (p < m.length) {
var a = m[p++];
j(a.url, a.wait ? null : n)
}
};
this.onTagLoaded = n;
this.loadScript = function () {
if (l.webKey == null) {
console.log("请设置地图的WebKEY");
return
}
var a = m[p++];
j(a.url, a.wait ? null : n)
}
};
```
设计页直接 给你文件 也是直接替换
- video
- treemap
- mian.html文件注释
- 配置项tab
- 配置项属性
- internalRefreshAxisMdelData函数梳理
- 函数配置项-engine文件
- 替换数据源流程
- design.js
- 树图
- 下钻 废弃
- 人体图
- 下钻地图
- 行列互转
- 预览样式
- logo旁边的报表名
- echarts 组件生成图片
- 数据集样式
- 头部 黑色head
- 手机 ipad 图片
- k线图部分
- 平台管理css样式
- 目录css和平板的边距
- 设计页-数据源-目录
- 数据集 - 查看数据表 -按钮和目录样式
- 报表列表页按钮css
- 角色管理页按钮css
- 推送通知按钮css
- 子账号按钮css
- 数据连接
- openlayers地图线路图
- openlayers4_map_designer.js
- openlayers4_map_view.js
- 说明
- 常用图标小bug
- echarts 气泡地图
- echarts 线路轨迹图
- 导出pdf
- 可视化sql--css
- 表格滚动
- 主题色
- 时间轴
- 分享弹框
- 管理平台header和菜单
- 报表平台和菜单
- 初始化组件颜色
- 其他弹框
- olap分析样式-废弃
- 3d地图柱状图
- 关系图
- olap分析
- 地区地图
- k线图相关属性设置
- 世界地图
- 时间轴(new)
- 选择省份下转地图
- 选择省市飞线地图
- 面积预警地图默认颜色
- 组件覆层开关组件
- 汽车仪表盘bug
- 雷达图bug修复不能分享的问题
- 饼状 条形图 自动播放
- 临时用
- 自动轮播
- 方形元素 按钮浮动报错
- 面积预警地图整合可选择省市区
- 下钻地图添加返回按钮
- 下钻地图修复预警bug
- 基本时间组件
- 添加时钟组件
- 3d地球组件
- 盒须图
- 组件加载动画
- 报表背景渐变色
- 主题模板
- 没用
- 3机房第三方组件
- 设计
- 分享
- 3d机房需要的静态资源
- cesium地球需要的文件以及样式
- cesium地球
- 设计页
- 分享页
- 图标条形图
- 世豪-前端代码整理
- component.css 文件新添加
- 杂项
- index.jsp
- designer.css 样式暂时不整理 里面比较杂
- vs-common.js 新加生成html2canvas pdf
- vs-component-basic.js 完
- vs-component-datasource.js 完
- vs-component-engine.js 完
- vs-component-widget-grid.js 完
- vs-component-widget-square.js 完
- vs-designer.js 完
- vs-designer-component.js 完
- vs-designer-report.js 完
- vs-designer-reportpage.js 完
- vs-component-echarts.js 完
- main.html 完
- component.html 新加组件设置页模板
- 以前的报表页设置控制器---做个记录
- 大概修改过的代码
- 2019-5-8 修改皮肤控制器
- 选择模板
- 桑基图2019-11-20
- bug 修正 2019-11-21
- 插图柱状图
- cesiumchart组件
- gis 地图 联动 弹框 图标
- 动态面积图添加按钮类配置项
- 玫瑰图形组件
- cesium 图形 和three.js 冲突的bug
- gis 地图 默认图层
- 网格标签
- gis 点图 值域
- gis 面图 值域
- 按钮图标添加提示框
- 百度地图
- 剩余的组件
- gulp说明文档
- 色斑图加透明