css樣式 在designer.css desing.css
~~~
/* 表格圖例 */
.zuan_tag>li{
display: inline-block;
cursor: pointer;
}
~~~
main.html 里 加開啟組件html片段
~~~
<div ng-switch-when="drillDownSelect">
<div class="col col-xs-5" style="line-height:30px;">
{{element.title}}
</div>
<div class="col col-xs-7" style2="max-height:300px; overflow-y:auto;padding-right:10px !important;">
<ui-select multiple sortable="true" close-on-select="false" ng-model="component.config[element.bind].drillDown" theme="select2" ng-disabled="disabled" style="width:100%;">
<ui-select-match placeholder="">{{$item.label}}</ui-select-match>
<ui-select-choices repeat="item in component.config.datasourceConfig.metadataConfig.metadataTable.modelInfo.dimensions | filter:$select.search">
<span ng-bind-html="item.label | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</div>
</div>
~~~
vs-component-widget-grid。js
// 3357行
d.internalBuildColumnDescription(t, m, o, n, q); 下面
~~~
var x = {
name: "zuanqu",
title: "數據鉆取",
groups: []
};
x.groups.push({
name: "",
title: {
text: "數據鉆取"
},
elements: [
{
title: "下鉆開啟",
bind: "drilling_show",
type: "switch-55",
on: vsLang.on,
off: vsLang.off
}]
});
if (t.component.config.datasourceConfig == null) {
t.component.config.datasourceConfig = {}
}
var U = function() {
return t.component.config.datasourceConfig != null && t.component.config.datasourceConfig.metadataConfig != null && t.component.config.datasourceConfig.metadataConfig.metadataTable != null && t.component.config.datasourceConfig.datasourceType == "metadata"
};
x.groups.push({
show: U,
title: {
text: "維度選擇"
},
elements: [{
title: "選擇"+vsLang.dimension,
type: "drillDownSelect",
bind: "datasourceConfig"
}]
});
var ac = null;
if (t.component.config.datasourceConfig.metadataConfig != null) {
ac = t.component.config.datasourceConfig.metadataConfig.metadataTable.modelInfo
}
x.groups.push({
name: "",
title: {
text: "圖例"
},
elements: [{
title: "開啟-關閉",
type: "switch",
bind: "drilling_tu",
on: vsLang.on,
off: vsLang.off,
},
{
title: "水平位置",
type: "radio-icon",
bind: "legendPosX",
items: [{
name: "左對齊",
value: "left",
icon: "fa fa-align-left"
},{
name: "居中",
value: "center",
icon: "fa fa-align-center"
},{
name: "右對齊",
value: "right",
icon: "fa fa-align-right"
}]
},{
title: vsLang.font_color,
type: "colorpicker",
bind: "drilling_color"
}]
});
console.log(x)
// 監聽數據鉆取開啟與關閉
t.$watch("component.config.drilling_show", function (v, u) {
var p = o.config.chartConfig;
if (v != null && (u == null || u !== v)) {
// console.log(v)
o.config.drilling_show = v;
console.log(o.config.drilling_show)
}
});
// 轉取方式
t.$watch("component.config.drillingType", function (v, u) {
var p = o.config.chartConfig;
if (v != null && (u == null || u !== v)) {
console.log(v)
console.log(u)
}
});
// 顯示或隱藏
t.$watch("component.config.drilling_tu", function (v, u) {
if (v != null && (u == null || u !== v)) {
var p = o.config.chartConfig;
console.log(v)
if(v == true){
p.drillingShow = 'block'
console.log(p)
o.context.chart.setOption(p)
}else if(v == false){
p.drillingShow = 'none'
console.log(p)
o.context.chart.setOption(p)
}
}
});
// 新增加
// end
// 字體顏色
t.$watch("component.config.drilling_color", function (w, u) {
if (w != null && g.isValidColor(w)) {
var v = o.config.chartConfig;
v.drilling_color = w;
o.context.chart.setOption(v)
}
});
// 垂直方向
// t.$watch('component.config.legendPosY', function(w, u){
// if(w != null && (u == null || w !== u)){
// var v = o.config.chartConfig;
// v.legendPosY = w;
// console.log(v.legendPosY)
// o.context.chart.setOption(v)
// }
// });
//水平方向
t.$watch('component.config.legendPosX', function(w, u){
if(w != null && (u == null || w !== u)){
var v = o.config.chartConfig;
v.drilling_x = w;
console.log(v.drilling_x)
o.context.chart.setOption(v)
}
});
o.description.categories.push(x);
// end
~~~


# 分別添加 在design.js也就是分享頁 也要添加這兩行代碼
`o.push("<div class='zuan_tag' style='width:100%;right:0;height:40px;line-height:40px;' ng-style=\"{'display':component.config.drilling_tu?'block':'none' ,'color':component.config.drilling_color ,'text-align':component.config.legendPosX }\" ><li ng-repeat='item in component.config.datasourceConfig.drillDown'>{{ item.label }}>></li></div>");`

# 添加這行代碼
`s.config.drillDown = true;`
# 在點擊事件里添加


搜索component.config.chartConfig.onRowSelected = function(d, i, orgIndex) { 可以找到代碼位置
具體添加代碼如下:
~~~
// 判斷下鉆
if(i==orgIndex && component.config.drilling_show === true){
isACtive = true;
// console.log(index)
var d = component.config.datasourceConfig.dimensions;
if(index <=number.length ){
alert("111")
index++;
number[index] = d[0];
// component.config.datasourceConfig.drillDown = component.config.datasourceConfig.dimensions;
// component.config.datasourceConfig.drillDown[index] = component.config.datasourceConfig.dimensions[index];
newDimensions.push(component.config.datasourceConfig.drillDown[index]);
console.log(component.config.datasourceConfig.drillDown[index+1])
}
// number.push(d[0])
// console.log(number)
console.log(component.config.datasourceConfig.drillDown)
function test(){
var dimensions = component.config.datasourceConfig.drillDown;
var measures = component.config.datasourceConfig.measures;
if (dimensions && dimensions.length > 0) {
scope.component.config.showDimensionBar = true;
console.log(dimensions)
scope.queryModelData({
eventParam: {},
dimensions: dimensions,
measures: measures,
tableKey: component.config.datasourceConfig.metadataConfig.metadataTable.key,
number:{
data:number,
paramKeys:component.config.datasourceConfig.drillDown,
newDimensions:newDimensions
},
onQuerySuccess: function(response) {
if (response.data.success) {
console.log(response.data)
refreshChartView();
// console.log('kanaknkankan')
console.log(component.config.chartConfig.data)
} else {
console.log(response.data.message)
}
},
onError: function() {}
})
}
}
scope.$on(event_refreshBindingData,test() )
}
~~~
搜索代碼上面添加這個
~~~
var dril = (component.config.datasourceConfig.drillDown.length);
var number = new Array(dril)
for(var i = 0;i < dril;i++){
number[i]='';
}
var newDimensions = [];
// console.log(number)
var index = -1;
~~~
# engine.js 查看最終參數變化的位置

查看具體代碼變化的主要字段 數組的順序索引要保持一致 不然沒有數據

- 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說明文檔
- 色斑圖加透明