| | |
| | | |
| | | //渲染记录 |
| | | ajaxListRecord(); |
| | | |
| | | //渲染抓拍图 |
| | | ajaxSnapImg(); |
| | | } |
| | | |
| | | /** |
| | |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(data), |
| | | success: function (result) { |
| | | if (result.code != "SUCCESS") { |
| | | if (result.code != "0000") { |
| | | renderSnapImg(); |
| | | } else { |
| | | fileRecord = result.data; |
| | |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(data), |
| | | success: function (result) { |
| | | if (result.code != "SUCCESS") { |
| | | if (result.code != "0000") { |
| | | renderEcharts(null); |
| | | } else { |
| | | renderEcharts(result.data); |
| | |
| | | function renderEcharts(chartData) { |
| | | var chart = hisChart; |
| | | if (chartData && chartData.xaxis.length > 0 && chartData.seriesData.length > 0) { |
| | | chart.option.xAxis.data = chartData.xaxis; |
| | | chart.option.xAxis[0].data = chartData.xaxis; |
| | | chart.option.series[0].data = chartData.seriesData; |
| | | chart.chart.setOption(chart.option, true); |
| | | } else { |
| | | chart.option.xAxis.data = names; |
| | | chart.option.xAxis[0].data = names; |
| | | chart.option.series[0].data = data; |
| | | chart.chart.setOption(chart.option, true); |
| | | } |
| | |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(data), |
| | | success: function (result) { |
| | | if (result.code != "SUCCESS") { |
| | | if (result.code != "0000") { |
| | | renderListRecord(); |
| | | } else { |
| | | listRecord = result.data; |
| | |
| | | */ |
| | | function renderListRecord() { |
| | | |
| | | if (!listRecord) return null; |
| | | if (!listRecord) { |
| | | //渲染抓拍图 |
| | | ajaxSnapImg(); |
| | | return null; |
| | | } |
| | | |
| | | if (listRecord.length === 0) return null; |
| | | if (listRecord.length === 0) { |
| | | //渲染抓拍图 |
| | | ajaxSnapImg(); |
| | | return null; |
| | | } |
| | | |
| | | var record = listRecord[0]; |
| | | if (record) { |
| | |
| | | $("#record_time4").text("----"); |
| | | $("#record_content4").text("检测重量为---- KG,实际重量为---- KG,误差小于-%。"); |
| | | } |
| | | |
| | | //渲染抓拍图 |
| | | ajaxSnapImg(); |
| | | } |
| | | |
| | | /** |
| | |
| | | type: 'value', |
| | | name: '数量 (KG)', |
| | | min: 0, |
| | | max: 3000000, |
| | | // max: 3000000, |
| | | axisLabel: { |
| | | formatter: '{value} KG' |
| | | } |