webpackJsonp([27],{"rs/A":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("3Xzz"),s=a("c4uw"),o=(a("Mk6G"),a("3E4D")),r=a("Ch4/"),n=a("PI0u"),i=a("P9l9"),c={name:"addAdminRole",data:function(){return{navpath:[{name:"首页",path:"/index",relocation:!0},{name:"设置",path:"/companyAddress"},{name:"设置子管理员",path:"/setChildAdmin"},{name:"添加成员",path:""}],ruleForm:{roleId:"",name:"企业管理员",peopleList:[{id:"1",name:"张三",img:"http://thirdwx.qlogo.cn/mmopen/j7nX4OeBsXRNyvh6micCywssVEYCaWiaicUZq5Vn2zWktWLAyRvEAH7icQmUhLze8rrQYpM5ptwZ2RL7cX0icyBbiavhYFNTIZhibKu/0"}],departList:[{id:"1",name:"张三张三"},{id:"2",name:"张三张三"},{id:"3",name:"张三张三"}],brandValue:["1","2","3","4"],brandOptions:[{label:"A品牌",value:"1"},{label:"b品牌",value:"2"},{label:"A品牌",value:"3"},{label:"b品牌",value:"4"}]},rules:{},treeSet:{isSelectPerson:!0,dialogVisible:!0,isSingle:!0},treeData:{},defaultSelection:[],defaultParent:[]}},computed:{},methods:{changeRoute:function(e){this.$router.push(e)},submitForm:Object(n.a)(function(e){var t=this;t.$refs[e].validate(function(e){if(console.log(e),!e)return!1;t.postSave(data,clerks)})},500),postSave:function(e,t){var a=this,l={data:e,roleId:a.ruleForm.roleId,clerks:t};Object(i.b)("/haoban-manage-web/save-clerk-role",l).then(function(e){var t=e.data;1!=t.errorCode?r.a.errorMsg(t):o.a.showmsg("操作成功","success")}).catch(function(e){console.log(e),a.$message.error({duration:1e3,message:e.message})})},delField:function(e,t,a){this.$alert("确定要删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(t){t.value;a.splice(e,1)}).catch(function(){})},delDepart:function(e,t){t.splice(e,1)},showDialogLayer:function(){console.log(1)},handleSelectedList:function(e){console.log(e)}},mounted:function(){this.$route.query.hasOwnProperty("roleId")&&(this.ruleForm.roleId=this.$route.query.roleId)},components:{navCrumb:l.a,vueSelectEmployee:s.a}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"companyAddress-wrap common-set-wrap"},[a("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"管理员角色",prop:"name"}},[a("el-input",{staticClass:"w-380",attrs:{disabled:"",placeholder:""},model:{value:e.ruleForm.name,callback:function(t){e.$set(e.ruleForm,"name",t)},expression:"ruleForm.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"选择人员",prop:"name"}},[a("div",{staticClass:"flex w-380 flex-wrap"},[e._l(e.ruleForm.peopleList,function(t,l){return[a("div",{staticClass:"people-cell"},[a("img",{attrs:{src:t.img}}),e._v(" "),a("p",[e._v(e._s(t.name))]),e._v(" "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){a.stopPropagation(),e.delField(l,t,e.ruleForm.peopleList)}}})])]}),e._v(" "),a("div",{staticClass:"people-cell"},[a("span",{staticClass:"add-icon",on:{click:function(t){t.stopPropagation(),e.showDialogLayer("people")}}},[a("i",{staticClass:"el-icon-plus"})])])],2)]),e._v(" "),a("el-form-item",{staticClass:"m-b-0",attrs:{label:"选择管理范围",prop:"name"}},[a("div",{staticClass:"flex w-380 flex-column item-cell-select"},[a("div",[e._v("行政架构")]),e._v(" "),a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",on:{click:function(t){e.showDialogLayer("depart")}}},[a("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"181px"}},[a("span",[e._l(e.ruleForm.departList,function(t,l){return[a("span",{key:l,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(l,e.ruleForm.departList)}}})])]})],2)])])]),e._v(" "),a("div",[e._v("门店架构")]),e._v(" "),a("div",{staticClass:"store-item-wrap"},[a("el-select",{attrs:{multiple:"",placeholder:"请选择"},model:{value:e.ruleForm.brandValue,callback:function(t){e.$set(e.ruleForm,"brandValue",t)},expression:"ruleForm.brandValue"}},e._l(e.ruleForm.brandOptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1)])]),e._v(" "),a("el-form-item",{staticClass:"m-t-24"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("保存")])],1)],1)],1)]),e._v(" "),a("vue-gic-footer"),e._v(" "),a("vue-select-employee",{attrs:{defaultSelection:e.defaultSelection,treeSet:e.treeSet,treeData:e.treeData},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var d=a("VU/8")(c,u,!1,function(e){a("tLVn")},"data-v-483241d3",null);t.default=d.exports},tLVn:function(e,t){}});
//# sourceMappingURL=27.c7f85eb9ed40d3db86c5.js.map