teames.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <div style="background-color: #FFFFFF;">
  3. <!-- <div class="top" @click="ret()">
  4. <div style="width: 10%;height: 5px;"></div>
  5. <div style="margin-left: 10px;">
  6. <span style="float: left;width: 20px;height: 20px;">
  7. <image src="../../static/icon/fanhui3.png" style="width: 18px;height: 18px;"></image>
  8. </span>
  9. <div style="margin-top: 5px;">
  10. <span style="color: #FFFFFF;">返回</span>
  11. </div>
  12. </div>
  13. <div style="text-align: center;margin-top: -22px;">
  14. <span style="color: #FFFFFF;">团队信息</span>
  15. </div>
  16. </div> -->
  17. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  18. <block slot="backText">返回</block>
  19. <block slot="content">团队信息</block>
  20. </cu-custom>
  21. <div class="ins">
  22. <div style="height: 3px;"></div>
  23. <input :placeholder='ico' style="text-align: center;" v-model="name" />
  24. </div>
  25. <br>
  26. <div style="height: 10px;width: 100%;background-color: #F1F1F1 ;"></div>
  27. <div style="background-color: #FFFFFF;">
  28. <div style="margin-left: 10px;">
  29. <ul>
  30. <li class="s" v-for='(item,index) in data' @click="jump(item.id)">
  31. <br>
  32. <span class="imgs">
  33. <image :src="item.avatar" class="imgs"></image>
  34. </span>
  35. <div style="margin-left: 50px;margin-top: -40px;">
  36. <div>
  37. <h3>{{item.realname}}</h3>
  38. </div>
  39. <div style="margin-top: -27px;margin-left: 80px;">
  40. <span style="margin-left: 50px;color: #A3A7B1;font-size: 15px;" >{{item.post}}</span>
  41. </div>
  42. </div>
  43. <br>
  44. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  45. </li>
  46. </ul>
  47. </div>
  48. </div>
  49. <br>
  50. <div style="color:#A3A7B1;font-size: 15px;margin-left: 47%;">
  51. <span>共</span>
  52. <span style="margin-left: 10px;">{{data.length}}</span>
  53. <span style="margin-left: 10px;">人</span>
  54. </div>
  55. </div>
  56. </template>
  57. <script>
  58. import api from '@/api/api'
  59. export default {
  60. data() {
  61. return {
  62. data:[],
  63. name:'',
  64. userUrl:'/sys/user/queryTeamUser',
  65. ico:'🔍 搜索'
  66. }
  67. },
  68. watch:{
  69. name:{
  70. handler(newVal, objVal) {
  71. this.queryUserName(newVal);
  72. },
  73. }
  74. },
  75. created(){
  76. this.queryUserName()
  77. },
  78. methods:{
  79. jump(item){
  80. this.$store.commit('SET_TEMUSERID',item);
  81. this.$Router.push({name:'teamuser'})
  82. },
  83. queryUserName(name){
  84. this.data=[];
  85. this.$http.get(this.userUrl,{params:{userId:this.$store.getters.teamUserId,name:name}}).then(res=>{
  86. /* this.data=res.data; */
  87. if(res.data.length>0){
  88. for(var i=0;i<res.data.length;i++){
  89. var s={
  90. id:res.data[i].id,
  91. realname:res.data[i].realname,
  92. post:res.data[i].post,
  93. avatar:(res.data[i].avatar && res.data[i].avatar.length > 0)? api.getFileAccessHttpUrl(res.data[i].avatar):'/static/avatar_boy.png'
  94. }
  95. this.data.push(s)
  96. }
  97. }
  98. console.log(this.data)
  99. }).catch(err => {
  100. console.log(err);
  101. });
  102. },
  103. ret(){
  104. this.$Router.push({name:'teams'})
  105. }
  106. },
  107. }
  108. </script>
  109. <style>
  110. .ins{
  111. background-color: #F1F1F1;
  112. width: 90%;
  113. height: 30px;
  114. margin:0 auto;
  115. border-radius:5px 5px 5px 5px;
  116. margin-top: 15px;
  117. }
  118. .s{
  119. list-style-type:none;
  120. margin-left: -40px;
  121. }
  122. .imgs{
  123. width: 40px;
  124. height: 40px;
  125. border-radius:5px 5px 5px 5px;
  126. }
  127. .top{
  128. background-color: #5677AC;
  129. width: 100%;
  130. height: 40px;
  131. }
  132. </style>