reservationDetail.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <div>
  3. <el-dialog
  4. width="1000px"
  5. title="预约人员"
  6. :visible.sync="lookVisible"
  7. :before-close="onClose"
  8. append-to-body
  9. >
  10. <div>
  11. <el-form :inline="true" :model="searchForm">
  12. <el-form-item>
  13. <el-input
  14. v-model.trim="searchForm.search"
  15. clearable
  16. @keyup.enter.native="search"
  17. placeholder="学员编号/姓名/手机号"
  18. ></el-input>
  19. </el-form-item>
  20. <el-form-item prop="organId">
  21. <el-select
  22. v-model.trim="searchForm.organId"
  23. placeholder="请选择分部"
  24. clearable
  25. filterable
  26. >
  27. <el-option
  28. v-for="(item, index) in selects.branchs"
  29. :key="index"
  30. :value="item.id"
  31. :label="item.name"
  32. >
  33. </el-option>
  34. </el-select>
  35. </el-form-item>
  36. <el-form-item prop="subjectId">
  37. <el-select
  38. v-model.trim="searchForm.subjectId"
  39. clearable
  40. filterable
  41. placeholder="请选择声部"
  42. >
  43. <el-option
  44. v-for="(item, index) in selects.subjects"
  45. :key="index"
  46. :value="item.id"
  47. :label="item.name"
  48. >
  49. </el-option>
  50. </el-select>
  51. </el-form-item>
  52. <el-form-item>
  53. <el-button @click="search" type="primary">搜索</el-button>
  54. <el-button @click="onReSet" type="danger">重置</el-button>
  55. <el-button
  56. @click="onExport"
  57. type="primary"
  58. v-permission="'imLiveBroadcastRoom/exportReservationRoomUser'"
  59. >导出</el-button
  60. >
  61. </el-form-item>
  62. </el-form>
  63. <div class="tableWrap">
  64. <el-table
  65. style="width: 100%"
  66. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  67. :data="tableList"
  68. ref="multipleSelection"
  69. >
  70. <el-table-column
  71. align="center"
  72. prop="userId"
  73. label="编号"
  74. ></el-table-column>
  75. <el-table-column
  76. align="center"
  77. prop="username"
  78. label="姓名"
  79. ></el-table-column>
  80. <el-table-column
  81. align="center"
  82. prop="phone"
  83. label="手机号"
  84. ></el-table-column>
  85. <el-table-column
  86. align="center"
  87. prop="organName"
  88. label="分部"
  89. ></el-table-column>
  90. <el-table-column
  91. align="center"
  92. prop="subjectName"
  93. label="声部"
  94. ></el-table-column>
  95. </el-table>
  96. <pagination
  97. sync
  98. :total.sync="rules.total"
  99. :page.sync="rules.page"
  100. :limit.sync="rules.limit"
  101. :page-sizes="rules.page_size"
  102. @pagination="getList"
  103. />
  104. </div>
  105. </div>
  106. <div slot="footer" class="dialog-footer">
  107. <el-button type="primary" @click="onClose">确 定</el-button>
  108. </div>
  109. </el-dialog>
  110. </div>
  111. </template>
  112. <script>
  113. import { getRoomUser } from "../api";
  114. import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
  115. import pagination from "@/components/Pagination/index";
  116. import { Export } from "@/utils/downLoadFile";
  117. export default {
  118. name: "eidtPostMsg",
  119. components: { pagination },
  120. data() {
  121. return {
  122. searchForm: {
  123. search: "",
  124. subjectId: "",
  125. organId: "",
  126. },
  127. tableList: [],
  128. organList: [],
  129. subjectList: [],
  130. rules: {
  131. // 分页规则
  132. limit: 10, // 限制显示条数
  133. page: 1, // 当前页
  134. total: 0, // 总条数
  135. page_size: [10, 20, 40, 50], // 选择限制显示条数
  136. },
  137. addMuiscVisible: false,
  138. multipleSelection: [],
  139. chioseIdList: [],
  140. isNewPage: false,
  141. lookVisible: false,
  142. activeRow: { sendFlag: false },
  143. };
  144. },
  145. mounted() {
  146. this.$store.dispatch("setBranchs");
  147. this.$store.dispatch("setSubjects");
  148. },
  149. methods: {
  150. async getList() {
  151. try {
  152. const res = await getRoomUser({
  153. ...this.searchForm,
  154. page: this.rules.page,
  155. rows: this.rules.limit,
  156. roomUid: this.activeRow.roomUid,
  157. });
  158. this.tableList = res.data.rows;
  159. this.rules.total = res.data.total;
  160. } catch (e) {
  161. console.log(e);
  162. }
  163. },
  164. search() {
  165. this.rules.page = 1;
  166. this.getList();
  167. },
  168. onReSet() {
  169. // this.searchForm.search = "";
  170. (this.searchForm = {
  171. search: "",
  172. subjectId: "",
  173. organId: "",
  174. }),
  175. this.search();
  176. },
  177. onClose() {
  178. this.lookVisible = false;
  179. },
  180. openDioag(row) {
  181. this.activeRow = row;
  182. this.lookVisible = true;
  183. this.getList();
  184. },
  185. async onExport() {
  186. await Export(
  187. this,
  188. {
  189. url: "/api-web/imLiveBroadcastRoom/exportReservationRoomUser",
  190. fileName: `${this.activeRow.roomTitle}预约人员.xls`,
  191. method: "post",
  192. params: { ...this.searchForm,roomUid: this.activeRow.roomUid, },
  193. },
  194. `您确定导出"${this.activeRow.roomTitle}"预约人员列表?`
  195. );
  196. },
  197. },
  198. };
  199. </script>
  200. <style lang="scss" scoped>
  201. .w100 {
  202. width: 100%;
  203. }
  204. .btnWrap {
  205. justify-content: flex-start;
  206. }
  207. </style>