groupEmployee.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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.user_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-select v-model="search_form.join_scene" clearable placeholder="入群方式">
  44. <el-option label="直接邀请入群" value="1"></el-option>
  45. <el-option label="邀请链接入群" value="2"></el-option>
  46. <el-option label="扫描群二维码入群" value="3"></el-option>
  47. </el-select>
  48. <el-form-item label="">
  49. <el-date-picker
  50. v-model="times"
  51. type="datetimerange"
  52. value-format="yyyy-MM-dd HH:mm:ss"
  53. range-separator="至"
  54. start-placeholder="开始时间"
  55. end-placeholder="结束时间"
  56. style="margin-left:5px;"
  57. align="right">
  58. </el-date-picker>
  59. </el-form-item>
  60. <el-form-item label="">
  61. <el-button type="primary" @click="search(1)">搜索</el-button>
  62. <el-button @click="export1()">导出</el-button>
  63. </el-form-item>
  64. </el-form>
  65. </div>
  66. </div>
  67. <div class="vue-main">
  68. <div class="vue-main-form">
  69. <div class="vue-main-title" style="margin-bottom:20px">
  70. <div class="vue-main-title-left"></div>
  71. <div class="vue-main-title-content" style="flex:0 0 130px">群内部成员列表</div>
  72. <div class="" style="text-align:left;font-size:14px;color:#999">
  73. <span>历史内部成员总数:[[total]]</span>&nbsp;&nbsp;&nbsp;
  74. <span>当前内部成员数量:[[summary.in_group_count]]</span>&nbsp;
  75. </div>
  76. <div class="vue-main-title-button">
  77. </div>
  78. </div>
  79. <el-table :data="list" style="width: 100%">
  80. <el-table-column label="成员ID" align="center" prop="id" width="100"></el-table-column>
  81. <el-table-column label="加入时间" align="center" width="150" prop="join_time_str">
  82. </el-table-column>
  83. <el-table-column label="状态" align="center" prop="status_desc">
  84. </el-table-column>
  85. <el-table-column label="成员信息" align="center" prop="has_one_customer">
  86. <template slot-scope="scope">
  87. <div>
  88. <div v-if="scope.row.has_one_employee">
  89. <div>
  90. <img :src="scope.row.has_one_employee.avatar_mediaid" style="width:30px;height:30px;padding:1px;border:1px solid #ccc">
  91. </div>
  92. <div v-if="scope.row.has_one_employee.name">
  93. [[scope.row.has_one_employee.name]]
  94. </div>
  95. <div v-else>
  96. 未更新
  97. </div>
  98. </div>
  99. <div v-else>
  100. 未更新
  101. </div>
  102. </div>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="入群方式" align="center" prop="join_scene_desc">
  106. </el-table-column>
  107. <el-table-column label="邀请人" align="center" prop="has_one_invitor">
  108. <template slot-scope="scope">
  109. <div>
  110. <div v-if="scope.row.has_one_invitor">
  111. <div>
  112. <img :src="scope.row.has_one_invitor.avatar_mediaid" style="width:30px;height:30px;padding:1px;border:1px solid #ccc">
  113. </div>
  114. <div>
  115. [[scope.row.has_one_invitor.name]]
  116. </div>
  117. </div>
  118. </div>
  119. </template>
  120. </el-table-column>
  121. </el-table>
  122. </div>
  123. </div>
  124. <!-- 分页 -->
  125. <div class="vue-page" v-if="total>0">
  126. <el-row>
  127. <el-col align="right">
  128. <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
  129. :page-size="per_page" :current-page="current_page" background
  130. ></el-pagination>
  131. </el-col>
  132. </el-row>
  133. </div>
  134. </div>
  135. </div>
  136. <script>
  137. var app = new Vue({
  138. el: "#app",
  139. delimiters: ['[[', ']]'],
  140. name: 'test',
  141. data() {
  142. return {
  143. list:[],
  144. summary:{},
  145. times:[],
  146. search_form:{
  147. id:'',
  148. user_kwd:'',
  149. invitor_kwd:'',
  150. join_scene:''
  151. },
  152. group_id:'',
  153. current_id:0,
  154. rules: {},
  155. member_type:'2',
  156. current_page:1,
  157. total:1,
  158. per_page:1,
  159. }
  160. },
  161. created() {
  162. },
  163. mounted() {
  164. this.group_id = getParam('group_id');
  165. this.getData(1);
  166. },
  167. methods: {
  168. getData(page) {
  169. let json = {
  170. page:page,
  171. group_id:this.group_id,
  172. id:this.search_form.id,
  173. user_kwd:this.search_form.user_kwd,
  174. invitor_kwd:this.search_form.invitor_kwd,
  175. join_scene:this.search_form.join_scene
  176. };
  177. if(this.times && this.times.length>0) {
  178. json.start_time = this.times[0];
  179. json.end_time = this.times[1];
  180. }
  181. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  182. this.$http.post('{!! yzWebFullUrl('plugin.group-develop-user.manage.groupChat.get-group-employees') !!}',json).then(function(response) {
  183. if (response.data.result) {
  184. this.list = response.data.data.list.data;
  185. this.current_page=response.data.data.list.current_page;
  186. this.total=response.data.data.list.total;
  187. this.per_page=response.data.data.list.per_page;
  188. this.summary = response.data.data.summary;
  189. loading.close();
  190. } else {
  191. this.$message({
  192. message: response.data.msg,
  193. type: 'error'
  194. });
  195. }
  196. loading.close();
  197. }, function(response) {
  198. this.$message({
  199. message: response.data.msg,
  200. type: 'error'
  201. });
  202. loading.close();
  203. });
  204. },
  205. search(val) {
  206. this.getData(val);
  207. },
  208. export1(){
  209. var that = this;
  210. console.log(that.search_form);
  211. var url = "{!! yzWebFullUrl('plugin.group-develop-user.manage.groupChat.group-employee-list-export') !!}";
  212. url += "&group_id="+this.group_id;
  213. if (that.search_form.id) {
  214. url += "&id="+that.search_form.id;
  215. }
  216. if (that.search_form.user_kwd) {
  217. url += "&user_kwd="+that.search_form.user_kwd;
  218. }
  219. if (that.search_form.invitor_kwd) {
  220. url += "&invitor_kwd="+that.search_form.invitor_kwd;
  221. }
  222. if (that.search_form.join_scene) {
  223. url += "&join_scene="+that.search_form.join_scene;
  224. }
  225. if(that.times && that.times.length>0) {
  226. url += "&start_time="+that.times[0]+"&end_time="+that.times[1];
  227. }
  228. console.log(url);
  229. window.location.href = url;
  230. },
  231. handleClick(val) {
  232. if(val == 1) {
  233. let link = `{!! yzWebFullUrl('plugin.group-develop-user.manage.groupChat.groupMember') !!}`;
  234. link = link + '&group_id='+ this.group_id
  235. window.location.href = link;
  236. }
  237. else if(val == 2) {
  238. }
  239. },
  240. },
  241. })
  242. </script>
  243. @endsection