gis.anchored.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. var gis = gis || {};
  2. gis.anchored = function() {
  3. };
  4. var framedCloud;
  5. var popuptableShowConfig={};
  6. //泊位信息
  7. popuptableShowConfig.queryPopupBWById={"BodyConfig":[{"attrname":"BWMC","tdStyle":"width:25%","title":"泊位名称","valtdStyle":"width:25%"},{"attrname":"BWDM","tdStyle":"width:25%","title":"泊位代码","valtdStyle":"width:25%"},{"attrname":"BWZYYTTEXT","tdStyle":"width:25%","title":"泊位主要用途","valtdStyle":"width:25%"},{"attrname":"SSJYR","tdStyle":"width:25%","title":"港口企业或码头单位","valtdStyle":"width:25%"},{"attrname":"SJKPNL","title":"设计靠泊能力(吨级)"},{"attrname":"BWCD","title":"泊位长度(米)"},{"attrname":"QYSJSH","title":"前沿设计水深(米)"},{"attrname":"QYSJSS","title":"前沿实际水深(米)"},{"attrname":"SFWXPBWTEXT","title":"是否危险品泊位"},{"attrname":"SFDWKFBWTEXT","title":"是否对外开放泊位"},{"attrname":"NHWTGNL","title":"货物设计年综合通过能力(万吨)"},{"attrname":"NJZXTGNL","title":"集装箱设计年综合通过能力(万TEU)"},{"attrname":"BWFWLXTEXT","title":"泊位服务类型"},{"attrname":"BWSXTEXT","title":"泊位属性"},{"attrname":"SCLXTEXT","title":"生产类型"},{"attrname":"TCNF","title":"投产年份"},{"attrname":"BWSZSYTEXT","title":"泊位所在水系"},{"attrname":"GKSBSL","tdFunction":{"changelessParameter":["queryGKSBZYXX.html"],"function":"showMesg","functionParameter":["ID"]},"title":"48小时内港口申报作业笔数"},{"attrname":"HSSBZY","tdFunction":{"changelessParameter":["queryDRHSSB.html"],"function":"showMesg","functionParameter":["BWDM"]},"title":"48小时内海事申报作业笔数"},{"attrname":"CBTKCCS","tdFunction":{"changelessParameter":["queryDRTKCB.html"],"function":"showMesg","functionParameter":["ID"]},"title":"48小时内船舶停靠船次数"}],"BodyConfigType":"3","verticalNumber":2,"Title":"泊位信息"}
  8. //锚地信息
  9. popuptableShowConfig.queryPopupMDById={"BodyConfig":[{"attrname":"MDMC","tdStyle":"width:50%","title":"锚地名称","valtdStyle":"width:50%"},{"attrname":"MDCD","title":"锚地长度(米)"},{"attrname":"MDKD","title":"锚地宽度(米)"},{"attrname":"MDSS","title":"锚地水深(米)"},{"attrname":"MDMJ","title":"锚地面积(平方米)"},{"attrname":"XBNL","title":"系泊能力(吨级)"}],"BodyConfigType":"3","verticalNumber":1,"Title":"锚地信息"}
  10. gis.anchored.popup = function(lonlat,data){
  11. //alert(JSON.stringify(data));
  12. //alert(gis.anchored.tohtml(data));
  13. /*
  14. data={popupBorder:"1px solid #A5AAB4",width:320,height:155,title:"专题",
  15. style:["width:30%","text-align:center;"],
  16. data:[['港口名称','南京港'],['港区个数','2'],['锚地个数','2'],['作业区个数','16']]};
  17. */
  18. var chicken=$('#chicken');
  19. chicken.remove();
  20. data=gis.anchored.portinfo({portName:'南京港',portNumber:2,anchorageNumber:2,chanceNumber:16})
  21. var popup = new SuperMap.Popup.Anchored(
  22. "chicken",
  23. lonlat,
  24. new SuperMap.Size(data.width,data.height),
  25. gis.anchored.tohtml(data),
  26. null,
  27. true,
  28. null
  29. );
  30. popup.setBorder(data.popupBorder||"0px solid #A5AAB4");
  31. //popup.updateSize();
  32. //chicken_contentDiv
  33. popup.extdataheight=data.height;
  34. return popup;
  35. }
  36. gis.anchored.tohtml2 = function(data){
  37. //alert(JSON.stringify(data));
  38. //$("<div id='popupWin'></div>").addClass("popupWindow").appendTo($("#result"));
  39. var html=new Array();
  40. var nvlval='';
  41. if(data){
  42. if(data.title){
  43. html.push("<div class='titleClass'>");
  44. html.push(data.title);
  45. html.push("</div>");
  46. }
  47. if(data.data){
  48. //html.push("<div class='tableClass' style='width: 335px; height: 115px; position: relative;border:1px solid #A5AAB4;overflow:auto;'>");
  49. html.push("<div class='tabledivClass'>");
  50. //html.push(data.title);html.push("<br>");
  51. html.push("<table class='altrowstable'>");
  52. for(var i=0;i<data.data.length;i++){
  53. var o=data.data[i];
  54. html.push("<tr>");
  55. for(var j=0;j<o.length;j++){
  56. html.push("<td style='"+(data.style[j]||nvlval)+"'>");
  57. html.push(o[j]);
  58. html.push("</td>");
  59. }
  60. html.push("</tr>");
  61. }
  62. html.push("</table>");
  63. html.push("</div>");
  64. }
  65. }
  66. //alert(html.join(""));
  67. return html.join("");
  68. }
  69. gis.anchored.jsonConfigToHtml = function(data,jsonorhtml){
  70. //alert(typeof(jsonorhtml));
  71. if(popuptableShowConfig&&
  72. data&&data.tconfig&&gis.script.isNotBlank(data.tconfig)){
  73. //alert(typeof(jsonorhtml)=="object");
  74. if(typeof(jsonorhtml)=="object"&&jsonorhtml){
  75. var configdata=popuptableShowConfig[data.tconfig];
  76. if(configdata){
  77. var html=new Array();
  78. if(configdata.Title){
  79. html.push("<div class='titleClass'>");
  80. html.push(configdata.Title);
  81. html.push("</div>");
  82. }
  83. //configdata.verticalNumber=2;
  84. //jsonorhtml.x="12345";
  85. if(configdata.verticalNumber&&
  86. configdata.BodyConfig&&configdata.BodyConfig.length){
  87. //html.push("<div class='tableClass' style='width: 335px; height: 115px; position: relative;border:1px solid #A5AAB4;overflow:auto;'>");
  88. html.push("<div class='tabledivClass'>");
  89. //html.push(data.title);html.push("<br>");
  90. html.push("<table class='altrowstable'>");
  91. //console.log(configdata)
  92. for(var i=0;i<configdata.BodyConfig.length;i++){
  93. var cinfo=configdata.BodyConfig[i];
  94. var tval="";
  95. if(i%configdata.verticalNumber==0){
  96. html.push("<tr>");
  97. }
  98. //html.push("<td>A"+i+"</td>");html.push("<td>B"+i+"</td>");
  99. html.push("<td "+(cinfo.tdStyle?" style='"+cinfo.tdStyle+";' ":"")+">");
  100. html.push(cinfo.title);
  101. html.push("</td>");
  102. if(gis.script.isNotBlank(jsonorhtml[cinfo.attrname])){
  103. tval=jsonorhtml[cinfo.attrname];
  104. }
  105. var tdFunction =cinfo.tdFunction;
  106. var click="";
  107. if(tdFunction&&gis.script.isNotBlank(tdFunction['function'])){
  108. var args=[];
  109. //alert(tdFunction['function']);
  110. if(tdFunction.functionParameter&&tdFunction.functionParameter.length){
  111. for(var jj=0;jj<tdFunction.functionParameter.length;jj++){
  112. //console.log(listEntity[i]);console.log(functionParameter[jj]);
  113. var parameterVal=jsonorhtml[tdFunction.functionParameter[jj]];
  114. if(parameterVal!=null){
  115. args.push("unescape('"+escape(parameterVal)+"')");
  116. }else{
  117. args.push("''");
  118. }
  119. }
  120. }
  121. if(tdFunction.changelessParameter&&tdFunction.changelessParameter.length){
  122. for(var jk=0;jk<tdFunction.changelessParameter.length;jk++){
  123. var parameterVal=tdFunction.changelessParameter[jk];
  124. if(parameterVal!=null){
  125. args.push("unescape('"+escape(parameterVal)+"')");
  126. }
  127. }
  128. }
  129. click="onclick="+tdFunction['function']+'('+args.join(",")+")";
  130. //console.log(click);
  131. }
  132. /*
  133. html.push("<td "+(cinfo.valtdStyle?" style='"+cinfo.valtdStyle+";' ":" ")+
  134. click+">");
  135. */
  136. html.push("<td "+(cinfo.valtdStyle?" style='"+cinfo.valtdStyle+";' ":" ")+" >");
  137. if(gis.script.isNotBlank(click)){
  138. html.push("<a "+click+">");
  139. html.push(tval);
  140. html.push("</a>");
  141. }else{
  142. html.push(tval);
  143. }
  144. html.push("</td>");
  145. if(i%configdata.verticalNumber==configdata.verticalNumber-1){
  146. html.push("</tr>");
  147. }
  148. }
  149. if(configdata.verticalNumber>1&&(configdata.BodyConfig.length%configdata.verticalNumber!=0)){
  150. //console.log(configdata.BodyConfig.length,configdata.verticalNumber);
  151. //console.log("-----------"+configdata.BodyConfig.length%configdata.verticalNumber);
  152. var tdforval=configdata.verticalNumber-configdata.BodyConfig.length%configdata.verticalNumber;
  153. for(var ii=0;ii<tdforval;ii++){
  154. html.push("<td></td>");html.push("<td></td>");
  155. }
  156. }
  157. html.push("</table>");
  158. html.push("</div>");
  159. }
  160. //console.log(html.join(""));
  161. return html.join("");
  162. }
  163. }
  164. }
  165. return jsonorhtml;
  166. }
  167. /*
  168. * 弹出框显示,并且控制显示位置
  169. */
  170. gis.anchored.popupHtml = function(lonlat,data,toHtml,e){
  171. toHtml=gis.anchored.jsonConfigToHtml(data,toHtml);
  172. var chicken=$('#chicken');
  173. chicken.remove();
  174. var popup;
  175. if(e){
  176. //console.log("event",e);
  177. //e.clientX,e.clientY
  178. if(gis.script.isNum(e.clientX)&&gis.script.isNum(e.clientY)){
  179. //alert(treedivWidth);
  180. var twidth=treedivWidth||0;
  181. var clientx=e.clientX-twidth;
  182. var clienty=e.clientY;
  183. //alert((clientx+data.width+25)+"=="+$("#bgrounddiv").width())
  184. if((clienty+data.height+25)>$("#bgrounddiv").height()){
  185. //alert((clienty+data.height)+"--"+$("#bgrounddiv").height())
  186. if((clientx+data.width+25)>$("#bgrounddiv").width()){
  187. lonlat= map.getLonLatFromPixel(new SuperMap.Pixel(clientx-(data.width+32),clienty-(data.height)));
  188. toHtml=toHtml+'<div id="chicken_zxj" class="smPopupzxjBox" style="width: 20px; height: 24px; position: absolute;right:-19px;top:'+(data.height-28)+'px;"></div>';
  189. }else{
  190. lonlat= map.getLonLatFromPixel(new SuperMap.Pixel(clientx+20,clienty-(data.height)));
  191. toHtml=toHtml+'<div id="chicken_yxj" class="smPopupyxjBox" style="width: 20px; height: 24px; position: absolute;left:-19px;top:'+(data.height-28)+'px;"></div>';
  192. }
  193. }else{
  194. if((clientx+data.width+25)>$("#bgrounddiv").width()){
  195. lonlat= map.getLonLatFromPixel(new SuperMap.Pixel(clientx-(data.width+32),clienty-28));
  196. toHtml=toHtml+'<div id="chicken_zsj" class="smPopupzsjBox" style="width: 20px; height: 24px; position: absolute;right:-19px;top:28px;"></div>';
  197. }else{
  198. lonlat= map.getLonLatFromPixel(new SuperMap.Pixel(clientx+20,clienty-28));
  199. toHtml=toHtml+'<div id="chicken_ysj" class="smPopupysjBox" style="width: 20px; height: 24px; position: absolute;left:-19px;top:28px;"></div>';
  200. }
  201. }
  202. popup = new SuperMap.Popup(
  203. "chicken",
  204. lonlat,
  205. new SuperMap.Size(data.width,data.height),
  206. toHtml,
  207. true,
  208. null
  209. );
  210. /*
  211. lonlat= map.getLonLatFromPixel(new SuperMap.Pixel(e.clientX-twidth+20,e.clientY-28));
  212. toHtml=toHtml+'<div id="chicken_ysj" class="smPopupysjBox" style="width: 20px; height: 24px; position: absolute;left:-20px;top: 28px;"></div>'
  213. var popup = new SuperMap.Popup(
  214. "chicken",
  215. lonlat,
  216. new SuperMap.Size(data.width,data.height),
  217. toHtml,
  218. true,
  219. null
  220. );
  221. */
  222. }
  223. }/*else{
  224. popup = new SuperMap.Popup.Anchored(
  225. "chicken",
  226. lonlat,
  227. new SuperMap.Size(data.width,data.height),
  228. toHtml,
  229. null,
  230. true,
  231. null
  232. );
  233. }*/
  234. if(!popup){
  235. popup = new SuperMap.Popup.Anchored(
  236. "chicken",
  237. lonlat,
  238. new SuperMap.Size(data.width,data.height),
  239. toHtml,
  240. null,
  241. true,
  242. null
  243. );
  244. }
  245. popup.setBorder(data.popupBorder||"1px solid #A5AAB4");
  246. //popup.updateSize();
  247. //chicken_contentDiv
  248. popup.extdataheight=data.height;
  249. return popup;
  250. }
  251. /*
  252. * 根据参数设置弹出框,以及显示数据的(表格)样式
  253. */
  254. gis.anchored.addPopup = function(map,popup,feature){
  255. map.addPopup(popup);
  256. //$('#chicken_close').css("display","none");
  257. var contentDiv=$('#chicken_contentDiv');
  258. //alert($('#chicken_GroupDiv').width());//overflow:visible
  259. contentDiv.css("overflow","visible");
  260. //contentDiv.css("position","absolute");
  261. //contentDiv.css("border","1px solid #A5AAB4");
  262. contentDiv.css("width",$('#chicken_GroupDiv').width());//alert(contentDiv.width());
  263. //alert(contentDiv.width()+"**"+$('#chicken_GroupDiv').width());
  264. var tableDiv=$('.tabledivClass');
  265. //alert($('.titleClass').height());
  266. //tableDiv.css("height",tableDiv.height());
  267. tableDiv.css("height",popup.extdataheight-26);
  268. //tableDiv.css("width",contentDiv.width());
  269. /*
  270. if($.support&&$.support.leadingWhitespace&&contentDiv.width()==$('#chicken_GroupDiv').width()){
  271. contentDiv.css("width",$('#chicken_GroupDiv').width()-12);
  272. //tableDiv.css("height",tableDiv.height()-26);
  273. }
  274. */
  275. $('.smPopupCloseBox').css("top",5);
  276. $('.smPopupCloseBox').css("right",5);
  277. /*
  278. $.each($(".altrowstable"), function(i,val){
  279. gis.anchored.tableBeautify.call(this,"#fff","#F5F5F5","#FFFFCC")
  280. });
  281. */
  282. if(feature
  283. &&gis.script.isNotBlank(feature.attributes.labelfieldid)){
  284. var titleName=feature.attributes[feature.attributes.labelfieldid];
  285. var titleClassDiv=$('.titleClass');
  286. if(titleClassDiv&&!gis.script.isBlank(titleName)){
  287. titleClassDiv.html(gis.anchored.titleEllipsis(titleName,20));
  288. }
  289. }
  290. /*
  291. if(feature
  292. &&gis.script.isNotBlank(feature.attributes.labelfieldid)
  293. &&gis.script.isNotBlank(feature.attributes[feature.attributes.labelfieldid])){
  294. //console.log("feature",feature);
  295. var titleClassDiv=$('.titleClass');
  296. titleClassDiv.html(feature.attributes[feature.attributes.labelfieldid]);
  297. }
  298. */
  299. $.each($(".altrowstable"), function(i,val){
  300. gis.anchored.tableBeautify2.call(this);
  301. });
  302. }
  303. gis.anchored.titleEllipsis = function(tname,tlength){
  304. try{
  305. if(!gis.script.isBlank(tname)&&gis.script.isNum(tlength)&&tname.length
  306. &&tlength>0&&tname.length>tlength){
  307. tname=tname.substring(0,tlength)+'...';
  308. }
  309. }catch(e){}
  310. return tname;
  311. }
  312. /*
  313. *
  314. */
  315. gis.anchored.addFramedCloud = function(lonlat,size,contentHTML){
  316. if(framedCloud){
  317. try{
  318. framedCloud.hide();
  319. framedCloud.destroy();
  320. }
  321. catch(e){}
  322. }
  323. //初始化FramedCloud类
  324. framedCloud = new SuperMap.Popup.FramedCloud(
  325. "chicken",
  326. lonlat,
  327. size,
  328. contentHTML,
  329. null,
  330. true,
  331. null,
  332. true
  333. );
  334. map.addPopup(framedCloud);
  335. var contentDiv=$('#chicken_contentDiv');
  336. //alert($('#chicken_GroupDiv').width());//overflow:visible
  337. contentDiv.css("overflow","visible");
  338. //contentDiv.css("position","absolute");
  339. //contentDiv.css("border","1px solid #A5AAB4");
  340. contentDiv.css("width",$('#chicken_GroupDiv').width());//alert(contentDiv.width());
  341. //alert(contentDiv.width()+"**"+$('#chicken_GroupDiv').width());
  342. /*
  343. var tabledivClass=$('.tabledivClass');
  344. tabledivClass.css("width",tabledivClass.width()-1);
  345. tabledivClass.css("height",222);
  346. */
  347. //var tableDiv=$('.titleClass');
  348. //tableDiv.css("width",tableDiv.width()-10);
  349. var smFramedCloudPopupContent=$('.smFramedCloudPopupContent');
  350. smFramedCloudPopupContent.css("padding","0");
  351. $('.smPopupCloseBox').css("top",4);
  352. $('.smPopupCloseBox').css("right",5);
  353. }
  354. /*
  355. * 显示数据的(表格)样式
  356. */
  357. gis.anchored.tableBeautify = function(oddColor,evenColor,ouseoverColor){
  358. //alert(this);return;
  359. if(this){
  360. //var tr=this.getElementsByTagName("tr");
  361. for(var i=0;i<this.rows.length;i++){
  362. var temptr=this.rows[i];
  363. if(i%2==0){
  364. temptr.style.backgroundColor=oddColor;
  365. /*
  366. if(i==0){
  367. continue;
  368. }
  369. */
  370. //鼠标离开
  371. temptr.onmouseout=function(){
  372. this.style.backgroundColor=oddColor;
  373. }
  374. }else{
  375. temptr.style.backgroundColor=evenColor;
  376. //鼠标离开
  377. temptr.onmouseout=function(){
  378. this.style.backgroundColor=evenColor;
  379. }
  380. }
  381. //鼠标进入
  382. temptr.onmouseover=function(){
  383. //alert(this.style.backgroundColor+"-->"+ouseoverColor);
  384. this.style.backgroundColor=ouseoverColor;
  385. }
  386. /*
  387. temptr.onclick=function(){
  388. //alert(this.sectionRowIndex);
  389. }
  390. */
  391. var tagName_td=temptr.getElementsByTagName("td");
  392. if(tagName_td){
  393. var presentColsAmount=temptr.getElementsByTagName("td").length;
  394. if(presentColsAmount&&presentColsAmount>=4){
  395. for(var cc=1;cc<presentColsAmount;cc++){
  396. //alert(tagName_td[cc]);
  397. //$(tagName_td[cc]).css("color","red");
  398. $(tagName_td[cc]).css("border-left","1px solid #A5AAB4");
  399. }
  400. }
  401. }
  402. }
  403. }
  404. }
  405. /*
  406. * 显示数据的(表格)样式2
  407. */
  408. gis.anchored.tableBeautify2 = function(){
  409. //alert(this);return;
  410. if(this){
  411. //var tr=this.getElementsByTagName("tr");
  412. //$(this).css("frame","void");
  413. for(var i=0;i<this.rows.length;i++){
  414. var temptr=this.rows[i];
  415. var tagName_td=temptr.getElementsByTagName("td");
  416. if(tagName_td){
  417. var presentColsAmount=temptr.getElementsByTagName("td").length;
  418. if(presentColsAmount){
  419. for(var cc=0;cc<presentColsAmount;cc++){
  420. if(cc==0){
  421. $(tagName_td[cc]).css("border-left","0");
  422. }
  423. if(cc==presentColsAmount-1){
  424. $(tagName_td[cc]).css("border-right","0");
  425. }
  426. if(i==this.rows.length-1){
  427. $(tagName_td[cc]).css("border-bottom","0");
  428. }
  429. if(cc%2==0){
  430. //temptr.style.backgroundColor=oddColor;
  431. //
  432. //alert($(tagName_td[cc]).html());
  433. $(tagName_td[cc]).css("backgroundColor","#e6eff9");
  434. //$(tagName_td[cc]).css("text-align","right");
  435. $(tagName_td[cc]).css("color","#185f8a");
  436. // text-align: right;//color: #185f8a;
  437. if(gis.script.isNotBlank($(tagName_td[cc]).html())){
  438. $(tagName_td[cc]).html($(tagName_td[cc]).html()+":");
  439. }
  440. }
  441. $(tagName_td[cc]).css("text-align","left");
  442. }
  443. }
  444. }
  445. }
  446. }
  447. }
  448. gis.anchored.tohtml = function(data){
  449. //alert(JSON.stringify(data));
  450. //$("<div id='popupWin'></div>").addClass("popupWindow").appendTo($("#result"));
  451. var html=new Array();
  452. var nvlval='';
  453. if(data){
  454. if(data.title){
  455. html.push("<div class='titleClass'>");
  456. html.push(data.title);
  457. html.push("</div>");
  458. }
  459. if(data.data){
  460. //html.push("<div class='tableClass' style='width: 335px; height: 115px; position: relative;border:1px solid #A5AAB4;overflow:auto;'>");
  461. html.push("<div class='tabledivClass'>");
  462. //html.push(data.title);html.push("<br>");
  463. html.push("<table class='altrowstable'>");
  464. for(var i=0;i<data.data.length;i++){
  465. var o=data.data[i];
  466. html.push("<tr>");
  467. for(var j=0;j<o.length;j++){
  468. html.push("<td style='"+(data.style[j]||nvlval)+"'>");
  469. html.push(o[j]);
  470. html.push("</td>");
  471. }
  472. html.push("</tr>");
  473. }
  474. html.push("</table>");
  475. html.push("</div>");
  476. }
  477. }
  478. //alert(html.join(""));
  479. return html.join("");
  480. }
  481. gis.anchored.portinfo = function(data){
  482. var obj={popupBorder:"1px solid #A5AAB4",width:320,height:152,title:"港口信息",
  483. style:["width:30%","text-align:center;"],
  484. data:[['港口名称',data.portName],['港区个数',data.portNumber],['锚地个数',data.anchorageNumber],['作业区个数',data.chanceNumber]]};
  485. return obj;
  486. }
  487. gis.anchored.nvlinfo = function(data){
  488. var obj={popupBorder:"1px solid #A5AAB4",width:320,height:155,title:data.poptitle,
  489. style:["width:30%","text-align:center;"],
  490. data:[['名称',data.portName]]};
  491. return obj;
  492. }
  493. $(document).ready(function() {
  494. });