机构名称的截断处理

This commit is contained in:
daihh
2022-10-20 17:53:53 +08:00
parent ded8fa61a4
commit ad56663478
2 changed files with 3 additions and 5 deletions

View File

@@ -29,10 +29,8 @@ export const cutOrgNamePath = (namePath) => {
let names=newName.split('/'); let names=newName.split('/');
let len=names.length; let len=names.length;
//使用最后两们 //使用最后两们
if(len>3){ if(len>2){
newName=names[len-2]+'/'+names[len-1]; //newName=names[len-2]+'/'+names[len-1];
}else if(len==2){
//去掉第一位,只是取第二位
newName=names[1]; newName=names[1];
} }
// if(names.length>1){ // if(names.length>1){

View File

@@ -94,7 +94,7 @@
<author-img :avatar="ran.authorInfo.avatar" :aid="ran.authorInfo.aid" :sex="ran.authorInfo.sex"> <author-img :avatar="ran.authorInfo.avatar" :aid="ran.authorInfo.aid" :sex="ran.authorInfo.sex">
</author-img> <span>{{ran.authorInfo.name}}</span> </author-img> <span>{{ran.authorInfo.name}}</span>
</div> </div>
<div class="bm tab-bm" style="margin-left:30px;">{{ran.authorInfo.orgInfo}}</div> <div class="bm tab-bm" style="margin-left:30px;">{{cutOrgNamePath(ran.authorInfo.orgInfo)}}</div>
<div class="jy tab-jy"> <div class="jy tab-jy">
<div v-if="cycle == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.total}}</div> <div v-if="cycle == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.total}}</div>
<div v-if="cycle == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.months}}</div> <div v-if="cycle == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.months}}</div>