function setNumberControl(e,t,a,n,o,i,l,r){isdowncontrol()&&("True"==isAuthEnable&&r>=0?getAuthInfoByGroupId(r,function(s){s&&showDialog(e,t,a,n,o,i,l,r)}):showDialog(e,t,a,n,o,i,l,r))}function showDialog(e,t,a,n,o,i,l,r){var s=$(window).width(),c=$(window).height();t+=40,(e+=40)+290>s&&(e-=380),t+190>c&&(t-=280);var d='
'+l+':
';GD.createMessageDialog(300,200,d,function(){var e=$("#isetnumber").val();1==checkNumber(e)&&e.length>0?e-0>o-0?GD.createErrorDialog(300,200,"设定值不能高于上限值!"):e-00&&(h=","+p.join(",")),n>d&&(i="false"),l){a>c&&(a=document.body.clientWidth),r&&(a=c,e=0),s&&(n=d,t=0);var f={titleAlign:"left",closable:!0,maximizable:!0,draggable:!0,width:a,height:n,content:w=""};"true"==i?openPageDialog.setConfig(f):f.position={x:e,y:t},openPageDialog.setConfig(f),openPageDialog.setModal(!1),openPageDialog.show()}else{var m=e+.5*a,v=t+.5*n;a*=g,n*=u,m*=g,v*=u,r&&(m=.5*(a=c)),s&&(v=.5*(n=d)),"true"===i&&(m=.5*c,v=.5*d);var w="";(openPageDialog=new ht.HtmlNode).setPosition(m,v),openPageDialog.setSize(a,n),openPageDialog.setHtml(w),dataModel.add(openPageDialog)}openPageDialog.onHidden=function(e){GD.removeParams("trendtags")},$(".main").off("click").on("click",function(){"function"==typeof openPageDialog.hide&&openPageDialog.hide(!0),setTimeout(function(){p.push(b),p=GD.removeRepeated(p),GD.setParams({trendTags:p},"trendtags")},500)})}function closePageDialogControl(){"function"==typeof openPageDialog.isShowing?openPageDialog.isShowing()&&openPageDialog.hide():dataModel.remove(openPageDialog)}function initData(e,t,a,n){var o=[n],i={position:16,names:[a],rotation:Math.PI,keepOrien:!0,offsetX:-60,offsetY:5},l={position:19,names:o,keepOrien:!0,offsetX:10,offsetY:-5};"start"==t&&(l={}),"end"==t&&(i={}),"no"==t&&(i={},l={}),e.s({icons:{fromArrow:i,toArrow:l}})}function createMessageDialog(e,t,a,n,o){var i=new ht.widget.Dialog,a=''+a+"
";i.setConfig({title:"提示",titleIcon:"node_image",titleAlign:"left",closable:!0,draggable:!0,width:e,height:t,content:a,contentPadding:20,buttons:[{label:"确认",className:"dialog-button-confirm"},{label:"取消",className:"dialog-button-cancel"}],buttonsAlign:"center",action:function(e,t){"确认"==e.label?(n(),i.hide()):(o(),i.hide())}}),i.setModal(!1),i.show()}function getChartLineFeed(e,t,a,n,o,i,l){if(!t||0==t.length)return!1;if(isNaN(n))return!1;a||(a=12),isNaN(o)&&(o=80),isNaN(i)&&(i=80),l||(l="\n");var r=parseInt(n)-(parseInt(o)+parseInt(i)),s=t.length,c=Math.floor(r/s),d=Math.floor(c/a);d>3?d-=2:d<=3&&d>=2&&(d-=1);var g="",u="",p=Math.ceil(e.length/d);if(p>1)for(var h=1;h<=p;h++)if(1==h)g+=e.substring(0,d)+l,u=e.substring(d);else{var b=d;u.length>d?(g+=u.substring(0,b)+l,u=u.substring(b)):u.length>0&&(g+=u.substring(0))}else g=e;return g}function vectorMoveRotate(e,t,a,n,o,i,l,r){var s=t,c=a;n&&(s+=e.getPosition().x),o&&(c+=e.getPosition().y),"Horizontal"==r&&(s=(s=s>=l?l:s)<=i?i:s),"Vertical"==r&&(c=(c=c>=l?l:c)<=i?i:c),e.setPosition(s,c)}function createTagProperty(e,t,a,n){var o=new ht.widget.Dialog,i=e[t.toLowerCase()],l="",r={title:"属性",titleAlign:"left",closable:!0,draggable:!0,width:a,height:n,content:l=void 0===i?"标签名称:"+t+" 描述: 单位: 量程上限: 量程下限: 快照时间:
":"标签名称:"+i.TableDotTag+" 描述:"+i.Desc+" 单位:"+i.Unit+" 量程上限:"+i.HighLimit+" 量程下限:"+i.LowLimit+" 快照时间:"+VarSnapshotTime[t.toLowerCase()]+"
",contentPadding:0};o.setConfig(r),o.setModal(!1),o.show();var s=setInterval(function(){if(void 0!==i){var e="标签名称:"+i.TableDotTag+" 描述:"+i.Desc+" 单位:"+i.Unit+" 量程上限:"+i.HighLimit+" 量程下限:"+i.LowLimit+" 快照时间:"+VarSnapshotTime[t.toLowerCase()]+"
";r.content=e,o.isShowing()&&(o.setConfig(r),o.setModal(!1))}},2e3);o.onHidden=function(){o.hide(),clearInterval(s)}}function PointSelectDialog(e,t,a,n,o,i,l){var r=new ht.widget.FormPane,s=new ht.DataModel,c=new ht.widget.TablePane(s),d=[{name:"id",displayName:"Id",align:"center",width:50},{name:"configPointDesc",displayName:"描述",align:"center",accessType:"attr",width:200},{name:"configPointName",displayName:"标签名",align:"center",accessType:"attr",width:250}];c.addColumns(d);var g=c.getTableView();g.setCheckMode(!0);var u=1;document.body.appendChild(r.getView()),r.addRow(["表名称:",{id:"tablename",textField:{text:"*"}},"标签点描述:",{id:"pointDesc",textField:{text:"*"}},{button:{label:"查找",onClicked:function(){s.clear();var e=r.v("pointDesc"),t=r.v("tablename");u=1,r.v("pageindex",u.toString()),getPointsSelect(u,100,t,e,s,r)}}}],[.12,.3,.2,.3,.3]),r.addRow([c],[.1],.1),r.addRow([{button:{label:"<<",onClicked:function(){s.clear(),u=1,r.v("pageindex",u.toString());var e=r.v("pointDesc"),t=r.v("tablename");getPointsSelect(u,100,t,e,s,r)}}},{button:{label:"<",onClicked:function(){s.clear(),u>1&&(u-=1),r.v("pageindex",u.toString());var e=r.v("pointDesc"),t=r.v("tablename");getPointsSelect(u,100,t,e,s,r)}}},{id:"pageindex",element:u.toString()},{element:"/"},{id:"pagecount",element:"1"},{button:{label:">",onClicked:function(){s.clear(),u>",onClicked:function(){s.clear(),u=r.v("pagecount"),r.v("pageindex",u.toString());var e=r.v("pointDesc"),t=r.v("tablename");getPointsSelect(u,100,t,e,s,r)}}}],[.05,.05,.02,.02,.02,.05,.05]),getPointsSelect(u,100,"*","*",s,r),r.getView().style.background=a;var p=new ht.widget.Dialog,h={title:"标签点选择",titleAlign:"left",closable:!0,draggable:!0,contentPadding:5,width:e,height:t,content:r,buttons:[{label:"确认",className:"button-yes"},{label:"取消",className:"button-yes"}],buttonsAlign:"center",action:function(e,t){if("确认"==e.label){var a=g.sm()._map;for(var r in a){var s=a[r],c=new ht.Data;c.a("index",n._datas._as.length+1),c.a("configPointDesc",s.a("configPointDesc")),c.a("configPointName",s.a("configPointName")),c.a("pintunit",s.a("pintunit")),c.a("pointtype",s.a("pointtype")),c.a("snapvalue",""),c.a("timestamp",""),n.add(c)}GetModelByPage(1,l,n,o,i),p.hide()}else p.hide()}};p.setConfig(h),p.setModal(!1),p.show()}function PointSnapPropsTable(e,t,a,n,o){var i=new ht.widget.FormPane,l=new ht.widget.TablePane(o),r=[{name:"index",displayName:"ID",align:"center",accessType:"attr",width:50},{name:"configPointName",displayName:"标签名",align:"center",accessType:"attr",width:250},{name:"configPointDesc",displayName:"描述",align:"center",accessType:"attr",width:200},{name:"snapvalue",displayName:"值",align:"center",accessType:"attr",width:200},{name:"pintunit",displayName:"工程单位",align:"center",accessType:"attr",width:100},{name:"timestamp",displayName:"时间戳",align:"center",accessType:"attr",width:150},{name:"pointtype",displayName:"数值类型",align:"center",accessType:"attr",width:100}];l.addColumns(r);var s=1;document.body.appendChild(i.getView()),i.addRow(["",{button:{label:"追加",onClicked:function(){var e=parseInt(c.getValue());PointSelectDialog(600,500,"rgba(240,248,255,1)",n,o,i,e)}}},{button:{label:"选择文件",width:64,onClicked:function(){var e=document.createElement("input");e.type="file",e.style.display="none",e.onchange=function(){n.clear(),o.clear();var t=e.files[0],a=new FileReader;a.readAsText(t),a.onload=function(){var e,t=this.result;if(t.length>=0){e=t.split("\n");for(var a=1;a1&&(s-=1),i.v("pageindex",s.toString());var e=parseInt(c.getValue());GetModelByPage(s,e,n,o,i)}}},{id:"pageindex",element:s.toString()},{element:"/"},{id:"pagecount",element:"1"},{button:{label:">",onClicked:function(){(s=parseInt(i.v("pageindex")))>",onClicked:function(){0==(s=i.v("pagecount"))?s=1:i.v("pagecount","1"),i.v("pageindex",s.toString());var e=parseInt(c.getValue());GetModelByPage(s,e,n,o,i)}}},"rows:",{element:c},{button:{label:"导出",onClicked:function(){var e=["ID","标签点","描述","值","工程单位","时间戳","数值类型"],t=["index","configPointName","configPointDesc","snapvalue","pintunit","timestamp","pointtype"],a=[],o=n._datas._as;if(0==o.length);else for(var i=0;i1&&(r-=1),a.v("pageindex",r.toString());var e=a.v("pointDesc"),t=a.v("tablename");getPointsSelect(r,100,t,e,n,a)}}},{id:"pageindex",element:r.toString()},{element:"/"},{id:"pagecount",element:"1"},{button:{label:">",onClicked:function(){n.clear(),r>",onClicked:function(){n.clear(),r=a.v("pagecount"),a.v("pageindex",r.toString());var e=a.v("pointDesc"),t=a.v("tablename");getPointsSelect(r,100,t,e,n,a)}}}],[.05,.05,.02,.02,.02,.05,.05]),getPointsSelect(r,100,"*","*",n,a),a.getView().style.background="rgba(240,248,255,1)";var s=new ht.widget.Dialog,c={title:"标签点选择",titleAlign:"left",closable:!0,draggable:!0,contentPadding:5,width:600,height:500,content:a,buttons:[{label:"确认",className:"button-yes"},{label:"取消",className:"button-yes"}],buttonsAlign:"center",action:function(a,n){if("确认"==a.label){var o=l.sm()._map,i="";for(var r in o)i=i+(o[r].a("configPointName")+":"+o[r].a("configPointDesc")+":true")+",";","==i[i.length-1]&&(i=i.substring(0,i.length-1)),e.setName(i),t(),s.hide()}else s.hide()}};s.setConfig(c),s.setModal(!1),s.show()}function createBaseTable(e,t,a,n,o,i,l,r,s,c,d,g,u,p){var h=createTableAttr(a,n,o,i,l,r,s,c,d,g,u,p);return setTableStyle(e,h),e}function createTableByObj(e,t){return setTableStyle(e,t),e}function getTagInfos(e,t){var a="",n=e.split(","),o=t.split(",");if(n.length>0){for(var i=0;i=1)for(l=0;l=1&&(a+=o[i].split(":")[0]+n[l].split(":")[0]+",")}else for(var l=0;l=1&&(a+=o[l].split(":")[0]+",");return","==a[a.length-1]&&(a=a.substr(0,a.length-1)),a}function getColumnsInfo(e,t,a,n){var o=[];n?(o.push({name:"time",displayName:a,accessType:"attr",align:"center",width:100}),""!=e&&o.push({name:"shebei",displayName:"设备",accessType:"attr",align:"center",width:100})):o.push({name:"title",displayName:a,accessType:"attr",align:"center",width:100}),""==e&&(e=t);var i=e.split(",");if(i.length>0)for(var l=0;l=2&&"true"==r[2]&&o.push({name:r[0],displayName:r[1],accessType:"attr",align:"center",width:100})}return o}function getColumnsOrRowInfo(e,t){var a=e._datas._as,n=t._datas._as,o="";if(a.length>0)for(var i=0;i0)for(var l=0;l0)for(r=0;r0)for(var r=0;r=1)for(var n=0;n0&&t.push(o)}return t}function getHisData(e,t,a){if(a.clear(),"undefined"!=typeof start&&"undefined"!=typeof end&&"undefined"!=typeof interval){""==start&&(start=moment(new Date).format("YYYY-MM-DD H:mm:ss")),""==end&&(end=moment(new Date(start)).add(30,"seconds").format("YYYY-MM-DD H:mm:ss"));var n=getTagInfos(e,t)+"&beginTime="+start+"&endTime="+end+"&interval="+interval+"&count=0",o=getIndicatorArr(e);getTableHisData(n,a,o)}}function createTableHistory(e,t,a,n,o){t.clear();var i=getColumnsInfo(a,"time",!0),l=getTagInfos(a,n);setTableStyle(e,o),columnModel=e.getColumnModel(),e.setColumns(i);for(var r=l.split(","),s=0;s0)for(var o=0;o已选指标(6 )项'),$count.setValue=function(e){$count.find("strong").text(e)},$count.getValue=function(){return $count.find("strong").text()},u.setValue=function(e,t){"indicatorCount"===e?$count.setValue(t):f.call(u,e,t)},u.getValue=function(e){return"indicatorCount"===e?$count.getValue():m.cal(u,e)},u.addRow([{element:$('功能列表: ')[0]},{id:"selectall",button:{label:"全选",labelColor:void 0===n?"black":n.btnFontColor,borderColor:"transparent",labelFont:'bold 14px "苹方 粗体"',background:"rgba(0,0,0,0)",icon:PAGEROOTDIR+"script/image/noselected.png",selectBackground:"rgba(0,0,0,0)",onClicked:function(){i(p,"all"),u.getItemById("multiple").element.setIcon(PAGEROOTDIR+"script/image/noselected.png"),u.getItemById("clear").element.setIcon(PAGEROOTDIR+"script/image/noselected.png"),this.setIcon(PAGEROOTDIR+"script/image/selected.png")}}},{id:"multiple",button:{label:"反选",borderColor:"transparent",labelFont:'bold 14px "苹方 粗体"',labelColor:n.btnFontColor,background:"rgba(0,0,0,0)",icon:PAGEROOTDIR+"script/image/noselected.png",selectBackground:"rgba(0,0,0,0)",onClicked:function(){l(p),u.getItemById("selectall").element.setIcon(PAGEROOTDIR+"script/image/noselected.png"),u.getItemById("clear").element.setIcon(PAGEROOTDIR+"script/image/noselected.png"),this.setIcon(PAGEROOTDIR+"script/image/selected.png")}}},{id:"clear",button:{label:"清除",labelColor:n.btnFontColor,borderColor:"transparent",labelFont:'bold 14px "苹方 粗体"',background:"rgba(0,0,0,0)",icon:PAGEROOTDIR+"script/image/noselected.png",selectBackground:"rgba(0,0,0,0)",onClicked:function(){r(p),u.getItemById("selectall").element.setIcon(PAGEROOTDIR+"script/image/noselected.png"),u.getItemById("multiple").element.setIcon(PAGEROOTDIR+"script/image/noselected.png"),this.setIcon(PAGEROOTDIR+"script/image/selected.png")}}},null,{element:$count[0]}],[.1,.1,.1,.1,.4,.2],20,{index:1});for(var v=0,w=d.length;vb?C:b}for(var y=0,h=Math.floor(860/(5*b+50)),k=Math.ceil(d.length/h),B=0;B')[0],9),t.setConfig({title:"设置名称",titleBackground:n.paneTitleBackColor,titleIcon:"",titleColor:n.paneTitleFontColor,closable:!0,draggable:!0,maximizable:!1,width:860,height:460,content:s,buttonsAlign:"left",buttons:[{label:"确认",className:"dialog-confirm",action:function(e,n){for(s=0;s确认').end().find(".dialog-cancel").css({}).prepend('取消 ').end().find("canvas").css({visibility:"hidden"})}(),t.setModal(!0),$(t.getView()).find(".dialog-overlay").css({backgroundColor:"rgba(20,20,20,0.6)"}),t.show()}function createHistorySelectDialog(e,t,a,n,o,i,l,r){function s(e,t){e.each(function(e){if("time"!=e.a("name")&&"device"!=e.a("name")){var a={};a.name=e.a("name"),a.displayName=e.a("displayName"),a.visible=e.a("visible"),a.Low=e.a("Low"),a.High=e.a("High"),a.width=e.a("width"),a.color=e.a("color"),e.a("position")&&(a.position=e.a("position")),t.push(a)}})}function c(e,t,a,n,o){for(var i,l=0,r=$(e.getView()).width(),s=0,c=t.length;sl?i:l;a=Math.floor(r/(5*l+50));var d=Math.ceil(t.length/a);e.clear();for(s=0;s0&&h(L[r].inArr,t);b(M,L),b(H,R),c(O,F,8,"tagButton",g),Y.find("strong").text(F.length)}function u(e,t,a){var n=new ht.widget.Button,o=$(n.getView()),i=e.displayName,l=e.visible,r=e.name;n.setLabel(i),n.setTogglable(!0),n.setWidth(100),n.setHeight(40),o.addClass("history-button"),o.prepend('
'),n.__id=r;var s,c,d,g;switch(t){case"tagButton":s=P.tagBtnBackColor,c=P.tagBtnBackColor,d=P.tagBtnBorderColor,g=null,n.setSelected(!0),n.setLabelSelectColor(P.tagBtnFontColor),n.setClickable(!1);break;case"deviceButton":s=P.btnBackColor,c=P.btnCheckedBackColor,d=P.btnBorderColor,g=null;break;case"indicatorButton":s=P.btnBackColor,c=P.btnCheckedBackColor,d=P.btnBorderColor,g=E.indicatorButton}return l?(n.setSelected(!0),n.setSelectBackground(c),n.setLabelSelectColor(P.btnCheckedFontColor),n.setBorderColor(d),g?(n.setIcon(imagePath+g),n.setLabel(" "+i)):(n.setIcon(null),n.setLabel(i))):(n.setSelected(!1),n.setIcon(null),n.setLabel(i),n.setBackground(s),n.setLabelColor(P.btnFontColor),n.setBorderColor(d)),n.onClicked=function(e){a.call(this,e)},"tagButton"===t&&(n.setLabel(i+" "),$(n.getView()).find(".button-icon").off("click").on("click",function(e){a.call(n,e)})),A[r]=n,n}function p(e){if(e){for(var t,a={},n=[],o=0,i=e.length;o');$(window.body).append(t),t.trigger("click"),t.change(function(e){for(var t=e.target.files,a=0,n=t.length;a'),W=$('
'),Y=$('');W.css({"box-shadow":"0 2px 10px "+P.paneShadowColor}),Y.css({"box-shadow":"0 2px 10px "+P.paneShadowColor}).find("li").off("click").on("click",function(){var e=$(this),t=e.data("role");switch(Y.find("li").removeClass("active").find("a").css({color:P.paneTitleBtnFontColor}),e.addClass("active").find("a").css({color:P.paneTitleBtnCheckedFontColor}),t){case"selectall":S(H,"all");break;case"reverseselect":D(H);break;case"clearall":x(H)}}).find("a").css({color:P.paneTitleBtnFontColor}),Y.find("li.active a").css({color:P.paneTitleBtnCheckedFontColor}),z.append(W),z.append(Y),_.setTopView(z[0],35),_.setLeftView(M,430),_.setCenterView(H),G.setCenterView(O),N.setCenterView(_),N.setBottomView(G,280);var j=[{label:"取消",className:"dialog-button-cancel",action:function(e,t){}}];n.setConfig({title:"设置名称",titleBackground:P.paneTitleBackColor,titleIcon:"",titleColor:P.paneTitleFontColor,closable:!0,draggable:!0,maximizable:!1,width:860,height:600,position:{x:($(window).innerWidth()-860)/2,y:($(window).innerHeight()-600)/2},content:N,buttonsAlign:"left",buttons:j}),n.setModal(!0),$(n.getView()).find(".dialog-overlay").css({backgroundColor:"rgba(20,20,20,0.6)"}),c(M,L,4,"deviceButton",function(){var e=$.trim(this.getLabel()),t=this.isSelected();t?(this.setSelectBackground(P.btnCheckedBackColor),this.setLabelSelectColor(P.btnCheckedFontColor),this.setIcon(null),this.setLabel(e)):(this.setBackground(P.btnBackColor),this.setIcon(null),this.setLabel(e),this.setLabelColor(P.btnFontColor));for(var a,n=0,o=L.length;n=o&&t)return dialogTip("已选择的指标超过"+o+"个了,最多选择"+o+"个!"),void this.setSelected(!1);t?(this.setSelectBackground(P.btnCheckedBackColor),this.setLabelSelectColor(P.btnCheckedFontColor),this.setIcon(imagePath+"plus.png"),this.setLabel(" "+e)):(this.setBackground(P.btnBackColor),this.setLabelColor(P.btnFontColor),this.setIcon(null),this.setLabel(e));for(var a={},n=0,i=R.length;n确认并查询 '),n=$(''),o=$(''),i=$(''),r=$(''),s=$(''),c=$('
'),d=$('
');t.find(".dialog-button").remove(),c.append(a).append(n).append(o),d.append(i).append(r).append(s),t.append(c).append(d),l&&(a.find("a.btn").text("确认"),n.css("display","none"),i.css("display","none"),r.css("display","none")),t.find(".pane-bottom-btn-right").css({backgroundColor:P.bottomButtonBackColor}).hover(function(){$(this).css({}).find("a").css({color:P.bottomButtonHoverColor})},function(){$(this).css({}).find("a").css({color:P.bottomButtonColor})}).find("a").css({color:P.bottomButtonColor}),t.find(".pane-bottom-btn-left").css({}).hover(function(){$(this).css({}).find("a").css({color:P.bottomButtonHoverColor})},function(){$(this).css({}).find("a").css({color:P.bottomButtonColor})}).find("a").css({color:P.bottomButtonColor}),t.find("div div.pull-left").off("click").on("click",function(e){switch($(this).data("role")){case"confirmandsearch":y();break;case"confirmandexport":k();break;case"cancel":B(e);break;case"upload":v(e);break;case"download":m(e);break;case"clearall":x(O)}})}(n),$(M.getView()).css({backgroundColor:P.formPaneBackColor,"box-shadow":"2px 2px 5px "+P.paneShadowColor+" inset"}).addClass("pane-left"),$(H.getView()).css({backgroundColor:P.formPaneBackColor,"box-shadow":"2px 2px 5px "+P.paneShadowColor+" inset"}).addClass("pane-right"),$(O.getView()).css({backgroundColor:P.formPaneBackColor,"box-shadow":"2px 2px 5px "+P.paneShadowColor+" inset"}).addClass("pane-bottom"),$(n.getView()).find(".dialog-container").css({borderWidth:"1px",borderStyle:"solid",borderColor:P.paneBorderColor,borderRadius:"4px",zIndex:99}),n.show(),$(".dialog-container-buttons").css("background",P.paneBackColor),$(".dialog-button-confirm").css("background",P.btnBackColor)}function createchartSelectDialog(e,t,a,n){t.isShowing()&&t.hide();var o=new ht.widget.BorderPane,i=e.getDatas()._as,l=i.length,r=new ht.widget.FormPane;r.setHeight(360),r.addRow(["已选择个数:",{id:"indicatorCount",textField:{text:"0",editable:!1,width:100,border:0}},"",{button:{label:"清除",labelColor:"blue",borderColor:"transparent",background:"",onClicked:function(){for(var e=0;e=5&&this.isSelected())return dialogTip("已选择的指标超过"+a+"个了,最多选择5个!"),this.setSelected(!1),this.setBackground("rgb(255,255,255)"),this.setIcon(null),this.setLabel(e),o;this.isSelected()?(n.setValue("indicatorCount",parseInt(n.getValue("indicatorCount"))+1),this.setSelectBackground("rgb(53,199,122)"),this.setIcon(imagePath+"DuiHao.png"),this.setLabel(" "+e)):(n.setValue("indicatorCount",parseInt(n.getValue("indicatorCount"))-1),this.setBackground("rgb(255,255,255)"),this.setIcon(null),this.setLabel(e))},o}(i[p].a("displayName"),i[p].a("visible"),r)}),i[p].a("visible")&&(s+=1),u.push(.1)):(g.push(null),u.push(.1));r.addRow(g,u,30,{index:d+2}),r.setValue("indicatorCount",s)}o.setTopView(r),t.setConfig({title:"设置名称",titleIcon:"",titleColor:"black",closable:!0,draggable:!0,maximizable:!1,width:860,height:460,position:{x:200,y:100},content:o,buttonsAlign:"left",buttons:[{label:"确认",className:"dialog-button-confirm",action:function(e,a){for(var o={},s=[],c="",d=0;d=o)return dialogTip("选择的太多啦, 最多可选择"+o+"个!"),this.setSelected(!1),this.setBackground(n.btnBackColor),this.setIcon(null),this.setLabel(e),void this.setLabelColor(n.btnFontColor);a.setValue("indicatorCount",parseInt(a.getValue("indicatorCount"))+1),this.setIcon(imagePath+"DuiHao.png"),this.setLabel(" "+e)}else a.setValue("indicatorCount",parseInt(a.getValue("indicatorCount"))-1),this.setIcon(null),this.setLabel(e)},$(i.getView()).css({boxShadow:"1px 1px 4px #000"}),i}var dialog=new ht.widget.Dialog,openPageDialog=new ht.widget.Dialog,customEventMap={jumpPage:"customEventJump",resizeNodes:"customEventResizeNodes",setPageSize:"customEventSetPageSizeWithRatio"};window.addEventListener("message",function(e){var t=e.data||{};"close"==t&&closePageDialogControl(),"getZoom"===t&&e.source.postMessage({action:"resizeNodes",args:{ratioX:1,ratioY:1,zoom:graphView.getZoom()}},"*"),customEventMap[t.action]&&$(window).trigger(customEventMap[t.action],t.args)});