record-list.blade.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. @extends('layouts.base')
  2. @section('title', '修改记录')
  3. @section('content')
  4. <link href="{{static_url('yunshop/css/total.css')}}" media="all" rel="stylesheet" type="text/css" />
  5. <style scoped>
  6. /* 修改记录列表 */
  7. .total-head {
  8. padding-bottom: 1px;
  9. }
  10. .vue-title-content span {
  11. opacity: .6;
  12. margin-left: 14px;
  13. }
  14. .el-table th>.cell {
  15. font-family: SourceHanSansCN-Medium;
  16. font-size: 14px;
  17. font-weight: 600;
  18. font-stretch: normal;
  19. letter-spacing: 0px;
  20. color: #666666;
  21. }
  22. .table_box p {
  23. font-family: SourceHanSansCN-Medium;
  24. font-size: 14px;
  25. font-weight: normal;
  26. font-stretch: normal;
  27. letter-spacing: 0px;
  28. color: #333333;
  29. }
  30. /* 分页 */
  31. .pagination-right {
  32. margin: 50px auto;
  33. text-align: center;
  34. }
  35. </style>
  36. <div class="all">
  37. <div id="app">
  38. <!-- 修改记录列表 -->
  39. <div class="total-head">
  40. <div class="vue-title">
  41. <div class="vue-title-left"></div>
  42. <div class="vue-title-content">修改记录</div>
  43. </div>
  44. <!-- 列表+分页查询 -->
  45. <el-table class="table_box" v-loading="loading" style="width:100%;margin:20px 0 0 6.5px;" :data="updatedList" :header-cell-style='{"text-align":"center"}' :cell-style='{"text-align":"center"}'>
  46. <el-table-column label="ID">
  47. <template slot-scope="scope">
  48. <p>[[scope.row.id]]</p>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="会员id">
  52. <template slot-scope="scope">
  53. <p>[[scope.row.uid]]</p>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="修改前上级id">
  57. <template slot-scope="scope">
  58. <p>[[scope.row.parent_id]]</p>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="修改后上级id">
  62. <template slot-scope="scope">
  63. <p>[[scope.row.after_parent_id]]</p>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="状态">
  67. <template slot-scope="scope">
  68. <p v-if="scope.row.status_value==0">修改失败</p>
  69. <p v-else>[[scope.row.status_value]]</p>
  70. </template>
  71. </el-table-column>
  72. <el-table-column label="修改时间">
  73. <template slot-scope="scope">
  74. <p>[[scope.row.created_at]]</p>
  75. </template>
  76. </el-table-column>
  77. </el-table>
  78. </div>
  79. <div v-if="updatedList.length!==0" class="fixed total-floo">
  80. <div class="fixed_box">
  81. <el-pagination background style="text-align: right;" @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pagesize" layout="prev, pager, next, jumper" :total="total">
  82. </el-pagination>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <script>
  88. const vm = new Vue({
  89. el: "#app",
  90. name: "record",
  91. // 防止后端冲突,修改ma语法符号
  92. delimiters: ['[[', ']]'],
  93. data() {
  94. return {
  95. updatedList: [],
  96. currentPage: 1, //当前的页码
  97. pagesize: 5, //每页显示的行数
  98. total: 1, //总页数
  99. loading: true
  100. }
  101. },
  102. created() {
  103. //优化在不同设备固定定位挡住的现象设置父元素的内边距
  104. window.onload = function() {
  105. let all = document.querySelector(".all");
  106. let h = window.innerHeight * 0.04;
  107. all.style.paddingBottom = h + "px";
  108. }
  109. this.postRecord(1);
  110. },
  111. methods: {
  112. //关系修改记录列表
  113. postRecord(page) {
  114. this.$http.post("{!!yzWebFullUrl('member.member.record-datas')!!}", {
  115. page: page
  116. }).then(res => {
  117. console.log(res);
  118. if (res.data.result == 1) {
  119. this.loading = true;
  120. setTimeout(() => {
  121. this.loading = false;
  122. }, 300)
  123. const {
  124. data,
  125. current_page: page,
  126. per_page: per,
  127. total
  128. } = res.body.data.list;
  129. console.log(res);
  130. // console.log(data);
  131. // console.log(page);
  132. // console.log(per);
  133. // console.log(total);
  134. if(data!==null && data.length!==0){
  135. this.updatedList = data;
  136. }else{
  137. this.updatedList = [];
  138. }
  139. //当前的页码
  140. this.currentPage = page;
  141. //每页显示的条数
  142. this.pagesize = per;
  143. //总页数
  144. this.total = total;
  145. } else {
  146. this.$message.error(res.data.msg)
  147. }
  148. })
  149. },
  150. //当前切换的页码
  151. handleCurrentChange(page) {
  152. this.postRecord(page)
  153. }
  154. },
  155. })
  156. </script>@endsection