index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>
  5. 申请机构
  6. </h2>
  7. <div class="m-core">
  8. <save-form
  9. :inline="true"
  10. class="searchForm"
  11. ref="searchForm"
  12. @submit="search"
  13. @reset="reset"
  14. :saveKey="'tenantApply'"
  15. :model.sync="searchForm"
  16. >
  17. <el-form-item prop="name">
  18. <el-input
  19. v-model="searchForm.name"
  20. clearable
  21. placeholder="机构名称"
  22. ></el-input>
  23. </el-form-item>
  24. <el-form-item prop="createTimer">
  25. <el-date-picker
  26. v-model.trim="searchForm.createTimer"
  27. clearable
  28. type="daterange"
  29. range-separator="至"
  30. start-placeholder="申请开始时间"
  31. end-placeholder="申请结束时间"
  32. :default-time="['00:00:00', '23:59:59']"
  33. :picker-options="{ firstDayOfWeek: 1 }"
  34. ></el-date-picker>
  35. </el-form-item>
  36. <el-form-item>
  37. <el-button native-type="submit" type="danger">搜索</el-button>
  38. <el-button native-type="reset" type="primary">重置</el-button>
  39. </el-form-item>
  40. </save-form>
  41. <!-- 列表 -->
  42. <div class="tableWrap">
  43. <el-table
  44. :data="tableList"
  45. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  46. >
  47. <el-table-column align="center" label="所在城市" prop="city">
  48. </el-table-column>
  49. <el-table-column align="center" label="机构名称" prop="name">
  50. </el-table-column>
  51. <el-table-column align="center" label="联系人" prop="linkman">
  52. </el-table-column>
  53. <el-table-column align="center" label="联系人电话" prop="mobileNo">
  54. </el-table-column>
  55. <el-table-column align="center" label="申请时间" prop="createTime">
  56. </el-table-column>
  57. <!-- <el-table-column align="center" label="推荐人姓名" prop="productName">
  58. </el-table-column>
  59. <el-table-column align="center" label="上次沟通时间" prop="productName">
  60. </el-table-column>
  61. <el-table-column align="center" label="沟通结果" prop="productName">
  62. </el-table-column>
  63. <el-table-column align="center" label="沟通人" prop="productName">
  64. </el-table-column> -->
  65. <!-- <el-table-column align="center" label="操作">
  66. <template slot-scope="scope">
  67. <el-button
  68. @click="openService('update', scope.row)"
  69. v-permission="'platformServe/update'"
  70. type="text"
  71. >修改
  72. </el-button>
  73. <el-button
  74. @click="delService(scope.row)"
  75. v-permission="'platformServe/delete'"
  76. type="text"
  77. >删除</el-button
  78. >
  79. </template>
  80. </el-table-column> -->
  81. </el-table>
  82. <pagination
  83. :saveKey="'tenantApply'"
  84. sync
  85. :total.sync="pageInfo.total"
  86. :page.sync="pageInfo.page"
  87. :limit.sync="pageInfo.limit"
  88. :page-sizes="pageInfo.page_size"
  89. @pagination="getList"
  90. />
  91. </div>
  92. </div>
  93. </div>
  94. </template>
  95. <script>
  96. import pagination from "@/components/Pagination/index";
  97. import {
  98. tenantApplyList
  99. } from "./api";
  100. import { getTimes } from "@/utils";
  101. const initSearch = {
  102. name: null,
  103. createTimer: null,
  104. };
  105. export default {
  106. components: {
  107. pagination
  108. },
  109. data() {
  110. return {
  111. tableList: [],
  112. pageInfo: {
  113. // 分页规则
  114. limit: 10, // 限制显示条数
  115. page: 1, // 当前页
  116. total: 0, // 总条数
  117. page_size: [10, 20, 40, 50], // 选择限制显示条数
  118. },
  119. searchForm: {
  120. ...initSearch
  121. },
  122. };
  123. },
  124. mounted() {
  125. this.getList();
  126. },
  127. methods: {
  128. async getList() {
  129. try {
  130. const { name, createTimer } = this.searchForm
  131. const res = await tenantApplyList({
  132. name: name,
  133. ...getTimes(createTimer, ["startDateTime", "endDateTime"], "YYYY-MM-DD HH:mm:ss"),
  134. page: this.pageInfo.page,
  135. rows: this.pageInfo.limit,
  136. });
  137. this.pageInfo.total = res.data.total;
  138. this.tableList = res.data.rows;
  139. } catch (e) {}
  140. },
  141. search() {
  142. this.pageInfo.page = 1;
  143. this.$refs.searchForm.save(this.searchForm);
  144. this.$refs.searchForm.save(this.pageInfo, "page");
  145. this.getList();
  146. },
  147. reset() {
  148. this.searchForm = {
  149. ...initSearch
  150. };
  151. this.search();
  152. },
  153. },
  154. };
  155. </script>
  156. <style lang="scss" scoped>
  157. .courseMask .el-dialog__body {
  158. padding-bottom: 0;
  159. }
  160. </style>