(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0fe8ed3a"],{1063:function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"d",(function(){return r})),a.d(e,"c",(function(){return s})),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})},r=function(t){return i["a"].request({method:"post",url:"api/admin.php?s=Admin.Config.GetList",data:t})},s=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})}},"1d8e":function(t,e,a){},da85: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:"configuration"},[a("div",{staticClass:"configuration__h"},[a("h2",{staticClass:"configuration__h--p"},[t._v(t._s(t.$t("add_config")))])]),a("Form",{ref:"formValidate",staticClass:"configuration__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:{clearable:"",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:"configuration__btn"},[a("Button",{attrs:{type:"primary"},on:{click:t.addConfigFun}},[t._v(t._s(t.$t("submit")))])],1)],1)],1)},n=[],r=(a("7f7f"),a("1063")),s=a("c276"),o={data:function(){return{token:Object(s["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(){},methods:{addConfigFun:function(){var t=this;this.$refs["formValidate"].validate((function(e){e?t.doAddConfig():t.$Message.error(t.$t("wrong_form_and_fill_again"))}))},doAddConfig: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(r["a"])(e).then((function(e){200===e.ret&&e.data.is_add?(t.$Message.success(t.$t("add_successfully")),t.$router.push({name:"configList"})):t.$Message.warning(e.msg)}))}}},d=o,c=(a("e413"),a("2877")),l=Object(c["a"])(d,i,n,!1,null,"021de566",null);e["default"]=l.exports},e413:function(t,e,a){"use strict";var i=a("1d8e"),n=a.n(i);n.a}}]);