logQueryList.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <!-- <div style="height: 95%"> -->
  3. <div class="container" style="padding: 20px 15px 15px 15px">
  4. <h2 style="margin: 15px">操作日志查询</h2>
  5. <div class="search" style="margin: 15px">
  6. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  7. </div>
  8. <el-table
  9. height="calc(80% - 40px)"
  10. v-loading="loading"
  11. class="com-table"
  12. ref="multipleTable"
  13. :data="tableData"
  14. tooltip-effect="dark"
  15. size="small"
  16. border
  17. style="width: 100%"
  18. >
  19. <el-table-column
  20. align="center"
  21. prop="slaveNumber"
  22. label="操作账号"
  23. show-overflow-tooltip
  24. >
  25. </el-table-column>
  26. <el-table-column
  27. align="center"
  28. prop="sourceIp"
  29. show-overflow-tooltip
  30. label="访问IP"
  31. >
  32. </el-table-column>
  33. <el-table-column
  34. align="center"
  35. prop="moduleName"
  36. show-overflow-tooltip
  37. label="操作模块"
  38. >
  39. </el-table-column>
  40. <el-table-column
  41. align="center"
  42. prop="operationContent"
  43. show-overflow-tooltip
  44. label="操作明细"
  45. >
  46. </el-table-column>
  47. <el-table-column
  48. align="center"
  49. prop="operationTime"
  50. show-overflow-tooltip
  51. label="访问时间"
  52. >
  53. </el-table-column>
  54. </el-table>
  55. <el-pagination
  56. class="pageBox"
  57. @current-change="currchange"
  58. layout="prev, pager, next"
  59. background
  60. :total="total"
  61. >
  62. </el-pagination>
  63. </div>
  64. </template>
  65. <script>
  66. import mySearch from "../../../components/search";
  67. export default {
  68. components: {
  69. mySearch,
  70. },
  71. data() {
  72. return {
  73. total: 0,
  74. loading: false,
  75. pageSize: 1,
  76. params: {
  77. slaveNumber: "",
  78. },
  79. searchList: [
  80. {
  81. type: "input",
  82. tit: "日志操作账号",
  83. value: "",
  84. width: "100%",
  85. options: [],
  86. },
  87. ],
  88. tableData: [
  89. {
  90. slaveNumber: "admin",
  91. sourceIp: "100.220.100.100",
  92. moduleName: "全量业务明细报表",
  93. operationContent: "全量业务明细报表1111",
  94. operationTime: "2021-03-10",
  95. },
  96. {
  97. slaveNumber: "admin",
  98. sourceIp: "100.20.100.109",
  99. moduleName: "全量业务",
  100. operationContent: "全量业务明细报表22222",
  101. operationTime: "2021-04-15",
  102. },
  103. ],
  104. };
  105. },
  106. methods: {
  107. //搜索数据
  108. searchInfo(v) {
  109. this.params = {};
  110. v[0] ? (this.params.slaveNumber = v[0]) : "";
  111. this.getList(this.params, this.pageSize);
  112. },
  113. //获取列表
  114. getList(v, n) {
  115. // this.loading = true;
  116. this.pageSize = n;
  117. this.$http({
  118. url: "/market/selectLogs/queryPage",
  119. method: "post",
  120. headers: {
  121. "Content-Type": "application/json",
  122. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  123. },
  124. data: v,
  125. }).then((res) => {
  126. this.loading = false;
  127. this.tableData = res.data.data;
  128. this.total = res.data.totalRecord;
  129. // console.log(this.tableData);
  130. });
  131. },
  132. // 分页
  133. currchange(v) {
  134. this.pageSize = v;
  135. this.getList(this.params, this.pageSize);
  136. },
  137. },
  138. mounted() {
  139. // this.getOpations();
  140. this.getList(this.params, this.pageSize);
  141. // 获取权限
  142. },
  143. watch: {
  144. $route() {
  145. this.getList(this.params, this.pageSize);
  146. },
  147. },
  148. };
  149. </script>
  150. <style scoped>
  151. .el-upload-list {
  152. float: right;
  153. }
  154. .el-input__suffix {
  155. cursor: pointer;
  156. }
  157. .container .el-upload {
  158. width: auto !important;
  159. }
  160. </style>
  161. <style scoped lang="scss">
  162. .btn-default {
  163. display: inline;
  164. margin-left: 10px;
  165. }
  166. .titbox {
  167. div {
  168. float: right;
  169. i {
  170. font-size: 22px;
  171. margin-left: 20px;
  172. cursor: pointer;
  173. }
  174. }
  175. }
  176. .tabbox {
  177. margin-top: 15px;
  178. }
  179. .pageBox {
  180. text-align: right;
  181. float: right;
  182. margin-top: 10px;
  183. }
  184. .info-line {
  185. width: 100%;
  186. display: block;
  187. span {
  188. width: 80px;
  189. display: inline-block;
  190. text-align: left;
  191. i {
  192. color: red;
  193. display: inline-block;
  194. padding-right: 5px;
  195. }
  196. }
  197. .el-select,
  198. .el-input {
  199. width: calc(100% - 100px);
  200. }
  201. }
  202. .online {
  203. width: 100%;
  204. .el-select {
  205. width: calc(100% - 100px);
  206. }
  207. span {
  208. vertical-align: top;
  209. }
  210. .el-textarea {
  211. width: calc(100% - 100px);
  212. }
  213. }
  214. </style>