index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <div id="registeredUser">
  3. <search-box-new
  4. ref="searchBox"
  5. :formData="formData"
  6. :formList="formList"
  7. @search="search"
  8. @init="init"
  9. />
  10. <table-list
  11. :tableSets="tableSet"
  12. :tableData="tableData"
  13. :navText="navText"
  14. :loading="loading"
  15. >
  16. </table-list>
  17. <pagination
  18. :total="total"
  19. :pageSize="formData.pageSize"
  20. :currentPage="formData.pageNum"
  21. @handleSizeChange="handleSizeChange"
  22. @handleCurrentChange="handleCurrentChange"
  23. />
  24. </div>
  25. </template>
  26. <script>
  27. import searchBoxNew from "@/components/searchBoxNew";
  28. import tableList from "@/components/tableList";
  29. import pagination from "@/components/pagination";
  30. export default {
  31. components: { searchBoxNew, tableList, pagination },
  32. data() {
  33. return {
  34. loading: false, //当前表单加载是否加载动画
  35. navText: {
  36. title: "注册用户",
  37. index: 0,
  38. ch: "条",
  39. num: false,
  40. choice: true,
  41. tableHide: true,
  42. addHide: true,
  43. backFatherBtn: {
  44. status: false,
  45. title: "未定义",
  46. },
  47. },
  48. //搜索
  49. formList: [
  50. {
  51. prop: "nickname",
  52. placeholder: "请输入用户昵称",
  53. },
  54. ],
  55. formData: {
  56. status: "0,1",
  57. pageSize: 10,
  58. pageNum: 1,
  59. },
  60. // 表单
  61. tableSet: [
  62. {
  63. label: "用户编码",
  64. prop: "studentCode",
  65. hidden: true,
  66. },
  67. {
  68. label: "头像",
  69. prop: "oneInchPhotos",
  70. hidden: true,
  71. scope: "img",
  72. },
  73. {
  74. label: "昵称",
  75. prop: "nickname",
  76. hidden: true,
  77. },
  78. {
  79. label: "性别",
  80. prop: "sex",
  81. hidden: true,
  82. scope: "sex",
  83. },
  84. // {
  85. // label: "年龄",
  86. // prop: "payWay",
  87. // hidden: true,
  88. // },
  89. {
  90. label: "姓名",
  91. prop: "realname",
  92. hidden: true,
  93. },
  94. {
  95. label: "身份证",
  96. prop: "idCard",
  97. hidden: true,
  98. },
  99. {
  100. label: "手机号码",
  101. prop: "telphone",
  102. hidden: true,
  103. },
  104. {
  105. label: "所在城市",
  106. prop1: "province",
  107. prop2: "city",
  108. prop3: "district",
  109. hidden: true,
  110. scope: "address",
  111. },
  112. {
  113. label: "注册时间",
  114. prop: "createTime",
  115. hidden: true,
  116. scope: "aTimeList",
  117. },
  118. {
  119. label: "归属来源",
  120. prop: "registerPlat",
  121. hidden: true,
  122. scope: "ptai",
  123. },
  124. // {
  125. // label: "微信绑定",
  126. // prop: "payWay",
  127. // hidden: true,
  128. // },
  129. {
  130. label: "最后一次登录时间",
  131. prop: "lastLoginTime",
  132. hidden: true,
  133. scope: "aTimeList",
  134. },
  135. ],
  136. tableData: [], //表单数据
  137. total: 0, //一共多少条
  138. pageSize: 10, //每页多少条数据
  139. currentPage: 1, //当前页码
  140. };
  141. },
  142. mounted() {
  143. this.search();
  144. },
  145. methods: {
  146. search(int) {
  147. this.loading = true;
  148. if (int === 1) {
  149. this.formData.pageNum = 1;
  150. }
  151. if (int === 2) {
  152. this.formData = {
  153. status: "0,1",
  154. pageSize: 10,
  155. pageNum: 1,
  156. };
  157. }
  158. this.$api.inquireappuserlists(this.formData).then((res) => {
  159. this.tableData = res.rows;
  160. this.total = res.total;
  161. this.navText.index = res.total;
  162. }).finally(()=>{
  163. this.loading = false;
  164. })
  165. },
  166. init() {
  167. this.search(2);
  168. },
  169. handleSizeChange(v) {
  170. this.formData.pageSize = v;
  171. this.formData.pageNum = 1;
  172. this.search();
  173. },
  174. handleCurrentChange(v) {
  175. this.formData.pageNum = v;
  176. this.search();
  177. },
  178. },
  179. };
  180. </script>
  181. <style lang="less" scoped>
  182. /deep/.el-button {
  183. border-radius: 8px;
  184. }
  185. /deep/.el-dialog {
  186. border-radius: 8px;
  187. .el-dialog__header {
  188. padding: 0;
  189. .hearders {
  190. height: 40px;
  191. display: flex;
  192. align-items: center;
  193. justify-content: space-between;
  194. padding: 0px 18px 0px 20px;
  195. border-bottom: 1px solid #e2e2e2;
  196. .leftTitle {
  197. font-size: 14px;
  198. font-weight: bold;
  199. color: #2f4378;
  200. }
  201. .rightBoxs {
  202. display: flex;
  203. align-items: center;
  204. img {
  205. width: 14px;
  206. height: 14px;
  207. margin-left: 13px;
  208. cursor: pointer;
  209. }
  210. }
  211. }
  212. }
  213. .el-dialog__footer {
  214. padding: 0;
  215. .dialog-footer {
  216. padding: 0px 40px;
  217. height: 70px;
  218. border-top: 1px solid #e2e2e2;
  219. display: flex;
  220. align-items: center;
  221. justify-content: flex-end;
  222. }
  223. }
  224. }
  225. .imgBox {
  226. width: 100%;
  227. // height: 210px;
  228. border: 1px solid #e2e2e2;
  229. border-radius: 8px;
  230. padding: 8px 8px 3px;
  231. display: flex;
  232. flex-direction: column;
  233. align-items: center;
  234. .imgLabel {
  235. flex: 1;
  236. width: 100%;
  237. border: 1px dotted #e2e2e2;
  238. color: #999;
  239. font-size: 14px;
  240. cursor: pointer;
  241. border-radius: 8px;
  242. .msPhoto {
  243. display: flex;
  244. justify-content: center;
  245. align-items: center;
  246. max-width: 100%;
  247. max-height: 270px;
  248. img {
  249. max-width: 100%;
  250. max-height: 270px;
  251. }
  252. }
  253. .imgbbx {
  254. display: flex;
  255. flex-direction: column;
  256. align-items: center;
  257. justify-content: center;
  258. width: 100%;
  259. height: 100%;
  260. i {
  261. font-weight: bold;
  262. margin: 14px 0;
  263. font-size: 24px;
  264. }
  265. }
  266. }
  267. p {
  268. margin: 5px 0px;
  269. }
  270. }
  271. </style>