Message-ID: <1415187495.75917.1711710416530.JavaMail.root@iZbp18oy7vkjyb4wkosfi9Z> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_75916_1234568517.1711710416530" ------=_Part_75916_1234568517.1711710416530 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html =E8=BF=87=E6=BB=A4=E5=99=A8=E6=8E=A7=E4=BB=B6=E6=A8=A1=E6=9D=BF<= /title> <!--[if gte mso 9]> <xml> <o:OfficeDocumentSettings> <o:TargetScreenSize>1024x640</o:TargetScreenSize> <o:PixelsPerInch>72</o:PixelsPerInch> <o:AllowPNG/> </o:OfficeDocumentSettings> <w:WordDocument> <w:View>Print</w:View> <w:Zoom>90</w:Zoom> <w:DoNotOptimizeForBrowser/> </w:WordDocument> </xml> <![endif]--> <style> <!-- @page Section1 { size: 8.5in 11.0in; margin: 1.0in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; } td { page-break-inside: avoid; } tr { page-break-after: avoid; } div.Section1 { page: Section1; } /* Confluence print stylesheet. Common to all themes for print medi= a */ /* Full of !important until we improve batching for print CSS */ @media print { #main { padding-bottom: 1em !important; /* The default padding of 6em is to= o much for printouts */ } body { font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 10pt; line-height: 1.2; } body, #full-height-container, #main, #page, #content, .has-personal-sid= ebar #content { background: #fff !important; color: #000 !important; border: 0 !important; width: 100% !important; height: auto !important; min-height: auto !important; margin: 0 !important; padding: 0 !important; display: block !important; } a, a:link, a:visited, a:focus, a:hover, a:active { color: #000; } #content h1, #content h2, #content h3, #content h4, #content h5, #content h6 { font-family: Arial, Helvetica, FreeSans, sans-serif; page-break-after: avoid; } pre { font-family: Monaco, "Courier New", monospace; } #header, .aui-header-inner, #navigation, #sidebar, .sidebar, #personal-info-sidebar, .ia-fixed-sidebar, .page-actions, .navmenu, .ajs-menu-bar, .noprint, .inline-control-link, .inline-control-link a, a.show-labels-editor, .global-comment-actions, .comment-actions, .quick-comment-container, #addcomment { display: none !important; } /* CONF-28544 cannot print multiple pages in IE */ #splitter-content { position: relative !important; } .comment .date::before { content: none !important; /* remove middot for print view */ } h1.pagetitle img { height: auto; width: auto; } .print-only { display: block; } #footer { position: relative !important; /* CONF-17506 Place the footer at en= d of the content */ margin: 0; padding: 0; background: none; clear: both; } #poweredby { border-top: none; background: none; } #poweredby li.print-only { display: list-item; font-style: italic; } #poweredby li.noprint { display: none; } /* no width controls in print */ .wiki-content .table-wrap, .wiki-content p, .panel .codeContent, .panel .codeContent pre, .image-wrap { overflow: visible !important; } /* TODO - should this work? */ #children-section, #comments-section .comment, #comments-section .comment .comment-body, #comments-section .comment .comment-content, #comments-section .comment p { page-break-inside: avoid; } #page-children a { text-decoration: none; } /** hide twixies the specificity here is a hack because print styles are getting loaded before the base styles. */ #comments-section.pageSection .section-header, #comments-section.pageSection .section-title, #children-section.pageSection .section-header, #children-section.pageSection .section-title, .children-show-hide { padding-left: 0; margin-left: 0; } .children-show-hide.icon { display: none; } /* personal sidebar */ .has-personal-sidebar #content { margin-right: 0px; } .has-personal-sidebar #content .pageSection { margin-right: 0px; } } --> </style> </head> <body> <h1>=E8=BF=87=E6=BB=A4=E5=99=A8=E6=8E=A7=E4=BB=B6=E6=A8=A1=E6=9D=BF</h1= > <div class=3D"Section1"> <p> </p> <p> </p> <h1 id=3D"id-=E8=BF=87=E6=BB=A4=E5=99=A8=E6=8E=A7=E4=BB=B6=E6=A8=A1=E6=9D= =BF-=E3=80=90Designer=E8=84=9A=E6=9C=AC=E6=A8=A1=E6=9D=BF=E3=80=91"><strong= ><span style=3D"color: rgb(0,51,102);">=E3=80=90Designer=E8=84=9A=E6=9C=AC= =E6=A8=A1=E6=9D=BF=E3=80=91</span></strong></h1> <p><span style=3D"color: rgb(0,51,102);"><br></span></p> <div class=3D"code panel pdl" style=3D"border-width: 1px;"> <div class=3D"codeContent panelContent pdl">=20 <pre class=3D"syntaxhighlighter-pre" data-syntaxhighlighter-params=3D"brush= : js; gutter: false; theme: Confluence" data-theme=3D"Confluence">//=E8=AF= =B7=E5=B0=86$vcPlugin_demo_demoEcharts=E4=B8=AD=E7=9A=84demo=E6=8D=A2=E6=88= =90=E7=9B=B8=E5=BA=94=E7=9A=84=E5=88=86=E7=B1=BB=E6=A0=87=E8=AF=86 vsPluginComponentModule.factory('$vcPlugin_demo_demoFilterWidget', ['$vsPlu= ginRegister', '$timeout', function ($vsPluginRegister, $timeout) { var factory =3D { //=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=B8=AD=E6=98=BE=E7=A4=BA[= =E6=95=B0=E6=8D=AE]=E9=85=8D=E7=BD=AE showDataCategory: true, //=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=B8=AD=E6=98=BE=E7=A4=BA[= =E8=BE=B9=E6=A1=86]=E9=85=8D=E7=BD=AE showBorderCategory: true, //=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=B8=AD=E6=98=BE=E7=A4=BA[= =E5=9F=BA=E6=9C=AC]=E9=85=8D=E7=BD=AE showBasicCategory: true, //=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=B8=AD=E6=98=BE=E7=A4=BA[= =E6=B5=AE=E5=8A=A8]=E9=85=8D=E7=BD=AE showFixedCategory: true, //=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=B8=AD=E6=98=BE=E7=A4=BA[= =E4=BA=8B=E4=BB=B6]=E9=85=8D=E7=BD=AE showEventCategory: true, //=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=B8=AD=E6=98=BE=E7=A4=BA[= =E6=A0=87=E9=A2=98]=E9=85=8D=E7=BD=AE showTitleCategory: false, //=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=B8=AD=E6=98=BE=E7=A4=BA[= =E9=A2=84=E8=AD=A6]=E9=85=8D=E7=BD=AE showThresholdCategory: false, /* =E6=8E=A7=E4=BB=B6=E7=9A=84=E5=88=9D=E5=A7=8B=E5=8C=96 */ init: function(scope, element, component, $compile){ scope.element =3D element; scope.component =3D component; //=E5=BC=80=E5=90=AF=E9=A1=B5=E9=9D=A2=E8=BF=87=E6=BB=A4 component.config.pageFilter =3D true; //=E6=8E=A7=E4=BB=B6=E7=9A=84=E5=9B=BE=E5=BD=A2=E7=BB=B4=E5=BA= =A6=E6=95=B0=E9=87=8F=E8=AE=BE=E7=BD=AE=E4=B8=BA1 scope.component.config.chartDimensionCount =3D 1; component.config.selectedItem =3D null; //=E9=85=8D=E7=BD=AE=E9=BB=98=E8=AE=A4=E5=B1=9E=E6=80=A7 if(component.config.inited =3D=3D null){ component.config.inited =3D true; component.config.itemHeight =3D 40; =09=09=09component.config.itemLineHeight =3D 40; =09=09=09//=E6=9C=AA=E9=80=89=E4=B8=AD=E9=A1=B9=E7=9A=84=E8=83=8C=E6=99= =AF=E8=89=B2=E5=92=8C=E5=AD=97=E4=BD=93=E8=89=B2 =09=09=09component.config.itemBgColor =3D "#ffffff"; =09=09=09component.config.itemFontColor =3D "#333333"; =09=09=09//=E9=80=89=E4=B8=AD=E9=A1=B9=E7=9A=84=E8=83=8C=E6=99=AF=E8=89= =B2=E5=92=8C=E5=AD=97=E4=BD=93=E8=89=B2 =09=09=09component.config.selectedItemBgColor =3D "#2990EA"; =09=09=09component.config.selectedItemFontColor =3D "#ffffff"; } }, /* * =E6=9E=84=E5=BB=BA=E6=95=B0=E6=8D=AE=E6=8F=8F=E8=BF=B0=EF=BC=8C= =E6=AD=A4=E6=96=B9=E6=B3=95=E4=B8=AD=E5=AF=B9=E6=8E=A7=E4=BB=B6=E7=9A=84=E6= =95=B0=E6=8D=AE=E8=BF=9B=E8=A1=8C=E5=A4=84=E7=90=86 */ buildDataDescription: function(dataDescription, scope, element, com= ponent, $compile){ //=E6=8E=A5=E6=94=B6=E6=8E=A7=E4=BB=B6=E5=88=B7=E6=96=B0=E6=95= =B0=E6=8D=AE=E7=9A=84=E4=BA=8B=E4=BB=B6 scope.$on(event_refreshComponentData, function(target, param){ //=E5=A6=82=E6=9E=9C=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D=AE=E4= =BA=8B=E4=BB=B6=E7=9A=84=E5=8F=91=E5=87=BA=E8=80=85=E6=98=AF=E5=BD=93=E5=89= =8D=E6=8E=A7=E4=BB=B6=EF=BC=8C=E4=B8=8D=E5=A4=84=E7=90=86=E6=9C=AC=E6=AC=A1= =E9=80=9A=E7=9F=A5 if(param.component !=3D null && scope.component.id = =3D=3D=3D param.component.id){ =09=09=09=09=09return; =09=09=09=09} scope.queryComponentData(param, { onSuccess: function(){ refreshChartView(scope, element, component, $compil= e); } }); }); /* * =E9=A1=B5=E9=9D=A2=E8=BF=87=E6=BB=A4=E5=9B=9E=E8=B0=83=E6=96= =B9=E6=B3=95=EF=BC=8C=E5=85=B6=E5=AE=83=E6=8E=A7=E4=BB=B6=E6=9F=A5=E8=AF=A2= =E6=95=B0=E6=8D=AE=E6=97=B6=E4=BC=9A=E8=B0=83=E7=94=A8=E8=AF=A5=E6=96=B9=E6= =B3=95=EF=BC=8C=E8=8E=B7=E5=8F=96=E8=BF=87=E6=BB=A4=E7=9A=84=E5=B1=9E=E6=80= =A7 * =E5=BD=93component.config.pageFilter=E8=AE=BE=E7=BD=AE=E4=B8= =BAtrue=E6=97=B6=E8=A2=AB=E8=B0=83=E7=94=A8 */ =20 scope.component.context.getPageFilter =3D function(){ =09=09=09=09var result =3D []; =09=09=09=09if(component.config.selectedItem !=3D null){ =09=09=09=09 //=E5=B0=86=E5=9B=BE=E5=BD=A2=E7=BB=B4=E5=BA=A6=E7=9A=84=E5= =80=BC=E9=85=8D=E7=BD=AE=E5=88=B0=E8=BF=87=E6=BB=A4=E9=A1=B9=E4=B8=AD =09=09=09=09=09var value =3D component.config.selectedItem.value =09=09=09=09=09if(value !=3D null && value !=3D=3D vsLang.heji){ =09=09=09=09=09=09result.push({ =09=09=09=09=09=09=09column: scope.getLastDimension().name, =09=09=09=09=09=09=09exp: "=3D", =09=09=09=09=09=09=09value: value =09=09=09=09=09=09}); =09=09=09=09=09} =09=09=09=09} =09=09=09=09return result; =09=09=09} =09=09=09 =09=09=09//=E9=80=89=E6=8B=A9=E9=A1=B9=E8=A2=AB=E9=80=89=E4=B8=AD=E6=97=B6= =EF=BC=8C=E5=8F=91=E5=87=BA=E8=BF=87=E6=BB=A4=E9=80=9A=E7=9F=A5 =09=09=09scope.onItemClicked =3D function(){ =09=09=09=09var value =3D component.config.selectedItem.value; =09=09=09=09//=E5=B0=86=E9=80=89=E4=B8=AD=E9=A1=B9=E7=9A=84=E5=80=BC=E7=BC= =93=E5=AD=98=E8=B5=B7=E6=9D=A5 =09=09=09=09scope.cacheDimensionValue(scope.getLastDimension().name, value)= ; =09=09=09=09$timeout(function(){ =09=09=09=09=09scope.notifyDimensionValueFilterEvent({ =09=09=09=09=09=09queryConditionDimensions: true =09=09=09=09=09}); =09=09=09=09}); =09=09=09} }, /* * =E6=9E=84=E5=BB=BA=E5=9B=BE=E5=BD=A2=E6=8F=8F=E8=BF=B0=EF=BC=8C= =E6=AD=A4=E6=96=B9=E6=B3=95=E4=B8=AD=E5=AE=9A=E4=B9=89=E6=8E=A7=E4=BB=B6=E7= =9A=84=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF */ buildChartDescription: function(scope, element, component, $compile= , $sce){ =09=09=09 =09=09=09scope.isSelectedItem =3D function(item){ =09=09=09=09return component.config.selectedItem !=3D null && ""+it= em.value =3D=3D=3D ""+component.config.selectedItem.value; =09=09=09} =09=09=09 =09=09=09scope.getItemStyle =3D function(item){ =09=09=09=09if(scope.isSelectedItem(item)){ =09=09=09=09=09return { =09=09=09=09 'background-color':component.config.selectedItemBgColor= , =09=09=09=09 'color': component.config.selectedItemFontColor =09=09=09=09 } =09=09=09=09}else{ =09=09=09=09=09return { =09=09=09=09 'background-color':component.config.itemBgColor, =09=09=09=09 'color': component.config.itemFontColor =09=09=09=09 } =09=09=09=09} =09=09=09=09 =20 =09=09=09} =09=09=09 =09=09=09var html =3D []; =09=09=09html.push("<div style=3D'height:100%;overflow-x:auto;overflow-y= :hidden;'>"); =09=09=09html.push(" <div ng-show=3D'component.config.datasourceConfig.d= imensions =3D=3D null' style=3D'height:100%;width:100%;display:table;'>"= ); =09=09=09html.push(" <div style=3D'text-align:center;background-color:#= f0f0f0;vertical-align:middle;display:table-cell;cursor:pointer;'>"); =09=09=09html.push(" =09=E8=AF=B7=E9=85=8D=E7=BD=AE=E6=95=B0=E6=8D=AE=E6= =BA=90"); =09=09=09html.push(" </div>"); =09=09=09html.push(" </div>"); =09=09=09html.push(" <div ng-show=3D'component.config.datasourceConfig.d= imensions !=3D null' style=3D'height:100%;width:100%;display:table;'>"); =09=09=09html.push(" <div style=3D'vertical-align:middle;display:table-= cell;text-align:center;cursor:pointer;word-break: keep-all;white-space:nowr= ap;' ng-style=3D\"getItemStyle(item)\" ng-repeat=3D'item in component.confi= g.optionItems track by $index' ng-model=3D'component.config.selectedItem' n= g-click=3D'onItemClicked()' uib-btn-radio=3D\"item\">"); =09=09=09html.push(" {{item.label}}"); =09=09=09html.push(" </div>"); =09=09=09html.push(" </div>"); =09=09=09html.push("</div>"); =09=09=09 =09=09=09var el =3D $compile(html.join(""))( scope ); =09=09=09element.html(el); =09=09=09 =09=09=09{ =09=09=09=09//=E6=9C=AA=E9=80=89=E4=B8=AD var categoryDesc =3D { =09=09=09=09=09name: "unselected", =09=09=09=09=09title: "=E6=9C=AA=E9=80=89=E4=B8=AD", =09=09=09=09=09groups: [] =09=09=09=09}; =09=09=09=09 =09=09=09=09categoryDesc.groups.push({ =09=09=09=09=09name: "itemBg", =09=09=09=09=09title: { =09=09=09=09=09=09text: "=E8=83=8C=E6=99=AF" =09=09=09=09=09}, =09=09=09=09=09elements: [{ =09=09=09=09=09=09title: "=E9=A2=9C=E8=89=B2", =09=09=09=09=09=09type: "colorpicker", =09=09=09=09=09=09bind: "itemBgColor" =09=09=09=09=09}] =09=09=09=09}); =09=09=09=09 =09=09=09=09categoryDesc.groups.push({ =09=09=09=09=09name: "itemText", =09=09=09=09=09title: { =09=09=09=09=09=09text: "=E6=96=87=E6=9C=AC" =09=09=09=09=09}, =09=09=09=09=09elements: [{ =09=09=09=09=09=09title: "=E5=B0=BA=E5=AF=B8", =09=09=09=09=09=09type: "configSlide", =09=09=09=09=09=09bind: "itemFontSize", =09=09=09=09=09=09config: { =09=09=09=09=09=09=09slideEnd: 100 =09=09=09=09=09=09} =09=09=09=09=09},{ =09=09=09=09=09=09title: "=E9=A2=9C=E8=89=B2", =09=09=09=09=09=09type: "colorpicker", =09=09=09=09=09=09bind: "itemFontColor" =09=09=09=09=09}] =09=09=09=09}); =09=09=09=09 =09=09=09=09component.description.categories.push(categoryDesc); =09=09=09=09 =09=09=09} =09=09=09 =09=09=09{ =09=09=09=09//=E9=80=89=E4=B8=AD var categoryDesc =3D { =09=09=09=09=09name: "selected", =09=09=09=09=09title: "=E9=80=89=E4=B8=AD", =09=09=09=09=09groups: [] =09=09=09=09}; =09=09=09=09 =09=09=09=09categoryDesc.groups.push({ =09=09=09=09=09name: "itemBg", =09=09=09=09=09title: { =09=09=09=09=09=09text: "=E8=83=8C=E6=99=AF" =09=09=09=09=09}, =09=09=09=09=09elements: [{ =09=09=09=09=09=09title: "=E9=A2=9C=E8=89=B2", =09=09=09=09=09=09type: "colorpicker", =09=09=09=09=09=09bind: "selectedItemBgColor" =09=09=09=09=09}] =09=09=09=09}); =09=09=09=09 =09=09=09=09categoryDesc.groups.push({ =09=09=09=09=09name: "itemText", =09=09=09=09=09title: { =09=09=09=09=09=09text: "=E6=96=87=E6=9C=AC" =09=09=09=09=09}, =09=09=09=09=09elements: [{ =09=09=09=09=09=09title: "=E5=B0=BA=E5=AF=B8", =09=09=09=09=09=09type: "configSlide", =09=09=09=09=09=09bind: "selectedItemFontSize", =09=09=09=09=09=09config: { =09=09=09=09=09=09=09slideEnd: 100 =09=09=09=09=09=09} =09=09=09=09=09},{ =09=09=09=09=09=09title: "=E9=A2=9C=E8=89=B2", =09=09=09=09=09=09type: "colorpicker", =09=09=09=09=09=09bind: "selectedItemFontColor" =09=09=09=09=09}] =09=09=09=09}); =09=09=09=09 =09=09=09=09component.description.categories.push(categoryDesc); =09=09=09=09 =09=09=09} =09=09} }; =20 var buildSettingDescription =3D function(scope, element, component, $co= mpile){ //=E6=9E=84=E5=BB=BA[=E8=AE=BE=E7=BD=AE]=E9=85=8D=E7=BD=AE=E9=9D=A2= =E6=9D=BF var category =3D { name: "setting", title: "=E8=AE=BE=E7=BD=AE", groups: [] }; component.description.categories.push(category); category.groups.push({ name: "text", title: { text: "=E6=96=87=E6=9C=AC=E8=AE=BE=E7=BD=AE" }, elements: [{ title: "", type: "text-area", bind: "content" }] }); category.groups.push({ name: "font", title: { text: vsLang.font }, elements: [{ title: "=E5=B0=BA=E5=AF=B8", type: "configSlide", bind: "fontSize", config: { slideStart: 10, slideEnd: 100 } },{ title: "=E5=AF=B9=E9=BD=90", type: "horizontal-align", bind: "textAlign" },{ title: "=E9=A2=9C=E8=89=B2", type: "colorpicker", bind: "color" }] }); } =20 //=E5=88=B7=E6=96=B0=E6=8E=A7=E4=BB=B6=E6=B8=B2=E6=9F=93 var refreshChartView =3D function(scope, element, component, $compile){ var dimensions =3D component.config.datasourceConfig.dimensions; //=E4=BB=8Econtext=E4=B8=AD=E8=8E=B7=E5=BE=97=E6=8E=A7=E4=BB=B6=E6= =95=B0=E6=8D=AE =09=09var data =3D component.context.data; =09=09//=E8=8E=B7=E5=8F=96=E5=9B=BE=E5=BD=A2=E7=BB=B4=E5=BA=A6=E9=BB=98=E8= =AE=A4=E5=80=BC =09=09var initValue =3D scope.parseInitValue(); =09=09//=E8=BF=87=E6=BB=A4=E5=99=A8=E4=B8=AD=E7=9A=84=E9=80=89=E9=A1=B9 =09=09var optionItems =3D []; =09=09//=E5=BD=93=E5=89=8D=E9=80=89=E4=B8=AD=E9=A1=B9 =09=09var selectedItem =3D null; =09=09//=E5=B0=86=E7=BB=B4=E5=BA=A6=E5=80=BC=E8=AE=BE=E7=BD=AE=E4=B8=BA=E8= =BF=87=E6=BB=A4=E5=99=A8=E4=B8=AD=E7=9A=84=E9=80=89=E9=A1=B9 =09=09for(var i =3D 0; i < data.length; i++){ =09=09=09var value =3D data[i][dimensions[dimensions.length-1].name]; =09=09=09var item =3D { =09=09=09=09label: ""+value, =09=09=09=09value: ""+value =09=09=09}; =09=09=09//=E6=A3=80=E6=9F=A5=E5=80=BC=E6=98=AF=E5=90=A6=E6=98=AF=E5=90=88= =E8=AE=A1=EF=BC=8C=E4=B8=AD=E6=96=87=E7=8E=AF=E5=A2=83=E4=B8=8B=E6=98=AF'= =E5=90=88=E8=AE=A1',=E8=8B=B1=E6=96=87=E7=8E=AF=E5=A2=83=E4=B8=8B=E6=98=AF"= All" =09=09=09if(value !=3D null && value =3D=3D=3D vsLang.heji){ =09=09=09 //=E8=8E=B7=E5=8F=96=E5=90=88=E8=AE=A1=E5=88=AB=E5=90=8D =09=09=09=09item.label =3D scope.getDimensionSummaryAlias(dimensions[dimens= ions.length-1].name); =09=09=09} =09=09=09optionItems.push(item); =09=09} =09=09//=E6=A3=80=E6=9F=A5=E6=98=AF=E5=90=A6=E9=85=8D=E7=BD=AE=E4=BA=86=E7= =BB=B4=E5=BA=A6=E9=BB=98=E8=AE=A4=E5=80=BC =09=09if(initValue !=3D null && component.context.first_render_init= _value =3D=3D null){ =09=09=09component.context.first_render_init_value =3D initValue; =09=09=09selectedItem =3D { =09=09=09=09value: initValue, =09=09=09=09label: initValue =09=09=09}; =09=09}else{ =09=09 //=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E9=85=8D=E7=BD=AE=E7=BB=B4= =E5=BA=A6=E9=BB=98=E8=AE=A4=E5=80=BC=EF=BC=8C=E5=B0=9D=E8=AF=95=E4=BB=8E=E7= =BC=93=E5=AD=98=E4=B8=AD=E8=8E=B7=E5=8F=96=E7=BB=B4=E5=BA=A6=E5=80=BC=E4=BD= =9C=E4=B8=BA=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD =09=09=09var cachedSelectedValue =3D scope.getCachedDimensionValue(dimensio= ns[dimensions.length-1].name); =09=09=09for(var i =3D 0; i < optionItems.length; i++){ =09=09=09=09if(""+optionItems[i].value =3D=3D=3D ""+cachedSelectedValue){ =09=09=09=09=09selectedItem =3D optionItems[i]; =09=09=09=09=09break; =09=09=09=09} =09=09=09} =09=09} =09=09scope.component.config.optionItems =3D optionItems; =09=09//=E5=A6=82=E6=9E=9C=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD=E7=9A=84=E5= =80=BC=E4=B8=BA=E7=A9=BA=EF=BC=8C=E5=88=99=E5=B0=86=E7=AC=AC=E4=B8=80=E4=B8= =AA=E5=80=BC=E4=BD=9C=E4=B8=BA=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD =09=09if(selectedItem =3D=3D null && optionItems.length > 0){ =09=09=09selectedItem =3D optionItems[0]; =09=09} =09=09component.config.selectedItem =3D selectedItem; =09=09//=E5=B0=86=E9=80=89=E4=B8=AD=E7=9A=84=E5=80=BC=E7=BC=93=E5=AD=98=E8= =B5=B7=E6=9D=A5 =09=09scope.cacheDimensionValue(dimensions[dimensions.length-1].name, selec= tedItem =3D=3D null ? null : selectedItem.value); }; //=E8=AF=B7=E5=B0=86=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=8F=82=E6=95=B0"demo"= =E6=8D=A2=E6=88=90=E7=9B=B8=E5=BA=94=E7=9A=84=E5=88=86=E7=B1=BB=E6=A0=87=E8= =AF=86 $vsPluginRegister.register("demo", "demoFilterWidget", factory); }]);</pre>=20 </div> </div> <p> </p> <p> </p> <p> </p> <h1 id=3D"id-=E8=BF=87=E6=BB=A4=E5=99=A8=E6=8E=A7=E4=BB=B6=E6=A8=A1=E6=9D= =BF-=E3=80=90View=E8=84=9A=E6=9C=AC=E6=A8=A1=E6=9D=BF=E3=80=91"><strong><sp= an style=3D"color: rgb(0,51,102);">=E3=80=90View=E8=84=9A=E6=9C=AC=E6=A8=A1= =E6=9D=BF=E3=80=91</span></strong></h1> <p><span style=3D"color: rgb(0,51,102);"><br></span></p> <div class=3D"code panel pdl" style=3D"border-width: 1px;"> <div class=3D"codeContent panelContent pdl">=20 <pre class=3D"syntaxhighlighter-pre" data-syntaxhighlighter-params=3D"brush= : js; gutter: false; theme: Confluence" data-theme=3D"Confluence">//=E8=AF= =B7=E5=8B=BF=E4=BF=AE=E6=94=B9=E6=AD=A4=E5=A4=84=E5=91=BD=E5=90=8D=E5=8F=82= =E6=95=B0 var build_demoFilterWidget_component =3D function(scope, element, $compile,= $timeout){ var component =3D scope.component; =20 component.config.selectedItem =3D null; =20 scope.isSelectedItem =3D function(item){ =09=09return component.config.selectedItem !=3D null && ""+item.val= ue =3D=3D=3D ""+component.config.selectedItem.value; =09} =09 =09scope.getItemStyle =3D function(item){ =09=09if(scope.isSelectedItem(item)){ =09=09=09return { =09=09 'background-color':component.config.selectedItemBgColor, =09=09 'color': component.config.selectedItemFontColor =09=09 } =09=09}else{ =09=09=09return { =09=09 'background-color':component.config.itemBgColor, =09=09 'color': component.config.itemFontColor =09=09 } =09=09} =09=09 =20 =09} =09 =09var html =3D []; =09html.push("<div style=3D'height:100%;overflow-x:auto;overflow-y:hidde= n;'>"); =09html.push(" <div ng-show=3D'component.config.datasourceConfig.dimensi= ons =3D=3D null' style=3D'height:100%;width:100%;display:table;'>"); =09html.push(" <div style=3D'text-align:center;background-color:#f0f0f0= ;vertical-align:middle;display:table-cell;cursor:pointer;'>"); =09html.push(" =09=E8=AF=B7=E9=85=8D=E7=BD=AE=E6=95=B0=E6=8D=AE=E6=BA=90")= ; =09html.push(" </div>"); =09html.push(" </div>"); =09html.push(" <div ng-show=3D'component.config.datasourceConfig.dimensi= ons !=3D null' style=3D'height:100%;width:100%;display:table;'>"); =09html.push(" <div style=3D'vertical-align:middle;display:table-cell;t= ext-align:center;cursor:pointer;word-break: keep-all;white-space:nowrap;' n= g-style=3D\"getItemStyle(item)\" ng-repeat=3D'item in component.config.opti= onItems track by $index' ng-model=3D'component.config.selectedItem' ng-clic= k=3D'onItemClicked()' uib-btn-radio=3D\"item\">"); =09html.push(" {{item.label}}"); =09html.push(" </div>"); =09html.push(" </div>"); =09html.push("</div>"); =09 =09var el =3D $compile(html.join(""))( scope ); =09element.html(el); //=E5=88=B7=E6=96=B0=E6=8E=A7=E4=BB=B6=E6=B8=B2=E6=9F=93=EF=BC=8C=E5=8F= =AF=E7=9B=B4=E6=8E=A5=E5=B0=86designer.js=E4=B8=AD=E7=9A=84=E6=96=B9=E6=B3= =95=E5=A4=8D=E5=88=B6=E8=BF=87=E6=9D=A5 var refreshChartView =3D function(){ var dimensions =3D component.config.datasourceConfig.dimensions; //=E4=BB=8Econtext=E4=B8=AD=E8=8E=B7=E5=BE=97=E6=8E=A7=E4=BB=B6=E6= =95=B0=E6=8D=AE =09=09var data =3D component.context.data; =09=09//=E8=8E=B7=E5=8F=96=E5=9B=BE=E5=BD=A2=E7=BB=B4=E5=BA=A6=E9=BB=98=E8= =AE=A4=E5=80=BC =09=09var initValue =3D scope.parseInitValue(); =09=09//=E8=BF=87=E6=BB=A4=E5=99=A8=E4=B8=AD=E7=9A=84=E9=80=89=E9=A1=B9 =09=09var optionItems =3D []; =09=09//=E5=BD=93=E5=89=8D=E9=80=89=E4=B8=AD=E9=A1=B9 =09=09var selectedItem =3D null; =09=09//=E5=B0=86=E7=BB=B4=E5=BA=A6=E5=80=BC=E8=AE=BE=E7=BD=AE=E4=B8=BA=E8= =BF=87=E6=BB=A4=E5=99=A8=E4=B8=AD=E7=9A=84=E9=80=89=E9=A1=B9 =09=09for(var i =3D 0; i < data.length; i++){ =09=09=09var value =3D data[i][dimensions[dimensions.length-1].name]; =09=09=09var item =3D { =09=09=09=09label: ""+value, =09=09=09=09value: ""+value =09=09=09}; =09=09=09//=E6=A3=80=E6=9F=A5=E5=80=BC=E6=98=AF=E5=90=A6=E6=98=AF=E5=90=88= =E8=AE=A1=EF=BC=8C=E4=B8=AD=E6=96=87=E7=8E=AF=E5=A2=83=E4=B8=8B=E6=98=AF'= =E5=90=88=E8=AE=A1',=E8=8B=B1=E6=96=87=E7=8E=AF=E5=A2=83=E4=B8=8B=E6=98=AF"= All" =09=09=09if(value !=3D null && value =3D=3D=3D vsLang.heji){ =09=09=09 //=E8=8E=B7=E5=8F=96=E5=90=88=E8=AE=A1=E5=88=AB=E5=90=8D =09=09=09=09item.label =3D scope.getDimensionSummaryAlias(dimensions[dimens= ions.length-1].name); =09=09=09} =09=09=09optionItems.push(item); =09=09} =09=09//=E6=A3=80=E6=9F=A5=E6=98=AF=E5=90=A6=E9=85=8D=E7=BD=AE=E4=BA=86=E7= =BB=B4=E5=BA=A6=E9=BB=98=E8=AE=A4=E5=80=BC =09=09if(initValue !=3D null && component.context.first_render_init= _value =3D=3D null){ =09=09=09component.context.first_render_init_value =3D initValue; =09=09=09selectedItem =3D { =09=09=09=09value: initValue, =09=09=09=09label: initValue =09=09=09}; =09=09}else{ =09=09 //=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E9=85=8D=E7=BD=AE=E7=BB=B4= =E5=BA=A6=E9=BB=98=E8=AE=A4=E5=80=BC=EF=BC=8C=E5=B0=9D=E8=AF=95=E4=BB=8E=E7= =BC=93=E5=AD=98=E4=B8=AD=E8=8E=B7=E5=8F=96=E7=BB=B4=E5=BA=A6=E5=80=BC=E4=BD= =9C=E4=B8=BA=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD =09=09=09var cachedSelectedValue =3D scope.getCachedDimensionValue(dimensio= ns[dimensions.length-1].name); =09=09=09for(var i =3D 0; i < optionItems.length; i++){ =09=09=09=09if(""+optionItems[i].value =3D=3D=3D ""+cachedSelectedValue){ =09=09=09=09=09selectedItem =3D optionItems[i]; =09=09=09=09=09break; =09=09=09=09} =09=09=09} =09=09} =09=09scope.component.config.optionItems =3D optionItems; =09=09//=E5=A6=82=E6=9E=9C=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD=E7=9A=84=E5= =80=BC=E4=B8=BA=E7=A9=BA=EF=BC=8C=E5=88=99=E5=B0=86=E7=AC=AC=E4=B8=80=E4=B8= =AA=E5=80=BC=E4=BD=9C=E4=B8=BA=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD =09=09if(selectedItem =3D=3D null && optionItems.length > 0){ =09=09=09selectedItem =3D optionItems[0]; =09=09} =09=09component.config.selectedItem =3D selectedItem; =09=09//=E5=B0=86=E9=80=89=E4=B8=AD=E7=9A=84=E5=80=BC=E7=BC=93=E5=AD=98=E8= =B5=B7=E6=9D=A5 =09=09scope.cacheDimensionValue(dimensions[dimensions.length-1].name, selec= tedItem =3D=3D null ? null : selectedItem.value); }; //=E6=8E=A5=E6=94=B6=E6=8E=A7=E4=BB=B6=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D= =AE=E7=9A=84=E4=BA=8B=E4=BB=B6 scope.$on(event_refreshComponentData, function(target, param){ //=E5=A6=82=E6=9E=9C=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D=AE=E4=BA=8B= =E4=BB=B6=E7=9A=84=E5=8F=91=E5=87=BA=E8=80=85=E6=98=AF=E5=BD=93=E5=89=8D=E6= =8E=A7=E4=BB=B6=EF=BC=8C=E4=B8=8D=E5=A4=84=E7=90=86=E6=9C=AC=E6=AC=A1=E9=80= =9A=E7=9F=A5 if(param.component !=3D null && scope.component.id =3D=3D= =3D param.component.id){ =09=09=09return; =09=09} scope.queryComponentData(param, { onSuccess: function(){ refreshChartView(scope, element, component, $compile); } }); }); /* * =E9=A1=B5=E9=9D=A2=E8=BF=87=E6=BB=A4=E5=9B=9E=E8=B0=83=E6=96=B9=E6= =B3=95=EF=BC=8C=E5=85=B6=E5=AE=83=E6=8E=A7=E4=BB=B6=E6=9F=A5=E8=AF=A2=E6=95= =B0=E6=8D=AE=E6=97=B6=E4=BC=9A=E8=B0=83=E7=94=A8=E8=AF=A5=E6=96=B9=E6=B3=95= =EF=BC=8C=E8=8E=B7=E5=8F=96=E8=BF=87=E6=BB=A4=E7=9A=84=E5=B1=9E=E6=80=A7 * =E5=BD=93component.config.pageFilter=E8=AE=BE=E7=BD=AE=E4=B8=BAtrue= =E6=97=B6=E8=A2=AB=E8=B0=83=E7=94=A8 */ =20 scope.component.context.getPageFilter =3D function(){ =09=09var result =3D []; =09=09if(component.config.selectedItem !=3D null){ =09=09 //=E5=B0=86=E5=9B=BE=E5=BD=A2=E7=BB=B4=E5=BA=A6=E7=9A=84=E5=80=BC= =E9=85=8D=E7=BD=AE=E5=88=B0=E8=BF=87=E6=BB=A4=E9=A1=B9=E4=B8=AD =09=09=09var value =3D component.config.selectedItem.value =09=09=09if(value !=3D null && value !=3D=3D vsLang.heji){ =09=09=09=09result.push({ =09=09=09=09=09column: scope.getLastDimension().name, =09=09=09=09=09exp: "=3D", =09=09=09=09=09value: value =09=09=09=09}); =09=09=09} =09=09} =09=09return result; =09} =09 =09//=E9=80=89=E6=8B=A9=E9=A1=B9=E8=A2=AB=E9=80=89=E4=B8=AD=E6=97=B6=EF=BC= =8C=E5=8F=91=E5=87=BA=E8=BF=87=E6=BB=A4=E9=80=9A=E7=9F=A5 =09scope.onItemClicked =3D function(){ =09=09var value =3D component.config.selectedItem.value; =09=09//=E5=B0=86=E9=80=89=E4=B8=AD=E9=A1=B9=E7=9A=84=E5=80=BC=E7=BC=93=E5= =AD=98=E8=B5=B7=E6=9D=A5 =09=09scope.cacheDimensionValue(scope.getLastDimension().name, value); =09=09scope.notifyDimensionValueFilterEvent({ =09=09=09queryConditionDimensions: true =09=09}); =09} }</pre>=20 </div> </div> <p> </p> <p> </p> </div> </body> </html> ------=_Part_75916_1234568517.1711710416530--