tj3.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <div class="ibox-content">
  7. <div style="height: 300px" id="tj1"></div>
  8. </div>
  9. <div class="ibox-content" >
  10. <table class="table table-bordered" >
  11. <thead>
  12. <tr>
  13. {foreach $data[0] as $v}
  14. <th>{$v.name}</th>
  15. {/foreach}
  16. </tr>
  17. <tr>
  18. {foreach $data[0] as $v}
  19. <td>{$v.value}</td>
  20. {/foreach}
  21. </tr>
  22. <tr>
  23. {foreach $data[1] as $v}
  24. <th>{$v.name}</th>
  25. {/foreach}
  26. </tr>
  27. <tr>
  28. {foreach $data[1] as $v}
  29. <td>{$v.value}</td>
  30. {/foreach}
  31. </tr>
  32. <tr>
  33. {foreach $data[2] as $v}
  34. <th>{$v.name}</th>
  35. {/foreach}
  36. </tr>
  37. <tr>
  38. {foreach $data[2] as $v}
  39. <td>{$v.value}</td>
  40. {/foreach}
  41. </tr>
  42. </thead>
  43. </table>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. {/block}
  49. {block name="script"}
  50. <script type="text/javascript" src="/static/echarts.js"></script>
  51. <script>
  52. $(document).ready(function(){
  53. formSetValue("enable", {$info.enable|default=1});
  54. });
  55. option = {
  56. xAxis: {
  57. type: 'category',
  58. data: {:json_encode($key)}
  59. },
  60. yAxis: {
  61. type: 'value'
  62. },
  63. series: [{
  64. data: {:json_encode($value)},
  65. type: 'line'
  66. }],
  67. tooltip : {
  68. trigger: 'axis',
  69. axisPointer: {
  70. type: 'cross',
  71. label: {
  72. backgroundColor: '#6a7985'
  73. }
  74. }
  75. }
  76. };
  77. var myChart = echarts.init(document.getElementById('tj1'));
  78. myChart.setOption(option);
  79. </script>
  80. {/block}