my_department.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view>
  3. <view class="content">
  4. <view class="title">
  5. <view class="icon">
  6. <image src="./icon/title_icon.png" mode=""></image>
  7. </view>
  8. <view class="text">{{section_fullname}}</view>
  9. </view>
  10. <view class="list">
  11. <view class="item" v-for="(item,index) in list" :key="index" @click="go_user_info(item.staff_num)">
  12. <view class="left">
  13. <view class="icon">{{item.name.charAt(0)}}</view>
  14. <view class="text">{{item.name}} {{item.section_fullname}} {{item.position_name}}</view>
  15. </view>
  16. <view class="right" @click.stop="phone(item.mobile)">
  17. <uni-icons type="phone"></uni-icons>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. search_text: "",
  29. // 部门名称
  30. section_fullname:"",
  31. // 人员列表
  32. list: [
  33. ],
  34. };
  35. },
  36. onLoad() {
  37. this.get_info()
  38. },
  39. methods: {
  40. get_info() {
  41. this.$api.user_getUinfo({
  42. staff_num : uni.getStorageSync('user').staff_num
  43. }).then((res)=>{
  44. console.log(res.data.data)
  45. this.section_fullname = res.data.data.section_fullname
  46. // 获取当前部门人员
  47. uni.showLoading({
  48. mask:true
  49. })
  50. this.$api.user_list({
  51. id:res.data.data.section_id
  52. }).then((res)=>{
  53. uni.hideLoading()
  54. console.log(res)
  55. this.list = res.data.data
  56. })
  57. })
  58. },
  59. go_user_info(staff_num){
  60. uni.navigateTo({
  61. url:"../personal_information/personal_information?staff_num=" + staff_num
  62. })
  63. },
  64. phone(mobile){
  65. if(mobile != null){
  66. uni.makePhoneCall({
  67. phoneNumber: mobile
  68. });
  69. }
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss">
  75. page {
  76. background-color: #F3F8F7;
  77. }
  78. .search {
  79. margin-bottom: 20rpx;
  80. background-color: #FFFFFF;
  81. box-sizing: border-box;
  82. padding: 25rpx 30rpx;
  83. .box {
  84. height: 80rpx;
  85. background-color: #F4F4F4;
  86. border-radius: 50rpx;
  87. display: flex;
  88. align-items: center;
  89. box-sizing: border-box;
  90. padding: 0 25rpx;
  91. .icon {
  92. margin-right: 10rpx;
  93. }
  94. .text {
  95. font-size: 30rpx;
  96. color: #BBBBBB;
  97. }
  98. }
  99. }
  100. .content {
  101. background-color: #FFFFFF;
  102. .title {
  103. height: 110rpx;
  104. display: flex;
  105. align-items: center;
  106. box-sizing: border-box;
  107. padding: 0 36rpx;
  108. border-bottom: 1rpx solid #F3F8F7;
  109. .icon {
  110. image {
  111. width: 48rpx;
  112. height: 36rpx;
  113. }
  114. }
  115. .text {
  116. margin-left: 20rpx;
  117. font-size: 36rpx;
  118. font-weight: 700;
  119. }
  120. }
  121. .list {
  122. .item {
  123. height: 110rpx;
  124. display: flex;
  125. justify-content: space-between;
  126. align-items: center;
  127. margin-left: 108rpx;
  128. border-bottom: 1rpx solid #F3F8F7;
  129. .left{
  130. width: 500rpx;
  131. display: flex;
  132. align-items: center;
  133. .icon {
  134. width: 35rpx;
  135. text-align: center;
  136. height: 35rpx;
  137. line-height: 35rpx;
  138. border-radius: 50%;
  139. border: 1rpx solid #00A1E9;
  140. font-size: 24rpx;
  141. color: #00A1E9;
  142. }
  143. .text {
  144. width: 450rpx;
  145. margin-left: 18rpx;
  146. font-size: 30rpx;
  147. }
  148. }
  149. .right{
  150. width: 90rpx;
  151. text-align: center;
  152. }
  153. }
  154. }
  155. }
  156. </style>