index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="dialog adffc" v-if="show">
  3. <view class="dialog-box">
  4. <view class="dialog-box-title">{{title}}</view>
  5. <image class="dialog-box-close" :src="imgBase+'remind_close.png'" @click="close"></image>
  6. <view class="dialog-box-bottom" @click="addUser" v-if="canEdit">添加人员</view>
  7. <view class="dialog-box-list">
  8. <view class="dialog-box-list-item" v-for="(item,index) in list" :key="index">
  9. <view class="dialog-box-list-item-status" :class="{'wzd':item.status===0,'yzd':item.status===1}">{{statusCfg[item.status]}}</view>
  10. <view class="dialog-box-list-item-name adfac">
  11. <text>{{item.realName}}</text>
  12. <view class="type">{{item.categoryName}}</view>
  13. </view>
  14. <view class="dialog-box-list-item-email">{{item.email}}</view>
  15. <image class="dialog-box-list-item-delete" :src="imgBase+'icon_delete.png'" @click="deleteUser(item,index)" v-if="deluser"></image>
  16. </view>
  17. </view>
  18. <view class="zt_btn" style="margin-top: 40rpx;" @click="handleConfirm" v-if="canEdit">确定</view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props:{
  25. canEdit:{
  26. typeof:Boolean,
  27. default:true
  28. },
  29. title:{
  30. typeof:String,
  31. default:'团队人员'
  32. },
  33. show:{
  34. typeof:Boolean,
  35. default:false
  36. },
  37. deluser:{
  38. typeof:Boolean,
  39. default:false
  40. },
  41. list:{
  42. typeof:Array,
  43. default:[]
  44. }
  45. },
  46. data(){
  47. return {
  48. statusCfg:{
  49. 0:'未作答',
  50. 1:'已作答'
  51. }
  52. }
  53. },
  54. methods:{
  55. close(){
  56. this.$emit('close')
  57. },
  58. deleteUser(item,index){
  59. this.$emit('deleteUser',{item,index})
  60. },
  61. addUser(){
  62. this.$emit('addUser')
  63. },
  64. handleConfirm(){
  65. this.$emit('handleConfirm')
  66. },
  67. }
  68. }
  69. </script>
  70. <style scoped lang="scss">
  71. .dialog{
  72. position: fixed;
  73. left: 0;
  74. right: 0;
  75. top: 0;
  76. bottom: 0;
  77. z-index: 1001;
  78. background: rgba(0,0,0,.4);
  79. justify-content: flex-end;
  80. &-box{
  81. width: 100%;
  82. background: #F7F7F7;
  83. border-radius: 24rpx 24rpx 0rpx 0rpx;
  84. padding: 30rpx 24rpx 50rpx;
  85. box-sizing: border-box;
  86. position: relative;
  87. &-title{
  88. font-family: PingFang-SC, PingFang-SC;
  89. font-weight: bold;
  90. font-size: 32rpx;
  91. color: #002846;
  92. line-height: 32rpx;
  93. text-align: center;
  94. }
  95. &-close{
  96. width: 48rpx;
  97. height: 48rpx;
  98. position: absolute;
  99. top: 30rpx;
  100. right: 30rpx;
  101. }
  102. &-bottom{
  103. width: 100%;
  104. height: 88rpx;
  105. background: rgba(25,156,156,0.1);
  106. border-radius: 44rpx;
  107. font-family: PingFang-SC, PingFang-SC;
  108. font-weight: bold;
  109. font-size: 32rpx;
  110. color: #009191;
  111. line-height: 88rpx;
  112. text-align: center;
  113. margin-top: 40rpx;
  114. }
  115. &-list{
  116. height: 900rpx;
  117. margin-top: 40rpx;
  118. overflow-y: auto;
  119. &-item{
  120. background: #FFFFFF;
  121. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
  122. border-radius: 24rpx;
  123. margin-top: 20rpx;
  124. position: relative;
  125. padding: 36rpx 24rpx;
  126. &-status{
  127. padding: 11rpx 16rpx 29rpx 37rpx;
  128. box-sizing: border-box;
  129. position: absolute;
  130. top: 0;
  131. right: 0;
  132. font-family: PingFangSC, PingFang SC;
  133. font-weight: 400;
  134. font-size: 24rpx;
  135. color: #FFFFFF;
  136. line-height: 24rpx;
  137. &.wzd{
  138. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/team_user_wzd.png') no-repeat;
  139. background-size: 100% 100%;
  140. color: #193D59;
  141. }
  142. &.yzd{
  143. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/team_user_yzd.png') no-repeat;
  144. background-size: 100% 100%;
  145. }
  146. }
  147. &-name{
  148. text{
  149. font-family: PingFang-SC, PingFang-SC;
  150. font-weight: bold;
  151. font-size: 30rpx;
  152. color: #002846;
  153. line-height: 32rpx;
  154. }
  155. .type{
  156. margin-left: 20rpx;
  157. background: #FFF7DC;
  158. border-radius: 20rpx;
  159. padding: 5rpx 16rpx;
  160. font-family: PingFangSC, PingFang SC;
  161. font-weight: 400;
  162. font-size: 22rpx;
  163. color: #BA9B31;
  164. line-height: 30rpx;
  165. }
  166. }
  167. &-email{
  168. font-family: PingFangSC, PingFang SC;
  169. font-weight: 400;
  170. font-size: 28rpx;
  171. color: #667E90;
  172. line-height: 28rpx;
  173. margin-top: 24rpx;
  174. }
  175. &-delete{
  176. width: 42rpx;
  177. height: 42rpx;
  178. position: absolute;
  179. right: 24rpx;
  180. top: 70rpx;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. </style>