HistoryRecord.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <div class="historyRecord">
  3. <div class="other-people">
  4. <div class="image-border image-border1"></div>
  5. <div class="image-border image-border2"></div>
  6. <div class="image-border image-border3"></div>
  7. <div class="image-border image-border4"></div>
  8. <div class="other-people-title">
  9. 历史监测记录
  10. </div>
  11. <el-table
  12. :data="tableData"
  13. stripe
  14. style="width: 100%">
  15. <el-table-column
  16. prop="ssid"
  17. label="SSID"
  18. width="">
  19. <template slot-scope="scope">
  20. <i :class="[{'blue':scope.row.state == 1},{'yellow':scope.row.state == 0}]"></i>
  21. {{ scope.row.ssid }}
  22. </template>
  23. </el-table-column>
  24. <el-table-column
  25. prop="date"
  26. label="日期"
  27. width="">
  28. </el-table-column>
  29. <el-table-column
  30. prop="location"
  31. label="地点"
  32. width="">
  33. </el-table-column>
  34. <el-table-column
  35. prop="type"
  36. label="可疑信号">
  37. </el-table-column>
  38. </el-table>
  39. <br>
  40. <el-pagination
  41. background
  42. :total="pageination.total"
  43. :page-size="pageination.pageItem"
  44. @current-change="pageChange"
  45. ></el-pagination>
  46. </div>
  47. </div>
  48. </template>
  49. <script>
  50. import Global from '../Global.js'
  51. export default {
  52. data() {
  53. return {
  54. // panel 配置项目
  55. panel: {
  56. usercode: '',
  57. username: '',
  58. compname: '',
  59. keyword: '',
  60. USERCODE: '',
  61. taskstatus: 99,
  62. options: [
  63. {value: 99, label: '全部'},
  64. {value: 1, label: '进行中'},
  65. {value: 2, label: '已完成'},
  66. ],
  67. time1: globalBt(),
  68. },
  69. pageination: {
  70. pageItem: 10,
  71. pageoptions: pageOptions(),
  72. total: 30,
  73. pageIndex: 1,
  74. },
  75. tableData: [{
  76. date: '06-19 12:32:01',
  77. ssid: 'ewall-4G',
  78. location: '201会议室',
  79. type: 'WIFI信号',
  80. state: 1
  81. }, {
  82. date: '06-19 12:32:01',
  83. ssid: 'ewall-4G',
  84. location: '201会议室',
  85. type: 'WIFI信号',
  86. state: 0
  87. }, {
  88. date: '06-19 12:32:01',
  89. ssid: 'ewall-4G',
  90. location: '201会议室',
  91. type: 'WIFI信号',
  92. state: 1
  93. },{
  94. date: '06-19 12:32:01',
  95. ssid: 'ewall-4G',
  96. location: '201会议室',
  97. type: 'WIFI信号',
  98. state: 1
  99. },{
  100. date: '06-19 12:32:01',
  101. ssid: 'ewall-4G',
  102. location: '201会议室',
  103. type: 'WIFI信号',
  104. state: 1
  105. },{
  106. date: '06-19 12:32:01',
  107. ssid: 'ewall-4G',
  108. location: '201会议室',
  109. type: 'WIFI信号',
  110. state: 1
  111. },{
  112. date: '06-19 12:32:01',
  113. ssid: 'ewall-4G',
  114. location: '201会议室',
  115. type: 'WIFI信号',
  116. state: 1
  117. }, {
  118. date: '06-19 12:32:01',
  119. ssid: 'ewall-4G',
  120. location: '201会议室',
  121. type: 'WIFI信号',
  122. state: 0
  123. },]
  124. }
  125. },
  126. mounted() {
  127. this.getTableQuery();
  128. },
  129. methods: {
  130. // 查询按钮
  131. query() {
  132. this.getTableQuery();
  133. this.$message.success('查询完毕');
  134. },
  135. // 页面数据查询
  136. getTableQuery() {
  137. // let that = this;
  138. // that.loading = true;
  139. // let url = headapi + '?ctl=ajax&mod=dial&act=taskListQuery';//获取
  140. // let param = {
  141. // 'taskstatus': that.panel.taskstatus,
  142. // 'bt': globaltime2String(that.panel.time1[0]),
  143. // 'et': globaltime2String(that.panel.time1[1]),
  144. // 'KEYWORD': that.panel.keyword,
  145. // 'USERCODE': that.panel.USERCODE,
  146. // };
  147. // let JSON = '';
  148. // let postdata = qs.stringify(param);
  149. // axios.post(url, postdata)
  150. // .then(function (response) {
  151. // JSON = response.data;
  152. // that.loading = false;
  153. // that.allTableData = JSON.rs;
  154. // that.recordsTotal = JSON.rs.length;
  155. // // 设置分页数据
  156. // that.setPaginations();
  157. // })
  158. // .catch(function (error) {
  159. // console.log(error);
  160. // });
  161. },
  162. // 设置分页数据
  163. setPaginations() {
  164. // 分页属性
  165. let that = this;
  166. that.pageination.total = that.recordsTotal;
  167. // 默认分页
  168. that.tableData = that.allTableData.filter((item, index) => {
  169. return index < that.pageination.pageItem;
  170. });
  171. },
  172. // 每页显示数量
  173. handleSizeChange() {
  174. let that = this;
  175. that.tableData = that.allTableData.filter((item, index) => {
  176. return index < that.pageination.pageItem;
  177. });
  178. that.draw = that.pageination.pageItem;
  179. that.getTableQuery();
  180. },
  181. // 翻页
  182. pageChange(pageIndex) {
  183. let that = this;
  184. // 获取当前页
  185. let index = that.pageination.pageItem * (pageIndex - 1);
  186. // 数据总数
  187. let nums = that.pageination.pageItem * pageIndex;
  188. // 容器
  189. let tables = [];
  190. for (var i = index; i < nums; i++) {
  191. if (that.allTableData[i]) {
  192. tables.push(that.allTableData[i])
  193. }
  194. this.tableData = tables;
  195. }
  196. that.start = index * that.draw;
  197. that.getTableQuery();
  198. },
  199. // 自动排序
  200. sortChange(params) {
  201. console.log(params)
  202. },
  203. // 过滤时间
  204. filterFmtDate(value, row, column) {
  205. let that = this;
  206. return globalfmtDate(column, 11);
  207. },
  208. // 过滤金额
  209. },
  210. }
  211. </script>
  212. <style scoped>
  213. .other-people {
  214. width: 439px;
  215. height: 480px;
  216. margin-left: 0;
  217. }
  218. .el-table {
  219. width: 100%;
  220. overflow: hidden;
  221. display: block;
  222. margin: 0 auto;
  223. margin-top: 40px;
  224. font-size: 14px;
  225. color: #6DC1FF;
  226. }
  227. .el-table, .el-table__expanded-cell {
  228. background: none;
  229. }
  230. /deep/ .el-table th, /deep/ .el-table tr {
  231. background: none;
  232. color: #6DC1FF;
  233. border: none;
  234. }
  235. /deep/ .el-table td, /deep/ .el-table th.is-leaf {
  236. border: none;
  237. }
  238. /deep/ .el-button--primary.is-active, /deep/ .el-button--primary:active, /deep/ .el-button--primary {
  239. background: none;
  240. border: 1px solid #005EA2;
  241. color: #6DC1FF;
  242. }
  243. /deep/ .el-button--primary {
  244. background: none;
  245. border: 1px solid #005EA2;
  246. color: #6DC1FF;
  247. }
  248. .el-table--border::after, .el-table--group::after, .el-table::before {
  249. display: none;
  250. }
  251. .el-pagination.is-background .btn-next.disabled, /deep/ .el-pagination.is-background .btn-next:disabled, /deep/ .el-pagination.is-background .btn-prev.disabled, .el-pagination.is-background .btn-prev:disabled, /deep/ .el-pagination.is-background .el-pager li.disabled {
  252. color: #6DC1FF;
  253. }
  254. /deep/ .el-pagination.is-background .btn-next, /deep/ .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li {
  255. background-color: #061B44;
  256. }
  257. /deep/ .el-pagination__jump {
  258. display: none !important;
  259. }
  260. /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
  261. color: #002540;
  262. background-color: #6DC1FF;
  263. }
  264. /deep/ .el-pagination__total {
  265. color: #6DC1FF;
  266. }
  267. /deep/ .el-table--enable-row-hover .el-table__body tr:hover > td {
  268. background: rgba(27, 86, 200, 0.77);
  269. }
  270. /deep/ .el-table--striped .el-table__body tr.el-table__row--striped:hover > td {
  271. background: rgba(27, 86, 200, 0.77);
  272. }
  273. /deep/ .el-table--striped .el-table__body tr.el-table__row--striped td {
  274. background: rgba(27, 86, 200, 0.14);
  275. }
  276. /deep/ .has-gutter th {
  277. background: rgba(0, 23, 67, 0.8) !important;
  278. font-weight: normal;
  279. }
  280. /deep/ .el-table .cell {
  281. padding: 3px;
  282. }
  283. /deep/ .el-table td, .el-table th {
  284. padding: 6px 0;
  285. }
  286. /deep/ .number {
  287. width: 25px;
  288. height: 25px;
  289. line-height: 25px;
  290. min-width:25px;
  291. }
  292. i.blue {
  293. width:10px;
  294. height: 10px;
  295. float: left;
  296. background: #6DC1FF;
  297. margin-top: 6px;
  298. margin-right: 5px;
  299. border-radius: 250px;
  300. }
  301. i.yellow {
  302. width:10px;
  303. height: 10px;
  304. float: left;
  305. margin-top: 6px;
  306. margin-right: 5px;
  307. background: #FFDD00;
  308. border-radius: 250px;
  309. }
  310. </style>