(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fc73eb02"],{"0b69":function(t,e,r){"use strict";var a=r("3e32"),o=r.n(a);o.a},"3e32":function(t,e,r){},4736:function(t,e,r){"use strict";r.r(e);var a=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("/sys/basic/nav")}}},[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":"120px","inline-message":!0,rules:t.rules}},[r("el-form-item",{attrs:{label:"导航名称",prop:"title"}},[r("el-input",{model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),r("el-form-item",{attrs:{label:"导航类型",prop:"link_type"}},[r("el-radio-group",{model:{value:t.form.link_type,callback:function(e){t.$set(t.form,"link_type",e)},expression:"form.link_type"}},[r("el-radio",{attrs:{label:1}},[t._v("系统页面")]),r("el-radio",{attrs:{label:2}},[t._v("站外链接")])],1)],1),1==t.form.link_type?r("el-form-item",{attrs:{label:"跳转页面",prop:"page",rules:[{required:!0,message:"请选择跳转页面",trigger:"change"}]}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.page,callback:function(e){t.$set(t.form,"page",e)},expression:"form.page"}},t._l(t.optionsPage,(function(t,e){return r("el-option",{key:e,attrs:{label:t,value:e}})})),1)],1):t._e(),2==t.form.link_type?r("el-form-item",{attrs:{label:"跳转链接",prop:"url",rules:[{required:!0,message:"请输入跳转链接",trigger:"blur"},{max:200,message:"长度在 1 到 200 个字符",trigger:"blur"}]}},[r("el-input",{model:{value:t.form.url,callback:function(e){t.$set(t.form,"url",e)},expression:"form.url"}})],1):t._e(),r("el-form-item",{attrs:{label:"打开方式",prop:"target"}},[r("el-radio-group",{model:{value:t.form.target,callback:function(e){t.$set(t.form,"target",e)},expression:"form.target"}},[r("el-radio",{attrs:{label:"_self"}},[t._v("原窗口")]),r("el-radio",{attrs:{label:"_blank"}},[t._v("新窗口")])],1)],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",e)},expression:"form.sort_id"}})],1),r("el-form-item",{attrs:{label:"是否显示",prop:"is_display"}},[r("el-radio-group",{model:{value:t.form.is_display,callback:function(e){t.$set(t.form,"is_display",e)},expression:"form.is_display"}},[r("el-radio",{attrs:{label:1}},[t._v("显示")]),r("el-radio",{attrs:{label:0}},[t._v("不显示")])],1)],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("/sys/basic/nav")}}},[t._v("返回")])],1)],1)],1)],1)},o=[],n=r("5530"),l=r("c476"),i=r("52b5"),s={data:function(){return{form:{title:"",link_type:1,page:"",url:"",target:"_self",sort_id:0,is_display:1},optionsPage:[],rules:{title:[{required:!0,message:"请输入导航名称",trigger:"blur"},{max:15,message:"长度在 1 到 15 个字符",trigger:"blur"}]}}},created:function(){this.fetchInfo()},methods:{fetchInfo:function(){var t=this;this.infoLoading=!0,Object(i["a"])({type:"navPage"}).then((function(e){t.optionsPage=e.data,t.infoLoading=!1})).catch((function(){}))},onSubmit:function(t){var e=this,r=this,a=Object(n["a"])({},this.form);this.$refs[t].validate((function(t){if(!t)return!1;Object(l["a"])(a).then((function(t){return e.$message.success(t.message),setTimeout((function(){r.$router.push("/sys/basic/nav")}),1500),!0})).catch((function(){}))}))},goto:function(t){this.$router.push(t)}}},u=s,c=(r("0b69"),r("2877")),f=Object(c["a"])(u,a,o,!1,null,"73e01e96",null);e["default"]=f.exports},"52b5":function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var a=r("b775"),o=r("d722");function n(t){return Object(a["a"])({url:o["a"].getClassify,method:"get",params:t})}},c476:function(t,e,r){"use strict";r.d(e,"d",(function(){return n})),r.d(e,"a",(function(){return l})),r.d(e,"c",(function(){return i})),r.d(e,"b",(function(){return s}));var a=r("b775"),o=r("d722");function n(t){return Object(a["a"])({url:o["a"].navList,method:"get",params:t})}function l(t){return Object(a["a"])({url:o["a"].navAdd,method:"post",data:t})}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"post";return"post"==e?Object(a["a"])({url:o["a"].navEdit,method:e,data:t}):Object(a["a"])({url:o["a"].navEdit,method:e,params:t})}function s(t){return Object(a["a"])({url:o["a"].navDelete,method:"post",data:t})}}}]);