CRMEB_PRO_M/public/view_admin/js/chunk-3c0be192.b776b8a8.js

1 line
7.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3c0be192"],{"0b65":function(t,e,a){"use strict";e.a={shortcuts:[{text:"今天",value:function(){var t=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,t]}},{text:"昨天",value:function(){var t=new Date,e=new Date;return e.setTime(e.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,t]}},{text:"最近7天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,t]}},{text:"最近30天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,t]}},{text:"上月",value:function(){var t=new Date,e=new Date,a=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,a))),[e,t]}},{text:"本月",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,t]}},{text:"本年",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,t]}}]}},dedf:function(t,e,a){"use strict";a.r(e);var n=a("a34a"),r=a.n(n),i=a("2f62"),o=a("8593"),s=a("0b65"),l=a("2e83"),c=a("d708");function u(t,e,a,n,r,i,o){try{var s=t[i](o),l=s.value}catch(t){return void a(t)}s.done?e(l):Promise.resolve(l).then(n,r)}function m(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function d(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?m(a,!0).forEach((function(e){f(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):m(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function f(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var h={data:function(){return{roterPre:c.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},formValidate:{data:"thirtyday",page:1,limit:20},columns:[{title:"模板名称",key:"system_form_name",width:130},{title:"用户名称/ID",key:"nickname",width:130,render:function(t,e){return t("div","".concat(e.row.nickname,"/").concat(e.row.uid))}},{title:"用户手机号",key:"phone",width:130},{title:"模板内容",key:"content",tooltip:!0,minWidth:80},{title:"创建时间",key:"add_time",width:130}],tableData:[],total:0,timeVal:[],options:s.a}},computed:d({},Object(i.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.systemFormData()},methods:{onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",""==t[0]&&(this.formValidate.data="thirtyday"),this.formValidate.page=1,this.systemFormData()},systemFormData:function(){var t=this;Object(o.X)(this.$route.query.id,this.formValidate).then((function(e){var a=!0,n=!1,r=void 0;try{for(var i,o=e.data.list[Symbol.iterator]();!(a=(i=o.next()).done);a=!0){var s=i.value;s.content="";var l=!0,c=!1,u=void 0;try{for(var m,d=s.value[Symbol.iterator]();!(l=(m=d.next()).done);l=!0){var f=m.value;s.content+="".concat(f.title,"").concat(f.value,"")}}catch(t){c=!0,u=t}finally{try{l||null==d.return||d.return()}finally{if(c)throw u}}}}catch(t){n=!0,r=t}finally{try{a||null==o.return||o.return()}finally{if(n)throw r}}t.tableData=e.data.list,t.total=e.data.count}))},systemFormDataExport:function(t){var e=this;return new Promise((function(a){Object(o.Y)(e.$route.query.id,t).then((function(t){a(t.data)}))}))},systemFormExport:function(){var t,e=(t=r.a.mark((function t(){var e,a,n,i,o,s,c,u,m,f,h,w,p,v,D,b,g,y,x,k,O,P;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=d({},this.formValidate,{page:1}),a=[],n="",i=[],o=[],s=0;case 6:if(!(s<e.page)){t.next=21;break}return t.next=9,this.systemFormDataExport(e);case 9:if(c=t.sent,u=c.header,m=c.filename,f=c.filekey,c.export.length){t.next=13;break}return t.abrupt("break",21);case 13:u.length&&(a=u),m&&(n=m),f.length&&(i=f),o=o.concat(c.export),e.page++;case 18:s++,t.next=6;break;case 21:h=!0,w=!1,p=void 0,t.prev=24,v=o[Symbol.iterator]();case 26:if(h=(D=v.next()).done){t.next=52;break}for((b=D.value).content="",g=!0,y=!1,x=void 0,t.prev=32,k=b.form_data[Symbol.iterator]();!(g=(O=k.next()).done);g=!0)P=O.value,b.content+="".concat(P.title,"").concat(P.value,"");t.next=40;break;case 36:t.prev=36,t.t0=t.catch(32),y=!0,x=t.t0;case 40:t.prev=40,t.prev=41,g||null==k.return||k.return();case 43:if(t.prev=43,!y){t.next=46;break}throw x;case 46:return t.finish(43);case 47:return t.finish(40);case 48:b.form_data=b.content;case 49:h=!0,t.next=26;break;case 52:t.next=58;break;case 54:t.prev=54,t.t1=t.catch(24),w=!0,p=t.t1;case 58:t.prev=58,t.prev=59,h||null==v.return||v.return();case 61:if(t.prev=61,!w){t.next=64;break}throw p;case 64:return t.finish(61);case 65:return t.finish(58);case 66:Object(l.a)(a,i,n,o);case 67:case"end":return t.stop()}}),t,this,[[24,54,58,66],[32,36,40,48],[41,,43,47],[59,,61,65]])})),function(){var e=this,a=arguments;return new Promise((function(n,r){var i=t.apply(e,a);function o(t){u(i,n,r,o,s,"next",t)}function s(t){u(i,n,r,o,s,"throw",t)}o(void 0)}))});return function(){return e.apply(this,arguments)}}(),pageChange:function(t){this.formValidate.page=t,this.systemFormData()}}},w=a("2877"),p=Object(w.a)(h,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"i-layout-page-header"},[a("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[a("div",{staticClass:"acea-row row-middle",attrs:{slot:"title"},slot:"title"},[a("router-link",{attrs:{to:{path:t.roterPre+"/setting/system_form"}}},[a("div",{staticClass:"font-sm after-line"},[a("span",{staticClass:"iconfont iconfanhui"}),a("span",{staticClass:"pl10"},[t._v("返回")])])]),a("span",{staticClass:"mr20 ml16",domProps:{textContent:t._s(t.$route.meta.title)}})],1)])],1),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Row",{attrs:{type:"flex"}},[a("Col",t._b({},"Col",t.grid,!1),[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{label:"时间筛选:"}},[a("DatePicker",{staticClass:"input-add",attrs:{editable:!1,clearable:!0,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1)],1),a("Button",{attrs:{type:"primary"},on:{click:t.systemFormExport}},[t._v("导出")])],1)],1)],1),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Table",{attrs:{columns:t.columns,data:t.tableData}}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,null,null);e.default=p.exports}}]);