From 0c291f930b3e375f3baaf8f1e8c767973c87c140 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期三, 07 十一月 2018 09:27:51 +0800
Subject: [PATCH] 添加处理方案显示

---
 gx_tieta/WebRoot/batt-fault-manage.jsp |   69 +++++++++++++++++++++++++++++++---
 1 files changed, 62 insertions(+), 7 deletions(-)

diff --git a/gx_tieta/WebRoot/batt-fault-manage.jsp b/gx_tieta/WebRoot/batt-fault-manage.jsp
index 383010c..8455d36 100644
--- a/gx_tieta/WebRoot/batt-fault-manage.jsp
+++ b/gx_tieta/WebRoot/batt-fault-manage.jsp
@@ -118,6 +118,7 @@
 	<script type="text/html" id="toolBar">
 		<a class="layui-btn layui-btn-xs" lay-event="details">鏁呴殰璇︽儏</a>
 		<a class="layui-btn layui-btn-xs" lay-event="delError">鎺掗櫎鏁呴殰鏂规</a>
+		<a class="layui-btn layui-btn-xs" lay-event="viewError">鏌ョ湅鏁呴殰鏂规</a>
 	</script>
 	<script type="text/javascript">
 		var permits;
@@ -148,14 +149,15 @@
 				,toolbar: false
 				,cellMinWidth: 80
 				,cols: [[
-			     {field:'station_name1', title:'鐪�', align:'center',width:100}
-			    ,{field:'city', title:'甯�', align:'center',width:100}
-			    ,{field:'stationName3', title:'鏈烘埧鍚嶇О', align:'center',width:450}
-			    ,{field:'note', title:'璁板綍鏃堕棿', align:'center',width:150}
+			     {field:'stationName3', title:'鏈烘埧鍚嶇О', align:'center',width:450}
+			    ,{field:'note', title:'鏁呴殰鎻愬嚭鏃ユ湡', align:'center',width:150}
+			    ,{field:'originator', title:'鏁呴殰鎻愬嚭浜�', align:'center',width:150}
 			    ,{field:'error_en', title: '鏁呴殰鎺掗櫎鐘舵��', align: 'center',width:150}
-			   	,{field:'error_dispose', title: '澶勭悊鏂规', align: 'center'}
-			    ,{field:'question', title:'鏁呴殰鎻忚堪', align:'center'},
-			    ,{fixed: 'right', title:'鎿嶄綔',toolbar: '#toolBar', width: 200, align:'center'}
+			    ,{field:'question', title:'鏁呴殰鎻忚堪', align:'center'}
+			   	,{field:'error_dispose', title: '澶勭悊鏂规鎻忚堪', align: 'center'}
+			   	,{field:'solve_record_time', title: '澶勭悊鏂规鎻愬嚭鏃ユ湡', align: 'center'}
+			   	,{field:'solve_user',title:'鏁呴殰瑙e喅浜�',align: 'center'}
+			    ,{fixed: 'right', title:'鎿嶄綔',toolbar: '#toolBar', width: 290, align:'center'}
 			    ]]
 				,data:[]
 			    ,page: false
@@ -175,6 +177,9 @@
             		case 'delError':
             			addSubPlan(obj.data);
             			break;
+            		case 'viewError':
+            			viewSolveDetails(obj.data);
+            		break;
             		default:
             			layer.msg('鍔熻兘寮�鍙戜腑...');
             			break;
@@ -198,9 +203,26 @@
 				});
             }
             
+            // 鏌ョ湅澶勭悊鏂规鎻忚堪
+            function viewSolveDetails(data) {
+            	var imgOpts = setDelDetailsOpts(data);
+            	$('#detailImgs').data('data', imgOpts);
+            	layer.open({
+					type: 2,
+					title: '<span style="font-weight:bold">>>澶勭悊鏂规璇︽儏</span>',
+					area: ['1200px', '660px'],
+					fixed: false, //涓嶅浐瀹�
+					resize: true,
+					maxHeight: 660,
+					maxmin: true,
+					content: 'iframe/batt-fault-manage-details.html'
+				});
+            }
+            
             // 鏋勯�犵粨鏋�
             function setDetailsOpts(data) {
             	var rs={
+            		title: '鏁呴殰鎻忚堪',
             		num: data.num,
             		des: data.question?data.question:'鏆傛棤鎻忚堪锛侊紒锛�'
             	};
@@ -218,6 +240,35 @@
             		break;
             		case 4:
             			imgs = ['picture_one', 'picture_two', 'picture_three', 'picture_four'];
+            		break;
+            	}
+            	
+            	rs.imgs = imgs;
+            	
+            	return rs;
+            }
+            
+            // 鏋勯�犳煡鐪嬪鐞嗘柟妗堝晩缁撴灉
+            function setDelDetailsOpts(data) {
+            	var rs={
+            		title: '澶勭悊鏂规鎻忚堪',
+            		num: data.num,
+            		des: data.error_dispose?data.error_dispose:'鏆傛棤鎻忚堪锛侊紒锛�'
+            	};
+            	var picture_num = data.picture_num;
+            	var imgs = [];
+            	switch(picture_num) {
+            		case 1:
+            			imgs = ['solve_picture_one'];
+            		break;
+            		case 2:
+            			imgs = ['solve_picture_one','solve_picture_two'];
+            		break;
+            		case 3:
+            			imgs = ['solve_picture_one', 'solve_picture_two', 'solve_picture_three'];
+            		break;
+            		case 4:
+            			imgs = ['solve_picture_one', 'solve_picture_two', 'solve_picture_three', 'solve_picture_four'];
             		break;
             	}
             	
@@ -476,6 +527,7 @@
 		    					var tmp = {};
 		    					var _data = data[i];
 		    					var error_en = _data.error_en?'<a class="layui-btn layui-btn-xs layui-bg-blue">宸叉帓闄�</a>':'<a class="layui-btn layui-btn-xs layui-bg-red">鎺掗櫎涓�...</a>';
+								var solve_record_time = _data.error_en?_data.solve_record_time:'';
 								tmp.station_name1 = _data.stationName1;
 								tmp.city = _data.stationName2;
 								tmp.stationName3 = _data.stationName; 
@@ -486,6 +538,9 @@
 								tmp.num = _data.num;
 								tmp.county = _data.stationName5;
 								tmp.picture_num = _data.picture_num;
+								tmp.originator = _data.uname;
+								tmp.solve_user = _data.solve_uname;
+								tmp.solve_record_time = solve_record_time;
 								tOptions.data.push(tmp);
 								Page.pageAll = _data.page.pageAll;
 		    				}

--
Gitblit v1.9.1