1 line
8.4 KiB
JavaScript
1 line
8.4 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3519bb13"],{"0257":function(e,t,o){"use strict";o.d(t,"c",(function(){return a})),o.d(t,"b",(function(){return n})),o.d(t,"a",(function(){return l}));var r=o("b775");function a(e){return Object(r["a"])({url:"/system/proDeptRole/getOrgEightRoleTable",method:"get",params:e})}function n(e){return Object(r["a"])({url:"/system/proDeptRole/getOrgEightRoleDetail",method:"get",params:e})}function l(e){return Object(r["a"])({url:"/system/proDeptRole/getMoreOrgData",method:"get",params:e})}},"9d2a":function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"app-container"},[o("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"90px"}},[o("el-form-item",{attrs:{label:"项目部名称",prop:"parentOrgName"}},[o("el-input",{staticStyle:{width:"200px"},attrs:{maxlength:"28",placeholder:"请输入项目部名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.parentOrgName,callback:function(t){e.$set(e.queryParams,"parentOrgName",t)},expression:"queryParams.parentOrgName"}})],1),o("el-form-item",[o("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),o("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.typeList}},[o("el-table-column",{attrs:{label:"序号",align:"center",width:"80",type:"index"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",[e._v(e._s((e.queryParams.pageNum-1)*e.queryParams.pageSize+t.$index+1))])]}}])}),o("el-table-column",{attrs:{label:"项目部名称",align:"center",prop:"orgName","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:"项目经理",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.projectManager?o("div",{staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,1)}}},[e._v(" "+e._s(t.row.projectManager)+" ")]):o("span",[e._v(e._s(t.row.projectManager))])]}}])}),o("el-table-column",{attrs:{label:"安全员",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.safetyOfficer?o("div",{staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,2)}}},[e._v(" "+e._s(t.row.safetyOfficer)+" ")]):o("span",[e._v(e._s(t.row.safetyOfficer))])]}}])}),o("el-table-column",{attrs:{label:"质检员",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.qualityInspector?o("div",{staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,3)}}},[e._v(" "+e._s(t.row.qualityInspector)+" ")]):o("span",[e._v(e._s(t.row.qualityInspector))])]}}])}),o("el-table-column",{attrs:{label:"项目总工",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.chiefEngineer?o("div",{staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,4)}}},[e._v(" "+e._s(t.row.chiefEngineer)+" ")]):o("span",[e._v(e._s(t.row.chiefEngineer))])]}}])}),o("el-table-column",{attrs:{label:"机械员",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.mechanicalStaff?o("div",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["dept:eight:query"],expression:"['dept:eight:query']"}],staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,5)}}},[e._v(" "+e._s(t.row.mechanicalStaff)+" ")]):o("span",[e._v(e._s(t.row.mechanicalStaff))])]}}])}),o("el-table-column",{attrs:{label:"资料员",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.documentStaff?o("div",{staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,6)}}},[e._v(" "+e._s(t.row.documentStaff)+" ")]):o("span",[e._v(e._s(t.row.documentStaff))])]}}])}),o("el-table-column",{attrs:{label:"施工员",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.constructionStaff?o("div",{staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,7)}}},[e._v(" "+e._s(t.row.constructionStaff)+" ")]):o("span",[e._v(e._s(t.row.constructionStaff))])]}}])}),o("el-table-column",{attrs:{label:"材料员",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.materialStaff?o("div",{staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,8)}}},[e._v(" "+e._s(t.row.materialStaff)+" ")]):o("span",[e._v(e._s(t.row.materialStaff))])]}}])}),o("el-table-column",{attrs:{label:"其他",align:"center","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return["兼职"===t.row.other?o("div",{staticStyle:{color:"#1890FF",cursor:"pointer"},on:{click:function(o){return e.handleAllocation(t.row,9)}}},[e._v(" "+e._s(t.row.other)+" ")]):o("span",[e._v(e._s(t.row.other))])]}}])})],1),o("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),o("el-dialog",{attrs:{title:e.title,visible:e.open,width:"650px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[o("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},e._l(e.MoreOrgDataList,(function(e,t){return o("el-row",{key:t},[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"兼职人员:",prop:"orgName","label-width":"90px"}},[o("el-input",{attrs:{value:e.userName,disabled:!0}})],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"兼职角色:",prop:"deptRoleName","label-width":"90px"}},[o("el-input",{attrs:{value:e.deptRoleName,disabled:!0}})],1)],1)],1)})),1),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[o("el-button",{on:{click:e.cancels}},[e._v("关闭")])],1)],1)],1)},a=[],n=(o("a15b"),o("ca17")),l=o.n(n),i=o("0257"),s={name:"Roles",components:{Treeselect:l.a},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,typeList:[],MoreOrgDataList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,parentOrgName:void 0,moreOrgId:this.$route.query.moreOrgId},paramsQuery:{},staffOptions:[],defaultCheckedKeys:[],form:{},defaultProps:{children:"children",label:"name",disabled:"disabled"}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(i["b"])(this.queryParams).then((function(t){e.typeList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={parentOrgName:void 0},this.defaultCheckedKeys=[],this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleAllocation:function(e,t){this.reset(),this.getDialogData(e,t),this.form=e,this.open=!0},getDialogData:function(e,t){var o=this;console.log(e.orgId),this.paramsQuery={orgId:e.orgId,deptRoleId:t},Object(i["a"])(this.paramsQuery).then((function(e){o.MoreOrgDataList=e.data}))},cancels:function(){this.open=!1,this.MoreOrgDataList=[]},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){if(t){var o=e.getStaffAllCheckedKeys();if(0===o.length)return void e.$message.error("请至少选择一个人员");e.form.userId=o.join(","),console.log("form",e.form),proDeptRole(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()}))}}))},getStaffAllCheckedKeys:function(){var e=this.$refs.staff.getCheckedKeys();return e.unshift.apply(e),e}}},c=s,u=o("2877"),f=Object(u["a"])(c,r,a,!1,null,null,null);t["default"]=f.exports}}]); |