From b8e64e9ac514d86d8e6c6bbfe39cd04b01b5cf7f Mon Sep 17 00:00:00 2001
From: 81041 <81041@192.168.10.16>
Date: 星期二, 11 十二月 2018 17:22:37 +0800
Subject: [PATCH] 设备告警修改
---
gx_tieta/WebRoot/js/elecircle.js | 83 ++++++++++++++++++++++++++++++++++-------
1 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/gx_tieta/WebRoot/js/elecircle.js b/gx_tieta/WebRoot/js/elecircle.js
index 9195d39..24a9ab2 100644
--- a/gx_tieta/WebRoot/js/elecircle.js
+++ b/gx_tieta/WebRoot/js/elecircle.js
@@ -312,7 +312,7 @@
var opts = $.extend({}, defaults, options || {});
// 鏍规嵁寮�鍏崇殑绫诲瀷鍜屽揩鍏崇殑鐘舵�佽缃畍alue鐨勫�艰幏鍙栫嚎鍖呯數鍘�
- var lineVol = '绾垮寘鐢靛帇:';
+ /*var lineVol = '绾垮寘鐢靛帇:';
if(opts.id == 'ko') {
if(opts.stats == 'on') {
lineVol =lineVol + '0V';
@@ -325,7 +325,7 @@
}else {
lineVol =lineVol + '0V';
}
- }
+ }*/
@@ -495,7 +495,7 @@
}
// 缁樺埗鑳屾櫙鑹�
- this.context.beginPath();
+ /*this.context.beginPath();
this.context.fillStyle = '#FFFFFF';
var strWidth = getStringWidth(lineVol);
this.context.rect(valueTxtX,valueTxtY-12,strWidth,14);
@@ -504,7 +504,7 @@
this.context.strokStyle = '#0000DD';
this.context.fillStyle = '#0000DD';
this.context.font = 'bold 12px Arial';
- this.context.fillText(lineVol, valueTxtX, valueTxtY);
+ this.context.fillText(lineVol, valueTxtX, valueTxtY);*/
var switchBtnInfor = {
options: opts,
@@ -812,17 +812,30 @@
this.context.setLineDash([]); // 鎭㈠瀹炵嚎
+ if(opts.name.length > 0) {
+ this.context.beginPath();
+ this.context.fillStyle = '#FFFFFF';
+ this.context.rect(opts.startX-20,opts.startY+16*2+156, 30,32);
+ this.context.fill();
+ }
+
+
var textList = opts.name.split('&');
+ this.context.fillStyle = opts.strokeStyle;
var lineHeight = 16;
for(var i=0; i<textList.length; i++) {
this.context.fillText(textList[i], opts.startX-20, opts.startY+lineHeight*i+200);
}
+
+
+
+
// 瀛樺偍鍐呭
var dotLineInfor = {
options: opts,
type:'drawDotLine',
- }
+ };
this.opts.push(dotLineInfor);
@@ -1124,6 +1137,46 @@
}
this.opts.push(txtInfor);
}
+
+// 缁樺埗鍥剧墖
+EleCircle.prototype.drawImg = function(options) {
+ var defaluts = {
+ img: '',
+ startX: 0,
+ startY: 0,
+ width: 30,
+ height: 30,
+ lineWidth: 4,
+ fontSize: 14,
+ fontWeight: '',
+ strokeStyle: '#000',
+ fillStyle: '#000',
+ isShow: true,
+ name:'',
+ id: '',
+ };
+
+ var opts = $.extend({}, defaluts, options || {});
+
+ if(opts.img != '' && opts.isShow) {
+ this.context.drawImage(opts.img, opts.startX, opts.startY, opts.width, opts.height);
+
+ this.context.lineWidth = opts.lineWidth;
+ this.context.strokeStyle = opts.strokeStyle;
+ this.context.fillStyle = opts.fillStyle;
+ this.context.font = opts.fontSize+'px Arial';
+ this.context.fillText(opts.name, opts.startX+30, opts.startY+25);
+ }
+
+ // 瀛樺偍鍐呭
+ var txtInfor = {
+ options: opts,
+ type:'drawImg',
+ };
+ this.opts.push(txtInfor);
+
+
+};
// 閲嶆柊缁樺埗鍥�
EleCircle.prototype.redraw =function() {
@@ -1443,7 +1496,7 @@
isCanMove: 1,
clockwise: 0,
txtFillStyle: '#000',
- name: '鐢垫睜缁勬诞鍏呯姸鎬佺數娴佹柟鍚�'
+ name: '璁惧娴厖鐘舵�佺數娴佹柟鍚�'
},
discharge: {
points:[
@@ -1454,7 +1507,7 @@
isCanMove: 1,
clockwise: 1,
txtFillStyle: '#000',
- name: '鐢垫睜缁勬斁鐢垫祴璇曟椂鐢垫祦鏂瑰悜'
+ name: '璁惧鏀剧數娴嬭瘯鏃剁數娴佹柟鍚�'
},
constCharge: {
points:[
@@ -1465,7 +1518,7 @@
isCanMove: 1,
clockwise: 0,
txtFillStyle: '#000',
- name: '鐢垫睜缁勭ǔ娴佸厖鐢垫椂鐢垫祦鏂瑰悜'
+ name: '璁惧绋虫祦鍏呯數鏃剁數娴佹柟鍚�'
},
directCharge: {
points:[
@@ -1476,7 +1529,7 @@
isCanMove: 1,
clockwise: 0,
txtFillStyle: '#000',
- name: '鐢垫睜缁勭洿杩炲厖鐢垫椂鐢垫祦鏂瑰悜'
+ name: '璁惧鐩磋繛鍏呯數鏃剁數娴佹柟鍚�'
},
unLink: {
points:[
@@ -1493,7 +1546,7 @@
name: 'K1/D1娴嬭瘯'
},
powerCutDis: {
- name: '鐢垫睜缁勫仠鐢垫斁鐢�'
+ name: '璁惧鍋滅數鏀剧數'
}
};
@@ -2088,19 +2141,19 @@
var titleList = {
floatCharge:{
fillStyle: '#000',
- name: '鐢垫睜缁勬诞鍏呯姸鎬�'
+ name: '璁惧娴厖鐘舵��'
},
discharge: {
fillStyle: '#000',
- name: '鐢垫睜缁勬斁鐢垫祴璇�'
+ name: '璁惧鏀剧數娴嬭瘯'
},
constCharge: {
fillStyle: '#000',
- name: '鐢垫睜缁勭ǔ娴佸厖鐢�'
+ name: '璁惧绋虫祦鍏呯數'
},
directCharge: {
fillStyle: '#000',
- name: '鐢垫睜缁勭洿杩炲厖鐢�'
+ name: '璁惧鐩磋繛鍏呯數'
},
unLink: {
fillStyle: '#FF0000',
@@ -2112,7 +2165,7 @@
},
powerCutDis: {
fillStyle: '#000',
- name: '鐢垫睜缁勫仠鐢垫斁鐢�'
+ name: '璁惧鍋滅數鏀剧數'
}
};
--
Gitblit v1.9.1