(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5d3c5ee2"],{"03b1":function(a,e,t){"use strict";t("54ad")},"54ad":function(a,e,t){},ebf3:function(a,e,t){"use strict";t.r(e);var s=function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("div",{staticClass:"systeCconfiguration"},[t("el-card",{staticClass:"myCard"},[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:a.addParams}},[a._v("添加参数")]),t("el-table",{staticStyle:{width:"100%"},attrs:{data:a.paramsList}},[t("el-table-column",{attrs:{prop:"pname",label:"参数名"}}),t("el-table-column",{attrs:{prop:"pvalue",label:"参数值"}}),t("el-table-column",{attrs:{label:"操作"},scopedSlots:a._u([{key:"default",fn:function(e){return[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return a.editParams(e.row)}}},[a._v("编辑")]),t("el-button",{attrs:{size:"small",type:"danger"},on:{click:function(t){return a.delParams(e.row)}}},[a._v("删除")])]}}])})],1)],1),t("el-dialog",{staticClass:"myDialog",attrs:{title:a.isEdit?"编辑参数":"新增参数",visible:a.dialogVisible,width:"30%"},on:{"update:visible":function(e){a.dialogVisible=e}}},[t("el-form",{ref:"form",attrs:{model:a.form,"label-width":"100px",rules:a.rules}},[t("el-form-item",{attrs:{label:"参数名:",prop:"paramsKey"}},[t("el-input",{model:{value:a.form.paramsKey,callback:function(e){a.$set(a.form,"paramsKey",e)},expression:"form.paramsKey"}})],1),t("el-form-item",{attrs:{label:"参数值:",prop:"paramsValue"}},[t("el-input",{model:{value:a.form.paramsValue,callback:function(e){a.$set(a.form,"paramsValue",e)},expression:"form.paramsValue"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return a.onSubmit("form")}}},[a._v("确 定")]),t("el-button",{attrs:{size:"small"},on:{click:function(e){return a.handleClose("form")}}},[a._v("取消")])],1)],1)],1)],1)},r=[],i=t("b775"),n=".dspy";function l(a){return Object(i["a"])({url:"params/addparams".concat(n),method:"get",params:a})}function o(a){return Object(i["a"])({url:"params/getparams".concat(n),method:"get",params:a})}function m(a){return Object(i["a"])({url:"params/upparams".concat(n),method:"get",params:a})}function u(a){return Object(i["a"])({url:"params/delparams".concat(n),method:"get",params:a})}var c={data:function(){return{paramsList:[],isEdit:!1,dialogVisible:!1,form:{paramsKey:"",paramsValue:""},rules:{paramsKey:[{required:!0,message:"请输入参数名",trigger:"blur"}],paramsValue:[{required:!0,message:"请输入参数值",trigger:"blur"}]},page:1,id:null}},created:function(){this.getParams()},methods:{getParams:function(){var a=this;o({page:this.page}).then((function(e){a.paramsList=e.data.rows}))},addParams:function(){this.dialogVisible=!0,this.isEdit=!1},editParams:function(a){this.isEdit=!0,this.dialogVisible=!0,console.log(a),this.form.paramsKey=a.pname,this.form.paramsValue=a.pvalue,this.id=a.id},delParams:function(a){var e=this;this.$confirm("确定删除此参数?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){u({id:a.id}).then((function(a){1==a.status?(e.$message({message:"参数删除成功",type:"success"}),e.getParams()):e.$message({message:a.msg,type:"error"})}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))},onSubmit:function(a){var e=this;this.$refs[a].validate((function(a){if(a){var t={pname:e.form.paramsKey,pvalue:e.form.paramsValue};e.isEdit?(t.id=e.id,m(t).then((function(a){1==a.status?(e.$message({message:"参数编辑成功",type:"success"}),e.getParams(),e.dialogVisible=!1):e.$message({message:a.msg,type:"error"})}))):l(t).then((function(a){1==a.status?(e.$message({message:"参数添加成功",type:"success"}),e.getParams(),e.dialogVisible=!1):e.$message({message:a.msg,type:"error"})}))}}))},handleClose:function(){this.dialogVisible=!1}}},p=c,d=(t("03b1"),t("2877")),f=Object(d["a"])(p,s,r,!1,null,"6e19171d",null);e["default"]=f.exports}}]);