minimize-botton.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <movable-area class="minimize-botton" v-if="form.caseId">
  3. <movable-view class="drag" :x="x" :y="y" direction="vertical" @change="handleChange">
  4. <!-- <u-icon name="mic" color="#FFFFFF" size="28" ></u-icon> -->
  5. <view class="minimize_wrap" @click="handleClick">
  6. <image src="../../static/caseDetail/icon-call.png" mode="" class="image_icon" v-if="dialing"></image>
  7. <image src="../../static/follow/phone.png" mode="" class="image_icon" v-else></image>
  8. <text class="text">通话跟进</text>
  9. </view>
  10. </movable-view>
  11. </movable-area>
  12. </template>
  13. <script>
  14. import {
  15. mapState,
  16. mapGetters
  17. } from 'vuex'
  18. import qs from 'qs';
  19. export default {
  20. name: 'minimize-botton',
  21. data() {
  22. return {
  23. timer : null
  24. }
  25. },
  26. computed: {
  27. ...mapState({
  28. x: (state) => state.follow.dragOption.x,
  29. y: (state) => state.follow.dragOption.y,
  30. form: (state) => state.follow.form,
  31. params: (state) => state.follow.params,
  32. dialing: (state) => state.app.dialing,
  33. }),
  34. },
  35. mounted() {
  36. },
  37. methods: {
  38. handleClick(){
  39. this.handleAllocation(this.params);
  40. },
  41. handleChange({detail}) {
  42. const { y } = detail;
  43. clearTimeout(this.timer);
  44. this.timer = setTimeout(() => {
  45. this.$store.commit("follow/SET_DRAGOPTION_Y", y);
  46. clearTimeout(this.timer);
  47. }, 200);
  48. },
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. .minimize_wrap{
  54. width: 120rpx;
  55. height: 120rpx;
  56. background: #108cff;
  57. border-radius: 24rpx;
  58. box-shadow: 0px 0px 12px 0px rgba(0,95,203,0.70);
  59. display: flex;
  60. flex-direction: column;
  61. justify-content: center;
  62. align-items: center;
  63. margin-right: 20rpx;
  64. .image_icon{
  65. width: 44rpx;
  66. height: 44rpx;
  67. margin-bottom: 10rpx;
  68. }
  69. .text{
  70. font-size: 22rpx;
  71. color: #fff;
  72. }
  73. }
  74. .minimize-botton {
  75. width: 750rpx;
  76. height: 82vh;
  77. position: fixed;
  78. right: 0;
  79. top: 100rpx;
  80. pointer-events: none;
  81. z-index: 2001;
  82. }
  83. .drag {
  84. display: flex;
  85. align-items: center;
  86. justify-content: flex-end;
  87. width: 140rpx;
  88. height: 130rpx;
  89. // width: 90rpx;
  90. // height: 80rpx;
  91. // background: rgba(63, 163, 255, 0.8);
  92. background: transparent;
  93. border-radius: 40px 0px 0px 40px;
  94. pointer-events: auto;
  95. }
  96. </style>