1 line
8.9 KiB
JavaScript
1 line
8.9 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0f1100c7"],{"204a":function(t,a,e){},"277f":function(t,a,e){e.d(a,"b",(function(){return i})),e.d(a,"a",(function(){return l})),e.d(a,"c",(function(){return o})),e.d(a,"d",(function(){return r})),e("99af");var s=e("6b6c");function i(t){return Object(s.a)({url:"setting/notification/index?type=".concat(t),method:"get"})}function l(t,a){return Object(s.a)({url:"setting/notification/info?id=".concat(t,"&type=").concat(a),method:"get"})}function o(t){return Object(s.a)({url:"setting/notification/save",method:"post",data:t})}function r(t,a,e){return Object(s.a)({url:"setting/notification/set_status/".concat(t,"/").concat(a,"/").concat(e),method:"put"})}},"9d9f":function(t,a,e){e.r(a),e("d81d"),e("14d9"),e("e9f5"),e("ab43"),e("d3b7");var s=e("277f"),i={data:function(){return{tabs:[{title:"系统通知",slot:"is_system"},{title:"短信通知",slot:"is_sms"},{title:"微信模板消息",slot:"is_wechat"},{title:"微信小程序提醒",slot:"is_routine"},{title:"企业微信",slot:"is_ent_wechat"}],tabsList:[],formData:{},id:0,loading:!0,tagName:"is_system",ruleValidate:{name:[{required:!0,message:"请输入通知场景",trigger:"blur"}],title:[{required:!0,message:"请输入通知场景",trigger:"blur"}],content:[{required:!0,message:"请输入通知内容",trigger:"blur"}]}}},created:function(){this.id=this.$route.query.id,this.getData(this.id,this.tagName,1)},methods:{changeTabs:function(){this.getData(this.id,this.tagName)},getData:function(t,a,e){var i=this;this.loading=!0,this.formData={},Object(s.a)(t,a).then((function(s){i.tabsList.length||i.tabs.map((function(t){s.data[t.slot]&&i.tabsList.push(t)})),e&&(i.tagName=i.tabsList[0].slot),i.formData=s.data,i.formData.type=a,i.formData.id=t,i.loading=!1})).catch((function(t){i.$message.error(t.msg)}))},handleSubmit:function(t){var a=this;Object(s.c)(this.formData).then((function(t){a.$message.success("设置成功")})).catch((function(t){a.$message.error(t)}))},handleReset:function(t){this.$emit("close")}}};e("dd53"),e=e("2877"),e=Object(e.a)(i,(function(){var t=this,a=t._self._c;return a("div",{staticClass:"edit"},[a("pages-header",{ref:"pageHeader",attrs:{title:t.$route.meta.title,backUrl:t.$routeProStr+"/setting/notification/index"}}),a("div",{staticClass:"tabs mt16"},[a("el-row",{attrs:{gutter:32}},[a("el-col",{staticClass:"demo-tabs-style1",staticStyle:{padding:"16px"},attrs:{span:32}},[a("el-tabs",{on:{"tab-click":t.changeTabs},model:{value:t.tagName,callback:function(a){t.tagName=a},expression:"tagName"}},t._l(t.tabsList,(function(e,s){return a("el-tab-pane",{key:s,attrs:{name:e.slot,label:e.title}},[a("el-form",{ref:"formData",refInFor:!0,staticClass:"form-sty",attrs:{model:t.formData,rules:t.ruleValidate,"label-width":"85px"}},["is_system"!==e.slot||t.loading?t._e():a("div",[a("el-form-item",{attrs:{label:"通知标题:"}},[a("el-input",{staticStyle:{width:"500px"},attrs:{placeholder:"请输入通知标题"},model:{value:t.formData.system_title,callback:function(a){t.$set(t.formData,"system_title",a)},expression:"formData.system_title"}})],1),a("el-form-item",{attrs:{label:"通知内容:"}},[a("div",{staticClass:"content"},[a("el-input",{staticStyle:{width:"500px"},attrs:{type:"textarea",autosize:{minRows:5,maxRows:8},placeholder:"请输入通知内容"},model:{value:t.formData.system_text,callback:function(a){t.$set(t.formData,"system_text",a)},expression:"formData.system_text"}}),a("div",{staticClass:"trip"},[a("div",[t._v("请输入模板消息详细内容对应的变量。关键字个数需与已添加的模板一致。 可以使用如下变量:")]),t._l(t.formData.variable.split(","),(function(e,s){return a("div",{key:s},[t._v("\n "+t._s(e)+"\n ")])}))],2)],1)]),a("el-form-item",{attrs:{label:"状态:",prop:"is_system"}},[a("el-radio-group",{model:{value:t.formData.is_system,callback:function(a){t.$set(t.formData,"is_system",a)},expression:"formData.is_system"}},[a("el-radio",{attrs:{label:1}},[t._v("开启")]),a("el-radio",{attrs:{label:2}},[t._v("关闭
|