(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3d2fa68d"],{"0a47":function(e,t,s){},"0c6d":function(e,t,s){"use strict";s("d3b7");var i=s("2b0e"),a=s("bc3a"),n=s.n(a),c=s("5c96");s("0fae");i["default"].prototype.$axios=n.a;var r=n.a.create({baseURL:i["default"].prototype.BASE_URL+"",timeout:5e4});r.defaults.withCredentials=!0,r.interceptors.request.use((function(e){return e}),(function(e){return Promise.reject(e)})),r.interceptors.response.use((function(e){switch(e.data.code){case 200:e.data.msg&&c["Message"].success(e.data.msg);break;case 401:c["MessageBox"].alert("登陆已过期,请关闭当前窗口重新进入-能臣工作台");break;case 403:break;case 500:c["Notification"].error({title:"提醒",message:e.data.msg});break;case 404:Object(c["Notification"])({title:"提醒",message:"未找到,检查参数",type:"warning"});break;default:break}return e.data}),(function(e){switch(console.log("请求",e),e.response.status){case 401:c["MessageBox"].alert("登陆已过期,请关闭当前窗口重新进入-能臣工作台");break;case 403:break;case 500:c["Notification"].error({title:"提醒",message:"服务器出了点小错误"});break;case 404:Object(c["Notification"])({title:"提醒",message:"未找到,检查参数",type:"warning"});break;default:return Promise.reject(e)}return Promise.reject(e)})),t["a"]=r},"3c6d":function(e,t,s){},"709c":function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("w-dialog",{attrs:{border:!1,closeFree:"",width:"600px",title:e.title},on:{ok:e.selectOk},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[s("div",{staticClass:"picker"},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"candidate"},["role"!==e.type?s("div",[s("el-input",{staticStyle:{width:"95%"},attrs:{size:"small",clearable:"",placeholder:"搜索人员,支持拼音、姓名","prefix-icon":"el-icon-search"},on:{input:e.searchUser},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),s("div",{directives:[{name:"show",rawName:"v-show",value:!e.showUsers,expression:"!showUsers"}]},[s("ellipsis",{staticStyle:{height:"18px",color:"#8c8c8c",padding:"5px 0 0"},attrs:{hoverTip:"",row:1,content:e.deptStackStr}},[s("i",{staticClass:"el-icon-office-building",attrs:{slot:"pre"},slot:"pre"})]),s("div",{staticStyle:{"margin-top":"5px"}},[s("el-checkbox",{attrs:{disabled:!e.multiple},on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")]),s("span",{directives:[{name:"show",rawName:"v-show",value:e.deptStack.length>0,expression:"deptStack.length > 0"}],staticClass:"top-dept",on:{click:e.beforeNode}},[e._v("上一级")])],1)],1)],1):s("div",{staticClass:"role-header"},[s("div",[e._v("系统角色")])]),s("div",{staticClass:"org-items",style:"role"===e.type?"height: 350px":""},[s("el-empty",{directives:[{name:"show",rawName:"v-show",value:0===e.orgs.length,expression:"orgs.length === 0"}],attrs:{"image-size":100,description:"似乎没有数据"}}),e._l(e.orgs,(function(t,i){return s("div",{key:i,class:e.orgItemClass(t),on:{click:function(s){return e.selectChange(t)}}},[s("el-checkbox",{attrs:{disabled:e.disableDept(t)},model:{value:t.selected,callback:function(s){e.$set(t,"selected",s)},expression:"org.selected"}}),"dept"===t.type?s("div",[s("i",{staticClass:"el-icon-folder-opened"}),s("span",{staticClass:"name"},[e._v(e._s(t.name))]),s("span",{class:"next-dept"+(t.selected?"-disable":""),on:{click:function(s){return s.stopPropagation(),e.nextNode(t)}}},[s("i",{staticClass:"iconfont icon-map-site"}),e._v("下级 ")])]):"user"===t.type?s("div",{staticStyle:{display:"flex","align-items":"center"}},[e.$isNotEmpty(t.avatar)?s("el-avatar",{attrs:{size:35,src:t.avatar}}):s("span",{staticClass:"avatar"},[e._v(e._s(e.getShortName(t.name)))]),s("span",{staticClass:"name"},[e._v(e._s(t.name))])],1):s("div",{staticStyle:{display:"inline-block"}},[s("i",{staticClass:"iconfont icon-bumen"}),s("span",{staticClass:"name"},[e._v(e._s(t.name))])])],1)}))],2)]),s("div",{staticClass:"selected"},[s("div",{staticClass:"count"},[s("span",[e._v("已选 "+e._s(e.select.length)+" 项")]),s("span",{on:{click:e.clearSelected}},[e._v("清空")])]),s("div",{staticClass:"org-items",staticStyle:{height:"350px"}},[s("el-empty",{directives:[{name:"show",rawName:"v-show",value:0===e.select.length,expression:"select.length === 0"}],attrs:{"image-size":100,description:"请点击左侧列表选择数据"}}),e._l(e.select,(function(t,i){return s("div",{key:i,class:e.orgItemClass(t)},["dept"===t.type?s("div",[s("i",{staticClass:"el-icon-folder-opened"}),s("span",{staticClass:"name",staticStyle:{position:"static"}},[e._v(e._s(t.name))])]):"user"===t.type?s("div",{staticStyle:{display:"flex","align-items":"center"}},[e.$isNotEmpty(t.avatar)?s("el-avatar",{attrs:{size:35,src:t.avatar}}):s("span",{staticClass:"avatar"},[e._v(e._s(e.getShortName(t.name)))]),s("span",{staticClass:"name"},[e._v(e._s(t.name))])],1):s("div",[s("i",{staticClass:"iconfont icon-bumen"}),s("span",{staticClass:"name"},[e._v(e._s(t.name))])]),s("i",{staticClass:"el-icon-close",on:{click:function(t){return e.noSelected(i)}}})])}))],2)])])])},a=[],n=(s("ac1f"),s("5319"),s("5b81"),s("d81d"),s("b0c0"),s("841c"),s("498a"),s("d3b7"),s("159b"),s("a434"),s("0c6d"));function c(e){return Object(n["a"])({url:"easyflow/flowbase/getOrgTree",method:"get",params:e})}function r(){return Object(n["a"])({url:"easyflow/flowbase/getRole",method:"get"})}function l(e){return Object(n["a"])({url:"oa/org/tree/user/search",method:"get",params:e})}var o={name:"OrgPicker",components:{},props:{title:{default:"请选择",type:String},type:{default:"org",type:String},multiple:{default:!1,type:Boolean},selected:{default:function(){return[]},type:Array}},data:function(){return{visible:!1,loading:!1,checkAll:!1,nowDeptId:null,isIndeterminate:!1,searchUsers:[],nodes:[],select:[],search:"",deptStack:[]}},computed:{deptStackStr:function(){return String(this.deptStack.map((function(e){return e.name}))).replaceAll(","," > ")},orgs:function(){return this.search&&""!==this.search.trim()?this.searchUsers:this.nodes},showUsers:function(){return this.search||""!==this.search.trim()}},methods:{show:function(e){this.visible=!0,this.init(),this.getOrgList(e)},orgItemClass:function(e){return{"org-item":!0,"org-dept-item":"dept"===e.type,"org-user-item":"user"===e.type,"org-role-item":"role"===e.type}},disableDept:function(e){return"user"===this.type&&"dept"===e.type},getOrgList:function(e){var t=this;this.loading=!0,"role"==e?r({deptId:this.nowDeptId,type:this.type}).then((function(e){t.loading=!1,t.nodes=e.data,t.selectToLeft()})).catch((function(e){t.loading=!1,t.$message.error(e.response.data)})):c({deptId:this.nowDeptId,type:this.type}).then((function(e){t.loading=!1,t.nodes=e.data,t.selectToLeft()})).catch((function(e){t.loading=!1,t.$message.error(e.response.data)}))},getShortName:function(e){return e?e.length>2?e.substring(1,3):e:"**"},searchUser:function(){var e=this,t=this.search.trim();this.searchUsers=[],this.loading=!0,l({userName:t}).then((function(t){e.loading=!1,e.searchUsers=t.data,e.selectToLeft()})).catch((function(t){e.loading=!1,e.$message.error("接口异常")}))},selectToLeft:function(){var e=this,t=""===this.search.trim()?this.nodes:this.searchUsers;t.forEach((function(t){for(var s=0;s0?e[0]:"",this.showUserSelect=!1,sessionStorage.setItem("user",JSON.stringify(this.loginUser))},to:function(e){null===this.loginUser||""===this.loginUser?this.$message.warning("请先选择一个人员身份进行登录"):this.$router.push(e)}}},r=c,l=(s("cdfc"),s("2877")),o=Object(l["a"])(r,i,a,!1,null,"398dfb57",null);t["default"]=o.exports},e4b3:function(e,t,s){"use strict";s("0a47")}}]); //# sourceMappingURL=chunk-3d2fa68d.b7d22861.js.map