|
@@ -52,89 +52,10 @@
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "POST",
|
|
type: "POST",
|
|
data: {},
|
|
data: {},
|
|
- url: "${path}/admin/detect/detect_statistics_data",
|
|
|
|
|
|
+ url: "${path}/admin/detect/select_config_statistic",
|
|
success: function(data){
|
|
success: function(data){
|
|
if (data.returnCode == 200) {
|
|
if (data.returnCode == 200) {
|
|
|
|
|
|
- var numArray = new Array();
|
|
|
|
- var monthArray = new Array();
|
|
|
|
- for (var i=0;i<data.returnMsg.complaintDetectInfoList.length;i++){
|
|
|
|
- var countNum = data.returnMsg.complaintDetectInfoList[i].countNum;
|
|
|
|
- numArray.push(countNum);
|
|
|
|
-
|
|
|
|
- var detectProduction = data.returnMsg.complaintDetectInfoList[i].detectProduction;
|
|
|
|
- if(detectProduction == "未知"){
|
|
|
|
- var flag = false;
|
|
|
|
- for (var k=0;k<monthArray.length;k++){
|
|
|
|
- if(monthArray[k] == '未知'){
|
|
|
|
- var otherMonthNum = numArray[k];
|
|
|
|
- numArray[k] = numArray[k]+countNum;
|
|
|
|
- flag = true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(!flag){
|
|
|
|
- monthArray.push('未知');
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- var newDate = formatDate(detectProduction,"yyyy年MM月");
|
|
|
|
- monthArray.push(newDate.substring(2,newDate.length))
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var newNumArray = new Array();
|
|
|
|
- for (var i=0;i<monthArray.length;i++){
|
|
|
|
- newNumArray.push(numArray[i]);
|
|
|
|
- }
|
|
|
|
- var option = {
|
|
|
|
- title : {
|
|
|
|
- text: '本月故障机器',
|
|
|
|
- subtext: ''
|
|
|
|
- },
|
|
|
|
- tooltip : {
|
|
|
|
- trigger: 'axis'
|
|
|
|
- },
|
|
|
|
- legend: {
|
|
|
|
- data:['本月故障机器']
|
|
|
|
- },
|
|
|
|
- toolbox: {
|
|
|
|
- show : true,
|
|
|
|
- feature : {
|
|
|
|
-// dataView : {show: true, readOnly: false},
|
|
|
|
-// magicType : {show: true, type: ['line', 'bar']},
|
|
|
|
-// restore : {show: true},
|
|
|
|
-// saveAsImage : {show: true}
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- calculable : true,
|
|
|
|
- xAxis : [
|
|
|
|
- {
|
|
|
|
- type : 'category',
|
|
|
|
- data : monthArray
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- yAxis : [
|
|
|
|
- {
|
|
|
|
- type : 'value'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- series : {
|
|
|
|
- name:'本月故障机器',
|
|
|
|
- type:'bar',
|
|
|
|
- data:newNumArray,
|
|
|
|
-// barWidth : 10%,
|
|
|
|
- markPoint : {
|
|
|
|
- data : [
|
|
|
|
- {type : 'max', name: '最大值'},
|
|
|
|
- {type : 'min', name: '最小值'}
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
-// ,markLine : {
|
|
|
|
-// data : [
|
|
|
|
-// {type : 'average', name: '平均值'}
|
|
|
|
-// ]
|
|
|
|
-// }
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
myChart.setOption(option);
|
|
myChart.setOption(option);
|
|
@@ -187,14 +108,6 @@
|
|
detectStatisticsJudgement(type,beginTime,endTime,configId);
|
|
detectStatisticsJudgement(type,beginTime,endTime,configId);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 到单独配置页面
|
|
|
|
- */
|
|
|
|
- function toSelectConfigStatistic(data) {
|
|
|
|
- var configId = data.configId;
|
|
|
|
- window.location.href= "${path}/admin/dealer/to_select_config_statistic?configId="+configId;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
$('.chosen').chosen({
|
|
$('.chosen').chosen({
|
|
no_results_text: "没有找到结果!",//搜索无结果时显示的提示
|
|
no_results_text: "没有找到结果!",//搜索无结果时显示的提示
|
|
search_contains:true, //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
|
|
search_contains:true, //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
|