selectUser.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <My_listbox ref="List" @getlist="getList" bottomHeight="70">
  3. <view style="height: 10px;" />
  4. <user-list :list="list" @onClick="onClick" />
  5. </My_listbox>
  6. </template>
  7. <script>
  8. import userList from "../team/modules/userList.vue"
  9. export default {
  10. components: { userList },
  11. data() {
  12. return {
  13. "content": {
  14. "where": {
  15. "condition": ""
  16. }
  17. },
  18. total: 0,
  19. list: []
  20. }
  21. },
  22. onLoad(options) {
  23. this.getList(true)
  24. uni.setNavigationBarTitle({
  25. title: options.title || '选择用户'
  26. });
  27. },
  28. methods: {
  29. getList(init = false) {
  30. if (this.paging(this.content, init)) return;
  31. this.$Http.basic({
  32. "id": "20240410095602",
  33. content: this.content
  34. }).then(res => {
  35. console.log("选择负责人", res)
  36. this.$refs.List.RefreshToComplete()
  37. if (this.cutoff(res.msg)) return;
  38. this.total = res.total;
  39. this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data), this.colors;
  40. this.content = this.$refs.List.paging(this.content, res)
  41. })
  42. },
  43. onClick(item) {
  44. this.$Http.routeSelected(item)
  45. },
  46. },
  47. }
  48. </script>
  49. <style></style>