570 lines
		
	
	
		
			18 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			570 lines
		
	
	
		
			18 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JDStatistics.aspx.cs" Inherits="FineUIPro.Web.DataShow.JDStatistics" Async="true" %>
 | ||
| 
 | ||
| <!DOCTYPE html>
 | ||
| <html>
 | ||
| <head id="Head1" runat="server">
 | ||
|     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | ||
|     <title>首页</title>
 | ||
|     <link href="../res/index/css/reset.css" rel="stylesheet" />
 | ||
|     <link href="../res/index/css/home.css" rel="stylesheet" />
 | ||
|     <link href="../res/index/css/swiper-3.4.2.min.css" rel="stylesheet" />
 | ||
|     <style type="text/css">
 | ||
|         * {
 | ||
|             box-sizing: border-box;
 | ||
|         }
 | ||
| 
 | ||
|         .flexV {
 | ||
|             flex-direction: column;
 | ||
|         }
 | ||
| 
 | ||
|         .wrap {
 | ||
|             height: 100%;
 | ||
|             padding: 15px;
 | ||
|             /*background-color: #EEEED1;*/
 | ||
|             background-color: #FFFFFF;
 | ||
|         }
 | ||
| 
 | ||
|         .iteml {
 | ||
|             margin-left: 5px;
 | ||
|         }
 | ||
| 
 | ||
|         .itemb {
 | ||
|             margin-bottom: 5px;
 | ||
|         }
 | ||
| 
 | ||
|         .bottom-wrap {
 | ||
|             padding: 0;
 | ||
|             margin-bottom: 5px;
 | ||
|         }
 | ||
| 
 | ||
|             .bottom-wrap:last-child {
 | ||
|                 margin-bottom: 0;
 | ||
|             }
 | ||
| 
 | ||
|         .bw-b-bottom {
 | ||
|             width: 100%;
 | ||
|             height: 100%;
 | ||
|         }
 | ||
| 
 | ||
|         .bw-b-bottom-up {
 | ||
|             border-radius: 0;
 | ||
|             height: 100%;
 | ||
|             margin: 0;
 | ||
|             box-shadow: none;
 | ||
|         }
 | ||
| 
 | ||
|         .bw-item-content {
 | ||
|             padding: 5px;
 | ||
|         }
 | ||
| 
 | ||
|         .top {
 | ||
|             width: 100%;
 | ||
|         }
 | ||
| 
 | ||
|             .top .item {
 | ||
|             }
 | ||
| 
 | ||
|         .bw-b {
 | ||
|             width: 50%;
 | ||
|         }
 | ||
| 
 | ||
|         .bw-b-bottom-up {
 | ||
|         }
 | ||
| 
 | ||
|         .tab-wrap {
 | ||
|             left: auto;
 | ||
|             right: 15px;
 | ||
|             top: 5px;
 | ||
|             font-size: 12px;
 | ||
|         }
 | ||
| 
 | ||
|         .tab .t-item {
 | ||
|             width: auto;
 | ||
|             padding: 5px 10px;
 | ||
|             color: #363636;
 | ||
|         }
 | ||
| 
 | ||
|         .tit-item {
 | ||
|             padding: 0 10px;
 | ||
|             justify-content: space-between;
 | ||
|             font-size: 12px;
 | ||
|         }
 | ||
| 
 | ||
|         .tab-wrap .tab .t-item {
 | ||
|             color: #1C1C1C;
 | ||
|         }
 | ||
| 
 | ||
|         .tip-item {
 | ||
|             margin-left: 10px;
 | ||
|             align-items: center;
 | ||
|             font-size: 10px;
 | ||
|         }
 | ||
| 
 | ||
|         .tip {
 | ||
|             width: 25px;
 | ||
|             height: 13px;
 | ||
|             background-color: #258F76;
 | ||
|             border-radius: 2px;
 | ||
|             margin-right: 5px;
 | ||
|         }
 | ||
| 
 | ||
|         .tip-next {
 | ||
|             background-color: #4F4F4F;
 | ||
|         }
 | ||
| 
 | ||
|         .myTableClass {
 | ||
|             width: 100%;
 | ||
|             height: 100%;
 | ||
|             overflow: auto;
 | ||
|             margin: 2px 1px;
 | ||
|             border-collapse: collapse; /* 设置表格边框合并 */
 | ||
|             border: 1px solid #BEBEBE;
 | ||
|             background: #ffffff;
 | ||
|             color: #8B8989; /* 设置表格文字颜色 */
 | ||
|             text-align: center; /* 设置表格文字居中 */
 | ||
|             font-size: 14px;
 | ||
|         }
 | ||
| 
 | ||
|         .tab-title {
 | ||
|             height: 48px;
 | ||
|             color: #3CB371;
 | ||
|             font-size: 16px;
 | ||
|             font-weight: 700;
 | ||
|         }
 | ||
| 
 | ||
|         .tab-header {
 | ||
|             height: 36px;
 | ||
|             color: #1C86EE;
 | ||
|             font-size: 14px;
 | ||
|             font-weight: 600;
 | ||
|         }
 | ||
| 
 | ||
|         td, th {
 | ||
|             border: 1px solid #BEBEBE;
 | ||
|         }
 | ||
|     </style>
 | ||
| </head>
 | ||
| <body>
 | ||
|     <div class="wrap flex flexV">
 | ||
|         <div class="bottom-wrap flex1">
 | ||
|             <div class="top flex">
 | ||
|                 <div class="item flex2 iteml">
 | ||
|                     <div class="bw-b-bottom">
 | ||
|                         <div class="bw-b-bottom-up">
 | ||
|                             <div class="bw-item-content">
 | ||
|                                 <div id='jdqk' style="width: 100%; height: 100%;"></div>
 | ||
|                             </div>
 | ||
|                         </div>
 | ||
|                     </div>
 | ||
|                 </div>
 | ||
|                 <%--   <div class="item flex2 iteml">
 | ||
|                     <div class="bw-b-bottom">
 | ||
|                         <div class="bw-b-bottom-up">
 | ||
|                             <div class="tab-wrap">
 | ||
|                                 <div class="tab" data-value="2">
 | ||
|                                     <div class="t-item active">月度计划</div>
 | ||
|                                     <div class="spline"></div>
 | ||
|                                     <div class="t-item">周度计划</div>
 | ||
|                                 </div>
 | ||
|                             </div>
 | ||
|                             <div class="bw-item-content">
 | ||
|                                 <div id='jdplan' style="width: 100%; height: 100%;"></div>
 | ||
|                             </div>
 | ||
|                         </div>
 | ||
|                     </div>
 | ||
|                 </div>--%>
 | ||
|             </div>
 | ||
|         </div>
 | ||
|         <div class="bottom-wrap flex1">
 | ||
|             <div class="top flex">
 | ||
|                 <div class="item flex1 iteml">
 | ||
|                     <div class="bw-b-bottom">
 | ||
|                         <div class="bw-b-bottom-up">
 | ||
|                             <div class="tab-wrap">
 | ||
|                                 <div class="tab" data-value="2">
 | ||
|                                     <div class="t-item active">月度计划</div>
 | ||
|                                     <div class="spline"></div>
 | ||
|                                     <div class="t-item">周度计划</div>
 | ||
|                                 </div>
 | ||
|                             </div>
 | ||
|                             <div class="bw-item-content">
 | ||
|                                 <div id='jdplan' style="width: 100%; height: 100%;"></div>
 | ||
|                             </div>
 | ||
|                             <%--<div class="bw-item-content">
 | ||
|                                 <div id='four' style="width: 100%; height: 100%;"></div>
 | ||
|                             </div>--%>
 | ||
|                         </div>
 | ||
|                     </div>
 | ||
|                 </div>
 | ||
|             </div>
 | ||
|         </div>
 | ||
|     </div>
 | ||
| </body>
 | ||
| <script type="text/javascript" src="../res/index/js/jquery-3.4.1.min.js"></script>
 | ||
| <script type="text/javascript" src="../res/index/js/swiper-3.4.2.jquery.min.js"></script>
 | ||
| <script type="text/javascript" src="../res/index/js/echarts.min.js"></script>
 | ||
| 
 | ||
| <script type="text/javascript">
 | ||
|     // 进度情况
 | ||
|     createJDQK()
 | ||
|     function createJDQK() {
 | ||
|         let type = [<%=ProjectMc %>]
 | ||
|         // 计划月进度
 | ||
|         let value = [<%=ProjectJd%>]
 | ||
|         let value1 = [<%=ProjectJd%>]
 | ||
| 
 | ||
|         let opt = {
 | ||
|             title: [{
 | ||
|                 text: '进度情况',
 | ||
|                 textStyle: {
 | ||
|                     color: '#1C1C1C',
 | ||
|                     fontSize: 16,
 | ||
|                     fontWeight: 700
 | ||
|                 },
 | ||
|                 show: true
 | ||
|             }],
 | ||
|             grid: {
 | ||
|                 top: 48,
 | ||
|                 left: 48,
 | ||
|                 right: 48,
 | ||
|                 bottom: 48,
 | ||
|             },
 | ||
|             tooltip: {
 | ||
|                 formatter: '{b}: {c}'
 | ||
|             },
 | ||
|             legend: {
 | ||
|                 top: 30,
 | ||
|                 data: [
 | ||
|                     {
 | ||
|                         name: "进度统计",
 | ||
|                         textStyle: {
 | ||
|                             color: '#2FC4AC'
 | ||
|                         }
 | ||
|                     },
 | ||
|                     {
 | ||
|                         name: "进度百分比",
 | ||
|                         textStyle: {
 | ||
|                             color: '#E29C18'
 | ||
|                         }
 | ||
|                     },
 | ||
|                 ]
 | ||
|             },
 | ||
|             xAxis: {
 | ||
|                 type: 'category',
 | ||
|                 data: type,
 | ||
|                 axisLine: {
 | ||
|                     lineStyle: {
 | ||
|                         color: '#84D7FE'
 | ||
|                     }
 | ||
|                 },
 | ||
|                 axisLabel: {
 | ||
|                     interval: 0,
 | ||
|                     rotate: -10, // 如果数据较多时旋转标签以避免重叠
 | ||
|                     margin: 8, // 设置标签与轴线之间的距离
 | ||
|                     // align: 'center'
 | ||
|                 },
 | ||
|                 axisTick: {
 | ||
|                     show: false
 | ||
|                 }
 | ||
|             },
 | ||
|             yAxis: {
 | ||
|                 type: 'value',
 | ||
|                 axisLine: {
 | ||
|                     lineStyle: {
 | ||
|                         color: '#84D7FE'
 | ||
|                     }
 | ||
|                 },
 | ||
|                 splitLine: {
 | ||
|                     lineStyle: {
 | ||
|                         color: '#2E87AC',
 | ||
|                         type: 'dashed'
 | ||
|                     }
 | ||
|                 }
 | ||
|             },
 | ||
|             series: [
 | ||
|                 {
 | ||
|                     name: '进度统计',
 | ||
|                     data: value,
 | ||
|                     type: 'bar',
 | ||
|                     barWidth: 20,
 | ||
|                     label: { //柱体上显示数值
 | ||
|                         show: true,//开启显示
 | ||
|                         position: "top",//在上方显示
 | ||
|                         textStyle: {//数值样式
 | ||
|                             fontSize: '14px',
 | ||
|                             color: '#363636'
 | ||
|                         },
 | ||
|                         formatter: function (params) {
 | ||
|                             // 当数值为0时返回空字符串,不显示标签
 | ||
|                             return params.value === '0' ? '' : params.value;
 | ||
|                         },
 | ||
|                     },
 | ||
|                     itemStyle: { normal: { color: 'rgba(255,0,0, 0.5)' } }
 | ||
|                 },
 | ||
|                 {
 | ||
|                     name: '进度百分比',
 | ||
|                     data: value1,
 | ||
|                     type: 'line',
 | ||
|                     symbol: 'none',
 | ||
|                     itemStyle: {
 | ||
|                         color: '#EDB627'
 | ||
|                     },
 | ||
|                     areaStyle: {
 | ||
|                         normal: {
 | ||
|                             color: new echarts.graphic.LinearGradient(
 | ||
|                                 0,
 | ||
|                                 0,
 | ||
|                                 0,
 | ||
|                                 1,
 | ||
|                                 [
 | ||
|                                     {
 | ||
|                                         offset: 0,
 | ||
|                                         color: 'rgba(237, 182, 39, 1)' // 折线底下区域渐变色
 | ||
|                                     },
 | ||
|                                     {
 | ||
|                                         offset: 0.8,
 | ||
|                                         color: 'rgba(237, 182, 39, 0)' // 折线底下区域渐变色
 | ||
|                                     }
 | ||
|                                 ],
 | ||
|                                 false
 | ||
|                             )
 | ||
|                         }
 | ||
|                     }
 | ||
|                 },
 | ||
|             ]
 | ||
|         };
 | ||
|         var myEchart = echarts.init(document.getElementById('jdqk'));
 | ||
|         myEchart.setOption(opt);
 | ||
|     }
 | ||
| </script>
 | ||
| <script type="text/javascript">
 | ||
|     function categoryJDPlan(id, xArr, data, num) {
 | ||
|         // 基于准备好的dom,初始化echarts实例
 | ||
|         var myChart = echarts.init(document.getElementById(id))
 | ||
|         // 指定图表的配置项和数据
 | ||
|         var option = {
 | ||
|             title: {
 | ||
|                 // left:'center',
 | ||
|                 text: '项目进度计划',
 | ||
|                 textStyle: {
 | ||
|                     color: '#1C1C1C',
 | ||
|                     fontSize: 16,
 | ||
|                     fontWeight: 700
 | ||
|                 },
 | ||
|                 show: true
 | ||
|             },
 | ||
|             tooltip: {},
 | ||
|             legend: {
 | ||
|                 //left: '80%',
 | ||
|                 show: true,
 | ||
|                 textStyle: {//图例文字的样式
 | ||
|                     color: '#363636',
 | ||
|                     fontSize: 12,
 | ||
|                 }
 | ||
|             },
 | ||
|             xAxis: {
 | ||
|                 type: 'category',
 | ||
|                 data: xArr,
 | ||
|                 axisLine: {
 | ||
|                     lineStyle: {
 | ||
|                         color: '#84D7FE'
 | ||
|                     }
 | ||
|                 },
 | ||
|                 axisLabel: {
 | ||
|                     interval: 0,
 | ||
|                     rotate: -10, // 如果数据较多时旋转标签以避免重叠
 | ||
|                     margin: 8, // 设置标签与轴线之间的距离
 | ||
|                     // align: 'center'
 | ||
|                 },
 | ||
|                 axisTick: {
 | ||
|                     show: false
 | ||
|                 },
 | ||
|             },
 | ||
|             yAxis: {
 | ||
|                 type: 'value',
 | ||
|                 axisLine: {
 | ||
|                     //show: false,
 | ||
|                     lineStyle: {
 | ||
|                         color: '#84D7FE'
 | ||
|                     }
 | ||
|                 },
 | ||
|                 splitLine: {
 | ||
|                     lineStyle: {
 | ||
|                         color: '#2E87AC',
 | ||
|                         type: 'dashed'
 | ||
|                     }
 | ||
|                 },
 | ||
|             },
 | ||
|             series: data,
 | ||
|             grid: {
 | ||
|                 top: 48,
 | ||
|                 left: 48,
 | ||
|                 right: 48,
 | ||
|                 bottom: 48,
 | ||
|             },
 | ||
|         }
 | ||
| 
 | ||
|         // 使用刚指定的配置项和数据显示图表。
 | ||
|         myChart.setOption(option)
 | ||
|     }
 | ||
|     var jdplan =<%=MonthJD %>;
 | ||
|     var xArr = jdplan.categories
 | ||
|     var data = [
 | ||
|         {
 | ||
|             name: '未完成',
 | ||
|             type: 'bar',
 | ||
|             stack: '总量',
 | ||
|             barWidth: 30,
 | ||
|             data: jdplan.series[0].data,
 | ||
|             label: { //柱体上显示数值
 | ||
|                 show: true,//开启显示
 | ||
|                 position: ['35%', '50%'],//在上方显示
 | ||
|                 textStyle: {//数值样式
 | ||
|                     fontSize: '20px',
 | ||
|                     color: '#363636'
 | ||
|                 },
 | ||
|                 formatter: function (params) {
 | ||
|                     // 当数值为0时返回空字符串,不显示标签
 | ||
|                     return params.value === 0 ? '' : params.value;
 | ||
|                 },
 | ||
|             },
 | ||
|             itemStyle: { normal: { color: 'rgba(255,0,0, 0.5)' } }
 | ||
|         },
 | ||
|         {
 | ||
|             name: '已完成',
 | ||
|             type: 'bar',
 | ||
|             stack: '总量',
 | ||
|             barWidth: 30,
 | ||
|             data: jdplan.series[1].data,
 | ||
|             label: { //柱体上显示数值
 | ||
|                 show: true,//开启显示
 | ||
|                 position: ['35%', '50%'],//在上方显示
 | ||
|                 textStyle: {//数值样式
 | ||
|                     fontSize: '20px',
 | ||
|                     color: '#363636'
 | ||
|                 },
 | ||
|                 formatter: function (params) {
 | ||
|                     // 当数值为0时返回空字符串,不显示标签
 | ||
|                     return params.value === 0 ? '' : params.value;
 | ||
|                 },
 | ||
|             },
 | ||
|             itemStyle: { normal: { color: 'rgba(0,100,0,0.8)' } }
 | ||
|         }
 | ||
|     ]
 | ||
|     categoryJDPlan('jdplan', xArr, data, jdplan.xFontNum)
 | ||
|     //categoryJDPlan('four', xArr, data, jdplan.xFontNum)
 | ||
| </script>
 | ||
| 
 | ||
| <script>
 | ||
|     $(".tab .t-item").click(function () {
 | ||
|         var $this = $(this)
 | ||
|         var index = $this.index()
 | ||
|         if ($this.hasClass('active') && index == 0) {
 | ||
|             return
 | ||
|         }
 | ||
|         var $tab = $this.closest(".tab")
 | ||
|         var value = $tab.attr("data-value")
 | ||
|         $tab.find(".t-item").removeClass('active');
 | ||
|         $this.addClass('active')
 | ||
| 
 | ||
|         var monthplan =<%=MonthJD %>;
 | ||
|         var weekplan =<%=WeekJD %>;
 | ||
|         var num = 5;
 | ||
| 
 | ||
|         if (value == 2) {
 | ||
|             var xArr = monthplan.categories
 | ||
|             var data = [
 | ||
|                 {
 | ||
|                     name: '未完成',
 | ||
|                     type: 'bar',
 | ||
|                     stack: '总量',
 | ||
|                     barWidth: 30,
 | ||
|                     data: monthplan.series[0].data,
 | ||
|                     label: { //柱体上显示数值
 | ||
|                         show: true,//开启显示
 | ||
|                         position: ['35%', '50%'],//在上方显示
 | ||
|                         textStyle: {//数值样式
 | ||
|                             fontSize: '20px',
 | ||
|                             color: '#363636'
 | ||
|                         },
 | ||
|                         formatter: function (params) {
 | ||
|                             // 当数值为0时返回空字符串,不显示标签
 | ||
|                             return params.value === 0 ? '' : params.value;
 | ||
|                         },
 | ||
|                     },
 | ||
|                     itemStyle: { normal: { color: 'rgba(255,0,0, 0.5)' } }
 | ||
|                 },
 | ||
|                 {
 | ||
|                     name: '已完成',
 | ||
|                     type: 'bar',
 | ||
|                     stack: '总量',
 | ||
|                     barWidth: 30,
 | ||
|                     data: monthplan.series[1].data,
 | ||
|                     label: { //柱体上显示数值
 | ||
|                         show: true,//开启显示
 | ||
|                         position: ['35%', '50%'],//在上方显示
 | ||
|                         textStyle: {//数值样式
 | ||
|                             fontSize: '20px',
 | ||
|                             color: '#363636'
 | ||
|                         },
 | ||
|                         formatter: function (params) {
 | ||
|                             // 当数值为0时返回空字符串,不显示标签
 | ||
|                             return params.value === 0 ? '' : params.value;
 | ||
|                         },
 | ||
|                     },
 | ||
|                     itemStyle: { normal: { color: 'rgba(0,100,0,0.8)' } }
 | ||
|                 }
 | ||
|             ]
 | ||
|             if (index == 2) {
 | ||
|                 xArr = weekplan.categories
 | ||
|                 var data = [
 | ||
|                     {
 | ||
|                         name: '未完成',
 | ||
|                         type: 'bar',
 | ||
|                         stack: '总量',
 | ||
|                         barWidth: 30,
 | ||
|                         data: weekplan.series[0].data,
 | ||
|                         label: { //柱体上显示数值
 | ||
|                             show: true,//开启显示
 | ||
|                             position: ['35%', '50%'],//在上方显示
 | ||
|                             textStyle: {//数值样式
 | ||
|                                 fontSize: '20px',
 | ||
|                                 color: '#363636'
 | ||
|                             },
 | ||
|                             formatter: function (params) {
 | ||
|                                 // 当数值为0时返回空字符串,不显示标签
 | ||
|                                 return params.value === 0 ? '' : params.value;
 | ||
|                             },
 | ||
|                         },
 | ||
|                         itemStyle: { normal: { color: 'rgba(255,0,0, 0.5)' } }
 | ||
|                     },
 | ||
|                     {
 | ||
|                         name: '已完成',
 | ||
|                         type: 'bar',
 | ||
|                         stack: '总量',
 | ||
|                         barWidth: 30,
 | ||
|                         data: weekplan.series[1].data,
 | ||
|                         label: { //柱体上显示数值
 | ||
|                             show: true,//开启显示
 | ||
|                             position: ['35%', '50%'],//在上方显示
 | ||
|                             textStyle: {//数值样式
 | ||
|                                 fontSize: '20px',
 | ||
|                                 color: '#363636'
 | ||
|                             },
 | ||
|                             formatter: function (params) {
 | ||
|                                 // 当数值为0时返回空字符串,不显示标签
 | ||
|                                 return params.value === 0 ? '' : params.value;
 | ||
|                             },
 | ||
|                         },
 | ||
|                         itemStyle: { normal: { color: 'rgba(0,100,0,0.8)' } }
 | ||
|                     }
 | ||
|                 ];
 | ||
|             }
 | ||
|             categoryJDPlan('jdplan', xArr, data, num);
 | ||
|         }
 | ||
|     })
 | ||
| </script>
 | ||
| 
 | ||
| </html>
 | ||
| 
 |