| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0e40fd6d"],{"644d":function(e,t,o){"use strict";o("e2b4")},"6bef":function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"app-container",staticStyle:{height:"700px"}},[o("el-row",[o("el-col",{staticClass:"card-box",attrs:{span:14}},[o("el-card",[o("div",{attrs:{slot:"header"},slot:"header"},[o("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[o("i",{staticClass:"el-icon-monitor"}),e._v(" "+e._s(e.$t("SMTPsz")))])]),o("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[[o("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"auto"}},[o("el-form-item",{attrs:{label:this.$t("zt"),prop:"mode"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",clearable:"",filterable:!1},on:{change:e.handleSelectChange},model:{value:e.form.mode,callback:function(t){e.$set(e.form,"mode",t)},expression:"form.mode"}},e._l(e.modes,(function(t){return o("el-option",{key:t.id,attrs:{label:e.$t(t.name),value:t.id}})})),1)],1),"1"==e.form.mode?o("el-form-item",{attrs:{label:this.$t("fwqyc"),prop:"server"}},[o("el-input",{model:{value:e.form.server,callback:function(t){e.$set(e.form,"server",t)},expression:"form.server"}})],1):e._e(),"1"==e.form.mode?o("el-form-item",{attrs:{label:this.$t("dk2"),prop:"port"}},[o("el-input",{attrs:{type:"number"},model:{value:e.form.port,callback:function(t){e.$set(e.form,"port",t)},expression:"form.port"}})],1):e._e(),"1"==e.form.mode?o("el-form-item",{attrs:{label:this.$t("tszh"),prop:"zh"}},[o("el-input",{model:{value:e.form.zh,callback:function(t){e.$set(e.form,"zh",t)},expression:"form.zh"}})],1):e._e(),"1"==e.form.mode?o("el-form-item",{attrs:{label:this.$t("my"),prop:"mm"}},[o("el-input",{model:{value:e.form.mm,callback:function(t){e.$set(e.form,"mm",t)},expression:"form.mm"}})],1):e._e(),"1"==e.form.mode?o("el-form-item",{attrs:{label:this.$t("rzfs"),prop:"rzfs"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",clearable:"",filterable:!1},model:{value:e.form.rzfs,callback:function(t){e.$set(e.form,"rzfs",t)},expression:"form.rzfs"}},e._l(e.rzfss,(function(t){return o("el-option",{key:t.id,attrs:{label:e.$t(t.name),value:t.id}})})),1)],1):e._e(),"1"==e.form.mode?o("el-form-item",{attrs:{label:this.$t("jszh"),prop:"dateRange"}},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:e.form.dateRange,border:"",size:"mini","max-height":"272"}},[o("el-table-column",{attrs:{prop:"",label:"",width:"85",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.$t("dzyx"))+e._s(t.$index+1))]}}],null,!1,2076271473)}),o("el-table-column",{attrs:{prop:"receiveAccount",width:"360",label:e.$t("dzyx"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[o("el-form-item",{staticClass:"form-item",attrs:{prop:"dateRange."+r.idx+".receiveAccount",rules:[{required:!0,message:e.$t("qsr"),trigger:"change"}]}},[o("el-input",{staticStyle:{width:"100%"},attrs:{"controls-position":"right"},model:{value:r.receiveAccount,callback:function(t){e.$set(r,"receiveAccount",t)},expression:"row.receiveAccount"}})],1)]}}],null,!1,3439171653)}),o("el-table-column",{attrs:{prop:"",label:this.$t("cz"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.form.dateRange.length<10&&0==t.$index?o("el-button",{attrs:{size:"mini"},on:{click:function(t){return t.stopPropagation(),e.addTimeRange(t)}}},[o("i",{staticClass:"el-icon-plus"})]):o("el-button",{attrs:{size:"mini"},on:{click:function(o){return o.stopPropagation(),e.deleteRange(t.$index)}}},[o("i",{staticClass:"el-icon-delete"})])]}}],null,!1,1018928086)})],1)],1):e._e()],1),o("div",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("qd")))])],1)]],2)])],1)],1)],1)},a=[],n=(o("14d9"),o("a434"),o("d3b7"),o("159b"),o("7ba4")),s={name:"Server",data:function(){return{server:[],totalStatus:{},channelList:[],title:"",show:"false",sensorStatusTitle:"",open:!1,usertoken:"",form:{dateRange:[{idx:0,receiveAccount:""}]},sensorStatusForm:{},modes:[{id:"0",name:"gb"},{id:"1",name:"kq"}],rzfss:[{id:"PLAIN",name:"PLAIN"},{id:"LOGIN",name:"LOGIN"},{id:"CRAM-MD5",name:"CRAM-MD5"}],activeName:"温湿度传感器",sensorStatusTabs:[],sensorStatusOpen:!1,sensorStatusList:[],rules:{mode:[{required:!0,message:this.$i18n.t("zt")+" "+this.$i18n.t("bnwk"),trigger:"blur"}]}}},created:function(){this.usertoken=this.$store.state.user.usertoken,this.queryIp()},methods:{addTimeRange:function(){10==this.form.dateRange.length?this.$modal.msgWarning(this.$t("slts")):this.form.dateRange.push({idx:this.form.dateRange.length,receiveAccount:""})},deleteRange:function(e){this.form.dateRange.splice(e,1),this.form.dateRange.forEach((function(e,t){e.idx=t}))},editDisabled:function(){return"0"===this.form.mode},handleClick:function(e,t){console.log(e,t)},handleSelectChange:function(e){this.form.mode=e,this.editDisabled()},queryIp:function(){var e=this,t={};t.token=this.usertoken,t.type="listSmtpQuery",Object(n["k"])(t).then((function(t){null!=t.data&&(e.form=t.data,null!=t.data.receiveAccountList?e.form.dateRange=t.data.receiveAccountList:e.form.dateRange=[{idx:0,receiveAccount:""}])}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){if(t){var o={},r=e.form.dateRange;o.token=e.usertoken,o.type="SmtpSave",o.mode=e.form.mode,o.server=e.form.server,o.port=e.form.port,o.zh=e.form.zh,o.mm=e.form.mm,o.rzfs=e.form.rzfs,o.receiveAccountList=r,"0"==e.form.mode&&(o.receiveAccountList=null,o.server=null,o.port=null);var a=e;e.$modal.confirm(e.$t("qdybcm")).then((function(){Object(n["k"])(o).then((function(e){a.$modal.msgSuccess(a.$t("zxcg"))}))})).then((function(){})).catch((function(){}))}}))},openLoading:function(){this.$modal.loading(this.$t("zzjzqsh"))}}},i=s,l=(o("644d"),o("2877")),c=Object(l["a"])(i,r,a,!1,null,"ea7e3ace",null);t["default"]=c.exports},e2b4:function(e,t,o){}}]);
|