启程易购后端代码
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-2d0d364b.dc3b68ee.js

1 lines
4.7 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d364b"],{"5d28":function(t,e,a){"use strict";a.r(e);var i=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("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small","label-width":"90px",inline:!0}},[a("el-form-item",{attrs:{label:"选择时间:"}},[a("el-date-picker",{staticStyle:{width:"280px"},attrs:{type:"daterange",placeholder:"选择日期",format:"yyyy/MM/dd","value-format":"yyyy/MM/dd","range-separator":"-","picker-options":t.pickerOptions,clearable:""},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1)],1)],1),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onExport}},[t._v("导出")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"switchTable",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"activity.activity_name",label:"活动名称","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"用户名称/ID","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("div",[t._v("\n "+t._s(i.nickname)+"/"+t._s(i.uid)+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"phone",label:"用户手机号","min-width":"150"}}),t._v(" "),t._l(t.headers,(function(e,i){return a("el-table-column",{key:i,attrs:{label:e.label,"min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(i){var n=i.row;return["uploadPicture"==e.type?a("div",t._l(n.value[e.key],(function(t,e){return a("el-image",{key:e,staticStyle:{width:"36px",height:"36px"},attrs:{src:t,"preview-src-list":[t]}})})),1):"dateranges"==e.type?a("div",[n.value[e.key]?a("div",[t._v(t._s(n.value[e.key][0])+"至"),a("br"),t._v(t._s(n.value[e.key][1]))]):t._e()]):a("div",[t._v("\n "+t._s(n.value[e.key])+"\n ")])]}}],null,!0)})})),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}})],2),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},n=[],r=a("c80c"),l=(a("96cf"),a("3b8d")),s=a("90e7"),o=a("83d6"),c=a("2e83"),d={name:"FormDetail",data:function(){return{roterPre:o["roterPre"],listLoading:!0,pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]},tableData:{data:[],total:0},tableFrom:{page:1,limit:20,date:"",keyword:""},drawer:!1,timeVal:[],headers:[]}},mounted:function(){this.getList("")},methods:{onchangeTime:function(t){this.timeVal=t,this.tableFrom.date=this.timeVal?this.timeVal.join("-"):"",this.tableFrom.page=1,this.getList("")},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(s["u"])(this.$route.params.id,this.tableFrom).then((function(t){e.headers=t.data.header,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.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList(1)},onExport:function(){var t=Object(l["a"])(Object(r["a"])().mark((function t(){var e,a,i,n,l,s;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=this.tableFrom,e.id=this.$route.params.id,a=JSON.parse(JSON.stringify(e)),i=[],a.page=1,n=1,l={},s=0;case 7:if(!(s<n)){t.next=16;break}return t.next=10,this.downData(a);case 10:l=t.sent,n=Math.ceil(l.count/a.limit),l.export.length&&(i=i.concat(l.export),a.page++);case 13:s++,t.next=7;break;case 16:return Object(c["a"])(l.header,l.title,i,l.foot,l.filename),t.abrupt("return");case 18: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["t"])(t).then((function(t){return e(t.data)}))}))}}},u=d,m=a("2877"),h=Object(m["a"])(u,i,n,!1,null,"2cc4ea88",null);e["default"]=h.exports}}]);