From a880f9e3df01359284fe1cad27c31ef9c588706e Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 30 Dec 2022 12:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AE=A1=E6=A0=B8=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=9A=84=E5=A4=84=E7=90=86=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E4=B8=AA=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/boeAjax.js | 2 +- src/components/Course/courseForm.vue | 16 +++++++++++----- src/components/System/chooseOrg.vue | 10 +++++++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/api/boe/boeAjax.js b/src/api/boe/boeAjax.js index c575e8e7..3a46b791 100644 --- a/src/api/boe/boeAjax.js +++ b/src/api/boe/boeAjax.js @@ -37,7 +37,7 @@ const formRequest=axios.create({ //是否需要设置 token const isToken = (config.headers || {}).isToken === false let curToken=getToken(); - //curToken='eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkxMDgyMDIsImV4cCI6MTY2OTExNTQwMiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjAxNTU1M0RELTQ0NUUtNjlENC0zNTFGLUREOUExQTU2NDIwRSIsInVJZCI6Ijk2NTM0MTk5OTY0MzIzNDMwNCIsInBlcm1pc3Npb24iOiIifQ==.152729feaf062a11e0c49dc657ca3f965e82228f818e31dfccd21abf0fb53fab' + //curToken='eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzIzMTE2MTIsImV4cCI6MTY3MjMxODgxMiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.a4f41376e994c5fcd3ab537ce17572ef4c633863f87785cf7b6ffa353e2ed51c'; if (curToken && !isToken) { config.headers[TokenName] = curToken // 让每个请求携带自定义token 请根据实际情况自行修改 } diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index 840863e4..519b3713 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -558,12 +558,18 @@ export default { return false; } }, - confirmChooseOrg(orgInfo){ + confirmChooseOrg(orgInfo,parentInfo){ //console.log(orgInfo,'orgInfo'); - if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){ - this.$message.error("此机构无HRBP审核人信息,请重新选择"); - return; - } + // let hrbpData=orgInfo; + // if(!orgInfo.hrbpId){ + // hrbpData=parentInfo; + // //没有,就直接找此机构的上级,如果没有上线就提示,如果有就不提示 + + // } + // if(hrbpData && (!hrbpData.hrbpId || hrbpData.hrbpId=='-1')){ + // this.$message.error("此机构及上级都无HRBP审核人信息,请重新选择"); + // return; + // } this.orgName=orgInfo.name; this.orgKid=orgInfo.kid; //kid已不存在 this.courseInfo.orgId=orgInfo.id; diff --git a/src/components/System/chooseOrg.vue b/src/components/System/chooseOrg.vue index 3d830b36..602556d2 100644 --- a/src/components/System/chooseOrg.vue +++ b/src/components/System/chooseOrg.vue @@ -43,6 +43,7 @@ dlgShow:false, orgName:'', chooseOrg:{}, + chooseParent:{}, treeData:[], departData:[], departProps: { @@ -122,7 +123,7 @@ }); }else{ parentId = node.data.id; - + apiUserBasic.getOrgInfo(parentId).then(rs=>{ if(rs.status==200){ let treeList=[]; @@ -159,8 +160,11 @@ handleSelectionChange(val) { this.multipleSelection = val; }, - handleDepartNodeClick(data){ + handleDepartNodeClick(data,node,element){ this.chooseOrg = data; + this.chooseParent=node.parent.data; + //console.log(node,'node'); + //console.log(element,'element'); }, confirm(){ if(!this.chooseOrg.id){ @@ -168,7 +172,7 @@ return; } //this.dlgShow=false; - this.$emit('confirm',this.chooseOrg); + this.$emit('confirm',this.chooseOrg,this.chooseParent); } } }