userAdmin.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <div id="userAdmin">
  3. <el-row>
  4. <el-col :span="24" class="userInfo">
  5. <el-col :span="24" class="top">
  6. <span>用户列表</span>
  7. </el-col>
  8. <el-col :span="24" class="info">
  9. <el-tabs v-model="activeName" @tab-click="handleClick">
  10. <el-tab-pane label="待审用户" name="first">
  11. <el-col :span="24" class="userList" v-for="(item, index) in userList" :key="index">
  12. <el-col :span="20" class="name"> 登录名称:登录名称 </el-col>
  13. <el-col :span="4" class="date">
  14. 2020-02-06
  15. </el-col>
  16. <el-col :span="12" class="left">
  17. <el-col :span="6" style="margin:0 10px 0 0;">
  18. <el-image style="width:110px;height:110px;" :src="item.img_path"></el-image>
  19. </el-col>
  20. <el-col :span="17" class="leftInfo">
  21. <p>{{ item.name }}</p>
  22. <p>类别:{{ item.role }}</p>
  23. <p>电话:{{ item.phone }}</p>
  24. </el-col>
  25. </el-col>
  26. <el-col :span="12" class="right">
  27. <el-link :underline="false">审核用户</el-link>
  28. </el-col>
  29. </el-col>
  30. <el-col :span="24" class="page">
  31. <el-pagination
  32. @size-change="handleSizeChange"
  33. @current-change="handleCurrentChange"
  34. :current-page="currentPage1"
  35. layout="total, prev, pager, next, jumper"
  36. :total="userListTotal"
  37. >
  38. </el-pagination>
  39. </el-col>
  40. </el-tab-pane>
  41. <el-tab-pane label="已审用户" name="second">
  42. <el-col :span="24" class="userList" v-for="(item, index) in adminList" :key="index">
  43. <el-col :span="20" class="name"> 登录名称:登录名称 </el-col>
  44. <el-col :span="4" class="date">
  45. 2020-02-06
  46. </el-col>
  47. <el-col :span="12" class="left">
  48. <el-col :span="6" style="margin:0 10px 0 0;">
  49. <el-image style="width:110px;height:110px;" :src="item.img_path"></el-image>
  50. </el-col>
  51. <el-col :span="17" class="leftInfo">
  52. <p>{{ item.name }}</p>
  53. <p>类别:{{ item.role }}</p>
  54. <p>电话:{{ item.phone }}</p>
  55. </el-col>
  56. </el-col>
  57. <el-col :span="12" class="right">
  58. <el-link :underline="false">查看详情</el-link>
  59. </el-col>
  60. </el-col>
  61. <el-col :span="24" class="page">
  62. <el-pagination
  63. @size-change="handleSizeChange"
  64. @current-change="handleCurrentChange"
  65. :current-page="currentPage2"
  66. layout="total, prev, pager, next, jumper"
  67. :total="adminListTotal"
  68. >
  69. </el-pagination>
  70. </el-col>
  71. </el-tab-pane>
  72. </el-tabs>
  73. </el-col>
  74. </el-col>
  75. </el-row>
  76. </div>
  77. </template>
  78. <script>
  79. export default {
  80. name: 'userAdmin',
  81. props: {
  82. userList: null,
  83. userListTotal: null,
  84. adminList: null,
  85. adminListTotal: null,
  86. },
  87. components: {},
  88. data: () => ({
  89. activeName: 'first',
  90. currentPage1: 1,
  91. currentPage2: 1,
  92. }),
  93. created() {},
  94. computed: {},
  95. methods: {
  96. handleClick(tab, event) {
  97. console.log(tab, event);
  98. },
  99. handleSizeChange(val) {
  100. console.log(`每页 ${val} 条`);
  101. },
  102. handleCurrentChange(val) {
  103. console.log(`当前页: ${val}`);
  104. },
  105. },
  106. };
  107. </script>
  108. <style lang="less" scoped>
  109. p {
  110. padding: 0;
  111. margin: 0;
  112. }
  113. .top {
  114. height: 60px;
  115. border-bottom: 1px solid #215299;
  116. line-height: 60px;
  117. }
  118. .top span {
  119. display: inline-block;
  120. width: 130px;
  121. height: 60px;
  122. text-align: center;
  123. line-height: 60px;
  124. background-color: #215299;
  125. color: #fff;
  126. }
  127. .info {
  128. padding: 20px;
  129. }
  130. .userList {
  131. height: 190px;
  132. border: 1px solid #ccc;
  133. margin: 0 0 15px 0;
  134. }
  135. .userList .name {
  136. height: 40px;
  137. line-height: 40px;
  138. background-color: #fafafa;
  139. color: #888;
  140. padding: 0 10px;
  141. }
  142. .userList .date {
  143. height: 40px;
  144. line-height: 40px;
  145. background-color: #fafafa;
  146. color: #888;
  147. }
  148. .userList .left {
  149. height: 110px;
  150. margin: 19px 0;
  151. border-right: 2px solid #ccc;
  152. }
  153. .userList .left .leftInfo p {
  154. margin: 10px 0;
  155. }
  156. .userList .right {
  157. height: 110px;
  158. margin: 19px 0;
  159. padding: 0 30px;
  160. }
  161. .adminList {
  162. height: 190px;
  163. border: 1px solid #ccc;
  164. }
  165. .page {
  166. height: 30px;
  167. text-align: center;
  168. }
  169. </style>