Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountView.js =================================================================== diff -u -r26432 -r26434 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountView.js (.../sterilizingStoveUseCountView.js) (revision 26432) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountView.js (.../sterilizingStoveUseCountView.js) (revision 26434) @@ -528,7 +528,7 @@ autoScroll:true,//自动显示滚动条 collapsible:true,//允许展开和收缩 bodyPadding:5, - html:'' + html:'' }); @@ -541,5 +541,4 @@ items : reportForm }] }); - //Ext.getCmp("queryType").setValue("汇总"); }); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountViewYearCompar.jsp =================================================================== diff -u -r26432 -r26434 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountViewYearCompar.jsp (.../sterilizingStoveUseCountViewYearCompar.jsp) (revision 26432) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountViewYearCompar.jsp (.../sterilizingStoveUseCountViewYearCompar.jsp) (revision 26434) @@ -52,7 +52,7 @@ text: sterilizerName+'灭菌炉'+year+'年的使用次数对比', left:'53%', x:'center', - textAlign:"center", + textAlign:"center" }, color: ['#3398DB'], @@ -123,6 +123,6 @@ } } -
+
\ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountViewList.jsp =================================================================== diff -u -r26432 -r26434 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountViewList.jsp (.../sterilizingStoveUseCountViewList.jsp) (revision 26432) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/sterilizingStoveUseCountViewList.jsp (.../sterilizingStoveUseCountViewList.jsp) (revision 26434) @@ -26,9 +26,8 @@ var sterilizingListChart; function initLoad(){ sterilizingListChart = echarts.init(document.getElementById('sterilizerListChart')); - sterilizingListChart.showLoading(); + //sterilizingListChart.showLoading(); var sterilizingListChartOption; - var sterilizingNames = [40, 52, 200, 334, 390, 330, 220]; var colorList = ['#C33531','#EFE42A','#64BD3D','#EE9201','#29AAE3', '#B74AE5','#0AAF9F','#E89589','#16A085','#4A235A','#C39BD3 ','#F9E79F','#BA4A00','#ECF0F1','#616A6B','#e7bcf3','#4A235A','#3498DB','#9fe6b8',"#32c5e9"]; jQuery.ajax({ url :WWWROOT+"/report/reportAction!getReportDataOfEcharts.do", @@ -44,88 +43,88 @@ success : function(result){ if(result.success){ sterilizingListChart.hideLoading(); - var newColorList = []; - var sterilizingNames = result.data.name;//灭菌炉 - var sterilizingAmounts = result.data.amounts;//次数 - for(var i = 0;i < sterilizingNames.length;i++){ - if(i > colorList.length-1){ - newColorList.push('#fb7293'); - }else{ - newColorList.push(colorList[i]); - } - } - sterilizingListChartOption = { - title : { - text: '灭菌炉使用次数统计', - x:'center', - textAlign:"center" - }, - color: ['#3398DB'], - tooltip : { - trigger: 'axis', - axisPointer : { // 坐标轴指示器,坐标轴触发有效 - type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' + var dataAll = result.data; + var sterilizingNames = []; + var sterilizingAmounts = []; + var seriesAll = []; + var newColorList = ""; + var newColorListData = []; + for(var i = 0;i < dataAll.length;i++){ + if(i > colorList.length-1){ + newColorList = '#fb7293'; + }else{ + newColorList = colorList[i]; } - }, - grid: { - left: '5%', - right: '4%', - bottom: '10%', - containLabel: true - }, - xAxis : [ - { - name:"灭菌炉名称", - nameLocation:"middle", - nameTextStyle:{ - fontWeight:"bold" - }, - nameGap:35, - type : 'category', - data :sterilizingNames, - axisTick: { - alignWithLabel: true - } - } - ], - yAxis : [ - { - name:"灭菌炉在一段时间内的使用次数", - nameGap:35, - nameTextStyle:{ - fontWeight:"bold" - }, - nameLocation:"middle", - type : 'value' - } - ], - series : [ - { - itemStyle: { - normal: { - label: { - show: true, //开启显示 - position: 'top', //在上方显示 - textStyle: { //数值样式 - color: 'black', - fontSize: 16 - } - }, - // 定制显示(按顺序) - color: function(params) { - var newColorLists = newColorList; - return newColorLists[params.dataIndex] ; - } - }, - }, - name:'使用次数', + newColorListData.push(newColorList); + } + for(var i = 0;i < dataAll.length;i++){ + var seriesList = { + name:dataAll[i].name, type:'bar', barWidth: '30', - data:sterilizingAmounts + data:[dataAll[i].amount], + itemStyle: { +         normal: { +           color: function(params) { + return newColorListData[params.seriesIndex]; +           }, +          //以下为是否显示 +          label: { +           show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } +         } +       } +      } } - ] - }; - sterilizingListChart.setOption(sterilizingListChartOption); + seriesAll.push(seriesList); + sterilizingNames.push(dataAll[i].name); + }; + sterilizingListChartOption = { +      title : { +        text: '灭菌炉使用次数统计', + left:'53%', + top:"1%", + x:'center', + textAlign:"center" +      }, +      tooltip : { +        trigger: 'axis' +      }, + grid: { + bottom: '10%', + top:"30%", + containLabel: true + }, +      legend: { + top:'7%', + x: "left", +        data:sterilizingNames//['北京','上海','深圳','广州'] +      }, +      calculable : true, +      xAxis : [ +           { +             type : 'category', +             show:false +           } +         ], +         yAxis : [ +          { + type : 'value', + name:"灭菌炉在一段时间内的使用次数", + nameGap:35, + nameTextStyle:{ + fontWeight:"bold" + }, + nameLocation:"middle", + }             +         ], +         series : seriesAll + }; + sterilizingListChart.setOption(sterilizingListChartOption); } } }) @@ -134,6 +133,6 @@ } } -
+
\ No newline at end of file