耀实惠小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
3.1 KiB

  1. <template>
  2. <view class="item">
  3. <view class="info" @click="selectUser">
  4. <view class="" @click="selectUser">
  5. <u-checkbox-group>
  6. <u-checkbox shape="circle" v-model="DrugInfo.check" @change="changechecked" active-color="#01AEEA"></u-checkbox>
  7. </u-checkbox-group>
  8. </view>
  9. <view class="box">
  10. <view class="name_box">
  11. <text class="name">{{DrugInfo.name}}</text>
  12. <text class="name_btn">{{DrugInfo.labelValue}}</text>
  13. </view>
  14. <view class="other_info">
  15. <text>{{DrugInfo.sex ==1? '男': '女'}}</text>
  16. <!-- <text>{{DrugInfo.age || 18}}</text> -->
  17. <text>{{DrugInfo.phone.substr(0,3)+'****' +DrugInfo.phone.substr(7)}}</text>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="btn">
  22. <template v-if="type == 1">
  23. <view class="circular flex align-center justify-center m-r-30" @click="edit">
  24. <image :src="IMG_URL + 'drug_user/edit.png'" mode=""></image>
  25. <!-- <u-icon name="edit-pen" color="#707070" size="46"></u-icon> -->
  26. </view>
  27. <view class="circular flex align-center justify-center" @click="deleteById">
  28. <image :src="IMG_URL + 'drug_user/close.png'" mode=""></image>
  29. <!-- <u-icon name="trash" color="#707070" size="46"></u-icon> -->
  30. </view>
  31. </template>
  32. <u-icon name="arrow-right" v-else></u-icon>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import { IMG_URL } from '@/env.js'
  39. export default {
  40. props: {
  41. DrugInfo: {
  42. type: Object,
  43. default(){
  44. return {}
  45. }
  46. },
  47. type: {
  48. type: String | Number,
  49. default: 1
  50. }
  51. },
  52. data () {
  53. return {
  54. checked: false,
  55. IMG_URL
  56. }
  57. },
  58. methods:{
  59. changechecked() {
  60. this.$emit('changechecked',this.DrugInfo.id);
  61. },
  62. selectUser() {
  63. this.$emit('selectUser',this.DrugInfo.id);
  64. },
  65. edit(){
  66. this.$emit('edit',this.DrugInfo.id);
  67. },
  68. deleteById() {
  69. this.$emit('deleteById',this.DrugInfo.id);
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .item {
  76. width: 680rpx;
  77. margin: 0 auto;
  78. display: flex;
  79. justify-content: space-between;
  80. align-items: center;
  81. border-bottom: 1px solid #DCDCDC;
  82. &:last-child {
  83. border-bottom: none;
  84. }
  85. .info {
  86. margin-left: 24rpx;
  87. display: flex;
  88. align-items: center;
  89. .box {
  90. margin-top: 20rpx;
  91. margin-left: 24rpx;
  92. display: flex;
  93. flex-direction: column;
  94. .name_box {
  95. font-size: 32rpx;
  96. color: #000;
  97. margin-top: 37rpx;
  98. margin-bottom: 17rpx;
  99. display: flex;
  100. .name{
  101. font-size: 32rpx;
  102. font-weight: bold;
  103. }
  104. .name_btn {
  105. margin-left: 10rpx;
  106. font-size: 24rpx;
  107. color: #0C85FF;
  108. border-radius: 10rpx;
  109. border: 1px solid #0C85FF;
  110. padding: 5rpx 10rpx;
  111. display: flex;
  112. justify-content: center;
  113. align-items: center;
  114. }
  115. }
  116. .other_info {
  117. display: flex;
  118. font-size: 26rpx;
  119. padding-bottom: 23rpx;
  120. color: #000;
  121. text {
  122. margin-right: 38rpx;
  123. }
  124. }
  125. }
  126. }
  127. .btn{
  128. display: flex;
  129. margin-top: 40rpx;
  130. image{
  131. width: 62rpx;
  132. height: 62rpx;
  133. margin-left: 38rpx;
  134. border-radius: 50%;
  135. }
  136. }
  137. }
  138. </style>