1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59e1d712","chunk-56830af9","chunk-2d0dec69","chunk-2d0df437"],{"86a6":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:800,visible:e.visible,confirmLoading:e.confirmLoading,cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"模板标题"}},[t("a-input",{attrs:{disabled:""},model:{value:e.templateName,callback:function(t){e.templateName=t},expression:"templateName"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"模板内容"}},[t("a-textarea",{attrs:{disabled:"",autosize:{minRows:5,maxRows:8}},model:{value:e.templateContent,callback:function(t){e.templateContent=t},expression:"templateContent"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"测试数据"}},[t("a-textarea",{attrs:{placeholder:"请输入json格式测试数据",autosize:{minRows:5,maxRows:8}},model:{value:e.testData,callback:function(t){e.testData=t},expression:"testData"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"消息类型"}},[t("j-dict-select-tag",{attrs:{placeholder:"请选择消息类型",dictCode:"msgType"},model:{value:e.msgType,callback:function(t){e.msgType=t},expression:"msgType"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"消息接收方"}},[t("a-input",{attrs:{placeholder:"请输入消息接收方"},model:{value:e.receiver,callback:function(t){e.receiver=t},expression:"receiver"}})],1)],1)],1)],1)},n=[],s=a("0fea"),r={name:"SysMessageTestModal",data:function(){return{title:"操作",visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,url:{send:"/message/sysMessageTemplate/sendMsg"},templateName:"",templateContent:"",receiver:"",msgType:"",testData:"",sendParams:{}}},methods:{open:function(e){this.sendParams.templateCode=e.templateCode,this.templateName=e.templateName,this.templateContent=e.templateContent,this.testData=e.templateTestJson,this.visible=!0},close:function(){this.receiver="",this.msgType="",this.sendParams={},this.visible=!1},handleOk:function(){var e=this,t=this.url.send,a="post";this.sendParams.testData=this.testData,this.sendParams.receiver=this.receiver,this.sendParams.msgType=this.msgType,Object(s["i"])(t,this.sendParams,a).then((function(t){t.success?e.$message.success(t.message):e.$message.warning(t.message)})).finally((function(){e.confirmLoading=!1,e.close()}))},handleCancel:function(){this.close()}}},o=r,i=a("2877"),c=Object(i["a"])(o,l,n,!1,null,"0a67d4a2",null);t["default"]=c.exports},"88bc":function(e,t,a){(function(t){var a=1/0,l=9007199254740991,n="[object Arguments]",s="[object Function]",r="[object GeneratorFunction]",o="[object Symbol]",i="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,m=i||c||Function("return this")();function p(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function d(e,t){var a=-1,l=e?e.length:0,n=Array(l);while(++a<l)n[a]=t(e[a],a,e);return n}function u(e,t){var a=-1,l=t.length,n=e.length;while(++a<l)e[n+a]=t[a];return e}var f=Object.prototype,h=f.hasOwnProperty,g=f.toString,y=m.Symbol,v=f.propertyIsEnumerable,b=y?y.isConcatSpreadable:void 0,C=Math.max;function w(e,t,a,l,n){var s=-1,r=e.length;a||(a=_),n||(n=[]);while(++s<r){var o=e[s];t>0&&a(o)?t>1?w(o,t-1,a,l,n):u(n,o):l||(n[n.length]=o)}return n}function x(e,t){return e=Object(e),T(e,t,(function(t,a){return a in e}))}function T(e,t,a){var l=-1,n=t.length,s={};while(++l<n){var r=t[l],o=e[r];a(o,r)&&(s[r]=o)}return s}function k(e,t){return t=C(void 0===t?e.length-1:t,0),function(){var a=arguments,l=-1,n=C(a.length-t,0),s=Array(n);while(++l<n)s[l]=a[t+l];l=-1;var r=Array(t+1);while(++l<t)r[l]=a[l];return r[t]=s,p(e,this,r)}}function _(e){return O(e)||E(e)||!!(b&&e&&e[b])}function S(e){if("string"==typeof e||L(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function E(e){return N(e)&&h.call(e,"callee")&&(!v.call(e,"callee")||g.call(e)==n)}var O=Array.isArray;function j(e){return null!=e&&M(e.length)&&!R(e)}function N(e){return q(e)&&j(e)}function R(e){var t=P(e)?g.call(e):"";return t==s||t==r}function M(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function P(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return!!e&&"object"==typeof e}function L(e){return"symbol"==typeof e||q(e)&&g.call(e)==o}var D=k((function(e,t){return null==e?{}:x(e,d(w(t,1),S))}));e.exports=D}).call(this,a("c8ba"))},c274:function(e,t,a){"use strict";a("f242")},d579:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e._self._c;return t("a-tooltip",{attrs:{placement:"topLeft"}},[t("template",{slot:"title"},[t("span",[e._v(e._s(e.value))])]),e._v("\n "+e._s(e._f("ellipsis")(e.value,e.length))+"\n")],2)},n=[],s={name:"JEllipsis",props:{value:{type:String,required:!1},length:{type:Number,required:!1,default:25}}},r=s,o=a("2877"),i=Object(o["a"])(r,l,n,!1,null,"4de15389",null);t["default"]=i.exports},e5ab:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:800,visible:e.visible,confirmLoading:e.confirmLoading,cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-row",{attrs:{gutter:{xs:8,sm:16,md:24,lg:32}}},[t("a-col",{attrs:{span:12}},[t("a-form-item",{staticStyle:{"margin-right":"-35px"},attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"模板CODE"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["templateCode",e.validatorRules.templateCode],expression:"['templateCode', validatorRules.templateCode ]"}],attrs:{disabled:e.disable,placeholder:"请输入模板编码"}})],1)],1),t("a-col",{attrs:{span:12}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"模板类型"}},[t("j-dict-select-tag",{directives:[{name:"decorator",rawName:"v-decorator",value:["templateType",e.validatorRules.templateType],expression:"['templateType', validatorRules.templateType ]"}],attrs:{triggerChange:!0,dictCode:"msgType",placeholder:"请选择模板类型"},on:{change:e.handleChangeTemplateType}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:24}},[t("a-col",{attrs:{span:24,pull:"2"}},[t("a-form-item",{staticStyle:{"margin-left":"-15px"},attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"模板标题"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["templateName",e.validatorRules.templateName],expression:"['templateName', validatorRules.templateName]"}],staticStyle:{width:"122%"},attrs:{placeholder:"请输入模板标题"}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:24}},[t("a-col",{attrs:{span:24,pull:"4"}},[t("a-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.useEditor,expression:"!useEditor"}],staticStyle:{"margin-left":"4px",width:"126%"},attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"模板内容"}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["templateContent",e.validatorRules.templateContent],expression:"['templateContent', validatorRules.templateContent ]"}],attrs:{placeholder:"请输入模板内容",autosize:{minRows:8,maxRows:8}}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:24}},[t("a-col",{attrs:{span:24,pull:"4"}},[t("a-form-item",{directives:[{name:"show",rawName:"v-show",value:e.useEditor,expression:"useEditor"}],staticStyle:{"margin-left":"4px",width:"126%"},attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"模板内容"}},[t("j-editor",{model:{value:e.templateEditorContent,callback:function(t){e.templateEditorContent=t},expression:"templateEditorContent"}})],1)],1)],1)],1)],1)],1)},n=[],s=a("0fea"),r=a("88bc"),o=a.n(r),i=a("4ec3"),c=a("a061"),m={name:"SysMessageTemplateModal",components:{JEditor:c["default"]},data:function(){return{title:"操作",visible:!1,disable:!0,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,form:this.$form.createForm(this),validatorRules:{templateCode:{rules:[{required:!0,message:"请输入模板CODE!"},{validator:this.validateTemplateCode}]},templateName:{rules:[{required:!0,message:"请输入模板标题!"}]},templateContent:{rules:[]},templateType:{rules:[{required:!0,message:"请输入模板类型!"}]}},url:{add:"/message/sysMessageTemplate/add",edit:"/message/sysMessageTemplate/edit"},useEditor:!1,templateEditorContent:""}},created:function(){},methods:{add:function(){this.disable=!1,this.edit({})},edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.useEditor=2==e.templateType||4==e.templateType,this.useEditor?this.templateEditorContent=e.templateContent:this.templateEditorContent="",this.visible=!0,this.$nextTick((function(){t.useEditor?t.form.setFieldsValue(o()(t.model,"templateCode","templateName","templateTestJson","templateType")):t.form.setFieldsValue(o()(t.model,"templateCode","templateContent","templateName","templateTestJson","templateType"))}))},close:function(){this.$emit("close"),this.visible=!1,this.disable=!0},handleOk:function(){var e=this;this.model.templateType=this.templateType;var t=this;this.form.validateFields((function(a,l){if(!a){t.confirmLoading=!0;var n="",r="";e.model.id?(n+=e.url.edit,r="put"):(n+=e.url.add,r="post");var o=Object.assign(e.model,l);e.useEditor&&(o.templateContent=e.templateEditorContent),Object(s["i"])(n,o,r).then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}}))},validateTemplateCode:function(e,t,a){var l={tableName:"sys_sms_template",fieldName:"template_code",fieldVal:t,dataId:this.model.id};Object(i["m"])(l).then((function(e){e.success?a():a(e.message)}))},handleCancel:function(){this.close()},handleChangeTemplateType:function(e){this.useEditor=2==e||4==e}}},p=m,d=a("2877"),u=Object(d["a"])(p,l,n,!1,null,"64d4c63e",null);t["default"]=u.exports},f242:function(e,t,a){},fd15:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchQuery.apply(null,arguments)}}},[t("a-row",{attrs:{gutter:24}},[t("a-col",{attrs:{md:6,sm:8}},[t("a-form-item",{attrs:{label:"模板CODE"}},[t("a-input",{attrs:{placeholder:"请输入模板CODE"},model:{value:e.queryParam.templateCode,callback:function(t){e.$set(e.queryParam,"templateCode",t)},expression:"queryParam.templateCode"}})],1)],1),t("a-col",{attrs:{md:6,sm:8}},[t("a-form-item",{attrs:{label:"模板内容"}},[t("a-input",{attrs:{placeholder:"请输入模板内容"},model:{value:e.queryParam.templateContent,callback:function(t){e.$set(e.queryParam,"templateContent",t)},expression:"queryParam.templateContent"}})],1)],1),e.toggleSearchStatus?[t("a-col",{attrs:{md:6,sm:8}},[t("a-form-item",{attrs:{label:"模板标题"}},[t("a-input",{attrs:{placeholder:"请输入模板标题"},model:{value:e.queryParam.templateName,callback:function(t){e.$set(e.queryParam,"templateName",t)},expression:"queryParam.templateName"}})],1)],1),t("a-col",{attrs:{md:6,sm:8}},[t("a-form-item",{attrs:{label:"模板类型"}},[t("a-input",{attrs:{placeholder:"请输入模板类型"},model:{value:e.queryParam.templateType,callback:function(t){e.$set(e.queryParam,"templateType",t)},expression:"queryParam.templateType"}})],1)],1)]:e._e(),t("a-col",{attrs:{md:6,sm:8}},[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"left",overflow:"hidden"}},[t("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchQuery}},[e._v("查询")]),t("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")]),t("a",{staticStyle:{"margin-left":"8px"},on:{click:e.handleToggleSearch}},[e._v("\n "+e._s(e.toggleSearchStatus?"收起":"展开")+"\n "),t("a-icon",{attrs:{type:e.toggleSearchStatus?"up":"down"}})],1)],1)])],2)],1)],1),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")]),t("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(t){return e.handleExportXls("消息模板")}}},[e._v("导出")]),t("a-upload",{attrs:{name:"file",showUploadList:!1,multiple:!1,headers:e.tokenHeader,action:e.importExcelUrl},on:{change:e.handleImportExcel}},[t("a-button",{attrs:{type:"primary",icon:"import"}},[e._v("导入")])],1),e.selectedRowKeys.length>0?t("a-dropdown",[t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",{key:"1",on:{click:e.batchDel}},[t("a-icon",{attrs:{type:"delete"}}),e._v("\n 删除\n ")],1)],1),t("a-button",{staticStyle:{"margin-left":"8px"}},[e._v(" 批量操作\n "),t("a-icon",{attrs:{type:"down"}})],1)],1):e._e()],1),t("div",[t("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[t("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v(" 已选择 "),t("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项\n "),t("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),t("a-table",{ref:"table",attrs:{size:"middle",bordered:"",rowKey:"id",columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"templateContent",fn:function(e){return t("span",{},[t("j-ellipsis",{attrs:{value:e,length:25}})],1)}},{key:"action",fn:function(a,l){return t("span",{},[t("a",{on:{click:function(t){return e.handleEdit(l)}}},[e._v("编辑")]),t("a-divider",{attrs:{type:"vertical"}}),t("a-dropdown",[t("a",{staticClass:"ant-dropdown-link"},[e._v("更多 "),t("a-icon",{attrs:{type:"down"}})],1),t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",[t("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return e.handleDelete(l.id)}}},[t("a",[e._v("删除")])])],1),t("a-menu-item",[t("a",{on:{click:function(t){return e.handleTest(l)}}},[e._v("发送测试")])])],1)],1)],1)}}])})],1),t("sysMessageTemplate-modal",{ref:"modalForm",on:{ok:e.modalFormOk}}),t("sysMessageTest-modal",{ref:"testModal"})],1)},n=[],s=a("e5ab"),r=a("86a6"),o=a("b65a"),i=a("d579"),c={name:"SysMessageTemplateList",mixins:[o["a"]],components:{JEllipsis:i["default"],SysMessageTemplateModal:s["default"],SysMessageTestModal:r["default"]},data:function(){return{description:"消息模板管理页面",columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(e,t,a){return parseInt(a)+1}},{title:"模板CODE",align:"center",dataIndex:"templateCode"},{title:"模板标题",align:"center",dataIndex:"templateName"},{title:"模板内容",align:"center",dataIndex:"templateContent",scopedSlots:{customRender:"templateContent"}},{title:"模板类型",align:"center",dataIndex:"templateType",customRender:function(e){return"1"==e?"短信":"2"==e?"邮件":"3"==e?"微信":"4"==e?"系统":void 0}},{title:"操作",dataIndex:"action",align:"center",scopedSlots:{customRender:"action"}}],url:{list:"/message/sysMessageTemplate/list",delete:"/message/sysMessageTemplate/delete",deleteBatch:"/message/sysMessageTemplate/deleteBatch",exportXlsUrl:"message/sysMessageTemplate/exportXls",importExcelUrl:"message/sysMessageTemplate/importExcel"}}},computed:{importExcelUrl:function(){return"".concat(window._CONFIG["domianURL"],"/").concat(this.url.importExcelUrl)}},methods:{handleTest:function(e){this.$refs.testModal.open(e),this.$refs.testModal.title="发送测试"}}},m=c,p=(a("c274"),a("2877")),d=Object(p["a"])(m,l,n,!1,null,"93db85d8",null);t["default"]=d.exports}}]);
|