Commit e4c08b4174b966948af84290f4fc044555b82ed0
1 parent
12c008eb
update
Showing
2 changed files
with
22 additions
and
1 deletions
src/main/resources/static/pages/forms/statement/firstAndLastBus_delay.html
| @@ -220,7 +220,13 @@ | @@ -220,7 +220,13 @@ | ||
| 220 | $("#sumMap tr").addClass("hidden"); | 220 | $("#sumMap tr").addClass("hidden"); |
| 221 | $get('/pcpc/firstAndLastBus_sum', params, function(result){ | 221 | $get('/pcpc/firstAndLastBus_sum', params, function(result){ |
| 222 | // 把数据填充到模版中 | 222 | // 把数据填充到模版中 |
| 223 | - var tbodyHtml = template('list_firstAndLastBus_delay',{list:result[result.length - 1].map}); | 223 | + var list; |
| 224 | + if(result.length - 1 > 0){ | ||
| 225 | + list = result[result.length - 1].map; | ||
| 226 | + } else { | ||
| 227 | + list = result; | ||
| 228 | + } | ||
| 229 | + var tbodyHtml = template('list_firstAndLastBus_delay',{list:list}); | ||
| 224 | // 把渲染好的模版html文本追加到表格中 | 230 | // 把渲染好的模版html文本追加到表格中 |
| 225 | $('#forms tbody').html(tbodyHtml); | 231 | $('#forms tbody').html(tbodyHtml); |
| 226 | 232 | ||
| @@ -262,4 +268,9 @@ | @@ -262,4 +268,9 @@ | ||
| 262 | <td>{{obj.remarks1}}</td> | 268 | <td>{{obj.remarks1}}</td> |
| 263 | </tr> | 269 | </tr> |
| 264 | {{/each}} | 270 | {{/each}} |
| 271 | + {{if list.length == 0}} | ||
| 272 | + <tr> | ||
| 273 | + <td colspan="20"><h6 class="muted">没有相关数据</h6></td> | ||
| 274 | + </tr> | ||
| 275 | + {{/if}} | ||
| 265 | </script> | 276 | </script> |
| 266 | \ No newline at end of file | 277 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
| @@ -434,6 +434,11 @@ | @@ -434,6 +434,11 @@ | ||
| 434 | {{/if}} | 434 | {{/if}} |
| 435 | </tr> | 435 | </tr> |
| 436 | {{/each}} | 436 | {{/each}} |
| 437 | + {{if list.length == 0}} | ||
| 438 | + <tr> | ||
| 439 | + <td colspan="20"><h6 class="muted">没有相关数据</h6></td> | ||
| 440 | + </tr> | ||
| 441 | + {{/if}} | ||
| 437 | </script> | 442 | </script> |
| 438 | <script type="text/html" id="list_sumMaps"> | 443 | <script type="text/html" id="list_sumMaps"> |
| 439 | {{each list as obj i}} | 444 | {{each list as obj i}} |
| @@ -449,4 +454,9 @@ | @@ -449,4 +454,9 @@ | ||
| 449 | <td>{{obj.remarks1}}</td> | 454 | <td>{{obj.remarks1}}</td> |
| 450 | </tr> | 455 | </tr> |
| 451 | {{/each}} | 456 | {{/each}} |
| 457 | + {{if list.length == 0}} | ||
| 458 | + <tr> | ||
| 459 | + <td colspan="20"><h6 class="muted">没有相关数据</h6></td> | ||
| 460 | + </tr> | ||
| 461 | + {{/if}} | ||
| 452 | </script> | 462 | </script> |
| 453 | \ No newline at end of file | 463 | \ No newline at end of file |