groupMember.blade.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. @extends('Yunshop\WorkWechat::layouts.base')
  2. @section('title', '群成员')
  3. @section('content')
  4. <link rel="stylesheet" href="{{resource_get('plugins/work-wechat-platform/static/css/index.css')}}">
  5. <style>
  6. .edit-i{display:none;}
  7. .el-table_1_column_2:hover .edit-i{font-weight:900;padding:0;margin:0;display:inline-block;}
  8. .el-tabs__item,.is-top{font-size:16px}
  9. .el-tabs__active-bar { height: 3px;}
  10. .total-list{flex:1;min-width:300px;background:#fff;margin-right:15px;padding: 15px;border-radius: 5px; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)}
  11. .total-list-title{font-size:14px;font-weight:600;color:#333;line-height:24px;}
  12. .total-list-data{font-size:12px;font-weight:500;color:#999;line-height:24px;}
  13. .total-list-num{font-size:28px;font-weight:600;color:#333;line-height:48px;padding-top:20px}
  14. /* 导航 */
  15. .el-radio-button .el-radio-button__inner,.el-radio-button:first-child .el-radio-button__inner {border-radius: 4px 4px 4px 4px;border-left: 0px;}
  16. .el-radio-button__inner{border:0;}
  17. .el-radio-button:last-child .el-radio-button__inner {border-radius: 4px 4px 4px 4px;}
  18. </style>
  19. <div class="all">
  20. <div id="app" v-cloak>
  21. <div class="vue-head">
  22. <el-radio-group v-model="member_type">
  23. <el-radio-button label="1" @click.native="handleClick(1)">外部成员</el-radio-button>
  24. <el-radio-button label="2" @click.native="handleClick(2)">内部成员</el-radio-button>
  25. </el-radio-group>
  26. </div>
  27. <div class="vue-head">
  28. <div class="vue-main-title" style="margin-bottom:20px">
  29. <div class="vue-main-title-left"></div>
  30. <div class="vue-main-title-content">群拓客 > 群成员</div>
  31. </div>
  32. <div class="vue-search">
  33. <el-form :inline="true" :model="search_form" class="demo-form-inline">
  34. <el-form-item label="">
  35. <el-input v-model="search_form.id" placeholder="成员ID"></el-input>
  36. </el-form-item>
  37. <el-form-item label="">
  38. <el-input v-model="search_form.customer_kwd" placeholder="成员会员信息"></el-input>
  39. </el-form-item>
  40. <el-form-item label="">
  41. <el-input v-model="search_form.invitor_kwd" placeholder="邀请人信息"></el-input>
  42. </el-form-item>
  43. <el-form-item label="">
  44. <el-input v-model="search_form.chat_owner_kwd" placeholder="系统推荐人昵称/姓名/手机号"></el-input>
  45. </el-form-item>
  46. <el-form-item label="">
  47. <el-input v-model="search_form.chat_owner_uid" placeholder="系统推荐人会员ID"></el-input>
  48. </el-form-item>
  49. <el-select v-model="search_form.join_scene" clearable placeholder="入群方式">
  50. <el-option label="直接邀请入群" value="1"></el-option>
  51. <el-option label="邀请链接入群" value="2"></el-option>
  52. <el-option label="扫描群二维码入群" value="3"></el-option>
  53. </el-select>
  54. <el-form-item label="">
  55. <el-date-picker
  56. v-model="times"
  57. type="datetimerange"
  58. value-format="yyyy-MM-dd HH:mm:ss"
  59. range-separator="至"
  60. start-placeholder="开始时间"
  61. end-placeholder="结束时间"
  62. style="margin-left:5px;"
  63. align="right">
  64. </el-date-picker>
  65. </el-form-item>
  66. <el-form-item label="">
  67. <el-button type="primary" @click="search(1)">搜索</el-button>
  68. <el-button @click="export1()">导出</el-button>
  69. </el-form-item>
  70. </el-form>
  71. </div>
  72. </div>
  73. <div class="vue-main">
  74. <div class="vue-main-form">
  75. <div class="vue-main-title" style="margin-bottom:20px">
  76. <div class="vue-main-title-left"></div>
  77. <div class="vue-main-title-content" style="flex:0 0 130px">群外部成员列表</div>
  78. <div class="" style="text-align:left;font-size:14px;color:#999">
  79. <span>历史外部成员总数:[[total]]</span>&nbsp;&nbsp;&nbsp;
  80. <span>当前外部成员数量:[[summary.in_group_count]]</span>&nbsp;
  81. </div>
  82. <div class="vue-main-title-button">
  83. </div>
  84. </div>
  85. <el-table :data="list" style="width: 100%">
  86. <el-table-column label="成员ID" align="center" prop="id" width="100"></el-table-column>
  87. <el-table-column label="加入时间" align="center" width="150" prop="join_time_str">
  88. </el-table-column>
  89. <el-table-column label="状态" align="center" prop="status_desc">
  90. </el-table-column>
  91. <el-table-column label="成员会员信息" align="center" prop="has_one_customer">
  92. <template slot-scope="scope">
  93. <div>
  94. <div v-if="scope.row.has_one_customer && scope.row.has_one_customer.has_one_member">
  95. <div>
  96. <img :src="scope.row.has_one_customer.has_one_member.avatar_image" style="width:30px;height:30px;padding:1px;border:1px solid #ccc">
  97. </div>
  98. <div v-if="scope.row.has_one_customer.has_one_member.nickname">
  99. [[scope.row.has_one_customer.has_one_member.nickname]]
  100. </div>
  101. <div v-else>
  102. 未更新
  103. </div>
  104. </div>
  105. <div v-else>
  106. 未更新
  107. </div>
  108. </div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="入群方式" align="center" prop="join_scene_desc">
  112. </el-table-column>
  113. <el-table-column label="邀请人" align="center" prop="has_one_invitor">
  114. <template slot-scope="scope">
  115. <div>
  116. <div v-if="scope.row.has_one_invitor">
  117. <div>
  118. <img :src="scope.row.has_one_invitor.avatar_mediaid" style="width:30px;height:30px;padding:1px;border:1px solid #ccc">
  119. </div>
  120. <div>
  121. [[scope.row.has_one_invitor.name]]
  122. </div>
  123. </div>
  124. </div>
  125. </template>
  126. </el-table-column>
  127. <el-table-column align="center" width="150" prop="has_one_group_member_id">
  128. <template slot="header" slot-scope="scope">
  129. <div>系统会员ID</div>
  130. <div>注册时间</div>
  131. </template>
  132. <template slot-scope="scope">
  133. <div>
  134. <div v-if="scope.row.has_one_customer && scope.row.has_one_customer.has_one_member">
  135. <div>
  136. [[scope.row.has_one_customer.has_one_member.uid]]
  137. </div>
  138. <div>
  139. [[scope.row.customer_member_createtime]]
  140. </div>
  141. </div>
  142. </div>
  143. </template>
  144. </el-table-column>
  145. <el-table-column label="系统推荐人" align="center" prop="has_one_group_member_name">
  146. <template slot-scope="scope">
  147. <div>
  148. <div v-if="scope.row.parent_member_uid">
  149. <div>
  150. <img :src="scope.row.parent_member_avatar_image" style="width:30px;height:30px;padding:1px;border:1px solid #ccc">
  151. </div>
  152. <div>
  153. [[scope.row.parent_member_nickname]]
  154. </div>
  155. </div>
  156. <div v-else>
  157. --
  158. </div>
  159. </div>
  160. </template>
  161. </el-table-column>
  162. </el-table>
  163. </div>
  164. </div>
  165. <!-- 分页 -->
  166. <div class="vue-page" v-if="total>0">
  167. <el-row>
  168. <el-col align="right">
  169. <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
  170. :page-size="per_page" :current-page="current_page" background
  171. ></el-pagination>
  172. </el-col>
  173. </el-row>
  174. </div>
  175. </div>
  176. </div>
  177. <script>
  178. var app = new Vue({
  179. el: "#app",
  180. delimiters: ['[[', ']]'],
  181. name: 'test',
  182. data() {
  183. return {
  184. list:[],
  185. summary:{},
  186. times:[],
  187. search_form:{
  188. id:'',
  189. customer_kwd:'',
  190. invitor_kwd:'',
  191. chat_owner_kwd:'',
  192. chat_owner_uid:'',
  193. join_scene:''
  194. },
  195. member_type:'1',
  196. group_id:'',
  197. current_id:0,
  198. rules: {},
  199. current_page:1,
  200. total:1,
  201. per_page:1,
  202. }
  203. },
  204. created() {
  205. },
  206. mounted() {
  207. this.group_id = getParam('group_id');
  208. this.getData(1);
  209. },
  210. methods: {
  211. getData(page) {
  212. let json = {
  213. page:page,
  214. group_id:this.group_id,
  215. id:this.search_form.id,
  216. customer_kwd:this.search_form.customer_kwd,
  217. invitor_kwd:this.search_form.invitor_kwd,
  218. chat_owner_kwd:this.search_form.chat_owner_kwd,
  219. chat_owner_uid:this.search_form.chat_owner_uid,
  220. join_scene:this.search_form.join_scene
  221. };
  222. if(this.times && this.times.length>0) {
  223. json.start_time = this.times[0];
  224. json.end_time = this.times[1];
  225. }
  226. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  227. this.$http.post('{!! yzWebFullUrl('plugin.group-develop-user.manage.groupChat.get-group-members') !!}',json).then(function(response) {
  228. if (response.data.result) {
  229. this.list = response.data.data.list.data;
  230. this.current_page=response.data.data.list.current_page;
  231. this.total=response.data.data.list.total;
  232. this.per_page=response.data.data.list.per_page;
  233. this.summary = response.data.data.summary;
  234. loading.close();
  235. } else {
  236. this.$message({
  237. message: response.data.msg,
  238. type: 'error'
  239. });
  240. }
  241. loading.close();
  242. }, function(response) {
  243. this.$message({
  244. message: response.data.msg,
  245. type: 'error'
  246. });
  247. loading.close();
  248. });
  249. },
  250. search(val) {
  251. this.getData(val);
  252. },
  253. export1(){
  254. var that = this;
  255. console.log(that.search_form);
  256. var url = "{!! yzWebFullUrl('plugin.group-develop-user.manage.groupChat.group-member-list-export') !!}";
  257. url += "&group_id="+this.group_id;
  258. if (that.search_form.id) {
  259. url += "&id="+that.search_form.id;
  260. }
  261. if (that.search_form.customer_kwd) {
  262. url += "&customer_kwd="+that.search_form.customer_kwd;
  263. }
  264. if (that.search_form.invitor_kwd) {
  265. url += "&invitor_kwd="+that.search_form.invitor_kwd;
  266. }
  267. if (that.search_form.chat_owner_kwd) {
  268. url += "&chat_owner_kwd="+that.search_form.chat_owner_kwd;
  269. }
  270. if (that.search_form.chat_owner_uid) {
  271. url += "&chat_owner_uid="+that.search_form.chat_owner_uid;
  272. }
  273. if (that.search_form.join_scene) {
  274. url += "&join_scene="+that.search_form.join_scene;
  275. }
  276. if(that.times && that.times.length>0) {
  277. url += "&start_time="+that.times[0]+"&end_time="+that.times[1];
  278. }
  279. console.log(url);
  280. window.location.href = url;
  281. },
  282. handleClick(val) {
  283. if(val == 1) {
  284. }
  285. else if(val == 2) {
  286. let link = `{!! yzWebFullUrl('plugin.group-develop-user.manage.groupChat.groupEmployee') !!}`;
  287. link = link + '&group_id='+ this.group_id
  288. window.location.href = link;
  289. }
  290. },
  291. },
  292. })
  293. </script>
  294. @endsection