From 9876e29a3ae6fb3d70096f582d0260a59760f9f1 Mon Sep 17 00:00:00 2001 From: hdw <hdw@192.168.1.4> Date: 星期一, 24 十二月 2018 14:14:17 +0800 Subject: [PATCH] 添加问题类型 --- gx_tieta/WebRoot/control.jsp | 8 ++- gx_tieta/WebRoot/js/elecircle.content.js | 9 ++++ gx_tieta/WebRoot/iframe/batt-fault-manage-add1.html | 20 +++++++++- gx_tieta/WebRoot/pages/js/common.js | 37 ++++++++++++++++++ gx_tieta/WebRoot/batt-fault-manage.jsp | 20 ++++++++- gx_tieta/WebRoot/Top.jsp | 4 +- 6 files changed, 88 insertions(+), 10 deletions(-) diff --git a/gx_tieta/WebRoot/Top.jsp b/gx_tieta/WebRoot/Top.jsp index 89ac546..db953c2 100644 --- a/gx_tieta/WebRoot/Top.jsp +++ b/gx_tieta/WebRoot/Top.jsp @@ -924,13 +924,13 @@ async: true, success: function(rs) { linkNum = 0; // 鍒濆鍖栨祴璇曡繛鎺� - setTimeout(checkServer, 200); + setTimeout(checkServer, 500); }, error:function() { // 缃戠粶杩炴帴涓嶆甯� if(!navigator.onLine) { linkNum = 0; - setTimeout(checkServer, 200); + setTimeout(checkServer, 500); }else{ linkNum++; // 鏈嶅姟鍣ㄨ繛鎺ヤ笉姝e父 diff --git a/gx_tieta/WebRoot/batt-fault-manage.jsp b/gx_tieta/WebRoot/batt-fault-manage.jsp index 3db4193..27e1e6f 100644 --- a/gx_tieta/WebRoot/batt-fault-manage.jsp +++ b/gx_tieta/WebRoot/batt-fault-manage.jsp @@ -63,6 +63,7 @@ </td> <td> <select name="" id="question_name"> + <option value="-1">鍏ㄩ儴</option> <option value="0">鐢垫睜闂</option> <option value="1">鐢垫簮闂</option> <option value="2">绌鸿皟闂</option> @@ -126,9 +127,9 @@ <script type="text/javascript" src="js/rightmenu.js"></script> <script type="text/javascript" src="js/myConfirm.js"></script> <script type="text/javascript" src="js/myinterval.js"></script> - <script type="text/javascript" src="js/pageUtil.js"></script> <script type="text/javascript" src="src/layui.js"></script> <script type="text/javascript" src="js/pageUtil.js"></script> + <script type="text/javascript" src="pages/js/common.js"></script> <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> @@ -156,6 +157,9 @@ ,element = layui.element ,$=layui.jquery ,form = layui.form; + + var homeQuestion = GLOBAL.HomeQues; // 鏈烘埧闂鍒楄〃 + $('#question_name').html(homeQuestion.getOptions(true)); var uploadIframe; // 闈㈡澘 // 琛ㄦ牸鏁版嵁閰嶇疆椤� var tOptions = { @@ -164,6 +168,7 @@ ,cellMinWidth: 80 ,cols: [[ {field:'stationName3', title:'鏈烘埧鍚嶇О', align:'center',width:450} + ,{field:'ques_type', title:'鏁呴殰绫诲瀷', align:'center',width:150} ,{field:'note', title:'鏁呴殰鎻愬嚭鏃ユ湡', align:'center',width:150} ,{field:'originator', title:'鏁呴殰鎻愬嚭浜�', align:'center',width:150} ,{field:'error_en', title: '鏁呴殰鎺掗櫎鐘舵��', align: 'center',width:150} @@ -517,11 +522,14 @@ // 鏋勯�犳煡璇㈠悗鍙版暟鎹� function tempCondition(){ + var sid = $('#station_name3').find('option:selected').attr('stationid'); + sid = sid?sid: ""; temp ={ - StationId:"", + StationId: sid, StationName1:$('#station_name1').val(), StationName2:$('#city').val(), - StationName5:"", + StationName5:$('#county').val(), + MonCount: $('#question_name').val(), page:Page, }; return temp; @@ -564,6 +572,7 @@ tmp.originator = _data.uname; tmp.solve_user = _data.solve_uname; tmp.solve_record_time = solve_record_time; + tmp.ques_type = homeQuestion.getLayuiBtn(_data.error_state); tOptions.data.push(tmp); Page.pageAll = _data.page.pageAll; } @@ -626,6 +635,11 @@ $('#number').val(Page.pageSize); } }); + + // 鍒囨崲闂绫诲瀷閲嶆柊璁剧疆鍒嗛〉淇℃伅 + $('#question_name').change(function() { + Page.pageCurr = 1; + }); }); </script> </body> diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp index 4ab7004..4a45041 100644 --- a/gx_tieta/WebRoot/control.jsp +++ b/gx_tieta/WebRoot/control.jsp @@ -5324,7 +5324,7 @@ //鏌ヨ璁惧鐨凷D鍗$姸鎬� function searchDevSDState(){ var obj= getBatt(); - console.info(obj); + var status = GLOBAL.circleStatus.status; $.ajax({ type: "post", url: "Bts_station_stateAction_action_serchSDCard", @@ -5333,8 +5333,10 @@ data: "json = " + JSON.stringify(obj), success: function(result) { var rs = JSON.parse(result.result); - console.info(rs); - + //console.info(rs); + var sdStatus = rs.data?'宸叉彃鍏�': '<span style="color: #FF0000">鏈彃鍏�</span>'; + //console.log(sdStatus); + status.setText('sdCard', "sd鍗$姸鎬侊細"+sdStatus); clearTimeout(searchDevSDState.timeout); searchDevSDState.timeout = setTimeout(function() { searchDevSDState(); diff --git a/gx_tieta/WebRoot/iframe/batt-fault-manage-add1.html b/gx_tieta/WebRoot/iframe/batt-fault-manage-add1.html index 18bdbc6..46fca8c 100644 --- a/gx_tieta/WebRoot/iframe/batt-fault-manage-add1.html +++ b/gx_tieta/WebRoot/iframe/batt-fault-manage-add1.html @@ -29,6 +29,7 @@ <td>甯�</td> <!-- 甯� --> <td>鍖�/鍘�</td> <!-- 鍖�/鍘� --> <td>鏈烘埧鍚嶇О</td> <!-- 鏈烘埧鍚嶇О --> + <td>闂绫诲瀷</td> <!-- 闂绫诲瀷 --> </tr> <tr> <td> @@ -71,6 +72,15 @@ <select name="home" id="home" lay-filter="home"> <option value="">璇烽�夋嫨鏈烘埧</option> </select> + </div> + </div> + </div> + </td> + <td> + <div class="layui-form" lay-filter="homeFilter"> + <div class="layui-form-item"> + <div class="layui-input-block"> + <select name="ques_type" id="ques_type" lay-filter="ques_type"></select> </div> </div> </div> @@ -119,14 +129,20 @@ </div> <script type="text/javascript" src="../js/jquery-1.8.3.js"></script> <script type="text/javascript" src="../jqueryui/jquery-ui.min.js"></script> + <script type="text/javascript" src="../js/base.js"></script> <script type="text/javascript" src="../src/layui.js"></script> <script type="text/javascript" src="../pages/js/mylayui.js"></script> + <script type="text/javascript" src="../pages/js/common.js"></script> <script type="text/javascript"> layui.use(['form','table', 'upload', 'layer'], function() { var form = layui.form; var upload = layui.upload; var layer = layui.layer; + + var homeQuestion = GLOBAL.HomeQues; // 鏈烘埧闂鍒楄〃 + $('#ques_type').html(homeQuestion.getOptions()); + form.render('select', 'ques_type'); // 鍥剧墖涓婁紶 var imgsInfo = $('#imgsInfo'); @@ -198,7 +214,6 @@ // 鏇存柊鍐呭 createUploadData(); var formData = new FormData(); - var files = addImgsOpts.files; var filesArr = []; Object.keys(files).forEach(function(key) { @@ -266,11 +281,12 @@ function createUploadData() { var home = $('#home').find('option:selected'); var stationid = home.attr('stationid')?home.attr('stationid'):0; - + var error_state = $('#ques_type').val(); var json = addImgsOpts.json; json.record_time = date.format('yyyy-MM-dd hh:mm:ss'); // 鎻愪氦鏃ユ湡 json.error_descript = $('#desc').val(); // 闂鎻忚堪 json.stationId = stationid; + json.error_state = error_state; } // 鏌ヨ鐪佷笅鎷夋 diff --git a/gx_tieta/WebRoot/js/elecircle.content.js b/gx_tieta/WebRoot/js/elecircle.content.js index afcc6b0..4ea08fb 100644 --- a/gx_tieta/WebRoot/js/elecircle.content.js +++ b/gx_tieta/WebRoot/js/elecircle.content.js @@ -1036,6 +1036,15 @@ } }, { + name: 'sdCard', + type: 'text', + status: 0, + notShow: false, + content: { + text: 'sd鍗$姸鎬侊細锛燂紵锛�' + } + }, + { name: 'signal', type: 'text', status: 0, diff --git a/gx_tieta/WebRoot/pages/js/common.js b/gx_tieta/WebRoot/pages/js/common.js index fe0877c..4d4234a 100644 --- a/gx_tieta/WebRoot/pages/js/common.js +++ b/gx_tieta/WebRoot/pages/js/common.js @@ -472,6 +472,43 @@ gl.CMD.batt.set = 0x37; // 璁剧疆鐢垫睜鍙傛暟 })(jQuery, window, document, GLOBAL); +// 闂绫诲瀷 +;(function($, window, document, gl, undefined) { + // HomeQues鐨勫懡鍚嶇┖闂� + gl.namespace('HomeQues'); + var lists = ['鐢垫睜闂', '鐢垫簮闂', '绌鸿皟闂', '婕忔按闂', 'BTS璁惧闂', 'GPRS妯″潡闂', '鏂藉伐瀹夎闂', '閾侀攤鐢垫睜闂', '鍏朵粬闂']; + + // 灏唓uestions缁戝畾鍒癏omeQues涓� + gl.HomeQues.lists = lists; + + // 鑾峰彇option鍒楄〃 + function getOptions(bool) { + var options = ''; + // 鏄惁娣诲姞鍏ㄩ儴閫夐」 + if(bool) { + options += '<option value="-1">鍏ㄩ儴</option>'; + } + // 閬嶅巻lists杩斿洖鎵�鏈夌殑option + for(var i=0; i<lists.length; i++) { + options += '<option value="'+i+'">'+lists[i]+'</option>'; + } + return options; + } + + // 灏唃etOptions缁戝畾鍒癏omeQues涓� + gl.HomeQues.getOptions = getOptions; + + // 鑾峰彇鏁呴殰绫诲瀷layuiBtn + function getLayuiBtn(num) { + var txt = lists[num]; + return '<a href="javascript:;" class="layui-btn layui-btn-xs">'+txt+'</a>'; + } + + // 灏唃etLayuiBtn缁戝畾鍒癏omeQues涓� + gl.HomeQues.getLayuiBtn = getLayuiBtn; + +})(jQuery, window, document, GLOBAL); + // 鍦板浘淇℃伅 ;(function($, window, document, gl, undefined) { // 瀹氫箟BMap鐨勫懡鍚嶇┖闂� -- Gitblit v1.9.1