teamList.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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.image" :src="item.image" 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.name}} <span class="tag">{{item.roleName}}</span>
  25. </view>
  26. </view>
  27. <view class="line2">
  28. <view class="value">
  29. {{item.phone}}
  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. <image class="img" src="@/assets/img/team/index0.svg" mode=""></image>
  40. 添加人员
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import * as API from '@/apis/pagejs/pagesTeam.js'
  47. export default {
  48. data() {
  49. return {
  50. list:[],
  51. listForm:{
  52. pageIndex: 1,
  53. pageSize: 20,
  54. recordsTotal: 1,
  55. status:0,
  56. roleName:"XJ,XJADMIN",
  57. roleName:"XJ",
  58. },
  59. testName: "",
  60. queryName: "",
  61. lockId:"",
  62. lockName:"",
  63. current:0,
  64. tabslist:[
  65. {
  66. name: '待处理'
  67. }, {
  68. name: '已处理'
  69. }
  70. ]
  71. };
  72. },
  73. onLoad(op) {
  74. this.getList()
  75. },
  76. onShow(){
  77. },
  78. methods: {
  79. roleNamesShow(str){
  80. var sz=str.split(",")
  81. var rsz=[]
  82. sz.forEach(item=>{
  83. if(item.indexOf('巡检')!=-1){
  84. rsz.push(item)
  85. }
  86. })
  87. return rsz.join(',')
  88. },
  89. submit(){
  90. },
  91. testBtn() {
  92. this.list = []
  93. //this.listForm.pageIndex=1
  94. this.listForm.name= this.testName
  95. this.getList()
  96. },
  97. getList(bl) {
  98. if(bl){
  99. this.listForm.pageIndex = 1
  100. }
  101. uni.showLoading({
  102. title: "加载中",
  103. mask: true,
  104. })
  105. API.teamMembers(this.listForm).then((res) => {
  106. this.queryName = this.testName
  107. var list=[]
  108. this.list = res.data.memberList
  109. console.log(this.list)
  110. uni.hideLoading();
  111. }).catch(error => {
  112. uni.hideLoading();
  113. uni.showToast({
  114. title: error,
  115. icon: "none"
  116. })
  117. })
  118. },
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. .list {
  124. padding: 24rpx 32rpx;
  125. background-color: rgba(255,255,255,1);
  126. .item {
  127. display: flex;
  128. border-bottom: 2rpx solid rgba(232, 232, 232, 1);
  129. padding: 12rpx 0;
  130. margin: 12rpx 0;
  131. .icon{
  132. display: flex;
  133. align-items: center;
  134. margin-right: 8rpx;
  135. }
  136. .img {
  137. width: 72rpx;
  138. height: 72rpx;
  139. }
  140. .body {
  141. margin: 0 12rpx;
  142. width: 100%;
  143. .line1,
  144. .line2 {
  145. display: flex;
  146. justify-content: space-between;
  147. }
  148. .line2 {
  149. color: rgba(119,119,119,1);
  150. font-size: 24rpx;
  151. margin-top: 8rpx;
  152. }
  153. .line1 {
  154. .title {
  155. color: rgba(51, 51, 51, 1);
  156. font-size: 32rpx;
  157. font-weight: bold;
  158. }
  159. .status {
  160. background-color: rgba(255, 61, 0, 1);
  161. font-size: 24rpx;
  162. color:#fff;
  163. padding: 2rpx 8rpx;
  164. //border-radius: 8rpx;
  165. }
  166. .status0 {
  167. background-color: rgba(255, 61, 0, 1);
  168. }
  169. .status1 {
  170. background-color: #007aff;
  171. }
  172. .status2 {
  173. background-color: #ff9900;
  174. }
  175. .status3 {
  176. background-color: #19be6b;
  177. }
  178. .status4 {
  179. border: 2rpx solid rgba(255, 61, 0, 1);
  180. color: rgba(255, 61, 0, 1);
  181. }
  182. }
  183. .errorDesc{
  184. margin: 8rpx 0;
  185. width: 480rpx;
  186. color: #777777;
  187. font-size: 24rpx;
  188. overflow: hidden;
  189. text-overflow: ellipsis;
  190. white-space: nowrap; /* 禁止换行,强制单行 */
  191. }
  192. }
  193. }
  194. .item:last-child {
  195. border-bottom:0px solid rgba(232,232,232,1);
  196. }
  197. }
  198. .top{
  199. border-bottom: 2rpx solid #e8e8e8;
  200. }
  201. .search {
  202. padding: 16rpx 32rpx;
  203. background: #fff;
  204. .searchBox {
  205. display: flex;
  206. align-items: center;
  207. background: #F2F2F2;
  208. padding: 2rpx 16rpx;
  209. border-radius: 16rpx;
  210. justify-content: space-between;
  211. }
  212. }
  213. .floating-button {
  214. z-index: 999;
  215. position: fixed;
  216. bottom: 0;
  217. width: 100%;
  218. display: flex;
  219. height: 120rpx;
  220. justify-content: center;
  221. background-color: rgba(255,255,255,1);
  222. .button{
  223. margin-top: 24rpx;
  224. border-radius: 50px;
  225. height: 80rpx;
  226. width: 80%;
  227. display: flex;
  228. align-items: center;
  229. justify-content: center;
  230. padding:12rpx;
  231. background-color: rgba(22,119,255,1);
  232. color: rgba(255,255,255,1);
  233. font-size: 36rpx;
  234. }
  235. .img{
  236. width: 40rpx;
  237. height: 40rpx;
  238. }
  239. }
  240. .tag{
  241. border-radius: 2pt;
  242. background-color: rgba(22,119,255,1);
  243. color: rgba(255,255,255,1);
  244. font-size: 24rpx;
  245. line-height: 24rpx;
  246. padding:2rpx 8rpx;
  247. margin-left: 8rpx;
  248. }
  249. </style>