tableLogList.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <div class="table-box">
  3. <div class="table-bodyer">
  4. <div class="table-bodyer-option">
  5. <el-form :inline="true" size="medium" :model="listQuery">
  6. <el-form-item label="时间范围:">
  7. <el-date-picker
  8. v-model="listQuery.date"
  9. type="daterange"
  10. range-separator="至"
  11. start-placeholder="开始日期"
  12. end-placeholder="结束日期"
  13. >
  14. </el-date-picker>
  15. </el-form-item>
  16. <el-form-item label="日志类型:">
  17. <el-radio-group v-model="listQuery.radio1">
  18. <el-radio-button label="全部"></el-radio-button>
  19. <el-radio-button label="错误"></el-radio-button>
  20. <el-radio-button label="普通"></el-radio-button>
  21. </el-radio-group>
  22. </el-form-item>
  23. <el-form-item label="关键字:">
  24. <el-input
  25. v-model="listQuery.user"
  26. placeholder="请输入关键字"
  27. ></el-input>
  28. </el-form-item>
  29. <el-form-item>
  30. <el-button type="primary" @click="onSubmit">查询</el-button>
  31. <el-button @click="onReset">重置</el-button>
  32. </el-form-item>
  33. </el-form>
  34. </div>
  35. <div class="table-bodyer-detail">
  36. <div class="table-bodyer-detail-data">
  37. <div class="table-bodyer-detail-data-list ronin-table-box">
  38. <el-table :data="tableData" style="width: 100%" height="100%" stripe>
  39. <el-table-column prop="updateTime" label="日志时间" width="200">
  40. </el-table-column>
  41. <el-table-column prop="name" label="类型" width="120">
  42. <template slot-scope="{row}">
  43. <el-tag>普通</el-tag>
  44. </template>
  45. </el-table-column>
  46. <el-table-column prop="p_sex" label="内容" >
  47. <template>
  48. refresh failed; error: 'Could not open file '/var/log/mysqld.log' for error logging.'
  49. </template>
  50. </el-table-column>
  51. <el-table-column fixed="right" label="操作" width="200">
  52. <template slot-scope="scope">
  53. <el-button @click="onTapDetail(scope.row)" type="text"
  54. >查看</el-button
  55. >
  56. </template>
  57. </el-table-column>
  58. </el-table>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </template>
  65. <script>
  66. import TableDataList from "../components/tableDataList.vue";
  67. export default {
  68. name: "operate",
  69. components: { TableDataList },
  70. data() {
  71. return {
  72. isShowQueryData: false,
  73. mode: "",
  74. listQuery: [],
  75. tableData: [
  76. {
  77. code: "1",
  78. name: "血常规",
  79. p_name: "李先生",
  80. p_sex: "男",
  81. updateTime: "2023-09-20 18:02",
  82. },
  83. {
  84. code: "1",
  85. name: "血常规",
  86. p_name: "李先生",
  87. p_sex: "男",
  88. updateTime: "2023-09-20 18:02",
  89. },
  90. {
  91. code: "1",
  92. name: "血常规",
  93. p_name: "李先生",
  94. p_sex: "男",
  95. updateTime: "2023-09-20 18:02",
  96. },
  97. ],
  98. };
  99. },
  100. watch: {},
  101. created() {},
  102. methods: {
  103. onTapQueryData(e) {
  104. this.isShowQueryData = true;
  105. },
  106. },
  107. };
  108. </script>
  109. <style lang="scss" scoped>
  110. .table-box {
  111. background: #fff;
  112. .table-header {
  113. height: 40px;
  114. display: flex;
  115. justify-content: space-between;
  116. align-items: center;
  117. .title {
  118. font-size: 18px;
  119. font-weight: bold;
  120. }
  121. }
  122. }
  123. .table-bodyer-option {
  124. margin-bottom: 20px;
  125. .el-form-item {
  126. margin-bottom: 0px;
  127. }
  128. }
  129. .table-bodyer-detail {
  130. display: flex;
  131. align-content: space-between;
  132. margin-bottom: 14px;
  133. .table-bodyer-detail-data {
  134. flex: 1;
  135. margin-bottom: 16px;
  136. &-dashboard {
  137. display: flex;
  138. align-items: center;
  139. min-height: 60px;
  140. justify-content: flex-start;
  141. background: #f7f9fe;
  142. width: 100%;
  143. .ai {
  144. margin: 0px 10px;
  145. img {
  146. width: 44px;
  147. }
  148. }
  149. .text {
  150. }
  151. }
  152. }
  153. }
  154. .operate-dashboard {
  155. height: 140px;
  156. margin-top: 14px;
  157. background: #f9faff;
  158. display: flex;
  159. align-items: center;
  160. justify-content: flex-start;
  161. background-repeat: no-repeat;
  162. background-position: right top;
  163. background-size: contain;
  164. background-image: url("../../../assets/images/img-operate-dashboard-bg.png");
  165. margin-bottom: 24px;
  166. .operate-dashboard-nums {
  167. display: flex;
  168. align-items: center;
  169. justify-content: flex-start;
  170. width: 50%;
  171. margin-left: 20px;
  172. .nums-box {
  173. width: 33%;
  174. .title {
  175. font-size: 14px;
  176. color: #999;
  177. font-weight: 400;
  178. }
  179. .nums {
  180. font-size: 28px;
  181. font-family: "DIN Alternate";
  182. margin-bottom: 4px;
  183. font-weight: bold;
  184. }
  185. }
  186. }
  187. .operate-dashboard-info {
  188. margin-left: 20px;
  189. width: 24%;
  190. .room-name {
  191. font-size: 24px;
  192. font-weight: bold;
  193. line-height: 32px;
  194. margin-bottom: 10px;
  195. }
  196. .room-des {
  197. font-size: 14px;
  198. color: #999;
  199. font-weight: normal;
  200. }
  201. }
  202. }
  203. .drawer-content {
  204. padding: 20px;
  205. }
  206. .ronin-table-box{
  207. height: calc(100vh - 200px);
  208. }
  209. </style>