tableUnsubmit.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <div class="container normal-panel">
  3. <div class="flex-align-center flex-between normal-margin">
  4. <p class="title">{{ $t('未提报经销商') }}</p>
  5. <excel :tablecols="tablecols" :param="params" :excelTitle="$t('未提报经销商')"></excel>
  6. </div>
  7. <tableLayout :layout="tablecols" :data="list" :custom="true" height="calc(41vh)">
  8. <template v-slot:customcol="scope">
  9. <div v-if="scope.column.columnname === 'province'">
  10. {{scope.column.data.province}}-{{scope.column.data.city}}-{{scope.column.data.county}}
  11. </div>
  12. <p v-else>{{scope.column.data[scope.column.columnname]?$t(scope.column.data[scope.column.columnname]):'--'}}</p>
  13. </template>
  14. </tableLayout>
  15. <div style="margin-top:16px;text-align:right">
  16. <el-pagination
  17. background
  18. small
  19. @size-change="handleSizeChange"
  20. @current-change="handleCurrentChange"
  21. :current-page="currentPage"
  22. :page-size="params.content.pageSize"
  23. layout="total, prev, pager, next, jumper"
  24. :total="total">
  25. </el-pagination>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. import excel from '@/components/export_excel/index.vue'
  31. export default {
  32. components:{
  33. excel
  34. },
  35. data () {
  36. return {
  37. params:{
  38. "id":20221102093402,
  39. "content": {
  40. "sat_submiteditmodelid": this.$route.query.id,
  41. "pageNumber": 1,
  42. "pageSize": 20
  43. }
  44. },
  45. tablecols:[],
  46. list:[],
  47. total:0,
  48. currentPage:0
  49. }
  50. },
  51. methods:{
  52. async getUnSubmitList () {
  53. const res = await this.$api.requested(this.params)
  54. this.list = res.data
  55. this.total = res.total
  56. this.currentPage = res.pageNumber
  57. },
  58. handleSizeChange(val) {
  59. // console.log(`每页 ${val} 条`);
  60. this.params.content.pageSize = val
  61. this.getUnSubmitList()
  62. },
  63. handleCurrentChange(val) {
  64. // console.log(`当前页: ${val}`);
  65. this.params.content.pageNumber = val
  66. this.getUnSubmitList()
  67. },
  68. },
  69. mounted () {
  70. this.getUnSubmitList()
  71. },
  72. created () {
  73. this.tablecols = this.tool.tabelCol(this.$route.name)['tablUnSubmit'].tablecols
  74. }
  75. }
  76. </script>
  77. <style>
  78. </style>
  79. <style scoped>
  80. .title{
  81. height: 20px;
  82. line-height: 20px;
  83. font-size: 14px;
  84. text-indent: 7px;
  85. font-weight: bold;
  86. color: #333333;
  87. margin-bottom: 20px;
  88. border-left: .3rem solid #3874F6;
  89. }
  90. </style>