index.vue 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <transition name="msgbox-fade">
  3. <div class="pub-wrapper" v-if="visible" @click.stop>
  4. <div class="pub-mask" @click="visible = false"></div>
  5. <div class="pub-modal invite-modal"
  6. v-loading="isLoading"
  7. :element-loading-text="$t('public.loading')"
  8. element-loading-spinner="el-icon-loading"
  9. element-loading-background="rgba(0, 0, 0, 0.2)">
  10. <div class="modal-hd">
  11. <!-- <div class="title">
  12. <i class="el-icon-close" @click="visible = false"></i>
  13. </div>-->
  14. <i class="el-icon-close" @click="visible = false"></i>
  15. </div>
  16. <div class="modal-bd clearfix">
  17. <div class="left">
  18. <div class="search-input">
  19. <input type="text" @input="searchUser($event, checkList)" :placeholder="$t('invite.searchContact')">
  20. <i class="el-icon-search"></i>
  21. </div>
  22. <div class="user-list select-list pub-scroll-box">
  23. <template v-if="showNum>0 && !isSearchGroup">
  24. <div
  25. v-for="(item, key) in checkList"
  26. :key="key"
  27. >
  28. <div class="user-item" :class="{'checked': item.isChecked}" @click="changeState(item.user_id)" v-show="item.isShow">
  29. <img v-if="item.cover_photo" class="user-avatar" :src="item.cover_photo" alt>
  30. <div
  31. v-else
  32. class="user-avatar"
  33. :class="`avatar_bg${item.user_id % 9}`"
  34. :data-name="item.nick_name.slice(0,2).toUpperCase()"
  35. ></div>
  36. <span class="name">{{item.nick_name}}</span>
  37. <i v-if="item.isChoosed" class="el-icon-circle-check is-choosed"></i>
  38. <div v-else-if="item.is_admin!=2">
  39. <i v-if="item.isChecked" class="el-icon-circle-check"></i>
  40. <i v-else class="el-icon-circle-uncheck"></i>
  41. </div>
  42. </div>
  43. </div>
  44. </template>
  45. <div class="no-data" v-else>{{$t('invite.noContact')}}</div>
  46. </div>
  47. </div>
  48. <div class="right">
  49. <p class="tips" v-if="this.popInviteType==5">{{$t('invite.transferGroupOwner')}}</p>
  50. <p class="tips" v-else-if="this.checkedNum">{{$t('invite.seleted')}}{{checkedNum}}{{$t('invite.numberMember')}}</p>
  51. <p class="tips" v-else-if="this.popInviteType==3">{{$t('invite.checkDeleteMemberTips')}}</p>
  52. <p class="tips" v-else>{{$t('invite.checkAddMemberTips')}}{{this.popInviteType==4?$t('public.admin'):$t('public.contact')}}</p>
  53. <div class="group-name" v-if="this.popInviteType==1">
  54. <input v-focus v-model="groupName" type="text" :placeholder="$t('invite.writeGroupName')">
  55. </div>
  56. <div class="user-list pub-scroll-box">
  57. <template v-for="(item, key) in checkList">
  58. <div class="user-item" :key="key" v-if="item.isChecked">
  59. <img v-if="item.cover_photo" class="user-avatar" :src="item.cover_photo" alt>
  60. <div
  61. v-else
  62. class="user-avatar"
  63. :class="`avatar_bg${item.user_id % 9}`"
  64. :data-name="item.nick_name.slice(0,2).toUpperCase()"
  65. ></div>
  66. <span class="name">{{item.nick_name}}</span>
  67. <i @click="changeState(item.user_id, false)" class="el-icon-circle-close"></i>
  68. </div>
  69. </template>
  70. </div>
  71. <div class="send-btn">
  72. <el-button @click="optSubmit" type="primary" :disabled="this.popInviteType!=1 && checkedNum<=0">{{$t('public.confirm')}}</el-button>
  73. <el-button @click="visible = false">{{$t('public.cancel')}}</el-button>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </transition>
  80. </template>
  81. <script>
  82. import { Button } from 'element-ui'
  83. import Vue from 'vue'
  84. import { groupInviteMixins } from '@/mixins/group'
  85. Vue.component(Button.name, Button)
  86. export default {
  87. name: 'invitePopup',
  88. mixins: [groupInviteMixins]
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. @import "./style.scss";
  93. </style>