From 98ac365e168086db39cd8e7bb7335ecbdd5025cc Mon Sep 17 00:00:00 2001
From: cjj <Administrator@192.168.10.9>
Date: 星期五, 19 十月 2018 10:39:32 +0800
Subject: [PATCH] 图标
---
gx_tieta/WebRoot/pages/js/common.js | 15 +++++++++++++++
gx_tieta/WebRoot/batt-state-manage.jsp | 4 ++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/gx_tieta/WebRoot/batt-state-manage.jsp b/gx_tieta/WebRoot/batt-state-manage.jsp
index c62260f..2c58c70 100644
--- a/gx_tieta/WebRoot/batt-state-manage.jsp
+++ b/gx_tieta/WebRoot/batt-state-manage.jsp
@@ -515,9 +515,9 @@
//缁埅
if(_data.station_stat_xuhang){
- arrTd[index++]=create_ali_font('gcy_icofont','red',{msg: '宸插紓甯�'});
+ arrTd[index++]=create_fa_font('fa-television','red',{msg: '宸插紓甯�'});
}else{
- arrTd[index++]=create_ali_font('gcy_icofont','green',{msg: '姝e父'});
+ arrTd[index++]=create_fa_font('fa-television','green',{msg: '姝e父'});
}
arrTd[index++]=_data.station_xuhang_start_time;
if(_data.station_stat_xuhang){
diff --git a/gx_tieta/WebRoot/pages/js/common.js b/gx_tieta/WebRoot/pages/js/common.js
index 541f0b8..e072489 100644
--- a/gx_tieta/WebRoot/pages/js/common.js
+++ b/gx_tieta/WebRoot/pages/js/common.js
@@ -463,3 +463,18 @@
var outerHTML = i[0].outerHTML;
return outerHTML;
}
+//鐢熸垚闃块噷鍥炬爣鐨勫厓绱�
+function create_fa_font(cla, color, data) {
+ var i = $('<i class="fa"></i>');
+ i.addClass(cla);
+ i.css({
+ 'color': color
+ });
+ Object.keys(data).forEach(function(key) {
+ var attr = 'data-'+key
+ i.attr(attr, data[key]);
+ });
+ // 鑾峰彇瀛楃涓�
+ var outerHTML = i[0].outerHTML;
+ return outerHTML;
+}
--
Gitblit v1.9.1