You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
9.7 KiB
1 lines
9.7 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-51ee628c"],{"277f":function(t,a,e){"use strict";e.d(a,"b",(function(){return o})),e.d(a,"a",(function(){return i})),e.d(a,"c",(function(){return r})),e.d(a,"d",(function(){return n}));var s=e("b6bd");function o(t){return Object(s.a)({url:"setting/notification/index?type=".concat(t),method:"get"})}function i(t,a){return Object(s.a)({url:"setting/notification/info?id=".concat(t,"&type=").concat(a),method:"get"})}function r(t){return Object(s.a)({url:"setting/notification/save",method:"post",data:t})}function n(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){"use strict";e.r(a);var s=e("277f"),o=e("d708"),i={data:function(){return{roterPre:o.a.roterPre,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,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.changeTabs("is_system")},methods:{changeTabs:function(t){this.getData(this.id,t)},getData:function(t,a){var e=this;this.loading=!0,this.formData={},Object(s.a)(t,a).then((function(s){e.tabsList.length||(e.tabs.map((function(t){s.data[t.slot]&&e.tabsList.push(t)})),a=e.tabsList[0].slot),e.formData=s.data,e.formData.type=a,e.formData.id=t,e.loading=!1})).catch((function(t){e.$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")}}},r=(e("ec78"),e("2877")),n=Object(r.a)(i,(function(){var t=this,a=t._self._c;return a("div",{staticClass:"edit"},[a("div",{staticClass:"i-layout-page-header"},[a("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[a("div",{attrs:{slot:"title"},slot:"title"},[a("router-link",{attrs:{to:{path:"".concat(t.roterPre,"/setting/notification/index")}}},[a("div",{staticClass:"font-sm after-line"},[a("span",{staticClass:"iconfont iconfanhui"}),a("span",{staticClass:"pl10"},[t._v("返回")])])]),a("span",{staticClass:"mr20",domProps:{textContent:t._s(t.$route.meta.title)}})],1)])],1),a("div",{staticClass:"tabs"},[a("Row",{attrs:{gutter:32}},[a("Col",{staticClass:"demo-tabs-style1",staticStyle:{padding:"16px"},attrs:{span:"32"}},[a("Tabs",{on:{"on-click":t.changeTabs}},t._l(t.tabsList,(function(e,s){return a("TabPane",{key:s,attrs:{name:e.slot,label:e.title}},[a("Form",{ref:"formData",refInFor:!0,staticClass:"form-sty",attrs:{model:t.formData,rules:t.ruleValidate,"label-width":80}},["is_system"!==e.slot||t.loading?t._e():a("div",[a("FormItem",{attrs:{label:"通知标题"}},[a("Input",{staticClass:"input-add",attrs:{placeholder:"请输入通知标题"},model:{value:t.formData.system_title,callback:function(a){t.$set(t.formData,"system_title",a)},expression:"formData.system_title"}})],1),a("FormItem",{attrs:{label:"通知内容"}},[a("div",{staticClass:"content"},[a("Input",{staticClass:"input-add",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("\n 请输入模板消息详细内容对应的变量。关键字个数需与已添加的模板一致。\n 可以使用如下变量:\n ")]),t._l(t.formData.variable.split(","),(function(e,s){return a("div",[t._v("\n "+t._s(e)+"\n ")])}))],2)],1)]),a("FormItem",{attrs:{label:"状态",prop:"is_system"}},[a("RadioGroup",{model:{value:t.formData.is_system,callback:function(a){t.$set(t.formData,"is_system",a)},expression:"formData.is_system"}},[a("Radio",{attrs:{label:1}},[t._v("是")]),a("Radio",{attrs:{label:2}},[t._v("否")])],1)],1)],1),"is_sms"!==e.slot||t.loading?"is_wechat"!==e.slot||t.loading?"is_routine"!==e.slot||t.loading?"is_ent_wechat"!==e.slot||t.loading?t._e():a("div",[a("FormItem",{attrs:{label:"通知内容"}},[a("div",{staticClass:"content"},[a("Input",{staticClass:"input-add",attrs:{type:"textarea",autosize:{minRows:5,maxRows:8},placeholder:"请输入通知内容"},model:{value:t.formData.ent_wechat_text,callback:function(a){t.$set(t.formData,"ent_wechat_text",a)},expression:"formData.ent_wechat_text"}}),a("div",{staticClass:"trip"},[a("div",[t._v("\n 请输入模板消息详细内容对应的变量。关键字个数需与已添加的模板一致。\n 可以使用如下变量:\n ")]),t._l(t.formData.variable.split(","),(function(e,s){return a("div",[t._v("\n "+t._s(e)+"\n ")])}))],2)],1)]),a("FormItem",{attrs:{label:"机器人链接"}},[a("div",{staticClass:"content"},[a("Input",{staticClass:"input-add",attrs:{placeholder:"请输入机器人链接"},model:{value:t.formData.url,callback:function(a){t.$set(t.formData,"url",a)},expression:"formData.url"}}),a("div",{staticClass:"trip"},[t._v("\n 企业微信群机器人链接\n ")])],1)]),a("FormItem",{attrs:{label:"状态",prop:"is_ent_wechat"}},[a("RadioGroup",{model:{value:t.formData.is_ent_wechat,callback:function(a){t.$set(t.formData,"is_ent_wechat",a)},expression:"formData.is_ent_wechat"}},[a("Radio",{attrs:{label:1}},[t._v("是")]),a("Radio",{attrs:{label:2}},[t._v("否")])],1)],1)],1):a("div",[a("FormItem",{attrs:{label:"通知场景"}},[a("Input",{staticClass:"input-add",attrs:{disabled:"",placeholder:"请输入通知场景"},model:{value:t.formData.name,callback:function(a){t.$set(t.formData,"name",a)},expression:"formData.name"}})],1),a("FormItem",{attrs:{label:"模板编号"}},[a("Input",{staticClass:"input-add",attrs:{disabled:"",placeholder:"请输入模板编号"},model:{value:t.formData.routine_id,callback:function(a){t.$set(t.formData,"routine_id",a)},expression:"formData.routine_id"}})],1),a("FormItem",{attrs:{label:"模板ID"}},[a("Input",{staticClass:"input-add",attrs:{placeholder:"请输入模板ID"},model:{value:t.formData.tempid,callback:function(a){t.$set(t.formData,"tempid",a)},expression:"formData.tempid"}})],1),a("FormItem",{attrs:{label:"模板"}},[a("Input",{staticClass:"input-add",attrs:{disabled:"",type:"textarea",autosize:{minRows:5,maxRows:8},placeholder:"请输入模板"},model:{value:t.formData.content,callback:function(a){t.$set(t.formData,"content",a)},expression:"formData.content"}})],1),a("FormItem",{attrs:{label:"状态",prop:"is_routine"}},[a("RadioGroup",{model:{value:t.formData.is_routine,callback:function(a){t.$set(t.formData,"is_routine",a)},expression:"formData.is_routine"}},[a("Radio",{attrs:{label:1}},[t._v("是")]),a("Radio",{attrs:{label:2}},[t._v("否")])],1)],1)],1):a("div",[a("FormItem",{attrs:{label:"通知场景"}},[a("Input",{staticClass:"input-add",attrs:{disabled:"",placeholder:"请输入通知场景"},model:{value:t.formData.name,callback:function(a){t.$set(t.formData,"name",a)},expression:"formData.name"}})],1),a("FormItem",{attrs:{label:"模板编号"}},[a("Input",{staticClass:"input-add",attrs:{disabled:"",placeholder:"请输入通模板编号"},model:{value:t.formData.wechat_id,callback:function(a){t.$set(t.formData,"wechat_id",a)},expression:"formData.wechat_id"}})],1),a("FormItem",{attrs:{label:"通知标题"}},[a("Input",{staticClass:"input-add",attrs:{disabled:"",placeholder:"请输入通知标题"},model:{value:t.formData.title,callback:function(a){t.$set(t.formData,"title",a)},expression:"formData.title"}})],1),a("FormItem",{attrs:{label:"模板ID"}},[a("Input",{staticClass:"input-add",attrs:{placeholder:"请输入模板ID"},model:{value:t.formData.tempid,callback:function(a){t.$set(t.formData,"tempid",a)},expression:"formData.tempid"}})],1),a("FormItem",{attrs:{label:"模板"}},[a("Input",{staticClass:"input-add",attrs:{disabled:"",type:"textarea",autosize:{minRows:5,maxRows:8},placeholder:"请输入模板"},model:{value:t.formData.content,callback:function(a){t.$set(t.formData,"content",a)},expression:"formData.content"}})],1),a("FormItem",{attrs:{label:"状态",prop:"is_wechat"}},[a("RadioGroup",{model:{value:t.formData.is_wechat,callback:function(a){t.$set(t.formData,"is_wechat",a)},expression:"formData.is_wechat"}},[a("Radio",{attrs:{label:1}},[t._v("是")]),a("Radio",{attrs:{label:2}},[t._v("否")])],1)],1)],1):a("div",[a("FormItem",{attrs:{label:"通知场景"}},[a("Input",{staticClass:"input-add",attrs:{placeholder:"请输入通知场景"},model:{value:t.formData.name,callback:function(a){t.$set(t.formData,"name",a)},expression:"formData.name"}})],1),a("FormItem",{attrs:{label:"通知内容"}},[a("Input",{staticClass:"input-add",attrs:{disabled:"",type:"textarea",autosize:{minRows:5,maxRows:8},placeholder:"请输入通知内容"},model:{value:t.formData.content,callback:function(a){t.$set(t.formData,"content",a)},expression:"formData.content"}})],1),a("FormItem",{attrs:{label:"状态",prop:"is_sms"}},[a("RadioGroup",{model:{value:t.formData.is_sms,callback:function(a){t.$set(t.formData,"is_sms",a)},expression:"formData.is_sms"}},[a("Radio",{attrs:{label:1}},[t._v("是")]),a("Radio",{attrs:{label:2}},[t._v("否")])],1)],1)],1),a("FormItem",[a("Button",{attrs:{type:"primary"},on:{click:function(a){return t.handleSubmit("formData")}}},[t._v("提交")])],1)],1)],1)})),1)],1)],1)],1)])}),[],!1,null,"72b92a8a",null);a.default=n.exports},e30a:function(t,a,e){},ec78:function(t,a,e){"use strict";e("e30a")}}]); |