user_namecard.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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="uid" 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>
  13. </el-row>
  14. </div>
  15. <el-table :data="tableData" border style="width:600px">
  16. <el-table-column label="用户">
  17. <template slot-scope="scope">
  18. <span class="lblue point">
  19. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.uid">{{scope.row.nickname}}({{scope.row.uid}})</a>
  20. </span>
  21. </template>
  22. </el-table-column>
  23. <el-table-column prop="count" label="名片夹"></el-table-column>
  24. </el-table>
  25. <div class="mainPageBox">
  26. <el-pagination
  27. @current-change="changePagination"
  28. :page-size="20"
  29. :total="Number(total)"
  30. layout="total, prev, pager, next"
  31. background
  32. ></el-pagination>
  33. </div>
  34. </div>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. page: 1,
  41. total: 0,
  42. tableData: [],
  43. uid: ''
  44. }
  45. },
  46. computed: {
  47. },
  48. mounted() {
  49. this.getList();
  50. },
  51. methods: {
  52. async getList() {
  53. const data = {
  54. page: this.page,
  55. uid: this.uid
  56. };
  57. let res = await this.$post("/api/admin/UserSetting/nameCardList", data);
  58. if (res && res.status === 1) {
  59. this.tableData = res.data.list;
  60. this.total = res.data.total;
  61. }
  62. },
  63. changePagination(val) {
  64. this.page = val;
  65. this.getList();
  66. },
  67. searchUser() {
  68. this.getList();
  69. }
  70. }
  71. };
  72. </script>
  73. <style scoped>
  74. </style>