You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
157 lines
5.3 KiB
157 lines
5.3 KiB
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.StatisticalAnalysis.YieldTrendModel>" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
产品趋势分析
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
<style type="text/css">
|
|
.tdset
|
|
{
|
|
border-top: 1px solid black;
|
|
border-left: 1px solid black;
|
|
width: 100px;
|
|
text-align: center;
|
|
}
|
|
|
|
.tdright
|
|
{
|
|
border-right: 1px solid black;
|
|
}
|
|
|
|
.tdbottom
|
|
{
|
|
border-bottom: 1px solid black;
|
|
}
|
|
</style>
|
|
<%=Html.QPSeach(80,true) %>
|
|
<table id="condiTable">
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.PRODUCESHIFTTCODE)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.PRODUCESHIFTTCODE)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.MACHINECODDE)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.MACHINECODDE)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.CreateDateStart)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.CreateDateStart)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.CreateDateEnd)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.CreateDateEnd)%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div style="left: 1px; position: relative;">
|
|
</div>
|
|
<%=Html.QPEnd()%>
|
|
<%=Html.QPList() %>
|
|
<table cellpadding="0" cellspacing="0" align="center" style="margin-left: 5px; margin-top: 5px;">
|
|
<tr style="height: 10px">
|
|
</tr>
|
|
<tr>
|
|
<td align="center">
|
|
<div id="chartdiv" style="width:1000px; height: 400px;">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%=Html.QPEnd() %>
|
|
<%=Html.Hidden("Arr", Model.arr)%>
|
|
<%=Html.Hidden("Machine", Model.results)%>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
|
<table id="EditTable" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td align="center">
|
|
<%=Html.QTButtonSearch("YieldTrend", "List", "Search()", (s, f) => { return true; })%>
|
|
<%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", (s, f) => { return true; })%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<script type="text/javascript">
|
|
var chart;
|
|
var legend;
|
|
|
|
$(function () {
|
|
var chartData = eval($("#Arr").val());
|
|
var MachineData = eval($("#Machine").val());
|
|
|
|
if (chartData != undefined && chartData.length > 0) {
|
|
AmCharts.ready(function () {
|
|
chart = new AmCharts.AmSerialChart();
|
|
chart.dataProvider = chartData;
|
|
chart.categoryField = "NAME";
|
|
|
|
chart.startDuration = 0.5;
|
|
chart.balloon.color = "#000000";
|
|
|
|
// AXES
|
|
// category
|
|
var categoryAxis = chart.categoryAxis;
|
|
categoryAxis.fillAlpha = 1;
|
|
categoryAxis.fillColor = "#FAFAFA";
|
|
categoryAxis.gridAlpha = 0;
|
|
categoryAxis.axisAlpha = 0;
|
|
categoryAxis.gridPosition = "start";
|
|
|
|
// value
|
|
var valueAxis = new AmCharts.ValueAxis();
|
|
valueAxis.title = "产品趋势分析";
|
|
valueAxis.dashLength = 5;
|
|
valueAxis.axisAlpha = 0;
|
|
|
|
valueAxis.integersOnly = true;
|
|
valueAxis.gridCount = 10;
|
|
valueAxis.reversed = false; // this line makes the value axis reversed
|
|
chart.addValueAxis(valueAxis);
|
|
$(MachineData).each(function (i, obj) {
|
|
var graph = new AmCharts.AmGraph();
|
|
graph.title = obj.NAME;
|
|
graph.valueField = obj.CODE;
|
|
graph.balloonText = obj.NAME + "[[category]]: [[value]]";
|
|
graph.lineAlpha = 1;
|
|
graph.bullet = "round";
|
|
chart.addGraph(graph);
|
|
}); //
|
|
|
|
// CURSOR
|
|
var chartCursor = new AmCharts.ChartCursor();
|
|
chartCursor.cursorPosition = "mouse";
|
|
chartCursor.zoomable = false;
|
|
chartCursor.cursorAlpha = 0;
|
|
chart.addChartCursor(chartCursor);
|
|
|
|
// LEGEND
|
|
var legend = new AmCharts.AmLegend();
|
|
legend.useGraphSettings = true;
|
|
chart.addLegend(legend);
|
|
|
|
// WRITE
|
|
chart.write("chartdiv");
|
|
});
|
|
}
|
|
});
|
|
|
|
//查询
|
|
function Search() {
|
|
submitByButton("List");
|
|
}
|
|
//导出
|
|
function Export() {
|
|
submitByButton("ExportExcel");
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|
|
|