(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0ac59a1c"],{"7bd9":function(t,e,i){"use strict";i("dbe1")},a998:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"app-form margin-top levelEdit"},[i("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[i("div",{staticClass:"app-form-group"},[i("div",{staticClass:"app-form-ti"},[t._v("基础设置")]),i("div",{staticClass:"padding-top-lg"},[i("el-form-item",{attrs:{label:"上级",prop:"pid"}},[i("el-select",{attrs:{placeholder:"选择上级"},model:{value:t.form.pid,callback:function(e){t.$set(t.form,"pid",e)},expression:"form.pid"}},[i("el-option",{attrs:{value:0,label:"无"}}),t._l(t.plist,(function(t,e){return i("el-option",{key:e,attrs:{value:t.id,label:t.name}})}))],2)],1),i("el-form-item",{attrs:{label:"权限名称",prop:"name"}},[i("el-input",{staticClass:"form-input",model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),i("el-form-item",{attrs:{label:"权限规则",prop:"rule"}},[i("el-input",{staticClass:"form-input",model:{value:t.form.rule,callback:function(e){t.$set(t.form,"rule",e)},expression:"form.rule"}})],1),i("el-form-item",{attrs:{label:"规则类型",prop:"type"}},[i("el-radio-group",{model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[i("el-radio",{attrs:{label:0}},[t._v("页面")]),i("el-radio",{attrs:{label:1}},[t._v("接口")]),i("el-radio",{attrs:{label:2}},[t._v("功能")])],1)],1)],1)]),i("div",{staticClass:"padding-xl flex justify-center"},[i("el-button",{on:{click:t.onBack}},[t._v("返回")]),i("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit()}}},[t._v("提交")])],1)])],1),i("copyright")],1)},r=[],o=i("7f70"),s=i("8327"),l={name:"LevelEdit",data:function(){return{rules:{name:[{required:!0,message:"请输入权限名称",trigger:"blur"}],rule:[{required:!0,message:"请输入权限规则",trigger:"blur"}]},form:{name:"",rule:"",pid:0,type:0},id:"",plist:[],is_submit:!1}},computed:Object(o["a"])({},Object(s["b"])(["config"])),created:function(){this.id=this.$route.query.id,this.init()},methods:{onBack:function(){this.$router.go(-1)},change:function(t){this.$forceUpdate()},init:function(){var t=this;this.api.get("auth/authDetail",{id:this.id}).then((function(e){1==e.code&&(e.data.info&&(t.form=e.data.info),t.plist=e.data.plist)}))},submit:function(){var t=this;this.form,this.$refs["dataForm"].validate((function(e){if(e){if(t.is_submit)return;t.is_submit=!0,t.api.post("auth/authPost",Object(o["a"])({id:t.id},t.form)).then((function(e){t.is_submit=!1,1==e.code?(t.$util.success(e.message),t.onBack()):t.$util.error(e.message)})).catch((function(){t.is_submit=!1}))}}))},resetForm:function(){this.form={name:"",rule:"",pid:"",type:"0"}}}},n=l,u=(i("7bd9"),i("3d7a")),c=Object(u["a"])(n,a,r,!1,null,null,null);e["default"]=c.exports},dbe1:function(t,e,i){}}]);