(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f3a67d3e"],{1063:function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"d",(function(){return s})),a.d(e,"c",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"e",(function(){return d}));var i=a("66df"),n=function(t){return i["a"].request({method:"post",url:"api/admin.php?s=Admin.Config.AddConfig",data:t})},s=function(t){return i["a"].request({method:"post",url:"api/admin.php?s=Admin.Config.GetList",data:t})},r=function(t){return i["a"].request({method:"post",url:"api/admin.php?s=Admin.Config.GetConfig",data:t})},o=function(t){return i["a"].request({method:"post",url:"api/admin.php?s=Admin.Config.EditConfig",data:t})},d=function(t){return i["a"].request({method:"post",url:"api/admin.php?s=Admin.Config.RemoveConfig",data:t})}},a882:function(t,e,a){"use strict";var i=a("f6d0"),n=a.n(i);n.a},ee73:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"editconfig"},[a("div",{staticClass:"editconfig__h"},[a("h2",{staticClass:"editconfig__h--p"},[t._v(t._s(t.$t("alter_config")))])]),a("Form",{ref:"formValidate",staticClass:"editconfig__form",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":100}},[a("FormItem",{staticClass:"formitem",attrs:{label:t.$t("config_name")+"：",prop:"name"}},[a("Input",{staticStyle:{width:"300px"},attrs:{disabled:"",placeholder:""},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1),a("FormItem",{staticClass:"formitem",attrs:{label:t.$t("config_value")+"：",prop:"key"}},[a("Input",{staticStyle:{width:"300px"},attrs:{clearable:"",type:"textarea",placeholder:""},model:{value:t.formValidate.key,callback:function(e){t.$set(t.formValidate,"key",e)},expression:"formValidate.key"}})],1),a("FormItem",{staticClass:"formitem",attrs:{label:t.$t("config_desc")+"：",prop:"desc"}},[a("Input",{staticStyle:{width:"300px"},attrs:{clearable:"",placeholder:""},model:{value:t.formValidate.desc,callback:function(e){t.$set(t.formValidate,"desc",e)},expression:"formValidate.desc"}})],1),a("div",{staticClass:"editconfig__btn"},[a("Button",{attrs:{type:"primary"},on:{click:t.editConfigFun}},[t._v(t._s(t.$t("submit")))])],1)],1)],1)},n=[],s=(a("7f7f"),a("1063")),r=a("c276"),o={data:function(){return{token:Object(r["h"])(),formValidate:{name:"",key:"",desc:""},ruleValidate:{name:[{required:!0,message:this.$t("config_name")+" "+this.$t("required"),trigger:"blur"},{message:this.$t("consist_and_start_with_letter"),pattern:"^[A-Za-z0-9_]+$"}],key:[{required:!0,message:this.$t("config_value")+" "+this.$t("required"),trigger:"blur"}],desc:[{required:!0,message:this.$t("config_desc")+" "+this.$t("required"),trigger:"blur"}]}}},created:function(){this.getConfigInfo()},methods:{getConfigInfo:function(){var t=this;this.formValidate.name=this.$route.query.name;var e=new FormData;e.append("access_token",this.token),e.append("config_name",this.formValidate.name),Object(s["c"])(e).then((function(e){200===e.ret?(t.formValidate.key=e.data.config_value,t.formValidate.desc=e.data.config_desc):t.$Message.warning(e.msg)}))},editConfigFun:function(){var t=this;this.$refs["formValidate"].validate((function(e){e?t.doEditConfig():t.$Message.error(t.$t("wrong_form_and_fill_again"))}))},doEditConfig:function(){var t=this,e=new FormData;e.append("access_token",this.token),e.append("config_name",this.formValidate.name),e.append("config_value",this.formValidate.key),this.formValidate.desc&&e.append("config_desc",this.formValidate.desc),Object(s["b"])(e).then((function(e){200===e.ret?(t.$Message.success(e.data.is_edit?t.$t("successfully_altered"):t.$t("nothing_changed")),t.$router.push({name:"configList"})):t.$Message.warning(e.msg)}))}}},d=o,c=(a("a882"),a("2877")),f=Object(c["a"])(d,i,n,!1,null,"01ec6b85",null);e["default"]=f.exports},f6d0:function(t,e,a){}}]);