chunk-72756e56.ceec65d1.js 14 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-72756e56"],{1200:function(t,e,n){},"61f7":function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(n,!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(new RegExp("(".concat(r,")")).test(e)){var a=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:u(a))}return e}function u(t){return("00"+t).substr(t.length)}n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return l})),n.d(e,"b",(function(){return d}));var c={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},s=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function l(t){return a({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function d(t){return p.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}s(l,"请输入%s"),s(d,"%s格式不正确");var p=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:i({},e,t);return a({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o,{},r)},s(t[e],c[e]),t}),{})},7585:function(t,e,n){"use strict";var r=n("1200");n.n(r).a},b562:function(t,e,n){"use strict";n.d(e,"l",(function(){return a})),n.d(e,"n",(function(){return i})),n.d(e,"D",(function(){return o})),n.d(e,"h",(function(){return u})),n.d(e,"j",(function(){return c})),n.d(e,"m",(function(){return s})),n.d(e,"y",(function(){return l})),n.d(e,"a",(function(){return d})),n.d(e,"x",(function(){return p})),n.d(e,"s",(function(){return f})),n.d(e,"t",(function(){return m})),n.d(e,"C",(function(){return h})),n.d(e,"g",(function(){return b})),n.d(e,"i",(function(){return g})),n.d(e,"k",(function(){return y})),n.d(e,"d",(function(){return v})),n.d(e,"e",(function(){return w})),n.d(e,"f",(function(){return O})),n.d(e,"z",(function(){return j})),n.d(e,"B",(function(){return _})),n.d(e,"A",(function(){return x})),n.d(e,"H",(function(){return P})),n.d(e,"o",(function(){return E})),n.d(e,"c",(function(){return $})),n.d(e,"G",(function(){return k})),n.d(e,"E",(function(){return T})),n.d(e,"F",(function(){return D})),n.d(e,"w",(function(){return C})),n.d(e,"u",(function(){return V})),n.d(e,"v",(function(){return G})),n.d(e,"p",(function(){return L})),n.d(e,"b",(function(){return S})),n.d(e,"r",(function(){return M})),n.d(e,"q",(function(){return F}));var r=n("b6bd");function a(t){return Object(r.a)({url:"app/routine",method:"get",params:t})}function i(){return Object(r.a)({url:"app/routine/syncSubscribe",method:"GET"})}function o(){return Object(r.a)({url:"app/wechat/syncSubscribe",method:"GET"})}function u(){return Object(r.a)({url:"app/routine/create",method:"get"})}function c(t){return Object(r.a)({url:"app/routine/".concat(t,"/edit"),method:"get"})}function s(t){return Object(r.a)({url:"app/routine/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function l(t){return Object(r.a)({url:"app/wechat/menu",method:"get"})}function d(t){return Object(r.a)({url:"app/wechat/menu",method:"post",data:t})}function p(t){return Object(r.a)({url:"app/wechat/template",method:"get",params:t})}function f(){return Object(r.a)({url:"app/wechat/template/create",method:"get"})}function m(t){return Object(r.a)({url:"app/wechat/template/".concat(t,"/edit"),method:"get"})}function h(t){return Object(r.a)({url:"app/wechat/template/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function b(t){return Object(r.a)({url:t.url,method:"post",data:t.key})}function g(t){return Object(r.a)({url:"app/routine/download",method:"post",data:t})}function y(){return Object(r.a)({url:"app/routine/info",method:"get"})}function v(t){return Object(r.a)({url:"app/wechat/keyword",method:"get",params:t})}function w(t){return Object(r.a)({url:"app/wechat/keyword/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function O(t,e){return Object(r.a)({url:t,method:"get",params:e.key})}function j(t){return Object(r.a)({url:"/app/wechat/news",method:"POST",data:t})}function _(t){return Object(r.a)({url:"app/wechat/news",method:"GET",params:t})}function x(t){return Object(r.a)({url:"app/wechat/news/".concat(t),method:"GET"})}function P(t){return Object(r.a)({url:"app/wechat/user",method:"GET",params:t})}function E(){return Object(r.a)({url:"app/wechat/user/tag_group",method:"GET"})}function $(t){return Object(r.a)({url:t,method:"GET"})}function k(){return Object(r.a)({url:"app/wechat/tag",method:"GET"})}function T(){return Object(r.a)({url:"app/wechat/tag/create",method:"GET"})}function D(t){return Object(r.a)({url:"app/wechat/tag/".concat(t,"/edit"),method:"GET"})}function C(){return Object(r.a)({url:"app/wechat/group",method:"GET"})}function V(){return Object(r.a)({url:"app/wechat/group/create",method:"GET"})}function G(t){return Object(r.a)({url:"app/wechat/group/".concat(t,"/edit"),method:"GET"})}function L(t){return Object(r.a)({url:"app/wechat/action",method:"GET",params:t})}function S(t){return Object(r.a)({url:"app/wechat/code_reply/".concat(t),method:"GET"})}function M(){return Object(r.a)({url:"/app/wechat/card",method:"GET"})}function F(t){return Object(r.a)({url:"/app/wechat/card",method:"post",data:t})}},f2d5:function(t,e,n){"use strict";n.r(e);var r=n("a34a"),a=n.n(r),i=n("b562"),o=n("2f62"),u=n("61f7"),c=n("d708");function s(t,e,n,r,a,i,o){try{var u=t[i](o),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,a)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){s(i,r,a,o,u,"next",t)}function u(t){s(i,r,a,o,u,"throw",t)}o(void 0)}))}}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f={name:"routineTemplate",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(u.a)(e,"yyyy-MM-dd hh:mm")}}},data:function(){return{roterPre:c.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"模板ID",key:"tempid",minWidth:300},{title:"模板名",key:"name",minWidth:120},{title:"回复内容",slot:"content",minWidth:200},{title:"状态",slot:"status",minWidth:150},{title:"添加时间",slot:"add_time",minWidth:150},{title:"操作",slot:"action",fixed:"right",minWidth:120}],formValidate:{status:"",name:"",page:1,limit:20},tabList:[],total:0,FromData:null,delfromData:{},industry:null}},created:function(){this.getList()},watch:{$route:function(t,e){this.getList()}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(n,!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(o.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"left"}}),methods:{del:function(t,e,n){var r=this,a=null;a=this.$route.path===this.roterPre+"/app/routine/routine_template/index"?{title:e,num:n,url:"app/routine/".concat(t.id),method:"DELETE",ids:""}:{title:e,num:n,url:"app/wechat/template/".concat(t.id),method:"DELETE",ids:""},this.$modalSure(a).then((function(t){r.$Message.success(t.msg),r.tabList.splice(n,1)})).catch((function(t){r.$Message.error(t.msg)}))},onchangeIsShow:function(t){var e=this,n={id:t.id,status:t.status};(this.$route.path===this.roterPre+"/app/routine/routine_template/index"?Object(i.m)(n):Object(i.C)(n)).then(function(){var t=l(a.a.mark((function t(n){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(n.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.formValidate.status=this.formValidate.status||"",(this.$route.path===this.roterPre+"/app/routine/routine_template/index"?Object(i.l)(this.formValidate):Object(i.x)(this.formValidate)).then(function(){var e=l(a.a.mark((function e(n){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tabList=r.list,t.total=r.count,t.industry=r.industry||null,t.loading=!1;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},add:function(){var t=this;this.$route.path===this.roterPre+"/app/routine/routine_template/index"?this.$modalForm(Object(i.h)(this.formValidate)).then((function(){return t.getList()})):this.$modalForm(Object(i.s)(this.formValidate)).then((function(){return t.getList()}))},edit:function(t){var e=this;this.$route.path===this.roterPre+"/app/routine/routine_template/index"?this.$modalForm(Object(i.j)(t.id)).then((function(){return e.getList()})):this.$modalForm(Object(i.t)(t.id)).then((function(){return e.getList()}))},userSearchs:function(){this.formValidate.page=1,this.getList()},syncTemplate:function(){var t=this;Object(i.n)().then((function(e){t.$Message.success(e.msg),t.getList()})).catch((function(e){t.$Message.error(e.msg)}))}}},m=(n("7585"),n("2877")),h=Object(m.a)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"i-layout-page-header"},[n("PageHeader",{staticClass:"product_tabs",attrs:{title:t.$route.meta.title,"hidden-breadcrumb":""}})],1),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Form",{ref:"formValidate",staticClass:"mb20",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Row",{attrs:{type:"flex",gutter:24}},[n("Col",t._b({},"Col",t.grid,!1),[n("FormItem",{attrs:{label:"是否有效:","label-for":"status"}},[n("Select",{attrs:{placeholder:"请选择","element-id":"status",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[n("Option",{attrs:{value:"1"}},[t._v("开启")]),n("Option",{attrs:{value:"0"}},[t._v("关闭")])],1)],1)],1),n("Col",t._b({},"Col",t.grid,!1),[n("FormItem",{attrs:{label:"模板名称:","label-for":"name"}},[n("Input",{attrs:{search:"","enter-button":"",placeholder:"请输入模板名称"},on:{"on-search":t.userSearchs},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1)],1)],1),n("Row",{attrs:{type:"flex"}},[n("Col",t._b({},"Col",t.grid,!1),[n("Button",{directives:[{name:"auth",rawName:"v-auth",value:["app-wechat-template-create","app-routine-create"],expression:"['app-wechat-template-create','app-routine-create']"}],attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加模板消息")]),t.$route.path==t.roterPre+"/app/routine/routine_template/index"?n("Button",{directives:[{name:"auth",rawName:"v-auth",value:["app-wechat-template-sync"],expression:"['app-wechat-template-sync']"}],staticClass:"btn-add",attrs:{icon:"md-list",type:"success"},on:{click:t.syncTemplate}},[t._v("一键同步")]):t._e()],1)],1)],1),t.industry?n("Alert",[n("template",{slot:"desc"},[n("div",[t._v("\n 主营行业:"+t._s(t.industry.primary_industry.first_class?t.industry.primary_industry.first_class+"||":t.industry.primary_industry)+" "+t._s(t.industry.primary_industry.second_class?t.industry.primary_industry.second_class:"")+"\n ")]),n("div",[t._v("\n 副营行业:"+t._s(t.industry.secondary_industry.first_class?t.industry.primary_industry.first_class+"||":t.industry.primary_industry)+" "+t._s(t.industry.primary_industry.second_class?t.industry.primary_industry.second_class:"")+"\n ")])])],2):t._e(),n("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.tabList,loading:t.loading,"no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"status",fn:function(e){var r=e.row;return e.index,[n("i-switch",{attrs:{value:r.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(r)}},model:{value:r.status,callback:function(e){t.$set(r,"status",e)},expression:"row.status"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"content",fn:function(e){var r=e.row;return e.index,[n("div",{staticClass:"template_sp_box"},t._l(r.content,(function(e,r){return n("span",{key:r,staticClass:"template_sp"},[t._v(t._s(e))])})),0)]}},{key:"add_time",fn:function(e){var r=e.row;return e.index,[n("span",[t._v(" "+t._s(t._f("formatDate")(Number(r.add_time))))])]}},{key:"action",fn:function(e){var r=e.row,a=e.index;return[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.edit(r)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.del(r,"删除模板",a)}}},[t._v("删除")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"4b42c2d0",null);e.default=h.exports}}]);