followData.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <div>
  3. <el-dialog title="同步跟进内容" :visible.sync="dialogTableVisible" append-to-body width="70%">
  4. <el-divider></el-divider>
  5. <div style="display: flex;justify-content: space-between;padding: 16px">
  6. <div>
  7. <span style="font-size: 13px">总计:{{total}}个</span>
  8. </div>
  9. </div>
  10. <div style="padding: 0px 16px 16px 16px">
  11. <table-new-layout :layout="tablecols" :checkbox="false" :data="list" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true" fixedName="operation">
  12. <template v-slot:customcol="scope">
  13. <p>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:scope.column.columnname == 'operation'?'':'--'}}</p>
  14. </template>
  15. <template v-slot:opreation="scope">
  16. <el-button type="text" @click="onSelect(scope.data)">选择</el-button>
  17. </template>
  18. </table-new-layout>
  19. <div class="container normal-panel" style="text-align:right;padding-bottom: 0">
  20. <el-pagination
  21. background
  22. @size-change="handleSizeChange"
  23. @current-change="handleCurrentChange"
  24. :current-page="currentPage"
  25. :page-sizes="[20, 50, 100, 200]"
  26. :page-size="20"
  27. layout="total,sizes, prev, pager, next, jumper"
  28. :total="total">
  29. </el-pagination>
  30. </div>
  31. </div>
  32. </el-dialog>
  33. </div>
  34. </template>
  35. <script>
  36. export default {
  37. name: "followData",
  38. props:['param'],
  39. data(){
  40. return {
  41. dialogTableVisible:false,
  42. tablecols:[],
  43. list:[],
  44. total:0,
  45. currentPage:0,
  46. }
  47. },
  48. methods:{
  49. async listData(){
  50. const res = await this.$api.requested(this.param)
  51. this.list = res.data
  52. this.total = res.total
  53. this.currentPage = res.pageNumber
  54. },
  55. onSelect(data){
  56. this.dialogTableVisible = false
  57. this.$emit('follow',data.content,data.type,data.contacts,data)
  58. },
  59. handleSizeChange(val) {
  60. // console.log(`每页 ${val} 条`);
  61. this.param.content.pageSize = val
  62. this.listData()
  63. },
  64. handleCurrentChange(val) {
  65. // console.log(`当前页: ${val}`);
  66. this.param.content.pageNumber = val
  67. this.listData()
  68. },
  69. },
  70. created() {
  71. this.tablecols = this.tool.tabelCol(this.$route.name).followTable.tablecols
  72. }
  73. }
  74. </script>
  75. <style scoped>
  76. /deep/ .el-dialog__body {
  77. padding: 0px !important;
  78. }
  79. /deep/ .el-divider--horizontal {
  80. display: block;
  81. height: 1px;
  82. width: 100%;
  83. margin: 0;
  84. }
  85. </style>