123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940 |
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- // 数据表格
- var g;
- var gridData;
- var myCols1 = [{
- display : 'N≤250',
- "name" : 'content_min',
- width : 100,render:showMsg
- }, {
- display : '250<N≤500',
- "name" : 'content_mid',
- width : 100,render:showMsg
- }, {
- display : 'N>500',
- "name" : 'content_max',
- width : 100,render:showMsg
- }];
- var myCols2 = [{
- display : '380V',
- "name" : 'level_max',
- width : 100,render:showMsg
- }, {
- display : '10kV',
- "name" : 'level_min',
- width : 100,render:showMsg
- }];
- var myCols3 = [{
- display : '发电机',
- "name" : 'generator',
- width : 100,render:showMsg
- }, {
- display : 'UPS',
- "name" : 'ups',
- width : 100,render:showMsg
- }, {
- display : '磁飞轮',
- "name" : 'fly_circle',
- width : 100,render:showMsg
- }];
- var myCols4 = [{
- display : '可调拨',
- "name" : 'kused',
- width : 100,render:showMsg
- }, {
- display : '不可调拨',
- "name" : 'bused',
- width : 100,render:showMsg
- }];
- // 柱状图
- var option = {
- title : {
- text: '发电车'
- ,subtext: '/辆'
- },
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- },
- formatter: function (params){
- return params[0].name + '<br/>'
- + params[0].seriesName + ' : ' + params[0].value + '<br/>'
- + params[1].seriesName + ' : ' + params[1].value + '<br/>'
- + params[2].seriesName + ' : ' + params[2].value;
- }
- },
- legend: {
- y:'bottom',
- //selectedMode:false,
- data:['N≤250', '250<N≤500','N>500']
- },
- toolbox: {
- show : true,
- feature : {
- mark : {show: true},
- dataView : {show: false, readOnly: false},
- restore : {show: true},
- saveAsImage : {show: true}
- }
- },
- calculable : true,
- xAxis : [
- {
- type : 'category',
- data : ['广东电网公司','清远供电局','韶关供电局','中山供电局','东莞供电局','佛山供电局']
- }
- ],
- yAxis : [
- {
- type : 'value',
- boundaryGap: [0, 0.1]
- }
- ],
- series : [
-
- {
- name:'N≤250',
- type:'bar',
- stack: 'sum',
- barCategoryGap: '50%',
- itemStyle: {
- normal: {
- color: 'tomato',
- barBorderColor: 'tomato',
- barBorderWidth:0.2,
- barBorderRadius:0,
- label : {
- show: true, position: 'insideTop'
- }
- }
- },
- data:[100, 200, 220, 120, 100, 80]
- },{
- name:'250<N≤500',
- type:'bar',
- stack: 'sum',
- barCategoryGap: '50%',
- itemStyle: {
- normal: {
- color: 'yellow',
- barBorderColor: 'tomato',
- barBorderWidth:0.2,
- barBorderRadius:0,
- label : {
- show: true, position: 'insideTop',
- formatter: function (params) {
- for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
- if (option.xAxis[0].data[i] == params.name) {
- return option.series[0].data[i] + params.value;
- }
- }
- }
- }
- }
- },
- data:[200, 200, 220, 120, 100, 80]
- },
- {
- name:'N>500',
- type:'bar',
- stack: 'sum',
- itemStyle: {
- normal: {
- color: 'blue',
- barBorderColor: 'tomato',
- barBorderWidth:0.2,
- barBorderRadius:0,
- label : {
- show: true,
- position: 'top',
- formatter: function (params) {
- for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
- if (option.xAxis[0].data[i] == params.name) {
- return option.series[0].data[i] + option.series[1].data[i] + params.value;
- }
- }
- },
- textStyle: {
- color: 'tomato'
- }
- }
- }
- },
- data:[300, 80, 50, 80,80, 70]
- }
- ]
- };
- var series1={
- name:'N≤250',
- type:'bar',
- stack: 'sum',
- barCategoryGap: '50%',
- itemStyle: {
- normal: {
- color: 'tomato',
- barBorderColor: 'tomato',
- barBorderWidth:0.2,
- barBorderRadius:0,
- label : {
- show: true, position: 'insideTop'
- }
- }
- },
- data:[100, 200, 220, 120, 100, 80]
- };
- var series2={
- name:'250<N≤500',
- type:'bar',
- stack: 'sum',
- barCategoryGap: '50%',
- itemStyle: {
- normal: {
- color: 'yellow',
- barBorderColor: 'tomato',
- barBorderWidth:0.2,
- barBorderRadius:0,
- label : {
- show: true, position: 'insideTop',
- formatter: function (params) {
- for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
- if (option.xAxis[0].data[i] == params.name) {
- return parseInt(option.series[0].data[i]) + parseInt(params.value);
- }
- }
- }
- }
- }
- },
- data:[200, 200, 220, 120, 100, 80]
- };
- var series3={
- name:'N>500',
- type:'bar',
- stack: 'sum',
- itemStyle: {
- normal: {
- color: 'blue',
- barBorderColor: 'tomato',
- barBorderWidth:0.2,
- barBorderRadius:0,
- label : {
- show: true,
- position: 'top',
- formatter: function (params) {
- for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
- if (option.xAxis[0].data[i] == params.name) {
- return parseInt(option.series[0].data[i]) + parseInt(option.series[1].data[i]) + parseInt(params.value);
- }
- }
- },
- textStyle: {
- color: 'tomato'
- }
- }
- }
- },
- data:[300, 80, 50, 80,80, 70]
- };
- var series4={
- name:'N>500',
- type:'bar',
- stack: 'sum',
- itemStyle: {
- normal: {
- color: 'blue',
- barBorderColor: 'tomato',
- barBorderWidth:0.2,
- barBorderRadius:0,
- label : {
- show: true,
- position: 'top',
- formatter: function (params) {
- for (var i = 0, l = option.xAxis[0].data.length; i < l; i++) {
- if (option.xAxis[0].data[i] == params.name) {
- return parseInt(option.series[0].data[i]) + parseInt(params.value);
- }
- }
- },
- textStyle: {
- color: 'tomato'
- }
- }
- }
- },
- data:[300, 80, 50, 80,80, 70]
- };
- //折线图option6
- var option6 = {
- title : {
- text: '发电车'
- ,subtext: '/辆'
- },
- tooltip : {
- trigger: 'axis'
- },
- legend: {
- y:'bottom',
- data:['发电车数量']
- },
- toolbox: {
- show : true,
- feature : {
- mark : {show: true},
- dataView : {show: false, readOnly: false},
- magicType : {show: false, type: ['line', 'bar', 'stack', 'tiled']},
- restore : {show: true},
- saveAsImage : {show: true}
- }
- },
- calculable : true,
- xAxis : [
- {
- type : 'category',
- boundaryGap : false,
- data : ['总体预案','专项预案','现场处置方案','部门预案']
- }
- ],
- yAxis : [
- {
- type : 'value'
- }
- ],
- series : [
- {
- name:'发电车数量',
- type:'line',
-
- data:[20, 30, 50,40]
- }
- ]
- };
- //饼图option2
- var option7 = {
- title : {
- text: '发电车'
- ,subtext: '/辆'
- },
- tooltip : {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- legend: {
- y : 'bottom',
- data:['总体预案','专项预案','现场处置方案','部门预案']
- },
- toolbox: {
- show : true,
- feature : {
- mark : {show: true},
- dataView : {show: false, readOnly: false},
- magicType : {
- show: false,
- type: ['pie', 'funnel'],
- option: {
- funnel: {
- x: '25%',
- width: '50%',
- funnelAlign: 'left',
- max: 1548
- }
- }
- },
- restore : {show: true},
- saveAsImage : {show: true}
- }
- },
- calculable : true,
- series : [
- {
- name:'发电车数量',
- type:'pie',
- radius : '55%',
- center: ['50%', '55%'],
- data:[
- {value:335, name:'总体预案'},
- {value:310, name:'专项预案'},
- {value:234, name:'现场处置方案'},
- {value:135, name:'部门预案'}
- ]
- }
- ]
- };
- //柱状图
- function changeBarOption1(data){
- series1.name='N≤250';
- series2.name='250<N≤500';
- series3.name='N>500';
- var legendData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- for(var i=0;i<data.rows.length-1;i++){
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].content_min;
- data2[i]=data.rows[i].content_mid;
- data3[i]=data.rows[i].content_max;
- }
- series1.data=data1;
- series2.data=data2;
- series3.data=data3;
-
- option.series[0]=series1;
- option.series[1]=series2;
- option.series[2]=series3;
-
- option.xAxis[0].data=legendData;
- option.legend.data=['N≤250', '250<N≤500','N>500'];
- option.tooltip.formatter=function (params){
- return params[0].name + '<br/>'
- + params[0].seriesName + ' : ' + params[0].value + '<br/>'
- + params[1].seriesName + ' : ' + params[1].value + '<br/>'
- + params[2].seriesName + ' : ' + params[2].value;
- };
-
- }
- function changeBarOption2(data){
- series1.name='380v';
- series4.name='10kv';
- var legendData=[];
- var data1=[];
- var data2=[];
- for(var i=0;i<data.rows.length-1;i++){
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].level_max;
- data2[i]=data.rows[i].level_min;
- }
- series1.data=data1;
- series4.data=data2;
-
- option.series[0]=series1;
- option.series[1]=series4;
- option.series[2]=[];
-
- option.xAxis[0].data=legendData;
- option.legend.data=['380v', '10kv'];
- option.tooltip.formatter=function (params){
- return params[0].name + '<br/>'
- + params[0].seriesName + ' : ' + params[0].value + '<br/>'
- + params[1].seriesName + ' : ' + params[1].value;
- };
-
- }
- function changeBarOption3(data){
- series1.name='发电机';
- series2.name='UPS';
- series3.name='磁飞轮';
- var legendData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- for(var i=0;i<data.rows.length-1;i++){
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].generator;
- data2[i]=data.rows[i].ups;
- data3[i]=data.rows[i].fly_circle;
- }
- series1.data=data1;
- series2.data=data2;
- series3.data=data3;
-
- option.series[0]=series1;
- option.series[1]=series2;
- option.series[2]=series3;
-
- option.xAxis[0].data=legendData;
- option.legend.data=['发电机', 'UPS','磁飞轮'];
- option.tooltip.formatter=function (params){
- return params[0].name + '<br/>'
- + params[0].seriesName + ' : ' + params[0].value + '<br/>'
- + params[1].seriesName + ' : ' + params[1].value + '<br/>'
- + params[2].seriesName + ' : ' + params[2].value;
- };
-
- }
- function changeBarOption4(data){
- series1.name='可调拨';
- series4.name='不可调拨';
- var legendData=[];
- var data1=[];
- var data2=[];
- for(var i=0;i<data.rows.length-1;i++){
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].kused;
- data2[i]=data.rows[i].bused;
- }
- series1.data=data1;
- series4.data=data2;
-
- option.series[0]=series1;
- option.series[1]=series4;
- option.series[2]=[];
-
- option.xAxis[0].data=legendData;
- option.legend.data=['可调拨', '不可调拨'];
- option.tooltip.formatter=function (params){
- return params[0].name + '<br/>'
- + params[0].seriesName + ' : ' + params[0].value + '<br/>'
- + params[1].seriesName + ' : ' + params[1].value;
- };
-
- }
- //折线图
- function changeLineOption1(data){
- /*************************************************** 初始化解析折线图数据 start**********************************************************/
- var legendData=[];
- var seriesData=[];
- for(var i=0;i<data.rows.length-1;i++){
- //alert(data.rows[i].name);
- legendData[i]=data.rows[i].name;
- var d={};
- seriesData[i]=data.rows[i].num;
- }
- option6.xAxis[0].data=legendData;
- option6.series[0].data=seriesData;
- /*************************************************** 初始化解析折线图数据 end **********************************************************/
- }
- //饼图
- function changePieOption1(data){
- /*************************************************** 初始化解析饼图数据 start**********************************************************/
- var legendData=[];
- var seriesData=[];
- for(var i=0;i<data.rows.length-1;i++){
- //alert(data.rows[i].name);
- legendData[i]=data.rows[i].name;
- var d={value:data.rows[i].num,name:data.rows[i].name};
- seriesData[i]=d;
- }
- option7.legend.data=legendData;
- option7.series[0].data=seriesData;
- /*************************************************** 初始化解析饼图数据 end **********************************************************/
- }
- $(function(){
- $("body").eq(0).showLoading();
- if((window.location.href).split('?')[1]=="1"){
- $("#biaoti").html("");
- $("#biaoti").append('<a href="javascript:;"><img id="back" class="back" align="left" alt="返回" src="/nwyj/images/temp/back.png" onclick="goBack()"></img></a><font style="font-weight: bold;font-size: 20px;line-height: 45px;">公司应急发电车(总表)概况</font>');
- }
-
- $.post($.pathname()+ "/ws/generatorcar/GeneratorCarService/getCarInfo",{id : deptName},function (data){
-
- //初始化表格
- initCompletes(data);
-
- $("body").eq(0).hideLoading();
-
- gridData=data;
- changeBarOption1(data);
- changeLineOption1(data);
- changePieOption1(data);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- });
- //var myChart = echarts.init(document.getElementById('main1'));
- //myChart.setOption(option);
- $("input:radio[name=fadianji]").click(function(){
- var which=$("input:radio[name=fadianji]").filter("[checked]").val();
- if(which=='a'){
- changeBarOption1(gridData);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }
- if(which=='b'){
- changeBarOption2(gridData);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }
- if(which=='c'){
- changeBarOption3(gridData);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }
- if(which=='d'){
- changeBarOption4(gridData);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }
-
- });
- //alert($("input:radio[name=fadianji]").filter("[checked]").val());
- $(".basicTab").bind('actived',function(e,i){
- if(i==0){
- /***************************************** 加载柱状图 *********************************************************/
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }else if(i == 1){
- /***************************************** 加载折线图 *********************************************************/
-
- var myChart2 = echarts.init(document.getElementById('main2'));
- myChart2.setOption(option6);
- }else if(i==2){
- /***************************************** 加载饼图 *********************************************************/
- var myChart3 = echarts.init(document.getElementById('main3'));
- myChart3.setOption(option7);
- }
- });
- });
- var columns= [
- { display : '供电局',"name" : 'name',id : 'name',width : 150,dept_id:'dept_id',align : 'center',render : addStatus, frozen: true },
- { display : '按容量分类(辆/kVA)',columns : myCols1,width : 300,align : 'center' },
- { display : '按电压等级分类(辆)',columns : myCols2,width : 200,align : 'center' },
- { display : '按储能方式分类(辆)',columns : myCols3,width : 300,align : 'center' },
- { display : '按调拨分类(辆)',columns : myCols4,width : 200,align : 'center' },
- { display : '总数量(辆)',"name" : 'num',width : 100,align : 'center' },
- { display : '总容量(kVA)',"name" : 'sum',width : 100,align : 'center' }
- ];
- var json ="";
- var loadData;
- /*
- function initComplete() {
- g = $("#maingrid")
- .quiGrid(
- {
- columns : columns,
- url : $.pathname()
- + '/ws/generatorcar/GeneratorCarService/getCarInfo',
- params : {
- id : deptName
- },
- rownumbers : true,
- usePager : false
- });
- }*/
-
-
- /* //初始化方法
- $(function(){
- $.post($.pathname()+ "/ws/generatorcar/GeneratorCarService/getCarInfo",{id : deptName},function (data){
- json = data;
- //给表格数据赋值
- loadData= data;
- //初始化表格
- initCompletes(json);
-
- gridData=data;
- changeBarOption1(data);
- changeLineOption1(data);
- changePieOption1(data);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
-
-
-
- },"json" );
-
- });
- */
-
- function initCompletes(json){
-
- g = $("#maingrid").quiGrid({
- columns: columns,
- data:json,
- rownumbers : true,
- usePager : false
- });
-
- //重设高度
- $(parent.document.body).find("iframe").height($(window.document.body).height()+30);
- $(top.document.body).find("iframe").height($(window.document.body).height()+30);
-
- /*重新绑定父页面事件方法*/
- //绑定点击时样式变化事件
- $(parent.document.body).find(".leftnav").live("click",parent.checkedCurrent);
- //定期报送组点击事件
- $(parent.document.body).find(".baosong").live("click",parent.changebaosong);
- //定期维护组点击事件
- $(parent.document.body).find(".weihu").live("click",parent.changeweihu);
- $(parent.document.body).find(".weihu1").live("click",parent.changeweihu1);
- /*重新绑定父页面事件方法*/
- }
-
- //发送请求,从后台获取数据
- function getNewValue(){
-
-
- //容量
- var content = $('#CAR_CONTENT_265').attr("relValue");
- var tempContent = content.split(",");
- var content1 = "";
- var content2 = "";
- if(content.length>0){
- for(var i =0; i<content.length; i++){
- if(tempContent[i]=="content_min"){
- content1+= "'"+"250" + "'" + ",";
- }
- if(tempContent[i]=="content_mid"){
- content1= "251" + ",";
- content2="500" ;
- }
- if(tempContent[i]=="content_max"){
- content1="501";
- content2="99999999999999";
- }
- }
- }
-
- //电压等级
- var level = $('#CAR_LEVEL_265').attr("relValue");
- //储能方式
- var storedtype = $('#STORED_ENERGY_TYPE_265').attr("relValue");
- //可否调用
- var isUsed = $('#IS_USED_265').attr("relValue");
- //取所属单位
- var units = $('#COMP_ID_265').val();
-
- //电压等级
- var templevel = level+",";
- var temp = templevel.split(",");
- var valueType1 = "";
- for(var i=0; i<temp.length; i++){
- if(temp[i]=="level_max"){
- valueType1+= "'" + "139" +"'" +",";
- }
- if(temp[i]=="level_min"){
- valueType1+= "'" + "138" +"'" +",";
- }
- }
- var valueType = null;
- if(level.length>0){
- valueType = valueType1.substring(0,valueType1.length-1);
- }
-
- //储能
- var energytype = storedtype+",";
- var temp1 = energytype.split(",");
- var energytype1 = "";
- for(var i=0; i<temp1.length; i++){
- if(temp1[i]=="generator"){
- energytype1+= "'" + "1" +"'" +",";
- }
- if(temp1[i]=="ups"){
- energytype1+= "'" + "2" +"'" +",";
- }
- if(temp1[i]=="fly_circle"){
- energytype1+= "'" + "3" +"'" +",";
- }
- }
- var valueType2 = null;
- if(storedtype.length>0){
- valueType2 = energytype1.substring(0,energytype1.length-1);
- }
-
- //调用
- var isused1 = isUsed + ",";
- var temp2 = isused1.split(",");
- var isused3 = "";
- for(var i=0; i<temp2.length; i++){
- if(temp2[i]=="kused"){
- isused3+= "'" + "1" +"'" +",";
- }
- if(temp2[i]=="bused"){
- isused3+= "'" + "2" +"'" +",";
- }
- }
- var valueType3 = null;
- if(isUsed.length>0){
- valueType3 = isused3.substring(0,isused3.length-1);
- }
- //单位
- var leng = units.length;
- if(leng>0){
-
- var deptIdsTemp = units.split(",");
- var arrFF = "";
- for(var i=0; i<deptIdsTemp.length; i++){
- arrFF+="'"+deptIdsTemp[i]+"'"+",";
- }
- var deptId = arrFF.substring(0,arrFF.length-1);
- }
-
- $.post($.pathname()+ "/ws/generatorcar/GeneratorCarService/getCarInfo",{id : deptName,content1:content1,content2:content2,valueType:valueType,valueType2:valueType2,valueType3:valueType3,deptId:deptId},function (data){
-
- json = data;
- //给表格数据赋值
- gridData= data;
- //初始化表格
- initCompletes(json);
-
- changeBarOption1(data);
- changeLineOption1(data);
- changePieOption1(data);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- });
- //var myChart = echarts.init(document.getElementById('main1'));
- //myChart.setOption(option);
- $("input:radio[name=fadianji]").click(function(){
- var which=$("input:radio[name=fadianji]").filter("[checked]").val();
- if(which=='a'){
- changeBarOption1(gridData);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }
- if(which=='b'){
- changeBarOption2(gridData);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }
- if(which=='c'){
- changeBarOption3(gridData);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }
- if(which=='d'){
- changeBarOption4(gridData);
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }
-
- });
- //alert($("input:radio[name=fadianji]").filter("[checked]").val());
- $(".basicTab").bind('actived',function(e,i){
- if(i==0){
- /***************************************** 加载柱状图 *********************************************************/
- var myChart = echarts.init(document.getElementById('main1'));
- myChart.setOption(option);
- }else if(i == 1){
- /***************************************** 加载折线图 *********************************************************/
-
- var myChart2 = echarts.init(document.getElementById('main2'));
- myChart2.setOption(option6);
- }else if(i==2){
- /***************************************** 加载饼图 *********************************************************/
- var myChart3 = echarts.init(document.getElementById('main3'));
- myChart3.setOption(option7);
- }
-
-
-
- },"json" );
- }
-
- //点击统计按钮触发的事件
- function getCount(){
-
- getNewValue();
-
- //容量
- var content = $('#CAR_CONTENT_265').attr("relValue");
- //电压等级
- var level = $('#CAR_LEVEL_265').attr("relValue");
- //储能方式
- var chunengType = $('#STORED_ENERGY_TYPE_265').attr("relValue");
- //取队伍状态
- var isUsed = $('#IS_USED_265').attr("relValue");
- //取所属单位
- var units = $('#COMP_ID_265').val();
-
- var column = content + "," + level + "," + chunengType ;//+ "," + units;
-
- // var temp = column.split(",");
- // var column1 = "";
- // for(var i=0; i<temp.length; i++){
- // column1+=temp[i]+ ",";
- // }
-
- //所属单位
- var url=$.pathname()+ "/ws/Amyjyan/AmyjyanCount/getEditColumns";
- $.ajax({
- url : url,
- type : 'post',
- timeout : 15000,
- async : false,
- data : {
- name : "EMC_AM_GENERATOR_CAR",column:column
- },
- dataType : 'text',
- success : function(data) {
-
- columns=eval('('+ data+')');
-
- //给表格数据赋值
- loadData= eval('('+ data+')');
-
-
- // gridData=data;
- // changeBarOption1(data);
- // changeLineOption1(data);
- // changePieOption1(data);
- // var myChart = echarts.init(document.getElementById('main1'));
- // myChart.setOption(option);
-
-
- },
- error : function(e) {
- $.messager.alert('查询表头失败!', '访问服务失败!', 'error');
- }
- });
-
- }
-
- function goBack(){
- window.location.href="/nwyj/page/business/am/resource/ledger/generator-car.jsp";
- }
- function addStatus(rowdata, rowindex, value, column){
- if("总计"==rowdata.name){
- return value;
- }else{
- var comp_id='"'+rowdata.dept_id+'"';
- var name = '"'+value+'"';
- return "<a href='javascript:newHtml("+comp_id+","+name+")'>" + value +" </a>";
- }
- }
- function newHtml(comp_id,name){
- if(name=="总计"){
- return;
- }else if(deptName==comp_id){
- return;
- }else{
- // window.open("/nwyj/page/business/am/resource/ledger/generator-car-poll1.jsp?"+comp_id);
- $.indexOpenNextWindow("/nwyj/page/business/am/resource/ledger/generator-car-poll1.jsp?"+comp_id);
- }
-
- }
- function showMsg(rowdata ,rowindex,value,column){
- if("总计"==rowdata.name){
- return value;
- }else{
- return '<a href="javascript:void(0)" '
- + 'onclick=showDetail("'
- + rowdata.dept_id
- + '",'+'"'+column.name+ '",'+'"'+value+'")>'+value+'</a>';
- }
- }
- function showDetail(index,name,val){
- if(index=="11111"){
- return;
- }
- return top.Dialog.open({URL:"/nwyj/page/business/am/resource/ledger/windowgenerator-car1.jsp?"+index+"?"+name,ID:"window1",Title:"发电车",ShowMaxButton:true,ShowMinButton:true,Width:1100,Height:500});
- }
- //重置
- function resetSearch(){
- document.location.reload();
- }
- function export_report() {
- var sql = {
- "report_type" : "fdchz",
- "json" : JSON.stringify(g.getData())
- };
- excelExport(undefined, sql, "公司应急发电车(总表)概况", ['dept_id', 'isParent', 'open'], "公司应急发电车(总表)概况", 'rcpoll');
-
- }
- $.messager=top.Dialog;
|