(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9e77b716"],{"0f43":function(e,t,a){"use strict";a("8c2e")},"10f7":function(e,t,a){"use strict";a.d(t,"c",(function(){return r})),a.d(t,"b",(function(){return n})),a.d(t,"f",(function(){return l})),a.d(t,"e",(function(){return s})),a.d(t,"a",(function(){return c})),a.d(t,"d",(function(){return d})),a.d(t,"g",(function(){return u}));var o=a("b775"),i=(a("4328"),window.sessionStorage.getItem("token"));function r(e){return Object(o["a"])({url:"/portal/v1/syspost/listPage",method:"POST",data:e,headers:{"Content-Type":"application/json",token:i}})}function n(e){return Object(o["a"])({url:"/portal/v1/sysorganization/list",method:"get",data:e,headers:{"Content-Type":"application/json",token:i}})}function l(e){return Object(o["a"])({url:"/portal/v1/syspost/save",method:"POST",data:e,headers:{"Content-Type":"application/json",token:i}})}function s(e){return Object(o["a"])({url:"/portal/v1/syspost/update/"+e.sid,method:"POST",data:e,headers:{"Content-Type":"application/json",token:i}})}function c(e){return Object(o["a"])({url:"/portal/v1/syspost/delBySids/"+e.sids,method:"get",data:e,headers:{"Content-Type":"application/json",token:i}})}function d(e){return Object(o["a"])({url:"/portal/v1/dictcommons/typeValues",method:"get",params:e})}function u(e){return Object(o["a"])({url:"/portal/v1/syspost/selectList",method:"get",params:e})}},"8c2e":function(e,t,a){},bd15:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-tabs",{staticClass:"my-tabs",attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"岗位列表",name:"roleList"}},[a("div",{staticClass:"container"},[a("div",{staticClass:"tab-header"},[a("el-form",{ref:"form",attrs:{inline:!0,model:e.search,"label-width":"80px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"岗位名称"}},[a("el-input",{attrs:{clearable:""},model:{value:e.search.name,callback:function(t){e.$set(e.search,"name",t)},expression:"search.name"}})],1),a("el-button",{on:{click:function(t){return e.getList(1)}}},[e._v("查询")])],1)],1)],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.roleTable,border:""}},[a("el-table-column",{attrs:{label:"序号",width:"50px",type:"index",align:"center"}}),a("el-table-column",{attrs:{label:"操作",width:"220px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){return e.editRow(t.row)}}},[e._v(" 修改")]),a("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(a){return e.delRow(t.row)}}},[e._v(" 删除")])]}}])}),a("el-table-column",{attrs:{prop:"name",label:"岗位名称",align:"center"}}),a("el-table-column",{attrs:{prop:"parentName",label:"上级岗位名称",align:"center"}}),a("el-table-column",{attrs:{prop:"postCode",label:"岗位编码",align:"center"}}),a("el-table-column",{attrs:{prop:"postLevel",label:"职级",align:"center"}})],1),a("pagination",{attrs:{total:e.page.total,page:e.page.current,limit:e.page.size},on:{"update:page":function(t){return e.$set(e.page,"current",t)},"update:limit":function(t){return e.$set(e.page,"size",t)},pagination:e.pagination}}),a("el-dialog",{attrs:{title:e.dialogTitle+"岗位信息",visible:e.editDialog,width:"40%"},on:{"update:visible":function(t){e.editDialog=t}}},[a("table",{staticClass:"e-table",attrs:{cellspacing:"0"}},[a("tr",[a("td",[e._v("上级岗位")]),a("td",[a("el-select",{staticStyle:{width:"300px"},attrs:{filterable:"",clearable:"",placeholder:"请选择"},model:{value:e.roleForm.parentSid,callback:function(t){e.$set(e.roleForm,"parentSid",t)},expression:"roleForm.parentSid"}},e._l(e.parentSidList,(function(e){return a("el-option",{key:e.sid,attrs:{label:e.name,value:e.sid}})})),1)],1)]),a("tr",[a("td",[e._v("岗位名称")]),a("td",[a("el-input",{staticStyle:{width:"300px"},model:{value:e.roleForm.name,callback:function(t){e.$set(e.roleForm,"name",t)},expression:"roleForm.name"}})],1)]),a("tr",[a("td",[e._v("岗位职级")]),a("td",[a("el-select",{staticStyle:{width:"300px"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.changeUPpostLevel},model:{value:e.roleForm.postLevel,callback:function(t){e.$set(e.roleForm,"postLevel",t)},expression:"roleForm.postLevel"}},e._l(e.postLevelList,(function(e){return a("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictKey}})})),1)],1)]),a("tr",[a("td",[e._v("岗位编码")]),a("td",[a("el-input",{staticStyle:{width:"300px"},model:{value:e.roleForm.postCode,callback:function(t){e.$set(e.roleForm,"postCode",t)},expression:"roleForm.postCode"}})],1)])]),a("div",{staticStyle:{"margin-top":"20px","text-align":"center"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.save()}}},[e._v("保 存")]),a("el-button",{on:{click:function(t){e.editDialog=!1}}},[e._v("关 闭")])],1)])],1)]),a("el-tab-pane",{attrs:{label:"新增岗位",name:"addrole"}},[a("el-card",{staticClass:"box-card"},[a("table",{staticClass:"e-table",attrs:{cellspacing:"0"}},[a("tr",[a("td",[e._v("上级岗位")]),a("td",[a("el-select",{staticStyle:{width:"300px"},attrs:{filterable:"",clearable:"",placeholder:"请选择"},model:{value:e.roleForm.parentSid,callback:function(t){e.$set(e.roleForm,"parentSid",t)},expression:"roleForm.parentSid"}},e._l(e.parentSidList,(function(e){return a("el-option",{key:e.sid,attrs:{label:e.name,value:e.sid}})})),1)],1)]),a("tr",[a("td",[e._v("岗位名称")]),a("td",[a("el-input",{staticStyle:{width:"300px"},model:{value:e.roleForm.name,callback:function(t){e.$set(e.roleForm,"name",t)},expression:"roleForm.name"}})],1)]),a("tr",[a("td",[e._v("岗位职级")]),a("td",[a("el-select",{staticStyle:{width:"300px"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.changePostLevel},model:{value:e.roleForm.postLevel,callback:function(t){e.$set(e.roleForm,"postLevel",t)},expression:"roleForm.postLevel"}},e._l(e.postLevelList,(function(e){return a("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictKey}})})),1)],1)]),a("tr",[a("td",[e._v("岗位编码")]),a("td",[a("el-input",{staticStyle:{width:"300px"},model:{value:e.roleForm.postCode,callback:function(t){e.$set(e.roleForm,"postCode",t)},expression:"roleForm.postCode"}})],1)])]),a("div",{staticStyle:{"margin-top":"20px","text-align":"center"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.save()}}},[e._v("保 存")])],1)])],1)],1)},i=[],r=a("10f7"),n={data:function(){return{dialogTitle:"",activeName:"roleList",roleForm:{remarks:"",roleName:"",postCode:"",orgSid:"",postLevel:"",postLevelKey:"",parentSid:""},formBackup:{},search:{name:"",orgSid:""},orgName:"",page:{total:0,current:1,size:10},roleTable:[],editDialog:!1,loading:!1,defaultProps:{children:"children",label:"name"},checkedId:[],checkedId1:[],checkedId2:[],treedata:[],treedata1:[],treedata2:[],postLevelList:[],parentSidList:[]}},mounted:function(){this.formBackup=Object.assign({},this.roleForm),this.getList(),this.getOrgList(),this.postLevel(),this.getParent()},methods:{pagination:function(e){this.page.current=e.pageNum,this.page.size=e.pageSize,this.getList()},getList:function(e){var t=this;"1"==e&&(this.page.current=1);var a=this.page;a.params=this.search,Object(r["c"])(a).then((function(e){t.page.total=e.data.total,t.roleTable=e.data.records}))},postLevel:function(){var e=this;Object(r["d"])({psid:0,type:"postLevel"}).then((function(t){"200"===t.code&&(e.postLevelList=t.data)}))},getParent:function(){var e=this;Object(r["g"])().then((function(t){"200"===t.code&&(e.parentSidList=t.data)}))},changePostLevel:function(e){var t=null;this.postLevelList.forEach((function(a){a.dictKey==e&&(t={name:a.dictValue,value:a.dictKey})})),this.roleForm.postLevel=t.name,this.roleForm.postLevelKey=t.value},changeUPpostLevel:function(e){var t=null;this.postLevelList.forEach((function(a){a.dictKey==e&&(t={name:a.dictValue,value:a.dictKey})})),this.roleForm.postLevel=t.name,this.roleForm.postLevelKey=t.value},handleClick:function(e,t){"addrole"==e.name?(this.dialogTitle="新增",this.roleForm=Object.assign({},this.formBackup)):this.getList()},editRow:function(e){this.dialogTitle="编辑",this.editDialog=!0,console.log(e),this.roleForm=Object.assign({},e),this.checkedId1=[this.roleForm.orgSid]},delRow:function(e){var t=this;this.$confirm("确定要删除该岗位吗, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={sids:e.sid};Object(r["a"])(a).then((function(e){t.getList(),t.$message({type:"success",message:"删除成功!"})}))}))},save:function(){var e=this;this.roleForm.sid?Object(r["e"])(this.roleForm).then((function(t){"200"==t.code&&(e.getList(),e.editDialog=!1,e.$message({message:t.msg,type:"success"}))})):Object(r["f"])(this.roleForm).then((function(t){if("200"==t.code){e.getList(),e.activeName="roleList",e.$message({message:t.msg,type:"success"})}})),this.reset()},reset:function(){this.roleForm={remarks:"",roleName:"",orgSid:""},this.search={name:"",orgSid:""}},getOrgList:function(e){var t=this;this.roleDialog=!0,this.checkedId=[],this.Thisrow=e,this.loading=!0;var a={};Object(r["b"])(a).then((function(e){t.treedata=e.data,t.treedata1=e.data,t.treedata2=e.data,t.loading=!1}))},checkchange:function(e,t,a){if(t){this.search.orgSid=e.sid,this.orgName=e.name;var o=[];return o=[e.sid],void this.$refs.Tree.setCheckedKeys(o)}},checkchange1:function(e,t,a){if(t){this.roleForm.orgSid=e.sid;var o=[];return o=[e.sid],void this.$refs.Tree1.setCheckedKeys(o)}},checkchange2:function(e,t,a){if(t){this.roleForm.orgSid=e.sid;var o=[];return o=[e.sid],void this.$refs.Tree2.setCheckedKeys(o)}},handleClear:function(){this.orgName="",this.search.orgSid="";var e=[];this.$refs.Tree.setCheckedKeys(e)}}},l=n,s=(a("0f43"),a("2877")),c=Object(s["a"])(l,o,i,!1,null,"c69171f2",null);t["default"]=c.exports}}]);