(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3110c4b0"],{"0bce":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"divBox"},[i("div",[i("el-card",{staticClass:"box-card",attrs:{bordered:!1}},[i("div",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:system:notification:list"],expression:"['platform:system:notification:list']"}]},[i("el-tabs",{on:{"tab-click":t.changeTab},model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.headerList,(function(t,e){return i("el-tab-pane",{key:e+"-only",attrs:{label:t.label,name:t.value.toString()}})})),1)],1),t._v(" "),i("el-row",{staticClass:"mb20 mt-1",attrs:{type:"flex"}},[i("el-col",[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:wechat:routine:sync"],expression:"['platform:wechat:routine:sync']"}],attrs:{type:"primary",icon:"el-icon-document"},on:{click:function(e){return t.syncRoutine()}}},[t._v("同步小程序订阅消息")]),t._v(" "),i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:wechat:whcbqhn:sync"],expression:"['platform:wechat:whcbqhn:sync']"}],attrs:{type:"primary",icon:"el-icon-document"},on:{click:function(e){return t.syncWechat()}}},[t._v("同步微信模版消息")])],1)],1),t._v(" "),i("div",{staticClass:"description"},[i("p",[i("span",{staticClass:"iconfont iconxiaochengxu"}),t._v(" 小程序经营类目:生活服务 > 百货/超市/便利店")]),t._v(" "),i("p",[i("span",{staticClass:"iconfont icongongzhonghao"}),t._v(" 公众号经营类目:IT科技/互联网|电子商务,IT科技/IT软件与服务\n ")])]),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingList,expression:"loadingList"}],ref:"table",staticClass:"mt25",attrs:{data:t.levelLists,size:"small","header-cell-style":{fontWeight:"bold"}}},[i("el-table-column",{attrs:{label:"ID",prop:"id",width:"80"}}),t._v(" "),i("el-table-column",{attrs:{label:"通知类型",prop:"type"}}),t._v(" "),i("el-table-column",{attrs:{label:"通知场景说明",prop:"description"}}),t._v(" "),i("el-table-column",{attrs:{label:"标识",prop:"mark"}}),t._v(" "),"1"==t.currentTab?i("el-table-column",{attrs:{label:"公众号模板",prop:"isWechat"},scopedSlots:t._u([{key:"default",fn:function(e){return 0!==e.row.isWechat?[t.checkPermi(["platform:system:notification:wechat:switch"])?i("el-switch",{attrs:{"active-value":1,"inactive-value":2,"active-text":"启用","inactive-text":"禁用"},on:{change:function(i){return t.changeWechat(e.row)}},model:{value:e.row.isWechat,callback:function(i){t.$set(e.row,"isWechat",i)},expression:"scope.row.isWechat"}}):i("div",[t._v(t._s(1===e.row.isWechat?"启用":"禁用"))])]:void 0}}],null,!0)}):t._e(),t._v(" "),"1"==t.currentTab?i("el-table-column",{attrs:{label:"小程序订阅",prop:"isRoutine"},scopedSlots:t._u([{key:"default",fn:function(e){return 0!==e.row.isRoutine?[t.checkPermi(["platform:system:notification:routine:switch"])?i("el-switch",{attrs:{"active-value":1,"inactive-value":2,"active-text":"启用","inactive-text":"禁用"},on:{change:function(i){return t.changeRoutine(e.row)}},model:{value:e.row.isRoutine,callback:function(i){t.$set(e.row,"isRoutine",i)},expression:"scope.row.isRoutine"}}):i("div",[t._v(t._s(1===e.row.isRoutine?"启用":"禁用"))])]:void 0}}],null,!0)}):t._e(),t._v(" "),i("el-table-column",{attrs:{label:"发送短信",prop:"isSms"},scopedSlots:t._u([{key:"default",fn:function(e){return 0!==e.row.isSms?[t.checkPermi(["platform:system:notification:sms:switch"])?i("el-switch",{attrs:{"active-value":1,"inactive-value":2,"active-text":"启用","inactive-text":"禁用"},on:{change:function(i){return t.changeSms(e.row)}},model:{value:e.row.isSms,callback:function(i){t.$set(e.row,"isSms",i)},expression:"scope.row.isSms"}}):i("div",[t._v(t._s(1===e.row.isSms?"启用":"禁用"))])]:void 0}}],null,!0)}),t._v(" "),i("el-table-column",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:system:notification:detail"],expression:"['platform:system:notification:detail']"}],attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"text"},on:{click:function(i){return t.setting(e.row)}}},[t._v("详情")])]}}])})],1)],1)],1),t._v(" "),i("el-dialog",{attrs:{title:"通知详情",visible:t.centerDialogVisible,width:"50%"},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[i("el-tabs",{on:{"tab-click":t.changeInfo},model:{value:t.infoTab,callback:function(e){t.infoTab=e},expression:"infoTab"}},[t._l("1"==t.currentTab?t.infoList:t.infoList1,(function(t,e){return i("el-tab-pane",{key:e,attrs:{label:t.label,name:t.value.toString()}})})),t._v(" "),i("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"form",attrs:{model:t.form,"label-width":"80px"}},[i("el-form-item",{attrs:{label:"ID"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.id,callback:function(e){t.$set(t.form,"id","string"===typeof e?e.trim():e)},expression:"form.id"}})],1),t._v(" "),t.form.name?i("el-form-item",{attrs:{label:"模板名"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}})],1):t._e(),t._v(" "),t.form.tempId?i("el-form-item",{attrs:{label:"模板ID"}},[i("el-input",{model:{value:t.form.tempId,callback:function(e){t.$set(t.form,"tempId","string"===typeof e?e.trim():e)},expression:"form.tempId"}})],1):t._e(),t._v(" "),t.form.tempKey?i("el-form-item",{attrs:{label:"模板编号"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.tempKey,callback:function(e){t.$set(t.form,"tempKey","string"===typeof e?e.trim():e)},expression:"form.tempKey"}})],1):t._e(),t._v(" "),t.form.title?i("el-form-item",{attrs:{label:"模板说明"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title","string"===typeof e?e.trim():e)},expression:"form.title"}})],1):t._e(),t._v(" "),t.form.content?i("el-form-item",{attrs:{label:"模板内容"}},[i("el-input",{attrs:{disabled:""},model:{value:t.form.content,callback:function(e){t.$set(t.form,"content","string"===typeof e?e.trim():e)},expression:"form.content"}})],1):t._e(),t._v(" "),i("el-form-item",{attrs:{label:"状态"}},[i("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[i("el-radio",{attrs:{label:"1"}},[t._v("开启")]),t._v(" "),i("el-radio",{attrs:{label:"2"}},[t._v("关闭")])],1)],1)],1)],2),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit()}}},[t._v("确 定")])],1)],1)],1)},n=[],o=i("92c6"),s=i("ffd2"),l=i("61f7"),c=i("e350"),r={data:function(){return{modalTitle:"",notificationModal:!1,headerList:[{label:"通知会员",value:"1"}],id:0,levelLists:[],currentTab:"1",loading:!1,formData:{},industry:null,loadingList:!1,centerDialogVisible:!1,infoList:[],infoList1:[{label:"短信",value:"sms"}],form:{content:"",name:"",id:"",status:null,tempId:"",tempKey:"",title:""},detailType:"",infoTab:""}},created:function(){Object(c["a"])(["platform:system:notification:list"])&&this.getNotificationList(Number(this.currentTab))},methods:{checkPermi:c["a"],changeTab:function(t){this.getNotificationList(t.name)},getNotificationList:function(t){var e=this;this.loadingList=!0,Object(o["g"])({sendType:t}).then((function(t){e.loadingList=!1,e.levelLists=t})).catch((function(t){e.loadingList=!1}))},changeWechat:function(t){var e=this;Object(o["k"])(t.id).then((function(t){e.$modal.msgSuccess("修改成功")}))},changeRoutine:function(t){var e=this;Object(o["h"])(t.id).then((function(t){e.$modal.msgSuccess("修改成功")}))},changeSms:function(t){var e=this;Object(o["i"])(t.id).then((function(t){e.$modal.msgSuccess("修改成功")}))},changeInfo:function(t){this.getNotificationDetail(t)},getNotificationDetail:function(t){var e=this;this.loading=!0;var i={id:this.id,type:t.name};this.$set(this,"detailType",i.type),Object(o["f"])(i).then((function(t){e.form=t,e.$set(e.form,"status",t.status.toString()),e.loading=!1})).catch((function(t){e.loading=!1}))},setting:function(t){this.infoList=[],this.id=t.id,this.centerDialogVisible=!0,0!==t.isWechat&&this.infoList.push({label:"公众号模板消息",value:"wechat"}),0!==t.isRoutine&&this.infoList.push({label:"小程序订阅消息",value:"routine"}),0!==t.isSms&&this.infoList.push({label:"短信",value:"sms"}),this.infoTab=this.infoList[0].value,this.getNotificationDetail({name:this.infoTab})},submit:Object(l["a"])((function(){var t=this,e={id:this.id,status:Number(this.form.status),tempId:this.form.tempId,type:this.detailType};Object(o["j"])(e).then((function(e){t.$modal.msgSuccess("修改成功"),t.centerDialogVisible=!1,t.getNotificationList()}))})),syncWechat:function(){var t=this;Object(s["e"])().then((function(e){t.$message.success("同步成功")}))},syncRoutine:function(){var t=this;Object(s["c"])().then((function(e){t.$message.success("同步成功")}))}}},u=r,m=(i("9d9b"),i("2877")),f=Object(m["a"])(u,a,n,!1,null,"44e56070",null);e["default"]=f.exports},5738:function(t,e,i){},"9d9b":function(t,e,i){"use strict";i("5738")}}]);