index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <view class="content">
  3. <view class="gq-list">
  4. <view class="gq-item" v-for="item in list" @click="gotoDetail(item)">
  5. <view class="gq-logo">
  6. <image :src="item.avatar || '../../../static/images/avt.png'" mode="" class=""></image>
  7. </view>
  8. <view class="store-name ellipsis">
  9. {{type == 5?item.name:item.name }}
  10. </view>
  11. <!-- 员工 -->
  12. <template v-if="type == 5">
  13. <view class="info">
  14. <view class="info-tit">
  15. 职务:
  16. </view>
  17. <view class="info-val">
  18. {{item.position||'暂无'}}
  19. </view>
  20. </view>
  21. <view class="info">
  22. <view class="info-tit">
  23. 工号:
  24. </view>
  25. <view class="info-val">
  26. {{item.userid}}
  27. </view>
  28. </view>
  29. </template>
  30. <!-- 高管 -->
  31. <template v-if="type == 4">
  32. <view class="info">
  33. <view class="info-tit">
  34. 职务:
  35. </view>
  36. <view class="info-val">
  37. {{item.duties}}
  38. </view>
  39. </view>
  40. <view class="info">
  41. <view class="info-tit">
  42. 工号:
  43. </view>
  44. <view class="info-val">
  45. {{item.job_no}}
  46. </view>
  47. </view>
  48. <view class="info">
  49. <view class="info-tit">
  50. 业务:
  51. </view>
  52. <view class="info-val">
  53. {{item.business}}
  54. </view>
  55. </view>
  56. </template>
  57. <template v-if="type == 3">
  58. <view class="info">
  59. <view class="info-tit">
  60. 职务:
  61. </view>
  62. <view class="info-val">
  63. {{item.duties}}
  64. </view>
  65. </view>
  66. <view class="info">
  67. <view class="info-tit">
  68. 联系:
  69. </view>
  70. <view class="info-val">
  71. {{item.phone}}
  72. </view>
  73. </view>
  74. <view class="info">
  75. <view class="info-tit">
  76. 地址:
  77. </view>
  78. <view class="info-val clamp">
  79. {{item.address}}
  80. </view>
  81. </view>
  82. </template>
  83. <!-- <view class="info">
  84. <view class="info-tit">
  85. 业务:
  86. </view>
  87. <view class="info-val">
  88. 创始人
  89. </view>
  90. </view> -->
  91. </view>
  92. </view>
  93. <view v-if="list.length == 0 && loadingType=='nomore'">
  94. <emptyPage title="暂无订单信息~"></emptyPage>
  95. </view>
  96. </view>
  97. </template>
  98. <script>
  99. import { getMen} from "@/api/store.js"
  100. import emptyPage from '@/components/emptyPage.vue';
  101. export default {
  102. components: {
  103. emptyPage
  104. },
  105. data() {
  106. return {
  107. type: '',
  108. list: [],
  109. loadingType: 'loadmore',
  110. page: 1,
  111. limit: 12,
  112. typename: ''
  113. }
  114. },
  115. onLoad(opt) {
  116. if (opt.type) {
  117. this.type = opt.type
  118. if (this.type == 1) {
  119. uni.setNavigationBarTitle({
  120. title: '高管'
  121. })
  122. this.typename = 'getOtherList'
  123. } else if (this.type == 3) {
  124. uni.setNavigationBarTitle({
  125. title: '共享股东商家'
  126. })
  127. this.typename = 'getOtherList'
  128. } else if (this.type == 4) {
  129. uni.setNavigationBarTitle({
  130. title: '高管'
  131. })
  132. this.typename = 'getOtherList'
  133. }else if (this.type == 5) {
  134. uni.setNavigationBarTitle({
  135. title: '员工'
  136. })
  137. this.typename = 'getMen'
  138. }
  139. this.getList()
  140. }
  141. },
  142. onShow() {
  143. },
  144. onReachBottom() {
  145. this.getList()
  146. },
  147. onReady() {
  148. },
  149. methods: {
  150. navto(url) {
  151. uni.navigateTo({
  152. url
  153. })
  154. },
  155. gotoDetail(item) {
  156. // 员工详情
  157. if (this.type == 5) {
  158. this.navto('/pagesT/unit/ygdetail?id=' + item.id)
  159. }
  160. },
  161. getList() {
  162. let that = this;
  163. let getList;
  164. if (that.loadingType == 'nomore' || that.loadingType == 'loading') {
  165. return
  166. }
  167. that.loadingType = 'loading'
  168. if(that.type== 5) {
  169. getList = getMen
  170. }
  171. getList({
  172. page: that.page,
  173. limit: that.limit,
  174. }).then(res => {
  175. that.list = that.list.concat(res.data.list)
  176. that.page++
  177. if (res.data.list.length == that.limit) {
  178. that.loadingType = 'loadmore'
  179. } else {
  180. that.loadingType = 'nomore'
  181. }
  182. })
  183. }
  184. }
  185. }
  186. </script>
  187. <style lang="scss">
  188. .gq-list {
  189. display: flex;
  190. flex-wrap: wrap;
  191. justify-content: flex-start;
  192. // justify-content: space-between;
  193. padding: 20rpx 0 20rpx 20rpx;
  194. }
  195. .gq-item {
  196. margin: 0 0 20rpx 14rpx;
  197. width: 227rpx;
  198. min-height: 351rpx;
  199. background: #FFFFFF;
  200. box-shadow: 0px 5rpx 5rpx 0px rgba(35, 24, 21, 0.06);
  201. border-radius: 10rpx;
  202. display: flex;
  203. flex-direction: column;
  204. align-items: center;
  205. justify-content: space-between;
  206. padding: 30rpx 14rpx 20rpx;
  207. .gq-logo {
  208. width: 140rpx;
  209. height: 140rpx;
  210. border-radius: 50%;
  211. border: 1px solid #262261;
  212. display: flex;
  213. justify-content: center;
  214. align-items: center;
  215. image {
  216. width: 135rpx;
  217. height: 135rpx;
  218. background-color: #eee;
  219. border-radius: 50%;
  220. }
  221. }
  222. .store-name {
  223. padding-top: 10rpx;
  224. text-align: center;
  225. width: 100%;
  226. font-size: 26rpx;
  227. font-weight: 500;
  228. color: #262261;
  229. overflow: hidden;
  230. }
  231. .info {
  232. width: 100%;
  233. display: flex;
  234. padding: 5rpx 0;
  235. .info-tit {
  236. font-size: 18rpx;
  237. flex-shrink: 0;
  238. }
  239. .info-val {
  240. text-align: center;
  241. font-size: 20rpx;
  242. width: 140rpx;
  243. min-width: 140rpx;
  244. border-bottom: 1px #C7C7C7 solid;
  245. white-space: nowrap;
  246. overflow: hidden;
  247. text-overflow: ellipsis;
  248. }
  249. }
  250. }
  251. </style>