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.
1 lines
10 KiB
1 lines
10 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-dfbdd4ec"],{"111b":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("el-tabs",{on:{"tab-click":function(e){return t.getList(1)}},model:{value:t.userFrom.user_type,callback:function(e){t.$set(t.userFrom,"user_type",e)},expression:"userFrom.user_type"}},[a("el-tab-pane",{attrs:{label:"全部用户",name:""}}),t._v(" "),a("el-tab-pane",{attrs:{label:"微信用户",name:"wechat"}}),t._v(" "),a("el-tab-pane",{attrs:{label:"小程序用户",name:"routine"}}),t._v(" "),a("el-tab-pane",{attrs:{label:"H5用户",name:"h5"}}),t._v(" "),a("el-tab-pane",{attrs:{label:"APP用户",name:"app"}}),t._v(" "),a("el-tab-pane",{attrs:{label:"PC用户",name:"pc"}})],1),t._v(" "),a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small","label-width":"100px",inline:!0}},[a("el-form-item",{staticStyle:{display:"block"},attrs:{label:"搜索时间:"}},[a("el-radio-group",{staticClass:"mr20",attrs:{type:"button",size:"small"},on:{change:function(e){return t.selectChange(t.userFrom.date)}},model:{value:t.userFrom.date,callback:function(e){t.$set(t.userFrom,"date",e)},expression:"userFrom.date"}},t._l(t.fromList.fromTxt,(function(e,r){return a("el-radio-button",{key:r,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),t._v(" "),a("el-date-picker",{staticStyle:{width:"250px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}}),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},nativeOn:{click:function(e){return t.exports(e)}}},[t._v("导出搜索记录")])],1),t._v(" "),a("el-form-item",{attrs:{label:"搜索词:"}},[a("el-input",{attrs:{placeholder:"请输入搜索词",clearable:""},model:{value:t.userFrom.keyword,callback:function(e){t.$set(t.userFrom,"keyword",e)},expression:"userFrom.keyword"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"用户昵称:"}},[a("el-input",{attrs:{placeholder:"请输入昵称",clearable:""},model:{value:t.userFrom.nickname,callback:function(e){t.$set(t.userFrom,"nickname",e)},expression:"userFrom.nickname"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1)],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"uid",label:"用户ID","min-width":"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0!=e.row.uid?e.row.uid:"未知"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"头像","min-width":"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:e.row.user?e.row.user.avatar:t.moren,"preview-src-list":[e.row.user&&e.row.user.avatar||t.moren]}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"昵称","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[a("div",{staticClass:"acea-row"},[a("div",[t._v(t._s(r.user&&r.user.nickname?r.user.nickname:"未知"))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"用户类型","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[r.user?a("span",[t._v(t._s("wechat"==r.user.user_type?"公众号":"routine"==r.user.user_type?"小程序":r.user.user_type))]):a("span",[t._v("未知")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"content",label:"搜索词","min-width":"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"搜索时间","min-width":"180"}})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.userFrom.limit,"current-page":t.userFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},l=[],n=a("c80c"),i=(a("96cf"),a("3b8d")),s=a("c24f"),o=a("e572"),c=a("2e83"),u=a("83d6"),m={name:"UserList",components:{},data:function(){return{moren:a("cdfe"),fromList:o["a"],timeVal:[],maxCols:3,isShowSend:!0,visible:!1,roterPre:u["roterPre"],tableData:{data:[],total:0},listLoading:!0,userFrom:{date:"",user_type:"",nickname:"",keyword:"",page:1,limit:20},grid:{xl:8,lg:12,md:12,sm:24,xs:24},grid2:{xl:18,lg:16,md:12,sm:24,xs:24},grid3:{xl:8,lg:12,md:12,sm:24,xs:24}}},mounted:function(){this.getList("")},methods:{selectChange:function(t){this.timeVal=[],this.userFrom.page=1,this.userFrom.date=t,this.getList("")},onchangeTime:function(t){this.timeVal=t,this.userFrom.page=1,this.userFrom.date=t?this.timeVal.join("-"):"",this.getList("")},exports:function(){var t=Object(i["a"])(Object(n["a"])().mark((function t(){var e,a,r,l,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=JSON.parse(JSON.stringify(this.userFrom)),a=[],e.page=1,r=1,l={},i=0;case 5:if(!(i<r)){t.next=14;break}return t.next=8,this.downData(e);case 8:l=t.sent,r=Math.ceil(l.count/e.limit),l.export.length&&(a=a.concat(l.export),e.page++);case 11:i++,t.next=5;break;case 14:return Object(c["a"])(l.header,l.title,a,l.foot,l.filename),t.abrupt("return");case 16:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),downData:function(t){return new Promise((function(e,a){Object(s["Y"])(t).then((function(t){return e(t.data)}))}))},getExportFileList:function(){var t=this;Object(s["Y"])(this.userFrom).then((function(e){var a=t.$createElement;t.$msgbox({title:"提示",message:a("p",null,[a("span",null,'文件正在生成中,请稍后点击"'),a("span",{style:"color: teal"},"导出记录"),a("span",null,'"查看~ ')]),confirmButtonText:"我知道了"}).then((function(e){t.$router.push({path:t.roterPre+"/group/exportList"})}))})).catch((function(e){t.$message.error(e.message)}))},getList:function(t){var e=this;this.listLoading=!0,this.userFrom.page=t||this.userFrom.page,"0"===this.userFrom.user_type&&(this.userFrom.user_type=""),Object(s["gb"])(this.userFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.userFrom.page=t,this.getList("")},handleSizeChange:function(t){this.userFrom.limit=t,this.getList("")}}},d=m,h=(a("1b5b"),a("2877")),p=Object(h["a"])(d,r,l,!1,null,"5efce1a7",null);e["default"]=p.exports},"1b5b":function(t,e,a){"use strict";a("2664")},2664:function(t,e,a){},"2e83":function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));a("28a5");var r=a("8122"),l=a("e8ae"),n=a.n(l),i=a("21a6");function s(t,e,a,l,s,o){var c,u=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],m=1,d=new n.a.Workbook,h=t.length;function p(t){var e=Array.isArray(t)?t[0]:t,a=Array.isArray(t)?t[1]:{};c=d.addWorksheet(e,a)}function g(t,e){if(!Object(r["isEmpty"])(t)){t=Array.isArray(t)?t:t.split(",");for(var a=0;a<t.length;a++){var l=c.getRow(a+1);l.getCell(1).value=t[a],l.height=30,l.font={bold:!0,size:20,vertAlign:"subscript"},l.alignment={vertical:"bottom",horizontal:"center"},l.outlineLevel=1,c.mergeCells(a+1,1,a+1,e),l.commit(),m++}}}function v(t){if(!Object(r["isEmpty"])(t)){for(var e=c.getRow(m),a=1;a<=t.length;a++)e.getCell(a).value=t[a-1];e.height=25,e.width=50,e.font={bold:!0,size:18,vertAlign:"subscript"},e.alignment={vertical:"bottom",horizontal:"center"},e.outlineLevel=1,e.commit(),m++}}function b(t){if(!Object(r["isEmpty"])(t))for(var e=0;e<t.length;e++){for(var a=m,l=c.getRow(m),n=!1,i=0,s=0,o=0,u=0;u<t[e].length;u++)Array.isArray(t[e][u])?(i=o,n=!0,y(t[e][u],o),o+=t[e][u][0].length,s=o):(l.getCell(_(o)).value=t[e][u],l.getCell(_(o)).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},l.alignment={vertical:"middle",horizontal:"center"},o++);n&&x(a,m,i,s),l.height=25,l.commit(),m++}}function y(t,e){for(var a=t.length,r=a-1,l=0;l<t.length;l++){for(var n=c.getRow(m),i=0;i<t[l].length;i++)n.getCell(_(e+i)).value=t[l][i],n.getCell(_(e+i)).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},n.alignment={vertical:"middle",horizontal:"center"};n.height=25,n.commit(),l<r&&m++}}function x(t,e,a,r){for(var l=0;l<h;l++)(l<a||l>r)&&c.mergeCells(_(l)+t+":"+_(l)+e)}function w(t){if(!Object(r["isEmpty"])(t))if(Array.isArray(t))for(var e=0;e<t.length;e++){var a=c.getRow(m);a.getCell(1).value=t[e],a.getCell(1).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.alignment={vertical:"middle",horizontal:"left"},c.mergeCells("A"+m+":"+_(h-1)+m),m++}else{var l=c.getRow(m);l.getCell(1).value=t[f],l.getCell(1).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},l.alignment={vertical:"middle",horizontal:"left"},c.mergeCells("A"+m+":"+_(h-1)+m)}}function _(t){if(t<26)return u[t];var e=t%26,a=Math.floor(t%26);return u[a]+u[e]}function k(t){t||(t=(new Date).getTime()),d.xlsx.writeBuffer().then((function(e){var a=new Blob([e],{type:"application/octet-stream"});i["saveAs"](a,t+".xlsx")}))}p(o),g(e,h),v(t),b(a),w(l),k(s)}},cdfe:function(t,e,a){t.exports=a.p+"system/img/f.5aa43cd3.png"},e572:function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return l})),a.d(e,"b",(function(){return n}));var r=[{label:"开启",value:1},{label:"关闭",value:0}],l={title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},n={title:"状态",custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"审核已通过",val:"1"},{text:"审核未通过",val:"2"}]}}}]); |