From 35fefed0792c40cb99b8d15fa5811bbb5992bff9 Mon Sep 17 00:00:00 2001 From: D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore <chenjingjing@LAPTOP-E51P2139> Date: 星期一, 21 一月 2019 10:42:24 +0800 Subject: [PATCH] 修改 --- gx_tieta/WebRoot/pages/js/mylayui.js | 65 ++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/gx_tieta/WebRoot/pages/js/mylayui.js b/gx_tieta/WebRoot/pages/js/mylayui.js index 63b4f22..f78d1de 100644 --- a/gx_tieta/WebRoot/pages/js/mylayui.js +++ b/gx_tieta/WebRoot/pages/js/mylayui.js @@ -607,3 +607,68 @@ return isGood; } }; + +// 缁熻鏁版嵁閫変腑涓暟/鎬讳釜鏁� +var QuantNumber = function(ele) { + this.ele = ele; + this.mol = 0; + this.den = 0; + this._init(); +} +// 璁剧疆鍘熷瀷鏂规硶 +QuantNumber.prototype = { + _init: function() { + this._setEleTxt(); + } + ,set: function(mol, den) { + this.mol = mol; + this.den = den; + this._setEleTxt(); + } + ,setMol: function(val) { + this.mol = val; + this._setEleTxt(); + } + ,setDen: function(val) { + this.den = val; + this._setEleTxt(); + } + ,_setEleTxt: function() { + var str = this.mol+'/'+this.den; + this.ele.text(str) + } +}; + + +//鑾峰彇鐢垫睜鍝佺墝鍒楄〃 +function getBattProducers() { + let producers = []; + // 璇锋眰鍚庡彴鏌ヨ鐢垫睜鍝佺墝 + $.ajax({ + type: 'post' + ,async: false + ,url: 'BattInfAction!serchByBattProducer' + ,data: null + ,dataType: 'json' + ,success: function(res) { + let rs = JSON.parse(res.result); + // 鍒ゆ柇鏌ヨ缁撴灉 + if(rs.code == 1) { + let data = rs.data; + // 閬嶅巻鏌ヨ缁撴灉 + for(let i=0; i<data.length; i++) { + let _data = data[i]; + if(_data.BattProducer) { // 澶勭悊涓虹┖鐨勫搧鐗� + producers.push(_data.BattProducer); + } + } + producers.push('鍏朵粬'); + } + } + ,complete: function() { + + } + }); + + return producers; +} \ No newline at end of file -- Gitblit v1.9.1