user_homepwd.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <div class="mainContainer">
  3. <div class="mainTableTools">
  4. <el-row>
  5. <el-form :inline="true">
  6. <el-form-item label="用户">
  7. <el-input v-model="keyword" placeholder="uid/昵称/姓名"></el-input>
  8. </el-form-item>
  9. <el-form-item>
  10. <el-button type="primary" @click="searchUser">查询</el-button>
  11. </el-form-item>
  12. <el-form-item>
  13. <el-tag>当前设置总人数:<b>{{counter.total}}</b></el-tag>
  14. </el-form-item>
  15. </el-form>
  16. </el-row>
  17. </div>
  18. <el-table :data="tableData" border style="width:600px">
  19. <el-table-column label="用户">
  20. <template slot-scope="scope">
  21. <span class="lblue point">
  22. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.uid">{{scope.row.nickname}}({{scope.row.uid}})</a>
  23. </span>
  24. </template>
  25. </el-table-column>
  26. <el-table-column prop="home_pwd" label="主页访问密码"></el-table-column>
  27. </el-table>
  28. <div class="mainPageBox">
  29. <el-pagination
  30. @current-change="changePagination"
  31. :page-size="20"
  32. :total="Number(total)"
  33. layout="total, prev, pager, next"
  34. background
  35. ></el-pagination>
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. page: 1,
  44. total: 0,
  45. tableData: [],
  46. counter: {total: 0},
  47. keyword: ''
  48. }
  49. },
  50. computed: {
  51. },
  52. mounted() {
  53. this.getList();
  54. },
  55. methods: {
  56. async getList() {
  57. const data = {
  58. page: this.page,
  59. keyword: this.keyword
  60. };
  61. let res = await this.$post("/api/admin/UserSetting/getHomepwd", data);
  62. if (res && res.status === 1) {
  63. this.tableData = res.data.list;
  64. this.total = res.data.total;
  65. this.counter = res.data.counter;
  66. }
  67. },
  68. changePagination(val) {
  69. this.page = val;
  70. this.getList();
  71. },
  72. searchUser() {
  73. this.getList();
  74. }
  75. }
  76. };
  77. </script>
  78. <style scoped>
  79. </style>