index.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <style>
  2. .table-body {
  3. padding: 20px;
  4. background-color: #fff;
  5. }
  6. .input-item {
  7. display: inline-block;
  8. width: 250px;
  9. margin: 0 0 20px;
  10. }
  11. .input-item .el-input__inner {
  12. border-right: 0;
  13. }
  14. .input-item .el-input__inner:hover {
  15. border: 1px solid #dcdfe6;
  16. border-right: 0;
  17. outline: 0;
  18. }
  19. .input-item .el-input__inner:focus {
  20. border: 1px solid #dcdfe6;
  21. border-right: 0;
  22. outline: 0;
  23. }
  24. .input-item .el-input-group__append {
  25. background-color: #fff;
  26. border-left: 0;
  27. width: 10%;
  28. padding: 0;
  29. }
  30. .input-item .el-input-group__append .el-button {
  31. padding: 0;
  32. }
  33. .input-item .el-input-group__append .el-button {
  34. margin: 0;
  35. }
  36. .table-body .el-button {
  37. padding: 0 !important;
  38. border: 0;
  39. margin: 0 5px;
  40. }
  41. .el-table th > .cell {
  42. color: #333;
  43. font-weight: bold;
  44. font-size: 14px;
  45. }
  46. .el-table__footer-wrapper, .el-table__header-wrapper {
  47. border-bottom: 1.4px solid #D6D6D6;
  48. }
  49. .el-button--primary2 {
  50. color: #FFF;
  51. background-color: #03C5FF;
  52. border-color: #03C5FF;
  53. }
  54. </style>
  55. <div id="app" v-cloak>
  56. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  57. <div slot="header">
  58. <div>
  59. <span>卡密导入失败列表</span>
  60. </div>
  61. </div>
  62. <div class="table-body">
  63. <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
  64. <el-table-column prop="id" label="卡密序号" min-width="80" align="center"></el-table-column>
  65. <el-table-column label="卡号" min-width="150" align="center">
  66. <template slot-scope="scope">
  67. <com-ellipsis :line="1">{{scope.row.name}}</com-ellipsis>
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="密码" min-width="100" align="center">
  71. <template slot-scope="scope">
  72. <com-ellipsis :line="1">{{scope.row.password}}</com-ellipsis>
  73. </template>
  74. </el-table-column>
  75. <el-table-column prop="scope" width="180" label="创建时间">
  76. <template slot-scope="scope">
  77. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  78. </template>
  79. </el-table-column>
  80. </el-table>
  81. <div style="text-align: right;margin: 20px 0;">
  82. <el-pagination v-if="pagination" :page-size="pagination.pageSize"
  83. style="display: inline-block;float: right;" background @current-change="pageChange"
  84. layout="prev, pager, next" :total="pagination.total_count">
  85. </el-pagination>
  86. </div>
  87. </div>
  88. </el-card>
  89. </div>
  90. <script>
  91. const app = new Vue({
  92. el: '#app',
  93. data() {
  94. return {
  95. list: [],
  96. id: null,
  97. import_id:'',
  98. listLoading: false,
  99. btnLoading: false,
  100. pagination:null,
  101. page: 1,
  102. pageCount: 0,
  103. dataList: [],
  104. };
  105. },
  106. methods: {
  107. search() {
  108. this.page = 1;
  109. this.getList();
  110. },
  111. pageChange(currentPage) {
  112. let self = this;
  113. self.page = currentPage; //console.log(currentPage,999999);
  114. self.getList();
  115. },
  116. getList() {
  117. let self = this;
  118. self.listLoading = true;
  119. request({
  120. params: {
  121. r: 'card-secret/import-fail-log/index',
  122. page: self.page,
  123. import_id:self.import_id,
  124. },
  125. method: 'get',
  126. }).then(e => {
  127. self.listLoading = false;
  128. self.list = e.data.data.list;
  129. this.pagination = e.data.data.pagination;
  130. this.pagination.pageSize = e.data.data.page_size;
  131. this.pagination.total_count = e.data.data.count;
  132. }).catch(e => {
  133. console.log(e);
  134. });
  135. }
  136. },
  137. mounted: function () {
  138. this.import_id = getQuery('import_id');
  139. this.getList();
  140. }
  141. });
  142. </script>