启程易购后端代码
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.
 
 
 
 
 
 
qicheng_shop_backend/public/system/js/chunk-14055c5c.78ef1421.js

1 lines
8.5 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-14055c5c"],{"0b65":function(e,t,a){"use strict";t["a"]={shortcuts:[{text:"今天",onClick:function(e){var t=new Date,a=new Date;a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),e.$emit("pick",[a,t])}},{text:"昨天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.$emit("pick",[a,t])}},{text:"最近7天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-6048e5),e.$emit("pick",[a,t])}},{text:"最近30天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-2592e6),e.$emit("pick",[a,t])}},{text:"本月",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),e.$emit("pick",[a,t])}},{text:"本年",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),0,1))),e.$emit("pick",[a,t])}}]}},"111b":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:e.userFrom,size:"small","label-width":"85px",inline:""}},[a("el-form-item",{attrs:{label:"搜索时间:"}},[a("el-date-picker",{staticStyle:{width:"280px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间","picker-options":e.pickerOptions},on:{change:e.onchangeTime},model:{value:e.timeVal,callback:function(t){e.timeVal=t},expression:"timeVal"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"搜索词:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入搜索词",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.userFrom.keyword,callback:function(t){e.$set(e.userFrom,"keyword",t)},expression:"userFrom.keyword"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用户昵称:",prop:"nickname"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入昵称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.userFrom.nickname,callback:function(t){e.$set(e.userFrom,"nickname",t)},expression:"userFrom.nickname"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.getList(1)}}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(t){return e.searchReset()}}},[e._v("重置")])],1)],1)],1),e._v(" "),a("el-card",{staticClass:"mt14"},[a("div",{staticClass:"mb20"},[a("el-tabs",{on:{"tab-click":function(t){return e.getList(1)}},model:{value:e.userFrom.user_type,callback:function(t){e.$set(e.userFrom,"user_type",t)},expression:"userFrom.user_type"}},[a("el-tab-pane",{attrs:{label:"全部用户",name:""}}),e._v(" "),a("el-tab-pane",{attrs:{label:"微信用户",name:"wechat"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"小程序用户",name:"routine"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"H5用户",name:"h5"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"APP用户",name:"app"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"PC用户",name:"pc"}})],1),e._v(" "),a("el-button",{staticClass:"mt5",attrs:{size:"small",type:"primary"},nativeOn:{click:function(t){return e.exports(t)}}},[e._v("导出搜索记录")])],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"uid",label:"用户ID","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(0!=t.row.uid?t.row.uid:"未知"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"头像","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.user?t.row.user.avatar:e.moren,"preview-src-list":[t.row.user&&t.row.user.avatar||e.moren]}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"昵称","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("div",{staticClass:"acea-row"},[a("div",[e._v(e._s(n.user&&n.user.nickname?n.user.nickname:"未知"))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"用户类型","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[n.user?a("span",[e._v(e._s("wechat"==n.user.user_type?"公众号":"routine"==n.user.user_type?"小程序":n.user.user_type))]):a("span",[e._v("未知")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"content",label:"搜索词","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"搜索时间","min-width":"120"}})],1),e._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":e.userFrom.limit,"current-page":e.userFrom.page,layout:"total, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1)],1)},r=[],s=a("c80c"),i=(a("96cf"),a("3b8d")),l=a("c24f"),o=a("e572"),c=a("2e83"),u=a("83d6"),m=a("0b65"),p={name:"UserList",components:{},data:function(){return{pickerOptions:m["a"],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:{searchReset:function(){this.timeVal=[],this.userFrom.date="",this.$refs.searchForm.resetFields(),this.getList(1)},onchangeTime:function(e){this.timeVal=e,this.userFrom.page=1,this.userFrom.date=e?this.timeVal.join("-"):"",this.getList("")},exports:function(){var e=Object(i["a"])(Object(s["a"])().mark((function e(){var t,a,n,r,i;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=JSON.parse(JSON.stringify(this.userFrom)),a=[],t.page=1,n=1,r={},i=0;case 5:if(!(i<n)){e.next=14;break}return e.next=8,this.downData(t);case 8:r=e.sent,n=Math.ceil(r.count/t.limit),r.export.length&&(a=a.concat(r.export),t.page++);case 11:i++,e.next=5;break;case 14:return Object(c["a"])(r.header,r.title,a,r.foot,r.filename),e.abrupt("return");case 16:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),downData:function(e){return new Promise((function(t,a){Object(l["eb"])(e).then((function(e){return t(e.data)}))}))},getExportFileList:function(){var e=this;Object(l["eb"])(this.userFrom).then((function(t){var a=e.$createElement;e.$msgbox({title:"提示",message:a("p",null,[a("span",null,'文件正在生成中,请稍后点击"'),a("span",{style:"color: teal"},"导出记录"),a("span",null,'"查看~ ')]),confirmButtonText:"我知道了"}).then((function(t){e.$router.push({path:e.roterPre+"/group/exportList"})}))})).catch((function(t){e.$message.error(t.message)}))},getList:function(e){var t=this;this.listLoading=!0,this.userFrom.page=e||this.userFrom.page,"0"===this.userFrom.user_type&&(this.userFrom.user_type=""),Object(l["tb"])(this.userFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(e){this.userFrom.page=e,this.getList("")},handleSizeChange:function(e){this.userFrom.limit=e,this.getList("")}}},d=p,h=a("2877"),f=Object(h["a"])(d,n,r,!1,null,"11d0fa84",null);t["default"]=f.exports},cdfe:function(e,t,a){e.exports=a.p+"system/img/f.5aa43cd3.png"},e572:function(e,t,a){"use strict";a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return s}));var n=[{label:"开启",value:1},{label:"关闭",value:0}],r={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"}]},s={title:"状态",custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"审核已通过",val:"1"},{text:"审核未通过",val:"2"}]}}}]);