(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-20148377","chunk-2d0b723f"],{"1fc7":function(e,t,o){"use strict";o.r(t);var r=o("c0c3"),a=o("2dd7");t["default"]={name:"CreateForm",props:{typeOptions:{type:Array,required:!0}},components:{AntModal:a["a"]},data:function(){return{loading:!1,formTitle:"",form:{id:void 0,configName:void 0,configKey:void 0,configValue:void 0,configType:"Y",remark:void 0},open:!1,rules:{configName:[{required:!0,message:"参数名称不能为空",trigger:"blur"}],configKey:[{required:!0,message:"参数编码不能为空",trigger:"blur"},{validator:this.checkConfigKeyUnique}],configValue:[{required:!0,message:"参数值不能为空",trigger:"blur"}]}}},filters:{},created:function(){},computed:{},watch:{},methods:{cancel:function(){this.open=!1,this.$emit("close")},reset:function(){void 0!==this.$refs.form&&this.$refs.form.resetFields()},handleAdd:function(){this.open=!0,this.formTitle="添加参数"},handleUpdate:function(e,t){var o=this,a=e?e.id:t;Object(r["d"])(a).then((function(e){o.form=e.data,o.open=!0,o.formTitle="修改参数"}))},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;void 0!==e.form.id?Object(r["h"])(e.form).then((function(t){e.$message.success("修改成功",3),e.open=!1,e.$emit("ok")})):Object(r["h"])(e.form).then((function(t){e.$message.success("新增成功",3),e.open=!1,e.$emit("ok")}))}))},checkConfigKeyUnique:function(e,t,o){var a="参数编码已存在";if(""===t)o();else{var i={configKey:t,id:void 0!==this.form.id?this.form.id:""};Object(r["a"])(i).then((function(e){"1"===e.data.code?o():o(a)}))}}}}},"5af5":function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e._self._c;return t("ant-modal",{attrs:{visible:e.open,"modal-title":e.formTitle,"adjust-size":!0,modalWidth:"640",modalHeight:"420"},on:{cancel:e.cancel}},[t("a-form-model",{ref:"form",attrs:{slot:"content",model:e.form,rules:e.rules,layout:"vertical"},slot:"content"},[t("a-row",{staticClass:"form-row",attrs:{gutter:32}},[t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"参数编码",prop:"configKey"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.configKey,callback:function(t){e.$set(e.form,"configKey",t)},expression:"form.configKey"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"参数名称",prop:"configName"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.configName,callback:function(t){e.$set(e.form,"configName",t)},expression:"form.configName"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"参数值",prop:"configValue"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.configValue,callback:function(t){e.$set(e.form,"configValue",t)},expression:"form.configValue"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"是否内置参数",prop:"configType"}},[t("a-radio-group",{attrs:{"button-style":"solid"},model:{value:e.form.configType,callback:function(t){e.$set(e.form,"configType",t)},expression:"form.configType"}},e._l(e.typeOptions,(function(o,r){return t("a-radio-button",{key:r,attrs:{value:o.dictValue}},[e._v(e._s(o.dictLabel))])})),1)],1)],1),t("a-col",{attrs:{lg:24,md:24,sm:24,span:24}},[t("a-form-model-item",{attrs:{label:"备注",prop:"remark"}},[t("a-input",{attrs:{placeholder:"请输入备注",type:"textarea","allow-clear":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1),t("template",{slot:"footer"},[t("a-button",{on:{click:e.cancel}},[e._v(" 取消 ")]),t("a-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" 保存 ")])],1)],2)},a=[],i=o("5530"),n=o("1fc7"),l=Object(i["a"])({},n["default"]),c=l,s=o("2877"),f=Object(s["a"])(c,r,a,!1,null,null,null);t["default"]=f.exports}}]);