institution.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view class="" >
  3. <public-module></public-module>
  4. <u-tabs :list="list" :is-scroll="false" :current="source" @change="change"></u-tabs>
  5. <view class="body" style="background: #F8FAFE;padding:12px">
  6. <view class=" dis a-c j-s">
  7. <u-search v-model="pageRequest.deptName" style ='borderRadius: 0px 0px 0px 0px"' @search="search"
  8. :height='68' bg-color="#fff" :show-action="false"
  9. :input-style="{background:'transparent'}" placeholder-color="#ccc"
  10. :input-align="inputAlign"
  11. :action-style="{background:'#fff'}" placeholder="请输入机构名称"></u-search>
  12. <text style="margin-left:55px" class="button1">共 {{totalSize}}个</text>
  13. </view>
  14. <view class="teamStatistics " >
  15. <view class="statisticsTitle">
  16. <view >机构名称</view>
  17. <view >团队数量</view>
  18. <view >人员数量</view>
  19. <view >保费收入</view>
  20. </view>
  21. <block v-for="(item,index) in directLsit" :key="index">
  22. <view class="" style="padding: 0 10px;">
  23. <view class="statisticsContent " :class="index==teamTabIndex?'active':''">
  24. <view >{{item.deptName}}</view>
  25. <view >{{item.deptNum}}</view>
  26. <view >{{item.deptManNum}}</view>
  27. <view >{{item.sumpremium}}</view>
  28. </view>
  29. </view>
  30. </block>
  31. <u-loadmore style="margin-top: 5px;" v-if="directLsit.length!=0" :status="status" />
  32. <o-empty v-if="directLsit.length==0" />
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default{
  39. data(){
  40. return{
  41. teamTabIndex: 0,
  42. directLsit: [],
  43. inputAlign: 'left',
  44. source:0,
  45. totalPages:0,
  46. totalSize:0,
  47. status: 'loadmore',
  48. pageRequest: { //查询的默认条件
  49. pageNum: 1,
  50. pageSize: 20,
  51. deptName:''
  52. },
  53. list: [{
  54. name: '直接机构'
  55. }, {
  56. name: '间接机构'
  57. }],
  58. }
  59. },
  60. async onLoad(params) {
  61. this.queryData()
  62. },
  63. methods:{
  64. search(e) {
  65. this.pageRequest.deptName=e
  66. this.queryData()
  67. },
  68. change(index) {
  69. this.pageRequest.deptName=''
  70. this.source = index;
  71. this.pageRequest.pageNum = 1;
  72. this.pageRequest.pageSize = 2
  73. 0;
  74. this.queryData()
  75. },
  76. onReachBottom() {
  77. if (this.pageRequest.pageNum >= this.totalPages) return;
  78. this.status = 'loading';
  79. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  80. setTimeout(async () => {
  81. let res = await this.$http.post('/agency/queryTeamUser', {
  82. ...this.pageRequest,
  83. source:this.source
  84. });
  85. if (res.code == '200') {
  86. this.directLsit = [...this.directLsit, ...res.data.content];
  87. this.totalSize = res.data.totalSize;
  88. }
  89. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  90. else this.status = 'loading';
  91. }, 1000)
  92. },
  93. onSelected(e) { //选择
  94. this.showDatePicker = false;
  95. if (e) {
  96. this.dateRange = e.value;
  97. this.queryData();
  98. }
  99. },
  100. async queryData() {
  101. let params = {
  102. source:this.source,
  103. ...this.pageRequest
  104. }
  105. let res = await this.$http.post('/agency/queryWorkroomPage', params);
  106. if (res.code == '200') {
  107. this.directLsit=res.data.content
  108. this.totalPages = res.data.totalPages;
  109. this.totalSize = res.data.totalSize;
  110. if (this.pageRequest.pageNum >= res.data.totalPages) this.status = 'nomore';
  111. else this.status = 'loadmore';
  112. }
  113. },
  114. onShowDatePicker() { //显示
  115. this.showDatePicker = true;
  116. },
  117. }
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .teamStatistics {
  122. width: 100%;
  123. height: auto;
  124. background: #FFFFFF;
  125. box-shadow: 0px 4px 10px 0px #DAE3F4;
  126. border-radius: 6px;
  127. }
  128. .body .teamStatistics .statisticsTitle {
  129. height: 70upx;
  130. margin-top: 10px;
  131. box-sizing: border-box;
  132. line-height: 70upx;
  133. font-size: 24rpx;
  134. border-radius: 6px 6px 0 0;
  135. color: #232832;
  136. }
  137. .body .teamStatistics .statisticsContent {
  138. box-sizing: border-box;
  139. height: 70upx;
  140. text-align: center;
  141. line-height: 70upx;
  142. font-size: 26rpx;
  143. color: #232832;
  144. view{
  145. text-align: center;
  146. line-height: 70upx;
  147. }
  148. }
  149. .body .teamStatistics .statisticsTitle,
  150. .body .teamStatistics .statisticsContent {
  151. display: flex;
  152. flex-wrap: nowrap;
  153. justify-content: space-between;
  154. }
  155. .body .teamStatistics .statisticsTitle>view,
  156. .body .teamStatistics .statisticsContent>view {
  157. width: 25%;
  158. text-align: center;
  159. font-size: 12px;
  160. }
  161. .statisticsDate {
  162. color: rgba(51,51,51,0.8);
  163. height: 34px;
  164. border-radius: 6px;
  165. }
  166. .teamStatistics .statisticsTitle {
  167. height: 70upx;
  168. margin-top: 10px;
  169. box-sizing: border-box;
  170. line-height: 70upx;
  171. font-size: 24rpx;
  172. background: linear-gradient( 180deg, #DAE0EE 0%, #E9ECF4 100%);
  173. border-radius: 6px 6px 0 0;
  174. color: #232832;
  175. view{
  176. text-align: center;
  177. line-height: 35px;
  178. }
  179. view:nth-child(1){
  180. background: #EBEFF8 ;
  181. line-height: 35px;
  182. }
  183. view:nth-child(2){
  184. background: #FEF0E1 ;
  185. color: #EF871C;
  186. }
  187. view:nth-child(3){
  188. background: #E6FAE3;
  189. color: #3AC716;
  190. }
  191. view:nth-child(4){
  192. background: #EEF0FD;
  193. color: #3640F0;
  194. }
  195. }
  196. .button1{
  197. background-color: #FEF0E1 ;
  198. color: #FE8F1C ;
  199. font-size: 11px;
  200. padding:5px 10px
  201. }
  202. </style>