1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
webpackJsonp([400],{P7Vn:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("BO1k"),i=a.n(s),o=a("woOf"),l=a.n(o),n=a("mvHQ"),r=a.n(n),c=a("Dd8w"),d=a.n(c),p=a("bOdI"),u=a.n(p),h=a("NYxO"),m=(a("t4zo"),a("bzuE")),f={data:function(){var e;return e={total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10},options:[],options1:[{value:1,label:"是"},{value:0,label:"否"}],value:"",selectDeptId1:"",accountNumberList:[],settlementTypeList:[],tableData:[],rowIds:[],prDate:"",dialogTitle:"",auditSignList:[],businessTypeList:[],companyList:[],createByList:[],depOptions:[],formData:{deptId:""},ruleForm:{deptId:[{required:!0,message:"请选择部门",trigger:"change"}],postCode:[{required:!0,message:"请选择岗位编号",trigger:"change"}],postName:[{required:!0,message:"请选择岗位名称",trigger:"change"}]},chooseId:""},u()(e,"dialogTitle",""),u()(e,"selectDeptId",""),u()(e,"config",m.a),u()(e,"isDisabled",!1),u()(e,"btnDelDisabled",!0),u()(e,"btnOtherDisabled",!0),u()(e,"chooseClientrVisible",!1),u()(e,"dialogLoading",!1),u()(e,"chooseUserVisible",!1),u()(e,"chooseMaterielVisible",!1),u()(e,"columnSetDialogVisible",!1),u()(e,"advanceQueryDialogVisible",!1),u()(e,"chooseSupplierVisible",!1),u()(e,"columnSetDialogTitle","设置显示字段列表"),u()(e,"tableId","postManagement_index_table"),u()(e,"pictLoading",!1),u()(e,"showTableColumnsDefault",[{title:"部门",prop_:"deptName",select:!0},{title:"岗位编号",prop_:"postCode",select:!0},{title:"岗位名称",prop_:"postName",select:!0},{title:"岗位层级",prop_:"postLevelName",select:!0},{title:"岗位序列",prop_:"postIndexName",select:!0},{title:"起薪等级",prop_:"salaryLevel",select:!0},{title:"是否编制",prop_:"isAuthorized",select:!0},{title:"编制人数",prop_:"authorizedCounts",select:!0},{title:"岗位职责",prop_:"jobRequirements",select:!0},{title:"任务要求",prop_:"responsibilities",select:!0}]),u()(e,"showTableColumns",[{title:"部门",prop_:"deptName",select:!0},{title:"岗位编号",prop_:"postCode",select:!0},{title:"岗位名称",prop_:"postName",select:!0},{title:"岗位层级",prop_:"postLevelName",select:!0},{title:"岗位序列",prop_:"postIndexName",select:!0},{title:"起薪等级",prop_:"salaryLevel",select:!0},{title:"是否编制",prop_:"isAuthorized",select:!0},{title:"编制人数",prop_:"authorizedCounts",select:!0},{title:"岗位职责",prop_:"jobRequirements",select:!0},{title:"任务要求",prop_:"responsibilities",select:!0}]),u()(e,"showTableColumnsTemp",[]),u()(e,"formTableData",[]),u()(e,"totalTransferAmount",0),e},computed:d()({},Object(h.c)({userInfo:"user/getUserInfo"})),mounted:function(){this.showTableColumns=JSON.parse(r()(this.showTableColumns)),this.showTableColumnsTemp=JSON.parse(r()(this.showTableColumns)),this.initData(),this.getList(),this.getShowColumns()},methods:{save:function(e){var t=this;this.$refs[e].validate(function(e){if(e){if(1==t.formData.isAuthorized&&!t.formData.authorizedCounts)return void t.$message({message:"是否编制为是时,编制人数必填且不为零",type:"warning"});if(t.formData.authorizedCounts||(t.formData.authorizedCounts=0),t.isDisabled)return;t.isDisabled=!0,t.$api.postManagementAPI.save(t.formData).then(function(e){t.isDisabled=!1,0===e.code?(t.$message({message:e.msg,type:"success"}),t.advanceQueryDialogVisible=!1,t.getList()):t.$message({message:e.msg,type:"error"})})}})},search:function(){this.search_data.pageno=1,this.getList()},getList:function(){var e=this;this.pictLoading=!0,this.$api.postManagementAPI.pageList(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.total=t.data.totalRows,e.tableData=t.data.datas?t.data.datas:[],e.tableData.forEach(function(e){1==e.isAuthorized?e.isAuthorized="是":e.isAuthorized="否"})):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},gotoDetail:function(e){this.advanceQueryDialogVisible=!0,this.dialogTitle="编辑岗位"},goAdd:function(){this.chooseId="",this.formData={deptId:""},this.selectDeptId1="",this.advanceQueryDialogVisible=!0,this.dialogTitle="新增岗位",void 0!==this.$refs.form&&this.$refs.form.resetFields()},edit:function(){console.log(this.rowIds[0]),this.chooseId=this.rowIds[0].id,this.advanceQueryDialogVisible=!0,this.dialogTitle="编辑岗位",void 0!==this.$refs.form&&this.$refs.form.resetFields(),this.getDetail()},viewDetail:function(e){this.chooseId=e.id,this.advanceQueryDialogVisible=!0,this.dialogTitle="编辑岗位",void 0!==this.$refs.form&&this.$refs.form.resetFields(),this.getDetail()},getDetail:function(){var e=this;this.dialogLoading=!0,this.formData={},this.$api.postManagementAPI.detail(this.chooseId).then(function(t){e.dialogLoading=!1,t.data?(e.formData=l()({},e.formData,t.data),e.selectDeptId1=e.formData.deptId,e.setDefaultDept()):(e.dialogVisible=!1,e.$alert("获取岗位管理明细失败","提示",{type:"warning"}))}).catch(function(e){console.log(e)})},setDefaultDept:function(){if(this.depOptions.length>0&&this.formData.deptId){var e=r()(this.formData.deptId),t=this.treeFindPath(this.depOptions,function(t){return t.id===e});this.selectDeptId1=JSON.parse(r()(t))}if(this.depOptions.length>0&&this.search_data.deptId){var a=r()(this.search_data.deptId),s=this.treeFindPath(this.depOptions,function(e){return e.id===a});this.selectDeptId=JSON.parse(r()(s))}},handleChange1:function(e){this.formData.deptId=e[e.length-1],this.selectDeptId1=e},handleChange:function(e){this.search_data.deptId=e[e.length-1],this.selectDeptId=e},treeFindPath:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var s=!0,o=!1,l=void 0;try{for(var n,r=i()(e);!(s=(n=r.next()).done);s=!0){var c=n.value;if(a.push(c.id),t(c))return a;if(c.children){var d=this.treeFindPath(c.children,t,a);if(d.length)return d}a.pop()}}catch(e){o=!0,l=e}finally{try{!s&&r.return&&r.return()}finally{if(o)throw l}}return[]},initData:function(){var e=this;this.$api.dictAPI.getDictsByType("post_hierarchy").then(function(t){e.options=t.datas}),this.$api.dictAPI.getDictsByType("position_sequence").then(function(t){e.businessTypeList=t.datas}),this.$api.commonAPI.getDeptsTree().then(function(t){0===t.code&&(e.depOptions=t.data.children,e.setDefaultDept(),e.setDeptList(e.depOptions))}).catch(function(e){console.log(e)})},setDeptList:function(e){var t=!0,a=!1,s=void 0;try{for(var o,l=i()(e);!(t=(o=l.next()).done);t=!0){var n=o.value;n.hasChildren?this.setDeptList(n.children):n.children=void 0}}catch(e){a=!0,s=e}finally{try{!t&&l.return&&l.return()}finally{if(a)throw s}}},remove:function(){var e=this,t=[];this.rowIds.forEach(function(e){t.push(e.id)}),this.$confirm("确认删除选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.postManagementAPI.batchRemove(t).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg?t.msg:"删除失败,请重试",type:"error"})}).catch(function(t){e.$message({message:"删除失败,请重试",type:"error"})})})},handleSelectionChange:function(e){console.log(e),this.rowIds=e,this.setBtn(e)},handleSizeChange:function(e){this.search_data.pagesize=e,this.getList()},handleCurrentChange:function(e){this.search_data.pageno=e,this.getList()},setBtn:function(e){var t=!0,a=!0;e.length>0?(a=!1,1==e.length&&(t=!1)):(t=!0,a=!0),this.btnOtherDisabled=a,this.btnDelDisabled=t},showColumnSetDialog:function(){this.columnSetDialogVisible=!0,this.showTableColumnsTemp=JSON.parse(r()(this.showTableColumns))},toUp:function(e){if(0==e.$index)return!1;for(var t=void 0,a=0;a<this.showTableColumns.length;a++)this.showTableColumns[a].prop_==e.row.prop_&&(t=a);var s=this.showTableColumns[t];this.showTableColumns[t]=this.showTableColumns[t-1],this.showTableColumns[t-1]=s,this.$forceUpdate()},toDown:function(e){if(e.$index==this.showTableColumns.length-1)return!1;for(var t=void 0,a=0;a<this.showTableColumns.length;a++)this.showTableColumns[a].prop_==e.row.prop_&&(t=a);var s=this.showTableColumns[t];this.showTableColumns[t]=this.showTableColumns[t+1],this.showTableColumns[t+1]=s,this.$forceUpdate()},toDefault:function(){this.showTableColumns=JSON.parse(r()(this.showTableColumnsDefault)),this.$forceUpdate()},saveAndCloseColumnSetDialog:function(){var e=this,t=this.tableId,a=r()(this.showTableColumns);this.columnSetDialogVisible=!1,this.$api.tableColumnAPI.saveShowColumns({tableNo:t,tableColumns:a}).then(function(t){var a=JSON.parse(r()(e.showTableColumns));e.formTableData=[];for(var s=0;s<a.length;s++)a[s].select&&e.formTableData.push(a[s])}).catch(function(e){console.log(e)})},handleClose:function(){this.showTableColumns=JSON.parse(r()(this.showTableColumnsTemp)),this.columnSetDialogVisible=!1},getShowColumns:function(){var e=this,t=this.tableId;this.formTableData=[],this.$api.tableColumnAPI.getShowColumns({tableNo:t}).then(function(t){if(0==t.code)if(t.results){e.showTableColumns=JSON.parse(t.results);for(var a=JSON.parse(r()(e.showTableColumns)),s=0;s<a.length;s++)a[s].select&&e.formTableData.push(a[s]);e.$forceUpdate()}else{for(var i=JSON.parse(r()(e.showTableColumnsDefault)),o=0;o<i.length;o++)i[o].select&&e.formTableData.push(i[o]);e.$forceUpdate()}else e.$message({message:t.msg?t.msg:"获取列表信息失败",type:"error"})}).catch(function(t){e.$message({message:t,type:"error"}),console.log(t)})}},watch:{}},g={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"organizationalManagement:postManagement:add",expression:"'organizationalManagement:postManagement:add'"}],attrs:{type:"primary"},on:{click:function(t){return e.goAdd()}}},[e._v("新增")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"organizationalManagement:postManagement:remove",expression:"'organizationalManagement:postManagement:remove'"}],attrs:{type:"primary",disabled:e.btnOtherDisabled},on:{click:function(t){return e.remove()}}},[e._v("删除")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"organizationalManagement:postManagement:edit",expression:"'organizationalManagement:postManagement:edit'"}],attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:function(t){return e.edit()}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.showColumnSetDialog}},[e._v(e._s(e.config.configureBtnName))])],1),e._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"30%"},attrs:{label:"部门"}},[a("el-cascader",{attrs:{clearable:"",options:e.depOptions,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:e.handleChange},model:{value:e.selectDeptId,callback:function(t){e.selectDeptId=t},expression:"selectDeptId"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"23%"},attrs:{label:"岗位名称"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入"},model:{value:e.search_data.postName,callback:function(t){e.$set(e.search_data,"postName",t)},expression:"search_data.postName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"22%"},attrs:{label:"岗位层级"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:"",size:"small"},model:{value:e.search_data.postLevel,callback:function(t){e.$set(e.search_data,"postLevel",t)},expression:"search_data.postLevel"}},e._l(e.options,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"23%"},attrs:{label:"岗位序列"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:e.search_data.postIndex,callback:function(t){e.$set(e.search_data,"postIndex",t)},expression:"search_data.postIndex"}},e._l(e.businessTypeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.search()}}},[e._v("查询")])],1)],1)])],1),e._v(" "),a("div",{staticClass:"sys-table"},[e.formTableData.length>0?a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"",id:"out-table",data:e.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),e._l(e.formTableData,function(t,s){return a("el-table-column",{key:s,attrs:{prop:t.prop_,label:t.title,align:"center","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(s){return[a("div",["postCode"==t.prop_?a("div",[a("el-link",{attrs:{type:"primary"},on:{click:function(t){return t.stopPropagation(),e.viewDetail(s.row)}}},[e._v(e._s(s.row.postCode))])],1):a("div",[a("div",{staticStyle:{overflow:"hidden"}},[e._v(e._s(s.row[t.prop_]))])])])]}}],null,!0)})})],2):e._e()],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.search_data.pageno,"page-sizes":e.pageSizes,"page-size":e.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),a("el-dialog",{attrs:{title:e.columnSetDialogTitle,center:"",visible:e.columnSetDialogVisible,width:"531px","before-close":e.handleClose},on:{"update:visible":function(t){e.columnSetDialogVisible=t}}},[a("el-table",{key:Math.random(),staticStyle:{width:"100%"},attrs:{border:"",data:e.showTableColumns,"max-height":"350"}},[a("el-table-column",{attrs:{prop:"title",label:"列表名称",width:"180",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"select",label:"是否显示",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{model:{value:t.row.select,callback:function(a){e.$set(t.row,"select",a)},expression:"scope.row.select"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.toUp(t)}}},[e._v("前移")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.toDown(t)}}},[e._v("后移")])]}}])})],1),e._v(" "),a("el-row",{staticClass:"row-bg",staticStyle:{"margin-top":"10px"},attrs:{type:"flex",justify:"center"}},[a("el-col",{attrs:{span:6}},[a("el-button",{attrs:{type:"primary",size:"middle"},on:{click:e.saveAndCloseColumnSetDialog}},[e._v("完成")])],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-button",{attrs:{type:"primary",size:"middle"},on:{click:e.toDefault}},[e._v("恢复默认")])],1)],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.dialogTitle,center:"",visible:e.advanceQueryDialogVisible,width:"670px"},on:{"update:visible":function(t){e.advanceQueryDialogVisible=t}}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.dialogLoading,expression:"dialogLoading"}],ref:"form",staticClass:"dialog-form",staticStyle:{width:"620px"},attrs:{inline:!0,"label-width":"80px",model:e.formData,rules:e.ruleForm}},[a("div",{staticClass:"dialog-line"},[a("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"部门",prop:"deptId"}},[a("el-cascader",{attrs:{clearable:"",options:e.depOptions,disabled:!!e.chooseId,props:{expandTrigger:"hover",label:"text",value:"id",checkStrictly:!0}},on:{change:e.handleChange1},model:{value:e.selectDeptId1,callback:function(t){e.selectDeptId1=t},expression:"selectDeptId1"}})],1),e._v(" "),a("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"岗位编号",prop:"postCode"}},[a("el-input",{attrs:{clearable:""},model:{value:e.formData.postCode,callback:function(t){e.$set(e.formData,"postCode",t)},expression:"formData.postCode"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-line"},[a("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"岗位名称",prop:"postName"}},[a("el-input",{attrs:{clearable:""},model:{value:e.formData.postName,callback:function(t){e.$set(e.formData,"postName",t)},expression:"formData.postName"}})],1),e._v(" "),a("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"岗位层级"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:"",size:"small"},model:{value:e.formData.postLevel,callback:function(t){e.$set(e.formData,"postLevel",t)},expression:"formData.postLevel"}},e._l(e.options,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("div",{staticClass:"dialog-line"},[a("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"岗位序列"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:e.formData.postIndex,callback:function(t){e.$set(e.formData,"postIndex",t)},expression:"formData.postIndex"}},e._l(e.businessTypeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"起薪等级"}},[a("el-input",{attrs:{clearable:""},model:{value:e.formData.salaryLevel,callback:function(t){e.$set(e.formData,"salaryLevel",t)},expression:"formData.salaryLevel"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-line"},[a("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"是否编制"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.formData.isAuthorized,callback:function(t){e.$set(e.formData,"isAuthorized",t)},expression:"formData.isAuthorized"}},e._l(e.options1,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"编制人数"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{label:"描述文字",size:"small",min:0},model:{value:e.formData.authorizedCounts,callback:function(t){e.$set(e.formData,"authorizedCounts",t)},expression:"formData.authorizedCounts"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-line"},[a("el-form-item",{staticClass:"dialog-form-inline-single",attrs:{label:"岗位职责"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请输入"},model:{value:e.formData.responsibilities,callback:function(t){e.$set(e.formData,"responsibilities",t)},expression:"formData.responsibilities"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-line"},[a("el-form-item",{staticClass:"dialog-form-inline-single",attrs:{label:"任职要求"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请输入"},model:{value:e.formData.jobRequirements,callback:function(t){e.$set(e.formData,"jobRequirements",t)},expression:"formData.jobRequirements"}})],1)],1)]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.advanceQueryDialogVisible=!1}}},[e._v("关闭")]),e._v(" "),a("el-button",{attrs:{type:"primary",disabled:e.isDisabled},on:{click:function(t){return e.save("form")}}},[e._v("保存")])],1)],1)],1)},staticRenderFns:[]};var b=a("VU/8")(f,g,!1,function(e){a("tLvO")},"data-v-3decd84c",null);t.default=b.exports},tLvO:function(e,t){}}); |