synch.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <div id="synch">
  3. <el-row class="register">
  4. <el-col :span="24" class="btn">
  5. <el-col :span="20"><h3>同步</h3></el-col>
  6. </el-col>
  7. <el-col :span="24" class="search">
  8. <el-col :span="6" class="searchSel">
  9. <el-date-picker v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
  10. </el-col>
  11. <el-col :span="5" class="searchInp"><el-input v-model="input1" placeholder="输入策略名"></el-input></el-col>
  12. <el-col :span="5" class="searchInp"><el-input v-model="input2" placeholder="输入服务器名称"></el-input></el-col>
  13. <el-col :span="2" class="searchBtn"><el-button icon="el-icon-search"></el-button></el-col>
  14. </el-col>
  15. <el-col>
  16. <el-table :data="tableData" style="width: 100%" border>
  17. <el-table-column align="center" prop="data" label="时间"> </el-table-column>
  18. <el-table-column align="center" prop="name1" label="策略名称" width="80"> </el-table-column>
  19. <el-table-column align="center" prop="name2" label="服务器名称" width="150"> </el-table-column>
  20. <el-table-column align="center" prop="behavior" label="同步行为"> </el-table-column>
  21. <el-table-column align="center" prop="stata" label="完成情况"> </el-table-column>
  22. <el-table-column align="center" label="操作" width="130">
  23. <el-button type="text" @click="dialogTableVisible = true">查看异常信息</el-button>
  24. </el-table-column>
  25. </el-table>
  26. <el-col class="paging">
  27. <el-pagination background layout="prev, pager, next" :total="1000"></el-pagination>
  28. </el-col>
  29. </el-col>
  30. </el-row>
  31. <el-dialog title="查看异常信息" fullscreen :visible.sync="dialogTableVisible">
  32. <el-table :data="dialogData">
  33. <el-table-column align="center" property="time" label="时间"></el-table-column>
  34. <el-table-column align="center" property="reason" label="原因"></el-table-column>
  35. </el-table>
  36. <div slot="footer" align="center" class="dialog-footer">
  37. <el-button type="primary" @click="dialogTableVisible = false">返回</el-button>
  38. </div>
  39. </el-dialog>
  40. </div>
  41. </template>
  42. <script>
  43. import { log } from 'util';
  44. export default {
  45. name: 'synch',
  46. props: {},
  47. components: {},
  48. data: () => ({
  49. tableData: [
  50. {
  51. data: '2018年9月1日上午9:40至2018年12月3日下午5:23',
  52. name1: 'abc',
  53. name2: '服务器1',
  54. behavior: '同步用户数据',
  55. stata: '正常',
  56. },
  57. {
  58. data: '2018年9月1日上午9:40至2018年12月3日下午5:23',
  59. name1: 'Zed',
  60. name2: '服务器1',
  61. behavior: '同步应用数据',
  62. stata: '异常',
  63. },
  64. {
  65. data: '2018年9月1日上午9:40至2018年12月3日下午5:23',
  66. name1: 'bac',
  67. name2: '服务器2',
  68. behavior: '同步文档数据',
  69. stata: '异常',
  70. },
  71. {
  72. data: '2018年9月1日上午9:40至2018年12月3日下午5:23',
  73. name1: 'bca',
  74. name2: '服务器2',
  75. behavior: '同步用户数据',
  76. stata: '正常',
  77. },
  78. ],
  79. dialogData: [
  80. { time: '时间:2018年9月1日上午9:40', reason: '网络终断' },
  81. { time: '时间:2018年12月3日下午5:23', reason: '人为停止' },
  82. { time: '时间:2019年3月28日下午9:52', reason: '人为停止' },
  83. { time: '时间:2019年6月17日上午11:20', reason: '未知原因 ' },
  84. ],
  85. input1: '',
  86. input2: '',
  87. value1: '',
  88. dialogTableVisible: false,
  89. }),
  90. created() {},
  91. computed: {},
  92. methods: {},
  93. };
  94. </script>
  95. <style lang="scss" scoped>
  96. h1,
  97. h2,
  98. h3,
  99. h4,
  100. h5,
  101. h6 {
  102. margin: 0;
  103. padding: 0;
  104. }
  105. .register {
  106. width: 100%;
  107. padding: 20px;
  108. }
  109. .btn {
  110. width: 100%;
  111. height: 40px;
  112. line-height: 40px;
  113. margin: 20px 0;
  114. }
  115. .search {
  116. height: 40px;
  117. line-height: 40px;
  118. margin: 0 0 20px 0;
  119. }
  120. .searchSel .el-select {
  121. border-radius: 0;
  122. }
  123. /deep/.searchInp .el-input__inner {
  124. border-radius: 0;
  125. }
  126. .searchBtn .el-button {
  127. border-radius: 0;
  128. }
  129. .paging {
  130. text-align: right;
  131. margin: 10px 0;
  132. }
  133. </style>