(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c94ba"],{5911:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"缓存应用名称",prop:"cacheName"}},[a("el-input",{attrs:{placeholder:"请输入缓存应用名称",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.cacheName,callback:function(t){e.$set(e.queryParams,"cacheName",t)},expression:"queryParams.cacheName"}})],1),a("el-form-item",{attrs:{label:"IP地址",prop:"ip"}},[a("el-input",{attrs:{placeholder:"请输入IP地址",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.ip,callback:function(t){e.$set(e.queryParams,"ip",t)},expression:"queryParams.ip"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["monitor:cache:add"],expression:"['monitor:cache:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["monitor:cache:edit"],expression:"['monitor:cache:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["monitor:cache:remove"],expression:"['monitor:cache:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["monitor:cache:export"],expression:"['monitor:cache:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),a("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),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.cacheList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{fixed:"",label:"序号","min-width":"20%",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s((e.queryParams.pageNum-1)*e.queryParams.pageSize+(t.$index+1))+" ")])]}}])}),e._e(),a("el-table-column",{attrs:{label:"缓存应用名称",align:"center",prop:"cacheName"}}),a("el-table-column",{attrs:{label:"IP地址",align:"center",prop:"ip"}}),a("el-table-column",{attrs:{label:"系统端口",align:"center",prop:"ipPort"}}),a("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark"}}),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["monitor:cache:list"],expression:"['monitor:cache:list']"}],attrs:{size:"mini",type:"text",icon:"el-icon-info"},on:{click:function(a){return e.handleInfo(t.row)}}},[e._v("详情")]),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["monitor:cache:edit"],expression:"['monitor:cache:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){return e.handleUpdate(t.row)}}},[e._v("修改")]),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["monitor:cache:remove"],expression:"['monitor:cache:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],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}}),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"550px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"缓存应用名称",prop:"cacheName"}},[a("el-input",{attrs:{placeholder:"请输入缓存应用名称"},model:{value:e.form.cacheName,callback:function(t){e.$set(e.form,"cacheName",t)},expression:"form.cacheName"}})],1),a("el-form-item",{attrs:{label:"IP地址",prop:"ip"}},[a("el-input",{attrs:{placeholder:"请输入IP地址"},model:{value:e.form.ip,callback:function(t){e.$set(e.form,"ip",t)},expression:"form.ip"}})],1),a("el-form-item",{attrs:{label:"缓存库号",prop:"databaseNum"}},[a("el-input",{attrs:{placeholder:"请输入缓存库号"},model:{value:e.form.databaseNum,callback:function(t){e.$set(e.form,"databaseNum",t)},expression:"form.databaseNum"}})],1),a("el-form-item",{attrs:{label:"用户密码",prop:"userPassword"}},[a("el-input",{attrs:{placeholder:"请输入用户密码"},model:{value:e.form.userPassword,callback:function(t){e.$set(e.form,"userPassword",t)},expression:"form.userPassword"}})],1),a("el-form-item",{attrs:{label:"系统端口",prop:"ipPort"}},[a("el-input",{attrs:{placeholder:"请输入系统端口"},model:{value:e.form.ipPort,callback:function(t){e.$set(e.form,"ipPort",t)},expression:"form.ipPort"}})],1),a("el-form-item",{attrs:{label:"通知方式",prop:"messageType"}},[a("el-select",{attrs:{placeholder:"请选通知类型",size:"small"},on:{change:e.chanageMessageType},model:{value:e.form.messageType,callback:function(t){e.$set(e.form,"messageType",t)},expression:"form.messageType"}},e._l(e.dict.type.sys_message_type,(function(e){return a("el-option",{key:parseInt(e.value),attrs:{label:e.label,value:parseInt(e.value)}})})),1)],1),e.phoneshow?a("el-form-item",{attrs:{label:"手机号码",prop:"userPhone"}},[a("el-input",{attrs:{placeholder:"请输入内容"},model:{value:e.form.userPhone,callback:function(t){e.$set(e.form,"userPhone",t)},expression:"form.userPhone"}})],1):e._e(),e.emailshow?a("el-form-item",{attrs:{label:"邮箱地址",prop:"userEmail"}},[a("el-input",{attrs:{placeholder:"请输入内容"},model:{value:e.form.userEmail,callback:function(t){e.$set(e.form,"userEmail",t)},expression:"form.userEmail"}})],1):e._e(),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.testLink}},[e._v("测试连接")]),a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},n=[],i=a("5530"),o=(a("d81d"),a("b775"));function l(e){return Object(o["a"])({url:"/monitor/cache/list",method:"get",params:e})}function s(e){return Object(o["a"])({url:"/monitor/cache/"+e,method:"get"})}function c(e){return Object(o["a"])({url:"/monitor/cache",method:"post",data:e})}function m(e){return Object(o["a"])({url:"/monitor/cache",method:"put",data:e})}function u(e){return Object(o["a"])({url:"/monitor/cache/"+e,method:"delete"})}function p(e){return Object(o["a"])({url:"/monitor/cache/testlink",method:"post",data:e})}var h=a("2da1"),d={name:"Cache",dicts:["sys_message_type"],data:function(){return{phoneshow:!0,emailshow:!1,loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,cacheList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,cacheName:null,ip:null},form:{},rules:{cacheName:[{required:!0,message:"缓存应用名称不能为空",trigger:"blur"}],ip:[{required:!0,message:"IP地址不能为空",trigger:"blur"}],databaseNum:[{required:!0,message:"缓存库序号不能为空",trigger:"blur"}],ipPort:[{required:!0,message:"系统端口不能为空",trigger:"blur"}],userPhone:[{required:!0,message:"手机号码不能为空",trigger:"blur"},{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"请输入正确的手机号码",trigger:"blur"}],userEmail:[{required:!0,message:"邮箱地址不能为空",trigger:"blur"},{type:"email",message:"请输入正确的邮箱地址",trigger:["blur","change"]}]}}},created:function(){this.getList()},methods:{chanageMessageType:function(e){this.phoneshow=1!=e,this.emailshow=1==e},getList:function(){var e=this;this.loading=!0,l(this.queryParams).then((function(t){e.cacheList=t.data,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,cacheName:null,ip:null,databaseNum:null,userPassword:null,ipPort:null,rsaAddr:null,isOnline:null,createBy:null,createTime:null,updateBy:null,updateTime:null,remark:null,tenantId:null,messageType:0,userPhone:null,userEmail:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加缓存管理",this.phoneshow=1!=this.form.messageType,this.emailshow=1==this.form.messageType},handleUpdate:function(e){var t=this;this.reset();var a=e.id||this.ids;s(a).then((function(e){t.form=e.data,t.open=!0,t.title="修改缓存管理",t.phoneshow=1!=t.form.messageType,t.emailshow=1==t.form.messageType}))},handleInfo:function(e){this.$router.push({path:"/monitor/cache-info/index",query:e})},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.id?m(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):c(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,a=e.id||this.ids;this.$modal.confirm("是否确认删除当前缓存管理数据项?").then((function(){return u(a)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("monitor/cache/export",Object(i["a"])({},this.queryParams),"缓存管理_".concat(Object(h["f"])((new Date).getTime(),"{y}-{m}-{d}"),".xlsx"))},testLink:function(){var e=this;p(this.form).then((function(t){"error"==t.data?e.$modal.msgError("连接失败!"):e.$modal.msgSuccess("连接成功!")}))}}},f=d,g=a("2877"),b=Object(g["a"])(f,r,n,!1,null,null,null);t["default"]=b.exports}}]);