FRUInfo.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <div class="dashboard_box" style="width: 1180px;margin: auto;">
  3. <table class="table">
  4. <thead>
  5. <tr>
  6. <th>名称</th>
  7. <th>速度(RPM)</th>
  8. <th style="width: 200px">模式</th>
  9. <th style="width: 200px">任务(%)</th>
  10. <th style="width: 120px;">操作</th>
  11. </tr>
  12. </thead>
  13. <tbody id="tableContent">
  14. <tr v-for='item in fanList'>
  15. <td>{{item.name}}</td>
  16. <td>{{item.speed}}RPM</td>
  17. <td>
  18. <select v-model='item.model' class="form-control">
  19. <option value="1" >自动</option>
  20. <option value="2">手动</option>
  21. </select>
  22. </td>
  23. <td>
  24. <input type="text" v-model='item.duty' class="form-control">
  25. </td>
  26. <td>
  27. <Button type="primary" @click='set(item)'>设置</Button>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. </template>
  34. <script>
  35. export default {
  36. name: 'dashbord1',
  37. data(){
  38. return{
  39. fanList:[
  40. {name:'fan1', speed: 1000, model: 1, duty:56.3},
  41. {name:'fan2', speed: 1000, model: 1, duty:56.3},
  42. {name:'fan3', speed: 1000, model: 2, duty:56.3},
  43. {name:'fan4', speed: 1000, model: 2, duty:56.3},
  44. {name:'fan5', speed: 1000, model: 1, duty:56.3}
  45. ]
  46. }
  47. },
  48. created() {
  49. console.log("111111111111111111")
  50. },
  51. methods:{
  52. set(item){
  53. console.log(item)
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. * {
  60. box-sizing: border-box;
  61. }
  62. input {
  63. margin: 0;
  64. }
  65. .dashboard_box {
  66. background: -webkit-linear-gradient(bottom, #FFFFFF, #D1E3FF);
  67. /* Safari 5.1 - 6.0 */
  68. background: -o-linear-gradient(top, #FFFFFF, #D1E3FF);
  69. /* Opera 11.1 - 12.0 */
  70. background: -moz-linear-gradient(top, #FFFFFF, #D1E3FF);
  71. /* Firefox 3.6 - 15 */
  72. background: linear-gradient(to top, #FFFFFF, #D1E3FF);
  73. height: 100%;
  74. overflow-y: auto;
  75. /*margin-top:30px;*/
  76. }
  77. .table {
  78. border-spacing: 0;
  79. border-collapse: collapse;
  80. width: 100%;
  81. max-width: 100%;
  82. font-size:13px;
  83. }
  84. .table td,
  85. .table th {
  86. padding: 8px;
  87. text-align: center;
  88. }
  89. .form-control {
  90. display: block;
  91. width: 100%;
  92. height: 30px;
  93. line-height: 30px;
  94. padding: 4px 12px;
  95. font-size: 13px;
  96. background: transparent;
  97. border: 1px solid #1874FF;
  98. color: #003C97;
  99. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  100. box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  101. -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
  102. -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  103. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  104. }
  105. .form-control:focus {
  106. border-color: #66afe9;
  107. outline: 0;
  108. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
  109. box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
  110. }
  111. .btn {
  112. display: inline-block;
  113. padding: 4px 20px;
  114. margin-bottom: 0;
  115. font-size: 13px;
  116. font-weight: 400;
  117. line-height: 1.42857143;
  118. text-align: center;
  119. white-space: nowrap;
  120. vertical-align: middle;
  121. -ms-touch-action: manipulation;
  122. touch-action: manipulation;
  123. cursor: pointer;
  124. -webkit-user-select: none;
  125. -moz-user-select: none;
  126. -ms-user-select: none;
  127. user-select: none;
  128. background-image: none;
  129. border: 1px solid transparent;
  130. }
  131. .btn:focus {
  132. outline: none;
  133. }
  134. .btn-primary {
  135. color: #fff;
  136. background-color: #1874FF;
  137. border-color: #1874FF;
  138. border-radius: 3px;
  139. }
  140. .btn-primary:hover {
  141. color: #fff;
  142. background-color: #0364F7;
  143. border-color: #0364F7;
  144. }
  145. .dashboard_box table tr:nth-of-type(odd) {
  146. background-color: rgba(24, 116, 255, 0.06);
  147. ;
  148. }
  149. .dashboard_box table thead tr {
  150. background-color: transparent !important;
  151. }
  152. .dashboard_box table tr td {
  153. color: #003C97;
  154. }
  155. .dashboard_box table tr th {
  156. color: #022B7D;
  157. padding: 14px 8px;
  158. font-weight: normal;
  159. }
  160. </style>