registerRecord.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <div class="agent_page">
  3. <div class="title">{{ ptitle }}</div>
  4. <div class="query adfac">
  5. <el-select v-model="queryParams.channelType" placeholder="请选择渠道类型" style="margin-right: 20px;">
  6. <el-option :label="item.label" :value="item.value" v-for="item in channel_type" :key="item.id"></el-option>
  7. </el-select>
  8. <el-button type="primary" icon="el-icon-query" @click="getList">查询</el-button>
  9. </div>
  10. <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无注册记录" max-height="578px" style="margin-top: 24px;">
  11. <el-table-column label="序号" width="50">
  12. <template #default="scope">
  13. {{ scope.$index + 1 }}
  14. </template>
  15. </el-table-column>
  16. <el-table-column label="渠道类型" prop="channelType">
  17. <template #default="{ row }">{{ channel_type.find(c=>c.value==row.channelType)?.label||'' }}</template>
  18. </el-table-column>
  19. <el-table-column label="创建时间" prop="createDate"></el-table-column>
  20. </el-table>
  21. <el-row style="display: flex;justify-content: center;">
  22. <el-pagination
  23. @size-change="handleSizeChange"
  24. @current-change="handleCurrentChange"
  25. :current-page="queryParams.page"
  26. :page-sizes="[5, 10, 20, 50]"
  27. :page-size="10"
  28. layout="total, sizes, prev, pager, next, jumper"
  29. :total="total"
  30. v-show="total > 0">
  31. </el-pagination>
  32. </el-row>
  33. </div>
  34. </template>
  35. <script setup name="">
  36. import { ref, getCurrentInstance, onMounted } from 'vue'
  37. import { getRegisterRecordList } from '@/api/agent/index.js';
  38. const { proxy } = getCurrentInstance();
  39. const { channel_type } = proxy.useDict("channel_type");
  40. const queryParams = ref({
  41. page:1,
  42. limit:10,
  43. channelType:''
  44. })
  45. const ptitle = proxy.$route.meta.title;
  46. const dataList = ref([])
  47. const loading = ref(false)
  48. const total = ref(0)
  49. const getList = async () => {
  50. let query = {...queryParams.value};
  51. loading.value = true;
  52. const res = await getRegisterRecordList(query);
  53. dataList.value = res.data.list;
  54. total.value = res.data.total;
  55. loading.value = false;
  56. }
  57. const handleSizeChange = (e)=>{
  58. queryParams.value.limit = e;
  59. getList();
  60. }
  61. const handleCurrentChange = (e)=>{
  62. queryParams.value.page = e;
  63. getList();
  64. }
  65. onMounted(()=>{
  66. getList();
  67. })
  68. </script>
  69. <style scoped lang="scss">
  70. .agent_page{
  71. padding: 20px;
  72. box-sizing: border-box;
  73. .title{
  74. font-family: PingFang-SC, PingFang-SC;
  75. font-weight: bold;
  76. font-size: 16px;
  77. color: #111111;
  78. line-height: 16px;
  79. }
  80. .query{
  81. margin-top: 24px;
  82. }
  83. }
  84. :v-deep .el-dialog__wrapper{
  85. background: rgba(0,0,0,.3) !important;
  86. }
  87. ::v-deep .el-dialog__title{
  88. font-weight: bold !important;
  89. }
  90. ::v-deep .el-dialog{
  91. margin-top: 15vh !important;
  92. }
  93. ::v-deep .el-drawer__header span{
  94. font-weight: bold;
  95. font-size: 16px;
  96. color: #1D2129;
  97. line-height: 22px;
  98. }
  99. </style>