Commit be3c826cf78b795d36a91771983ef106342d0521

Authored by 潘钊
1 parent ce644985

update

src/main/resources/application.properties
1 spring.profiles: dev,prod 1 spring.profiles: dev,prod
2 -spring.profiles.active: prod 2 +spring.profiles.active: dev
3 3
4 spring.view.suffix=.html 4 spring.view.suffix=.html
5 server.session-timeout=-1 5 server.session-timeout=-1
src/main/resources/ms-jdbc.properties
1 -#ms.mysql.driver= com.mysql.jdbc.Driver  
2 -#ms.mysql.url= jdbc:mysql://127.0.0.1:3306/ms?useUnicode=true&characterEncoding=utf-8  
3 -#ms.mysql.username= root  
4 -#ms.mysql.password= panzhao  
5 -  
6 ms.mysql.driver= com.mysql.jdbc.Driver 1 ms.mysql.driver= com.mysql.jdbc.Driver
7 -ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 2 +ms.mysql.url= jdbc:mysql://127.0.0.1:3306/ms?useUnicode=true&characterEncoding=utf-8
8 ms.mysql.username= root 3 ms.mysql.username= root
9 -ms.mysql.password= root2jsp 4 +ms.mysql.password= panzhao
  5 +
  6 +#ms.mysql.driver= com.mysql.jdbc.Driver
  7 +#ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8
  8 +#ms.mysql.username= root
  9 +#ms.mysql.password= root2jsp
src/main/resources/static/pages/forecast/sample/js/svg.js
@@ -247,34 +247,5 @@ var sampleSvg = (function(){ @@ -247,34 +247,5 @@ var sampleSvg = (function(){
247 return cp; 247 return cp;
248 } 248 }
249 249
250 - /**  
251 - * 自定义表单校验  
252 - */  
253 - function customFormValidate(f){  
254 - var rs = true;  
255 - //所有可见的项  
256 - var es = $('input,select', f);  
257 -  
258 - for(var i = 0, e; e = es[i++];){  
259 - if($(e).attr('required') && ( $(e).val() == null || $(e).val() == '')){  
260 - if($(e).hasClass('select2-hidden-accessible'))  
261 - $(e).next().find('.select2-selection').addClass('custom-val-error');  
262 - else  
263 - $(e).addClass('custom-val-error');  
264 - rs = false;  
265 - }  
266 - else{  
267 - if($(e).hasClass('select2-hidden-accessible'))  
268 - $(e).next().find('.select2-selection').removeClass('custom-val-error');  
269 - else  
270 - $(e).removeClass('custom-val-error');  
271 - }  
272 - }  
273 -  
274 - if(!rs){  
275 - layer.alert('数据完整性校验失败,请检查输入项', {icon: 2, title: '操作失败', shift: 5});  
276 - }  
277 - return rs;  
278 - }  
279 return drawObject; 250 return drawObject;
280 })(); 251 })();
281 \ No newline at end of file 252 \ No newline at end of file
src/main/resources/static/pages/forecast/sample/modal.html
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
20 {{each data as obj i}} 20 {{each data as obj i}}
21 <div class="tab-pane" id="tab_sample_{{i}}"> 21 <div class="tab-pane" id="tab_sample_{{i}}">
22 <form class="form-horizontal" role="form" style="padding: 35px 25px;" id="addSampleForm"> 22 <form class="form-horizontal" role="form" style="padding: 35px 25px;" id="addSampleForm">
  23 + <input type="hidden" name="id" value="{{obj.d.id}}"/>
23 <input type="hidden" name="sStation" value="{{obj.d.sid}}"/> 24 <input type="hidden" name="sStation" value="{{obj.d.sid}}"/>
24 <input type="hidden" name="eStation" value="{{obj.d.eid}}"/> 25 <input type="hidden" name="eStation" value="{{obj.d.eid}}"/>
25 <div class="form-body"> 26 <div class="form-body">
@@ -157,13 +158,15 @@ @@ -157,13 +158,15 @@
157 158
158 toCenter(layero); 159 toCenter(layero);
159 160
160 - //currentData = searchData(sid, eid)[rs.tag];  
161 -  
162 - //console.log('当前站点: ' , getById(id));  
163 - //console.log('上一个站点: ' , prve(id));  
164 - //console.log('当前数据:', currentData);  
165 -  
166 - //forecast_sample_tab_detail_temp 161 + $('#addSampleForm .confirm').on('click', function(){
  162 + if(customFormValidate('#addSampleForm')){
  163 + console.log(_opt);
  164 + var param = $('#addSampleForm').serializeJSON();
  165 + param.lineCode = _opt.lineCode;
  166 + param.updown = _opt.updown;
  167 + $post('/sample', param, function(){layer.close(index);});
  168 + }
  169 + });
167 }); 170 });
168 171
169 172
@@ -237,5 +240,35 @@ @@ -237,5 +240,35 @@
237 else 240 else
238 firstTab.click(); 241 firstTab.click();
239 } 242 }
  243 +
  244 + /**
  245 + * 自定义表单校验
  246 + */
  247 + function customFormValidate(f){
  248 + var rs = true;
  249 + //所有可见的项
  250 + var es = $('input,select', f);
  251 +
  252 + for(var i = 0, e; e = es[i++];){
  253 + if($(e).attr('required') && ( $(e).val() == null || $(e).val() == '')){
  254 + if($(e).hasClass('select2-hidden-accessible'))
  255 + $(e).next().find('.select2-selection').addClass('custom-val-error');
  256 + else
  257 + $(e).addClass('custom-val-error');
  258 + rs = false;
  259 + }
  260 + else{
  261 + if($(e).hasClass('select2-hidden-accessible'))
  262 + $(e).next().find('.select2-selection').removeClass('custom-val-error');
  263 + else
  264 + $(e).removeClass('custom-val-error');
  265 + }
  266 + }
  267 +
  268 + if(!rs){
  269 + layer.alert('数据完整性校验失败,请检查输入项', {icon: 2, title: '操作失败', shift: 5});
  270 + }
  271 + return rs;
  272 + }
240 }(); 273 }();
241 </script> 274 </script>
242 \ No newline at end of file 275 \ No newline at end of file