mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 05:16:43 +08:00
统一定义一个部门名称截断的处理
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<div v-else class="uavatar">
|
||||
<div v-if="sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div>
|
||||
<div v-else><img src="../../../public/images/Avatarwoman.png" alt=""></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-left: 15px;">
|
||||
@@ -60,9 +60,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
userAvatarText
|
||||
} from "@/utils/tools.js";
|
||||
import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'UcHeader',
|
||||
@@ -86,16 +84,9 @@ import {
|
||||
if(this.$route.path == '/study/index'){
|
||||
this.setCurIdentity(1);
|
||||
}
|
||||
this.orgInfo=this.userInfo.departFullName;
|
||||
//console.log(this.orgInfo,'转化前的名称')
|
||||
//this.orgInfo='京东方科技集团/显示事业/技术开发部';
|
||||
if(this.orgInfo){
|
||||
let idx=this.orgInfo.indexOf('/');
|
||||
if(idx>-1){
|
||||
this.orgInfo=this.orgInfo.substring(idx+1);
|
||||
}
|
||||
}
|
||||
//console.log(this.orgInfo,'转化后的名称')
|
||||
//let testName='京东方科技集团股份有限公司/北京中祥英科技有限公司/技术中心';
|
||||
//this.orgInfo=cutFullName(testName,1);
|
||||
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
|
||||
},
|
||||
methods:{
|
||||
setCurIdentity(iden){
|
||||
|
||||
Reference in New Issue
Block a user