~~~
// 這個重要
vsComponentModule.factory("$vcEngine", function () {
// 這個函數是生成每個組件的id
function c() {
function e() {
return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1)
}
return e() + e() + e() + e() + e() + e() + e() + e()
}
// console.log(c())
// 獲取的是圖表和報表元素兩大模塊對象
var a = $vsPluginDescriptions.getCategories();
var b = function (e) {
console.log(e)
this.id = c();
this.type = e.type;
this.category = e.category;
this.group = e.group;
this.title = vsLang.component_title;
this.col = 0;
this.row = 0;
this.sizeY = 2;
this.sizeX = d.device === "phone" ? d.gristerColumns : d.gristerColumns / 2;
this.config = {
backgroundColor: "#FFFFFF",
eventConfig: {},
datasourceConfig: {
bindingConfig: {},
bindingData: {}
}
};
this.description = {};
this.description.categories = []
// debugger
console.log(this)
};
// debugger
var d = {
deivce: null,
// a是圖表和報表元素
categories: a,
gristerColumns: 4,
gristerRowHeight: 20,
componentInitSequence: 1,
draggingComponent: null,
// 初始化 序列
resetComponentInitSequence: function () {
d.componentInitSequence = 1
},
resetComponentContext: function (e) {
e.context = {};
e.context.resize = function () {};
e.context.watchers = [];
e.description = {};
e.description.categories = []
},
// 復制報表
clone: function (f) {
var e = angular.copy(f);
e.context = {};
e.context.resize = function () {};
e.description.categories = [];
e.id = c();
e.config._load_ = null;
return e
},
// 綁定組件
buildComponent: function (f) {
var e = new b({
type: f.type,
category: f.category,
group: f.group
});
this.resetComponentContext(e);
e.row = parseInt($("#gridster").height() / this.gristerRowHeight);
var g = $vsPluginDescriptions.findDescription(f.category, f.type);
if (g && g.onBuildComponent) {
g.onBuildComponent(e)
}
return e
}
};
console.log(d)
return d
});
console.log(vsComponentModule)
// end
// end
// end
// 函數對象初始化
var V = {
name: "function",
title: vsLang.menu_function,
groups: []
};
console.log(V)
console.log(J.showDataCategory)
if (J.showDataCategory) {
s.component.description.categories.push(V);
var I = function (ae) {
// ae傳進來的參數是整個函數的配置項
// 如果沒有數據直接終止程序
if (s.component.config.datasourceConfig == null || s.component.config.datasourceConfig.dimensions == null) {
return
}
// 獲取度量
var Y = s.component.config.datasourceConfig.dimensions;
// 獲取維度
var Z = s.component.config.datasourceConfig.measures;
for (var af = 0; af < Y.length; af++) {
// 這里的值是true
// console.log(s.component.config["sum_" + Y[af].name] == null)
if (s.component.config["sum_" + Y[af].name] == null) {
// 設置為false
s.component.config["sum_" + Y[af].name] = false
}
}
// 如果度量大于o
if (Y.length > 0) {
// 度量合計模塊
var ac = {
title: {
text: vsLang.dimension_summary
},
elements: []
};
for (var af = 0; af < Y.length; af++) {
ac.elements.push({
title: Y[af].label,
bind: "sum_" + Y[af].name,
type: "switch-55",
on: vsLang.on,
off: vsLang.off
})
}
// 度量合計模塊push進ae數組里
// ae是整個函數配置項的對象
ae.push(ac)
}
// 如果y大于0
if (Y.length > 0) {
// 度量合計別名
var ac = {
title: {
text: vsLang.dimension_summary_alias
},
elements: []
};
console.log(ac)
for (var af = 0; af < Y.length; af++) {
ac.elements.push({
title: Y[af].label,
type: "text-input-sl",
dimensionName: Y[af].name,
bind: "summaryAlias_" + Y[af].name,
})
}
ae.push(ac)
}
ae.push({
title: {
text: vsLang.summary
},
// 這個是合記模塊
elements: [{
title: vsLang.position,
type: "radio",
bind: "summaryPosition",
items: [{
name: vsLang.position_first,
value: "first"
}, {
name: vsLang.position_last,
value: "last"
}]
}]
});
// 函數里的數據 腳本
// 數據腳本里的動態數據
var ab = {
title: {
text: vsLang.measures_script
},
// 數據腳本模塊
elements: [{
title: vsLang.measures_script,
type: "script-editor",
bind: "measureScript",
btnClass: "btn-default",
onClick: function (ah) {
e.openScriptEditorWindow(c, b, s, r, ah.bind, "javascript", function () {
b(function () {
s.$broadcast(event_refreshBindingData, {})
})
})
}
}]
};
ae.push(ab);
// Z是所有的度量
// 如果有Z則執行里面的循環體
// 循環出每一個度量
if (Z != null && Z.length > 0) {
if (Z.length > 0) {
for (var af = 0; af < Z.length; af++) {
ab.elements.push({
title: Z[af].label,
type: "text-input-sl",
dimensionName: Z[af].name,
bind: "measureScript_" + Z[af].name,
})
}
}
}
// 數組合并里的top和不包含指定值
var ag = [{
name: "TOP X",
value: "excludeTopX"
}, {
name: "不包含指定值",
value: "excludeValues"
}];
// 數據合并
var ab = {
title: {
// 數據合并
text: vsLang.data_merge
},
elements: [{
// 數據合并
title: vsLang.data_merge,
type: "switch",
bind: "enableDataMerge",
on: vsLang.on,
off: vsLang.off
}, {
// 維度
title: vsLang.dimension,
type: "dimensionDropdownSelect",
bind: "dataMergeDimension",
show: function () {
return s.component.config.enableDataMerge != null && s.component.config.enableDataMerge === true
}
}, {
// 合并值別名
title: vsLang.merge_alias,
type: "text-input-sl-s",
bind: "dataMergeAlias",
show: function () {
return s.component.config.enableDataMerge != null && s.component.config.enableDataMerge === true
}
}, {
// 策略
title: vsLang.merge_strategy,
type: "select-s",
bind: "dataMergeType",
items: ag,
show: function () {
return s.component.config.enableDataMerge != null && s.component.config.enableDataMerge === true
}
}, {
// 值
title: vsLang.value,
type: "text-input-sl-s",
bind: "dataMergeValue",
show: function () {
return s.component.config.enableDataMerge != null && s.component.config.enableDataMerge === true
}
}]
};
ae.push(ab);
var aa = [{
// 默認
name: vsLang.label_default,
value: "sum"
}, {
// 加總
name: vsLang.function_sum,
value: "sum"
}, {
// 平均值
name: vsLang.function_avg,
value: "avg"
}, {
// 計數
name: vsLang.function_count,
value: "count"
}, {
// 最大值
name: vsLang.function_max,
value: "max"
}, {
// 最小值
name: vsLang.function_min,
value: "min"
}];
if (Z != null && Z.length > 0) {
// 度量函數模塊
var ac = {
title: {
text: vsLang.measures_function
},
elements: []
};
for (var af = 0; af < Z.length; af++) {
ac.elements.push({
title: Z[af].label,
type: "select-s",
//這里是循環以名字調用綁定6個函數
bind: "function_" + Z[af].name,
// 這里得aa就是上面的aa對象
items: aa
})
console.log(ac.elements)
}
var ad = s.component.config.datasourceConfig.queryProperties;
if (ad != null && ad.length > 0) {
for (var af = 0; af < ad.length; af++) {
ac.elements.push({
title: ad[af].label,
type: "select-s",
bind: "function_" + ad[af].name,
items: aa
})
}
}
ae.push(ac)
// console.log(ae)
}
};
// 把Z也就是函數右側配置對象傳進去
var v = function (Z) {
if (s.component.config.datasourceConfig != null && s.component.config.datasourceConfig.dimensions != null) {
var ab = s.component.config.datasourceConfig.dimensions;
if (ab.length > 0) {
var Y = {
title: {
text: vsLang.dimension_init_value
},
elements: []
};
for (var aa = 0; aa < ab.length; aa++) {
Y.elements.push({
title: ab[aa].label,
bind: "initValue_" + ab[aa].name,
type: "text-input-sl-s"
})
}
Z.push(Y)
}
}
};
// console.log(Z)
console.log(v)
// 把Z也就是函數右側配置對象傳進去
var y = function (Z) {
console.log(Z)
var Y = {
title: {
text: vsLang.dimension_link
},
elements: [{
title: vsLang.strategy,
type: "radio",
bind: "dimensionLinkage",
items: [{
name: vsLang.auto,
value: "auto"
}, {
name: vsLang.force_match,
value: "force"
}]
}]
};
Z.push(Y)
};
s.$on(event_onCategoryTabSelected, function (Z, aa) {
if (aa.componentId !== s.component.id) {
return
}
if (aa.name !== "function") {
return
}
if (s.component.config.datasourceConfig.metadataConfig == null) {
return
}
// 設置空數組
var Y = [];
console.log(Y)
// 調用這三個函數
v(Y);
I(Y);
y(Y);
V.groups = Y;
// 綁定數據
Y.push({
title: {
text: vsLang.query_properties
},
elements: [{
title: vsLang.properties,
type: "propertyMultiSelect",
bind: "datasourceConfig"
}]
});
Y.push({
title: {
text: "",
show: false
},
// 刷新組件的按鈕模塊里面有click方法
elements: [{
title: vsLang.reload_component,
type: "button",
btnClass: "btn-success",
// 刷新組件的事件
onClick: function () {
s.$parent.queryConditionDimensions = true;
// 接收父控制器數據
s.$broadcast(event_refreshBindingData, {})
}
}]
})
})
}
~~~
- 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說明文檔
- 色斑圖加透明