1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-45f6d31b"],{"57ef":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"notify-template"},[n("el-card",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],staticStyle:{"margin-bottom":"15px","border-radius":"8px",width:"100%"}},[n("el-form",{ref:"queryForm",staticStyle:{"margin-bottom":"-18px",padding:"3px 0 0 0"},attrs:{model:e.queryParams,inline:!0,"label-width":"78px"},nativeOn:{submit:function(e){e.preventDefault()}}},[n("el-form-item",{attrs:{prop:"name"}},[n("el-input",{attrs:{placeholder:e.$t("notify.template.index.333542-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.name,callback:function(t){e.$set(e.queryParams,"name",t)},expression:"queryParams.name"}})],1),n("el-form-item",{attrs:{prop:"channelType"}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("notify.channel.index.333541-3"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.channelType,callback:function(t){e.$set(e.queryParams,"channelType",t)},expression:"queryParams.channelType"}},e._l(e.channelTypeList,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",{attrs:{prop:"serviceCode"}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("notify.template.index.333542-3"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.serviceCode,callback:function(t){e.$set(e.queryParams,"serviceCode",t)},expression:"queryParams.serviceCode"}},e._l(e.dict.type.notify_service_code,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("div",{staticStyle:{float:"right"}},[n("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("search")))]),n("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("reset")))])],1)],1)],1),n("el-card",{staticStyle:{"border-radius":"8px"}},[n("el-row",{staticStyle:{"margin-bottom":"16px"},attrs:{gutter:10}},[n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["notify:template:add"],expression:"['notify:template:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"small"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("add")))])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["notify:template:remove"],expression:"['notify:template:remove']"}],attrs:{plain:"",icon:"el-icon-delete",size:"small",disabled:e.multiple},on:{click:e.handleDelete}},[e._v(e._s(e.$t("del")))])],1),n("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.templateList,border:!1},on:{"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",align:"center",width:"55"}}),n("el-table-column",{attrs:{label:e.$t("notify.template.index.333542-35"),align:"left",prop:"id",width:"80"}}),n("el-table-column",{attrs:{label:e.$t("notify.template.index.333542-0"),align:"left",prop:"name","min-width":"190"}}),n("el-table-column",{attrs:{label:e.$t("notify.channel.index.333541-2"),align:"center",prop:"channelType",width:"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("dict-tag",{attrs:{options:e.dict.type.notify_channel_type,value:t.row.channelType}})]}}])}),n("el-table-column",{attrs:{label:e.$t("notify.template.index.333542-5"),align:"center",prop:"channelName",width:"160"}}),n("el-table-column",{attrs:{label:e.$t("notify.channel.index.333541-7"),align:"center",prop:"provider",width:"140"}}),n("el-table-column",{attrs:{label:e.$t("notify.template.index.333542-2"),align:"center",prop:"serviceCode",width:"110"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("dict-tag",{attrs:{options:e.dict.type.notify_service_code,value:t.row.serviceCode}})]}}])}),n("el-table-column",{attrs:{label:e.$t("notify.template.index.333542-6"),align:"center",prop:"status",width:"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(n){return e.handleStatus(t.row)}},model:{value:t.row.status,callback:function(n){e.$set(t.row,"status",n)},expression:"scope.row.status"}})]}}])}),n("el-table-column",{attrs:{label:e.$t("notify.channel.index.333541-8"),align:"center",prop:"createTime",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(e.parseTime(t.row.createTime,"{y}-{m}-{d} {h}:{m}:{s}")))])]}}])}),n("el-table-column",{attrs:{fixed:"right",label:e.$t("opation"),align:"center","class-name":"small-padding fixed-width",width:"185"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{size:"small",type:"text",icon:"el-icon-s-promotion"},on:{click:function(n){return e.getVariablesList(t.row)}}},[e._v(e._s(e.$t("notify.template.index.333542-7")))]),n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["notify:template:query"],expression:"['notify:template:query']"}],attrs:{size:"small",type:"text",icon:"el-icon-view"},on:{click:function(n){return e.handleUpdate(t.row)}}},[e._v(e._s(e.$t("detail")))]),n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["notify:template:remove"],expression:"['notify:template:remove']"}],attrs:{size:"small",type:"text",icon:"el-icon-delete"},on:{click:function(n){return e.handleDelete(t.row)}}},[e._v(e._s(e.$t("del")))])]}}])})],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],staticStyle:{"margin-bottom":"20px"},attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1),n("el-dialog",{attrs:{title:e.title,visible:e.open,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[n("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"110px"}},[n("el-form-item",{attrs:{label:e.$t("notify.template.index.333542-0"),prop:"name"}},[n("el-input",{staticStyle:{width:"390px"},attrs:{placeholder:e.$t("notify.template.index.333542-1")},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),n("el-form-item",{attrs:{label:e.$t("notify.template.index.333542-2"),prop:"serviceCode"}},[n("el-select",{staticStyle:{width:"390px",display:"inline-block"},attrs:{placeholder:e.$t("notify.template.index.333542-3")},model:{value:e.form.serviceCode,callback:function(t){e.$set(e.form,"serviceCode",t)},expression:"form.serviceCode"}},e._l(e.dict.type.notify_service_code,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",{attrs:{label:e.$t("notify.channel.index.333541-2"),prop:"channelType"}},[n("el-select",{staticStyle:{width:"390px"},attrs:{placeholder:e.$t("notify.channel.index.333541-3"),clearable:""},on:{change:e.changeChannel},model:{value:e.form.channelType,callback:function(t){e.$set(e.form,"channelType",t)},expression:"form.channelType"}},e._l(e.channelTypeList,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",{attrs:{label:e.$t("notify.channel.index.333541-9"),prop:"provider"}},[n("el-select",{staticStyle:{width:"390px"},attrs:{placeholder:e.$t("notify.channel.index.333541-10"),clearable:"",disabled:null==e.form.channelType},on:{change:e.changeService},model:{value:e.form.provider,callback:function(t){e.$set(e.form,"provider",t)},expression:"form.provider"}},e._l(e.providersList,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",{attrs:{label:e.$t("notify.template.index.333542-5"),prop:"channelId"}},[n("el-select",{staticStyle:{width:"390px",display:"inline-block"},attrs:{placeholder:e.$t("notify.template.index.333542-9"),disabled:null==this.form.provider},on:{change:e.getTemplateMsg},model:{value:e.form.channelId,callback:function(t){e.$set(e.form,"channelId",t)},expression:"form.channelId"}},e._l(e.channelIdList,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),"wechat"==this.form.channelType&&"mini_program"!=this.form.provider&&"public_account"!=this.form.provider&&null!=this.form.channelId?n("el-form-item",{attrs:{label:e.$t("notify.template.index.333542-10"),prop:"msgType"}},[n("el-select",{staticStyle:{width:"390px",display:"inline-block"},attrs:{placeholder:e.$t("notify.template.index.333542-11")},on:{change:e.getTemplateMsg},model:{value:e.form.msgType,callback:function(t){e.$set(e.form,"msgType",t)},expression:"form.msgType"}},e._l(e.dict.type.wecom_msg_type,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):e._e(),"dingtalk"==this.form.channelType&&null!=this.form.channelId?n("el-form-item",{attrs:{label:e.$t("notify.template.index.333542-10"),prop:"msgType"}},[n("el-select",{staticStyle:{width:"390px",display:"inline-block"},attrs:{placeholder:e.$t("notify.template.index.333542-12")},on:{change:e.getTemplateMsg},model:{value:e.form.msgType,callback:function(t){e.$set(e.form,"msgType",t)},expression:"form.msgType"}},e._l(e.dict.type.dingtalk_msg_type,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):e._e(),n("div"),e._l(e.configList,(function(t,i){return n("el-form-item",{key:i,attrs:{label:t.label}},["string"==t.type?n("el-input",{staticStyle:{width:"390px"},attrs:{placeholder:e.$t("notify.template.index.333542-13")},model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"item.value"}}):e._e(),"int"==t.type?n("el-input",{staticStyle:{width:"390px"},attrs:{placeholder:e.$t("notify.template.index.333542-13"),type:"number"},model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"item.value"}}):e._e(),"text"==t.type?n("editor",{staticStyle:{width:"390px"},attrs:{"min-height":192,url_type:e.url_type},model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"item.value"}}):e._e(),"boolean"==t.type?n("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#c0c0c0"},model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"item.value"}}):e._e(),"file"==t.type&&"attachment"==t.attribute?n("fileUpload",{ref:"upload",refInFor:!0,attrs:{value:e.form.filePath,limit:1,fileSize:10,uploadFileUrl:e.uploadUrl,fileType:["docx","xlsx","ppt","txt","pdf","zip","jpg","png"]},on:{input:function(t){return e.getFilePath(t)}}}):e._e(),"file"==t.type&&"picUrl"==t.attribute?n("fileUpload",{ref:"upload",refInFor:!0,attrs:{value:e.form.filePath,limit:1,fileSize:10,uploadFileUrl:e.uploadUrl,fileType:["jpg","png"]},on:{input:function(t){return e.getFilePath(t)}}}):e._e()],1)}))],2),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["notify:template:edit"],expression:"['notify:template:edit']"},{name:"show",rawName:"v-show",value:e.form.id,expression:"form.id"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("update")))]),n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["notify:template:add"],expression:"['notify:template:add']"},{name:"show",rawName:"v-show",value:!e.form.id,expression:"!form.id"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("add")))]),n("el-button",{on:{click:e.cancel}},[e._v(e._s(e.$t("cancel")))])],1)],1),n("el-dialog",{attrs:{title:e.title,visible:e.testModel,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.testModel=t}}},[n("el-form",{ref:"testForm",attrs:{model:e.testForm,rules:e.testRules,"label-width":"110px"}},[null!=this.testForm.account?n("el-form-item",{attrs:{label:e.$t("notify.template.index.333542-14"),prop:"account"}},[n("el-input",{staticStyle:{width:"390px"},attrs:{placeholder:e.$t("notify.template.index.333542-15")},model:{value:e.testForm.account,callback:function(t){e.$set(e.testForm,"account",t)},expression:"testForm.account"}})],1):e._e(),e._l(e.variablesList,(function(t,i){return n("div",{key:i},[n("el-form-item",{attrs:{label:i}},[n("el-input",{staticStyle:{width:"390px"},attrs:{placeholder:e.$t("notify.template.index.333542-16"),clearable:""},model:{value:e.variablesList[i],callback:function(t){e.$set(e.variablesList,i,t)},expression:"variablesList[index]"}})],1)],1)}))],2),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:e.submitTest}},[e._v(e._s(e.$t("confirm")))]),n("el-button",{on:{click:e.cancelTest}},[e._v(e._s(e.$t("cancel")))])],1)],1)],1)},a=[],l=n("5530"),r=(n("4de4"),n("caad"),n("d81d"),n("b0c0"),n("e9c4"),n("c1f9"),n("b64b"),n("d3b7"),n("2532"),n("6491")),o=n("8e63"),s={name:"Template",dicts:["notify_channel_type","notify_message_type","iot_yes_no","notify_service_code","dingtalk_msg_type","wecom_msg_type"],data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,templateList:[],variablesList:[],variable:"",channelIdList:[],modelList:[],channelMsgList:[],channelChildren:[],providersList:[],url_type:1,title:"",open:!1,testModel:!1,value:"",uploadUrl:"/prod-api/common/upload",newContent:"",queryParams:{pageNum:1,pageSize:10,name:null,serviceCode:null,channelType:null,msgContent:null,redirectUri:null,ptovider:null},configList:[],notifyTestId:"",form:{status:1,filePath:""},channelTypeList:[],newSrc:"",testForm:{account:""},rules:{name:[{required:!0,message:this.$t("notify.template.index.333542-17"),trigger:"blur"}],serviceCode:[{required:!0,message:this.$t("notify.template.index.333542-18"),trigger:"blur"}],msgContent:[{required:!0,message:this.$t("notify.template.index.333542-19"),trigger:"blur"}],msgParams:[{required:!0,message:this.$t("notify.template.index.333542-20"),trigger:"blur"}],channelType:[{required:!0,message:this.$t("notify.template.index.333542-21"),trigger:"blur"}],channelId:[{required:!0,message:this.$t("notify.template.index.333542-22"),trigger:"blur"}],provider:[{required:!0,message:this.$t("notify.template.index.333542-23"),trigger:"blur"}]},testRules:{account:[{required:!0,message:this.$t("notify.template.index.333542-24"),trigger:"blur"}]}}},created:function(){this.getList(),this.getInfo()},methods:{getList:function(){var e=this;this.loading=!0,Object(r["f"])(this.queryParams).then((function(t){e.templateList=t.rows,e.total=t.total,e.loading=!1}))},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},getInfo:function(){var e=this;this.loading=!0,Object(o["d"])().then((function(t){e.channelMsgList=t.data,e.channelTypeList=t.data.map((function(e){return{value:e.channelType,label:e.channelName}}))})),this.loading=!1},changeService:function(){this.getServiceList(),this.getTemplateParams(!0)},changeChannel:function(){this.getServiceList(),this.form.provider="",this.configList=[]},getServiceList:function(){var e=this.form.channelType;this.channelChildren=this.channelMsgList.filter((function(t){return e.includes(t.channelType)})).map((function(e){return e.providerList}));for(var t=0;t<this.channelChildren.length;t++)this.providersList=this.channelChildren[t].map((function(e){return{value:e.provider,label:e.providerName,config:e.configContent}}))},cancel:function(){this.open=!1,this.reset()},cancelTest:function(){this.testModel=!1,this.reset()},reset:function(){this.form={id:null,name:null,serviceCode:null,channelCode:null,msgContent:null,redirectUri:null,createBy:null,createTime:null,updateBy:null,updateTime:null,delFlag:null,provider:null,msgParams:null,msgType:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleAdd:function(){this.reset(),this.open=!0,this.configList=[],this.title=this.$t("notify.template.index.333542-25")},handleUpdate:function(e){var t=this;this.reset();var n=e.id||this.ids;this.open=!0,this.title=this.$t("notify.template.index.333542-26"),this.$nextTick((function(){t.form.channelId=e.channelId,t.getTemplateMsg()})),Object(r["c"])(n).then((function(e){t.form=e.data,t.getTemplateParams(!1),t.getParamsMsg(),t.getServiceList()}))},getParamsMsg:function(){var e=this;if(null!=this.form.msgParams){var t=JSON.parse(this.form.msgParams);("dingtalk"==this.form.channelType||"wechat"==this.form.channelType&&"mini_program"!=this.form.provider||"wechat"==this.form.channelType&&"public_account"!=this.form.provider)&&(this.form.msgType=t.msgType,this.$delete(t,"msgType"),this.$nextTick((function(){e.getTemplateMsg()}))),setTimeout((function(){for(var n=0;n<e.configList.length;n++)for(var i in t)"attachment"===e.configList[n].attribute&&(e.form.filePath=e.configList[n].value),"picUrl"===e.configList[n].attribute&&(e.form.filePath=t[i]),e.configList[n].attribute==i&&(e.configList[n].value=t[i])}),500)}else this.configList=[],this.form.filePath=""},getFilePath:function(e){this.form.filePath="http://"+window.location.host+"/prod-api"+e;for(var t=0;t<this.configList.length;t++)"attachment"!==this.configList[t].attribute&&"picUrl"!==this.configList[t].attribute||(this.configList[t].value=this.form.filePath)},submitForm:function(){var e=this,t=this.configList.map((function(e){return[e.attribute,e.value]})),n=Object.fromEntries(t);null!=this.form.msgType&&this.$set(n,"msgType",this.form.msgType),this.form.msgParams=JSON.stringify(n);var i={id:this.form.id,name:this.form.name,channelId:this.form.channelId,channelType:this.form.channelType,provider:this.form.provider,serviceCode:this.form.serviceCode,msgParams:this.form.msgParams};this.$refs["form"].validate((function(t){t&&(null!=e.form.id?Object(r["j"])(i).then((function(t){e.$modal.msgSuccess(e.$t("updateSuccess")),e.open=!1,e.getList()})):Object(r["a"])(i).then((function(t){e.$modal.msgSuccess(e.$t("addSuccess")),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,n=e.id||this.ids;this.$modal.confirm(this.$t("notify.template.index.333542-27",[n])).then((function(){return Object(r["b"])(n)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("delSuccess"))})).catch((function(){}))},handleExport:function(){this.download("notify/template/export",Object(l["a"])({},this.queryParams),"template_".concat((new Date).getTime(),".xlsx"))},handleStatus:function(e){var t=this;if(1==e.status)Object(r["d"])(e).then((function(n){n.data>0?t.$confirm(t.$t("notify.template.index.333542-28"),{confirmButtonText:t.$t("confirm"),cancelButtonText:t.$t("cancel"),type:"warning"}).then((function(){Object(r["i"])(e).then((function(e){200==e.code?(t.getList(),t.$message({type:"success",message:t.$t("notify.template.index.333542-29")})):t.$message({type:"warning",message:t.$t("notify.template.index.333542-30")})}))})).catch((function(){e.status=!1,t.$message({type:"info",message:t.$t("notify.template.index.333542-31")})})):Object(r["i"])(e).then((function(e){200==e.code?(t.getList(),t.$message({type:"success",message:t.$t("notify.template.index.333542-29")})):t.$message({type:"warning",message:t.$t("notify.template.index.333542-30")})}))}));else{var n={channelType:e.channelType,serviceCode:e.serviceCode,id:e.id,status:e.status};Object(r["j"])(n).then((function(e){200==e.code?(t.getList(),t.$message({type:"success",message:t.$t("notify.template.index.333542-32")})):t.$message({type:"warning",message:t.$t("notify.template.index.333542-33")})}))}},getTemplateParams:function(e){var t=this,n={channelType:this.form.channelType,provider:this.form.provider};Object(o["f"])(n).then((function(e){t.channelIdList=e.rows.map((function(e){return{value:e.id,label:e.name,provider:e.provider}}))})),1==e&&(this.form.channelId="",this.configList=[],this.form.filePath="")},getTemplateMsg:function(){var e=this;if(this.form.filePath="",("dingtalk"==this.form.channelType||"dingtalk"==this.form.channelType&&"mini_program"!=this.form.provider)&&null==this.form.msgType);else{var t={channelId:this.form.channelId,msgType:this.form.msgType};Object(r["h"])(t).then((function(t){e.configList=t.data.map((function(e){return{value:e.value,label:e.name,attribute:e.attribute,type:e.type}}))}))}},getVariablesList:function(e){var t=this;this.testForm.account="";var n=e.channelType,i=e.provider;this.notifyTestId=e.id||this.ids,Object(r["e"])(this.notifyTestId,n,i).then((function(e){200==e.code?""==e.data?(t.submitTest(),t.testModel=!1):(t.testForm.account=e.data.sendAccount,""!==e.data.variables?t.variablesList=JSON.parse(e.data.variables):t.variablesList="",t.testModel=!0,t.title=t.$t("notify.template.index.333542-7")):t.$message.error(e.msg)}))},submitTest:function(){var e=this;""==this.variablesList?console.log(this.variablesList):this.variable=JSON.stringify(this.variablesList);var t={sendAccount:this.testForm.account,id:this.notifyTestId,variables:this.variable};Object(r["g"])(t).then((function(t){200==t.code?(e.$message.success(e.$t("notify.template.index.333542-34")),e.testModel=!1):(e.$message.error(t.msg),e.testModel=!1)}))}}},c=s,u=(n("8de7"),n("2877")),m=Object(u["a"])(c,i,a,!1,null,"daf32d3c",null);t["default"]=m.exports},6491:function(e,t,n){"use strict";n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return r})),n.d(t,"j",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return d})),n.d(t,"e",(function(){return p}));var i=n("b775");function a(e){return Object(i["a"])({url:"/notify/template/list",method:"get",params:e})}function l(e){return Object(i["a"])({url:"/notify/template/"+e,method:"get"})}function r(e){return Object(i["a"])({url:"/notify/template",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/notify/template",method:"put",data:e})}function s(e){return Object(i["a"])({url:"/notify/template/"+e,method:"delete"})}function c(e){return Object(i["a"])({url:"/notify/template/getUsable",method:"get",params:e})}function u(e){return Object(i["a"])({url:"/notify/template/updateState",method:"post",data:e})}function m(e){return Object(i["a"])({url:"/notify/send",method:"post",data:e})}function d(e){return Object(i["a"])({url:"/notify/template/msgParams",method:"get",params:e})}function p(e,t,n){return Object(i["a"])({url:"/notify/template/listVariables?id="+e+"&channelType="+t+"&provider="+n,method:"get"})}},"8de7":function(e,t,n){"use strict";n("a875")},"8e63":function(e,t,n){"use strict";n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return r})),n.d(t,"e",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"b",(function(){return u}));var i=n("b775");function a(e){return Object(i["a"])({url:"/notify/channel/list",method:"get",params:e})}function l(e){return Object(i["a"])({url:"/notify/channel/"+e,method:"get"})}function r(e){return Object(i["a"])({url:"/notify/channel/listChannel",method:"get",params:e})}function o(e,t){return Object(i["a"])({url:"/notify/channel/getConfigContent?channelType="+t+"&provider="+e,method:"get"})}function s(e){return Object(i["a"])({url:"/notify/channel",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/notify/channel",method:"put",data:e})}function u(e){return Object(i["a"])({url:"/notify/channel/"+e,method:"delete"})}},a875:function(e,t,n){},c1f9:function(e,t,n){var i=n("23e7"),a=n("2266"),l=n("8418");i({target:"Object",stat:!0},{fromEntries:function(e){var t={};return a(e,(function(e,n){l(t,e,n)}),{AS_ENTRIES:!0}),t}})}}]); |