solution.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <div>
  3. <div class="count-list" v-if="record">
  4. <div class="count-item">总数:{{record.sum}}</div>
  5. <div class="count-item">待审核:{{record.wait_check}}</div>
  6. <div class="count-item">已通过:{{record.approve}}</div>
  7. <div class="count-item">拒绝:{{record.deny}}</div>
  8. </div>
  9. <div class="content" v-if="solutionData">
  10. <el-table :data="solutionData" border style="width: 100%">
  11. <el-table-column prop="title" label="方案名称"></el-table-column>
  12. <el-table-column prop="login_mobile" label="联系方式"></el-table-column>
  13. <el-table-column prop="updated_at" label="入驻时间"></el-table-column>
  14. <el-table-column prop="checked_at" label="操作时间"></el-table-column>
  15. <el-table-column prop="nickname" label="客户经理"></el-table-column>
  16. <el-table-column prop="status" label="当前状态"></el-table-column>
  17. <el-table-column label="操作">
  18. <template slot-scope="scope">
  19. <el-checkbox label="1" @change="contact(scope.row.id)" name="type">联系他</el-checkbox>
  20. <el-button type="text" @click="detail(scope.row.id)">查看详情</el-button>
  21. </template>
  22. </el-table-column>
  23. </el-table>
  24. </div>
  25. <el-pagination
  26. class="order-footer"
  27. background
  28. layout="prev, pager, next"
  29. :page-size="20"
  30. :total="Number(record.sum)"
  31. @current-change="handleCurrentChange"
  32. />
  33. </div>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. page: 1,
  40. solutionData: [],
  41. form: {
  42. reason: ""
  43. },
  44. record: [],
  45. isDialogShow: false
  46. };
  47. },
  48. mounted() {
  49. this.getList();
  50. },
  51. methods: {
  52. handleCurrentChange(val) {
  53. this.page = val;
  54. this.getList();
  55. },
  56. async detail(id) {
  57. window.open(`/main/solution_detail?id=${id}`, "_self");
  58. },
  59. async getList() {
  60. const page = this.page;
  61. const size = 20;
  62. const data = {
  63. page,
  64. size
  65. };
  66. let res = await this.$post("/api/admin/kaifawu/getProviders", data);
  67. this.solutionData = res.data.list;
  68. this.record = res.data.record;
  69. },
  70. async contact(id) {
  71. const data = {
  72. id
  73. };
  74. let res = await this.$post("/api/admin/kaifawu/contact", data);
  75. this.$message({
  76. message: res.info,
  77. type: "success"
  78. });
  79. }
  80. }
  81. };
  82. </script>
  83. <style lang="scss" scoped>
  84. .count-list {
  85. padding-bottom: 10px;
  86. display: flex;
  87. align-items: center;
  88. }
  89. .count-item {
  90. margin-right: 20px;
  91. font-size: 16px;
  92. }
  93. .content {
  94. white-space: nowrap;
  95. overflow-x: scroll;
  96. height: calc(100vh - 150px);
  97. }
  98. .btn {
  99. width: 80px;
  100. }
  101. .order-footer {
  102. margin-top: 10px;
  103. }
  104. </style>