cm-club-drawer.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <template>
  2. <view class="drawer-content">
  3. <!--右抽屉-->
  4. <tui-drawer mode="right" :visible="rightDrawer" @close="closeDrawer">
  5. <view
  6. class="drawer-container clearfix"
  7. scroll-y
  8. :style="{ paddingTop: (CustomBar-StatusBar+8) +'px', paddingBottom: isIphoneX ? '180rpx' : '146rpx' }"
  9. >
  10. <scroll-view class="tui-drawer-scroll" scroll-y :style="{ height: drawerH + 'px' }">
  11. <view class="drawer-title">更多筛选</view>
  12. <view class="drawer-main">
  13. <view class="drawer-main-name">组员:</view>
  14. <view class="drawer-main-radiov">
  15. <view class="drawer-main-radio">
  16. <picker @change="bindPickerChange(1,$event)" :value="index" :range="priceActions" range-key="name">
  17. <input class="input" type="text" disabled="false" v-model="priceFlagText" value="" placeholder="请选择"/>
  18. <text class="iconfont icon-xiangyou"></text>
  19. </picker>
  20. </view>
  21. </view>
  22. </view>
  23. </scroll-view>
  24. <view class="drawer-input btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
  25. <view class="drawer-btn clear" @click="closeDrawer">取消</view>
  26. <view class="drawer-btn comfrim" @click="handSearchConfirm">确定</view>
  27. </view>
  28. </view>
  29. </tui-drawer>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. name: 'rightDrawer',
  35. props: {
  36. rightDrawer: {
  37. type: Boolean,
  38. default: false
  39. }
  40. },
  41. data() {
  42. return {
  43. CustomBar: this.CustomBar, // 顶部导航栏高度
  44. StatusBar: this.StatusBar,
  45. isIphoneX: this.$store.state.isIphoneX,
  46. manager:0,
  47. leaderId:0,
  48. height: 0,
  49. drawerH: 0 ,// 抽屉内部scrollview高度
  50. categorys:[],
  51. checkedCategorysList:[],
  52. priceFlagText:'',
  53. queryData:{
  54. endAddTime:'',
  55. consult:'',
  56. leaderId:0,
  57. groupId:0,
  58. newDeal:0,
  59. status:0,
  60. pinceSensitve:0,//价格敏感度
  61. satisfied:0,// 意向程度
  62. followup:0,// 跟进状态
  63. },
  64. priceActions:[
  65. {name:'全部',value:0},
  66. {name:'敏感',value:1},
  67. {name: '适中',value:2},
  68. {name: '不敏感',value:3},
  69. {name: '不明确',value:4}
  70. ],
  71. }
  72. },
  73. created() {
  74. this.SetScrollHeight()
  75. this.getUserClubConsults()
  76. },
  77. computed: {},
  78. methods: {
  79. async getUserClubConsults() {
  80. const userInfo = await this.$api.getStorage()
  81. this.manager = userInfo.manager ? userInfo.manager : 0
  82. this.leaderId = userInfo.leaderId ? userInfo.leaderId : 0
  83. //查询咨询类别
  84. this.UserService.getUserClubConsults()
  85. .then(response => {
  86. this.categorys = response.data.map((el, index) => {
  87. el.isChecked = false
  88. return el
  89. })
  90. if(this.manager > 0){
  91. this.getUserClubTeams()
  92. }
  93. if(this.leaderId > 0){
  94. this.getUserClubTeamsRroups(this.leaderId)
  95. }
  96. })
  97. .catch(error => {
  98. console.log('=========>获取咨询类别列表失败')
  99. })
  100. },
  101. bindPickerChange(type,e) {//选择筛选条件
  102. switch(type){
  103. case 1:
  104. this.priceFlagText = this.priceActions[e.target.value].name
  105. this.queryData.pinceSensitve = this.priceActions[e.target.value].value
  106. break
  107. }
  108. },
  109. closeDrawer(){
  110. this.$parent.rightDrawer = false
  111. },
  112. handSearchConfirm(){
  113. //确定筛选
  114. this.$emit('handSearchConfirm', this.queryData)
  115. this.$parent.rightDrawer = false
  116. },
  117. SetScrollHeight() {
  118. let obj = {}
  119. const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
  120. uni.getSystemInfo({
  121. success: res => {
  122. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  123. this.drawerH = res.windowHeight - uni.upx2px(180) - this.height
  124. }
  125. })
  126. this.windowHeight = windowHeight - 1
  127. this.scrollHeight = windowHeight - 1
  128. }
  129. }
  130. }
  131. </script>
  132. <style lang="scss">
  133. /*screen*/
  134. .drawer-container {
  135. width: 580rpx;
  136. height: 100%;
  137. padding: 80rpx 0;
  138. overflow: hidden;
  139. box-sizing: border-box;
  140. background-color: #FFFFFF;
  141. .drawer-title {
  142. width: 100%;
  143. height: 72rpx;
  144. line-height: 72rpx;
  145. box-sizing: border-box;
  146. padding: 0 30rpx;
  147. float: left;
  148. background-color: #f7f7f7;
  149. font-size: $font-size-26;
  150. color: #333333;
  151. font-weight: bold;
  152. text-align: left;
  153. }
  154. .drawer-main {
  155. width: 100%;
  156. height: auto;
  157. box-sizing: border-box;
  158. float: left;
  159. .drawer-main-name{
  160. width: 100%;
  161. height: 80rpx;
  162. line-height: 80rpx;
  163. text-align: left;
  164. font-size: $font-size-26;
  165. color: #333333;
  166. box-sizing: border-box;
  167. padding: 0 20rpx;
  168. font-weight: bold;
  169. }
  170. .drawer-main-radiov{
  171. width: 100%;
  172. height: auto;
  173. box-sizing: border-box;
  174. padding: 0 20rpx;
  175. .drawer-main-radio{
  176. width: 100%;
  177. height: 80rpx;
  178. box-sizing: border-box;
  179. padding: 0 10rpx;
  180. border: 1px solid rgba(0,0,0,0.2);
  181. border-radius: 6rpx;
  182. margin-bottom: 30rpx;
  183. position: relative;
  184. &.btn{
  185. border: none;
  186. margin-top: 40rpx;
  187. }
  188. .input{
  189. width: 100%;
  190. height: 80rpx;
  191. line-height: 80rpx;
  192. float: left;
  193. box-sizing: border-box;
  194. font-size: $font-size-24;
  195. color: #333333;
  196. padding: 0 10rpx;
  197. padding-right: 68rpx;
  198. }
  199. .iconfont{
  200. width: 50rpx;
  201. height: 80rpx;
  202. display: block;
  203. line-height: 80rpx;
  204. text-align: center;
  205. font-size: 30rpx;
  206. color: #999999;
  207. position: absolute;
  208. right: 0;
  209. top: 0;
  210. }
  211. }
  212. }
  213. }
  214. .drawer-input {
  215. width: 100%;
  216. float: left;
  217. box-sizing: border-box;
  218. padding: 24rpx 10rpx 0 10rpx;
  219. border: 1px solid rgba(0, 0, 0, 0.2);
  220. border-radius: 4rpx;
  221. position: relative;
  222. background-color: #ffffff;
  223. &.btn {
  224. border: none;
  225. display: flex;
  226. position: fixed;
  227. left: 0;
  228. bottom: 0;
  229. }
  230. .drawer-btn {
  231. width: 210rpx;
  232. height: 84rpx;
  233. border-radius: 42rpx;
  234. background: $btn-confirm;
  235. line-height: 84rpx;
  236. text-align: center;
  237. font-size: $font-size-26;
  238. color: #ffffff;
  239. flex: 1;
  240. margin: 0 10rpx;
  241. &.comfrim {
  242. background: $btn-confirm;
  243. }
  244. &.clear {
  245. background: #FFE6DC;
  246. color: $color-system;
  247. }
  248. }
  249. }
  250. }
  251. </style>