| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <!DOCTYPE html>
- <html>
- <head>
- <%@include file="/context/mytags.jsp"%>
- <t:base type="jquery"></t:base>
- <script src="plug-in/echarts/echarts.js" type="text/javascript"></script>
- <script src="webpage/cn/com/lzt/budget/data/js/budget_tools.js" type="text/javascript"></script>
- <script src="webpage/cn/com/lzt/budget/costbreakdown/statis.js" type="text/javascript"></script>
- <link rel="stylesheet" type="text/css" href="webpage/cn/com/lzt/budget/costbreakdown/statis.css">
- </head>
- <body>
- <div id="e1" style="width:100%;height:100%"></div>
- </body>
- </html>
- <script type="text/javascript">
- $(function(){
- var spread = top.spread;
- var sheet =spread.getActiveSheet();
- var arr =[];
- var colCount = sheet.getColumnCount();
- loopAllRow(sheet,function(row){
- var yewu ,shichang,entityName;
- for(var col=colCount-1;col>=0;col--){
- var cellTag = sheet.getTag(row,col);
- if(!cellTag) continue;
- var findKey = cellTag.findKey;
- if(!findKey) continue;
- if(findKey=='ygfyhj'){
- var value = sheet.getValue(row,col);
- yewu = value;
- }else if(findKey=='fyhj'){
- var value = sheet.getValue(row,col);
- shichang = value;
- }
- if(cellTag.entityName){
- entityName = cellTag.entityName;
- }
- if(yewu&&shichang) {
- break;
- }
- }
- var diff = yewu-shichang;
- if(diff>0){
- arr.push({v:diff.toFixed(2),entityName:entityName});
- }
- });
- var option = getOption('人员费用超额分析');
- arr.sort(function(o1,o2){
- return o2.v-o1.v;
- });
- var xItem = [];
- var xItemData = [];
- for(var i=0;i<arr.length;i++){
- var one = arr[i];
- xItem.push(one.entityName);
- xItemData.push(one.v);
- }
- // option.legend.data = xItem;
- option.xAxis[0].data = xItem;
- option.series[0].data = xItemData;
- var myChart = echarts.init(document.getElementById('e1'));
- setTimeout(function(){
- myChart.setOption(option,true);
- myChart.resize();
- },200);
- })
- </script>
|