users.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="">
  3. <view class="search-box">
  4. <My_search background="#fff" @onSearch="onSearch" />
  5. </view>
  6. <view class="head">
  7. <text>
  8. 人员
  9. </text>
  10. <text>
  11. 共{{ total }}个
  12. </text>
  13. </view>
  14. <My_listbox ref="List" @getlist="getList" bottomHeight="70">
  15. <user-list :list="list" @onClick="onClick" />
  16. </My_listbox>
  17. <view class="footer">
  18. <navigator class="insert" url="">
  19. 新增人员
  20. </navigator>
  21. <navigator class="invite" url="/team/team/InviteUser">
  22. 邀请人员
  23. </navigator>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import userList from "../../userCenter/modules/userList.vue"
  29. export default {
  30. components: { userList },
  31. data() {
  32. return {
  33. "content": {
  34. "where": {
  35. "condition": ""
  36. }
  37. },
  38. total: 0,
  39. list: []
  40. }
  41. },
  42. created() {
  43. this.init()
  44. },
  45. methods: {
  46. init() {
  47. this.getList(true)
  48. },
  49. getList(init = false) {
  50. if (this.paging(this.content, init)) return;
  51. this.$Http.basic({
  52. "id": "20240410161802",
  53. content: this.content
  54. }).then(res => {
  55. console.log("人员列表", res)
  56. this.$refs.List.RefreshToComplete()
  57. if (this.cutoff(res.msg)) return;
  58. /* res.data = res.data.map(v => {
  59. v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "sa_fad") || v.attinfos[0]) : uni.getStorageSync("site").logo || ''
  60. return v
  61. }) */
  62. this.total = res.total;
  63. this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data), this.colors;
  64. this.content = this.$refs.List.paging(this.content, res)
  65. })
  66. },
  67. onClick(item) {
  68. uni.navigateTo({
  69. url: '/team/userCenter/personal?id=' + item.sys_enterprise_hrid
  70. });
  71. },
  72. onSearch(condition) {
  73. this.content.where.condition = condition;
  74. this.getList(true)
  75. }
  76. },
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .search-box {
  81. margin-top: 10px;
  82. padding: 0 10px;
  83. box-sizing: border-box;
  84. }
  85. .head {
  86. display: flex;
  87. align-items: center;
  88. justify-content: space-between;
  89. height: 37px;
  90. padding: 0 10px;
  91. box-sizing: border-box;
  92. font-family: Source Han Sans SC, Source Han Sans SC;
  93. font-size: 12px;
  94. color: #666666;
  95. }
  96. .footer {
  97. position: fixed;
  98. bottom: 0;
  99. display: flex;
  100. justify-content: space-between;
  101. width: 100vw;
  102. height: 65px;
  103. background: #FFFFFF;
  104. box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
  105. padding: 5px 10px;
  106. box-sizing: border-box;
  107. .insert {
  108. display: flex;
  109. align-items: center;
  110. justify-content: center;
  111. width: 168px;
  112. height: 45px;
  113. background: #FFFFFF;
  114. border-radius: 5px;
  115. border: 1px solid #999999;
  116. font-family: PingFang SC, PingFang SC;
  117. font-size: 16px;
  118. color: #666666;
  119. box-sizing: border-box;
  120. }
  121. .invite {
  122. display: flex;
  123. align-items: center;
  124. justify-content: center;
  125. width: 177px;
  126. height: 45px;
  127. background: #C30D23;
  128. border-radius: 5px;
  129. font-family: PingFang SC, PingFang SC;
  130. font-weight: 500;
  131. font-size: 16px;
  132. color: #FFFFFF;
  133. }
  134. }
  135. </style>