<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ~~~ // 這個重要 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, {}) } }] }) }) } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看