teamList.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <template>
  2. <view>
  3. <u-navbar title="团队成员" title-color="#101010" ></u-navbar>
  4. <view class="top">
  5. <view class="search">
  6. <view class="searchBox">
  7. <u-search shape="square" placeholder="搜索授权用户" maxlength="12" v-model="testName" :show-action="false"
  8. :animation="true"></u-search>
  9. <u-button type="primary" size="mini" @click="testBtn">搜素</u-button>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="list" >
  14. <view class="item"
  15. v-for="(item,index) in list"
  16. :key="index">
  17. <view class="icon">
  18. <image class="img" v-if="item.headImg" :src="item.headImg" mode=""></image>
  19. <image class="img" v-else src="@/assets/img/默认头像.png" mode=""></image>
  20. </view>
  21. <view class="body">
  22. <view class="line1">
  23. <view class="title">
  24. {{item.realName}}
  25. </view>
  26. </view>
  27. <view class="line2">
  28. <view class="value">
  29. {{item.userName}}
  30. </view>
  31. </view>
  32. </view>
  33. <u-icon name="arrow-right" size="24" color="#BBBBBB" v-if="0"></u-icon>
  34. </view>
  35. </view>
  36. <u-divider :isnone="list.length==0" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
  37. <view class="floating-button">
  38. <view class="button" @click="gotoUrl('/pages/team/teamAdd')" >
  39. 添加人员
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import * as API from '@/apis/pagejs/pagesTeam.js'
  46. export default {
  47. data() {
  48. return {
  49. list:[],
  50. listForm:{
  51. pageIndex: 1,
  52. pageSize: 20,
  53. recordsTotal: 1,
  54. status:0,
  55. roleName:"XJ,XJADMIN",
  56. roleName:"XJ",
  57. },
  58. testName: "",
  59. queryName: "",
  60. lockId:"",
  61. lockName:"",
  62. current:0,
  63. tabslist:[
  64. {
  65. name: '待处理'
  66. }, {
  67. name: '已处理'
  68. }
  69. ]
  70. };
  71. },
  72. onLoad(op) {
  73. },
  74. onShow(){
  75. this.getList()
  76. },
  77. methods: {
  78. submit(){
  79. },
  80. testBtn() {
  81. this.list = []
  82. //this.listForm.pageIndex=1
  83. this.listForm.name= this.testName
  84. this.getList()
  85. },
  86. getList(bl) {
  87. if(bl){
  88. this.listForm.pageIndex = 1
  89. }
  90. uni.showLoading({
  91. title: "加载中",
  92. mask: true,
  93. })
  94. API.userList(this.listForm).then((res) => {
  95. this.queryName = this.testName
  96. var list=[]
  97. if (this.listForm.pageIndex == 1) {
  98. list = res.data.data;
  99. } else {
  100. list = [
  101. ...list,
  102. ...res.data.data
  103. ];
  104. }
  105. this.list = res.data.data
  106. uni.hideLoading();
  107. }).catch(error => {
  108. uni.hideLoading();
  109. uni.showToast({
  110. title: error,
  111. icon: "none"
  112. })
  113. })
  114. },
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .list {
  120. padding: 24rpx 32rpx;
  121. background-color: rgba(255,255,255,1);
  122. .item {
  123. display: flex;
  124. border-bottom: 1px solid rgba(232, 232, 232, 1);
  125. padding: 12rpx 0;
  126. margin: 12rpx 0;
  127. .img {
  128. width: 72rpx;
  129. height: 72rpx;
  130. }
  131. .body {
  132. margin: 0 12rpx;
  133. width: 100%;
  134. .line1,
  135. .line2 {
  136. display: flex;
  137. justify-content: space-between;
  138. }
  139. .line2 {
  140. color: rgba(119,119,119,1);
  141. font-size: 24rpx;
  142. margin-top: 8rpx;
  143. }
  144. .line1 {
  145. .title {
  146. color: rgba(51, 51, 51, 1);
  147. font-size: 28rpx;
  148. font-weight: bold;
  149. }
  150. .status {
  151. background-color: rgba(255, 61, 0, 1);
  152. font-size: 24rpx;
  153. color:#fff;
  154. padding: 2rpx 8rpx;
  155. //border-radius: 4px;
  156. }
  157. .status0 {
  158. background-color: rgba(255, 61, 0, 1);
  159. }
  160. .status1 {
  161. background-color: #007aff;
  162. }
  163. .status2 {
  164. background-color: #ff9900;
  165. }
  166. .status3 {
  167. background-color: #19be6b;
  168. }
  169. .status4 {
  170. border: 1px solid rgba(255, 61, 0, 1);
  171. color: rgba(255, 61, 0, 1);
  172. }
  173. }
  174. .errorDesc{
  175. margin: 8rpx 0;
  176. width: 480rpx;
  177. color: #777777;
  178. font-size: 24rpx;
  179. overflow: hidden;
  180. text-overflow: ellipsis;
  181. white-space: nowrap; /* 禁止换行,强制单行 */
  182. }
  183. }
  184. }
  185. .item:last-child {
  186. border-bottom:0px solid rgba(232,232,232,1);
  187. }
  188. }
  189. .top{
  190. border-bottom: 1px solid #e8e8e8;
  191. }
  192. .search {
  193. padding: 16rpx 32rpx;
  194. background: #fff;
  195. .searchBox {
  196. display: flex;
  197. align-items: center;
  198. background: #F2F2F2;
  199. padding: 1px 16rpx;
  200. border-radius: 8px;
  201. justify-content: space-between;
  202. }
  203. }
  204. .floating-button {
  205. position: fixed;
  206. bottom: 0; /* 距离底部 20px */
  207. width: 100%;
  208. display: flex;
  209. height: 120rpx;
  210. justify-content: center;
  211. background-color: rgba(255,255,255,1);
  212. .button{
  213. margin-top: 24rpx;
  214. border-radius: 50px;
  215. height: 80rpx;
  216. width: 80%;
  217. display: flex;
  218. align-items: center;
  219. justify-content: center;
  220. padding:12rpx;
  221. background-color: rgba(22,119,255,1);
  222. color: rgba(255,255,255,1);
  223. font-size: 36rpx;
  224. }
  225. }
  226. </style>