Commit 586f832abfd34116b209540538baf693d32e50da

Authored by 王通
1 parent 39729142

1.应急停靠处置,可以按班次类型排除

src/main/resources/static/real_control_v2/fragments/north/nav/line_config/buffer_config.html
@@ -59,27 +59,27 @@ @@ -59,27 +59,27 @@
59 排除班次 59 排除班次
60 <div style="display: inline-block;vertical-align: center;"> 60 <div style="display: inline-block;vertical-align: center;">
61 <label style="margin-right: 15px;"> 61 <label style="margin-right: 15px;">
62 - <input type="checkbox" style="width: 14px;" name="excludeTrip" value="normal" {{if excludeTrip && excludeTrip.indexOf('normal') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}> 62 + <input type="checkbox" style="width: 14px;" name="excludeTrip" value="normal" {{if excludeTrip && excludeTrip.indexOf('normal,') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}>
63 正常班次 63 正常班次
64 </label> 64 </label>
65 <label style="margin-right: 15px;"> 65 <label style="margin-right: 15px;">
66 - <input type="checkbox" style="width: 14px;" name="excludeTrip" value="out" {{if excludeTrip && excludeTrip.indexOf('out') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}> 66 + <input type="checkbox" style="width: 14px;" name="excludeTrip" value="out" {{if excludeTrip && excludeTrip.indexOf('out,') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}>
67 出场 67 出场
68 </label> 68 </label>
69 <label style="margin-right: 15px;"> 69 <label style="margin-right: 15px;">
70 - <input type="checkbox" style="width: 14px;" name="excludeTrip" value="in" {{if excludeTrip && excludeTrip.indexOf('in') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}> 70 + <input type="checkbox" style="width: 14px;" name="excludeTrip" value="in" {{if excludeTrip && excludeTrip.indexOf('in,') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}>
71 进场 71 进场
72 </label> 72 </label>
73 <label style="margin-right: 15px;"> 73 <label style="margin-right: 15px;">
74 - <input type="checkbox" style="width: 14px;" name="excludeTrip" value="region" {{if excludeTrip && excludeTrip.indexOf('region') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}> 74 + <input type="checkbox" style="width: 14px;" name="excludeTrip" value="region" {{if excludeTrip && excludeTrip.indexOf('region,') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}>
75 区间 75 区间
76 </label> 76 </label>
77 <label style="margin-right: 15px;"> 77 <label style="margin-right: 15px;">
78 - <input type="checkbox" style="width: 14px;" name="excludeTrip" value="venting" {{if excludeTrip && excludeTrip.indexOf('venting') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}> 78 + <input type="checkbox" style="width: 14px;" name="excludeTrip" value="venting" {{if excludeTrip && excludeTrip.indexOf('venting,') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}>
79 直放 79 直放
80 </label> 80 </label>
81 <label style="margin-right: 15px;"> 81 <label style="margin-right: 15px;">
82 - <input type="checkbox" style="width: 14px;" name="excludeTrip" value="major" {{if excludeTrip && excludeTrip.indexOf('major') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}> 82 + <input type="checkbox" style="width: 14px;" name="excludeTrip" value="major" {{if excludeTrip && excludeTrip.indexOf('major,') > -1}}checked{{/if}} {{if !enableYjtk}}disabled{{/if}}>
83 放站 83 放站
84 </label> 84 </label>
85 </div> 85 </div>
@@ -155,29 +155,17 @@ @@ -155,29 +155,17 @@
155 //参数改变 155 //参数改变
156 $('form[name=yjtkForm] input', wrap).on('blur', function () { 156 $('form[name=yjtkForm] input', wrap).on('blur', function () {
157 var field = $(this).attr('name'); 157 var field = $(this).attr('name');
158 - var val = $(this).val();  
159 - if (conf[field] != val) {  
160 - var data = $('form[name=yjtkForm]', wrap).serializeJSON();  
161 - data.lineCode = conf.line.lineCode;  
162 - // 0禁用 1启用 2修改参数  
163 - data.operCode = 2;  
164 - gb_common.$post('/lineConfig/yjtkSet', data, function (rs) {  
165 - conf = rs.conf;  
166 - notify_succ('调整应急停靠参数');  
167 - }); 158 + var val = $(this).val(), excludeTrip;
  159 + if ('excludeTrip' === field) {
  160 + excludeTrip = $('form[name=yjtkForm] input[name=excludeTrip]:checked', wrap).map(function() {
  161 + return this.value;
  162 + }).get().join(',') + ',';
  163 + val = excludeTrip;
168 } 164 }
169 - });  
170 -  
171 - //处理排除班次复选框组的变化  
172 - $('form[name=yjtkForm] input[name=excludeTrip]', wrap).on('change', function () {  
173 - var selectedValues = $('form[name=yjtkForm] input[name=excludeTrip]:checked', wrap).map(function() {  
174 - return this.value;  
175 - }).get();  
176 - if (JSON.stringify(conf.excludeTrip) !== JSON.stringify(selectedValues)) { 165 + if (conf[field] != val) {
177 var data = $('form[name=yjtkForm]', wrap).serializeJSON(); 166 var data = $('form[name=yjtkForm]', wrap).serializeJSON();
178 - // 手动设置excludeTrip的值  
179 - data.excludeTrip = selectedValues.join(',');  
180 data.lineCode = conf.line.lineCode; 167 data.lineCode = conf.line.lineCode;
  168 + data.excludeTrip = excludeTrip;
181 // 0禁用 1启用 2修改参数 169 // 0禁用 1启用 2修改参数
182 data.operCode = 2; 170 data.operCode = 2;
183 gb_common.$post('/lineConfig/yjtkSet', data, function (rs) { 171 gb_common.$post('/lineConfig/yjtkSet', data, function (rs) {