(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cf3bacda"],{"706a":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("span",[t._v("添加")]),r("el-button",{staticStyle:{float:"right",padding:"0","margin-left":"14px"},attrs:{type:"text"},on:{click:function(e){return t.goto("/content/flink/list")}}},[t._v(" 返回 ")]),r("el-button",{staticStyle:{float:"right",padding:"0"},attrs:{type:"text"},on:{click:function(e){return t.onSubmit("form")}}},[t._v(" 保存 ")])],1),r("el-form",{ref:"form",staticClass:"common-form",attrs:{model:t.form,"label-width":"80px",rules:t.rules,"inline-message":!0}},[r("el-form-item",{attrs:{label:"名称",prop:"name"}},[r("el-input",{model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),r("el-form-item",{attrs:{label:"网址",prop:"link_url"}},[r("el-input",{model:{value:t.form.link_url,callback:function(e){t.$set(t.form,"link_url",e)},expression:"form.link_url"}})],1),r("el-form-item",{attrs:{label:"是否显示"}},[r("el-switch",{model:{value:t.form.is_display,callback:function(e){t.$set(t.form,"is_display",e)},expression:"form.is_display"}})],1),r("el-form-item",{attrs:{label:"排序",prop:"sort_id"}},[r("el-input",{model:{value:t.form.sort_id,callback:function(e){t.$set(t.form,"sort_id",t._n(e))},expression:"form.sort_id"}})],1),r("el-form-item",{attrs:{label:"备注",prop:"notes"}},[r("el-input",{attrs:{type:"textarea"},model:{value:t.form.notes,callback:function(e){t.$set(t.form,"notes",e)},expression:"form.notes"}})],1),r("el-form-item",{attrs:{label:""}},[r("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSubmit("form")}}},[t._v("保存")]),r("el-button",{on:{click:function(e){return t.goto("/content/flink/list")}}},[t._v("返回")])],1)],1)],1)],1)},i=[],o=r("5530"),a=r("61f7"),l=r("9587"),s={data:function(){var t=function(t,e,r){""==e&&r(),Object(a["d"])(e)?r():r(new Error("请输入正确的网址"))};return{form:{name:"",notes:"",is_display:!0,link_url:"",sort_id:0},rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"},{max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],sort_id:[{type:"number",message:"排序必须为数字",trigger:"blur"}],link_url:[{required:!0,message:"请输入网址",trigger:"blur"},{max:200,message:"长度在 0 到 200 个字符",trigger:"blur"},{validator:t,trigger:"blur"}]}}},created:function(){},methods:{onSubmit:function(t){var e=this,r=this,n=Object(o["a"])({},this.form);this.$refs[t].validate((function(t){if(!t)return!1;n.is_display=!0===n.is_display?1:0,Object(l["a"])(n).then((function(t){return e.$message.success(t.message),setTimeout((function(){r.$router.push("/content/flink/list")}),1500),!0})).catch((function(){}))}))},goto:function(t){this.$router.push(t)}}},u=s,c=(r("a836"),r("2877")),f=Object(c["a"])(u,n,i,!1,null,"d660ed20",null);e["default"]=f.exports},9587:function(t,e,r){"use strict";r.d(e,"d",(function(){return o})),r.d(e,"a",(function(){return a})),r.d(e,"c",(function(){return l})),r.d(e,"b",(function(){return s}));var n=r("b775"),i=r("d722");function o(t){return Object(n["a"])({url:i["a"].flinkList,method:"get",params:t})}function a(t){return Object(n["a"])({url:i["a"].flinkAdd,method:"post",data:t})}function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"post";return"post"==e?Object(n["a"])({url:i["a"].flinkEdit,method:e,data:t}):Object(n["a"])({url:i["a"].flinkEdit,method:e,params:t})}function s(t){return Object(n["a"])({url:i["a"].flinkDelete,method:"post",data:t})}},a836:function(t,e,r){"use strict";var n=r("fa0c"),i=r.n(n);i.a},fa0c:function(t,e,r){}}]);