CRMEB/crmeb/public/admin/js/chunk-5e682a49.1c65ba01.js
2022-03-03 11:45:22 +08:00

1 line
9.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e682a49"],{"277f":function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"d",(function(){return s}));var a=e("6b6c");function r(t){return Object(a["a"])({url:"setting/notification/index?type=".concat(t),method:"get"})}function i(t,n){return Object(a["a"])({url:"setting/notification/info?id=".concat(t,"&type=").concat(n),method:"get"})}function c(t){return Object(a["a"])({url:"setting/notification/save",method:"post",data:t})}function s(t,n,e){return Object(a["a"])({url:"setting/notification/set_status/".concat(t,"/").concat(n,"/").concat(e),method:"put"})}},"474e":function(t,n,e){},aa0a:function(t,n,e){"use strict";e.r(n);var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"message"},[e("div",{staticClass:"i-layout-page-header"},[e("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))]),e("div",[e("Tabs",{on:{"on-click":t.changeTab},model:{value:t.currentTab,callback:function(n){t.currentTab=n},expression:"currentTab"}},t._l(t.headerList,(function(t,n){return e("TabPane",{key:n,attrs:{label:t.label,name:t.value.toString()}})})),1)],1)]),e("div",{staticClass:"table-box"},[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[1==t.currentTab?e("Row",{staticClass:"mb20",attrs:{type:"flex"}},[e("Col",t._b({},"Col",t.grid,!1),[e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["app-wechat-template-sync"],expression:"['app-wechat-template-sync']"}],staticStyle:{"margin-left":"20px"},attrs:{icon:"md-list",type:"success"},on:{click:t.routineTemplate}},[t._v("同步小程序订阅消息")]),e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["app-wechat-template-sync"],expression:"['app-wechat-template-sync']"}],staticStyle:{"margin-left":"20px"},attrs:{icon:"md-list",type:"success"},on:{click:t.wechatTemplate}},[t._v("同步微信模版消息")])],1)],1):t._e(),t.industry&&1==t.currentTab?e("Alert",[e("template",{slot:"desc"},[e("div",[t._v("\n 主营行业:"+t._s(t.industry.primary_industry.first_class?t.industry.primary_industry.first_class+"||":t.industry.primary_industry)+"\n "+t._s(t.industry.primary_industry.second_class?t.industry.primary_industry.second_class:"")+"\n ")]),e("div",[t._v("\n 副营行业:"+t._s(t.industry.secondary_industry.first_class?t.industry.secondary_industry.first_class+"||":t.industry.secondary_industry)+"\n "+t._s(t.industry.secondary_industry.second_class?t.industry.secondary_industry.second_class:"")+"\n ")])])],2):t._e(),e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:1==t.currentTab?t.columns:t.columns2,data:t.levelLists,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"name",fn:function(n){var a=n.row;n.index;return[e("span",{staticClass:"table"},[t._v("\n "+t._s(a.name)+"\n ")])]}},{key:"title",fn:function(n){var a=n.row;n.index;return[e("span",{staticClass:"table"},[t._v(t._s(a.title))])]}},t._l(["is_system","is_wechat","is_routine","is_sms","is_ent_wechat"],(function(n,a){return{key:n,fn:function(a){var r=a.row;return["is_ent_wechat"===n&&1==t.currentTab?e("div",[t._v("--")]):t._e(),r[n]>0&&1!==t.currentTab?e("i-switch",{attrs:{value:r[n],"true-value":1,"false-value":2,size:"large"},on:{"on-change":function(e){return t.changeSwitch(r,n)}},model:{value:r[n],callback:function(e){t.$set(r,n,e)},expression:"row[item]"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]):t._e()]}}})),{key:"setting",fn:function(n){var a=n.row;n.index;return[e("span",{staticClass:"setting btn",on:{click:function(n){return t.setting(t.item,a)}}},[t._v("设置")])]}}],null,!0)})],1)],1)])},r=[],i=e("277f"),c=e("b562"),s={data:function(){return{modalTitle:"",notificationModal:!1,headerList:[{label:"通知会员",value:"1"},{label:"通知平台",value:"2"}],columns:[{title:"ID",key:"id",align:"center",width:60},{title:"通知类型",slot:"name",align:"center",width:200},{title:"通知场景说明",slot:"title",align:"center",minWidth:200},{title:"站内信",slot:"is_system",align:"center",minWidth:100},{title:"公众号模板",slot:"is_wechat",align:"center",minWidth:100},{title:"小程序订阅",slot:"is_routine",align:"center",minWidth:100},{title:"发送短信",slot:"is_sms",align:"center",minWidth:100},{title:"设置",slot:"setting",width:150,align:"center"}],columns2:[{title:"ID",key:"id",align:"center",width:60},{title:"通知类型",slot:"name",align:"center",width:200},{title:"通知场景说明",slot:"title",align:"center",minWidth:200},{title:"站内信",slot:"is_system",align:"center",minWidth:100},{title:"公众号模板",slot:"is_wechat",align:"center",minWidth:100},{title:"发送短信",slot:"is_sms",align:"center",minWidth:100},{title:"企业微信",slot:"is_ent_wechat",align:"center",minWidth:100},{title:"设置",slot:"setting",width:150,align:"center"}],levelLists:[],currentTab:"1",loading:!1,formData:{},industry:null}},created:function(){this.changeTab(this.currentTab)},methods:{changeSwitch:function(t,n){var e=this;Object(i["d"])(n,t[n],t.id).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))},changeTab:function(t){var n=this;Object(i["b"])(t).then((function(t){n.levelLists=t.data.list,n.industry=t.data.industry}))},routineTemplate:function(){var t=this;Object(c["j"])().then((function(n){t.$Message.success(n.msg),t.changeTab(t.currentTab)})).catch((function(n){t.$Message.error(n.msg)}))},wechatTemplate:function(){var t=this;Object(c["t"])().then((function(n){t.$Message.success(n.msg),t.changeTab(t.currentTab)})).catch((function(n){t.$Message.error(n.msg)}))},changeStatus:function(){},notice:function(){},setting:function(t,n){this.$router.push({path:"/admin/setting/notification/notificationEdit?id="+n.id})},getData:function(t,n,e){var a=this;this.formData={},Object(i["a"])(n.id,e).then((function(n){t.map((function(t,e){a.formData[t]=n.data[t]})),a.formData.type=e,a.notificationModal=!0}))}}},u=s,o=(e("ff31"),e("2877")),l=Object(o["a"])(u,a,r,!1,null,"62c2278e",null);n["default"]=l.exports},b562:function(t,n,e){"use strict";e.d(n,"j",(function(){return r})),e.d(n,"t",(function(){return i})),e.d(n,"p",(function(){return c})),e.d(n,"a",(function(){return s})),e.d(n,"g",(function(){return u})),e.d(n,"h",(function(){return o})),e.d(n,"i",(function(){return l})),e.d(n,"d",(function(){return d})),e.d(n,"e",(function(){return f})),e.d(n,"f",(function(){return h})),e.d(n,"q",(function(){return p})),e.d(n,"s",(function(){return m})),e.d(n,"r",(function(){return b})),e.d(n,"x",(function(){return g})),e.d(n,"k",(function(){return _})),e.d(n,"c",(function(){return y})),e.d(n,"w",(function(){return w})),e.d(n,"u",(function(){return v})),e.d(n,"v",(function(){return T})),e.d(n,"o",(function(){return j})),e.d(n,"m",(function(){return O})),e.d(n,"n",(function(){return k})),e.d(n,"l",(function(){return E})),e.d(n,"b",(function(){return x}));var a=e("6b6c");function r(){return Object(a["a"])({url:"app/routine/syncSubscribe",method:"GET"})}function i(){return Object(a["a"])({url:"app/wechat/syncSubscribe",method:"GET"})}function c(t){return Object(a["a"])({url:"app/wechat/menu",method:"get"})}function s(t){return Object(a["a"])({url:"app/wechat/menu",method:"post",data:t})}function u(t){return Object(a["a"])({url:t.url,method:"post",data:t.key})}function o(t){return Object(a["a"])({url:"app/routine/download",method:"post",data:t})}function l(){return Object(a["a"])({url:"app/routine/info",method:"get"})}function d(t){return Object(a["a"])({url:"app/wechat/keyword",method:"get",params:t})}function f(t){return Object(a["a"])({url:"app/wechat/keyword/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function h(t,n){return Object(a["a"])({url:t,method:"get",params:n.key})}function p(t){return Object(a["a"])({url:"/app/wechat/news",method:"POST",data:t})}function m(t){return Object(a["a"])({url:"app/wechat/news",method:"GET",params:t})}function b(t){return Object(a["a"])({url:"app/wechat/news/".concat(t),method:"GET"})}function g(t){return Object(a["a"])({url:"app/wechat/user",method:"GET",params:t})}function _(){return Object(a["a"])({url:"app/wechat/user/tag_group",method:"GET"})}function y(t){return Object(a["a"])({url:t,method:"GET"})}function w(){return Object(a["a"])({url:"app/wechat/tag",method:"GET"})}function v(){return Object(a["a"])({url:"app/wechat/tag/create",method:"GET"})}function T(t){return Object(a["a"])({url:"app/wechat/tag/".concat(t,"/edit"),method:"GET"})}function j(){return Object(a["a"])({url:"app/wechat/group",method:"GET"})}function O(){return Object(a["a"])({url:"app/wechat/group/create",method:"GET"})}function k(t){return Object(a["a"])({url:"app/wechat/group/".concat(t,"/edit"),method:"GET"})}function E(t){return Object(a["a"])({url:"app/wechat/action",method:"GET",params:t})}function x(t){return Object(a["a"])({url:"app/wechat/code_reply/".concat(t),method:"GET"})}},ff31:function(t,n,e){"use strict";var a=e("474e"),r=e.n(a);r.a}}]);