|
@@ -2045,3 +2045,136 @@ var show_detail_data = function(devId, ponitId, name) {
|
|
|
query.device_id = devId;
|
|
|
query.point_code = ponitId;
|
|
|
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: basePath + "iot/data/view/getSyncDataQList",
|
|
|
+ data: {
|
|
|
+ queryJson: Ext.JSON.encode(query)
|
|
|
+ },
|
|
|
+ success: function(result) {
|
|
|
+ var json = eval('(' + result + ')');
|
|
|
+ if (json.action == 'getSyncDataVList') {
|
|
|
+ ConfirmStore = json.RESULT;
|
|
|
+ draw_confirm(name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+var draw_confirm = function(name) {
|
|
|
+ if ((ConfirmStore != undefined) && (ConfirmStore.length > 0)) {
|
|
|
+ var themecolor = ((theme == '') || (theme == 'access')) ? '#ffffff' : '#000000';
|
|
|
+ if ((V_LOGINNAME == 'guest') && (ConfirmStore[0].device_id == '865462043119730')) {
|
|
|
+ ConfirmStore[0].company = '博华广场';
|
|
|
+ ConfirmStore[0].name = '独立烟感';
|
|
|
+ }
|
|
|
+ $("#detail_win_title").html(ConfirmStore[0].company + '_' + ConfirmStore[0].name + '_' + name + ' 一周数据');
|
|
|
+ var data_0 = new Array();
|
|
|
+ var d_time = new Array();
|
|
|
+ var max = 0,
|
|
|
+ min = 0;;
|
|
|
+ for (var i = 0; i < ConfirmStore.length; i++) {
|
|
|
+ var rec = ConfirmStore[i];
|
|
|
+ var tmp = parseFloat(rec.point_data);
|
|
|
+ var tmp_t = rec.data_time;
|
|
|
+ if (i == 0) {
|
|
|
+ max = tmp;
|
|
|
+ min = tmp;
|
|
|
+ } else {
|
|
|
+ if (max < tmp)
|
|
|
+ max = tmp;
|
|
|
+ if (min > tmp)
|
|
|
+ min = tmp;
|
|
|
+ }
|
|
|
+ data_0.push(tmp);
|
|
|
+ d_time.push(tmp_t);
|
|
|
+ }
|
|
|
+ Highcharts.chart('detail_area', {
|
|
|
+ chart: {
|
|
|
+ type: 'area',
|
|
|
+ zoomType: 'xy',
|
|
|
+ backgroundColor: 'rgba(0,0,0,0)'
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ text: ConfirmStore[0].company + '_' + ConfirmStore[0].name + '_' + name + ' 一周数据',
|
|
|
+ float: true,
|
|
|
+ style: { fontSize: '14px', color: themecolor, fontWeight: 'bold' },
|
|
|
+ enabled: false
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ floating: true,
|
|
|
+ x: 410,
|
|
|
+ y: -280,
|
|
|
+ itemStyle: { fontSize: '12px', color: themecolor, fontWeight: 'bold' }
|
|
|
+ },
|
|
|
+ exporting: {
|
|
|
+ enabled: false
|
|
|
+ },
|
|
|
+ credits: {
|
|
|
+ enabled: false
|
|
|
+ },
|
|
|
+ xAxis: [{
|
|
|
+ categories: d_time,
|
|
|
+ labels: {
|
|
|
+ enabled: false
|
|
|
+ },
|
|
|
+ crosshair: true
|
|
|
+ }],
|
|
|
+ yAxis: [{
|
|
|
+ title: {
|
|
|
+ text: name,
|
|
|
+ style: { fontSize: '10px', color: themecolor, fontWeight: 'bold' }
|
|
|
+ },
|
|
|
+ gridLineColor: 'rgba(0,0,0,0.2)',
|
|
|
+ labels: {
|
|
|
+ format: '{value}',
|
|
|
+ style: { fontSize: '10px', color: themecolor, fontWeight: 'bold' }
|
|
|
+ },
|
|
|
+ max: max + max * 0.3,
|
|
|
+ min: 0
|
|
|
+ }],
|
|
|
+ tooltip: {
|
|
|
+ shared: true
|
|
|
+ },
|
|
|
+ plotOptions: {
|
|
|
+ area: {
|
|
|
+ stackiung: 'normal',
|
|
|
+ marker: {
|
|
|
+ lineWidth: 0,
|
|
|
+ enabled: false,
|
|
|
+ radius: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ name: name,
|
|
|
+ type: 'area',
|
|
|
+ data: data_0,
|
|
|
+ lineWidth: 1,
|
|
|
+ tooltip: {
|
|
|
+ valueSuffix: ' '
|
|
|
+ },
|
|
|
+ fillColor: {
|
|
|
+ linearGradient: {
|
|
|
+ x1: 0,
|
|
|
+ y1: 0,
|
|
|
+ x2: 0,
|
|
|
+ y2: 1
|
|
|
+ },
|
|
|
+ stops: [
|
|
|
+ [0, '#34abf5'],
|
|
|
+ [1, Highcharts.Color('#34abf5').setOpacity(0.0).get('rgba')]
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+var show_alarm_pic = function(url) {
|
|
|
+ var status_list_bar = document.getElementById('status_list_bar');
|
|
|
+ status_list_bar.setAttribute('status', '');
|
|
|
+ status_list_bar.innerHTML = '';
|
|
|
+ var pic = document.createElement('div');
|
|
|
+ pic.style.width = '360px';
|
|
|
+ pic.style.height = '270px';
|