(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["AddCustomTemplateFields~f71cff67"],{"113a":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"c",(function(){return s})),a.d(t,"d",(function(){return i})),a.d(t,"e",(function(){return l})),a.d(t,"b",(function(){return o}));var r=a("a27e");function n(e){return Object(r["a"])({url:"news/addCustomParam",method:"get",params:e})}function s(e){return Object(r["a"])({url:"news/getCustomParam",method:"get",params:e})}function i(e){return Object(r["a"])({url:"news/getCustomUpdateVal",method:"get",params:e})}function l(e){return Object(r["a"])({url:"news/updateCustomParam",method:"get",params:e})}function o(e){return Object(r["a"])({url:"news/delCustomParam",method:"get",params:e})}},e2e3:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"addNew"},[a("h2",[e._v(e._s(e.id?e.$lang.edit_fields:e.$lang.add_fields))]),a("el-divider"),a("el-row",{staticClass:"topform_wrap"},[a("el-form",{ref:"elForm",attrs:{model:e.formData,rules:e.rules,"label-width":e.labelWidth}},[a("el-form-item",{attrs:{label:e.$lang.fields_name,prop:"fieldname"}},[a("el-input",{style:{width:"260px"},attrs:{size:"small",placeholder:e.$lang.enter_fields_name,clearable:""},model:{value:e.formData.fieldname,callback:function(t){e.$set(e.formData,"fieldname",t)},expression:"formData.fieldname"}})],1),a("el-form-item",{attrs:{label:e.$lang.fields_content,prop:"value"}},[a("el-input",{style:{width:"260px"},attrs:{size:"small",type:"textarea",autosize:{minRows:5,maxRows:5},placeholder:e.$lang.enter_fields_content,clearable:""},model:{value:e.formData.value,callback:function(t){e.$set(e.formData,"value",t)},expression:"formData.value"}})],1)],1)],1),a("div",{staticClass:"bottomOperationAdd"},[a("el-button",{attrs:{size:"small",type:"primary",loading:e.btnLoading},on:{click:e.submitForm}},[e._v(e._s(e.$lang.submit))]),a("el-button",{attrs:{size:"small"},on:{click:e.goBack}},[e._v(e._s(e.$lang.get_back))]),a("el-button",{attrs:{size:"small"},on:{click:e.resetForm}},[e._v(e._s(e.$lang.reset))])],1)],1)},n=[],s=(a("a9e3"),a("96cf"),a("1da1")),i=a("113a"),l={metaInfo:{title:window.zjmf_cw_lang.edit_fields},data:function(){return{id:Number(this.$route.query.id),formData:{fieldname:"",value:""},rules:{fieldname:[{required:!0,message:this.$lang.enter_fields_name,trigger:"blur"}],value:[{required:!0,message:this.$lang.enter_fields_content,trigger:"blur"}]},labelWidth:window.document.body.clientWidth>768?"80px":null,btnLoading:!1}},methods:{submitForm:function(){var e=this;this.id?this.id&&this.$refs.elForm.validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(a){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return",!1);case 2:return e.formData.id=e.id,e.btnLoading=!0,t.next=6,Object(i["e"])(e.formData);case 6:r=t.sent,n=r.data,200!==n.status?e.$message.error(n.msg):(e.$message.success(n.msg),e.$router.back()),e.btnLoading=!1;case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()):this.$refs.elForm.validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(a){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return",!1);case 2:return e.btnLoading=!0,t.next=5,Object(i["a"])(e.formData);case 5:r=t.sent,n=r.data,200!==n.status?e.$message.error(n.msg):(e.$message.success(n.msg),e.$router.back()),e.btnLoading=!1;case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},resetForm:function(){this.$refs.elForm.resetFields()},goBack:function(){this.$router.go(-1)},getData:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.id){t.next=6;break}return t.next=3,Object(i["d"])({id:e.id});case 3:a=t.sent,r=a.data,200!==r.status?e.$message.error(r.msg):(e.formData.fieldname=r.data.field,e.formData.value=r.data.value);case 6:case"end":return t.stop()}}),t)})))()}},created:function(){this.getData()}},o=l,u=a("2877"),c=Object(u["a"])(o,r,n,!1,null,null,null);t["default"]=c.exports}}]);