tb-terminal-monitor.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport"
  6. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css & js 资源 -->
  8. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/httpVueLoader.js"></script>
  13. <script src="../../static/kj/jquery.min.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. </head>
  17. <body>
  18. <div class="vue-box" style="display: none;" :style="'display: block;'">
  19. <div class="c-panel">
  20. <el-form ref="form" :model='p' @submit.native.prevent>
  21. <el-button type="primary" icon="el-icon-refresh" @click="f5()">刷新</el-button>
  22. </el-form>
  23. <!-- ------------- 数据列表 ------------- -->
  24. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 5px;">
  25. <sa-td name="序号" type="index"></sa-td>
  26. <sa-td name="名称" prop="name" width="200"></sa-td>
  27. <sa-td name="IP" prop="ip"></sa-td>
  28. <sa-td name="类型" prop="type"></sa-td>
  29. <sa-td name="方向" prop="direction" type="enum" :jv="{1: '入口', 2: '出口'}"></sa-td>
  30. <sa-td name="状态" prop="state"></sa-td>
  31. <sa-td name="最近一次通讯" prop="lastOnlineTime" width="160"></sa-td>
  32. </el-table>
  33. </div>
  34. </div>
  35. <script>
  36. var app = new Vue({
  37. components: {
  38. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  39. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  40. },
  41. el: '.vue-box',
  42. data: {
  43. p: { // 查询参数
  44. pageNo: 1, // 当前页
  45. pageSize: 10, // 页大小
  46. sortType: 0 // 排序方式
  47. },
  48. dataCount: 0,
  49. dataList: [], // 数据集合
  50. },
  51. methods: {
  52. f5: function() {
  53. sa.ajax('/monitor/terminal', sa.removeNull(this.p), function(res) {
  54. this.dataList = res.data; // 数据
  55. this.dataCount = res.dataCount; // 数据总数
  56. sa.f5TableHeight(); // 刷新表格高度
  57. }.bind(this));
  58. },
  59. },
  60. created: function() {
  61. this.f5();
  62. sa.onInputEnter();
  63. }
  64. })
  65. </script>
  66. </body>
  67. </html>