a0236ac84e9895b134d0e7d9967c8ba5b4df714b.svn-base 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. //数据表格使用
  2. var g;
  3. // 公司名称数组--X轴数据
  4. var compIds = "";
  5. var series = "";
  6. var gridData = "";
  7. //单位ID
  8. var deptName = "";
  9. //柱状图
  10. var option = {
  11. title : {
  12. text: '重点关注用户信息统计图',
  13. subtext: '/户'
  14. },
  15. tooltip : {
  16. trigger: 'axis',
  17. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  18. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  19. },
  20. formatter: function (params){
  21. return params[0].name + '<br/>'
  22. + params[0].seriesName + ' : ' + params[0].value + '<br/>'
  23. + params[1].seriesName + ' : ' + params[1].value + '<br/>'
  24. + params[2].seriesName + ' : ' + params[2].value + '<br/>'
  25. + params[3].seriesName + ' : ' + params[3].value;
  26. }
  27. },
  28. legend: {
  29. y : 'bottom',
  30. data:['总体情况','供电电源配置符合要求情况','自备应急电源配置符合要求情况','“双不满足”基本情况']
  31. },
  32. toolbox: {
  33. show : true,
  34. feature : {
  35. mark : {show: true},
  36. dataView : {show: false, readOnly: false},
  37. restore : {show: true},
  38. saveAsImage : {show: true}
  39. }
  40. },
  41. calculable : true,
  42. xAxis : [
  43. {
  44. type : 'category',
  45. data : ['广东电网','清远','韶关','中山','东莞','佛山']
  46. }
  47. ],
  48. yAxis : [
  49. {
  50. type : 'value',
  51. boundaryGap: [0, 0.1]
  52. }
  53. ],
  54. series : [
  55. {
  56. name:'总体情况',
  57. type:'bar',
  58. stack: 'sum',
  59. barCategoryGap: '50%',
  60. itemStyle: {
  61. normal: {
  62. color: 'tomato',
  63. barBorderColor: 'tomato',
  64. barBorderWidth:0.2,
  65. barBorderRadius:0,
  66. label : {
  67. show: true, position: 'insideTop'
  68. }
  69. }
  70. },
  71. data:[100, 200, 220, 120, 100, 80]
  72. },
  73. {
  74. name:'供电电源配置符合要求情况',
  75. type:'bar',
  76. stack: 'sum',
  77. barCategoryGap: '50%',
  78. itemStyle: {
  79. normal: {
  80. color: 'yellow',
  81. barBorderColor: 'tomato',
  82. barBorderWidth:0.2,
  83. barBorderRadius:0,
  84. label : {
  85. show: true, position: 'insideTop',
  86. formatter: function (params) {
  87. for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
  88. if (option.xAxis[0].data[i] == params.name) {
  89. return option.series[0].data[i] + params.value;
  90. }
  91. }
  92. }
  93. }
  94. }
  95. },
  96. data:[200, 200, 220, 120, 100, 80]
  97. },
  98. {
  99. name:'自备应急电源配置符合要求情况',
  100. type:'bar',
  101. stack: 'sum',
  102. itemStyle: {
  103. normal: {
  104. color: 'blue',
  105. barBorderColor: 'tomato',
  106. barBorderWidth:0.2,
  107. barBorderRadius:0,
  108. label : {
  109. show: true,
  110. position: 'insideTop',
  111. formatter: function (params) {
  112. for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
  113. if (option.xAxis[0].data[i] == params.name) {
  114. return option.series[0].data[i] + option.series[1].data[i] + params.value;
  115. }
  116. }
  117. }
  118. }
  119. }
  120. },
  121. data:[300, 80, 50, 80,80, 70]
  122. },
  123. {
  124. name:'“双不满足”基本情况',
  125. type:'bar',
  126. stack: 'sum',
  127. itemStyle: {
  128. normal: {
  129. color: 'green',
  130. barBorderColor: 'tomato',
  131. barBorderWidth:0.2,
  132. barBorderRadius:0,
  133. label : {
  134. show: true,
  135. position: 'top',
  136. formatter: function (params) {
  137. for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
  138. if (option.xAxis[0].data[i] == params.name) {
  139. return option.series[0].data[i] + option.series[1].data[i] + option.series[2].data[i] + params.value;
  140. }
  141. }
  142. },
  143. textStyle: {
  144. color: 'tomato'
  145. }
  146. }
  147. }
  148. },
  149. data:[300, 80, 50, 80,80, 70]
  150. }
  151. ]
  152. };
  153. var series1={
  154. name:'总体情况',
  155. type:'bar',
  156. stack: 'sum',
  157. barCategoryGap: '50%',
  158. itemStyle: {
  159. normal: {
  160. color: 'tomato',
  161. barBorderColor: 'tomato',
  162. barBorderWidth:0.2,
  163. barBorderRadius:0,
  164. label : {
  165. show: true, position: 'insideTop'
  166. }
  167. }
  168. },
  169. data:[100, 200, 220, 120, 100, 80]
  170. };
  171. var series2={
  172. name:'供电电源配置符合要求情况',
  173. type:'bar',
  174. stack: 'sum',
  175. barCategoryGap: '50%',
  176. itemStyle: {
  177. normal: {
  178. color: 'yellow',
  179. barBorderColor: 'tomato',
  180. barBorderWidth:0.2,
  181. barBorderRadius:0,
  182. label : {
  183. show: true, position: 'insideTop',
  184. formatter: function (params) {
  185. for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
  186. if (option.xAxis[0].data[i] == params.name) {
  187. return parseInt(option.series[0].data[i]) + parseInt(params.value);
  188. }
  189. }
  190. }
  191. }
  192. }
  193. },
  194. data:[200, 200, 220, 120, 100, 80]
  195. };
  196. var series3={
  197. name:'自备应急电源配置符合要求情况',
  198. type:'bar',
  199. stack: 'sum',
  200. itemStyle: {
  201. normal: {
  202. color: 'blue',
  203. barBorderColor: 'tomato',
  204. barBorderWidth:0.2,
  205. barBorderRadius:0,
  206. label : {
  207. show: true,
  208. position: 'insideTop',
  209. formatter: function (params) {
  210. for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
  211. if (option.xAxis[0].data[i] == params.name) {
  212. return parseInt(option.series[0].data[i]) + parseInt(option.series[1].data[i]) + parseInt(params.value);
  213. }
  214. }
  215. }
  216. }
  217. }
  218. },
  219. data:[300, 80, 50, 80,80, 70]
  220. };
  221. var series4={
  222. name:'“双不满足”基本情况',
  223. type:'bar',
  224. stack: 'sum',
  225. itemStyle: {
  226. normal: {
  227. color: 'green',
  228. barBorderColor: 'tomato',
  229. barBorderWidth:0.2,
  230. barBorderRadius:0,
  231. label : {
  232. show: true,
  233. position: 'top',
  234. formatter: function (params) {
  235. for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
  236. if (option.xAxis[0].data[i] == params.name) {
  237. return parseInt(option.series[0].data[i]) + parseInt(option.series[1].data[i]) + parseInt(option.series[2].data[i]) + parseInt(params.value);
  238. }
  239. }
  240. },
  241. textStyle: {
  242. color: 'tomato'
  243. }
  244. }
  245. }
  246. },
  247. data:[300, 80, 50, 80,80, 70]
  248. };
  249. //柱状图方法
  250. //总体
  251. function changeBarOption1(data){
  252. series1.name='总体情况';
  253. series2.name='供电电源配置符合要求情况';
  254. series3.name='自备应急电源配置符合要求情况';
  255. series4.name='“双不满足”基本情况';
  256. var legendData=[];
  257. var data1=[];
  258. var data2=[];
  259. var data3=[];
  260. var data4=[];
  261. for(var i=0;i<data.rows.length-1;i++){
  262. legendData[i]=data.rows[i].name;
  263. data1[i]=data.rows[i].hejiSum;
  264. data2[i]=data.rows[i].hejidmSum;
  265. data3[i]=data.rows[i].hejizbSum;
  266. data4[i]=data.rows[i].hejisfSum;
  267. }
  268. series1.data=data1;
  269. series2.data=data2;
  270. series3.data=data3;
  271. series4.data=data4;
  272. option.series[0]=series1;
  273. option.series[1]=series2;
  274. option.series[2]=series3;
  275. option.series[3]=series4;
  276. option.xAxis[0].data=legendData;
  277. option.legend.data=['总体情况','供电电源配置符合要求情况','自备应急电源配置符合要求情况','“双不满足”基本情况'];
  278. option.tooltip.formatter=function (params){
  279. return params[0].name + '<br/>'
  280. + params[0].seriesName + ' : ' + params[0].value + '<br/>'
  281. + params[1].seriesName + ' : ' + params[1].value + '<br/>'
  282. + params[2].seriesName + ' : ' + params[2].value + '<br/>'
  283. + params[3].seriesName + ' : ' + params[3].value;
  284. };
  285. }
  286. //供电电源
  287. function changeBarOption2(data){
  288. series1.name='特级用户';
  289. series2.name='一级用户';
  290. series3.name='二级用户';
  291. var legendData=[];
  292. var data1=[];
  293. var data2=[];
  294. var data3=[];
  295. for(var i=0;i<data.rows.length-1;i++){
  296. legendData[i]=data.rows[i].name;
  297. data1[i]=data.rows[i].tjgdmzcustomerNum;
  298. data2[i]=data.rows[i].yjgdmzcustomerNum;
  299. data3[i]=data.rows[i].ejgdmzcustomerNum;
  300. }
  301. series1.data=data1;
  302. series2.data=data2;
  303. series3.data=data3;
  304. option.series[0]=series1;
  305. option.series[1]=series2;
  306. option.series[2]=series3;
  307. option.xAxis[0].data=legendData;
  308. option.legend.data=['特级用户', '一级用户','二级用户'];
  309. option.tooltip.formatter=function (params){
  310. return params[0].name + '<br/>'
  311. + params[0].seriesName + ' : ' + params[0].value + '<br/>'
  312. + params[1].seriesName + ' : ' + params[1].value + '<br/>'
  313. + params[2].seriesName + ' : ' + params[2].value;
  314. };
  315. }
  316. //自备应急
  317. function changeBarOption3(data){
  318. series1.name='特级用户';
  319. series2.name='一级用户';
  320. series3.name='二级用户';
  321. var legendData=[];
  322. var data1=[];
  323. var data2=[];
  324. var data3=[];
  325. for(var i=0;i<data.rows.length-1;i++){
  326. legendData[i]=data.rows[i].name;
  327. data1[i]=data.rows[i].tjzbmzcustomerNum;
  328. data2[i]=data.rows[i].yjzbmzcustomerNum;
  329. data3[i]=data.rows[i].ejzbmzcustomerNum;
  330. }
  331. series1.data=data1;
  332. series2.data=data2;
  333. series3.data=data3;
  334. option.series[0]=series1;
  335. option.series[1]=series2;
  336. option.series[2]=series3;
  337. option.xAxis[0].data=legendData;
  338. option.legend.data=['特级用户', '一级用户','二级用户'];
  339. option.tooltip.formatter=function (params){
  340. return params[0].name + '<br/>'
  341. + params[0].seriesName + ' : ' + params[0].value + '<br/>'
  342. + params[1].seriesName + ' : ' + params[1].value + '<br/>'
  343. + params[2].seriesName + ' : ' + params[2].value;
  344. };
  345. }
  346. //“双不满足”
  347. function changeBarOption4(data){
  348. series1.name='特级用户';
  349. series2.name='一级用户';
  350. series3.name='二级用户';
  351. var legendData=[];
  352. var data1=[];
  353. var data2=[];
  354. var data3=[];
  355. for(var i=0;i<data.rows.length-1;i++){
  356. legendData[i]=data.rows[i].name;
  357. data1[i]=data.rows[i].tjsfcustomerNum;
  358. data2[i]=data.rows[i].yjsfcustomerNum;
  359. data3[i]=data.rows[i].ejsfcustomerNum;
  360. }
  361. series1.data=data1;
  362. series2.data=data2;
  363. series3.data=data3;
  364. option.series[0]=series1;
  365. option.series[1]=series2;
  366. option.series[2]=series3;
  367. option.xAxis[0].data=legendData;
  368. option.legend.data=['特级用户', '一级用户','二级用户'];
  369. option.tooltip.formatter=function (params){
  370. return params[0].name + '<br/>'
  371. + params[0].seriesName + ' : ' + params[0].value + '<br/>'
  372. + params[1].seriesName + ' : ' + params[1].value + '<br/>'
  373. + params[2].seriesName + ' : ' + params[2].value;
  374. };
  375. }
  376. //折线图option1
  377. var option1 = {
  378. title : {
  379. text: '重点关注用户信息统计图',
  380. subtext: '/户'
  381. },
  382. tooltip : {
  383. trigger: 'axis'
  384. },
  385. legend: {
  386. y:'bottom',
  387. data:['广东','清远','中山']
  388. },
  389. toolbox: {
  390. show : true,
  391. feature : {
  392. mark : {show: true},
  393. dataView : {show: false, readOnly: false},
  394. magicType : {show: false, type: ['line', 'bar', 'stack', 'tiled']},
  395. restore : {show: true},
  396. saveAsImage : {show: true}
  397. }
  398. },
  399. calculable : true,
  400. xAxis : [
  401. {
  402. type : 'category',
  403. boundaryGap : false,
  404. data : ['总体情况','供电电源配置符合要求情况','自备应急电源配置符合要求情况','“双不满足”基本情况']
  405. }
  406. ],
  407. yAxis : [
  408. {
  409. type : 'value'
  410. }
  411. ],
  412. series : [
  413. {
  414. name:'广东',
  415. type:'line',
  416. data:[20, 30, 50,40]
  417. },
  418. {
  419. name:'清远',
  420. type:'line',
  421. data:[10, 18, 19, 24]
  422. },
  423. {
  424. name:'中山',
  425. type:'line',
  426. data:[15, 22, 20, 15]
  427. }
  428. ]
  429. };
  430. function changeLineOption(data){
  431. var legendData=[];
  432. var seriesJson=[];
  433. for(var i=0;i<data.rows.length-1;i++){
  434. legendData[i]=data.rows[i].name;
  435. var d=[];
  436. var j=0;
  437. if(data.rows[i]["hejiSum"]!=undefined){
  438. d[j]=data.rows[i]["hejiSum"];
  439. j++;
  440. }
  441. if(data.rows[i]["hejidmSum"]!=undefined){
  442. d[j]=data.rows[i]["hejidmSum"];
  443. j++;
  444. }
  445. if(data.rows[i]["hejizbSum"]!=undefined){
  446. d[j]=data.rows[i]["hejizbSum"];
  447. j++;
  448. }
  449. if(data.rows[i]["hejisfSum"]!=undefined){
  450. d[j]=data.rows[i]["hejisfSum"];
  451. j++;
  452. }
  453. var json={name:data.rows[i].name,type:'line',data:d};
  454. seriesJson[i]=json;
  455. }
  456. option1.legend.data=legendData;
  457. option1.xAxis[0].data=['总体情况','供电电源配置符合要求情况','自备应急电源配置符合要求情况','“双不满足”基本情况'];
  458. option1.series=seriesJson;
  459. }
  460. //function changeLineOption2(data){
  461. //var legendData=[];
  462. //var seriesData=[];
  463. //var data1=[];
  464. //var data2=[];
  465. //var data3=[];
  466. //var data4=[];
  467. //for(var i=0;i<data.rows.length-1;i++){
  468. ////alert(data.rows[i].name);
  469. //legendData[i]=data.rows[i].name;
  470. //data1[i]=data.rows[i].national;
  471. //data2[i]=data.rows[i].occupation;
  472. //data3[i]=data.rows[i].provincial;
  473. //data4[i]=data.rows[i].international;
  474. //}
  475. //var series1={ name:'国家标准',
  476. // type:'line',
  477. // data:data1
  478. //};
  479. //var series2={ name:'行业标准',
  480. // type:'line',
  481. // data:data2
  482. //};
  483. //var series3={ name:'地方标准',
  484. // type:'line',
  485. // data:data3
  486. //};
  487. //var series4={ name:'国际标准',
  488. // type:'line',
  489. // data:data4
  490. //};
  491. //
  492. //
  493. //option1.legend.data=$("#CLASSES_242").attr("relText").split(",");
  494. //var getInput=$("#CLASSES_242").attr("relText").split(",");
  495. //var j=0;
  496. //if($.inArray('国家标准',getInput)!=-1){
  497. //seriesData[j]=series1;
  498. //j++;
  499. //}
  500. //if($.inArray('行业标准',getInput)!=-1){
  501. //seriesData[j]=series2;
  502. //j++;
  503. //}
  504. //if($.inArray('地方标准',getInput)!=-1){
  505. //seriesData[j]=series3;
  506. //j++;
  507. //}
  508. //if($.inArray('国际标准',getInput)!=-1){
  509. //seriesData[j]=series4;
  510. //j++;
  511. //}
  512. //
  513. ////seriesData=[series1,series2,series3,series4,series5];
  514. //option1.xAxis[0].data=legendData;
  515. //option1.series=seriesData;
  516. //}
  517. //饼图option2
  518. var option2 = {
  519. title : {
  520. text: '重点关注用户信息统计图',
  521. subtext: '/户'
  522. },
  523. tooltip : {
  524. trigger: 'item',
  525. formatter: "{a} <br/>{b} : {c} ({d}%)"
  526. },
  527. legend: {
  528. y : 'bottom',
  529. data:['总体情况','供电电源配置符合要求情况','自备应急电源配置符合要求情况','“双不满足”基本情况']
  530. },
  531. toolbox: {
  532. show : true,
  533. feature : {
  534. mark : {show: true},
  535. dataView : {show: false, readOnly: false},
  536. magicType : {
  537. show: false,
  538. type: ['pie', 'funnel'],
  539. option: {
  540. funnel: {
  541. x: '25%',
  542. width: '50%',
  543. funnelAlign: 'left',
  544. max: 1548
  545. }
  546. }
  547. },
  548. restore : {show: true},
  549. saveAsImage : {show: true}
  550. }
  551. },
  552. calculable : true,
  553. series : [
  554. {
  555. name:'重点关注用户信息',
  556. type:'pie',
  557. radius : '55%',
  558. center: ['50%', '55%'],
  559. data:[
  560. {value:335, name:'总体情况'},
  561. {value:310, name:'供电电源配置符合要求情况'},
  562. {value:234, name:'自备应急电源配置符合要求情况'},
  563. {value:256, name:'“双不满足”基本情况'}
  564. ]
  565. }
  566. ]
  567. };
  568. function changePieOption(data){
  569. /*************************************************** 初始化解析饼图数据 start**********************************************************/
  570. option2.legend.data=['总体情况','供电电源配置符合要求情况','自备应急电源配置符合要求情况','“双不满足”基本情况'];
  571. var index=data.rows.length-1;
  572. var seriesJson=[];
  573. var j=0;
  574. if(data.rows[index]["hejiSum"]!=undefined){
  575. var json={value:data.rows[index]["hejiSum"],name:'总体情况'};
  576. seriesJson[j]=json;
  577. j++;
  578. }
  579. if(data.rows[index]["hejidmSum"]!=undefined){
  580. var json={value:data.rows[index]["hejidmSum"],name:'供电电源配置符合要求情况'};
  581. seriesJson[j]=json;
  582. j++;
  583. }
  584. if(data.rows[index]["hejizbSum"]!=undefined){
  585. var json={value:data.rows[index]["hejizbSum"],name:'自备应急电源配置符合要求情况'};
  586. seriesJson[j]=json;
  587. j++;
  588. }
  589. if(data.rows[index]["hejisfSum"]!=undefined){
  590. var json={value:data.rows[index]["hejisfSum"],name:'“双不满足”基本情况'};
  591. seriesJson[j]=json;
  592. j++;
  593. }
  594. option2.series[0].data=seriesJson;
  595. /*************************************************** 初始化解析饼图数据 end **********************************************************/
  596. }
  597. // 表格的初始化
  598. function initComplete() {//gridData
  599. deptName = (window.location.href).split('?')[1];
  600. $("body").eq(0).showLoading();
  601. $.ajax({
  602. url : $.pathname()+ "/ws/customerHuiZong/customerHuiZongService/getZYCustomerInfo2",
  603. type : 'post',
  604. timeout : 60000,
  605. data : {id : deptName},
  606. dataType : 'json',
  607. success : function(data){
  608. g = $("#maingrid").quiGrid({
  609. columns : [{
  610. display : '供电单位',
  611. "name" : 'name',
  612. id : 'name',
  613. width : "20%",
  614. dept_id:'dept_id', frozen: true,
  615. align : 'left',render: addStatus
  616. },{
  617. display : '总体情况',
  618. name: 'hejiSum',
  619. width : "20%",
  620. align : 'center'
  621. },{
  622. display : '供电电源配置符合要求情况',
  623. name: 'hejidmSum',
  624. width : "20%",
  625. align : 'center'
  626. },{
  627. display : '自备应急电源配置符合要求情况',
  628. name: 'hejizbSum',
  629. width : "20%",
  630. align : 'center'
  631. },{
  632. display : '“双不满足”基本情况',
  633. name: 'hejisfSum',
  634. width : "20%",
  635. align : 'center'
  636. }],
  637. //url :$.pathname()+ "/ws/customerHuiZong/customerHuiZongService/getCustomerInfo",
  638. //params : {id : deptName},
  639. data:data,
  640. rownumbers : false,
  641. /*height : 600,*/
  642. width : "100%",
  643. usePager : false,
  644. autoCheckChildren : true,
  645. tree : {
  646. columnId : 'name'
  647. }
  648. // treeAjax : true,
  649. // treeChildDataPath : $.pathname()
  650. // + '/ws/customerHuiZong/customerHuiZongService/getPlanInfoList?deptId=',
  651. // treeAutoParam:"dept_id"
  652. });
  653. $("body").eq(0).hideLoading();
  654. //重设高度
  655. $(parent.document.body).find("iframe").height($(window.document.body).height()+30);
  656. $(top.document.body).find("iframe").height($(window.document.body).height()+30);
  657. gridData=data;
  658. changeBarOption1(data);
  659. changeLineOption(data);
  660. changePieOption(data);
  661. var myChart = echarts.init(document.getElementById('main1'));
  662. myChart.setOption(option);
  663. $(".basicTab").bind('actived',function(e,i){
  664. if(i==0){
  665. /***************************************** 加载柱状图 *********************************************************/
  666. var myChart1 = echarts.init(document.getElementById('main1'));
  667. myChart1.setOption(option);
  668. }else if(i == 1){
  669. /***************************************** 加载折线图 *********************************************************/
  670. var myChart2 = echarts.init(document.getElementById('main2'));
  671. myChart2.setOption(option1);
  672. }else if(i==2){
  673. /***************************************** 加载饼图 *********************************************************/
  674. var myChart3 = echarts.init(document.getElementById('main3'));
  675. myChart3.setOption(option2);
  676. }
  677. });
  678. },
  679. error : function(e){
  680. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  681. }
  682. });
  683. }
  684. function addStatus(rowdata, rowindex, value, column){
  685. if("总计"==rowdata.name){
  686. return value;
  687. }else{
  688. var comp_id='"'+rowdata.compid+'"';
  689. var name = '"'+value+'"';
  690. return "<a href='javascript:newHtml("+comp_id+","+name+")'>" + value +" </a>";
  691. }
  692. }
  693. function newHtml(comp_id,name){
  694. if(name=="总计"){
  695. return;
  696. }else if(deptName==comp_id){
  697. return;
  698. }else{
  699. // window.open("/nwyj/page/business/am/customer/customer-poll1.jsp?"+comp_id);
  700. $.indexOpenNextWindow("/nwyj/page/business/am/customer/customerZDGZYH-poll1.jsp?"+comp_id);
  701. }
  702. }
  703. //返回事件
  704. function goBack() {
  705. var url = "/nwyj/page/business/am/customer/"+"customer-focus.jsp";
  706. parent.document.getElementById("frmright").setAttribute("src", ""+encodeURI(url));
  707. }