var eleCircle = new EleCircle('eleCircle', {}); var signalGood = new Image(); signalGood.src="image/eleCircle/signalGood.gif"; var signalBad = new Image(); signalBad.src="image/eleCircle/signalBad.gif"; $(function() { eleCircle.drawImg({ startX: 10, startY: 30, width: 30, height: 30, isShow:false, id: 'signal' }); // 最上方的横线 eleCircle.drawLine({ startX: 120, startY: 80, endX: 440, endY: 80, strokeStyle: '#FF0000', fillStyle: '#FF0000', id: 'L1' }); // 横线下的第一个竖线 eleCircle.drawLine({ startX: 120, startY: 80, endX: 120, endY: 150, strokeStyle: '#FF0000', id: 'L11' }); // 横线下的第二个竖线 eleCircle.drawLine({ startX: 220, startY: 80, endX: 220, endY: 150, strokeStyle: '#FF0000', id: 'L12' }); // 横线下的第三个竖线 eleCircle.drawLine({ startX: 380, startY: 80, endX: 380, endY: 170, strokeStyle: '#FF0000', id: 'l13' }); // BATC+端后的横线 eleCircle.drawLine({ startX: 456, startY: 80, endX: 740, endY: 80, strokeStyle: '#FF0000', fillStyle: '#FF0000', id: 'L2' }); // BATC+端 eleCircle.drawBAT({ startX: 440, startY: 80, fillStyle: '#FF0000', strokeStyle: '#0000DD', name: 'BATC+端', id: 'BATCAnode' }); // BATC+端后的横线第一根竖线 eleCircle.drawLine({ startX: 586, startY: 80, endX: 586, endY: 190, strokeStyle: '#FF0000', fillStyle: '#FF0000', id: 'L21' }); // BATC+端后的横线第二根竖线 eleCircle.drawLine({ startX: 740, startY: 80, endX: 740, endY: 190, strokeStyle: '#FF0000', fillStyle: '#FF0000', id: 'l22' }); // DCDC模块 eleCircle.drawDCDC({ startX:120, startY:150, name: '放电单元', id: 'DCDC1' }); // DCDC升压电下的竖线 eleCircle.drawLine({ startX: 120, startY: 250, endX: 120, endY: 320, strokeStyle: '#FF0000', id: 'L14' }); // DCDC模块 eleCircle.drawDCDC({ startX:220, startY:150, name: '充电单元', id: 'DCDC2' }); // DCDC稳流下的竖线 eleCircle.drawLine({ startX: 220, startY: 250, endX: 220, endY: 320, strokeStyle: '#FF0000', id: 'L15' }); // DCDC模块下的横线 eleCircle.drawLine({ startX: 120, startY: 320, endX: 250, endY: 320, strokeStyle: '#FF0000', id: 'L3' }); // 绘制整流器 eleCircle.drawRectifier({ startX: 586, startY:190, name: '整&流&器', id:'rectifierInfor1' }); // Km开关后的横线 eleCircle.drawLine({ startX: 305, startY: 320, endX: 440, endY: 320, strokeStyle: '#FF0000', id: 'L4' }); // BATC-端后的横线 eleCircle.drawLine({ startX: 456, startY: 320, endX: 480, endY: 320, strokeStyle: '#FF0000', id: 'L5' }); // BATD+端 eleCircle.drawBAT({ startX: 440, startY: 320, fillStyle: '#FF0000', strokeStyle: '#0000DD', name: 'BATD+端', id: 'BATDAnode' }); // BATC-端后的横线的第一个横线电池在这个地方 eleCircle.drawLine({ startX: 480, startY: 320, endX: 480, endY: 360, strokeStyle: '#FF0000', id: 'L51' }); eleCircle.drawLine({ startX: 480, startY: 440, endX: 480, endY: 460, strokeStyle: '#000', id: 'L52' }); // 电池 eleCircle.drawEle({ startX: 480, startY: 360, direction: 'down', value: '0V', name:'电&池&组', id:"groupEle" }); // 电池后的横线 eleCircle.drawLine({ startX: 480, startY: 460, endX: 440, endY: 460, strokeStyle: '#000', id: 'L6' }); // BAT-端前横线 eleCircle.drawLine({ startX: 440, startY: 460, lineWidth: 2, endX: 305, endY: 460, strokeStyle: '#000', id: 'L6' }); // kc开关端前横线 eleCircle.drawLine({ startX: 250, startY: 460, lineWidth: 2, endX: 40, endY: 460, strokeStyle: '#000', id: 'L7' }); // BAT-端前横线上的竖线 eleCircle.drawLine({ startX: 40, startY: 460, lineWidth: 2, endX: 40, endY: 200, strokeStyle: '#000', id: 'L61' }); // DCDC升压左侧横线 eleCircle.drawLine({ startX: 40, startY: 200, lineWidth: 2, endX: 70, endY: 200, strokeStyle: '#000', id: 'L8' }); // BAT-端 eleCircle.drawBAT({ startX: 440, startY: 460, fillStyle: '#000', strokeStyle: '#0000DD', name: 'BAT-端', nPosition: 'down', id: 'BATCathode' }); // 绘制整流器后的线条 eleCircle.drawLine({ startX: 586, startY: 290, endX: 586, endY: 460, strokeStyle: '#000', }); // 整流器左横线 eleCircle.drawLine({ startX: 556, startY: 460, endX: 480, endY: 460, strokeStyle: '#000', }); // 绘制ko开关后的线 eleCircle.drawLine({ startX: 380, startY: 226, endX: 380, endY: 320, strokeStyle: '#FF0000', }); // 绘制用电负载模块 eleCircle.drawEleLoad({ startX: 740, startY: 190, name: '用&电&负&载', }); // 用电负载下的线 eleCircle.drawLine({ startX: 740, startY: 290, endX: 740, endY: 460, strokeStyle: '#000', }); // 向左的横线 eleCircle.drawLine({ startX: 740, startY: 460, endX: 556, endY: 460, strokeStyle: '#000', }); // 二极管上方的横线 // eleCircle.drawLine({ // startX: 380, // startY: 135, // endX: 430, // endY: 135, // strokeStyle: '#FF0000', // }); // 二极管上方的竖线 // eleCircle.drawLine({ // startX: 430, // startY: 135, // endX: 430, // endY: 160, // strokeStyle: '#FF0000', // }); // 二极管下方的竖线 // eleCircle.drawLine({ // startX: 430, // startY: 220, // endX: 430, // endY: 250, // strokeStyle: '#FF0000', // }); // 二极管下方的横线 // eleCircle.drawLine({ // startX: 430, // startY: 250, // endX: 380, // endY: 250, // strokeStyle: '#FF0000', // }); // BATC+端上方的虚线 eleCircle.drawDotLine({ startX: 448, startY: 72, endX: 448, endY: 60, }); // BATC+端上方的虚线(横线) eleCircle.drawDotLine({ startX: 448, startY: 60, endX: 20, endY: 60, }); // BATC+端下方的虚线 eleCircle.drawDotLine({ startX: 448, startY: 88, endX: 448, endY: 312, }); // BATD+端下方的虚线 eleCircle.drawDotLine({ startX: 448, startY: 328, endX: 448, endY: 452, }); // BAT-端下方的虚线 eleCircle.drawDotLine({ startX: 448, startY: 468, endX: 448, endY: 510, }); // BAT-端下方的虚线 eleCircle.drawDotLine({ startX: 448, startY: 468, endX: 448, endY: 510, }); // BAT-端下方的虚线(横线) eleCircle.drawDotLine({ startX: 448, startY: 510, endX: 20, endY: 510, }); // 最左侧虚线 eleCircle.drawDotLine({ startX: 20, startY: 60, endX: 20, endY: 510, name: 'BTS&设备' }); // 绘制二极管Do // eleCircle.drawDiode({ // startX: 430, // startY: 160, // id: 'diode' // }); // 绘制ko开关 eleCircle.drawSwitchBtn({ startX: 380, startY: 170, strokeStyle: '#000', fillStyle: '#0000DD', direction: 'up', name: 'k1', nPosition: 'left', txtLength: -1, id: 'ko' }); // km 开关 eleCircle.drawSwitchBtn({ startX: 305, startY: 320, direction: 'right', stats: 'off', strokeStyle: '#000', fillStyle: '#0000DD', name: 'k2', nPosition: 'up', id: 'km' }); // kC开关 eleCircle.drawSwitchBtn({ startX: 305, startY: 460, direction: 'right', stats: 'off', strokeStyle: '#000', fillStyle: '#0000DD', name: 'k3', id: 'kc' }); // 拓扑图名称 /*eleCircle.drawText({ id: 'title', startX: 400, startY: 40, name: '设备浮充状态电流方向', });*/ // 设备内部温度 eleCircle.drawText({ id: 'tmp', startX: 270, startY: 100, name: '设备温度:0℃', }); // dcdc模块告警 eleCircle.drawText({ id: 'dcdcWarn', startX: 250, startY: 390, name: 'DCDC模块告警:0x8000/0x8000', }); var currentObj = { id: 'current' }; var floatCharge = { points:[ [320, 40], [540, 40],[540, 520], [430, 520], [430, 360],[320,360] ], clockwise: 0, name: '设备浮充状态电流方向' } currentObj = $.extend({}, currentObj, floatCharge); // 绘制电流的的回路 eleCircle.drawCurrent(currentObj); // 绘制在线电压 eleCircle.drawText({ startX: 663, startY: 110, name: '0V', fontSize: 20, lineWidth: 20, fontWeight: 'bold', id: 'onlineVol' }); // 绘制地电压 eleCircle.drawText({ startX: 663, startY: 450, name: '0V', fontSize: 20, lineWidth: 20, fontWeight: 'bold' }); // 绘制电池电流 eleCircle.drawText({ startX: 510, startY: 120, name: '0A', fillStyle: '#0000DD', fontSize: 20, lineWidth: 20, fontWeight: 'bold', id: 'eleCurrent' }); // 负载电流 eleCircle.drawText({ id: 'loaderCurr', startX: 600, startY: 50, name: '最大负载电流:0A', }); // 最大核容电流 eleCircle.drawText({ id: 'disCurrMax', startX: 600, startY: 70, name: '最大核容电流:0A', }); // 浮充电流方向 var floatCurr = [ { fillColor:'#3d90df', moveLine:[{ startP:[480, 440], endP: [480, 460] },{ startP:[480, 460], endP:[586, 460] }] }, { fillColor:'#3d90df', moveLine:[{ startP:[586, 460], endP:[526, 290] }] }, { fillColor:'#3d90df', moveLine: [{ startP:[586, 190], endP: [586, 80] }] }, { moveLine: [{ startP:[586, 80], endP: [456, 80] }] }, { moveLine: [{ startP:[440, 80], endP: [380, 80] },{ startP:[380, 80], endP: [380, 170] }] }, { moveLine: [{ startP:[380, 226], endP: [380, 320] },{ startP:[380, 320], endP: [440, 320] }] }, { moveLine: [{ startP:[456, 320], endP: [480, 320] },{ startP:[480, 320], endP:[480, 360] }] } ]; // 放电测试 var disChargeCurr = [ { moveLine: [{ startP:[480, 360], endP:[480, 320] },{ startP:[480, 320], endP:[456, 320] }] }, { moveLine: [{ startP: [440, 320], endP: [305, 320] }] }, { moveLine: [{ startP: [250, 320], endP: [120, 320] }] }, { moveLine: [{ startP: [120, 320], endP: [120, 250] }] }, { moveLine: [{ startP: [120, 150], endP: [120, 80] }] }, { moveLine: [{ startP: [120, 80], endP: [220, 80] }] }, { moveLine: [{ startP: [220, 80], endP: [440, 80] }] }, { moveLine: [{ startP: [456, 80], endP: [740, 80] }] }, { moveLine: [{ startP: [740, 80], endP: [740, 190] }] }, { moveLine: [{ startP: [740, 290], endP: [740, 460] }] }, { moveLine: [{ startP: [740, 460], endP: [586, 460] }] }, { moveLine: [{ startP:[586, 460], endP:[480, 460] },{ startP:[480, 460], endP:[480, 440] }] } ]; // 稳流充电电流 var constCurr = [ { moveLine:[{ startP:[480, 440], endP: [480, 460] },{ startP:[480, 460], endP:[586, 460] }] }, { moveLine:[{ startP:[586, 460], endP:[526, 290] }] }, { moveLine: [{ startP:[586, 190], endP: [586, 80] }] }, { moveLine: [{ startP:[586, 80], endP: [456, 80] }] }, { moveLine: [{ startP:[440, 80], endP: [380, 80] }] }, { moveLine: [{ startP: [380, 80], endP: [220, 80] }] }, { moveLine: [{ startP: [220, 80], endP: [220, 150] }] }, { moveLine: [{ startP: [220, 250], endP: [220, 320] },{ startP: [220, 320], endP: [250, 320] }] }, { moveLine: [{ startP: [305, 320], endP: [440, 320] }] }, { moveLine: [{ startP: [456, 320], endP: [480, 320] },{ startP: [480, 320], endP: [480, 360] }] }, ]; eleCircle.drawRectList(floatCurr); }); //elecircle-status ;(function($, window, documment, gl) { // 设置当前模块的命名空间为circleStatus gl.namespace('circleStatus'); // 定义电路拓扑图状态类 var Status = function(ele, options) { this.ele = ele; this.options = options; this._init(); if(this.options.length != 0) { this.show(); } }; // 声明原型变量 var _prop = Status.prototype; // 初始化内容 _prop._init = function() { // 清理当前容器的内容 this.ele.hide(); this.ele.text(""); // 使用js的方式生成特定的元素 var _ul = $('