项目进度先显示以前的

This commit is contained in:
潘鸿锋 2024-10-18 19:16:41 +08:00
parent d6c3a6cd34
commit 9beb5e65dd
3 changed files with 207 additions and 6 deletions

View File

@ -12,7 +12,7 @@
<appSettings>
<!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>

View File

@ -310,7 +310,8 @@
进度统计
</div>
<div class="main">
<div id="aq-map"></div>
<%-- <div id="aq-map"></div>--%>
<div id='left_one' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
@ -1204,7 +1205,7 @@
</script>
<script>
<%--<script>
function line(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
@ -1341,7 +1342,7 @@
line('left_one', xArr1, data1)
}
</script>
</script>--%>
<script>
function category(id, xArr, series) {
// 基于准备好的dom初始化echarts实例
@ -1598,7 +1599,7 @@
// 安全统计
createAQTJ()
<%-- createAQTJ()
function createAQTJ() {
var two =<%=Two %>;
console.log("安全统计", two)
@ -1775,7 +1776,7 @@
};
var myEchart = echarts.init(document.getElementById('aq-map'));
myEchart.setOption(opt);
}
}--%>
// 质量概况
<%-- let weekData = [
@ -2188,3 +2189,160 @@
}
</script>
<script type="text/javascript">
function line(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
left: 'center',
text: ' ',
textStyle: {
color: '#fff',
fontSize: 12,
fontWeight: '300'
},
show: false
},
tooltip: {
formatter: '{a}<br />{b}: {c}%'
},
legend: {
show: true,
textStyle: {
color: '#fff'
},
left: 0
},
xAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
},
type: 'category',
data: xArr
},
yAxis: {
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
},
formatter: '{value} %'
}
},
series: data,
grid: {
top: '15%',
left: '10',
right: '10',
bottom: '0%',
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)'
},
itemStyle: {
//color: 'rgba(200,201,10, 1)'
//normal: {
// label: {
// show: false
// }
//}
},
backgroundColor: 'rgba(0,162,233, 0.01)',
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
//var two = { "title": "赢得值曲线", "xFontNum": 0, "legend": null, "categories": ["2020-07", "2020-08", "2020-09", "2020-10", "2020-11", "2020-12", "2021-01", "2021-02"], "series": [{ "name": null, "type": null, "data": [5.0, 2.0, 0.0, 1.0, 4.0, 8.0, 2.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [8.0, 12.0, 4.0, 9.0, 10.0, 2.0, 3.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [12.0, 2.0, 5.0, 10.0, 3.0, 3.0, 8.0, 10.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [4.0, 3.0, 14.0, 8.0, 10.0, 3.0, 5.0, 10.0], "dataString": null, "dataObject": null }], "series2": null };
var two =<%=Tree %>
var xArr1 = two.categories
var data1 = [{
name: '计划值',
type: 'bar',
//smooth: true,
data: two.series[0].data,
label: { //柱体上显示数值
show: false,//开启显示
position: 'top',//在上方显示
textStyle: {//数值样式
fontSize: '20px',
color: '#fff'
},
formatter: '{c}',
},
lineStyle: {
//color: 'rgba(200,201,10, 1)'
}
}, {
name: '实际值',
type: 'bar',
//smooth: true,
data: two.series[2].data,
label: { //柱体上显示数值
show: false,//开启显示
position: 'top',//在上方显示
textStyle: {//数值样式
fontSize: '20px',
color: '#fff'
},
formatter: '{c}',
},
}, {
name: '累计计划值',
type: 'line',
//smooth: true,
data: two.series[1].data,
label: { //柱体上显示数值
show: false,//开启显示
position: 'top',//在上方显示
textStyle: {//数值样式
fontSize: '20px',
color: '#fff'
},
formatter: '{c}',
},
lineStyle: {
//color: 'rgba(200,201,10, 1)'
}
}, {
name: '累计实际值',
type: 'line',
//smooth: true,
data: two.series[3].data,
label: { //柱体上显示数值
show: false,//开启显示
position: 'top',//在上方显示
textStyle: {//数值样式
fontSize: '20px',
color: '#fff'
},
formatter: '{c}',
},
}]
line('left_one', xArr1, data1)
</script>

View File

@ -751,6 +751,8 @@ namespace FineUIPro.Web.common
}
}
protected string Two
{
get
@ -871,6 +873,47 @@ namespace FineUIPro.Web.common
return JsonConvert.SerializeObject(businessColumn);
}
}
#region 线
protected string Tree
{
get
{
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
List<string> listCategories = new List<string>();
businessColumn.title = "赢得值曲线";
var views = (from x in Funs.DB.View_JDGL_ProgressCompletion where x.ProjectId == this.CurrUser.LoginProjectId orderby x.Months select x).ToList();
Model.SingleSerie s = new Model.SingleSerie();
Model.SingleSerie s2 = new Model.SingleSerie();
Model.SingleSerie s3 = new Model.SingleSerie();
Model.SingleSerie s4 = new Model.SingleSerie();
List<double> listdata = new List<double>();
List<double> listdata2 = new List<double>();
List<double> listdata3 = new List<double>();
List<double> listdata4 = new List<double>();
for (int i = 0; i < views.Count; i++)
{
listCategories.Add(views[i].MonthStr);
listdata.Add(Convert.ToDouble(views[i].PlanNum));
listdata2.Add(Convert.ToDouble(views[i].TotalPlanNum));
listdata3.Add(Convert.ToDouble(views[i].RealNum));
listdata4.Add(Convert.ToDouble(views[i].TotalRealNum));
}
s.data = listdata;
s2.data = listdata2;
s3.data = listdata3;
s4.data = listdata4;
series.Add(s);
series.Add(s2);
series.Add(s3);
series.Add(s4);
businessColumn.categories = listCategories;
businessColumn.series = series;
return JsonConvert.SerializeObject(businessColumn);
}
}
#endregion
#endregion
#region