detail.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>应急突发事件保障</title>
  8. <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css">
  9. </head>
  10. <body>
  11. <div class="container" id="vueapp">
  12. <h2 class="text-center">{$info['title']}</h2>
  13. <h4>开始时间:{$info['create_time']}</h4>
  14. <div v-for="(item,index) in question" :key="index" style="overflow: hidden;height: auto;">
  15. <div v-if="item.status == 0" class="panel panel-default">
  16. <div class="panel-heading">
  17. <h3 class="panel-title">
  18. 步骤{{index + 1}}:{{item.title}} (响应时间{{item.time}}分钟)
  19. <span v-if="item.status == 0" class="pull-right">未开始</span>
  20. <span v-if="item.status == 1" class="pull-right">进行中</span>
  21. <span v-if="item.status == 2" class="pull-right">已结束</span>
  22. </h3>
  23. </div>
  24. <table class="table">
  25. <tr v-for="(item2,index2) in item.options" :key="index2">
  26. <td v-if="item.status == 2&&item2.status == 0" class="text-danger">{{index2 + 1}}. {{item2.text}}</td>
  27. <td v-else>{{index2 + 1}}. {{item2.text}}</td>
  28. <td style="width: 100px" class="text-center">
  29. <span v-if="item2.status == 1">已完成</span>
  30. <span v-if="item2.status == 0">未完成</span>
  31. </td>
  32. </tr>
  33. </table>
  34. </div>
  35. <div v-if="item.status == 1" class="panel panel-success">
  36. <div class="panel-heading">
  37. <h3 class="panel-title">
  38. 步骤{{index + 1}}:{{item.title}} (响应时间{{item.time}}分钟)
  39. <span v-if="item.status == 0" class="pull-right">未开始</span>
  40. <span v-if="item.status == 1" class="pull-right">进行中</span>
  41. <span v-if="item.status == 2" class="pull-right">已结束</span>
  42. </h3>
  43. </div>
  44. <table class="table">
  45. <tr v-for="(item2,index2) in item.options" :key="index2">
  46. <td v-if="item.status == 2&&item2.status == 0" class="text-danger">{{index2 + 1}}. {{item2.text}}</td>
  47. <td v-else>{{index2 + 1}}. {{item2.text}}</td>
  48. <td style="width: 100px" class="text-center">
  49. <span v-if="item2.status == 1">已完成</span>
  50. <span v-if="item2.status == 0">未完成</span>
  51. </td>
  52. </tr>
  53. </table>
  54. </div>
  55. <div v-if="item.status == 2" class="panel panel-warning">
  56. <div class="panel-heading">
  57. <h3 class="panel-title">
  58. 步骤{{index + 1}}:{{item.title}} (响应时间{{item.time}}分钟)
  59. <span v-if="item.status == 0" class="pull-right">未开始</span>
  60. <span v-if="item.status == 1" class="pull-right">进行中</span>
  61. <span v-if="item.status == 2" class="pull-right">已结束</span>
  62. </h3>
  63. </div>
  64. <table class="table">
  65. <tr v-for="(item2,index2) in item.options" :key="index2">
  66. <td v-if="item.status == 2&&item2.status == 0" class="text-danger">{{index2 + 1}}. {{item2.text}}</td>
  67. <td v-else>{{index2 + 1}}. {{item2.text}}</td>
  68. <td style="width: 100px" class="text-center">
  69. <span v-if="item2.status == 1">已完成</span>
  70. <span v-if="item2.status == 0">未完成</span>
  71. </td>
  72. </tr>
  73. </table>
  74. </div>
  75. </div>
  76. </div>
  77. <script src="/static/jquery-1.11.3.min.js"></script>
  78. <script type="text/javascript" src="/static/elementui2.15.5/vue-2.6.14.js"></script>
  79. <script>
  80. var question = {$info['content']|raw};
  81. var status = {$info['status']};
  82. var vm = new Vue({
  83. el: '#vueapp',
  84. data: {
  85. question: question,
  86. status: status
  87. },
  88. created: function () {
  89. console.log(this.question);
  90. },
  91. methods: {
  92. }
  93. })
  94. </script>
  95. </body>
  96. </html>