12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136 |
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- //数据表格
- var g;
-
- var myCols1 = [{
- display: '一次', name: 'sub_one', width: 50, align: 'center' ,render:showMsg
- },{
- display: '二次', name: 'sub_two', width: 50, align: 'center' ,render:showMsg
- }];
-
- var myCols2 = [{
- display: '中压', name: 'voltage_low', width: 50, align: 'center' ,render:showMsg
- },{
- display: '低压', name: 'voltage_mv', width: 50, align: 'center' ,render:showMsg
- }];
-
- var columns =[
- { display: '所属单位',
- "name" : 'name',
- id : 'name',
- width : 100,
- dept_id:'dept_id',
- align : 'center',
- render: addStatus,
- frozen: true
- },
-
- { display: '专家人数(人)', name: 'num', width: 100, align: 'center' },
- { display: '输电(人)', name: 'tran', width: 100, align: 'center' ,render:showMsg},
- { display: '变电(人)',columns: myCols1, width: 100, align: 'center' },
- { display: '通信(人)', name: 'signal', width: 100, align: 'center' ,render:showMsg},
- { display: '配电(人)',columns: myCols2, width: 100, align: 'center' },
- { display: '土建(人)', name: 'civil', width: 100, align: 'center' ,render:showMsg},
- { display: '机械(人)', name: 'mechanics', width: 100, align: 'center' ,render:showMsg},
- { display: '水工(人)', name: 'hydraulic', width: 100, align: 'center' ,render:showMsg},
- { display: '后勤(人)', name: 'logistics', width: 100, align: 'center' ,render:showMsg},
- { display: '医疗(人)', name: 'medical', width: 100, align: 'center' ,render:showMsg},
- { display: '其他(人)', name: 'other', width: 100, align: 'center',render:showMsg}
- ];
-
- var json ="";
- var loadData;
- //柱状图
- var option = {
- title : {
- text: '应急专家统计图',
- subtext: '/人'
- },
- tooltip : {
- trigger: 'axis'
- },
- legend: {
- y : 'bottom',
- data:['输电','变电','通信','配电','土建','机械','水工','后勤','医疗','其他']
- },
- toolbox: {
- show : true,
- feature : {
- mark : {show: true},
- dataView : {show: true, readOnly: false},
- magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
- restore : {show: true},
- saveAsImage : {show: true}
- }
- },
- calculable : true,
- xAxis : [
- {
- type : 'category',
- data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
- }
- ],
- yAxis : [
- {
- type : 'value'
- }
- ],
- series : [
- {
- name:'输电',
- type:'bar',
- data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
- },
- {
- name:'变电',
- type:'bar',
- data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
- },
- {
- name:'通信',
- type:'bar',
- data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
- },
- {
- name:'配电',
- type:'bar',
- data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
- },
- {
- name:'土建',
- type:'bar',
- data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
- },
- {
- name:'机械',
- type:'bar',
- data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
- },
- {
- name:'水工',
- type:'bar',
- data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
- },
- {
- name:'后勤',
- type:'bar',
- data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
- },
- {
- name:'医疗',
- type:'bar',
- data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
- },
- {
- name:'其他',
- type:'bar',
- data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
- }
- ]
- };
- function changeBarOption(data){
- var legendData=[];
- var seriesData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- var data4=[];
- var data5=[];
- var data6=[];
- var data7=[];
- var data8=[];
- var data9=[];
- var data10=[];
-
- for(var i=0;i<data.rows.length-1;i++){
- //alert(data.rows[i].name);
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].tran;
- data2[i]=parseInt(data.rows[i].sub_one)+parseInt(data.rows[i].sub_two);
- data3[i]=data.rows[i].signal;
- data4[i]=parseInt(data.rows[i].voltage_low)+parseInt(data.rows[i].voltage_mv);;
- data5[i]=data.rows[i].civil;
- data6[i]=data.rows[i].mechanics;
- data7[i]=data.rows[i].hydraulic;
- data8[i]=data.rows[i].logistics;
- data9[i]=data.rows[i].medical;
- data10[i]=data.rows[i].other;
- }
- var series1={ name:'输电',
- type:'bar',
- data:data1
- };
- var series2={ name:'变电',
- type:'bar',
- data:data2
- };
- var series3={ name:'通信',
- type:'bar',
- data:data3
- };
- var series4={ name:'配电',
- type:'bar',
- data:data4
- };
- var series5={ name:'土建',
- type:'bar',
- data:data5
- };
- var series6={ name:'机械',
- type:'bar',
- data:data6
- };
- var series7={ name:'水工',
- type:'bar',
- data:data7
- };
- var series8={ name:'后勤',
- type:'bar',
- data:data8
- };
- var series9={ name:'医疗',
- type:'bar',
- data:data9
- };
- var series10={ name:'其他',
- type:'bar',
- data:data10
- };
-
-
- seriesData=[series1,series2,series3,series4,series5,series6,series7,series8,series9,series10];
- option.xAxis[0].data=legendData;
- option.series=seriesData;
- }
- function changeBarOption2(data){
- var legendData=[];
- var seriesData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- var data4=[];
- var data5=[];
- var data6=[];
- var data7=[];
- var data8=[];
- var data9=[];
- var data10=[];
- for(var i=0;i<data.rows.length-1;i++){
- //alert(data.rows[i].name);
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].tran;
- data2[i]=parseInt(data.rows[i].sub_one)+parseInt(data.rows[i].sub_two);
- data3[i]=data.rows[i].signal;
- data4[i]=parseInt(data.rows[i].voltage_low)+parseInt(data.rows[i].voltage_mv);;
- data5[i]=data.rows[i].civil;
- data6[i]=data.rows[i].mechanics;
- data7[i]=data.rows[i].hydraulic;
- data8[i]=data.rows[i].logistics;
- data9[i]=data.rows[i].medical;
- data10[i]=data.rows[i].other;
- }
- var series1={ name:'输电',
- type:'bar',
- data:data1
- };
- var series2={ name:'变电',
- type:'bar',
- data:data2
- };
- var series3={ name:'通信',
- type:'bar',
- data:data3
- };
- var series4={ name:'配电',
- type:'bar',
- data:data4
- };
- var series5={ name:'土建',
- type:'bar',
- data:data5
- };
- var series6={ name:'机械',
- type:'bar',
- data:data6
- };
- var series7={ name:'水工',
- type:'bar',
- data:data7
- };
- var series8={ name:'后勤',
- type:'bar',
- data:data8
- };
- var series9={ name:'医疗',
- type:'bar',
- data:data9
- };
- var series10={ name:'其他',
- type:'bar',
- data:data10
- };
-
- //seriesData=[series1,series2,series3,series4,series5];
- option.legend.data=$("#EXPERT_SPECIALTY_260").attr("relText").split(",");
- var getInput=$("#EXPERT_SPECIALTY_260").attr("relText").split(",");
- var j=0;
- if($.inArray('输电',getInput)!=-1){
- seriesData[j]=series1;
- j++;
- }
- if($.inArray('变电',getInput)!=-1){
- seriesData[j]=series2;
- j++;
- }
- if($.inArray('通信',getInput)!=-1){
- seriesData[j]=series3;
- j++;
- }
- if($.inArray('配电',getInput)!=-1){
- seriesData[j]=series4;
- j++;
- }
- if($.inArray('土建',getInput)!=-1){
- seriesData[j]=series5;
- j++;
- }
- if($.inArray('机械',getInput)!=-1){
- seriesData[j]=series6;
- j++;
- }
- if($.inArray('水工',getInput)!=-1){
- seriesData[j]=series7;
- j++;
- }
- if($.inArray('后勤',getInput)!=-1){
- seriesData[j]=series8;
- j++;
- }
- if($.inArray('医疗',getInput)!=-1){
- seriesData[j]=series9;
- j++;
- }
- if($.inArray('其他',getInput)!=-1){
- seriesData[j]=series10;
- j++;
- }
-
- option.xAxis[0].data=legendData;
- option.series=seriesData;
- }
- //折线图option1
- var option1 = {
- 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]
- },
- {
- name:'变电',
- type:'line',
-
- data:[10, 18, 19, 24]
- },
- {
- name:'通信',
- type:'line',
-
- data:[15, 22, 20, 15]
- },
- {
- name:'配电',
- type:'line',
-
- data:[20, 30, 50,40]
- },
- {
- name:'土建',
- type:'line',
-
- data:[10, 18, 19, 24]
- },
- {
- name:'机械',
- type:'line',
-
- data:[15, 22, 20, 15]
- },
- {
- name:'水工',
- type:'line',
-
- data:[20, 30, 50,40]
- },
- {
- name:'后勤',
- type:'line',
-
- data:[10, 18, 19, 24]
- },
- {
- name:'医疗',
- type:'line',
-
- data:[15, 22, 20, 15]
- },
- {
- name:'其他',
- type:'line',
-
- data:[20, 30, 50,40]
- }
- ]
- };
- function changeLineOption(data){
- var legendData=[];
- var seriesData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- var data4=[];
- var data5=[];
- var data6=[];
- var data7=[];
- var data8=[];
- var data9=[];
- var data10=[];
- for(var i=0;i<data.rows.length-1;i++){
- //alert(data.rows[i].name);
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].tran;
- data2[i]=parseInt(data.rows[i].sub_one)+parseInt(data.rows[i].sub_two);
- data3[i]=data.rows[i].signal;
- data4[i]=parseInt(data.rows[i].voltage_low)+parseInt(data.rows[i].voltage_mv);;
- data5[i]=data.rows[i].civil;
- data6[i]=data.rows[i].mechanics;
- data7[i]=data.rows[i].hydraulic;
- data8[i]=data.rows[i].logistics;
- data9[i]=data.rows[i].medical;
- data10[i]=data.rows[i].other;
- }
- var series1={ name:'输电',
- type:'line',
- data:data1
- };
- var series2={ name:'变电',
- type:'line',
- data:data2
- };
- var series3={ name:'通信',
- type:'line',
- data:data3
- };
- var series4={ name:'配电',
- type:'line',
- data:data4
- };
- var series5={ name:'土建',
- type:'line',
- data:data5
- };
- var series6={ name:'机械',
- type:'line',
- data:data6
- };
- var series7={ name:'水工',
- type:'line',
- data:data7
- };
- var series8={ name:'后勤',
- type:'line',
- data:data8
- };
- var series9={ name:'医疗',
- type:'line',
- data:data9
- };
- var series10={ name:'其他',
- type:'line',
- data:data10
- };
-
-
-
- seriesData=[series1,series2,series3,series4,series5,series6,series7,series8,series9,series10];
- option1.xAxis[0].data=legendData;
- option1.series=seriesData;
- }
- function changeLineOption2(data){
- var legendData=[];
- var seriesData=[];
- var data1=[];
- var data2=[];
- var data3=[];
- var data4=[];
- var data5=[];
- var data6=[];
- var data7=[];
- var data8=[];
- var data9=[];
- var data10=[];
- for(var i=0;i<data.rows.length-1;i++){
- //alert(data.rows[i].name);
- legendData[i]=data.rows[i].name;
- data1[i]=data.rows[i].tran;
- data2[i]=parseInt(data.rows[i].sub_one)+parseInt(data.rows[i].sub_two);
- data3[i]=data.rows[i].signal;
- data4[i]=parseInt(data.rows[i].voltage_low)+parseInt(data.rows[i].voltage_mv);;
- data5[i]=data.rows[i].civil;
- data6[i]=data.rows[i].mechanics;
- data7[i]=data.rows[i].hydraulic;
- data8[i]=data.rows[i].logistics;
- data9[i]=data.rows[i].medical;
- data10[i]=data.rows[i].other;
- }
- var series1={ name:'输电',
- type:'line',
- data:data1
- };
- var series2={ name:'变电',
- type:'line',
- data:data2
- };
- var series3={ name:'通信',
- type:'line',
- data:data3
- };
- var series4={ name:'配电',
- type:'line',
- data:data4
- };
- var series5={ name:'土建',
- type:'line',
- data:data5
- };
- var series6={ name:'机械',
- type:'line',
- data:data6
- };
- var series7={ name:'水工',
- type:'line',
- data:data7
- };
- var series8={ name:'后勤',
- type:'line',
- data:data8
- };
- var series9={ name:'医疗',
- type:'line',
- data:data9
- };
- var series10={ name:'其他',
- type:'line',
- data:data10
- };
-
-
- option1.legend.data=$("#EXPERT_SPECIALTY_260").attr("relText").split(",");
- var getInput=$("#EXPERT_SPECIALTY_260").attr("relText").split(",");
- var j=0;
- if($.inArray('输电',getInput)!=-1){
- seriesData[j]=series1;
- j++;
- }
- if($.inArray('变电',getInput)!=-1){
- seriesData[j]=series2;
- j++;
- }
- if($.inArray('通信',getInput)!=-1){
- seriesData[j]=series3;
- j++;
- }
- if($.inArray('配电',getInput)!=-1){
- seriesData[j]=series4;
- j++;
- }
- if($.inArray('土建',getInput)!=-1){
- seriesData[j]=series5;
- j++;
- }
- if($.inArray('机械',getInput)!=-1){
- seriesData[j]=series6;
- j++;
- }
- if($.inArray('水工',getInput)!=-1){
- seriesData[j]=series7;
- j++;
- }
- if($.inArray('后勤',getInput)!=-1){
- seriesData[j]=series8;
- j++;
- }
- if($.inArray('医疗',getInput)!=-1){
- seriesData[j]=series9;
- j++;
- }
- if($.inArray('其他',getInput)!=-1){
- seriesData[j]=series10;
- j++;
- }
-
- //seriesData=[series1,series2,series3,series4,series5];
- option1.xAxis[0].data=legendData;
- option1.series=seriesData;
- }
- //饼图option2
- var option2 = {
- 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:335, name:'配电'},
- {value:310, name:'土建'},
- {value:234, name:'机械'},
- {value:335, name:'水工'},
- {value:310, name:'后勤'},
- {value:234, name:'医疗'},
- {value:335, name:'其他'}
- ]
- }
- ]
- };
- function changePieOption3(data){
- //option2.legend.data=['总体预案','专项预案','现场处置方案','部门预案'];
- option2.legend.data=$("#EXPERT_SPECIALTY_260").attr("relText").split(",");
- var getInput=$("#EXPERT_SPECIALTY_260").attr("relText").split(",");
- var index=data.rows.length-1;
- var seriesJson=[];
- var j=0;
- if($.inArray('输电',getInput)!=-1){
- var json={value:data.rows[index]["tran"],name:'输电'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('变电',getInput)!=-1){
- var json={value:parseInt(data.rows[i].sub_one)+parseInt(data.rows[i].sub_two),name:'变电'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('通信',getInput)!=-1){
- var json={value:data.rows[index]["signal"],name:'通信'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('配电',getInput)!=-1){
- var json={value:parseInt(data.rows[i].voltage_low)+parseInt(data.rows[i].voltage_mv),name:'配电'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('土建',getInput)!=-1){
- var json={value:data.rows[index]["civil"],name:'土建'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('机械',getInput)!=-1){
- var json={value:data.rows[index]["mechanics"],name:'机械'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('水工',getInput)!=-1){
- var json={value:data.rows[index]["hydraulic"],name:'水工'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('后勤',getInput)!=-1){
- var json={value:data.rows[index]["logistics"],name:'后勤'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('医疗',getInput)!=-1){
- var json={value:data.rows[index]["medical"],name:'医疗'};
- seriesJson[j]=json;
- j++;
- }
- if($.inArray('其他',getInput)!=-1){
- var json={value:data.rows[index]["other"],name:'其他'};
- seriesJson[j]=json;
- j++;
- }
-
-
- option2.series[0].data=seriesJson;
-
- }
- function changePieOption2(data){
- /*************************************************** 初始化解析饼图数据 start**********************************************************/
- //option2.legend.data=['总体预案','专项预案','现场处置方案','部门预案'];
- var index=data.rows.length-1;
- var seriesJson=[];
- var j=0;
- if(data.rows[index]["tran"]!=undefined){
- var json={value:data.rows[index]["tran"],name:'输电'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["sub_one"]!=undefined){
- var json={value:parseInt(data.rows[index]["sub_one"])+parseInt(data.rows[index]["sub_two"]),name:'变电'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["signal"]!=undefined){
- var json={value:data.rows[index]["signal"],name:'通信'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["voltage_low"]!=undefined){
- var json={value:parseInt(data.rows[index]["voltage_low"])+parseInt(data.rows[index]["voltage_mv"]),name:'配电'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["civil"]!=undefined){
- var json={value:data.rows[index]["civil"],name:'土建'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["mechanics"]!=undefined){
- var json={value:data.rows[index]["mechanics"],name:'机械'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["hydraulic"]!=undefined){
- var json={value:data.rows[index]["hydraulic"],name:'水工'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["logistics"]!=undefined){
- var json={value:data.rows[index]["logistics"],name:'后勤'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["medical"]!=undefined){
- var json={value:data.rows[index]["medical"],name:'医疗'};
- seriesJson[j]=json;
- j++;
- }
- if(data.rows[index]["other"]!=undefined){
- var json={value:data.rows[index]["other"],name:'其他'};
- seriesJson[j]=json;
- j++;
- }
-
-
-
- option2.series[0].data=seriesJson;
-
- /*************************************************** 初始化解析饼图数据 end **********************************************************/
- }
-
-
-
- //初始化方法
- $(function(){
- $("body").eq(0).showLoading();
- $.post($.pathname()+ "/ws/EXPERT/ExpertService/getExpertInfo",{id : deptName},function (data){
- json = data;
- //给表格数据赋值
- loadData= data;
- //初始化表格
- initCompletes(json);
- $("body").eq(0).hideLoading();
-
- changeBarOption(data);
- changeLineOption(data);
- changePieOption2(data);
- var myChart1 = echarts.init(document.getElementById('main1'));
- myChart1.setOption(option);
- $(".basicTab").bind('actived',function(e,i){
- if(i==0){
- /***************************************** 加载柱状图 *********************************************************/
- var myChart1 = echarts.init(document.getElementById('main1'));
- myChart1.setOption(option);
- // initmyGraphic(data);
- }else if(i == 1){
- /***************************************** 加载折线图 *********************************************************/
- var myChart5 = echarts.init(document.getElementById('main2'));
- myChart5.setOption(option1);
- }else if(i==2){
- /***************************************** 加载饼图 *********************************************************/
- var myChart2 = echarts.init(document.getElementById('main3'));
- myChart2.setOption(option2);
- }
- });
-
- },"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 addStatus(rowdata, rowindex, value, column){
- var comp_id='"'+rowdata.dept_id+'"';
- var name = '"'+value+'"';
- if("总计"==rowdata.name){
- return value;
- }else{
- 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/expert/expert-poll1.jsp?"+comp_id);
- $.indexOpenNextWindow("/nwyj/page/business/am/resource/expert/expert-poll1.jsp?"+comp_id);
- }
-
- }
-
- //返回
- function goBack() {
- window.location.href="expert-maintenance.jsp";
- }
-
-
- //发送请求,从后台获取数据
- function getNewValue(){
-
- //是否南网员工
- var level = $('#IS_SNSTAFF_260').attr("relValue");
- //专业特长
- var chunengType = $('#EXPERT_SPECIALTY_260').attr("relValue");
- //取所属单位
- var units = $('#EXPERT_UNIT_260').val();
-
- //是否南网员工
- var tempLevel = null;
- if(level.length>0){
- var temp = level.split(",");
- var tempLevel1="";
- for(var i=0; i<temp.length; i++){
- tempLevel1 +="'"+ temp[i] + "',";
- }
- tempLevel = tempLevel1.substring(0,tempLevel1.length-1);
- }
- //专业特长
- var temp1 = chunengType.split(",");
- var tempChunengType = "";
- for(var i=0; i<temp1.length; i++){
- tempChunengType+=temp1[i] + ",";
- }
- //专业特长转换
- var temp2 = tempChunengType.split(",");
- var valueType1 = "";
- for(var i=0; i<temp2.length; i++){
- if(temp2[i]=="tran"){
- valueType1+= "'" + "1" +"'" +",";
- }
- if(temp2[i]=="sub_one"){
- valueType1+= "'" + "2" +"'" +",";
- }
- if(temp2[i]=="sub_two"){
- valueType1+= "'" + "3" +"'" +",";
- }
- if(temp2[i]=="signal"){
- valueType1+= "'" + "4" +"'" +",";
- }
- if(temp2[i]=="voltage_low"){
- valueType1+= "'" + "5" +"'" +",";
- }
- if(temp2[i]=="voltage_mv"){
- valueType1+= "'" + "6" +"'" +",";
- }
- if(temp2[i]=="civil"){
- valueType1+= "'" + "7" +"'" +",";
- }
- if(temp2[i]=="mechanics"){
- valueType1+= "'" + "8" +"'" +",";
- }
- if(temp2[i]=="hydraulic"){
- valueType1+= "'" + "9" +"'" +",";
- }
- if(temp2[i]=="logistics"){
- valueType1+= "'" + "10" +"'" +",";
- }
- if(temp2[i]=="medical"){
- valueType1+= "'" + "11" +"'" +",";
- }
- if(temp2[i]=="other"){
- valueType1+= "'" + "12" +"'" +",";
- }
- }
- var valueType = null;
- if(chunengType.length>0){
- valueType = valueType1.substring(0,valueType1.length-1);
- }
- //单位整理
- var leng = units.length;
- var deptId = null;
- if(leng>0){
- var deptIdsTemp = units.split(",");
- var arrFF = "";
- for(var i=0; i<deptIdsTemp.length; i++){
- arrFF+="'"+deptIdsTemp[i]+"'"+",";
- }
- deptId = arrFF.substring(0,arrFF.length-1);
- }
- /*alert("是否:" + tempLevel);
- alert("专业:" + valueType);
- alert("单位:"+deptId);*/
- $.post($.pathname()+ "/ws/EXPERT/ExpertService/getExpertInfo",
- {id : deptName,isNwyj:tempLevel,zhuanye:valueType,deptId:deptId},
- function (data){
-
- json = data;
- //给表格数据赋值
- loadData= data;
- //初始化表格
- initCompletes(json);
-
- changeBarOption(data);
- changeLineOption(data);
- changePieOption2(data);
- var myChart1 = echarts.init(document.getElementById('main1'));
- myChart1.setOption(option);
-
- $(".basicTab").bind('actived',function(e,i){
- if(i==0){
- /***************************************** 加载柱状图 *********************************************************/
- var myChart1 = echarts.init(document.getElementById('main1'));
- myChart1.setOption(option);
- // initmyGraphic(data);
- }else if(i == 1){
- /***************************************** 加载折线图 *********************************************************/
- var myChart5 = echarts.init(document.getElementById('main2'));
- myChart5.setOption(option1);
- }else if(i==2){
- /***************************************** 加载饼图 *********************************************************/
- var myChart2 = echarts.init(document.getElementById('main3'));
- myChart2.setOption(option2);
- }
- });
-
- $(".basicTab").render();
-
- },"json" );
- }
-
- //点击统计按钮触发的事件
- function getCount(){
-
- getNewValue();
-
- //是否南网员工
- var isNwyj = $('#IS_SNSTAFF_260').attr("relValue");
- //专业特长
- var zhuanye = $('#EXPERT_SPECIALTY_260').attr("relValue");
- //取所属单位
- var units = $('#EXPERT_UNIT_260').val();
-
- var column = isNwyj + "," + zhuanye + "," + units + "," ;
-
- /*var temp = column.split(",");
- var column1 = "";
- for(var i=0; i<temp.length; i++){
- column1+=temp[i]+ ",";
- }
- */
-
- zhuanye = zhuanye + ",";
- //所属单位
- var url=$.pathname()+ "/ws/Amyjyan/AmyjyanCount/getEditColumns";
- $.ajax({
- url : url,
- type : 'post',
- timeout : 15000,
- async : false,
- data : {
- name : "EMC_AM_EMERGENCY_EXPERT",column:zhuanye
- },
- dataType : 'text',
- success : function(data) {
- columns=eval('('+ data+')');
- //给表格数据赋值
- loadData= eval('('+ data+')');
- //初始化表格
- initCompletes(json);
-
- },
- error : function(e) {
- $.messager.alert('查询表头失败!', '访问服务失败!', 'error');
- }
- });
- }
-
- 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;
- }
- var teamtype = "";
- if(name=="tran"){
- teamtype = "1";
- }else if(name=="sub_one"){
- teamtype = "2";
- }else if(name=="sub_two"){
- teamtype = "3";
- }else if(name=="signal"){
- teamtype = "4";
- }else if(name=="voltage_low"){
- teamtype = "5";
- }else if(name=="voltage_mv"){
- teamtype = "6";
- }else if(name=="civil"){
- teamtype = "7";
- }else if(name=="mechanics"){
- teamtype = "8";
- }else if(name=="hydraulic"){
- teamtype = "9";
- }else if(name=="logistics"){
- teamtype = "10";
- }else if(name=="medical"){
- teamtype = "11";
- }else if(name=="other"){
- teamtype = "12";
- }
- return parent.Dialog.open({URL:"/nwyj/page/business/am/resource/expert/windowexpert.jsp?"+index+"?"+teamtype,ID:"window1",Title:"应急专家",ShowMaxButton:true,ShowMinButton:true,Width:1100,Height:700});
- }
-
- //重置
- function resetSearch(){
- document.location.reload();
- }
-
- function export_report() {
- var sql = {
- "report_type" : "zhuangjia",
- "json" : JSON.stringify(g.getData())
- };
- excelExport(undefined, sql, "应急专家信息统计", ['dept_id', 'isParent', 'open'], "应急专家信息统计", 'rcpoll');
-
- }
-
- $.messager=top.Dialog;
-
|